analytica-frontend-lib 1.0.83 → 1.0.85
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 +163 -74
- package/dist/Accordation/index.js.map +1 -1
- package/dist/Accordation/index.mjs +163 -74
- package/dist/Accordation/index.mjs.map +1 -1
- package/dist/Alert/index.js +32 -32
- package/dist/Alert/index.js.map +1 -1
- package/dist/Alert/index.mjs +32 -32
- package/dist/Alert/index.mjs.map +1 -1
- package/dist/AlertDialog/index.js +13 -2
- package/dist/AlertDialog/index.js.map +1 -1
- package/dist/AlertDialog/index.mjs +13 -2
- package/dist/AlertDialog/index.mjs.map +1 -1
- package/dist/Alternative/index.js +86 -25
- package/dist/Alternative/index.js.map +1 -1
- package/dist/Alternative/index.mjs +86 -25
- package/dist/Alternative/index.mjs.map +1 -1
- package/dist/Badge/index.js +13 -4
- package/dist/Badge/index.js.map +1 -1
- package/dist/Badge/index.mjs +13 -4
- package/dist/Badge/index.mjs.map +1 -1
- package/dist/Button/index.js +10 -1
- package/dist/Button/index.js.map +1 -1
- package/dist/Button/index.mjs +8 -1
- package/dist/Button/index.mjs.map +1 -1
- package/dist/Calendar/index.js +11 -2
- package/dist/Calendar/index.js.map +1 -1
- package/dist/Calendar/index.mjs +11 -2
- package/dist/Calendar/index.mjs.map +1 -1
- package/dist/Card/index.js +154 -71
- package/dist/Card/index.js.map +1 -1
- package/dist/Card/index.mjs +154 -71
- package/dist/Card/index.mjs.map +1 -1
- package/dist/CheckBox/index.js +28 -5
- package/dist/CheckBox/index.js.map +1 -1
- package/dist/CheckBox/index.mjs +28 -5
- package/dist/CheckBox/index.mjs.map +1 -1
- package/dist/Chips/index.js +10 -1
- package/dist/Chips/index.js.map +1 -1
- package/dist/Chips/index.mjs +10 -1
- package/dist/Chips/index.mjs.map +1 -1
- package/dist/Divider/index.js +10 -1
- package/dist/Divider/index.js.map +1 -1
- package/dist/Divider/index.mjs +8 -1
- package/dist/Divider/index.mjs.map +1 -1
- package/dist/DropdownMenu/index.js +18 -22
- package/dist/DropdownMenu/index.js.map +1 -1
- package/dist/DropdownMenu/index.mjs +18 -22
- package/dist/DropdownMenu/index.mjs.map +1 -1
- package/dist/IconButton/index.js +10 -1
- package/dist/IconButton/index.js.map +1 -1
- package/dist/IconButton/index.mjs +10 -1
- package/dist/IconButton/index.mjs.map +1 -1
- package/dist/IconRoundedButton/index.js +10 -1
- package/dist/IconRoundedButton/index.js.map +1 -1
- package/dist/IconRoundedButton/index.mjs +8 -1
- package/dist/IconRoundedButton/index.mjs.map +1 -1
- package/dist/Menu/index.js +22 -10
- package/dist/Menu/index.js.map +1 -1
- package/dist/Menu/index.mjs +22 -10
- package/dist/Menu/index.mjs.map +1 -1
- package/dist/Modal/index.js +15 -1
- package/dist/Modal/index.js.map +1 -1
- package/dist/Modal/index.mjs +15 -1
- package/dist/Modal/index.mjs.map +1 -1
- package/dist/NavButton/index.js +10 -1
- package/dist/NavButton/index.js.map +1 -1
- package/dist/NavButton/index.mjs +10 -1
- package/dist/NavButton/index.mjs.map +1 -1
- package/dist/NotFound/index.js +13 -3
- package/dist/NotFound/index.js.map +1 -1
- package/dist/NotFound/index.mjs +13 -3
- package/dist/NotFound/index.mjs.map +1 -1
- package/dist/ProgressBar/index.js +63 -15
- package/dist/ProgressBar/index.js.map +1 -1
- package/dist/ProgressBar/index.mjs +63 -15
- package/dist/ProgressBar/index.mjs.map +1 -1
- package/dist/ProgressCircle/index.js +34 -7
- package/dist/ProgressCircle/index.js.map +1 -1
- package/dist/ProgressCircle/index.mjs +34 -7
- package/dist/ProgressCircle/index.mjs.map +1 -1
- package/dist/Quiz/index.d.mts +25 -2
- package/dist/Quiz/index.d.ts +25 -2
- package/dist/Quiz/index.js +972 -260
- package/dist/Quiz/index.js.map +1 -1
- package/dist/Quiz/index.mjs +968 -261
- package/dist/Quiz/index.mjs.map +1 -1
- package/dist/Quiz/useQuizStore/index.d.mts +44 -12
- package/dist/Quiz/useQuizStore/index.d.ts +44 -12
- package/dist/Quiz/useQuizStore/index.js +206 -85
- package/dist/Quiz/useQuizStore/index.js.map +1 -1
- package/dist/Quiz/useQuizStore/index.mjs +203 -85
- package/dist/Quiz/useQuizStore/index.mjs.map +1 -1
- package/dist/Radio/index.js +36 -6
- package/dist/Radio/index.js.map +1 -1
- package/dist/Radio/index.mjs +36 -6
- package/dist/Radio/index.mjs.map +1 -1
- package/dist/Select/index.js +20 -4
- package/dist/Select/index.js.map +1 -1
- package/dist/Select/index.mjs +20 -4
- package/dist/Select/index.mjs.map +1 -1
- package/dist/SelectionButton/index.js +10 -1
- package/dist/SelectionButton/index.js.map +1 -1
- package/dist/SelectionButton/index.mjs +10 -1
- package/dist/SelectionButton/index.mjs.map +1 -1
- package/dist/Skeleton/index.js +18 -6
- package/dist/Skeleton/index.js.map +1 -1
- package/dist/Skeleton/index.mjs +18 -6
- package/dist/Skeleton/index.mjs.map +1 -1
- package/dist/Stepper/index.js +27 -18
- package/dist/Stepper/index.js.map +1 -1
- package/dist/Stepper/index.mjs +27 -18
- package/dist/Stepper/index.mjs.map +1 -1
- package/dist/Table/index.js +37 -13
- package/dist/Table/index.js.map +1 -1
- package/dist/Table/index.mjs +37 -13
- package/dist/Table/index.mjs.map +1 -1
- package/dist/Text/index.js +10 -1
- package/dist/Text/index.js.map +1 -1
- package/dist/Text/index.mjs +8 -1
- package/dist/Text/index.mjs.map +1 -1
- package/dist/TextArea/index.js +17 -3
- package/dist/TextArea/index.js.map +1 -1
- package/dist/TextArea/index.mjs +17 -3
- package/dist/TextArea/index.mjs.map +1 -1
- package/dist/Toast/Toaster/index.js +15 -1
- package/dist/Toast/Toaster/index.js.map +1 -1
- package/dist/Toast/Toaster/index.mjs +15 -1
- package/dist/Toast/Toaster/index.mjs.map +1 -1
- package/dist/Toast/index.js +15 -1
- package/dist/Toast/index.js.map +1 -1
- package/dist/Toast/index.mjs +15 -1
- package/dist/Toast/index.mjs.map +1 -1
- package/dist/index.css +8 -9
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +903 -325
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +901 -326
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +8 -9
- package/dist/styles.css.map +1 -1
- package/package.json +3 -1
package/dist/index.js
CHANGED
|
@@ -70,7 +70,11 @@ __export(src_exports, {
|
|
|
70
70
|
QuizContent: () => QuizContent,
|
|
71
71
|
QuizFooter: () => QuizFooter,
|
|
72
72
|
QuizHeader: () => QuizHeader,
|
|
73
|
+
QuizListResultByMateria: () => QuizListResultByMateria,
|
|
73
74
|
QuizQuestionList: () => QuizQuestionList,
|
|
75
|
+
QuizResultHeaderTitle: () => QuizResultHeaderTitle,
|
|
76
|
+
QuizResultPerformance: () => QuizResultPerformance,
|
|
77
|
+
QuizResultTitle: () => QuizResultTitle,
|
|
74
78
|
QuizTitle: () => QuizTitle,
|
|
75
79
|
Radio: () => Radio_default,
|
|
76
80
|
RadioGroup: () => RadioGroup,
|
|
@@ -108,6 +112,13 @@ __export(src_exports, {
|
|
|
108
112
|
});
|
|
109
113
|
module.exports = __toCommonJS(src_exports);
|
|
110
114
|
|
|
115
|
+
// src/utils/utils.ts
|
|
116
|
+
var import_clsx = require("clsx");
|
|
117
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
118
|
+
function cn(...inputs) {
|
|
119
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
120
|
+
}
|
|
121
|
+
|
|
111
122
|
// src/components/Text/Text.tsx
|
|
112
123
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
113
124
|
var Text = ({
|
|
@@ -151,7 +162,7 @@ var Text = ({
|
|
|
151
162
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
152
163
|
Component,
|
|
153
164
|
{
|
|
154
|
-
className:
|
|
165
|
+
className: cn(baseClasses, sizeClasses, weightClasses, color, className),
|
|
155
166
|
...props,
|
|
156
167
|
children
|
|
157
168
|
}
|
|
@@ -203,7 +214,7 @@ var Button = ({
|
|
|
203
214
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
204
215
|
"button",
|
|
205
216
|
{
|
|
206
|
-
className:
|
|
217
|
+
className: cn(baseClasses, variantClasses, sizeClasses, className),
|
|
207
218
|
disabled,
|
|
208
219
|
type,
|
|
209
220
|
...props,
|
|
@@ -284,7 +295,7 @@ var Badge = ({
|
|
|
284
295
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
285
296
|
"div",
|
|
286
297
|
{
|
|
287
|
-
className:
|
|
298
|
+
className: cn(baseClasses, variantClasses, sizeClasses, className),
|
|
288
299
|
...props,
|
|
289
300
|
children: [
|
|
290
301
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_phosphor_react.Bell, { size: 24, className: "text-current", "aria-hidden": "true" }),
|
|
@@ -302,12 +313,12 @@ var Badge = ({
|
|
|
302
313
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
303
314
|
"div",
|
|
304
315
|
{
|
|
305
|
-
className:
|
|
316
|
+
className: cn(baseClasses, variantClasses, sizeClasses, className),
|
|
306
317
|
...props,
|
|
307
318
|
children: [
|
|
308
|
-
iconLeft && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className:
|
|
319
|
+
iconLeft && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconLeft }),
|
|
309
320
|
children,
|
|
310
|
-
iconRight && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className:
|
|
321
|
+
iconRight && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconRight })
|
|
311
322
|
]
|
|
312
323
|
}
|
|
313
324
|
);
|
|
@@ -360,37 +371,30 @@ var Alert = ({
|
|
|
360
371
|
const variantColor = COLOR_CLASSES[action];
|
|
361
372
|
const variantIcon = ICONS[action];
|
|
362
373
|
const hasHeading = Boolean(title);
|
|
363
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
364
|
-
"
|
|
365
|
-
{
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
children: description
|
|
388
|
-
}
|
|
389
|
-
)
|
|
390
|
-
] })
|
|
391
|
-
]
|
|
392
|
-
}
|
|
393
|
-
);
|
|
374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: cn(baseClasses, variantClasses, className), ...props, children: [
|
|
375
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: cn("mt-0.5", variantColor), children: variantIcon }),
|
|
376
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { children: [
|
|
377
|
+
hasHeading && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
378
|
+
Text_default,
|
|
379
|
+
{
|
|
380
|
+
size: "md",
|
|
381
|
+
weight: "medium",
|
|
382
|
+
color: variantColor,
|
|
383
|
+
className: "mb-0.5",
|
|
384
|
+
children: title
|
|
385
|
+
}
|
|
386
|
+
),
|
|
387
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
388
|
+
Text_default,
|
|
389
|
+
{
|
|
390
|
+
size: hasHeading ? "sm" : "md",
|
|
391
|
+
weight: "normal",
|
|
392
|
+
color: !hasHeading ? variantColor : "text-text-700",
|
|
393
|
+
children: description
|
|
394
|
+
}
|
|
395
|
+
)
|
|
396
|
+
] })
|
|
397
|
+
] });
|
|
394
398
|
};
|
|
395
399
|
var Alert_default = Alert;
|
|
396
400
|
|
|
@@ -434,7 +438,7 @@ var IconButton = (0, import_react.forwardRef)(
|
|
|
434
438
|
{
|
|
435
439
|
ref,
|
|
436
440
|
type: "button",
|
|
437
|
-
className:
|
|
441
|
+
className: cn(allClasses, className),
|
|
438
442
|
disabled,
|
|
439
443
|
"aria-pressed": active,
|
|
440
444
|
"aria-label": ariaLabel,
|
|
@@ -480,7 +484,7 @@ var IconRoundedButton = ({
|
|
|
480
484
|
"button",
|
|
481
485
|
{
|
|
482
486
|
type: "button",
|
|
483
|
-
className:
|
|
487
|
+
className: cn(baseClasses, className),
|
|
484
488
|
disabled,
|
|
485
489
|
...props,
|
|
486
490
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "flex items-center justify-center w-5 h-5", children: icon })
|
|
@@ -524,7 +528,7 @@ var NavButton = (0, import_react2.forwardRef)(
|
|
|
524
528
|
{
|
|
525
529
|
ref,
|
|
526
530
|
type: "button",
|
|
527
|
-
className:
|
|
531
|
+
className: cn(allClasses, className),
|
|
528
532
|
disabled,
|
|
529
533
|
"aria-pressed": selected,
|
|
530
534
|
...props,
|
|
@@ -579,7 +583,7 @@ var SelectionButton = (0, import_react3.forwardRef)(
|
|
|
579
583
|
{
|
|
580
584
|
ref,
|
|
581
585
|
type: "button",
|
|
582
|
-
className:
|
|
586
|
+
className: cn(allClasses, className),
|
|
583
587
|
disabled,
|
|
584
588
|
"aria-pressed": selected,
|
|
585
589
|
...props,
|
|
@@ -602,7 +606,7 @@ var Table = (0, import_react4.forwardRef)(
|
|
|
602
606
|
"table",
|
|
603
607
|
{
|
|
604
608
|
ref,
|
|
605
|
-
className:
|
|
609
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
606
610
|
...props,
|
|
607
611
|
children: [
|
|
608
612
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("caption", { className: "sr-only", children: "My Table" }),
|
|
@@ -616,7 +620,7 @@ var TableHeader = (0, import_react4.forwardRef)(({ className, ...props }, ref) =
|
|
|
616
620
|
"thead",
|
|
617
621
|
{
|
|
618
622
|
ref,
|
|
619
|
-
className:
|
|
623
|
+
className: cn("[&_tr:first-child]:border-0", className),
|
|
620
624
|
...props
|
|
621
625
|
}
|
|
622
626
|
));
|
|
@@ -625,7 +629,10 @@ var TableBody = (0, import_react4.forwardRef)(({ className, ...props }, ref) =>
|
|
|
625
629
|
"tbody",
|
|
626
630
|
{
|
|
627
631
|
ref,
|
|
628
|
-
className:
|
|
632
|
+
className: cn(
|
|
633
|
+
"[&_tr:last-child]:border-0 border-t border-border-200",
|
|
634
|
+
className
|
|
635
|
+
),
|
|
629
636
|
...props
|
|
630
637
|
}
|
|
631
638
|
));
|
|
@@ -634,7 +641,10 @@ var TableFooter = (0, import_react4.forwardRef)(({ className, ...props }, ref) =
|
|
|
634
641
|
"tfoot",
|
|
635
642
|
{
|
|
636
643
|
ref,
|
|
637
|
-
className:
|
|
644
|
+
className: cn(
|
|
645
|
+
"border-t bg-background-50 border-border-200 font-medium [&>tr]:last:border-b-0 px-6 py-3.5",
|
|
646
|
+
className
|
|
647
|
+
),
|
|
638
648
|
...props
|
|
639
649
|
}
|
|
640
650
|
));
|
|
@@ -651,12 +661,12 @@ var TableRow = (0, import_react4.forwardRef)(
|
|
|
651
661
|
"tr",
|
|
652
662
|
{
|
|
653
663
|
ref,
|
|
654
|
-
className:
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
664
|
+
className: cn(
|
|
665
|
+
"transition-colors",
|
|
666
|
+
state !== "disabled" ? "hover:bg-muted/50" : "",
|
|
667
|
+
VARIANT_STATES_ROW[state],
|
|
668
|
+
className
|
|
669
|
+
),
|
|
660
670
|
"aria-disabled": state === "disabled",
|
|
661
671
|
...props
|
|
662
672
|
}
|
|
@@ -668,7 +678,10 @@ var TableHead = (0, import_react4.forwardRef)(({ className, ...props }, ref) =>
|
|
|
668
678
|
"th",
|
|
669
679
|
{
|
|
670
680
|
ref,
|
|
671
|
-
className:
|
|
681
|
+
className: cn(
|
|
682
|
+
"h-10 px-6 py-3.5 bg-muted/50 text-left align-middle font-bold text-text-800 [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
683
|
+
className
|
|
684
|
+
),
|
|
672
685
|
...props
|
|
673
686
|
}
|
|
674
687
|
));
|
|
@@ -677,7 +690,10 @@ var TableCell = (0, import_react4.forwardRef)(({ className, ...props }, ref) =>
|
|
|
677
690
|
"td",
|
|
678
691
|
{
|
|
679
692
|
ref,
|
|
680
|
-
className:
|
|
693
|
+
className: cn(
|
|
694
|
+
"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-md text-text-800 px-6 py-3.5",
|
|
695
|
+
className
|
|
696
|
+
),
|
|
681
697
|
...props
|
|
682
698
|
}
|
|
683
699
|
));
|
|
@@ -686,7 +702,10 @@ var TableCaption = (0, import_react4.forwardRef)(({ className, ...props }, ref)
|
|
|
686
702
|
"caption",
|
|
687
703
|
{
|
|
688
704
|
ref,
|
|
689
|
-
className:
|
|
705
|
+
className: cn(
|
|
706
|
+
"border-t border-border-200 text-sm text-text-800 px-6 py-3.5",
|
|
707
|
+
className
|
|
708
|
+
),
|
|
690
709
|
...props
|
|
691
710
|
}
|
|
692
711
|
));
|
|
@@ -788,7 +807,13 @@ var CheckBox = (0, import_react5.forwardRef)(
|
|
|
788
807
|
const checkVariant = checked || indeterminate ? "checked" : "unchecked";
|
|
789
808
|
const stylingClasses = STATE_CLASSES[currentState][checkVariant];
|
|
790
809
|
const borderWidthClass = state === "focused" || state === "hovered" && size === "large" ? "border-[3px]" : sizeClasses.borderWidth;
|
|
791
|
-
const checkboxClasses =
|
|
810
|
+
const checkboxClasses = cn(
|
|
811
|
+
BASE_CHECKBOX_CLASSES,
|
|
812
|
+
sizeClasses.checkbox,
|
|
813
|
+
borderWidthClass,
|
|
814
|
+
stylingClasses,
|
|
815
|
+
className
|
|
816
|
+
);
|
|
792
817
|
const renderIcon = () => {
|
|
793
818
|
if (indeterminate) {
|
|
794
819
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
@@ -816,7 +841,11 @@ var CheckBox = (0, import_react5.forwardRef)(
|
|
|
816
841
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
817
842
|
"div",
|
|
818
843
|
{
|
|
819
|
-
className:
|
|
844
|
+
className: cn(
|
|
845
|
+
"flex flex-row items-center",
|
|
846
|
+
sizeClasses.spacing,
|
|
847
|
+
disabled ? "opacity-40" : ""
|
|
848
|
+
),
|
|
820
849
|
children: [
|
|
821
850
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
822
851
|
"input",
|
|
@@ -835,7 +864,10 @@ var CheckBox = (0, import_react5.forwardRef)(
|
|
|
835
864
|
label && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
836
865
|
"div",
|
|
837
866
|
{
|
|
838
|
-
className:
|
|
867
|
+
className: cn(
|
|
868
|
+
"flex flex-row items-center",
|
|
869
|
+
sizeClasses.labelHeight
|
|
870
|
+
),
|
|
839
871
|
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
840
872
|
Text_default,
|
|
841
873
|
{
|
|
@@ -843,7 +875,10 @@ var CheckBox = (0, import_react5.forwardRef)(
|
|
|
843
875
|
htmlFor: inputId,
|
|
844
876
|
size: sizeClasses.textSize,
|
|
845
877
|
weight: "normal",
|
|
846
|
-
className:
|
|
878
|
+
className: cn(
|
|
879
|
+
"cursor-pointer select-none leading-[150%] flex items-center font-roboto",
|
|
880
|
+
labelClassName
|
|
881
|
+
),
|
|
847
882
|
children: label
|
|
848
883
|
}
|
|
849
884
|
)
|
|
@@ -993,8 +1028,19 @@ var Radio = (0, import_react6.forwardRef)(
|
|
|
993
1028
|
return sizeClasses.borderWidth;
|
|
994
1029
|
};
|
|
995
1030
|
const borderWidthClass = getBorderWidth();
|
|
996
|
-
const radioClasses =
|
|
997
|
-
|
|
1031
|
+
const radioClasses = cn(
|
|
1032
|
+
BASE_RADIO_CLASSES,
|
|
1033
|
+
actualRadioSize,
|
|
1034
|
+
borderWidthClass,
|
|
1035
|
+
stylingClasses,
|
|
1036
|
+
className
|
|
1037
|
+
);
|
|
1038
|
+
const dotClasses = cn(
|
|
1039
|
+
actualDotSize,
|
|
1040
|
+
"rounded-full",
|
|
1041
|
+
DOT_CLASSES[currentState],
|
|
1042
|
+
"transition-all duration-200"
|
|
1043
|
+
);
|
|
998
1044
|
const isWrapperNeeded = currentState === "focused" || currentState === "invalid";
|
|
999
1045
|
const wrapperBorderColor = currentState === "focused" ? "border-indicator-info" : "border-indicator-error";
|
|
1000
1046
|
const getTextColor = () => {
|
|
@@ -1013,7 +1059,11 @@ var Radio = (0, import_react6.forwardRef)(
|
|
|
1013
1059
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
1014
1060
|
"div",
|
|
1015
1061
|
{
|
|
1016
|
-
className:
|
|
1062
|
+
className: cn(
|
|
1063
|
+
"flex flex-row items-center",
|
|
1064
|
+
isWrapperNeeded ? cn("p-1 border-2", wrapperBorderColor, "rounded-lg gap-1.5") : sizeClasses.spacing,
|
|
1065
|
+
disabled ? "opacity-40" : ""
|
|
1066
|
+
),
|
|
1017
1067
|
children: [
|
|
1018
1068
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1019
1069
|
"input",
|
|
@@ -1070,7 +1120,11 @@ var Radio = (0, import_react6.forwardRef)(
|
|
|
1070
1120
|
label && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1071
1121
|
"div",
|
|
1072
1122
|
{
|
|
1073
|
-
className:
|
|
1123
|
+
className: cn(
|
|
1124
|
+
"flex flex-row items-center",
|
|
1125
|
+
sizeClasses.labelHeight,
|
|
1126
|
+
"flex-1 min-w-0"
|
|
1127
|
+
),
|
|
1074
1128
|
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1075
1129
|
Text_default,
|
|
1076
1130
|
{
|
|
@@ -1078,7 +1132,11 @@ var Radio = (0, import_react6.forwardRef)(
|
|
|
1078
1132
|
htmlFor: inputId,
|
|
1079
1133
|
size: sizeClasses.textSize,
|
|
1080
1134
|
weight: "normal",
|
|
1081
|
-
className:
|
|
1135
|
+
className: cn(
|
|
1136
|
+
getCursorClass(),
|
|
1137
|
+
"select-none leading-normal flex items-center font-roboto truncate",
|
|
1138
|
+
labelClassName
|
|
1139
|
+
),
|
|
1082
1140
|
color: getTextColor(),
|
|
1083
1141
|
children: label
|
|
1084
1142
|
}
|
|
@@ -1326,7 +1384,14 @@ var TextArea = (0, import_react7.forwardRef)(
|
|
|
1326
1384
|
}
|
|
1327
1385
|
const sizeClasses = SIZE_CLASSES5[size];
|
|
1328
1386
|
const stateClasses = STATE_CLASSES3[currentState];
|
|
1329
|
-
const textareaClasses =
|
|
1387
|
+
const textareaClasses = cn(
|
|
1388
|
+
BASE_TEXTAREA_CLASSES,
|
|
1389
|
+
sizeClasses.textarea,
|
|
1390
|
+
stateClasses.base,
|
|
1391
|
+
stateClasses.hover,
|
|
1392
|
+
stateClasses.focus,
|
|
1393
|
+
className
|
|
1394
|
+
);
|
|
1330
1395
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: `flex flex-col`, children: [
|
|
1331
1396
|
label && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1332
1397
|
Text_default,
|
|
@@ -1336,7 +1401,7 @@ var TextArea = (0, import_react7.forwardRef)(
|
|
|
1336
1401
|
size: sizeClasses.textSize,
|
|
1337
1402
|
weight: "medium",
|
|
1338
1403
|
color: "text-text-950",
|
|
1339
|
-
className:
|
|
1404
|
+
className: cn("mb-1.5", labelClassName),
|
|
1340
1405
|
children: label
|
|
1341
1406
|
}
|
|
1342
1407
|
),
|
|
@@ -1414,7 +1479,12 @@ var Toast = ({
|
|
|
1414
1479
|
role: "alert",
|
|
1415
1480
|
"aria-live": "assertive",
|
|
1416
1481
|
"aria-atomic": "true",
|
|
1417
|
-
className:
|
|
1482
|
+
className: cn(
|
|
1483
|
+
baseClasses,
|
|
1484
|
+
positionClasses[position],
|
|
1485
|
+
variantClasses,
|
|
1486
|
+
className
|
|
1487
|
+
),
|
|
1418
1488
|
...props,
|
|
1419
1489
|
children: [
|
|
1420
1490
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-row items-start gap-3", children: [
|
|
@@ -1492,7 +1562,7 @@ var Divider = ({
|
|
|
1492
1562
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1493
1563
|
"hr",
|
|
1494
1564
|
{
|
|
1495
|
-
className:
|
|
1565
|
+
className: cn(baseClasses, orientationClasses[orientation], className),
|
|
1496
1566
|
"aria-orientation": orientation,
|
|
1497
1567
|
...props
|
|
1498
1568
|
}
|
|
@@ -1683,7 +1753,7 @@ var Chips = ({
|
|
|
1683
1753
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1684
1754
|
"button",
|
|
1685
1755
|
{
|
|
1686
|
-
className:
|
|
1756
|
+
className: cn(baseClasses, stateClasses, className),
|
|
1687
1757
|
disabled,
|
|
1688
1758
|
type,
|
|
1689
1759
|
...props,
|
|
@@ -1812,7 +1882,10 @@ var renderStackedHitCountDisplay = (showHitCount, showPercentage, clampedValue,
|
|
|
1812
1882
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1813
1883
|
"div",
|
|
1814
1884
|
{
|
|
1815
|
-
className:
|
|
1885
|
+
className: cn(
|
|
1886
|
+
"text-xs font-medium leading-[14px] text-right",
|
|
1887
|
+
percentageClassName
|
|
1888
|
+
),
|
|
1816
1889
|
children: displayPriority.type === "hitCount" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
1817
1890
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-success-200", children: Math.round(clampedValue) }),
|
|
1818
1891
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "text-text-600", children: [
|
|
@@ -1837,7 +1910,11 @@ var ProgressBarBase = ({
|
|
|
1837
1910
|
}) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1838
1911
|
"div",
|
|
1839
1912
|
{
|
|
1840
|
-
className:
|
|
1913
|
+
className: cn(
|
|
1914
|
+
containerClassName,
|
|
1915
|
+
variantClasses.background,
|
|
1916
|
+
"overflow-hidden relative"
|
|
1917
|
+
),
|
|
1841
1918
|
children: [
|
|
1842
1919
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1843
1920
|
"progress",
|
|
@@ -1851,7 +1928,11 @@ var ProgressBarBase = ({
|
|
|
1851
1928
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1852
1929
|
"div",
|
|
1853
1930
|
{
|
|
1854
|
-
className:
|
|
1931
|
+
className: cn(
|
|
1932
|
+
fillClassName,
|
|
1933
|
+
variantClasses.fill,
|
|
1934
|
+
"transition-all duration-300 ease-out"
|
|
1935
|
+
),
|
|
1855
1936
|
style: { width: `${percentage}%` }
|
|
1856
1937
|
}
|
|
1857
1938
|
)
|
|
@@ -1873,7 +1954,12 @@ var StackedLayout = ({
|
|
|
1873
1954
|
}) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1874
1955
|
"div",
|
|
1875
1956
|
{
|
|
1876
|
-
className:
|
|
1957
|
+
className: cn(
|
|
1958
|
+
"flex flex-col items-start gap-2",
|
|
1959
|
+
dimensions.width,
|
|
1960
|
+
dimensions.height,
|
|
1961
|
+
className
|
|
1962
|
+
),
|
|
1877
1963
|
children: [
|
|
1878
1964
|
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-row justify-between items-center w-full h-[19px]", children: [
|
|
1879
1965
|
label && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
@@ -1882,7 +1968,7 @@ var StackedLayout = ({
|
|
|
1882
1968
|
as: "div",
|
|
1883
1969
|
size: "md",
|
|
1884
1970
|
weight: "medium",
|
|
1885
|
-
className:
|
|
1971
|
+
className: cn("text-text-600 leading-[19px]", labelClassName),
|
|
1886
1972
|
children: label
|
|
1887
1973
|
}
|
|
1888
1974
|
),
|
|
@@ -1940,7 +2026,12 @@ var CompactLayout = ({
|
|
|
1940
2026
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1941
2027
|
"div",
|
|
1942
2028
|
{
|
|
1943
|
-
className:
|
|
2029
|
+
className: cn(
|
|
2030
|
+
"flex flex-col items-start gap-1",
|
|
2031
|
+
dimensions.width,
|
|
2032
|
+
dimensions.height,
|
|
2033
|
+
className
|
|
2034
|
+
),
|
|
1944
2035
|
children: [
|
|
1945
2036
|
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1946
2037
|
Text_default,
|
|
@@ -1949,7 +2040,7 @@ var CompactLayout = ({
|
|
|
1949
2040
|
size: "sm",
|
|
1950
2041
|
weight: "medium",
|
|
1951
2042
|
color,
|
|
1952
|
-
className:
|
|
2043
|
+
className: cn("leading-4 w-full", compactClassName),
|
|
1953
2044
|
children: content
|
|
1954
2045
|
}
|
|
1955
2046
|
),
|
|
@@ -1989,7 +2080,7 @@ var DefaultLayout = ({
|
|
|
1989
2080
|
label,
|
|
1990
2081
|
showPercentage
|
|
1991
2082
|
);
|
|
1992
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className:
|
|
2083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: cn("flex", sizeClasses.layout, gapClass, className), children: [
|
|
1993
2084
|
displayConfig.showHeader && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-row items-center justify-between w-full", children: [
|
|
1994
2085
|
label && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1995
2086
|
Text_default,
|
|
@@ -1997,7 +2088,10 @@ var DefaultLayout = ({
|
|
|
1997
2088
|
as: "div",
|
|
1998
2089
|
size: "xs",
|
|
1999
2090
|
weight: "medium",
|
|
2000
|
-
className:
|
|
2091
|
+
className: cn(
|
|
2092
|
+
"text-text-950 leading-none tracking-normal text-center",
|
|
2093
|
+
labelClassName
|
|
2094
|
+
),
|
|
2001
2095
|
children: label
|
|
2002
2096
|
}
|
|
2003
2097
|
),
|
|
@@ -2006,7 +2100,10 @@ var DefaultLayout = ({
|
|
|
2006
2100
|
{
|
|
2007
2101
|
size: "xs",
|
|
2008
2102
|
weight: "medium",
|
|
2009
|
-
className:
|
|
2103
|
+
className: cn(
|
|
2104
|
+
"text-text-950 leading-none tracking-normal text-center",
|
|
2105
|
+
percentageClassName
|
|
2106
|
+
),
|
|
2010
2107
|
children: [
|
|
2011
2108
|
Math.round(percentage),
|
|
2012
2109
|
"%"
|
|
@@ -2022,8 +2119,16 @@ var DefaultLayout = ({
|
|
|
2022
2119
|
percentage,
|
|
2023
2120
|
label,
|
|
2024
2121
|
variantClasses,
|
|
2025
|
-
containerClassName:
|
|
2026
|
-
|
|
2122
|
+
containerClassName: cn(
|
|
2123
|
+
progressBarClass,
|
|
2124
|
+
sizeClasses.container,
|
|
2125
|
+
sizeClasses.borderRadius
|
|
2126
|
+
),
|
|
2127
|
+
fillClassName: cn(
|
|
2128
|
+
sizeClasses.bar,
|
|
2129
|
+
sizeClasses.borderRadius,
|
|
2130
|
+
"shadow-hard-shadow-3"
|
|
2131
|
+
)
|
|
2027
2132
|
}
|
|
2028
2133
|
),
|
|
2029
2134
|
displayConfig.showPercentage && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
@@ -2031,7 +2136,10 @@ var DefaultLayout = ({
|
|
|
2031
2136
|
{
|
|
2032
2137
|
size: "xs",
|
|
2033
2138
|
weight: "medium",
|
|
2034
|
-
className:
|
|
2139
|
+
className: cn(
|
|
2140
|
+
"text-text-950 leading-none tracking-normal text-center flex-none",
|
|
2141
|
+
percentageClassName
|
|
2142
|
+
),
|
|
2035
2143
|
children: [
|
|
2036
2144
|
Math.round(percentage),
|
|
2037
2145
|
"%"
|
|
@@ -2044,7 +2152,10 @@ var DefaultLayout = ({
|
|
|
2044
2152
|
as: "div",
|
|
2045
2153
|
size: "xs",
|
|
2046
2154
|
weight: "medium",
|
|
2047
|
-
className:
|
|
2155
|
+
className: cn(
|
|
2156
|
+
"text-text-950 leading-none tracking-normal text-center flex-none",
|
|
2157
|
+
labelClassName
|
|
2158
|
+
),
|
|
2048
2159
|
children: label
|
|
2049
2160
|
}
|
|
2050
2161
|
)
|
|
@@ -2217,7 +2328,12 @@ var ProgressCircle = ({
|
|
|
2217
2328
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
2218
2329
|
"div",
|
|
2219
2330
|
{
|
|
2220
|
-
className:
|
|
2331
|
+
className: cn(
|
|
2332
|
+
"relative flex flex-col items-center justify-center",
|
|
2333
|
+
sizeClasses.container,
|
|
2334
|
+
"rounded-lg",
|
|
2335
|
+
className
|
|
2336
|
+
),
|
|
2221
2337
|
children: [
|
|
2222
2338
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
2223
2339
|
"svg",
|
|
@@ -2236,7 +2352,7 @@ var ProgressCircle = ({
|
|
|
2236
2352
|
r: radius,
|
|
2237
2353
|
fill: "none",
|
|
2238
2354
|
strokeWidth: sizeClasses.strokeWidth,
|
|
2239
|
-
className:
|
|
2355
|
+
className: cn(variantClasses.background, "rounded-lg")
|
|
2240
2356
|
}
|
|
2241
2357
|
),
|
|
2242
2358
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
@@ -2250,7 +2366,10 @@ var ProgressCircle = ({
|
|
|
2250
2366
|
strokeLinecap: "round",
|
|
2251
2367
|
strokeDasharray: circumference,
|
|
2252
2368
|
strokeDashoffset,
|
|
2253
|
-
className:
|
|
2369
|
+
className: cn(
|
|
2370
|
+
variantClasses.fill,
|
|
2371
|
+
"transition-all duration-500 ease-out shadow-soft-shadow-3 rounded-lg"
|
|
2372
|
+
)
|
|
2254
2373
|
}
|
|
2255
2374
|
)
|
|
2256
2375
|
]
|
|
@@ -2268,14 +2387,22 @@ var ProgressCircle = ({
|
|
|
2268
2387
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
2269
2388
|
"div",
|
|
2270
2389
|
{
|
|
2271
|
-
className:
|
|
2390
|
+
className: cn(
|
|
2391
|
+
"relative z-10 flex flex-col items-center justify-center",
|
|
2392
|
+
sizeClasses.spacing,
|
|
2393
|
+
sizeClasses.contentWidth
|
|
2394
|
+
),
|
|
2272
2395
|
children: [
|
|
2273
2396
|
showPercentage && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
2274
2397
|
Text_default,
|
|
2275
2398
|
{
|
|
2276
2399
|
size: sizeClasses.textSize,
|
|
2277
2400
|
weight: sizeClasses.textWeight,
|
|
2278
|
-
className:
|
|
2401
|
+
className: cn(
|
|
2402
|
+
"text-center w-full",
|
|
2403
|
+
variantClasses.textColor,
|
|
2404
|
+
percentageClassName
|
|
2405
|
+
),
|
|
2279
2406
|
children: [
|
|
2280
2407
|
Math.round(percentage),
|
|
2281
2408
|
"%"
|
|
@@ -2288,7 +2415,11 @@ var ProgressCircle = ({
|
|
|
2288
2415
|
as: "span",
|
|
2289
2416
|
size: sizeClasses.labelSize,
|
|
2290
2417
|
weight: sizeClasses.labelWeight,
|
|
2291
|
-
className:
|
|
2418
|
+
className: cn(
|
|
2419
|
+
variantClasses.labelColor,
|
|
2420
|
+
"text-center uppercase tracking-wide truncate w-full",
|
|
2421
|
+
labelClassName
|
|
2422
|
+
),
|
|
2292
2423
|
children: label
|
|
2293
2424
|
}
|
|
2294
2425
|
)
|
|
@@ -2487,7 +2618,10 @@ var Step = ({
|
|
|
2487
2618
|
size: sizeClasses.indicatorTextSize,
|
|
2488
2619
|
weight: "medium",
|
|
2489
2620
|
color: "",
|
|
2490
|
-
className:
|
|
2621
|
+
className: cn(
|
|
2622
|
+
stateClasses.indicatorText,
|
|
2623
|
+
"leading-none text-2xs sm:text-xs"
|
|
2624
|
+
),
|
|
2491
2625
|
children: stepNumber
|
|
2492
2626
|
}
|
|
2493
2627
|
)
|
|
@@ -2499,13 +2633,10 @@ var Step = ({
|
|
|
2499
2633
|
size: sizeClasses.labelTextSize,
|
|
2500
2634
|
weight: "medium",
|
|
2501
2635
|
color: "",
|
|
2502
|
-
className:
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
text-2xs sm:text-xs md:text-xs lg:text-sm
|
|
2507
|
-
whitespace-normal
|
|
2508
|
-
`,
|
|
2636
|
+
className: cn(
|
|
2637
|
+
stateClasses.label,
|
|
2638
|
+
"leading-tight flex-none text-center sm:text-left break-words px-1 sm:px-0 max-w-full text-2xs sm:text-xs md:text-xs lg:text-sm whitespace-normal"
|
|
2639
|
+
),
|
|
2509
2640
|
children: step.label
|
|
2510
2641
|
}
|
|
2511
2642
|
)
|
|
@@ -2551,7 +2682,11 @@ var Stepper = ({
|
|
|
2551
2682
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2552
2683
|
"fieldset",
|
|
2553
2684
|
{
|
|
2554
|
-
className:
|
|
2685
|
+
className: cn(
|
|
2686
|
+
"flex flex-col gap-4 sm:gap-5 md:gap-6",
|
|
2687
|
+
className,
|
|
2688
|
+
"border-0 p-0 m-0"
|
|
2689
|
+
),
|
|
2555
2690
|
children: [
|
|
2556
2691
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("legend", { className: "absolute w-px h-px p-0 -m-px overflow-hidden whitespace-nowrap border-0", children: "Stepper de formul\xE1rio" }),
|
|
2557
2692
|
showProgress && currentStep !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
@@ -2566,14 +2701,12 @@ var Stepper = ({
|
|
|
2566
2701
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2567
2702
|
"div",
|
|
2568
2703
|
{
|
|
2569
|
-
className:
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
gap-2 sm:gap-3 md:gap-4 lg:gap-4
|
|
2576
|
-
`,
|
|
2704
|
+
className: cn(
|
|
2705
|
+
"flex items-center",
|
|
2706
|
+
sizeClasses.container,
|
|
2707
|
+
responsive ? "flex-row overflow-x-auto overflow-y-hidden scrollbar-hide justify-start sm:justify-center md:justify-center lg:justify-center" : "flex-row justify-center",
|
|
2708
|
+
"px-2 sm:px-4 md:px-6 lg:px-0 max-w-full min-w-0 gap-2 sm:gap-3 md:gap-4 lg:gap-4"
|
|
2709
|
+
),
|
|
2577
2710
|
role: "tablist",
|
|
2578
2711
|
"aria-label": "Progress steps",
|
|
2579
2712
|
children: steps.map((step, index) => {
|
|
@@ -2780,7 +2913,7 @@ var Calendar = ({
|
|
|
2780
2913
|
onDateSelect?.(day.date);
|
|
2781
2914
|
};
|
|
2782
2915
|
if (variant === "navigation") {
|
|
2783
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className:
|
|
2916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: cn("bg-background rounded-xl pt-6", className), children: [
|
|
2784
2917
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center justify-between mb-4 px-6", children: [
|
|
2785
2918
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "relative", ref: monthPickerContainerRef, children: [
|
|
2786
2919
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
@@ -2940,7 +3073,7 @@ var Calendar = ({
|
|
|
2940
3073
|
}) })
|
|
2941
3074
|
] });
|
|
2942
3075
|
}
|
|
2943
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className:
|
|
3076
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: cn("bg-background rounded-xl p-4", className), children: [
|
|
2944
3077
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center justify-between mb-3.5", children: [
|
|
2945
3078
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "relative", ref: monthPickerContainerRef, children: [
|
|
2946
3079
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
@@ -3155,7 +3288,12 @@ var Modal = ({
|
|
|
3155
3288
|
const sizeClasses = SIZE_CLASSES10[size];
|
|
3156
3289
|
const baseClasses = "bg-secondary-50 rounded-3xl shadow-hard-shadow-2 border border-border-100 w-full mx-4";
|
|
3157
3290
|
const dialogResetClasses = "p-0 m-0 border-none outline-none max-h-none static";
|
|
3158
|
-
const modalClasses =
|
|
3291
|
+
const modalClasses = cn(
|
|
3292
|
+
baseClasses,
|
|
3293
|
+
sizeClasses,
|
|
3294
|
+
dialogResetClasses,
|
|
3295
|
+
className
|
|
3296
|
+
);
|
|
3159
3297
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3160
3298
|
"div",
|
|
3161
3299
|
{
|
|
@@ -3289,21 +3427,28 @@ var CardActivitiesResults = (0, import_react11.forwardRef)(
|
|
|
3289
3427
|
"div",
|
|
3290
3428
|
{
|
|
3291
3429
|
ref,
|
|
3292
|
-
className:
|
|
3430
|
+
className: cn(
|
|
3431
|
+
"w-full flex flex-col border border-border-50 bg-background rounded-xl",
|
|
3432
|
+
className
|
|
3433
|
+
),
|
|
3293
3434
|
...props,
|
|
3294
3435
|
children: [
|
|
3295
3436
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
3296
3437
|
"div",
|
|
3297
3438
|
{
|
|
3298
|
-
className:
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3439
|
+
className: cn(
|
|
3440
|
+
"flex flex-col gap-1 items-center justify-center p-4",
|
|
3441
|
+
actionCardClasses,
|
|
3442
|
+
extended ? "rounded-t-xl" : "rounded-xl"
|
|
3443
|
+
),
|
|
3302
3444
|
children: [
|
|
3303
3445
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3304
3446
|
"span",
|
|
3305
3447
|
{
|
|
3306
|
-
className:
|
|
3448
|
+
className: cn(
|
|
3449
|
+
"size-7.5 rounded-full flex items-center justify-center",
|
|
3450
|
+
actionIconClasses
|
|
3451
|
+
),
|
|
3307
3452
|
children: icon
|
|
3308
3453
|
}
|
|
3309
3454
|
),
|
|
@@ -3316,7 +3461,13 @@ var CardActivitiesResults = (0, import_react11.forwardRef)(
|
|
|
3316
3461
|
children: title
|
|
3317
3462
|
}
|
|
3318
3463
|
),
|
|
3319
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3464
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3465
|
+
"p",
|
|
3466
|
+
{
|
|
3467
|
+
className: cn("text-lg font-bold truncate", actionSubTitleClasses),
|
|
3468
|
+
children: subTitle
|
|
3469
|
+
}
|
|
3470
|
+
)
|
|
3320
3471
|
]
|
|
3321
3472
|
}
|
|
3322
3473
|
),
|
|
@@ -3324,7 +3475,10 @@ var CardActivitiesResults = (0, import_react11.forwardRef)(
|
|
|
3324
3475
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3325
3476
|
"p",
|
|
3326
3477
|
{
|
|
3327
|
-
className:
|
|
3478
|
+
className: cn(
|
|
3479
|
+
"text-2xs font-medium uppercase truncate",
|
|
3480
|
+
actionHeaderClasses
|
|
3481
|
+
),
|
|
3328
3482
|
children: header
|
|
3329
3483
|
}
|
|
3330
3484
|
),
|
|
@@ -3354,7 +3508,7 @@ var CardQuestions = (0, import_react11.forwardRef)(
|
|
|
3354
3508
|
layout: "horizontal",
|
|
3355
3509
|
padding: "medium",
|
|
3356
3510
|
minHeight: "medium",
|
|
3357
|
-
className:
|
|
3511
|
+
className: cn("justify-between gap-4", className),
|
|
3358
3512
|
...props,
|
|
3359
3513
|
children: [
|
|
3360
3514
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("section", { className: "flex flex-col gap-1 flex-1 min-w-0", children: [
|
|
@@ -3432,7 +3586,9 @@ var CardProgress = (0, import_react11.forwardRef)(
|
|
|
3432
3586
|
{
|
|
3433
3587
|
size: "xs",
|
|
3434
3588
|
weight: "medium",
|
|
3435
|
-
className:
|
|
3589
|
+
className: cn(
|
|
3590
|
+
"text-text-950 leading-none tracking-normal text-center flex-none"
|
|
3591
|
+
),
|
|
3436
3592
|
children: [
|
|
3437
3593
|
Math.round(progress),
|
|
3438
3594
|
"%"
|
|
@@ -3451,17 +3607,17 @@ var CardProgress = (0, import_react11.forwardRef)(
|
|
|
3451
3607
|
padding: "none",
|
|
3452
3608
|
minHeight: "medium",
|
|
3453
3609
|
cursor: "pointer",
|
|
3454
|
-
className:
|
|
3610
|
+
className: cn(isHorizontal ? "h-20" : "", className),
|
|
3455
3611
|
...props,
|
|
3456
3612
|
children: [
|
|
3457
3613
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3458
3614
|
"div",
|
|
3459
3615
|
{
|
|
3460
|
-
className:
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3616
|
+
className: cn(
|
|
3617
|
+
"flex justify-center items-center [&>svg]:size-6 text-text-950",
|
|
3618
|
+
isHorizontal ? "min-w-[80px] min-h-[80px] rounded-l-xl" : "min-h-[50px] w-full rounded-t-xl",
|
|
3619
|
+
!color.startsWith("#") ? `bg-${color}` : ""
|
|
3620
|
+
),
|
|
3465
3621
|
style: color.startsWith("#") ? { backgroundColor: color } : void 0,
|
|
3466
3622
|
"data-testid": "icon-container",
|
|
3467
3623
|
children: icon
|
|
@@ -3470,10 +3626,10 @@ var CardProgress = (0, import_react11.forwardRef)(
|
|
|
3470
3626
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
3471
3627
|
"div",
|
|
3472
3628
|
{
|
|
3473
|
-
className:
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3629
|
+
className: cn(
|
|
3630
|
+
"p-4 flex flex-col justify-between w-full h-full",
|
|
3631
|
+
!isHorizontal && "gap-4"
|
|
3632
|
+
),
|
|
3477
3633
|
children: [
|
|
3478
3634
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text_default, { size: "sm", weight: "bold", className: "text-text-950 truncate", children: header }),
|
|
3479
3635
|
contentComponent[direction]
|
|
@@ -3503,7 +3659,7 @@ var CardTopic = (0, import_react11.forwardRef)(
|
|
|
3503
3659
|
padding: "small",
|
|
3504
3660
|
minHeight: "medium",
|
|
3505
3661
|
cursor: "pointer",
|
|
3506
|
-
className:
|
|
3662
|
+
className: cn("justify-center gap-2 py-2 px-4", className),
|
|
3507
3663
|
...props,
|
|
3508
3664
|
children: [
|
|
3509
3665
|
subHead && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-text-600 text-2xs flex flex-row gap-1", children: subHead.map((text, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react11.Fragment, { children: [
|
|
@@ -3526,7 +3682,9 @@ var CardTopic = (0, import_react11.forwardRef)(
|
|
|
3526
3682
|
{
|
|
3527
3683
|
size: "xs",
|
|
3528
3684
|
weight: "medium",
|
|
3529
|
-
className:
|
|
3685
|
+
className: cn(
|
|
3686
|
+
"text-text-950 leading-none tracking-normal text-center flex-none"
|
|
3687
|
+
),
|
|
3530
3688
|
children: [
|
|
3531
3689
|
Math.round(progress),
|
|
3532
3690
|
"%"
|
|
@@ -3560,7 +3718,10 @@ var CardPerformance = (0, import_react11.forwardRef)(
|
|
|
3560
3718
|
layout: "horizontal",
|
|
3561
3719
|
padding: "medium",
|
|
3562
3720
|
minHeight: "none",
|
|
3563
|
-
className:
|
|
3721
|
+
className: cn(
|
|
3722
|
+
actionVariant == "caret" ? "cursor-pointer" : "",
|
|
3723
|
+
className
|
|
3724
|
+
),
|
|
3564
3725
|
onClick: () => actionVariant == "caret" && onClickButton?.(valueButton),
|
|
3565
3726
|
...props,
|
|
3566
3727
|
children: [
|
|
@@ -3618,15 +3779,15 @@ var CardResults = (0, import_react11.forwardRef)(
|
|
|
3618
3779
|
layout: "horizontal",
|
|
3619
3780
|
padding: "none",
|
|
3620
3781
|
minHeight: "medium",
|
|
3621
|
-
className:
|
|
3782
|
+
className: cn("items-center cursor-pointer pr-4", className),
|
|
3622
3783
|
...props,
|
|
3623
3784
|
children: [
|
|
3624
3785
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3625
3786
|
"div",
|
|
3626
3787
|
{
|
|
3627
|
-
className:
|
|
3628
|
-
|
|
3629
|
-
|
|
3788
|
+
className: cn(
|
|
3789
|
+
"flex justify-center items-center [&>svg]:size-8 text-text-950 min-w-20 max-w-20 min-h-20 h-full rounded-l-xl"
|
|
3790
|
+
),
|
|
3630
3791
|
style: {
|
|
3631
3792
|
backgroundColor: color
|
|
3632
3793
|
},
|
|
@@ -3636,10 +3797,10 @@ var CardResults = (0, import_react11.forwardRef)(
|
|
|
3636
3797
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
3637
3798
|
"div",
|
|
3638
3799
|
{
|
|
3639
|
-
className:
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3800
|
+
className: cn(
|
|
3801
|
+
"p-4 flex justify-between w-full h-full",
|
|
3802
|
+
isRow ? "flex-row items-center gap-2" : "flex-col"
|
|
3803
|
+
),
|
|
3643
3804
|
children: [
|
|
3644
3805
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-sm font-bold text-text-950 truncate flex-1 min-w-0", children: header }),
|
|
3645
3806
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "flex flex-row gap-1 items-center", children: [
|
|
@@ -3688,7 +3849,7 @@ var CardStatus = (0, import_react11.forwardRef)(
|
|
|
3688
3849
|
layout: "horizontal",
|
|
3689
3850
|
padding: "medium",
|
|
3690
3851
|
minHeight: "medium",
|
|
3691
|
-
className:
|
|
3852
|
+
className: cn("items-center cursor-pointer", className),
|
|
3692
3853
|
...props,
|
|
3693
3854
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex justify-between w-full h-full flex-row items-center gap-2", children: [
|
|
3694
3855
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-sm font-bold text-text-950 truncate flex-1 min-w-0", children: header }),
|
|
@@ -3720,7 +3881,10 @@ var CardSettings = (0, import_react11.forwardRef)(
|
|
|
3720
3881
|
layout: "horizontal",
|
|
3721
3882
|
padding: "small",
|
|
3722
3883
|
minHeight: "none",
|
|
3723
|
-
className:
|
|
3884
|
+
className: cn(
|
|
3885
|
+
"border-none items-center gap-2 text-text-700",
|
|
3886
|
+
className
|
|
3887
|
+
),
|
|
3724
3888
|
...props,
|
|
3725
3889
|
children: [
|
|
3726
3890
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "[&>svg]:size-6", children: icon }),
|
|
@@ -3740,15 +3904,19 @@ var CardSupport = (0, import_react11.forwardRef)(
|
|
|
3740
3904
|
layout: "horizontal",
|
|
3741
3905
|
padding: "medium",
|
|
3742
3906
|
minHeight: "none",
|
|
3743
|
-
className:
|
|
3907
|
+
className: cn(
|
|
3908
|
+
"border-none items-center gap-2 text-text-700",
|
|
3909
|
+
className
|
|
3910
|
+
),
|
|
3744
3911
|
...props,
|
|
3745
3912
|
children: [
|
|
3746
3913
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
3747
3914
|
"div",
|
|
3748
3915
|
{
|
|
3749
|
-
className:
|
|
3750
|
-
|
|
3751
|
-
|
|
3916
|
+
className: cn(
|
|
3917
|
+
"w-full flex",
|
|
3918
|
+
direction == "col" ? "flex-col" : "flex-row items-center"
|
|
3919
|
+
),
|
|
3752
3920
|
children: [
|
|
3753
3921
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "w-full min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-sm text-text-950 font-bold truncate", children: header }) }),
|
|
3754
3922
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "flex flex-row gap-1", children })
|
|
@@ -3783,7 +3951,7 @@ var CardForum = (0, import_react11.forwardRef)(
|
|
|
3783
3951
|
padding: "medium",
|
|
3784
3952
|
minHeight: "none",
|
|
3785
3953
|
variant: "minimal",
|
|
3786
|
-
className:
|
|
3954
|
+
className: cn("w-auto h-auto gap-3", className),
|
|
3787
3955
|
...props,
|
|
3788
3956
|
children: [
|
|
3789
3957
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
@@ -3916,7 +4084,7 @@ var CardAudio = (0, import_react11.forwardRef)(
|
|
|
3916
4084
|
layout: "horizontal",
|
|
3917
4085
|
padding: "medium",
|
|
3918
4086
|
minHeight: "none",
|
|
3919
|
-
className:
|
|
4087
|
+
className: cn("w-auto h-14 items-center gap-2", className),
|
|
3920
4088
|
...props,
|
|
3921
4089
|
children: [
|
|
3922
4090
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
@@ -4085,7 +4253,10 @@ var CardSimulado = (0, import_react11.forwardRef)(
|
|
|
4085
4253
|
padding: "medium",
|
|
4086
4254
|
minHeight: "none",
|
|
4087
4255
|
cursor: "pointer",
|
|
4088
|
-
className:
|
|
4256
|
+
className: cn(
|
|
4257
|
+
`${backgroundClass} hover:shadow-soft-shadow-2 transition-shadow duration-200`,
|
|
4258
|
+
className
|
|
4259
|
+
),
|
|
4089
4260
|
...props,
|
|
4090
4261
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex justify-between items-center w-full gap-4", children: [
|
|
4091
4262
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex flex-col gap-1 flex-1 min-w-0", children: [
|
|
@@ -4148,7 +4319,9 @@ var CardTest = (0, import_react11.forwardRef)(
|
|
|
4148
4319
|
{
|
|
4149
4320
|
ref,
|
|
4150
4321
|
type: "button",
|
|
4151
|
-
className:
|
|
4322
|
+
className: cn(
|
|
4323
|
+
`${baseClasses} ${interactiveClasses} ${selectedClasses} ${className}`.trim()
|
|
4324
|
+
),
|
|
4152
4325
|
onClick: handleClick,
|
|
4153
4326
|
onKeyDown: handleKeyDown,
|
|
4154
4327
|
"aria-pressed": selected,
|
|
@@ -4192,7 +4365,7 @@ var CardTest = (0, import_react11.forwardRef)(
|
|
|
4192
4365
|
"div",
|
|
4193
4366
|
{
|
|
4194
4367
|
ref,
|
|
4195
|
-
className: `${baseClasses} ${className}`.trim(),
|
|
4368
|
+
className: cn(`${baseClasses} ${className}`.trim()),
|
|
4196
4369
|
...props,
|
|
4197
4370
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
|
|
4198
4371
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
@@ -4257,16 +4430,16 @@ var CardSimulationHistory = (0, import_react11.forwardRef)(({ data, onSimulation
|
|
|
4257
4430
|
"div",
|
|
4258
4431
|
{
|
|
4259
4432
|
ref,
|
|
4260
|
-
className:
|
|
4433
|
+
className: cn("w-full max-w-[992px] h-auto", className),
|
|
4261
4434
|
...props,
|
|
4262
4435
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex flex-col gap-0", children: [
|
|
4263
4436
|
data.map((section, sectionIndex) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
4264
4437
|
"div",
|
|
4265
4438
|
{
|
|
4266
|
-
className:
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4439
|
+
className: cn(
|
|
4440
|
+
"flex flex-row justify-center items-start px-4 py-6 gap-2 w-full bg-white",
|
|
4441
|
+
sectionIndex === 0 ? "rounded-t-3xl" : ""
|
|
4442
|
+
),
|
|
4270
4443
|
children: [
|
|
4271
4444
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4272
4445
|
Text_default,
|
|
@@ -4286,10 +4459,10 @@ var CardSimulationHistory = (0, import_react11.forwardRef)(({ data, onSimulation
|
|
|
4286
4459
|
padding: "medium",
|
|
4287
4460
|
minHeight: "none",
|
|
4288
4461
|
cursor: "pointer",
|
|
4289
|
-
className:
|
|
4290
|
-
|
|
4291
|
-
transition-shadow duration-200 h-auto min-h-[61px]
|
|
4292
|
-
|
|
4462
|
+
className: cn(
|
|
4463
|
+
`${typeStyles.background} rounded-xl hover:shadow-soft-shadow-2
|
|
4464
|
+
transition-shadow duration-200 h-auto min-h-[61px]`
|
|
4465
|
+
),
|
|
4293
4466
|
onClick: () => onSimulationClick?.(simulation),
|
|
4294
4467
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex justify-between items-center w-full gap-2", children: [
|
|
4295
4468
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex flex-col gap-2 flex-1 min-w-0", children: [
|
|
@@ -4369,7 +4542,7 @@ var CardAccordation = (0, import_react12.forwardRef)(
|
|
|
4369
4542
|
layout: "vertical",
|
|
4370
4543
|
padding: "none",
|
|
4371
4544
|
minHeight: "none",
|
|
4372
|
-
className:
|
|
4545
|
+
className: cn("overflow-hidden", className),
|
|
4373
4546
|
...props,
|
|
4374
4547
|
children: [
|
|
4375
4548
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
@@ -4386,7 +4559,10 @@ var CardAccordation = (0, import_react12.forwardRef)(
|
|
|
4386
4559
|
import_phosphor_react11.CaretRight,
|
|
4387
4560
|
{
|
|
4388
4561
|
size: 20,
|
|
4389
|
-
className:
|
|
4562
|
+
className: cn(
|
|
4563
|
+
"text-text-700 transition-transform duration-200 flex-shrink-0",
|
|
4564
|
+
isExpanded ? "rotate-90" : "rotate-0"
|
|
4565
|
+
),
|
|
4390
4566
|
"data-testid": "accordion-caret"
|
|
4391
4567
|
}
|
|
4392
4568
|
)
|
|
@@ -4397,7 +4573,10 @@ var CardAccordation = (0, import_react12.forwardRef)(
|
|
|
4397
4573
|
"div",
|
|
4398
4574
|
{
|
|
4399
4575
|
id: contentId,
|
|
4400
|
-
className:
|
|
4576
|
+
className: cn(
|
|
4577
|
+
"transition-all duration-300 ease-in-out overflow-hidden",
|
|
4578
|
+
isExpanded ? "max-h-screen opacity-100" : "max-h-0 opacity-0"
|
|
4579
|
+
),
|
|
4401
4580
|
"data-testid": "accordion-content",
|
|
4402
4581
|
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "p-4 pt-0 border-border-50", children })
|
|
4403
4582
|
}
|
|
@@ -4480,7 +4659,11 @@ var AlternativesList = ({
|
|
|
4480
4659
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4481
4660
|
"div",
|
|
4482
4661
|
{
|
|
4483
|
-
className:
|
|
4662
|
+
className: cn(
|
|
4663
|
+
"border-2 rounded-lg p-4 w-full",
|
|
4664
|
+
statusStyles,
|
|
4665
|
+
alternative.disabled ? "opacity-50" : ""
|
|
4666
|
+
),
|
|
4484
4667
|
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
4485
4668
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-start gap-3 flex-1", children: [
|
|
4486
4669
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "mt-1", children: renderRadio() }),
|
|
@@ -4488,7 +4671,10 @@ var AlternativesList = ({
|
|
|
4488
4671
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4489
4672
|
"p",
|
|
4490
4673
|
{
|
|
4491
|
-
className:
|
|
4674
|
+
className: cn(
|
|
4675
|
+
"block font-medium",
|
|
4676
|
+
selectedValue === alternative.value || statusBadge ? "text-text-950" : "text-text-600"
|
|
4677
|
+
),
|
|
4492
4678
|
children: alternative.label
|
|
4493
4679
|
}
|
|
4494
4680
|
),
|
|
@@ -4504,14 +4690,21 @@ var AlternativesList = ({
|
|
|
4504
4690
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
4505
4691
|
"div",
|
|
4506
4692
|
{
|
|
4507
|
-
className:
|
|
4693
|
+
className: cn(
|
|
4694
|
+
"flex flex-row justify-between items-start gap-2 p-2 rounded-lg w-full",
|
|
4695
|
+
statusStyles,
|
|
4696
|
+
alternative.disabled ? "opacity-50" : ""
|
|
4697
|
+
),
|
|
4508
4698
|
children: [
|
|
4509
4699
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
4510
4700
|
renderRadio(),
|
|
4511
4701
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4512
4702
|
"span",
|
|
4513
4703
|
{
|
|
4514
|
-
className:
|
|
4704
|
+
className: cn(
|
|
4705
|
+
"flex-1",
|
|
4706
|
+
selectedValue === alternative.value || statusBadge ? "text-text-950" : "text-text-600"
|
|
4707
|
+
),
|
|
4515
4708
|
children: alternative.label
|
|
4516
4709
|
}
|
|
4517
4710
|
)
|
|
@@ -4526,7 +4719,7 @@ var AlternativesList = ({
|
|
|
4526
4719
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4527
4720
|
"div",
|
|
4528
4721
|
{
|
|
4529
|
-
className:
|
|
4722
|
+
className: cn("flex flex-col", getLayoutClasses(), "w-full", className),
|
|
4530
4723
|
children: alternatives.map(
|
|
4531
4724
|
(alternative) => renderReadonlyAlternative(alternative)
|
|
4532
4725
|
)
|
|
@@ -4544,7 +4737,7 @@ var AlternativesList = ({
|
|
|
4544
4737
|
onValueChange?.(value2);
|
|
4545
4738
|
},
|
|
4546
4739
|
disabled,
|
|
4547
|
-
className:
|
|
4740
|
+
className: cn("flex flex-col", getLayoutClasses(), className),
|
|
4548
4741
|
children: alternatives.map((alternative, index) => {
|
|
4549
4742
|
const alternativeId = alternative.value || `alt-${index}`;
|
|
4550
4743
|
const statusStyles = getStatusStyles(alternative.status, false);
|
|
@@ -4553,7 +4746,11 @@ var AlternativesList = ({
|
|
|
4553
4746
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4554
4747
|
"div",
|
|
4555
4748
|
{
|
|
4556
|
-
className:
|
|
4749
|
+
className: cn(
|
|
4750
|
+
"border-2 rounded-lg p-4 transition-all",
|
|
4751
|
+
statusStyles,
|
|
4752
|
+
alternative.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
4753
|
+
),
|
|
4557
4754
|
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
4558
4755
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-start gap-3 flex-1", children: [
|
|
4559
4756
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
@@ -4570,9 +4767,11 @@ var AlternativesList = ({
|
|
|
4570
4767
|
"label",
|
|
4571
4768
|
{
|
|
4572
4769
|
htmlFor: alternativeId,
|
|
4573
|
-
className:
|
|
4574
|
-
|
|
4575
|
-
|
|
4770
|
+
className: cn(
|
|
4771
|
+
"block font-medium",
|
|
4772
|
+
actualValue === alternative.value ? "text-text-950" : "text-text-600",
|
|
4773
|
+
alternative.disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
4774
|
+
),
|
|
4576
4775
|
children: alternative.label
|
|
4577
4776
|
}
|
|
4578
4777
|
),
|
|
@@ -4588,7 +4787,11 @@ var AlternativesList = ({
|
|
|
4588
4787
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
4589
4788
|
"div",
|
|
4590
4789
|
{
|
|
4591
|
-
className:
|
|
4790
|
+
className: cn(
|
|
4791
|
+
"flex flex-row justify-between gap-2 items-start p-2 rounded-lg transition-all",
|
|
4792
|
+
statusStyles,
|
|
4793
|
+
alternative.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
4794
|
+
),
|
|
4592
4795
|
children: [
|
|
4593
4796
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
4594
4797
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
@@ -4603,9 +4806,11 @@ var AlternativesList = ({
|
|
|
4603
4806
|
"label",
|
|
4604
4807
|
{
|
|
4605
4808
|
htmlFor: alternativeId,
|
|
4606
|
-
className:
|
|
4607
|
-
|
|
4608
|
-
|
|
4809
|
+
className: cn(
|
|
4810
|
+
"flex-1",
|
|
4811
|
+
actualValue === alternative.value ? "text-text-950" : "text-text-600",
|
|
4812
|
+
alternative.disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
4813
|
+
),
|
|
4609
4814
|
children: alternative.label
|
|
4610
4815
|
}
|
|
4611
4816
|
)
|
|
@@ -4625,7 +4830,10 @@ var HeaderAlternative = (0, import_react13.forwardRef)(
|
|
|
4625
4830
|
"div",
|
|
4626
4831
|
{
|
|
4627
4832
|
ref,
|
|
4628
|
-
className:
|
|
4833
|
+
className: cn(
|
|
4834
|
+
"bg-background p-4 flex flex-col gap-4 rounded-xl",
|
|
4835
|
+
className
|
|
4836
|
+
),
|
|
4629
4837
|
...props,
|
|
4630
4838
|
children: [
|
|
4631
4839
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "flex flex-col", children: [
|
|
@@ -4717,7 +4925,11 @@ var AlertDialog = (0, import_react14.forwardRef)(
|
|
|
4717
4925
|
"div",
|
|
4718
4926
|
{
|
|
4719
4927
|
ref,
|
|
4720
|
-
className:
|
|
4928
|
+
className: cn(
|
|
4929
|
+
"bg-background border border-border-100 rounded-lg shadow-lg p-6 m-3",
|
|
4930
|
+
sizeClasses,
|
|
4931
|
+
className
|
|
4932
|
+
),
|
|
4721
4933
|
...props,
|
|
4722
4934
|
children: [
|
|
4723
4935
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
@@ -4878,7 +5090,7 @@ var DropdownMenuTrigger = ({
|
|
|
4878
5090
|
if (onClick) onClick(e);
|
|
4879
5091
|
},
|
|
4880
5092
|
"aria-expanded": open,
|
|
4881
|
-
className:
|
|
5093
|
+
className: cn(className),
|
|
4882
5094
|
...props,
|
|
4883
5095
|
children
|
|
4884
5096
|
}
|
|
@@ -4909,7 +5121,7 @@ var MenuLabel = (0, import_react15.forwardRef)(({ className, inset, store: _stor
|
|
|
4909
5121
|
"div",
|
|
4910
5122
|
{
|
|
4911
5123
|
ref,
|
|
4912
|
-
className:
|
|
5124
|
+
className: cn("text-sm w-full", inset ? "pl-8" : "", className),
|
|
4913
5125
|
...props
|
|
4914
5126
|
}
|
|
4915
5127
|
);
|
|
@@ -5037,7 +5249,7 @@ var DropdownMenuSeparator = (0, import_react15.forwardRef)(({ className, store:
|
|
|
5037
5249
|
"div",
|
|
5038
5250
|
{
|
|
5039
5251
|
ref,
|
|
5040
|
-
className:
|
|
5252
|
+
className: cn("my-1 h-px bg-border-200", className),
|
|
5041
5253
|
...props
|
|
5042
5254
|
}
|
|
5043
5255
|
));
|
|
@@ -5050,7 +5262,10 @@ var ProfileMenuTrigger = (0, import_react15.forwardRef)(({ className, onClick, s
|
|
|
5050
5262
|
"button",
|
|
5051
5263
|
{
|
|
5052
5264
|
ref,
|
|
5053
|
-
className:
|
|
5265
|
+
className: cn(
|
|
5266
|
+
"rounded-lg size-10 bg-primary-50 flex items-center justify-center cursor-pointer",
|
|
5267
|
+
className
|
|
5268
|
+
),
|
|
5054
5269
|
onClick: (e) => {
|
|
5055
5270
|
e.stopPropagation();
|
|
5056
5271
|
toggleOpen();
|
|
@@ -5069,10 +5284,7 @@ var ProfileMenuHeader = (0, import_react15.forwardRef)(({ className, name, email
|
|
|
5069
5284
|
{
|
|
5070
5285
|
ref,
|
|
5071
5286
|
"data-component": "ProfileMenuHeader",
|
|
5072
|
-
className:
|
|
5073
|
-
flex flex-row gap-4 items-center
|
|
5074
|
-
${className}
|
|
5075
|
-
`,
|
|
5287
|
+
className: cn("flex flex-row gap-4 items-center", className),
|
|
5076
5288
|
...props,
|
|
5077
5289
|
children: [
|
|
5078
5290
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "size-16 bg-primary-100 rounded-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_phosphor_react13.User, { size: 34, className: "text-primary-950" }) }),
|
|
@@ -5086,18 +5298,7 @@ var ProfileMenuHeader = (0, import_react15.forwardRef)(({ className, name, email
|
|
|
5086
5298
|
});
|
|
5087
5299
|
ProfileMenuHeader.displayName = "ProfileMenuHeader";
|
|
5088
5300
|
var ProfileMenuSection = (0, import_react15.forwardRef)(({ className, children, store: _store, ...props }, ref) => {
|
|
5089
|
-
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
5090
|
-
"div",
|
|
5091
|
-
{
|
|
5092
|
-
ref,
|
|
5093
|
-
className: `
|
|
5094
|
-
flex flex-col p-2
|
|
5095
|
-
${className}
|
|
5096
|
-
`,
|
|
5097
|
-
...props,
|
|
5098
|
-
children
|
|
5099
|
-
}
|
|
5100
|
-
);
|
|
5301
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { ref, className: cn("flex flex-col p-2", className), ...props, children });
|
|
5101
5302
|
});
|
|
5102
5303
|
ProfileMenuSection.displayName = "ProfileMenuSection";
|
|
5103
5304
|
var ProfileMenuFooter = ({
|
|
@@ -5113,7 +5314,7 @@ var ProfileMenuFooter = ({
|
|
|
5113
5314
|
Button_default,
|
|
5114
5315
|
{
|
|
5115
5316
|
variant: "outline",
|
|
5116
|
-
className:
|
|
5317
|
+
className: cn("w-full", className),
|
|
5117
5318
|
disabled,
|
|
5118
5319
|
onClick: (e) => {
|
|
5119
5320
|
setOpen(false);
|
|
@@ -5309,11 +5510,11 @@ var Select = ({
|
|
|
5309
5510
|
"label",
|
|
5310
5511
|
{
|
|
5311
5512
|
htmlFor: selectId,
|
|
5312
|
-
className:
|
|
5513
|
+
className: cn("block font-bold text-text-900 mb-1.5", sizeClasses),
|
|
5313
5514
|
children: label
|
|
5314
5515
|
}
|
|
5315
5516
|
),
|
|
5316
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className:
|
|
5517
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: cn("relative", sizeClasses), ref: selectRef, children: injectStore3(children, store, size, selectId) }),
|
|
5317
5518
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "mt-1.5 gap-1.5", children: [
|
|
5318
5519
|
helperText && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-sm text-text-500", children: helperText }),
|
|
5319
5520
|
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("p", { className: "flex gap-1 items-center text-sm text-indicator-error", children: [
|
|
@@ -5374,7 +5575,10 @@ var SelectTrigger = (0, import_react16.forwardRef)(
|
|
|
5374
5575
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5375
5576
|
import_phosphor_react14.CaretDown,
|
|
5376
5577
|
{
|
|
5377
|
-
className:
|
|
5578
|
+
className: cn(
|
|
5579
|
+
"h-[1em] w-[1em] opacity-50 transition-transform",
|
|
5580
|
+
open ? "rotate-180" : ""
|
|
5581
|
+
)
|
|
5378
5582
|
}
|
|
5379
5583
|
)
|
|
5380
5584
|
]
|
|
@@ -5401,7 +5605,11 @@ var SelectContent = (0, import_react16.forwardRef)(
|
|
|
5401
5605
|
{
|
|
5402
5606
|
role: "menu",
|
|
5403
5607
|
ref,
|
|
5404
|
-
className:
|
|
5608
|
+
className: cn(
|
|
5609
|
+
"bg-background z-50 min-w-[210px] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md border-border-100",
|
|
5610
|
+
getPositionClasses(),
|
|
5611
|
+
className
|
|
5612
|
+
),
|
|
5405
5613
|
...props,
|
|
5406
5614
|
children
|
|
5407
5615
|
}
|
|
@@ -5608,7 +5816,10 @@ var MenuItem = (0, import_react17.forwardRef)(
|
|
|
5608
5816
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5609
5817
|
"span",
|
|
5610
5818
|
{
|
|
5611
|
-
className:
|
|
5819
|
+
className: cn(
|
|
5820
|
+
"flex flex-row items-center gap-2 px-4 text-text-950 text-xs font-bold",
|
|
5821
|
+
className
|
|
5822
|
+
),
|
|
5612
5823
|
children
|
|
5613
5824
|
}
|
|
5614
5825
|
),
|
|
@@ -5631,10 +5842,10 @@ var MenuItem = (0, import_react17.forwardRef)(
|
|
|
5631
5842
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5632
5843
|
"span",
|
|
5633
5844
|
{
|
|
5634
|
-
className:
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5845
|
+
className: cn(
|
|
5846
|
+
"border-b border-text-600 hover:border-primary-600 text-inherit text-xs",
|
|
5847
|
+
selectedValue === value ? "border-b-0 font-bold" : "border-b-primary-200"
|
|
5848
|
+
),
|
|
5638
5849
|
children
|
|
5639
5850
|
}
|
|
5640
5851
|
),
|
|
@@ -5697,7 +5908,7 @@ var MenuOverflow = ({
|
|
|
5697
5908
|
"div",
|
|
5698
5909
|
{
|
|
5699
5910
|
"data-testid": "menu-overflow-wrapper",
|
|
5700
|
-
className:
|
|
5911
|
+
className: cn("relative w-full overflow-hidden", className),
|
|
5701
5912
|
children: [
|
|
5702
5913
|
showLeftArrow && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
5703
5914
|
"button",
|
|
@@ -5792,12 +6003,12 @@ var Skeleton = (0, import_react18.forwardRef)(
|
|
|
5792
6003
|
"div",
|
|
5793
6004
|
{
|
|
5794
6005
|
ref,
|
|
5795
|
-
className:
|
|
6006
|
+
className: cn("flex flex-col", spacingClass, className),
|
|
5796
6007
|
...props,
|
|
5797
6008
|
children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5798
6009
|
"div",
|
|
5799
6010
|
{
|
|
5800
|
-
className:
|
|
6011
|
+
className: cn(variantClass, animationClass),
|
|
5801
6012
|
style: index === lines - 1 ? { width: "60%" } : void 0
|
|
5802
6013
|
},
|
|
5803
6014
|
index
|
|
@@ -5809,7 +6020,7 @@ var Skeleton = (0, import_react18.forwardRef)(
|
|
|
5809
6020
|
"div",
|
|
5810
6021
|
{
|
|
5811
6022
|
ref,
|
|
5812
|
-
className:
|
|
6023
|
+
className: cn(variantClass, animationClass, className),
|
|
5813
6024
|
style,
|
|
5814
6025
|
...props,
|
|
5815
6026
|
children
|
|
@@ -5837,7 +6048,10 @@ var SkeletonCard = (0, import_react18.forwardRef)(
|
|
|
5837
6048
|
"div",
|
|
5838
6049
|
{
|
|
5839
6050
|
ref,
|
|
5840
|
-
className:
|
|
6051
|
+
className: cn(
|
|
6052
|
+
"w-full p-4 bg-background border border-border-200 rounded-lg",
|
|
6053
|
+
className
|
|
6054
|
+
),
|
|
5841
6055
|
...props,
|
|
5842
6056
|
children: [
|
|
5843
6057
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-start space-x-3", children: [
|
|
@@ -5866,7 +6080,7 @@ var SkeletonList = (0, import_react18.forwardRef)(
|
|
|
5866
6080
|
className = "",
|
|
5867
6081
|
...props
|
|
5868
6082
|
}, ref) => {
|
|
5869
|
-
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { ref, className:
|
|
6083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { ref, className: cn("space-y-3", className), ...props, children: Array.from({ length: items }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-start space-x-3 p-3", children: [
|
|
5870
6084
|
showAvatar && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SkeletonCircle, { width: 32, height: 32 }),
|
|
5871
6085
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex-1 space-y-2", children: [
|
|
5872
6086
|
showTitle && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SkeletonText, { width: "40%", height: 16 }),
|
|
@@ -5877,7 +6091,7 @@ var SkeletonList = (0, import_react18.forwardRef)(
|
|
|
5877
6091
|
);
|
|
5878
6092
|
var SkeletonTable = (0, import_react18.forwardRef)(
|
|
5879
6093
|
({ rows = 5, columns = 4, showHeader = true, className = "", ...props }, ref) => {
|
|
5880
|
-
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { ref, className:
|
|
6094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { ref, className: cn("w-full", className), ...props, children: [
|
|
5881
6095
|
showHeader && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex space-x-2 mb-3", children: Array.from({ length: columns }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5882
6096
|
SkeletonText,
|
|
5883
6097
|
{
|
|
@@ -5945,7 +6159,10 @@ var NotFound = ({
|
|
|
5945
6159
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5946
6160
|
"div",
|
|
5947
6161
|
{
|
|
5948
|
-
className:
|
|
6162
|
+
className: cn(
|
|
6163
|
+
"flex flex-col w-full h-screen items-center justify-center bg-background-50 px-4",
|
|
6164
|
+
className
|
|
6165
|
+
),
|
|
5949
6166
|
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5950
6167
|
"main",
|
|
5951
6168
|
{
|
|
@@ -6288,6 +6505,9 @@ var useQuizStore = (0, import_zustand6.create)()(
|
|
|
6288
6505
|
(set, get) => {
|
|
6289
6506
|
let timerInterval = null;
|
|
6290
6507
|
const startTimer = () => {
|
|
6508
|
+
if (get().isFinished) {
|
|
6509
|
+
return;
|
|
6510
|
+
}
|
|
6291
6511
|
if (timerInterval) {
|
|
6292
6512
|
clearInterval(timerInterval);
|
|
6293
6513
|
}
|
|
@@ -6306,15 +6526,17 @@ var useQuizStore = (0, import_zustand6.create)()(
|
|
|
6306
6526
|
// Initial State
|
|
6307
6527
|
currentQuestionIndex: 0,
|
|
6308
6528
|
selectedAnswers: {},
|
|
6309
|
-
skippedQuestions: [],
|
|
6310
6529
|
userAnswers: [],
|
|
6311
6530
|
timeElapsed: 0,
|
|
6312
6531
|
isStarted: false,
|
|
6313
6532
|
isFinished: false,
|
|
6533
|
+
userId: "",
|
|
6314
6534
|
// Setters
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
|
|
6535
|
+
setBySimulated: (simulado) => set({ bySimulated: simulado }),
|
|
6536
|
+
setByActivity: (atividade) => set({ byActivity: atividade }),
|
|
6537
|
+
setByQuestionary: (aula) => set({ byQuestionary: aula }),
|
|
6538
|
+
setUserId: (userId) => set({ userId }),
|
|
6539
|
+
getUserId: () => get().userId,
|
|
6318
6540
|
// Navigation
|
|
6319
6541
|
goToNextQuestion: () => {
|
|
6320
6542
|
const { currentQuestionIndex, getTotalQuestions } = get();
|
|
@@ -6336,58 +6558,107 @@ var useQuizStore = (0, import_zustand6.create)()(
|
|
|
6336
6558
|
set({ currentQuestionIndex: index });
|
|
6337
6559
|
}
|
|
6338
6560
|
},
|
|
6339
|
-
|
|
6561
|
+
getActiveQuiz: () => {
|
|
6562
|
+
const { bySimulated, byActivity, byQuestionary } = get();
|
|
6563
|
+
if (bySimulated)
|
|
6564
|
+
return { quiz: bySimulated, type: "bySimulated" };
|
|
6565
|
+
if (byActivity)
|
|
6566
|
+
return { quiz: byActivity, type: "byActivity" };
|
|
6567
|
+
if (byQuestionary)
|
|
6568
|
+
return { quiz: byQuestionary, type: "byQuestionary" };
|
|
6569
|
+
return null;
|
|
6570
|
+
},
|
|
6340
6571
|
selectAnswer: (questionId, answerId) => {
|
|
6341
|
-
const {
|
|
6342
|
-
const
|
|
6343
|
-
|
|
6572
|
+
const { getActiveQuiz, userAnswers } = get();
|
|
6573
|
+
const activeQuiz = getActiveQuiz();
|
|
6574
|
+
if (!activeQuiz) return;
|
|
6575
|
+
const updatedQuestions = activeQuiz.quiz.questions.map(
|
|
6576
|
+
(question) => question.id === questionId ? { ...question, answerKey: answerId } : question
|
|
6577
|
+
);
|
|
6578
|
+
const updatedQuiz = {
|
|
6579
|
+
...activeQuiz.quiz,
|
|
6580
|
+
questions: updatedQuestions
|
|
6581
|
+
};
|
|
6582
|
+
const activityId = activeQuiz.quiz.id;
|
|
6583
|
+
const userId = get().getUserId();
|
|
6584
|
+
if (!userId) {
|
|
6585
|
+
console.warn("selectAnswer called before userId is set");
|
|
6586
|
+
return;
|
|
6587
|
+
}
|
|
6588
|
+
const existingAnswerIndex = userAnswers.findIndex(
|
|
6589
|
+
(answer) => answer.questionId === questionId
|
|
6344
6590
|
);
|
|
6591
|
+
const newUserAnswer = {
|
|
6592
|
+
questionId,
|
|
6593
|
+
activityId,
|
|
6594
|
+
userId,
|
|
6595
|
+
answer: answerId,
|
|
6596
|
+
optionId: answerId
|
|
6597
|
+
};
|
|
6598
|
+
let updatedUserAnswers;
|
|
6599
|
+
if (existingAnswerIndex !== -1) {
|
|
6600
|
+
updatedUserAnswers = [...userAnswers];
|
|
6601
|
+
updatedUserAnswers[existingAnswerIndex] = newUserAnswer;
|
|
6602
|
+
} else {
|
|
6603
|
+
updatedUserAnswers = [...userAnswers, newUserAnswer];
|
|
6604
|
+
}
|
|
6345
6605
|
set({
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
[questionId]: answerId
|
|
6349
|
-
},
|
|
6350
|
-
skippedQuestions: newSkippedQuestions
|
|
6606
|
+
[activeQuiz.type]: updatedQuiz,
|
|
6607
|
+
userAnswers: updatedUserAnswers
|
|
6351
6608
|
});
|
|
6352
|
-
addUserAnswer(questionId, answerId);
|
|
6353
6609
|
},
|
|
6354
6610
|
skipQuestion: () => {
|
|
6355
|
-
const { getCurrentQuestion,
|
|
6611
|
+
const { getCurrentQuestion, userAnswers, getActiveQuiz } = get();
|
|
6356
6612
|
const currentQuestion = getCurrentQuestion();
|
|
6613
|
+
const activeQuiz = getActiveQuiz();
|
|
6614
|
+
if (!activeQuiz) return;
|
|
6357
6615
|
if (currentQuestion) {
|
|
6616
|
+
const activityId = activeQuiz.quiz.id;
|
|
6617
|
+
const userId = get().getUserId();
|
|
6618
|
+
const existingAnswerIndex = userAnswers.findIndex(
|
|
6619
|
+
(answer) => answer.questionId === currentQuestion.id
|
|
6620
|
+
);
|
|
6621
|
+
const newUserAnswer = {
|
|
6622
|
+
questionId: currentQuestion.id,
|
|
6623
|
+
activityId,
|
|
6624
|
+
userId,
|
|
6625
|
+
answer: null,
|
|
6626
|
+
optionId: null
|
|
6627
|
+
};
|
|
6628
|
+
let updatedUserAnswers;
|
|
6629
|
+
if (existingAnswerIndex !== -1) {
|
|
6630
|
+
updatedUserAnswers = [...userAnswers];
|
|
6631
|
+
updatedUserAnswers[existingAnswerIndex] = newUserAnswer;
|
|
6632
|
+
} else {
|
|
6633
|
+
updatedUserAnswers = [...userAnswers, newUserAnswer];
|
|
6634
|
+
}
|
|
6358
6635
|
set({
|
|
6359
|
-
|
|
6636
|
+
userAnswers: updatedUserAnswers
|
|
6360
6637
|
});
|
|
6361
|
-
addUserAnswer(currentQuestion.id);
|
|
6362
6638
|
}
|
|
6363
6639
|
},
|
|
6364
6640
|
addUserAnswer: (questionId, answerId) => {
|
|
6365
|
-
const {
|
|
6366
|
-
const
|
|
6367
|
-
|
|
6368
|
-
|
|
6641
|
+
const { getActiveQuiz, userAnswers } = get();
|
|
6642
|
+
const activeQuiz = getActiveQuiz();
|
|
6643
|
+
if (!activeQuiz) return;
|
|
6644
|
+
const activityId = activeQuiz.quiz.id;
|
|
6645
|
+
const userId = get().getUserId();
|
|
6369
6646
|
const existingAnswerIndex = userAnswers.findIndex(
|
|
6370
|
-
(answer) => answer.
|
|
6647
|
+
(answer) => answer.questionId === questionId
|
|
6371
6648
|
);
|
|
6649
|
+
const newUserAnswer = {
|
|
6650
|
+
questionId,
|
|
6651
|
+
activityId,
|
|
6652
|
+
userId,
|
|
6653
|
+
answer: answerId || null,
|
|
6654
|
+
optionId: answerId || null
|
|
6655
|
+
};
|
|
6372
6656
|
if (existingAnswerIndex !== -1) {
|
|
6373
|
-
const
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
answerKey: answerId || "",
|
|
6377
|
-
isSkipped: !answerId
|
|
6378
|
-
};
|
|
6379
|
-
set({ userAnswers: updatedAnswers });
|
|
6657
|
+
const updatedUserAnswers = [...userAnswers];
|
|
6658
|
+
updatedUserAnswers[existingAnswerIndex] = newUserAnswer;
|
|
6659
|
+
set({ userAnswers: updatedUserAnswers });
|
|
6380
6660
|
} else {
|
|
6381
|
-
set({
|
|
6382
|
-
userAnswers: [
|
|
6383
|
-
...userAnswers,
|
|
6384
|
-
{
|
|
6385
|
-
...question,
|
|
6386
|
-
answerKey: answerId || "",
|
|
6387
|
-
isSkipped: !answerId
|
|
6388
|
-
}
|
|
6389
|
-
]
|
|
6390
|
-
});
|
|
6661
|
+
set({ userAnswers: [...userAnswers, newUserAnswer] });
|
|
6391
6662
|
}
|
|
6392
6663
|
},
|
|
6393
6664
|
startQuiz: () => {
|
|
@@ -6403,11 +6674,11 @@ var useQuizStore = (0, import_zustand6.create)()(
|
|
|
6403
6674
|
set({
|
|
6404
6675
|
currentQuestionIndex: 0,
|
|
6405
6676
|
selectedAnswers: {},
|
|
6406
|
-
skippedQuestions: [],
|
|
6407
6677
|
userAnswers: [],
|
|
6408
6678
|
timeElapsed: 0,
|
|
6409
6679
|
isStarted: false,
|
|
6410
|
-
isFinished: false
|
|
6680
|
+
isFinished: false,
|
|
6681
|
+
userId: ""
|
|
6411
6682
|
});
|
|
6412
6683
|
},
|
|
6413
6684
|
// Timer
|
|
@@ -6416,36 +6687,33 @@ var useQuizStore = (0, import_zustand6.create)()(
|
|
|
6416
6687
|
stopTimer,
|
|
6417
6688
|
// Getters
|
|
6418
6689
|
getCurrentQuestion: () => {
|
|
6419
|
-
const {
|
|
6420
|
-
const
|
|
6421
|
-
if (!
|
|
6690
|
+
const { currentQuestionIndex, getActiveQuiz } = get();
|
|
6691
|
+
const activeQuiz = getActiveQuiz();
|
|
6692
|
+
if (!activeQuiz) {
|
|
6422
6693
|
return null;
|
|
6423
6694
|
}
|
|
6424
|
-
return quiz.questions[currentQuestionIndex];
|
|
6695
|
+
return activeQuiz.quiz.questions[currentQuestionIndex];
|
|
6425
6696
|
},
|
|
6426
6697
|
getTotalQuestions: () => {
|
|
6427
|
-
const {
|
|
6428
|
-
const
|
|
6429
|
-
return quiz?.questions?.length || 0;
|
|
6698
|
+
const { getActiveQuiz } = get();
|
|
6699
|
+
const activeQuiz = getActiveQuiz();
|
|
6700
|
+
return activeQuiz?.quiz?.questions?.length || 0;
|
|
6430
6701
|
},
|
|
6431
6702
|
getAnsweredQuestions: () => {
|
|
6432
|
-
const {
|
|
6433
|
-
return
|
|
6703
|
+
const { userAnswers } = get();
|
|
6704
|
+
return userAnswers.filter((answer) => answer.answer !== null).length;
|
|
6434
6705
|
},
|
|
6435
6706
|
getUnansweredQuestions: () => {
|
|
6436
|
-
const {
|
|
6437
|
-
|
|
6438
|
-
|
|
6439
|
-
byAula,
|
|
6440
|
-
selectedAnswers,
|
|
6441
|
-
skippedQuestions
|
|
6442
|
-
} = get();
|
|
6443
|
-
const quiz = bySimulado || byAtividade || byAula;
|
|
6444
|
-
if (!quiz) return [];
|
|
6707
|
+
const { getActiveQuiz, userAnswers } = get();
|
|
6708
|
+
const activeQuiz = getActiveQuiz();
|
|
6709
|
+
if (!activeQuiz) return [];
|
|
6445
6710
|
const unansweredQuestions = [];
|
|
6446
|
-
quiz.questions.forEach((question, index) => {
|
|
6447
|
-
const
|
|
6448
|
-
|
|
6711
|
+
activeQuiz.quiz.questions.forEach((question, index) => {
|
|
6712
|
+
const userAnswer = userAnswers.find(
|
|
6713
|
+
(answer) => answer.questionId === question.id
|
|
6714
|
+
);
|
|
6715
|
+
const isAnswered = userAnswer && userAnswer.answer !== null;
|
|
6716
|
+
const isSkipped = userAnswer && userAnswer.answer === null;
|
|
6449
6717
|
if (!isAnswered && !isSkipped) {
|
|
6450
6718
|
unansweredQuestions.push(index + 1);
|
|
6451
6719
|
}
|
|
@@ -6453,8 +6721,8 @@ var useQuizStore = (0, import_zustand6.create)()(
|
|
|
6453
6721
|
return unansweredQuestions;
|
|
6454
6722
|
},
|
|
6455
6723
|
getSkippedQuestions: () => {
|
|
6456
|
-
const {
|
|
6457
|
-
return
|
|
6724
|
+
const { userAnswers } = get();
|
|
6725
|
+
return userAnswers.filter((answer) => answer.answer === null).length;
|
|
6458
6726
|
},
|
|
6459
6727
|
getProgress: () => {
|
|
6460
6728
|
const { getTotalQuestions, getAnsweredQuestions } = get();
|
|
@@ -6463,22 +6731,32 @@ var useQuizStore = (0, import_zustand6.create)()(
|
|
|
6463
6731
|
return total > 0 ? answered / total * 100 : 0;
|
|
6464
6732
|
},
|
|
6465
6733
|
isQuestionAnswered: (questionId) => {
|
|
6466
|
-
const {
|
|
6467
|
-
|
|
6734
|
+
const { userAnswers } = get();
|
|
6735
|
+
const userAnswer = userAnswers.find(
|
|
6736
|
+
(answer) => answer.questionId === questionId
|
|
6737
|
+
);
|
|
6738
|
+
return userAnswer ? userAnswer.answer !== null : false;
|
|
6468
6739
|
},
|
|
6469
6740
|
isQuestionSkipped: (questionId) => {
|
|
6470
|
-
const {
|
|
6471
|
-
|
|
6741
|
+
const { userAnswers } = get();
|
|
6742
|
+
const userAnswer = userAnswers.find(
|
|
6743
|
+
(answer) => answer.questionId === questionId
|
|
6744
|
+
);
|
|
6745
|
+
return userAnswer ? userAnswer.answer === null : false;
|
|
6472
6746
|
},
|
|
6473
6747
|
getCurrentAnswer: () => {
|
|
6474
|
-
const { getCurrentQuestion,
|
|
6748
|
+
const { getCurrentQuestion, userAnswers } = get();
|
|
6475
6749
|
const currentQuestion = getCurrentQuestion();
|
|
6476
|
-
|
|
6750
|
+
if (!currentQuestion) return void 0;
|
|
6751
|
+
const userAnswer = userAnswers.find(
|
|
6752
|
+
(answer) => answer.questionId === currentQuestion.id
|
|
6753
|
+
);
|
|
6754
|
+
return userAnswer?.answer;
|
|
6477
6755
|
},
|
|
6478
6756
|
getQuizTitle: () => {
|
|
6479
|
-
const {
|
|
6480
|
-
const
|
|
6481
|
-
return quiz?.title || "Quiz";
|
|
6757
|
+
const { getActiveQuiz } = get();
|
|
6758
|
+
const activeQuiz = getActiveQuiz();
|
|
6759
|
+
return activeQuiz?.quiz?.title || "Quiz";
|
|
6482
6760
|
},
|
|
6483
6761
|
formatTime: (seconds) => {
|
|
6484
6762
|
const minutes = Math.floor(seconds / 60);
|
|
@@ -6486,30 +6764,42 @@ var useQuizStore = (0, import_zustand6.create)()(
|
|
|
6486
6764
|
return `${minutes.toString().padStart(2, "0")}:${remainingSeconds.toString().padStart(2, "0")}`;
|
|
6487
6765
|
},
|
|
6488
6766
|
getUserAnswers: () => {
|
|
6489
|
-
const { userAnswers } = get();
|
|
6490
|
-
|
|
6767
|
+
const { getActiveQuiz, userAnswers } = get();
|
|
6768
|
+
const activeQuiz = getActiveQuiz();
|
|
6769
|
+
if (!activeQuiz) return [];
|
|
6770
|
+
return activeQuiz.quiz.questions.map((question) => {
|
|
6771
|
+
const userAnswer = userAnswers.find(
|
|
6772
|
+
(answer) => answer.questionId === question.id
|
|
6773
|
+
);
|
|
6774
|
+
return {
|
|
6775
|
+
...question,
|
|
6776
|
+
isSkipped: userAnswer ? userAnswer.answer === null : false
|
|
6777
|
+
};
|
|
6778
|
+
});
|
|
6491
6779
|
},
|
|
6492
6780
|
getUnansweredQuestionsFromUserAnswers: () => {
|
|
6493
|
-
const {
|
|
6494
|
-
const
|
|
6495
|
-
if (!
|
|
6781
|
+
const { getActiveQuiz, userAnswers } = get();
|
|
6782
|
+
const activeQuiz = getActiveQuiz();
|
|
6783
|
+
if (!activeQuiz) return [];
|
|
6496
6784
|
const unansweredQuestions = [];
|
|
6497
|
-
quiz.questions.forEach((question, index) => {
|
|
6785
|
+
activeQuiz.quiz.questions.forEach((question, index) => {
|
|
6498
6786
|
const userAnswer = userAnswers.find(
|
|
6499
|
-
(answer) => answer.
|
|
6787
|
+
(answer) => answer.questionId === question.id
|
|
6500
6788
|
);
|
|
6501
|
-
|
|
6789
|
+
const hasAnswer = userAnswer && userAnswer.answer !== null;
|
|
6790
|
+
const isSkipped = userAnswer && userAnswer.answer === null;
|
|
6791
|
+
if (!hasAnswer || isSkipped) {
|
|
6502
6792
|
unansweredQuestions.push(index + 1);
|
|
6503
6793
|
}
|
|
6504
6794
|
});
|
|
6505
6795
|
return unansweredQuestions;
|
|
6506
6796
|
},
|
|
6507
6797
|
getQuestionsGroupedBySubject: () => {
|
|
6508
|
-
const {
|
|
6509
|
-
const
|
|
6510
|
-
if (!
|
|
6798
|
+
const { getActiveQuiz } = get();
|
|
6799
|
+
const activeQuiz = getActiveQuiz();
|
|
6800
|
+
if (!activeQuiz) return {};
|
|
6511
6801
|
const groupedQuestions = {};
|
|
6512
|
-
quiz.questions.forEach((question) => {
|
|
6802
|
+
activeQuiz.quiz.questions.forEach((question) => {
|
|
6513
6803
|
const subjectId = question.knowledgeMatrix?.[0]?.subjectId || "Sem mat\xE9ria";
|
|
6514
6804
|
if (!groupedQuestions[subjectId]) {
|
|
6515
6805
|
groupedQuestions[subjectId] = [];
|
|
@@ -6517,6 +6807,31 @@ var useQuizStore = (0, import_zustand6.create)()(
|
|
|
6517
6807
|
groupedQuestions[subjectId].push(question);
|
|
6518
6808
|
});
|
|
6519
6809
|
return groupedQuestions;
|
|
6810
|
+
},
|
|
6811
|
+
// New methods for userAnswers
|
|
6812
|
+
getUserAnswerByQuestionId: (questionId) => {
|
|
6813
|
+
const { userAnswers } = get();
|
|
6814
|
+
return userAnswers.find((answer) => answer.questionId === questionId) || null;
|
|
6815
|
+
},
|
|
6816
|
+
isQuestionAnsweredByUserAnswers: (questionId) => {
|
|
6817
|
+
const { userAnswers } = get();
|
|
6818
|
+
const answer = userAnswers.find(
|
|
6819
|
+
(answer2) => answer2.questionId === questionId
|
|
6820
|
+
);
|
|
6821
|
+
return answer ? answer.answer !== null : false;
|
|
6822
|
+
},
|
|
6823
|
+
getQuestionStatusFromUserAnswers: (questionId) => {
|
|
6824
|
+
const { userAnswers } = get();
|
|
6825
|
+
const answer = userAnswers.find(
|
|
6826
|
+
(answer2) => answer2.questionId === questionId
|
|
6827
|
+
);
|
|
6828
|
+
if (!answer) return "unanswered";
|
|
6829
|
+
if (answer.answer === null) return "skipped";
|
|
6830
|
+
return "answered";
|
|
6831
|
+
},
|
|
6832
|
+
getUserAnswersForActivity: () => {
|
|
6833
|
+
const { userAnswers } = get();
|
|
6834
|
+
return userAnswers;
|
|
6520
6835
|
}
|
|
6521
6836
|
};
|
|
6522
6837
|
},
|
|
@@ -6536,12 +6851,39 @@ var Quiz = (0, import_react22.forwardRef)(({ children, className, ...props }, re
|
|
|
6536
6851
|
"div",
|
|
6537
6852
|
{
|
|
6538
6853
|
ref,
|
|
6539
|
-
className:
|
|
6854
|
+
className: cn(
|
|
6855
|
+
"w-full max-w-[1000px] flex flex-col mx-auto h-full relative not-lg:px-6",
|
|
6856
|
+
className
|
|
6857
|
+
),
|
|
6540
6858
|
...props,
|
|
6541
6859
|
children
|
|
6542
6860
|
}
|
|
6543
6861
|
);
|
|
6544
6862
|
});
|
|
6863
|
+
var QuizHeaderResult = (0, import_react22.forwardRef)(
|
|
6864
|
+
({ className, ...props }, ref) => {
|
|
6865
|
+
const { getCurrentQuestion, getCurrentAnswer } = useQuizStore();
|
|
6866
|
+
const currentQuestion = getCurrentQuestion();
|
|
6867
|
+
const userAnswer = getCurrentAnswer();
|
|
6868
|
+
const isCorrect = userAnswer === currentQuestion?.correctOptionId;
|
|
6869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
6870
|
+
"div",
|
|
6871
|
+
{
|
|
6872
|
+
ref,
|
|
6873
|
+
className: cn(
|
|
6874
|
+
"flex flex-row items-center gap-10 p-3.5 rounded-xl",
|
|
6875
|
+
isCorrect ? "bg-success-background" : "bg-error-background",
|
|
6876
|
+
className
|
|
6877
|
+
),
|
|
6878
|
+
...props,
|
|
6879
|
+
children: [
|
|
6880
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-text-950 font-bold text-lg", children: "Resultado" }),
|
|
6881
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-text-700 text-md", children: isCorrect ? "\u{1F389} Parab\xE9ns!!" : "N\xE3o foi dessa vez..." })
|
|
6882
|
+
]
|
|
6883
|
+
}
|
|
6884
|
+
);
|
|
6885
|
+
}
|
|
6886
|
+
);
|
|
6545
6887
|
var QuizTitle = (0, import_react22.forwardRef)(
|
|
6546
6888
|
({ className, ...props }, ref) => {
|
|
6547
6889
|
const {
|
|
@@ -6558,7 +6900,10 @@ var QuizTitle = (0, import_react22.forwardRef)(
|
|
|
6558
6900
|
"div",
|
|
6559
6901
|
{
|
|
6560
6902
|
ref,
|
|
6561
|
-
className:
|
|
6903
|
+
className: cn(
|
|
6904
|
+
"flex flex-row justify-center items-center relative p-2",
|
|
6905
|
+
className
|
|
6906
|
+
),
|
|
6562
6907
|
...props,
|
|
6563
6908
|
children: [
|
|
6564
6909
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { className: "flex flex-col gap-2 text-center", children: [
|
|
@@ -6590,30 +6935,46 @@ var QuizContent = (0, import_react22.forwardRef)(({ type = "Alternativas", child
|
|
|
6590
6935
|
"div",
|
|
6591
6936
|
{
|
|
6592
6937
|
ref,
|
|
6593
|
-
className:
|
|
6938
|
+
className: cn(
|
|
6939
|
+
"rounded-t-xl px-4 pt-4 pb-[80px] h-full flex flex-col gap-4 mb-auto",
|
|
6940
|
+
className
|
|
6941
|
+
),
|
|
6594
6942
|
...props,
|
|
6595
6943
|
children
|
|
6596
6944
|
}
|
|
6597
6945
|
)
|
|
6598
6946
|
] });
|
|
6599
6947
|
});
|
|
6600
|
-
var QuizAlternative = () => {
|
|
6948
|
+
var QuizAlternative = ({ variant = "default" }) => {
|
|
6601
6949
|
const { getCurrentQuestion, selectAnswer, getCurrentAnswer } = useQuizStore();
|
|
6602
6950
|
const currentQuestion = getCurrentQuestion();
|
|
6603
6951
|
const currentAnswer = getCurrentAnswer();
|
|
6604
|
-
const alternatives = currentQuestion?.options?.map((option) =>
|
|
6605
|
-
|
|
6606
|
-
|
|
6607
|
-
|
|
6952
|
+
const alternatives = currentQuestion?.options?.map((option) => {
|
|
6953
|
+
let status = "neutral" /* NEUTRAL */;
|
|
6954
|
+
if (variant === "result") {
|
|
6955
|
+
if (option.id === currentQuestion.correctOptionId) {
|
|
6956
|
+
status = "correct" /* CORRECT */;
|
|
6957
|
+
} else if (currentAnswer === option.id && option.id !== currentQuestion.correctOptionId) {
|
|
6958
|
+
status = "incorrect" /* INCORRECT */;
|
|
6959
|
+
}
|
|
6960
|
+
}
|
|
6961
|
+
return {
|
|
6962
|
+
label: option.option,
|
|
6963
|
+
value: option.id,
|
|
6964
|
+
status
|
|
6965
|
+
};
|
|
6966
|
+
});
|
|
6608
6967
|
if (!alternatives)
|
|
6609
6968
|
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { children: "N\xE3o h\xE1 Alternativas" }) });
|
|
6610
6969
|
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
6611
6970
|
AlternativesList,
|
|
6612
6971
|
{
|
|
6972
|
+
mode: variant === "default" ? "interactive" : "readonly",
|
|
6613
6973
|
name: `question-${currentQuestion?.id || "1"}`,
|
|
6614
|
-
layout: "
|
|
6974
|
+
layout: "compact",
|
|
6615
6975
|
alternatives,
|
|
6616
6976
|
value: currentAnswer,
|
|
6977
|
+
selectedValue: currentAnswer,
|
|
6617
6978
|
onValueChange: (value) => {
|
|
6618
6979
|
if (currentQuestion) {
|
|
6619
6980
|
selectAnswer(currentQuestion.id, value);
|
|
@@ -6630,18 +6991,11 @@ var QuizQuestionList = ({
|
|
|
6630
6991
|
const {
|
|
6631
6992
|
getQuestionsGroupedBySubject,
|
|
6632
6993
|
goToQuestion,
|
|
6633
|
-
|
|
6634
|
-
isQuestionSkipped
|
|
6994
|
+
getQuestionStatusFromUserAnswers
|
|
6635
6995
|
} = useQuizStore();
|
|
6636
6996
|
const groupedQuestions = getQuestionsGroupedBySubject();
|
|
6637
6997
|
const getQuestionStatus = (questionId) => {
|
|
6638
|
-
|
|
6639
|
-
return "skipped";
|
|
6640
|
-
}
|
|
6641
|
-
if (isQuestionAnswered(questionId)) {
|
|
6642
|
-
return "answered";
|
|
6643
|
-
}
|
|
6644
|
-
return "unanswered";
|
|
6998
|
+
return getQuestionStatusFromUserAnswers(questionId);
|
|
6645
6999
|
};
|
|
6646
7000
|
const filteredGroupedQuestions = Object.entries(groupedQuestions).reduce(
|
|
6647
7001
|
(acc, [subjectId, questions]) => {
|
|
@@ -6665,8 +7019,8 @@ var QuizQuestionList = ({
|
|
|
6665
7019
|
{}
|
|
6666
7020
|
);
|
|
6667
7021
|
const getQuestionIndex = (questionId) => {
|
|
6668
|
-
const {
|
|
6669
|
-
const quiz =
|
|
7022
|
+
const { bySimulated, byActivity, byQuestionary } = useQuizStore.getState();
|
|
7023
|
+
const quiz = bySimulated ?? byActivity ?? byQuestionary;
|
|
6670
7024
|
if (!quiz) return 0;
|
|
6671
7025
|
const index = quiz.questions.findIndex((q) => q.id === questionId);
|
|
6672
7026
|
return index + 1;
|
|
@@ -6676,7 +7030,7 @@ var QuizQuestionList = ({
|
|
|
6676
7030
|
case "answered":
|
|
6677
7031
|
return "Respondida";
|
|
6678
7032
|
case "skipped":
|
|
6679
|
-
return "
|
|
7033
|
+
return "N\xE3o respondida";
|
|
6680
7034
|
default:
|
|
6681
7035
|
return "Em branco";
|
|
6682
7036
|
}
|
|
@@ -6717,14 +7071,14 @@ var QuizFooter = (0, import_react22.forwardRef)(({ className, onGoToSimulated, o
|
|
|
6717
7071
|
getCurrentAnswer,
|
|
6718
7072
|
skipQuestion,
|
|
6719
7073
|
getCurrentQuestion,
|
|
6720
|
-
|
|
7074
|
+
getQuestionStatusFromUserAnswers
|
|
6721
7075
|
} = useQuizStore();
|
|
6722
7076
|
const totalQuestions = getTotalQuestions();
|
|
6723
7077
|
const isFirstQuestion = currentQuestionIndex === 0;
|
|
6724
7078
|
const isLastQuestion = currentQuestionIndex === totalQuestions - 1;
|
|
6725
7079
|
const currentAnswer = getCurrentAnswer();
|
|
6726
7080
|
const currentQuestion = getCurrentQuestion();
|
|
6727
|
-
const isCurrentQuestionSkipped = currentQuestion ?
|
|
7081
|
+
const isCurrentQuestionSkipped = currentQuestion ? getQuestionStatusFromUserAnswers(currentQuestion.id) === "skipped" : false;
|
|
6728
7082
|
const [alertDialogOpen, setAlertDialogOpen] = (0, import_react22.useState)(false);
|
|
6729
7083
|
const [modalResultOpen, setModalResultOpen] = (0, import_react22.useState)(false);
|
|
6730
7084
|
const [modalNavigateOpen, setModalNavigateOpen] = (0, import_react22.useState)(false);
|
|
@@ -6737,7 +7091,10 @@ var QuizFooter = (0, import_react22.forwardRef)(({ className, onGoToSimulated, o
|
|
|
6737
7091
|
"footer",
|
|
6738
7092
|
{
|
|
6739
7093
|
ref,
|
|
6740
|
-
className:
|
|
7094
|
+
className: cn(
|
|
7095
|
+
"w-full px-2 bg-background lg:max-w-[1000px] not-lg:max-w-[calc(100vw-32px)] border-t border-border-50 fixed bottom-0 min-h-[80px] flex flex-row justify-between items-center",
|
|
7096
|
+
className
|
|
7097
|
+
),
|
|
6741
7098
|
...props,
|
|
6742
7099
|
children: [
|
|
6743
7100
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-row items-center gap-1", children: [
|
|
@@ -6914,6 +7271,223 @@ var QuizFooter = (0, import_react22.forwardRef)(({ className, onGoToSimulated, o
|
|
|
6914
7271
|
)
|
|
6915
7272
|
] });
|
|
6916
7273
|
});
|
|
7274
|
+
var QuizResultHeaderTitle = (0, import_react22.forwardRef)(({ className, ...props }, ref) => {
|
|
7275
|
+
const { bySimulated } = useQuizStore();
|
|
7276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
7277
|
+
"div",
|
|
7278
|
+
{
|
|
7279
|
+
ref,
|
|
7280
|
+
className: cn("flex flex-row pt-4 justify-between", className),
|
|
7281
|
+
...props,
|
|
7282
|
+
children: [
|
|
7283
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-text-950 font-bold text-2xl", children: "Resultado" }),
|
|
7284
|
+
bySimulated && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Badge_default, { variant: "solid", action: "info", children: bySimulated.category })
|
|
7285
|
+
]
|
|
7286
|
+
}
|
|
7287
|
+
);
|
|
7288
|
+
});
|
|
7289
|
+
var QuizResultTitle = (0, import_react22.forwardRef)(({ className, ...props }, ref) => {
|
|
7290
|
+
const { getQuizTitle } = useQuizStore();
|
|
7291
|
+
const quizTitle = getQuizTitle();
|
|
7292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
7293
|
+
"p",
|
|
7294
|
+
{
|
|
7295
|
+
className: cn("pt-6 pb-4 text-text-950 font-bold text-lg", className),
|
|
7296
|
+
ref,
|
|
7297
|
+
...props,
|
|
7298
|
+
children: quizTitle
|
|
7299
|
+
}
|
|
7300
|
+
);
|
|
7301
|
+
});
|
|
7302
|
+
var QuizResultPerformance = (0, import_react22.forwardRef)(
|
|
7303
|
+
({ ...props }, ref) => {
|
|
7304
|
+
const {
|
|
7305
|
+
getTotalQuestions,
|
|
7306
|
+
timeElapsed,
|
|
7307
|
+
formatTime,
|
|
7308
|
+
bySimulated,
|
|
7309
|
+
byActivity,
|
|
7310
|
+
byQuestionary
|
|
7311
|
+
} = useQuizStore();
|
|
7312
|
+
const totalQuestions = getTotalQuestions();
|
|
7313
|
+
const quiz = bySimulated || byActivity || byQuestionary;
|
|
7314
|
+
let correctAnswers = 0;
|
|
7315
|
+
let correctEasyAnswers = 0;
|
|
7316
|
+
let correctMediumAnswers = 0;
|
|
7317
|
+
let correctDifficultAnswers = 0;
|
|
7318
|
+
let totalEasyQuestions = 0;
|
|
7319
|
+
let totalMediumQuestions = 0;
|
|
7320
|
+
let totalDifficultQuestions = 0;
|
|
7321
|
+
if (quiz) {
|
|
7322
|
+
quiz.questions.forEach((question) => {
|
|
7323
|
+
const userAnswer = question.answerKey;
|
|
7324
|
+
const isCorrect = userAnswer && userAnswer === question.correctOptionId;
|
|
7325
|
+
if (isCorrect) {
|
|
7326
|
+
correctAnswers++;
|
|
7327
|
+
}
|
|
7328
|
+
if (question.difficulty === "FACIL" /* FACIL */) {
|
|
7329
|
+
totalEasyQuestions++;
|
|
7330
|
+
if (isCorrect) {
|
|
7331
|
+
correctEasyAnswers++;
|
|
7332
|
+
}
|
|
7333
|
+
} else if (question.difficulty === "MEDIO" /* MEDIO */) {
|
|
7334
|
+
totalMediumQuestions++;
|
|
7335
|
+
if (isCorrect) {
|
|
7336
|
+
correctMediumAnswers++;
|
|
7337
|
+
}
|
|
7338
|
+
} else if (question.difficulty === "DIFICIL" /* DIFICIL */) {
|
|
7339
|
+
totalDifficultQuestions++;
|
|
7340
|
+
if (isCorrect) {
|
|
7341
|
+
correctDifficultAnswers++;
|
|
7342
|
+
}
|
|
7343
|
+
}
|
|
7344
|
+
});
|
|
7345
|
+
}
|
|
7346
|
+
const percentage = totalQuestions > 0 ? Math.round(correctAnswers / totalQuestions * 100) : 0;
|
|
7347
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
7348
|
+
"div",
|
|
7349
|
+
{
|
|
7350
|
+
className: "flex flex-row gap-6 p-6 rounded-xl bg-background justify-between",
|
|
7351
|
+
ref,
|
|
7352
|
+
...props,
|
|
7353
|
+
children: [
|
|
7354
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "relative", children: [
|
|
7355
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
7356
|
+
ProgressCircle_default,
|
|
7357
|
+
{
|
|
7358
|
+
size: "medium",
|
|
7359
|
+
variant: "green",
|
|
7360
|
+
value: percentage,
|
|
7361
|
+
showPercentage: false,
|
|
7362
|
+
label: ""
|
|
7363
|
+
}
|
|
7364
|
+
),
|
|
7365
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
7366
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-1 mb-1", children: [
|
|
7367
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_phosphor_react16.Clock, { size: 12, weight: "regular", className: "text-text-800" }),
|
|
7368
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-2xs font-medium text-text-800", children: formatTime(timeElapsed) })
|
|
7369
|
+
] }),
|
|
7370
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "text-2xl font-medium text-text-800 leading-7", children: [
|
|
7371
|
+
correctAnswers,
|
|
7372
|
+
" de ",
|
|
7373
|
+
totalQuestions
|
|
7374
|
+
] }),
|
|
7375
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "text-2xs font-medium text-text-600 mt-1", children: "Corretas" })
|
|
7376
|
+
] })
|
|
7377
|
+
] }),
|
|
7378
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col gap-4 w-full", children: [
|
|
7379
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
7380
|
+
ProgressBar_default,
|
|
7381
|
+
{
|
|
7382
|
+
className: "w-full",
|
|
7383
|
+
layout: "stacked",
|
|
7384
|
+
variant: "green",
|
|
7385
|
+
value: correctEasyAnswers,
|
|
7386
|
+
max: totalEasyQuestions,
|
|
7387
|
+
label: "F\xE1ceis",
|
|
7388
|
+
showHitCount: true,
|
|
7389
|
+
labelClassName: "text-base font-medium text-text-800 leading-none",
|
|
7390
|
+
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
7391
|
+
}
|
|
7392
|
+
),
|
|
7393
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
7394
|
+
ProgressBar_default,
|
|
7395
|
+
{
|
|
7396
|
+
className: "w-full",
|
|
7397
|
+
layout: "stacked",
|
|
7398
|
+
variant: "green",
|
|
7399
|
+
value: correctMediumAnswers,
|
|
7400
|
+
max: totalMediumQuestions,
|
|
7401
|
+
label: "M\xE9dias",
|
|
7402
|
+
showHitCount: true,
|
|
7403
|
+
labelClassName: "text-base font-medium text-text-800 leading-none",
|
|
7404
|
+
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
7405
|
+
}
|
|
7406
|
+
),
|
|
7407
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
7408
|
+
ProgressBar_default,
|
|
7409
|
+
{
|
|
7410
|
+
className: "w-full",
|
|
7411
|
+
layout: "stacked",
|
|
7412
|
+
variant: "green",
|
|
7413
|
+
value: correctDifficultAnswers,
|
|
7414
|
+
max: totalDifficultQuestions,
|
|
7415
|
+
label: "Dif\xEDceis",
|
|
7416
|
+
showHitCount: true,
|
|
7417
|
+
labelClassName: "text-base font-medium text-text-800 leading-none",
|
|
7418
|
+
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
7419
|
+
}
|
|
7420
|
+
)
|
|
7421
|
+
] })
|
|
7422
|
+
]
|
|
7423
|
+
}
|
|
7424
|
+
);
|
|
7425
|
+
}
|
|
7426
|
+
);
|
|
7427
|
+
var QuizListResult = (0, import_react22.forwardRef)(({ className, onSubjectClick, ...props }, ref) => {
|
|
7428
|
+
const { getQuestionsGroupedBySubject, isQuestionAnswered } = useQuizStore();
|
|
7429
|
+
const groupedQuestions = getQuestionsGroupedBySubject();
|
|
7430
|
+
const subjectsStats = Object.entries(groupedQuestions).map(
|
|
7431
|
+
([subjectId, questions]) => {
|
|
7432
|
+
let correct = 0;
|
|
7433
|
+
let incorrect = 0;
|
|
7434
|
+
questions.forEach((question) => {
|
|
7435
|
+
if (isQuestionAnswered(question.id)) {
|
|
7436
|
+
const userAnswer = question.answerKey;
|
|
7437
|
+
if (userAnswer === question.correctOptionId) {
|
|
7438
|
+
correct++;
|
|
7439
|
+
} else {
|
|
7440
|
+
incorrect++;
|
|
7441
|
+
}
|
|
7442
|
+
}
|
|
7443
|
+
});
|
|
7444
|
+
return {
|
|
7445
|
+
subject: subjectId,
|
|
7446
|
+
correct,
|
|
7447
|
+
incorrect,
|
|
7448
|
+
total: questions.length
|
|
7449
|
+
};
|
|
7450
|
+
}
|
|
7451
|
+
);
|
|
7452
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("section", { ref, className, ...props, children: [
|
|
7453
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Mat\xE9rias" }),
|
|
7454
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("ul", { className: "flex flex-col gap-2", children: subjectsStats.map((subject) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
7455
|
+
CardResults,
|
|
7456
|
+
{
|
|
7457
|
+
onClick: () => onSubjectClick?.(subject.subject),
|
|
7458
|
+
className: "max-w-full",
|
|
7459
|
+
header: subject.subject,
|
|
7460
|
+
correct_answers: subject.correct,
|
|
7461
|
+
incorrect_answers: subject.incorrect,
|
|
7462
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_phosphor_react16.Book, { size: 20 }),
|
|
7463
|
+
direction: "row"
|
|
7464
|
+
}
|
|
7465
|
+
) }, subject.subject)) })
|
|
7466
|
+
] });
|
|
7467
|
+
});
|
|
7468
|
+
var QuizListResultByMateria = ({
|
|
7469
|
+
subject,
|
|
7470
|
+
onQuestionClick
|
|
7471
|
+
}) => {
|
|
7472
|
+
const { getQuestionsGroupedBySubject } = useQuizStore();
|
|
7473
|
+
const groupedQuestions = getQuestionsGroupedBySubject();
|
|
7474
|
+
const answeredQuestions = groupedQuestions[subject] || [];
|
|
7475
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "w-full max-w-[1000px] flex flex-col mx-auto h-full relative not-lg:px-6", children: [
|
|
7476
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex flex-row pt-4 justify-between", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-text-950 font-bold text-2xl", children: subject }) }),
|
|
7477
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("section", { className: "flex flex-col ", children: [
|
|
7478
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Resultado das quest\xF5es" }),
|
|
7479
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("ul", { className: "flex flex-col gap-2 pt-4", children: answeredQuestions.map((question) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
7480
|
+
CardStatus,
|
|
7481
|
+
{
|
|
7482
|
+
className: "max-w-full",
|
|
7483
|
+
header: `Quest\xE3o ${question.id}`,
|
|
7484
|
+
status: question.answerKey === question.correctOptionId ? "correct" : "incorrect",
|
|
7485
|
+
onClick: () => onQuestionClick?.(question)
|
|
7486
|
+
}
|
|
7487
|
+
) }, question.id)) })
|
|
7488
|
+
] })
|
|
7489
|
+
] });
|
|
7490
|
+
};
|
|
6917
7491
|
// Annotate the CommonJS export names for ESM import in node:
|
|
6918
7492
|
0 && (module.exports = {
|
|
6919
7493
|
Alert,
|
|
@@ -6966,7 +7540,11 @@ var QuizFooter = (0, import_react22.forwardRef)(({ className, onGoToSimulated, o
|
|
|
6966
7540
|
QuizContent,
|
|
6967
7541
|
QuizFooter,
|
|
6968
7542
|
QuizHeader,
|
|
7543
|
+
QuizListResultByMateria,
|
|
6969
7544
|
QuizQuestionList,
|
|
7545
|
+
QuizResultHeaderTitle,
|
|
7546
|
+
QuizResultPerformance,
|
|
7547
|
+
QuizResultTitle,
|
|
6970
7548
|
QuizTitle,
|
|
6971
7549
|
Radio,
|
|
6972
7550
|
RadioGroup,
|