analytica-frontend-lib 1.2.10 → 1.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CheckBox/index.d.mts +1 -1
- package/dist/CheckBox/index.d.ts +1 -1
- package/dist/NoSearchResult/index.d.mts +37 -0
- package/dist/NoSearchResult/index.d.ts +37 -0
- package/dist/NoSearchResult/index.js +113 -0
- package/dist/NoSearchResult/index.js.map +1 -0
- package/dist/NoSearchResult/index.mjs +90 -0
- package/dist/NoSearchResult/index.mjs.map +1 -0
- package/dist/Radio/index.d.mts +2 -2
- package/dist/Radio/index.d.ts +2 -2
- package/dist/Search/index.d.mts +1 -1
- package/dist/Search/index.d.ts +1 -1
- package/dist/Table/index.d.mts +1 -1
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.js.map +1 -1
- package/dist/Table/index.mjs.map +1 -1
- package/dist/index.css +20 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +117 -3
- package/dist/index.d.ts +117 -3
- package/dist/index.js +1082 -782
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1002 -705
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +20 -0
- package/dist/styles.css.map +1 -1
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -1142,7 +1142,7 @@ var CheckboxGroup = ({
|
|
|
1142
1142
|
return depCat?.selectedIds && depCat.selectedIds.length > 0;
|
|
1143
1143
|
});
|
|
1144
1144
|
if (!isEnabled) {
|
|
1145
|
-
return [{ itens:
|
|
1145
|
+
return [{ itens: [] }];
|
|
1146
1146
|
}
|
|
1147
1147
|
const filters = category.filteredBy || [];
|
|
1148
1148
|
if (filters.length === 0) {
|
|
@@ -1257,9 +1257,10 @@ var CheckboxGroup = ({
|
|
|
1257
1257
|
const formattedItems = getFormattedItems(categoryKey);
|
|
1258
1258
|
const filteredItems = formattedItems.flatMap((group) => group.itens || []);
|
|
1259
1259
|
const filteredItemIds = filteredItems.map((item) => item.id);
|
|
1260
|
-
const
|
|
1260
|
+
const selectedFilteredCount = filteredItemIds.filter(
|
|
1261
1261
|
(itemId) => category.selectedIds?.includes(itemId)
|
|
1262
|
-
);
|
|
1262
|
+
).length;
|
|
1263
|
+
const allFilteredSelected = selectedFilteredCount === filteredItemIds.length;
|
|
1263
1264
|
const newSelection = allFilteredSelected ? category.selectedIds?.filter((id) => !filteredItemIds.includes(id)) || [] : [
|
|
1264
1265
|
...category.selectedIds || [],
|
|
1265
1266
|
...filteredItemIds.filter(
|
|
@@ -1297,24 +1298,27 @@ var CheckboxGroup = ({
|
|
|
1297
1298
|
}
|
|
1298
1299
|
onCategoriesChange(updatedCategories);
|
|
1299
1300
|
};
|
|
1300
|
-
const renderCheckboxItem = (item, categoryKey) =>
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1301
|
+
const renderCheckboxItem = (item, categoryKey) => {
|
|
1302
|
+
const uniqueId = `${categoryKey}-${item.id}`;
|
|
1303
|
+
return /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-3 px-2", children: [
|
|
1304
|
+
/* @__PURE__ */ jsx12(
|
|
1305
|
+
CheckBox_default,
|
|
1306
|
+
{
|
|
1307
|
+
id: uniqueId,
|
|
1308
|
+
checked: isCheckBoxIsSelected(categoryKey, item.id),
|
|
1309
|
+
onChange: () => toggleItem(categoryKey, item.id)
|
|
1310
|
+
}
|
|
1311
|
+
),
|
|
1312
|
+
/* @__PURE__ */ jsx12(
|
|
1313
|
+
"label",
|
|
1314
|
+
{
|
|
1315
|
+
htmlFor: uniqueId,
|
|
1316
|
+
className: "text-sm text-text-950 cursor-pointer select-none",
|
|
1317
|
+
children: item.name
|
|
1318
|
+
}
|
|
1319
|
+
)
|
|
1320
|
+
] }, item.id);
|
|
1321
|
+
};
|
|
1318
1322
|
const renderFormattedGroup = (formattedGroup, idx, categoryKey) => /* @__PURE__ */ jsxs8(
|
|
1319
1323
|
"div",
|
|
1320
1324
|
{
|
|
@@ -1386,13 +1390,38 @@ var CheckboxGroup = ({
|
|
|
1386
1390
|
openAccordion !== category.key && /* @__PURE__ */ jsx12(Divider_default, {})
|
|
1387
1391
|
] }, category.key);
|
|
1388
1392
|
};
|
|
1393
|
+
useEffect2(() => {
|
|
1394
|
+
if (!openAccordion) return;
|
|
1395
|
+
const category = categories.find((c) => c.key === openAccordion);
|
|
1396
|
+
if (!category) return;
|
|
1397
|
+
const isEnabled = !category.dependsOn || category.dependsOn.every((depKey) => {
|
|
1398
|
+
const depCat = categories.find((c) => c.key === depKey);
|
|
1399
|
+
return depCat?.selectedIds && depCat.selectedIds.length > 0;
|
|
1400
|
+
});
|
|
1401
|
+
if (!isEnabled) {
|
|
1402
|
+
setTimeout(() => {
|
|
1403
|
+
setOpenAccordion("");
|
|
1404
|
+
}, 0);
|
|
1405
|
+
}
|
|
1406
|
+
}, [categories, openAccordion]);
|
|
1389
1407
|
return /* @__PURE__ */ jsx12(
|
|
1390
1408
|
AccordionGroup,
|
|
1391
1409
|
{
|
|
1392
1410
|
type: "single",
|
|
1411
|
+
collapsible: true,
|
|
1393
1412
|
value: openAccordion,
|
|
1394
1413
|
onValueChange: (value) => {
|
|
1395
1414
|
if (typeof value === "string") {
|
|
1415
|
+
if (value) {
|
|
1416
|
+
const category = categories.find((c) => c.key === value);
|
|
1417
|
+
const isEnabled = !category?.dependsOn || category.dependsOn.every((depKey) => {
|
|
1418
|
+
const depCat = categories.find((c) => c.key === depKey);
|
|
1419
|
+
return depCat?.selectedIds && depCat.selectedIds.length > 0;
|
|
1420
|
+
});
|
|
1421
|
+
if (!isEnabled) {
|
|
1422
|
+
return;
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1396
1425
|
setOpenAccordion(value);
|
|
1397
1426
|
}
|
|
1398
1427
|
},
|
|
@@ -6771,10 +6800,246 @@ var TableCaption = forwardRef14(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
6771
6800
|
TableCaption.displayName = "TableCaption";
|
|
6772
6801
|
var Table_default = Table;
|
|
6773
6802
|
|
|
6803
|
+
// src/components/Filter/FilterModal.tsx
|
|
6804
|
+
import { jsx as jsx40, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
6805
|
+
var FilterModal = ({
|
|
6806
|
+
isOpen,
|
|
6807
|
+
onClose,
|
|
6808
|
+
filterConfigs,
|
|
6809
|
+
onFiltersChange,
|
|
6810
|
+
onApply,
|
|
6811
|
+
onClear,
|
|
6812
|
+
title = "Filtros",
|
|
6813
|
+
size = "md",
|
|
6814
|
+
applyLabel = "Aplicar",
|
|
6815
|
+
clearLabel = "Limpar filtros"
|
|
6816
|
+
}) => {
|
|
6817
|
+
const handleCategoryChange = (configIndex, updatedCategories) => {
|
|
6818
|
+
const newConfigs = [...filterConfigs];
|
|
6819
|
+
newConfigs[configIndex] = {
|
|
6820
|
+
...newConfigs[configIndex],
|
|
6821
|
+
categories: updatedCategories
|
|
6822
|
+
};
|
|
6823
|
+
onFiltersChange(newConfigs);
|
|
6824
|
+
};
|
|
6825
|
+
const handleApply = () => {
|
|
6826
|
+
onApply();
|
|
6827
|
+
onClose();
|
|
6828
|
+
};
|
|
6829
|
+
const handleClear = () => {
|
|
6830
|
+
onClear();
|
|
6831
|
+
};
|
|
6832
|
+
return /* @__PURE__ */ jsx40(
|
|
6833
|
+
Modal_default,
|
|
6834
|
+
{
|
|
6835
|
+
isOpen,
|
|
6836
|
+
onClose,
|
|
6837
|
+
title,
|
|
6838
|
+
size,
|
|
6839
|
+
footer: /* @__PURE__ */ jsxs29("div", { className: "flex gap-3 justify-end w-full", children: [
|
|
6840
|
+
/* @__PURE__ */ jsx40(Button_default, { variant: "outline", onClick: handleClear, children: clearLabel }),
|
|
6841
|
+
/* @__PURE__ */ jsx40(Button_default, { onClick: handleApply, children: applyLabel })
|
|
6842
|
+
] }),
|
|
6843
|
+
children: /* @__PURE__ */ jsx40("div", { className: "flex flex-col gap-6", children: filterConfigs.map((config, index) => /* @__PURE__ */ jsxs29("div", { className: "flex flex-col gap-4", children: [
|
|
6844
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2 text-text-400 text-sm font-medium uppercase", children: [
|
|
6845
|
+
config.key === "academic" && /* @__PURE__ */ jsxs29(
|
|
6846
|
+
"svg",
|
|
6847
|
+
{
|
|
6848
|
+
width: "16",
|
|
6849
|
+
height: "16",
|
|
6850
|
+
viewBox: "0 0 16 16",
|
|
6851
|
+
fill: "none",
|
|
6852
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6853
|
+
className: "text-text-400",
|
|
6854
|
+
children: [
|
|
6855
|
+
/* @__PURE__ */ jsx40(
|
|
6856
|
+
"path",
|
|
6857
|
+
{
|
|
6858
|
+
d: "M8 2L2 5.33333L8 8.66667L14 5.33333L8 2Z",
|
|
6859
|
+
stroke: "currentColor",
|
|
6860
|
+
strokeWidth: "1.5",
|
|
6861
|
+
strokeLinecap: "round",
|
|
6862
|
+
strokeLinejoin: "round"
|
|
6863
|
+
}
|
|
6864
|
+
),
|
|
6865
|
+
/* @__PURE__ */ jsx40(
|
|
6866
|
+
"path",
|
|
6867
|
+
{
|
|
6868
|
+
d: "M2 10.6667L8 14L14 10.6667",
|
|
6869
|
+
stroke: "currentColor",
|
|
6870
|
+
strokeWidth: "1.5",
|
|
6871
|
+
strokeLinecap: "round",
|
|
6872
|
+
strokeLinejoin: "round"
|
|
6873
|
+
}
|
|
6874
|
+
),
|
|
6875
|
+
/* @__PURE__ */ jsx40(
|
|
6876
|
+
"path",
|
|
6877
|
+
{
|
|
6878
|
+
d: "M2 8L8 11.3333L14 8",
|
|
6879
|
+
stroke: "currentColor",
|
|
6880
|
+
strokeWidth: "1.5",
|
|
6881
|
+
strokeLinecap: "round",
|
|
6882
|
+
strokeLinejoin: "round"
|
|
6883
|
+
}
|
|
6884
|
+
)
|
|
6885
|
+
]
|
|
6886
|
+
}
|
|
6887
|
+
),
|
|
6888
|
+
config.key === "content" && /* @__PURE__ */ jsxs29(
|
|
6889
|
+
"svg",
|
|
6890
|
+
{
|
|
6891
|
+
width: "16",
|
|
6892
|
+
height: "16",
|
|
6893
|
+
viewBox: "0 0 16 16",
|
|
6894
|
+
fill: "none",
|
|
6895
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6896
|
+
className: "text-text-400",
|
|
6897
|
+
children: [
|
|
6898
|
+
/* @__PURE__ */ jsx40(
|
|
6899
|
+
"path",
|
|
6900
|
+
{
|
|
6901
|
+
d: "M3.33333 2H12.6667C13.403 2 14 2.59695 14 3.33333V12.6667C14 13.403 13.403 14 12.6667 14H3.33333C2.59695 14 2 13.403 2 12.6667V3.33333C2 2.59695 2.59695 2 3.33333 2Z",
|
|
6902
|
+
stroke: "currentColor",
|
|
6903
|
+
strokeWidth: "1.5",
|
|
6904
|
+
strokeLinecap: "round",
|
|
6905
|
+
strokeLinejoin: "round"
|
|
6906
|
+
}
|
|
6907
|
+
),
|
|
6908
|
+
/* @__PURE__ */ jsx40(
|
|
6909
|
+
"path",
|
|
6910
|
+
{
|
|
6911
|
+
d: "M2 6H14",
|
|
6912
|
+
stroke: "currentColor",
|
|
6913
|
+
strokeWidth: "1.5",
|
|
6914
|
+
strokeLinecap: "round",
|
|
6915
|
+
strokeLinejoin: "round"
|
|
6916
|
+
}
|
|
6917
|
+
),
|
|
6918
|
+
/* @__PURE__ */ jsx40(
|
|
6919
|
+
"path",
|
|
6920
|
+
{
|
|
6921
|
+
d: "M6 2V14",
|
|
6922
|
+
stroke: "currentColor",
|
|
6923
|
+
strokeWidth: "1.5",
|
|
6924
|
+
strokeLinecap: "round",
|
|
6925
|
+
strokeLinejoin: "round"
|
|
6926
|
+
}
|
|
6927
|
+
)
|
|
6928
|
+
]
|
|
6929
|
+
}
|
|
6930
|
+
),
|
|
6931
|
+
/* @__PURE__ */ jsx40("span", { children: config.label })
|
|
6932
|
+
] }),
|
|
6933
|
+
/* @__PURE__ */ jsx40(
|
|
6934
|
+
CheckboxGroup,
|
|
6935
|
+
{
|
|
6936
|
+
categories: config.categories,
|
|
6937
|
+
onCategoriesChange: (updatedCategories) => handleCategoryChange(index, updatedCategories)
|
|
6938
|
+
}
|
|
6939
|
+
)
|
|
6940
|
+
] }, config.key)) })
|
|
6941
|
+
}
|
|
6942
|
+
);
|
|
6943
|
+
};
|
|
6944
|
+
|
|
6945
|
+
// src/components/Filter/useTableFilter.ts
|
|
6946
|
+
import { useEffect as useEffect14, useState as useState14, useCallback as useCallback2 } from "react";
|
|
6947
|
+
var useTableFilter = (initialConfigs, options = {}) => {
|
|
6948
|
+
const { syncWithUrl = false } = options;
|
|
6949
|
+
const getInitialState = useCallback2(() => {
|
|
6950
|
+
if (!syncWithUrl || globalThis.window === void 0) {
|
|
6951
|
+
return initialConfigs;
|
|
6952
|
+
}
|
|
6953
|
+
const params = new URLSearchParams(globalThis.window.location.search);
|
|
6954
|
+
const configsWithUrlState = initialConfigs.map((config) => ({
|
|
6955
|
+
...config,
|
|
6956
|
+
categories: config.categories.map((category) => {
|
|
6957
|
+
const urlValue = params.get(`filter_${category.key}`);
|
|
6958
|
+
const selectedIds = urlValue ? urlValue.split(",").filter(Boolean) : [];
|
|
6959
|
+
return {
|
|
6960
|
+
...category,
|
|
6961
|
+
selectedIds
|
|
6962
|
+
};
|
|
6963
|
+
})
|
|
6964
|
+
}));
|
|
6965
|
+
return configsWithUrlState;
|
|
6966
|
+
}, [initialConfigs, syncWithUrl]);
|
|
6967
|
+
const [filterConfigs, setFilterConfigs] = useState14(getInitialState);
|
|
6968
|
+
const activeFilters = {};
|
|
6969
|
+
let hasActiveFilters = false;
|
|
6970
|
+
for (const config of filterConfigs) {
|
|
6971
|
+
for (const category of config.categories) {
|
|
6972
|
+
if (category.selectedIds && category.selectedIds.length > 0) {
|
|
6973
|
+
activeFilters[category.key] = category.selectedIds;
|
|
6974
|
+
hasActiveFilters = true;
|
|
6975
|
+
}
|
|
6976
|
+
}
|
|
6977
|
+
}
|
|
6978
|
+
const updateFilters = useCallback2((configs) => {
|
|
6979
|
+
setFilterConfigs(configs);
|
|
6980
|
+
}, []);
|
|
6981
|
+
const applyFilters = useCallback2(() => {
|
|
6982
|
+
if (!syncWithUrl || globalThis.window === void 0) {
|
|
6983
|
+
return;
|
|
6984
|
+
}
|
|
6985
|
+
const url = new URL(globalThis.window.location.href);
|
|
6986
|
+
const params = url.searchParams;
|
|
6987
|
+
for (const config of filterConfigs) {
|
|
6988
|
+
for (const category of config.categories) {
|
|
6989
|
+
const paramKey = `filter_${category.key}`;
|
|
6990
|
+
if (category.selectedIds && category.selectedIds.length > 0) {
|
|
6991
|
+
params.set(paramKey, category.selectedIds.join(","));
|
|
6992
|
+
} else {
|
|
6993
|
+
params.delete(paramKey);
|
|
6994
|
+
}
|
|
6995
|
+
}
|
|
6996
|
+
}
|
|
6997
|
+
globalThis.window.history.replaceState({}, "", url.toString());
|
|
6998
|
+
}, [filterConfigs, syncWithUrl]);
|
|
6999
|
+
const clearFilters = useCallback2(() => {
|
|
7000
|
+
const clearedConfigs = filterConfigs.map((config) => ({
|
|
7001
|
+
...config,
|
|
7002
|
+
categories: config.categories.map((category) => ({
|
|
7003
|
+
...category,
|
|
7004
|
+
selectedIds: []
|
|
7005
|
+
}))
|
|
7006
|
+
}));
|
|
7007
|
+
setFilterConfigs(clearedConfigs);
|
|
7008
|
+
if (syncWithUrl && globalThis.window !== void 0) {
|
|
7009
|
+
const url = new URL(globalThis.window.location.href);
|
|
7010
|
+
const params = url.searchParams;
|
|
7011
|
+
for (const config of filterConfigs) {
|
|
7012
|
+
for (const category of config.categories) {
|
|
7013
|
+
params.delete(`filter_${category.key}`);
|
|
7014
|
+
}
|
|
7015
|
+
}
|
|
7016
|
+
globalThis.window.history.replaceState({}, "", url.toString());
|
|
7017
|
+
}
|
|
7018
|
+
}, [filterConfigs, syncWithUrl]);
|
|
7019
|
+
useEffect14(() => {
|
|
7020
|
+
if (!syncWithUrl || globalThis.window === void 0) {
|
|
7021
|
+
return;
|
|
7022
|
+
}
|
|
7023
|
+
const handlePopState = () => {
|
|
7024
|
+
setFilterConfigs(getInitialState());
|
|
7025
|
+
};
|
|
7026
|
+
globalThis.window.addEventListener("popstate", handlePopState);
|
|
7027
|
+
return () => globalThis.window.removeEventListener("popstate", handlePopState);
|
|
7028
|
+
}, [syncWithUrl, getInitialState]);
|
|
7029
|
+
return {
|
|
7030
|
+
filterConfigs,
|
|
7031
|
+
activeFilters,
|
|
7032
|
+
hasActiveFilters,
|
|
7033
|
+
updateFilters,
|
|
7034
|
+
applyFilters,
|
|
7035
|
+
clearFilters
|
|
7036
|
+
};
|
|
7037
|
+
};
|
|
7038
|
+
|
|
6774
7039
|
// src/components/Select/Select.tsx
|
|
6775
7040
|
import { create as create7, useStore as useStore4 } from "zustand";
|
|
6776
7041
|
import {
|
|
6777
|
-
useEffect as
|
|
7042
|
+
useEffect as useEffect15,
|
|
6778
7043
|
useRef as useRef8,
|
|
6779
7044
|
forwardRef as forwardRef15,
|
|
6780
7045
|
isValidElement as isValidElement4,
|
|
@@ -6783,7 +7048,7 @@ import {
|
|
|
6783
7048
|
useId as useId8
|
|
6784
7049
|
} from "react";
|
|
6785
7050
|
import { CaretDown as CaretDown2, Check as Check4, WarningCircle as WarningCircle5 } from "phosphor-react";
|
|
6786
|
-
import { Fragment as Fragment6, jsx as
|
|
7051
|
+
import { Fragment as Fragment6, jsx as jsx41, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
6787
7052
|
var VARIANT_CLASSES4 = {
|
|
6788
7053
|
outlined: "border-2 rounded-lg focus:border-primary-950",
|
|
6789
7054
|
underlined: "border-b-2 focus:border-primary-950",
|
|
@@ -6843,7 +7108,7 @@ function getLabelAsNode(children) {
|
|
|
6843
7108
|
}
|
|
6844
7109
|
const flattened = Children4.toArray(children);
|
|
6845
7110
|
if (flattened.length === 1) return flattened[0];
|
|
6846
|
-
return /* @__PURE__ */
|
|
7111
|
+
return /* @__PURE__ */ jsx41(Fragment6, { children: flattened });
|
|
6847
7112
|
}
|
|
6848
7113
|
var injectStore4 = (children, store, size, selectId) => {
|
|
6849
7114
|
return Children4.map(children, (child) => {
|
|
@@ -6905,13 +7170,13 @@ var Select = ({
|
|
|
6905
7170
|
search(children2);
|
|
6906
7171
|
return found;
|
|
6907
7172
|
};
|
|
6908
|
-
|
|
7173
|
+
useEffect15(() => {
|
|
6909
7174
|
if (!selectedLabel && defaultValue) {
|
|
6910
7175
|
const label2 = findLabelForValue(children, defaultValue);
|
|
6911
7176
|
if (label2) store.setState({ selectedLabel: label2 });
|
|
6912
7177
|
}
|
|
6913
7178
|
}, [children, defaultValue, selectedLabel]);
|
|
6914
|
-
|
|
7179
|
+
useEffect15(() => {
|
|
6915
7180
|
const handleClickOutside = (event) => {
|
|
6916
7181
|
if (selectRef.current && !selectRef.current.contains(event.target)) {
|
|
6917
7182
|
setOpen(false);
|
|
@@ -6946,7 +7211,7 @@ var Select = ({
|
|
|
6946
7211
|
document.removeEventListener("keydown", handleArrowKeys);
|
|
6947
7212
|
};
|
|
6948
7213
|
}, [open]);
|
|
6949
|
-
|
|
7214
|
+
useEffect15(() => {
|
|
6950
7215
|
if (propValue) {
|
|
6951
7216
|
setValue(propValue);
|
|
6952
7217
|
const label2 = findLabelForValue(children, propValue);
|
|
@@ -6954,8 +7219,8 @@ var Select = ({
|
|
|
6954
7219
|
}
|
|
6955
7220
|
}, [propValue]);
|
|
6956
7221
|
const sizeClasses = SIZE_CLASSES12[size];
|
|
6957
|
-
return /* @__PURE__ */
|
|
6958
|
-
label && /* @__PURE__ */
|
|
7222
|
+
return /* @__PURE__ */ jsxs30("div", { className: cn("w-full", className), children: [
|
|
7223
|
+
label && /* @__PURE__ */ jsx41(
|
|
6959
7224
|
"label",
|
|
6960
7225
|
{
|
|
6961
7226
|
htmlFor: selectId,
|
|
@@ -6963,11 +7228,11 @@ var Select = ({
|
|
|
6963
7228
|
children: label
|
|
6964
7229
|
}
|
|
6965
7230
|
),
|
|
6966
|
-
/* @__PURE__ */
|
|
6967
|
-
(helperText || errorMessage) && /* @__PURE__ */
|
|
6968
|
-
helperText && /* @__PURE__ */
|
|
6969
|
-
errorMessage && /* @__PURE__ */
|
|
6970
|
-
/* @__PURE__ */
|
|
7231
|
+
/* @__PURE__ */ jsx41("div", { className: cn("relative w-full"), ref: selectRef, children: injectStore4(children, store, size, selectId) }),
|
|
7232
|
+
(helperText || errorMessage) && /* @__PURE__ */ jsxs30("div", { className: "mt-1.5 gap-1.5", children: [
|
|
7233
|
+
helperText && /* @__PURE__ */ jsx41("p", { className: "text-sm text-text-500", children: helperText }),
|
|
7234
|
+
errorMessage && /* @__PURE__ */ jsxs30("p", { className: "flex gap-1 items-center text-sm text-indicator-error", children: [
|
|
7235
|
+
/* @__PURE__ */ jsx41(WarningCircle5, { size: 16 }),
|
|
6971
7236
|
" ",
|
|
6972
7237
|
errorMessage
|
|
6973
7238
|
] })
|
|
@@ -6981,7 +7246,7 @@ var SelectValue = ({
|
|
|
6981
7246
|
const store = useSelectStore(externalStore);
|
|
6982
7247
|
const selectedLabel = useStore4(store, (s) => s.selectedLabel);
|
|
6983
7248
|
const value = useStore4(store, (s) => s.value);
|
|
6984
|
-
return /* @__PURE__ */
|
|
7249
|
+
return /* @__PURE__ */ jsx41("span", { className: "text-inherit flex gap-2 items-center", children: selectedLabel || placeholder || value });
|
|
6985
7250
|
};
|
|
6986
7251
|
var SelectTrigger = forwardRef15(
|
|
6987
7252
|
({
|
|
@@ -7000,7 +7265,7 @@ var SelectTrigger = forwardRef15(
|
|
|
7000
7265
|
const variantClasses = VARIANT_CLASSES4[variant];
|
|
7001
7266
|
const heightClasses = HEIGHT_CLASSES[size];
|
|
7002
7267
|
const paddingClasses = PADDING_CLASSES[size];
|
|
7003
|
-
return /* @__PURE__ */
|
|
7268
|
+
return /* @__PURE__ */ jsxs30(
|
|
7004
7269
|
"button",
|
|
7005
7270
|
{
|
|
7006
7271
|
ref,
|
|
@@ -7022,7 +7287,7 @@ var SelectTrigger = forwardRef15(
|
|
|
7022
7287
|
...props,
|
|
7023
7288
|
children: [
|
|
7024
7289
|
props.children,
|
|
7025
|
-
/* @__PURE__ */
|
|
7290
|
+
/* @__PURE__ */ jsx41(
|
|
7026
7291
|
CaretDown2,
|
|
7027
7292
|
{
|
|
7028
7293
|
className: cn(
|
|
@@ -7050,7 +7315,7 @@ var SelectContent = forwardRef15(
|
|
|
7050
7315
|
const open = useStore4(store, (s) => s.open);
|
|
7051
7316
|
if (!open) return null;
|
|
7052
7317
|
const getPositionClasses = () => `w-full min-w-full absolute ${SIDE_CLASSES2[side]} ${ALIGN_CLASSES2[align]}`;
|
|
7053
|
-
return /* @__PURE__ */
|
|
7318
|
+
return /* @__PURE__ */ jsx41(
|
|
7054
7319
|
"div",
|
|
7055
7320
|
{
|
|
7056
7321
|
role: "menu",
|
|
@@ -7094,7 +7359,7 @@ var SelectItem = forwardRef15(
|
|
|
7094
7359
|
}
|
|
7095
7360
|
props.onClick?.(e);
|
|
7096
7361
|
};
|
|
7097
|
-
return /* @__PURE__ */
|
|
7362
|
+
return /* @__PURE__ */ jsxs30(
|
|
7098
7363
|
"div",
|
|
7099
7364
|
{
|
|
7100
7365
|
role: "menuitem",
|
|
@@ -7114,7 +7379,7 @@ var SelectItem = forwardRef15(
|
|
|
7114
7379
|
tabIndex: disabled ? -1 : 0,
|
|
7115
7380
|
...props,
|
|
7116
7381
|
children: [
|
|
7117
|
-
/* @__PURE__ */
|
|
7382
|
+
/* @__PURE__ */ jsx41("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: selectedValue === value && /* @__PURE__ */ jsx41(Check4, { className: "" }) }),
|
|
7118
7383
|
children
|
|
7119
7384
|
]
|
|
7120
7385
|
}
|
|
@@ -7127,16 +7392,16 @@ var Select_default = Select;
|
|
|
7127
7392
|
// src/components/Menu/Menu.tsx
|
|
7128
7393
|
import { create as create8, useStore as useStore5 } from "zustand";
|
|
7129
7394
|
import {
|
|
7130
|
-
useEffect as
|
|
7395
|
+
useEffect as useEffect16,
|
|
7131
7396
|
useRef as useRef9,
|
|
7132
7397
|
forwardRef as forwardRef16,
|
|
7133
7398
|
isValidElement as isValidElement5,
|
|
7134
7399
|
Children as Children5,
|
|
7135
7400
|
cloneElement as cloneElement5,
|
|
7136
|
-
useState as
|
|
7401
|
+
useState as useState15
|
|
7137
7402
|
} from "react";
|
|
7138
7403
|
import { CaretLeft, CaretRight as CaretRight2 } from "phosphor-react";
|
|
7139
|
-
import { jsx as
|
|
7404
|
+
import { jsx as jsx42, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
7140
7405
|
var createMenuStore = (onValueChange) => create8((set) => ({
|
|
7141
7406
|
value: "",
|
|
7142
7407
|
setValue: (value) => {
|
|
@@ -7169,12 +7434,12 @@ var Menu = forwardRef16(
|
|
|
7169
7434
|
storeRef.current ??= createMenuStore(onValueChange);
|
|
7170
7435
|
const store = storeRef.current;
|
|
7171
7436
|
const { setValue } = useStore5(store, (s) => s);
|
|
7172
|
-
|
|
7437
|
+
useEffect16(() => {
|
|
7173
7438
|
setValue(propValue ?? defaultValue);
|
|
7174
7439
|
}, [defaultValue, propValue, setValue]);
|
|
7175
7440
|
const baseClasses = variant === "menu-overflow" ? "w-fit py-2 flex flex-row items-center justify-center" : "w-full py-2 flex flex-row items-center justify-center";
|
|
7176
7441
|
const variantClasses = VARIANT_CLASSES5[variant];
|
|
7177
|
-
return /* @__PURE__ */
|
|
7442
|
+
return /* @__PURE__ */ jsx42(
|
|
7178
7443
|
"div",
|
|
7179
7444
|
{
|
|
7180
7445
|
ref,
|
|
@@ -7194,7 +7459,7 @@ var MenuContent = forwardRef16(
|
|
|
7194
7459
|
({ className, children, variant = "menu", ...props }, ref) => {
|
|
7195
7460
|
const baseClasses = "w-full flex flex-row items-center gap-2";
|
|
7196
7461
|
const variantClasses = variant === "menu2" || variant === "menu-overflow" ? "overflow-x-auto scroll-smooth" : "";
|
|
7197
|
-
return /* @__PURE__ */
|
|
7462
|
+
return /* @__PURE__ */ jsx42(
|
|
7198
7463
|
"ul",
|
|
7199
7464
|
{
|
|
7200
7465
|
ref,
|
|
@@ -7246,7 +7511,7 @@ var MenuItem = forwardRef16(
|
|
|
7246
7511
|
...props
|
|
7247
7512
|
};
|
|
7248
7513
|
const variants = {
|
|
7249
|
-
menu: /* @__PURE__ */
|
|
7514
|
+
menu: /* @__PURE__ */ jsx42(
|
|
7250
7515
|
"li",
|
|
7251
7516
|
{
|
|
7252
7517
|
"data-variant": "menu",
|
|
@@ -7261,7 +7526,7 @@ var MenuItem = forwardRef16(
|
|
|
7261
7526
|
children
|
|
7262
7527
|
}
|
|
7263
7528
|
),
|
|
7264
|
-
menu2: /* @__PURE__ */
|
|
7529
|
+
menu2: /* @__PURE__ */ jsxs31(
|
|
7265
7530
|
"li",
|
|
7266
7531
|
{
|
|
7267
7532
|
"data-variant": "menu2",
|
|
@@ -7272,7 +7537,7 @@ var MenuItem = forwardRef16(
|
|
|
7272
7537
|
`,
|
|
7273
7538
|
...commonProps,
|
|
7274
7539
|
children: [
|
|
7275
|
-
/* @__PURE__ */
|
|
7540
|
+
/* @__PURE__ */ jsx42(
|
|
7276
7541
|
"span",
|
|
7277
7542
|
{
|
|
7278
7543
|
className: cn(
|
|
@@ -7282,11 +7547,11 @@ var MenuItem = forwardRef16(
|
|
|
7282
7547
|
children
|
|
7283
7548
|
}
|
|
7284
7549
|
),
|
|
7285
|
-
selectedValue === value && /* @__PURE__ */
|
|
7550
|
+
selectedValue === value && /* @__PURE__ */ jsx42("div", { className: "h-1 w-full bg-primary-950 rounded-lg" })
|
|
7286
7551
|
]
|
|
7287
7552
|
}
|
|
7288
7553
|
),
|
|
7289
|
-
"menu-overflow": /* @__PURE__ */
|
|
7554
|
+
"menu-overflow": /* @__PURE__ */ jsxs31(
|
|
7290
7555
|
"li",
|
|
7291
7556
|
{
|
|
7292
7557
|
"data-variant": "menu-overflow",
|
|
@@ -7297,7 +7562,7 @@ var MenuItem = forwardRef16(
|
|
|
7297
7562
|
`,
|
|
7298
7563
|
...commonProps,
|
|
7299
7564
|
children: [
|
|
7300
|
-
/* @__PURE__ */
|
|
7565
|
+
/* @__PURE__ */ jsx42(
|
|
7301
7566
|
"span",
|
|
7302
7567
|
{
|
|
7303
7568
|
className: cn(
|
|
@@ -7307,11 +7572,11 @@ var MenuItem = forwardRef16(
|
|
|
7307
7572
|
children
|
|
7308
7573
|
}
|
|
7309
7574
|
),
|
|
7310
|
-
selectedValue === value && /* @__PURE__ */
|
|
7575
|
+
selectedValue === value && /* @__PURE__ */ jsx42("div", { className: "h-1 w-full bg-primary-950 rounded-lg" })
|
|
7311
7576
|
]
|
|
7312
7577
|
}
|
|
7313
7578
|
),
|
|
7314
|
-
breadcrumb: /* @__PURE__ */
|
|
7579
|
+
breadcrumb: /* @__PURE__ */ jsxs31(
|
|
7315
7580
|
"li",
|
|
7316
7581
|
{
|
|
7317
7582
|
"data-variant": "breadcrumb",
|
|
@@ -7323,7 +7588,7 @@ var MenuItem = forwardRef16(
|
|
|
7323
7588
|
`,
|
|
7324
7589
|
...commonProps,
|
|
7325
7590
|
children: [
|
|
7326
|
-
/* @__PURE__ */
|
|
7591
|
+
/* @__PURE__ */ jsx42(
|
|
7327
7592
|
"span",
|
|
7328
7593
|
{
|
|
7329
7594
|
className: cn(
|
|
@@ -7333,7 +7598,7 @@ var MenuItem = forwardRef16(
|
|
|
7333
7598
|
children
|
|
7334
7599
|
}
|
|
7335
7600
|
),
|
|
7336
|
-
separator && /* @__PURE__ */
|
|
7601
|
+
separator && /* @__PURE__ */ jsx42(
|
|
7337
7602
|
CaretRight2,
|
|
7338
7603
|
{
|
|
7339
7604
|
size: 16,
|
|
@@ -7371,9 +7636,9 @@ var MenuOverflow = ({
|
|
|
7371
7636
|
...props
|
|
7372
7637
|
}) => {
|
|
7373
7638
|
const containerRef = useRef9(null);
|
|
7374
|
-
const [showLeftArrow, setShowLeftArrow] =
|
|
7375
|
-
const [showRightArrow, setShowRightArrow] =
|
|
7376
|
-
|
|
7639
|
+
const [showLeftArrow, setShowLeftArrow] = useState15(false);
|
|
7640
|
+
const [showRightArrow, setShowRightArrow] = useState15(false);
|
|
7641
|
+
useEffect16(() => {
|
|
7377
7642
|
const checkScroll = () => internalCheckScroll(
|
|
7378
7643
|
containerRef.current,
|
|
7379
7644
|
setShowLeftArrow,
|
|
@@ -7388,25 +7653,25 @@ var MenuOverflow = ({
|
|
|
7388
7653
|
window.removeEventListener("resize", checkScroll);
|
|
7389
7654
|
};
|
|
7390
7655
|
}, []);
|
|
7391
|
-
return /* @__PURE__ */
|
|
7656
|
+
return /* @__PURE__ */ jsxs31(
|
|
7392
7657
|
"div",
|
|
7393
7658
|
{
|
|
7394
7659
|
"data-testid": "menu-overflow-wrapper",
|
|
7395
7660
|
className: cn("relative w-full overflow-hidden", className),
|
|
7396
7661
|
children: [
|
|
7397
|
-
showLeftArrow && /* @__PURE__ */
|
|
7662
|
+
showLeftArrow && /* @__PURE__ */ jsxs31(
|
|
7398
7663
|
"button",
|
|
7399
7664
|
{
|
|
7400
7665
|
onClick: () => internalScroll(containerRef.current, "left"),
|
|
7401
7666
|
className: "absolute left-0 top-1/2 -translate-y-1/2 z-10 flex h-8 w-8 items-center justify-center rounded-full bg-white shadow-md cursor-pointer",
|
|
7402
7667
|
"data-testid": "scroll-left-button",
|
|
7403
7668
|
children: [
|
|
7404
|
-
/* @__PURE__ */
|
|
7405
|
-
/* @__PURE__ */
|
|
7669
|
+
/* @__PURE__ */ jsx42(CaretLeft, { size: 16 }),
|
|
7670
|
+
/* @__PURE__ */ jsx42("span", { className: "sr-only", children: "Scroll left" })
|
|
7406
7671
|
]
|
|
7407
7672
|
}
|
|
7408
7673
|
),
|
|
7409
|
-
/* @__PURE__ */
|
|
7674
|
+
/* @__PURE__ */ jsx42(
|
|
7410
7675
|
Menu,
|
|
7411
7676
|
{
|
|
7412
7677
|
defaultValue,
|
|
@@ -7414,18 +7679,18 @@ var MenuOverflow = ({
|
|
|
7414
7679
|
value,
|
|
7415
7680
|
variant: "menu2",
|
|
7416
7681
|
...props,
|
|
7417
|
-
children: /* @__PURE__ */
|
|
7682
|
+
children: /* @__PURE__ */ jsx42(MenuContent, { ref: containerRef, variant: "menu2", children })
|
|
7418
7683
|
}
|
|
7419
7684
|
),
|
|
7420
|
-
showRightArrow && /* @__PURE__ */
|
|
7685
|
+
showRightArrow && /* @__PURE__ */ jsxs31(
|
|
7421
7686
|
"button",
|
|
7422
7687
|
{
|
|
7423
7688
|
onClick: () => internalScroll(containerRef.current, "right"),
|
|
7424
7689
|
className: "absolute right-0 top-1/2 -translate-y-1/2 z-10 flex h-8 w-8 items-center justify-center rounded-full bg-white shadow-md cursor-pointer",
|
|
7425
7690
|
"data-testid": "scroll-right-button",
|
|
7426
7691
|
children: [
|
|
7427
|
-
/* @__PURE__ */
|
|
7428
|
-
/* @__PURE__ */
|
|
7692
|
+
/* @__PURE__ */ jsx42(CaretRight2, { size: 16 }),
|
|
7693
|
+
/* @__PURE__ */ jsx42("span", { className: "sr-only", children: "Scroll right" })
|
|
7429
7694
|
]
|
|
7430
7695
|
}
|
|
7431
7696
|
)
|
|
@@ -7448,9 +7713,9 @@ var Menu_default = Menu;
|
|
|
7448
7713
|
import {
|
|
7449
7714
|
forwardRef as forwardRef17,
|
|
7450
7715
|
Fragment as Fragment7,
|
|
7451
|
-
useState as
|
|
7716
|
+
useState as useState16,
|
|
7452
7717
|
useRef as useRef10,
|
|
7453
|
-
useEffect as
|
|
7718
|
+
useEffect as useEffect17
|
|
7454
7719
|
} from "react";
|
|
7455
7720
|
import {
|
|
7456
7721
|
CaretRight as CaretRight3,
|
|
@@ -7468,7 +7733,7 @@ import {
|
|
|
7468
7733
|
// src/components/IconRender/IconRender.tsx
|
|
7469
7734
|
import { cloneElement as cloneElement6 } from "react";
|
|
7470
7735
|
import * as PhosphorIcons from "phosphor-react";
|
|
7471
|
-
import { jsx as
|
|
7736
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
7472
7737
|
var IconRender = ({
|
|
7473
7738
|
iconName,
|
|
7474
7739
|
color = "#000000",
|
|
@@ -7478,14 +7743,14 @@ var IconRender = ({
|
|
|
7478
7743
|
if (typeof iconName === "string") {
|
|
7479
7744
|
switch (iconName) {
|
|
7480
7745
|
case "Chat_PT":
|
|
7481
|
-
return /* @__PURE__ */
|
|
7746
|
+
return /* @__PURE__ */ jsx43(ChatPT, { size, color });
|
|
7482
7747
|
case "Chat_EN":
|
|
7483
|
-
return /* @__PURE__ */
|
|
7748
|
+
return /* @__PURE__ */ jsx43(ChatEN, { size, color });
|
|
7484
7749
|
case "Chat_ES":
|
|
7485
|
-
return /* @__PURE__ */
|
|
7750
|
+
return /* @__PURE__ */ jsx43(ChatES, { size, color });
|
|
7486
7751
|
default: {
|
|
7487
7752
|
const IconComponent = PhosphorIcons[iconName] || PhosphorIcons.Question;
|
|
7488
|
-
return /* @__PURE__ */
|
|
7753
|
+
return /* @__PURE__ */ jsx43(IconComponent, { size, color, weight });
|
|
7489
7754
|
}
|
|
7490
7755
|
}
|
|
7491
7756
|
} else {
|
|
@@ -7498,7 +7763,7 @@ var IconRender = ({
|
|
|
7498
7763
|
var IconRender_default = IconRender;
|
|
7499
7764
|
|
|
7500
7765
|
// src/components/Card/Card.tsx
|
|
7501
|
-
import { Fragment as Fragment8, jsx as
|
|
7766
|
+
import { Fragment as Fragment8, jsx as jsx44, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
7502
7767
|
var CARD_BASE_CLASSES = {
|
|
7503
7768
|
default: "w-full bg-background border border-border-50 rounded-xl",
|
|
7504
7769
|
compact: "w-full bg-background border border-border-50 rounded-lg",
|
|
@@ -7540,7 +7805,7 @@ var CardBase = forwardRef17(
|
|
|
7540
7805
|
const minHeightClasses = CARD_MIN_HEIGHT_CLASSES[minHeight];
|
|
7541
7806
|
const layoutClasses = CARD_LAYOUT_CLASSES[layout];
|
|
7542
7807
|
const cursorClasses = CARD_CURSOR_CLASSES[cursor];
|
|
7543
|
-
return /* @__PURE__ */
|
|
7808
|
+
return /* @__PURE__ */ jsx44(
|
|
7544
7809
|
"div",
|
|
7545
7810
|
{
|
|
7546
7811
|
ref,
|
|
@@ -7598,7 +7863,7 @@ var CardActivitiesResults = forwardRef17(
|
|
|
7598
7863
|
const actionIconClasses = ACTION_ICON_CLASSES[action];
|
|
7599
7864
|
const actionSubTitleClasses = ACTION_SUBTITLE_CLASSES[action];
|
|
7600
7865
|
const actionHeaderClasses = ACTION_HEADER_CLASSES[action];
|
|
7601
|
-
return /* @__PURE__ */
|
|
7866
|
+
return /* @__PURE__ */ jsxs32(
|
|
7602
7867
|
"div",
|
|
7603
7868
|
{
|
|
7604
7869
|
ref,
|
|
@@ -7608,7 +7873,7 @@ var CardActivitiesResults = forwardRef17(
|
|
|
7608
7873
|
),
|
|
7609
7874
|
...props,
|
|
7610
7875
|
children: [
|
|
7611
|
-
/* @__PURE__ */
|
|
7876
|
+
/* @__PURE__ */ jsxs32(
|
|
7612
7877
|
"div",
|
|
7613
7878
|
{
|
|
7614
7879
|
className: cn(
|
|
@@ -7617,7 +7882,7 @@ var CardActivitiesResults = forwardRef17(
|
|
|
7617
7882
|
extended ? "rounded-t-xl" : "rounded-xl"
|
|
7618
7883
|
),
|
|
7619
7884
|
children: [
|
|
7620
|
-
/* @__PURE__ */
|
|
7885
|
+
/* @__PURE__ */ jsx44(
|
|
7621
7886
|
"span",
|
|
7622
7887
|
{
|
|
7623
7888
|
className: cn(
|
|
@@ -7627,7 +7892,7 @@ var CardActivitiesResults = forwardRef17(
|
|
|
7627
7892
|
children: icon
|
|
7628
7893
|
}
|
|
7629
7894
|
),
|
|
7630
|
-
/* @__PURE__ */
|
|
7895
|
+
/* @__PURE__ */ jsx44(
|
|
7631
7896
|
Text_default,
|
|
7632
7897
|
{
|
|
7633
7898
|
size: "2xs",
|
|
@@ -7636,7 +7901,7 @@ var CardActivitiesResults = forwardRef17(
|
|
|
7636
7901
|
children: title
|
|
7637
7902
|
}
|
|
7638
7903
|
),
|
|
7639
|
-
/* @__PURE__ */
|
|
7904
|
+
/* @__PURE__ */ jsx44(
|
|
7640
7905
|
"p",
|
|
7641
7906
|
{
|
|
7642
7907
|
className: cn("text-lg font-bold truncate", actionSubTitleClasses),
|
|
@@ -7646,8 +7911,8 @@ var CardActivitiesResults = forwardRef17(
|
|
|
7646
7911
|
]
|
|
7647
7912
|
}
|
|
7648
7913
|
),
|
|
7649
|
-
extended && /* @__PURE__ */
|
|
7650
|
-
/* @__PURE__ */
|
|
7914
|
+
extended && /* @__PURE__ */ jsxs32("div", { className: "flex flex-col items-center gap-2.5 pb-9.5 pt-2.5", children: [
|
|
7915
|
+
/* @__PURE__ */ jsx44(
|
|
7651
7916
|
"p",
|
|
7652
7917
|
{
|
|
7653
7918
|
className: cn(
|
|
@@ -7657,7 +7922,7 @@ var CardActivitiesResults = forwardRef17(
|
|
|
7657
7922
|
children: header
|
|
7658
7923
|
}
|
|
7659
7924
|
),
|
|
7660
|
-
/* @__PURE__ */
|
|
7925
|
+
/* @__PURE__ */ jsx44(Badge_default, { size: "large", action: "info", children: description })
|
|
7661
7926
|
] })
|
|
7662
7927
|
]
|
|
7663
7928
|
}
|
|
@@ -7676,7 +7941,7 @@ var CardQuestions = forwardRef17(
|
|
|
7676
7941
|
const isDone = state === "done";
|
|
7677
7942
|
const stateLabel = isDone ? "Realizado" : "N\xE3o Realizado";
|
|
7678
7943
|
const buttonLabel = isDone ? "Ver Resultado" : "Responder";
|
|
7679
|
-
return /* @__PURE__ */
|
|
7944
|
+
return /* @__PURE__ */ jsxs32(
|
|
7680
7945
|
CardBase,
|
|
7681
7946
|
{
|
|
7682
7947
|
ref,
|
|
@@ -7686,9 +7951,9 @@ var CardQuestions = forwardRef17(
|
|
|
7686
7951
|
className: cn("justify-between gap-4", className),
|
|
7687
7952
|
...props,
|
|
7688
7953
|
children: [
|
|
7689
|
-
/* @__PURE__ */
|
|
7690
|
-
/* @__PURE__ */
|
|
7691
|
-
/* @__PURE__ */
|
|
7954
|
+
/* @__PURE__ */ jsxs32("section", { className: "flex flex-col gap-1 flex-1 min-w-0", children: [
|
|
7955
|
+
/* @__PURE__ */ jsx44("p", { className: "font-bold text-xs text-text-950 truncate", children: header }),
|
|
7956
|
+
/* @__PURE__ */ jsx44("div", { className: "flex flex-row gap-6 items-center", children: /* @__PURE__ */ jsx44(
|
|
7692
7957
|
Badge_default,
|
|
7693
7958
|
{
|
|
7694
7959
|
size: "medium",
|
|
@@ -7698,7 +7963,7 @@ var CardQuestions = forwardRef17(
|
|
|
7698
7963
|
}
|
|
7699
7964
|
) })
|
|
7700
7965
|
] }),
|
|
7701
|
-
/* @__PURE__ */
|
|
7966
|
+
/* @__PURE__ */ jsx44("span", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx44(
|
|
7702
7967
|
Button_default,
|
|
7703
7968
|
{
|
|
7704
7969
|
size: "extra-small",
|
|
@@ -7729,19 +7994,19 @@ var CardProgress = forwardRef17(
|
|
|
7729
7994
|
}, ref) => {
|
|
7730
7995
|
const isHorizontal = direction === "horizontal";
|
|
7731
7996
|
const contentComponent = {
|
|
7732
|
-
horizontal: /* @__PURE__ */
|
|
7733
|
-
showDates && /* @__PURE__ */
|
|
7734
|
-
initialDate && /* @__PURE__ */
|
|
7735
|
-
/* @__PURE__ */
|
|
7736
|
-
/* @__PURE__ */
|
|
7997
|
+
horizontal: /* @__PURE__ */ jsxs32(Fragment8, { children: [
|
|
7998
|
+
showDates && /* @__PURE__ */ jsxs32("div", { className: "flex flex-row gap-6 items-center", children: [
|
|
7999
|
+
initialDate && /* @__PURE__ */ jsxs32("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
|
|
8000
|
+
/* @__PURE__ */ jsx44("p", { className: "text-text-800 font-semibold", children: "In\xEDcio" }),
|
|
8001
|
+
/* @__PURE__ */ jsx44("p", { className: "text-text-600", children: initialDate })
|
|
7737
8002
|
] }),
|
|
7738
|
-
endDate && /* @__PURE__ */
|
|
7739
|
-
/* @__PURE__ */
|
|
7740
|
-
/* @__PURE__ */
|
|
8003
|
+
endDate && /* @__PURE__ */ jsxs32("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
|
|
8004
|
+
/* @__PURE__ */ jsx44("p", { className: "text-text-800 font-semibold", children: "Fim" }),
|
|
8005
|
+
/* @__PURE__ */ jsx44("p", { className: "text-text-600", children: endDate })
|
|
7741
8006
|
] })
|
|
7742
8007
|
] }),
|
|
7743
|
-
/* @__PURE__ */
|
|
7744
|
-
/* @__PURE__ */
|
|
8008
|
+
/* @__PURE__ */ jsxs32("span", { className: "grid grid-cols-[1fr_auto] items-center gap-2", children: [
|
|
8009
|
+
/* @__PURE__ */ jsx44(
|
|
7745
8010
|
ProgressBar_default,
|
|
7746
8011
|
{
|
|
7747
8012
|
size: "small",
|
|
@@ -7750,7 +8015,7 @@ var CardProgress = forwardRef17(
|
|
|
7750
8015
|
"data-testid": "progress-bar"
|
|
7751
8016
|
}
|
|
7752
8017
|
),
|
|
7753
|
-
/* @__PURE__ */
|
|
8018
|
+
/* @__PURE__ */ jsxs32(
|
|
7754
8019
|
Text_default,
|
|
7755
8020
|
{
|
|
7756
8021
|
size: "xs",
|
|
@@ -7766,9 +8031,9 @@ var CardProgress = forwardRef17(
|
|
|
7766
8031
|
)
|
|
7767
8032
|
] })
|
|
7768
8033
|
] }),
|
|
7769
|
-
vertical: /* @__PURE__ */
|
|
8034
|
+
vertical: /* @__PURE__ */ jsx44("p", { className: "text-sm text-text-800", children: subhead })
|
|
7770
8035
|
};
|
|
7771
|
-
return /* @__PURE__ */
|
|
8036
|
+
return /* @__PURE__ */ jsxs32(
|
|
7772
8037
|
CardBase,
|
|
7773
8038
|
{
|
|
7774
8039
|
ref,
|
|
@@ -7779,7 +8044,7 @@ var CardProgress = forwardRef17(
|
|
|
7779
8044
|
className: cn(isHorizontal ? "h-20" : "", className),
|
|
7780
8045
|
...props,
|
|
7781
8046
|
children: [
|
|
7782
|
-
/* @__PURE__ */
|
|
8047
|
+
/* @__PURE__ */ jsx44(
|
|
7783
8048
|
"div",
|
|
7784
8049
|
{
|
|
7785
8050
|
className: cn(
|
|
@@ -7792,7 +8057,7 @@ var CardProgress = forwardRef17(
|
|
|
7792
8057
|
children: icon
|
|
7793
8058
|
}
|
|
7794
8059
|
),
|
|
7795
|
-
/* @__PURE__ */
|
|
8060
|
+
/* @__PURE__ */ jsxs32(
|
|
7796
8061
|
"div",
|
|
7797
8062
|
{
|
|
7798
8063
|
className: cn(
|
|
@@ -7800,7 +8065,7 @@ var CardProgress = forwardRef17(
|
|
|
7800
8065
|
!isHorizontal && "gap-4"
|
|
7801
8066
|
),
|
|
7802
8067
|
children: [
|
|
7803
|
-
/* @__PURE__ */
|
|
8068
|
+
/* @__PURE__ */ jsx44(Text_default, { size: "sm", weight: "bold", className: "text-text-950 truncate", children: header }),
|
|
7804
8069
|
contentComponent[direction]
|
|
7805
8070
|
]
|
|
7806
8071
|
}
|
|
@@ -7820,7 +8085,7 @@ var CardTopic = forwardRef17(
|
|
|
7820
8085
|
className = "",
|
|
7821
8086
|
...props
|
|
7822
8087
|
}, ref) => {
|
|
7823
|
-
return /* @__PURE__ */
|
|
8088
|
+
return /* @__PURE__ */ jsxs32(
|
|
7824
8089
|
CardBase,
|
|
7825
8090
|
{
|
|
7826
8091
|
ref,
|
|
@@ -7831,13 +8096,13 @@ var CardTopic = forwardRef17(
|
|
|
7831
8096
|
className: cn("justify-center gap-2 py-2 px-4", className),
|
|
7832
8097
|
...props,
|
|
7833
8098
|
children: [
|
|
7834
|
-
subHead && /* @__PURE__ */
|
|
7835
|
-
/* @__PURE__ */
|
|
7836
|
-
index < subHead.length - 1 && /* @__PURE__ */
|
|
8099
|
+
subHead && /* @__PURE__ */ jsx44("span", { className: "text-text-600 text-2xs flex flex-row gap-1", children: subHead.map((text, index) => /* @__PURE__ */ jsxs32(Fragment7, { children: [
|
|
8100
|
+
/* @__PURE__ */ jsx44("p", { children: text }),
|
|
8101
|
+
index < subHead.length - 1 && /* @__PURE__ */ jsx44("p", { children: "\u2022" })
|
|
7837
8102
|
] }, `${text} - ${index}`)) }),
|
|
7838
|
-
/* @__PURE__ */
|
|
7839
|
-
/* @__PURE__ */
|
|
7840
|
-
/* @__PURE__ */
|
|
8103
|
+
/* @__PURE__ */ jsx44("p", { className: "text-sm text-text-950 font-bold truncate", children: header }),
|
|
8104
|
+
/* @__PURE__ */ jsxs32("span", { className: "grid grid-cols-[1fr_auto] items-center gap-2", children: [
|
|
8105
|
+
/* @__PURE__ */ jsx44(
|
|
7841
8106
|
ProgressBar_default,
|
|
7842
8107
|
{
|
|
7843
8108
|
size: "small",
|
|
@@ -7846,7 +8111,7 @@ var CardTopic = forwardRef17(
|
|
|
7846
8111
|
"data-testid": "progress-bar"
|
|
7847
8112
|
}
|
|
7848
8113
|
),
|
|
7849
|
-
showPercentage && /* @__PURE__ */
|
|
8114
|
+
showPercentage && /* @__PURE__ */ jsxs32(
|
|
7850
8115
|
Text_default,
|
|
7851
8116
|
{
|
|
7852
8117
|
size: "xs",
|
|
@@ -7880,7 +8145,7 @@ var CardPerformance = forwardRef17(
|
|
|
7880
8145
|
...props
|
|
7881
8146
|
}, ref) => {
|
|
7882
8147
|
const hasProgress = progress !== void 0;
|
|
7883
|
-
return /* @__PURE__ */
|
|
8148
|
+
return /* @__PURE__ */ jsxs32(
|
|
7884
8149
|
CardBase,
|
|
7885
8150
|
{
|
|
7886
8151
|
ref,
|
|
@@ -7894,10 +8159,10 @@ var CardPerformance = forwardRef17(
|
|
|
7894
8159
|
onClick: () => actionVariant == "caret" && onClickButton?.(valueButton),
|
|
7895
8160
|
...props,
|
|
7896
8161
|
children: [
|
|
7897
|
-
/* @__PURE__ */
|
|
7898
|
-
/* @__PURE__ */
|
|
7899
|
-
/* @__PURE__ */
|
|
7900
|
-
actionVariant === "button" && /* @__PURE__ */
|
|
8162
|
+
/* @__PURE__ */ jsxs32("div", { className: "w-full flex flex-col justify-between gap-2", children: [
|
|
8163
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-row justify-between items-center gap-2", children: [
|
|
8164
|
+
/* @__PURE__ */ jsx44("p", { className: "text-lg font-bold text-text-950 truncate flex-1 min-w-0", children: header }),
|
|
8165
|
+
actionVariant === "button" && /* @__PURE__ */ jsx44(
|
|
7901
8166
|
Button_default,
|
|
7902
8167
|
{
|
|
7903
8168
|
variant: "outline",
|
|
@@ -7908,16 +8173,16 @@ var CardPerformance = forwardRef17(
|
|
|
7908
8173
|
}
|
|
7909
8174
|
)
|
|
7910
8175
|
] }),
|
|
7911
|
-
/* @__PURE__ */
|
|
8176
|
+
/* @__PURE__ */ jsx44("div", { className: "w-full", children: hasProgress ? /* @__PURE__ */ jsx44(
|
|
7912
8177
|
ProgressBar_default,
|
|
7913
8178
|
{
|
|
7914
8179
|
value: progress,
|
|
7915
8180
|
label: `${progress}% ${labelProgress}`,
|
|
7916
8181
|
variant: progressVariant
|
|
7917
8182
|
}
|
|
7918
|
-
) : /* @__PURE__ */
|
|
8183
|
+
) : /* @__PURE__ */ jsx44("p", { className: "text-xs text-text-600 truncate", children: description }) })
|
|
7919
8184
|
] }),
|
|
7920
|
-
actionVariant == "caret" && /* @__PURE__ */
|
|
8185
|
+
actionVariant == "caret" && /* @__PURE__ */ jsx44(
|
|
7921
8186
|
CaretRight3,
|
|
7922
8187
|
{
|
|
7923
8188
|
className: "size-4.5 text-text-800 cursor-pointer",
|
|
@@ -7941,7 +8206,7 @@ var CardResults = forwardRef17(
|
|
|
7941
8206
|
...props
|
|
7942
8207
|
}, ref) => {
|
|
7943
8208
|
const isRow = direction == "row";
|
|
7944
|
-
return /* @__PURE__ */
|
|
8209
|
+
return /* @__PURE__ */ jsxs32(
|
|
7945
8210
|
CardBase,
|
|
7946
8211
|
{
|
|
7947
8212
|
ref,
|
|
@@ -7951,7 +8216,7 @@ var CardResults = forwardRef17(
|
|
|
7951
8216
|
className: cn("items-stretch cursor-pointer pr-4", className),
|
|
7952
8217
|
...props,
|
|
7953
8218
|
children: [
|
|
7954
|
-
/* @__PURE__ */
|
|
8219
|
+
/* @__PURE__ */ jsx44(
|
|
7955
8220
|
"div",
|
|
7956
8221
|
{
|
|
7957
8222
|
className: cn(
|
|
@@ -7960,11 +8225,11 @@ var CardResults = forwardRef17(
|
|
|
7960
8225
|
style: {
|
|
7961
8226
|
backgroundColor: color
|
|
7962
8227
|
},
|
|
7963
|
-
children: /* @__PURE__ */
|
|
8228
|
+
children: /* @__PURE__ */ jsx44(IconRender_default, { iconName: icon, color: "currentColor", size: 20 })
|
|
7964
8229
|
}
|
|
7965
8230
|
),
|
|
7966
|
-
/* @__PURE__ */
|
|
7967
|
-
/* @__PURE__ */
|
|
8231
|
+
/* @__PURE__ */ jsxs32("div", { className: "w-full flex flex-row justify-between items-center", children: [
|
|
8232
|
+
/* @__PURE__ */ jsxs32(
|
|
7968
8233
|
"div",
|
|
7969
8234
|
{
|
|
7970
8235
|
className: cn(
|
|
@@ -7972,28 +8237,28 @@ var CardResults = forwardRef17(
|
|
|
7972
8237
|
isRow ? "flex-row items-center gap-2" : "flex-col"
|
|
7973
8238
|
),
|
|
7974
8239
|
children: [
|
|
7975
|
-
/* @__PURE__ */
|
|
7976
|
-
/* @__PURE__ */
|
|
7977
|
-
/* @__PURE__ */
|
|
8240
|
+
/* @__PURE__ */ jsx44("p", { className: "text-sm font-bold text-text-950 flex-1", children: header }),
|
|
8241
|
+
/* @__PURE__ */ jsxs32("span", { className: "flex flex-wrap flex-row gap-1 items-center", children: [
|
|
8242
|
+
/* @__PURE__ */ jsxs32(
|
|
7978
8243
|
Badge_default,
|
|
7979
8244
|
{
|
|
7980
8245
|
action: "success",
|
|
7981
8246
|
variant: "solid",
|
|
7982
8247
|
size: "large",
|
|
7983
|
-
iconLeft: /* @__PURE__ */
|
|
8248
|
+
iconLeft: /* @__PURE__ */ jsx44(CheckCircle3, {}),
|
|
7984
8249
|
children: [
|
|
7985
8250
|
correct_answers,
|
|
7986
8251
|
" Corretas"
|
|
7987
8252
|
]
|
|
7988
8253
|
}
|
|
7989
8254
|
),
|
|
7990
|
-
/* @__PURE__ */
|
|
8255
|
+
/* @__PURE__ */ jsxs32(
|
|
7991
8256
|
Badge_default,
|
|
7992
8257
|
{
|
|
7993
8258
|
action: "error",
|
|
7994
8259
|
variant: "solid",
|
|
7995
8260
|
size: "large",
|
|
7996
|
-
iconLeft: /* @__PURE__ */
|
|
8261
|
+
iconLeft: /* @__PURE__ */ jsx44(XCircle2, {}),
|
|
7997
8262
|
children: [
|
|
7998
8263
|
incorrect_answers,
|
|
7999
8264
|
" Incorretas"
|
|
@@ -8004,7 +8269,7 @@ var CardResults = forwardRef17(
|
|
|
8004
8269
|
]
|
|
8005
8270
|
}
|
|
8006
8271
|
),
|
|
8007
|
-
/* @__PURE__ */
|
|
8272
|
+
/* @__PURE__ */ jsx44(CaretRight3, { className: "min-w-6 min-h-6 text-text-800" })
|
|
8008
8273
|
] })
|
|
8009
8274
|
]
|
|
8010
8275
|
}
|
|
@@ -8030,13 +8295,13 @@ var CardStatus = forwardRef17(
|
|
|
8030
8295
|
const getIconBadge = (status2) => {
|
|
8031
8296
|
switch (status2) {
|
|
8032
8297
|
case "correct":
|
|
8033
|
-
return /* @__PURE__ */
|
|
8298
|
+
return /* @__PURE__ */ jsx44(CheckCircle3, {});
|
|
8034
8299
|
case "incorrect":
|
|
8035
|
-
return /* @__PURE__ */
|
|
8300
|
+
return /* @__PURE__ */ jsx44(XCircle2, {});
|
|
8036
8301
|
case "pending":
|
|
8037
|
-
return /* @__PURE__ */
|
|
8302
|
+
return /* @__PURE__ */ jsx44(Clock, {});
|
|
8038
8303
|
default:
|
|
8039
|
-
return /* @__PURE__ */
|
|
8304
|
+
return /* @__PURE__ */ jsx44(XCircle2, {});
|
|
8040
8305
|
}
|
|
8041
8306
|
};
|
|
8042
8307
|
const getActionBadge = (status2) => {
|
|
@@ -8051,7 +8316,7 @@ var CardStatus = forwardRef17(
|
|
|
8051
8316
|
return "info";
|
|
8052
8317
|
}
|
|
8053
8318
|
};
|
|
8054
|
-
return /* @__PURE__ */
|
|
8319
|
+
return /* @__PURE__ */ jsx44(
|
|
8055
8320
|
CardBase,
|
|
8056
8321
|
{
|
|
8057
8322
|
ref,
|
|
@@ -8060,10 +8325,10 @@ var CardStatus = forwardRef17(
|
|
|
8060
8325
|
minHeight: "medium",
|
|
8061
8326
|
className: cn("items-center cursor-pointer", className),
|
|
8062
8327
|
...props,
|
|
8063
|
-
children: /* @__PURE__ */
|
|
8064
|
-
/* @__PURE__ */
|
|
8065
|
-
/* @__PURE__ */
|
|
8066
|
-
status && /* @__PURE__ */
|
|
8328
|
+
children: /* @__PURE__ */ jsxs32("div", { className: "flex justify-between w-full h-full flex-row items-center gap-2", children: [
|
|
8329
|
+
/* @__PURE__ */ jsx44("p", { className: "text-sm font-bold text-text-950 truncate flex-1 min-w-0", children: header }),
|
|
8330
|
+
/* @__PURE__ */ jsxs32("span", { className: "flex flex-row gap-1 items-center flex-shrink-0", children: [
|
|
8331
|
+
status && /* @__PURE__ */ jsx44(
|
|
8067
8332
|
Badge_default,
|
|
8068
8333
|
{
|
|
8069
8334
|
action: getActionBadge(status),
|
|
@@ -8073,9 +8338,9 @@ var CardStatus = forwardRef17(
|
|
|
8073
8338
|
children: getLabelBadge(status)
|
|
8074
8339
|
}
|
|
8075
8340
|
),
|
|
8076
|
-
label && /* @__PURE__ */
|
|
8341
|
+
label && /* @__PURE__ */ jsx44("p", { className: "text-sm text-text-800", children: label })
|
|
8077
8342
|
] }),
|
|
8078
|
-
/* @__PURE__ */
|
|
8343
|
+
/* @__PURE__ */ jsx44(CaretRight3, { className: "min-w-6 min-h-6 text-text-800 cursor-pointer flex-shrink-0 ml-2" })
|
|
8079
8344
|
] })
|
|
8080
8345
|
}
|
|
8081
8346
|
);
|
|
@@ -8083,7 +8348,7 @@ var CardStatus = forwardRef17(
|
|
|
8083
8348
|
);
|
|
8084
8349
|
var CardSettings = forwardRef17(
|
|
8085
8350
|
({ header, className, icon, ...props }, ref) => {
|
|
8086
|
-
return /* @__PURE__ */
|
|
8351
|
+
return /* @__PURE__ */ jsxs32(
|
|
8087
8352
|
CardBase,
|
|
8088
8353
|
{
|
|
8089
8354
|
ref,
|
|
@@ -8096,9 +8361,9 @@ var CardSettings = forwardRef17(
|
|
|
8096
8361
|
),
|
|
8097
8362
|
...props,
|
|
8098
8363
|
children: [
|
|
8099
|
-
/* @__PURE__ */
|
|
8100
|
-
/* @__PURE__ */
|
|
8101
|
-
/* @__PURE__ */
|
|
8364
|
+
/* @__PURE__ */ jsx44("span", { className: "[&>svg]:size-6", children: icon }),
|
|
8365
|
+
/* @__PURE__ */ jsx44("p", { className: "w-full text-sm truncate", children: header }),
|
|
8366
|
+
/* @__PURE__ */ jsx44(CaretRight3, { size: 24, className: "cursor-pointer" })
|
|
8102
8367
|
]
|
|
8103
8368
|
}
|
|
8104
8369
|
);
|
|
@@ -8106,7 +8371,7 @@ var CardSettings = forwardRef17(
|
|
|
8106
8371
|
);
|
|
8107
8372
|
var CardSupport = forwardRef17(
|
|
8108
8373
|
({ header, className, direction = "col", children, ...props }, ref) => {
|
|
8109
|
-
return /* @__PURE__ */
|
|
8374
|
+
return /* @__PURE__ */ jsxs32(
|
|
8110
8375
|
CardBase,
|
|
8111
8376
|
{
|
|
8112
8377
|
ref,
|
|
@@ -8119,7 +8384,7 @@ var CardSupport = forwardRef17(
|
|
|
8119
8384
|
),
|
|
8120
8385
|
...props,
|
|
8121
8386
|
children: [
|
|
8122
|
-
/* @__PURE__ */
|
|
8387
|
+
/* @__PURE__ */ jsxs32(
|
|
8123
8388
|
"div",
|
|
8124
8389
|
{
|
|
8125
8390
|
className: cn(
|
|
@@ -8127,12 +8392,12 @@ var CardSupport = forwardRef17(
|
|
|
8127
8392
|
direction == "col" ? "flex-col" : "flex-row items-center"
|
|
8128
8393
|
),
|
|
8129
8394
|
children: [
|
|
8130
|
-
/* @__PURE__ */
|
|
8131
|
-
/* @__PURE__ */
|
|
8395
|
+
/* @__PURE__ */ jsx44("span", { className: "w-full min-w-0", children: /* @__PURE__ */ jsx44("p", { className: "text-sm text-text-950 font-bold truncate", children: header }) }),
|
|
8396
|
+
/* @__PURE__ */ jsx44("span", { className: "flex flex-row gap-1", children })
|
|
8132
8397
|
]
|
|
8133
8398
|
}
|
|
8134
8399
|
),
|
|
8135
|
-
/* @__PURE__ */
|
|
8400
|
+
/* @__PURE__ */ jsx44(CaretRight3, { className: "text-text-800 cursor-pointer", size: 24 })
|
|
8136
8401
|
]
|
|
8137
8402
|
}
|
|
8138
8403
|
);
|
|
@@ -8152,7 +8417,7 @@ var CardForum = forwardRef17(
|
|
|
8152
8417
|
hour,
|
|
8153
8418
|
...props
|
|
8154
8419
|
}, ref) => {
|
|
8155
|
-
return /* @__PURE__ */
|
|
8420
|
+
return /* @__PURE__ */ jsxs32(
|
|
8156
8421
|
CardBase,
|
|
8157
8422
|
{
|
|
8158
8423
|
ref,
|
|
@@ -8163,7 +8428,7 @@ var CardForum = forwardRef17(
|
|
|
8163
8428
|
className: cn("w-auto h-auto gap-3", className),
|
|
8164
8429
|
...props,
|
|
8165
8430
|
children: [
|
|
8166
|
-
/* @__PURE__ */
|
|
8431
|
+
/* @__PURE__ */ jsx44(
|
|
8167
8432
|
"button",
|
|
8168
8433
|
{
|
|
8169
8434
|
type: "button",
|
|
@@ -8172,18 +8437,18 @@ var CardForum = forwardRef17(
|
|
|
8172
8437
|
className: "min-w-8 h-8 rounded-full bg-background-950"
|
|
8173
8438
|
}
|
|
8174
8439
|
),
|
|
8175
|
-
/* @__PURE__ */
|
|
8176
|
-
/* @__PURE__ */
|
|
8177
|
-
/* @__PURE__ */
|
|
8178
|
-
/* @__PURE__ */
|
|
8440
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-2 flex-1 min-w-0", children: [
|
|
8441
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-row gap-1 items-center flex-wrap", children: [
|
|
8442
|
+
/* @__PURE__ */ jsx44("p", { className: "text-xs font-semibold text-primary-700 truncate", children: title }),
|
|
8443
|
+
/* @__PURE__ */ jsxs32("p", { className: "text-xs text-text-600", children: [
|
|
8179
8444
|
"\u2022 ",
|
|
8180
8445
|
date,
|
|
8181
8446
|
" \u2022 ",
|
|
8182
8447
|
hour
|
|
8183
8448
|
] })
|
|
8184
8449
|
] }),
|
|
8185
|
-
/* @__PURE__ */
|
|
8186
|
-
/* @__PURE__ */
|
|
8450
|
+
/* @__PURE__ */ jsx44("p", { className: "text-text-950 text-sm line-clamp-2 truncate", children: content }),
|
|
8451
|
+
/* @__PURE__ */ jsxs32(
|
|
8187
8452
|
"button",
|
|
8188
8453
|
{
|
|
8189
8454
|
type: "button",
|
|
@@ -8191,8 +8456,8 @@ var CardForum = forwardRef17(
|
|
|
8191
8456
|
onClick: () => onClickComments?.(valueComments),
|
|
8192
8457
|
className: "text-text-600 flex flex-row gap-2 items-center",
|
|
8193
8458
|
children: [
|
|
8194
|
-
/* @__PURE__ */
|
|
8195
|
-
/* @__PURE__ */
|
|
8459
|
+
/* @__PURE__ */ jsx44(ChatCircleText, { "aria-hidden": "true", size: 16 }),
|
|
8460
|
+
/* @__PURE__ */ jsxs32("p", { className: "text-xs", children: [
|
|
8196
8461
|
comments,
|
|
8197
8462
|
" respostas"
|
|
8198
8463
|
] })
|
|
@@ -8219,13 +8484,13 @@ var CardAudio = forwardRef17(
|
|
|
8219
8484
|
className,
|
|
8220
8485
|
...props
|
|
8221
8486
|
}, ref) => {
|
|
8222
|
-
const [isPlaying, setIsPlaying] =
|
|
8223
|
-
const [currentTime, setCurrentTime] =
|
|
8224
|
-
const [duration, setDuration] =
|
|
8225
|
-
const [volume, setVolume] =
|
|
8226
|
-
const [showVolumeControl, setShowVolumeControl] =
|
|
8227
|
-
const [showSpeedMenu, setShowSpeedMenu] =
|
|
8228
|
-
const [playbackRate, setPlaybackRate] =
|
|
8487
|
+
const [isPlaying, setIsPlaying] = useState16(false);
|
|
8488
|
+
const [currentTime, setCurrentTime] = useState16(0);
|
|
8489
|
+
const [duration, setDuration] = useState16(0);
|
|
8490
|
+
const [volume, setVolume] = useState16(1);
|
|
8491
|
+
const [showVolumeControl, setShowVolumeControl] = useState16(false);
|
|
8492
|
+
const [showSpeedMenu, setShowSpeedMenu] = useState16(false);
|
|
8493
|
+
const [playbackRate, setPlaybackRate] = useState16(1);
|
|
8229
8494
|
const audioRef = useRef10(null);
|
|
8230
8495
|
const volumeControlRef = useRef10(null);
|
|
8231
8496
|
const speedMenuRef = useRef10(null);
|
|
@@ -8295,14 +8560,14 @@ var CardAudio = forwardRef17(
|
|
|
8295
8560
|
};
|
|
8296
8561
|
const getVolumeIcon = () => {
|
|
8297
8562
|
if (volume === 0) {
|
|
8298
|
-
return /* @__PURE__ */
|
|
8563
|
+
return /* @__PURE__ */ jsx44(SpeakerSimpleX, { size: 24 });
|
|
8299
8564
|
}
|
|
8300
8565
|
if (volume < 0.5) {
|
|
8301
|
-
return /* @__PURE__ */
|
|
8566
|
+
return /* @__PURE__ */ jsx44(SpeakerLow, { size: 24 });
|
|
8302
8567
|
}
|
|
8303
|
-
return /* @__PURE__ */
|
|
8568
|
+
return /* @__PURE__ */ jsx44(SpeakerHigh, { size: 24 });
|
|
8304
8569
|
};
|
|
8305
|
-
|
|
8570
|
+
useEffect17(() => {
|
|
8306
8571
|
const handleClickOutside = (event) => {
|
|
8307
8572
|
if (volumeControlRef.current && !volumeControlRef.current.contains(event.target)) {
|
|
8308
8573
|
setShowVolumeControl(false);
|
|
@@ -8316,7 +8581,7 @@ var CardAudio = forwardRef17(
|
|
|
8316
8581
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
8317
8582
|
};
|
|
8318
8583
|
}, []);
|
|
8319
|
-
return /* @__PURE__ */
|
|
8584
|
+
return /* @__PURE__ */ jsxs32(
|
|
8320
8585
|
CardBase,
|
|
8321
8586
|
{
|
|
8322
8587
|
ref,
|
|
@@ -8329,7 +8594,7 @@ var CardAudio = forwardRef17(
|
|
|
8329
8594
|
),
|
|
8330
8595
|
...props,
|
|
8331
8596
|
children: [
|
|
8332
|
-
/* @__PURE__ */
|
|
8597
|
+
/* @__PURE__ */ jsx44(
|
|
8333
8598
|
"audio",
|
|
8334
8599
|
{
|
|
8335
8600
|
ref: audioRef,
|
|
@@ -8341,7 +8606,7 @@ var CardAudio = forwardRef17(
|
|
|
8341
8606
|
onEnded: handleEnded,
|
|
8342
8607
|
"data-testid": "audio-element",
|
|
8343
8608
|
"aria-label": title,
|
|
8344
|
-
children: tracks ? tracks.map((track) => /* @__PURE__ */
|
|
8609
|
+
children: tracks ? tracks.map((track) => /* @__PURE__ */ jsx44(
|
|
8345
8610
|
"track",
|
|
8346
8611
|
{
|
|
8347
8612
|
kind: track.kind,
|
|
@@ -8351,7 +8616,7 @@ var CardAudio = forwardRef17(
|
|
|
8351
8616
|
default: track.default
|
|
8352
8617
|
},
|
|
8353
8618
|
track.src
|
|
8354
|
-
)) : /* @__PURE__ */
|
|
8619
|
+
)) : /* @__PURE__ */ jsx44(
|
|
8355
8620
|
"track",
|
|
8356
8621
|
{
|
|
8357
8622
|
kind: "captions",
|
|
@@ -8362,7 +8627,7 @@ var CardAudio = forwardRef17(
|
|
|
8362
8627
|
)
|
|
8363
8628
|
}
|
|
8364
8629
|
),
|
|
8365
|
-
/* @__PURE__ */
|
|
8630
|
+
/* @__PURE__ */ jsx44(
|
|
8366
8631
|
"button",
|
|
8367
8632
|
{
|
|
8368
8633
|
type: "button",
|
|
@@ -8370,14 +8635,14 @@ var CardAudio = forwardRef17(
|
|
|
8370
8635
|
disabled: !src,
|
|
8371
8636
|
className: "cursor-pointer text-text-950 hover:text-primary-600 disabled:text-text-400 disabled:cursor-not-allowed",
|
|
8372
8637
|
"aria-label": isPlaying ? "Pausar" : "Reproduzir",
|
|
8373
|
-
children: isPlaying ? /* @__PURE__ */
|
|
8374
|
-
/* @__PURE__ */
|
|
8375
|
-
/* @__PURE__ */
|
|
8376
|
-
] }) }) : /* @__PURE__ */
|
|
8638
|
+
children: isPlaying ? /* @__PURE__ */ jsx44("div", { className: "w-6 h-6 flex items-center justify-center", children: /* @__PURE__ */ jsxs32("div", { className: "flex gap-0.5", children: [
|
|
8639
|
+
/* @__PURE__ */ jsx44("div", { className: "w-1 h-4 bg-current rounded-sm" }),
|
|
8640
|
+
/* @__PURE__ */ jsx44("div", { className: "w-1 h-4 bg-current rounded-sm" })
|
|
8641
|
+
] }) }) : /* @__PURE__ */ jsx44(Play, { size: 24 })
|
|
8377
8642
|
}
|
|
8378
8643
|
),
|
|
8379
|
-
/* @__PURE__ */
|
|
8380
|
-
/* @__PURE__ */
|
|
8644
|
+
/* @__PURE__ */ jsx44("p", { className: "text-text-800 text-md font-medium min-w-[2.5rem]", children: formatTime2(currentTime) }),
|
|
8645
|
+
/* @__PURE__ */ jsx44("div", { className: "flex-1 relative", "data-testid": "progress-bar", children: /* @__PURE__ */ jsx44(
|
|
8381
8646
|
"button",
|
|
8382
8647
|
{
|
|
8383
8648
|
type: "button",
|
|
@@ -8392,7 +8657,7 @@ var CardAudio = forwardRef17(
|
|
|
8392
8657
|
}
|
|
8393
8658
|
},
|
|
8394
8659
|
"aria-label": "Barra de progresso do \xE1udio",
|
|
8395
|
-
children: /* @__PURE__ */
|
|
8660
|
+
children: /* @__PURE__ */ jsx44(
|
|
8396
8661
|
"div",
|
|
8397
8662
|
{
|
|
8398
8663
|
className: "h-full bg-primary-600 rounded-full transition-all duration-100",
|
|
@@ -8403,19 +8668,19 @@ var CardAudio = forwardRef17(
|
|
|
8403
8668
|
)
|
|
8404
8669
|
}
|
|
8405
8670
|
) }),
|
|
8406
|
-
/* @__PURE__ */
|
|
8407
|
-
/* @__PURE__ */
|
|
8408
|
-
/* @__PURE__ */
|
|
8671
|
+
/* @__PURE__ */ jsx44("p", { className: "text-text-800 text-md font-medium min-w-[2.5rem]", children: formatTime2(duration) }),
|
|
8672
|
+
/* @__PURE__ */ jsxs32("div", { className: "relative h-6", ref: volumeControlRef, children: [
|
|
8673
|
+
/* @__PURE__ */ jsx44(
|
|
8409
8674
|
"button",
|
|
8410
8675
|
{
|
|
8411
8676
|
type: "button",
|
|
8412
8677
|
onClick: toggleVolumeControl,
|
|
8413
8678
|
className: "cursor-pointer text-text-950 hover:text-primary-600",
|
|
8414
8679
|
"aria-label": "Controle de volume",
|
|
8415
|
-
children: /* @__PURE__ */
|
|
8680
|
+
children: /* @__PURE__ */ jsx44("div", { className: "w-6 h-6 flex items-center justify-center", children: getVolumeIcon() })
|
|
8416
8681
|
}
|
|
8417
8682
|
),
|
|
8418
|
-
showVolumeControl && /* @__PURE__ */
|
|
8683
|
+
showVolumeControl && /* @__PURE__ */ jsx44(
|
|
8419
8684
|
"button",
|
|
8420
8685
|
{
|
|
8421
8686
|
type: "button",
|
|
@@ -8425,7 +8690,7 @@ var CardAudio = forwardRef17(
|
|
|
8425
8690
|
setShowVolumeControl(false);
|
|
8426
8691
|
}
|
|
8427
8692
|
},
|
|
8428
|
-
children: /* @__PURE__ */
|
|
8693
|
+
children: /* @__PURE__ */ jsx44(
|
|
8429
8694
|
"input",
|
|
8430
8695
|
{
|
|
8431
8696
|
type: "range",
|
|
@@ -8466,22 +8731,22 @@ var CardAudio = forwardRef17(
|
|
|
8466
8731
|
}
|
|
8467
8732
|
)
|
|
8468
8733
|
] }),
|
|
8469
|
-
/* @__PURE__ */
|
|
8470
|
-
/* @__PURE__ */
|
|
8734
|
+
/* @__PURE__ */ jsxs32("div", { className: "relative h-6", ref: speedMenuRef, children: [
|
|
8735
|
+
/* @__PURE__ */ jsx44(
|
|
8471
8736
|
"button",
|
|
8472
8737
|
{
|
|
8473
8738
|
type: "button",
|
|
8474
8739
|
onClick: toggleSpeedMenu,
|
|
8475
8740
|
className: "cursor-pointer text-text-950 hover:text-primary-600",
|
|
8476
8741
|
"aria-label": "Op\xE7\xF5es de velocidade",
|
|
8477
|
-
children: /* @__PURE__ */
|
|
8742
|
+
children: /* @__PURE__ */ jsx44(DotsThreeVertical2, { size: 24 })
|
|
8478
8743
|
}
|
|
8479
8744
|
),
|
|
8480
|
-
showSpeedMenu && /* @__PURE__ */
|
|
8745
|
+
showSpeedMenu && /* @__PURE__ */ jsx44("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__ */ jsx44("div", { className: "flex flex-col gap-1", children: [
|
|
8481
8746
|
{ speed: 1, label: "1x" },
|
|
8482
8747
|
{ speed: 1.5, label: "1.5x" },
|
|
8483
8748
|
{ speed: 2, label: "2x" }
|
|
8484
|
-
].map(({ speed, label }) => /* @__PURE__ */
|
|
8749
|
+
].map(({ speed, label }) => /* @__PURE__ */ jsx44(
|
|
8485
8750
|
"button",
|
|
8486
8751
|
{
|
|
8487
8752
|
type: "button",
|
|
@@ -8509,7 +8774,7 @@ var SIMULADO_BACKGROUND_CLASSES = {
|
|
|
8509
8774
|
var CardSimulado = forwardRef17(
|
|
8510
8775
|
({ title, duration, info, backgroundColor, className, ...props }, ref) => {
|
|
8511
8776
|
const backgroundClass = SIMULADO_BACKGROUND_CLASSES[backgroundColor];
|
|
8512
|
-
return /* @__PURE__ */
|
|
8777
|
+
return /* @__PURE__ */ jsx44(
|
|
8513
8778
|
CardBase,
|
|
8514
8779
|
{
|
|
8515
8780
|
ref,
|
|
@@ -8522,18 +8787,18 @@ var CardSimulado = forwardRef17(
|
|
|
8522
8787
|
className
|
|
8523
8788
|
),
|
|
8524
8789
|
...props,
|
|
8525
|
-
children: /* @__PURE__ */
|
|
8526
|
-
/* @__PURE__ */
|
|
8527
|
-
/* @__PURE__ */
|
|
8528
|
-
/* @__PURE__ */
|
|
8529
|
-
duration && /* @__PURE__ */
|
|
8530
|
-
/* @__PURE__ */
|
|
8531
|
-
/* @__PURE__ */
|
|
8790
|
+
children: /* @__PURE__ */ jsxs32("div", { className: "flex justify-between items-center w-full gap-4", children: [
|
|
8791
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-1 flex-1 min-w-0", children: [
|
|
8792
|
+
/* @__PURE__ */ jsx44(Text_default, { size: "lg", weight: "bold", className: "text-text-950 truncate", children: title }),
|
|
8793
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-4 text-text-700", children: [
|
|
8794
|
+
duration && /* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-1", children: [
|
|
8795
|
+
/* @__PURE__ */ jsx44(Clock, { size: 16, className: "flex-shrink-0" }),
|
|
8796
|
+
/* @__PURE__ */ jsx44(Text_default, { size: "sm", children: duration })
|
|
8532
8797
|
] }),
|
|
8533
|
-
/* @__PURE__ */
|
|
8798
|
+
/* @__PURE__ */ jsx44(Text_default, { size: "sm", className: "truncate", children: info })
|
|
8534
8799
|
] })
|
|
8535
8800
|
] }),
|
|
8536
|
-
/* @__PURE__ */
|
|
8801
|
+
/* @__PURE__ */ jsx44(
|
|
8537
8802
|
CaretRight3,
|
|
8538
8803
|
{
|
|
8539
8804
|
size: 24,
|
|
@@ -8578,7 +8843,7 @@ var CardTest = forwardRef17(
|
|
|
8578
8843
|
const interactiveClasses = isSelectable ? "cursor-pointer focus:outline-none focus:ring-2 focus:ring-primary-950 focus:ring-offset-2" : "";
|
|
8579
8844
|
const selectedClasses = selected ? "ring-2 ring-primary-950 ring-offset-2" : "";
|
|
8580
8845
|
if (isSelectable) {
|
|
8581
|
-
return /* @__PURE__ */
|
|
8846
|
+
return /* @__PURE__ */ jsx44(
|
|
8582
8847
|
"button",
|
|
8583
8848
|
{
|
|
8584
8849
|
ref,
|
|
@@ -8590,8 +8855,8 @@ var CardTest = forwardRef17(
|
|
|
8590
8855
|
onKeyDown: handleKeyDown,
|
|
8591
8856
|
"aria-pressed": selected,
|
|
8592
8857
|
...props,
|
|
8593
|
-
children: /* @__PURE__ */
|
|
8594
|
-
/* @__PURE__ */
|
|
8858
|
+
children: /* @__PURE__ */ jsxs32("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
|
|
8859
|
+
/* @__PURE__ */ jsx44(
|
|
8595
8860
|
Text_default,
|
|
8596
8861
|
{
|
|
8597
8862
|
size: "md",
|
|
@@ -8600,10 +8865,10 @@ var CardTest = forwardRef17(
|
|
|
8600
8865
|
children: title
|
|
8601
8866
|
}
|
|
8602
8867
|
),
|
|
8603
|
-
/* @__PURE__ */
|
|
8604
|
-
duration && /* @__PURE__ */
|
|
8605
|
-
/* @__PURE__ */
|
|
8606
|
-
/* @__PURE__ */
|
|
8868
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
|
|
8869
|
+
duration && /* @__PURE__ */ jsxs32("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
|
|
8870
|
+
/* @__PURE__ */ jsx44(Clock, { size: 16, className: "text-text-700" }),
|
|
8871
|
+
/* @__PURE__ */ jsx44(
|
|
8607
8872
|
Text_default,
|
|
8608
8873
|
{
|
|
8609
8874
|
size: "sm",
|
|
@@ -8612,7 +8877,7 @@ var CardTest = forwardRef17(
|
|
|
8612
8877
|
}
|
|
8613
8878
|
)
|
|
8614
8879
|
] }),
|
|
8615
|
-
/* @__PURE__ */
|
|
8880
|
+
/* @__PURE__ */ jsx44(
|
|
8616
8881
|
Text_default,
|
|
8617
8882
|
{
|
|
8618
8883
|
size: "sm",
|
|
@@ -8625,14 +8890,14 @@ var CardTest = forwardRef17(
|
|
|
8625
8890
|
}
|
|
8626
8891
|
);
|
|
8627
8892
|
}
|
|
8628
|
-
return /* @__PURE__ */
|
|
8893
|
+
return /* @__PURE__ */ jsx44(
|
|
8629
8894
|
"div",
|
|
8630
8895
|
{
|
|
8631
8896
|
ref,
|
|
8632
8897
|
className: cn(`${baseClasses} ${className}`.trim()),
|
|
8633
8898
|
...props,
|
|
8634
|
-
children: /* @__PURE__ */
|
|
8635
|
-
/* @__PURE__ */
|
|
8899
|
+
children: /* @__PURE__ */ jsxs32("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
|
|
8900
|
+
/* @__PURE__ */ jsx44(
|
|
8636
8901
|
Text_default,
|
|
8637
8902
|
{
|
|
8638
8903
|
size: "md",
|
|
@@ -8641,10 +8906,10 @@ var CardTest = forwardRef17(
|
|
|
8641
8906
|
children: title
|
|
8642
8907
|
}
|
|
8643
8908
|
),
|
|
8644
|
-
/* @__PURE__ */
|
|
8645
|
-
duration && /* @__PURE__ */
|
|
8646
|
-
/* @__PURE__ */
|
|
8647
|
-
/* @__PURE__ */
|
|
8909
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
|
|
8910
|
+
duration && /* @__PURE__ */ jsxs32("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
|
|
8911
|
+
/* @__PURE__ */ jsx44(Clock, { size: 16, className: "text-text-700" }),
|
|
8912
|
+
/* @__PURE__ */ jsx44(
|
|
8648
8913
|
Text_default,
|
|
8649
8914
|
{
|
|
8650
8915
|
size: "sm",
|
|
@@ -8653,7 +8918,7 @@ var CardTest = forwardRef17(
|
|
|
8653
8918
|
}
|
|
8654
8919
|
)
|
|
8655
8920
|
] }),
|
|
8656
|
-
/* @__PURE__ */
|
|
8921
|
+
/* @__PURE__ */ jsx44(
|
|
8657
8922
|
Text_default,
|
|
8658
8923
|
{
|
|
8659
8924
|
size: "sm",
|
|
@@ -8690,14 +8955,14 @@ var SIMULATION_TYPE_STYLES = {
|
|
|
8690
8955
|
}
|
|
8691
8956
|
};
|
|
8692
8957
|
var CardSimulationHistory = forwardRef17(({ data, onSimulationClick, className, ...props }, ref) => {
|
|
8693
|
-
return /* @__PURE__ */
|
|
8958
|
+
return /* @__PURE__ */ jsx44(
|
|
8694
8959
|
"div",
|
|
8695
8960
|
{
|
|
8696
8961
|
ref,
|
|
8697
8962
|
className: cn("w-full max-w-[992px] h-auto", className),
|
|
8698
8963
|
...props,
|
|
8699
|
-
children: /* @__PURE__ */
|
|
8700
|
-
data.map((section, sectionIndex) => /* @__PURE__ */
|
|
8964
|
+
children: /* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-0", children: [
|
|
8965
|
+
data.map((section, sectionIndex) => /* @__PURE__ */ jsx44("div", { className: "flex flex-col", children: /* @__PURE__ */ jsxs32(
|
|
8701
8966
|
"div",
|
|
8702
8967
|
{
|
|
8703
8968
|
className: cn(
|
|
@@ -8705,7 +8970,7 @@ var CardSimulationHistory = forwardRef17(({ data, onSimulationClick, className,
|
|
|
8705
8970
|
sectionIndex === 0 ? "rounded-t-3xl" : ""
|
|
8706
8971
|
),
|
|
8707
8972
|
children: [
|
|
8708
|
-
/* @__PURE__ */
|
|
8973
|
+
/* @__PURE__ */ jsx44(
|
|
8709
8974
|
Text_default,
|
|
8710
8975
|
{
|
|
8711
8976
|
size: "xs",
|
|
@@ -8714,9 +8979,9 @@ var CardSimulationHistory = forwardRef17(({ data, onSimulationClick, className,
|
|
|
8714
8979
|
children: section.date
|
|
8715
8980
|
}
|
|
8716
8981
|
),
|
|
8717
|
-
/* @__PURE__ */
|
|
8982
|
+
/* @__PURE__ */ jsx44("div", { className: "flex flex-col gap-2 flex-1", children: section.simulations.map((simulation) => {
|
|
8718
8983
|
const typeStyles = SIMULATION_TYPE_STYLES[simulation.type];
|
|
8719
|
-
return /* @__PURE__ */
|
|
8984
|
+
return /* @__PURE__ */ jsx44(
|
|
8720
8985
|
CardBase,
|
|
8721
8986
|
{
|
|
8722
8987
|
layout: "horizontal",
|
|
@@ -8728,9 +8993,9 @@ var CardSimulationHistory = forwardRef17(({ data, onSimulationClick, className,
|
|
|
8728
8993
|
transition-shadow duration-200 h-auto min-h-[61px]`
|
|
8729
8994
|
),
|
|
8730
8995
|
onClick: () => onSimulationClick?.(simulation),
|
|
8731
|
-
children: /* @__PURE__ */
|
|
8732
|
-
/* @__PURE__ */
|
|
8733
|
-
/* @__PURE__ */
|
|
8996
|
+
children: /* @__PURE__ */ jsxs32("div", { className: "flex justify-between items-center w-full gap-2", children: [
|
|
8997
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-wrap flex-col justify-between sm:flex-row gap-2 flex-1 min-w-0", children: [
|
|
8998
|
+
/* @__PURE__ */ jsx44(
|
|
8734
8999
|
Text_default,
|
|
8735
9000
|
{
|
|
8736
9001
|
size: "lg",
|
|
@@ -8739,8 +9004,8 @@ var CardSimulationHistory = forwardRef17(({ data, onSimulationClick, className,
|
|
|
8739
9004
|
children: simulation.title
|
|
8740
9005
|
}
|
|
8741
9006
|
),
|
|
8742
|
-
/* @__PURE__ */
|
|
8743
|
-
/* @__PURE__ */
|
|
9007
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-2", children: [
|
|
9008
|
+
/* @__PURE__ */ jsx44(
|
|
8744
9009
|
Badge_default,
|
|
8745
9010
|
{
|
|
8746
9011
|
variant: "examsOutlined",
|
|
@@ -8749,10 +9014,10 @@ var CardSimulationHistory = forwardRef17(({ data, onSimulationClick, className,
|
|
|
8749
9014
|
children: typeStyles.text
|
|
8750
9015
|
}
|
|
8751
9016
|
),
|
|
8752
|
-
/* @__PURE__ */
|
|
9017
|
+
/* @__PURE__ */ jsx44(Text_default, { size: "sm", className: "text-text-800 truncate", children: simulation.info })
|
|
8753
9018
|
] })
|
|
8754
9019
|
] }),
|
|
8755
|
-
/* @__PURE__ */
|
|
9020
|
+
/* @__PURE__ */ jsx44(
|
|
8756
9021
|
CaretRight3,
|
|
8757
9022
|
{
|
|
8758
9023
|
size: 24,
|
|
@@ -8768,7 +9033,7 @@ var CardSimulationHistory = forwardRef17(({ data, onSimulationClick, className,
|
|
|
8768
9033
|
]
|
|
8769
9034
|
}
|
|
8770
9035
|
) }, section.date)),
|
|
8771
|
-
data.length > 0 && /* @__PURE__ */
|
|
9036
|
+
data.length > 0 && /* @__PURE__ */ jsx44("div", { className: "w-full h-6 bg-background rounded-b-3xl" })
|
|
8772
9037
|
] })
|
|
8773
9038
|
}
|
|
8774
9039
|
);
|
|
@@ -8776,7 +9041,7 @@ var CardSimulationHistory = forwardRef17(({ data, onSimulationClick, className,
|
|
|
8776
9041
|
|
|
8777
9042
|
// src/components/StatisticsCard/StatisticsCard.tsx
|
|
8778
9043
|
import { Plus } from "phosphor-react";
|
|
8779
|
-
import { jsx as
|
|
9044
|
+
import { jsx as jsx45, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
8780
9045
|
var VARIANT_STYLES = {
|
|
8781
9046
|
high: "bg-success-background",
|
|
8782
9047
|
medium: "bg-warning-background",
|
|
@@ -8790,12 +9055,12 @@ var VALUE_TEXT_COLORS = {
|
|
|
8790
9055
|
total: "text-info-700"
|
|
8791
9056
|
};
|
|
8792
9057
|
var StatCard = ({ item, showPlaceholder = false }) => {
|
|
8793
|
-
return /* @__PURE__ */
|
|
9058
|
+
return /* @__PURE__ */ jsxs33(
|
|
8794
9059
|
"div",
|
|
8795
9060
|
{
|
|
8796
9061
|
className: `rounded-xl py-[17px] px-6 min-h-[105px] flex flex-col justify-center items-start gap-1 ${VARIANT_STYLES[item.variant]}`,
|
|
8797
9062
|
children: [
|
|
8798
|
-
/* @__PURE__ */
|
|
9063
|
+
/* @__PURE__ */ jsx45(
|
|
8799
9064
|
Text_default,
|
|
8800
9065
|
{
|
|
8801
9066
|
size: "4xl",
|
|
@@ -8804,7 +9069,7 @@ var StatCard = ({ item, showPlaceholder = false }) => {
|
|
|
8804
9069
|
children: showPlaceholder ? "-" : item.value
|
|
8805
9070
|
}
|
|
8806
9071
|
),
|
|
8807
|
-
/* @__PURE__ */
|
|
9072
|
+
/* @__PURE__ */ jsx45(
|
|
8808
9073
|
Text_default,
|
|
8809
9074
|
{
|
|
8810
9075
|
size: "xs",
|
|
@@ -8839,13 +9104,13 @@ var StatisticsCard = ({
|
|
|
8839
9104
|
}) => {
|
|
8840
9105
|
const hasData = data && data.length > 0;
|
|
8841
9106
|
const gridColumnsClass = hasData ? getGridColumnsClass(data.length) : "";
|
|
8842
|
-
return /* @__PURE__ */
|
|
9107
|
+
return /* @__PURE__ */ jsxs33(
|
|
8843
9108
|
"div",
|
|
8844
9109
|
{
|
|
8845
9110
|
className: `bg-background rounded-xl p-4 h-auto lg:h-[185px] flex flex-col gap-2 ${className}`,
|
|
8846
9111
|
children: [
|
|
8847
|
-
/* @__PURE__ */
|
|
8848
|
-
/* @__PURE__ */
|
|
9112
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex flex-row justify-between items-center gap-4", children: [
|
|
9113
|
+
/* @__PURE__ */ jsx45(
|
|
8849
9114
|
Text_default,
|
|
8850
9115
|
{
|
|
8851
9116
|
as: "h3",
|
|
@@ -8856,22 +9121,22 @@ var StatisticsCard = ({
|
|
|
8856
9121
|
children: title
|
|
8857
9122
|
}
|
|
8858
9123
|
),
|
|
8859
|
-
dropdownOptions && dropdownOptions.length > 0 && /* @__PURE__ */
|
|
9124
|
+
dropdownOptions && dropdownOptions.length > 0 && /* @__PURE__ */ jsx45("div", { className: "w-[120px] min-w-[90px] sm:shrink-0", children: /* @__PURE__ */ jsxs33(
|
|
8860
9125
|
Select_default,
|
|
8861
9126
|
{
|
|
8862
9127
|
value: selectedDropdownValue,
|
|
8863
9128
|
onValueChange: onDropdownChange,
|
|
8864
9129
|
size: "medium",
|
|
8865
9130
|
children: [
|
|
8866
|
-
/* @__PURE__ */
|
|
9131
|
+
/* @__PURE__ */ jsx45(
|
|
8867
9132
|
SelectTrigger,
|
|
8868
9133
|
{
|
|
8869
9134
|
className: "border border-border-300 rounded [&>span]:whitespace-nowrap [&>span]:overflow-hidden [&>span]:text-ellipsis",
|
|
8870
9135
|
"aria-label": dropdownAriaLabel,
|
|
8871
|
-
children: /* @__PURE__ */
|
|
9136
|
+
children: /* @__PURE__ */ jsx45(SelectValue, { placeholder: selectPlaceholder })
|
|
8872
9137
|
}
|
|
8873
9138
|
),
|
|
8874
|
-
/* @__PURE__ */
|
|
9139
|
+
/* @__PURE__ */ jsx45(SelectContent, { className: "min-w-[120px]", children: dropdownOptions.map((option) => /* @__PURE__ */ jsx45(
|
|
8875
9140
|
SelectItem,
|
|
8876
9141
|
{
|
|
8877
9142
|
value: option.value,
|
|
@@ -8884,11 +9149,11 @@ var StatisticsCard = ({
|
|
|
8884
9149
|
}
|
|
8885
9150
|
) })
|
|
8886
9151
|
] }),
|
|
8887
|
-
hasData ? /* @__PURE__ */
|
|
9152
|
+
hasData ? /* @__PURE__ */ jsx45(
|
|
8888
9153
|
"div",
|
|
8889
9154
|
{
|
|
8890
9155
|
className: `grid grid-cols-1 sm:grid-cols-2 gap-[13px] ${gridColumnsClass}`,
|
|
8891
|
-
children: data.map((item, index) => /* @__PURE__ */
|
|
9156
|
+
children: data.map((item, index) => /* @__PURE__ */ jsx45(
|
|
8892
9157
|
StatCard,
|
|
8893
9158
|
{
|
|
8894
9159
|
item,
|
|
@@ -8897,8 +9162,8 @@ var StatisticsCard = ({
|
|
|
8897
9162
|
`${item.variant}-${item.label}-${index}`
|
|
8898
9163
|
))
|
|
8899
9164
|
}
|
|
8900
|
-
) : /* @__PURE__ */
|
|
8901
|
-
/* @__PURE__ */
|
|
9165
|
+
) : /* @__PURE__ */ jsxs33("div", { className: "border border-dashed border-border-300 rounded-lg p-6 min-h-[105px] flex flex-col items-center justify-center gap-2", children: [
|
|
9166
|
+
/* @__PURE__ */ jsx45(
|
|
8902
9167
|
Text_default,
|
|
8903
9168
|
{
|
|
8904
9169
|
size: "sm",
|
|
@@ -8907,14 +9172,14 @@ var StatisticsCard = ({
|
|
|
8907
9172
|
children: emptyStateMessage
|
|
8908
9173
|
}
|
|
8909
9174
|
),
|
|
8910
|
-
onEmptyStateButtonClick && /* @__PURE__ */
|
|
9175
|
+
onEmptyStateButtonClick && /* @__PURE__ */ jsx45(
|
|
8911
9176
|
Button_default,
|
|
8912
9177
|
{
|
|
8913
9178
|
variant: "outline",
|
|
8914
9179
|
action: "primary",
|
|
8915
9180
|
size: "small",
|
|
8916
9181
|
onClick: onEmptyStateButtonClick,
|
|
8917
|
-
iconLeft: /* @__PURE__ */
|
|
9182
|
+
iconLeft: /* @__PURE__ */ jsx45(Plus, { size: 16, weight: "bold" }),
|
|
8918
9183
|
children: emptyStateButtonText
|
|
8919
9184
|
}
|
|
8920
9185
|
)
|
|
@@ -8925,7 +9190,7 @@ var StatisticsCard = ({
|
|
|
8925
9190
|
};
|
|
8926
9191
|
|
|
8927
9192
|
// src/components/NotFound/NotFound.tsx
|
|
8928
|
-
import { jsx as
|
|
9193
|
+
import { jsx as jsx46, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
8929
9194
|
var NotFound = ({
|
|
8930
9195
|
title,
|
|
8931
9196
|
description,
|
|
@@ -8968,22 +9233,22 @@ var NotFound = ({
|
|
|
8968
9233
|
const errorTitle = title || getDefaultTitle();
|
|
8969
9234
|
const errorDescription = description || getDefaultDescription();
|
|
8970
9235
|
const errorCode = getErrorCode();
|
|
8971
|
-
return /* @__PURE__ */
|
|
9236
|
+
return /* @__PURE__ */ jsx46(
|
|
8972
9237
|
"div",
|
|
8973
9238
|
{
|
|
8974
9239
|
className: cn(
|
|
8975
9240
|
"flex flex-col w-full h-screen items-center justify-center bg-background-50 px-4",
|
|
8976
9241
|
className
|
|
8977
9242
|
),
|
|
8978
|
-
children: /* @__PURE__ */
|
|
9243
|
+
children: /* @__PURE__ */ jsx46(
|
|
8979
9244
|
"main",
|
|
8980
9245
|
{
|
|
8981
9246
|
role: "main",
|
|
8982
9247
|
"aria-labelledby": "error-title",
|
|
8983
9248
|
"aria-describedby": "error-description",
|
|
8984
9249
|
className: "flex flex-col items-center text-center max-w-md space-y-6",
|
|
8985
|
-
children: /* @__PURE__ */
|
|
8986
|
-
/* @__PURE__ */
|
|
9250
|
+
children: /* @__PURE__ */ jsxs34("section", { "aria-label": `Erro ${errorCode}`, children: [
|
|
9251
|
+
/* @__PURE__ */ jsx46(
|
|
8987
9252
|
"div",
|
|
8988
9253
|
{
|
|
8989
9254
|
className: "text-8xl font-bold text-primary-300 select-none",
|
|
@@ -8991,8 +9256,8 @@ var NotFound = ({
|
|
|
8991
9256
|
children: errorCode
|
|
8992
9257
|
}
|
|
8993
9258
|
),
|
|
8994
|
-
/* @__PURE__ */
|
|
8995
|
-
/* @__PURE__ */
|
|
9259
|
+
/* @__PURE__ */ jsxs34("header", { className: "space-y-2", children: [
|
|
9260
|
+
/* @__PURE__ */ jsx46(
|
|
8996
9261
|
Text_default,
|
|
8997
9262
|
{
|
|
8998
9263
|
size: "xl",
|
|
@@ -9003,9 +9268,9 @@ var NotFound = ({
|
|
|
9003
9268
|
children: errorTitle
|
|
9004
9269
|
}
|
|
9005
9270
|
),
|
|
9006
|
-
/* @__PURE__ */
|
|
9271
|
+
/* @__PURE__ */ jsx46(Text_default, { size: "md", className: "text-text-600", id: "error-description", children: errorDescription })
|
|
9007
9272
|
] }),
|
|
9008
|
-
onButtonClick && /* @__PURE__ */
|
|
9273
|
+
onButtonClick && /* @__PURE__ */ jsx46("nav", { "aria-label": "Navega\xE7\xE3o de erro", children: /* @__PURE__ */ jsx46(
|
|
9009
9274
|
Button_default,
|
|
9010
9275
|
{
|
|
9011
9276
|
onClick: handleButtonClick,
|
|
@@ -9025,12 +9290,41 @@ var NotFound = ({
|
|
|
9025
9290
|
};
|
|
9026
9291
|
var NotFound_default = NotFound;
|
|
9027
9292
|
|
|
9293
|
+
// src/components/NoSearchResult/NoSearchResult.tsx
|
|
9294
|
+
import { jsx as jsx47, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
9295
|
+
var NoSearchResult = ({ image, title, description }) => {
|
|
9296
|
+
const displayTitle = title || "Nenhum resultado encontrado";
|
|
9297
|
+
const displayDescription = description || "N\xE3o encontramos nenhum resultado com esse nome. Tente revisar a busca ou usar outra palavra-chave.";
|
|
9298
|
+
return /* @__PURE__ */ jsxs35("div", { className: "flex flex-row justify-center items-center gap-8 w-full max-w-4xl min-h-96", children: [
|
|
9299
|
+
/* @__PURE__ */ jsx47("div", { className: "w-72 h-72 flex-shrink-0 relative", children: /* @__PURE__ */ jsx47(
|
|
9300
|
+
"img",
|
|
9301
|
+
{
|
|
9302
|
+
src: image,
|
|
9303
|
+
alt: "No search results",
|
|
9304
|
+
className: "w-full h-full object-contain"
|
|
9305
|
+
}
|
|
9306
|
+
) }),
|
|
9307
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex flex-col items-start w-full max-w-md", children: [
|
|
9308
|
+
/* @__PURE__ */ jsx47("div", { className: "flex flex-row justify-between items-end px-6 pt-6 pb-4 w-full rounded-t-xl", children: /* @__PURE__ */ jsx47(
|
|
9309
|
+
Text_default,
|
|
9310
|
+
{
|
|
9311
|
+
as: "h2",
|
|
9312
|
+
className: "text-text-950 font-semibold text-3xl leading-tight w-full flex items-center",
|
|
9313
|
+
children: displayTitle
|
|
9314
|
+
}
|
|
9315
|
+
) }),
|
|
9316
|
+
/* @__PURE__ */ jsx47("div", { className: "flex flex-row justify-center items-center px-6 gap-2 w-full", children: /* @__PURE__ */ jsx47(Text_default, { className: "text-text-600 font-normal text-lg leading-relaxed w-full text-justify", children: displayDescription }) })
|
|
9317
|
+
] })
|
|
9318
|
+
] });
|
|
9319
|
+
};
|
|
9320
|
+
var NoSearchResult_default = NoSearchResult;
|
|
9321
|
+
|
|
9028
9322
|
// src/components/VideoPlayer/VideoPlayer.tsx
|
|
9029
9323
|
import {
|
|
9030
9324
|
useRef as useRef11,
|
|
9031
|
-
useState as
|
|
9032
|
-
useEffect as
|
|
9033
|
-
useCallback as
|
|
9325
|
+
useState as useState18,
|
|
9326
|
+
useEffect as useEffect18,
|
|
9327
|
+
useCallback as useCallback4
|
|
9034
9328
|
} from "react";
|
|
9035
9329
|
import { createPortal } from "react-dom";
|
|
9036
9330
|
import {
|
|
@@ -9045,9 +9339,9 @@ import {
|
|
|
9045
9339
|
} from "phosphor-react";
|
|
9046
9340
|
|
|
9047
9341
|
// src/components/DownloadButton/DownloadButton.tsx
|
|
9048
|
-
import { useCallback as
|
|
9342
|
+
import { useCallback as useCallback3, useState as useState17 } from "react";
|
|
9049
9343
|
import { DownloadSimple } from "phosphor-react";
|
|
9050
|
-
import { jsx as
|
|
9344
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
9051
9345
|
var getMimeType = (url) => {
|
|
9052
9346
|
const extension = getFileExtension(url);
|
|
9053
9347
|
const mimeTypes = {
|
|
@@ -9122,13 +9416,13 @@ var DownloadButton = ({
|
|
|
9122
9416
|
lessonTitle = "aula",
|
|
9123
9417
|
disabled = false
|
|
9124
9418
|
}) => {
|
|
9125
|
-
const [isDownloading, setIsDownloading] =
|
|
9126
|
-
const isValidUrl =
|
|
9419
|
+
const [isDownloading, setIsDownloading] = useState17(false);
|
|
9420
|
+
const isValidUrl = useCallback3((url) => {
|
|
9127
9421
|
return Boolean(
|
|
9128
9422
|
url && url.trim() !== "" && url !== "undefined" && url !== "null"
|
|
9129
9423
|
);
|
|
9130
9424
|
}, []);
|
|
9131
|
-
const getAvailableContent =
|
|
9425
|
+
const getAvailableContent = useCallback3(() => {
|
|
9132
9426
|
const downloads = [];
|
|
9133
9427
|
if (isValidUrl(content.urlDoc)) {
|
|
9134
9428
|
downloads.push({
|
|
@@ -9163,7 +9457,7 @@ var DownloadButton = ({
|
|
|
9163
9457
|
}
|
|
9164
9458
|
return downloads;
|
|
9165
9459
|
}, [content, isValidUrl]);
|
|
9166
|
-
const handleDownload =
|
|
9460
|
+
const handleDownload = useCallback3(async () => {
|
|
9167
9461
|
if (disabled || isDownloading) return;
|
|
9168
9462
|
const availableContent = getAvailableContent();
|
|
9169
9463
|
if (availableContent.length === 0) {
|
|
@@ -9204,10 +9498,10 @@ var DownloadButton = ({
|
|
|
9204
9498
|
if (!hasContent) {
|
|
9205
9499
|
return null;
|
|
9206
9500
|
}
|
|
9207
|
-
return /* @__PURE__ */
|
|
9501
|
+
return /* @__PURE__ */ jsx48("div", { className: cn("flex items-center", className), children: /* @__PURE__ */ jsx48(
|
|
9208
9502
|
IconButton_default,
|
|
9209
9503
|
{
|
|
9210
|
-
icon: /* @__PURE__ */
|
|
9504
|
+
icon: /* @__PURE__ */ jsx48(DownloadSimple, { size: 24 }),
|
|
9211
9505
|
onClick: handleDownload,
|
|
9212
9506
|
disabled: disabled || isDownloading,
|
|
9213
9507
|
"aria-label": (() => {
|
|
@@ -9228,7 +9522,7 @@ var DownloadButton = ({
|
|
|
9228
9522
|
var DownloadButton_default = DownloadButton;
|
|
9229
9523
|
|
|
9230
9524
|
// src/components/VideoPlayer/VideoPlayer.tsx
|
|
9231
|
-
import { jsx as
|
|
9525
|
+
import { jsx as jsx49, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
9232
9526
|
var CONTROLS_HIDE_TIMEOUT = 3e3;
|
|
9233
9527
|
var LEAVE_HIDE_TIMEOUT = 1e3;
|
|
9234
9528
|
var INIT_DELAY = 100;
|
|
@@ -9244,7 +9538,7 @@ var ProgressBar2 = ({
|
|
|
9244
9538
|
progressPercentage,
|
|
9245
9539
|
onSeek,
|
|
9246
9540
|
className = "px-4 pb-2"
|
|
9247
|
-
}) => /* @__PURE__ */
|
|
9541
|
+
}) => /* @__PURE__ */ jsx49("div", { className, children: /* @__PURE__ */ jsx49(
|
|
9248
9542
|
"input",
|
|
9249
9543
|
{
|
|
9250
9544
|
type: "range",
|
|
@@ -9266,17 +9560,17 @@ var VolumeControls = ({
|
|
|
9266
9560
|
onToggleMute,
|
|
9267
9561
|
iconSize = 24,
|
|
9268
9562
|
showSlider = true
|
|
9269
|
-
}) => /* @__PURE__ */
|
|
9270
|
-
/* @__PURE__ */
|
|
9563
|
+
}) => /* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-2", children: [
|
|
9564
|
+
/* @__PURE__ */ jsx49(
|
|
9271
9565
|
IconButton_default,
|
|
9272
9566
|
{
|
|
9273
|
-
icon: isMuted ? /* @__PURE__ */
|
|
9567
|
+
icon: isMuted ? /* @__PURE__ */ jsx49(SpeakerSlash, { size: iconSize }) : /* @__PURE__ */ jsx49(SpeakerHigh2, { size: iconSize }),
|
|
9274
9568
|
onClick: onToggleMute,
|
|
9275
9569
|
"aria-label": isMuted ? "Unmute" : "Mute",
|
|
9276
9570
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
9277
9571
|
}
|
|
9278
9572
|
),
|
|
9279
|
-
showSlider && /* @__PURE__ */
|
|
9573
|
+
showSlider && /* @__PURE__ */ jsx49(
|
|
9280
9574
|
"input",
|
|
9281
9575
|
{
|
|
9282
9576
|
type: "range",
|
|
@@ -9317,7 +9611,7 @@ var SpeedMenu = ({
|
|
|
9317
9611
|
};
|
|
9318
9612
|
};
|
|
9319
9613
|
const position = getMenuPosition();
|
|
9320
|
-
|
|
9614
|
+
useEffect18(() => {
|
|
9321
9615
|
const handleClickOutside = (event) => {
|
|
9322
9616
|
const target = event.target;
|
|
9323
9617
|
const isOutsideContainer = speedMenuContainerRef.current && !speedMenuContainerRef.current.contains(target);
|
|
@@ -9333,7 +9627,7 @@ var SpeedMenu = ({
|
|
|
9333
9627
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
9334
9628
|
};
|
|
9335
9629
|
}, [showSpeedMenu, onToggleMenu]);
|
|
9336
|
-
const menuContent = /* @__PURE__ */
|
|
9630
|
+
const menuContent = /* @__PURE__ */ jsx49(
|
|
9337
9631
|
"div",
|
|
9338
9632
|
{
|
|
9339
9633
|
ref: speedMenuRef,
|
|
@@ -9344,7 +9638,7 @@ var SpeedMenu = ({
|
|
|
9344
9638
|
top: `${position.top}px`,
|
|
9345
9639
|
left: `${position.left}px`
|
|
9346
9640
|
},
|
|
9347
|
-
children: [0.5, 0.75, 1, 1.25, 1.5, 2].map((speed) => /* @__PURE__ */
|
|
9641
|
+
children: [0.5, 0.75, 1, 1.25, 1.5, 2].map((speed) => /* @__PURE__ */ jsxs36(
|
|
9348
9642
|
"button",
|
|
9349
9643
|
{
|
|
9350
9644
|
role: "menuitemradio",
|
|
@@ -9361,12 +9655,12 @@ var SpeedMenu = ({
|
|
|
9361
9655
|
}
|
|
9362
9656
|
);
|
|
9363
9657
|
const portalContent = showSpeedMenu && globalThis.window !== void 0 && globalThis.document !== void 0 && !!globalThis.document?.body ? createPortal(menuContent, globalThis.document.body) : null;
|
|
9364
|
-
return /* @__PURE__ */
|
|
9365
|
-
/* @__PURE__ */
|
|
9658
|
+
return /* @__PURE__ */ jsxs36("div", { className: "relative", ref: speedMenuContainerRef, children: [
|
|
9659
|
+
/* @__PURE__ */ jsx49(
|
|
9366
9660
|
IconButton_default,
|
|
9367
9661
|
{
|
|
9368
9662
|
ref: buttonRef,
|
|
9369
|
-
icon: /* @__PURE__ */
|
|
9663
|
+
icon: /* @__PURE__ */ jsx49(DotsThreeVertical3, { size: iconSize }),
|
|
9370
9664
|
onClick: onToggleMenu,
|
|
9371
9665
|
"aria-label": "Playback speed",
|
|
9372
9666
|
"aria-haspopup": "menu",
|
|
@@ -9398,26 +9692,26 @@ var VideoPlayer = ({
|
|
|
9398
9692
|
}) => {
|
|
9399
9693
|
const videoRef = useRef11(null);
|
|
9400
9694
|
const { isUltraSmallMobile, isTinyMobile } = useMobile();
|
|
9401
|
-
const [isPlaying, setIsPlaying] =
|
|
9402
|
-
const [currentTime, setCurrentTime] =
|
|
9403
|
-
const [duration, setDuration] =
|
|
9404
|
-
const [isMuted, setIsMuted] =
|
|
9405
|
-
const [volume, setVolume] =
|
|
9406
|
-
const [isFullscreen, setIsFullscreen] =
|
|
9407
|
-
const [showControls, setShowControls] =
|
|
9408
|
-
const [hasCompleted, setHasCompleted] =
|
|
9409
|
-
const [showCaptions, setShowCaptions] =
|
|
9410
|
-
const [subtitlesValidation, setSubtitlesValidation] =
|
|
9411
|
-
|
|
9695
|
+
const [isPlaying, setIsPlaying] = useState18(false);
|
|
9696
|
+
const [currentTime, setCurrentTime] = useState18(0);
|
|
9697
|
+
const [duration, setDuration] = useState18(0);
|
|
9698
|
+
const [isMuted, setIsMuted] = useState18(false);
|
|
9699
|
+
const [volume, setVolume] = useState18(1);
|
|
9700
|
+
const [isFullscreen, setIsFullscreen] = useState18(false);
|
|
9701
|
+
const [showControls, setShowControls] = useState18(true);
|
|
9702
|
+
const [hasCompleted, setHasCompleted] = useState18(false);
|
|
9703
|
+
const [showCaptions, setShowCaptions] = useState18(false);
|
|
9704
|
+
const [subtitlesValidation, setSubtitlesValidation] = useState18("idle");
|
|
9705
|
+
useEffect18(() => {
|
|
9412
9706
|
setHasCompleted(false);
|
|
9413
9707
|
}, [src]);
|
|
9414
|
-
const [playbackRate, setPlaybackRate] =
|
|
9415
|
-
const [showSpeedMenu, setShowSpeedMenu] =
|
|
9708
|
+
const [playbackRate, setPlaybackRate] = useState18(1);
|
|
9709
|
+
const [showSpeedMenu, setShowSpeedMenu] = useState18(false);
|
|
9416
9710
|
const lastSaveTimeRef = useRef11(0);
|
|
9417
9711
|
const trackRef = useRef11(null);
|
|
9418
9712
|
const controlsTimeoutRef = useRef11(null);
|
|
9419
9713
|
const lastMousePositionRef = useRef11({ x: 0, y: 0 });
|
|
9420
|
-
const isUserInteracting =
|
|
9714
|
+
const isUserInteracting = useCallback4(() => {
|
|
9421
9715
|
if (showSpeedMenu) {
|
|
9422
9716
|
return true;
|
|
9423
9717
|
}
|
|
@@ -9434,13 +9728,13 @@ var VideoPlayer = ({
|
|
|
9434
9728
|
}
|
|
9435
9729
|
return false;
|
|
9436
9730
|
}, [showSpeedMenu]);
|
|
9437
|
-
const clearControlsTimeout =
|
|
9731
|
+
const clearControlsTimeout = useCallback4(() => {
|
|
9438
9732
|
if (controlsTimeoutRef.current) {
|
|
9439
9733
|
clearTimeout(controlsTimeoutRef.current);
|
|
9440
9734
|
controlsTimeoutRef.current = null;
|
|
9441
9735
|
}
|
|
9442
9736
|
}, []);
|
|
9443
|
-
const showControlsWithTimer =
|
|
9737
|
+
const showControlsWithTimer = useCallback4(() => {
|
|
9444
9738
|
setShowControls(true);
|
|
9445
9739
|
clearControlsTimeout();
|
|
9446
9740
|
if (isFullscreen) {
|
|
@@ -9455,7 +9749,7 @@ var VideoPlayer = ({
|
|
|
9455
9749
|
}, CONTROLS_HIDE_TIMEOUT);
|
|
9456
9750
|
}
|
|
9457
9751
|
}, [isFullscreen, isPlaying, clearControlsTimeout]);
|
|
9458
|
-
const handleMouseMove =
|
|
9752
|
+
const handleMouseMove = useCallback4(
|
|
9459
9753
|
(event) => {
|
|
9460
9754
|
const currentX = event.clientX;
|
|
9461
9755
|
const currentY = event.clientY;
|
|
@@ -9468,10 +9762,10 @@ var VideoPlayer = ({
|
|
|
9468
9762
|
},
|
|
9469
9763
|
[showControlsWithTimer]
|
|
9470
9764
|
);
|
|
9471
|
-
const handleMouseEnter =
|
|
9765
|
+
const handleMouseEnter = useCallback4(() => {
|
|
9472
9766
|
showControlsWithTimer();
|
|
9473
9767
|
}, [showControlsWithTimer]);
|
|
9474
|
-
const handleMouseLeave =
|
|
9768
|
+
const handleMouseLeave = useCallback4(() => {
|
|
9475
9769
|
const userInteracting = isUserInteracting();
|
|
9476
9770
|
clearControlsTimeout();
|
|
9477
9771
|
if (!isFullscreen && !userInteracting) {
|
|
@@ -9480,13 +9774,13 @@ var VideoPlayer = ({
|
|
|
9480
9774
|
}, LEAVE_HIDE_TIMEOUT);
|
|
9481
9775
|
}
|
|
9482
9776
|
}, [isFullscreen, clearControlsTimeout, isUserInteracting]);
|
|
9483
|
-
|
|
9777
|
+
useEffect18(() => {
|
|
9484
9778
|
if (videoRef.current) {
|
|
9485
9779
|
videoRef.current.volume = volume;
|
|
9486
9780
|
videoRef.current.muted = isMuted;
|
|
9487
9781
|
}
|
|
9488
9782
|
}, [volume, isMuted]);
|
|
9489
|
-
|
|
9783
|
+
useEffect18(() => {
|
|
9490
9784
|
const video = videoRef.current;
|
|
9491
9785
|
if (!video) return;
|
|
9492
9786
|
const onPlay = () => setIsPlaying(true);
|
|
@@ -9501,13 +9795,13 @@ var VideoPlayer = ({
|
|
|
9501
9795
|
video.removeEventListener("ended", onEnded);
|
|
9502
9796
|
};
|
|
9503
9797
|
}, []);
|
|
9504
|
-
|
|
9798
|
+
useEffect18(() => {
|
|
9505
9799
|
const video = videoRef.current;
|
|
9506
9800
|
if (!video) return;
|
|
9507
9801
|
video.setAttribute("playsinline", "");
|
|
9508
9802
|
video.setAttribute("webkit-playsinline", "");
|
|
9509
9803
|
}, []);
|
|
9510
|
-
|
|
9804
|
+
useEffect18(() => {
|
|
9511
9805
|
if (isPlaying) {
|
|
9512
9806
|
showControlsWithTimer();
|
|
9513
9807
|
} else {
|
|
@@ -9519,7 +9813,7 @@ var VideoPlayer = ({
|
|
|
9519
9813
|
}
|
|
9520
9814
|
}
|
|
9521
9815
|
}, [isPlaying, isFullscreen, showControlsWithTimer, clearControlsTimeout]);
|
|
9522
|
-
|
|
9816
|
+
useEffect18(() => {
|
|
9523
9817
|
const video = videoRef.current;
|
|
9524
9818
|
if (!video) return;
|
|
9525
9819
|
const handleFullscreenChange = () => {
|
|
@@ -9554,7 +9848,7 @@ var VideoPlayer = ({
|
|
|
9554
9848
|
);
|
|
9555
9849
|
};
|
|
9556
9850
|
}, [showControlsWithTimer]);
|
|
9557
|
-
|
|
9851
|
+
useEffect18(() => {
|
|
9558
9852
|
const init = () => {
|
|
9559
9853
|
if (!isFullscreen) {
|
|
9560
9854
|
showControlsWithTimer();
|
|
@@ -9576,7 +9870,7 @@ var VideoPlayer = ({
|
|
|
9576
9870
|
};
|
|
9577
9871
|
}
|
|
9578
9872
|
}, []);
|
|
9579
|
-
const getInitialTime =
|
|
9873
|
+
const getInitialTime = useCallback4(() => {
|
|
9580
9874
|
if (!autoSave || !storageKey) {
|
|
9581
9875
|
return Number.isFinite(initialTime) && initialTime >= 0 ? initialTime : void 0;
|
|
9582
9876
|
}
|
|
@@ -9589,14 +9883,14 @@ var VideoPlayer = ({
|
|
|
9589
9883
|
if (hasValidSaved) return saved;
|
|
9590
9884
|
return void 0;
|
|
9591
9885
|
}, [autoSave, storageKey, src, initialTime]);
|
|
9592
|
-
|
|
9886
|
+
useEffect18(() => {
|
|
9593
9887
|
const start = getInitialTime();
|
|
9594
9888
|
if (start !== void 0 && videoRef.current) {
|
|
9595
9889
|
videoRef.current.currentTime = start;
|
|
9596
9890
|
setCurrentTime(start);
|
|
9597
9891
|
}
|
|
9598
9892
|
}, [getInitialTime]);
|
|
9599
|
-
const saveProgress =
|
|
9893
|
+
const saveProgress = useCallback4(
|
|
9600
9894
|
(time) => {
|
|
9601
9895
|
if (!autoSave || !storageKey) return;
|
|
9602
9896
|
const now = Date.now();
|
|
@@ -9607,7 +9901,7 @@ var VideoPlayer = ({
|
|
|
9607
9901
|
},
|
|
9608
9902
|
[autoSave, storageKey, src]
|
|
9609
9903
|
);
|
|
9610
|
-
const togglePlayPause =
|
|
9904
|
+
const togglePlayPause = useCallback4(async () => {
|
|
9611
9905
|
const video = videoRef.current;
|
|
9612
9906
|
if (!video) return;
|
|
9613
9907
|
if (!video.paused) {
|
|
@@ -9619,7 +9913,7 @@ var VideoPlayer = ({
|
|
|
9619
9913
|
} catch {
|
|
9620
9914
|
}
|
|
9621
9915
|
}, []);
|
|
9622
|
-
const handleVolumeChange =
|
|
9916
|
+
const handleVolumeChange = useCallback4(
|
|
9623
9917
|
(newVolume) => {
|
|
9624
9918
|
const video = videoRef.current;
|
|
9625
9919
|
if (!video) return;
|
|
@@ -9638,7 +9932,7 @@ var VideoPlayer = ({
|
|
|
9638
9932
|
},
|
|
9639
9933
|
[isMuted]
|
|
9640
9934
|
);
|
|
9641
|
-
const toggleMute =
|
|
9935
|
+
const toggleMute = useCallback4(() => {
|
|
9642
9936
|
const video = videoRef.current;
|
|
9643
9937
|
if (!video) return;
|
|
9644
9938
|
if (isMuted) {
|
|
@@ -9652,20 +9946,20 @@ var VideoPlayer = ({
|
|
|
9652
9946
|
setIsMuted(true);
|
|
9653
9947
|
}
|
|
9654
9948
|
}, [isMuted, volume]);
|
|
9655
|
-
const handleSeek =
|
|
9949
|
+
const handleSeek = useCallback4((newTime) => {
|
|
9656
9950
|
const video = videoRef.current;
|
|
9657
9951
|
if (video) {
|
|
9658
9952
|
video.currentTime = newTime;
|
|
9659
9953
|
}
|
|
9660
9954
|
}, []);
|
|
9661
|
-
const isSafariIOS =
|
|
9955
|
+
const isSafariIOS = useCallback4(() => {
|
|
9662
9956
|
const ua = navigator.userAgent;
|
|
9663
9957
|
const isIOS = /iPad|iPhone|iPod/.test(ua);
|
|
9664
9958
|
const isWebKit = /WebKit/.test(ua);
|
|
9665
9959
|
const isNotChrome = !/CriOS|Chrome/.test(ua);
|
|
9666
9960
|
return isIOS && isWebKit && isNotChrome;
|
|
9667
9961
|
}, []);
|
|
9668
|
-
const toggleFullscreen =
|
|
9962
|
+
const toggleFullscreen = useCallback4(() => {
|
|
9669
9963
|
const video = videoRef.current;
|
|
9670
9964
|
const container = video?.parentElement;
|
|
9671
9965
|
if (!video || !container) return;
|
|
@@ -9682,24 +9976,24 @@ var VideoPlayer = ({
|
|
|
9682
9976
|
document.exitFullscreen();
|
|
9683
9977
|
}
|
|
9684
9978
|
}, [isFullscreen, isSafariIOS]);
|
|
9685
|
-
const handleSpeedChange =
|
|
9979
|
+
const handleSpeedChange = useCallback4((speed) => {
|
|
9686
9980
|
if (videoRef.current) {
|
|
9687
9981
|
videoRef.current.playbackRate = speed;
|
|
9688
9982
|
setPlaybackRate(speed);
|
|
9689
9983
|
setShowSpeedMenu(false);
|
|
9690
9984
|
}
|
|
9691
9985
|
}, []);
|
|
9692
|
-
const toggleSpeedMenu =
|
|
9986
|
+
const toggleSpeedMenu = useCallback4(() => {
|
|
9693
9987
|
setShowSpeedMenu(!showSpeedMenu);
|
|
9694
9988
|
}, [showSpeedMenu]);
|
|
9695
|
-
const toggleCaptions =
|
|
9989
|
+
const toggleCaptions = useCallback4(() => {
|
|
9696
9990
|
if (!trackRef.current?.track || !subtitles || subtitlesValidation !== "valid")
|
|
9697
9991
|
return;
|
|
9698
9992
|
const newShowCaptions = !showCaptions;
|
|
9699
9993
|
setShowCaptions(newShowCaptions);
|
|
9700
9994
|
trackRef.current.track.mode = newShowCaptions ? "showing" : "hidden";
|
|
9701
9995
|
}, [showCaptions, subtitles, subtitlesValidation]);
|
|
9702
|
-
const checkVideoCompletion =
|
|
9996
|
+
const checkVideoCompletion = useCallback4(
|
|
9703
9997
|
(progressPercent) => {
|
|
9704
9998
|
if (progressPercent >= 95 && !hasCompleted) {
|
|
9705
9999
|
setHasCompleted(true);
|
|
@@ -9708,7 +10002,7 @@ var VideoPlayer = ({
|
|
|
9708
10002
|
},
|
|
9709
10003
|
[hasCompleted, onVideoComplete]
|
|
9710
10004
|
);
|
|
9711
|
-
const handleTimeUpdate =
|
|
10005
|
+
const handleTimeUpdate = useCallback4(() => {
|
|
9712
10006
|
const video = videoRef.current;
|
|
9713
10007
|
if (!video) return;
|
|
9714
10008
|
const current = video.currentTime;
|
|
@@ -9721,12 +10015,12 @@ var VideoPlayer = ({
|
|
|
9721
10015
|
checkVideoCompletion(progressPercent);
|
|
9722
10016
|
}
|
|
9723
10017
|
}, [duration, saveProgress, onTimeUpdate, onProgress, checkVideoCompletion]);
|
|
9724
|
-
const handleLoadedMetadata =
|
|
10018
|
+
const handleLoadedMetadata = useCallback4(() => {
|
|
9725
10019
|
if (videoRef.current) {
|
|
9726
10020
|
setDuration(videoRef.current.duration);
|
|
9727
10021
|
}
|
|
9728
10022
|
}, []);
|
|
9729
|
-
|
|
10023
|
+
useEffect18(() => {
|
|
9730
10024
|
const controller = new AbortController();
|
|
9731
10025
|
const validateSubtitles = async () => {
|
|
9732
10026
|
if (!subtitles) {
|
|
@@ -9773,12 +10067,12 @@ var VideoPlayer = ({
|
|
|
9773
10067
|
controller.abort();
|
|
9774
10068
|
};
|
|
9775
10069
|
}, [subtitles]);
|
|
9776
|
-
|
|
10070
|
+
useEffect18(() => {
|
|
9777
10071
|
if (trackRef.current?.track) {
|
|
9778
10072
|
trackRef.current.track.mode = showCaptions && subtitles && subtitlesValidation === "valid" ? "showing" : "hidden";
|
|
9779
10073
|
}
|
|
9780
10074
|
}, [subtitles, showCaptions, subtitlesValidation]);
|
|
9781
|
-
|
|
10075
|
+
useEffect18(() => {
|
|
9782
10076
|
const handleVisibilityChange = () => {
|
|
9783
10077
|
if (document.hidden && isPlaying && videoRef.current) {
|
|
9784
10078
|
videoRef.current.pause();
|
|
@@ -9800,54 +10094,54 @@ var VideoPlayer = ({
|
|
|
9800
10094
|
};
|
|
9801
10095
|
}, [isPlaying, clearControlsTimeout]);
|
|
9802
10096
|
const progressPercentage = duration > 0 ? currentTime / duration * 100 : 0;
|
|
9803
|
-
const getIconSize2 =
|
|
10097
|
+
const getIconSize2 = useCallback4(() => {
|
|
9804
10098
|
if (isTinyMobile) return 18;
|
|
9805
10099
|
if (isUltraSmallMobile) return 20;
|
|
9806
10100
|
return 24;
|
|
9807
10101
|
}, [isTinyMobile, isUltraSmallMobile]);
|
|
9808
|
-
const getControlsPadding =
|
|
10102
|
+
const getControlsPadding = useCallback4(() => {
|
|
9809
10103
|
if (isTinyMobile) return "px-2 pb-2 pt-1";
|
|
9810
10104
|
if (isUltraSmallMobile) return "px-3 pb-3 pt-1";
|
|
9811
10105
|
return "px-4 pb-4";
|
|
9812
10106
|
}, [isTinyMobile, isUltraSmallMobile]);
|
|
9813
|
-
const getControlsGap =
|
|
10107
|
+
const getControlsGap = useCallback4(() => {
|
|
9814
10108
|
if (isTinyMobile) return "gap-1";
|
|
9815
10109
|
if (isUltraSmallMobile) return "gap-2";
|
|
9816
10110
|
return "gap-4";
|
|
9817
10111
|
}, [isTinyMobile, isUltraSmallMobile]);
|
|
9818
|
-
const getProgressBarPadding =
|
|
10112
|
+
const getProgressBarPadding = useCallback4(() => {
|
|
9819
10113
|
if (isTinyMobile) return "px-2 pb-1";
|
|
9820
10114
|
if (isUltraSmallMobile) return "px-3 pb-1";
|
|
9821
10115
|
return "px-4 pb-2";
|
|
9822
10116
|
}, [isTinyMobile, isUltraSmallMobile]);
|
|
9823
|
-
const getCenterPlayButtonPosition =
|
|
10117
|
+
const getCenterPlayButtonPosition = useCallback4(() => {
|
|
9824
10118
|
if (isTinyMobile) return "items-center justify-center -translate-y-12";
|
|
9825
10119
|
if (isUltraSmallMobile) return "items-center justify-center -translate-y-8";
|
|
9826
10120
|
return "items-center justify-center";
|
|
9827
10121
|
}, [isTinyMobile, isUltraSmallMobile]);
|
|
9828
|
-
const getTopControlsOpacity =
|
|
10122
|
+
const getTopControlsOpacity = useCallback4(() => {
|
|
9829
10123
|
return showControls ? "opacity-100" : "opacity-0";
|
|
9830
10124
|
}, [showControls]);
|
|
9831
|
-
const getBottomControlsOpacity =
|
|
10125
|
+
const getBottomControlsOpacity = useCallback4(() => {
|
|
9832
10126
|
return showControls ? "opacity-100" : "opacity-0";
|
|
9833
10127
|
}, [showControls]);
|
|
9834
|
-
const seekBackward =
|
|
10128
|
+
const seekBackward = useCallback4(() => {
|
|
9835
10129
|
if (videoRef.current) {
|
|
9836
10130
|
videoRef.current.currentTime -= 10;
|
|
9837
10131
|
}
|
|
9838
10132
|
}, []);
|
|
9839
|
-
const seekForward =
|
|
10133
|
+
const seekForward = useCallback4(() => {
|
|
9840
10134
|
if (videoRef.current) {
|
|
9841
10135
|
videoRef.current.currentTime += 10;
|
|
9842
10136
|
}
|
|
9843
10137
|
}, []);
|
|
9844
|
-
const increaseVolume =
|
|
10138
|
+
const increaseVolume = useCallback4(() => {
|
|
9845
10139
|
handleVolumeChange(Math.min(100, volume * 100 + 10));
|
|
9846
10140
|
}, [handleVolumeChange, volume]);
|
|
9847
|
-
const decreaseVolume =
|
|
10141
|
+
const decreaseVolume = useCallback4(() => {
|
|
9848
10142
|
handleVolumeChange(Math.max(0, volume * 100 - 10));
|
|
9849
10143
|
}, [handleVolumeChange, volume]);
|
|
9850
|
-
const handleVideoKeyDown =
|
|
10144
|
+
const handleVideoKeyDown = useCallback4(
|
|
9851
10145
|
(e) => {
|
|
9852
10146
|
if (!e.key) return;
|
|
9853
10147
|
e.stopPropagation();
|
|
@@ -9882,10 +10176,10 @@ var VideoPlayer = ({
|
|
|
9882
10176
|
]
|
|
9883
10177
|
);
|
|
9884
10178
|
const groupedSubTitleValid = subtitles && subtitlesValidation === "valid";
|
|
9885
|
-
return /* @__PURE__ */
|
|
9886
|
-
(title || subtitleText) && /* @__PURE__ */
|
|
9887
|
-
/* @__PURE__ */
|
|
9888
|
-
title && /* @__PURE__ */
|
|
10179
|
+
return /* @__PURE__ */ jsxs36("div", { className: cn("flex flex-col", className), children: [
|
|
10180
|
+
(title || subtitleText) && /* @__PURE__ */ jsxs36("div", { className: "bg-subject-1 px-8 py-4 flex items-end justify-between min-h-20", children: [
|
|
10181
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex flex-col gap-1", children: [
|
|
10182
|
+
title && /* @__PURE__ */ jsx49(
|
|
9889
10183
|
Text_default,
|
|
9890
10184
|
{
|
|
9891
10185
|
as: "h2",
|
|
@@ -9896,7 +10190,7 @@ var VideoPlayer = ({
|
|
|
9896
10190
|
children: title
|
|
9897
10191
|
}
|
|
9898
10192
|
),
|
|
9899
|
-
subtitleText && /* @__PURE__ */
|
|
10193
|
+
subtitleText && /* @__PURE__ */ jsx49(
|
|
9900
10194
|
Text_default,
|
|
9901
10195
|
{
|
|
9902
10196
|
as: "p",
|
|
@@ -9908,7 +10202,7 @@ var VideoPlayer = ({
|
|
|
9908
10202
|
}
|
|
9909
10203
|
)
|
|
9910
10204
|
] }),
|
|
9911
|
-
showDownloadButton && downloadContent && /* @__PURE__ */
|
|
10205
|
+
showDownloadButton && downloadContent && /* @__PURE__ */ jsx49(
|
|
9912
10206
|
DownloadButton_default,
|
|
9913
10207
|
{
|
|
9914
10208
|
content: downloadContent,
|
|
@@ -9920,7 +10214,7 @@ var VideoPlayer = ({
|
|
|
9920
10214
|
}
|
|
9921
10215
|
)
|
|
9922
10216
|
] }),
|
|
9923
|
-
/* @__PURE__ */
|
|
10217
|
+
/* @__PURE__ */ jsxs36(
|
|
9924
10218
|
"section",
|
|
9925
10219
|
{
|
|
9926
10220
|
className: cn(
|
|
@@ -9935,7 +10229,7 @@ var VideoPlayer = ({
|
|
|
9935
10229
|
onTouchStart: handleMouseEnter,
|
|
9936
10230
|
onMouseLeave: handleMouseLeave,
|
|
9937
10231
|
children: [
|
|
9938
|
-
/* @__PURE__ */
|
|
10232
|
+
/* @__PURE__ */ jsx49(
|
|
9939
10233
|
"video",
|
|
9940
10234
|
{
|
|
9941
10235
|
ref: videoRef,
|
|
@@ -9950,7 +10244,7 @@ var VideoPlayer = ({
|
|
|
9950
10244
|
onKeyDown: handleVideoKeyDown,
|
|
9951
10245
|
tabIndex: 0,
|
|
9952
10246
|
"aria-label": title ? `Video: ${title}` : "Video player",
|
|
9953
|
-
children: /* @__PURE__ */
|
|
10247
|
+
children: /* @__PURE__ */ jsx49(
|
|
9954
10248
|
"track",
|
|
9955
10249
|
{
|
|
9956
10250
|
ref: trackRef,
|
|
@@ -9963,17 +10257,17 @@ var VideoPlayer = ({
|
|
|
9963
10257
|
)
|
|
9964
10258
|
}
|
|
9965
10259
|
),
|
|
9966
|
-
!isPlaying && /* @__PURE__ */
|
|
10260
|
+
!isPlaying && /* @__PURE__ */ jsx49(
|
|
9967
10261
|
"div",
|
|
9968
10262
|
{
|
|
9969
10263
|
className: cn(
|
|
9970
10264
|
"absolute inset-0 flex bg-black/30 transition-opacity",
|
|
9971
10265
|
getCenterPlayButtonPosition()
|
|
9972
10266
|
),
|
|
9973
|
-
children: /* @__PURE__ */
|
|
10267
|
+
children: /* @__PURE__ */ jsx49(
|
|
9974
10268
|
IconButton_default,
|
|
9975
10269
|
{
|
|
9976
|
-
icon: /* @__PURE__ */
|
|
10270
|
+
icon: /* @__PURE__ */ jsx49(Play2, { size: 32, weight: "regular", className: "ml-1" }),
|
|
9977
10271
|
onClick: togglePlayPause,
|
|
9978
10272
|
"aria-label": "Play video",
|
|
9979
10273
|
className: "!bg-transparent !text-white !w-auto !h-auto hover:!bg-transparent hover:!text-gray-200"
|
|
@@ -9981,17 +10275,17 @@ var VideoPlayer = ({
|
|
|
9981
10275
|
)
|
|
9982
10276
|
}
|
|
9983
10277
|
),
|
|
9984
|
-
/* @__PURE__ */
|
|
10278
|
+
/* @__PURE__ */ jsx49(
|
|
9985
10279
|
"div",
|
|
9986
10280
|
{
|
|
9987
10281
|
className: cn(
|
|
9988
10282
|
"absolute top-0 left-0 right-0 p-4 bg-gradient-to-b from-black/70 to-transparent transition-opacity",
|
|
9989
10283
|
getTopControlsOpacity()
|
|
9990
10284
|
),
|
|
9991
|
-
children: /* @__PURE__ */
|
|
10285
|
+
children: /* @__PURE__ */ jsx49("div", { className: "flex justify-start", children: /* @__PURE__ */ jsx49(
|
|
9992
10286
|
IconButton_default,
|
|
9993
10287
|
{
|
|
9994
|
-
icon: isFullscreen ? /* @__PURE__ */
|
|
10288
|
+
icon: isFullscreen ? /* @__PURE__ */ jsx49(ArrowsInSimple, { size: 24 }) : /* @__PURE__ */ jsx49(ArrowsOutSimple, { size: 24 }),
|
|
9995
10289
|
onClick: toggleFullscreen,
|
|
9996
10290
|
"aria-label": isFullscreen ? "Exit fullscreen" : "Enter fullscreen",
|
|
9997
10291
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
@@ -9999,7 +10293,7 @@ var VideoPlayer = ({
|
|
|
9999
10293
|
) })
|
|
10000
10294
|
}
|
|
10001
10295
|
),
|
|
10002
|
-
/* @__PURE__ */
|
|
10296
|
+
/* @__PURE__ */ jsxs36(
|
|
10003
10297
|
"div",
|
|
10004
10298
|
{
|
|
10005
10299
|
className: cn(
|
|
@@ -10007,7 +10301,7 @@ var VideoPlayer = ({
|
|
|
10007
10301
|
getBottomControlsOpacity()
|
|
10008
10302
|
),
|
|
10009
10303
|
children: [
|
|
10010
|
-
/* @__PURE__ */
|
|
10304
|
+
/* @__PURE__ */ jsx49(
|
|
10011
10305
|
ProgressBar2,
|
|
10012
10306
|
{
|
|
10013
10307
|
currentTime,
|
|
@@ -10017,7 +10311,7 @@ var VideoPlayer = ({
|
|
|
10017
10311
|
className: getProgressBarPadding()
|
|
10018
10312
|
}
|
|
10019
10313
|
),
|
|
10020
|
-
/* @__PURE__ */
|
|
10314
|
+
/* @__PURE__ */ jsxs36(
|
|
10021
10315
|
"div",
|
|
10022
10316
|
{
|
|
10023
10317
|
className: cn(
|
|
@@ -10025,17 +10319,17 @@ var VideoPlayer = ({
|
|
|
10025
10319
|
getControlsPadding()
|
|
10026
10320
|
),
|
|
10027
10321
|
children: [
|
|
10028
|
-
/* @__PURE__ */
|
|
10029
|
-
/* @__PURE__ */
|
|
10322
|
+
/* @__PURE__ */ jsxs36("div", { className: cn("flex items-center", getControlsGap()), children: [
|
|
10323
|
+
/* @__PURE__ */ jsx49(
|
|
10030
10324
|
IconButton_default,
|
|
10031
10325
|
{
|
|
10032
|
-
icon: isPlaying ? /* @__PURE__ */
|
|
10326
|
+
icon: isPlaying ? /* @__PURE__ */ jsx49(Pause, { size: getIconSize2() }) : /* @__PURE__ */ jsx49(Play2, { size: getIconSize2() }),
|
|
10033
10327
|
onClick: togglePlayPause,
|
|
10034
10328
|
"aria-label": isPlaying ? "Pause" : "Play",
|
|
10035
10329
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
10036
10330
|
}
|
|
10037
10331
|
),
|
|
10038
|
-
/* @__PURE__ */
|
|
10332
|
+
/* @__PURE__ */ jsx49(
|
|
10039
10333
|
VolumeControls,
|
|
10040
10334
|
{
|
|
10041
10335
|
volume,
|
|
@@ -10046,10 +10340,10 @@ var VideoPlayer = ({
|
|
|
10046
10340
|
showSlider: !isUltraSmallMobile
|
|
10047
10341
|
}
|
|
10048
10342
|
),
|
|
10049
|
-
groupedSubTitleValid && /* @__PURE__ */
|
|
10343
|
+
groupedSubTitleValid && /* @__PURE__ */ jsx49(
|
|
10050
10344
|
IconButton_default,
|
|
10051
10345
|
{
|
|
10052
|
-
icon: /* @__PURE__ */
|
|
10346
|
+
icon: /* @__PURE__ */ jsx49(ClosedCaptioning, { size: getIconSize2() }),
|
|
10053
10347
|
onClick: toggleCaptions,
|
|
10054
10348
|
"aria-label": showCaptions ? "Hide captions" : "Show captions",
|
|
10055
10349
|
className: cn(
|
|
@@ -10058,13 +10352,13 @@ var VideoPlayer = ({
|
|
|
10058
10352
|
)
|
|
10059
10353
|
}
|
|
10060
10354
|
),
|
|
10061
|
-
/* @__PURE__ */
|
|
10355
|
+
/* @__PURE__ */ jsxs36(Text_default, { size: "sm", weight: "medium", color: "text-white", children: [
|
|
10062
10356
|
formatTime(currentTime),
|
|
10063
10357
|
" / ",
|
|
10064
10358
|
formatTime(duration)
|
|
10065
10359
|
] })
|
|
10066
10360
|
] }),
|
|
10067
|
-
/* @__PURE__ */
|
|
10361
|
+
/* @__PURE__ */ jsx49("div", { className: "flex items-center gap-4", children: /* @__PURE__ */ jsx49(
|
|
10068
10362
|
SpeedMenu,
|
|
10069
10363
|
{
|
|
10070
10364
|
showSpeedMenu,
|
|
@@ -10090,9 +10384,9 @@ var VideoPlayer = ({
|
|
|
10090
10384
|
var VideoPlayer_default = VideoPlayer;
|
|
10091
10385
|
|
|
10092
10386
|
// src/components/Whiteboard/Whiteboard.tsx
|
|
10093
|
-
import { useCallback as
|
|
10387
|
+
import { useCallback as useCallback5, useState as useState19 } from "react";
|
|
10094
10388
|
import { ArrowsOut } from "phosphor-react";
|
|
10095
|
-
import { Fragment as Fragment9, jsx as
|
|
10389
|
+
import { Fragment as Fragment9, jsx as jsx50, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
10096
10390
|
var IMAGE_WIDTH = 225;
|
|
10097
10391
|
var IMAGE_HEIGHT = 90;
|
|
10098
10392
|
var Whiteboard = ({
|
|
@@ -10103,8 +10397,8 @@ var Whiteboard = ({
|
|
|
10103
10397
|
imagesPerRow = 2,
|
|
10104
10398
|
...rest
|
|
10105
10399
|
}) => {
|
|
10106
|
-
const [imageErrors, setImageErrors] =
|
|
10107
|
-
const handleDownload =
|
|
10400
|
+
const [imageErrors, setImageErrors] = useState19(/* @__PURE__ */ new Set());
|
|
10401
|
+
const handleDownload = useCallback5(
|
|
10108
10402
|
(image) => {
|
|
10109
10403
|
if (onDownload) {
|
|
10110
10404
|
onDownload(image);
|
|
@@ -10121,7 +10415,7 @@ var Whiteboard = ({
|
|
|
10121
10415
|
},
|
|
10122
10416
|
[onDownload]
|
|
10123
10417
|
);
|
|
10124
|
-
const handleImageError =
|
|
10418
|
+
const handleImageError = useCallback5((imageId) => {
|
|
10125
10419
|
setImageErrors((prev) => new Set(prev).add(imageId));
|
|
10126
10420
|
}, []);
|
|
10127
10421
|
const gridColsClass = images?.length === 1 ? "grid-cols-1" : {
|
|
@@ -10130,7 +10424,7 @@ var Whiteboard = ({
|
|
|
10130
10424
|
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"
|
|
10131
10425
|
}[imagesPerRow];
|
|
10132
10426
|
if (!images || images.length === 0) {
|
|
10133
|
-
return /* @__PURE__ */
|
|
10427
|
+
return /* @__PURE__ */ jsx50(
|
|
10134
10428
|
"div",
|
|
10135
10429
|
{
|
|
10136
10430
|
className: cn(
|
|
@@ -10138,11 +10432,11 @@ var Whiteboard = ({
|
|
|
10138
10432
|
className
|
|
10139
10433
|
),
|
|
10140
10434
|
...rest,
|
|
10141
|
-
children: /* @__PURE__ */
|
|
10435
|
+
children: /* @__PURE__ */ jsx50("p", { className: "text-gray-400 text-sm", children: "Nenhuma imagem dispon\xEDvel" })
|
|
10142
10436
|
}
|
|
10143
10437
|
);
|
|
10144
10438
|
}
|
|
10145
|
-
return /* @__PURE__ */
|
|
10439
|
+
return /* @__PURE__ */ jsx50(
|
|
10146
10440
|
"div",
|
|
10147
10441
|
{
|
|
10148
10442
|
className: cn(
|
|
@@ -10150,7 +10444,7 @@ var Whiteboard = ({
|
|
|
10150
10444
|
className
|
|
10151
10445
|
),
|
|
10152
10446
|
...rest,
|
|
10153
|
-
children: /* @__PURE__ */
|
|
10447
|
+
children: /* @__PURE__ */ jsx50("div", { className: cn("grid gap-4", gridColsClass), children: images.map((image) => /* @__PURE__ */ jsxs37(
|
|
10154
10448
|
"div",
|
|
10155
10449
|
{
|
|
10156
10450
|
className: "relative group overflow-hidden bg-gray-100 rounded-lg",
|
|
@@ -10158,7 +10452,7 @@ var Whiteboard = ({
|
|
|
10158
10452
|
width: `${IMAGE_WIDTH}px`
|
|
10159
10453
|
},
|
|
10160
10454
|
children: [
|
|
10161
|
-
/* @__PURE__ */
|
|
10455
|
+
/* @__PURE__ */ jsx50(
|
|
10162
10456
|
"div",
|
|
10163
10457
|
{
|
|
10164
10458
|
className: "relative",
|
|
@@ -10166,8 +10460,8 @@ var Whiteboard = ({
|
|
|
10166
10460
|
width: `${IMAGE_WIDTH}px`,
|
|
10167
10461
|
height: `${IMAGE_HEIGHT}px`
|
|
10168
10462
|
},
|
|
10169
|
-
children: imageErrors.has(image.id) ? /* @__PURE__ */
|
|
10170
|
-
/* @__PURE__ */
|
|
10463
|
+
children: imageErrors.has(image.id) ? /* @__PURE__ */ jsx50("div", { className: "absolute inset-0 flex items-center justify-center bg-gray-200", children: /* @__PURE__ */ jsx50("p", { className: "text-gray-500 text-sm text-center px-2", children: "Imagem indispon\xEDvel" }) }) : /* @__PURE__ */ jsxs37(Fragment9, { children: [
|
|
10464
|
+
/* @__PURE__ */ jsx50(
|
|
10171
10465
|
"img",
|
|
10172
10466
|
{
|
|
10173
10467
|
src: image.imageUrl,
|
|
@@ -10177,18 +10471,18 @@ var Whiteboard = ({
|
|
|
10177
10471
|
onError: () => handleImageError(image.id)
|
|
10178
10472
|
}
|
|
10179
10473
|
),
|
|
10180
|
-
/* @__PURE__ */
|
|
10474
|
+
/* @__PURE__ */ jsx50("div", { className: "absolute inset-0 bg-gradient-to-t from-black/20 to-transparent" })
|
|
10181
10475
|
] })
|
|
10182
10476
|
}
|
|
10183
10477
|
),
|
|
10184
|
-
showDownload && /* @__PURE__ */
|
|
10478
|
+
showDownload && /* @__PURE__ */ jsx50(
|
|
10185
10479
|
"button",
|
|
10186
10480
|
{
|
|
10187
10481
|
type: "button",
|
|
10188
10482
|
onClick: () => handleDownload(image),
|
|
10189
10483
|
className: "cursor-pointer absolute bottom-3 right-3 flex items-center justify-center bg-black/20 backdrop-blur-sm rounded hover:bg-black/30 transition-colors duration-200 group/button w-6 h-6",
|
|
10190
10484
|
"aria-label": `Download ${image.title || "imagem"}`,
|
|
10191
|
-
children: /* @__PURE__ */
|
|
10485
|
+
children: /* @__PURE__ */ jsx50(
|
|
10192
10486
|
ArrowsOut,
|
|
10193
10487
|
{
|
|
10194
10488
|
size: 24,
|
|
@@ -10211,13 +10505,13 @@ var Whiteboard_default = Whiteboard;
|
|
|
10211
10505
|
import {
|
|
10212
10506
|
createContext,
|
|
10213
10507
|
useContext,
|
|
10214
|
-
useEffect as
|
|
10215
|
-
useState as
|
|
10216
|
-
useCallback as
|
|
10508
|
+
useEffect as useEffect19,
|
|
10509
|
+
useState as useState20,
|
|
10510
|
+
useCallback as useCallback6,
|
|
10217
10511
|
useMemo as useMemo6
|
|
10218
10512
|
} from "react";
|
|
10219
10513
|
import { useLocation, Navigate } from "react-router-dom";
|
|
10220
|
-
import { Fragment as Fragment10, jsx as
|
|
10514
|
+
import { Fragment as Fragment10, jsx as jsx51 } from "react/jsx-runtime";
|
|
10221
10515
|
var AuthContext = createContext(void 0);
|
|
10222
10516
|
var AuthProvider = ({
|
|
10223
10517
|
children,
|
|
@@ -10228,12 +10522,12 @@ var AuthProvider = ({
|
|
|
10228
10522
|
getSessionFn,
|
|
10229
10523
|
getTokensFn
|
|
10230
10524
|
}) => {
|
|
10231
|
-
const [authState, setAuthState] =
|
|
10525
|
+
const [authState, setAuthState] = useState20({
|
|
10232
10526
|
isAuthenticated: false,
|
|
10233
10527
|
isLoading: true,
|
|
10234
10528
|
...initialAuthState
|
|
10235
10529
|
});
|
|
10236
|
-
const checkAuth =
|
|
10530
|
+
const checkAuth = useCallback6(async () => {
|
|
10237
10531
|
try {
|
|
10238
10532
|
setAuthState((prev) => ({ ...prev, isLoading: true }));
|
|
10239
10533
|
if (!checkAuthFn) {
|
|
@@ -10264,7 +10558,7 @@ var AuthProvider = ({
|
|
|
10264
10558
|
return false;
|
|
10265
10559
|
}
|
|
10266
10560
|
}, [checkAuthFn, getUserFn, getSessionFn, getTokensFn]);
|
|
10267
|
-
const signOut =
|
|
10561
|
+
const signOut = useCallback6(() => {
|
|
10268
10562
|
if (signOutFn) {
|
|
10269
10563
|
signOutFn();
|
|
10270
10564
|
}
|
|
@@ -10276,7 +10570,7 @@ var AuthProvider = ({
|
|
|
10276
10570
|
tokens: void 0
|
|
10277
10571
|
}));
|
|
10278
10572
|
}, [signOutFn]);
|
|
10279
|
-
|
|
10573
|
+
useEffect19(() => {
|
|
10280
10574
|
checkAuth();
|
|
10281
10575
|
}, [checkAuth]);
|
|
10282
10576
|
const contextValue = useMemo6(
|
|
@@ -10287,7 +10581,7 @@ var AuthProvider = ({
|
|
|
10287
10581
|
}),
|
|
10288
10582
|
[authState, checkAuth, signOut]
|
|
10289
10583
|
);
|
|
10290
|
-
return /* @__PURE__ */
|
|
10584
|
+
return /* @__PURE__ */ jsx51(AuthContext.Provider, { value: contextValue, children });
|
|
10291
10585
|
};
|
|
10292
10586
|
var useAuth = () => {
|
|
10293
10587
|
const context = useContext(AuthContext);
|
|
@@ -10303,9 +10597,9 @@ var ProtectedRoute = ({
|
|
|
10303
10597
|
additionalCheck
|
|
10304
10598
|
}) => {
|
|
10305
10599
|
const { isAuthenticated, isLoading, ...authState } = useAuth();
|
|
10306
|
-
const defaultLoadingComponent = /* @__PURE__ */
|
|
10600
|
+
const defaultLoadingComponent = /* @__PURE__ */ jsx51("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ jsx51("div", { className: "text-text-950 text-lg", children: "Carregando..." }) });
|
|
10307
10601
|
if (isLoading) {
|
|
10308
|
-
return /* @__PURE__ */
|
|
10602
|
+
return /* @__PURE__ */ jsx51(Fragment10, { children: loadingComponent || defaultLoadingComponent });
|
|
10309
10603
|
}
|
|
10310
10604
|
if (!isAuthenticated) {
|
|
10311
10605
|
if (typeof window !== "undefined") {
|
|
@@ -10316,12 +10610,12 @@ var ProtectedRoute = ({
|
|
|
10316
10610
|
return null;
|
|
10317
10611
|
}
|
|
10318
10612
|
}
|
|
10319
|
-
return /* @__PURE__ */
|
|
10613
|
+
return /* @__PURE__ */ jsx51(Navigate, { to: redirectTo, replace: true });
|
|
10320
10614
|
}
|
|
10321
10615
|
if (additionalCheck && !additionalCheck({ isAuthenticated, isLoading, ...authState })) {
|
|
10322
|
-
return /* @__PURE__ */
|
|
10616
|
+
return /* @__PURE__ */ jsx51(Navigate, { to: redirectTo, replace: true });
|
|
10323
10617
|
}
|
|
10324
|
-
return /* @__PURE__ */
|
|
10618
|
+
return /* @__PURE__ */ jsx51(Fragment10, { children });
|
|
10325
10619
|
};
|
|
10326
10620
|
var PublicRoute = ({
|
|
10327
10621
|
children,
|
|
@@ -10331,15 +10625,15 @@ var PublicRoute = ({
|
|
|
10331
10625
|
}) => {
|
|
10332
10626
|
const { isAuthenticated, isLoading } = useAuth();
|
|
10333
10627
|
if (checkAuthBeforeRender && isLoading) {
|
|
10334
|
-
return /* @__PURE__ */
|
|
10628
|
+
return /* @__PURE__ */ jsx51("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ jsx51("div", { className: "text-text-950 text-lg", children: "Carregando..." }) });
|
|
10335
10629
|
}
|
|
10336
10630
|
if (isAuthenticated && redirectIfAuthenticated) {
|
|
10337
|
-
return /* @__PURE__ */
|
|
10631
|
+
return /* @__PURE__ */ jsx51(Navigate, { to: redirectTo, replace: true });
|
|
10338
10632
|
}
|
|
10339
|
-
return /* @__PURE__ */
|
|
10633
|
+
return /* @__PURE__ */ jsx51(Fragment10, { children });
|
|
10340
10634
|
};
|
|
10341
10635
|
var withAuth = (Component, options = {}) => {
|
|
10342
|
-
return (props) => /* @__PURE__ */
|
|
10636
|
+
return (props) => /* @__PURE__ */ jsx51(ProtectedRoute, { ...options, children: /* @__PURE__ */ jsx51(Component, { ...props }) });
|
|
10343
10637
|
};
|
|
10344
10638
|
var useAuthGuard = (options = {}) => {
|
|
10345
10639
|
const authState = useAuth();
|
|
@@ -10354,7 +10648,7 @@ var useAuthGuard = (options = {}) => {
|
|
|
10354
10648
|
var useRouteAuth = (fallbackPath = "/") => {
|
|
10355
10649
|
const { isAuthenticated, isLoading } = useAuth();
|
|
10356
10650
|
const location = useLocation();
|
|
10357
|
-
const redirectToLogin = () => /* @__PURE__ */
|
|
10651
|
+
const redirectToLogin = () => /* @__PURE__ */ jsx51(Navigate, { to: fallbackPath, state: { from: location }, replace: true });
|
|
10358
10652
|
return {
|
|
10359
10653
|
isAuthenticated,
|
|
10360
10654
|
isLoading,
|
|
@@ -10391,11 +10685,11 @@ var getRootDomain = () => {
|
|
|
10391
10685
|
import {
|
|
10392
10686
|
forwardRef as forwardRef18,
|
|
10393
10687
|
useId as useId9,
|
|
10394
|
-
useState as
|
|
10395
|
-
useEffect as
|
|
10688
|
+
useState as useState21,
|
|
10689
|
+
useEffect as useEffect20
|
|
10396
10690
|
} from "react";
|
|
10397
10691
|
import { CaretRight as CaretRight4 } from "phosphor-react";
|
|
10398
|
-
import { jsx as
|
|
10692
|
+
import { jsx as jsx52, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
10399
10693
|
var CardAccordation = forwardRef18(
|
|
10400
10694
|
({
|
|
10401
10695
|
trigger,
|
|
@@ -10408,13 +10702,13 @@ var CardAccordation = forwardRef18(
|
|
|
10408
10702
|
disabled = false,
|
|
10409
10703
|
...props
|
|
10410
10704
|
}, ref) => {
|
|
10411
|
-
const [internalExpanded, setInternalExpanded] =
|
|
10705
|
+
const [internalExpanded, setInternalExpanded] = useState21(defaultExpanded);
|
|
10412
10706
|
const generatedId = useId9();
|
|
10413
10707
|
const contentId = value ? `accordion-content-${value}` : generatedId;
|
|
10414
10708
|
const headerId = value ? `accordion-header-${value}` : `${generatedId}-header`;
|
|
10415
10709
|
const isControlled = controlledExpanded !== void 0;
|
|
10416
10710
|
const isExpanded = isControlled ? controlledExpanded : internalExpanded;
|
|
10417
|
-
|
|
10711
|
+
useEffect20(() => {
|
|
10418
10712
|
if (isControlled) {
|
|
10419
10713
|
setInternalExpanded(controlledExpanded);
|
|
10420
10714
|
}
|
|
@@ -10434,7 +10728,7 @@ var CardAccordation = forwardRef18(
|
|
|
10434
10728
|
handleToggle();
|
|
10435
10729
|
}
|
|
10436
10730
|
};
|
|
10437
|
-
return /* @__PURE__ */
|
|
10731
|
+
return /* @__PURE__ */ jsxs38(
|
|
10438
10732
|
CardBase,
|
|
10439
10733
|
{
|
|
10440
10734
|
ref,
|
|
@@ -10444,7 +10738,7 @@ var CardAccordation = forwardRef18(
|
|
|
10444
10738
|
className: cn("overflow-hidden", className),
|
|
10445
10739
|
...props,
|
|
10446
10740
|
children: [
|
|
10447
|
-
/* @__PURE__ */
|
|
10741
|
+
/* @__PURE__ */ jsxs38(
|
|
10448
10742
|
"button",
|
|
10449
10743
|
{
|
|
10450
10744
|
id: headerId,
|
|
@@ -10462,7 +10756,7 @@ var CardAccordation = forwardRef18(
|
|
|
10462
10756
|
"data-value": value,
|
|
10463
10757
|
children: [
|
|
10464
10758
|
trigger,
|
|
10465
|
-
/* @__PURE__ */
|
|
10759
|
+
/* @__PURE__ */ jsx52(
|
|
10466
10760
|
CaretRight4,
|
|
10467
10761
|
{
|
|
10468
10762
|
size: 20,
|
|
@@ -10477,7 +10771,7 @@ var CardAccordation = forwardRef18(
|
|
|
10477
10771
|
]
|
|
10478
10772
|
}
|
|
10479
10773
|
),
|
|
10480
|
-
/* @__PURE__ */
|
|
10774
|
+
/* @__PURE__ */ jsx52(
|
|
10481
10775
|
"section",
|
|
10482
10776
|
{
|
|
10483
10777
|
id: contentId,
|
|
@@ -10489,7 +10783,7 @@ var CardAccordation = forwardRef18(
|
|
|
10489
10783
|
),
|
|
10490
10784
|
"data-testid": "accordion-content",
|
|
10491
10785
|
"data-value": value,
|
|
10492
|
-
children: /* @__PURE__ */
|
|
10786
|
+
children: /* @__PURE__ */ jsx52("div", { className: "p-4 pt-0", children })
|
|
10493
10787
|
}
|
|
10494
10788
|
)
|
|
10495
10789
|
]
|
|
@@ -10505,12 +10799,12 @@ import {
|
|
|
10505
10799
|
cloneElement as cloneElement7,
|
|
10506
10800
|
forwardRef as forwardRef19,
|
|
10507
10801
|
isValidElement as isValidElement6,
|
|
10508
|
-
useEffect as
|
|
10802
|
+
useEffect as useEffect21,
|
|
10509
10803
|
useRef as useRef12,
|
|
10510
|
-
useState as
|
|
10804
|
+
useState as useState22
|
|
10511
10805
|
} from "react";
|
|
10512
10806
|
import { create as create9 } from "zustand";
|
|
10513
|
-
import { jsx as
|
|
10807
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
10514
10808
|
function createAccordionGroupStore(type, initialValue, collapsible) {
|
|
10515
10809
|
return create9((set, get) => ({
|
|
10516
10810
|
type,
|
|
@@ -10576,7 +10870,7 @@ var AccordionGroup = forwardRef19(
|
|
|
10576
10870
|
className,
|
|
10577
10871
|
...props
|
|
10578
10872
|
}, ref) => {
|
|
10579
|
-
const [internalValue, setInternalValue] =
|
|
10873
|
+
const [internalValue, setInternalValue] = useState22(
|
|
10580
10874
|
defaultValue || (type === "single" ? "" : [])
|
|
10581
10875
|
);
|
|
10582
10876
|
const isControlled = controlledValue !== void 0;
|
|
@@ -10601,10 +10895,10 @@ var AccordionGroup = forwardRef19(
|
|
|
10601
10895
|
);
|
|
10602
10896
|
}
|
|
10603
10897
|
const store = storeRef.current;
|
|
10604
|
-
|
|
10898
|
+
useEffect21(() => {
|
|
10605
10899
|
store.setState({ value: currentValue });
|
|
10606
10900
|
}, [currentValue, store]);
|
|
10607
|
-
|
|
10901
|
+
useEffect21(() => {
|
|
10608
10902
|
if (!isControlled) {
|
|
10609
10903
|
setInternalValue((prev) => {
|
|
10610
10904
|
if (type === "single") {
|
|
@@ -10650,15 +10944,15 @@ var AccordionGroup = forwardRef19(
|
|
|
10650
10944
|
indexRef,
|
|
10651
10945
|
handleItemToggle
|
|
10652
10946
|
);
|
|
10653
|
-
return /* @__PURE__ */
|
|
10947
|
+
return /* @__PURE__ */ jsx53("div", { ref, className, ...props, children: enhancedChildren });
|
|
10654
10948
|
}
|
|
10655
10949
|
);
|
|
10656
10950
|
AccordionGroup.displayName = "AccordionGroup";
|
|
10657
10951
|
|
|
10658
10952
|
// src/components/Alternative/Alternative.tsx
|
|
10659
10953
|
import { CheckCircle as CheckCircle4, XCircle as XCircle3 } from "phosphor-react";
|
|
10660
|
-
import { forwardRef as forwardRef20, useId as useId10, useState as
|
|
10661
|
-
import { jsx as
|
|
10954
|
+
import { forwardRef as forwardRef20, useId as useId10, useState as useState23 } from "react";
|
|
10955
|
+
import { jsx as jsx54, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
10662
10956
|
var AlternativesList = ({
|
|
10663
10957
|
alternatives,
|
|
10664
10958
|
name,
|
|
@@ -10673,7 +10967,7 @@ var AlternativesList = ({
|
|
|
10673
10967
|
}) => {
|
|
10674
10968
|
const uniqueId = useId10();
|
|
10675
10969
|
const groupName = name || `alternatives-${uniqueId}`;
|
|
10676
|
-
const [actualValue, setActualValue] =
|
|
10970
|
+
const [actualValue, setActualValue] = useState23(value);
|
|
10677
10971
|
const isReadonly = mode === "readonly";
|
|
10678
10972
|
const getStatusStyles2 = (status, isReadonly2) => {
|
|
10679
10973
|
const hoverClass = isReadonly2 ? "" : "hover:bg-background-50";
|
|
@@ -10689,9 +10983,9 @@ var AlternativesList = ({
|
|
|
10689
10983
|
const getStatusBadge2 = (status) => {
|
|
10690
10984
|
switch (status) {
|
|
10691
10985
|
case "correct":
|
|
10692
|
-
return /* @__PURE__ */
|
|
10986
|
+
return /* @__PURE__ */ jsx54(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx54(CheckCircle4, {}), children: "Resposta correta" });
|
|
10693
10987
|
case "incorrect":
|
|
10694
|
-
return /* @__PURE__ */
|
|
10988
|
+
return /* @__PURE__ */ jsx54(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ jsx54(XCircle3, {}), children: "Resposta incorreta" });
|
|
10695
10989
|
default:
|
|
10696
10990
|
return null;
|
|
10697
10991
|
}
|
|
@@ -10721,10 +11015,10 @@ var AlternativesList = ({
|
|
|
10721
11015
|
const renderRadio = () => {
|
|
10722
11016
|
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"}`;
|
|
10723
11017
|
const dotClasses = "w-3 h-3 rounded-full bg-primary-950 transition-all duration-200";
|
|
10724
|
-
return /* @__PURE__ */
|
|
11018
|
+
return /* @__PURE__ */ jsx54("div", { className: radioClasses, children: isUserSelected && /* @__PURE__ */ jsx54("div", { className: dotClasses }) });
|
|
10725
11019
|
};
|
|
10726
11020
|
if (layout === "detailed") {
|
|
10727
|
-
return /* @__PURE__ */
|
|
11021
|
+
return /* @__PURE__ */ jsx54(
|
|
10728
11022
|
"div",
|
|
10729
11023
|
{
|
|
10730
11024
|
className: cn(
|
|
@@ -10732,11 +11026,11 @@ var AlternativesList = ({
|
|
|
10732
11026
|
statusStyles,
|
|
10733
11027
|
alternative.disabled ? "opacity-50" : ""
|
|
10734
11028
|
),
|
|
10735
|
-
children: /* @__PURE__ */
|
|
10736
|
-
/* @__PURE__ */
|
|
10737
|
-
/* @__PURE__ */
|
|
10738
|
-
/* @__PURE__ */
|
|
10739
|
-
/* @__PURE__ */
|
|
11029
|
+
children: /* @__PURE__ */ jsxs39("div", { className: "flex items-start justify-between gap-3", children: [
|
|
11030
|
+
/* @__PURE__ */ jsxs39("div", { className: "flex items-start gap-3 flex-1", children: [
|
|
11031
|
+
/* @__PURE__ */ jsx54("div", { className: "mt-1", children: renderRadio() }),
|
|
11032
|
+
/* @__PURE__ */ jsxs39("div", { className: "flex-1", children: [
|
|
11033
|
+
/* @__PURE__ */ jsx54(
|
|
10740
11034
|
"p",
|
|
10741
11035
|
{
|
|
10742
11036
|
className: cn(
|
|
@@ -10746,16 +11040,16 @@ var AlternativesList = ({
|
|
|
10746
11040
|
children: alternative.label
|
|
10747
11041
|
}
|
|
10748
11042
|
),
|
|
10749
|
-
alternative.description && /* @__PURE__ */
|
|
11043
|
+
alternative.description && /* @__PURE__ */ jsx54("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
|
|
10750
11044
|
] })
|
|
10751
11045
|
] }),
|
|
10752
|
-
statusBadge && /* @__PURE__ */
|
|
11046
|
+
statusBadge && /* @__PURE__ */ jsx54("div", { className: "flex-shrink-0", children: statusBadge })
|
|
10753
11047
|
] })
|
|
10754
11048
|
},
|
|
10755
11049
|
alternativeId
|
|
10756
11050
|
);
|
|
10757
11051
|
}
|
|
10758
|
-
return /* @__PURE__ */
|
|
11052
|
+
return /* @__PURE__ */ jsxs39(
|
|
10759
11053
|
"div",
|
|
10760
11054
|
{
|
|
10761
11055
|
className: cn(
|
|
@@ -10764,9 +11058,9 @@ var AlternativesList = ({
|
|
|
10764
11058
|
alternative.disabled ? "opacity-50" : ""
|
|
10765
11059
|
),
|
|
10766
11060
|
children: [
|
|
10767
|
-
/* @__PURE__ */
|
|
11061
|
+
/* @__PURE__ */ jsxs39("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
10768
11062
|
renderRadio(),
|
|
10769
|
-
/* @__PURE__ */
|
|
11063
|
+
/* @__PURE__ */ jsx54(
|
|
10770
11064
|
"span",
|
|
10771
11065
|
{
|
|
10772
11066
|
className: cn(
|
|
@@ -10777,14 +11071,14 @@ var AlternativesList = ({
|
|
|
10777
11071
|
}
|
|
10778
11072
|
)
|
|
10779
11073
|
] }),
|
|
10780
|
-
statusBadge && /* @__PURE__ */
|
|
11074
|
+
statusBadge && /* @__PURE__ */ jsx54("div", { className: "flex-shrink-0", children: statusBadge })
|
|
10781
11075
|
]
|
|
10782
11076
|
},
|
|
10783
11077
|
alternativeId
|
|
10784
11078
|
);
|
|
10785
11079
|
};
|
|
10786
11080
|
if (isReadonly) {
|
|
10787
|
-
return /* @__PURE__ */
|
|
11081
|
+
return /* @__PURE__ */ jsx54(
|
|
10788
11082
|
"div",
|
|
10789
11083
|
{
|
|
10790
11084
|
className: cn("flex flex-col", getLayoutClasses(), "w-full", className),
|
|
@@ -10794,7 +11088,7 @@ var AlternativesList = ({
|
|
|
10794
11088
|
}
|
|
10795
11089
|
);
|
|
10796
11090
|
}
|
|
10797
|
-
return /* @__PURE__ */
|
|
11091
|
+
return /* @__PURE__ */ jsx54(
|
|
10798
11092
|
RadioGroup,
|
|
10799
11093
|
{
|
|
10800
11094
|
name: groupName,
|
|
@@ -10811,7 +11105,7 @@ var AlternativesList = ({
|
|
|
10811
11105
|
const statusStyles = getStatusStyles2(alternative.status, false);
|
|
10812
11106
|
const statusBadge = getStatusBadge2(alternative.status);
|
|
10813
11107
|
if (layout === "detailed") {
|
|
10814
|
-
return /* @__PURE__ */
|
|
11108
|
+
return /* @__PURE__ */ jsx54(
|
|
10815
11109
|
"div",
|
|
10816
11110
|
{
|
|
10817
11111
|
className: cn(
|
|
@@ -10819,9 +11113,9 @@ var AlternativesList = ({
|
|
|
10819
11113
|
statusStyles,
|
|
10820
11114
|
alternative.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
10821
11115
|
),
|
|
10822
|
-
children: /* @__PURE__ */
|
|
10823
|
-
/* @__PURE__ */
|
|
10824
|
-
/* @__PURE__ */
|
|
11116
|
+
children: /* @__PURE__ */ jsxs39("div", { className: "flex items-start justify-between gap-3", children: [
|
|
11117
|
+
/* @__PURE__ */ jsxs39("div", { className: "flex items-start gap-3 flex-1", children: [
|
|
11118
|
+
/* @__PURE__ */ jsx54(
|
|
10825
11119
|
RadioGroupItem,
|
|
10826
11120
|
{
|
|
10827
11121
|
value: alternative.value,
|
|
@@ -10830,8 +11124,8 @@ var AlternativesList = ({
|
|
|
10830
11124
|
className: "mt-1"
|
|
10831
11125
|
}
|
|
10832
11126
|
),
|
|
10833
|
-
/* @__PURE__ */
|
|
10834
|
-
/* @__PURE__ */
|
|
11127
|
+
/* @__PURE__ */ jsxs39("div", { className: "flex-1", children: [
|
|
11128
|
+
/* @__PURE__ */ jsx54(
|
|
10835
11129
|
"label",
|
|
10836
11130
|
{
|
|
10837
11131
|
htmlFor: alternativeId,
|
|
@@ -10843,16 +11137,16 @@ var AlternativesList = ({
|
|
|
10843
11137
|
children: alternative.label
|
|
10844
11138
|
}
|
|
10845
11139
|
),
|
|
10846
|
-
alternative.description && /* @__PURE__ */
|
|
11140
|
+
alternative.description && /* @__PURE__ */ jsx54("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
|
|
10847
11141
|
] })
|
|
10848
11142
|
] }),
|
|
10849
|
-
statusBadge && /* @__PURE__ */
|
|
11143
|
+
statusBadge && /* @__PURE__ */ jsx54("div", { className: "flex-shrink-0", children: statusBadge })
|
|
10850
11144
|
] })
|
|
10851
11145
|
},
|
|
10852
11146
|
alternativeId
|
|
10853
11147
|
);
|
|
10854
11148
|
}
|
|
10855
|
-
return /* @__PURE__ */
|
|
11149
|
+
return /* @__PURE__ */ jsxs39(
|
|
10856
11150
|
"div",
|
|
10857
11151
|
{
|
|
10858
11152
|
className: cn(
|
|
@@ -10861,8 +11155,8 @@ var AlternativesList = ({
|
|
|
10861
11155
|
alternative.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
10862
11156
|
),
|
|
10863
11157
|
children: [
|
|
10864
|
-
/* @__PURE__ */
|
|
10865
|
-
/* @__PURE__ */
|
|
11158
|
+
/* @__PURE__ */ jsxs39("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
11159
|
+
/* @__PURE__ */ jsx54(
|
|
10866
11160
|
RadioGroupItem,
|
|
10867
11161
|
{
|
|
10868
11162
|
value: alternative.value,
|
|
@@ -10870,7 +11164,7 @@ var AlternativesList = ({
|
|
|
10870
11164
|
disabled: alternative.disabled
|
|
10871
11165
|
}
|
|
10872
11166
|
),
|
|
10873
|
-
/* @__PURE__ */
|
|
11167
|
+
/* @__PURE__ */ jsx54(
|
|
10874
11168
|
"label",
|
|
10875
11169
|
{
|
|
10876
11170
|
htmlFor: alternativeId,
|
|
@@ -10883,7 +11177,7 @@ var AlternativesList = ({
|
|
|
10883
11177
|
}
|
|
10884
11178
|
)
|
|
10885
11179
|
] }),
|
|
10886
|
-
statusBadge && /* @__PURE__ */
|
|
11180
|
+
statusBadge && /* @__PURE__ */ jsx54("div", { className: "flex-shrink-0", children: statusBadge })
|
|
10887
11181
|
]
|
|
10888
11182
|
},
|
|
10889
11183
|
alternativeId
|
|
@@ -10894,7 +11188,7 @@ var AlternativesList = ({
|
|
|
10894
11188
|
};
|
|
10895
11189
|
var HeaderAlternative = forwardRef20(
|
|
10896
11190
|
({ className, title, subTitle, content, ...props }, ref) => {
|
|
10897
|
-
return /* @__PURE__ */
|
|
11191
|
+
return /* @__PURE__ */ jsxs39(
|
|
10898
11192
|
"div",
|
|
10899
11193
|
{
|
|
10900
11194
|
ref,
|
|
@@ -10904,11 +11198,11 @@ var HeaderAlternative = forwardRef20(
|
|
|
10904
11198
|
),
|
|
10905
11199
|
...props,
|
|
10906
11200
|
children: [
|
|
10907
|
-
/* @__PURE__ */
|
|
10908
|
-
/* @__PURE__ */
|
|
10909
|
-
/* @__PURE__ */
|
|
11201
|
+
/* @__PURE__ */ jsxs39("span", { className: "flex flex-col", children: [
|
|
11202
|
+
/* @__PURE__ */ jsx54("p", { className: "text-text-950 font-bold text-lg", children: title }),
|
|
11203
|
+
/* @__PURE__ */ jsx54("p", { className: "text-text-700 text-sm ", children: subTitle })
|
|
10910
11204
|
] }),
|
|
10911
|
-
/* @__PURE__ */
|
|
11205
|
+
/* @__PURE__ */ jsx54("p", { className: "text-text-950 text-md", children: content })
|
|
10912
11206
|
]
|
|
10913
11207
|
}
|
|
10914
11208
|
);
|
|
@@ -10958,7 +11252,7 @@ function createZustandAuthAdapter(useAuthStore2) {
|
|
|
10958
11252
|
}
|
|
10959
11253
|
|
|
10960
11254
|
// src/components/Auth/useUrlAuthentication.ts
|
|
10961
|
-
import { useEffect as
|
|
11255
|
+
import { useEffect as useEffect22, useRef as useRef13 } from "react";
|
|
10962
11256
|
import { useLocation as useLocation2 } from "react-router-dom";
|
|
10963
11257
|
var getAuthParams = (location, extractParams) => {
|
|
10964
11258
|
const searchParams = new URLSearchParams(location.search);
|
|
@@ -11007,7 +11301,7 @@ var handleUserData = (responseData, setUser) => {
|
|
|
11007
11301
|
function useUrlAuthentication(options) {
|
|
11008
11302
|
const location = useLocation2();
|
|
11009
11303
|
const processedRef = useRef13(false);
|
|
11010
|
-
|
|
11304
|
+
useEffect22(() => {
|
|
11011
11305
|
const handleAuthentication = async () => {
|
|
11012
11306
|
if (processedRef.current) {
|
|
11013
11307
|
return;
|
|
@@ -11098,8 +11392,8 @@ import {
|
|
|
11098
11392
|
} from "phosphor-react";
|
|
11099
11393
|
import {
|
|
11100
11394
|
forwardRef as forwardRef22,
|
|
11101
|
-
useEffect as
|
|
11102
|
-
useState as
|
|
11395
|
+
useEffect as useEffect25,
|
|
11396
|
+
useState as useState26
|
|
11103
11397
|
} from "react";
|
|
11104
11398
|
|
|
11105
11399
|
// src/components/Quiz/useQuizStore.ts
|
|
@@ -11712,18 +12006,18 @@ var useQuizStore = create10()(
|
|
|
11712
12006
|
// src/components/Quiz/QuizContent.tsx
|
|
11713
12007
|
import {
|
|
11714
12008
|
forwardRef as forwardRef21,
|
|
11715
|
-
useCallback as
|
|
11716
|
-
useEffect as
|
|
12009
|
+
useCallback as useCallback7,
|
|
12010
|
+
useEffect as useEffect24,
|
|
11717
12011
|
useId as useId11,
|
|
11718
12012
|
useMemo as useMemo8,
|
|
11719
12013
|
useRef as useRef14,
|
|
11720
|
-
useState as
|
|
12014
|
+
useState as useState25
|
|
11721
12015
|
} from "react";
|
|
11722
12016
|
|
|
11723
12017
|
// src/components/MultipleChoice/MultipleChoice.tsx
|
|
11724
|
-
import { useEffect as
|
|
12018
|
+
import { useEffect as useEffect23, useState as useState24 } from "react";
|
|
11725
12019
|
import { CheckCircle as CheckCircle5, XCircle as XCircle4, Check as Check5 } from "phosphor-react";
|
|
11726
|
-
import { jsx as
|
|
12020
|
+
import { jsx as jsx55, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
11727
12021
|
var MultipleChoiceList = ({
|
|
11728
12022
|
disabled = false,
|
|
11729
12023
|
className = "",
|
|
@@ -11733,16 +12027,16 @@ var MultipleChoiceList = ({
|
|
|
11733
12027
|
onHandleSelectedValues,
|
|
11734
12028
|
mode = "interactive"
|
|
11735
12029
|
}) => {
|
|
11736
|
-
const [actualValue, setActualValue] =
|
|
11737
|
-
|
|
12030
|
+
const [actualValue, setActualValue] = useState24(selectedValues);
|
|
12031
|
+
useEffect23(() => {
|
|
11738
12032
|
setActualValue(selectedValues);
|
|
11739
12033
|
}, [selectedValues]);
|
|
11740
12034
|
const getStatusBadge2 = (status) => {
|
|
11741
12035
|
switch (status) {
|
|
11742
12036
|
case "correct":
|
|
11743
|
-
return /* @__PURE__ */
|
|
12037
|
+
return /* @__PURE__ */ jsx55(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx55(CheckCircle5, {}), children: "Resposta correta" });
|
|
11744
12038
|
case "incorrect":
|
|
11745
|
-
return /* @__PURE__ */
|
|
12039
|
+
return /* @__PURE__ */ jsx55(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ jsx55(XCircle4, {}), children: "Resposta incorreta" });
|
|
11746
12040
|
default:
|
|
11747
12041
|
return null;
|
|
11748
12042
|
}
|
|
@@ -11763,14 +12057,14 @@ var MultipleChoiceList = ({
|
|
|
11763
12057
|
isSelected ? "border-primary-950 bg-primary-950 text-text" : "border-border-400 bg-background",
|
|
11764
12058
|
isDisabled && "opacity-40 cursor-not-allowed"
|
|
11765
12059
|
);
|
|
11766
|
-
return /* @__PURE__ */
|
|
12060
|
+
return /* @__PURE__ */ jsx55("div", { className: checkboxClasses, children: isSelected && /* @__PURE__ */ jsx55(Check5, { size: 16, weight: "bold" }) });
|
|
11767
12061
|
};
|
|
11768
12062
|
if (mode === "readonly") {
|
|
11769
|
-
return /* @__PURE__ */
|
|
12063
|
+
return /* @__PURE__ */ jsx55("div", { className: cn("flex flex-col gap-2", className), children: choices.map((choice, i) => {
|
|
11770
12064
|
const isSelected = actualValue?.includes(choice.value) || false;
|
|
11771
12065
|
const statusStyles = getStatusStyles2(choice.status);
|
|
11772
12066
|
const statusBadge = getStatusBadge2(choice.status);
|
|
11773
|
-
return /* @__PURE__ */
|
|
12067
|
+
return /* @__PURE__ */ jsxs40(
|
|
11774
12068
|
"div",
|
|
11775
12069
|
{
|
|
11776
12070
|
className: cn(
|
|
@@ -11779,9 +12073,9 @@ var MultipleChoiceList = ({
|
|
|
11779
12073
|
choice.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
11780
12074
|
),
|
|
11781
12075
|
children: [
|
|
11782
|
-
/* @__PURE__ */
|
|
12076
|
+
/* @__PURE__ */ jsxs40("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
11783
12077
|
renderVisualCheckbox(isSelected, choice.disabled || disabled),
|
|
11784
|
-
/* @__PURE__ */
|
|
12078
|
+
/* @__PURE__ */ jsx55(
|
|
11785
12079
|
"span",
|
|
11786
12080
|
{
|
|
11787
12081
|
className: cn(
|
|
@@ -11793,14 +12087,14 @@ var MultipleChoiceList = ({
|
|
|
11793
12087
|
}
|
|
11794
12088
|
)
|
|
11795
12089
|
] }),
|
|
11796
|
-
statusBadge && /* @__PURE__ */
|
|
12090
|
+
statusBadge && /* @__PURE__ */ jsx55("div", { className: "flex-shrink-0", children: statusBadge })
|
|
11797
12091
|
]
|
|
11798
12092
|
},
|
|
11799
12093
|
`readonly-${choice.value}-${i}`
|
|
11800
12094
|
);
|
|
11801
12095
|
}) });
|
|
11802
12096
|
}
|
|
11803
|
-
return /* @__PURE__ */
|
|
12097
|
+
return /* @__PURE__ */ jsx55(
|
|
11804
12098
|
"div",
|
|
11805
12099
|
{
|
|
11806
12100
|
className: cn(
|
|
@@ -11808,7 +12102,7 @@ var MultipleChoiceList = ({
|
|
|
11808
12102
|
disabled ? "opacity-50 cursor-not-allowed" : "",
|
|
11809
12103
|
className
|
|
11810
12104
|
),
|
|
11811
|
-
children: /* @__PURE__ */
|
|
12105
|
+
children: /* @__PURE__ */ jsx55(
|
|
11812
12106
|
CheckboxList_default,
|
|
11813
12107
|
{
|
|
11814
12108
|
name,
|
|
@@ -11818,12 +12112,12 @@ var MultipleChoiceList = ({
|
|
|
11818
12112
|
onHandleSelectedValues?.(v);
|
|
11819
12113
|
},
|
|
11820
12114
|
disabled,
|
|
11821
|
-
children: choices.map((choice, i) => /* @__PURE__ */
|
|
12115
|
+
children: choices.map((choice, i) => /* @__PURE__ */ jsxs40(
|
|
11822
12116
|
"div",
|
|
11823
12117
|
{
|
|
11824
12118
|
className: "flex flex-row gap-2 items-center",
|
|
11825
12119
|
children: [
|
|
11826
|
-
/* @__PURE__ */
|
|
12120
|
+
/* @__PURE__ */ jsx55(
|
|
11827
12121
|
CheckboxListItem,
|
|
11828
12122
|
{
|
|
11829
12123
|
value: choice.value,
|
|
@@ -11831,7 +12125,7 @@ var MultipleChoiceList = ({
|
|
|
11831
12125
|
disabled: choice.disabled || disabled
|
|
11832
12126
|
}
|
|
11833
12127
|
),
|
|
11834
|
-
/* @__PURE__ */
|
|
12128
|
+
/* @__PURE__ */ jsx55(
|
|
11835
12129
|
"label",
|
|
11836
12130
|
{
|
|
11837
12131
|
htmlFor: `interactive-${choice.value}-${i}`,
|
|
@@ -11860,13 +12154,13 @@ import { CheckCircle as CheckCircle6, XCircle as XCircle5 } from "phosphor-react
|
|
|
11860
12154
|
var mock_image_question_default = "./mock-image-question-HEZCLFDL.png";
|
|
11861
12155
|
|
|
11862
12156
|
// src/components/Quiz/QuizContent.tsx
|
|
11863
|
-
import { Fragment as Fragment11, jsx as
|
|
12157
|
+
import { Fragment as Fragment11, jsx as jsx56, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
11864
12158
|
var getStatusBadge = (status) => {
|
|
11865
12159
|
switch (status) {
|
|
11866
12160
|
case "correct":
|
|
11867
|
-
return /* @__PURE__ */
|
|
12161
|
+
return /* @__PURE__ */ jsx56(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx56(CheckCircle6, {}), children: "Resposta correta" });
|
|
11868
12162
|
case "incorrect":
|
|
11869
|
-
return /* @__PURE__ */
|
|
12163
|
+
return /* @__PURE__ */ jsx56(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ jsx56(XCircle5, {}), children: "Resposta incorreta" });
|
|
11870
12164
|
default:
|
|
11871
12165
|
return null;
|
|
11872
12166
|
}
|
|
@@ -11881,11 +12175,11 @@ var getStatusStyles = (variantCorrect) => {
|
|
|
11881
12175
|
};
|
|
11882
12176
|
var QuizSubTitle = forwardRef21(
|
|
11883
12177
|
({ subTitle, ...props }, ref) => {
|
|
11884
|
-
return /* @__PURE__ */
|
|
12178
|
+
return /* @__PURE__ */ jsx56("div", { className: "px-4 pb-2 pt-6", ...props, ref, children: /* @__PURE__ */ jsx56("p", { className: "font-bold text-lg text-text-950", children: subTitle }) });
|
|
11885
12179
|
}
|
|
11886
12180
|
);
|
|
11887
12181
|
var QuizContainer = forwardRef21(({ children, className, ...props }, ref) => {
|
|
11888
|
-
return /* @__PURE__ */
|
|
12182
|
+
return /* @__PURE__ */ jsx56(
|
|
11889
12183
|
"div",
|
|
11890
12184
|
{
|
|
11891
12185
|
ref,
|
|
@@ -11938,10 +12232,10 @@ var QuizAlternative = ({ paddingBottom }) => {
|
|
|
11938
12232
|
};
|
|
11939
12233
|
});
|
|
11940
12234
|
if (!alternatives)
|
|
11941
|
-
return /* @__PURE__ */
|
|
11942
|
-
return /* @__PURE__ */
|
|
11943
|
-
/* @__PURE__ */
|
|
11944
|
-
/* @__PURE__ */
|
|
12235
|
+
return /* @__PURE__ */ jsx56("div", { children: /* @__PURE__ */ jsx56("p", { children: "N\xE3o h\xE1 Alternativas" }) });
|
|
12236
|
+
return /* @__PURE__ */ jsxs41(Fragment11, { children: [
|
|
12237
|
+
/* @__PURE__ */ jsx56(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
12238
|
+
/* @__PURE__ */ jsx56(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx56("div", { className: "space-y-4", children: /* @__PURE__ */ jsx56(
|
|
11945
12239
|
AlternativesList,
|
|
11946
12240
|
{
|
|
11947
12241
|
mode: variant === "default" ? "interactive" : "readonly",
|
|
@@ -12005,7 +12299,7 @@ var QuizMultipleChoice = ({ paddingBottom }) => {
|
|
|
12005
12299
|
variant,
|
|
12006
12300
|
currentQuestionResult?.selectedOptions
|
|
12007
12301
|
]);
|
|
12008
|
-
const handleSelectedValues =
|
|
12302
|
+
const handleSelectedValues = useCallback7(
|
|
12009
12303
|
(values) => {
|
|
12010
12304
|
if (currentQuestion) {
|
|
12011
12305
|
selectMultipleAnswer(currentQuestion.id, values);
|
|
@@ -12044,10 +12338,10 @@ var QuizMultipleChoice = ({ paddingBottom }) => {
|
|
|
12044
12338
|
};
|
|
12045
12339
|
});
|
|
12046
12340
|
if (!choices)
|
|
12047
|
-
return /* @__PURE__ */
|
|
12048
|
-
return /* @__PURE__ */
|
|
12049
|
-
/* @__PURE__ */
|
|
12050
|
-
/* @__PURE__ */
|
|
12341
|
+
return /* @__PURE__ */ jsx56("div", { children: /* @__PURE__ */ jsx56("p", { children: "N\xE3o h\xE1 Escolhas Multiplas" }) });
|
|
12342
|
+
return /* @__PURE__ */ jsxs41(Fragment11, { children: [
|
|
12343
|
+
/* @__PURE__ */ jsx56(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
12344
|
+
/* @__PURE__ */ jsx56(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx56("div", { className: "space-y-4", children: /* @__PURE__ */ jsx56(
|
|
12051
12345
|
MultipleChoiceList,
|
|
12052
12346
|
{
|
|
12053
12347
|
choices,
|
|
@@ -12081,7 +12375,7 @@ var QuizDissertative = ({ paddingBottom }) => {
|
|
|
12081
12375
|
selectDissertativeAnswer(currentQuestion.id, value);
|
|
12082
12376
|
}
|
|
12083
12377
|
};
|
|
12084
|
-
const adjustTextareaHeight =
|
|
12378
|
+
const adjustTextareaHeight = useCallback7(() => {
|
|
12085
12379
|
if (textareaRef.current) {
|
|
12086
12380
|
textareaRef.current.style.height = "auto";
|
|
12087
12381
|
const scrollHeight = textareaRef.current.scrollHeight;
|
|
@@ -12091,16 +12385,16 @@ var QuizDissertative = ({ paddingBottom }) => {
|
|
|
12091
12385
|
textareaRef.current.style.height = `${newHeight}px`;
|
|
12092
12386
|
}
|
|
12093
12387
|
}, []);
|
|
12094
|
-
|
|
12388
|
+
useEffect24(() => {
|
|
12095
12389
|
adjustTextareaHeight();
|
|
12096
12390
|
}, [currentAnswer, adjustTextareaHeight]);
|
|
12097
12391
|
if (!currentQuestion) {
|
|
12098
|
-
return /* @__PURE__ */
|
|
12392
|
+
return /* @__PURE__ */ jsx56("div", { className: "space-y-4", children: /* @__PURE__ */ jsx56("p", { className: "text-text-600 text-md", children: "Nenhuma quest\xE3o dispon\xEDvel" }) });
|
|
12099
12393
|
}
|
|
12100
12394
|
const localAnswer = (variant == "result" ? currentQuestionResult?.answer : currentAnswer?.answer) || "";
|
|
12101
|
-
return /* @__PURE__ */
|
|
12102
|
-
/* @__PURE__ */
|
|
12103
|
-
/* @__PURE__ */
|
|
12395
|
+
return /* @__PURE__ */ jsxs41(Fragment11, { children: [
|
|
12396
|
+
/* @__PURE__ */ jsx56(QuizSubTitle, { subTitle: "Resposta" }),
|
|
12397
|
+
/* @__PURE__ */ jsx56(QuizContainer, { className: cn(variant != "result" && paddingBottom), children: /* @__PURE__ */ jsx56("div", { className: "space-y-4 max-h-[600px] overflow-y-auto", children: variant === "default" ? /* @__PURE__ */ jsx56("div", { className: "space-y-4", children: /* @__PURE__ */ jsx56(
|
|
12104
12398
|
TextArea_default,
|
|
12105
12399
|
{
|
|
12106
12400
|
ref: textareaRef,
|
|
@@ -12112,10 +12406,10 @@ var QuizDissertative = ({ paddingBottom }) => {
|
|
|
12112
12406
|
maxLength: charLimit,
|
|
12113
12407
|
showCharacterCount: !!charLimit
|
|
12114
12408
|
}
|
|
12115
|
-
) }) : /* @__PURE__ */
|
|
12116
|
-
variant === "result" && currentQuestionResult?.answerStatus == "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && /* @__PURE__ */
|
|
12117
|
-
/* @__PURE__ */
|
|
12118
|
-
/* @__PURE__ */
|
|
12409
|
+
) }) : /* @__PURE__ */ jsx56("div", { className: "space-y-4", children: /* @__PURE__ */ jsx56("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: localAnswer || "Nenhuma resposta fornecida" }) }) }) }),
|
|
12410
|
+
variant === "result" && currentQuestionResult?.answerStatus == "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && /* @__PURE__ */ jsxs41(Fragment11, { children: [
|
|
12411
|
+
/* @__PURE__ */ jsx56(QuizSubTitle, { subTitle: "Observa\xE7\xE3o do professor" }),
|
|
12412
|
+
/* @__PURE__ */ jsx56(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx56("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: currentQuestionResult?.teacherFeedback }) })
|
|
12119
12413
|
] })
|
|
12120
12414
|
] });
|
|
12121
12415
|
};
|
|
@@ -12141,16 +12435,16 @@ var QuizTrueOrFalse = ({ paddingBottom }) => {
|
|
|
12141
12435
|
];
|
|
12142
12436
|
const getLetterByIndex = (index) => String.fromCodePoint(97 + index);
|
|
12143
12437
|
const isDefaultVariant = variant === "default";
|
|
12144
|
-
return /* @__PURE__ */
|
|
12145
|
-
/* @__PURE__ */
|
|
12146
|
-
/* @__PURE__ */
|
|
12438
|
+
return /* @__PURE__ */ jsxs41(Fragment11, { children: [
|
|
12439
|
+
/* @__PURE__ */ jsx56(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
12440
|
+
/* @__PURE__ */ jsx56(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx56("div", { className: "flex flex-col gap-3.5", children: options.map((option, index) => {
|
|
12147
12441
|
const variantCorrect = option.isCorrect ? "correct" : "incorrect";
|
|
12148
|
-
return /* @__PURE__ */
|
|
12442
|
+
return /* @__PURE__ */ jsxs41(
|
|
12149
12443
|
"section",
|
|
12150
12444
|
{
|
|
12151
12445
|
className: "flex flex-col gap-2",
|
|
12152
12446
|
children: [
|
|
12153
|
-
/* @__PURE__ */
|
|
12447
|
+
/* @__PURE__ */ jsxs41(
|
|
12154
12448
|
"div",
|
|
12155
12449
|
{
|
|
12156
12450
|
className: cn(
|
|
@@ -12158,20 +12452,20 @@ var QuizTrueOrFalse = ({ paddingBottom }) => {
|
|
|
12158
12452
|
isDefaultVariant ? "" : getStatusStyles(variantCorrect)
|
|
12159
12453
|
),
|
|
12160
12454
|
children: [
|
|
12161
|
-
/* @__PURE__ */
|
|
12162
|
-
isDefaultVariant ? /* @__PURE__ */
|
|
12163
|
-
/* @__PURE__ */
|
|
12164
|
-
/* @__PURE__ */
|
|
12165
|
-
/* @__PURE__ */
|
|
12166
|
-
/* @__PURE__ */
|
|
12455
|
+
/* @__PURE__ */ jsx56("p", { className: "text-text-900 text-sm", children: getLetterByIndex(index).concat(") ").concat(option.label) }),
|
|
12456
|
+
isDefaultVariant ? /* @__PURE__ */ jsxs41(Select_default, { size: "medium", children: [
|
|
12457
|
+
/* @__PURE__ */ jsx56(SelectTrigger, { className: "w-[180px]", children: /* @__PURE__ */ jsx56(SelectValue, { placeholder: "Selecione opc\xE3o" }) }),
|
|
12458
|
+
/* @__PURE__ */ jsxs41(SelectContent, { children: [
|
|
12459
|
+
/* @__PURE__ */ jsx56(SelectItem, { value: "V", children: "Verdadeiro" }),
|
|
12460
|
+
/* @__PURE__ */ jsx56(SelectItem, { value: "F", children: "Falso" })
|
|
12167
12461
|
] })
|
|
12168
|
-
] }) : /* @__PURE__ */
|
|
12462
|
+
] }) : /* @__PURE__ */ jsx56("div", { className: "flex-shrink-0", children: getStatusBadge(variantCorrect) })
|
|
12169
12463
|
]
|
|
12170
12464
|
}
|
|
12171
12465
|
),
|
|
12172
|
-
!isDefaultVariant && /* @__PURE__ */
|
|
12173
|
-
/* @__PURE__ */
|
|
12174
|
-
!option.isCorrect && /* @__PURE__ */
|
|
12466
|
+
!isDefaultVariant && /* @__PURE__ */ jsxs41("span", { className: "flex flex-row gap-2 items-center", children: [
|
|
12467
|
+
/* @__PURE__ */ jsx56("p", { className: "text-text-800 text-2xs", children: "Resposta selecionada: V" }),
|
|
12468
|
+
!option.isCorrect && /* @__PURE__ */ jsx56("p", { className: "text-text-800 text-2xs", children: "Resposta correta: F" })
|
|
12175
12469
|
] })
|
|
12176
12470
|
]
|
|
12177
12471
|
},
|
|
@@ -12232,7 +12526,7 @@ var QuizConnectDots = ({ paddingBottom }) => {
|
|
|
12232
12526
|
isCorrect: false
|
|
12233
12527
|
}
|
|
12234
12528
|
];
|
|
12235
|
-
const [userAnswers, setUserAnswers] =
|
|
12529
|
+
const [userAnswers, setUserAnswers] = useState25(() => {
|
|
12236
12530
|
if (variant === "result") {
|
|
12237
12531
|
return mockUserAnswers;
|
|
12238
12532
|
}
|
|
@@ -12261,13 +12555,13 @@ var QuizConnectDots = ({ paddingBottom }) => {
|
|
|
12261
12555
|
const assignedDots = new Set(
|
|
12262
12556
|
userAnswers.map((a) => a.dotOption).filter(Boolean)
|
|
12263
12557
|
);
|
|
12264
|
-
return /* @__PURE__ */
|
|
12265
|
-
/* @__PURE__ */
|
|
12266
|
-
/* @__PURE__ */
|
|
12558
|
+
return /* @__PURE__ */ jsxs41(Fragment11, { children: [
|
|
12559
|
+
/* @__PURE__ */ jsx56(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
12560
|
+
/* @__PURE__ */ jsx56(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx56("div", { className: "flex flex-col gap-3.5", children: options.map((option, index) => {
|
|
12267
12561
|
const answer = userAnswers[index];
|
|
12268
12562
|
const variantCorrect = answer.isCorrect ? "correct" : "incorrect";
|
|
12269
|
-
return /* @__PURE__ */
|
|
12270
|
-
/* @__PURE__ */
|
|
12563
|
+
return /* @__PURE__ */ jsxs41("section", { className: "flex flex-col gap-2", children: [
|
|
12564
|
+
/* @__PURE__ */ jsxs41(
|
|
12271
12565
|
"div",
|
|
12272
12566
|
{
|
|
12273
12567
|
className: cn(
|
|
@@ -12275,30 +12569,30 @@ var QuizConnectDots = ({ paddingBottom }) => {
|
|
|
12275
12569
|
isDefaultVariant ? "" : getStatusStyles(variantCorrect)
|
|
12276
12570
|
),
|
|
12277
12571
|
children: [
|
|
12278
|
-
/* @__PURE__ */
|
|
12279
|
-
isDefaultVariant ? /* @__PURE__ */
|
|
12572
|
+
/* @__PURE__ */ jsx56("p", { className: "text-text-900 text-sm", children: getLetterByIndex(index) + ") " + option.label }),
|
|
12573
|
+
isDefaultVariant ? /* @__PURE__ */ jsxs41(
|
|
12280
12574
|
Select_default,
|
|
12281
12575
|
{
|
|
12282
12576
|
size: "medium",
|
|
12283
12577
|
value: answer.dotOption || void 0,
|
|
12284
12578
|
onValueChange: (value) => handleSelectDot(index, value),
|
|
12285
12579
|
children: [
|
|
12286
|
-
/* @__PURE__ */
|
|
12287
|
-
/* @__PURE__ */
|
|
12580
|
+
/* @__PURE__ */ jsx56(SelectTrigger, { className: "w-[180px]", children: /* @__PURE__ */ jsx56(SelectValue, { placeholder: "Selecione op\xE7\xE3o" }) }),
|
|
12581
|
+
/* @__PURE__ */ jsx56(SelectContent, { children: dotsOptions.filter(
|
|
12288
12582
|
(dot) => !assignedDots.has(dot.label) || answer.dotOption === dot.label
|
|
12289
|
-
).map((dot) => /* @__PURE__ */
|
|
12583
|
+
).map((dot) => /* @__PURE__ */ jsx56(SelectItem, { value: dot.label, children: dot.label }, dot.label)) })
|
|
12290
12584
|
]
|
|
12291
12585
|
}
|
|
12292
|
-
) : /* @__PURE__ */
|
|
12586
|
+
) : /* @__PURE__ */ jsx56("div", { className: "flex-shrink-0", children: answer.isCorrect === null ? null : getStatusBadge(variantCorrect) })
|
|
12293
12587
|
]
|
|
12294
12588
|
}
|
|
12295
12589
|
),
|
|
12296
|
-
!isDefaultVariant && /* @__PURE__ */
|
|
12297
|
-
/* @__PURE__ */
|
|
12590
|
+
!isDefaultVariant && /* @__PURE__ */ jsxs41("span", { className: "flex flex-row gap-2 items-center", children: [
|
|
12591
|
+
/* @__PURE__ */ jsxs41("p", { className: "text-text-800 text-2xs", children: [
|
|
12298
12592
|
"Resposta selecionada: ",
|
|
12299
12593
|
answer.dotOption || "Nenhuma"
|
|
12300
12594
|
] }),
|
|
12301
|
-
!answer.isCorrect && /* @__PURE__ */
|
|
12595
|
+
!answer.isCorrect && /* @__PURE__ */ jsxs41("p", { className: "text-text-800 text-2xs", children: [
|
|
12302
12596
|
"Resposta correta: ",
|
|
12303
12597
|
answer.correctOption
|
|
12304
12598
|
] })
|
|
@@ -12351,7 +12645,7 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
12351
12645
|
isCorrect: true
|
|
12352
12646
|
}
|
|
12353
12647
|
];
|
|
12354
|
-
const [answers, setAnswers] =
|
|
12648
|
+
const [answers, setAnswers] = useState25({});
|
|
12355
12649
|
const baseId = useId11();
|
|
12356
12650
|
const getAvailableOptionsForSelect = (selectId) => {
|
|
12357
12651
|
const usedOptions = new Set(
|
|
@@ -12367,18 +12661,18 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
12367
12661
|
const mockAnswer = mockUserAnswers.find(
|
|
12368
12662
|
(answer) => answer.selectId === selectId
|
|
12369
12663
|
);
|
|
12370
|
-
return /* @__PURE__ */
|
|
12664
|
+
return /* @__PURE__ */ jsx56("p", { className: "inline-flex mb-2.5 text-success-600 font-semibold text-md border-b-2 border-success-600", children: mockAnswer?.correctAnswer });
|
|
12371
12665
|
};
|
|
12372
12666
|
const renderDefaultElement = (selectId, startIndex, selectedValue, availableOptionsForThisSelect) => {
|
|
12373
|
-
return /* @__PURE__ */
|
|
12667
|
+
return /* @__PURE__ */ jsxs41(
|
|
12374
12668
|
Select_default,
|
|
12375
12669
|
{
|
|
12376
12670
|
value: selectedValue,
|
|
12377
12671
|
onValueChange: (value) => handleSelectChange(selectId, value),
|
|
12378
12672
|
className: "inline-flex mb-2.5",
|
|
12379
12673
|
children: [
|
|
12380
|
-
/* @__PURE__ */
|
|
12381
|
-
/* @__PURE__ */
|
|
12674
|
+
/* @__PURE__ */ jsx56(SelectTrigger, { className: "inline-flex w-auto min-w-[140px] h-8 mx-1 bg-background border-gray-300", children: /* @__PURE__ */ jsx56(SelectValue, { placeholder: "Selecione op\xE7\xE3o" }) }),
|
|
12675
|
+
/* @__PURE__ */ jsx56(SelectContent, { children: availableOptionsForThisSelect.map((option, index) => /* @__PURE__ */ jsx56(SelectItem, { value: option, children: option }, `${option}-${index}`)) })
|
|
12382
12676
|
]
|
|
12383
12677
|
},
|
|
12384
12678
|
`${selectId}-${startIndex}`
|
|
@@ -12390,8 +12684,8 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
12390
12684
|
);
|
|
12391
12685
|
if (!mockAnswer) return null;
|
|
12392
12686
|
const action = mockAnswer.isCorrect ? "success" : "error";
|
|
12393
|
-
const icon = mockAnswer.isCorrect ? /* @__PURE__ */
|
|
12394
|
-
return /* @__PURE__ */
|
|
12687
|
+
const icon = mockAnswer.isCorrect ? /* @__PURE__ */ jsx56(CheckCircle6, {}) : /* @__PURE__ */ jsx56(XCircle5, {});
|
|
12688
|
+
return /* @__PURE__ */ jsx56(
|
|
12395
12689
|
Badge_default,
|
|
12396
12690
|
{
|
|
12397
12691
|
variant: "solid",
|
|
@@ -12399,7 +12693,7 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
12399
12693
|
iconRight: icon,
|
|
12400
12694
|
size: "large",
|
|
12401
12695
|
className: "py-3 w-[180px] justify-between mb-2.5",
|
|
12402
|
-
children: /* @__PURE__ */
|
|
12696
|
+
children: /* @__PURE__ */ jsx56("span", { className: "text-text-900", children: mockAnswer.userAnswer })
|
|
12403
12697
|
},
|
|
12404
12698
|
selectId
|
|
12405
12699
|
);
|
|
@@ -12455,25 +12749,25 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
12455
12749
|
}
|
|
12456
12750
|
return elements;
|
|
12457
12751
|
};
|
|
12458
|
-
return /* @__PURE__ */
|
|
12459
|
-
/* @__PURE__ */
|
|
12460
|
-
/* @__PURE__ */
|
|
12752
|
+
return /* @__PURE__ */ jsxs41(Fragment11, { children: [
|
|
12753
|
+
/* @__PURE__ */ jsx56(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
12754
|
+
/* @__PURE__ */ jsx56(QuizContainer, { className: "h-auto pb-0", children: /* @__PURE__ */ jsx56("div", { className: "space-y-6 px-4 h-auto", children: /* @__PURE__ */ jsx56(
|
|
12461
12755
|
"div",
|
|
12462
12756
|
{
|
|
12463
12757
|
className: cn(
|
|
12464
12758
|
"text-lg text-text-900 leading-8 h-auto",
|
|
12465
12759
|
variant != "result" && paddingBottom
|
|
12466
12760
|
),
|
|
12467
|
-
children: renderTextWithSelects(exampleText).map((element) => /* @__PURE__ */
|
|
12761
|
+
children: renderTextWithSelects(exampleText).map((element) => /* @__PURE__ */ jsx56("span", { children: element.element }, element.id))
|
|
12468
12762
|
}
|
|
12469
12763
|
) }) }),
|
|
12470
|
-
variant === "result" && /* @__PURE__ */
|
|
12471
|
-
/* @__PURE__ */
|
|
12472
|
-
/* @__PURE__ */
|
|
12764
|
+
variant === "result" && /* @__PURE__ */ jsxs41(Fragment11, { children: [
|
|
12765
|
+
/* @__PURE__ */ jsx56(QuizSubTitle, { subTitle: "Resultado" }),
|
|
12766
|
+
/* @__PURE__ */ jsx56(QuizContainer, { className: "h-auto pb-0", children: /* @__PURE__ */ jsx56("div", { className: "space-y-6 px-4", children: /* @__PURE__ */ jsx56(
|
|
12473
12767
|
"div",
|
|
12474
12768
|
{
|
|
12475
12769
|
className: cn("text-lg text-text-900 leading-8", paddingBottom),
|
|
12476
|
-
children: renderTextWithSelects(exampleText, true).map((element) => /* @__PURE__ */
|
|
12770
|
+
children: renderTextWithSelects(exampleText, true).map((element) => /* @__PURE__ */ jsx56("span", { children: element.element }, element.id))
|
|
12477
12771
|
}
|
|
12478
12772
|
) }) })
|
|
12479
12773
|
] })
|
|
@@ -12491,7 +12785,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
12491
12785
|
};
|
|
12492
12786
|
const correctRadiusRelative = calculateCorrectRadiusRelative();
|
|
12493
12787
|
const mockUserAnswerRelative = { x: 0.72, y: 0.348 };
|
|
12494
|
-
const [clickPositionRelative, setClickPositionRelative] =
|
|
12788
|
+
const [clickPositionRelative, setClickPositionRelative] = useState25(variant == "result" ? mockUserAnswerRelative : null);
|
|
12495
12789
|
const convertToRelativeCoordinates = (x, y, rect) => {
|
|
12496
12790
|
const safeWidth = Math.max(rect.width, 1e-3);
|
|
12497
12791
|
const safeHeight = Math.max(rect.height, 1e-3);
|
|
@@ -12527,36 +12821,36 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
12527
12821
|
}
|
|
12528
12822
|
return "bg-success-600/70 border-white";
|
|
12529
12823
|
};
|
|
12530
|
-
return /* @__PURE__ */
|
|
12531
|
-
/* @__PURE__ */
|
|
12532
|
-
/* @__PURE__ */
|
|
12824
|
+
return /* @__PURE__ */ jsxs41(Fragment11, { children: [
|
|
12825
|
+
/* @__PURE__ */ jsx56(QuizSubTitle, { subTitle: "Clique na \xE1rea correta" }),
|
|
12826
|
+
/* @__PURE__ */ jsx56(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsxs41(
|
|
12533
12827
|
"div",
|
|
12534
12828
|
{
|
|
12535
12829
|
"data-testid": "quiz-image-container",
|
|
12536
12830
|
className: "space-y-6 p-3 relative inline-block",
|
|
12537
12831
|
children: [
|
|
12538
|
-
variant == "result" && /* @__PURE__ */
|
|
12832
|
+
variant == "result" && /* @__PURE__ */ jsxs41(
|
|
12539
12833
|
"div",
|
|
12540
12834
|
{
|
|
12541
12835
|
"data-testid": "quiz-legend",
|
|
12542
12836
|
className: "flex items-center gap-4 text-xs",
|
|
12543
12837
|
children: [
|
|
12544
|
-
/* @__PURE__ */
|
|
12545
|
-
/* @__PURE__ */
|
|
12546
|
-
/* @__PURE__ */
|
|
12838
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex items-center gap-2", children: [
|
|
12839
|
+
/* @__PURE__ */ jsx56("div", { className: "w-3 h-3 rounded-full bg-indicator-primary/70 border border-[#F8CC2E]" }),
|
|
12840
|
+
/* @__PURE__ */ jsx56("span", { className: "text-text-600 font-medium text-sm", children: "\xC1rea correta" })
|
|
12547
12841
|
] }),
|
|
12548
|
-
/* @__PURE__ */
|
|
12549
|
-
/* @__PURE__ */
|
|
12550
|
-
/* @__PURE__ */
|
|
12842
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex items-center gap-2", children: [
|
|
12843
|
+
/* @__PURE__ */ jsx56("div", { className: "w-3 h-3 rounded-full bg-success-600/70 border border-white" }),
|
|
12844
|
+
/* @__PURE__ */ jsx56("span", { className: "text-text-600 font-medium text-sm", children: "Resposta correta" })
|
|
12551
12845
|
] }),
|
|
12552
|
-
/* @__PURE__ */
|
|
12553
|
-
/* @__PURE__ */
|
|
12554
|
-
/* @__PURE__ */
|
|
12846
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex items-center gap-2", children: [
|
|
12847
|
+
/* @__PURE__ */ jsx56("div", { className: "w-3 h-3 rounded-full bg-indicator-error/70 border border-white" }),
|
|
12848
|
+
/* @__PURE__ */ jsx56("span", { className: "text-text-600 font-medium text-sm", children: "Resposta incorreta" })
|
|
12555
12849
|
] })
|
|
12556
12850
|
]
|
|
12557
12851
|
}
|
|
12558
12852
|
),
|
|
12559
|
-
/* @__PURE__ */
|
|
12853
|
+
/* @__PURE__ */ jsxs41(
|
|
12560
12854
|
"button",
|
|
12561
12855
|
{
|
|
12562
12856
|
"data-testid": "quiz-image-button",
|
|
@@ -12571,7 +12865,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
12571
12865
|
},
|
|
12572
12866
|
"aria-label": "\xC1rea da imagem interativa",
|
|
12573
12867
|
children: [
|
|
12574
|
-
/* @__PURE__ */
|
|
12868
|
+
/* @__PURE__ */ jsx56(
|
|
12575
12869
|
"img",
|
|
12576
12870
|
{
|
|
12577
12871
|
"data-testid": "quiz-image",
|
|
@@ -12580,7 +12874,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
12580
12874
|
className: "w-full h-auto rounded-md"
|
|
12581
12875
|
}
|
|
12582
12876
|
),
|
|
12583
|
-
variant === "result" && /* @__PURE__ */
|
|
12877
|
+
variant === "result" && /* @__PURE__ */ jsx56(
|
|
12584
12878
|
"div",
|
|
12585
12879
|
{
|
|
12586
12880
|
"data-testid": "quiz-correct-circle",
|
|
@@ -12595,7 +12889,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
12595
12889
|
}
|
|
12596
12890
|
}
|
|
12597
12891
|
),
|
|
12598
|
-
clickPositionRelative && /* @__PURE__ */
|
|
12892
|
+
clickPositionRelative && /* @__PURE__ */ jsx56(
|
|
12599
12893
|
"div",
|
|
12600
12894
|
{
|
|
12601
12895
|
"data-testid": "quiz-user-circle",
|
|
@@ -12620,7 +12914,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
12620
12914
|
};
|
|
12621
12915
|
|
|
12622
12916
|
// src/components/Quiz/Quiz.tsx
|
|
12623
|
-
import { Fragment as Fragment12, jsx as
|
|
12917
|
+
import { Fragment as Fragment12, jsx as jsx57, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
12624
12918
|
var getQuizTypeConfig = (type) => {
|
|
12625
12919
|
const QUIZ_TYPE_CONFIG = {
|
|
12626
12920
|
["SIMULADO" /* SIMULADO */]: {
|
|
@@ -12659,10 +12953,10 @@ var getFinishConfirmationText = (type) => {
|
|
|
12659
12953
|
};
|
|
12660
12954
|
var Quiz = forwardRef22(({ children, className, variant = "default", ...props }, ref) => {
|
|
12661
12955
|
const { setVariant } = useQuizStore();
|
|
12662
|
-
|
|
12956
|
+
useEffect25(() => {
|
|
12663
12957
|
setVariant(variant);
|
|
12664
12958
|
}, [variant, setVariant]);
|
|
12665
|
-
return /* @__PURE__ */
|
|
12959
|
+
return /* @__PURE__ */ jsx57("div", { ref, className: cn("flex flex-col", className), ...props, children });
|
|
12666
12960
|
});
|
|
12667
12961
|
var QuizTitle = forwardRef22(({ className, onBack, ...props }, ref) => {
|
|
12668
12962
|
const {
|
|
@@ -12674,7 +12968,7 @@ var QuizTitle = forwardRef22(({ className, onBack, ...props }, ref) => {
|
|
|
12674
12968
|
formatTime: formatTime2,
|
|
12675
12969
|
isStarted
|
|
12676
12970
|
} = useQuizStore();
|
|
12677
|
-
const [showExitConfirmation, setShowExitConfirmation] =
|
|
12971
|
+
const [showExitConfirmation, setShowExitConfirmation] = useState26(false);
|
|
12678
12972
|
const totalQuestions = getTotalQuestions();
|
|
12679
12973
|
const quizTitle = getQuizTitle();
|
|
12680
12974
|
const handleBackClick = () => {
|
|
@@ -12698,8 +12992,8 @@ var QuizTitle = forwardRef22(({ className, onBack, ...props }, ref) => {
|
|
|
12698
12992
|
const handleCancelExit = () => {
|
|
12699
12993
|
setShowExitConfirmation(false);
|
|
12700
12994
|
};
|
|
12701
|
-
return /* @__PURE__ */
|
|
12702
|
-
/* @__PURE__ */
|
|
12995
|
+
return /* @__PURE__ */ jsxs42(Fragment12, { children: [
|
|
12996
|
+
/* @__PURE__ */ jsxs42(
|
|
12703
12997
|
"div",
|
|
12704
12998
|
{
|
|
12705
12999
|
ref,
|
|
@@ -12709,24 +13003,24 @@ var QuizTitle = forwardRef22(({ className, onBack, ...props }, ref) => {
|
|
|
12709
13003
|
),
|
|
12710
13004
|
...props,
|
|
12711
13005
|
children: [
|
|
12712
|
-
/* @__PURE__ */
|
|
13006
|
+
/* @__PURE__ */ jsx57(
|
|
12713
13007
|
IconButton_default,
|
|
12714
13008
|
{
|
|
12715
|
-
icon: /* @__PURE__ */
|
|
13009
|
+
icon: /* @__PURE__ */ jsx57(CaretLeft2, { size: 24 }),
|
|
12716
13010
|
size: "md",
|
|
12717
13011
|
"aria-label": "Voltar",
|
|
12718
13012
|
onClick: handleBackClick
|
|
12719
13013
|
}
|
|
12720
13014
|
),
|
|
12721
|
-
/* @__PURE__ */
|
|
12722
|
-
/* @__PURE__ */
|
|
12723
|
-
/* @__PURE__ */
|
|
13015
|
+
/* @__PURE__ */ jsxs42("span", { className: "flex flex-col gap-2 text-center", children: [
|
|
13016
|
+
/* @__PURE__ */ jsx57("p", { className: "text-text-950 font-bold text-md", children: quizTitle }),
|
|
13017
|
+
/* @__PURE__ */ jsx57("p", { className: "text-text-600 text-xs", children: totalQuestions > 0 ? `${currentQuestionIndex + 1} de ${totalQuestions}` : "0 de 0" })
|
|
12724
13018
|
] }),
|
|
12725
|
-
/* @__PURE__ */
|
|
13019
|
+
/* @__PURE__ */ jsx57("span", { className: "flex flex-row items-center justify-center", children: /* @__PURE__ */ jsx57(Badge_default, { variant: "outlined", action: "info", iconLeft: /* @__PURE__ */ jsx57(Clock2, {}), children: isStarted ? formatTime2(timeElapsed) : "00:00" }) })
|
|
12726
13020
|
]
|
|
12727
13021
|
}
|
|
12728
13022
|
),
|
|
12729
|
-
/* @__PURE__ */
|
|
13023
|
+
/* @__PURE__ */ jsx57(
|
|
12730
13024
|
AlertDialog,
|
|
12731
13025
|
{
|
|
12732
13026
|
isOpen: showExitConfirmation,
|
|
@@ -12746,7 +13040,7 @@ var QuizHeader = () => {
|
|
|
12746
13040
|
const currentQuestion = getCurrentQuestion();
|
|
12747
13041
|
let currentId = currentQuestion && "questionId" in currentQuestion ? currentQuestion.questionId : currentQuestion?.id;
|
|
12748
13042
|
const questionIndex = getQuestionIndex(currentId);
|
|
12749
|
-
return /* @__PURE__ */
|
|
13043
|
+
return /* @__PURE__ */ jsx57(
|
|
12750
13044
|
HeaderAlternative,
|
|
12751
13045
|
{
|
|
12752
13046
|
title: currentQuestion ? `Quest\xE3o ${questionIndex.toString().padStart(2, "0")}` : "Quest\xE3o",
|
|
@@ -12768,7 +13062,7 @@ var QuizContent = ({ paddingBottom }) => {
|
|
|
12768
13062
|
["IMAGEM" /* IMAGEM */]: QuizImageQuestion
|
|
12769
13063
|
};
|
|
12770
13064
|
const QuestionComponent = currentQuestion ? questionComponents[currentQuestion.questionType] : null;
|
|
12771
|
-
return QuestionComponent ? /* @__PURE__ */
|
|
13065
|
+
return QuestionComponent ? /* @__PURE__ */ jsx57(QuestionComponent, { paddingBottom }) : null;
|
|
12772
13066
|
};
|
|
12773
13067
|
var QuizQuestionList = ({
|
|
12774
13068
|
filterType = "all",
|
|
@@ -12815,18 +13109,18 @@ var QuizQuestionList = ({
|
|
|
12815
13109
|
return "Em branco";
|
|
12816
13110
|
}
|
|
12817
13111
|
};
|
|
12818
|
-
return /* @__PURE__ */
|
|
12819
|
-
Object.entries(filteredGroupedQuestions).length == 0 && /* @__PURE__ */
|
|
13112
|
+
return /* @__PURE__ */ jsxs42("div", { className: "space-y-6 px-4 h-full", children: [
|
|
13113
|
+
Object.entries(filteredGroupedQuestions).length == 0 && /* @__PURE__ */ jsx57("div", { className: "flex items-center justify-center text-gray-500 py-8 h-full", children: /* @__PURE__ */ jsx57("p", { className: "text-lg", children: "Nenhum resultado" }) }),
|
|
12820
13114
|
Object.entries(filteredGroupedQuestions).map(
|
|
12821
|
-
([subjectId, questions]) => /* @__PURE__ */
|
|
12822
|
-
/* @__PURE__ */
|
|
12823
|
-
/* @__PURE__ */
|
|
12824
|
-
/* @__PURE__ */
|
|
13115
|
+
([subjectId, questions]) => /* @__PURE__ */ jsxs42("section", { className: "flex flex-col gap-2", children: [
|
|
13116
|
+
/* @__PURE__ */ jsxs42("span", { className: "pt-6 pb-4 flex flex-row gap-2", children: [
|
|
13117
|
+
/* @__PURE__ */ jsx57("div", { className: "bg-primary-500 p-1 rounded-sm flex items-center justify-center", children: /* @__PURE__ */ jsx57(BookOpen, { size: 17, className: "text-white" }) }),
|
|
13118
|
+
/* @__PURE__ */ jsx57("p", { className: "text-text-800 font-bold text-lg", children: questions?.[0]?.knowledgeMatrix?.[0]?.subject?.name ?? "Sem mat\xE9ria" })
|
|
12825
13119
|
] }),
|
|
12826
|
-
/* @__PURE__ */
|
|
13120
|
+
/* @__PURE__ */ jsx57("ul", { className: "flex flex-col gap-2", children: questions.map((question) => {
|
|
12827
13121
|
const status = getQuestionStatus(question.id);
|
|
12828
13122
|
const questionNumber = getQuestionIndex(question.id);
|
|
12829
|
-
return /* @__PURE__ */
|
|
13123
|
+
return /* @__PURE__ */ jsx57(
|
|
12830
13124
|
CardStatus,
|
|
12831
13125
|
{
|
|
12832
13126
|
header: `Quest\xE3o ${questionNumber.toString().padStart(2, "0")}`,
|
|
@@ -12877,8 +13171,8 @@ var QuizFooter = forwardRef22(
|
|
|
12877
13171
|
const currentAnswer = getCurrentAnswer();
|
|
12878
13172
|
const currentQuestion = getCurrentQuestion();
|
|
12879
13173
|
const isCurrentQuestionSkipped = currentQuestion ? getQuestionStatusFromUserAnswers(currentQuestion.id) === "skipped" : false;
|
|
12880
|
-
const [activeModal, setActiveModal] =
|
|
12881
|
-
const [filterType, setFilterType] =
|
|
13174
|
+
const [activeModal, setActiveModal] = useState26(null);
|
|
13175
|
+
const [filterType, setFilterType] = useState26("all");
|
|
12882
13176
|
const openModal = (modalName) => setActiveModal(modalName);
|
|
12883
13177
|
const closeModal = () => setActiveModal(null);
|
|
12884
13178
|
const isModalOpen = (modalName) => activeModal === modalName;
|
|
@@ -12933,8 +13227,8 @@ var QuizFooter = forwardRef22(
|
|
|
12933
13227
|
return;
|
|
12934
13228
|
}
|
|
12935
13229
|
};
|
|
12936
|
-
return /* @__PURE__ */
|
|
12937
|
-
/* @__PURE__ */
|
|
13230
|
+
return /* @__PURE__ */ jsxs42(Fragment12, { children: [
|
|
13231
|
+
/* @__PURE__ */ jsx57(
|
|
12938
13232
|
"footer",
|
|
12939
13233
|
{
|
|
12940
13234
|
ref,
|
|
@@ -12943,17 +13237,17 @@ var QuizFooter = forwardRef22(
|
|
|
12943
13237
|
className
|
|
12944
13238
|
),
|
|
12945
13239
|
...props,
|
|
12946
|
-
children: variant === "default" ? /* @__PURE__ */
|
|
12947
|
-
/* @__PURE__ */
|
|
12948
|
-
/* @__PURE__ */
|
|
13240
|
+
children: variant === "default" ? /* @__PURE__ */ jsxs42(Fragment12, { children: [
|
|
13241
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex flex-row items-center gap-1", children: [
|
|
13242
|
+
/* @__PURE__ */ jsx57(
|
|
12949
13243
|
IconButton_default,
|
|
12950
13244
|
{
|
|
12951
|
-
icon: /* @__PURE__ */
|
|
13245
|
+
icon: /* @__PURE__ */ jsx57(SquaresFour, { size: 24, className: "text-text-950" }),
|
|
12952
13246
|
size: "md",
|
|
12953
13247
|
onClick: () => openModal("modalNavigate")
|
|
12954
13248
|
}
|
|
12955
13249
|
),
|
|
12956
|
-
isFirstQuestion ? /* @__PURE__ */
|
|
13250
|
+
isFirstQuestion ? /* @__PURE__ */ jsx57(
|
|
12957
13251
|
Button_default,
|
|
12958
13252
|
{
|
|
12959
13253
|
variant: "outline",
|
|
@@ -12964,13 +13258,13 @@ var QuizFooter = forwardRef22(
|
|
|
12964
13258
|
},
|
|
12965
13259
|
children: "Pular"
|
|
12966
13260
|
}
|
|
12967
|
-
) : /* @__PURE__ */
|
|
13261
|
+
) : /* @__PURE__ */ jsx57(
|
|
12968
13262
|
Button_default,
|
|
12969
13263
|
{
|
|
12970
13264
|
size: "medium",
|
|
12971
13265
|
variant: "link",
|
|
12972
13266
|
action: "primary",
|
|
12973
|
-
iconLeft: /* @__PURE__ */
|
|
13267
|
+
iconLeft: /* @__PURE__ */ jsx57(CaretLeft2, { size: 18 }),
|
|
12974
13268
|
onClick: () => {
|
|
12975
13269
|
goToPreviousQuestion();
|
|
12976
13270
|
},
|
|
@@ -12978,7 +13272,7 @@ var QuizFooter = forwardRef22(
|
|
|
12978
13272
|
}
|
|
12979
13273
|
)
|
|
12980
13274
|
] }),
|
|
12981
|
-
!isFirstQuestion && !isLastQuestion && /* @__PURE__ */
|
|
13275
|
+
!isFirstQuestion && !isLastQuestion && /* @__PURE__ */ jsx57(
|
|
12982
13276
|
Button_default,
|
|
12983
13277
|
{
|
|
12984
13278
|
size: "small",
|
|
@@ -12991,7 +13285,7 @@ var QuizFooter = forwardRef22(
|
|
|
12991
13285
|
children: "Pular"
|
|
12992
13286
|
}
|
|
12993
13287
|
),
|
|
12994
|
-
isLastQuestion ? /* @__PURE__ */
|
|
13288
|
+
isLastQuestion ? /* @__PURE__ */ jsx57(
|
|
12995
13289
|
Button_default,
|
|
12996
13290
|
{
|
|
12997
13291
|
size: "medium",
|
|
@@ -13000,13 +13294,13 @@ var QuizFooter = forwardRef22(
|
|
|
13000
13294
|
onClick: handleFinishQuiz,
|
|
13001
13295
|
children: "Finalizar"
|
|
13002
13296
|
}
|
|
13003
|
-
) : /* @__PURE__ */
|
|
13297
|
+
) : /* @__PURE__ */ jsx57(
|
|
13004
13298
|
Button_default,
|
|
13005
13299
|
{
|
|
13006
13300
|
size: "medium",
|
|
13007
13301
|
variant: "link",
|
|
13008
13302
|
action: "primary",
|
|
13009
|
-
iconRight: /* @__PURE__ */
|
|
13303
|
+
iconRight: /* @__PURE__ */ jsx57(CaretRight5, { size: 18 }),
|
|
13010
13304
|
disabled: !currentAnswer && !isCurrentQuestionSkipped,
|
|
13011
13305
|
onClick: () => {
|
|
13012
13306
|
goToNextQuestion();
|
|
@@ -13014,7 +13308,7 @@ var QuizFooter = forwardRef22(
|
|
|
13014
13308
|
children: "Avan\xE7ar"
|
|
13015
13309
|
}
|
|
13016
13310
|
)
|
|
13017
|
-
] }) : /* @__PURE__ */
|
|
13311
|
+
] }) : /* @__PURE__ */ jsx57("div", { className: "flex flex-row items-center justify-center w-full", children: /* @__PURE__ */ jsx57(
|
|
13018
13312
|
Button_default,
|
|
13019
13313
|
{
|
|
13020
13314
|
variant: "link",
|
|
@@ -13026,7 +13320,7 @@ var QuizFooter = forwardRef22(
|
|
|
13026
13320
|
) })
|
|
13027
13321
|
}
|
|
13028
13322
|
),
|
|
13029
|
-
/* @__PURE__ */
|
|
13323
|
+
/* @__PURE__ */ jsx57(
|
|
13030
13324
|
AlertDialog,
|
|
13031
13325
|
{
|
|
13032
13326
|
isOpen: isModalOpen("alertDialog"),
|
|
@@ -13038,7 +13332,7 @@ var QuizFooter = forwardRef22(
|
|
|
13038
13332
|
onSubmit: handleAlertSubmit
|
|
13039
13333
|
}
|
|
13040
13334
|
),
|
|
13041
|
-
/* @__PURE__ */
|
|
13335
|
+
/* @__PURE__ */ jsx57(
|
|
13042
13336
|
Modal_default,
|
|
13043
13337
|
{
|
|
13044
13338
|
isOpen: isModalOpen("modalResult"),
|
|
@@ -13047,11 +13341,11 @@ var QuizFooter = forwardRef22(
|
|
|
13047
13341
|
closeOnEscape: false,
|
|
13048
13342
|
hideCloseButton: true,
|
|
13049
13343
|
size: "md",
|
|
13050
|
-
children: /* @__PURE__ */
|
|
13051
|
-
resultImageComponent ? /* @__PURE__ */
|
|
13052
|
-
/* @__PURE__ */
|
|
13053
|
-
/* @__PURE__ */
|
|
13054
|
-
/* @__PURE__ */
|
|
13344
|
+
children: /* @__PURE__ */ jsxs42("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
|
|
13345
|
+
resultImageComponent ? /* @__PURE__ */ jsx57("div", { className: "w-[282px] h-auto", children: resultImageComponent }) : /* @__PURE__ */ jsx57("div", { className: "w-[282px] h-[200px] bg-gray-100 rounded-md flex items-center justify-center", children: /* @__PURE__ */ jsx57("span", { className: "text-gray-500 text-sm", children: "Imagem de resultado" }) }),
|
|
13346
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex flex-col gap-2 text-center", children: [
|
|
13347
|
+
/* @__PURE__ */ jsx57("h2", { className: "text-text-950 font-bold text-lg", children: getCompletionTitle(quizType) }),
|
|
13348
|
+
/* @__PURE__ */ jsxs42("p", { className: "text-text-500 font-sm", children: [
|
|
13055
13349
|
"Voc\xEA acertou ",
|
|
13056
13350
|
correctAnswers ?? "--",
|
|
13057
13351
|
" de ",
|
|
@@ -13060,8 +13354,8 @@ var QuizFooter = forwardRef22(
|
|
|
13060
13354
|
"quest\xF5es."
|
|
13061
13355
|
] })
|
|
13062
13356
|
] }),
|
|
13063
|
-
/* @__PURE__ */
|
|
13064
|
-
/* @__PURE__ */
|
|
13357
|
+
/* @__PURE__ */ jsxs42("div", { className: "px-6 flex flex-row items-center gap-2 w-full", children: [
|
|
13358
|
+
/* @__PURE__ */ jsx57(
|
|
13065
13359
|
Button_default,
|
|
13066
13360
|
{
|
|
13067
13361
|
variant: "outline",
|
|
@@ -13071,38 +13365,38 @@ var QuizFooter = forwardRef22(
|
|
|
13071
13365
|
children: quizTypeLabel === "Question\xE1rio" ? "Ir para aulas" : `Ir para ${quizTypeLabel.toLocaleLowerCase()}s`
|
|
13072
13366
|
}
|
|
13073
13367
|
),
|
|
13074
|
-
/* @__PURE__ */
|
|
13368
|
+
/* @__PURE__ */ jsx57(Button_default, { className: "w-full", onClick: onDetailResult, children: "Detalhar resultado" })
|
|
13075
13369
|
] })
|
|
13076
13370
|
] })
|
|
13077
13371
|
}
|
|
13078
13372
|
),
|
|
13079
|
-
/* @__PURE__ */
|
|
13373
|
+
/* @__PURE__ */ jsx57(
|
|
13080
13374
|
Modal_default,
|
|
13081
13375
|
{
|
|
13082
13376
|
isOpen: isModalOpen("modalNavigate"),
|
|
13083
13377
|
onClose: closeModal,
|
|
13084
13378
|
title: "Quest\xF5es",
|
|
13085
13379
|
size: "lg",
|
|
13086
|
-
children: /* @__PURE__ */
|
|
13087
|
-
/* @__PURE__ */
|
|
13088
|
-
/* @__PURE__ */
|
|
13089
|
-
/* @__PURE__ */
|
|
13090
|
-
/* @__PURE__ */
|
|
13380
|
+
children: /* @__PURE__ */ jsxs42("div", { className: "flex flex-col w-full not-lg:h-[calc(100vh-200px)] lg:max-h-[687px] lg:h-[687px]", children: [
|
|
13381
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex flex-row justify-between items-center py-6 pt-6 pb-4 border-b border-border-200 flex-shrink-0", children: [
|
|
13382
|
+
/* @__PURE__ */ jsx57("p", { className: "text-text-950 font-bold text-lg", children: "Filtrar por" }),
|
|
13383
|
+
/* @__PURE__ */ jsx57("span", { className: "max-w-[266px]", children: /* @__PURE__ */ jsxs42(Select_default, { value: filterType, onValueChange: setFilterType, children: [
|
|
13384
|
+
/* @__PURE__ */ jsx57(
|
|
13091
13385
|
SelectTrigger,
|
|
13092
13386
|
{
|
|
13093
13387
|
variant: "rounded",
|
|
13094
13388
|
className: "max-w-[266px] min-w-[160px]",
|
|
13095
|
-
children: /* @__PURE__ */
|
|
13389
|
+
children: /* @__PURE__ */ jsx57(SelectValue, { placeholder: "Selecione uma op\xE7\xE3o" })
|
|
13096
13390
|
}
|
|
13097
13391
|
),
|
|
13098
|
-
/* @__PURE__ */
|
|
13099
|
-
/* @__PURE__ */
|
|
13100
|
-
/* @__PURE__ */
|
|
13101
|
-
/* @__PURE__ */
|
|
13392
|
+
/* @__PURE__ */ jsxs42(SelectContent, { children: [
|
|
13393
|
+
/* @__PURE__ */ jsx57(SelectItem, { value: "all", children: "Todas" }),
|
|
13394
|
+
/* @__PURE__ */ jsx57(SelectItem, { value: "unanswered", children: "Em branco" }),
|
|
13395
|
+
/* @__PURE__ */ jsx57(SelectItem, { value: "answered", children: "Respondidas" })
|
|
13102
13396
|
] })
|
|
13103
13397
|
] }) })
|
|
13104
13398
|
] }),
|
|
13105
|
-
/* @__PURE__ */
|
|
13399
|
+
/* @__PURE__ */ jsx57("div", { className: "flex flex-col gap-2 flex-1 min-h-0 overflow-y-auto", children: /* @__PURE__ */ jsx57(
|
|
13106
13400
|
QuizQuestionList,
|
|
13107
13401
|
{
|
|
13108
13402
|
filterType,
|
|
@@ -13112,7 +13406,7 @@ var QuizFooter = forwardRef22(
|
|
|
13112
13406
|
] })
|
|
13113
13407
|
}
|
|
13114
13408
|
),
|
|
13115
|
-
/* @__PURE__ */
|
|
13409
|
+
/* @__PURE__ */ jsx57(
|
|
13116
13410
|
Modal_default,
|
|
13117
13411
|
{
|
|
13118
13412
|
isOpen: isModalOpen("modalResolution"),
|
|
@@ -13122,7 +13416,7 @@ var QuizFooter = forwardRef22(
|
|
|
13122
13416
|
children: currentQuestion?.solutionExplanation
|
|
13123
13417
|
}
|
|
13124
13418
|
),
|
|
13125
|
-
/* @__PURE__ */
|
|
13419
|
+
/* @__PURE__ */ jsx57(
|
|
13126
13420
|
Modal_default,
|
|
13127
13421
|
{
|
|
13128
13422
|
isOpen: isModalOpen("modalQuestionnaireAllCorrect"),
|
|
@@ -13131,17 +13425,17 @@ var QuizFooter = forwardRef22(
|
|
|
13131
13425
|
closeOnEscape: false,
|
|
13132
13426
|
hideCloseButton: true,
|
|
13133
13427
|
size: "md",
|
|
13134
|
-
children: /* @__PURE__ */
|
|
13135
|
-
resultImageComponent ? /* @__PURE__ */
|
|
13136
|
-
/* @__PURE__ */
|
|
13137
|
-
/* @__PURE__ */
|
|
13138
|
-
/* @__PURE__ */
|
|
13428
|
+
children: /* @__PURE__ */ jsxs42("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
|
|
13429
|
+
resultImageComponent ? /* @__PURE__ */ jsx57("div", { className: "w-[282px] h-auto", children: resultImageComponent }) : /* @__PURE__ */ jsx57("div", { className: "w-[282px] h-[200px] bg-gray-100 rounded-md flex items-center justify-center", children: /* @__PURE__ */ jsx57("span", { className: "text-gray-500 text-sm", children: "Imagem de resultado" }) }),
|
|
13430
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex flex-col gap-2 text-center", children: [
|
|
13431
|
+
/* @__PURE__ */ jsx57("h2", { className: "text-text-950 font-bold text-lg", children: "\u{1F389} Parab\xE9ns!" }),
|
|
13432
|
+
/* @__PURE__ */ jsx57("p", { className: "text-text-500 font-sm", children: "Voc\xEA concluiu o m\xF3dulo Movimento Uniforme." })
|
|
13139
13433
|
] }),
|
|
13140
|
-
/* @__PURE__ */
|
|
13434
|
+
/* @__PURE__ */ jsx57("div", { className: "px-6 flex flex-row items-center gap-2 w-full", children: /* @__PURE__ */ jsx57(Button_default, { className: "w-full", onClick: onGoToNextModule, children: "Pr\xF3ximo m\xF3dulo" }) })
|
|
13141
13435
|
] })
|
|
13142
13436
|
}
|
|
13143
13437
|
),
|
|
13144
|
-
/* @__PURE__ */
|
|
13438
|
+
/* @__PURE__ */ jsx57(
|
|
13145
13439
|
Modal_default,
|
|
13146
13440
|
{
|
|
13147
13441
|
isOpen: isModalOpen("modalQuestionnaireAllIncorrect"),
|
|
@@ -13150,16 +13444,16 @@ var QuizFooter = forwardRef22(
|
|
|
13150
13444
|
closeOnEscape: false,
|
|
13151
13445
|
hideCloseButton: true,
|
|
13152
13446
|
size: "md",
|
|
13153
|
-
children: /* @__PURE__ */
|
|
13154
|
-
resultIncorrectImageComponent ? /* @__PURE__ */
|
|
13155
|
-
/* @__PURE__ */
|
|
13156
|
-
/* @__PURE__ */
|
|
13157
|
-
/* @__PURE__ */
|
|
13158
|
-
/* @__PURE__ */
|
|
13159
|
-
/* @__PURE__ */
|
|
13447
|
+
children: /* @__PURE__ */ jsxs42("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
|
|
13448
|
+
resultIncorrectImageComponent ? /* @__PURE__ */ jsx57("div", { className: "w-[282px] h-auto", children: resultIncorrectImageComponent }) : /* @__PURE__ */ jsx57("div", { className: "w-[282px] h-[200px] bg-gray-100 rounded-md flex items-center justify-center", children: /* @__PURE__ */ jsx57("span", { className: "text-gray-500 text-sm", children: "Imagem de resultado" }) }),
|
|
13449
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex flex-col gap-2 text-center", children: [
|
|
13450
|
+
/* @__PURE__ */ jsx57("h2", { className: "text-text-950 font-bold text-lg", children: "\u{1F615} N\xE3o foi dessa vez..." }),
|
|
13451
|
+
/* @__PURE__ */ jsx57("p", { className: "text-text-500 font-sm", children: "Voc\xEA tirou 0 no question\xE1rio, mas n\xE3o se preocupe! Isso \xE9 apenas uma oportunidade de aprendizado." }),
|
|
13452
|
+
/* @__PURE__ */ jsx57("p", { className: "text-text-500 font-sm", children: "Que tal tentar novamente para melhorar sua nota? Estamos aqui para te ajudar a entender o conte\xFAdo e evoluir." }),
|
|
13453
|
+
/* @__PURE__ */ jsx57("p", { className: "text-text-500 font-sm", children: "Clique em Repetir Question\xE1rio e mostre do que voc\xEA \xE9 capaz! \u{1F4AA}" })
|
|
13160
13454
|
] }),
|
|
13161
|
-
/* @__PURE__ */
|
|
13162
|
-
/* @__PURE__ */
|
|
13455
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex flex-row justify-center items-center gap-2 w-full", children: [
|
|
13456
|
+
/* @__PURE__ */ jsx57(
|
|
13163
13457
|
Button_default,
|
|
13164
13458
|
{
|
|
13165
13459
|
type: "button",
|
|
@@ -13173,7 +13467,7 @@ var QuizFooter = forwardRef22(
|
|
|
13173
13467
|
children: "Tentar depois"
|
|
13174
13468
|
}
|
|
13175
13469
|
),
|
|
13176
|
-
/* @__PURE__ */
|
|
13470
|
+
/* @__PURE__ */ jsx57(
|
|
13177
13471
|
Button_default,
|
|
13178
13472
|
{
|
|
13179
13473
|
variant: "outline",
|
|
@@ -13183,7 +13477,7 @@ var QuizFooter = forwardRef22(
|
|
|
13183
13477
|
children: "Detalhar resultado"
|
|
13184
13478
|
}
|
|
13185
13479
|
),
|
|
13186
|
-
/* @__PURE__ */
|
|
13480
|
+
/* @__PURE__ */ jsx57(
|
|
13187
13481
|
Button_default,
|
|
13188
13482
|
{
|
|
13189
13483
|
className: "w-auto",
|
|
@@ -13196,7 +13490,7 @@ var QuizFooter = forwardRef22(
|
|
|
13196
13490
|
] })
|
|
13197
13491
|
}
|
|
13198
13492
|
),
|
|
13199
|
-
/* @__PURE__ */
|
|
13493
|
+
/* @__PURE__ */ jsx57(
|
|
13200
13494
|
AlertDialog,
|
|
13201
13495
|
{
|
|
13202
13496
|
isOpen: isModalOpen("alertDialogTryLater"),
|
|
@@ -13220,26 +13514,26 @@ var QuizFooter = forwardRef22(
|
|
|
13220
13514
|
);
|
|
13221
13515
|
|
|
13222
13516
|
// src/components/Quiz/QuizResult.tsx
|
|
13223
|
-
import { forwardRef as forwardRef23, useEffect as
|
|
13517
|
+
import { forwardRef as forwardRef23, useEffect as useEffect26, useState as useState27 } from "react";
|
|
13224
13518
|
import { Clock as Clock3 } from "phosphor-react";
|
|
13225
|
-
import { jsx as
|
|
13519
|
+
import { jsx as jsx58, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
13226
13520
|
var QuizBadge = ({
|
|
13227
13521
|
subtype
|
|
13228
13522
|
}) => {
|
|
13229
13523
|
switch (subtype) {
|
|
13230
13524
|
case "PROVA" /* PROVA */:
|
|
13231
|
-
return /* @__PURE__ */
|
|
13525
|
+
return /* @__PURE__ */ jsx58(Badge_default, { variant: "examsOutlined", action: "exam2", "data-testid": "quiz-badge", children: "Prova" });
|
|
13232
13526
|
case "ENEM_PROVA_1" /* ENEM_PROVA_1 */:
|
|
13233
13527
|
case "ENEM_PROVA_2" /* ENEM_PROVA_2 */:
|
|
13234
|
-
return /* @__PURE__ */
|
|
13528
|
+
return /* @__PURE__ */ jsx58(Badge_default, { variant: "examsOutlined", action: "exam1", "data-testid": "quiz-badge", children: "Enem" });
|
|
13235
13529
|
case "VESTIBULAR" /* VESTIBULAR */:
|
|
13236
|
-
return /* @__PURE__ */
|
|
13530
|
+
return /* @__PURE__ */ jsx58(Badge_default, { variant: "examsOutlined", action: "exam4", "data-testid": "quiz-badge", children: "Vestibular" });
|
|
13237
13531
|
case "SIMULADO" /* SIMULADO */:
|
|
13238
13532
|
case "SIMULADAO" /* SIMULADAO */:
|
|
13239
13533
|
case void 0:
|
|
13240
|
-
return /* @__PURE__ */
|
|
13534
|
+
return /* @__PURE__ */ jsx58(Badge_default, { variant: "examsOutlined", action: "exam3", "data-testid": "quiz-badge", children: "Simulad\xE3o" });
|
|
13241
13535
|
default:
|
|
13242
|
-
return /* @__PURE__ */
|
|
13536
|
+
return /* @__PURE__ */ jsx58(Badge_default, { variant: "solid", action: "info", "data-testid": "quiz-badge", children: subtype });
|
|
13243
13537
|
}
|
|
13244
13538
|
};
|
|
13245
13539
|
var QuizHeaderResult = forwardRef23(
|
|
@@ -13249,8 +13543,8 @@ var QuizHeaderResult = forwardRef23(
|
|
|
13249
13543
|
getCurrentQuestion,
|
|
13250
13544
|
questionsResult
|
|
13251
13545
|
} = useQuizStore();
|
|
13252
|
-
const [status, setStatus] =
|
|
13253
|
-
|
|
13546
|
+
const [status, setStatus] = useState27(void 0);
|
|
13547
|
+
useEffect26(() => {
|
|
13254
13548
|
const cq = getCurrentQuestion();
|
|
13255
13549
|
if (!cq) {
|
|
13256
13550
|
setStatus(void 0);
|
|
@@ -13296,7 +13590,7 @@ var QuizHeaderResult = forwardRef23(
|
|
|
13296
13590
|
return "N\xE3o foi dessa vez...voc\xEA deixou a resposta em branco";
|
|
13297
13591
|
}
|
|
13298
13592
|
};
|
|
13299
|
-
return /* @__PURE__ */
|
|
13593
|
+
return /* @__PURE__ */ jsxs43(
|
|
13300
13594
|
"div",
|
|
13301
13595
|
{
|
|
13302
13596
|
ref,
|
|
@@ -13307,8 +13601,8 @@ var QuizHeaderResult = forwardRef23(
|
|
|
13307
13601
|
),
|
|
13308
13602
|
...props,
|
|
13309
13603
|
children: [
|
|
13310
|
-
/* @__PURE__ */
|
|
13311
|
-
/* @__PURE__ */
|
|
13604
|
+
/* @__PURE__ */ jsx58("p", { className: "text-text-950 font-bold text-lg", children: "Resultado" }),
|
|
13605
|
+
/* @__PURE__ */ jsx58("p", { className: "text-text-700 text-md", children: getLabelByAnswersStatus() })
|
|
13312
13606
|
]
|
|
13313
13607
|
}
|
|
13314
13608
|
);
|
|
@@ -13316,7 +13610,7 @@ var QuizHeaderResult = forwardRef23(
|
|
|
13316
13610
|
);
|
|
13317
13611
|
var QuizResultHeaderTitle = forwardRef23(({ className, showBadge = true, onRepeat, canRetry, ...props }, ref) => {
|
|
13318
13612
|
const { quiz } = useQuizStore();
|
|
13319
|
-
return /* @__PURE__ */
|
|
13613
|
+
return /* @__PURE__ */ jsxs43(
|
|
13320
13614
|
"div",
|
|
13321
13615
|
{
|
|
13322
13616
|
ref,
|
|
@@ -13326,9 +13620,9 @@ var QuizResultHeaderTitle = forwardRef23(({ className, showBadge = true, onRepea
|
|
|
13326
13620
|
),
|
|
13327
13621
|
...props,
|
|
13328
13622
|
children: [
|
|
13329
|
-
/* @__PURE__ */
|
|
13330
|
-
/* @__PURE__ */
|
|
13331
|
-
canRetry && onRepeat && /* @__PURE__ */
|
|
13623
|
+
/* @__PURE__ */ jsx58("p", { className: "text-text-950 font-bold text-2xl", children: "Resultado" }),
|
|
13624
|
+
/* @__PURE__ */ jsxs43("div", { className: "flex flex-row gap-3 items-center", children: [
|
|
13625
|
+
canRetry && onRepeat && /* @__PURE__ */ jsx58(
|
|
13332
13626
|
Button_default,
|
|
13333
13627
|
{
|
|
13334
13628
|
variant: "solid",
|
|
@@ -13338,7 +13632,7 @@ var QuizResultHeaderTitle = forwardRef23(({ className, showBadge = true, onRepea
|
|
|
13338
13632
|
children: "Repetir question\xE1rio"
|
|
13339
13633
|
}
|
|
13340
13634
|
),
|
|
13341
|
-
showBadge && /* @__PURE__ */
|
|
13635
|
+
showBadge && /* @__PURE__ */ jsx58(QuizBadge, { subtype: quiz?.subtype || void 0 })
|
|
13342
13636
|
] })
|
|
13343
13637
|
]
|
|
13344
13638
|
}
|
|
@@ -13347,7 +13641,7 @@ var QuizResultHeaderTitle = forwardRef23(({ className, showBadge = true, onRepea
|
|
|
13347
13641
|
var QuizResultTitle = forwardRef23(({ className, ...props }, ref) => {
|
|
13348
13642
|
const { getQuizTitle } = useQuizStore();
|
|
13349
13643
|
const quizTitle = getQuizTitle();
|
|
13350
|
-
return /* @__PURE__ */
|
|
13644
|
+
return /* @__PURE__ */ jsx58(
|
|
13351
13645
|
"p",
|
|
13352
13646
|
{
|
|
13353
13647
|
className: cn("pt-6 pb-4 text-text-950 font-bold text-lg", className),
|
|
@@ -13408,7 +13702,7 @@ var QuizResultPerformance = forwardRef23(({ showDetails = true, ...props }, ref)
|
|
|
13408
13702
|
};
|
|
13409
13703
|
const percentage = totalQuestions > 0 ? Math.round(stats.correctAnswers / totalQuestions * 100) : 0;
|
|
13410
13704
|
const classesJustifyBetween = showDetails ? "justify-between" : "justify-center";
|
|
13411
|
-
return /* @__PURE__ */
|
|
13705
|
+
return /* @__PURE__ */ jsxs43(
|
|
13412
13706
|
"div",
|
|
13413
13707
|
{
|
|
13414
13708
|
className: cn(
|
|
@@ -13418,8 +13712,8 @@ var QuizResultPerformance = forwardRef23(({ showDetails = true, ...props }, ref)
|
|
|
13418
13712
|
ref,
|
|
13419
13713
|
...props,
|
|
13420
13714
|
children: [
|
|
13421
|
-
/* @__PURE__ */
|
|
13422
|
-
/* @__PURE__ */
|
|
13715
|
+
/* @__PURE__ */ jsxs43("div", { className: "relative", children: [
|
|
13716
|
+
/* @__PURE__ */ jsx58(
|
|
13423
13717
|
ProgressCircle_default,
|
|
13424
13718
|
{
|
|
13425
13719
|
size: "medium",
|
|
@@ -13429,24 +13723,24 @@ var QuizResultPerformance = forwardRef23(({ showDetails = true, ...props }, ref)
|
|
|
13429
13723
|
label: ""
|
|
13430
13724
|
}
|
|
13431
13725
|
),
|
|
13432
|
-
/* @__PURE__ */
|
|
13433
|
-
showDetails && /* @__PURE__ */
|
|
13434
|
-
/* @__PURE__ */
|
|
13435
|
-
/* @__PURE__ */
|
|
13726
|
+
/* @__PURE__ */ jsxs43("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
13727
|
+
showDetails && /* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-1 mb-1", children: [
|
|
13728
|
+
/* @__PURE__ */ jsx58(Clock3, { size: 12, weight: "regular", className: "text-text-800" }),
|
|
13729
|
+
/* @__PURE__ */ jsx58("span", { className: "text-2xs font-medium text-text-800", children: formatTime2(
|
|
13436
13730
|
(getQuestionResultStatistics()?.timeSpent ?? 0) * 60
|
|
13437
13731
|
) })
|
|
13438
13732
|
] }),
|
|
13439
|
-
/* @__PURE__ */
|
|
13733
|
+
/* @__PURE__ */ jsxs43("div", { className: "text-2xl font-medium text-text-800 leading-7", children: [
|
|
13440
13734
|
getQuestionResultStatistics()?.correctAnswers ?? "--",
|
|
13441
13735
|
" de",
|
|
13442
13736
|
" ",
|
|
13443
13737
|
totalQuestions
|
|
13444
13738
|
] }),
|
|
13445
|
-
/* @__PURE__ */
|
|
13739
|
+
/* @__PURE__ */ jsx58("div", { className: "text-2xs font-medium text-text-600 mt-1", children: "Corretas" })
|
|
13446
13740
|
] })
|
|
13447
13741
|
] }),
|
|
13448
|
-
showDetails && /* @__PURE__ */
|
|
13449
|
-
/* @__PURE__ */
|
|
13742
|
+
showDetails && /* @__PURE__ */ jsxs43("div", { className: "flex flex-col gap-4 w-full", children: [
|
|
13743
|
+
/* @__PURE__ */ jsx58(
|
|
13450
13744
|
ProgressBar_default,
|
|
13451
13745
|
{
|
|
13452
13746
|
className: "w-full",
|
|
@@ -13460,7 +13754,7 @@ var QuizResultPerformance = forwardRef23(({ showDetails = true, ...props }, ref)
|
|
|
13460
13754
|
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
13461
13755
|
}
|
|
13462
13756
|
),
|
|
13463
|
-
/* @__PURE__ */
|
|
13757
|
+
/* @__PURE__ */ jsx58(
|
|
13464
13758
|
ProgressBar_default,
|
|
13465
13759
|
{
|
|
13466
13760
|
className: "w-full",
|
|
@@ -13474,7 +13768,7 @@ var QuizResultPerformance = forwardRef23(({ showDetails = true, ...props }, ref)
|
|
|
13474
13768
|
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
13475
13769
|
}
|
|
13476
13770
|
),
|
|
13477
|
-
/* @__PURE__ */
|
|
13771
|
+
/* @__PURE__ */ jsx58(
|
|
13478
13772
|
ProgressBar_default,
|
|
13479
13773
|
{
|
|
13480
13774
|
className: "w-full",
|
|
@@ -13521,9 +13815,9 @@ var QuizListResult = forwardRef23(({ className, onSubjectClick, ...props }, ref)
|
|
|
13521
13815
|
};
|
|
13522
13816
|
}
|
|
13523
13817
|
);
|
|
13524
|
-
return /* @__PURE__ */
|
|
13525
|
-
/* @__PURE__ */
|
|
13526
|
-
/* @__PURE__ */
|
|
13818
|
+
return /* @__PURE__ */ jsxs43("section", { ref, className, ...props, children: [
|
|
13819
|
+
/* @__PURE__ */ jsx58("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Mat\xE9rias" }),
|
|
13820
|
+
/* @__PURE__ */ jsx58("ul", { className: "flex flex-col gap-2", children: subjectsStats.map((subject) => /* @__PURE__ */ jsx58("li", { children: /* @__PURE__ */ jsx58(
|
|
13527
13821
|
CardResults,
|
|
13528
13822
|
{
|
|
13529
13823
|
onClick: () => onSubjectClick?.(subject.subject.id),
|
|
@@ -13547,16 +13841,16 @@ var QuizListResultByMateria = ({
|
|
|
13547
13841
|
const groupedQuestions = getQuestionsGroupedBySubject();
|
|
13548
13842
|
const answeredQuestions = groupedQuestions[subject] || [];
|
|
13549
13843
|
const formattedQuestions = subject == "all" ? Object.values(groupedQuestions).flat() : answeredQuestions;
|
|
13550
|
-
return /* @__PURE__ */
|
|
13551
|
-
/* @__PURE__ */
|
|
13552
|
-
/* @__PURE__ */
|
|
13553
|
-
/* @__PURE__ */
|
|
13554
|
-
/* @__PURE__ */
|
|
13844
|
+
return /* @__PURE__ */ jsxs43("div", { className: "flex flex-col", children: [
|
|
13845
|
+
/* @__PURE__ */ jsx58("div", { className: "flex flex-row pt-4 justify-between", children: /* @__PURE__ */ jsx58("p", { className: "text-text-950 font-bold text-2xl", children: subjectName || formattedQuestions?.[0]?.knowledgeMatrix?.[0]?.subject?.name || "Sem mat\xE9ria" }) }),
|
|
13846
|
+
/* @__PURE__ */ jsxs43("section", { className: "flex flex-col ", children: [
|
|
13847
|
+
/* @__PURE__ */ jsx58("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Resultado das quest\xF5es" }),
|
|
13848
|
+
/* @__PURE__ */ jsx58("ul", { className: "flex flex-col gap-2 pt-4", children: formattedQuestions.map((question) => {
|
|
13555
13849
|
const questionIndex = getQuestionIndex(
|
|
13556
13850
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13557
13851
|
question.questionId ?? question.id
|
|
13558
13852
|
);
|
|
13559
|
-
return /* @__PURE__ */
|
|
13853
|
+
return /* @__PURE__ */ jsx58("li", { children: /* @__PURE__ */ jsx58(
|
|
13560
13854
|
CardStatus,
|
|
13561
13855
|
{
|
|
13562
13856
|
className: "max-w-full",
|
|
@@ -13582,7 +13876,7 @@ var QuizListResultByMateria = ({
|
|
|
13582
13876
|
|
|
13583
13877
|
// src/components/BreadcrumbMenu/BreadcrumbMenu.tsx
|
|
13584
13878
|
import { useNavigate } from "react-router-dom";
|
|
13585
|
-
import { jsx as
|
|
13879
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
13586
13880
|
var BreadcrumbMenu = ({
|
|
13587
13881
|
breadcrumbs,
|
|
13588
13882
|
onBreadcrumbClick,
|
|
@@ -13595,17 +13889,17 @@ var BreadcrumbMenu = ({
|
|
|
13595
13889
|
}
|
|
13596
13890
|
navigate(breadcrumb.url);
|
|
13597
13891
|
};
|
|
13598
|
-
return /* @__PURE__ */
|
|
13892
|
+
return /* @__PURE__ */ jsx59(
|
|
13599
13893
|
Menu,
|
|
13600
13894
|
{
|
|
13601
13895
|
value: `breadcrumb-${breadcrumbs.length - 1}`,
|
|
13602
13896
|
defaultValue: "breadcrumb-0",
|
|
13603
13897
|
variant: "breadcrumb",
|
|
13604
13898
|
className,
|
|
13605
|
-
children: /* @__PURE__ */
|
|
13899
|
+
children: /* @__PURE__ */ jsx59(MenuContent, { className: "w-full flex flex-row flex-wrap gap-2 !px-0", children: breadcrumbs.map((breadcrumb, index) => {
|
|
13606
13900
|
const isLast = index === breadcrumbs.length - 1;
|
|
13607
13901
|
const hasSeparator = !isLast;
|
|
13608
|
-
return /* @__PURE__ */
|
|
13902
|
+
return /* @__PURE__ */ jsx59(
|
|
13609
13903
|
MenuItem,
|
|
13610
13904
|
{
|
|
13611
13905
|
variant: "breadcrumb",
|
|
@@ -13623,7 +13917,7 @@ var BreadcrumbMenu = ({
|
|
|
13623
13917
|
};
|
|
13624
13918
|
|
|
13625
13919
|
// src/components/BreadcrumbMenu/useBreadcrumbBuilder.ts
|
|
13626
|
-
import { useEffect as
|
|
13920
|
+
import { useEffect as useEffect27 } from "react";
|
|
13627
13921
|
|
|
13628
13922
|
// src/components/BreadcrumbMenu/breadcrumbStore.ts
|
|
13629
13923
|
import { create as create11 } from "zustand";
|
|
@@ -13752,7 +14046,7 @@ var useBreadcrumbBuilder = (config) => {
|
|
|
13752
14046
|
(level) => isBreadcrumbWithData(level) ? level.data : null
|
|
13753
14047
|
);
|
|
13754
14048
|
const levelUrlIds = levels.map((level) => level.urlId);
|
|
13755
|
-
|
|
14049
|
+
useEffect27(() => {
|
|
13756
14050
|
const newBreadcrumbs = [root];
|
|
13757
14051
|
const previousIds = [];
|
|
13758
14052
|
for (const level of levels) {
|
|
@@ -13802,12 +14096,12 @@ var useUrlParams = (config) => {
|
|
|
13802
14096
|
import { useMemo as useMemo10 } from "react";
|
|
13803
14097
|
|
|
13804
14098
|
// src/hooks/useInstitution.ts
|
|
13805
|
-
import { useEffect as
|
|
14099
|
+
import { useEffect as useEffect28, useState as useState28 } from "react";
|
|
13806
14100
|
function useInstitutionId() {
|
|
13807
|
-
const [institutionId, setInstitutionId] =
|
|
14101
|
+
const [institutionId, setInstitutionId] = useState28(() => {
|
|
13808
14102
|
return document.querySelector('meta[name="institution-id"]')?.getAttribute("content") ?? null;
|
|
13809
14103
|
});
|
|
13810
|
-
|
|
14104
|
+
useEffect28(() => {
|
|
13811
14105
|
const metaTag = document.querySelector('meta[name="institution-id"]');
|
|
13812
14106
|
if (!metaTag) return;
|
|
13813
14107
|
const observer = new MutationObserver(() => {
|
|
@@ -14011,7 +14305,7 @@ function useAppInitialization() {
|
|
|
14011
14305
|
}
|
|
14012
14306
|
|
|
14013
14307
|
// src/hooks/useAppContent.ts
|
|
14014
|
-
import { useCallback as
|
|
14308
|
+
import { useCallback as useCallback8, useEffect as useEffect29, useMemo as useMemo11 } from "react";
|
|
14015
14309
|
import { useNavigate as useNavigate2 } from "react-router-dom";
|
|
14016
14310
|
function useAppContent(config) {
|
|
14017
14311
|
const navigate = useNavigate2();
|
|
@@ -14037,20 +14331,20 @@ function useAppContent(config) {
|
|
|
14037
14331
|
navigate("/painel");
|
|
14038
14332
|
}
|
|
14039
14333
|
};
|
|
14040
|
-
const handleSetSelectedProfile =
|
|
14334
|
+
const handleSetSelectedProfile = useCallback8(
|
|
14041
14335
|
(profile) => {
|
|
14042
14336
|
setSelectedProfile(profile);
|
|
14043
14337
|
},
|
|
14044
14338
|
[setSelectedProfile]
|
|
14045
14339
|
);
|
|
14046
|
-
const handleClearParamsFromURL =
|
|
14340
|
+
const handleClearParamsFromURL = useCallback8(() => {
|
|
14047
14341
|
if (onClearParamsFromURL) {
|
|
14048
14342
|
onClearParamsFromURL();
|
|
14049
14343
|
} else {
|
|
14050
14344
|
globalThis.location.replace("/painel");
|
|
14051
14345
|
}
|
|
14052
14346
|
}, [onClearParamsFromURL]);
|
|
14053
|
-
const handleError =
|
|
14347
|
+
const handleError = useCallback8(
|
|
14054
14348
|
(error) => {
|
|
14055
14349
|
if (onError) {
|
|
14056
14350
|
onError(error);
|
|
@@ -14090,7 +14384,7 @@ function useAppContent(config) {
|
|
|
14090
14384
|
const institutionIdToUse = useMemo11(() => {
|
|
14091
14385
|
return sessionInfo?.institutionId || getInstitutionId;
|
|
14092
14386
|
}, [sessionInfo?.institutionId, getInstitutionId]);
|
|
14093
|
-
|
|
14387
|
+
useEffect29(() => {
|
|
14094
14388
|
if (institutionIdToUse && !initialized) {
|
|
14095
14389
|
initialize(institutionIdToUse);
|
|
14096
14390
|
}
|
|
@@ -14136,6 +14430,7 @@ export {
|
|
|
14136
14430
|
DropdownMenuItem,
|
|
14137
14431
|
DropdownMenuSeparator,
|
|
14138
14432
|
DropdownMenuTrigger,
|
|
14433
|
+
FilterModal,
|
|
14139
14434
|
IconButton_default as IconButton,
|
|
14140
14435
|
IconRender_default as IconRender,
|
|
14141
14436
|
IconRoundedButton_default as IconRoundedButton,
|
|
@@ -14150,6 +14445,7 @@ export {
|
|
|
14150
14445
|
Modal_default as Modal,
|
|
14151
14446
|
MultipleChoiceList,
|
|
14152
14447
|
NavButton_default as NavButton,
|
|
14448
|
+
NoSearchResult_default as NoSearchResult,
|
|
14153
14449
|
NotFound_default as NotFound,
|
|
14154
14450
|
NotificationCard_default as NotificationCard,
|
|
14155
14451
|
NotificationEntityType,
|
|
@@ -14251,6 +14547,7 @@ export {
|
|
|
14251
14547
|
useMobile,
|
|
14252
14548
|
useQuizStore,
|
|
14253
14549
|
useRouteAuth,
|
|
14550
|
+
useTableFilter,
|
|
14254
14551
|
useTableSort,
|
|
14255
14552
|
useTheme,
|
|
14256
14553
|
useThemeStore,
|