analytica-frontend-lib 1.2.67 → 1.2.69
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/ActivityCardQuestionBanks/index.js +827 -244
- package/dist/ActivityCardQuestionBanks/index.js.map +1 -1
- package/dist/ActivityCardQuestionBanks/index.mjs +828 -237
- package/dist/ActivityCardQuestionBanks/index.mjs.map +1 -1
- package/dist/ActivityCardQuestionPreview/index.js +650 -67
- package/dist/ActivityCardQuestionPreview/index.js.map +1 -1
- package/dist/ActivityCardQuestionPreview/index.mjs +655 -64
- package/dist/ActivityCardQuestionPreview/index.mjs.map +1 -1
- package/dist/ActivityDetails/index.d.ts +6 -4
- package/dist/ActivityDetails/index.d.ts.map +1 -1
- package/dist/ActivityDetails/index.js +2381 -1007
- package/dist/ActivityDetails/index.js.map +1 -1
- package/dist/ActivityDetails/index.mjs +2352 -953
- package/dist/ActivityDetails/index.mjs.map +1 -1
- package/dist/ActivityPreview/index.js +1175 -592
- package/dist/ActivityPreview/index.js.map +1 -1
- package/dist/ActivityPreview/index.mjs +1171 -580
- package/dist/ActivityPreview/index.mjs.map +1 -1
- package/dist/CorrectActivityModal/index.d.ts +4 -2
- package/dist/CorrectActivityModal/index.d.ts.map +1 -1
- package/dist/CorrectActivityModal/index.js +1999 -527
- package/dist/CorrectActivityModal/index.js.map +1 -1
- package/dist/CorrectActivityModal/index.mjs +2030 -529
- package/dist/CorrectActivityModal/index.mjs.map +1 -1
- package/dist/Quiz/index.js +2 -0
- package/dist/Quiz/index.js.map +1 -1
- package/dist/Quiz/index.mjs +2 -0
- package/dist/Quiz/index.mjs.map +1 -1
- package/dist/hooks/useSendActivity/index.d.ts +47 -0
- package/dist/hooks/useSendActivity/index.d.ts.map +1 -0
- package/dist/hooks/useSendActivity/index.js +194 -0
- package/dist/hooks/useSendActivity/index.js.map +1 -0
- package/dist/hooks/useSendActivity/index.mjs +159 -0
- package/dist/hooks/useSendActivity/index.mjs.map +1 -0
- package/dist/hooks/useSendActivity.d.ts +47 -0
- package/dist/hooks/useSendActivity.d.ts.map +1 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10284 -9202
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10170 -9087
- package/dist/index.mjs.map +1 -1
- package/dist/types/activities/index.d.ts +81 -0
- package/dist/types/activities/index.d.ts.map +1 -0
- package/dist/types/activities/index.js +52 -0
- package/dist/types/activities/index.js.map +1 -0
- package/dist/types/activities/index.mjs +25 -0
- package/dist/types/activities/index.mjs.map +1 -0
- package/dist/types/activities.d.ts +81 -0
- package/dist/types/activities.d.ts.map +1 -0
- package/dist/types/sendActivity/index.d.ts +127 -0
- package/dist/types/sendActivity/index.d.ts.map +1 -0
- package/dist/types/sendActivity/index.js +19 -0
- package/dist/types/sendActivity/index.js.map +1 -0
- package/dist/types/sendActivity/index.mjs +1 -0
- package/dist/types/sendActivity/index.mjs.map +1 -0
- package/dist/types/sendActivity.d.ts +127 -0
- package/dist/types/sendActivity.d.ts.map +1 -0
- package/dist/utils/questionRenderer/alternative/index.d.ts +8 -0
- package/dist/utils/questionRenderer/alternative/index.d.ts.map +1 -0
- package/dist/utils/questionRenderer/components/index.d.ts +25 -0
- package/dist/utils/questionRenderer/components/index.d.ts.map +1 -0
- package/dist/utils/questionRenderer/connectDots/index.d.ts +8 -0
- package/dist/utils/questionRenderer/connectDots/index.d.ts.map +1 -0
- package/dist/utils/questionRenderer/dissertative/index.d.ts +8 -0
- package/dist/utils/questionRenderer/dissertative/index.d.ts.map +1 -0
- package/dist/utils/questionRenderer/fill/index.d.ts +10 -0
- package/dist/utils/questionRenderer/fill/index.d.ts.map +1 -0
- package/dist/utils/questionRenderer/image/index.d.ts +8 -0
- package/dist/utils/questionRenderer/image/index.d.ts.map +1 -0
- package/dist/utils/questionRenderer/index.d.ts +31 -0
- package/dist/utils/questionRenderer/index.d.ts.map +1 -0
- package/dist/utils/questionRenderer/multipleChoice/index.d.ts +8 -0
- package/dist/utils/questionRenderer/multipleChoice/index.d.ts.map +1 -0
- package/dist/utils/questionRenderer/trueOrFalse/index.d.ts +9 -0
- package/dist/utils/questionRenderer/trueOrFalse/index.d.ts.map +1 -0
- package/dist/utils/questionRenderer/types.d.ts +14 -0
- package/dist/utils/questionRenderer/types.d.ts.map +1 -0
- package/dist/utils/studentActivityCorrection/constants.d.ts +13 -0
- package/dist/utils/studentActivityCorrection/constants.d.ts.map +1 -0
- package/dist/utils/studentActivityCorrection/converter.d.ts +13 -0
- package/dist/utils/studentActivityCorrection/converter.d.ts.map +1 -0
- package/dist/utils/studentActivityCorrection/index.d.ts +13 -0
- package/dist/utils/studentActivityCorrection/index.d.ts.map +1 -0
- package/dist/utils/studentActivityCorrection/types.d.ts +84 -0
- package/dist/utils/studentActivityCorrection/types.d.ts.map +1 -0
- package/dist/utils/studentActivityCorrection/utils.d.ts +30 -0
- package/dist/utils/studentActivityCorrection/utils.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/types/studentActivityCorrection.d.ts +0 -62
- package/dist/types/studentActivityCorrection.d.ts.map +0 -1
- package/dist/utils/questionRenderer.d.ts +0 -5
- package/dist/utils/questionRenderer.d.ts.map +0 -1
|
@@ -33,8 +33,8 @@ __export(ActivityPreview_exports, {
|
|
|
33
33
|
ActivityPreview: () => ActivityPreview
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(ActivityPreview_exports);
|
|
36
|
-
var
|
|
37
|
-
var
|
|
36
|
+
var import_react14 = require("react");
|
|
37
|
+
var import_phosphor_react10 = require("phosphor-react");
|
|
38
38
|
|
|
39
39
|
// src/utils/utils.ts
|
|
40
40
|
var import_clsx = require("clsx");
|
|
@@ -1671,280 +1671,20 @@ var ProgressBar = ({
|
|
|
1671
1671
|
};
|
|
1672
1672
|
var ProgressBar_default = ProgressBar;
|
|
1673
1673
|
|
|
1674
|
-
// src/components/Alternative/Alternative.tsx
|
|
1675
|
-
var import_phosphor_react3 = require("phosphor-react");
|
|
1676
|
-
var import_react5 = require("react");
|
|
1677
|
-
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1678
|
-
var AlternativesList = ({
|
|
1679
|
-
alternatives,
|
|
1680
|
-
name,
|
|
1681
|
-
defaultValue,
|
|
1682
|
-
value,
|
|
1683
|
-
onValueChange,
|
|
1684
|
-
disabled = false,
|
|
1685
|
-
layout = "default",
|
|
1686
|
-
className = "",
|
|
1687
|
-
mode = "interactive",
|
|
1688
|
-
selectedValue
|
|
1689
|
-
}) => {
|
|
1690
|
-
const uniqueId = (0, import_react5.useId)();
|
|
1691
|
-
const groupName = name || `alternatives-${uniqueId}`;
|
|
1692
|
-
const [actualValue, setActualValue] = (0, import_react5.useState)(value);
|
|
1693
|
-
const isReadonly = mode === "readonly";
|
|
1694
|
-
const getStatusStyles = (status, isReadonly2) => {
|
|
1695
|
-
const hoverClass = isReadonly2 ? "" : "hover:bg-background-50";
|
|
1696
|
-
switch (status) {
|
|
1697
|
-
case "correct":
|
|
1698
|
-
return "bg-success-background border-success-300";
|
|
1699
|
-
case "incorrect":
|
|
1700
|
-
return "bg-error-background border-error-300";
|
|
1701
|
-
default:
|
|
1702
|
-
return `bg-background border-border-100 ${hoverClass}`;
|
|
1703
|
-
}
|
|
1704
|
-
};
|
|
1705
|
-
const getStatusBadge = (status) => {
|
|
1706
|
-
switch (status) {
|
|
1707
|
-
case "correct":
|
|
1708
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_phosphor_react3.CheckCircle, {}), children: "Resposta correta" });
|
|
1709
|
-
case "incorrect":
|
|
1710
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_phosphor_react3.XCircle, {}), children: "Resposta incorreta" });
|
|
1711
|
-
default:
|
|
1712
|
-
return null;
|
|
1713
|
-
}
|
|
1714
|
-
};
|
|
1715
|
-
const getLayoutClasses = () => {
|
|
1716
|
-
switch (layout) {
|
|
1717
|
-
case "compact":
|
|
1718
|
-
return "gap-2";
|
|
1719
|
-
case "detailed":
|
|
1720
|
-
return "gap-4";
|
|
1721
|
-
default:
|
|
1722
|
-
return "gap-3.5";
|
|
1723
|
-
}
|
|
1724
|
-
};
|
|
1725
|
-
const renderReadonlyAlternative = (alternative) => {
|
|
1726
|
-
const alternativeId = alternative.value;
|
|
1727
|
-
const isUserSelected = selectedValue === alternative.value;
|
|
1728
|
-
const isCorrectAnswer = alternative.status === "correct";
|
|
1729
|
-
let displayStatus = void 0;
|
|
1730
|
-
if (isUserSelected && !isCorrectAnswer) {
|
|
1731
|
-
displayStatus = "incorrect";
|
|
1732
|
-
} else if (isCorrectAnswer) {
|
|
1733
|
-
displayStatus = "correct";
|
|
1734
|
-
}
|
|
1735
|
-
const statusStyles = getStatusStyles(displayStatus, true);
|
|
1736
|
-
const statusBadge = getStatusBadge(displayStatus);
|
|
1737
|
-
const renderRadio = () => {
|
|
1738
|
-
const radioClasses = `w-6 h-6 rounded-full border-2 cursor-default transition-all duration-200 flex items-center justify-center ${isUserSelected ? "border-primary-950 bg-background" : "border-border-400 bg-background"}`;
|
|
1739
|
-
const dotClasses = "w-3 h-3 rounded-full bg-primary-950 transition-all duration-200";
|
|
1740
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: radioClasses, children: isUserSelected && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: dotClasses }) });
|
|
1741
|
-
};
|
|
1742
|
-
if (layout === "detailed") {
|
|
1743
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1744
|
-
"div",
|
|
1745
|
-
{
|
|
1746
|
-
className: cn(
|
|
1747
|
-
"border-2 rounded-lg p-4 w-full",
|
|
1748
|
-
statusStyles,
|
|
1749
|
-
alternative.disabled ? "opacity-50" : ""
|
|
1750
|
-
),
|
|
1751
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
1752
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-start gap-3 flex-1", children: [
|
|
1753
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "mt-1", children: renderRadio() }),
|
|
1754
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex-1", children: [
|
|
1755
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1756
|
-
"p",
|
|
1757
|
-
{
|
|
1758
|
-
className: cn(
|
|
1759
|
-
"block font-medium",
|
|
1760
|
-
selectedValue === alternative.value || statusBadge ? "text-text-950" : "text-text-600"
|
|
1761
|
-
),
|
|
1762
|
-
children: alternative.label
|
|
1763
|
-
}
|
|
1764
|
-
),
|
|
1765
|
-
alternative.description && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
|
|
1766
|
-
] })
|
|
1767
|
-
] }),
|
|
1768
|
-
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
1769
|
-
] })
|
|
1770
|
-
},
|
|
1771
|
-
alternativeId
|
|
1772
|
-
);
|
|
1773
|
-
}
|
|
1774
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
1775
|
-
"div",
|
|
1776
|
-
{
|
|
1777
|
-
className: cn(
|
|
1778
|
-
"flex flex-row justify-between items-start gap-2 p-2 rounded-lg w-full",
|
|
1779
|
-
statusStyles,
|
|
1780
|
-
alternative.disabled ? "opacity-50" : ""
|
|
1781
|
-
),
|
|
1782
|
-
children: [
|
|
1783
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
1784
|
-
renderRadio(),
|
|
1785
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1786
|
-
"span",
|
|
1787
|
-
{
|
|
1788
|
-
className: cn(
|
|
1789
|
-
"flex-1",
|
|
1790
|
-
selectedValue === alternative.value || statusBadge ? "text-text-950" : "text-text-600"
|
|
1791
|
-
),
|
|
1792
|
-
children: alternative.label
|
|
1793
|
-
}
|
|
1794
|
-
)
|
|
1795
|
-
] }),
|
|
1796
|
-
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
1797
|
-
]
|
|
1798
|
-
},
|
|
1799
|
-
alternativeId
|
|
1800
|
-
);
|
|
1801
|
-
};
|
|
1802
|
-
if (isReadonly) {
|
|
1803
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1804
|
-
"div",
|
|
1805
|
-
{
|
|
1806
|
-
className: cn("flex flex-col", getLayoutClasses(), "w-full", className),
|
|
1807
|
-
children: alternatives.map(
|
|
1808
|
-
(alternative) => renderReadonlyAlternative(alternative)
|
|
1809
|
-
)
|
|
1810
|
-
}
|
|
1811
|
-
);
|
|
1812
|
-
}
|
|
1813
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1814
|
-
RadioGroup,
|
|
1815
|
-
{
|
|
1816
|
-
name: groupName,
|
|
1817
|
-
defaultValue,
|
|
1818
|
-
value,
|
|
1819
|
-
onValueChange: (value2) => {
|
|
1820
|
-
setActualValue(value2);
|
|
1821
|
-
onValueChange?.(value2);
|
|
1822
|
-
},
|
|
1823
|
-
disabled,
|
|
1824
|
-
className: cn("flex flex-col", getLayoutClasses(), className),
|
|
1825
|
-
children: alternatives.map((alternative, index) => {
|
|
1826
|
-
const alternativeId = alternative.value || `alt-${index}`;
|
|
1827
|
-
const statusStyles = getStatusStyles(alternative.status, false);
|
|
1828
|
-
const statusBadge = getStatusBadge(alternative.status);
|
|
1829
|
-
if (layout === "detailed") {
|
|
1830
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1831
|
-
"div",
|
|
1832
|
-
{
|
|
1833
|
-
className: cn(
|
|
1834
|
-
"border-2 rounded-lg p-4 transition-all",
|
|
1835
|
-
statusStyles,
|
|
1836
|
-
alternative.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
1837
|
-
),
|
|
1838
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
1839
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-start gap-3 flex-1", children: [
|
|
1840
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1841
|
-
RadioGroupItem,
|
|
1842
|
-
{
|
|
1843
|
-
value: alternative.value,
|
|
1844
|
-
id: alternativeId,
|
|
1845
|
-
disabled: alternative.disabled,
|
|
1846
|
-
className: "mt-1"
|
|
1847
|
-
}
|
|
1848
|
-
),
|
|
1849
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex-1", children: [
|
|
1850
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1851
|
-
"label",
|
|
1852
|
-
{
|
|
1853
|
-
htmlFor: alternativeId,
|
|
1854
|
-
className: cn(
|
|
1855
|
-
"block font-medium",
|
|
1856
|
-
actualValue === alternative.value ? "text-text-950" : "text-text-600",
|
|
1857
|
-
alternative.disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
1858
|
-
),
|
|
1859
|
-
children: alternative.label
|
|
1860
|
-
}
|
|
1861
|
-
),
|
|
1862
|
-
alternative.description && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
|
|
1863
|
-
] })
|
|
1864
|
-
] }),
|
|
1865
|
-
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
1866
|
-
] })
|
|
1867
|
-
},
|
|
1868
|
-
alternativeId
|
|
1869
|
-
);
|
|
1870
|
-
}
|
|
1871
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
1872
|
-
"div",
|
|
1873
|
-
{
|
|
1874
|
-
className: cn(
|
|
1875
|
-
"flex flex-row justify-between gap-2 items-start p-2 rounded-lg transition-all",
|
|
1876
|
-
statusStyles,
|
|
1877
|
-
alternative.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
1878
|
-
),
|
|
1879
|
-
children: [
|
|
1880
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
1881
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1882
|
-
RadioGroupItem,
|
|
1883
|
-
{
|
|
1884
|
-
value: alternative.value,
|
|
1885
|
-
id: alternativeId,
|
|
1886
|
-
disabled: alternative.disabled
|
|
1887
|
-
}
|
|
1888
|
-
),
|
|
1889
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1890
|
-
"label",
|
|
1891
|
-
{
|
|
1892
|
-
htmlFor: alternativeId,
|
|
1893
|
-
className: cn(
|
|
1894
|
-
"flex-1",
|
|
1895
|
-
actualValue === alternative.value ? "text-text-950" : "text-text-600",
|
|
1896
|
-
alternative.disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
1897
|
-
),
|
|
1898
|
-
children: alternative.label
|
|
1899
|
-
}
|
|
1900
|
-
)
|
|
1901
|
-
] }),
|
|
1902
|
-
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
1903
|
-
]
|
|
1904
|
-
},
|
|
1905
|
-
alternativeId
|
|
1906
|
-
);
|
|
1907
|
-
})
|
|
1908
|
-
}
|
|
1909
|
-
);
|
|
1910
|
-
};
|
|
1911
|
-
var HeaderAlternative = (0, import_react5.forwardRef)(
|
|
1912
|
-
({ className, title, subTitle, content, ...props }, ref) => {
|
|
1913
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
1914
|
-
"div",
|
|
1915
|
-
{
|
|
1916
|
-
ref,
|
|
1917
|
-
className: cn(
|
|
1918
|
-
"bg-background p-4 flex flex-col gap-4 rounded-xl",
|
|
1919
|
-
className
|
|
1920
|
-
),
|
|
1921
|
-
...props,
|
|
1922
|
-
children: [
|
|
1923
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { className: "flex flex-col", children: [
|
|
1924
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-text-950 font-bold text-lg", children: title }),
|
|
1925
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-text-700 text-sm ", children: subTitle })
|
|
1926
|
-
] }),
|
|
1927
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-text-950 text-md", children: content })
|
|
1928
|
-
]
|
|
1929
|
-
}
|
|
1930
|
-
);
|
|
1931
|
-
}
|
|
1932
|
-
);
|
|
1933
|
-
|
|
1934
1674
|
// src/components/Accordation/Accordation.tsx
|
|
1935
|
-
var
|
|
1675
|
+
var import_react7 = require("react");
|
|
1936
1676
|
|
|
1937
1677
|
// src/components/Card/Card.tsx
|
|
1938
|
-
var
|
|
1939
|
-
var
|
|
1678
|
+
var import_react6 = require("react");
|
|
1679
|
+
var import_phosphor_react3 = require("phosphor-react");
|
|
1940
1680
|
|
|
1941
1681
|
// src/components/IconRender/IconRender.tsx
|
|
1942
|
-
var
|
|
1682
|
+
var import_react5 = require("react");
|
|
1943
1683
|
var PhosphorIcons = __toESM(require("phosphor-react"));
|
|
1944
1684
|
|
|
1945
1685
|
// src/assets/icons/subjects/ChatPT.tsx
|
|
1946
|
-
var
|
|
1947
|
-
var ChatPT = ({ size, color }) => /* @__PURE__ */ (0,
|
|
1686
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1687
|
+
var ChatPT = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
1948
1688
|
"svg",
|
|
1949
1689
|
{
|
|
1950
1690
|
width: size,
|
|
@@ -1953,21 +1693,21 @@ var ChatPT = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)
|
|
|
1953
1693
|
fill: "none",
|
|
1954
1694
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1955
1695
|
children: [
|
|
1956
|
-
/* @__PURE__ */ (0,
|
|
1696
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1957
1697
|
"path",
|
|
1958
1698
|
{
|
|
1959
1699
|
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
1960
1700
|
fill: color
|
|
1961
1701
|
}
|
|
1962
1702
|
),
|
|
1963
|
-
/* @__PURE__ */ (0,
|
|
1703
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1964
1704
|
"path",
|
|
1965
1705
|
{
|
|
1966
1706
|
d: "M21.1758 12V20.5312H19.7168V12H21.1758ZM23.8535 12V13.1719H17.0625V12H23.8535Z",
|
|
1967
1707
|
fill: color
|
|
1968
1708
|
}
|
|
1969
1709
|
),
|
|
1970
|
-
/* @__PURE__ */ (0,
|
|
1710
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1971
1711
|
"path",
|
|
1972
1712
|
{
|
|
1973
1713
|
d: "M13.2402 17.3496H11.0195V16.1836H13.2402C13.627 16.1836 13.9395 16.1211 14.1777 15.9961C14.416 15.8711 14.5898 15.6992 14.6992 15.4805C14.8125 15.2578 14.8691 15.0039 14.8691 14.7188C14.8691 14.4492 14.8125 14.1973 14.6992 13.9629C14.5898 13.7246 14.416 13.5332 14.1777 13.3887C13.9395 13.2441 13.627 13.1719 13.2402 13.1719H11.4707V20.5312H10V12H13.2402C13.9004 12 14.4609 12.1172 14.9219 12.3516C15.3867 12.582 15.7402 12.9023 15.9824 13.3125C16.2246 13.7188 16.3457 14.1836 16.3457 14.707C16.3457 15.2578 16.2246 15.7305 15.9824 16.125C15.7402 16.5195 15.3867 16.8223 14.9219 17.0332C14.4609 17.2441 13.9004 17.3496 13.2402 17.3496Z",
|
|
@@ -1979,8 +1719,8 @@ var ChatPT = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)
|
|
|
1979
1719
|
);
|
|
1980
1720
|
|
|
1981
1721
|
// src/assets/icons/subjects/ChatEN.tsx
|
|
1982
|
-
var
|
|
1983
|
-
var ChatEN = ({ size, color }) => /* @__PURE__ */ (0,
|
|
1722
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1723
|
+
var ChatEN = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
1984
1724
|
"svg",
|
|
1985
1725
|
{
|
|
1986
1726
|
width: size,
|
|
@@ -1989,21 +1729,21 @@ var ChatEN = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)
|
|
|
1989
1729
|
fill: "none",
|
|
1990
1730
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1991
1731
|
children: [
|
|
1992
|
-
/* @__PURE__ */ (0,
|
|
1732
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1993
1733
|
"path",
|
|
1994
1734
|
{
|
|
1995
1735
|
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
1996
1736
|
fill: color
|
|
1997
1737
|
}
|
|
1998
1738
|
),
|
|
1999
|
-
/* @__PURE__ */ (0,
|
|
1739
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2000
1740
|
"path",
|
|
2001
1741
|
{
|
|
2002
1742
|
d: "M22.5488 12V20.5312H21.0781L17.252 14.4199V20.5312H15.7812V12H17.252L21.0898 18.123V12H22.5488Z",
|
|
2003
1743
|
fill: color
|
|
2004
1744
|
}
|
|
2005
1745
|
),
|
|
2006
|
-
/* @__PURE__ */ (0,
|
|
1746
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2007
1747
|
"path",
|
|
2008
1748
|
{
|
|
2009
1749
|
d: "M14.584 19.3652V20.5312H10.0547V19.3652H14.584ZM10.4707 12V20.5312H9V12H10.4707ZM13.9922 15.5625V16.7109H10.0547V15.5625H13.9922ZM14.5547 12V13.1719H10.0547V12H14.5547Z",
|
|
@@ -2015,8 +1755,8 @@ var ChatEN = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)
|
|
|
2015
1755
|
);
|
|
2016
1756
|
|
|
2017
1757
|
// src/assets/icons/subjects/ChatES.tsx
|
|
2018
|
-
var
|
|
2019
|
-
var ChatES = ({ size, color }) => /* @__PURE__ */ (0,
|
|
1758
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1759
|
+
var ChatES = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2020
1760
|
"svg",
|
|
2021
1761
|
{
|
|
2022
1762
|
width: size,
|
|
@@ -2025,21 +1765,21 @@ var ChatES = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)
|
|
|
2025
1765
|
fill: "none",
|
|
2026
1766
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2027
1767
|
children: [
|
|
2028
|
-
/* @__PURE__ */ (0,
|
|
1768
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2029
1769
|
"path",
|
|
2030
1770
|
{
|
|
2031
1771
|
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
2032
1772
|
fill: color
|
|
2033
1773
|
}
|
|
2034
1774
|
),
|
|
2035
|
-
/* @__PURE__ */ (0,
|
|
1775
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2036
1776
|
"path",
|
|
2037
1777
|
{
|
|
2038
1778
|
d: "M21.1426 17.8027C21.1426 17.627 21.1152 17.4707 21.0605 17.334C21.0098 17.1973 20.918 17.0723 20.7852 16.959C20.6523 16.8457 20.4648 16.7363 20.2227 16.6309C19.9844 16.5215 19.6797 16.4102 19.3086 16.2969C18.9023 16.1719 18.5273 16.0332 18.1836 15.8809C17.8438 15.7246 17.5469 15.5449 17.293 15.3418C17.0391 15.1348 16.8418 14.8984 16.7012 14.6328C16.5605 14.3633 16.4902 14.0527 16.4902 13.7012C16.4902 13.3535 16.5625 13.0371 16.707 12.752C16.8555 12.4668 17.0645 12.2207 17.334 12.0137C17.6074 11.8027 17.9297 11.6406 18.3008 11.5273C18.6719 11.4102 19.082 11.3516 19.5312 11.3516C20.1641 11.3516 20.709 11.4688 21.166 11.7031C21.627 11.9375 21.9805 12.252 22.2266 12.6465C22.4766 13.041 22.6016 13.4766 22.6016 13.9531H21.1426C21.1426 13.6719 21.082 13.4238 20.9609 13.209C20.8438 12.9902 20.6641 12.8184 20.4219 12.6934C20.1836 12.5684 19.8809 12.5059 19.5137 12.5059C19.166 12.5059 18.877 12.5586 18.6465 12.6641C18.416 12.7695 18.2441 12.9121 18.1309 13.0918C18.0176 13.2715 17.9609 13.4746 17.9609 13.7012C17.9609 13.8613 17.998 14.0078 18.0723 14.1406C18.1465 14.2695 18.2598 14.3906 18.4121 14.5039C18.5645 14.6133 18.7559 14.7168 18.9863 14.8145C19.2168 14.9121 19.4883 15.0059 19.8008 15.0957C20.2734 15.2363 20.6855 15.3926 21.0371 15.5645C21.3887 15.7324 21.6816 15.9238 21.916 16.1387C22.1504 16.3535 22.3262 16.5977 22.4434 16.8711C22.5605 17.1406 22.6191 17.4473 22.6191 17.791C22.6191 18.1504 22.5469 18.4746 22.4023 18.7637C22.2578 19.0488 22.0508 19.293 21.7812 19.4961C21.5156 19.6953 21.1953 19.8496 20.8203 19.959C20.4492 20.0645 20.0352 20.1172 19.5781 20.1172C19.168 20.1172 18.7637 20.0625 18.3652 19.9531C17.9707 19.8438 17.6113 19.6777 17.2871 19.4551C16.9629 19.2285 16.7051 18.9473 16.5137 18.6113C16.3223 18.2715 16.2266 17.875 16.2266 17.4219H17.6973C17.6973 17.6992 17.7441 17.9355 17.8379 18.1309C17.9355 18.3262 18.0703 18.4863 18.2422 18.6113C18.4141 18.7324 18.6133 18.8223 18.8398 18.8809C19.0703 18.9395 19.3164 18.9688 19.5781 18.9688C19.9219 18.9688 20.209 18.9199 20.4395 18.8223C20.6738 18.7246 20.8496 18.5879 20.9668 18.4121C21.084 18.2363 21.1426 18.0332 21.1426 17.8027Z",
|
|
2039
1779
|
fill: color
|
|
2040
1780
|
}
|
|
2041
1781
|
),
|
|
2042
|
-
/* @__PURE__ */ (0,
|
|
1782
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2043
1783
|
"path",
|
|
2044
1784
|
{
|
|
2045
1785
|
d: "M15.4512 18.834V20H10.9219V18.834H15.4512ZM11.3379 11.4688V20H9.86719V11.4688H11.3379ZM14.8594 15.0312V16.1797H10.9219V15.0312H14.8594ZM15.4219 11.4688V12.6406H10.9219V11.4688H15.4219Z",
|
|
@@ -2051,7 +1791,7 @@ var ChatES = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)
|
|
|
2051
1791
|
);
|
|
2052
1792
|
|
|
2053
1793
|
// src/components/IconRender/IconRender.tsx
|
|
2054
|
-
var
|
|
1794
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2055
1795
|
var IconRender = ({
|
|
2056
1796
|
iconName,
|
|
2057
1797
|
color = "#000000",
|
|
@@ -2061,18 +1801,18 @@ var IconRender = ({
|
|
|
2061
1801
|
if (typeof iconName === "string") {
|
|
2062
1802
|
switch (iconName) {
|
|
2063
1803
|
case "Chat_PT":
|
|
2064
|
-
return /* @__PURE__ */ (0,
|
|
1804
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ChatPT, { size, color });
|
|
2065
1805
|
case "Chat_EN":
|
|
2066
|
-
return /* @__PURE__ */ (0,
|
|
1806
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ChatEN, { size, color });
|
|
2067
1807
|
case "Chat_ES":
|
|
2068
|
-
return /* @__PURE__ */ (0,
|
|
1808
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ChatES, { size, color });
|
|
2069
1809
|
default: {
|
|
2070
1810
|
const IconComponent = PhosphorIcons[iconName] || PhosphorIcons.Question;
|
|
2071
|
-
return /* @__PURE__ */ (0,
|
|
1811
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconComponent, { size, color, weight });
|
|
2072
1812
|
}
|
|
2073
1813
|
}
|
|
2074
1814
|
} else {
|
|
2075
|
-
return (0,
|
|
1815
|
+
return (0, import_react5.cloneElement)(iconName, {
|
|
2076
1816
|
size,
|
|
2077
1817
|
color: "currentColor"
|
|
2078
1818
|
});
|
|
@@ -2081,7 +1821,7 @@ var IconRender = ({
|
|
|
2081
1821
|
var IconRender_default = IconRender;
|
|
2082
1822
|
|
|
2083
1823
|
// src/components/Card/Card.tsx
|
|
2084
|
-
var
|
|
1824
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2085
1825
|
var CARD_BASE_CLASSES = {
|
|
2086
1826
|
default: "w-full bg-background border border-border-50 rounded-xl",
|
|
2087
1827
|
compact: "w-full bg-background border border-border-50 rounded-lg",
|
|
@@ -2107,7 +1847,7 @@ var CARD_CURSOR_CLASSES = {
|
|
|
2107
1847
|
default: "",
|
|
2108
1848
|
pointer: "cursor-pointer"
|
|
2109
1849
|
};
|
|
2110
|
-
var CardBase = (0,
|
|
1850
|
+
var CardBase = (0, import_react6.forwardRef)(
|
|
2111
1851
|
({
|
|
2112
1852
|
children,
|
|
2113
1853
|
variant = "default",
|
|
@@ -2123,7 +1863,7 @@ var CardBase = (0, import_react7.forwardRef)(
|
|
|
2123
1863
|
const minHeightClasses = CARD_MIN_HEIGHT_CLASSES[minHeight];
|
|
2124
1864
|
const layoutClasses = CARD_LAYOUT_CLASSES[layout];
|
|
2125
1865
|
const cursorClasses = CARD_CURSOR_CLASSES[cursor];
|
|
2126
|
-
return /* @__PURE__ */ (0,
|
|
1866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2127
1867
|
"div",
|
|
2128
1868
|
{
|
|
2129
1869
|
ref,
|
|
@@ -2165,7 +1905,7 @@ var ACTION_HEADER_CLASSES = {
|
|
|
2165
1905
|
error: "text-error-300",
|
|
2166
1906
|
info: "text-info-300"
|
|
2167
1907
|
};
|
|
2168
|
-
var CardActivitiesResults = (0,
|
|
1908
|
+
var CardActivitiesResults = (0, import_react6.forwardRef)(
|
|
2169
1909
|
({
|
|
2170
1910
|
icon,
|
|
2171
1911
|
title,
|
|
@@ -2181,7 +1921,7 @@ var CardActivitiesResults = (0, import_react7.forwardRef)(
|
|
|
2181
1921
|
const actionIconClasses = ACTION_ICON_CLASSES[action];
|
|
2182
1922
|
const actionSubTitleClasses = ACTION_SUBTITLE_CLASSES[action];
|
|
2183
1923
|
const actionHeaderClasses = ACTION_HEADER_CLASSES[action];
|
|
2184
|
-
return /* @__PURE__ */ (0,
|
|
1924
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2185
1925
|
"div",
|
|
2186
1926
|
{
|
|
2187
1927
|
ref,
|
|
@@ -2191,7 +1931,7 @@ var CardActivitiesResults = (0, import_react7.forwardRef)(
|
|
|
2191
1931
|
),
|
|
2192
1932
|
...props,
|
|
2193
1933
|
children: [
|
|
2194
|
-
/* @__PURE__ */ (0,
|
|
1934
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2195
1935
|
"div",
|
|
2196
1936
|
{
|
|
2197
1937
|
className: cn(
|
|
@@ -2200,7 +1940,7 @@ var CardActivitiesResults = (0, import_react7.forwardRef)(
|
|
|
2200
1940
|
extended ? "rounded-t-xl" : "rounded-xl"
|
|
2201
1941
|
),
|
|
2202
1942
|
children: [
|
|
2203
|
-
/* @__PURE__ */ (0,
|
|
1943
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2204
1944
|
"span",
|
|
2205
1945
|
{
|
|
2206
1946
|
className: cn(
|
|
@@ -2210,7 +1950,7 @@ var CardActivitiesResults = (0, import_react7.forwardRef)(
|
|
|
2210
1950
|
children: icon
|
|
2211
1951
|
}
|
|
2212
1952
|
),
|
|
2213
|
-
/* @__PURE__ */ (0,
|
|
1953
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2214
1954
|
Text_default,
|
|
2215
1955
|
{
|
|
2216
1956
|
size: "2xs",
|
|
@@ -2219,7 +1959,7 @@ var CardActivitiesResults = (0, import_react7.forwardRef)(
|
|
|
2219
1959
|
children: title
|
|
2220
1960
|
}
|
|
2221
1961
|
),
|
|
2222
|
-
/* @__PURE__ */ (0,
|
|
1962
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2223
1963
|
"p",
|
|
2224
1964
|
{
|
|
2225
1965
|
className: cn("text-lg font-bold truncate", actionSubTitleClasses),
|
|
@@ -2229,8 +1969,8 @@ var CardActivitiesResults = (0, import_react7.forwardRef)(
|
|
|
2229
1969
|
]
|
|
2230
1970
|
}
|
|
2231
1971
|
),
|
|
2232
|
-
extended && /* @__PURE__ */ (0,
|
|
2233
|
-
/* @__PURE__ */ (0,
|
|
1972
|
+
extended && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col items-center gap-2.5 pb-9.5 pt-2.5", children: [
|
|
1973
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2234
1974
|
"p",
|
|
2235
1975
|
{
|
|
2236
1976
|
className: cn(
|
|
@@ -2240,14 +1980,14 @@ var CardActivitiesResults = (0, import_react7.forwardRef)(
|
|
|
2240
1980
|
children: header
|
|
2241
1981
|
}
|
|
2242
1982
|
),
|
|
2243
|
-
/* @__PURE__ */ (0,
|
|
1983
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Badge_default, { size: "large", action: "info", children: description })
|
|
2244
1984
|
] })
|
|
2245
1985
|
]
|
|
2246
1986
|
}
|
|
2247
1987
|
);
|
|
2248
1988
|
}
|
|
2249
1989
|
);
|
|
2250
|
-
var CardQuestions = (0,
|
|
1990
|
+
var CardQuestions = (0, import_react6.forwardRef)(
|
|
2251
1991
|
({
|
|
2252
1992
|
header,
|
|
2253
1993
|
state = "undone",
|
|
@@ -2259,7 +1999,7 @@ var CardQuestions = (0, import_react7.forwardRef)(
|
|
|
2259
1999
|
const isDone = state === "done";
|
|
2260
2000
|
const stateLabel = isDone ? "Realizado" : "N\xE3o Realizado";
|
|
2261
2001
|
const buttonLabel = isDone ? "Ver Resultado" : "Responder";
|
|
2262
|
-
return /* @__PURE__ */ (0,
|
|
2002
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2263
2003
|
CardBase,
|
|
2264
2004
|
{
|
|
2265
2005
|
ref,
|
|
@@ -2269,9 +2009,9 @@ var CardQuestions = (0, import_react7.forwardRef)(
|
|
|
2269
2009
|
className: cn("justify-between gap-4", className),
|
|
2270
2010
|
...props,
|
|
2271
2011
|
children: [
|
|
2272
|
-
/* @__PURE__ */ (0,
|
|
2273
|
-
/* @__PURE__ */ (0,
|
|
2274
|
-
/* @__PURE__ */ (0,
|
|
2012
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("section", { className: "flex flex-col gap-1 flex-1 min-w-0", children: [
|
|
2013
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "font-bold text-xs text-text-950 truncate", children: header }),
|
|
2014
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex flex-row gap-6 items-center", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2275
2015
|
Badge_default,
|
|
2276
2016
|
{
|
|
2277
2017
|
size: "medium",
|
|
@@ -2281,7 +2021,7 @@ var CardQuestions = (0, import_react7.forwardRef)(
|
|
|
2281
2021
|
}
|
|
2282
2022
|
) })
|
|
2283
2023
|
] }),
|
|
2284
|
-
/* @__PURE__ */ (0,
|
|
2024
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2285
2025
|
Button_default,
|
|
2286
2026
|
{
|
|
2287
2027
|
size: "extra-small",
|
|
@@ -2295,7 +2035,7 @@ var CardQuestions = (0, import_react7.forwardRef)(
|
|
|
2295
2035
|
);
|
|
2296
2036
|
}
|
|
2297
2037
|
);
|
|
2298
|
-
var CardProgress = (0,
|
|
2038
|
+
var CardProgress = (0, import_react6.forwardRef)(
|
|
2299
2039
|
({
|
|
2300
2040
|
header,
|
|
2301
2041
|
subhead,
|
|
@@ -2312,19 +2052,19 @@ var CardProgress = (0, import_react7.forwardRef)(
|
|
|
2312
2052
|
}, ref) => {
|
|
2313
2053
|
const isHorizontal = direction === "horizontal";
|
|
2314
2054
|
const contentComponent = {
|
|
2315
|
-
horizontal: /* @__PURE__ */ (0,
|
|
2316
|
-
showDates && /* @__PURE__ */ (0,
|
|
2317
|
-
initialDate && /* @__PURE__ */ (0,
|
|
2318
|
-
/* @__PURE__ */ (0,
|
|
2319
|
-
/* @__PURE__ */ (0,
|
|
2055
|
+
horizontal: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
2056
|
+
showDates && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-row gap-6 items-center", children: [
|
|
2057
|
+
initialDate && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
|
|
2058
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-text-800 font-semibold", children: "In\xEDcio" }),
|
|
2059
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-text-600", children: initialDate })
|
|
2320
2060
|
] }),
|
|
2321
|
-
endDate && /* @__PURE__ */ (0,
|
|
2322
|
-
/* @__PURE__ */ (0,
|
|
2323
|
-
/* @__PURE__ */ (0,
|
|
2061
|
+
endDate && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
|
|
2062
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-text-800 font-semibold", children: "Fim" }),
|
|
2063
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-text-600", children: endDate })
|
|
2324
2064
|
] })
|
|
2325
2065
|
] }),
|
|
2326
|
-
/* @__PURE__ */ (0,
|
|
2327
|
-
/* @__PURE__ */ (0,
|
|
2066
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "grid grid-cols-[1fr_auto] items-center gap-2", children: [
|
|
2067
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2328
2068
|
ProgressBar_default,
|
|
2329
2069
|
{
|
|
2330
2070
|
size: "small",
|
|
@@ -2333,7 +2073,7 @@ var CardProgress = (0, import_react7.forwardRef)(
|
|
|
2333
2073
|
"data-testid": "progress-bar"
|
|
2334
2074
|
}
|
|
2335
2075
|
),
|
|
2336
|
-
/* @__PURE__ */ (0,
|
|
2076
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2337
2077
|
Text_default,
|
|
2338
2078
|
{
|
|
2339
2079
|
size: "xs",
|
|
@@ -2349,9 +2089,9 @@ var CardProgress = (0, import_react7.forwardRef)(
|
|
|
2349
2089
|
)
|
|
2350
2090
|
] })
|
|
2351
2091
|
] }),
|
|
2352
|
-
vertical: /* @__PURE__ */ (0,
|
|
2092
|
+
vertical: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-sm text-text-800", children: subhead })
|
|
2353
2093
|
};
|
|
2354
|
-
return /* @__PURE__ */ (0,
|
|
2094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2355
2095
|
CardBase,
|
|
2356
2096
|
{
|
|
2357
2097
|
ref,
|
|
@@ -2362,7 +2102,7 @@ var CardProgress = (0, import_react7.forwardRef)(
|
|
|
2362
2102
|
className: cn(isHorizontal ? "h-20" : "", className),
|
|
2363
2103
|
...props,
|
|
2364
2104
|
children: [
|
|
2365
|
-
/* @__PURE__ */ (0,
|
|
2105
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2366
2106
|
"div",
|
|
2367
2107
|
{
|
|
2368
2108
|
className: cn(
|
|
@@ -2375,7 +2115,7 @@ var CardProgress = (0, import_react7.forwardRef)(
|
|
|
2375
2115
|
children: icon
|
|
2376
2116
|
}
|
|
2377
2117
|
),
|
|
2378
|
-
/* @__PURE__ */ (0,
|
|
2118
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2379
2119
|
"div",
|
|
2380
2120
|
{
|
|
2381
2121
|
className: cn(
|
|
@@ -2383,7 +2123,7 @@ var CardProgress = (0, import_react7.forwardRef)(
|
|
|
2383
2123
|
!isHorizontal && "gap-4"
|
|
2384
2124
|
),
|
|
2385
2125
|
children: [
|
|
2386
|
-
/* @__PURE__ */ (0,
|
|
2126
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text_default, { size: "sm", weight: "bold", className: "text-text-950 truncate", children: header }),
|
|
2387
2127
|
contentComponent[direction]
|
|
2388
2128
|
]
|
|
2389
2129
|
}
|
|
@@ -2393,7 +2133,7 @@ var CardProgress = (0, import_react7.forwardRef)(
|
|
|
2393
2133
|
);
|
|
2394
2134
|
}
|
|
2395
2135
|
);
|
|
2396
|
-
var CardTopic = (0,
|
|
2136
|
+
var CardTopic = (0, import_react6.forwardRef)(
|
|
2397
2137
|
({
|
|
2398
2138
|
header,
|
|
2399
2139
|
subHead,
|
|
@@ -2403,7 +2143,7 @@ var CardTopic = (0, import_react7.forwardRef)(
|
|
|
2403
2143
|
className = "",
|
|
2404
2144
|
...props
|
|
2405
2145
|
}, ref) => {
|
|
2406
|
-
return /* @__PURE__ */ (0,
|
|
2146
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2407
2147
|
CardBase,
|
|
2408
2148
|
{
|
|
2409
2149
|
ref,
|
|
@@ -2414,13 +2154,13 @@ var CardTopic = (0, import_react7.forwardRef)(
|
|
|
2414
2154
|
className: cn("justify-center gap-2 py-2 px-4", className),
|
|
2415
2155
|
...props,
|
|
2416
2156
|
children: [
|
|
2417
|
-
subHead && /* @__PURE__ */ (0,
|
|
2418
|
-
/* @__PURE__ */ (0,
|
|
2419
|
-
index < subHead.length - 1 && /* @__PURE__ */ (0,
|
|
2157
|
+
subHead && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-text-600 text-2xs flex flex-row gap-1", children: subHead.map((text, index) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react6.Fragment, { children: [
|
|
2158
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { children: text }),
|
|
2159
|
+
index < subHead.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { children: "\u2022" })
|
|
2420
2160
|
] }, `${text} - ${index}`)) }),
|
|
2421
|
-
/* @__PURE__ */ (0,
|
|
2422
|
-
/* @__PURE__ */ (0,
|
|
2423
|
-
/* @__PURE__ */ (0,
|
|
2161
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-sm text-text-950 font-bold truncate", children: header }),
|
|
2162
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "grid grid-cols-[1fr_auto] items-center gap-2", children: [
|
|
2163
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2424
2164
|
ProgressBar_default,
|
|
2425
2165
|
{
|
|
2426
2166
|
size: "small",
|
|
@@ -2429,7 +2169,7 @@ var CardTopic = (0, import_react7.forwardRef)(
|
|
|
2429
2169
|
"data-testid": "progress-bar"
|
|
2430
2170
|
}
|
|
2431
2171
|
),
|
|
2432
|
-
showPercentage && /* @__PURE__ */ (0,
|
|
2172
|
+
showPercentage && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2433
2173
|
Text_default,
|
|
2434
2174
|
{
|
|
2435
2175
|
size: "xs",
|
|
@@ -2449,7 +2189,7 @@ var CardTopic = (0, import_react7.forwardRef)(
|
|
|
2449
2189
|
);
|
|
2450
2190
|
}
|
|
2451
2191
|
);
|
|
2452
|
-
var CardPerformance = (0,
|
|
2192
|
+
var CardPerformance = (0, import_react6.forwardRef)(
|
|
2453
2193
|
({
|
|
2454
2194
|
header,
|
|
2455
2195
|
progress,
|
|
@@ -2463,7 +2203,7 @@ var CardPerformance = (0, import_react7.forwardRef)(
|
|
|
2463
2203
|
...props
|
|
2464
2204
|
}, ref) => {
|
|
2465
2205
|
const hasProgress = progress !== void 0;
|
|
2466
|
-
return /* @__PURE__ */ (0,
|
|
2206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2467
2207
|
CardBase,
|
|
2468
2208
|
{
|
|
2469
2209
|
ref,
|
|
@@ -2477,10 +2217,10 @@ var CardPerformance = (0, import_react7.forwardRef)(
|
|
|
2477
2217
|
onClick: () => actionVariant == "caret" && onClickButton?.(valueButton),
|
|
2478
2218
|
...props,
|
|
2479
2219
|
children: [
|
|
2480
|
-
/* @__PURE__ */ (0,
|
|
2481
|
-
/* @__PURE__ */ (0,
|
|
2482
|
-
/* @__PURE__ */ (0,
|
|
2483
|
-
actionVariant === "button" && /* @__PURE__ */ (0,
|
|
2220
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w-full flex flex-col justify-between gap-2", children: [
|
|
2221
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-row justify-between items-center gap-2", children: [
|
|
2222
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-lg font-bold text-text-950 truncate flex-1 min-w-0", children: header }),
|
|
2223
|
+
actionVariant === "button" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2484
2224
|
Button_default,
|
|
2485
2225
|
{
|
|
2486
2226
|
variant: "outline",
|
|
@@ -2491,17 +2231,17 @@ var CardPerformance = (0, import_react7.forwardRef)(
|
|
|
2491
2231
|
}
|
|
2492
2232
|
)
|
|
2493
2233
|
] }),
|
|
2494
|
-
/* @__PURE__ */ (0,
|
|
2234
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "w-full", children: hasProgress ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2495
2235
|
ProgressBar_default,
|
|
2496
2236
|
{
|
|
2497
2237
|
value: progress,
|
|
2498
2238
|
label: `${progress}% ${labelProgress}`,
|
|
2499
2239
|
variant: progressVariant
|
|
2500
2240
|
}
|
|
2501
|
-
) : /* @__PURE__ */ (0,
|
|
2241
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-xs text-text-600 truncate", children: description }) })
|
|
2502
2242
|
] }),
|
|
2503
|
-
actionVariant == "caret" && /* @__PURE__ */ (0,
|
|
2504
|
-
|
|
2243
|
+
actionVariant == "caret" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2244
|
+
import_phosphor_react3.CaretRight,
|
|
2505
2245
|
{
|
|
2506
2246
|
className: "size-4.5 text-text-800 cursor-pointer",
|
|
2507
2247
|
"data-testid": "caret-icon"
|
|
@@ -2512,7 +2252,7 @@ var CardPerformance = (0, import_react7.forwardRef)(
|
|
|
2512
2252
|
);
|
|
2513
2253
|
}
|
|
2514
2254
|
);
|
|
2515
|
-
var CardResults = (0,
|
|
2255
|
+
var CardResults = (0, import_react6.forwardRef)(
|
|
2516
2256
|
({
|
|
2517
2257
|
header,
|
|
2518
2258
|
correct_answers,
|
|
@@ -2524,7 +2264,7 @@ var CardResults = (0, import_react7.forwardRef)(
|
|
|
2524
2264
|
...props
|
|
2525
2265
|
}, ref) => {
|
|
2526
2266
|
const isRow = direction == "row";
|
|
2527
|
-
return /* @__PURE__ */ (0,
|
|
2267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2528
2268
|
CardBase,
|
|
2529
2269
|
{
|
|
2530
2270
|
ref,
|
|
@@ -2534,7 +2274,7 @@ var CardResults = (0, import_react7.forwardRef)(
|
|
|
2534
2274
|
className: cn("items-stretch cursor-pointer pr-4", className),
|
|
2535
2275
|
...props,
|
|
2536
2276
|
children: [
|
|
2537
|
-
/* @__PURE__ */ (0,
|
|
2277
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2538
2278
|
"div",
|
|
2539
2279
|
{
|
|
2540
2280
|
className: cn(
|
|
@@ -2543,11 +2283,11 @@ var CardResults = (0, import_react7.forwardRef)(
|
|
|
2543
2283
|
style: {
|
|
2544
2284
|
backgroundColor: color
|
|
2545
2285
|
},
|
|
2546
|
-
children: /* @__PURE__ */ (0,
|
|
2286
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(IconRender_default, { iconName: icon, color: "currentColor", size: 20 })
|
|
2547
2287
|
}
|
|
2548
2288
|
),
|
|
2549
|
-
/* @__PURE__ */ (0,
|
|
2550
|
-
/* @__PURE__ */ (0,
|
|
2289
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w-full flex flex-row justify-between items-center", children: [
|
|
2290
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2551
2291
|
"div",
|
|
2552
2292
|
{
|
|
2553
2293
|
className: cn(
|
|
@@ -2555,28 +2295,28 @@ var CardResults = (0, import_react7.forwardRef)(
|
|
|
2555
2295
|
isRow ? "flex-row items-center gap-2" : "flex-col"
|
|
2556
2296
|
),
|
|
2557
2297
|
children: [
|
|
2558
|
-
/* @__PURE__ */ (0,
|
|
2559
|
-
/* @__PURE__ */ (0,
|
|
2560
|
-
/* @__PURE__ */ (0,
|
|
2298
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-sm font-bold text-text-950 flex-1", children: header }),
|
|
2299
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "flex flex-wrap flex-row gap-1 items-center", children: [
|
|
2300
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2561
2301
|
Badge_default,
|
|
2562
2302
|
{
|
|
2563
2303
|
action: "success",
|
|
2564
2304
|
variant: "solid",
|
|
2565
2305
|
size: "large",
|
|
2566
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
2306
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_phosphor_react3.CheckCircle, {}),
|
|
2567
2307
|
children: [
|
|
2568
2308
|
correct_answers,
|
|
2569
2309
|
" Corretas"
|
|
2570
2310
|
]
|
|
2571
2311
|
}
|
|
2572
2312
|
),
|
|
2573
|
-
/* @__PURE__ */ (0,
|
|
2313
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2574
2314
|
Badge_default,
|
|
2575
2315
|
{
|
|
2576
2316
|
action: "error",
|
|
2577
2317
|
variant: "solid",
|
|
2578
2318
|
size: "large",
|
|
2579
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
2319
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_phosphor_react3.XCircle, {}),
|
|
2580
2320
|
children: [
|
|
2581
2321
|
incorrect_answers,
|
|
2582
2322
|
" Incorretas"
|
|
@@ -2587,14 +2327,14 @@ var CardResults = (0, import_react7.forwardRef)(
|
|
|
2587
2327
|
]
|
|
2588
2328
|
}
|
|
2589
2329
|
),
|
|
2590
|
-
/* @__PURE__ */ (0,
|
|
2330
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_phosphor_react3.CaretRight, { className: "min-w-6 min-h-6 text-text-800" })
|
|
2591
2331
|
] })
|
|
2592
2332
|
]
|
|
2593
2333
|
}
|
|
2594
2334
|
);
|
|
2595
2335
|
}
|
|
2596
2336
|
);
|
|
2597
|
-
var CardStatus = (0,
|
|
2337
|
+
var CardStatus = (0, import_react6.forwardRef)(
|
|
2598
2338
|
({ header, className, status, label, ...props }, ref) => {
|
|
2599
2339
|
const getLabelBadge = (status2) => {
|
|
2600
2340
|
switch (status2) {
|
|
@@ -2613,13 +2353,13 @@ var CardStatus = (0, import_react7.forwardRef)(
|
|
|
2613
2353
|
const getIconBadge = (status2) => {
|
|
2614
2354
|
switch (status2) {
|
|
2615
2355
|
case "correct":
|
|
2616
|
-
return /* @__PURE__ */ (0,
|
|
2356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_phosphor_react3.CheckCircle, {});
|
|
2617
2357
|
case "incorrect":
|
|
2618
|
-
return /* @__PURE__ */ (0,
|
|
2358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_phosphor_react3.XCircle, {});
|
|
2619
2359
|
case "pending":
|
|
2620
|
-
return /* @__PURE__ */ (0,
|
|
2360
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_phosphor_react3.Clock, {});
|
|
2621
2361
|
default:
|
|
2622
|
-
return /* @__PURE__ */ (0,
|
|
2362
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_phosphor_react3.XCircle, {});
|
|
2623
2363
|
}
|
|
2624
2364
|
};
|
|
2625
2365
|
const getActionBadge = (status2) => {
|
|
@@ -2634,7 +2374,7 @@ var CardStatus = (0, import_react7.forwardRef)(
|
|
|
2634
2374
|
return "info";
|
|
2635
2375
|
}
|
|
2636
2376
|
};
|
|
2637
|
-
return /* @__PURE__ */ (0,
|
|
2377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2638
2378
|
CardBase,
|
|
2639
2379
|
{
|
|
2640
2380
|
ref,
|
|
@@ -2643,10 +2383,10 @@ var CardStatus = (0, import_react7.forwardRef)(
|
|
|
2643
2383
|
minHeight: "medium",
|
|
2644
2384
|
className: cn("items-center cursor-pointer", className),
|
|
2645
2385
|
...props,
|
|
2646
|
-
children: /* @__PURE__ */ (0,
|
|
2647
|
-
/* @__PURE__ */ (0,
|
|
2648
|
-
/* @__PURE__ */ (0,
|
|
2649
|
-
status && /* @__PURE__ */ (0,
|
|
2386
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex justify-between w-full h-full flex-row items-center gap-2", children: [
|
|
2387
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-sm font-bold text-text-950 truncate flex-1 min-w-0", children: header }),
|
|
2388
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "flex flex-row gap-1 items-center flex-shrink-0", children: [
|
|
2389
|
+
status && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2650
2390
|
Badge_default,
|
|
2651
2391
|
{
|
|
2652
2392
|
action: getActionBadge(status),
|
|
@@ -2656,17 +2396,17 @@ var CardStatus = (0, import_react7.forwardRef)(
|
|
|
2656
2396
|
children: getLabelBadge(status)
|
|
2657
2397
|
}
|
|
2658
2398
|
),
|
|
2659
|
-
label && /* @__PURE__ */ (0,
|
|
2399
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-sm text-text-800", children: label })
|
|
2660
2400
|
] }),
|
|
2661
|
-
/* @__PURE__ */ (0,
|
|
2401
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_phosphor_react3.CaretRight, { className: "min-w-6 min-h-6 text-text-800 cursor-pointer flex-shrink-0 ml-2" })
|
|
2662
2402
|
] })
|
|
2663
2403
|
}
|
|
2664
2404
|
);
|
|
2665
2405
|
}
|
|
2666
2406
|
);
|
|
2667
|
-
var CardSettings = (0,
|
|
2407
|
+
var CardSettings = (0, import_react6.forwardRef)(
|
|
2668
2408
|
({ header, className, icon, ...props }, ref) => {
|
|
2669
|
-
return /* @__PURE__ */ (0,
|
|
2409
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2670
2410
|
CardBase,
|
|
2671
2411
|
{
|
|
2672
2412
|
ref,
|
|
@@ -2679,17 +2419,17 @@ var CardSettings = (0, import_react7.forwardRef)(
|
|
|
2679
2419
|
),
|
|
2680
2420
|
...props,
|
|
2681
2421
|
children: [
|
|
2682
|
-
/* @__PURE__ */ (0,
|
|
2683
|
-
/* @__PURE__ */ (0,
|
|
2684
|
-
/* @__PURE__ */ (0,
|
|
2422
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "[&>svg]:size-6", children: icon }),
|
|
2423
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "w-full text-sm truncate", children: header }),
|
|
2424
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_phosphor_react3.CaretRight, { size: 24, className: "cursor-pointer" })
|
|
2685
2425
|
]
|
|
2686
2426
|
}
|
|
2687
2427
|
);
|
|
2688
2428
|
}
|
|
2689
2429
|
);
|
|
2690
|
-
var CardSupport = (0,
|
|
2430
|
+
var CardSupport = (0, import_react6.forwardRef)(
|
|
2691
2431
|
({ header, className, direction = "col", children, ...props }, ref) => {
|
|
2692
|
-
return /* @__PURE__ */ (0,
|
|
2432
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2693
2433
|
CardBase,
|
|
2694
2434
|
{
|
|
2695
2435
|
ref,
|
|
@@ -2702,7 +2442,7 @@ var CardSupport = (0, import_react7.forwardRef)(
|
|
|
2702
2442
|
),
|
|
2703
2443
|
...props,
|
|
2704
2444
|
children: [
|
|
2705
|
-
/* @__PURE__ */ (0,
|
|
2445
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2706
2446
|
"div",
|
|
2707
2447
|
{
|
|
2708
2448
|
className: cn(
|
|
@@ -2710,18 +2450,18 @@ var CardSupport = (0, import_react7.forwardRef)(
|
|
|
2710
2450
|
direction == "col" ? "flex-col" : "flex-row items-center"
|
|
2711
2451
|
),
|
|
2712
2452
|
children: [
|
|
2713
|
-
/* @__PURE__ */ (0,
|
|
2714
|
-
/* @__PURE__ */ (0,
|
|
2453
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "w-full min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-sm text-text-950 font-bold truncate", children: header }) }),
|
|
2454
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "flex flex-row gap-1", children })
|
|
2715
2455
|
]
|
|
2716
2456
|
}
|
|
2717
2457
|
),
|
|
2718
|
-
/* @__PURE__ */ (0,
|
|
2458
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_phosphor_react3.CaretRight, { className: "text-text-800 cursor-pointer", size: 24 })
|
|
2719
2459
|
]
|
|
2720
2460
|
}
|
|
2721
2461
|
);
|
|
2722
2462
|
}
|
|
2723
2463
|
);
|
|
2724
|
-
var CardForum = (0,
|
|
2464
|
+
var CardForum = (0, import_react6.forwardRef)(
|
|
2725
2465
|
({
|
|
2726
2466
|
title,
|
|
2727
2467
|
content,
|
|
@@ -2735,7 +2475,7 @@ var CardForum = (0, import_react7.forwardRef)(
|
|
|
2735
2475
|
hour,
|
|
2736
2476
|
...props
|
|
2737
2477
|
}, ref) => {
|
|
2738
|
-
return /* @__PURE__ */ (0,
|
|
2478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2739
2479
|
CardBase,
|
|
2740
2480
|
{
|
|
2741
2481
|
ref,
|
|
@@ -2746,7 +2486,7 @@ var CardForum = (0, import_react7.forwardRef)(
|
|
|
2746
2486
|
className: cn("w-auto h-auto gap-3", className),
|
|
2747
2487
|
...props,
|
|
2748
2488
|
children: [
|
|
2749
|
-
/* @__PURE__ */ (0,
|
|
2489
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2750
2490
|
"button",
|
|
2751
2491
|
{
|
|
2752
2492
|
type: "button",
|
|
@@ -2755,18 +2495,18 @@ var CardForum = (0, import_react7.forwardRef)(
|
|
|
2755
2495
|
className: "min-w-8 h-8 rounded-full bg-background-950"
|
|
2756
2496
|
}
|
|
2757
2497
|
),
|
|
2758
|
-
/* @__PURE__ */ (0,
|
|
2759
|
-
/* @__PURE__ */ (0,
|
|
2760
|
-
/* @__PURE__ */ (0,
|
|
2761
|
-
/* @__PURE__ */ (0,
|
|
2498
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col gap-2 flex-1 min-w-0", children: [
|
|
2499
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-row gap-1 items-center flex-wrap", children: [
|
|
2500
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-xs font-semibold text-primary-700 truncate", children: title }),
|
|
2501
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "text-xs text-text-600", children: [
|
|
2762
2502
|
"\u2022 ",
|
|
2763
2503
|
date,
|
|
2764
2504
|
" \u2022 ",
|
|
2765
2505
|
hour
|
|
2766
2506
|
] })
|
|
2767
2507
|
] }),
|
|
2768
|
-
/* @__PURE__ */ (0,
|
|
2769
|
-
/* @__PURE__ */ (0,
|
|
2508
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-text-950 text-sm line-clamp-2 truncate", children: content }),
|
|
2509
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2770
2510
|
"button",
|
|
2771
2511
|
{
|
|
2772
2512
|
type: "button",
|
|
@@ -2774,8 +2514,8 @@ var CardForum = (0, import_react7.forwardRef)(
|
|
|
2774
2514
|
onClick: () => onClickComments?.(valueComments),
|
|
2775
2515
|
className: "text-text-600 flex flex-row gap-2 items-center",
|
|
2776
2516
|
children: [
|
|
2777
|
-
/* @__PURE__ */ (0,
|
|
2778
|
-
/* @__PURE__ */ (0,
|
|
2517
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_phosphor_react3.ChatCircleText, { "aria-hidden": "true", size: 16 }),
|
|
2518
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "text-xs", children: [
|
|
2779
2519
|
comments,
|
|
2780
2520
|
" respostas"
|
|
2781
2521
|
] })
|
|
@@ -2788,7 +2528,7 @@ var CardForum = (0, import_react7.forwardRef)(
|
|
|
2788
2528
|
);
|
|
2789
2529
|
}
|
|
2790
2530
|
);
|
|
2791
|
-
var CardAudio = (0,
|
|
2531
|
+
var CardAudio = (0, import_react6.forwardRef)(
|
|
2792
2532
|
({
|
|
2793
2533
|
src,
|
|
2794
2534
|
title,
|
|
@@ -2802,16 +2542,16 @@ var CardAudio = (0, import_react7.forwardRef)(
|
|
|
2802
2542
|
className,
|
|
2803
2543
|
...props
|
|
2804
2544
|
}, ref) => {
|
|
2805
|
-
const [isPlaying, setIsPlaying] = (0,
|
|
2806
|
-
const [currentTime, setCurrentTime] = (0,
|
|
2807
|
-
const [duration, setDuration] = (0,
|
|
2808
|
-
const [volume, setVolume] = (0,
|
|
2809
|
-
const [showVolumeControl, setShowVolumeControl] = (0,
|
|
2810
|
-
const [showSpeedMenu, setShowSpeedMenu] = (0,
|
|
2811
|
-
const [playbackRate, setPlaybackRate] = (0,
|
|
2812
|
-
const audioRef = (0,
|
|
2813
|
-
const volumeControlRef = (0,
|
|
2814
|
-
const speedMenuRef = (0,
|
|
2545
|
+
const [isPlaying, setIsPlaying] = (0, import_react6.useState)(false);
|
|
2546
|
+
const [currentTime, setCurrentTime] = (0, import_react6.useState)(0);
|
|
2547
|
+
const [duration, setDuration] = (0, import_react6.useState)(0);
|
|
2548
|
+
const [volume, setVolume] = (0, import_react6.useState)(1);
|
|
2549
|
+
const [showVolumeControl, setShowVolumeControl] = (0, import_react6.useState)(false);
|
|
2550
|
+
const [showSpeedMenu, setShowSpeedMenu] = (0, import_react6.useState)(false);
|
|
2551
|
+
const [playbackRate, setPlaybackRate] = (0, import_react6.useState)(1);
|
|
2552
|
+
const audioRef = (0, import_react6.useRef)(null);
|
|
2553
|
+
const volumeControlRef = (0, import_react6.useRef)(null);
|
|
2554
|
+
const speedMenuRef = (0, import_react6.useRef)(null);
|
|
2815
2555
|
const formatTime = (time) => {
|
|
2816
2556
|
const minutes = Math.floor(time / 60);
|
|
2817
2557
|
const seconds = Math.floor(time % 60);
|
|
@@ -2878,14 +2618,14 @@ var CardAudio = (0, import_react7.forwardRef)(
|
|
|
2878
2618
|
};
|
|
2879
2619
|
const getVolumeIcon = () => {
|
|
2880
2620
|
if (volume === 0) {
|
|
2881
|
-
return /* @__PURE__ */ (0,
|
|
2621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_phosphor_react3.SpeakerSimpleX, { size: 24 });
|
|
2882
2622
|
}
|
|
2883
2623
|
if (volume < 0.5) {
|
|
2884
|
-
return /* @__PURE__ */ (0,
|
|
2624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_phosphor_react3.SpeakerLow, { size: 24 });
|
|
2885
2625
|
}
|
|
2886
|
-
return /* @__PURE__ */ (0,
|
|
2626
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_phosphor_react3.SpeakerHigh, { size: 24 });
|
|
2887
2627
|
};
|
|
2888
|
-
(0,
|
|
2628
|
+
(0, import_react6.useEffect)(() => {
|
|
2889
2629
|
const handleClickOutside = (event) => {
|
|
2890
2630
|
if (volumeControlRef.current && !volumeControlRef.current.contains(event.target)) {
|
|
2891
2631
|
setShowVolumeControl(false);
|
|
@@ -2899,7 +2639,7 @@ var CardAudio = (0, import_react7.forwardRef)(
|
|
|
2899
2639
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
2900
2640
|
};
|
|
2901
2641
|
}, []);
|
|
2902
|
-
return /* @__PURE__ */ (0,
|
|
2642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2903
2643
|
CardBase,
|
|
2904
2644
|
{
|
|
2905
2645
|
ref,
|
|
@@ -2912,7 +2652,7 @@ var CardAudio = (0, import_react7.forwardRef)(
|
|
|
2912
2652
|
),
|
|
2913
2653
|
...props,
|
|
2914
2654
|
children: [
|
|
2915
|
-
/* @__PURE__ */ (0,
|
|
2655
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2916
2656
|
"audio",
|
|
2917
2657
|
{
|
|
2918
2658
|
ref: audioRef,
|
|
@@ -2924,7 +2664,7 @@ var CardAudio = (0, import_react7.forwardRef)(
|
|
|
2924
2664
|
onEnded: handleEnded,
|
|
2925
2665
|
"data-testid": "audio-element",
|
|
2926
2666
|
"aria-label": title,
|
|
2927
|
-
children: tracks ? tracks.map((track) => /* @__PURE__ */ (0,
|
|
2667
|
+
children: tracks ? tracks.map((track) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2928
2668
|
"track",
|
|
2929
2669
|
{
|
|
2930
2670
|
kind: track.kind,
|
|
@@ -2934,7 +2674,7 @@ var CardAudio = (0, import_react7.forwardRef)(
|
|
|
2934
2674
|
default: track.default
|
|
2935
2675
|
},
|
|
2936
2676
|
track.src
|
|
2937
|
-
)) : /* @__PURE__ */ (0,
|
|
2677
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2938
2678
|
"track",
|
|
2939
2679
|
{
|
|
2940
2680
|
kind: "captions",
|
|
@@ -2945,7 +2685,7 @@ var CardAudio = (0, import_react7.forwardRef)(
|
|
|
2945
2685
|
)
|
|
2946
2686
|
}
|
|
2947
2687
|
),
|
|
2948
|
-
/* @__PURE__ */ (0,
|
|
2688
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2949
2689
|
"button",
|
|
2950
2690
|
{
|
|
2951
2691
|
type: "button",
|
|
@@ -2953,14 +2693,14 @@ var CardAudio = (0, import_react7.forwardRef)(
|
|
|
2953
2693
|
disabled: !src,
|
|
2954
2694
|
className: "cursor-pointer text-text-950 hover:text-primary-600 disabled:text-text-400 disabled:cursor-not-allowed",
|
|
2955
2695
|
"aria-label": isPlaying ? "Pausar" : "Reproduzir",
|
|
2956
|
-
children: isPlaying ? /* @__PURE__ */ (0,
|
|
2957
|
-
/* @__PURE__ */ (0,
|
|
2958
|
-
/* @__PURE__ */ (0,
|
|
2959
|
-
] }) }) : /* @__PURE__ */ (0,
|
|
2696
|
+
children: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "w-6 h-6 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex gap-0.5", children: [
|
|
2697
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "w-1 h-4 bg-current rounded-sm" }),
|
|
2698
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "w-1 h-4 bg-current rounded-sm" })
|
|
2699
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_phosphor_react3.Play, { size: 24 })
|
|
2960
2700
|
}
|
|
2961
2701
|
),
|
|
2962
|
-
/* @__PURE__ */ (0,
|
|
2963
|
-
/* @__PURE__ */ (0,
|
|
2702
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-text-800 text-md font-medium min-w-[2.5rem]", children: formatTime(currentTime) }),
|
|
2703
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex-1 relative", "data-testid": "progress-bar", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2964
2704
|
"button",
|
|
2965
2705
|
{
|
|
2966
2706
|
type: "button",
|
|
@@ -2975,7 +2715,7 @@ var CardAudio = (0, import_react7.forwardRef)(
|
|
|
2975
2715
|
}
|
|
2976
2716
|
},
|
|
2977
2717
|
"aria-label": "Barra de progresso do \xE1udio",
|
|
2978
|
-
children: /* @__PURE__ */ (0,
|
|
2718
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2979
2719
|
"div",
|
|
2980
2720
|
{
|
|
2981
2721
|
className: "h-full bg-primary-600 rounded-full transition-all duration-100",
|
|
@@ -2986,19 +2726,19 @@ var CardAudio = (0, import_react7.forwardRef)(
|
|
|
2986
2726
|
)
|
|
2987
2727
|
}
|
|
2988
2728
|
) }),
|
|
2989
|
-
/* @__PURE__ */ (0,
|
|
2990
|
-
/* @__PURE__ */ (0,
|
|
2991
|
-
/* @__PURE__ */ (0,
|
|
2729
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-text-800 text-md font-medium min-w-[2.5rem]", children: formatTime(duration) }),
|
|
2730
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "relative h-6", ref: volumeControlRef, children: [
|
|
2731
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2992
2732
|
"button",
|
|
2993
2733
|
{
|
|
2994
2734
|
type: "button",
|
|
2995
2735
|
onClick: toggleVolumeControl,
|
|
2996
2736
|
className: "cursor-pointer text-text-950 hover:text-primary-600",
|
|
2997
2737
|
"aria-label": "Controle de volume",
|
|
2998
|
-
children: /* @__PURE__ */ (0,
|
|
2738
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "w-6 h-6 flex items-center justify-center", children: getVolumeIcon() })
|
|
2999
2739
|
}
|
|
3000
2740
|
),
|
|
3001
|
-
showVolumeControl && /* @__PURE__ */ (0,
|
|
2741
|
+
showVolumeControl && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3002
2742
|
"button",
|
|
3003
2743
|
{
|
|
3004
2744
|
type: "button",
|
|
@@ -3008,7 +2748,7 @@ var CardAudio = (0, import_react7.forwardRef)(
|
|
|
3008
2748
|
setShowVolumeControl(false);
|
|
3009
2749
|
}
|
|
3010
2750
|
},
|
|
3011
|
-
children: /* @__PURE__ */ (0,
|
|
2751
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3012
2752
|
"input",
|
|
3013
2753
|
{
|
|
3014
2754
|
type: "range",
|
|
@@ -3049,22 +2789,22 @@ var CardAudio = (0, import_react7.forwardRef)(
|
|
|
3049
2789
|
}
|
|
3050
2790
|
)
|
|
3051
2791
|
] }),
|
|
3052
|
-
/* @__PURE__ */ (0,
|
|
3053
|
-
/* @__PURE__ */ (0,
|
|
2792
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "relative h-6", ref: speedMenuRef, children: [
|
|
2793
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3054
2794
|
"button",
|
|
3055
2795
|
{
|
|
3056
2796
|
type: "button",
|
|
3057
2797
|
onClick: toggleSpeedMenu,
|
|
3058
2798
|
className: "cursor-pointer text-text-950 hover:text-primary-600",
|
|
3059
2799
|
"aria-label": "Op\xE7\xF5es de velocidade",
|
|
3060
|
-
children: /* @__PURE__ */ (0,
|
|
2800
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_phosphor_react3.DotsThreeVertical, { size: 24 })
|
|
3061
2801
|
}
|
|
3062
2802
|
),
|
|
3063
|
-
showSpeedMenu && /* @__PURE__ */ (0,
|
|
2803
|
+
showSpeedMenu && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "absolute bottom-full right-0 mb-2 p-2 bg-background border border-border-100 rounded-lg shadow-lg min-w-24 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex flex-col gap-1", children: [
|
|
3064
2804
|
{ speed: 1, label: "1x" },
|
|
3065
2805
|
{ speed: 1.5, label: "1.5x" },
|
|
3066
2806
|
{ speed: 2, label: "2x" }
|
|
3067
|
-
].map(({ speed, label }) => /* @__PURE__ */ (0,
|
|
2807
|
+
].map(({ speed, label }) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3068
2808
|
"button",
|
|
3069
2809
|
{
|
|
3070
2810
|
type: "button",
|
|
@@ -3089,10 +2829,10 @@ var SIMULADO_BACKGROUND_CLASSES = {
|
|
|
3089
2829
|
simuladao: "bg-exam-3",
|
|
3090
2830
|
vestibular: "bg-exam-4"
|
|
3091
2831
|
};
|
|
3092
|
-
var CardSimulado = (0,
|
|
2832
|
+
var CardSimulado = (0, import_react6.forwardRef)(
|
|
3093
2833
|
({ title, duration, info, backgroundColor, className, ...props }, ref) => {
|
|
3094
2834
|
const backgroundClass = SIMULADO_BACKGROUND_CLASSES[backgroundColor];
|
|
3095
|
-
return /* @__PURE__ */ (0,
|
|
2835
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3096
2836
|
CardBase,
|
|
3097
2837
|
{
|
|
3098
2838
|
ref,
|
|
@@ -3105,19 +2845,19 @@ var CardSimulado = (0, import_react7.forwardRef)(
|
|
|
3105
2845
|
className
|
|
3106
2846
|
),
|
|
3107
2847
|
...props,
|
|
3108
|
-
children: /* @__PURE__ */ (0,
|
|
3109
|
-
/* @__PURE__ */ (0,
|
|
3110
|
-
/* @__PURE__ */ (0,
|
|
3111
|
-
/* @__PURE__ */ (0,
|
|
3112
|
-
duration && /* @__PURE__ */ (0,
|
|
3113
|
-
/* @__PURE__ */ (0,
|
|
3114
|
-
/* @__PURE__ */ (0,
|
|
2848
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex justify-between items-center w-full gap-4", children: [
|
|
2849
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col gap-1 flex-1 min-w-0", children: [
|
|
2850
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text_default, { size: "lg", weight: "bold", className: "text-text-950 truncate", children: title }),
|
|
2851
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-4 text-text-700", children: [
|
|
2852
|
+
duration && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
2853
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_phosphor_react3.Clock, { size: 16, className: "flex-shrink-0" }),
|
|
2854
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text_default, { size: "sm", children: duration })
|
|
3115
2855
|
] }),
|
|
3116
|
-
/* @__PURE__ */ (0,
|
|
2856
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text_default, { size: "sm", className: "truncate", children: info })
|
|
3117
2857
|
] })
|
|
3118
2858
|
] }),
|
|
3119
|
-
/* @__PURE__ */ (0,
|
|
3120
|
-
|
|
2859
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2860
|
+
import_phosphor_react3.CaretRight,
|
|
3121
2861
|
{
|
|
3122
2862
|
size: 24,
|
|
3123
2863
|
className: "text-text-800 flex-shrink-0",
|
|
@@ -3129,7 +2869,7 @@ var CardSimulado = (0, import_react7.forwardRef)(
|
|
|
3129
2869
|
);
|
|
3130
2870
|
}
|
|
3131
2871
|
);
|
|
3132
|
-
var CardTest = (0,
|
|
2872
|
+
var CardTest = (0, import_react6.forwardRef)(
|
|
3133
2873
|
({
|
|
3134
2874
|
title,
|
|
3135
2875
|
duration,
|
|
@@ -3161,7 +2901,7 @@ var CardTest = (0, import_react7.forwardRef)(
|
|
|
3161
2901
|
const interactiveClasses = isSelectable ? "cursor-pointer focus:outline-none focus:ring-2 focus:ring-primary-950 focus:ring-offset-2" : "";
|
|
3162
2902
|
const selectedClasses = selected ? "ring-2 ring-primary-950 ring-offset-2" : "";
|
|
3163
2903
|
if (isSelectable) {
|
|
3164
|
-
return /* @__PURE__ */ (0,
|
|
2904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3165
2905
|
"button",
|
|
3166
2906
|
{
|
|
3167
2907
|
ref,
|
|
@@ -3173,8 +2913,8 @@ var CardTest = (0, import_react7.forwardRef)(
|
|
|
3173
2913
|
onKeyDown: handleKeyDown,
|
|
3174
2914
|
"aria-pressed": selected,
|
|
3175
2915
|
...props,
|
|
3176
|
-
children: /* @__PURE__ */ (0,
|
|
3177
|
-
/* @__PURE__ */ (0,
|
|
2916
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
|
|
2917
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3178
2918
|
Text_default,
|
|
3179
2919
|
{
|
|
3180
2920
|
size: "md",
|
|
@@ -3183,10 +2923,10 @@ var CardTest = (0, import_react7.forwardRef)(
|
|
|
3183
2923
|
children: title
|
|
3184
2924
|
}
|
|
3185
2925
|
),
|
|
3186
|
-
/* @__PURE__ */ (0,
|
|
3187
|
-
duration && /* @__PURE__ */ (0,
|
|
3188
|
-
/* @__PURE__ */ (0,
|
|
3189
|
-
/* @__PURE__ */ (0,
|
|
2926
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
|
|
2927
|
+
duration && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
|
|
2928
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_phosphor_react3.Clock, { size: 16, className: "text-text-700" }),
|
|
2929
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3190
2930
|
Text_default,
|
|
3191
2931
|
{
|
|
3192
2932
|
size: "sm",
|
|
@@ -3195,7 +2935,7 @@ var CardTest = (0, import_react7.forwardRef)(
|
|
|
3195
2935
|
}
|
|
3196
2936
|
)
|
|
3197
2937
|
] }),
|
|
3198
|
-
/* @__PURE__ */ (0,
|
|
2938
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3199
2939
|
Text_default,
|
|
3200
2940
|
{
|
|
3201
2941
|
size: "sm",
|
|
@@ -3208,14 +2948,14 @@ var CardTest = (0, import_react7.forwardRef)(
|
|
|
3208
2948
|
}
|
|
3209
2949
|
);
|
|
3210
2950
|
}
|
|
3211
|
-
return /* @__PURE__ */ (0,
|
|
2951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3212
2952
|
"div",
|
|
3213
2953
|
{
|
|
3214
2954
|
ref,
|
|
3215
2955
|
className: cn(`${baseClasses} ${className}`.trim()),
|
|
3216
2956
|
...props,
|
|
3217
|
-
children: /* @__PURE__ */ (0,
|
|
3218
|
-
/* @__PURE__ */ (0,
|
|
2957
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
|
|
2958
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3219
2959
|
Text_default,
|
|
3220
2960
|
{
|
|
3221
2961
|
size: "md",
|
|
@@ -3224,10 +2964,10 @@ var CardTest = (0, import_react7.forwardRef)(
|
|
|
3224
2964
|
children: title
|
|
3225
2965
|
}
|
|
3226
2966
|
),
|
|
3227
|
-
/* @__PURE__ */ (0,
|
|
3228
|
-
duration && /* @__PURE__ */ (0,
|
|
3229
|
-
/* @__PURE__ */ (0,
|
|
3230
|
-
/* @__PURE__ */ (0,
|
|
2967
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
|
|
2968
|
+
duration && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
|
|
2969
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_phosphor_react3.Clock, { size: 16, className: "text-text-700" }),
|
|
2970
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3231
2971
|
Text_default,
|
|
3232
2972
|
{
|
|
3233
2973
|
size: "sm",
|
|
@@ -3236,7 +2976,7 @@ var CardTest = (0, import_react7.forwardRef)(
|
|
|
3236
2976
|
}
|
|
3237
2977
|
)
|
|
3238
2978
|
] }),
|
|
3239
|
-
/* @__PURE__ */ (0,
|
|
2979
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3240
2980
|
Text_default,
|
|
3241
2981
|
{
|
|
3242
2982
|
size: "sm",
|
|
@@ -3272,15 +3012,15 @@ var SIMULATION_TYPE_STYLES = {
|
|
|
3272
3012
|
text: "Vestibular"
|
|
3273
3013
|
}
|
|
3274
3014
|
};
|
|
3275
|
-
var CardSimulationHistory = (0,
|
|
3276
|
-
return /* @__PURE__ */ (0,
|
|
3015
|
+
var CardSimulationHistory = (0, import_react6.forwardRef)(({ data, onSimulationClick, className, ...props }, ref) => {
|
|
3016
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3277
3017
|
"div",
|
|
3278
3018
|
{
|
|
3279
3019
|
ref,
|
|
3280
3020
|
className: cn("w-full max-w-[992px] h-auto", className),
|
|
3281
3021
|
...props,
|
|
3282
|
-
children: /* @__PURE__ */ (0,
|
|
3283
|
-
data.map((section, sectionIndex) => /* @__PURE__ */ (0,
|
|
3022
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col gap-0", children: [
|
|
3023
|
+
data.map((section, sectionIndex) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
3284
3024
|
"div",
|
|
3285
3025
|
{
|
|
3286
3026
|
className: cn(
|
|
@@ -3288,7 +3028,7 @@ var CardSimulationHistory = (0, import_react7.forwardRef)(({ data, onSimulationC
|
|
|
3288
3028
|
sectionIndex === 0 ? "rounded-t-3xl" : ""
|
|
3289
3029
|
),
|
|
3290
3030
|
children: [
|
|
3291
|
-
/* @__PURE__ */ (0,
|
|
3031
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3292
3032
|
Text_default,
|
|
3293
3033
|
{
|
|
3294
3034
|
size: "xs",
|
|
@@ -3297,9 +3037,9 @@ var CardSimulationHistory = (0, import_react7.forwardRef)(({ data, onSimulationC
|
|
|
3297
3037
|
children: section.date
|
|
3298
3038
|
}
|
|
3299
3039
|
),
|
|
3300
|
-
/* @__PURE__ */ (0,
|
|
3040
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex flex-col gap-2 flex-1", children: section.simulations.map((simulation) => {
|
|
3301
3041
|
const typeStyles = SIMULATION_TYPE_STYLES[simulation.type];
|
|
3302
|
-
return /* @__PURE__ */ (0,
|
|
3042
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3303
3043
|
CardBase,
|
|
3304
3044
|
{
|
|
3305
3045
|
layout: "horizontal",
|
|
@@ -3311,9 +3051,9 @@ var CardSimulationHistory = (0, import_react7.forwardRef)(({ data, onSimulationC
|
|
|
3311
3051
|
transition-shadow duration-200 h-auto min-h-[61px]`
|
|
3312
3052
|
),
|
|
3313
3053
|
onClick: () => onSimulationClick?.(simulation),
|
|
3314
|
-
children: /* @__PURE__ */ (0,
|
|
3315
|
-
/* @__PURE__ */ (0,
|
|
3316
|
-
/* @__PURE__ */ (0,
|
|
3054
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex justify-between items-center w-full gap-2", children: [
|
|
3055
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-wrap flex-col justify-between sm:flex-row gap-2 flex-1 min-w-0", children: [
|
|
3056
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3317
3057
|
Text_default,
|
|
3318
3058
|
{
|
|
3319
3059
|
size: "lg",
|
|
@@ -3322,8 +3062,8 @@ var CardSimulationHistory = (0, import_react7.forwardRef)(({ data, onSimulationC
|
|
|
3322
3062
|
children: simulation.title
|
|
3323
3063
|
}
|
|
3324
3064
|
),
|
|
3325
|
-
/* @__PURE__ */ (0,
|
|
3326
|
-
/* @__PURE__ */ (0,
|
|
3065
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
3066
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3327
3067
|
Badge_default,
|
|
3328
3068
|
{
|
|
3329
3069
|
variant: "examsOutlined",
|
|
@@ -3332,11 +3072,11 @@ var CardSimulationHistory = (0, import_react7.forwardRef)(({ data, onSimulationC
|
|
|
3332
3072
|
children: typeStyles.text
|
|
3333
3073
|
}
|
|
3334
3074
|
),
|
|
3335
|
-
/* @__PURE__ */ (0,
|
|
3075
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text_default, { size: "sm", className: "text-text-800 truncate", children: simulation.info })
|
|
3336
3076
|
] })
|
|
3337
3077
|
] }),
|
|
3338
|
-
/* @__PURE__ */ (0,
|
|
3339
|
-
|
|
3078
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3079
|
+
import_phosphor_react3.CaretRight,
|
|
3340
3080
|
{
|
|
3341
3081
|
size: 24,
|
|
3342
3082
|
className: "text-text-800 flex-shrink-0",
|
|
@@ -3351,16 +3091,16 @@ var CardSimulationHistory = (0, import_react7.forwardRef)(({ data, onSimulationC
|
|
|
3351
3091
|
]
|
|
3352
3092
|
}
|
|
3353
3093
|
) }, section.date)),
|
|
3354
|
-
data.length > 0 && /* @__PURE__ */ (0,
|
|
3094
|
+
data.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "w-full h-6 bg-background rounded-b-3xl" })
|
|
3355
3095
|
] })
|
|
3356
3096
|
}
|
|
3357
3097
|
);
|
|
3358
3098
|
});
|
|
3359
3099
|
|
|
3360
3100
|
// src/components/Accordation/Accordation.tsx
|
|
3361
|
-
var
|
|
3362
|
-
var
|
|
3363
|
-
var CardAccordation = (0,
|
|
3101
|
+
var import_phosphor_react4 = require("phosphor-react");
|
|
3102
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
3103
|
+
var CardAccordation = (0, import_react7.forwardRef)(
|
|
3364
3104
|
({
|
|
3365
3105
|
trigger,
|
|
3366
3106
|
children,
|
|
@@ -3374,13 +3114,13 @@ var CardAccordation = (0, import_react8.forwardRef)(
|
|
|
3374
3114
|
contentClassName,
|
|
3375
3115
|
...props
|
|
3376
3116
|
}, ref) => {
|
|
3377
|
-
const [internalExpanded, setInternalExpanded] = (0,
|
|
3378
|
-
const generatedId = (0,
|
|
3117
|
+
const [internalExpanded, setInternalExpanded] = (0, import_react7.useState)(defaultExpanded);
|
|
3118
|
+
const generatedId = (0, import_react7.useId)();
|
|
3379
3119
|
const contentId = value ? `accordion-content-${value}` : generatedId;
|
|
3380
3120
|
const headerId = value ? `accordion-header-${value}` : `${generatedId}-header`;
|
|
3381
3121
|
const isControlled = controlledExpanded !== void 0;
|
|
3382
3122
|
const isExpanded = isControlled ? controlledExpanded : internalExpanded;
|
|
3383
|
-
(0,
|
|
3123
|
+
(0, import_react7.useEffect)(() => {
|
|
3384
3124
|
if (isControlled) {
|
|
3385
3125
|
setInternalExpanded(controlledExpanded);
|
|
3386
3126
|
}
|
|
@@ -3400,7 +3140,7 @@ var CardAccordation = (0, import_react8.forwardRef)(
|
|
|
3400
3140
|
handleToggle();
|
|
3401
3141
|
}
|
|
3402
3142
|
};
|
|
3403
|
-
return /* @__PURE__ */ (0,
|
|
3143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3404
3144
|
CardBase,
|
|
3405
3145
|
{
|
|
3406
3146
|
ref,
|
|
@@ -3410,7 +3150,7 @@ var CardAccordation = (0, import_react8.forwardRef)(
|
|
|
3410
3150
|
className: cn("overflow-hidden", className),
|
|
3411
3151
|
...props,
|
|
3412
3152
|
children: [
|
|
3413
|
-
/* @__PURE__ */ (0,
|
|
3153
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3414
3154
|
"button",
|
|
3415
3155
|
{
|
|
3416
3156
|
id: headerId,
|
|
@@ -3429,8 +3169,8 @@ var CardAccordation = (0, import_react8.forwardRef)(
|
|
|
3429
3169
|
"data-value": value,
|
|
3430
3170
|
children: [
|
|
3431
3171
|
trigger,
|
|
3432
|
-
/* @__PURE__ */ (0,
|
|
3433
|
-
|
|
3172
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3173
|
+
import_phosphor_react4.CaretRight,
|
|
3434
3174
|
{
|
|
3435
3175
|
size: 20,
|
|
3436
3176
|
className: cn(
|
|
@@ -3444,7 +3184,7 @@ var CardAccordation = (0, import_react8.forwardRef)(
|
|
|
3444
3184
|
]
|
|
3445
3185
|
}
|
|
3446
3186
|
),
|
|
3447
|
-
/* @__PURE__ */ (0,
|
|
3187
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3448
3188
|
"section",
|
|
3449
3189
|
{
|
|
3450
3190
|
id: contentId,
|
|
@@ -3456,7 +3196,7 @@ var CardAccordation = (0, import_react8.forwardRef)(
|
|
|
3456
3196
|
),
|
|
3457
3197
|
"data-testid": "accordion-content",
|
|
3458
3198
|
"data-value": value,
|
|
3459
|
-
children: /* @__PURE__ */ (0,
|
|
3199
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: cn("p-4 pt-0", contentClassName), children })
|
|
3460
3200
|
}
|
|
3461
3201
|
)
|
|
3462
3202
|
]
|
|
@@ -3466,21 +3206,316 @@ var CardAccordation = (0, import_react8.forwardRef)(
|
|
|
3466
3206
|
);
|
|
3467
3207
|
CardAccordation.displayName = "CardAccordation";
|
|
3468
3208
|
|
|
3469
|
-
// src/
|
|
3470
|
-
var
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3209
|
+
// src/components/Alternative/Alternative.tsx
|
|
3210
|
+
var import_phosphor_react5 = require("phosphor-react");
|
|
3211
|
+
var import_react8 = require("react");
|
|
3212
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
3213
|
+
var AlternativesList = ({
|
|
3214
|
+
alternatives,
|
|
3215
|
+
name,
|
|
3216
|
+
defaultValue,
|
|
3217
|
+
value,
|
|
3218
|
+
onValueChange,
|
|
3219
|
+
disabled = false,
|
|
3220
|
+
layout = "default",
|
|
3221
|
+
className = "",
|
|
3222
|
+
mode = "interactive",
|
|
3223
|
+
selectedValue
|
|
3224
|
+
}) => {
|
|
3225
|
+
const uniqueId = (0, import_react8.useId)();
|
|
3226
|
+
const groupName = name || `alternatives-${uniqueId}`;
|
|
3227
|
+
const [actualValue, setActualValue] = (0, import_react8.useState)(value);
|
|
3228
|
+
const isReadonly = mode === "readonly";
|
|
3229
|
+
const getStatusStyles2 = (status, isReadonly2) => {
|
|
3230
|
+
const hoverClass = isReadonly2 ? "" : "hover:bg-background-50";
|
|
3231
|
+
switch (status) {
|
|
3232
|
+
case "correct":
|
|
3233
|
+
return "bg-success-background border-success-300";
|
|
3234
|
+
case "incorrect":
|
|
3235
|
+
return "bg-error-background border-error-300";
|
|
3236
|
+
default:
|
|
3237
|
+
return `bg-background border-border-100 ${hoverClass}`;
|
|
3238
|
+
}
|
|
3239
|
+
};
|
|
3240
|
+
const getStatusBadge2 = (status) => {
|
|
3241
|
+
switch (status) {
|
|
3242
|
+
case "correct":
|
|
3243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_phosphor_react5.CheckCircle, {}), children: "Resposta correta" });
|
|
3244
|
+
case "incorrect":
|
|
3245
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_phosphor_react5.XCircle, {}), children: "Resposta incorreta" });
|
|
3246
|
+
default:
|
|
3247
|
+
return null;
|
|
3248
|
+
}
|
|
3249
|
+
};
|
|
3250
|
+
const getLayoutClasses = () => {
|
|
3251
|
+
switch (layout) {
|
|
3252
|
+
case "compact":
|
|
3253
|
+
return "gap-2";
|
|
3254
|
+
case "detailed":
|
|
3255
|
+
return "gap-4";
|
|
3256
|
+
default:
|
|
3257
|
+
return "gap-3.5";
|
|
3258
|
+
}
|
|
3259
|
+
};
|
|
3260
|
+
const renderReadonlyAlternative = (alternative) => {
|
|
3261
|
+
const alternativeId = alternative.value;
|
|
3262
|
+
const isUserSelected = selectedValue === alternative.value;
|
|
3263
|
+
const isCorrectAnswer = alternative.status === "correct";
|
|
3264
|
+
let displayStatus = void 0;
|
|
3265
|
+
if (isUserSelected && !isCorrectAnswer) {
|
|
3266
|
+
displayStatus = "incorrect";
|
|
3267
|
+
} else if (isCorrectAnswer) {
|
|
3268
|
+
displayStatus = "correct";
|
|
3269
|
+
}
|
|
3270
|
+
const statusStyles = getStatusStyles2(displayStatus, true);
|
|
3271
|
+
const statusBadge = getStatusBadge2(displayStatus);
|
|
3272
|
+
const renderRadio = () => {
|
|
3273
|
+
const radioClasses = `w-6 h-6 rounded-full border-2 cursor-default transition-all duration-200 flex items-center justify-center ${isUserSelected ? "border-primary-950 bg-background" : "border-border-400 bg-background"}`;
|
|
3274
|
+
const dotClasses = "w-3 h-3 rounded-full bg-primary-950 transition-all duration-200";
|
|
3275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: radioClasses, children: isUserSelected && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: dotClasses }) });
|
|
3276
|
+
};
|
|
3277
|
+
if (layout === "detailed") {
|
|
3278
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3279
|
+
"div",
|
|
3280
|
+
{
|
|
3281
|
+
className: cn(
|
|
3282
|
+
"border-2 rounded-lg p-4 w-full",
|
|
3283
|
+
statusStyles,
|
|
3284
|
+
alternative.disabled ? "opacity-50" : ""
|
|
3285
|
+
),
|
|
3286
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
3287
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-start gap-3 flex-1", children: [
|
|
3288
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "mt-1", children: renderRadio() }),
|
|
3289
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex-1", children: [
|
|
3290
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3291
|
+
"p",
|
|
3292
|
+
{
|
|
3293
|
+
className: cn(
|
|
3294
|
+
"block font-medium",
|
|
3295
|
+
selectedValue === alternative.value || statusBadge ? "text-text-950" : "text-text-600"
|
|
3296
|
+
),
|
|
3297
|
+
children: alternative.label
|
|
3298
|
+
}
|
|
3299
|
+
),
|
|
3300
|
+
alternative.description && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
|
|
3301
|
+
] })
|
|
3302
|
+
] }),
|
|
3303
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
3304
|
+
] })
|
|
3305
|
+
},
|
|
3306
|
+
alternativeId
|
|
3307
|
+
);
|
|
3308
|
+
}
|
|
3309
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
3310
|
+
"div",
|
|
3311
|
+
{
|
|
3312
|
+
className: cn(
|
|
3313
|
+
"flex flex-row justify-between items-start gap-2 p-2 rounded-lg w-full",
|
|
3314
|
+
statusStyles,
|
|
3315
|
+
alternative.disabled ? "opacity-50" : ""
|
|
3316
|
+
),
|
|
3317
|
+
children: [
|
|
3318
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
3319
|
+
renderRadio(),
|
|
3320
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3321
|
+
"span",
|
|
3322
|
+
{
|
|
3323
|
+
className: cn(
|
|
3324
|
+
"flex-1",
|
|
3325
|
+
selectedValue === alternative.value || statusBadge ? "text-text-950" : "text-text-600"
|
|
3326
|
+
),
|
|
3327
|
+
children: alternative.label
|
|
3328
|
+
}
|
|
3329
|
+
)
|
|
3330
|
+
] }),
|
|
3331
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
3332
|
+
]
|
|
3333
|
+
},
|
|
3334
|
+
alternativeId
|
|
3335
|
+
);
|
|
3336
|
+
};
|
|
3337
|
+
if (isReadonly) {
|
|
3338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3339
|
+
"div",
|
|
3340
|
+
{
|
|
3341
|
+
className: cn("flex flex-col", getLayoutClasses(), "w-full", className),
|
|
3342
|
+
children: alternatives.map(
|
|
3343
|
+
(alternative) => renderReadonlyAlternative(alternative)
|
|
3344
|
+
)
|
|
3345
|
+
}
|
|
3346
|
+
);
|
|
3347
|
+
}
|
|
3348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3349
|
+
RadioGroup,
|
|
3350
|
+
{
|
|
3351
|
+
name: groupName,
|
|
3352
|
+
defaultValue,
|
|
3353
|
+
value,
|
|
3354
|
+
onValueChange: (value2) => {
|
|
3355
|
+
setActualValue(value2);
|
|
3356
|
+
onValueChange?.(value2);
|
|
3357
|
+
},
|
|
3358
|
+
disabled,
|
|
3359
|
+
className: cn("flex flex-col", getLayoutClasses(), className),
|
|
3360
|
+
children: alternatives.map((alternative, index) => {
|
|
3361
|
+
const alternativeId = alternative.value || `alt-${index}`;
|
|
3362
|
+
const statusStyles = getStatusStyles2(alternative.status, false);
|
|
3363
|
+
const statusBadge = getStatusBadge2(alternative.status);
|
|
3364
|
+
if (layout === "detailed") {
|
|
3365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3366
|
+
"div",
|
|
3367
|
+
{
|
|
3368
|
+
className: cn(
|
|
3369
|
+
"border-2 rounded-lg p-4 transition-all",
|
|
3370
|
+
statusStyles,
|
|
3371
|
+
alternative.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
3372
|
+
),
|
|
3373
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
3374
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-start gap-3 flex-1", children: [
|
|
3375
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3376
|
+
RadioGroupItem,
|
|
3377
|
+
{
|
|
3378
|
+
value: alternative.value,
|
|
3379
|
+
id: alternativeId,
|
|
3380
|
+
disabled: alternative.disabled,
|
|
3381
|
+
className: "mt-1"
|
|
3382
|
+
}
|
|
3383
|
+
),
|
|
3384
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex-1", children: [
|
|
3385
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3386
|
+
"label",
|
|
3387
|
+
{
|
|
3388
|
+
htmlFor: alternativeId,
|
|
3389
|
+
className: cn(
|
|
3390
|
+
"block font-medium",
|
|
3391
|
+
actualValue === alternative.value ? "text-text-950" : "text-text-600",
|
|
3392
|
+
alternative.disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
3393
|
+
),
|
|
3394
|
+
children: alternative.label
|
|
3395
|
+
}
|
|
3396
|
+
),
|
|
3397
|
+
alternative.description && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
|
|
3398
|
+
] })
|
|
3399
|
+
] }),
|
|
3400
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
3401
|
+
] })
|
|
3402
|
+
},
|
|
3403
|
+
alternativeId
|
|
3404
|
+
);
|
|
3405
|
+
}
|
|
3406
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
3407
|
+
"div",
|
|
3408
|
+
{
|
|
3409
|
+
className: cn(
|
|
3410
|
+
"flex flex-row justify-between gap-2 items-start p-2 rounded-lg transition-all",
|
|
3411
|
+
statusStyles,
|
|
3412
|
+
alternative.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
3413
|
+
),
|
|
3414
|
+
children: [
|
|
3415
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
3416
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3417
|
+
RadioGroupItem,
|
|
3418
|
+
{
|
|
3419
|
+
value: alternative.value,
|
|
3420
|
+
id: alternativeId,
|
|
3421
|
+
disabled: alternative.disabled
|
|
3422
|
+
}
|
|
3423
|
+
),
|
|
3424
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3425
|
+
"label",
|
|
3426
|
+
{
|
|
3427
|
+
htmlFor: alternativeId,
|
|
3428
|
+
className: cn(
|
|
3429
|
+
"flex-1",
|
|
3430
|
+
actualValue === alternative.value ? "text-text-950" : "text-text-600",
|
|
3431
|
+
alternative.disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
3432
|
+
),
|
|
3433
|
+
children: alternative.label
|
|
3434
|
+
}
|
|
3435
|
+
)
|
|
3436
|
+
] }),
|
|
3437
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
3438
|
+
]
|
|
3439
|
+
},
|
|
3440
|
+
alternativeId
|
|
3441
|
+
);
|
|
3442
|
+
})
|
|
3443
|
+
}
|
|
3444
|
+
);
|
|
3445
|
+
};
|
|
3446
|
+
var HeaderAlternative = (0, import_react8.forwardRef)(
|
|
3447
|
+
({ className, title, subTitle, content, ...props }, ref) => {
|
|
3448
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
3449
|
+
"div",
|
|
3450
|
+
{
|
|
3451
|
+
ref,
|
|
3452
|
+
className: cn(
|
|
3453
|
+
"bg-background p-4 flex flex-col gap-4 rounded-xl",
|
|
3454
|
+
className
|
|
3455
|
+
),
|
|
3456
|
+
...props,
|
|
3457
|
+
children: [
|
|
3458
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "flex flex-col", children: [
|
|
3459
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-text-950 font-bold text-lg", children: title }),
|
|
3460
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-text-700 text-sm ", children: subTitle })
|
|
3461
|
+
] }),
|
|
3462
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-text-950 text-md", children: content })
|
|
3463
|
+
]
|
|
3464
|
+
}
|
|
3465
|
+
);
|
|
3466
|
+
}
|
|
3467
|
+
);
|
|
3468
|
+
|
|
3469
|
+
// src/utils/questionRenderer/alternative/index.tsx
|
|
3470
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
3471
|
+
var renderQuestionAlternative = ({
|
|
3472
|
+
question,
|
|
3473
|
+
result
|
|
3474
|
+
}) => {
|
|
3475
|
+
const alternatives = question.options?.map((option) => {
|
|
3476
|
+
const isCorrectOption = result?.options?.find((op) => op.id === option.id)?.isCorrect || false;
|
|
3477
|
+
const isSelected = result?.selectedOptions?.some(
|
|
3478
|
+
(selectedOption) => selectedOption.optionId === option.id
|
|
3479
|
+
) || false;
|
|
3480
|
+
const shouldShowCorrectAnswers = result?.answerStatus !== "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */;
|
|
3481
|
+
let status;
|
|
3482
|
+
if (shouldShowCorrectAnswers) {
|
|
3483
|
+
if (isCorrectOption) {
|
|
3484
|
+
status = "correct" /* CORRECT */;
|
|
3485
|
+
} else if (isSelected && !isCorrectOption) {
|
|
3486
|
+
status = "incorrect" /* INCORRECT */;
|
|
3487
|
+
} else {
|
|
3488
|
+
status = "neutral" /* NEUTRAL */;
|
|
3489
|
+
}
|
|
3490
|
+
} else {
|
|
3491
|
+
status = "neutral" /* NEUTRAL */;
|
|
3492
|
+
}
|
|
3493
|
+
return {
|
|
3494
|
+
label: option.option,
|
|
3495
|
+
value: option.id,
|
|
3496
|
+
status
|
|
3497
|
+
};
|
|
3498
|
+
});
|
|
3499
|
+
if (!alternatives || alternatives.length === 0) {
|
|
3500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text_default, { size: "sm", weight: "normal", children: "N\xE3o h\xE1 Alternativas" }) });
|
|
3501
|
+
}
|
|
3502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
3503
|
+
AlternativesList,
|
|
3504
|
+
{
|
|
3505
|
+
mode: "readonly",
|
|
3506
|
+
name: `question-${question.id}`,
|
|
3507
|
+
layout: "compact",
|
|
3508
|
+
alternatives,
|
|
3509
|
+
selectedValue: result?.selectedOptions?.[0]?.optionId || ""
|
|
3510
|
+
},
|
|
3511
|
+
`question-${question.id}`
|
|
3512
|
+
) });
|
|
3478
3513
|
};
|
|
3479
3514
|
|
|
3480
3515
|
// src/components/MultipleChoice/MultipleChoice.tsx
|
|
3481
3516
|
var import_react9 = require("react");
|
|
3482
3517
|
var import_phosphor_react6 = require("phosphor-react");
|
|
3483
|
-
var
|
|
3518
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
3484
3519
|
var MultipleChoiceList = ({
|
|
3485
3520
|
disabled = false,
|
|
3486
3521
|
className = "",
|
|
@@ -3494,17 +3529,17 @@ var MultipleChoiceList = ({
|
|
|
3494
3529
|
(0, import_react9.useEffect)(() => {
|
|
3495
3530
|
setActualValue(selectedValues);
|
|
3496
3531
|
}, [selectedValues]);
|
|
3497
|
-
const
|
|
3532
|
+
const getStatusBadge2 = (status) => {
|
|
3498
3533
|
switch (status) {
|
|
3499
3534
|
case "correct":
|
|
3500
|
-
return /* @__PURE__ */ (0,
|
|
3535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_phosphor_react6.CheckCircle, {}), children: "Resposta correta" });
|
|
3501
3536
|
case "incorrect":
|
|
3502
|
-
return /* @__PURE__ */ (0,
|
|
3537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_phosphor_react6.XCircle, {}), children: "Resposta incorreta" });
|
|
3503
3538
|
default:
|
|
3504
3539
|
return null;
|
|
3505
3540
|
}
|
|
3506
3541
|
};
|
|
3507
|
-
const
|
|
3542
|
+
const getStatusStyles2 = (status) => {
|
|
3508
3543
|
switch (status) {
|
|
3509
3544
|
case "correct":
|
|
3510
3545
|
return "bg-success-background border-success-300";
|
|
@@ -3520,14 +3555,14 @@ var MultipleChoiceList = ({
|
|
|
3520
3555
|
isSelected ? "border-primary-950 bg-primary-950 text-text" : "border-border-400 bg-background",
|
|
3521
3556
|
isDisabled && "opacity-40 cursor-not-allowed"
|
|
3522
3557
|
);
|
|
3523
|
-
return /* @__PURE__ */ (0,
|
|
3558
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: checkboxClasses, children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_phosphor_react6.Check, { size: 16, weight: "bold" }) });
|
|
3524
3559
|
};
|
|
3525
3560
|
if (mode === "readonly") {
|
|
3526
|
-
return /* @__PURE__ */ (0,
|
|
3561
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: cn("flex flex-col gap-2", className), children: choices.map((choice, i) => {
|
|
3527
3562
|
const isSelected = actualValue?.includes(choice.value) || false;
|
|
3528
|
-
const statusStyles =
|
|
3529
|
-
const statusBadge =
|
|
3530
|
-
return /* @__PURE__ */ (0,
|
|
3563
|
+
const statusStyles = getStatusStyles2(choice.status);
|
|
3564
|
+
const statusBadge = getStatusBadge2(choice.status);
|
|
3565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
3531
3566
|
"div",
|
|
3532
3567
|
{
|
|
3533
3568
|
className: cn(
|
|
@@ -3536,9 +3571,9 @@ var MultipleChoiceList = ({
|
|
|
3536
3571
|
choice.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
3537
3572
|
),
|
|
3538
3573
|
children: [
|
|
3539
|
-
/* @__PURE__ */ (0,
|
|
3574
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
3540
3575
|
renderVisualCheckbox(isSelected, choice.disabled || disabled),
|
|
3541
|
-
/* @__PURE__ */ (0,
|
|
3576
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3542
3577
|
"span",
|
|
3543
3578
|
{
|
|
3544
3579
|
className: cn(
|
|
@@ -3550,14 +3585,14 @@ var MultipleChoiceList = ({
|
|
|
3550
3585
|
}
|
|
3551
3586
|
)
|
|
3552
3587
|
] }),
|
|
3553
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
3588
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
3554
3589
|
]
|
|
3555
3590
|
},
|
|
3556
3591
|
`readonly-${choice.value}-${i}`
|
|
3557
3592
|
);
|
|
3558
3593
|
}) });
|
|
3559
3594
|
}
|
|
3560
|
-
return /* @__PURE__ */ (0,
|
|
3595
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3561
3596
|
"div",
|
|
3562
3597
|
{
|
|
3563
3598
|
className: cn(
|
|
@@ -3565,7 +3600,7 @@ var MultipleChoiceList = ({
|
|
|
3565
3600
|
disabled ? "opacity-50 cursor-not-allowed" : "",
|
|
3566
3601
|
className
|
|
3567
3602
|
),
|
|
3568
|
-
children: /* @__PURE__ */ (0,
|
|
3603
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3569
3604
|
CheckboxList_default,
|
|
3570
3605
|
{
|
|
3571
3606
|
name,
|
|
@@ -3575,12 +3610,12 @@ var MultipleChoiceList = ({
|
|
|
3575
3610
|
onHandleSelectedValues?.(v);
|
|
3576
3611
|
},
|
|
3577
3612
|
disabled,
|
|
3578
|
-
children: choices.map((choice, i) => /* @__PURE__ */ (0,
|
|
3613
|
+
children: choices.map((choice, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
3579
3614
|
"div",
|
|
3580
3615
|
{
|
|
3581
3616
|
className: "flex flex-row gap-2 items-center",
|
|
3582
3617
|
children: [
|
|
3583
|
-
/* @__PURE__ */ (0,
|
|
3618
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3584
3619
|
CheckboxListItem,
|
|
3585
3620
|
{
|
|
3586
3621
|
value: choice.value,
|
|
@@ -3588,7 +3623,7 @@ var MultipleChoiceList = ({
|
|
|
3588
3623
|
disabled: choice.disabled || disabled
|
|
3589
3624
|
}
|
|
3590
3625
|
),
|
|
3591
|
-
/* @__PURE__ */ (0,
|
|
3626
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3592
3627
|
"label",
|
|
3593
3628
|
{
|
|
3594
3629
|
htmlFor: `interactive-${choice.value}-${i}`,
|
|
@@ -3610,33 +3645,581 @@ var MultipleChoiceList = ({
|
|
|
3610
3645
|
);
|
|
3611
3646
|
};
|
|
3612
3647
|
|
|
3613
|
-
// src/utils/questionRenderer.
|
|
3648
|
+
// src/utils/questionRenderer/multipleChoice/index.tsx
|
|
3649
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
3650
|
+
var renderQuestionMultipleChoice = ({
|
|
3651
|
+
question,
|
|
3652
|
+
result
|
|
3653
|
+
}) => {
|
|
3654
|
+
const choices = question.options?.map((option) => {
|
|
3655
|
+
const isCorrectOption = result?.options?.find((op) => op.id === option.id)?.isCorrect || false;
|
|
3656
|
+
const isSelected = result?.selectedOptions?.some(
|
|
3657
|
+
(op) => op.optionId === option.id
|
|
3658
|
+
);
|
|
3659
|
+
const shouldShowCorrectAnswers = result?.answerStatus !== "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */ && result?.answerStatus !== "NAO_RESPONDIDO" /* NAO_RESPONDIDO */;
|
|
3660
|
+
let status;
|
|
3661
|
+
if (shouldShowCorrectAnswers) {
|
|
3662
|
+
if (isCorrectOption) {
|
|
3663
|
+
status = "correct" /* CORRECT */;
|
|
3664
|
+
} else if (isSelected && !isCorrectOption) {
|
|
3665
|
+
status = "incorrect" /* INCORRECT */;
|
|
3666
|
+
} else {
|
|
3667
|
+
status = "neutral" /* NEUTRAL */;
|
|
3668
|
+
}
|
|
3669
|
+
} else {
|
|
3670
|
+
status = "neutral" /* NEUTRAL */;
|
|
3671
|
+
}
|
|
3672
|
+
return {
|
|
3673
|
+
label: option.option,
|
|
3674
|
+
value: option.id,
|
|
3675
|
+
status
|
|
3676
|
+
};
|
|
3677
|
+
});
|
|
3678
|
+
if (!choices || choices.length === 0) {
|
|
3679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text_default, { size: "sm", weight: "normal", children: "N\xE3o h\xE1 Escolhas M\xFAltiplas" }) });
|
|
3680
|
+
}
|
|
3681
|
+
const selectedValues = result?.selectedOptions?.map((op) => op.optionId) || [];
|
|
3682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3683
|
+
MultipleChoiceList,
|
|
3684
|
+
{
|
|
3685
|
+
mode: "readonly",
|
|
3686
|
+
name: `question-${question.id}`,
|
|
3687
|
+
choices,
|
|
3688
|
+
selectedValues
|
|
3689
|
+
},
|
|
3690
|
+
`question-${question.id}`
|
|
3691
|
+
) });
|
|
3692
|
+
};
|
|
3693
|
+
|
|
3694
|
+
// src/components/Quiz/QuizContent.tsx
|
|
3695
|
+
var import_react10 = require("react");
|
|
3696
|
+
var import_phosphor_react7 = require("phosphor-react");
|
|
3697
|
+
|
|
3698
|
+
// src/assets/img/mock-image-question.png
|
|
3699
|
+
var mock_image_question_default = "../mock-image-question-HEZCLFDL.png";
|
|
3700
|
+
|
|
3701
|
+
// src/components/Quiz/QuizContent.tsx
|
|
3702
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
3703
|
+
var getStatusStyles = (variantCorrect) => {
|
|
3704
|
+
switch (variantCorrect) {
|
|
3705
|
+
case "correct":
|
|
3706
|
+
return "bg-success-background border-success-300";
|
|
3707
|
+
case "incorrect":
|
|
3708
|
+
return "bg-error-background border-error-300";
|
|
3709
|
+
default:
|
|
3710
|
+
return "";
|
|
3711
|
+
}
|
|
3712
|
+
};
|
|
3713
|
+
var QuizSubTitle = (0, import_react10.forwardRef)(
|
|
3714
|
+
({ subTitle, ...props }, ref) => {
|
|
3715
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "px-4 pb-2 pt-6", ...props, ref, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "font-bold text-lg text-text-950", children: subTitle }) });
|
|
3716
|
+
}
|
|
3717
|
+
);
|
|
3718
|
+
var QuizContainer = (0, import_react10.forwardRef)(({ children, className, ...props }, ref) => {
|
|
3719
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3720
|
+
"div",
|
|
3721
|
+
{
|
|
3722
|
+
ref,
|
|
3723
|
+
className: cn(
|
|
3724
|
+
"bg-background rounded-t-xl px-4 pt-4 pb-[80px] h-auto flex flex-col gap-4 mb-auto",
|
|
3725
|
+
className
|
|
3726
|
+
),
|
|
3727
|
+
...props,
|
|
3728
|
+
children
|
|
3729
|
+
}
|
|
3730
|
+
);
|
|
3731
|
+
});
|
|
3732
|
+
|
|
3733
|
+
// src/utils/questionRenderer/components/index.tsx
|
|
3734
|
+
var import_react11 = require("react");
|
|
3735
|
+
var import_phosphor_react8 = require("phosphor-react");
|
|
3736
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
3737
|
+
var getStatusBadge = (status) => {
|
|
3738
|
+
switch (status) {
|
|
3739
|
+
case "correct":
|
|
3740
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_phosphor_react8.CheckCircle, {}), children: "Resposta correta" });
|
|
3741
|
+
case "incorrect":
|
|
3742
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_phosphor_react8.XCircle, {}), children: "Resposta incorreta" });
|
|
3743
|
+
default:
|
|
3744
|
+
return null;
|
|
3745
|
+
}
|
|
3746
|
+
};
|
|
3747
|
+
var QuestionContainer = ({
|
|
3748
|
+
children,
|
|
3749
|
+
className
|
|
3750
|
+
}) => {
|
|
3751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3752
|
+
"div",
|
|
3753
|
+
{
|
|
3754
|
+
className: cn(
|
|
3755
|
+
"bg-background rounded-t-xl px-4 pt-4 pb-[80px] h-auto flex flex-col gap-4 mb-auto",
|
|
3756
|
+
className
|
|
3757
|
+
),
|
|
3758
|
+
children
|
|
3759
|
+
}
|
|
3760
|
+
);
|
|
3761
|
+
};
|
|
3762
|
+
var QuestionSubTitle = ({ subTitle }) => {
|
|
3763
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "px-4 pb-2 pt-6", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text_default, { size: "md", weight: "bold", color: "text-text-950", children: subTitle }) });
|
|
3764
|
+
};
|
|
3765
|
+
var FillQuestionContent = ({
|
|
3766
|
+
question,
|
|
3767
|
+
result
|
|
3768
|
+
}) => {
|
|
3769
|
+
const text = question.statement || "";
|
|
3770
|
+
const baseId = (0, import_react11.useId)();
|
|
3771
|
+
const studentAnswers = {};
|
|
3772
|
+
try {
|
|
3773
|
+
if (result?.answer) {
|
|
3774
|
+
const parsed = typeof result.answer === "string" ? JSON.parse(result.answer) : result.answer;
|
|
3775
|
+
if (typeof parsed === "object") {
|
|
3776
|
+
Object.assign(studentAnswers, parsed);
|
|
3777
|
+
}
|
|
3778
|
+
}
|
|
3779
|
+
} catch (error) {
|
|
3780
|
+
console.error("Error parsing answer:", error);
|
|
3781
|
+
}
|
|
3782
|
+
const regex = /\{\{([\p{L}\p{M}\d_]+)\}\}/gu;
|
|
3783
|
+
const placeholders = [];
|
|
3784
|
+
let match;
|
|
3785
|
+
while ((match = regex.exec(text)) !== null) {
|
|
3786
|
+
placeholders.push(match[1]);
|
|
3787
|
+
}
|
|
3788
|
+
const correctAnswers = {};
|
|
3789
|
+
placeholders.forEach((placeholder) => {
|
|
3790
|
+
correctAnswers[placeholder] = studentAnswers[placeholder]?.correctAnswer || `[${placeholder}]`;
|
|
3791
|
+
});
|
|
3792
|
+
const addTextElement = (elements, textContent, elementCounter) => {
|
|
3793
|
+
if (textContent) {
|
|
3794
|
+
elements.push({
|
|
3795
|
+
element: textContent,
|
|
3796
|
+
id: `${baseId}-text-${++elementCounter.current}`
|
|
3797
|
+
});
|
|
3798
|
+
}
|
|
3799
|
+
};
|
|
3800
|
+
const renderGabaritoPlaceholder = (selectId, elementCounter) => {
|
|
3801
|
+
const correctAnswer = correctAnswers[selectId] || `[${selectId}]`;
|
|
3802
|
+
return {
|
|
3803
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3804
|
+
Text_default,
|
|
3805
|
+
{
|
|
3806
|
+
size: "md",
|
|
3807
|
+
weight: "semibold",
|
|
3808
|
+
color: "text-success-600",
|
|
3809
|
+
className: "inline-flex mb-2.5 border-b-2 border-success-600",
|
|
3810
|
+
children: correctAnswer
|
|
3811
|
+
},
|
|
3812
|
+
`${baseId}-gabarito-${selectId}`
|
|
3813
|
+
),
|
|
3814
|
+
id: `${baseId}-gabarito-${++elementCounter.current}`
|
|
3815
|
+
};
|
|
3816
|
+
};
|
|
3817
|
+
const renderStudentPlaceholder = (selectId, elementCounter) => {
|
|
3818
|
+
const studentAnswer = studentAnswers[selectId];
|
|
3819
|
+
if (!studentAnswer) {
|
|
3820
|
+
return {
|
|
3821
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3822
|
+
Text_default,
|
|
3823
|
+
{
|
|
3824
|
+
size: "md",
|
|
3825
|
+
weight: "normal",
|
|
3826
|
+
color: "text-text-400",
|
|
3827
|
+
className: "inline-flex mb-2.5 border-b-2 border-text-300",
|
|
3828
|
+
children: "[N\xE3o respondido]"
|
|
3829
|
+
},
|
|
3830
|
+
`${baseId}-no-answer-${selectId}`
|
|
3831
|
+
),
|
|
3832
|
+
id: `${baseId}-no-answer-${++elementCounter.current}`
|
|
3833
|
+
};
|
|
3834
|
+
}
|
|
3835
|
+
const isCorrect = studentAnswer.isCorrect;
|
|
3836
|
+
const colorClass = isCorrect ? "text-success-600 border-success-600" : "text-error-600 border-error-600";
|
|
3837
|
+
return {
|
|
3838
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3839
|
+
Badge_default,
|
|
3840
|
+
{
|
|
3841
|
+
variant: "solid",
|
|
3842
|
+
action: isCorrect ? "success" : "error",
|
|
3843
|
+
iconRight: isCorrect ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_phosphor_react8.CheckCircle, {}) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_phosphor_react8.XCircle, {}),
|
|
3844
|
+
size: "large",
|
|
3845
|
+
className: `py-3 w-[180px] justify-between mb-2.5 ${colorClass}`,
|
|
3846
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-text-900", children: studentAnswer.answer })
|
|
3847
|
+
},
|
|
3848
|
+
`${baseId}-answer-${selectId}`
|
|
3849
|
+
),
|
|
3850
|
+
id: `${baseId}-answer-${++elementCounter.current}`
|
|
3851
|
+
};
|
|
3852
|
+
};
|
|
3853
|
+
const renderTextWithAnswers = (isGabarito = false) => {
|
|
3854
|
+
const elements = [];
|
|
3855
|
+
let lastIndex = 0;
|
|
3856
|
+
const elementCounter = { current: 0 };
|
|
3857
|
+
regex.lastIndex = 0;
|
|
3858
|
+
while ((match = regex.exec(text)) !== null) {
|
|
3859
|
+
const [fullMatch, selectId] = match;
|
|
3860
|
+
const startIndex = match.index;
|
|
3861
|
+
if (startIndex > lastIndex) {
|
|
3862
|
+
addTextElement(
|
|
3863
|
+
elements,
|
|
3864
|
+
text.slice(lastIndex, startIndex),
|
|
3865
|
+
elementCounter
|
|
3866
|
+
);
|
|
3867
|
+
}
|
|
3868
|
+
const placeholderElement = isGabarito ? renderGabaritoPlaceholder(selectId, elementCounter) : renderStudentPlaceholder(selectId, elementCounter);
|
|
3869
|
+
elements.push(placeholderElement);
|
|
3870
|
+
lastIndex = match.index + fullMatch.length;
|
|
3871
|
+
}
|
|
3872
|
+
if (lastIndex < text.length) {
|
|
3873
|
+
addTextElement(elements, text.slice(lastIndex), elementCounter);
|
|
3874
|
+
}
|
|
3875
|
+
return elements;
|
|
3876
|
+
};
|
|
3877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "pt-2 space-y-4", children: [
|
|
3878
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "space-y-2", children: [
|
|
3879
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text_default, { size: "xs", weight: "normal", color: "text-text-500", children: "Resposta do aluno:" }),
|
|
3880
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "p-3 bg-background-50 rounded-lg border border-border-100", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "leading-8", children: renderTextWithAnswers(false).map((element) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3881
|
+
Text_default,
|
|
3882
|
+
{
|
|
3883
|
+
size: "md",
|
|
3884
|
+
weight: "normal",
|
|
3885
|
+
color: "text-text-900",
|
|
3886
|
+
children: element.element
|
|
3887
|
+
},
|
|
3888
|
+
element.id
|
|
3889
|
+
)) }) })
|
|
3890
|
+
] }),
|
|
3891
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "space-y-2", children: [
|
|
3892
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text_default, { size: "xs", weight: "normal", color: "text-text-500", children: "Gabarito:" }),
|
|
3893
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "p-3 bg-background-50 rounded-lg border border-border-100", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "leading-8", children: renderTextWithAnswers(true).map((element) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3894
|
+
Text_default,
|
|
3895
|
+
{
|
|
3896
|
+
size: "md",
|
|
3897
|
+
weight: "normal",
|
|
3898
|
+
color: "text-text-900",
|
|
3899
|
+
children: element.element
|
|
3900
|
+
},
|
|
3901
|
+
element.id
|
|
3902
|
+
)) }) })
|
|
3903
|
+
] })
|
|
3904
|
+
] });
|
|
3905
|
+
};
|
|
3906
|
+
|
|
3907
|
+
// src/utils/questionRenderer/trueOrFalse/index.tsx
|
|
3908
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
3909
|
+
var renderQuestionTrueOrFalse = ({
|
|
3910
|
+
question,
|
|
3911
|
+
result
|
|
3912
|
+
}) => {
|
|
3913
|
+
const options = question.options || [];
|
|
3914
|
+
const getLetterByIndex = (index) => String.fromCodePoint(97 + index);
|
|
3915
|
+
const shouldShowStatus = result?.answerStatus !== "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */ && result?.answerStatus !== "NAO_RESPONDIDO" /* NAO_RESPONDIDO */;
|
|
3916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "flex flex-col gap-3.5", children: options.map((option, index) => {
|
|
3917
|
+
const statementIsTrue = result?.options?.find((op) => op.id === option.id)?.isCorrect || false;
|
|
3918
|
+
const isSelected = result?.selectedOptions?.some(
|
|
3919
|
+
(op) => op.optionId === option.id
|
|
3920
|
+
);
|
|
3921
|
+
const isStudentCorrect = statementIsTrue === isSelected;
|
|
3922
|
+
const variantCorrect = statementIsTrue ? "correct" : "incorrect";
|
|
3923
|
+
const studentAnswer = isSelected ? "V" : "F";
|
|
3924
|
+
const correctAnswer = statementIsTrue ? "V" : "F";
|
|
3925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
3926
|
+
"section",
|
|
3927
|
+
{
|
|
3928
|
+
className: "flex flex-col gap-2",
|
|
3929
|
+
children: [
|
|
3930
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
3931
|
+
"div",
|
|
3932
|
+
{
|
|
3933
|
+
className: cn(
|
|
3934
|
+
"flex flex-row justify-between items-center gap-2 p-2 rounded-md border",
|
|
3935
|
+
shouldShowStatus ? getStatusStyles(variantCorrect) : ""
|
|
3936
|
+
),
|
|
3937
|
+
children: [
|
|
3938
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text_default, { size: "sm", weight: "normal", color: "text-text-900", children: getLetterByIndex(index).concat(") ").concat(option.option) }),
|
|
3939
|
+
shouldShowStatus && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "flex-shrink-0", children: getStatusBadge(isStudentCorrect ? "correct" : "incorrect") })
|
|
3940
|
+
]
|
|
3941
|
+
}
|
|
3942
|
+
),
|
|
3943
|
+
shouldShowStatus && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "flex flex-row gap-2 items-center", children: [
|
|
3944
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Text_default, { size: "2xs", weight: "normal", color: "text-text-800", children: [
|
|
3945
|
+
"Resposta selecionada: ",
|
|
3946
|
+
studentAnswer
|
|
3947
|
+
] }),
|
|
3948
|
+
!isStudentCorrect && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Text_default, { size: "2xs", weight: "normal", color: "text-text-800", children: [
|
|
3949
|
+
"Resposta correta: ",
|
|
3950
|
+
correctAnswer
|
|
3951
|
+
] })
|
|
3952
|
+
] })
|
|
3953
|
+
]
|
|
3954
|
+
},
|
|
3955
|
+
option.id || `option-${index}`
|
|
3956
|
+
);
|
|
3957
|
+
}) }) });
|
|
3958
|
+
};
|
|
3959
|
+
|
|
3960
|
+
// src/utils/questionRenderer/dissertative/index.tsx
|
|
3961
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
3962
|
+
var renderQuestionDissertative = ({
|
|
3963
|
+
result
|
|
3964
|
+
}) => {
|
|
3965
|
+
const localAnswer = result?.answer || "";
|
|
3966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "pt-2 space-y-4", children: [
|
|
3967
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-2", children: [
|
|
3968
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text_default, { size: "sm", weight: "normal", color: "text-text-950", children: "Resposta do aluno" }),
|
|
3969
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "p-3 bg-background-50 rounded-lg border border-border-100", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text_default, { size: "sm", weight: "normal", color: "text-text-700", children: localAnswer || "Nenhuma resposta fornecida" }) })
|
|
3970
|
+
] }),
|
|
3971
|
+
result?.answerStatus === "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && result?.teacherFeedback && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-2", children: [
|
|
3972
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text_default, { size: "xs", weight: "normal", color: "text-text-500", children: "Observa\xE7\xE3o do professor:" }),
|
|
3973
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "p-3 bg-background-50 rounded-lg border border-border-100", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text_default, { size: "sm", weight: "normal", color: "text-text-700", children: result.teacherFeedback }) })
|
|
3974
|
+
] })
|
|
3975
|
+
] });
|
|
3976
|
+
};
|
|
3977
|
+
|
|
3978
|
+
// src/utils/questionRenderer/fill/index.tsx
|
|
3979
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
3980
|
+
var renderQuestionFill = ({
|
|
3981
|
+
question,
|
|
3982
|
+
result
|
|
3983
|
+
}) => {
|
|
3984
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FillQuestionContent, { question, result });
|
|
3985
|
+
};
|
|
3986
|
+
|
|
3987
|
+
// src/utils/questionRenderer/image/index.tsx
|
|
3988
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
3989
|
+
var renderQuestionImage = ({
|
|
3990
|
+
result
|
|
3991
|
+
}) => {
|
|
3992
|
+
const correctPositionRelative = { x: 0.48, y: 0.45 };
|
|
3993
|
+
const correctRadiusRelative = 0.1;
|
|
3994
|
+
let userPositionRelative = null;
|
|
3995
|
+
try {
|
|
3996
|
+
if (result?.answer) {
|
|
3997
|
+
const parsed = typeof result.answer === "string" ? JSON.parse(result.answer) : result.answer;
|
|
3998
|
+
if (parsed && typeof parsed.x === "number" && typeof parsed.y === "number") {
|
|
3999
|
+
userPositionRelative = { x: parsed.x, y: parsed.y };
|
|
4000
|
+
}
|
|
4001
|
+
}
|
|
4002
|
+
} catch {
|
|
4003
|
+
userPositionRelative = null;
|
|
4004
|
+
}
|
|
4005
|
+
const isCorrect = userPositionRelative ? Math.sqrt(
|
|
4006
|
+
Math.pow(userPositionRelative.x - correctPositionRelative.x, 2) + Math.pow(userPositionRelative.y - correctPositionRelative.y, 2)
|
|
4007
|
+
) <= correctRadiusRelative : false;
|
|
4008
|
+
const getUserCircleColorClasses = () => {
|
|
4009
|
+
if (!userPositionRelative) return "";
|
|
4010
|
+
return isCorrect ? "bg-success-600/70 border-white" : "bg-indicator-error/70 border-white";
|
|
4011
|
+
};
|
|
4012
|
+
const getPositionDescription = (x, y) => {
|
|
4013
|
+
const xPercent = Math.round(x * 100);
|
|
4014
|
+
const yPercent = Math.round(y * 100);
|
|
4015
|
+
return `${xPercent}% da esquerda, ${yPercent}% do topo`;
|
|
4016
|
+
};
|
|
4017
|
+
const getSpatialRelationship = () => {
|
|
4018
|
+
if (!userPositionRelative) {
|
|
4019
|
+
return `\xC1rea correta localizada em ${getPositionDescription(
|
|
4020
|
+
correctPositionRelative.x,
|
|
4021
|
+
correctPositionRelative.y
|
|
4022
|
+
)}. Nenhuma resposta do aluno fornecida.`;
|
|
4023
|
+
}
|
|
4024
|
+
const deltaX = userPositionRelative.x - correctPositionRelative.x;
|
|
4025
|
+
const deltaY = userPositionRelative.y - correctPositionRelative.y;
|
|
4026
|
+
const distance = Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));
|
|
4027
|
+
const distancePercent = Math.round(distance * 100);
|
|
4028
|
+
let direction = "";
|
|
4029
|
+
if (Math.abs(deltaX) > Math.abs(deltaY)) {
|
|
4030
|
+
direction = deltaX > 0 ? "\xE0 direita" : "\xE0 esquerda";
|
|
4031
|
+
} else {
|
|
4032
|
+
direction = deltaY > 0 ? "abaixo" : "acima";
|
|
4033
|
+
}
|
|
4034
|
+
const correctPos = getPositionDescription(
|
|
4035
|
+
correctPositionRelative.x,
|
|
4036
|
+
correctPositionRelative.y
|
|
4037
|
+
);
|
|
4038
|
+
const userPos = getPositionDescription(
|
|
4039
|
+
userPositionRelative.x,
|
|
4040
|
+
userPositionRelative.y
|
|
4041
|
+
);
|
|
4042
|
+
return `\xC1rea correta localizada em ${correctPos}. Resposta do aluno em ${userPos}. A resposta do aluno est\xE1 ${distancePercent}% de dist\xE2ncia ${direction} da \xE1rea correta. ${isCorrect ? "A resposta est\xE1 dentro da \xE1rea de toler\xE2ncia e \xE9 considerada correta." : "A resposta est\xE1 fora da \xE1rea de toler\xE2ncia e \xE9 considerada incorreta."}`;
|
|
4043
|
+
};
|
|
4044
|
+
const correctPositionDescription = getPositionDescription(
|
|
4045
|
+
correctPositionRelative.x,
|
|
4046
|
+
correctPositionRelative.y
|
|
4047
|
+
);
|
|
4048
|
+
const imageAltText = `Quest\xE3o de imagem com \xE1rea correta localizada em ${correctPositionDescription}`;
|
|
4049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "pt-2 space-y-4", children: [
|
|
4050
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center gap-4 text-xs", children: [
|
|
4051
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
4052
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "w-3 h-3 rounded-full bg-indicator-primary/70 border border-[#F8CC2E]" }),
|
|
4053
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text_default, { size: "sm", weight: "normal", color: "text-text-600", children: "\xC1rea correta" })
|
|
4054
|
+
] }),
|
|
4055
|
+
userPositionRelative && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
4056
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
4057
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "w-3 h-3 rounded-full bg-success-600/70 border border-white" }),
|
|
4058
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text_default, { size: "sm", weight: "normal", color: "text-text-600", children: "Resposta correta" })
|
|
4059
|
+
] }),
|
|
4060
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
4061
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "w-3 h-3 rounded-full bg-indicator-error/70 border border-white" }),
|
|
4062
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text_default, { size: "sm", weight: "normal", color: "text-text-600", children: "Resposta incorreta" })
|
|
4063
|
+
] })
|
|
4064
|
+
] })
|
|
4065
|
+
] }),
|
|
4066
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "relative w-full", children: [
|
|
4067
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "sr-only", children: getSpatialRelationship() }),
|
|
4068
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4069
|
+
"img",
|
|
4070
|
+
{
|
|
4071
|
+
src: mock_image_question_default,
|
|
4072
|
+
alt: imageAltText,
|
|
4073
|
+
className: "w-full h-auto rounded-md"
|
|
4074
|
+
}
|
|
4075
|
+
),
|
|
4076
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4077
|
+
"div",
|
|
4078
|
+
{
|
|
4079
|
+
role: "img",
|
|
4080
|
+
"aria-label": `\xC1rea correta marcada em ${correctPositionDescription}`,
|
|
4081
|
+
className: "absolute rounded-full bg-indicator-primary/70 border-4 border-[#F8CC2E] pointer-events-none",
|
|
4082
|
+
style: {
|
|
4083
|
+
minWidth: "50px",
|
|
4084
|
+
maxWidth: "160px",
|
|
4085
|
+
width: "15%",
|
|
4086
|
+
aspectRatio: "1 / 1",
|
|
4087
|
+
left: `calc(${correctPositionRelative.x * 100}% - 7.5%)`,
|
|
4088
|
+
top: `calc(${correctPositionRelative.y * 100}% - 15%)`
|
|
4089
|
+
},
|
|
4090
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
4091
|
+
Text_default,
|
|
4092
|
+
{
|
|
4093
|
+
size: "sm",
|
|
4094
|
+
weight: "normal",
|
|
4095
|
+
color: "text-text-600",
|
|
4096
|
+
className: "sr-only",
|
|
4097
|
+
children: [
|
|
4098
|
+
"C\xEDrculo amarelo indicando a \xE1rea correta da resposta, posicionado em",
|
|
4099
|
+
" ",
|
|
4100
|
+
correctPositionDescription
|
|
4101
|
+
]
|
|
4102
|
+
}
|
|
4103
|
+
)
|
|
4104
|
+
}
|
|
4105
|
+
),
|
|
4106
|
+
userPositionRelative && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4107
|
+
"div",
|
|
4108
|
+
{
|
|
4109
|
+
role: "img",
|
|
4110
|
+
"aria-label": `Resposta do aluno marcada em ${getPositionDescription(
|
|
4111
|
+
userPositionRelative.x,
|
|
4112
|
+
userPositionRelative.y
|
|
4113
|
+
)}, ${isCorrect ? "correta" : "incorreta"}`,
|
|
4114
|
+
className: `absolute rounded-full border-4 pointer-events-none ${getUserCircleColorClasses()}`,
|
|
4115
|
+
style: {
|
|
4116
|
+
minWidth: "30px",
|
|
4117
|
+
maxWidth: "52px",
|
|
4118
|
+
width: "5%",
|
|
4119
|
+
aspectRatio: "1 / 1",
|
|
4120
|
+
left: `calc(${userPositionRelative.x * 100}% - 2.5%)`,
|
|
4121
|
+
top: `calc(${userPositionRelative.y * 100}% - 2.5%)`
|
|
4122
|
+
},
|
|
4123
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
4124
|
+
Text_default,
|
|
4125
|
+
{
|
|
4126
|
+
size: "sm",
|
|
4127
|
+
weight: "normal",
|
|
4128
|
+
color: "text-text-600",
|
|
4129
|
+
className: "sr-only",
|
|
4130
|
+
children: [
|
|
4131
|
+
"C\xEDrculo ",
|
|
4132
|
+
isCorrect ? "verde" : "vermelho",
|
|
4133
|
+
" indicando a resposta do aluno, posicionado em",
|
|
4134
|
+
" ",
|
|
4135
|
+
getPositionDescription(
|
|
4136
|
+
userPositionRelative.x,
|
|
4137
|
+
userPositionRelative.y
|
|
4138
|
+
),
|
|
4139
|
+
". A resposta est\xE1",
|
|
4140
|
+
" ",
|
|
4141
|
+
Math.round(
|
|
4142
|
+
Math.sqrt(
|
|
4143
|
+
Math.pow(
|
|
4144
|
+
userPositionRelative.x - correctPositionRelative.x,
|
|
4145
|
+
2
|
|
4146
|
+
) + Math.pow(
|
|
4147
|
+
userPositionRelative.y - correctPositionRelative.y,
|
|
4148
|
+
2
|
|
4149
|
+
)
|
|
4150
|
+
) * 100
|
|
4151
|
+
),
|
|
4152
|
+
"% de dist\xE2ncia da \xE1rea correta e \xE9 considerada",
|
|
4153
|
+
" ",
|
|
4154
|
+
isCorrect ? "correta" : "incorreta",
|
|
4155
|
+
"."
|
|
4156
|
+
]
|
|
4157
|
+
}
|
|
4158
|
+
)
|
|
4159
|
+
}
|
|
4160
|
+
)
|
|
4161
|
+
] })
|
|
4162
|
+
] });
|
|
4163
|
+
};
|
|
4164
|
+
|
|
4165
|
+
// src/utils/questionRenderer/connectDots/index.tsx
|
|
4166
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
4167
|
+
var renderQuestionConnectDots = ({
|
|
4168
|
+
paddingBottom
|
|
4169
|
+
} = {}) => {
|
|
4170
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
4171
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(QuestionSubTitle, { subTitle: "Tipo de quest\xE3o: Ligar Pontos" }),
|
|
4172
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(QuestionContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text_default, { size: "md", weight: "normal", color: "text-text-600", children: "Tipo de quest\xE3o: Ligar Pontos (n\xE3o implementado)" }) }) })
|
|
4173
|
+
] });
|
|
4174
|
+
};
|
|
4175
|
+
|
|
4176
|
+
// src/utils/questionRenderer/index.tsx
|
|
4177
|
+
var questionRendererMap = {
|
|
4178
|
+
["ALTERNATIVA" /* ALTERNATIVA */]: renderQuestionAlternative,
|
|
4179
|
+
["MULTIPLA_ESCOLHA" /* MULTIPLA_ESCOLHA */]: renderQuestionMultipleChoice,
|
|
4180
|
+
["VERDADEIRO_FALSO" /* VERDADEIRO_FALSO */]: renderQuestionTrueOrFalse,
|
|
4181
|
+
["DISSERTATIVA" /* DISSERTATIVA */]: renderQuestionDissertative,
|
|
4182
|
+
["PREENCHER" /* PREENCHER */]: renderQuestionFill,
|
|
4183
|
+
["IMAGEM" /* IMAGEM */]: renderQuestionImage,
|
|
4184
|
+
["LIGAR_PONTOS" /* LIGAR_PONTOS */]: renderQuestionConnectDots
|
|
4185
|
+
};
|
|
3614
4186
|
var renderFromMap = (renderers, questionType) => {
|
|
3615
4187
|
if (!questionType) return null;
|
|
3616
4188
|
const renderer = renderers[questionType];
|
|
3617
4189
|
return renderer ? renderer() : null;
|
|
3618
4190
|
};
|
|
3619
4191
|
|
|
4192
|
+
// src/types/questionTypes.ts
|
|
4193
|
+
var questionTypeLabels = {
|
|
4194
|
+
["ALTERNATIVA" /* ALTERNATIVA */]: "Alternativa",
|
|
4195
|
+
["VERDADEIRO_FALSO" /* VERDADEIRO_FALSO */]: "Verdadeiro ou Falso",
|
|
4196
|
+
["DISSERTATIVA" /* DISSERTATIVA */]: "Discursiva",
|
|
4197
|
+
["IMAGEM" /* IMAGEM */]: "Imagem",
|
|
4198
|
+
["MULTIPLA_ESCOLHA" /* MULTIPLA_ESCOLHA */]: "M\xFAltipla Escolha",
|
|
4199
|
+
["LIGAR_PONTOS" /* LIGAR_PONTOS */]: "Ligar Pontos",
|
|
4200
|
+
["PREENCHER" /* PREENCHER */]: "Preencher Lacunas"
|
|
4201
|
+
};
|
|
4202
|
+
|
|
3620
4203
|
// src/components/ActivityCardQuestionPreview/ActivityCardQuestionPreview.tsx
|
|
3621
|
-
var
|
|
3622
|
-
var
|
|
3623
|
-
var
|
|
4204
|
+
var import_react12 = require("react");
|
|
4205
|
+
var import_phosphor_react9 = require("phosphor-react");
|
|
4206
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
3624
4207
|
var QuestionHeader = ({
|
|
3625
4208
|
badgeColor,
|
|
3626
4209
|
iconName,
|
|
3627
4210
|
subjectName,
|
|
3628
4211
|
resolvedQuestionTypeLabel,
|
|
3629
4212
|
position
|
|
3630
|
-
}) => /* @__PURE__ */ (0,
|
|
3631
|
-
/* @__PURE__ */ (0,
|
|
3632
|
-
/* @__PURE__ */ (0,
|
|
4213
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex flex-row gap-2 text-text-650", children: [
|
|
4214
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "py-1 px-2 flex flex-row items-center gap-1", children: [
|
|
4215
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3633
4216
|
"span",
|
|
3634
4217
|
{
|
|
3635
4218
|
className: "size-4 rounded-sm flex items-center justify-center shrink-0 text-text-950",
|
|
3636
4219
|
style: {
|
|
3637
4220
|
backgroundColor: badgeColor
|
|
3638
4221
|
},
|
|
3639
|
-
children: /* @__PURE__ */ (0,
|
|
4222
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3640
4223
|
IconRender_default,
|
|
3641
4224
|
{
|
|
3642
4225
|
iconName: iconName ?? "Book",
|
|
@@ -3646,13 +4229,13 @@ var QuestionHeader = ({
|
|
|
3646
4229
|
)
|
|
3647
4230
|
}
|
|
3648
4231
|
),
|
|
3649
|
-
/* @__PURE__ */ (0,
|
|
4232
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text_default, { size: "sm", children: subjectName ?? "Assunto n\xE3o informado" })
|
|
3650
4233
|
] }),
|
|
3651
|
-
typeof position === "number" && /* @__PURE__ */ (0,
|
|
4234
|
+
typeof position === "number" && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "py-1 px-2 flex flex-row items-center gap-1", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Text_default, { size: "sm", className: "text-text-700", children: [
|
|
3652
4235
|
"#",
|
|
3653
4236
|
position
|
|
3654
4237
|
] }) }),
|
|
3655
|
-
/* @__PURE__ */ (0,
|
|
4238
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "py-1 px-2 flex flex-row items-center gap-1", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text_default, { size: "sm", className: "", children: resolvedQuestionTypeLabel ?? "Tipo de quest\xE3o" }) })
|
|
3656
4239
|
] });
|
|
3657
4240
|
var ActivityCardQuestionPreview = ({
|
|
3658
4241
|
subjectName = "Assunto n\xE3o informado",
|
|
@@ -3670,13 +4253,13 @@ var ActivityCardQuestionPreview = ({
|
|
|
3670
4253
|
position
|
|
3671
4254
|
}) => {
|
|
3672
4255
|
const badgeColor = getSubjectColorWithOpacity(subjectColor, isDark) ?? subjectColor;
|
|
3673
|
-
const [isExpanded, setIsExpanded] = (0,
|
|
4256
|
+
const [isExpanded, setIsExpanded] = (0, import_react12.useState)(defaultExpanded);
|
|
3674
4257
|
const correctOptionIds = question?.correctOptionIds || [];
|
|
3675
4258
|
const resolvedQuestionTypeLabel = questionType && questionTypeLabels[questionType] ? questionTypeLabels[questionType] : questionTypeLabel || "Tipo de quest\xE3o";
|
|
3676
4259
|
const safeSubjectName = subjectName ?? "Assunto n\xE3o informado";
|
|
3677
4260
|
const safeIconName = iconName ?? "Book";
|
|
3678
4261
|
const safeResolvedLabel = resolvedQuestionTypeLabel ?? "Tipo de quest\xE3o";
|
|
3679
|
-
const alternatives = (0,
|
|
4262
|
+
const alternatives = (0, import_react12.useMemo)(() => {
|
|
3680
4263
|
if (!question?.options || questionType !== "ALTERNATIVA" /* ALTERNATIVA */)
|
|
3681
4264
|
return [];
|
|
3682
4265
|
return question.options.map((option) => {
|
|
@@ -3689,7 +4272,7 @@ var ActivityCardQuestionPreview = ({
|
|
|
3689
4272
|
};
|
|
3690
4273
|
});
|
|
3691
4274
|
}, [question, questionType, correctOptionIds]);
|
|
3692
|
-
const multipleChoices = (0,
|
|
4275
|
+
const multipleChoices = (0, import_react12.useMemo)(() => {
|
|
3693
4276
|
if (!question?.options || questionType !== "MULTIPLA_ESCOLHA" /* MULTIPLA_ESCOLHA */)
|
|
3694
4277
|
return [];
|
|
3695
4278
|
return question.options.map((option) => {
|
|
@@ -3704,7 +4287,7 @@ var ActivityCardQuestionPreview = ({
|
|
|
3704
4287
|
}, [question, questionType, correctOptionIds]);
|
|
3705
4288
|
const renderAlternative = () => {
|
|
3706
4289
|
if (alternatives.length === 0) return null;
|
|
3707
|
-
return /* @__PURE__ */ (0,
|
|
4290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "mt-4", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3708
4291
|
AlternativesList,
|
|
3709
4292
|
{
|
|
3710
4293
|
alternatives,
|
|
@@ -3717,7 +4300,7 @@ var ActivityCardQuestionPreview = ({
|
|
|
3717
4300
|
};
|
|
3718
4301
|
const renderMultipleChoice = () => {
|
|
3719
4302
|
if (multipleChoices.length === 0) return null;
|
|
3720
|
-
return /* @__PURE__ */ (0,
|
|
4303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "mt-4", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3721
4304
|
MultipleChoiceList,
|
|
3722
4305
|
{
|
|
3723
4306
|
choices: multipleChoices,
|
|
@@ -3729,10 +4312,10 @@ var ActivityCardQuestionPreview = ({
|
|
|
3729
4312
|
};
|
|
3730
4313
|
const renderTrueOrFalse = () => {
|
|
3731
4314
|
if (!question?.options || question.options.length === 0) return null;
|
|
3732
|
-
return /* @__PURE__ */ (0,
|
|
4315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "mt-4", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex flex-col gap-3.5", children: question.options.map((option, index) => {
|
|
3733
4316
|
const isCorrect = correctOptionIds.includes(option.id);
|
|
3734
4317
|
const correctAnswer = isCorrect ? "Verdadeiro" : "Falso";
|
|
3735
|
-
return /* @__PURE__ */ (0,
|
|
4318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("section", { className: "flex flex-col gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
3736
4319
|
"div",
|
|
3737
4320
|
{
|
|
3738
4321
|
className: cn(
|
|
@@ -3740,18 +4323,18 @@ var ActivityCardQuestionPreview = ({
|
|
|
3740
4323
|
isCorrect ? "bg-success-background border-success-300" : "bg-error-background border-error-300"
|
|
3741
4324
|
),
|
|
3742
4325
|
children: [
|
|
3743
|
-
/* @__PURE__ */ (0,
|
|
3744
|
-
/* @__PURE__ */ (0,
|
|
3745
|
-
/* @__PURE__ */ (0,
|
|
4326
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text_default, { size: "sm", className: "text-text-900", children: String.fromCodePoint(97 + index).concat(") ").concat(option.option) }),
|
|
4327
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex flex-row items-center gap-2 flex-shrink-0", children: [
|
|
4328
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Text_default, { size: "sm", className: "text-text-700", children: [
|
|
3746
4329
|
"Resposta correta: ",
|
|
3747
4330
|
correctAnswer
|
|
3748
4331
|
] }),
|
|
3749
|
-
/* @__PURE__ */ (0,
|
|
4332
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3750
4333
|
Badge_default,
|
|
3751
4334
|
{
|
|
3752
4335
|
variant: "solid",
|
|
3753
4336
|
action: isCorrect ? "success" : "error",
|
|
3754
|
-
iconLeft: isCorrect ? /* @__PURE__ */ (0,
|
|
4337
|
+
iconLeft: isCorrect ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_phosphor_react9.CheckCircle, {}) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_phosphor_react9.XCircle, {}),
|
|
3755
4338
|
children: isCorrect ? "Resposta correta" : "Resposta incorreta"
|
|
3756
4339
|
}
|
|
3757
4340
|
)
|
|
@@ -3762,7 +4345,7 @@ var ActivityCardQuestionPreview = ({
|
|
|
3762
4345
|
}) }) });
|
|
3763
4346
|
};
|
|
3764
4347
|
const renderDissertative = () => {
|
|
3765
|
-
return /* @__PURE__ */ (0,
|
|
4348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "mt-4 px-2 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text_default, { size: "sm", className: "text-text-600 italic", children: "Resposta do aluno" }) });
|
|
3766
4349
|
};
|
|
3767
4350
|
const renderConnectDots = () => null;
|
|
3768
4351
|
const renderFill = () => null;
|
|
@@ -3776,7 +4359,7 @@ var ActivityCardQuestionPreview = ({
|
|
|
3776
4359
|
["PREENCHER" /* PREENCHER */]: renderFill,
|
|
3777
4360
|
["IMAGEM" /* IMAGEM */]: renderImage
|
|
3778
4361
|
};
|
|
3779
|
-
return /* @__PURE__ */ (0,
|
|
4362
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
3780
4363
|
"div",
|
|
3781
4364
|
{
|
|
3782
4365
|
className: "w-full",
|
|
@@ -3806,13 +4389,13 @@ var ActivityCardQuestionPreview = ({
|
|
|
3806
4389
|
}
|
|
3807
4390
|
},
|
|
3808
4391
|
children: [
|
|
3809
|
-
/* @__PURE__ */ (0,
|
|
4392
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3810
4393
|
"div",
|
|
3811
4394
|
{
|
|
3812
4395
|
"data-drag-preview": "true",
|
|
3813
4396
|
className: "fixed -left-[9999px] -top-[9999px] pointer-events-none z-[9999] w-[440px]",
|
|
3814
|
-
children: /* @__PURE__ */ (0,
|
|
3815
|
-
/* @__PURE__ */ (0,
|
|
4397
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "w-full rounded-lg border border-border-200 bg-background", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "w-full min-w-0 flex flex-col gap-2 py-2", children: [
|
|
4398
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3816
4399
|
QuestionHeader,
|
|
3817
4400
|
{
|
|
3818
4401
|
badgeColor,
|
|
@@ -3822,7 +4405,7 @@ var ActivityCardQuestionPreview = ({
|
|
|
3822
4405
|
position
|
|
3823
4406
|
}
|
|
3824
4407
|
),
|
|
3825
|
-
/* @__PURE__ */ (0,
|
|
4408
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3826
4409
|
Text_default,
|
|
3827
4410
|
{
|
|
3828
4411
|
size: "md",
|
|
@@ -3834,7 +4417,7 @@ var ActivityCardQuestionPreview = ({
|
|
|
3834
4417
|
] }) })
|
|
3835
4418
|
}
|
|
3836
4419
|
),
|
|
3837
|
-
/* @__PURE__ */ (0,
|
|
4420
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
3838
4421
|
CardAccordation,
|
|
3839
4422
|
{
|
|
3840
4423
|
className: cn(
|
|
@@ -3845,8 +4428,8 @@ var ActivityCardQuestionPreview = ({
|
|
|
3845
4428
|
onToggleExpanded: setIsExpanded,
|
|
3846
4429
|
defaultExpanded,
|
|
3847
4430
|
value,
|
|
3848
|
-
trigger: /* @__PURE__ */ (0,
|
|
3849
|
-
/* @__PURE__ */ (0,
|
|
4431
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "w-full min-w-0 flex flex-col gap-2 py-2", children: [
|
|
4432
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3850
4433
|
QuestionHeader,
|
|
3851
4434
|
{
|
|
3852
4435
|
badgeColor,
|
|
@@ -3856,7 +4439,7 @@ var ActivityCardQuestionPreview = ({
|
|
|
3856
4439
|
position
|
|
3857
4440
|
}
|
|
3858
4441
|
),
|
|
3859
|
-
!isExpanded && /* @__PURE__ */ (0,
|
|
4442
|
+
!isExpanded && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3860
4443
|
Text_default,
|
|
3861
4444
|
{
|
|
3862
4445
|
size: "md",
|
|
@@ -3867,7 +4450,7 @@ var ActivityCardQuestionPreview = ({
|
|
|
3867
4450
|
)
|
|
3868
4451
|
] }),
|
|
3869
4452
|
children: [
|
|
3870
|
-
/* @__PURE__ */ (0,
|
|
4453
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3871
4454
|
Text_default,
|
|
3872
4455
|
{
|
|
3873
4456
|
size: "md",
|
|
@@ -3887,9 +4470,9 @@ var ActivityCardQuestionPreview = ({
|
|
|
3887
4470
|
};
|
|
3888
4471
|
|
|
3889
4472
|
// src/components/QuestionsPdfGenerator/QuestionsPdfGenerator.tsx
|
|
3890
|
-
var
|
|
3891
|
-
var
|
|
3892
|
-
var QuestionsPdfContent = (0,
|
|
4473
|
+
var import_react13 = require("react");
|
|
4474
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
4475
|
+
var QuestionsPdfContent = (0, import_react13.forwardRef)(({ questions }, ref) => {
|
|
3893
4476
|
const getLetterByIndex = (index) => {
|
|
3894
4477
|
return String.fromCodePoint(97 + index);
|
|
3895
4478
|
};
|
|
@@ -3897,7 +4480,7 @@ var QuestionsPdfContent = (0, import_react11.forwardRef)(({ questions }, ref) =>
|
|
|
3897
4480
|
if (!question.question?.options || question.question.options.length === 0) {
|
|
3898
4481
|
return null;
|
|
3899
4482
|
}
|
|
3900
|
-
return /* @__PURE__ */ (0,
|
|
4483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3901
4484
|
"ol",
|
|
3902
4485
|
{
|
|
3903
4486
|
type: "a",
|
|
@@ -3906,14 +4489,14 @@ var QuestionsPdfContent = (0, import_react11.forwardRef)(({ questions }, ref) =>
|
|
|
3906
4489
|
marginBottom: "12px",
|
|
3907
4490
|
paddingLeft: "24px"
|
|
3908
4491
|
},
|
|
3909
|
-
children: question.question.options.map((option) => /* @__PURE__ */ (0,
|
|
4492
|
+
children: question.question.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3910
4493
|
"li",
|
|
3911
4494
|
{
|
|
3912
4495
|
style: {
|
|
3913
4496
|
marginBottom: "8px",
|
|
3914
4497
|
lineHeight: "1.6"
|
|
3915
4498
|
},
|
|
3916
|
-
children: /* @__PURE__ */ (0,
|
|
4499
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(LatexRenderer_default, { content: option.option })
|
|
3917
4500
|
},
|
|
3918
4501
|
option.id
|
|
3919
4502
|
))
|
|
@@ -3924,7 +4507,7 @@ var QuestionsPdfContent = (0, import_react11.forwardRef)(({ questions }, ref) =>
|
|
|
3924
4507
|
if (!question.question?.options || question.question.options.length === 0) {
|
|
3925
4508
|
return null;
|
|
3926
4509
|
}
|
|
3927
|
-
return /* @__PURE__ */ (0,
|
|
4510
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3928
4511
|
"div",
|
|
3929
4512
|
{
|
|
3930
4513
|
style: {
|
|
@@ -3933,7 +4516,7 @@ var QuestionsPdfContent = (0, import_react11.forwardRef)(({ questions }, ref) =>
|
|
|
3933
4516
|
},
|
|
3934
4517
|
children: question.question.options.map((option, index) => {
|
|
3935
4518
|
const letter = getLetterByIndex(index);
|
|
3936
|
-
return /* @__PURE__ */ (0,
|
|
4519
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
3937
4520
|
"div",
|
|
3938
4521
|
{
|
|
3939
4522
|
style: {
|
|
@@ -3944,7 +4527,7 @@ var QuestionsPdfContent = (0, import_react11.forwardRef)(({ questions }, ref) =>
|
|
|
3944
4527
|
lineHeight: "1.6"
|
|
3945
4528
|
},
|
|
3946
4529
|
children: [
|
|
3947
|
-
/* @__PURE__ */ (0,
|
|
4530
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3948
4531
|
"span",
|
|
3949
4532
|
{
|
|
3950
4533
|
style: {
|
|
@@ -3955,7 +4538,7 @@ var QuestionsPdfContent = (0, import_react11.forwardRef)(({ questions }, ref) =>
|
|
|
3955
4538
|
children: "\u2610"
|
|
3956
4539
|
}
|
|
3957
4540
|
),
|
|
3958
|
-
/* @__PURE__ */ (0,
|
|
4541
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
3959
4542
|
"span",
|
|
3960
4543
|
{
|
|
3961
4544
|
style: {
|
|
@@ -3968,7 +4551,7 @@ var QuestionsPdfContent = (0, import_react11.forwardRef)(({ questions }, ref) =>
|
|
|
3968
4551
|
]
|
|
3969
4552
|
}
|
|
3970
4553
|
),
|
|
3971
|
-
/* @__PURE__ */ (0,
|
|
4554
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { style: { flex: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(LatexRenderer_default, { content: option.option }) })
|
|
3972
4555
|
]
|
|
3973
4556
|
},
|
|
3974
4557
|
option.id
|
|
@@ -3978,14 +4561,14 @@ var QuestionsPdfContent = (0, import_react11.forwardRef)(({ questions }, ref) =>
|
|
|
3978
4561
|
);
|
|
3979
4562
|
};
|
|
3980
4563
|
const renderDissertative = () => {
|
|
3981
|
-
return /* @__PURE__ */ (0,
|
|
4564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3982
4565
|
"div",
|
|
3983
4566
|
{
|
|
3984
4567
|
style: {
|
|
3985
4568
|
marginTop: "12px",
|
|
3986
4569
|
marginBottom: "12px"
|
|
3987
4570
|
},
|
|
3988
|
-
children: /* @__PURE__ */ (0,
|
|
4571
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
3989
4572
|
"div",
|
|
3990
4573
|
{
|
|
3991
4574
|
style: {
|
|
@@ -3994,7 +4577,7 @@ var QuestionsPdfContent = (0, import_react11.forwardRef)(({ questions }, ref) =>
|
|
|
3994
4577
|
gap: "8px"
|
|
3995
4578
|
},
|
|
3996
4579
|
children: [
|
|
3997
|
-
/* @__PURE__ */ (0,
|
|
4580
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3998
4581
|
"span",
|
|
3999
4582
|
{
|
|
4000
4583
|
style: {
|
|
@@ -4004,7 +4587,7 @@ var QuestionsPdfContent = (0, import_react11.forwardRef)(({ questions }, ref) =>
|
|
|
4004
4587
|
children: "R:"
|
|
4005
4588
|
}
|
|
4006
4589
|
),
|
|
4007
|
-
/* @__PURE__ */ (0,
|
|
4590
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4008
4591
|
"div",
|
|
4009
4592
|
{
|
|
4010
4593
|
style: {
|
|
@@ -4023,7 +4606,7 @@ var QuestionsPdfContent = (0, import_react11.forwardRef)(({ questions }, ref) =>
|
|
|
4023
4606
|
if (!question.question?.options || question.question.options.length === 0) {
|
|
4024
4607
|
return null;
|
|
4025
4608
|
}
|
|
4026
|
-
return /* @__PURE__ */ (0,
|
|
4609
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { style: { marginTop: "12px", marginBottom: "12px" }, children: question.question.options.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4027
4610
|
"div",
|
|
4028
4611
|
{
|
|
4029
4612
|
style: {
|
|
@@ -4033,7 +4616,7 @@ var QuestionsPdfContent = (0, import_react11.forwardRef)(({ questions }, ref) =>
|
|
|
4033
4616
|
gap: "12px"
|
|
4034
4617
|
},
|
|
4035
4618
|
children: [
|
|
4036
|
-
/* @__PURE__ */ (0,
|
|
4619
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4037
4620
|
"span",
|
|
4038
4621
|
{
|
|
4039
4622
|
style: {
|
|
@@ -4046,8 +4629,8 @@ var QuestionsPdfContent = (0, import_react11.forwardRef)(({ questions }, ref) =>
|
|
|
4046
4629
|
]
|
|
4047
4630
|
}
|
|
4048
4631
|
),
|
|
4049
|
-
/* @__PURE__ */ (0,
|
|
4050
|
-
/* @__PURE__ */ (0,
|
|
4632
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { style: { flex: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(LatexRenderer_default, { content: option.option }) }),
|
|
4633
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4051
4634
|
"span",
|
|
4052
4635
|
{
|
|
4053
4636
|
style: {
|
|
@@ -4081,7 +4664,7 @@ var QuestionsPdfContent = (0, import_react11.forwardRef)(({ questions }, ref) =>
|
|
|
4081
4664
|
};
|
|
4082
4665
|
const renderQuestionContent = (question, index) => {
|
|
4083
4666
|
const questionNumber = index + 1;
|
|
4084
|
-
return /* @__PURE__ */ (0,
|
|
4667
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4085
4668
|
"div",
|
|
4086
4669
|
{
|
|
4087
4670
|
style: {
|
|
@@ -4089,7 +4672,7 @@ var QuestionsPdfContent = (0, import_react11.forwardRef)(({ questions }, ref) =>
|
|
|
4089
4672
|
pageBreakInside: "avoid"
|
|
4090
4673
|
},
|
|
4091
4674
|
children: [
|
|
4092
|
-
/* @__PURE__ */ (0,
|
|
4675
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4093
4676
|
"h3",
|
|
4094
4677
|
{
|
|
4095
4678
|
style: {
|
|
@@ -4104,7 +4687,7 @@ var QuestionsPdfContent = (0, import_react11.forwardRef)(({ questions }, ref) =>
|
|
|
4104
4687
|
]
|
|
4105
4688
|
}
|
|
4106
4689
|
),
|
|
4107
|
-
question.enunciado && /* @__PURE__ */ (0,
|
|
4690
|
+
question.enunciado && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4108
4691
|
"div",
|
|
4109
4692
|
{
|
|
4110
4693
|
style: {
|
|
@@ -4112,7 +4695,7 @@ var QuestionsPdfContent = (0, import_react11.forwardRef)(({ questions }, ref) =>
|
|
|
4112
4695
|
lineHeight: "1.6",
|
|
4113
4696
|
color: "#000"
|
|
4114
4697
|
},
|
|
4115
|
-
children: /* @__PURE__ */ (0,
|
|
4698
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(LatexRenderer_default, { content: question.enunciado })
|
|
4116
4699
|
}
|
|
4117
4700
|
),
|
|
4118
4701
|
renderQuestionTypeContent(question)
|
|
@@ -4121,7 +4704,7 @@ var QuestionsPdfContent = (0, import_react11.forwardRef)(({ questions }, ref) =>
|
|
|
4121
4704
|
question.id
|
|
4122
4705
|
);
|
|
4123
4706
|
};
|
|
4124
|
-
return /* @__PURE__ */ (0,
|
|
4707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4125
4708
|
"div",
|
|
4126
4709
|
{
|
|
4127
4710
|
ref,
|
|
@@ -4137,7 +4720,7 @@ var QuestionsPdfContent = (0, import_react11.forwardRef)(({ questions }, ref) =>
|
|
|
4137
4720
|
zIndex: -1
|
|
4138
4721
|
},
|
|
4139
4722
|
children: [
|
|
4140
|
-
/* @__PURE__ */ (0,
|
|
4723
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("style", { children: `
|
|
4141
4724
|
@media print {
|
|
4142
4725
|
@page {
|
|
4143
4726
|
margin: 20mm;
|
|
@@ -4175,7 +4758,7 @@ var QuestionsPdfContent = (0, import_react11.forwardRef)(({ questions }, ref) =>
|
|
|
4175
4758
|
}
|
|
4176
4759
|
}
|
|
4177
4760
|
` }),
|
|
4178
|
-
/* @__PURE__ */ (0,
|
|
4761
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { style: { padding: "20px" }, children: questions.map(
|
|
4179
4762
|
(question, index) => renderQuestionContent(question, index)
|
|
4180
4763
|
) })
|
|
4181
4764
|
]
|
|
@@ -4303,8 +4886,8 @@ var setupPrintWindowHandler = (printWindow) => {
|
|
|
4303
4886
|
};
|
|
4304
4887
|
};
|
|
4305
4888
|
var useQuestionsPdfPrint = (questions, onPrint, onPrintError) => {
|
|
4306
|
-
const contentRef = (0,
|
|
4307
|
-
const handlePrint = (0,
|
|
4889
|
+
const contentRef = (0, import_react13.useRef)(null);
|
|
4890
|
+
const handlePrint = (0, import_react13.useCallback)(() => {
|
|
4308
4891
|
try {
|
|
4309
4892
|
onPrint?.();
|
|
4310
4893
|
if (!contentRef.current) {
|
|
@@ -4338,7 +4921,7 @@ var useQuestionsPdfPrint = (questions, onPrint, onPrintError) => {
|
|
|
4338
4921
|
};
|
|
4339
4922
|
|
|
4340
4923
|
// src/components/ActivityPreview/ActivityPreview.tsx
|
|
4341
|
-
var
|
|
4924
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
4342
4925
|
var ActivityPreview = ({
|
|
4343
4926
|
title = "Pr\xE9via da atividade",
|
|
4344
4927
|
questions = [],
|
|
@@ -4350,19 +4933,19 @@ var ActivityPreview = ({
|
|
|
4350
4933
|
onPositionsChange,
|
|
4351
4934
|
isDark = false
|
|
4352
4935
|
}) => {
|
|
4353
|
-
const onPositionsChangeRef = (0,
|
|
4936
|
+
const onPositionsChangeRef = (0, import_react14.useRef)(onPositionsChange);
|
|
4354
4937
|
onPositionsChangeRef.current = onPositionsChange;
|
|
4355
|
-
const normalizeWithPositions = (0,
|
|
4938
|
+
const normalizeWithPositions = (0, import_react14.useMemo)(
|
|
4356
4939
|
() => (items) => items.map((item, index) => ({
|
|
4357
4940
|
...item,
|
|
4358
4941
|
position: index + 1
|
|
4359
4942
|
})),
|
|
4360
4943
|
[]
|
|
4361
4944
|
);
|
|
4362
|
-
const [orderedQuestions, setOrderedQuestions] = (0,
|
|
4945
|
+
const [orderedQuestions, setOrderedQuestions] = (0, import_react14.useState)(
|
|
4363
4946
|
() => normalizeWithPositions(questions)
|
|
4364
4947
|
);
|
|
4365
|
-
(0,
|
|
4948
|
+
(0, import_react14.useEffect)(() => {
|
|
4366
4949
|
const normalized = normalizeWithPositions(questions);
|
|
4367
4950
|
setOrderedQuestions(normalized);
|
|
4368
4951
|
onPositionsChangeRef.current?.(normalized);
|
|
@@ -4400,7 +4983,7 @@ var ActivityPreview = ({
|
|
|
4400
4983
|
onReorder?.(normalized);
|
|
4401
4984
|
onPositionsChange?.(normalized);
|
|
4402
4985
|
};
|
|
4403
|
-
return /* @__PURE__ */ (0,
|
|
4986
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
4404
4987
|
"div",
|
|
4405
4988
|
{
|
|
4406
4989
|
className: cn(
|
|
@@ -4408,24 +4991,24 @@ var ActivityPreview = ({
|
|
|
4408
4991
|
className
|
|
4409
4992
|
),
|
|
4410
4993
|
children: [
|
|
4411
|
-
/* @__PURE__ */ (0,
|
|
4412
|
-
/* @__PURE__ */ (0,
|
|
4413
|
-
/* @__PURE__ */ (0,
|
|
4994
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("section", { className: "flex flex-row items-center gap-2 text-text-950", children: [
|
|
4995
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_phosphor_react10.File, { size: 24 }),
|
|
4996
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text_default, { size: "lg", weight: "bold", children: title })
|
|
4414
4997
|
] }),
|
|
4415
|
-
/* @__PURE__ */ (0,
|
|
4416
|
-
/* @__PURE__ */ (0,
|
|
4417
|
-
/* @__PURE__ */ (0,
|
|
4998
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("section", { className: "flex flex-row justify-between items-center", children: [
|
|
4999
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text_default, { size: "sm", className: "text-text-800", children: totalLabel }),
|
|
5000
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4418
5001
|
Button_default,
|
|
4419
5002
|
{
|
|
4420
5003
|
size: "small",
|
|
4421
5004
|
variant: "outline",
|
|
4422
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
5005
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_phosphor_react10.DownloadSimple, {}),
|
|
4423
5006
|
onClick: handleDownloadPdf,
|
|
4424
5007
|
children: "Baixar pdf"
|
|
4425
5008
|
}
|
|
4426
5009
|
)
|
|
4427
5010
|
] }),
|
|
4428
|
-
/* @__PURE__ */ (0,
|
|
5011
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("section", { className: "flex flex-col gap-3", children: orderedQuestions.map(
|
|
4429
5012
|
({
|
|
4430
5013
|
id,
|
|
4431
5014
|
subjectName = "Assunto n\xE3o informado",
|
|
@@ -4436,7 +5019,7 @@ var ActivityPreview = ({
|
|
|
4436
5019
|
enunciado,
|
|
4437
5020
|
question,
|
|
4438
5021
|
position
|
|
4439
|
-
}, index) => /* @__PURE__ */ (0,
|
|
5022
|
+
}, index) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
4440
5023
|
"div",
|
|
4441
5024
|
{
|
|
4442
5025
|
draggable: true,
|
|
@@ -4480,11 +5063,11 @@ var ActivityPreview = ({
|
|
|
4480
5063
|
},
|
|
4481
5064
|
className: "rounded-lg border border-border-200 bg-background relative group",
|
|
4482
5065
|
children: [
|
|
4483
|
-
onRemoveQuestion && /* @__PURE__ */ (0,
|
|
5066
|
+
onRemoveQuestion && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "absolute top-2 right-2 z-10 opacity-0 group-hover:opacity-100 transition-opacity", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4484
5067
|
IconButton_default,
|
|
4485
5068
|
{
|
|
4486
5069
|
size: "sm",
|
|
4487
|
-
icon: /* @__PURE__ */ (0,
|
|
5070
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_phosphor_react10.Trash, { size: 16 }),
|
|
4488
5071
|
onClick: (e) => {
|
|
4489
5072
|
e.stopPropagation();
|
|
4490
5073
|
onRemoveQuestion(id);
|
|
@@ -4492,7 +5075,7 @@ var ActivityPreview = ({
|
|
|
4492
5075
|
"aria-label": `Remover quest\xE3o ${position ?? index + 1}`
|
|
4493
5076
|
}
|
|
4494
5077
|
) }),
|
|
4495
|
-
/* @__PURE__ */ (0,
|
|
5078
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4496
5079
|
ActivityCardQuestionPreview,
|
|
4497
5080
|
{
|
|
4498
5081
|
subjectName,
|
|
@@ -4513,8 +5096,8 @@ var ActivityPreview = ({
|
|
|
4513
5096
|
id
|
|
4514
5097
|
)
|
|
4515
5098
|
) }),
|
|
4516
|
-
/* @__PURE__ */ (0,
|
|
4517
|
-
/* @__PURE__ */ (0,
|
|
5099
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Button_default, { variant: "outline", onClick: onRemoveAll, children: "Remover tudo" }),
|
|
5100
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(QuestionsPdfContent, { ref: contentRef, questions: orderedQuestions })
|
|
4518
5101
|
]
|
|
4519
5102
|
}
|
|
4520
5103
|
);
|