analytica-frontend-lib 1.1.57 → 1.1.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordation/index.js +20 -2
- package/dist/Accordation/index.js.map +1 -1
- package/dist/Accordation/index.mjs +22 -3
- package/dist/Accordation/index.mjs.map +1 -1
- package/dist/Card/index.js +20 -2
- package/dist/Card/index.js.map +1 -1
- package/dist/Card/index.mjs +22 -3
- package/dist/Card/index.mjs.map +1 -1
- package/dist/DropdownMenu/index.js +1 -1
- package/dist/DropdownMenu/index.js.map +1 -1
- package/dist/DropdownMenu/index.mjs +1 -1
- package/dist/DropdownMenu/index.mjs.map +1 -1
- package/dist/NotificationCard/index.js +1 -1
- package/dist/NotificationCard/index.js.map +1 -1
- package/dist/NotificationCard/index.mjs +1 -1
- package/dist/NotificationCard/index.mjs.map +1 -1
- package/dist/Quiz/index.js +20 -2
- package/dist/Quiz/index.js.map +1 -1
- package/dist/Quiz/index.mjs +32 -13
- package/dist/Quiz/index.mjs.map +1 -1
- package/dist/Search/index.js +1 -1
- package/dist/Search/index.js.map +1 -1
- package/dist/Search/index.mjs +1 -1
- package/dist/Search/index.mjs.map +1 -1
- package/dist/SubjectInfo/index.d.mts +2 -0
- package/dist/SubjectInfo/index.d.ts +2 -0
- package/dist/SubjectInfo/index.js +313 -0
- package/dist/SubjectInfo/index.js.map +1 -0
- package/dist/SubjectInfo/index.mjs +293 -0
- package/dist/SubjectInfo/index.mjs.map +1 -0
- package/dist/SubjectInfo-DZvZ5alE.d.mts +37 -0
- package/dist/SubjectInfo-DZvZ5alE.d.ts +37 -0
- package/dist/VideoPlayer/index.js +20 -1
- package/dist/VideoPlayer/index.js.map +1 -1
- package/dist/VideoPlayer/index.mjs +20 -1
- package/dist/VideoPlayer/index.mjs.map +1 -1
- package/dist/index.css +73 -12
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +727 -382
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +758 -407
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +73 -12
- package/dist/styles.css.map +1 -1
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -2504,7 +2504,7 @@ var ProfileMenuHeader = forwardRef10(({ className, name, email, store: _store, .
|
|
|
2504
2504
|
className: cn("flex flex-row gap-4 items-center", className),
|
|
2505
2505
|
...props,
|
|
2506
2506
|
children: [
|
|
2507
|
-
/* @__PURE__ */ jsx20("span", { className: "size-16 bg-primary-100 rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsx20(User, { size: 34, className: "text-primary-
|
|
2507
|
+
/* @__PURE__ */ jsx20("span", { className: "size-16 bg-primary-100 rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsx20(User, { size: 34, className: "text-primary-800" }) }),
|
|
2508
2508
|
/* @__PURE__ */ jsxs13("div", { className: "flex flex-col ", children: [
|
|
2509
2509
|
/* @__PURE__ */ jsx20(Text_default, { size: "xl", weight: "bold", color: "text-text-950", children: name }),
|
|
2510
2510
|
/* @__PURE__ */ jsx20(Text_default, { size: "md", color: "text-text-600", children: email })
|
|
@@ -4325,7 +4325,8 @@ import {
|
|
|
4325
4325
|
forwardRef as forwardRef12,
|
|
4326
4326
|
Fragment as Fragment4,
|
|
4327
4327
|
useState as useState10,
|
|
4328
|
-
useRef as useRef7
|
|
4328
|
+
useRef as useRef7,
|
|
4329
|
+
useEffect as useEffect9
|
|
4329
4330
|
} from "react";
|
|
4330
4331
|
import {
|
|
4331
4332
|
CaretRight as CaretRight2,
|
|
@@ -5173,6 +5174,8 @@ var CardAudio = forwardRef12(
|
|
|
5173
5174
|
const [showSpeedMenu, setShowSpeedMenu] = useState10(false);
|
|
5174
5175
|
const [playbackRate, setPlaybackRate] = useState10(1);
|
|
5175
5176
|
const audioRef = useRef7(null);
|
|
5177
|
+
const volumeControlRef = useRef7(null);
|
|
5178
|
+
const speedMenuRef = useRef7(null);
|
|
5176
5179
|
const formatTime2 = (time) => {
|
|
5177
5180
|
const minutes = Math.floor(time / 60);
|
|
5178
5181
|
const seconds = Math.floor(time % 60);
|
|
@@ -5224,9 +5227,11 @@ var CardAudio = forwardRef12(
|
|
|
5224
5227
|
};
|
|
5225
5228
|
const toggleVolumeControl = () => {
|
|
5226
5229
|
setShowVolumeControl(!showVolumeControl);
|
|
5230
|
+
setShowSpeedMenu(false);
|
|
5227
5231
|
};
|
|
5228
5232
|
const toggleSpeedMenu = () => {
|
|
5229
5233
|
setShowSpeedMenu(!showSpeedMenu);
|
|
5234
|
+
setShowVolumeControl(false);
|
|
5230
5235
|
};
|
|
5231
5236
|
const handleSpeedChange = (speed) => {
|
|
5232
5237
|
setPlaybackRate(speed);
|
|
@@ -5244,6 +5249,20 @@ var CardAudio = forwardRef12(
|
|
|
5244
5249
|
}
|
|
5245
5250
|
return /* @__PURE__ */ jsx28(SpeakerHigh, { size: 24 });
|
|
5246
5251
|
};
|
|
5252
|
+
useEffect9(() => {
|
|
5253
|
+
const handleClickOutside = (event) => {
|
|
5254
|
+
if (volumeControlRef.current && !volumeControlRef.current.contains(event.target)) {
|
|
5255
|
+
setShowVolumeControl(false);
|
|
5256
|
+
}
|
|
5257
|
+
if (speedMenuRef.current && !speedMenuRef.current.contains(event.target)) {
|
|
5258
|
+
setShowSpeedMenu(false);
|
|
5259
|
+
}
|
|
5260
|
+
};
|
|
5261
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
5262
|
+
return () => {
|
|
5263
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
5264
|
+
};
|
|
5265
|
+
}, []);
|
|
5247
5266
|
return /* @__PURE__ */ jsxs21(
|
|
5248
5267
|
CardBase,
|
|
5249
5268
|
{
|
|
@@ -5332,7 +5351,7 @@ var CardAudio = forwardRef12(
|
|
|
5332
5351
|
}
|
|
5333
5352
|
) }),
|
|
5334
5353
|
/* @__PURE__ */ jsx28("p", { className: "text-text-800 text-md font-medium min-w-[2.5rem]", children: formatTime2(duration) }),
|
|
5335
|
-
/* @__PURE__ */ jsxs21("div", { className: "relative h-6", children: [
|
|
5354
|
+
/* @__PURE__ */ jsxs21("div", { className: "relative h-6", ref: volumeControlRef, children: [
|
|
5336
5355
|
/* @__PURE__ */ jsx28(
|
|
5337
5356
|
"button",
|
|
5338
5357
|
{
|
|
@@ -5394,7 +5413,7 @@ var CardAudio = forwardRef12(
|
|
|
5394
5413
|
}
|
|
5395
5414
|
)
|
|
5396
5415
|
] }),
|
|
5397
|
-
/* @__PURE__ */ jsxs21("div", { className: "relative h-6", children: [
|
|
5416
|
+
/* @__PURE__ */ jsxs21("div", { className: "relative h-6", ref: speedMenuRef, children: [
|
|
5398
5417
|
/* @__PURE__ */ jsx28(
|
|
5399
5418
|
"button",
|
|
5400
5419
|
{
|
|
@@ -6042,7 +6061,7 @@ var HeaderAlternative = forwardRef14(
|
|
|
6042
6061
|
// src/components/AlertDialog/AlertDialog.tsx
|
|
6043
6062
|
import {
|
|
6044
6063
|
forwardRef as forwardRef15,
|
|
6045
|
-
useEffect as
|
|
6064
|
+
useEffect as useEffect10
|
|
6046
6065
|
} from "react";
|
|
6047
6066
|
import { Fragment as Fragment6, jsx as jsx31, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
6048
6067
|
var SIZE_CLASSES11 = {
|
|
@@ -6070,7 +6089,7 @@ var AlertDialog = forwardRef15(
|
|
|
6070
6089
|
size = "medium",
|
|
6071
6090
|
...props
|
|
6072
6091
|
}, ref) => {
|
|
6073
|
-
|
|
6092
|
+
useEffect10(() => {
|
|
6074
6093
|
if (!isOpen || !closeOnEscape) return;
|
|
6075
6094
|
const handleEscape = (event) => {
|
|
6076
6095
|
if (event.key === "Escape") {
|
|
@@ -6080,7 +6099,7 @@ var AlertDialog = forwardRef15(
|
|
|
6080
6099
|
document.addEventListener("keydown", handleEscape);
|
|
6081
6100
|
return () => document.removeEventListener("keydown", handleEscape);
|
|
6082
6101
|
}, [isOpen, closeOnEscape]);
|
|
6083
|
-
|
|
6102
|
+
useEffect10(() => {
|
|
6084
6103
|
if (isOpen) {
|
|
6085
6104
|
document.body.style.overflow = "hidden";
|
|
6086
6105
|
} else {
|
|
@@ -6166,7 +6185,7 @@ var AlertDialog = forwardRef15(
|
|
|
6166
6185
|
AlertDialog.displayName = "AlertDialog";
|
|
6167
6186
|
|
|
6168
6187
|
// src/components/MultipleChoice/MultipleChoice.tsx
|
|
6169
|
-
import { useEffect as
|
|
6188
|
+
import { useEffect as useEffect11, useState as useState13 } from "react";
|
|
6170
6189
|
import { CheckCircle as CheckCircle5, XCircle as XCircle4, Check as Check4 } from "phosphor-react";
|
|
6171
6190
|
import { jsx as jsx32, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
6172
6191
|
var MultipleChoiceList = ({
|
|
@@ -6179,7 +6198,7 @@ var MultipleChoiceList = ({
|
|
|
6179
6198
|
mode = "interactive"
|
|
6180
6199
|
}) => {
|
|
6181
6200
|
const [actualValue, setActualValue] = useState13(selectedValues);
|
|
6182
|
-
|
|
6201
|
+
useEffect11(() => {
|
|
6183
6202
|
setActualValue(selectedValues);
|
|
6184
6203
|
}, [selectedValues]);
|
|
6185
6204
|
const getStatusBadge2 = (status) => {
|
|
@@ -6298,8 +6317,315 @@ var MultipleChoiceList = ({
|
|
|
6298
6317
|
);
|
|
6299
6318
|
};
|
|
6300
6319
|
|
|
6320
|
+
// src/assets/icons/subjects/BookOpenText.tsx
|
|
6321
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
6322
|
+
var BookOpenText = ({
|
|
6323
|
+
size,
|
|
6324
|
+
color
|
|
6325
|
+
}) => /* @__PURE__ */ jsx33(
|
|
6326
|
+
"svg",
|
|
6327
|
+
{
|
|
6328
|
+
width: size,
|
|
6329
|
+
height: size,
|
|
6330
|
+
viewBox: "0 0 32 32",
|
|
6331
|
+
fill: "none",
|
|
6332
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6333
|
+
children: /* @__PURE__ */ jsx33(
|
|
6334
|
+
"path",
|
|
6335
|
+
{
|
|
6336
|
+
d: "M29 6H20C19.2238 6 18.4582 6.18073 17.7639 6.52786C17.0697 6.875 16.4657 7.37902 16 8C15.5343 7.37902 14.9303 6.875 14.2361 6.52786C13.5418 6.18073 12.7762 6 12 6H3C2.73478 6 2.48043 6.10536 2.29289 6.29289C2.10536 6.48043 2 6.73478 2 7V25C2 25.2652 2.10536 25.5196 2.29289 25.7071C2.48043 25.8946 2.73478 26 3 26H12C12.7956 26 13.5587 26.3161 14.1213 26.8787C14.6839 27.4413 15 28.2044 15 29C15 29.2652 15.1054 29.5196 15.2929 29.7071C15.4804 29.8946 15.7348 30 16 30C16.2652 30 16.5196 29.8946 16.7071 29.7071C16.8946 29.5196 17 29.2652 17 29C17 28.2044 17.3161 27.4413 17.8787 26.8787C18.4413 26.3161 19.2044 26 20 26H29C29.2652 26 29.5196 25.8946 29.7071 25.7071C29.8946 25.5196 30 25.2652 30 25V7C30 6.73478 29.8946 6.48043 29.7071 6.29289C29.5196 6.10536 29.2652 6 29 6ZM12 24H4V8H12C12.7956 8 13.5587 8.31607 14.1213 8.87868C14.6839 9.44129 15 10.2044 15 11V25C14.1353 24.3493 13.0821 23.9983 12 24ZM28 24H20C18.9179 23.9983 17.8647 24.3493 17 25V11C17 10.2044 17.3161 9.44129 17.8787 8.87868C18.4413 8.31607 19.2044 8 20 8H28V24ZM20 11H25C25.2652 11 25.5196 11.1054 25.7071 11.2929C25.8946 11.4804 26 11.7348 26 12C26 12.2652 25.8946 12.5196 25.7071 12.7071C25.5196 12.8946 25.2652 13 25 13H20C19.7348 13 19.4804 12.8946 19.2929 12.7071C19.1054 12.5196 19 12.2652 19 12C19 11.7348 19.1054 11.4804 19.2929 11.2929C19.4804 11.1054 19.7348 11 20 11ZM26 16C26 16.2652 25.8946 16.5196 25.7071 16.7071C25.5196 16.8946 25.2652 17 25 17H20C19.7348 17 19.4804 16.8946 19.2929 16.7071C19.1054 16.5196 19 16.2652 19 16C19 15.7348 19.1054 15.4804 19.2929 15.2929C19.4804 15.1054 19.7348 15 20 15H25C25.2652 15 25.5196 15.1054 25.7071 15.2929C25.8946 15.4804 26 15.7348 26 16ZM26 20C26 20.2652 25.8946 20.5196 25.7071 20.7071C25.5196 20.8946 25.2652 21 25 21H20C19.7348 21 19.4804 20.8946 19.2929 20.7071C19.1054 20.5196 19 20.2652 19 20C19 19.7348 19.1054 19.4804 19.2929 19.2929C19.4804 19.1054 19.7348 19 20 19H25C25.2652 19 25.5196 19.1054 25.7071 19.2929C25.8946 19.4804 26 19.7348 26 20Z",
|
|
6337
|
+
fill: color
|
|
6338
|
+
}
|
|
6339
|
+
)
|
|
6340
|
+
}
|
|
6341
|
+
);
|
|
6342
|
+
|
|
6343
|
+
// src/assets/icons/subjects/ChatEN.tsx
|
|
6344
|
+
import { jsx as jsx34, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
6345
|
+
var ChatEN2 = ({ size, color }) => /* @__PURE__ */ jsxs26(
|
|
6346
|
+
"svg",
|
|
6347
|
+
{
|
|
6348
|
+
width: size,
|
|
6349
|
+
height: size,
|
|
6350
|
+
viewBox: "0 0 32 32",
|
|
6351
|
+
fill: "none",
|
|
6352
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6353
|
+
children: [
|
|
6354
|
+
/* @__PURE__ */ jsx34(
|
|
6355
|
+
"path",
|
|
6356
|
+
{
|
|
6357
|
+
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
6358
|
+
fill: color
|
|
6359
|
+
}
|
|
6360
|
+
),
|
|
6361
|
+
/* @__PURE__ */ jsx34(
|
|
6362
|
+
"path",
|
|
6363
|
+
{
|
|
6364
|
+
d: "M22.5488 12V20.5312H21.0781L17.252 14.4199V20.5312H15.7812V12H17.252L21.0898 18.123V12H22.5488Z",
|
|
6365
|
+
fill: color
|
|
6366
|
+
}
|
|
6367
|
+
),
|
|
6368
|
+
/* @__PURE__ */ jsx34(
|
|
6369
|
+
"path",
|
|
6370
|
+
{
|
|
6371
|
+
d: "M14.584 19.3652V20.5312H10.0547V19.3652H14.584ZM10.4707 12V20.5312H9V12H10.4707ZM13.9922 15.5625V16.7109H10.0547V15.5625H13.9922ZM14.5547 12V13.1719H10.0547V12H14.5547Z",
|
|
6372
|
+
fill: color
|
|
6373
|
+
}
|
|
6374
|
+
)
|
|
6375
|
+
]
|
|
6376
|
+
}
|
|
6377
|
+
);
|
|
6378
|
+
|
|
6379
|
+
// src/assets/icons/subjects/ChatES.tsx
|
|
6380
|
+
import { jsx as jsx35, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
6381
|
+
var ChatES2 = ({ size, color }) => /* @__PURE__ */ jsxs27(
|
|
6382
|
+
"svg",
|
|
6383
|
+
{
|
|
6384
|
+
width: size,
|
|
6385
|
+
height: size,
|
|
6386
|
+
viewBox: "0 0 32 32",
|
|
6387
|
+
fill: "none",
|
|
6388
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6389
|
+
children: [
|
|
6390
|
+
/* @__PURE__ */ jsx35(
|
|
6391
|
+
"path",
|
|
6392
|
+
{
|
|
6393
|
+
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
6394
|
+
fill: color
|
|
6395
|
+
}
|
|
6396
|
+
),
|
|
6397
|
+
/* @__PURE__ */ jsx35(
|
|
6398
|
+
"path",
|
|
6399
|
+
{
|
|
6400
|
+
d: "M21.1426 17.8027C21.1426 17.627 21.1152 17.4707 21.0605 17.334C21.0098 17.1973 20.918 17.0723 20.7852 16.959C20.6523 16.8457 20.4648 16.7363 20.2227 16.6309C19.9844 16.5215 19.6797 16.4102 19.3086 16.2969C18.9023 16.1719 18.5273 16.0332 18.1836 15.8809C17.8438 15.7246 17.5469 15.5449 17.293 15.3418C17.0391 15.1348 16.8418 14.8984 16.7012 14.6328C16.5605 14.3633 16.4902 14.0527 16.4902 13.7012C16.4902 13.3535 16.5625 13.0371 16.707 12.752C16.8555 12.4668 17.0645 12.2207 17.334 12.0137C17.6074 11.8027 17.9297 11.6406 18.3008 11.5273C18.6719 11.4102 19.082 11.3516 19.5312 11.3516C20.1641 11.3516 20.709 11.4688 21.166 11.7031C21.627 11.9375 21.9805 12.252 22.2266 12.6465C22.4766 13.041 22.6016 13.4766 22.6016 13.9531H21.1426C21.1426 13.6719 21.082 13.4238 20.9609 13.209C20.8438 12.9902 20.6641 12.8184 20.4219 12.6934C20.1836 12.5684 19.8809 12.5059 19.5137 12.5059C19.166 12.5059 18.877 12.5586 18.6465 12.6641C18.416 12.7695 18.2441 12.9121 18.1309 13.0918C18.0176 13.2715 17.9609 13.4746 17.9609 13.7012C17.9609 13.8613 17.998 14.0078 18.0723 14.1406C18.1465 14.2695 18.2598 14.3906 18.4121 14.5039C18.5645 14.6133 18.7559 14.7168 18.9863 14.8145C19.2168 14.9121 19.4883 15.0059 19.8008 15.0957C20.2734 15.2363 20.6855 15.3926 21.0371 15.5645C21.3887 15.7324 21.6816 15.9238 21.916 16.1387C22.1504 16.3535 22.3262 16.5977 22.4434 16.8711C22.5605 17.1406 22.6191 17.4473 22.6191 17.791C22.6191 18.1504 22.5469 18.4746 22.4023 18.7637C22.2578 19.0488 22.0508 19.293 21.7812 19.4961C21.5156 19.6953 21.1953 19.8496 20.8203 19.959C20.4492 20.0645 20.0352 20.1172 19.5781 20.1172C19.168 20.1172 18.7637 20.0625 18.3652 19.9531C17.9707 19.8438 17.6113 19.6777 17.2871 19.4551C16.9629 19.2285 16.7051 18.9473 16.5137 18.6113C16.3223 18.2715 16.2266 17.875 16.2266 17.4219H17.6973C17.6973 17.6992 17.7441 17.9355 17.8379 18.1309C17.9355 18.3262 18.0703 18.4863 18.2422 18.6113C18.4141 18.7324 18.6133 18.8223 18.8398 18.8809C19.0703 18.9395 19.3164 18.9688 19.5781 18.9688C19.9219 18.9688 20.209 18.9199 20.4395 18.8223C20.6738 18.7246 20.8496 18.5879 20.9668 18.4121C21.084 18.2363 21.1426 18.0332 21.1426 17.8027Z",
|
|
6401
|
+
fill: color
|
|
6402
|
+
}
|
|
6403
|
+
),
|
|
6404
|
+
/* @__PURE__ */ jsx35(
|
|
6405
|
+
"path",
|
|
6406
|
+
{
|
|
6407
|
+
d: "M15.4512 18.834V20H10.9219V18.834H15.4512ZM11.3379 11.4688V20H9.86719V11.4688H11.3379ZM14.8594 15.0312V16.1797H10.9219V15.0312H14.8594ZM15.4219 11.4688V12.6406H10.9219V11.4688H15.4219Z",
|
|
6408
|
+
fill: color
|
|
6409
|
+
}
|
|
6410
|
+
)
|
|
6411
|
+
]
|
|
6412
|
+
}
|
|
6413
|
+
);
|
|
6414
|
+
|
|
6415
|
+
// src/assets/icons/subjects/ChatPT.tsx
|
|
6416
|
+
import { jsx as jsx36, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6417
|
+
var ChatPT2 = ({ size, color }) => /* @__PURE__ */ jsxs28(
|
|
6418
|
+
"svg",
|
|
6419
|
+
{
|
|
6420
|
+
width: size,
|
|
6421
|
+
height: size,
|
|
6422
|
+
viewBox: "0 0 32 32",
|
|
6423
|
+
fill: "none",
|
|
6424
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6425
|
+
children: [
|
|
6426
|
+
/* @__PURE__ */ jsx36(
|
|
6427
|
+
"path",
|
|
6428
|
+
{
|
|
6429
|
+
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
6430
|
+
fill: color
|
|
6431
|
+
}
|
|
6432
|
+
),
|
|
6433
|
+
/* @__PURE__ */ jsx36(
|
|
6434
|
+
"path",
|
|
6435
|
+
{
|
|
6436
|
+
d: "M21.1758 12V20.5312H19.7168V12H21.1758ZM23.8535 12V13.1719H17.0625V12H23.8535Z",
|
|
6437
|
+
fill: color
|
|
6438
|
+
}
|
|
6439
|
+
),
|
|
6440
|
+
/* @__PURE__ */ jsx36(
|
|
6441
|
+
"path",
|
|
6442
|
+
{
|
|
6443
|
+
d: "M13.2402 17.3496H11.0195V16.1836H13.2402C13.627 16.1836 13.9395 16.1211 14.1777 15.9961C14.416 15.8711 14.5898 15.6992 14.6992 15.4805C14.8125 15.2578 14.8691 15.0039 14.8691 14.7188C14.8691 14.4492 14.8125 14.1973 14.6992 13.9629C14.5898 13.7246 14.416 13.5332 14.1777 13.3887C13.9395 13.2441 13.627 13.1719 13.2402 13.1719H11.4707V20.5312H10V12H13.2402C13.9004 12 14.4609 12.1172 14.9219 12.3516C15.3867 12.582 15.7402 12.9023 15.9824 13.3125C16.2246 13.7188 16.3457 14.1836 16.3457 14.707C16.3457 15.2578 16.2246 15.7305 15.9824 16.125C15.7402 16.5195 15.3867 16.8223 14.9219 17.0332C14.4609 17.2441 13.9004 17.3496 13.2402 17.3496Z",
|
|
6444
|
+
fill: color
|
|
6445
|
+
}
|
|
6446
|
+
)
|
|
6447
|
+
]
|
|
6448
|
+
}
|
|
6449
|
+
);
|
|
6450
|
+
|
|
6451
|
+
// src/assets/icons/subjects/HeadCircuit.tsx
|
|
6452
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
6453
|
+
var HeadCircuit = ({
|
|
6454
|
+
size,
|
|
6455
|
+
color
|
|
6456
|
+
}) => /* @__PURE__ */ jsx37(
|
|
6457
|
+
"svg",
|
|
6458
|
+
{
|
|
6459
|
+
width: size,
|
|
6460
|
+
height: size,
|
|
6461
|
+
viewBox: "0 0 32 32",
|
|
6462
|
+
fill: "none",
|
|
6463
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6464
|
+
children: /* @__PURE__ */ jsx37(
|
|
6465
|
+
"path",
|
|
6466
|
+
{
|
|
6467
|
+
d: "M24.0625 21.4338C25.327 20.3715 26.3372 19.0392 27.0187 17.5348C27.7001 16.0304 28.0354 14.3924 28 12.7413C27.875 7.02751 23.2987 2.31626 17.595 2.01626C16.1233 1.93616 14.6506 2.15261 13.2642 2.65277C11.8778 3.15293 10.6061 3.92659 9.52453 4.92781C8.44297 5.92903 7.57365 7.13739 6.96819 8.48112C6.36272 9.82485 6.03347 11.2766 5.99997 12.75L3.19372 18.1475C3.18247 18.17 3.17122 18.1925 3.16122 18.215C2.96003 18.6839 2.94569 19.212 3.12114 19.6912C3.29659 20.1704 3.64855 20.5644 4.10497 20.7925L4.13622 20.8063L6.99997 22.1175V26C6.99997 26.5304 7.21068 27.0392 7.58576 27.4142C7.96083 27.7893 8.46954 28 8.99997 28H15C15.2652 28 15.5195 27.8947 15.7071 27.7071C15.8946 27.5196 16 27.2652 16 27C16 26.7348 15.8946 26.4804 15.7071 26.2929C15.5195 26.1054 15.2652 26 15 26H8.99997V21.4763C9.00011 21.2846 8.94517 21.0969 8.84168 20.9356C8.73818 20.7742 8.5905 20.646 8.41622 20.5663L4.99997 19L7.88372 13.4575C7.95889 13.3166 7.99878 13.1597 7.99997 13C7.99968 10.9604 8.69216 8.98124 9.96395 7.38674C11.2357 5.79224 13.0114 4.677 15 4.22376V6.17251C14.3328 6.4084 13.7704 6.87258 13.4123 7.48299C13.0543 8.0934 12.9235 8.81075 13.0432 9.50824C13.1628 10.2057 13.5252 10.8385 14.0663 11.2946C14.6074 11.7508 15.2923 12.0009 16 12.0009C16.7077 12.0009 17.3926 11.7508 17.9336 11.2946C18.4747 10.8385 18.8371 10.2057 18.9568 9.50824C19.0764 8.81075 18.9457 8.0934 18.5876 7.48299C18.2295 6.87258 17.6672 6.4084 17 6.17251V4.00001C17.1625 4.00001 17.325 4.00001 17.4875 4.01251C19.2608 4.11409 20.9649 4.73627 22.3864 5.80124C23.808 6.86621 24.8841 8.32669 25.48 10H23C22.8533 9.99995 22.7084 10.0322 22.5755 10.0944C22.4426 10.1566 22.3251 10.2473 22.2312 10.36L19.0425 14.1875C18.3774 13.9397 17.6462 13.9351 16.9781 14.1744C16.3099 14.4138 15.748 14.8817 15.3916 15.4954C15.0352 16.1092 14.9073 16.8292 15.0306 17.5281C15.1538 18.227 15.5203 18.8598 16.0652 19.3146C16.61 19.7694 17.2981 20.0168 18.0078 20.0132C18.7175 20.0095 19.4031 19.755 19.9432 19.2947C20.4834 18.8343 20.8433 18.1977 20.9594 17.4976C21.0754 16.7974 20.9402 16.0788 20.5775 15.4688L23.4687 12H25.9425C25.9725 12.26 25.9908 12.5225 25.9975 12.7875C26.0286 14.2198 25.7187 15.639 25.0931 16.9278C24.4676 18.2167 23.5445 19.3383 22.4 20.2C22.2589 20.3057 22.1484 20.4469 22.0794 20.6091C22.0105 20.7713 21.9857 20.9489 22.0075 21.1238L23.0075 29.1238C23.0379 29.3653 23.1554 29.5874 23.3379 29.7485C23.5203 29.9095 23.7553 29.9985 23.9987 29.9988C24.0405 29.9988 24.0822 29.9962 24.1237 29.9913C24.2541 29.975 24.3799 29.9333 24.4942 29.8684C24.6084 29.8035 24.7087 29.7168 24.7893 29.6131C24.87 29.5094 24.9295 29.3909 24.9643 29.2643C24.9992 29.1376 25.0087 29.0054 24.9925 28.875L24.0625 21.4338ZM16 10C15.8022 10 15.6088 9.94136 15.4444 9.83148C15.28 9.7216 15.1518 9.56542 15.0761 9.38269C15.0004 9.19997 14.9806 8.9989 15.0192 8.80492C15.0578 8.61094 15.153 8.43275 15.2929 8.2929C15.4327 8.15305 15.6109 8.05781 15.8049 8.01922C15.9989 7.98064 16.1999 8.00044 16.3827 8.07613C16.5654 8.15182 16.7216 8.27999 16.8314 8.44444C16.9413 8.60889 17 8.80223 17 9.00001C17 9.26523 16.8946 9.51958 16.7071 9.70712C16.5195 9.89465 16.2652 10 16 10ZM18 18C17.8022 18 17.6088 17.9414 17.4444 17.8315C17.28 17.7216 17.1518 17.5654 17.0761 17.3827C17.0004 17.2 16.9806 16.9989 17.0192 16.8049C17.0578 16.6109 17.153 16.4328 17.2929 16.2929C17.4327 16.153 17.6109 16.0578 17.8049 16.0192C17.9989 15.9806 18.1999 16.0004 18.3827 16.0761C18.5654 16.1518 18.7216 16.28 18.8314 16.4444C18.9413 16.6089 19 16.8022 19 17C19 17.2652 18.8946 17.5196 18.7071 17.7071C18.5195 17.8947 18.2652 18 18 18Z",
|
|
6468
|
+
fill: color
|
|
6469
|
+
}
|
|
6470
|
+
)
|
|
6471
|
+
}
|
|
6472
|
+
);
|
|
6473
|
+
|
|
6474
|
+
// src/assets/icons/subjects/Microscope.tsx
|
|
6475
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
6476
|
+
var Microscope = ({
|
|
6477
|
+
size,
|
|
6478
|
+
color
|
|
6479
|
+
}) => /* @__PURE__ */ jsx38(
|
|
6480
|
+
"svg",
|
|
6481
|
+
{
|
|
6482
|
+
width: size,
|
|
6483
|
+
height: size,
|
|
6484
|
+
viewBox: "0 0 32 32",
|
|
6485
|
+
fill: "none",
|
|
6486
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6487
|
+
children: /* @__PURE__ */ jsx38(
|
|
6488
|
+
"path",
|
|
6489
|
+
{
|
|
6490
|
+
d: "M28 26H25.4925C26.7637 24.4552 27.5898 22.5932 27.882 20.6142C28.1743 18.6351 27.9216 16.6138 27.1511 14.7676C26.3806 12.9213 25.1215 11.32 23.5092 10.1358C21.8968 8.95153 19.9922 8.22913 18 8.04625V4C18 3.46957 17.7893 2.96086 17.4142 2.58579C17.0391 2.21071 16.5304 2 16 2H10C9.46957 2 8.96086 2.21071 8.58579 2.58579C8.21071 2.96086 8 3.46957 8 4V17C8 17.5304 8.21071 18.0391 8.58579 18.4142C8.96086 18.7893 9.46957 19 10 19H16C16.5304 19 17.0391 18.7893 17.4142 18.4142C17.7893 18.0391 18 17.5304 18 17V10.0575C19.7643 10.2552 21.4306 10.9703 22.7895 12.1128C24.1483 13.2553 25.1389 14.7742 25.6366 16.4783C26.1343 18.1824 26.1169 19.9957 25.5866 21.69C25.0563 23.3842 24.0368 24.8838 22.6562 26H4C3.73478 26 3.48043 26.1054 3.29289 26.2929C3.10536 26.4804 3 26.7348 3 27C3 27.2652 3.10536 27.5196 3.29289 27.7071C3.48043 27.8946 3.73478 28 4 28H28C28.2652 28 28.5196 27.8946 28.7071 27.7071C28.8946 27.5196 29 27.2652 29 27C29 26.7348 28.8946 26.4804 28.7071 26.2929C28.5196 26.1054 28.2652 26 28 26ZM16 17H10V4H16V17ZM9 23C8.73478 23 8.48043 22.8946 8.29289 22.7071C8.10536 22.5196 8 22.2652 8 22C8 21.7348 8.10536 21.4804 8.29289 21.2929C8.48043 21.1054 8.73478 21 9 21H17C17.2652 21 17.5196 21.1054 17.7071 21.2929C17.8946 21.4804 18 21.7348 18 22C18 22.2652 17.8946 22.5196 17.7071 22.7071C17.5196 22.8946 17.2652 23 17 23H9Z",
|
|
6491
|
+
fill: color
|
|
6492
|
+
}
|
|
6493
|
+
)
|
|
6494
|
+
}
|
|
6495
|
+
);
|
|
6496
|
+
|
|
6497
|
+
// src/enums/SubjectEnum.ts
|
|
6498
|
+
var SubjectEnum = /* @__PURE__ */ ((SubjectEnum2) => {
|
|
6499
|
+
SubjectEnum2["FISICA"] = "F\xEDsica";
|
|
6500
|
+
SubjectEnum2["HISTORIA"] = "Hist\xF3ria";
|
|
6501
|
+
SubjectEnum2["LITERATURA"] = "Literatura";
|
|
6502
|
+
SubjectEnum2["GEOGRAFIA"] = "Geografia";
|
|
6503
|
+
SubjectEnum2["BIOLOGIA"] = "Biologia";
|
|
6504
|
+
SubjectEnum2["PORTUGUES"] = "Portugu\xEAs";
|
|
6505
|
+
SubjectEnum2["QUIMICA"] = "Qu\xEDmica";
|
|
6506
|
+
SubjectEnum2["ARTES"] = "Artes";
|
|
6507
|
+
SubjectEnum2["MATEMATICA"] = "Matem\xE1tica";
|
|
6508
|
+
SubjectEnum2["FILOSOFIA"] = "Filosofia";
|
|
6509
|
+
SubjectEnum2["ESPANHOL"] = "Espanhol";
|
|
6510
|
+
SubjectEnum2["REDACAO"] = "Reda\xE7\xE3o";
|
|
6511
|
+
SubjectEnum2["SOCIOLOGIA"] = "Sociologia";
|
|
6512
|
+
SubjectEnum2["INGLES"] = "Ingl\xEAs";
|
|
6513
|
+
SubjectEnum2["EDUCACAO_FISICA"] = "Ed. F\xEDsica";
|
|
6514
|
+
SubjectEnum2["TRILHAS"] = "Trilhas";
|
|
6515
|
+
return SubjectEnum2;
|
|
6516
|
+
})(SubjectEnum || {});
|
|
6517
|
+
|
|
6518
|
+
// src/components/SubjectInfo/SubjectInfo.tsx
|
|
6519
|
+
import {
|
|
6520
|
+
ArticleNyTimes,
|
|
6521
|
+
Atom,
|
|
6522
|
+
BookBookmark,
|
|
6523
|
+
DribbbleLogo,
|
|
6524
|
+
Flask,
|
|
6525
|
+
GlobeHemisphereWest,
|
|
6526
|
+
MathOperations,
|
|
6527
|
+
Palette,
|
|
6528
|
+
Person,
|
|
6529
|
+
Scroll
|
|
6530
|
+
} from "phosphor-react";
|
|
6531
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
6532
|
+
var SubjectInfo = {
|
|
6533
|
+
["F\xEDsica" /* FISICA */]: {
|
|
6534
|
+
icon: /* @__PURE__ */ jsx39(Atom, { size: 17 }),
|
|
6535
|
+
colorClass: "bg-subject-1",
|
|
6536
|
+
name: "F\xEDsica" /* FISICA */
|
|
6537
|
+
},
|
|
6538
|
+
["Hist\xF3ria" /* HISTORIA */]: {
|
|
6539
|
+
icon: /* @__PURE__ */ jsx39(Scroll, { size: 17 }),
|
|
6540
|
+
colorClass: "bg-subject-2",
|
|
6541
|
+
name: "Hist\xF3ria" /* HISTORIA */
|
|
6542
|
+
},
|
|
6543
|
+
["Literatura" /* LITERATURA */]: {
|
|
6544
|
+
icon: /* @__PURE__ */ jsx39(BookOpenText, { size: 17, color: "#000000" }),
|
|
6545
|
+
colorClass: "bg-subject-3",
|
|
6546
|
+
name: "Literatura" /* LITERATURA */
|
|
6547
|
+
},
|
|
6548
|
+
["Geografia" /* GEOGRAFIA */]: {
|
|
6549
|
+
icon: /* @__PURE__ */ jsx39(GlobeHemisphereWest, { size: 17 }),
|
|
6550
|
+
colorClass: "bg-subject-4",
|
|
6551
|
+
name: "Geografia" /* GEOGRAFIA */
|
|
6552
|
+
},
|
|
6553
|
+
["Biologia" /* BIOLOGIA */]: {
|
|
6554
|
+
icon: /* @__PURE__ */ jsx39(Microscope, { size: 17, color: "#000000" }),
|
|
6555
|
+
colorClass: "bg-subject-5",
|
|
6556
|
+
name: "Biologia" /* BIOLOGIA */
|
|
6557
|
+
},
|
|
6558
|
+
["Portugu\xEAs" /* PORTUGUES */]: {
|
|
6559
|
+
icon: /* @__PURE__ */ jsx39(ChatPT2, { size: 17, color: "#000000" }),
|
|
6560
|
+
colorClass: "bg-subject-6",
|
|
6561
|
+
name: "Portugu\xEAs" /* PORTUGUES */
|
|
6562
|
+
},
|
|
6563
|
+
["Qu\xEDmica" /* QUIMICA */]: {
|
|
6564
|
+
icon: /* @__PURE__ */ jsx39(Flask, { size: 17 }),
|
|
6565
|
+
colorClass: "bg-subject-7",
|
|
6566
|
+
name: "Qu\xEDmica" /* QUIMICA */
|
|
6567
|
+
},
|
|
6568
|
+
["Artes" /* ARTES */]: {
|
|
6569
|
+
icon: /* @__PURE__ */ jsx39(Palette, { size: 17 }),
|
|
6570
|
+
colorClass: "bg-subject-8",
|
|
6571
|
+
name: "Artes" /* ARTES */
|
|
6572
|
+
},
|
|
6573
|
+
["Matem\xE1tica" /* MATEMATICA */]: {
|
|
6574
|
+
icon: /* @__PURE__ */ jsx39(MathOperations, { size: 17 }),
|
|
6575
|
+
colorClass: "bg-subject-9",
|
|
6576
|
+
name: "Matem\xE1tica" /* MATEMATICA */
|
|
6577
|
+
},
|
|
6578
|
+
["Filosofia" /* FILOSOFIA */]: {
|
|
6579
|
+
icon: /* @__PURE__ */ jsx39(HeadCircuit, { size: 17, color: "#000000" }),
|
|
6580
|
+
colorClass: "bg-subject-10",
|
|
6581
|
+
name: "Filosofia" /* FILOSOFIA */
|
|
6582
|
+
},
|
|
6583
|
+
["Espanhol" /* ESPANHOL */]: {
|
|
6584
|
+
icon: /* @__PURE__ */ jsx39(ChatES2, { size: 17, color: "#000000" }),
|
|
6585
|
+
colorClass: "bg-subject-11",
|
|
6586
|
+
name: "Espanhol" /* ESPANHOL */
|
|
6587
|
+
},
|
|
6588
|
+
["Reda\xE7\xE3o" /* REDACAO */]: {
|
|
6589
|
+
icon: /* @__PURE__ */ jsx39(ArticleNyTimes, { size: 17 }),
|
|
6590
|
+
colorClass: "bg-subject-12",
|
|
6591
|
+
name: "Reda\xE7\xE3o" /* REDACAO */
|
|
6592
|
+
},
|
|
6593
|
+
["Sociologia" /* SOCIOLOGIA */]: {
|
|
6594
|
+
icon: /* @__PURE__ */ jsx39(Person, { size: 17 }),
|
|
6595
|
+
colorClass: "bg-subject-13",
|
|
6596
|
+
name: "Sociologia" /* SOCIOLOGIA */
|
|
6597
|
+
},
|
|
6598
|
+
["Ingl\xEAs" /* INGLES */]: {
|
|
6599
|
+
icon: /* @__PURE__ */ jsx39(ChatEN2, { size: 17, color: "#000000" }),
|
|
6600
|
+
colorClass: "bg-subject-14",
|
|
6601
|
+
name: "Ingl\xEAs" /* INGLES */
|
|
6602
|
+
},
|
|
6603
|
+
["Ed. F\xEDsica" /* EDUCACAO_FISICA */]: {
|
|
6604
|
+
icon: /* @__PURE__ */ jsx39(DribbbleLogo, { size: 17 }),
|
|
6605
|
+
colorClass: "bg-subject-15",
|
|
6606
|
+
name: "Ed. F\xEDsica" /* EDUCACAO_FISICA */
|
|
6607
|
+
},
|
|
6608
|
+
["Trilhas" /* TRILHAS */]: {
|
|
6609
|
+
icon: /* @__PURE__ */ jsx39(BookBookmark, { size: 17 }),
|
|
6610
|
+
colorClass: "bg-subject-16",
|
|
6611
|
+
name: "Trilhas" /* TRILHAS */
|
|
6612
|
+
}
|
|
6613
|
+
};
|
|
6614
|
+
var getSubjectData = (subject) => {
|
|
6615
|
+
return SubjectInfo[subject];
|
|
6616
|
+
};
|
|
6617
|
+
var getSubjectIcon = (subject) => {
|
|
6618
|
+
return SubjectInfo[subject].icon;
|
|
6619
|
+
};
|
|
6620
|
+
var getSubjectColorClass = (subject) => {
|
|
6621
|
+
return SubjectInfo[subject].colorClass;
|
|
6622
|
+
};
|
|
6623
|
+
var getSubjectName = (subject) => {
|
|
6624
|
+
return SubjectInfo[subject].name;
|
|
6625
|
+
};
|
|
6626
|
+
|
|
6301
6627
|
// src/hooks/useMobile.ts
|
|
6302
|
-
import { useState as useState14, useEffect as
|
|
6628
|
+
import { useState as useState14, useEffect as useEffect12 } from "react";
|
|
6303
6629
|
var MOBILE_WIDTH = 500;
|
|
6304
6630
|
var TABLET_WIDTH = 931;
|
|
6305
6631
|
var DEFAULT_WIDTH = 1200;
|
|
@@ -6316,7 +6642,7 @@ var getDeviceType = () => {
|
|
|
6316
6642
|
var useMobile = () => {
|
|
6317
6643
|
const [isMobile, setIsMobile] = useState14(false);
|
|
6318
6644
|
const [isTablet, setIsTablet] = useState14(false);
|
|
6319
|
-
|
|
6645
|
+
useEffect12(() => {
|
|
6320
6646
|
const checkScreenSize = () => {
|
|
6321
6647
|
const width = getWindowWidth();
|
|
6322
6648
|
setIsMobile(width < MOBILE_WIDTH);
|
|
@@ -6358,7 +6684,7 @@ var useMobile = () => {
|
|
|
6358
6684
|
// src/components/Select/Select.tsx
|
|
6359
6685
|
import { create as create5, useStore as useStore4 } from "zustand";
|
|
6360
6686
|
import {
|
|
6361
|
-
useEffect as
|
|
6687
|
+
useEffect as useEffect13,
|
|
6362
6688
|
useRef as useRef8,
|
|
6363
6689
|
forwardRef as forwardRef16,
|
|
6364
6690
|
isValidElement as isValidElement4,
|
|
@@ -6367,7 +6693,7 @@ import {
|
|
|
6367
6693
|
useId as useId10
|
|
6368
6694
|
} from "react";
|
|
6369
6695
|
import { CaretDown, Check as Check5, WarningCircle as WarningCircle5 } from "phosphor-react";
|
|
6370
|
-
import { Fragment as Fragment7, jsx as
|
|
6696
|
+
import { Fragment as Fragment7, jsx as jsx40, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
6371
6697
|
var VARIANT_CLASSES4 = {
|
|
6372
6698
|
outlined: "border-2 rounded-lg focus:border-primary-950",
|
|
6373
6699
|
underlined: "border-b-2 focus:border-primary-950",
|
|
@@ -6427,7 +6753,7 @@ function getLabelAsNode(children) {
|
|
|
6427
6753
|
}
|
|
6428
6754
|
const flattened = Children4.toArray(children);
|
|
6429
6755
|
if (flattened.length === 1) return flattened[0];
|
|
6430
|
-
return /* @__PURE__ */
|
|
6756
|
+
return /* @__PURE__ */ jsx40(Fragment7, { children: flattened });
|
|
6431
6757
|
}
|
|
6432
6758
|
var injectStore4 = (children, store, size, selectId) => {
|
|
6433
6759
|
return Children4.map(children, (child) => {
|
|
@@ -6489,13 +6815,13 @@ var Select = ({
|
|
|
6489
6815
|
search(children2);
|
|
6490
6816
|
return found;
|
|
6491
6817
|
};
|
|
6492
|
-
|
|
6818
|
+
useEffect13(() => {
|
|
6493
6819
|
if (!selectedLabel && defaultValue) {
|
|
6494
6820
|
const label2 = findLabelForValue(children, defaultValue);
|
|
6495
6821
|
if (label2) store.setState({ selectedLabel: label2 });
|
|
6496
6822
|
}
|
|
6497
6823
|
}, [children, defaultValue, selectedLabel]);
|
|
6498
|
-
|
|
6824
|
+
useEffect13(() => {
|
|
6499
6825
|
const handleClickOutside = (event) => {
|
|
6500
6826
|
if (selectRef.current && !selectRef.current.contains(event.target)) {
|
|
6501
6827
|
setOpen(false);
|
|
@@ -6530,7 +6856,7 @@ var Select = ({
|
|
|
6530
6856
|
document.removeEventListener("keydown", handleArrowKeys);
|
|
6531
6857
|
};
|
|
6532
6858
|
}, [open]);
|
|
6533
|
-
|
|
6859
|
+
useEffect13(() => {
|
|
6534
6860
|
if (propValue) {
|
|
6535
6861
|
setValue(propValue);
|
|
6536
6862
|
const label2 = findLabelForValue(children, propValue);
|
|
@@ -6538,8 +6864,8 @@ var Select = ({
|
|
|
6538
6864
|
}
|
|
6539
6865
|
}, [propValue]);
|
|
6540
6866
|
const sizeClasses = SIZE_CLASSES12[size];
|
|
6541
|
-
return /* @__PURE__ */
|
|
6542
|
-
label && /* @__PURE__ */
|
|
6867
|
+
return /* @__PURE__ */ jsxs29("div", { className: cn("w-full", className), children: [
|
|
6868
|
+
label && /* @__PURE__ */ jsx40(
|
|
6543
6869
|
"label",
|
|
6544
6870
|
{
|
|
6545
6871
|
htmlFor: selectId,
|
|
@@ -6547,11 +6873,11 @@ var Select = ({
|
|
|
6547
6873
|
children: label
|
|
6548
6874
|
}
|
|
6549
6875
|
),
|
|
6550
|
-
/* @__PURE__ */
|
|
6551
|
-
(helperText || errorMessage) && /* @__PURE__ */
|
|
6552
|
-
helperText && /* @__PURE__ */
|
|
6553
|
-
errorMessage && /* @__PURE__ */
|
|
6554
|
-
/* @__PURE__ */
|
|
6876
|
+
/* @__PURE__ */ jsx40("div", { className: cn("relative w-full"), ref: selectRef, children: injectStore4(children, store, size, selectId) }),
|
|
6877
|
+
(helperText || errorMessage) && /* @__PURE__ */ jsxs29("div", { className: "mt-1.5 gap-1.5", children: [
|
|
6878
|
+
helperText && /* @__PURE__ */ jsx40("p", { className: "text-sm text-text-500", children: helperText }),
|
|
6879
|
+
errorMessage && /* @__PURE__ */ jsxs29("p", { className: "flex gap-1 items-center text-sm text-indicator-error", children: [
|
|
6880
|
+
/* @__PURE__ */ jsx40(WarningCircle5, { size: 16 }),
|
|
6555
6881
|
" ",
|
|
6556
6882
|
errorMessage
|
|
6557
6883
|
] })
|
|
@@ -6565,7 +6891,7 @@ var SelectValue = ({
|
|
|
6565
6891
|
const store = useSelectStore(externalStore);
|
|
6566
6892
|
const selectedLabel = useStore4(store, (s) => s.selectedLabel);
|
|
6567
6893
|
const value = useStore4(store, (s) => s.value);
|
|
6568
|
-
return /* @__PURE__ */
|
|
6894
|
+
return /* @__PURE__ */ jsx40("span", { className: "text-inherit flex gap-2 items-center", children: selectedLabel || placeholder || value });
|
|
6569
6895
|
};
|
|
6570
6896
|
var SelectTrigger = forwardRef16(
|
|
6571
6897
|
({
|
|
@@ -6584,7 +6910,7 @@ var SelectTrigger = forwardRef16(
|
|
|
6584
6910
|
const variantClasses = VARIANT_CLASSES4[variant];
|
|
6585
6911
|
const heightClasses = HEIGHT_CLASSES[size];
|
|
6586
6912
|
const paddingClasses = PADDING_CLASSES[size];
|
|
6587
|
-
return /* @__PURE__ */
|
|
6913
|
+
return /* @__PURE__ */ jsxs29(
|
|
6588
6914
|
"button",
|
|
6589
6915
|
{
|
|
6590
6916
|
ref,
|
|
@@ -6606,7 +6932,7 @@ var SelectTrigger = forwardRef16(
|
|
|
6606
6932
|
...props,
|
|
6607
6933
|
children: [
|
|
6608
6934
|
props.children,
|
|
6609
|
-
/* @__PURE__ */
|
|
6935
|
+
/* @__PURE__ */ jsx40(
|
|
6610
6936
|
CaretDown,
|
|
6611
6937
|
{
|
|
6612
6938
|
className: cn(
|
|
@@ -6634,7 +6960,7 @@ var SelectContent = forwardRef16(
|
|
|
6634
6960
|
const open = useStore4(store, (s) => s.open);
|
|
6635
6961
|
if (!open) return null;
|
|
6636
6962
|
const getPositionClasses = () => `w-full min-w-full absolute ${SIDE_CLASSES2[side]} ${ALIGN_CLASSES2[align]}`;
|
|
6637
|
-
return /* @__PURE__ */
|
|
6963
|
+
return /* @__PURE__ */ jsx40(
|
|
6638
6964
|
"div",
|
|
6639
6965
|
{
|
|
6640
6966
|
role: "menu",
|
|
@@ -6678,7 +7004,7 @@ var SelectItem = forwardRef16(
|
|
|
6678
7004
|
}
|
|
6679
7005
|
props.onClick?.(e);
|
|
6680
7006
|
};
|
|
6681
|
-
return /* @__PURE__ */
|
|
7007
|
+
return /* @__PURE__ */ jsxs29(
|
|
6682
7008
|
"div",
|
|
6683
7009
|
{
|
|
6684
7010
|
role: "menuitem",
|
|
@@ -6698,7 +7024,7 @@ var SelectItem = forwardRef16(
|
|
|
6698
7024
|
tabIndex: disabled ? -1 : 0,
|
|
6699
7025
|
...props,
|
|
6700
7026
|
children: [
|
|
6701
|
-
/* @__PURE__ */
|
|
7027
|
+
/* @__PURE__ */ jsx40("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: selectedValue === value && /* @__PURE__ */ jsx40(Check5, { className: "" }) }),
|
|
6702
7028
|
children
|
|
6703
7029
|
]
|
|
6704
7030
|
}
|
|
@@ -6711,7 +7037,7 @@ var Select_default = Select;
|
|
|
6711
7037
|
// src/components/Menu/Menu.tsx
|
|
6712
7038
|
import { create as create6, useStore as useStore5 } from "zustand";
|
|
6713
7039
|
import {
|
|
6714
|
-
useEffect as
|
|
7040
|
+
useEffect as useEffect14,
|
|
6715
7041
|
useRef as useRef9,
|
|
6716
7042
|
forwardRef as forwardRef17,
|
|
6717
7043
|
isValidElement as isValidElement5,
|
|
@@ -6720,7 +7046,7 @@ import {
|
|
|
6720
7046
|
useState as useState15
|
|
6721
7047
|
} from "react";
|
|
6722
7048
|
import { CaretLeft as CaretLeft2, CaretRight as CaretRight4 } from "phosphor-react";
|
|
6723
|
-
import { jsx as
|
|
7049
|
+
import { jsx as jsx41, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
6724
7050
|
var createMenuStore = (onValueChange) => create6((set) => ({
|
|
6725
7051
|
value: "",
|
|
6726
7052
|
setValue: (value) => {
|
|
@@ -6753,12 +7079,12 @@ var Menu = forwardRef17(
|
|
|
6753
7079
|
storeRef.current ??= createMenuStore(onValueChange);
|
|
6754
7080
|
const store = storeRef.current;
|
|
6755
7081
|
const { setValue } = useStore5(store, (s) => s);
|
|
6756
|
-
|
|
7082
|
+
useEffect14(() => {
|
|
6757
7083
|
setValue(propValue ?? defaultValue);
|
|
6758
7084
|
}, [defaultValue, propValue, setValue]);
|
|
6759
7085
|
const baseClasses = variant === "menu-overflow" ? "w-fit py-2 flex flex-row items-center justify-center" : "w-full py-2 flex flex-row items-center justify-center";
|
|
6760
7086
|
const variantClasses = VARIANT_CLASSES5[variant];
|
|
6761
|
-
return /* @__PURE__ */
|
|
7087
|
+
return /* @__PURE__ */ jsx41(
|
|
6762
7088
|
"div",
|
|
6763
7089
|
{
|
|
6764
7090
|
ref,
|
|
@@ -6778,7 +7104,7 @@ var MenuContent = forwardRef17(
|
|
|
6778
7104
|
({ className, children, variant = "menu", ...props }, ref) => {
|
|
6779
7105
|
const baseClasses = "w-full flex flex-row items-center gap-2";
|
|
6780
7106
|
const variantClasses = variant === "menu2" || variant === "menu-overflow" ? "overflow-x-auto scroll-smooth" : "";
|
|
6781
|
-
return /* @__PURE__ */
|
|
7107
|
+
return /* @__PURE__ */ jsx41(
|
|
6782
7108
|
"ul",
|
|
6783
7109
|
{
|
|
6784
7110
|
ref,
|
|
@@ -6830,7 +7156,7 @@ var MenuItem = forwardRef17(
|
|
|
6830
7156
|
...props
|
|
6831
7157
|
};
|
|
6832
7158
|
const variants = {
|
|
6833
|
-
menu: /* @__PURE__ */
|
|
7159
|
+
menu: /* @__PURE__ */ jsx41(
|
|
6834
7160
|
"li",
|
|
6835
7161
|
{
|
|
6836
7162
|
"data-variant": "menu",
|
|
@@ -6845,7 +7171,7 @@ var MenuItem = forwardRef17(
|
|
|
6845
7171
|
children
|
|
6846
7172
|
}
|
|
6847
7173
|
),
|
|
6848
|
-
menu2: /* @__PURE__ */
|
|
7174
|
+
menu2: /* @__PURE__ */ jsxs30(
|
|
6849
7175
|
"li",
|
|
6850
7176
|
{
|
|
6851
7177
|
"data-variant": "menu2",
|
|
@@ -6856,7 +7182,7 @@ var MenuItem = forwardRef17(
|
|
|
6856
7182
|
`,
|
|
6857
7183
|
...commonProps,
|
|
6858
7184
|
children: [
|
|
6859
|
-
/* @__PURE__ */
|
|
7185
|
+
/* @__PURE__ */ jsx41(
|
|
6860
7186
|
"span",
|
|
6861
7187
|
{
|
|
6862
7188
|
className: cn(
|
|
@@ -6866,11 +7192,11 @@ var MenuItem = forwardRef17(
|
|
|
6866
7192
|
children
|
|
6867
7193
|
}
|
|
6868
7194
|
),
|
|
6869
|
-
selectedValue === value && /* @__PURE__ */
|
|
7195
|
+
selectedValue === value && /* @__PURE__ */ jsx41("div", { className: "h-1 w-full bg-primary-950 rounded-lg" })
|
|
6870
7196
|
]
|
|
6871
7197
|
}
|
|
6872
7198
|
),
|
|
6873
|
-
"menu-overflow": /* @__PURE__ */
|
|
7199
|
+
"menu-overflow": /* @__PURE__ */ jsxs30(
|
|
6874
7200
|
"li",
|
|
6875
7201
|
{
|
|
6876
7202
|
"data-variant": "menu-overflow",
|
|
@@ -6881,7 +7207,7 @@ var MenuItem = forwardRef17(
|
|
|
6881
7207
|
`,
|
|
6882
7208
|
...commonProps,
|
|
6883
7209
|
children: [
|
|
6884
|
-
/* @__PURE__ */
|
|
7210
|
+
/* @__PURE__ */ jsx41(
|
|
6885
7211
|
"span",
|
|
6886
7212
|
{
|
|
6887
7213
|
className: cn(
|
|
@@ -6891,11 +7217,11 @@ var MenuItem = forwardRef17(
|
|
|
6891
7217
|
children
|
|
6892
7218
|
}
|
|
6893
7219
|
),
|
|
6894
|
-
selectedValue === value && /* @__PURE__ */
|
|
7220
|
+
selectedValue === value && /* @__PURE__ */ jsx41("div", { className: "h-1 w-full bg-primary-950 rounded-lg" })
|
|
6895
7221
|
]
|
|
6896
7222
|
}
|
|
6897
7223
|
),
|
|
6898
|
-
breadcrumb: /* @__PURE__ */
|
|
7224
|
+
breadcrumb: /* @__PURE__ */ jsxs30(
|
|
6899
7225
|
"li",
|
|
6900
7226
|
{
|
|
6901
7227
|
"data-variant": "breadcrumb",
|
|
@@ -6907,7 +7233,7 @@ var MenuItem = forwardRef17(
|
|
|
6907
7233
|
`,
|
|
6908
7234
|
...commonProps,
|
|
6909
7235
|
children: [
|
|
6910
|
-
/* @__PURE__ */
|
|
7236
|
+
/* @__PURE__ */ jsx41(
|
|
6911
7237
|
"span",
|
|
6912
7238
|
{
|
|
6913
7239
|
className: cn(
|
|
@@ -6917,7 +7243,7 @@ var MenuItem = forwardRef17(
|
|
|
6917
7243
|
children
|
|
6918
7244
|
}
|
|
6919
7245
|
),
|
|
6920
|
-
separator && /* @__PURE__ */
|
|
7246
|
+
separator && /* @__PURE__ */ jsx41(
|
|
6921
7247
|
CaretRight4,
|
|
6922
7248
|
{
|
|
6923
7249
|
size: 16,
|
|
@@ -6957,7 +7283,7 @@ var MenuOverflow = ({
|
|
|
6957
7283
|
const containerRef = useRef9(null);
|
|
6958
7284
|
const [showLeftArrow, setShowLeftArrow] = useState15(false);
|
|
6959
7285
|
const [showRightArrow, setShowRightArrow] = useState15(false);
|
|
6960
|
-
|
|
7286
|
+
useEffect14(() => {
|
|
6961
7287
|
const checkScroll = () => internalCheckScroll(
|
|
6962
7288
|
containerRef.current,
|
|
6963
7289
|
setShowLeftArrow,
|
|
@@ -6972,25 +7298,25 @@ var MenuOverflow = ({
|
|
|
6972
7298
|
window.removeEventListener("resize", checkScroll);
|
|
6973
7299
|
};
|
|
6974
7300
|
}, []);
|
|
6975
|
-
return /* @__PURE__ */
|
|
7301
|
+
return /* @__PURE__ */ jsxs30(
|
|
6976
7302
|
"div",
|
|
6977
7303
|
{
|
|
6978
7304
|
"data-testid": "menu-overflow-wrapper",
|
|
6979
7305
|
className: cn("relative w-full overflow-hidden", className),
|
|
6980
7306
|
children: [
|
|
6981
|
-
showLeftArrow && /* @__PURE__ */
|
|
7307
|
+
showLeftArrow && /* @__PURE__ */ jsxs30(
|
|
6982
7308
|
"button",
|
|
6983
7309
|
{
|
|
6984
7310
|
onClick: () => internalScroll(containerRef.current, "left"),
|
|
6985
7311
|
className: "absolute left-0 top-1/2 -translate-y-1/2 z-10 flex h-8 w-8 items-center justify-center rounded-full bg-white shadow-md cursor-pointer",
|
|
6986
7312
|
"data-testid": "scroll-left-button",
|
|
6987
7313
|
children: [
|
|
6988
|
-
/* @__PURE__ */
|
|
6989
|
-
/* @__PURE__ */
|
|
7314
|
+
/* @__PURE__ */ jsx41(CaretLeft2, { size: 16 }),
|
|
7315
|
+
/* @__PURE__ */ jsx41("span", { className: "sr-only", children: "Scroll left" })
|
|
6990
7316
|
]
|
|
6991
7317
|
}
|
|
6992
7318
|
),
|
|
6993
|
-
/* @__PURE__ */
|
|
7319
|
+
/* @__PURE__ */ jsx41(
|
|
6994
7320
|
Menu,
|
|
6995
7321
|
{
|
|
6996
7322
|
defaultValue,
|
|
@@ -6998,18 +7324,18 @@ var MenuOverflow = ({
|
|
|
6998
7324
|
value,
|
|
6999
7325
|
variant: "menu2",
|
|
7000
7326
|
...props,
|
|
7001
|
-
children: /* @__PURE__ */
|
|
7327
|
+
children: /* @__PURE__ */ jsx41(MenuContent, { ref: containerRef, variant: "menu2", children })
|
|
7002
7328
|
}
|
|
7003
7329
|
),
|
|
7004
|
-
showRightArrow && /* @__PURE__ */
|
|
7330
|
+
showRightArrow && /* @__PURE__ */ jsxs30(
|
|
7005
7331
|
"button",
|
|
7006
7332
|
{
|
|
7007
7333
|
onClick: () => internalScroll(containerRef.current, "right"),
|
|
7008
7334
|
className: "absolute right-0 top-1/2 -translate-y-1/2 z-10 flex h-8 w-8 items-center justify-center rounded-full bg-white shadow-md cursor-pointer",
|
|
7009
7335
|
"data-testid": "scroll-right-button",
|
|
7010
7336
|
children: [
|
|
7011
|
-
/* @__PURE__ */
|
|
7012
|
-
/* @__PURE__ */
|
|
7337
|
+
/* @__PURE__ */ jsx41(CaretRight4, { size: 16 }),
|
|
7338
|
+
/* @__PURE__ */ jsx41("span", { className: "sr-only", children: "Scroll right" })
|
|
7013
7339
|
]
|
|
7014
7340
|
}
|
|
7015
7341
|
)
|
|
@@ -7030,7 +7356,7 @@ var Menu_default = Menu;
|
|
|
7030
7356
|
|
|
7031
7357
|
// src/components/Skeleton/Skeleton.tsx
|
|
7032
7358
|
import { forwardRef as forwardRef18 } from "react";
|
|
7033
|
-
import { jsx as
|
|
7359
|
+
import { jsx as jsx42, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
7034
7360
|
var SKELETON_ANIMATION_CLASSES = {
|
|
7035
7361
|
pulse: "animate-pulse",
|
|
7036
7362
|
none: ""
|
|
@@ -7067,13 +7393,13 @@ var Skeleton = forwardRef18(
|
|
|
7067
7393
|
height: typeof height === "number" ? `${height}px` : height
|
|
7068
7394
|
};
|
|
7069
7395
|
if (variant === "text" && lines > 1) {
|
|
7070
|
-
return /* @__PURE__ */
|
|
7396
|
+
return /* @__PURE__ */ jsx42(
|
|
7071
7397
|
"div",
|
|
7072
7398
|
{
|
|
7073
7399
|
ref,
|
|
7074
7400
|
className: cn("flex flex-col", spacingClass, className),
|
|
7075
7401
|
...props,
|
|
7076
|
-
children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */
|
|
7402
|
+
children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */ jsx42(
|
|
7077
7403
|
"div",
|
|
7078
7404
|
{
|
|
7079
7405
|
className: cn(variantClass, animationClass),
|
|
@@ -7084,7 +7410,7 @@ var Skeleton = forwardRef18(
|
|
|
7084
7410
|
}
|
|
7085
7411
|
);
|
|
7086
7412
|
}
|
|
7087
|
-
return /* @__PURE__ */
|
|
7413
|
+
return /* @__PURE__ */ jsx42(
|
|
7088
7414
|
"div",
|
|
7089
7415
|
{
|
|
7090
7416
|
ref,
|
|
@@ -7097,11 +7423,11 @@ var Skeleton = forwardRef18(
|
|
|
7097
7423
|
}
|
|
7098
7424
|
);
|
|
7099
7425
|
var SkeletonText = forwardRef18(
|
|
7100
|
-
(props, ref) => /* @__PURE__ */
|
|
7426
|
+
(props, ref) => /* @__PURE__ */ jsx42(Skeleton, { ref, variant: "text", ...props })
|
|
7101
7427
|
);
|
|
7102
|
-
var SkeletonCircle = forwardRef18((props, ref) => /* @__PURE__ */
|
|
7103
|
-
var SkeletonRectangle = forwardRef18((props, ref) => /* @__PURE__ */
|
|
7104
|
-
var SkeletonRounded = forwardRef18((props, ref) => /* @__PURE__ */
|
|
7428
|
+
var SkeletonCircle = forwardRef18((props, ref) => /* @__PURE__ */ jsx42(Skeleton, { ref, variant: "circular", ...props }));
|
|
7429
|
+
var SkeletonRectangle = forwardRef18((props, ref) => /* @__PURE__ */ jsx42(Skeleton, { ref, variant: "rectangular", ...props }));
|
|
7430
|
+
var SkeletonRounded = forwardRef18((props, ref) => /* @__PURE__ */ jsx42(Skeleton, { ref, variant: "rounded", ...props }));
|
|
7105
7431
|
var SkeletonCard = forwardRef18(
|
|
7106
7432
|
({
|
|
7107
7433
|
showAvatar = true,
|
|
@@ -7112,7 +7438,7 @@ var SkeletonCard = forwardRef18(
|
|
|
7112
7438
|
className = "",
|
|
7113
7439
|
...props
|
|
7114
7440
|
}, ref) => {
|
|
7115
|
-
return /* @__PURE__ */
|
|
7441
|
+
return /* @__PURE__ */ jsxs31(
|
|
7116
7442
|
"div",
|
|
7117
7443
|
{
|
|
7118
7444
|
ref,
|
|
@@ -7122,16 +7448,16 @@ var SkeletonCard = forwardRef18(
|
|
|
7122
7448
|
),
|
|
7123
7449
|
...props,
|
|
7124
7450
|
children: [
|
|
7125
|
-
/* @__PURE__ */
|
|
7126
|
-
showAvatar && /* @__PURE__ */
|
|
7127
|
-
/* @__PURE__ */
|
|
7128
|
-
showTitle && /* @__PURE__ */
|
|
7129
|
-
showDescription && /* @__PURE__ */
|
|
7451
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex items-start space-x-3", children: [
|
|
7452
|
+
showAvatar && /* @__PURE__ */ jsx42(SkeletonCircle, { width: 40, height: 40 }),
|
|
7453
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex-1 space-y-2", children: [
|
|
7454
|
+
showTitle && /* @__PURE__ */ jsx42(SkeletonText, { width: "60%", height: 20 }),
|
|
7455
|
+
showDescription && /* @__PURE__ */ jsx42(SkeletonText, { lines, spacing: "small" })
|
|
7130
7456
|
] })
|
|
7131
7457
|
] }),
|
|
7132
|
-
showActions && /* @__PURE__ */
|
|
7133
|
-
/* @__PURE__ */
|
|
7134
|
-
/* @__PURE__ */
|
|
7458
|
+
showActions && /* @__PURE__ */ jsxs31("div", { className: "flex justify-end space-x-2 mt-4", children: [
|
|
7459
|
+
/* @__PURE__ */ jsx42(SkeletonRectangle, { width: 80, height: 32 }),
|
|
7460
|
+
/* @__PURE__ */ jsx42(SkeletonRectangle, { width: 80, height: 32 })
|
|
7135
7461
|
] })
|
|
7136
7462
|
]
|
|
7137
7463
|
}
|
|
@@ -7148,19 +7474,19 @@ var SkeletonList = forwardRef18(
|
|
|
7148
7474
|
className = "",
|
|
7149
7475
|
...props
|
|
7150
7476
|
}, ref) => {
|
|
7151
|
-
return /* @__PURE__ */
|
|
7152
|
-
showAvatar && /* @__PURE__ */
|
|
7153
|
-
/* @__PURE__ */
|
|
7154
|
-
showTitle && /* @__PURE__ */
|
|
7155
|
-
showDescription && /* @__PURE__ */
|
|
7477
|
+
return /* @__PURE__ */ jsx42("div", { ref, className: cn("space-y-3", className), ...props, children: Array.from({ length: items }, (_, index) => /* @__PURE__ */ jsxs31("div", { className: "flex items-start space-x-3 p-3", children: [
|
|
7478
|
+
showAvatar && /* @__PURE__ */ jsx42(SkeletonCircle, { width: 32, height: 32 }),
|
|
7479
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex-1 space-y-2", children: [
|
|
7480
|
+
showTitle && /* @__PURE__ */ jsx42(SkeletonText, { width: "40%", height: 16 }),
|
|
7481
|
+
showDescription && /* @__PURE__ */ jsx42(SkeletonText, { lines, spacing: "small" })
|
|
7156
7482
|
] })
|
|
7157
7483
|
] }, index)) });
|
|
7158
7484
|
}
|
|
7159
7485
|
);
|
|
7160
7486
|
var SkeletonTable = forwardRef18(
|
|
7161
7487
|
({ rows = 5, columns = 4, showHeader = true, className = "", ...props }, ref) => {
|
|
7162
|
-
return /* @__PURE__ */
|
|
7163
|
-
showHeader && /* @__PURE__ */
|
|
7488
|
+
return /* @__PURE__ */ jsxs31("div", { ref, className: cn("w-full", className), ...props, children: [
|
|
7489
|
+
showHeader && /* @__PURE__ */ jsx42("div", { className: "flex space-x-2 mb-3", children: Array.from({ length: columns }, (_, index) => /* @__PURE__ */ jsx42(
|
|
7164
7490
|
SkeletonText,
|
|
7165
7491
|
{
|
|
7166
7492
|
width: `${100 / columns}%`,
|
|
@@ -7168,7 +7494,7 @@ var SkeletonTable = forwardRef18(
|
|
|
7168
7494
|
},
|
|
7169
7495
|
index
|
|
7170
7496
|
)) }),
|
|
7171
|
-
/* @__PURE__ */
|
|
7497
|
+
/* @__PURE__ */ jsx42("div", { className: "space-y-2", children: Array.from({ length: rows }, (_, rowIndex) => /* @__PURE__ */ jsx42("div", { className: "flex space-x-2", children: Array.from({ length: columns }, (_2, colIndex) => /* @__PURE__ */ jsx42(
|
|
7172
7498
|
SkeletonText,
|
|
7173
7499
|
{
|
|
7174
7500
|
width: `${100 / columns}%`,
|
|
@@ -7181,7 +7507,7 @@ var SkeletonTable = forwardRef18(
|
|
|
7181
7507
|
);
|
|
7182
7508
|
|
|
7183
7509
|
// src/components/NotFound/NotFound.tsx
|
|
7184
|
-
import { jsx as
|
|
7510
|
+
import { jsx as jsx43, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
7185
7511
|
var NotFound = ({
|
|
7186
7512
|
title,
|
|
7187
7513
|
description,
|
|
@@ -7224,22 +7550,22 @@ var NotFound = ({
|
|
|
7224
7550
|
const errorTitle = title || getDefaultTitle();
|
|
7225
7551
|
const errorDescription = description || getDefaultDescription();
|
|
7226
7552
|
const errorCode = getErrorCode();
|
|
7227
|
-
return /* @__PURE__ */
|
|
7553
|
+
return /* @__PURE__ */ jsx43(
|
|
7228
7554
|
"div",
|
|
7229
7555
|
{
|
|
7230
7556
|
className: cn(
|
|
7231
7557
|
"flex flex-col w-full h-screen items-center justify-center bg-background-50 px-4",
|
|
7232
7558
|
className
|
|
7233
7559
|
),
|
|
7234
|
-
children: /* @__PURE__ */
|
|
7560
|
+
children: /* @__PURE__ */ jsx43(
|
|
7235
7561
|
"main",
|
|
7236
7562
|
{
|
|
7237
7563
|
role: "main",
|
|
7238
7564
|
"aria-labelledby": "error-title",
|
|
7239
7565
|
"aria-describedby": "error-description",
|
|
7240
7566
|
className: "flex flex-col items-center text-center max-w-md space-y-6",
|
|
7241
|
-
children: /* @__PURE__ */
|
|
7242
|
-
/* @__PURE__ */
|
|
7567
|
+
children: /* @__PURE__ */ jsxs32("section", { "aria-label": `Erro ${errorCode}`, children: [
|
|
7568
|
+
/* @__PURE__ */ jsx43(
|
|
7243
7569
|
"div",
|
|
7244
7570
|
{
|
|
7245
7571
|
className: "text-8xl font-bold text-primary-300 select-none",
|
|
@@ -7247,8 +7573,8 @@ var NotFound = ({
|
|
|
7247
7573
|
children: errorCode
|
|
7248
7574
|
}
|
|
7249
7575
|
),
|
|
7250
|
-
/* @__PURE__ */
|
|
7251
|
-
/* @__PURE__ */
|
|
7576
|
+
/* @__PURE__ */ jsxs32("header", { className: "space-y-2", children: [
|
|
7577
|
+
/* @__PURE__ */ jsx43(
|
|
7252
7578
|
Text_default,
|
|
7253
7579
|
{
|
|
7254
7580
|
size: "xl",
|
|
@@ -7259,9 +7585,9 @@ var NotFound = ({
|
|
|
7259
7585
|
children: errorTitle
|
|
7260
7586
|
}
|
|
7261
7587
|
),
|
|
7262
|
-
/* @__PURE__ */
|
|
7588
|
+
/* @__PURE__ */ jsx43(Text_default, { size: "md", className: "text-text-600", id: "error-description", children: errorDescription })
|
|
7263
7589
|
] }),
|
|
7264
|
-
onButtonClick && /* @__PURE__ */
|
|
7590
|
+
onButtonClick && /* @__PURE__ */ jsx43("nav", { "aria-label": "Navega\xE7\xE3o de erro", children: /* @__PURE__ */ jsx43(
|
|
7265
7591
|
Button_default,
|
|
7266
7592
|
{
|
|
7267
7593
|
onClick: handleButtonClick,
|
|
@@ -7285,7 +7611,7 @@ var NotFound_default = NotFound;
|
|
|
7285
7611
|
import {
|
|
7286
7612
|
useRef as useRef10,
|
|
7287
7613
|
useState as useState16,
|
|
7288
|
-
useEffect as
|
|
7614
|
+
useEffect as useEffect15,
|
|
7289
7615
|
useCallback as useCallback2
|
|
7290
7616
|
} from "react";
|
|
7291
7617
|
import { createPortal } from "react-dom";
|
|
@@ -7299,7 +7625,7 @@ import {
|
|
|
7299
7625
|
ClosedCaptioning,
|
|
7300
7626
|
DotsThreeVertical as DotsThreeVertical2
|
|
7301
7627
|
} from "phosphor-react";
|
|
7302
|
-
import { jsx as
|
|
7628
|
+
import { jsx as jsx44, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
7303
7629
|
var CONTROLS_HIDE_TIMEOUT = 3e3;
|
|
7304
7630
|
var LEAVE_HIDE_TIMEOUT = 1e3;
|
|
7305
7631
|
var INIT_DELAY = 100;
|
|
@@ -7314,7 +7640,7 @@ var ProgressBar2 = ({
|
|
|
7314
7640
|
duration,
|
|
7315
7641
|
progressPercentage,
|
|
7316
7642
|
onSeek
|
|
7317
|
-
}) => /* @__PURE__ */
|
|
7643
|
+
}) => /* @__PURE__ */ jsx44("div", { className: "px-4 pb-2", children: /* @__PURE__ */ jsx44(
|
|
7318
7644
|
"input",
|
|
7319
7645
|
{
|
|
7320
7646
|
type: "range",
|
|
@@ -7334,17 +7660,17 @@ var VolumeControls = ({
|
|
|
7334
7660
|
isMuted,
|
|
7335
7661
|
onVolumeChange,
|
|
7336
7662
|
onToggleMute
|
|
7337
|
-
}) => /* @__PURE__ */
|
|
7338
|
-
/* @__PURE__ */
|
|
7663
|
+
}) => /* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-2", children: [
|
|
7664
|
+
/* @__PURE__ */ jsx44(
|
|
7339
7665
|
IconButton_default,
|
|
7340
7666
|
{
|
|
7341
|
-
icon: isMuted ? /* @__PURE__ */
|
|
7667
|
+
icon: isMuted ? /* @__PURE__ */ jsx44(SpeakerSlash, { size: 24 }) : /* @__PURE__ */ jsx44(SpeakerHigh2, { size: 24 }),
|
|
7342
7668
|
onClick: onToggleMute,
|
|
7343
7669
|
"aria-label": isMuted ? "Unmute" : "Mute",
|
|
7344
7670
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
7345
7671
|
}
|
|
7346
7672
|
),
|
|
7347
|
-
/* @__PURE__ */
|
|
7673
|
+
/* @__PURE__ */ jsx44(
|
|
7348
7674
|
"input",
|
|
7349
7675
|
{
|
|
7350
7676
|
type: "range",
|
|
@@ -7368,6 +7694,8 @@ var SpeedMenu = ({
|
|
|
7368
7694
|
isFullscreen
|
|
7369
7695
|
}) => {
|
|
7370
7696
|
const buttonRef = useRef10(null);
|
|
7697
|
+
const speedMenuContainerRef = useRef10(null);
|
|
7698
|
+
const speedMenuRef = useRef10(null);
|
|
7371
7699
|
const getMenuPosition = () => {
|
|
7372
7700
|
if (!buttonRef.current) return { top: 0, left: 0 };
|
|
7373
7701
|
const rect = buttonRef.current.getBoundingClientRect();
|
|
@@ -7378,9 +7706,26 @@ var SpeedMenu = ({
|
|
|
7378
7706
|
};
|
|
7379
7707
|
};
|
|
7380
7708
|
const position = getMenuPosition();
|
|
7381
|
-
|
|
7709
|
+
useEffect15(() => {
|
|
7710
|
+
const handleClickOutside = (event) => {
|
|
7711
|
+
const target = event.target;
|
|
7712
|
+
const isOutsideContainer = speedMenuContainerRef.current && !speedMenuContainerRef.current.contains(target);
|
|
7713
|
+
const isOutsideMenu = speedMenuRef.current && !speedMenuRef.current.contains(target);
|
|
7714
|
+
if (isOutsideContainer && isOutsideMenu) {
|
|
7715
|
+
onToggleMenu();
|
|
7716
|
+
}
|
|
7717
|
+
};
|
|
7718
|
+
if (showSpeedMenu) {
|
|
7719
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
7720
|
+
}
|
|
7721
|
+
return () => {
|
|
7722
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
7723
|
+
};
|
|
7724
|
+
}, [showSpeedMenu, onToggleMenu]);
|
|
7725
|
+
const menuContent = /* @__PURE__ */ jsx44(
|
|
7382
7726
|
"div",
|
|
7383
7727
|
{
|
|
7728
|
+
ref: speedMenuRef,
|
|
7384
7729
|
role: "menu",
|
|
7385
7730
|
"aria-label": "Playback speed",
|
|
7386
7731
|
className: isFullscreen ? "absolute bottom-12 right-0 bg-black/90 rounded-lg p-2 min-w-20 z-[9999]" : "fixed bg-black/90 rounded-lg p-2 min-w-20 z-[9999]",
|
|
@@ -7388,7 +7733,7 @@ var SpeedMenu = ({
|
|
|
7388
7733
|
top: `${position.top}px`,
|
|
7389
7734
|
left: `${position.left}px`
|
|
7390
7735
|
} : void 0,
|
|
7391
|
-
children: [0.5, 0.75, 1, 1.25, 1.5, 2].map((speed) => /* @__PURE__ */
|
|
7736
|
+
children: [0.5, 0.75, 1, 1.25, 1.5, 2].map((speed) => /* @__PURE__ */ jsxs33(
|
|
7392
7737
|
"button",
|
|
7393
7738
|
{
|
|
7394
7739
|
role: "menuitemradio",
|
|
@@ -7405,12 +7750,12 @@ var SpeedMenu = ({
|
|
|
7405
7750
|
}
|
|
7406
7751
|
);
|
|
7407
7752
|
const portalContent = typeof window !== "undefined" && typeof document !== "undefined" ? createPortal(menuContent, document.body) : null;
|
|
7408
|
-
return /* @__PURE__ */
|
|
7409
|
-
/* @__PURE__ */
|
|
7753
|
+
return /* @__PURE__ */ jsxs33("div", { className: "relative", ref: speedMenuContainerRef, children: [
|
|
7754
|
+
/* @__PURE__ */ jsx44(
|
|
7410
7755
|
IconButton_default,
|
|
7411
7756
|
{
|
|
7412
7757
|
ref: buttonRef,
|
|
7413
|
-
icon: /* @__PURE__ */
|
|
7758
|
+
icon: /* @__PURE__ */ jsx44(DotsThreeVertical2, { size: 24 }),
|
|
7414
7759
|
onClick: onToggleMenu,
|
|
7415
7760
|
"aria-label": "Playback speed",
|
|
7416
7761
|
"aria-haspopup": "menu",
|
|
@@ -7445,7 +7790,7 @@ var VideoPlayer = ({
|
|
|
7445
7790
|
const [showControls, setShowControls] = useState16(true);
|
|
7446
7791
|
const [hasCompleted, setHasCompleted] = useState16(false);
|
|
7447
7792
|
const [showCaptions, setShowCaptions] = useState16(false);
|
|
7448
|
-
|
|
7793
|
+
useEffect15(() => {
|
|
7449
7794
|
setHasCompleted(false);
|
|
7450
7795
|
}, [src]);
|
|
7451
7796
|
const [playbackRate, setPlaybackRate] = useState16(1);
|
|
@@ -7517,13 +7862,13 @@ var VideoPlayer = ({
|
|
|
7517
7862
|
}, LEAVE_HIDE_TIMEOUT);
|
|
7518
7863
|
}
|
|
7519
7864
|
}, [isFullscreen, clearControlsTimeout, isUserInteracting]);
|
|
7520
|
-
|
|
7865
|
+
useEffect15(() => {
|
|
7521
7866
|
if (videoRef.current) {
|
|
7522
7867
|
videoRef.current.volume = volume;
|
|
7523
7868
|
videoRef.current.muted = isMuted;
|
|
7524
7869
|
}
|
|
7525
7870
|
}, [volume, isMuted]);
|
|
7526
|
-
|
|
7871
|
+
useEffect15(() => {
|
|
7527
7872
|
const video = videoRef.current;
|
|
7528
7873
|
if (!video) return;
|
|
7529
7874
|
const onPlay = () => setIsPlaying(true);
|
|
@@ -7538,7 +7883,7 @@ var VideoPlayer = ({
|
|
|
7538
7883
|
video.removeEventListener("ended", onEnded);
|
|
7539
7884
|
};
|
|
7540
7885
|
}, []);
|
|
7541
|
-
|
|
7886
|
+
useEffect15(() => {
|
|
7542
7887
|
if (isPlaying) {
|
|
7543
7888
|
showControlsWithTimer();
|
|
7544
7889
|
} else {
|
|
@@ -7550,7 +7895,7 @@ var VideoPlayer = ({
|
|
|
7550
7895
|
}
|
|
7551
7896
|
}
|
|
7552
7897
|
}, [isPlaying, isFullscreen, showControlsWithTimer, clearControlsTimeout]);
|
|
7553
|
-
|
|
7898
|
+
useEffect15(() => {
|
|
7554
7899
|
const handleFullscreenChange = () => {
|
|
7555
7900
|
const isCurrentlyFullscreen = !!document.fullscreenElement;
|
|
7556
7901
|
setIsFullscreen(isCurrentlyFullscreen);
|
|
@@ -7563,7 +7908,7 @@ var VideoPlayer = ({
|
|
|
7563
7908
|
document.removeEventListener("fullscreenchange", handleFullscreenChange);
|
|
7564
7909
|
};
|
|
7565
7910
|
}, [showControlsWithTimer]);
|
|
7566
|
-
|
|
7911
|
+
useEffect15(() => {
|
|
7567
7912
|
const init = () => {
|
|
7568
7913
|
if (!isFullscreen) {
|
|
7569
7914
|
showControlsWithTimer();
|
|
@@ -7596,7 +7941,7 @@ var VideoPlayer = ({
|
|
|
7596
7941
|
if (hasValidSaved) return saved;
|
|
7597
7942
|
return void 0;
|
|
7598
7943
|
}, [autoSave, storageKey, src, initialTime]);
|
|
7599
|
-
|
|
7944
|
+
useEffect15(() => {
|
|
7600
7945
|
const start = getInitialTime();
|
|
7601
7946
|
if (start !== void 0 && videoRef.current) {
|
|
7602
7947
|
videoRef.current.currentTime = start;
|
|
@@ -7717,12 +8062,12 @@ var VideoPlayer = ({
|
|
|
7717
8062
|
setDuration(videoRef.current.duration);
|
|
7718
8063
|
}
|
|
7719
8064
|
}, []);
|
|
7720
|
-
|
|
8065
|
+
useEffect15(() => {
|
|
7721
8066
|
if (trackRef.current?.track) {
|
|
7722
8067
|
trackRef.current.track.mode = showCaptions && subtitles ? "showing" : "hidden";
|
|
7723
8068
|
}
|
|
7724
8069
|
}, [subtitles, showCaptions]);
|
|
7725
|
-
|
|
8070
|
+
useEffect15(() => {
|
|
7726
8071
|
const handleVisibilityChange = () => {
|
|
7727
8072
|
if (document.hidden && isPlaying && videoRef.current) {
|
|
7728
8073
|
videoRef.current.pause();
|
|
@@ -7805,9 +8150,9 @@ var VideoPlayer = ({
|
|
|
7805
8150
|
toggleFullscreen
|
|
7806
8151
|
]
|
|
7807
8152
|
);
|
|
7808
|
-
return /* @__PURE__ */
|
|
7809
|
-
(title || subtitleText) && /* @__PURE__ */
|
|
7810
|
-
title && /* @__PURE__ */
|
|
8153
|
+
return /* @__PURE__ */ jsxs33("div", { className: cn("flex flex-col", className), children: [
|
|
8154
|
+
(title || subtitleText) && /* @__PURE__ */ jsx44("div", { className: "bg-subject-1 px-8 py-4 flex items-end justify-between min-h-20", children: /* @__PURE__ */ jsxs33("div", { className: "flex flex-col gap-1", children: [
|
|
8155
|
+
title && /* @__PURE__ */ jsx44(
|
|
7811
8156
|
Text_default,
|
|
7812
8157
|
{
|
|
7813
8158
|
as: "h2",
|
|
@@ -7818,7 +8163,7 @@ var VideoPlayer = ({
|
|
|
7818
8163
|
children: title
|
|
7819
8164
|
}
|
|
7820
8165
|
),
|
|
7821
|
-
subtitleText && /* @__PURE__ */
|
|
8166
|
+
subtitleText && /* @__PURE__ */ jsx44(
|
|
7822
8167
|
Text_default,
|
|
7823
8168
|
{
|
|
7824
8169
|
as: "p",
|
|
@@ -7830,7 +8175,7 @@ var VideoPlayer = ({
|
|
|
7830
8175
|
}
|
|
7831
8176
|
)
|
|
7832
8177
|
] }) }),
|
|
7833
|
-
/* @__PURE__ */
|
|
8178
|
+
/* @__PURE__ */ jsxs33(
|
|
7834
8179
|
"section",
|
|
7835
8180
|
{
|
|
7836
8181
|
className: cn(
|
|
@@ -7845,7 +8190,7 @@ var VideoPlayer = ({
|
|
|
7845
8190
|
onTouchStart: handleMouseEnter,
|
|
7846
8191
|
onMouseLeave: handleMouseLeave,
|
|
7847
8192
|
children: [
|
|
7848
|
-
/* @__PURE__ */
|
|
8193
|
+
/* @__PURE__ */ jsx44(
|
|
7849
8194
|
"video",
|
|
7850
8195
|
{
|
|
7851
8196
|
ref: videoRef,
|
|
@@ -7859,7 +8204,7 @@ var VideoPlayer = ({
|
|
|
7859
8204
|
onKeyDown: handleVideoKeyDown,
|
|
7860
8205
|
tabIndex: 0,
|
|
7861
8206
|
"aria-label": title ? `Video: ${title}` : "Video player",
|
|
7862
|
-
children: /* @__PURE__ */
|
|
8207
|
+
children: /* @__PURE__ */ jsx44(
|
|
7863
8208
|
"track",
|
|
7864
8209
|
{
|
|
7865
8210
|
ref: trackRef,
|
|
@@ -7872,26 +8217,26 @@ var VideoPlayer = ({
|
|
|
7872
8217
|
)
|
|
7873
8218
|
}
|
|
7874
8219
|
),
|
|
7875
|
-
!isPlaying && /* @__PURE__ */
|
|
8220
|
+
!isPlaying && /* @__PURE__ */ jsx44("div", { className: "absolute inset-0 flex items-center justify-center bg-black/30 transition-opacity", children: /* @__PURE__ */ jsx44(
|
|
7876
8221
|
IconButton_default,
|
|
7877
8222
|
{
|
|
7878
|
-
icon: /* @__PURE__ */
|
|
8223
|
+
icon: /* @__PURE__ */ jsx44(Play2, { size: 32, weight: "regular", className: "ml-1" }),
|
|
7879
8224
|
onClick: togglePlayPause,
|
|
7880
8225
|
"aria-label": "Play video",
|
|
7881
8226
|
className: "!bg-transparent !text-white !w-auto !h-auto hover:!bg-transparent hover:!text-gray-200"
|
|
7882
8227
|
}
|
|
7883
8228
|
) }),
|
|
7884
|
-
/* @__PURE__ */
|
|
8229
|
+
/* @__PURE__ */ jsx44(
|
|
7885
8230
|
"div",
|
|
7886
8231
|
{
|
|
7887
8232
|
className: cn(
|
|
7888
8233
|
"absolute top-0 left-0 right-0 p-4 bg-gradient-to-b from-black/70 to-transparent transition-opacity",
|
|
7889
8234
|
getTopControlsOpacity()
|
|
7890
8235
|
),
|
|
7891
|
-
children: /* @__PURE__ */
|
|
8236
|
+
children: /* @__PURE__ */ jsx44("div", { className: "flex justify-start", children: /* @__PURE__ */ jsx44(
|
|
7892
8237
|
IconButton_default,
|
|
7893
8238
|
{
|
|
7894
|
-
icon: isFullscreen ? /* @__PURE__ */
|
|
8239
|
+
icon: isFullscreen ? /* @__PURE__ */ jsx44(ArrowsInSimple, { size: 24 }) : /* @__PURE__ */ jsx44(ArrowsOutSimple, { size: 24 }),
|
|
7895
8240
|
onClick: toggleFullscreen,
|
|
7896
8241
|
"aria-label": isFullscreen ? "Exit fullscreen" : "Enter fullscreen",
|
|
7897
8242
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
@@ -7899,7 +8244,7 @@ var VideoPlayer = ({
|
|
|
7899
8244
|
) })
|
|
7900
8245
|
}
|
|
7901
8246
|
),
|
|
7902
|
-
/* @__PURE__ */
|
|
8247
|
+
/* @__PURE__ */ jsxs33(
|
|
7903
8248
|
"div",
|
|
7904
8249
|
{
|
|
7905
8250
|
className: cn(
|
|
@@ -7907,7 +8252,7 @@ var VideoPlayer = ({
|
|
|
7907
8252
|
getBottomControlsOpacity()
|
|
7908
8253
|
),
|
|
7909
8254
|
children: [
|
|
7910
|
-
/* @__PURE__ */
|
|
8255
|
+
/* @__PURE__ */ jsx44(
|
|
7911
8256
|
ProgressBar2,
|
|
7912
8257
|
{
|
|
7913
8258
|
currentTime,
|
|
@@ -7916,18 +8261,18 @@ var VideoPlayer = ({
|
|
|
7916
8261
|
onSeek: handleSeek
|
|
7917
8262
|
}
|
|
7918
8263
|
),
|
|
7919
|
-
/* @__PURE__ */
|
|
7920
|
-
/* @__PURE__ */
|
|
7921
|
-
/* @__PURE__ */
|
|
8264
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex items-center justify-between px-4 pb-4", children: [
|
|
8265
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-4", children: [
|
|
8266
|
+
/* @__PURE__ */ jsx44(
|
|
7922
8267
|
IconButton_default,
|
|
7923
8268
|
{
|
|
7924
|
-
icon: isPlaying ? /* @__PURE__ */
|
|
8269
|
+
icon: isPlaying ? /* @__PURE__ */ jsx44(Pause, { size: 24 }) : /* @__PURE__ */ jsx44(Play2, { size: 24 }),
|
|
7925
8270
|
onClick: togglePlayPause,
|
|
7926
8271
|
"aria-label": isPlaying ? "Pause" : "Play",
|
|
7927
8272
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
7928
8273
|
}
|
|
7929
8274
|
),
|
|
7930
|
-
/* @__PURE__ */
|
|
8275
|
+
/* @__PURE__ */ jsx44(
|
|
7931
8276
|
VolumeControls,
|
|
7932
8277
|
{
|
|
7933
8278
|
volume,
|
|
@@ -7936,10 +8281,10 @@ var VideoPlayer = ({
|
|
|
7936
8281
|
onToggleMute: toggleMute
|
|
7937
8282
|
}
|
|
7938
8283
|
),
|
|
7939
|
-
subtitles && /* @__PURE__ */
|
|
8284
|
+
subtitles && /* @__PURE__ */ jsx44(
|
|
7940
8285
|
IconButton_default,
|
|
7941
8286
|
{
|
|
7942
|
-
icon: /* @__PURE__ */
|
|
8287
|
+
icon: /* @__PURE__ */ jsx44(ClosedCaptioning, { size: 24 }),
|
|
7943
8288
|
onClick: toggleCaptions,
|
|
7944
8289
|
"aria-label": showCaptions ? "Hide captions" : "Show captions",
|
|
7945
8290
|
className: cn(
|
|
@@ -7948,13 +8293,13 @@ var VideoPlayer = ({
|
|
|
7948
8293
|
)
|
|
7949
8294
|
}
|
|
7950
8295
|
),
|
|
7951
|
-
/* @__PURE__ */
|
|
8296
|
+
/* @__PURE__ */ jsxs33(Text_default, { size: "sm", weight: "medium", color: "text-white", children: [
|
|
7952
8297
|
formatTime(currentTime),
|
|
7953
8298
|
" / ",
|
|
7954
8299
|
formatTime(duration)
|
|
7955
8300
|
] })
|
|
7956
8301
|
] }),
|
|
7957
|
-
/* @__PURE__ */
|
|
8302
|
+
/* @__PURE__ */ jsx44("div", { className: "flex items-center gap-4", children: /* @__PURE__ */ jsx44(
|
|
7958
8303
|
SpeedMenu,
|
|
7959
8304
|
{
|
|
7960
8305
|
showSpeedMenu,
|
|
@@ -7978,7 +8323,7 @@ var VideoPlayer_default = VideoPlayer;
|
|
|
7978
8323
|
// src/components/Whiteboard/Whiteboard.tsx
|
|
7979
8324
|
import { useCallback as useCallback3, useState as useState17 } from "react";
|
|
7980
8325
|
import { ArrowsOut } from "phosphor-react";
|
|
7981
|
-
import { Fragment as Fragment8, jsx as
|
|
8326
|
+
import { Fragment as Fragment8, jsx as jsx45, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
7982
8327
|
var IMAGE_WIDTH = 225;
|
|
7983
8328
|
var IMAGE_HEIGHT = 90;
|
|
7984
8329
|
var Whiteboard = ({
|
|
@@ -8016,7 +8361,7 @@ var Whiteboard = ({
|
|
|
8016
8361
|
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"
|
|
8017
8362
|
}[imagesPerRow];
|
|
8018
8363
|
if (!images || images.length === 0) {
|
|
8019
|
-
return /* @__PURE__ */
|
|
8364
|
+
return /* @__PURE__ */ jsx45(
|
|
8020
8365
|
"div",
|
|
8021
8366
|
{
|
|
8022
8367
|
className: cn(
|
|
@@ -8024,11 +8369,11 @@ var Whiteboard = ({
|
|
|
8024
8369
|
className
|
|
8025
8370
|
),
|
|
8026
8371
|
...rest,
|
|
8027
|
-
children: /* @__PURE__ */
|
|
8372
|
+
children: /* @__PURE__ */ jsx45("p", { className: "text-gray-400 text-sm", children: "Nenhuma imagem dispon\xEDvel" })
|
|
8028
8373
|
}
|
|
8029
8374
|
);
|
|
8030
8375
|
}
|
|
8031
|
-
return /* @__PURE__ */
|
|
8376
|
+
return /* @__PURE__ */ jsx45(
|
|
8032
8377
|
"div",
|
|
8033
8378
|
{
|
|
8034
8379
|
className: cn(
|
|
@@ -8036,7 +8381,7 @@ var Whiteboard = ({
|
|
|
8036
8381
|
className
|
|
8037
8382
|
),
|
|
8038
8383
|
...rest,
|
|
8039
|
-
children: /* @__PURE__ */
|
|
8384
|
+
children: /* @__PURE__ */ jsx45("div", { className: cn("grid gap-4", gridColsClass), children: images.map((image) => /* @__PURE__ */ jsxs34(
|
|
8040
8385
|
"div",
|
|
8041
8386
|
{
|
|
8042
8387
|
className: "relative group overflow-hidden bg-gray-100 rounded-lg",
|
|
@@ -8044,7 +8389,7 @@ var Whiteboard = ({
|
|
|
8044
8389
|
width: `${IMAGE_WIDTH}px`
|
|
8045
8390
|
},
|
|
8046
8391
|
children: [
|
|
8047
|
-
/* @__PURE__ */
|
|
8392
|
+
/* @__PURE__ */ jsx45(
|
|
8048
8393
|
"div",
|
|
8049
8394
|
{
|
|
8050
8395
|
className: "relative",
|
|
@@ -8052,8 +8397,8 @@ var Whiteboard = ({
|
|
|
8052
8397
|
width: `${IMAGE_WIDTH}px`,
|
|
8053
8398
|
height: `${IMAGE_HEIGHT}px`
|
|
8054
8399
|
},
|
|
8055
|
-
children: imageErrors.has(image.id) ? /* @__PURE__ */
|
|
8056
|
-
/* @__PURE__ */
|
|
8400
|
+
children: imageErrors.has(image.id) ? /* @__PURE__ */ jsx45("div", { className: "absolute inset-0 flex items-center justify-center bg-gray-200", children: /* @__PURE__ */ jsx45("p", { className: "text-gray-500 text-sm text-center px-2", children: "Imagem indispon\xEDvel" }) }) : /* @__PURE__ */ jsxs34(Fragment8, { children: [
|
|
8401
|
+
/* @__PURE__ */ jsx45(
|
|
8057
8402
|
"img",
|
|
8058
8403
|
{
|
|
8059
8404
|
src: image.imageUrl,
|
|
@@ -8063,18 +8408,18 @@ var Whiteboard = ({
|
|
|
8063
8408
|
onError: () => handleImageError(image.id)
|
|
8064
8409
|
}
|
|
8065
8410
|
),
|
|
8066
|
-
/* @__PURE__ */
|
|
8411
|
+
/* @__PURE__ */ jsx45("div", { className: "absolute inset-0 bg-gradient-to-t from-black/20 to-transparent" })
|
|
8067
8412
|
] })
|
|
8068
8413
|
}
|
|
8069
8414
|
),
|
|
8070
|
-
showDownload && /* @__PURE__ */
|
|
8415
|
+
showDownload && /* @__PURE__ */ jsx45(
|
|
8071
8416
|
"button",
|
|
8072
8417
|
{
|
|
8073
8418
|
type: "button",
|
|
8074
8419
|
onClick: () => handleDownload(image),
|
|
8075
8420
|
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",
|
|
8076
8421
|
"aria-label": `Download ${image.title || "imagem"}`,
|
|
8077
|
-
children: /* @__PURE__ */
|
|
8422
|
+
children: /* @__PURE__ */ jsx45(
|
|
8078
8423
|
ArrowsOut,
|
|
8079
8424
|
{
|
|
8080
8425
|
size: 24,
|
|
@@ -8097,13 +8442,13 @@ var Whiteboard_default = Whiteboard;
|
|
|
8097
8442
|
import {
|
|
8098
8443
|
createContext,
|
|
8099
8444
|
useContext,
|
|
8100
|
-
useEffect as
|
|
8445
|
+
useEffect as useEffect16,
|
|
8101
8446
|
useState as useState18,
|
|
8102
8447
|
useCallback as useCallback4,
|
|
8103
8448
|
useMemo as useMemo4
|
|
8104
8449
|
} from "react";
|
|
8105
8450
|
import { useLocation, Navigate } from "react-router-dom";
|
|
8106
|
-
import { Fragment as Fragment9, jsx as
|
|
8451
|
+
import { Fragment as Fragment9, jsx as jsx46 } from "react/jsx-runtime";
|
|
8107
8452
|
var AuthContext = createContext(void 0);
|
|
8108
8453
|
var AuthProvider = ({
|
|
8109
8454
|
children,
|
|
@@ -8162,7 +8507,7 @@ var AuthProvider = ({
|
|
|
8162
8507
|
tokens: void 0
|
|
8163
8508
|
}));
|
|
8164
8509
|
}, [signOutFn]);
|
|
8165
|
-
|
|
8510
|
+
useEffect16(() => {
|
|
8166
8511
|
checkAuth();
|
|
8167
8512
|
}, [checkAuth]);
|
|
8168
8513
|
const contextValue = useMemo4(
|
|
@@ -8173,7 +8518,7 @@ var AuthProvider = ({
|
|
|
8173
8518
|
}),
|
|
8174
8519
|
[authState, checkAuth, signOut]
|
|
8175
8520
|
);
|
|
8176
|
-
return /* @__PURE__ */
|
|
8521
|
+
return /* @__PURE__ */ jsx46(AuthContext.Provider, { value: contextValue, children });
|
|
8177
8522
|
};
|
|
8178
8523
|
var useAuth = () => {
|
|
8179
8524
|
const context = useContext(AuthContext);
|
|
@@ -8189,9 +8534,9 @@ var ProtectedRoute = ({
|
|
|
8189
8534
|
additionalCheck
|
|
8190
8535
|
}) => {
|
|
8191
8536
|
const { isAuthenticated, isLoading, ...authState } = useAuth();
|
|
8192
|
-
const defaultLoadingComponent = /* @__PURE__ */
|
|
8537
|
+
const defaultLoadingComponent = /* @__PURE__ */ jsx46("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ jsx46("div", { className: "text-text-950 text-lg", children: "Carregando..." }) });
|
|
8193
8538
|
if (isLoading) {
|
|
8194
|
-
return /* @__PURE__ */
|
|
8539
|
+
return /* @__PURE__ */ jsx46(Fragment9, { children: loadingComponent || defaultLoadingComponent });
|
|
8195
8540
|
}
|
|
8196
8541
|
if (!isAuthenticated) {
|
|
8197
8542
|
if (typeof window !== "undefined") {
|
|
@@ -8202,12 +8547,12 @@ var ProtectedRoute = ({
|
|
|
8202
8547
|
return null;
|
|
8203
8548
|
}
|
|
8204
8549
|
}
|
|
8205
|
-
return /* @__PURE__ */
|
|
8550
|
+
return /* @__PURE__ */ jsx46(Navigate, { to: redirectTo, replace: true });
|
|
8206
8551
|
}
|
|
8207
8552
|
if (additionalCheck && !additionalCheck({ isAuthenticated, isLoading, ...authState })) {
|
|
8208
|
-
return /* @__PURE__ */
|
|
8553
|
+
return /* @__PURE__ */ jsx46(Navigate, { to: redirectTo, replace: true });
|
|
8209
8554
|
}
|
|
8210
|
-
return /* @__PURE__ */
|
|
8555
|
+
return /* @__PURE__ */ jsx46(Fragment9, { children });
|
|
8211
8556
|
};
|
|
8212
8557
|
var PublicRoute = ({
|
|
8213
8558
|
children,
|
|
@@ -8217,15 +8562,15 @@ var PublicRoute = ({
|
|
|
8217
8562
|
}) => {
|
|
8218
8563
|
const { isAuthenticated, isLoading } = useAuth();
|
|
8219
8564
|
if (checkAuthBeforeRender && isLoading) {
|
|
8220
|
-
return /* @__PURE__ */
|
|
8565
|
+
return /* @__PURE__ */ jsx46("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ jsx46("div", { className: "text-text-950 text-lg", children: "Carregando..." }) });
|
|
8221
8566
|
}
|
|
8222
8567
|
if (isAuthenticated && redirectIfAuthenticated) {
|
|
8223
|
-
return /* @__PURE__ */
|
|
8568
|
+
return /* @__PURE__ */ jsx46(Navigate, { to: redirectTo, replace: true });
|
|
8224
8569
|
}
|
|
8225
|
-
return /* @__PURE__ */
|
|
8570
|
+
return /* @__PURE__ */ jsx46(Fragment9, { children });
|
|
8226
8571
|
};
|
|
8227
8572
|
var withAuth = (Component, options = {}) => {
|
|
8228
|
-
return (props) => /* @__PURE__ */
|
|
8573
|
+
return (props) => /* @__PURE__ */ jsx46(ProtectedRoute, { ...options, children: /* @__PURE__ */ jsx46(Component, { ...props }) });
|
|
8229
8574
|
};
|
|
8230
8575
|
var useAuthGuard = (options = {}) => {
|
|
8231
8576
|
const authState = useAuth();
|
|
@@ -8240,7 +8585,7 @@ var useAuthGuard = (options = {}) => {
|
|
|
8240
8585
|
var useRouteAuth = (fallbackPath = "/") => {
|
|
8241
8586
|
const { isAuthenticated, isLoading } = useAuth();
|
|
8242
8587
|
const location = useLocation();
|
|
8243
|
-
const redirectToLogin = () => /* @__PURE__ */
|
|
8588
|
+
const redirectToLogin = () => /* @__PURE__ */ jsx46(Navigate, { to: fallbackPath, state: { from: location }, replace: true });
|
|
8244
8589
|
return {
|
|
8245
8590
|
isAuthenticated,
|
|
8246
8591
|
isLoading,
|
|
@@ -8316,7 +8661,7 @@ function createZustandAuthAdapter(useAuthStore) {
|
|
|
8316
8661
|
}
|
|
8317
8662
|
|
|
8318
8663
|
// src/components/Auth/useUrlAuthentication.ts
|
|
8319
|
-
import { useEffect as
|
|
8664
|
+
import { useEffect as useEffect17, useRef as useRef11 } from "react";
|
|
8320
8665
|
import { useLocation as useLocation2 } from "react-router-dom";
|
|
8321
8666
|
var getAuthParams = (location, extractParams) => {
|
|
8322
8667
|
const searchParams = new URLSearchParams(location.search);
|
|
@@ -8365,7 +8710,7 @@ var handleUserData = (responseData, setUser) => {
|
|
|
8365
8710
|
function useUrlAuthentication(options) {
|
|
8366
8711
|
const location = useLocation2();
|
|
8367
8712
|
const processedRef = useRef11(false);
|
|
8368
|
-
|
|
8713
|
+
useEffect17(() => {
|
|
8369
8714
|
const handleAuthentication = async () => {
|
|
8370
8715
|
if (processedRef.current) {
|
|
8371
8716
|
return;
|
|
@@ -8458,7 +8803,7 @@ import {
|
|
|
8458
8803
|
} from "phosphor-react";
|
|
8459
8804
|
import {
|
|
8460
8805
|
forwardRef as forwardRef19,
|
|
8461
|
-
useEffect as
|
|
8806
|
+
useEffect as useEffect18,
|
|
8462
8807
|
useMemo as useMemo6,
|
|
8463
8808
|
useId as useId11,
|
|
8464
8809
|
useState as useState19,
|
|
@@ -9100,13 +9445,13 @@ var useQuizStore = create7()(
|
|
|
9100
9445
|
var mock_image_question_default = "./mock-image-question-HEZCLFDL.png";
|
|
9101
9446
|
|
|
9102
9447
|
// src/components/Quiz/Quiz.tsx
|
|
9103
|
-
import { Fragment as Fragment10, jsx as
|
|
9448
|
+
import { Fragment as Fragment10, jsx as jsx47, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
9104
9449
|
var getStatusBadge = (status) => {
|
|
9105
9450
|
switch (status) {
|
|
9106
9451
|
case "correct":
|
|
9107
|
-
return /* @__PURE__ */
|
|
9452
|
+
return /* @__PURE__ */ jsx47(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx47(CheckCircle6, {}), children: "Resposta correta" });
|
|
9108
9453
|
case "incorrect":
|
|
9109
|
-
return /* @__PURE__ */
|
|
9454
|
+
return /* @__PURE__ */ jsx47(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ jsx47(XCircle5, {}), children: "Resposta incorreta" });
|
|
9110
9455
|
default:
|
|
9111
9456
|
return null;
|
|
9112
9457
|
}
|
|
@@ -9121,16 +9466,16 @@ var getStatusStyles = (variantCorrect) => {
|
|
|
9121
9466
|
};
|
|
9122
9467
|
var Quiz = forwardRef19(({ children, className, variant = "default", ...props }, ref) => {
|
|
9123
9468
|
const { setVariant } = useQuizStore();
|
|
9124
|
-
|
|
9469
|
+
useEffect18(() => {
|
|
9125
9470
|
setVariant(variant);
|
|
9126
9471
|
}, [variant, setVariant]);
|
|
9127
|
-
return /* @__PURE__ */
|
|
9472
|
+
return /* @__PURE__ */ jsx47("div", { ref, className: cn("flex flex-col", className), ...props, children });
|
|
9128
9473
|
});
|
|
9129
9474
|
var QuizHeaderResult = forwardRef19(
|
|
9130
9475
|
({ className, ...props }, ref) => {
|
|
9131
9476
|
const { getQuestionResultByQuestionId, getCurrentQuestion } = useQuizStore();
|
|
9132
9477
|
const [status, setStatus] = useState19(void 0);
|
|
9133
|
-
|
|
9478
|
+
useEffect18(() => {
|
|
9134
9479
|
const cq = getCurrentQuestion();
|
|
9135
9480
|
if (!cq) {
|
|
9136
9481
|
setStatus(void 0);
|
|
@@ -9165,7 +9510,7 @@ var QuizHeaderResult = forwardRef19(
|
|
|
9165
9510
|
return "N\xE3o foi dessa vez...voc\xEA deixou a resposta em branco";
|
|
9166
9511
|
}
|
|
9167
9512
|
};
|
|
9168
|
-
return /* @__PURE__ */
|
|
9513
|
+
return /* @__PURE__ */ jsxs35(
|
|
9169
9514
|
"div",
|
|
9170
9515
|
{
|
|
9171
9516
|
ref,
|
|
@@ -9176,8 +9521,8 @@ var QuizHeaderResult = forwardRef19(
|
|
|
9176
9521
|
),
|
|
9177
9522
|
...props,
|
|
9178
9523
|
children: [
|
|
9179
|
-
/* @__PURE__ */
|
|
9180
|
-
/* @__PURE__ */
|
|
9524
|
+
/* @__PURE__ */ jsx47("p", { className: "text-text-950 font-bold text-lg", children: "Resultado" }),
|
|
9525
|
+
/* @__PURE__ */ jsx47("p", { className: "text-text-700 text-md", children: getLabelByAnswersStatus() })
|
|
9181
9526
|
]
|
|
9182
9527
|
}
|
|
9183
9528
|
);
|
|
@@ -9210,8 +9555,8 @@ var QuizTitle = forwardRef19(
|
|
|
9210
9555
|
const handleCancelExit = () => {
|
|
9211
9556
|
setShowExitConfirmation(false);
|
|
9212
9557
|
};
|
|
9213
|
-
return /* @__PURE__ */
|
|
9214
|
-
/* @__PURE__ */
|
|
9558
|
+
return /* @__PURE__ */ jsxs35(Fragment10, { children: [
|
|
9559
|
+
/* @__PURE__ */ jsxs35(
|
|
9215
9560
|
"div",
|
|
9216
9561
|
{
|
|
9217
9562
|
ref,
|
|
@@ -9221,24 +9566,24 @@ var QuizTitle = forwardRef19(
|
|
|
9221
9566
|
),
|
|
9222
9567
|
...props,
|
|
9223
9568
|
children: [
|
|
9224
|
-
/* @__PURE__ */
|
|
9569
|
+
/* @__PURE__ */ jsx47(
|
|
9225
9570
|
IconButton_default,
|
|
9226
9571
|
{
|
|
9227
|
-
icon: /* @__PURE__ */
|
|
9572
|
+
icon: /* @__PURE__ */ jsx47(CaretLeft3, { size: 24 }),
|
|
9228
9573
|
size: "md",
|
|
9229
9574
|
"aria-label": "Voltar",
|
|
9230
9575
|
onClick: handleBackClick
|
|
9231
9576
|
}
|
|
9232
9577
|
),
|
|
9233
|
-
/* @__PURE__ */
|
|
9234
|
-
/* @__PURE__ */
|
|
9235
|
-
/* @__PURE__ */
|
|
9578
|
+
/* @__PURE__ */ jsxs35("span", { className: "flex flex-col gap-2 text-center", children: [
|
|
9579
|
+
/* @__PURE__ */ jsx47("p", { className: "text-text-950 font-bold text-md", children: quizTitle }),
|
|
9580
|
+
/* @__PURE__ */ jsx47("p", { className: "text-text-600 text-xs", children: totalQuestions > 0 ? `${currentQuestionIndex + 1} de ${totalQuestions}` : "0 de 0" })
|
|
9236
9581
|
] }),
|
|
9237
|
-
/* @__PURE__ */
|
|
9582
|
+
/* @__PURE__ */ jsx47("span", { className: "flex flex-row items-center justify-center", children: /* @__PURE__ */ jsx47(Badge_default, { variant: "outlined", action: "info", iconLeft: /* @__PURE__ */ jsx47(Clock2, {}), children: isStarted ? formatTime2(timeElapsed) : "00:00" }) })
|
|
9238
9583
|
]
|
|
9239
9584
|
}
|
|
9240
9585
|
),
|
|
9241
|
-
/* @__PURE__ */
|
|
9586
|
+
/* @__PURE__ */ jsx47(
|
|
9242
9587
|
AlertDialog,
|
|
9243
9588
|
{
|
|
9244
9589
|
isOpen: showExitConfirmation,
|
|
@@ -9256,13 +9601,13 @@ var QuizTitle = forwardRef19(
|
|
|
9256
9601
|
);
|
|
9257
9602
|
var QuizSubTitle = forwardRef19(
|
|
9258
9603
|
({ subTitle, ...props }, ref) => {
|
|
9259
|
-
return /* @__PURE__ */
|
|
9604
|
+
return /* @__PURE__ */ jsx47("div", { className: "px-4 pb-2 pt-6", ...props, ref, children: /* @__PURE__ */ jsx47("p", { className: "font-bold text-lg text-text-950", children: subTitle }) });
|
|
9260
9605
|
}
|
|
9261
9606
|
);
|
|
9262
9607
|
var QuizHeader = () => {
|
|
9263
9608
|
const { getCurrentQuestion, currentQuestionIndex } = useQuizStore();
|
|
9264
9609
|
const currentQuestion = getCurrentQuestion();
|
|
9265
|
-
return /* @__PURE__ */
|
|
9610
|
+
return /* @__PURE__ */ jsx47(
|
|
9266
9611
|
HeaderAlternative,
|
|
9267
9612
|
{
|
|
9268
9613
|
title: currentQuestion ? `Quest\xE3o ${currentQuestionIndex + 1}` : "Quest\xE3o",
|
|
@@ -9272,7 +9617,7 @@ var QuizHeader = () => {
|
|
|
9272
9617
|
);
|
|
9273
9618
|
};
|
|
9274
9619
|
var QuizContainer = forwardRef19(({ children, className, ...props }, ref) => {
|
|
9275
|
-
return /* @__PURE__ */
|
|
9620
|
+
return /* @__PURE__ */ jsx47(
|
|
9276
9621
|
"div",
|
|
9277
9622
|
{
|
|
9278
9623
|
ref,
|
|
@@ -9298,7 +9643,7 @@ var QuizContent = forwardRef19(({ paddingBottom }) => {
|
|
|
9298
9643
|
["IMAGEM" /* IMAGEM */]: QuizImageQuestion
|
|
9299
9644
|
};
|
|
9300
9645
|
const QuestionComponent = currentQuestion ? questionComponents[currentQuestion.questionType] : null;
|
|
9301
|
-
return QuestionComponent ? /* @__PURE__ */
|
|
9646
|
+
return QuestionComponent ? /* @__PURE__ */ jsx47(QuestionComponent, { paddingBottom }) : null;
|
|
9302
9647
|
});
|
|
9303
9648
|
var QuizAlternative = ({ paddingBottom }) => {
|
|
9304
9649
|
const {
|
|
@@ -9335,10 +9680,10 @@ var QuizAlternative = ({ paddingBottom }) => {
|
|
|
9335
9680
|
};
|
|
9336
9681
|
});
|
|
9337
9682
|
if (!alternatives)
|
|
9338
|
-
return /* @__PURE__ */
|
|
9339
|
-
return /* @__PURE__ */
|
|
9340
|
-
/* @__PURE__ */
|
|
9341
|
-
/* @__PURE__ */
|
|
9683
|
+
return /* @__PURE__ */ jsx47("div", { children: /* @__PURE__ */ jsx47("p", { children: "N\xE3o h\xE1 Alternativas" }) });
|
|
9684
|
+
return /* @__PURE__ */ jsxs35(Fragment10, { children: [
|
|
9685
|
+
/* @__PURE__ */ jsx47(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
9686
|
+
/* @__PURE__ */ jsx47(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx47("div", { className: "space-y-4", children: /* @__PURE__ */ jsx47(
|
|
9342
9687
|
AlternativesList,
|
|
9343
9688
|
{
|
|
9344
9689
|
mode: variant === "default" ? "interactive" : "readonly",
|
|
@@ -9436,10 +9781,10 @@ var QuizMultipleChoice = ({ paddingBottom }) => {
|
|
|
9436
9781
|
};
|
|
9437
9782
|
});
|
|
9438
9783
|
if (!choices)
|
|
9439
|
-
return /* @__PURE__ */
|
|
9440
|
-
return /* @__PURE__ */
|
|
9441
|
-
/* @__PURE__ */
|
|
9442
|
-
/* @__PURE__ */
|
|
9784
|
+
return /* @__PURE__ */ jsx47("div", { children: /* @__PURE__ */ jsx47("p", { children: "N\xE3o h\xE1 Escolhas Multiplas" }) });
|
|
9785
|
+
return /* @__PURE__ */ jsxs35(Fragment10, { children: [
|
|
9786
|
+
/* @__PURE__ */ jsx47(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
9787
|
+
/* @__PURE__ */ jsx47(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx47("div", { className: "space-y-4", children: /* @__PURE__ */ jsx47(
|
|
9443
9788
|
MultipleChoiceList,
|
|
9444
9789
|
{
|
|
9445
9790
|
choices,
|
|
@@ -9481,16 +9826,16 @@ var QuizDissertative = ({ paddingBottom }) => {
|
|
|
9481
9826
|
textareaRef.current.style.height = `${newHeight}px`;
|
|
9482
9827
|
}
|
|
9483
9828
|
}, []);
|
|
9484
|
-
|
|
9829
|
+
useEffect18(() => {
|
|
9485
9830
|
adjustTextareaHeight();
|
|
9486
9831
|
}, [currentAnswer, adjustTextareaHeight]);
|
|
9487
9832
|
if (!currentQuestion) {
|
|
9488
|
-
return /* @__PURE__ */
|
|
9833
|
+
return /* @__PURE__ */ jsx47("div", { className: "space-y-4", children: /* @__PURE__ */ jsx47("p", { className: "text-text-600 text-md", children: "Nenhuma quest\xE3o dispon\xEDvel" }) });
|
|
9489
9834
|
}
|
|
9490
9835
|
const localAnswer = (variant == "result" ? currentQuestionResult?.answer : currentAnswer?.answer) || "";
|
|
9491
|
-
return /* @__PURE__ */
|
|
9492
|
-
/* @__PURE__ */
|
|
9493
|
-
/* @__PURE__ */
|
|
9836
|
+
return /* @__PURE__ */ jsxs35(Fragment10, { children: [
|
|
9837
|
+
/* @__PURE__ */ jsx47(QuizSubTitle, { subTitle: "Resposta" }),
|
|
9838
|
+
/* @__PURE__ */ jsx47(QuizContainer, { className: cn(variant != "result" && paddingBottom), children: /* @__PURE__ */ jsx47("div", { className: "space-y-4 max-h-[600px] overflow-y-auto", children: variant === "default" ? /* @__PURE__ */ jsx47("div", { className: "space-y-4", children: /* @__PURE__ */ jsx47(
|
|
9494
9839
|
TextArea_default,
|
|
9495
9840
|
{
|
|
9496
9841
|
ref: textareaRef,
|
|
@@ -9500,10 +9845,10 @@ var QuizDissertative = ({ paddingBottom }) => {
|
|
|
9500
9845
|
rows: 4,
|
|
9501
9846
|
className: "min-h-[120px] max-h-[400px] resize-none overflow-y-auto"
|
|
9502
9847
|
}
|
|
9503
|
-
) }) : /* @__PURE__ */
|
|
9504
|
-
variant === "result" && currentQuestionResult?.answerStatus == "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && /* @__PURE__ */
|
|
9505
|
-
/* @__PURE__ */
|
|
9506
|
-
/* @__PURE__ */
|
|
9848
|
+
) }) : /* @__PURE__ */ jsx47("div", { className: "space-y-4", children: /* @__PURE__ */ jsx47("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: localAnswer || "Nenhuma resposta fornecida" }) }) }) }),
|
|
9849
|
+
variant === "result" && currentQuestionResult?.answerStatus == "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && /* @__PURE__ */ jsxs35(Fragment10, { children: [
|
|
9850
|
+
/* @__PURE__ */ jsx47(QuizSubTitle, { subTitle: "Observa\xE7\xE3o do professor" }),
|
|
9851
|
+
/* @__PURE__ */ jsx47(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx47("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Integer euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse potenti. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit. Sed ut imperdiet nisi. Proin condimentum fermentum nunc. Etiam pharetra, erat sed fermentum feugiat, velit mauris egestas quam, ut aliquam massa nisl quis neque. Suspendisse in orci enim. Mauris euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Integer euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse potenti. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit. Sed ut imperdiet nisi. Proin condimentum fermentum nunc. Etiam pharetra, erat sed fermentum feugiat, velit mauris egestas quam, ut aliquam massa nisl quis neque. Suspendisse in orci enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Integer euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse potenti. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit. Sed ut imperdiet nisi. Proin condimentum fermentum nunc. Etiam pharetra, erat sed fermentum feugiat, velit mauris egestas quam, ut aliquam massa nisl quis neque. Suspendisse in orci enim." }) })
|
|
9507
9852
|
] })
|
|
9508
9853
|
] });
|
|
9509
9854
|
};
|
|
@@ -9529,16 +9874,16 @@ var QuizTrueOrFalse = ({ paddingBottom }) => {
|
|
|
9529
9874
|
];
|
|
9530
9875
|
const getLetterByIndex = (index) => String.fromCharCode(97 + index);
|
|
9531
9876
|
const isDefaultVariant = variant == "default";
|
|
9532
|
-
return /* @__PURE__ */
|
|
9533
|
-
/* @__PURE__ */
|
|
9534
|
-
/* @__PURE__ */
|
|
9877
|
+
return /* @__PURE__ */ jsxs35(Fragment10, { children: [
|
|
9878
|
+
/* @__PURE__ */ jsx47(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
9879
|
+
/* @__PURE__ */ jsx47(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx47("div", { className: "flex flex-col gap-3.5", children: options.map((option, index) => {
|
|
9535
9880
|
const variantCorrect = option.isCorrect ? "correct" : "incorrect";
|
|
9536
|
-
return /* @__PURE__ */
|
|
9881
|
+
return /* @__PURE__ */ jsxs35(
|
|
9537
9882
|
"section",
|
|
9538
9883
|
{
|
|
9539
9884
|
className: "flex flex-col gap-2",
|
|
9540
9885
|
children: [
|
|
9541
|
-
/* @__PURE__ */
|
|
9886
|
+
/* @__PURE__ */ jsxs35(
|
|
9542
9887
|
"div",
|
|
9543
9888
|
{
|
|
9544
9889
|
className: cn(
|
|
@@ -9546,20 +9891,20 @@ var QuizTrueOrFalse = ({ paddingBottom }) => {
|
|
|
9546
9891
|
!isDefaultVariant ? getStatusStyles(variantCorrect) : ""
|
|
9547
9892
|
),
|
|
9548
9893
|
children: [
|
|
9549
|
-
/* @__PURE__ */
|
|
9550
|
-
isDefaultVariant ? /* @__PURE__ */
|
|
9551
|
-
/* @__PURE__ */
|
|
9552
|
-
/* @__PURE__ */
|
|
9553
|
-
/* @__PURE__ */
|
|
9554
|
-
/* @__PURE__ */
|
|
9894
|
+
/* @__PURE__ */ jsx47("p", { className: "text-text-900 text-sm", children: getLetterByIndex(index).concat(") ").concat(option.label) }),
|
|
9895
|
+
isDefaultVariant ? /* @__PURE__ */ jsxs35(Select_default, { size: "medium", children: [
|
|
9896
|
+
/* @__PURE__ */ jsx47(SelectTrigger, { className: "w-[180px]", children: /* @__PURE__ */ jsx47(SelectValue, { placeholder: "Selecione opc\xE3o" }) }),
|
|
9897
|
+
/* @__PURE__ */ jsxs35(SelectContent, { children: [
|
|
9898
|
+
/* @__PURE__ */ jsx47(SelectItem, { value: "V", children: "Verdadeiro" }),
|
|
9899
|
+
/* @__PURE__ */ jsx47(SelectItem, { value: "F", children: "Falso" })
|
|
9555
9900
|
] })
|
|
9556
|
-
] }) : /* @__PURE__ */
|
|
9901
|
+
] }) : /* @__PURE__ */ jsx47("div", { className: "flex-shrink-0", children: getStatusBadge(variantCorrect) })
|
|
9557
9902
|
]
|
|
9558
9903
|
}
|
|
9559
9904
|
),
|
|
9560
|
-
!isDefaultVariant && /* @__PURE__ */
|
|
9561
|
-
/* @__PURE__ */
|
|
9562
|
-
!option.isCorrect && /* @__PURE__ */
|
|
9905
|
+
!isDefaultVariant && /* @__PURE__ */ jsxs35("span", { className: "flex flex-row gap-2 items-center", children: [
|
|
9906
|
+
/* @__PURE__ */ jsx47("p", { className: "text-text-800 text-2xs", children: "Resposta selecionada: V" }),
|
|
9907
|
+
!option.isCorrect && /* @__PURE__ */ jsx47("p", { className: "text-text-800 text-2xs", children: "Resposta correta: F" })
|
|
9563
9908
|
] })
|
|
9564
9909
|
]
|
|
9565
9910
|
},
|
|
@@ -9649,13 +9994,13 @@ var QuizConnectDots = ({ paddingBottom }) => {
|
|
|
9649
9994
|
const assignedDots = new Set(
|
|
9650
9995
|
userAnswers.map((a) => a.dotOption).filter(Boolean)
|
|
9651
9996
|
);
|
|
9652
|
-
return /* @__PURE__ */
|
|
9653
|
-
/* @__PURE__ */
|
|
9654
|
-
/* @__PURE__ */
|
|
9997
|
+
return /* @__PURE__ */ jsxs35(Fragment10, { children: [
|
|
9998
|
+
/* @__PURE__ */ jsx47(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
9999
|
+
/* @__PURE__ */ jsx47(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx47("div", { className: "flex flex-col gap-3.5", children: options.map((option, index) => {
|
|
9655
10000
|
const answer = userAnswers[index];
|
|
9656
10001
|
const variantCorrect = answer.isCorrect ? "correct" : "incorrect";
|
|
9657
|
-
return /* @__PURE__ */
|
|
9658
|
-
/* @__PURE__ */
|
|
10002
|
+
return /* @__PURE__ */ jsxs35("section", { className: "flex flex-col gap-2", children: [
|
|
10003
|
+
/* @__PURE__ */ jsxs35(
|
|
9659
10004
|
"div",
|
|
9660
10005
|
{
|
|
9661
10006
|
className: cn(
|
|
@@ -9663,30 +10008,30 @@ var QuizConnectDots = ({ paddingBottom }) => {
|
|
|
9663
10008
|
!isDefaultVariant ? getStatusStyles(variantCorrect) : ""
|
|
9664
10009
|
),
|
|
9665
10010
|
children: [
|
|
9666
|
-
/* @__PURE__ */
|
|
9667
|
-
isDefaultVariant ? /* @__PURE__ */
|
|
10011
|
+
/* @__PURE__ */ jsx47("p", { className: "text-text-900 text-sm", children: getLetterByIndex(index) + ") " + option.label }),
|
|
10012
|
+
isDefaultVariant ? /* @__PURE__ */ jsxs35(
|
|
9668
10013
|
Select_default,
|
|
9669
10014
|
{
|
|
9670
10015
|
size: "medium",
|
|
9671
10016
|
value: answer.dotOption || void 0,
|
|
9672
10017
|
onValueChange: (value) => handleSelectDot(index, value),
|
|
9673
10018
|
children: [
|
|
9674
|
-
/* @__PURE__ */
|
|
9675
|
-
/* @__PURE__ */
|
|
10019
|
+
/* @__PURE__ */ jsx47(SelectTrigger, { className: "w-[180px]", children: /* @__PURE__ */ jsx47(SelectValue, { placeholder: "Selecione op\xE7\xE3o" }) }),
|
|
10020
|
+
/* @__PURE__ */ jsx47(SelectContent, { children: dotsOptions.filter(
|
|
9676
10021
|
(dot) => !assignedDots.has(dot.label) || answer.dotOption === dot.label
|
|
9677
|
-
).map((dot) => /* @__PURE__ */
|
|
10022
|
+
).map((dot) => /* @__PURE__ */ jsx47(SelectItem, { value: dot.label, children: dot.label }, dot.label)) })
|
|
9678
10023
|
]
|
|
9679
10024
|
}
|
|
9680
|
-
) : /* @__PURE__ */
|
|
10025
|
+
) : /* @__PURE__ */ jsx47("div", { className: "flex-shrink-0", children: answer.isCorrect === null ? null : getStatusBadge(variantCorrect) })
|
|
9681
10026
|
]
|
|
9682
10027
|
}
|
|
9683
10028
|
),
|
|
9684
|
-
!isDefaultVariant && /* @__PURE__ */
|
|
9685
|
-
/* @__PURE__ */
|
|
10029
|
+
!isDefaultVariant && /* @__PURE__ */ jsxs35("span", { className: "flex flex-row gap-2 items-center", children: [
|
|
10030
|
+
/* @__PURE__ */ jsxs35("p", { className: "text-text-800 text-2xs", children: [
|
|
9686
10031
|
"Resposta selecionada: ",
|
|
9687
10032
|
answer.dotOption || "Nenhuma"
|
|
9688
10033
|
] }),
|
|
9689
|
-
!answer.isCorrect && /* @__PURE__ */
|
|
10034
|
+
!answer.isCorrect && /* @__PURE__ */ jsxs35("p", { className: "text-text-800 text-2xs", children: [
|
|
9690
10035
|
"Resposta correta: ",
|
|
9691
10036
|
answer.correctOption
|
|
9692
10037
|
] })
|
|
@@ -9753,18 +10098,18 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
9753
10098
|
const mockAnswer = mockUserAnswers.find(
|
|
9754
10099
|
(answer) => answer.selectId === selectId
|
|
9755
10100
|
);
|
|
9756
|
-
return /* @__PURE__ */
|
|
10101
|
+
return /* @__PURE__ */ jsx47("p", { className: "inline-flex mb-2.5 text-success-600 font-semibold text-md border-b-2 border-success-600", children: mockAnswer?.correctAnswer });
|
|
9757
10102
|
};
|
|
9758
10103
|
const renderDefaultElement = (selectId, startIndex, selectedValue, availableOptionsForThisSelect) => {
|
|
9759
|
-
return /* @__PURE__ */
|
|
10104
|
+
return /* @__PURE__ */ jsxs35(
|
|
9760
10105
|
Select_default,
|
|
9761
10106
|
{
|
|
9762
10107
|
value: selectedValue,
|
|
9763
10108
|
onValueChange: (value) => handleSelectChange(selectId, value),
|
|
9764
10109
|
className: "inline-flex mb-2.5",
|
|
9765
10110
|
children: [
|
|
9766
|
-
/* @__PURE__ */
|
|
9767
|
-
/* @__PURE__ */
|
|
10111
|
+
/* @__PURE__ */ jsx47(SelectTrigger, { className: "inline-flex w-auto min-w-[140px] h-8 mx-1 bg-white border-gray-300", children: /* @__PURE__ */ jsx47(SelectValue, { placeholder: "Selecione op\xE7\xE3o" }) }),
|
|
10112
|
+
/* @__PURE__ */ jsx47(SelectContent, { children: availableOptionsForThisSelect.map((option, index) => /* @__PURE__ */ jsx47(SelectItem, { value: option, children: option }, `${option}-${index}`)) })
|
|
9768
10113
|
]
|
|
9769
10114
|
},
|
|
9770
10115
|
`${selectId}-${startIndex}`
|
|
@@ -9776,8 +10121,8 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
9776
10121
|
);
|
|
9777
10122
|
if (!mockAnswer) return null;
|
|
9778
10123
|
const action = mockAnswer.isCorrect ? "success" : "error";
|
|
9779
|
-
const icon = mockAnswer.isCorrect ? /* @__PURE__ */
|
|
9780
|
-
return /* @__PURE__ */
|
|
10124
|
+
const icon = mockAnswer.isCorrect ? /* @__PURE__ */ jsx47(CheckCircle6, {}) : /* @__PURE__ */ jsx47(XCircle5, {});
|
|
10125
|
+
return /* @__PURE__ */ jsx47(
|
|
9781
10126
|
Badge_default,
|
|
9782
10127
|
{
|
|
9783
10128
|
variant: "solid",
|
|
@@ -9785,7 +10130,7 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
9785
10130
|
iconRight: icon,
|
|
9786
10131
|
size: "large",
|
|
9787
10132
|
className: "py-3 w-[180px] justify-between mb-2.5",
|
|
9788
|
-
children: /* @__PURE__ */
|
|
10133
|
+
children: /* @__PURE__ */ jsx47("span", { className: "text-text-900", children: mockAnswer.userAnswer })
|
|
9789
10134
|
},
|
|
9790
10135
|
selectId
|
|
9791
10136
|
);
|
|
@@ -9841,25 +10186,25 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
9841
10186
|
}
|
|
9842
10187
|
return elements;
|
|
9843
10188
|
};
|
|
9844
|
-
return /* @__PURE__ */
|
|
9845
|
-
/* @__PURE__ */
|
|
9846
|
-
/* @__PURE__ */
|
|
10189
|
+
return /* @__PURE__ */ jsxs35(Fragment10, { children: [
|
|
10190
|
+
/* @__PURE__ */ jsx47(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
10191
|
+
/* @__PURE__ */ jsx47(QuizContainer, { className: "h-auto pb-0", children: /* @__PURE__ */ jsx47("div", { className: "space-y-6 px-4 h-auto", children: /* @__PURE__ */ jsx47(
|
|
9847
10192
|
"div",
|
|
9848
10193
|
{
|
|
9849
10194
|
className: cn(
|
|
9850
10195
|
"text-lg text-text-900 leading-8 h-auto",
|
|
9851
10196
|
variant != "result" && paddingBottom
|
|
9852
10197
|
),
|
|
9853
|
-
children: renderTextWithSelects(exampleText).map((element) => /* @__PURE__ */
|
|
10198
|
+
children: renderTextWithSelects(exampleText).map((element) => /* @__PURE__ */ jsx47("span", { children: element.element }, element.id))
|
|
9854
10199
|
}
|
|
9855
10200
|
) }) }),
|
|
9856
|
-
variant === "result" && /* @__PURE__ */
|
|
9857
|
-
/* @__PURE__ */
|
|
9858
|
-
/* @__PURE__ */
|
|
10201
|
+
variant === "result" && /* @__PURE__ */ jsxs35(Fragment10, { children: [
|
|
10202
|
+
/* @__PURE__ */ jsx47(QuizSubTitle, { subTitle: "Resultado" }),
|
|
10203
|
+
/* @__PURE__ */ jsx47(QuizContainer, { className: "h-auto pb-0", children: /* @__PURE__ */ jsx47("div", { className: "space-y-6 px-4", children: /* @__PURE__ */ jsx47(
|
|
9859
10204
|
"div",
|
|
9860
10205
|
{
|
|
9861
10206
|
className: cn("text-lg text-text-900 leading-8", paddingBottom),
|
|
9862
|
-
children: renderTextWithSelects(exampleText, true).map((element) => /* @__PURE__ */
|
|
10207
|
+
children: renderTextWithSelects(exampleText, true).map((element) => /* @__PURE__ */ jsx47("span", { children: element.element }, element.id))
|
|
9863
10208
|
}
|
|
9864
10209
|
) }) })
|
|
9865
10210
|
] })
|
|
@@ -9913,36 +10258,36 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
9913
10258
|
}
|
|
9914
10259
|
return "bg-success-600/70 border-white";
|
|
9915
10260
|
};
|
|
9916
|
-
return /* @__PURE__ */
|
|
9917
|
-
/* @__PURE__ */
|
|
9918
|
-
/* @__PURE__ */
|
|
10261
|
+
return /* @__PURE__ */ jsxs35(Fragment10, { children: [
|
|
10262
|
+
/* @__PURE__ */ jsx47(QuizSubTitle, { subTitle: "Clique na \xE1rea correta" }),
|
|
10263
|
+
/* @__PURE__ */ jsx47(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsxs35(
|
|
9919
10264
|
"div",
|
|
9920
10265
|
{
|
|
9921
10266
|
"data-testid": "quiz-image-container",
|
|
9922
10267
|
className: "space-y-6 p-3 relative inline-block",
|
|
9923
10268
|
children: [
|
|
9924
|
-
variant == "result" && /* @__PURE__ */
|
|
10269
|
+
variant == "result" && /* @__PURE__ */ jsxs35(
|
|
9925
10270
|
"div",
|
|
9926
10271
|
{
|
|
9927
10272
|
"data-testid": "quiz-legend",
|
|
9928
10273
|
className: "flex items-center gap-4 text-xs",
|
|
9929
10274
|
children: [
|
|
9930
|
-
/* @__PURE__ */
|
|
9931
|
-
/* @__PURE__ */
|
|
9932
|
-
/* @__PURE__ */
|
|
10275
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-2", children: [
|
|
10276
|
+
/* @__PURE__ */ jsx47("div", { className: "w-3 h-3 rounded-full bg-indicator-primary/70 border border-[#F8CC2E]" }),
|
|
10277
|
+
/* @__PURE__ */ jsx47("span", { className: "text-text-600 font-medium text-sm", children: "\xC1rea correta" })
|
|
9933
10278
|
] }),
|
|
9934
|
-
/* @__PURE__ */
|
|
9935
|
-
/* @__PURE__ */
|
|
9936
|
-
/* @__PURE__ */
|
|
10279
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-2", children: [
|
|
10280
|
+
/* @__PURE__ */ jsx47("div", { className: "w-3 h-3 rounded-full bg-success-600/70 border border-white" }),
|
|
10281
|
+
/* @__PURE__ */ jsx47("span", { className: "text-text-600 font-medium text-sm", children: "Resposta correta" })
|
|
9937
10282
|
] }),
|
|
9938
|
-
/* @__PURE__ */
|
|
9939
|
-
/* @__PURE__ */
|
|
9940
|
-
/* @__PURE__ */
|
|
10283
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-2", children: [
|
|
10284
|
+
/* @__PURE__ */ jsx47("div", { className: "w-3 h-3 rounded-full bg-indicator-error/70 border border-white" }),
|
|
10285
|
+
/* @__PURE__ */ jsx47("span", { className: "text-text-600 font-medium text-sm", children: "Resposta incorreta" })
|
|
9941
10286
|
] })
|
|
9942
10287
|
]
|
|
9943
10288
|
}
|
|
9944
10289
|
),
|
|
9945
|
-
/* @__PURE__ */
|
|
10290
|
+
/* @__PURE__ */ jsxs35(
|
|
9946
10291
|
"button",
|
|
9947
10292
|
{
|
|
9948
10293
|
"data-testid": "quiz-image-button",
|
|
@@ -9957,7 +10302,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
9957
10302
|
},
|
|
9958
10303
|
"aria-label": "\xC1rea da imagem interativa",
|
|
9959
10304
|
children: [
|
|
9960
|
-
/* @__PURE__ */
|
|
10305
|
+
/* @__PURE__ */ jsx47(
|
|
9961
10306
|
"img",
|
|
9962
10307
|
{
|
|
9963
10308
|
"data-testid": "quiz-image",
|
|
@@ -9966,7 +10311,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
9966
10311
|
className: "w-full h-auto rounded-md"
|
|
9967
10312
|
}
|
|
9968
10313
|
),
|
|
9969
|
-
variant === "result" && /* @__PURE__ */
|
|
10314
|
+
variant === "result" && /* @__PURE__ */ jsx47(
|
|
9970
10315
|
"div",
|
|
9971
10316
|
{
|
|
9972
10317
|
"data-testid": "quiz-correct-circle",
|
|
@@ -9981,7 +10326,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
9981
10326
|
}
|
|
9982
10327
|
}
|
|
9983
10328
|
),
|
|
9984
|
-
clickPositionRelative && /* @__PURE__ */
|
|
10329
|
+
clickPositionRelative && /* @__PURE__ */ jsx47(
|
|
9985
10330
|
"div",
|
|
9986
10331
|
{
|
|
9987
10332
|
"data-testid": "quiz-user-circle",
|
|
@@ -10049,18 +10394,18 @@ var QuizQuestionList = ({
|
|
|
10049
10394
|
return "Em branco";
|
|
10050
10395
|
}
|
|
10051
10396
|
};
|
|
10052
|
-
return /* @__PURE__ */
|
|
10053
|
-
Object.entries(filteredGroupedQuestions).length == 0 && /* @__PURE__ */
|
|
10397
|
+
return /* @__PURE__ */ jsxs35("div", { className: "space-y-6 px-4 h-full", children: [
|
|
10398
|
+
Object.entries(filteredGroupedQuestions).length == 0 && /* @__PURE__ */ jsx47("div", { className: "flex items-center justify-center text-gray-500 py-8 h-full", children: /* @__PURE__ */ jsx47("p", { className: "text-lg", children: "Nenhum resultado" }) }),
|
|
10054
10399
|
Object.entries(filteredGroupedQuestions).map(
|
|
10055
|
-
([subjectId, questions]) => /* @__PURE__ */
|
|
10056
|
-
/* @__PURE__ */
|
|
10057
|
-
/* @__PURE__ */
|
|
10058
|
-
/* @__PURE__ */
|
|
10400
|
+
([subjectId, questions]) => /* @__PURE__ */ jsxs35("section", { className: "flex flex-col gap-2", children: [
|
|
10401
|
+
/* @__PURE__ */ jsxs35("span", { className: "pt-6 pb-4 flex flex-row gap-2", children: [
|
|
10402
|
+
/* @__PURE__ */ jsx47("div", { className: "bg-primary-500 p-1 rounded-sm flex items-center justify-center", children: /* @__PURE__ */ jsx47(BookOpen, { size: 17, className: "text-white" }) }),
|
|
10403
|
+
/* @__PURE__ */ jsx47("p", { className: "text-text-800 font-bold text-lg", children: questions?.[0]?.knowledgeMatrix?.[0]?.subject?.name ?? "Sem mat\xE9ria" })
|
|
10059
10404
|
] }),
|
|
10060
|
-
/* @__PURE__ */
|
|
10405
|
+
/* @__PURE__ */ jsx47("ul", { className: "flex flex-col gap-2", children: questions.map((question) => {
|
|
10061
10406
|
const status = getQuestionStatus(question.id);
|
|
10062
10407
|
const questionNumber = getQuestionIndex(question.id);
|
|
10063
|
-
return /* @__PURE__ */
|
|
10408
|
+
return /* @__PURE__ */ jsx47(
|
|
10064
10409
|
CardStatus,
|
|
10065
10410
|
{
|
|
10066
10411
|
header: `Quest\xE3o ${questionNumber.toString().padStart(2, "0")}`,
|
|
@@ -10140,8 +10485,8 @@ var QuizFooter = forwardRef19(
|
|
|
10140
10485
|
return;
|
|
10141
10486
|
}
|
|
10142
10487
|
};
|
|
10143
|
-
return /* @__PURE__ */
|
|
10144
|
-
/* @__PURE__ */
|
|
10488
|
+
return /* @__PURE__ */ jsxs35(Fragment10, { children: [
|
|
10489
|
+
/* @__PURE__ */ jsx47(
|
|
10145
10490
|
"footer",
|
|
10146
10491
|
{
|
|
10147
10492
|
ref,
|
|
@@ -10150,17 +10495,17 @@ var QuizFooter = forwardRef19(
|
|
|
10150
10495
|
className
|
|
10151
10496
|
),
|
|
10152
10497
|
...props,
|
|
10153
|
-
children: variant === "default" ? /* @__PURE__ */
|
|
10154
|
-
/* @__PURE__ */
|
|
10155
|
-
/* @__PURE__ */
|
|
10498
|
+
children: variant === "default" ? /* @__PURE__ */ jsxs35(Fragment10, { children: [
|
|
10499
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex flex-row items-center gap-1", children: [
|
|
10500
|
+
/* @__PURE__ */ jsx47(
|
|
10156
10501
|
IconButton_default,
|
|
10157
10502
|
{
|
|
10158
|
-
icon: /* @__PURE__ */
|
|
10503
|
+
icon: /* @__PURE__ */ jsx47(SquaresFour, { size: 24, className: "text-text-950" }),
|
|
10159
10504
|
size: "md",
|
|
10160
10505
|
onClick: () => setModalNavigateOpen(true)
|
|
10161
10506
|
}
|
|
10162
10507
|
),
|
|
10163
|
-
isFirstQuestion ? /* @__PURE__ */
|
|
10508
|
+
isFirstQuestion ? /* @__PURE__ */ jsx47(
|
|
10164
10509
|
Button_default,
|
|
10165
10510
|
{
|
|
10166
10511
|
variant: "outline",
|
|
@@ -10171,13 +10516,13 @@ var QuizFooter = forwardRef19(
|
|
|
10171
10516
|
},
|
|
10172
10517
|
children: "Pular"
|
|
10173
10518
|
}
|
|
10174
|
-
) : /* @__PURE__ */
|
|
10519
|
+
) : /* @__PURE__ */ jsx47(
|
|
10175
10520
|
Button_default,
|
|
10176
10521
|
{
|
|
10177
10522
|
size: "medium",
|
|
10178
10523
|
variant: "link",
|
|
10179
10524
|
action: "primary",
|
|
10180
|
-
iconLeft: /* @__PURE__ */
|
|
10525
|
+
iconLeft: /* @__PURE__ */ jsx47(CaretLeft3, { size: 18 }),
|
|
10181
10526
|
onClick: () => {
|
|
10182
10527
|
goToPreviousQuestion();
|
|
10183
10528
|
},
|
|
@@ -10185,7 +10530,7 @@ var QuizFooter = forwardRef19(
|
|
|
10185
10530
|
}
|
|
10186
10531
|
)
|
|
10187
10532
|
] }),
|
|
10188
|
-
!isFirstQuestion && !isLastQuestion && /* @__PURE__ */
|
|
10533
|
+
!isFirstQuestion && !isLastQuestion && /* @__PURE__ */ jsx47(
|
|
10189
10534
|
Button_default,
|
|
10190
10535
|
{
|
|
10191
10536
|
size: "small",
|
|
@@ -10198,7 +10543,7 @@ var QuizFooter = forwardRef19(
|
|
|
10198
10543
|
children: "Pular"
|
|
10199
10544
|
}
|
|
10200
10545
|
),
|
|
10201
|
-
isLastQuestion ? /* @__PURE__ */
|
|
10546
|
+
isLastQuestion ? /* @__PURE__ */ jsx47(
|
|
10202
10547
|
Button_default,
|
|
10203
10548
|
{
|
|
10204
10549
|
size: "medium",
|
|
@@ -10208,13 +10553,13 @@ var QuizFooter = forwardRef19(
|
|
|
10208
10553
|
onClick: handleFinishQuiz,
|
|
10209
10554
|
children: "Finalizar"
|
|
10210
10555
|
}
|
|
10211
|
-
) : /* @__PURE__ */
|
|
10556
|
+
) : /* @__PURE__ */ jsx47(
|
|
10212
10557
|
Button_default,
|
|
10213
10558
|
{
|
|
10214
10559
|
size: "medium",
|
|
10215
10560
|
variant: "link",
|
|
10216
10561
|
action: "primary",
|
|
10217
|
-
iconRight: /* @__PURE__ */
|
|
10562
|
+
iconRight: /* @__PURE__ */ jsx47(CaretRight5, { size: 18 }),
|
|
10218
10563
|
disabled: !currentAnswer && !isCurrentQuestionSkipped,
|
|
10219
10564
|
onClick: () => {
|
|
10220
10565
|
goToNextQuestion();
|
|
@@ -10222,7 +10567,7 @@ var QuizFooter = forwardRef19(
|
|
|
10222
10567
|
children: "Avan\xE7ar"
|
|
10223
10568
|
}
|
|
10224
10569
|
)
|
|
10225
|
-
] }) : /* @__PURE__ */
|
|
10570
|
+
] }) : /* @__PURE__ */ jsx47("div", { className: "flex flex-row items-center justify-end w-full", children: /* @__PURE__ */ jsx47(
|
|
10226
10571
|
Button_default,
|
|
10227
10572
|
{
|
|
10228
10573
|
variant: "solid",
|
|
@@ -10234,7 +10579,7 @@ var QuizFooter = forwardRef19(
|
|
|
10234
10579
|
) })
|
|
10235
10580
|
}
|
|
10236
10581
|
),
|
|
10237
|
-
/* @__PURE__ */
|
|
10582
|
+
/* @__PURE__ */ jsx47(
|
|
10238
10583
|
AlertDialog,
|
|
10239
10584
|
{
|
|
10240
10585
|
isOpen: alertDialogOpen,
|
|
@@ -10246,7 +10591,7 @@ var QuizFooter = forwardRef19(
|
|
|
10246
10591
|
onSubmit: handleAlertSubmit
|
|
10247
10592
|
}
|
|
10248
10593
|
),
|
|
10249
|
-
/* @__PURE__ */
|
|
10594
|
+
/* @__PURE__ */ jsx47(
|
|
10250
10595
|
Modal_default,
|
|
10251
10596
|
{
|
|
10252
10597
|
isOpen: modalResultOpen,
|
|
@@ -10255,11 +10600,11 @@ var QuizFooter = forwardRef19(
|
|
|
10255
10600
|
closeOnEscape: false,
|
|
10256
10601
|
hideCloseButton: true,
|
|
10257
10602
|
size: "md",
|
|
10258
|
-
children: /* @__PURE__ */
|
|
10259
|
-
resultImageComponent ? /* @__PURE__ */
|
|
10260
|
-
/* @__PURE__ */
|
|
10261
|
-
/* @__PURE__ */
|
|
10262
|
-
/* @__PURE__ */
|
|
10603
|
+
children: /* @__PURE__ */ jsxs35("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
|
|
10604
|
+
resultImageComponent ? /* @__PURE__ */ jsx47("div", { className: "w-[282px] h-auto", children: resultImageComponent }) : /* @__PURE__ */ jsx47("div", { className: "w-[282px] h-[200px] bg-gray-100 rounded-md flex items-center justify-center", children: /* @__PURE__ */ jsx47("span", { className: "text-gray-500 text-sm", children: "Imagem de resultado" }) }),
|
|
10605
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-2 text-center", children: [
|
|
10606
|
+
/* @__PURE__ */ jsx47("h2", { className: "text-text-950 font-bold text-lg", children: "Voc\xEA concluiu o simulado!" }),
|
|
10607
|
+
/* @__PURE__ */ jsxs35("p", { className: "text-text-500 font-sm", children: [
|
|
10263
10608
|
"Voc\xEA acertou",
|
|
10264
10609
|
" ",
|
|
10265
10610
|
getQuestionResultStatistics()?.correctAnswers ?? "--",
|
|
@@ -10269,8 +10614,8 @@ var QuizFooter = forwardRef19(
|
|
|
10269
10614
|
" quest\xF5es."
|
|
10270
10615
|
] })
|
|
10271
10616
|
] }),
|
|
10272
|
-
/* @__PURE__ */
|
|
10273
|
-
/* @__PURE__ */
|
|
10617
|
+
/* @__PURE__ */ jsxs35("div", { className: "px-6 flex flex-row items-center gap-2 w-full", children: [
|
|
10618
|
+
/* @__PURE__ */ jsx47(
|
|
10274
10619
|
Button_default,
|
|
10275
10620
|
{
|
|
10276
10621
|
variant: "outline",
|
|
@@ -10280,38 +10625,38 @@ var QuizFooter = forwardRef19(
|
|
|
10280
10625
|
children: "Ir para simulados"
|
|
10281
10626
|
}
|
|
10282
10627
|
),
|
|
10283
|
-
/* @__PURE__ */
|
|
10628
|
+
/* @__PURE__ */ jsx47(Button_default, { className: "w-full", onClick: onDetailResult, children: "Detalhar resultado" })
|
|
10284
10629
|
] })
|
|
10285
10630
|
] })
|
|
10286
10631
|
}
|
|
10287
10632
|
),
|
|
10288
|
-
/* @__PURE__ */
|
|
10633
|
+
/* @__PURE__ */ jsx47(
|
|
10289
10634
|
Modal_default,
|
|
10290
10635
|
{
|
|
10291
10636
|
isOpen: modalNavigateOpen,
|
|
10292
10637
|
onClose: () => setModalNavigateOpen(false),
|
|
10293
10638
|
title: "Quest\xF5es",
|
|
10294
10639
|
size: "lg",
|
|
10295
|
-
children: /* @__PURE__ */
|
|
10296
|
-
/* @__PURE__ */
|
|
10297
|
-
/* @__PURE__ */
|
|
10298
|
-
/* @__PURE__ */
|
|
10299
|
-
/* @__PURE__ */
|
|
10640
|
+
children: /* @__PURE__ */ jsxs35("div", { className: "flex flex-col w-full not-lg:h-[calc(100vh-200px)] lg:max-h-[687px] lg:h-[687px]", children: [
|
|
10641
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex flex-row justify-between items-center py-6 pt-6 pb-4 border-b border-border-200 flex-shrink-0", children: [
|
|
10642
|
+
/* @__PURE__ */ jsx47("p", { className: "text-text-950 font-bold text-lg", children: "Filtrar por" }),
|
|
10643
|
+
/* @__PURE__ */ jsx47("span", { className: "max-w-[266px]", children: /* @__PURE__ */ jsxs35(Select_default, { value: filterType, onValueChange: setFilterType, children: [
|
|
10644
|
+
/* @__PURE__ */ jsx47(
|
|
10300
10645
|
SelectTrigger,
|
|
10301
10646
|
{
|
|
10302
10647
|
variant: "rounded",
|
|
10303
10648
|
className: "max-w-[266px] min-w-[160px]",
|
|
10304
|
-
children: /* @__PURE__ */
|
|
10649
|
+
children: /* @__PURE__ */ jsx47(SelectValue, { placeholder: "Selecione uma op\xE7\xE3o" })
|
|
10305
10650
|
}
|
|
10306
10651
|
),
|
|
10307
|
-
/* @__PURE__ */
|
|
10308
|
-
/* @__PURE__ */
|
|
10309
|
-
/* @__PURE__ */
|
|
10310
|
-
/* @__PURE__ */
|
|
10652
|
+
/* @__PURE__ */ jsxs35(SelectContent, { children: [
|
|
10653
|
+
/* @__PURE__ */ jsx47(SelectItem, { value: "all", children: "Todas" }),
|
|
10654
|
+
/* @__PURE__ */ jsx47(SelectItem, { value: "unanswered", children: "Em branco" }),
|
|
10655
|
+
/* @__PURE__ */ jsx47(SelectItem, { value: "answered", children: "Respondidas" })
|
|
10311
10656
|
] })
|
|
10312
10657
|
] }) })
|
|
10313
10658
|
] }),
|
|
10314
|
-
/* @__PURE__ */
|
|
10659
|
+
/* @__PURE__ */ jsx47("div", { className: "flex flex-col gap-2 flex-1 min-h-0 overflow-y-auto", children: /* @__PURE__ */ jsx47(
|
|
10315
10660
|
QuizQuestionList,
|
|
10316
10661
|
{
|
|
10317
10662
|
filterType,
|
|
@@ -10321,7 +10666,7 @@ var QuizFooter = forwardRef19(
|
|
|
10321
10666
|
] })
|
|
10322
10667
|
}
|
|
10323
10668
|
),
|
|
10324
|
-
/* @__PURE__ */
|
|
10669
|
+
/* @__PURE__ */ jsx47(
|
|
10325
10670
|
Modal_default,
|
|
10326
10671
|
{
|
|
10327
10672
|
isOpen: modalResolutionOpen,
|
|
@@ -10339,32 +10684,32 @@ var QuizBadge = ({
|
|
|
10339
10684
|
}) => {
|
|
10340
10685
|
switch (subtype) {
|
|
10341
10686
|
case "PROVA" /* PROVA */:
|
|
10342
|
-
return /* @__PURE__ */
|
|
10687
|
+
return /* @__PURE__ */ jsx47(Badge_default, { variant: "examsOutlined", action: "exam2", "data-testid": "quiz-badge", children: "Prova" });
|
|
10343
10688
|
case "ENEM_PROVA_1" /* ENEM_PROVA_1 */:
|
|
10344
10689
|
case "ENEM_PROVA_2" /* ENEM_PROVA_2 */:
|
|
10345
|
-
return /* @__PURE__ */
|
|
10690
|
+
return /* @__PURE__ */ jsx47(Badge_default, { variant: "examsOutlined", action: "exam1", "data-testid": "quiz-badge", children: "Enem" });
|
|
10346
10691
|
case "VESTIBULAR" /* VESTIBULAR */:
|
|
10347
|
-
return /* @__PURE__ */
|
|
10692
|
+
return /* @__PURE__ */ jsx47(Badge_default, { variant: "examsOutlined", action: "exam4", "data-testid": "quiz-badge", children: "Vestibular" });
|
|
10348
10693
|
case "SIMULADO" /* SIMULADO */:
|
|
10349
10694
|
case "SIMULADAO" /* SIMULADAO */:
|
|
10350
10695
|
case void 0:
|
|
10351
|
-
return /* @__PURE__ */
|
|
10696
|
+
return /* @__PURE__ */ jsx47(Badge_default, { variant: "examsOutlined", action: "exam3", "data-testid": "quiz-badge", children: "Simulad\xE3o" });
|
|
10352
10697
|
default:
|
|
10353
|
-
return /* @__PURE__ */
|
|
10698
|
+
return /* @__PURE__ */ jsx47(Badge_default, { variant: "solid", action: "info", "data-testid": "quiz-badge", children: subtype });
|
|
10354
10699
|
}
|
|
10355
10700
|
};
|
|
10356
10701
|
var QuizResultHeaderTitle = forwardRef19(({ className, ...props }, ref) => {
|
|
10357
10702
|
const { getActiveQuiz } = useQuizStore();
|
|
10358
10703
|
const activeQuiz = getActiveQuiz();
|
|
10359
|
-
return /* @__PURE__ */
|
|
10704
|
+
return /* @__PURE__ */ jsxs35(
|
|
10360
10705
|
"div",
|
|
10361
10706
|
{
|
|
10362
10707
|
ref,
|
|
10363
10708
|
className: cn("flex flex-row pt-4 justify-between", className),
|
|
10364
10709
|
...props,
|
|
10365
10710
|
children: [
|
|
10366
|
-
/* @__PURE__ */
|
|
10367
|
-
/* @__PURE__ */
|
|
10711
|
+
/* @__PURE__ */ jsx47("p", { className: "text-text-950 font-bold text-2xl", children: "Resultado" }),
|
|
10712
|
+
/* @__PURE__ */ jsx47(QuizBadge, { subtype: activeQuiz?.quiz.subtype || void 0 })
|
|
10368
10713
|
]
|
|
10369
10714
|
}
|
|
10370
10715
|
);
|
|
@@ -10372,7 +10717,7 @@ var QuizResultHeaderTitle = forwardRef19(({ className, ...props }, ref) => {
|
|
|
10372
10717
|
var QuizResultTitle = forwardRef19(({ className, ...props }, ref) => {
|
|
10373
10718
|
const { getQuizTitle } = useQuizStore();
|
|
10374
10719
|
const quizTitle = getQuizTitle();
|
|
10375
|
-
return /* @__PURE__ */
|
|
10720
|
+
return /* @__PURE__ */ jsx47(
|
|
10376
10721
|
"p",
|
|
10377
10722
|
{
|
|
10378
10723
|
className: cn("pt-6 pb-4 text-text-950 font-bold text-lg", className),
|
|
@@ -10424,15 +10769,15 @@ var QuizResultPerformance = forwardRef19(
|
|
|
10424
10769
|
});
|
|
10425
10770
|
}
|
|
10426
10771
|
const percentage = totalQuestions > 0 ? Math.round(correctAnswers / totalQuestions * 100) : 0;
|
|
10427
|
-
return /* @__PURE__ */
|
|
10772
|
+
return /* @__PURE__ */ jsxs35(
|
|
10428
10773
|
"div",
|
|
10429
10774
|
{
|
|
10430
10775
|
className: "flex flex-row gap-6 p-6 rounded-xl bg-background justify-between",
|
|
10431
10776
|
ref,
|
|
10432
10777
|
...props,
|
|
10433
10778
|
children: [
|
|
10434
|
-
/* @__PURE__ */
|
|
10435
|
-
/* @__PURE__ */
|
|
10779
|
+
/* @__PURE__ */ jsxs35("div", { className: "relative", children: [
|
|
10780
|
+
/* @__PURE__ */ jsx47(
|
|
10436
10781
|
ProgressCircle_default,
|
|
10437
10782
|
{
|
|
10438
10783
|
size: "medium",
|
|
@@ -10442,24 +10787,24 @@ var QuizResultPerformance = forwardRef19(
|
|
|
10442
10787
|
label: ""
|
|
10443
10788
|
}
|
|
10444
10789
|
),
|
|
10445
|
-
/* @__PURE__ */
|
|
10446
|
-
/* @__PURE__ */
|
|
10447
|
-
/* @__PURE__ */
|
|
10448
|
-
/* @__PURE__ */
|
|
10790
|
+
/* @__PURE__ */ jsxs35("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
10791
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-1 mb-1", children: [
|
|
10792
|
+
/* @__PURE__ */ jsx47(Clock2, { size: 12, weight: "regular", className: "text-text-800" }),
|
|
10793
|
+
/* @__PURE__ */ jsx47("span", { className: "text-2xs font-medium text-text-800", children: formatTime2(
|
|
10449
10794
|
(getQuestionResultStatistics()?.timeSpent ?? 0) * 60
|
|
10450
10795
|
) })
|
|
10451
10796
|
] }),
|
|
10452
|
-
/* @__PURE__ */
|
|
10797
|
+
/* @__PURE__ */ jsxs35("div", { className: "text-2xl font-medium text-text-800 leading-7", children: [
|
|
10453
10798
|
getQuestionResultStatistics()?.correctAnswers ?? "--",
|
|
10454
10799
|
" de",
|
|
10455
10800
|
" ",
|
|
10456
10801
|
totalQuestions
|
|
10457
10802
|
] }),
|
|
10458
|
-
/* @__PURE__ */
|
|
10803
|
+
/* @__PURE__ */ jsx47("div", { className: "text-2xs font-medium text-text-600 mt-1", children: "Corretas" })
|
|
10459
10804
|
] })
|
|
10460
10805
|
] }),
|
|
10461
|
-
/* @__PURE__ */
|
|
10462
|
-
/* @__PURE__ */
|
|
10806
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-4 w-full", children: [
|
|
10807
|
+
/* @__PURE__ */ jsx47(
|
|
10463
10808
|
ProgressBar_default,
|
|
10464
10809
|
{
|
|
10465
10810
|
className: "w-full",
|
|
@@ -10473,7 +10818,7 @@ var QuizResultPerformance = forwardRef19(
|
|
|
10473
10818
|
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
10474
10819
|
}
|
|
10475
10820
|
),
|
|
10476
|
-
/* @__PURE__ */
|
|
10821
|
+
/* @__PURE__ */ jsx47(
|
|
10477
10822
|
ProgressBar_default,
|
|
10478
10823
|
{
|
|
10479
10824
|
className: "w-full",
|
|
@@ -10487,7 +10832,7 @@ var QuizResultPerformance = forwardRef19(
|
|
|
10487
10832
|
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
10488
10833
|
}
|
|
10489
10834
|
),
|
|
10490
|
-
/* @__PURE__ */
|
|
10835
|
+
/* @__PURE__ */ jsx47(
|
|
10491
10836
|
ProgressBar_default,
|
|
10492
10837
|
{
|
|
10493
10838
|
className: "w-full",
|
|
@@ -10534,9 +10879,9 @@ var QuizListResult = forwardRef19(({ className, onSubjectClick, ...props }, ref)
|
|
|
10534
10879
|
};
|
|
10535
10880
|
}
|
|
10536
10881
|
);
|
|
10537
|
-
return /* @__PURE__ */
|
|
10538
|
-
/* @__PURE__ */
|
|
10539
|
-
/* @__PURE__ */
|
|
10882
|
+
return /* @__PURE__ */ jsxs35("section", { ref, className, ...props, children: [
|
|
10883
|
+
/* @__PURE__ */ jsx47("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Mat\xE9rias" }),
|
|
10884
|
+
/* @__PURE__ */ jsx47("ul", { className: "flex flex-col gap-2", children: subjectsStats.map((subject) => /* @__PURE__ */ jsx47("li", { children: /* @__PURE__ */ jsx47(
|
|
10540
10885
|
CardResults,
|
|
10541
10886
|
{
|
|
10542
10887
|
onClick: () => onSubjectClick?.(subject.subject.id),
|
|
@@ -10558,16 +10903,16 @@ var QuizListResultByMateria = ({
|
|
|
10558
10903
|
const { getQuestionsGroupedBySubject, getQuestionIndex } = useQuizStore();
|
|
10559
10904
|
const groupedQuestions = getQuestionsGroupedBySubject();
|
|
10560
10905
|
const answeredQuestions = groupedQuestions[subject] || [];
|
|
10561
|
-
return /* @__PURE__ */
|
|
10562
|
-
/* @__PURE__ */
|
|
10563
|
-
/* @__PURE__ */
|
|
10564
|
-
/* @__PURE__ */
|
|
10565
|
-
/* @__PURE__ */
|
|
10906
|
+
return /* @__PURE__ */ jsxs35("div", { className: "flex flex-col", children: [
|
|
10907
|
+
/* @__PURE__ */ jsx47("div", { className: "flex flex-row pt-4 justify-between", children: /* @__PURE__ */ jsx47("p", { className: "text-text-950 font-bold text-2xl", children: answeredQuestions?.[0]?.knowledgeMatrix?.[0]?.subject?.name ?? "Sem mat\xE9ria" }) }),
|
|
10908
|
+
/* @__PURE__ */ jsxs35("section", { className: "flex flex-col ", children: [
|
|
10909
|
+
/* @__PURE__ */ jsx47("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Resultado das quest\xF5es" }),
|
|
10910
|
+
/* @__PURE__ */ jsx47("ul", { className: "flex flex-col gap-2 pt-4", children: answeredQuestions.map((question) => {
|
|
10566
10911
|
const questionIndex = getQuestionIndex(
|
|
10567
10912
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10568
10913
|
question.questionId ?? question.id
|
|
10569
10914
|
);
|
|
10570
|
-
return /* @__PURE__ */
|
|
10915
|
+
return /* @__PURE__ */ jsx47("li", { children: /* @__PURE__ */ jsx47(
|
|
10571
10916
|
CardStatus,
|
|
10572
10917
|
{
|
|
10573
10918
|
className: "max-w-full",
|
|
@@ -10591,11 +10936,11 @@ var QuizListResultByMateria = ({
|
|
|
10591
10936
|
|
|
10592
10937
|
// src/components/LoadingModal/loadingModal.tsx
|
|
10593
10938
|
import { forwardRef as forwardRef20 } from "react";
|
|
10594
|
-
import { jsx as
|
|
10939
|
+
import { jsx as jsx48, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
10595
10940
|
var LoadingModal = forwardRef20(
|
|
10596
10941
|
({ open, title = "Titulo...", subtitle = "Subtitulo...", ...props }, ref) => {
|
|
10597
10942
|
if (!open) return null;
|
|
10598
|
-
return /* @__PURE__ */
|
|
10943
|
+
return /* @__PURE__ */ jsx48(
|
|
10599
10944
|
"div",
|
|
10600
10945
|
{
|
|
10601
10946
|
ref,
|
|
@@ -10604,8 +10949,8 @@ var LoadingModal = forwardRef20(
|
|
|
10604
10949
|
"aria-describedby": "loading-modal-subtitle",
|
|
10605
10950
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-background/90 backdrop-blur-xs",
|
|
10606
10951
|
...props,
|
|
10607
|
-
children: /* @__PURE__ */
|
|
10608
|
-
/* @__PURE__ */
|
|
10952
|
+
children: /* @__PURE__ */ jsxs36("div", { className: "w-full max-w-[364px] flex flex-col items-center justify-center gap-14", children: [
|
|
10953
|
+
/* @__PURE__ */ jsx48("span", { className: "animate-spin", "aria-hidden": "true", children: /* @__PURE__ */ jsxs36(
|
|
10609
10954
|
"svg",
|
|
10610
10955
|
{
|
|
10611
10956
|
width: "102",
|
|
@@ -10616,14 +10961,14 @@ var LoadingModal = forwardRef20(
|
|
|
10616
10961
|
"aria-hidden": "true",
|
|
10617
10962
|
focusable: false,
|
|
10618
10963
|
children: [
|
|
10619
|
-
/* @__PURE__ */
|
|
10964
|
+
/* @__PURE__ */ jsx48(
|
|
10620
10965
|
"path",
|
|
10621
10966
|
{
|
|
10622
10967
|
d: "M101.5 51C101.5 78.8904 78.8904 101.5 51 101.5C23.1096 101.5 0.5 78.8904 0.5 51C0.5 23.1096 23.1096 0.5 51 0.5C78.8904 0.5 101.5 23.1096 101.5 51ZM8.62286 51C8.62286 74.4043 27.5957 93.3771 51 93.3771C74.4043 93.3771 93.3771 74.4043 93.3771 51C93.3771 27.5957 74.4043 8.62286 51 8.62286C27.5957 8.62286 8.62286 27.5957 8.62286 51Z",
|
|
10623
10968
|
className: "fill-primary-100"
|
|
10624
10969
|
}
|
|
10625
10970
|
),
|
|
10626
|
-
/* @__PURE__ */
|
|
10971
|
+
/* @__PURE__ */ jsx48(
|
|
10627
10972
|
"path",
|
|
10628
10973
|
{
|
|
10629
10974
|
d: "M97.4386 51C99.6816 51 101.517 52.8213 101.337 55.0571C100.754 62.2833 98.6212 69.3162 95.0643 75.6696C90.8444 83.207 84.7616 89.536 77.3975 94.0514C70.0333 98.5668 61.6339 101.118 53.0024 101.46C44.371 101.803 35.7959 99.9255 28.0971 96.0078C20.3982 92.0902 13.833 86.2631 9.02917 79.0838C4.22529 71.9045 1.34332 63.6129 0.658804 55.0017C-0.0257159 46.3906 1.51009 37.7479 5.1194 29.8997C8.16173 23.2845 12.5915 17.4202 18.0904 12.6959C19.7917 11.2341 22.3444 11.6457 23.6647 13.459C24.9851 15.2723 24.5702 17.7988 22.8916 19.2866C18.5048 23.1747 14.9608 27.9413 12.4992 33.2937C9.47048 39.8794 8.1817 47.132 8.75612 54.3581C9.33053 61.5841 11.7489 68.542 15.7801 74.5666C19.8113 80.5911 25.3205 85.4809 31.781 88.7684C38.2414 92.0559 45.4372 93.6312 52.6804 93.3438C59.9235 93.0564 66.9718 90.9158 73.1515 87.1267C79.3311 83.3375 84.4355 78.0266 87.9766 71.7015C90.8546 66.561 92.6217 60.8903 93.1827 55.0553C93.3973 52.8225 95.1955 51 97.4386 51Z",
|
|
@@ -10633,9 +10978,9 @@ var LoadingModal = forwardRef20(
|
|
|
10633
10978
|
]
|
|
10634
10979
|
}
|
|
10635
10980
|
) }),
|
|
10636
|
-
/* @__PURE__ */
|
|
10637
|
-
/* @__PURE__ */
|
|
10638
|
-
/* @__PURE__ */
|
|
10981
|
+
/* @__PURE__ */ jsxs36("span", { className: "flex flex-col gap-4 text-center", children: [
|
|
10982
|
+
/* @__PURE__ */ jsx48("p", { id: "loading-modal-title", className: "text-text-950 text-lg", children: title }),
|
|
10983
|
+
/* @__PURE__ */ jsx48("p", { id: "loading-modal-subtitle", className: "text-text-600 text-lg", children: subtitle })
|
|
10639
10984
|
] })
|
|
10640
10985
|
] })
|
|
10641
10986
|
}
|
|
@@ -10646,7 +10991,7 @@ var loadingModal_default = LoadingModal;
|
|
|
10646
10991
|
|
|
10647
10992
|
// src/components/NotificationCard/NotificationCard.tsx
|
|
10648
10993
|
import { DotsThreeVertical as DotsThreeVertical3, Bell as Bell2 } from "phosphor-react";
|
|
10649
|
-
import { useState as useState20, useEffect as
|
|
10994
|
+
import { useState as useState20, useEffect as useEffect19 } from "react";
|
|
10650
10995
|
|
|
10651
10996
|
// src/store/notificationStore.ts
|
|
10652
10997
|
import { create as create8 } from "zustand";
|
|
@@ -10893,14 +11238,14 @@ var createNotificationStore = (apiClient) => {
|
|
|
10893
11238
|
var mock_content_default = "./mock-content-K2CDVG6P.png";
|
|
10894
11239
|
|
|
10895
11240
|
// src/components/NotificationCard/NotificationCard.tsx
|
|
10896
|
-
import { Fragment as Fragment11, jsx as
|
|
11241
|
+
import { Fragment as Fragment11, jsx as jsx49, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
10897
11242
|
var NotificationEmpty = ({
|
|
10898
11243
|
emptyStateImage,
|
|
10899
11244
|
emptyStateTitle = "Nenhuma notifica\xE7\xE3o no momento",
|
|
10900
11245
|
emptyStateDescription = "Voc\xEA est\xE1 em dia com todas as novidades. Volte depois para conferir atualiza\xE7\xF5es!"
|
|
10901
11246
|
}) => {
|
|
10902
|
-
return /* @__PURE__ */
|
|
10903
|
-
emptyStateImage && /* @__PURE__ */
|
|
11247
|
+
return /* @__PURE__ */ jsxs37("div", { className: "flex flex-col items-center justify-center gap-4 p-6 w-full", children: [
|
|
11248
|
+
emptyStateImage && /* @__PURE__ */ jsx49("div", { className: "w-20 h-20 flex items-center justify-center", children: /* @__PURE__ */ jsx49(
|
|
10904
11249
|
"img",
|
|
10905
11250
|
{
|
|
10906
11251
|
src: emptyStateImage,
|
|
@@ -10910,23 +11255,23 @@ var NotificationEmpty = ({
|
|
|
10910
11255
|
className: "object-contain"
|
|
10911
11256
|
}
|
|
10912
11257
|
) }),
|
|
10913
|
-
/* @__PURE__ */
|
|
10914
|
-
/* @__PURE__ */
|
|
11258
|
+
/* @__PURE__ */ jsx49("h3", { className: "text-xl font-semibold text-text-950 text-center leading-[23px]", children: emptyStateTitle }),
|
|
11259
|
+
/* @__PURE__ */ jsx49("p", { className: "text-sm font-normal text-text-400 text-center max-w-[316px] leading-[21px]", children: emptyStateDescription })
|
|
10915
11260
|
] });
|
|
10916
11261
|
};
|
|
10917
11262
|
var NotificationHeader = ({
|
|
10918
11263
|
unreadCount,
|
|
10919
11264
|
variant = "modal"
|
|
10920
11265
|
}) => {
|
|
10921
|
-
return /* @__PURE__ */
|
|
10922
|
-
variant === "modal" ? /* @__PURE__ */
|
|
10923
|
-
unreadCount > 0 && /* @__PURE__ */
|
|
11266
|
+
return /* @__PURE__ */ jsxs37("div", { className: "flex items-center justify-between gap-2", children: [
|
|
11267
|
+
variant === "modal" ? /* @__PURE__ */ jsx49(Text_default, { size: "sm", weight: "bold", className: "text-text-950", children: "Notifica\xE7\xF5es" }) : /* @__PURE__ */ jsx49("h3", { className: "text-sm font-semibold text-text-950", children: "Notifica\xE7\xF5es" }),
|
|
11268
|
+
unreadCount > 0 && /* @__PURE__ */ jsx49(
|
|
10924
11269
|
Badge_default,
|
|
10925
11270
|
{
|
|
10926
11271
|
variant: "solid",
|
|
10927
11272
|
action: "info",
|
|
10928
11273
|
size: "small",
|
|
10929
|
-
iconLeft: /* @__PURE__ */
|
|
11274
|
+
iconLeft: /* @__PURE__ */ jsx49(Bell2, { size: 12, "aria-hidden": "true", focusable: "false" }),
|
|
10930
11275
|
className: "border-0",
|
|
10931
11276
|
children: unreadCount === 1 ? "1 n\xE3o lida" : `${unreadCount} n\xE3o lidas`
|
|
10932
11277
|
}
|
|
@@ -10962,7 +11307,7 @@ var SingleNotificationCard = ({
|
|
|
10962
11307
|
onNavigate();
|
|
10963
11308
|
}
|
|
10964
11309
|
};
|
|
10965
|
-
return /* @__PURE__ */
|
|
11310
|
+
return /* @__PURE__ */ jsxs37(
|
|
10966
11311
|
"div",
|
|
10967
11312
|
{
|
|
10968
11313
|
className: cn(
|
|
@@ -10971,20 +11316,20 @@ var SingleNotificationCard = ({
|
|
|
10971
11316
|
className
|
|
10972
11317
|
),
|
|
10973
11318
|
children: [
|
|
10974
|
-
/* @__PURE__ */
|
|
10975
|
-
!isRead && /* @__PURE__ */
|
|
10976
|
-
/* @__PURE__ */
|
|
10977
|
-
/* @__PURE__ */
|
|
10978
|
-
/* @__PURE__ */
|
|
11319
|
+
/* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-2 w-full", children: [
|
|
11320
|
+
!isRead && /* @__PURE__ */ jsx49("div", { className: "w-[7px] h-[7px] bg-info-300 rounded-full flex-shrink-0" }),
|
|
11321
|
+
/* @__PURE__ */ jsx49("h3", { className: "font-bold text-sm leading-4 text-text-950 flex-grow", children: title }),
|
|
11322
|
+
/* @__PURE__ */ jsxs37(DropdownMenu_default, { children: [
|
|
11323
|
+
/* @__PURE__ */ jsx49(
|
|
10979
11324
|
DropdownMenuTrigger,
|
|
10980
11325
|
{
|
|
10981
11326
|
className: "flex-shrink-0 inline-flex items-center justify-center font-medium bg-transparent text-text-950 cursor-pointer hover:bg-info-50 w-6 h-6 rounded-lg",
|
|
10982
11327
|
"aria-label": "Menu de a\xE7\xF5es",
|
|
10983
|
-
children: /* @__PURE__ */
|
|
11328
|
+
children: /* @__PURE__ */ jsx49(DotsThreeVertical3, { size: 24 })
|
|
10984
11329
|
}
|
|
10985
11330
|
),
|
|
10986
|
-
/* @__PURE__ */
|
|
10987
|
-
!isRead && /* @__PURE__ */
|
|
11331
|
+
/* @__PURE__ */ jsxs37(DropdownMenuContent, { align: "end", className: "min-w-[160px]", children: [
|
|
11332
|
+
!isRead && /* @__PURE__ */ jsx49(
|
|
10988
11333
|
DropdownMenuItem,
|
|
10989
11334
|
{
|
|
10990
11335
|
onClick: handleMarkAsRead,
|
|
@@ -10992,14 +11337,14 @@ var SingleNotificationCard = ({
|
|
|
10992
11337
|
children: "Marcar como lida"
|
|
10993
11338
|
}
|
|
10994
11339
|
),
|
|
10995
|
-
/* @__PURE__ */
|
|
11340
|
+
/* @__PURE__ */ jsx49(DropdownMenuItem, { onClick: handleDelete, className: "text-error-600", children: "Deletar" })
|
|
10996
11341
|
] })
|
|
10997
11342
|
] })
|
|
10998
11343
|
] }),
|
|
10999
|
-
/* @__PURE__ */
|
|
11000
|
-
/* @__PURE__ */
|
|
11001
|
-
/* @__PURE__ */
|
|
11002
|
-
onNavigate && actionLabel && /* @__PURE__ */
|
|
11344
|
+
/* @__PURE__ */ jsx49("p", { className: "text-sm leading-[21px] text-text-800 w-full", children: message }),
|
|
11345
|
+
/* @__PURE__ */ jsxs37("div", { className: "flex items-center justify-between w-full", children: [
|
|
11346
|
+
/* @__PURE__ */ jsx49("span", { className: "text-sm font-medium text-text-400", children: time }),
|
|
11347
|
+
onNavigate && actionLabel && /* @__PURE__ */ jsx49(
|
|
11003
11348
|
"button",
|
|
11004
11349
|
{
|
|
11005
11350
|
type: "button",
|
|
@@ -11039,9 +11384,9 @@ var NotificationList = ({
|
|
|
11039
11384
|
}
|
|
11040
11385
|
};
|
|
11041
11386
|
if (error) {
|
|
11042
|
-
return /* @__PURE__ */
|
|
11043
|
-
/* @__PURE__ */
|
|
11044
|
-
onRetry && /* @__PURE__ */
|
|
11387
|
+
return /* @__PURE__ */ jsxs37("div", { className: "flex flex-col items-center gap-4 p-6 w-full", children: [
|
|
11388
|
+
/* @__PURE__ */ jsx49("p", { className: "text-sm text-error-600", children: error }),
|
|
11389
|
+
onRetry && /* @__PURE__ */ jsx49(
|
|
11045
11390
|
"button",
|
|
11046
11391
|
{
|
|
11047
11392
|
type: "button",
|
|
@@ -11053,8 +11398,8 @@ var NotificationList = ({
|
|
|
11053
11398
|
] });
|
|
11054
11399
|
}
|
|
11055
11400
|
if (loading) {
|
|
11056
|
-
return /* @__PURE__ */
|
|
11057
|
-
(skeletonId) => /* @__PURE__ */
|
|
11401
|
+
return /* @__PURE__ */ jsx49("div", { className: "flex flex-col gap-0 w-full", children: ["skeleton-first", "skeleton-second", "skeleton-third"].map(
|
|
11402
|
+
(skeletonId) => /* @__PURE__ */ jsx49(
|
|
11058
11403
|
SkeletonCard,
|
|
11059
11404
|
{
|
|
11060
11405
|
className: "p-4 border-b border-border-200"
|
|
@@ -11064,11 +11409,11 @@ var NotificationList = ({
|
|
|
11064
11409
|
) });
|
|
11065
11410
|
}
|
|
11066
11411
|
if (!groupedNotifications || groupedNotifications.length === 0) {
|
|
11067
|
-
return renderEmpty ? /* @__PURE__ */
|
|
11412
|
+
return renderEmpty ? /* @__PURE__ */ jsx49("div", { className: "w-full", children: renderEmpty() }) : /* @__PURE__ */ jsx49(NotificationEmpty, {});
|
|
11068
11413
|
}
|
|
11069
|
-
return /* @__PURE__ */
|
|
11070
|
-
groupedNotifications.map((group, idx) => /* @__PURE__ */
|
|
11071
|
-
/* @__PURE__ */
|
|
11414
|
+
return /* @__PURE__ */ jsxs37("div", { className: cn("flex flex-col gap-0 w-full", className), children: [
|
|
11415
|
+
groupedNotifications.map((group, idx) => /* @__PURE__ */ jsxs37("div", { className: "flex flex-col", children: [
|
|
11416
|
+
/* @__PURE__ */ jsx49("div", { className: "flex items-end px-4 py-6 pb-4", children: /* @__PURE__ */ jsx49("h4", { className: "text-lg font-bold text-text-500 flex-grow", children: group.label }) }),
|
|
11072
11417
|
group.notifications.map((notification) => {
|
|
11073
11418
|
const isGlobalNotification = !notification.entityType && !notification.entityId && !notification.activity && !notification.goal;
|
|
11074
11419
|
let navigationHandler;
|
|
@@ -11088,7 +11433,7 @@ var NotificationList = ({
|
|
|
11088
11433
|
notification.entityType ?? void 0
|
|
11089
11434
|
);
|
|
11090
11435
|
}
|
|
11091
|
-
return /* @__PURE__ */
|
|
11436
|
+
return /* @__PURE__ */ jsx49(
|
|
11092
11437
|
SingleNotificationCard,
|
|
11093
11438
|
{
|
|
11094
11439
|
title: notification.title,
|
|
@@ -11104,7 +11449,7 @@ var NotificationList = ({
|
|
|
11104
11449
|
);
|
|
11105
11450
|
})
|
|
11106
11451
|
] }, `${group.label}-${idx}`)),
|
|
11107
|
-
/* @__PURE__ */
|
|
11452
|
+
/* @__PURE__ */ jsx49(
|
|
11108
11453
|
Modal_default,
|
|
11109
11454
|
{
|
|
11110
11455
|
isOpen: globalNotificationModal.isOpen,
|
|
@@ -11149,12 +11494,12 @@ var NotificationCenter = ({
|
|
|
11149
11494
|
const handleDesktopClick = () => {
|
|
11150
11495
|
onToggleActive?.();
|
|
11151
11496
|
};
|
|
11152
|
-
|
|
11497
|
+
useEffect19(() => {
|
|
11153
11498
|
if (isActive) {
|
|
11154
11499
|
onFetchNotifications?.();
|
|
11155
11500
|
}
|
|
11156
11501
|
}, [isActive, onFetchNotifications]);
|
|
11157
|
-
const renderEmptyState = () => /* @__PURE__ */
|
|
11502
|
+
const renderEmptyState = () => /* @__PURE__ */ jsx49(
|
|
11158
11503
|
NotificationEmpty,
|
|
11159
11504
|
{
|
|
11160
11505
|
emptyStateImage,
|
|
@@ -11163,17 +11508,17 @@ var NotificationCenter = ({
|
|
|
11163
11508
|
}
|
|
11164
11509
|
);
|
|
11165
11510
|
if (isMobile) {
|
|
11166
|
-
return /* @__PURE__ */
|
|
11167
|
-
/* @__PURE__ */
|
|
11511
|
+
return /* @__PURE__ */ jsxs37(Fragment11, { children: [
|
|
11512
|
+
/* @__PURE__ */ jsx49(
|
|
11168
11513
|
IconButton_default,
|
|
11169
11514
|
{
|
|
11170
11515
|
active: isModalOpen,
|
|
11171
11516
|
onClick: handleMobileClick,
|
|
11172
|
-
icon: /* @__PURE__ */
|
|
11517
|
+
icon: /* @__PURE__ */ jsx49(Bell2, { size: 24, className: "text-primary" }),
|
|
11173
11518
|
className
|
|
11174
11519
|
}
|
|
11175
11520
|
),
|
|
11176
|
-
/* @__PURE__ */
|
|
11521
|
+
/* @__PURE__ */ jsx49(
|
|
11177
11522
|
Modal_default,
|
|
11178
11523
|
{
|
|
11179
11524
|
isOpen: isModalOpen,
|
|
@@ -11182,10 +11527,10 @@ var NotificationCenter = ({
|
|
|
11182
11527
|
size: "md",
|
|
11183
11528
|
hideCloseButton: false,
|
|
11184
11529
|
closeOnEscape: true,
|
|
11185
|
-
children: /* @__PURE__ */
|
|
11186
|
-
/* @__PURE__ */
|
|
11187
|
-
/* @__PURE__ */
|
|
11188
|
-
unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */
|
|
11530
|
+
children: /* @__PURE__ */ jsxs37("div", { className: "flex flex-col h-full max-h-[80vh]", children: [
|
|
11531
|
+
/* @__PURE__ */ jsxs37("div", { className: "px-0 pb-3 border-b border-border-200", children: [
|
|
11532
|
+
/* @__PURE__ */ jsx49(NotificationHeader, { unreadCount, variant: "modal" }),
|
|
11533
|
+
unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */ jsx49(
|
|
11189
11534
|
"button",
|
|
11190
11535
|
{
|
|
11191
11536
|
type: "button",
|
|
@@ -11195,7 +11540,7 @@ var NotificationCenter = ({
|
|
|
11195
11540
|
}
|
|
11196
11541
|
)
|
|
11197
11542
|
] }),
|
|
11198
|
-
/* @__PURE__ */
|
|
11543
|
+
/* @__PURE__ */ jsx49("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx49(
|
|
11199
11544
|
NotificationList,
|
|
11200
11545
|
{
|
|
11201
11546
|
groupedNotifications,
|
|
@@ -11225,14 +11570,14 @@ var NotificationCenter = ({
|
|
|
11225
11570
|
)
|
|
11226
11571
|
] });
|
|
11227
11572
|
}
|
|
11228
|
-
return /* @__PURE__ */
|
|
11229
|
-
/* @__PURE__ */
|
|
11230
|
-
/* @__PURE__ */
|
|
11573
|
+
return /* @__PURE__ */ jsxs37(Fragment11, { children: [
|
|
11574
|
+
/* @__PURE__ */ jsxs37(DropdownMenu_default, { children: [
|
|
11575
|
+
/* @__PURE__ */ jsx49(DropdownMenuTrigger, { className: "text-primary cursor-pointer", children: /* @__PURE__ */ jsx49(
|
|
11231
11576
|
IconButton_default,
|
|
11232
11577
|
{
|
|
11233
11578
|
active: isActive,
|
|
11234
11579
|
onClick: handleDesktopClick,
|
|
11235
|
-
icon: /* @__PURE__ */
|
|
11580
|
+
icon: /* @__PURE__ */ jsx49(
|
|
11236
11581
|
Bell2,
|
|
11237
11582
|
{
|
|
11238
11583
|
size: 24,
|
|
@@ -11242,22 +11587,22 @@ var NotificationCenter = ({
|
|
|
11242
11587
|
className
|
|
11243
11588
|
}
|
|
11244
11589
|
) }),
|
|
11245
|
-
/* @__PURE__ */
|
|
11590
|
+
/* @__PURE__ */ jsx49(
|
|
11246
11591
|
DropdownMenuContent,
|
|
11247
11592
|
{
|
|
11248
11593
|
className: "min-w-[320px] max-w-[400px] max-h-[500px] overflow-hidden",
|
|
11249
11594
|
side: "bottom",
|
|
11250
11595
|
align: "end",
|
|
11251
|
-
children: /* @__PURE__ */
|
|
11252
|
-
/* @__PURE__ */
|
|
11253
|
-
/* @__PURE__ */
|
|
11596
|
+
children: /* @__PURE__ */ jsxs37("div", { className: "flex flex-col", children: [
|
|
11597
|
+
/* @__PURE__ */ jsxs37("div", { className: "px-4 py-3 border-b border-border-200", children: [
|
|
11598
|
+
/* @__PURE__ */ jsx49(
|
|
11254
11599
|
NotificationHeader,
|
|
11255
11600
|
{
|
|
11256
11601
|
unreadCount,
|
|
11257
11602
|
variant: "dropdown"
|
|
11258
11603
|
}
|
|
11259
11604
|
),
|
|
11260
|
-
unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */
|
|
11605
|
+
unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */ jsx49(
|
|
11261
11606
|
"button",
|
|
11262
11607
|
{
|
|
11263
11608
|
type: "button",
|
|
@@ -11267,7 +11612,7 @@ var NotificationCenter = ({
|
|
|
11267
11612
|
}
|
|
11268
11613
|
)
|
|
11269
11614
|
] }),
|
|
11270
|
-
/* @__PURE__ */
|
|
11615
|
+
/* @__PURE__ */ jsx49("div", { className: "max-h-[350px] overflow-y-auto", children: /* @__PURE__ */ jsx49(
|
|
11271
11616
|
NotificationList,
|
|
11272
11617
|
{
|
|
11273
11618
|
groupedNotifications,
|
|
@@ -11292,7 +11637,7 @@ var NotificationCenter = ({
|
|
|
11292
11637
|
}
|
|
11293
11638
|
)
|
|
11294
11639
|
] }),
|
|
11295
|
-
/* @__PURE__ */
|
|
11640
|
+
/* @__PURE__ */ jsx49(
|
|
11296
11641
|
Modal_default,
|
|
11297
11642
|
{
|
|
11298
11643
|
isOpen: globalNotificationModal.isOpen,
|
|
@@ -11311,7 +11656,7 @@ var NotificationCenter = ({
|
|
|
11311
11656
|
var NotificationCard = (props) => {
|
|
11312
11657
|
switch (props.mode) {
|
|
11313
11658
|
case "single":
|
|
11314
|
-
return /* @__PURE__ */
|
|
11659
|
+
return /* @__PURE__ */ jsx49(
|
|
11315
11660
|
SingleNotificationCard,
|
|
11316
11661
|
{
|
|
11317
11662
|
title: props.title,
|
|
@@ -11326,7 +11671,7 @@ var NotificationCard = (props) => {
|
|
|
11326
11671
|
}
|
|
11327
11672
|
);
|
|
11328
11673
|
case "list":
|
|
11329
|
-
return /* @__PURE__ */
|
|
11674
|
+
return /* @__PURE__ */ jsx49(
|
|
11330
11675
|
NotificationList,
|
|
11331
11676
|
{
|
|
11332
11677
|
groupedNotifications: props.groupedNotifications ?? (props.notifications ? [
|
|
@@ -11349,9 +11694,9 @@ var NotificationCard = (props) => {
|
|
|
11349
11694
|
}
|
|
11350
11695
|
);
|
|
11351
11696
|
case "center":
|
|
11352
|
-
return /* @__PURE__ */
|
|
11697
|
+
return /* @__PURE__ */ jsx49(NotificationCenter, { ...props });
|
|
11353
11698
|
default:
|
|
11354
|
-
return /* @__PURE__ */
|
|
11699
|
+
return /* @__PURE__ */ jsx49("div", { className: "flex flex-col items-center gap-4 p-6 w-full", children: /* @__PURE__ */ jsx49("p", { className: "text-sm text-text-600", children: "Modo de notifica\xE7\xE3o n\xE3o reconhecido" }) });
|
|
11355
11700
|
}
|
|
11356
11701
|
};
|
|
11357
11702
|
var NotificationCard_default = NotificationCard;
|
|
@@ -11568,6 +11913,8 @@ export {
|
|
|
11568
11913
|
SkeletonTable,
|
|
11569
11914
|
SkeletonText,
|
|
11570
11915
|
Stepper_default as Stepper,
|
|
11916
|
+
SubjectEnum,
|
|
11917
|
+
SubjectInfo,
|
|
11571
11918
|
Table_default as Table,
|
|
11572
11919
|
Text_default as Text,
|
|
11573
11920
|
TextArea_default as TextArea,
|
|
@@ -11585,6 +11932,10 @@ export {
|
|
|
11585
11932
|
getDeviceType,
|
|
11586
11933
|
getRootDomain,
|
|
11587
11934
|
getStatusBadge,
|
|
11935
|
+
getSubjectColorClass,
|
|
11936
|
+
getSubjectData,
|
|
11937
|
+
getSubjectIcon,
|
|
11938
|
+
getSubjectName,
|
|
11588
11939
|
useApiConfig,
|
|
11589
11940
|
useAuth,
|
|
11590
11941
|
useAuthGuard,
|