analytica-frontend-lib 1.1.53 → 1.1.55
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/DropdownMenu/index.d.mts +5 -1
- package/dist/DropdownMenu/index.d.ts +5 -1
- package/dist/DropdownMenu/index.js +606 -37
- package/dist/DropdownMenu/index.js.map +1 -1
- package/dist/DropdownMenu/index.mjs +605 -37
- package/dist/DropdownMenu/index.mjs.map +1 -1
- package/dist/Modal/index.d.mts +14 -5
- package/dist/Modal/index.d.ts +14 -5
- package/dist/Modal/index.js +216 -31
- package/dist/Modal/index.js.map +1 -1
- package/dist/Modal/index.mjs +217 -32
- package/dist/Modal/index.mjs.map +1 -1
- package/dist/Modal/utils/videoUtils/index.d.mts +28 -0
- package/dist/Modal/utils/videoUtils/index.d.ts +28 -0
- package/dist/Modal/utils/videoUtils/index.js +76 -0
- package/dist/Modal/utils/videoUtils/index.js.map +1 -0
- package/dist/Modal/utils/videoUtils/index.mjs +49 -0
- package/dist/Modal/utils/videoUtils/index.mjs.map +1 -0
- package/dist/NotificationCard/index.js +716 -295
- package/dist/NotificationCard/index.js.map +1 -1
- package/dist/NotificationCard/index.mjs +713 -292
- package/dist/NotificationCard/index.mjs.map +1 -1
- package/dist/Quiz/index.js +154 -26
- package/dist/Quiz/index.js.map +1 -1
- package/dist/Quiz/index.mjs +166 -38
- package/dist/Quiz/index.mjs.map +1 -1
- package/dist/Search/index.js +625 -58
- package/dist/Search/index.js.map +1 -1
- package/dist/Search/index.mjs +628 -61
- package/dist/Search/index.mjs.map +1 -1
- package/dist/ThemeToggle/index.d.mts +8 -49
- package/dist/ThemeToggle/index.d.ts +8 -49
- package/dist/ThemeToggle/index.js +128 -114
- package/dist/ThemeToggle/index.js.map +1 -1
- package/dist/ThemeToggle/index.mjs +119 -105
- package/dist/ThemeToggle/index.mjs.map +1 -1
- package/dist/hooks/useTheme/index.d.mts +1 -1
- package/dist/hooks/useTheme/index.d.ts +1 -1
- package/dist/hooks/useTheme/index.js.map +1 -1
- package/dist/hooks/useTheme/index.mjs.map +1 -1
- package/dist/index.css +10 -39
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +995 -825
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1083 -914
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +10 -39
- package/dist/styles.css.map +1 -1
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -1786,29 +1786,412 @@ var Input = forwardRef9(
|
|
|
1786
1786
|
var Input_default = Input;
|
|
1787
1787
|
|
|
1788
1788
|
// src/components/Search/Search.tsx
|
|
1789
|
-
import { CaretLeft, X as
|
|
1789
|
+
import { CaretLeft, X as X3 } from "phosphor-react";
|
|
1790
1790
|
import {
|
|
1791
1791
|
forwardRef as forwardRef11,
|
|
1792
|
-
useState as
|
|
1793
|
-
useId as
|
|
1792
|
+
useState as useState8,
|
|
1793
|
+
useId as useId7,
|
|
1794
1794
|
useMemo as useMemo2,
|
|
1795
|
-
useEffect as
|
|
1796
|
-
useRef as
|
|
1795
|
+
useEffect as useEffect7,
|
|
1796
|
+
useRef as useRef5
|
|
1797
1797
|
} from "react";
|
|
1798
1798
|
|
|
1799
1799
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
1800
|
-
import { SignOut, User } from "phosphor-react";
|
|
1800
|
+
import { CaretRight, SignOut, User } from "phosphor-react";
|
|
1801
1801
|
import {
|
|
1802
1802
|
forwardRef as forwardRef10,
|
|
1803
|
-
useEffect as
|
|
1804
|
-
useRef as
|
|
1803
|
+
useEffect as useEffect6,
|
|
1804
|
+
useRef as useRef4,
|
|
1805
1805
|
isValidElement as isValidElement3,
|
|
1806
1806
|
Children as Children3,
|
|
1807
1807
|
cloneElement as cloneElement3,
|
|
1808
|
-
useState as
|
|
1808
|
+
useState as useState7
|
|
1809
1809
|
} from "react";
|
|
1810
1810
|
import { create as create4, useStore as useStore3 } from "zustand";
|
|
1811
|
+
|
|
1812
|
+
// src/components/Modal/Modal.tsx
|
|
1813
|
+
import { useEffect as useEffect3, useId as useId6 } from "react";
|
|
1814
|
+
import { X as X2 } from "phosphor-react";
|
|
1815
|
+
|
|
1816
|
+
// src/components/Modal/utils/videoUtils.ts
|
|
1817
|
+
var isYouTubeUrl = (url) => {
|
|
1818
|
+
const youtubeRegex = /^(https?:\/\/)?((www|m|music)\.)?(youtube\.com|youtu\.be|youtube-nocookie\.com)\/.+/i;
|
|
1819
|
+
return youtubeRegex.test(url);
|
|
1820
|
+
};
|
|
1821
|
+
var isValidYouTubeHost = (host) => {
|
|
1822
|
+
if (host === "youtu.be") return "youtu.be";
|
|
1823
|
+
const isValidYouTubeCom = host === "youtube.com" || host.endsWith(".youtube.com") && /^(www|m|music)\.youtube\.com$/.test(host);
|
|
1824
|
+
if (isValidYouTubeCom) return "youtube";
|
|
1825
|
+
const isValidNoCookie = host === "youtube-nocookie.com" || host.endsWith(".youtube-nocookie.com") && /^(www|m|music)\.youtube-nocookie\.com$/.test(host);
|
|
1826
|
+
if (isValidNoCookie) return "nocookie";
|
|
1827
|
+
return null;
|
|
1828
|
+
};
|
|
1829
|
+
var extractYoutuBeId = (pathname) => {
|
|
1830
|
+
const firstSeg = pathname.split("/").filter(Boolean)[0];
|
|
1831
|
+
return firstSeg || null;
|
|
1832
|
+
};
|
|
1833
|
+
var extractYouTubeId = (pathname, searchParams) => {
|
|
1834
|
+
const parts = pathname.split("/").filter(Boolean);
|
|
1835
|
+
const [first, second] = parts;
|
|
1836
|
+
if (first === "embed" && second) return second;
|
|
1837
|
+
if (first === "shorts" && second) return second;
|
|
1838
|
+
if (first === "live" && second) return second;
|
|
1839
|
+
const v = searchParams.get("v");
|
|
1840
|
+
if (v) return v;
|
|
1841
|
+
return null;
|
|
1842
|
+
};
|
|
1843
|
+
var getYouTubeVideoId = (url) => {
|
|
1844
|
+
try {
|
|
1845
|
+
const u = new URL(url);
|
|
1846
|
+
const hostType = isValidYouTubeHost(u.hostname.toLowerCase());
|
|
1847
|
+
if (!hostType) return null;
|
|
1848
|
+
if (hostType === "youtu.be") {
|
|
1849
|
+
return extractYoutuBeId(u.pathname);
|
|
1850
|
+
}
|
|
1851
|
+
return extractYouTubeId(u.pathname, u.searchParams);
|
|
1852
|
+
} catch {
|
|
1853
|
+
return null;
|
|
1854
|
+
}
|
|
1855
|
+
};
|
|
1856
|
+
var getYouTubeEmbedUrl = (videoId) => {
|
|
1857
|
+
return `https://www.youtube-nocookie.com/embed/${videoId}?autoplay=0&rel=0&modestbranding=1`;
|
|
1858
|
+
};
|
|
1859
|
+
|
|
1860
|
+
// src/components/Modal/Modal.tsx
|
|
1811
1861
|
import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1862
|
+
var SIZE_CLASSES7 = {
|
|
1863
|
+
xs: "max-w-[360px]",
|
|
1864
|
+
sm: "max-w-[420px]",
|
|
1865
|
+
md: "max-w-[510px]",
|
|
1866
|
+
lg: "max-w-[640px]",
|
|
1867
|
+
xl: "max-w-[970px]"
|
|
1868
|
+
};
|
|
1869
|
+
var Modal = ({
|
|
1870
|
+
isOpen,
|
|
1871
|
+
onClose,
|
|
1872
|
+
title,
|
|
1873
|
+
children,
|
|
1874
|
+
size = "md",
|
|
1875
|
+
className = "",
|
|
1876
|
+
closeOnEscape = true,
|
|
1877
|
+
footer,
|
|
1878
|
+
hideCloseButton = false,
|
|
1879
|
+
variant = "default",
|
|
1880
|
+
description,
|
|
1881
|
+
image,
|
|
1882
|
+
imageAlt,
|
|
1883
|
+
actionLink,
|
|
1884
|
+
actionLabel
|
|
1885
|
+
}) => {
|
|
1886
|
+
const titleId = useId6();
|
|
1887
|
+
useEffect3(() => {
|
|
1888
|
+
if (!isOpen || !closeOnEscape) return;
|
|
1889
|
+
const handleEscape = (event) => {
|
|
1890
|
+
if (event.key === "Escape") {
|
|
1891
|
+
onClose();
|
|
1892
|
+
}
|
|
1893
|
+
};
|
|
1894
|
+
document.addEventListener("keydown", handleEscape);
|
|
1895
|
+
return () => document.removeEventListener("keydown", handleEscape);
|
|
1896
|
+
}, [isOpen, closeOnEscape, onClose]);
|
|
1897
|
+
useEffect3(() => {
|
|
1898
|
+
const originalOverflow = document.body.style.overflow;
|
|
1899
|
+
if (isOpen) {
|
|
1900
|
+
document.body.style.overflow = "hidden";
|
|
1901
|
+
} else {
|
|
1902
|
+
document.body.style.overflow = originalOverflow;
|
|
1903
|
+
}
|
|
1904
|
+
return () => {
|
|
1905
|
+
document.body.style.overflow = originalOverflow;
|
|
1906
|
+
};
|
|
1907
|
+
}, [isOpen]);
|
|
1908
|
+
if (!isOpen) return null;
|
|
1909
|
+
const sizeClasses = SIZE_CLASSES7[size];
|
|
1910
|
+
const baseClasses = "bg-secondary-50 rounded-3xl shadow-hard-shadow-2 border border-border-100 w-full mx-4";
|
|
1911
|
+
const dialogResetClasses = "p-0 m-0 border-none outline-none max-h-none static";
|
|
1912
|
+
const modalClasses = cn(
|
|
1913
|
+
baseClasses,
|
|
1914
|
+
sizeClasses,
|
|
1915
|
+
dialogResetClasses,
|
|
1916
|
+
className
|
|
1917
|
+
);
|
|
1918
|
+
const normalizeUrl = (href) => /^https?:\/\//i.test(href) ? href : `https://${href}`;
|
|
1919
|
+
const handleActionClick = () => {
|
|
1920
|
+
if (actionLink) {
|
|
1921
|
+
window.open(normalizeUrl(actionLink), "_blank", "noopener,noreferrer");
|
|
1922
|
+
}
|
|
1923
|
+
};
|
|
1924
|
+
if (variant === "activity") {
|
|
1925
|
+
return /* @__PURE__ */ jsx18("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-xs border-none p-0 m-0 w-full cursor-default", children: /* @__PURE__ */ jsxs12(
|
|
1926
|
+
"dialog",
|
|
1927
|
+
{
|
|
1928
|
+
className: modalClasses,
|
|
1929
|
+
"aria-labelledby": titleId,
|
|
1930
|
+
"aria-modal": "true",
|
|
1931
|
+
open: true,
|
|
1932
|
+
children: [
|
|
1933
|
+
/* @__PURE__ */ jsx18("div", { className: "flex justify-end p-6 pb-0", children: !hideCloseButton && /* @__PURE__ */ jsx18(
|
|
1934
|
+
"button",
|
|
1935
|
+
{
|
|
1936
|
+
onClick: onClose,
|
|
1937
|
+
className: "p-1 text-text-500 hover:text-text-700 hover:bg-background-50 rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-indicator-info focus:ring-offset-2",
|
|
1938
|
+
"aria-label": "Fechar modal",
|
|
1939
|
+
children: /* @__PURE__ */ jsx18(X2, { size: 18 })
|
|
1940
|
+
}
|
|
1941
|
+
) }),
|
|
1942
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex flex-col items-center px-6 pb-6 gap-5", children: [
|
|
1943
|
+
image && /* @__PURE__ */ jsx18("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx18(
|
|
1944
|
+
"img",
|
|
1945
|
+
{
|
|
1946
|
+
src: image,
|
|
1947
|
+
alt: imageAlt ?? "",
|
|
1948
|
+
className: "w-[122px] h-[122px] object-contain"
|
|
1949
|
+
}
|
|
1950
|
+
) }),
|
|
1951
|
+
/* @__PURE__ */ jsx18(
|
|
1952
|
+
"h2",
|
|
1953
|
+
{
|
|
1954
|
+
id: titleId,
|
|
1955
|
+
className: "text-lg font-semibold text-text-950 text-center",
|
|
1956
|
+
children: title
|
|
1957
|
+
}
|
|
1958
|
+
),
|
|
1959
|
+
description && /* @__PURE__ */ jsx18("p", { className: "text-sm font-normal text-text-400 text-center max-w-md leading-[21px]", children: description }),
|
|
1960
|
+
actionLink && /* @__PURE__ */ jsxs12("div", { className: "w-full", children: [
|
|
1961
|
+
(() => {
|
|
1962
|
+
const normalized = normalizeUrl(actionLink);
|
|
1963
|
+
const isYT = isYouTubeUrl(normalized);
|
|
1964
|
+
if (!isYT) return null;
|
|
1965
|
+
const id = getYouTubeVideoId(normalized);
|
|
1966
|
+
if (!id) {
|
|
1967
|
+
return /* @__PURE__ */ jsx18(
|
|
1968
|
+
Button_default,
|
|
1969
|
+
{
|
|
1970
|
+
variant: "solid",
|
|
1971
|
+
action: "primary",
|
|
1972
|
+
size: "large",
|
|
1973
|
+
className: "w-full",
|
|
1974
|
+
onClick: handleActionClick,
|
|
1975
|
+
children: actionLabel || "Iniciar Atividade"
|
|
1976
|
+
}
|
|
1977
|
+
);
|
|
1978
|
+
}
|
|
1979
|
+
return /* @__PURE__ */ jsx18(
|
|
1980
|
+
"iframe",
|
|
1981
|
+
{
|
|
1982
|
+
src: getYouTubeEmbedUrl(id),
|
|
1983
|
+
className: "w-full aspect-video rounded-lg",
|
|
1984
|
+
allowFullScreen: true,
|
|
1985
|
+
allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
|
|
1986
|
+
title: "V\xEDdeo YouTube"
|
|
1987
|
+
}
|
|
1988
|
+
);
|
|
1989
|
+
})(),
|
|
1990
|
+
!isYouTubeUrl(normalizeUrl(actionLink)) && /* @__PURE__ */ jsx18(
|
|
1991
|
+
Button_default,
|
|
1992
|
+
{
|
|
1993
|
+
variant: "solid",
|
|
1994
|
+
action: "primary",
|
|
1995
|
+
size: "large",
|
|
1996
|
+
className: "w-full",
|
|
1997
|
+
onClick: handleActionClick,
|
|
1998
|
+
children: actionLabel || "Iniciar Atividade"
|
|
1999
|
+
}
|
|
2000
|
+
)
|
|
2001
|
+
] })
|
|
2002
|
+
] })
|
|
2003
|
+
]
|
|
2004
|
+
}
|
|
2005
|
+
) });
|
|
2006
|
+
}
|
|
2007
|
+
return /* @__PURE__ */ jsx18("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-xs border-none p-0 m-0 w-full cursor-default", children: /* @__PURE__ */ jsxs12(
|
|
2008
|
+
"dialog",
|
|
2009
|
+
{
|
|
2010
|
+
className: modalClasses,
|
|
2011
|
+
"aria-labelledby": titleId,
|
|
2012
|
+
"aria-modal": "true",
|
|
2013
|
+
open: true,
|
|
2014
|
+
children: [
|
|
2015
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex items-center justify-between px-6 py-6", children: [
|
|
2016
|
+
/* @__PURE__ */ jsx18("h2", { id: titleId, className: "text-lg font-semibold text-text-950", children: title }),
|
|
2017
|
+
!hideCloseButton && /* @__PURE__ */ jsx18(
|
|
2018
|
+
"button",
|
|
2019
|
+
{
|
|
2020
|
+
onClick: onClose,
|
|
2021
|
+
className: "p-1 text-text-500 hover:text-text-700 hover:bg-background-50 rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-indicator-info focus:ring-offset-2",
|
|
2022
|
+
"aria-label": "Fechar modal",
|
|
2023
|
+
children: /* @__PURE__ */ jsx18(X2, { size: 18 })
|
|
2024
|
+
}
|
|
2025
|
+
)
|
|
2026
|
+
] }),
|
|
2027
|
+
children && /* @__PURE__ */ jsx18("div", { className: "px-6 pb-6", children: /* @__PURE__ */ jsx18("div", { className: "text-text-500 font-normal text-sm leading-6", children }) }),
|
|
2028
|
+
footer && /* @__PURE__ */ jsx18("div", { className: "flex justify-end gap-3 px-6 pb-6", children: footer })
|
|
2029
|
+
]
|
|
2030
|
+
}
|
|
2031
|
+
) });
|
|
2032
|
+
};
|
|
2033
|
+
var Modal_default = Modal;
|
|
2034
|
+
|
|
2035
|
+
// src/components/ThemeToggle/ThemeToggle.tsx
|
|
2036
|
+
import { Moon, Sun } from "phosphor-react";
|
|
2037
|
+
import { useState as useState6, useEffect as useEffect5 } from "react";
|
|
2038
|
+
|
|
2039
|
+
// src/hooks/useTheme.ts
|
|
2040
|
+
import { useEffect as useEffect4, useState as useState5, useCallback, useRef as useRef3 } from "react";
|
|
2041
|
+
var useTheme = () => {
|
|
2042
|
+
const [themeMode, setThemeMode] = useState5("system");
|
|
2043
|
+
const [isDark, setIsDark] = useState5(false);
|
|
2044
|
+
const themeModeRef = useRef3("system");
|
|
2045
|
+
const applyTheme = useCallback((mode) => {
|
|
2046
|
+
const htmlElement = document.documentElement;
|
|
2047
|
+
const originalTheme = htmlElement.getAttribute("data-original-theme");
|
|
2048
|
+
if (mode === "dark") {
|
|
2049
|
+
htmlElement.setAttribute("data-theme", "dark");
|
|
2050
|
+
setIsDark(true);
|
|
2051
|
+
} else if (mode === "light") {
|
|
2052
|
+
if (originalTheme) {
|
|
2053
|
+
htmlElement.setAttribute("data-theme", originalTheme);
|
|
2054
|
+
}
|
|
2055
|
+
setIsDark(false);
|
|
2056
|
+
} else if (mode === "system") {
|
|
2057
|
+
const isSystemDark = window.matchMedia(
|
|
2058
|
+
"(prefers-color-scheme: dark)"
|
|
2059
|
+
).matches;
|
|
2060
|
+
if (isSystemDark) {
|
|
2061
|
+
htmlElement.setAttribute("data-theme", "dark");
|
|
2062
|
+
setIsDark(true);
|
|
2063
|
+
} else if (originalTheme) {
|
|
2064
|
+
htmlElement.setAttribute("data-theme", originalTheme);
|
|
2065
|
+
setIsDark(false);
|
|
2066
|
+
}
|
|
2067
|
+
}
|
|
2068
|
+
}, []);
|
|
2069
|
+
const toggleTheme = useCallback(() => {
|
|
2070
|
+
let newMode;
|
|
2071
|
+
if (themeMode === "light") {
|
|
2072
|
+
newMode = "dark";
|
|
2073
|
+
} else if (themeMode === "dark") {
|
|
2074
|
+
newMode = "light";
|
|
2075
|
+
} else {
|
|
2076
|
+
newMode = "dark";
|
|
2077
|
+
}
|
|
2078
|
+
setThemeMode(newMode);
|
|
2079
|
+
themeModeRef.current = newMode;
|
|
2080
|
+
applyTheme(newMode);
|
|
2081
|
+
localStorage.setItem("theme-mode", newMode);
|
|
2082
|
+
}, [themeMode, applyTheme]);
|
|
2083
|
+
const setTheme = useCallback(
|
|
2084
|
+
(mode) => {
|
|
2085
|
+
setThemeMode(mode);
|
|
2086
|
+
themeModeRef.current = mode;
|
|
2087
|
+
applyTheme(mode);
|
|
2088
|
+
localStorage.setItem("theme-mode", mode);
|
|
2089
|
+
},
|
|
2090
|
+
[applyTheme]
|
|
2091
|
+
);
|
|
2092
|
+
useEffect4(() => {
|
|
2093
|
+
const htmlElement = document.documentElement;
|
|
2094
|
+
const currentTheme = htmlElement.getAttribute("data-theme");
|
|
2095
|
+
if (currentTheme && !htmlElement.getAttribute("data-original-theme")) {
|
|
2096
|
+
htmlElement.setAttribute("data-original-theme", currentTheme);
|
|
2097
|
+
}
|
|
2098
|
+
const savedThemeMode = localStorage.getItem("theme-mode");
|
|
2099
|
+
const initialMode = savedThemeMode || "system";
|
|
2100
|
+
if (!savedThemeMode) {
|
|
2101
|
+
localStorage.setItem("theme-mode", "system");
|
|
2102
|
+
}
|
|
2103
|
+
setThemeMode(initialMode);
|
|
2104
|
+
themeModeRef.current = initialMode;
|
|
2105
|
+
applyTheme(initialMode);
|
|
2106
|
+
const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
|
2107
|
+
const handleSystemThemeChange = () => {
|
|
2108
|
+
if (themeModeRef.current === "system") {
|
|
2109
|
+
applyTheme("system");
|
|
2110
|
+
}
|
|
2111
|
+
};
|
|
2112
|
+
mediaQuery.addEventListener("change", handleSystemThemeChange);
|
|
2113
|
+
return () => {
|
|
2114
|
+
mediaQuery.removeEventListener("change", handleSystemThemeChange);
|
|
2115
|
+
};
|
|
2116
|
+
}, [applyTheme]);
|
|
2117
|
+
return {
|
|
2118
|
+
themeMode,
|
|
2119
|
+
isDark,
|
|
2120
|
+
toggleTheme,
|
|
2121
|
+
setTheme
|
|
2122
|
+
};
|
|
2123
|
+
};
|
|
2124
|
+
|
|
2125
|
+
// src/components/ThemeToggle/ThemeToggle.tsx
|
|
2126
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
2127
|
+
var ThemeToggle = ({
|
|
2128
|
+
variant = "default",
|
|
2129
|
+
onToggle
|
|
2130
|
+
}) => {
|
|
2131
|
+
const { themeMode, setTheme } = useTheme();
|
|
2132
|
+
const [tempTheme, setTempTheme] = useState6(themeMode);
|
|
2133
|
+
useEffect5(() => {
|
|
2134
|
+
setTempTheme(themeMode);
|
|
2135
|
+
}, [themeMode]);
|
|
2136
|
+
const problemTypes = [
|
|
2137
|
+
{
|
|
2138
|
+
id: "light",
|
|
2139
|
+
title: "Claro",
|
|
2140
|
+
icon: /* @__PURE__ */ jsx19(Sun, { size: 24 })
|
|
2141
|
+
},
|
|
2142
|
+
{
|
|
2143
|
+
id: "dark",
|
|
2144
|
+
title: "Escuro",
|
|
2145
|
+
icon: /* @__PURE__ */ jsx19(Moon, { size: 24 })
|
|
2146
|
+
},
|
|
2147
|
+
{
|
|
2148
|
+
id: "system",
|
|
2149
|
+
title: "Sistema",
|
|
2150
|
+
icon: /* @__PURE__ */ jsx19(
|
|
2151
|
+
"svg",
|
|
2152
|
+
{
|
|
2153
|
+
width: "25",
|
|
2154
|
+
height: "25",
|
|
2155
|
+
viewBox: "0 0 25 25",
|
|
2156
|
+
fill: "none",
|
|
2157
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2158
|
+
children: /* @__PURE__ */ jsx19(
|
|
2159
|
+
"path",
|
|
2160
|
+
{
|
|
2161
|
+
d: "M12.5 2.75C15.085 2.75276 17.5637 3.78054 19.3916 5.6084C21.2195 7.43628 22.2473 9.915 22.25 12.5C22.25 14.4284 21.6778 16.3136 20.6064 17.917C19.5352 19.5201 18.0128 20.7699 16.2314 21.5078C14.4499 22.2458 12.489 22.4387 10.5977 22.0625C8.70642 21.6863 6.96899 20.758 5.60547 19.3945C4.24197 18.031 3.31374 16.2936 2.9375 14.4023C2.56129 12.511 2.75423 10.5501 3.49219 8.76855C4.23012 6.98718 5.47982 5.46483 7.08301 4.39355C8.68639 3.32221 10.5716 2.75 12.5 2.75ZM11.75 4.28516C9.70145 4.47452 7.7973 5.42115 6.41016 6.94043C5.02299 8.4599 4.25247 10.4426 4.25 12.5C4.25247 14.5574 5.02299 16.5401 6.41016 18.0596C7.7973 19.5789 9.70145 20.5255 11.75 20.7148V4.28516Z",
|
|
2162
|
+
fill: "#525252"
|
|
2163
|
+
}
|
|
2164
|
+
)
|
|
2165
|
+
}
|
|
2166
|
+
)
|
|
2167
|
+
}
|
|
2168
|
+
];
|
|
2169
|
+
const handleThemeSelect = (selectedTheme) => {
|
|
2170
|
+
if (variant === "with-save") {
|
|
2171
|
+
setTempTheme(selectedTheme);
|
|
2172
|
+
} else {
|
|
2173
|
+
setTheme(selectedTheme);
|
|
2174
|
+
}
|
|
2175
|
+
if (onToggle) {
|
|
2176
|
+
onToggle(selectedTheme);
|
|
2177
|
+
}
|
|
2178
|
+
};
|
|
2179
|
+
const currentTheme = variant === "with-save" ? tempTheme : themeMode;
|
|
2180
|
+
return /* @__PURE__ */ jsx19("div", { className: "flex flex-row gap-2 sm:gap-4 py-2", children: problemTypes.map((type) => /* @__PURE__ */ jsx19(
|
|
2181
|
+
SelectionButton_default,
|
|
2182
|
+
{
|
|
2183
|
+
icon: type.icon,
|
|
2184
|
+
label: type.title,
|
|
2185
|
+
selected: currentTheme === type.id,
|
|
2186
|
+
onClick: () => handleThemeSelect(type.id),
|
|
2187
|
+
className: "w-full p-2 sm:p-4"
|
|
2188
|
+
},
|
|
2189
|
+
type.id
|
|
2190
|
+
)) });
|
|
2191
|
+
};
|
|
2192
|
+
|
|
2193
|
+
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
2194
|
+
import { Fragment as Fragment2, jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1812
2195
|
function createDropdownStore() {
|
|
1813
2196
|
return create4((set) => ({
|
|
1814
2197
|
open: false,
|
|
@@ -1843,14 +2226,14 @@ var DropdownMenu = ({
|
|
|
1843
2226
|
open: propOpen,
|
|
1844
2227
|
onOpenChange
|
|
1845
2228
|
}) => {
|
|
1846
|
-
const storeRef =
|
|
2229
|
+
const storeRef = useRef4(null);
|
|
1847
2230
|
storeRef.current ??= createDropdownStore();
|
|
1848
2231
|
const store = storeRef.current;
|
|
1849
2232
|
const { open, setOpen: storeSetOpen } = useStore3(store, (s) => s);
|
|
1850
2233
|
const setOpen = (newOpen) => {
|
|
1851
2234
|
storeSetOpen(newOpen);
|
|
1852
2235
|
};
|
|
1853
|
-
const menuRef =
|
|
2236
|
+
const menuRef = useRef4(null);
|
|
1854
2237
|
const handleArrowDownOrArrowUp = (event) => {
|
|
1855
2238
|
const menuContent = menuRef.current?.querySelector('[role="menu"]');
|
|
1856
2239
|
if (menuContent) {
|
|
@@ -1884,7 +2267,7 @@ var DropdownMenu = ({
|
|
|
1884
2267
|
setOpen(false);
|
|
1885
2268
|
}
|
|
1886
2269
|
};
|
|
1887
|
-
|
|
2270
|
+
useEffect6(() => {
|
|
1888
2271
|
if (open) {
|
|
1889
2272
|
document.addEventListener("mousedown", handleClickOutside);
|
|
1890
2273
|
document.addEventListener("keydown", handleDownkey);
|
|
@@ -1894,16 +2277,16 @@ var DropdownMenu = ({
|
|
|
1894
2277
|
document.removeEventListener("keydown", handleDownkey);
|
|
1895
2278
|
};
|
|
1896
2279
|
}, [open]);
|
|
1897
|
-
|
|
2280
|
+
useEffect6(() => {
|
|
1898
2281
|
setOpen(open);
|
|
1899
2282
|
onOpenChange?.(open);
|
|
1900
2283
|
}, [open, onOpenChange]);
|
|
1901
|
-
|
|
2284
|
+
useEffect6(() => {
|
|
1902
2285
|
if (propOpen) {
|
|
1903
2286
|
setOpen(propOpen);
|
|
1904
2287
|
}
|
|
1905
2288
|
}, [propOpen]);
|
|
1906
|
-
return /* @__PURE__ */
|
|
2289
|
+
return /* @__PURE__ */ jsx20("div", { className: "relative", ref: menuRef, children: injectStore3(children, store) });
|
|
1907
2290
|
};
|
|
1908
2291
|
var DropdownMenuTrigger = ({
|
|
1909
2292
|
className,
|
|
@@ -1915,7 +2298,7 @@ var DropdownMenuTrigger = ({
|
|
|
1915
2298
|
const store = useDropdownStore(externalStore);
|
|
1916
2299
|
const open = useStore3(store, (s) => s.open);
|
|
1917
2300
|
const toggleOpen = () => store.setState({ open: !open });
|
|
1918
|
-
return /* @__PURE__ */
|
|
2301
|
+
return /* @__PURE__ */ jsx20(
|
|
1919
2302
|
"button",
|
|
1920
2303
|
{
|
|
1921
2304
|
onClick: (e) => {
|
|
@@ -1951,7 +2334,7 @@ var MENUCONTENT_VARIANT_CLASSES = {
|
|
|
1951
2334
|
profile: "p-6"
|
|
1952
2335
|
};
|
|
1953
2336
|
var MenuLabel = forwardRef10(({ className, inset, store: _store, ...props }, ref) => {
|
|
1954
|
-
return /* @__PURE__ */
|
|
2337
|
+
return /* @__PURE__ */ jsx20(
|
|
1955
2338
|
"div",
|
|
1956
2339
|
{
|
|
1957
2340
|
ref,
|
|
@@ -1974,8 +2357,8 @@ var DropdownMenuContent = forwardRef10(
|
|
|
1974
2357
|
}, ref) => {
|
|
1975
2358
|
const store = useDropdownStore(externalStore);
|
|
1976
2359
|
const open = useStore3(store, (s) => s.open);
|
|
1977
|
-
const [isVisible, setIsVisible] =
|
|
1978
|
-
|
|
2360
|
+
const [isVisible, setIsVisible] = useState7(open);
|
|
2361
|
+
useEffect6(() => {
|
|
1979
2362
|
if (open) {
|
|
1980
2363
|
setIsVisible(true);
|
|
1981
2364
|
} else {
|
|
@@ -1990,7 +2373,7 @@ var DropdownMenuContent = forwardRef10(
|
|
|
1990
2373
|
return `absolute ${vertical} ${horizontal}`;
|
|
1991
2374
|
};
|
|
1992
2375
|
const variantClasses = MENUCONTENT_VARIANT_CLASSES[variant];
|
|
1993
|
-
return /* @__PURE__ */
|
|
2376
|
+
return /* @__PURE__ */ jsx20(
|
|
1994
2377
|
"div",
|
|
1995
2378
|
{
|
|
1996
2379
|
ref,
|
|
@@ -2049,7 +2432,7 @@ var DropdownMenuItem = forwardRef10(
|
|
|
2049
2432
|
const getVariantProps = () => {
|
|
2050
2433
|
return variant === "profile" ? { "data-variant": "profile" } : {};
|
|
2051
2434
|
};
|
|
2052
|
-
return /* @__PURE__ */
|
|
2435
|
+
return /* @__PURE__ */ jsxs13(
|
|
2053
2436
|
"div",
|
|
2054
2437
|
{
|
|
2055
2438
|
ref,
|
|
@@ -2071,7 +2454,7 @@ var DropdownMenuItem = forwardRef10(
|
|
|
2071
2454
|
...props,
|
|
2072
2455
|
children: [
|
|
2073
2456
|
iconLeft,
|
|
2074
|
-
/* @__PURE__ */
|
|
2457
|
+
/* @__PURE__ */ jsx20("div", { className: "w-full", children }),
|
|
2075
2458
|
iconRight
|
|
2076
2459
|
]
|
|
2077
2460
|
}
|
|
@@ -2079,7 +2462,7 @@ var DropdownMenuItem = forwardRef10(
|
|
|
2079
2462
|
}
|
|
2080
2463
|
);
|
|
2081
2464
|
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
2082
|
-
var DropdownMenuSeparator = forwardRef10(({ className, store: _store, ...props }, ref) => /* @__PURE__ */
|
|
2465
|
+
var DropdownMenuSeparator = forwardRef10(({ className, store: _store, ...props }, ref) => /* @__PURE__ */ jsx20(
|
|
2083
2466
|
"div",
|
|
2084
2467
|
{
|
|
2085
2468
|
ref,
|
|
@@ -2092,7 +2475,7 @@ var ProfileMenuTrigger = forwardRef10(({ className, onClick, store: externalStor
|
|
|
2092
2475
|
const store = useDropdownStore(externalStore);
|
|
2093
2476
|
const open = useStore3(store, (s) => s.open);
|
|
2094
2477
|
const toggleOpen = () => store.setState({ open: !open });
|
|
2095
|
-
return /* @__PURE__ */
|
|
2478
|
+
return /* @__PURE__ */ jsx20(
|
|
2096
2479
|
"button",
|
|
2097
2480
|
{
|
|
2098
2481
|
ref,
|
|
@@ -2107,13 +2490,13 @@ var ProfileMenuTrigger = forwardRef10(({ className, onClick, store: externalStor
|
|
|
2107
2490
|
},
|
|
2108
2491
|
"aria-expanded": open,
|
|
2109
2492
|
...props,
|
|
2110
|
-
children: /* @__PURE__ */
|
|
2493
|
+
children: /* @__PURE__ */ jsx20("span", { className: "size-6 rounded-full bg-primary-100 flex items-center justify-center", children: /* @__PURE__ */ jsx20(User, { className: "text-primary-950", size: 18 }) })
|
|
2111
2494
|
}
|
|
2112
2495
|
);
|
|
2113
2496
|
});
|
|
2114
2497
|
ProfileMenuTrigger.displayName = "ProfileMenuTrigger";
|
|
2115
2498
|
var ProfileMenuHeader = forwardRef10(({ className, name, email, store: _store, ...props }, ref) => {
|
|
2116
|
-
return /* @__PURE__ */
|
|
2499
|
+
return /* @__PURE__ */ jsxs13(
|
|
2117
2500
|
"div",
|
|
2118
2501
|
{
|
|
2119
2502
|
ref,
|
|
@@ -2121,18 +2504,98 @@ var ProfileMenuHeader = forwardRef10(({ className, name, email, store: _store, .
|
|
|
2121
2504
|
className: cn("flex flex-row gap-4 items-center", className),
|
|
2122
2505
|
...props,
|
|
2123
2506
|
children: [
|
|
2124
|
-
/* @__PURE__ */
|
|
2125
|
-
/* @__PURE__ */
|
|
2126
|
-
/* @__PURE__ */
|
|
2127
|
-
/* @__PURE__ */
|
|
2507
|
+
/* @__PURE__ */ jsx20("span", { className: "size-16 bg-primary-100 rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsx20(User, { size: 34, className: "text-primary-950" }) }),
|
|
2508
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex flex-col ", children: [
|
|
2509
|
+
/* @__PURE__ */ jsx20(Text_default, { size: "xl", weight: "bold", color: "text-text-950", children: name }),
|
|
2510
|
+
/* @__PURE__ */ jsx20(Text_default, { size: "md", color: "text-text-600", children: email })
|
|
2128
2511
|
] })
|
|
2129
2512
|
]
|
|
2130
2513
|
}
|
|
2131
2514
|
);
|
|
2132
2515
|
});
|
|
2133
2516
|
ProfileMenuHeader.displayName = "ProfileMenuHeader";
|
|
2517
|
+
var ProfileToggleTheme = ({ ...props }) => {
|
|
2518
|
+
const { themeMode, setTheme } = useTheme();
|
|
2519
|
+
const [modalThemeToggle, setModalThemeToggle] = useState7(false);
|
|
2520
|
+
const [selectedTheme, setSelectedTheme] = useState7(themeMode);
|
|
2521
|
+
const handleClick = (e) => {
|
|
2522
|
+
e.preventDefault();
|
|
2523
|
+
e.stopPropagation();
|
|
2524
|
+
setModalThemeToggle(true);
|
|
2525
|
+
};
|
|
2526
|
+
const handleSave = () => {
|
|
2527
|
+
setTheme(selectedTheme);
|
|
2528
|
+
setModalThemeToggle(false);
|
|
2529
|
+
};
|
|
2530
|
+
return /* @__PURE__ */ jsxs13(Fragment2, { children: [
|
|
2531
|
+
/* @__PURE__ */ jsxs13(
|
|
2532
|
+
"div",
|
|
2533
|
+
{
|
|
2534
|
+
role: "menuitem",
|
|
2535
|
+
"data-variant": "profile",
|
|
2536
|
+
className: "relative flex flex-row justify-between select-none items-center gap-2 rounded-sm p-4 text-sm outline-none transition-colors [&>svg]:size-6 [&>svg]:shrink-0 cursor-pointer hover:bg-background-50 text-text-700 focus:bg-accent focus:text-accent-foreground hover:bg-accent hover:text-accent-foreground",
|
|
2537
|
+
onClick: handleClick,
|
|
2538
|
+
onKeyDown: (e) => {
|
|
2539
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
2540
|
+
e.preventDefault();
|
|
2541
|
+
e.stopPropagation();
|
|
2542
|
+
setModalThemeToggle(true);
|
|
2543
|
+
}
|
|
2544
|
+
},
|
|
2545
|
+
tabIndex: 0,
|
|
2546
|
+
...props,
|
|
2547
|
+
children: [
|
|
2548
|
+
/* @__PURE__ */ jsx20(
|
|
2549
|
+
"svg",
|
|
2550
|
+
{
|
|
2551
|
+
width: "25",
|
|
2552
|
+
height: "25",
|
|
2553
|
+
viewBox: "0 0 25 25",
|
|
2554
|
+
fill: "none",
|
|
2555
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2556
|
+
children: /* @__PURE__ */ jsx20(
|
|
2557
|
+
"path",
|
|
2558
|
+
{
|
|
2559
|
+
d: "M12.5 2.75C15.085 2.75276 17.5637 3.78054 19.3916 5.6084C21.2195 7.43628 22.2473 9.915 22.25 12.5C22.25 14.4284 21.6778 16.3136 20.6064 17.917C19.5352 19.5201 18.0128 20.7699 16.2314 21.5078C14.4499 22.2458 12.489 22.4387 10.5977 22.0625C8.70642 21.6863 6.96899 20.758 5.60547 19.3945C4.24197 18.031 3.31374 16.2936 2.9375 14.4023C2.56129 12.511 2.75423 10.5501 3.49219 8.76855C4.23012 6.98718 5.47982 5.46483 7.08301 4.39355C8.68639 3.32221 10.5716 2.75 12.5 2.75ZM11.75 4.28516C9.70145 4.47452 7.7973 5.42115 6.41016 6.94043C5.02299 8.4599 4.25247 10.4426 4.25 12.5C4.25247 14.5574 5.02299 16.5401 6.41016 18.0596C7.7973 19.5789 9.70145 20.5255 11.75 20.7148V4.28516Z",
|
|
2560
|
+
fill: "#525252"
|
|
2561
|
+
}
|
|
2562
|
+
)
|
|
2563
|
+
}
|
|
2564
|
+
),
|
|
2565
|
+
/* @__PURE__ */ jsx20(Text_default, { className: "w-full", size: "md", children: "Apar\xEAncia" }),
|
|
2566
|
+
/* @__PURE__ */ jsx20(CaretRight, {})
|
|
2567
|
+
]
|
|
2568
|
+
}
|
|
2569
|
+
),
|
|
2570
|
+
/* @__PURE__ */ jsx20(
|
|
2571
|
+
Modal_default,
|
|
2572
|
+
{
|
|
2573
|
+
isOpen: modalThemeToggle,
|
|
2574
|
+
onClose: () => setModalThemeToggle(false),
|
|
2575
|
+
title: "Apar\xEAncia",
|
|
2576
|
+
size: "md",
|
|
2577
|
+
footer: /* @__PURE__ */ jsxs13("div", { className: "flex gap-3", children: [
|
|
2578
|
+
/* @__PURE__ */ jsx20(
|
|
2579
|
+
Button_default,
|
|
2580
|
+
{
|
|
2581
|
+
variant: "outline",
|
|
2582
|
+
onClick: () => setModalThemeToggle(false),
|
|
2583
|
+
children: "Cancelar"
|
|
2584
|
+
}
|
|
2585
|
+
),
|
|
2586
|
+
/* @__PURE__ */ jsx20(Button_default, { variant: "solid", onClick: () => handleSave(), children: "Salvar" })
|
|
2587
|
+
] }),
|
|
2588
|
+
children: /* @__PURE__ */ jsxs13("div", { className: "flex flex-col", children: [
|
|
2589
|
+
/* @__PURE__ */ jsx20("p", { className: "text-sm text-text-500", children: "Escolha o tema:" }),
|
|
2590
|
+
/* @__PURE__ */ jsx20(ThemeToggle, { variant: "with-save", onToggle: setSelectedTheme })
|
|
2591
|
+
] })
|
|
2592
|
+
}
|
|
2593
|
+
)
|
|
2594
|
+
] });
|
|
2595
|
+
};
|
|
2596
|
+
ProfileToggleTheme.displayName = "ProfileToggleTheme";
|
|
2134
2597
|
var ProfileMenuSection = forwardRef10(({ className, children, store: _store, ...props }, ref) => {
|
|
2135
|
-
return /* @__PURE__ */
|
|
2598
|
+
return /* @__PURE__ */ jsx20("div", { ref, className: cn("flex flex-col p-2", className), ...props, children });
|
|
2136
2599
|
});
|
|
2137
2600
|
ProfileMenuSection.displayName = "ProfileMenuSection";
|
|
2138
2601
|
var ProfileMenuFooter = ({
|
|
@@ -2144,7 +2607,7 @@ var ProfileMenuFooter = ({
|
|
|
2144
2607
|
}) => {
|
|
2145
2608
|
const store = useDropdownStore(externalStore);
|
|
2146
2609
|
const setOpen = useStore3(store, (s) => s.setOpen);
|
|
2147
|
-
return /* @__PURE__ */
|
|
2610
|
+
return /* @__PURE__ */ jsxs13(
|
|
2148
2611
|
Button_default,
|
|
2149
2612
|
{
|
|
2150
2613
|
variant: "outline",
|
|
@@ -2156,8 +2619,8 @@ var ProfileMenuFooter = ({
|
|
|
2156
2619
|
},
|
|
2157
2620
|
...props,
|
|
2158
2621
|
children: [
|
|
2159
|
-
/* @__PURE__ */
|
|
2160
|
-
/* @__PURE__ */
|
|
2622
|
+
/* @__PURE__ */ jsx20("span", { className: "mr-2 flex items-center", children: /* @__PURE__ */ jsx20(SignOut, {}) }),
|
|
2623
|
+
/* @__PURE__ */ jsx20(Text_default, { children: "Sair" })
|
|
2161
2624
|
]
|
|
2162
2625
|
}
|
|
2163
2626
|
);
|
|
@@ -2166,7 +2629,7 @@ ProfileMenuFooter.displayName = "ProfileMenuFooter";
|
|
|
2166
2629
|
var DropdownMenu_default = DropdownMenu;
|
|
2167
2630
|
|
|
2168
2631
|
// src/components/Search/Search.tsx
|
|
2169
|
-
import { jsx as
|
|
2632
|
+
import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2170
2633
|
var filterOptions = (options, query) => {
|
|
2171
2634
|
if (!query || query.length < 1) return [];
|
|
2172
2635
|
return options.filter(
|
|
@@ -2211,9 +2674,9 @@ var Search = forwardRef11(
|
|
|
2211
2674
|
placeholder = "Buscar...",
|
|
2212
2675
|
...props
|
|
2213
2676
|
}, ref) => {
|
|
2214
|
-
const [dropdownOpen, setDropdownOpen] =
|
|
2215
|
-
const dropdownStore =
|
|
2216
|
-
const dropdownRef =
|
|
2677
|
+
const [dropdownOpen, setDropdownOpen] = useState8(false);
|
|
2678
|
+
const dropdownStore = useRef5(createDropdownStore()).current;
|
|
2679
|
+
const dropdownRef = useRef5(null);
|
|
2217
2680
|
const filteredOptions = useMemo2(() => {
|
|
2218
2681
|
if (!options.length) {
|
|
2219
2682
|
return [];
|
|
@@ -2222,7 +2685,7 @@ var Search = forwardRef11(
|
|
|
2222
2685
|
return filtered;
|
|
2223
2686
|
}, [options, value]);
|
|
2224
2687
|
const showDropdown = controlledShowDropdown ?? (dropdownOpen && value && String(value).length > 0);
|
|
2225
|
-
|
|
2688
|
+
useEffect7(() => {
|
|
2226
2689
|
const shouldShow = Boolean(value && String(value).length > 0);
|
|
2227
2690
|
setDropdownOpen(shouldShow);
|
|
2228
2691
|
dropdownStore.setState({ open: shouldShow });
|
|
@@ -2234,7 +2697,7 @@ var Search = forwardRef11(
|
|
|
2234
2697
|
dropdownStore.setState({ open: false });
|
|
2235
2698
|
updateInputValue(option, ref, onChange);
|
|
2236
2699
|
};
|
|
2237
|
-
|
|
2700
|
+
useEffect7(() => {
|
|
2238
2701
|
const handleClickOutside = (event) => {
|
|
2239
2702
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
2240
2703
|
setDropdownOpen(false);
|
|
@@ -2248,7 +2711,7 @@ var Search = forwardRef11(
|
|
|
2248
2711
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
2249
2712
|
};
|
|
2250
2713
|
}, [showDropdown, dropdownStore]);
|
|
2251
|
-
const generatedId =
|
|
2714
|
+
const generatedId = useId7();
|
|
2252
2715
|
const inputId = id ?? `search-${generatedId}`;
|
|
2253
2716
|
const handleClear = () => {
|
|
2254
2717
|
if (onClear) {
|
|
@@ -2277,24 +2740,24 @@ var Search = forwardRef11(
|
|
|
2277
2740
|
return "hover:border-border-400";
|
|
2278
2741
|
};
|
|
2279
2742
|
const showClearButton = value && !disabled && !readOnly;
|
|
2280
|
-
return /* @__PURE__ */
|
|
2743
|
+
return /* @__PURE__ */ jsxs14(
|
|
2281
2744
|
"div",
|
|
2282
2745
|
{
|
|
2283
2746
|
ref: dropdownRef,
|
|
2284
2747
|
className: `w-full max-w-lg md:w-[488px] ${containerClassName}`,
|
|
2285
2748
|
children: [
|
|
2286
|
-
/* @__PURE__ */
|
|
2287
|
-
/* @__PURE__ */
|
|
2749
|
+
/* @__PURE__ */ jsxs14("div", { className: "relative flex items-center", children: [
|
|
2750
|
+
/* @__PURE__ */ jsx21("div", { className: "absolute left-3 top-1/2 transform -translate-y-1/2", children: /* @__PURE__ */ jsx21(
|
|
2288
2751
|
"button",
|
|
2289
2752
|
{
|
|
2290
2753
|
type: "button",
|
|
2291
2754
|
className: "w-6 h-6 text-text-800 flex items-center justify-center bg-transparent border-0 p-0 cursor-pointer hover:text-text-600 transition-colors",
|
|
2292
2755
|
onClick: handleLeftIconClick,
|
|
2293
2756
|
"aria-label": "Voltar",
|
|
2294
|
-
children: /* @__PURE__ */
|
|
2757
|
+
children: /* @__PURE__ */ jsx21(CaretLeft, {})
|
|
2295
2758
|
}
|
|
2296
2759
|
) }),
|
|
2297
|
-
/* @__PURE__ */
|
|
2760
|
+
/* @__PURE__ */ jsx21(
|
|
2298
2761
|
"input",
|
|
2299
2762
|
{
|
|
2300
2763
|
ref,
|
|
@@ -2312,24 +2775,24 @@ var Search = forwardRef11(
|
|
|
2312
2775
|
...props
|
|
2313
2776
|
}
|
|
2314
2777
|
),
|
|
2315
|
-
showClearButton && /* @__PURE__ */
|
|
2778
|
+
showClearButton && /* @__PURE__ */ jsx21("div", { className: "absolute right-3 top-1/2 transform -translate-y-1/2", children: /* @__PURE__ */ jsx21(
|
|
2316
2779
|
"button",
|
|
2317
2780
|
{
|
|
2318
2781
|
type: "button",
|
|
2319
2782
|
className: "p-0 border-0 bg-transparent cursor-pointer",
|
|
2320
2783
|
onMouseDown: handleClearClick,
|
|
2321
2784
|
"aria-label": "Limpar busca",
|
|
2322
|
-
children: /* @__PURE__ */
|
|
2785
|
+
children: /* @__PURE__ */ jsx21("span", { className: "w-6 h-6 text-text-800 flex items-center justify-center hover:text-text-600 transition-colors", children: /* @__PURE__ */ jsx21(X3, {}) })
|
|
2323
2786
|
}
|
|
2324
2787
|
) })
|
|
2325
2788
|
] }),
|
|
2326
|
-
showDropdown && /* @__PURE__ */
|
|
2789
|
+
showDropdown && /* @__PURE__ */ jsx21(DropdownMenu_default, { open: showDropdown, onOpenChange: setDropdownOpen, children: /* @__PURE__ */ jsx21(
|
|
2327
2790
|
DropdownMenuContent,
|
|
2328
2791
|
{
|
|
2329
2792
|
className: "w-full mt-1",
|
|
2330
2793
|
style: { maxHeight: dropdownMaxHeight },
|
|
2331
2794
|
align: "start",
|
|
2332
|
-
children: filteredOptions.length > 0 ? filteredOptions.map((option) => /* @__PURE__ */
|
|
2795
|
+
children: filteredOptions.length > 0 ? filteredOptions.map((option) => /* @__PURE__ */ jsx21(
|
|
2333
2796
|
DropdownMenuItem,
|
|
2334
2797
|
{
|
|
2335
2798
|
onClick: () => handleSelectOption(option),
|
|
@@ -2337,7 +2800,7 @@ var Search = forwardRef11(
|
|
|
2337
2800
|
children: option
|
|
2338
2801
|
},
|
|
2339
2802
|
option
|
|
2340
|
-
)) : /* @__PURE__ */
|
|
2803
|
+
)) : /* @__PURE__ */ jsx21("div", { className: "px-3 py-3 text-text-700 text-base", children: noResultsText })
|
|
2341
2804
|
}
|
|
2342
2805
|
) })
|
|
2343
2806
|
]
|
|
@@ -2350,7 +2813,7 @@ var Search_default = Search;
|
|
|
2350
2813
|
|
|
2351
2814
|
// src/components/Chips/Chips.tsx
|
|
2352
2815
|
import { Check as Check2 } from "phosphor-react";
|
|
2353
|
-
import { jsx as
|
|
2816
|
+
import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2354
2817
|
var STATE_CLASSES5 = {
|
|
2355
2818
|
default: "bg-background text-text-950 border border-border-100 hover:bg-secondary-50 hover:border-border-300",
|
|
2356
2819
|
selected: "bg-info-background text-primary-950 border-2 border-primary-950 hover:bg-secondary-50 focus-visible:border-0"
|
|
@@ -2365,7 +2828,7 @@ var Chips = ({
|
|
|
2365
2828
|
}) => {
|
|
2366
2829
|
const stateClasses = selected ? STATE_CLASSES5.selected : STATE_CLASSES5.default;
|
|
2367
2830
|
const baseClasses = "inline-flex items-center justify-center rounded-full cursor-pointer font-normal text-sm px-4 py-2 gap-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-primary-600 disabled:opacity-40 disabled:cursor-not-allowed";
|
|
2368
|
-
return /* @__PURE__ */
|
|
2831
|
+
return /* @__PURE__ */ jsxs15(
|
|
2369
2832
|
"button",
|
|
2370
2833
|
{
|
|
2371
2834
|
className: cn(baseClasses, stateClasses, className),
|
|
@@ -2373,8 +2836,8 @@ var Chips = ({
|
|
|
2373
2836
|
type,
|
|
2374
2837
|
...props,
|
|
2375
2838
|
children: [
|
|
2376
|
-
selected && /* @__PURE__ */
|
|
2377
|
-
/* @__PURE__ */
|
|
2839
|
+
selected && /* @__PURE__ */ jsx22("span", { className: `flex items-center`, children: /* @__PURE__ */ jsx22(Check2, { weight: "bold", size: 16 }) }),
|
|
2840
|
+
/* @__PURE__ */ jsx22("span", { className: "flex-1", children })
|
|
2378
2841
|
]
|
|
2379
2842
|
}
|
|
2380
2843
|
);
|
|
@@ -2382,8 +2845,8 @@ var Chips = ({
|
|
|
2382
2845
|
var Chips_default = Chips;
|
|
2383
2846
|
|
|
2384
2847
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
2385
|
-
import { Fragment as
|
|
2386
|
-
var
|
|
2848
|
+
import { Fragment as Fragment3, jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2849
|
+
var SIZE_CLASSES8 = {
|
|
2387
2850
|
small: {
|
|
2388
2851
|
container: "h-1",
|
|
2389
2852
|
// 4px height (h-1 = 4px in Tailwind)
|
|
@@ -2494,20 +2957,20 @@ var renderStackedHitCountDisplay = (showHitCount, showPercentage, clampedValue,
|
|
|
2494
2957
|
max,
|
|
2495
2958
|
percentage
|
|
2496
2959
|
);
|
|
2497
|
-
return /* @__PURE__ */
|
|
2960
|
+
return /* @__PURE__ */ jsx23(
|
|
2498
2961
|
"div",
|
|
2499
2962
|
{
|
|
2500
2963
|
className: cn(
|
|
2501
2964
|
"text-xs font-medium leading-[14px] text-right",
|
|
2502
2965
|
percentageClassName
|
|
2503
2966
|
),
|
|
2504
|
-
children: displayPriority.type === "hitCount" ? /* @__PURE__ */
|
|
2505
|
-
/* @__PURE__ */
|
|
2506
|
-
/* @__PURE__ */
|
|
2967
|
+
children: displayPriority.type === "hitCount" ? /* @__PURE__ */ jsxs16(Fragment3, { children: [
|
|
2968
|
+
/* @__PURE__ */ jsx23("span", { className: "text-success-200", children: Math.round(clampedValue) }),
|
|
2969
|
+
/* @__PURE__ */ jsxs16("span", { className: "text-text-600", children: [
|
|
2507
2970
|
" de ",
|
|
2508
2971
|
max
|
|
2509
2972
|
] })
|
|
2510
|
-
] }) : /* @__PURE__ */
|
|
2973
|
+
] }) : /* @__PURE__ */ jsxs16(Text_default, { size: "xs", weight: "medium", className: "text-success-200", children: [
|
|
2511
2974
|
Math.round(percentage),
|
|
2512
2975
|
"%"
|
|
2513
2976
|
] })
|
|
@@ -2522,7 +2985,7 @@ var ProgressBarBase = ({
|
|
|
2522
2985
|
variantClasses,
|
|
2523
2986
|
containerClassName,
|
|
2524
2987
|
fillClassName
|
|
2525
|
-
}) => /* @__PURE__ */
|
|
2988
|
+
}) => /* @__PURE__ */ jsxs16(
|
|
2526
2989
|
"div",
|
|
2527
2990
|
{
|
|
2528
2991
|
className: cn(
|
|
@@ -2531,7 +2994,7 @@ var ProgressBarBase = ({
|
|
|
2531
2994
|
"overflow-hidden relative"
|
|
2532
2995
|
),
|
|
2533
2996
|
children: [
|
|
2534
|
-
/* @__PURE__ */
|
|
2997
|
+
/* @__PURE__ */ jsx23(
|
|
2535
2998
|
"progress",
|
|
2536
2999
|
{
|
|
2537
3000
|
value: clampedValue,
|
|
@@ -2540,7 +3003,7 @@ var ProgressBarBase = ({
|
|
|
2540
3003
|
className: "absolute inset-0 w-full h-full opacity-0"
|
|
2541
3004
|
}
|
|
2542
3005
|
),
|
|
2543
|
-
/* @__PURE__ */
|
|
3006
|
+
/* @__PURE__ */ jsx23(
|
|
2544
3007
|
"div",
|
|
2545
3008
|
{
|
|
2546
3009
|
className: cn(
|
|
@@ -2566,7 +3029,7 @@ var StackedLayout = ({
|
|
|
2566
3029
|
percentage,
|
|
2567
3030
|
variantClasses,
|
|
2568
3031
|
dimensions
|
|
2569
|
-
}) => /* @__PURE__ */
|
|
3032
|
+
}) => /* @__PURE__ */ jsxs16(
|
|
2570
3033
|
"div",
|
|
2571
3034
|
{
|
|
2572
3035
|
className: cn(
|
|
@@ -2576,8 +3039,8 @@ var StackedLayout = ({
|
|
|
2576
3039
|
className
|
|
2577
3040
|
),
|
|
2578
3041
|
children: [
|
|
2579
|
-
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */
|
|
2580
|
-
label && /* @__PURE__ */
|
|
3042
|
+
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ jsxs16("div", { className: "flex flex-row justify-between items-center w-full h-[19px]", children: [
|
|
3043
|
+
label && /* @__PURE__ */ jsx23(
|
|
2581
3044
|
Text_default,
|
|
2582
3045
|
{
|
|
2583
3046
|
as: "div",
|
|
@@ -2596,7 +3059,7 @@ var StackedLayout = ({
|
|
|
2596
3059
|
percentageClassName
|
|
2597
3060
|
)
|
|
2598
3061
|
] }),
|
|
2599
|
-
/* @__PURE__ */
|
|
3062
|
+
/* @__PURE__ */ jsx23(
|
|
2600
3063
|
ProgressBarBase,
|
|
2601
3064
|
{
|
|
2602
3065
|
clampedValue,
|
|
@@ -2638,7 +3101,7 @@ var CompactLayout = ({
|
|
|
2638
3101
|
percentageClassName,
|
|
2639
3102
|
labelClassName
|
|
2640
3103
|
});
|
|
2641
|
-
return /* @__PURE__ */
|
|
3104
|
+
return /* @__PURE__ */ jsxs16(
|
|
2642
3105
|
"div",
|
|
2643
3106
|
{
|
|
2644
3107
|
className: cn(
|
|
@@ -2648,7 +3111,7 @@ var CompactLayout = ({
|
|
|
2648
3111
|
className
|
|
2649
3112
|
),
|
|
2650
3113
|
children: [
|
|
2651
|
-
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */
|
|
3114
|
+
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ jsx23(
|
|
2652
3115
|
Text_default,
|
|
2653
3116
|
{
|
|
2654
3117
|
as: "div",
|
|
@@ -2659,7 +3122,7 @@ var CompactLayout = ({
|
|
|
2659
3122
|
children: content
|
|
2660
3123
|
}
|
|
2661
3124
|
),
|
|
2662
|
-
/* @__PURE__ */
|
|
3125
|
+
/* @__PURE__ */ jsx23(
|
|
2663
3126
|
ProgressBarBase,
|
|
2664
3127
|
{
|
|
2665
3128
|
clampedValue,
|
|
@@ -2695,9 +3158,9 @@ var DefaultLayout = ({
|
|
|
2695
3158
|
label,
|
|
2696
3159
|
showPercentage
|
|
2697
3160
|
);
|
|
2698
|
-
return /* @__PURE__ */
|
|
2699
|
-
displayConfig.showHeader && /* @__PURE__ */
|
|
2700
|
-
label && /* @__PURE__ */
|
|
3161
|
+
return /* @__PURE__ */ jsxs16("div", { className: cn("flex", sizeClasses.layout, gapClass, className), children: [
|
|
3162
|
+
displayConfig.showHeader && /* @__PURE__ */ jsxs16("div", { className: "flex flex-row items-center justify-between w-full", children: [
|
|
3163
|
+
label && /* @__PURE__ */ jsx23(
|
|
2701
3164
|
Text_default,
|
|
2702
3165
|
{
|
|
2703
3166
|
as: "div",
|
|
@@ -2710,7 +3173,7 @@ var DefaultLayout = ({
|
|
|
2710
3173
|
children: label
|
|
2711
3174
|
}
|
|
2712
3175
|
),
|
|
2713
|
-
showPercentage && /* @__PURE__ */
|
|
3176
|
+
showPercentage && /* @__PURE__ */ jsxs16(
|
|
2714
3177
|
Text_default,
|
|
2715
3178
|
{
|
|
2716
3179
|
size: "xs",
|
|
@@ -2726,7 +3189,7 @@ var DefaultLayout = ({
|
|
|
2726
3189
|
}
|
|
2727
3190
|
)
|
|
2728
3191
|
] }),
|
|
2729
|
-
/* @__PURE__ */
|
|
3192
|
+
/* @__PURE__ */ jsx23(
|
|
2730
3193
|
ProgressBarBase,
|
|
2731
3194
|
{
|
|
2732
3195
|
clampedValue,
|
|
@@ -2746,7 +3209,7 @@ var DefaultLayout = ({
|
|
|
2746
3209
|
)
|
|
2747
3210
|
}
|
|
2748
3211
|
),
|
|
2749
|
-
displayConfig.showPercentage && /* @__PURE__ */
|
|
3212
|
+
displayConfig.showPercentage && /* @__PURE__ */ jsxs16(
|
|
2750
3213
|
Text_default,
|
|
2751
3214
|
{
|
|
2752
3215
|
size: "xs",
|
|
@@ -2761,7 +3224,7 @@ var DefaultLayout = ({
|
|
|
2761
3224
|
]
|
|
2762
3225
|
}
|
|
2763
3226
|
),
|
|
2764
|
-
displayConfig.showLabel && /* @__PURE__ */
|
|
3227
|
+
displayConfig.showLabel && /* @__PURE__ */ jsx23(
|
|
2765
3228
|
Text_default,
|
|
2766
3229
|
{
|
|
2767
3230
|
as: "div",
|
|
@@ -2794,10 +3257,10 @@ var ProgressBar = ({
|
|
|
2794
3257
|
compactHeight
|
|
2795
3258
|
}) => {
|
|
2796
3259
|
const { clampedValue, percentage } = calculateProgressValues(value, max);
|
|
2797
|
-
const sizeClasses =
|
|
3260
|
+
const sizeClasses = SIZE_CLASSES8[size];
|
|
2798
3261
|
const variantClasses = VARIANT_CLASSES2[variant];
|
|
2799
3262
|
if (layout === "stacked") {
|
|
2800
|
-
return /* @__PURE__ */
|
|
3263
|
+
return /* @__PURE__ */ jsx23(
|
|
2801
3264
|
StackedLayout,
|
|
2802
3265
|
{
|
|
2803
3266
|
className,
|
|
@@ -2818,7 +3281,7 @@ var ProgressBar = ({
|
|
|
2818
3281
|
);
|
|
2819
3282
|
}
|
|
2820
3283
|
if (layout === "compact") {
|
|
2821
|
-
return /* @__PURE__ */
|
|
3284
|
+
return /* @__PURE__ */ jsx23(
|
|
2822
3285
|
CompactLayout,
|
|
2823
3286
|
{
|
|
2824
3287
|
className,
|
|
@@ -2838,7 +3301,7 @@ var ProgressBar = ({
|
|
|
2838
3301
|
}
|
|
2839
3302
|
);
|
|
2840
3303
|
}
|
|
2841
|
-
return /* @__PURE__ */
|
|
3304
|
+
return /* @__PURE__ */ jsx23(
|
|
2842
3305
|
DefaultLayout,
|
|
2843
3306
|
{
|
|
2844
3307
|
className,
|
|
@@ -2858,8 +3321,8 @@ var ProgressBar = ({
|
|
|
2858
3321
|
var ProgressBar_default = ProgressBar;
|
|
2859
3322
|
|
|
2860
3323
|
// src/components/ProgressCircle/ProgressCircle.tsx
|
|
2861
|
-
import { jsx as
|
|
2862
|
-
var
|
|
3324
|
+
import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3325
|
+
var SIZE_CLASSES9 = {
|
|
2863
3326
|
small: {
|
|
2864
3327
|
container: "w-[90px] h-[90px]",
|
|
2865
3328
|
// 90px circle from design specs
|
|
@@ -2933,14 +3396,14 @@ var ProgressCircle = ({
|
|
|
2933
3396
|
const safeValue = isNaN(value) ? 0 : value;
|
|
2934
3397
|
const clampedValue = Math.max(0, Math.min(safeValue, max));
|
|
2935
3398
|
const percentage = max === 0 ? 0 : clampedValue / max * 100;
|
|
2936
|
-
const sizeClasses =
|
|
3399
|
+
const sizeClasses = SIZE_CLASSES9[size];
|
|
2937
3400
|
const variantClasses = VARIANT_CLASSES3[variant];
|
|
2938
3401
|
const radius = size === "small" ? 37 : 64;
|
|
2939
3402
|
const circumference = 2 * Math.PI * radius;
|
|
2940
3403
|
const strokeDashoffset = circumference - percentage / 100 * circumference;
|
|
2941
3404
|
const center = size === "small" ? 45 : 76;
|
|
2942
3405
|
const svgSize = size === "small" ? 90 : 152;
|
|
2943
|
-
return /* @__PURE__ */
|
|
3406
|
+
return /* @__PURE__ */ jsxs17(
|
|
2944
3407
|
"div",
|
|
2945
3408
|
{
|
|
2946
3409
|
className: cn(
|
|
@@ -2950,7 +3413,7 @@ var ProgressCircle = ({
|
|
|
2950
3413
|
className
|
|
2951
3414
|
),
|
|
2952
3415
|
children: [
|
|
2953
|
-
/* @__PURE__ */
|
|
3416
|
+
/* @__PURE__ */ jsxs17(
|
|
2954
3417
|
"svg",
|
|
2955
3418
|
{
|
|
2956
3419
|
className: "absolute inset-0 transform -rotate-90",
|
|
@@ -2959,7 +3422,7 @@ var ProgressCircle = ({
|
|
|
2959
3422
|
viewBox: `0 0 ${svgSize} ${svgSize}`,
|
|
2960
3423
|
"aria-hidden": "true",
|
|
2961
3424
|
children: [
|
|
2962
|
-
/* @__PURE__ */
|
|
3425
|
+
/* @__PURE__ */ jsx24(
|
|
2963
3426
|
"circle",
|
|
2964
3427
|
{
|
|
2965
3428
|
cx: center,
|
|
@@ -2970,7 +3433,7 @@ var ProgressCircle = ({
|
|
|
2970
3433
|
className: cn(variantClasses.background, "rounded-lg")
|
|
2971
3434
|
}
|
|
2972
3435
|
),
|
|
2973
|
-
/* @__PURE__ */
|
|
3436
|
+
/* @__PURE__ */ jsx24(
|
|
2974
3437
|
"circle",
|
|
2975
3438
|
{
|
|
2976
3439
|
cx: center,
|
|
@@ -2990,7 +3453,7 @@ var ProgressCircle = ({
|
|
|
2990
3453
|
]
|
|
2991
3454
|
}
|
|
2992
3455
|
),
|
|
2993
|
-
/* @__PURE__ */
|
|
3456
|
+
/* @__PURE__ */ jsx24(
|
|
2994
3457
|
"progress",
|
|
2995
3458
|
{
|
|
2996
3459
|
value: clampedValue,
|
|
@@ -2999,7 +3462,7 @@ var ProgressCircle = ({
|
|
|
2999
3462
|
className: "absolute opacity-0 w-0 h-0"
|
|
3000
3463
|
}
|
|
3001
3464
|
),
|
|
3002
|
-
/* @__PURE__ */
|
|
3465
|
+
/* @__PURE__ */ jsxs17(
|
|
3003
3466
|
"div",
|
|
3004
3467
|
{
|
|
3005
3468
|
className: cn(
|
|
@@ -3008,7 +3471,7 @@ var ProgressCircle = ({
|
|
|
3008
3471
|
sizeClasses.contentWidth
|
|
3009
3472
|
),
|
|
3010
3473
|
children: [
|
|
3011
|
-
showPercentage && /* @__PURE__ */
|
|
3474
|
+
showPercentage && /* @__PURE__ */ jsxs17(
|
|
3012
3475
|
Text_default,
|
|
3013
3476
|
{
|
|
3014
3477
|
size: sizeClasses.textSize,
|
|
@@ -3024,7 +3487,7 @@ var ProgressCircle = ({
|
|
|
3024
3487
|
]
|
|
3025
3488
|
}
|
|
3026
3489
|
),
|
|
3027
|
-
label && /* @__PURE__ */
|
|
3490
|
+
label && /* @__PURE__ */ jsx24(
|
|
3028
3491
|
Text_default,
|
|
3029
3492
|
{
|
|
3030
3493
|
as: "span",
|
|
@@ -3049,8 +3512,8 @@ var ProgressCircle_default = ProgressCircle;
|
|
|
3049
3512
|
|
|
3050
3513
|
// src/components/Stepper/Stepper.tsx
|
|
3051
3514
|
import { Check as Check3 } from "phosphor-react";
|
|
3052
|
-
import { jsx as
|
|
3053
|
-
var
|
|
3515
|
+
import { jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3516
|
+
var SIZE_CLASSES10 = {
|
|
3054
3517
|
small: {
|
|
3055
3518
|
container: "gap-2",
|
|
3056
3519
|
// 8px gap as specified in CSS
|
|
@@ -3176,7 +3639,7 @@ var Step = ({
|
|
|
3176
3639
|
}
|
|
3177
3640
|
return `${step.label}${suffix}`;
|
|
3178
3641
|
};
|
|
3179
|
-
return /* @__PURE__ */
|
|
3642
|
+
return /* @__PURE__ */ jsxs18(
|
|
3180
3643
|
"div",
|
|
3181
3644
|
{
|
|
3182
3645
|
className: `
|
|
@@ -3189,7 +3652,7 @@ var Step = ({
|
|
|
3189
3652
|
overflow-visible
|
|
3190
3653
|
`,
|
|
3191
3654
|
children: [
|
|
3192
|
-
/* @__PURE__ */
|
|
3655
|
+
/* @__PURE__ */ jsx25(
|
|
3193
3656
|
"div",
|
|
3194
3657
|
{
|
|
3195
3658
|
className: `
|
|
@@ -3198,7 +3661,7 @@ var Step = ({
|
|
|
3198
3661
|
`
|
|
3199
3662
|
}
|
|
3200
3663
|
),
|
|
3201
|
-
/* @__PURE__ */
|
|
3664
|
+
/* @__PURE__ */ jsxs18(
|
|
3202
3665
|
"div",
|
|
3203
3666
|
{
|
|
3204
3667
|
className: `
|
|
@@ -3208,7 +3671,7 @@ var Step = ({
|
|
|
3208
3671
|
overflow-visible
|
|
3209
3672
|
`,
|
|
3210
3673
|
children: [
|
|
3211
|
-
/* @__PURE__ */
|
|
3674
|
+
/* @__PURE__ */ jsx25(
|
|
3212
3675
|
"div",
|
|
3213
3676
|
{
|
|
3214
3677
|
className: `
|
|
@@ -3218,7 +3681,7 @@ var Step = ({
|
|
|
3218
3681
|
w-4 h-4 sm:w-5 sm:h-5 md:w-5 md:h-5 lg:w-6 lg:h-6
|
|
3219
3682
|
`,
|
|
3220
3683
|
"aria-label": getAriaLabel(),
|
|
3221
|
-
children: isCompleted ? /* @__PURE__ */
|
|
3684
|
+
children: isCompleted ? /* @__PURE__ */ jsx25(
|
|
3222
3685
|
Check3,
|
|
3223
3686
|
{
|
|
3224
3687
|
weight: "bold",
|
|
@@ -3227,7 +3690,7 @@ var Step = ({
|
|
|
3227
3690
|
w-2.5 h-2.5 sm:w-3 sm:h-3 md:w-3 md:h-3 lg:w-3.5 lg:h-3.5
|
|
3228
3691
|
`
|
|
3229
3692
|
}
|
|
3230
|
-
) : /* @__PURE__ */
|
|
3693
|
+
) : /* @__PURE__ */ jsx25(
|
|
3231
3694
|
Text_default,
|
|
3232
3695
|
{
|
|
3233
3696
|
size: sizeClasses.indicatorTextSize,
|
|
@@ -3242,7 +3705,7 @@ var Step = ({
|
|
|
3242
3705
|
)
|
|
3243
3706
|
}
|
|
3244
3707
|
),
|
|
3245
|
-
/* @__PURE__ */
|
|
3708
|
+
/* @__PURE__ */ jsx25(
|
|
3246
3709
|
Text_default,
|
|
3247
3710
|
{
|
|
3248
3711
|
size: sizeClasses.labelTextSize,
|
|
@@ -3292,9 +3755,9 @@ var Stepper = ({
|
|
|
3292
3755
|
progressText,
|
|
3293
3756
|
responsive = true
|
|
3294
3757
|
}) => {
|
|
3295
|
-
const sizeClasses =
|
|
3758
|
+
const sizeClasses = SIZE_CLASSES10[size];
|
|
3296
3759
|
const steps = currentStep !== void 0 ? calculateStepStates(initialSteps, currentStep) : initialSteps;
|
|
3297
|
-
return /* @__PURE__ */
|
|
3760
|
+
return /* @__PURE__ */ jsxs18(
|
|
3298
3761
|
"fieldset",
|
|
3299
3762
|
{
|
|
3300
3763
|
className: cn(
|
|
@@ -3303,8 +3766,8 @@ var Stepper = ({
|
|
|
3303
3766
|
"border-0 p-0 m-0"
|
|
3304
3767
|
),
|
|
3305
3768
|
children: [
|
|
3306
|
-
/* @__PURE__ */
|
|
3307
|
-
showProgress && currentStep !== void 0 && /* @__PURE__ */
|
|
3769
|
+
/* @__PURE__ */ jsx25("legend", { className: "absolute w-px h-px p-0 -m-px overflow-hidden whitespace-nowrap border-0", children: "Stepper de formul\xE1rio" }),
|
|
3770
|
+
showProgress && currentStep !== void 0 && /* @__PURE__ */ jsx25(
|
|
3308
3771
|
Text_default,
|
|
3309
3772
|
{
|
|
3310
3773
|
size: "sm",
|
|
@@ -3313,7 +3776,7 @@ var Stepper = ({
|
|
|
3313
3776
|
children: getProgressText(currentStep, steps.length, progressText)
|
|
3314
3777
|
}
|
|
3315
3778
|
),
|
|
3316
|
-
/* @__PURE__ */
|
|
3779
|
+
/* @__PURE__ */ jsx25(
|
|
3317
3780
|
"div",
|
|
3318
3781
|
{
|
|
3319
3782
|
className: cn(
|
|
@@ -3326,7 +3789,7 @@ var Stepper = ({
|
|
|
3326
3789
|
"aria-label": "Progress steps",
|
|
3327
3790
|
children: steps.map((step, index) => {
|
|
3328
3791
|
const stateClasses = STATE_CLASSES6[step.state];
|
|
3329
|
-
return /* @__PURE__ */
|
|
3792
|
+
return /* @__PURE__ */ jsx25(
|
|
3330
3793
|
Step,
|
|
3331
3794
|
{
|
|
3332
3795
|
step,
|
|
@@ -3350,12 +3813,12 @@ var Stepper_default = Stepper;
|
|
|
3350
3813
|
|
|
3351
3814
|
// src/components/Calendar/Calendar.tsx
|
|
3352
3815
|
import {
|
|
3353
|
-
useState as
|
|
3816
|
+
useState as useState9,
|
|
3354
3817
|
useMemo as useMemo3,
|
|
3355
|
-
useEffect as
|
|
3356
|
-
useRef as
|
|
3818
|
+
useEffect as useEffect8,
|
|
3819
|
+
useRef as useRef6
|
|
3357
3820
|
} from "react";
|
|
3358
|
-
import { jsx as
|
|
3821
|
+
import { jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3359
3822
|
var WEEK_DAYS = ["SEG", "TER", "QUA", "QUI", "SEX", "S\xC1B", "DOM"];
|
|
3360
3823
|
var WEEK_DAYS_SHORT = ["S", "T", "Q", "Q", "S", "S", "D"];
|
|
3361
3824
|
var MONTH_NAMES = [
|
|
@@ -3378,15 +3841,15 @@ var MonthYearPicker = ({
|
|
|
3378
3841
|
currentDate,
|
|
3379
3842
|
onYearChange,
|
|
3380
3843
|
onMonthChange
|
|
3381
|
-
}) => /* @__PURE__ */
|
|
3844
|
+
}) => /* @__PURE__ */ jsxs19(
|
|
3382
3845
|
"div",
|
|
3383
3846
|
{
|
|
3384
3847
|
ref: monthPickerRef,
|
|
3385
3848
|
className: "absolute top-full left-0 z-50 mt-1 bg-white rounded-lg shadow-lg border border-border-200 p-4 min-w-[280px]",
|
|
3386
3849
|
children: [
|
|
3387
|
-
/* @__PURE__ */
|
|
3388
|
-
/* @__PURE__ */
|
|
3389
|
-
/* @__PURE__ */
|
|
3850
|
+
/* @__PURE__ */ jsxs19("div", { className: "mb-4", children: [
|
|
3851
|
+
/* @__PURE__ */ jsx26("h3", { className: "text-sm font-medium text-text-700 mb-2", children: "Selecionar Ano" }),
|
|
3852
|
+
/* @__PURE__ */ jsx26("div", { className: "grid grid-cols-4 gap-1 max-h-32 overflow-y-auto", children: availableYears.map((year) => /* @__PURE__ */ jsx26(
|
|
3390
3853
|
"button",
|
|
3391
3854
|
{
|
|
3392
3855
|
onClick: () => onYearChange(year),
|
|
@@ -3399,9 +3862,9 @@ var MonthYearPicker = ({
|
|
|
3399
3862
|
year
|
|
3400
3863
|
)) })
|
|
3401
3864
|
] }),
|
|
3402
|
-
/* @__PURE__ */
|
|
3403
|
-
/* @__PURE__ */
|
|
3404
|
-
/* @__PURE__ */
|
|
3865
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
3866
|
+
/* @__PURE__ */ jsx26("h3", { className: "text-sm font-medium text-text-700 mb-2", children: "Selecionar M\xEAs" }),
|
|
3867
|
+
/* @__PURE__ */ jsx26("div", { className: "grid grid-cols-3 gap-1", children: MONTH_NAMES.map((month, index) => /* @__PURE__ */ jsx26(
|
|
3405
3868
|
"button",
|
|
3406
3869
|
{
|
|
3407
3870
|
onClick: () => onMonthChange(index, currentDate.getFullYear()),
|
|
@@ -3454,11 +3917,11 @@ var Calendar = ({
|
|
|
3454
3917
|
showActivities = true,
|
|
3455
3918
|
className = ""
|
|
3456
3919
|
}) => {
|
|
3457
|
-
const [currentDate, setCurrentDate] =
|
|
3458
|
-
const [isMonthPickerOpen, setIsMonthPickerOpen] =
|
|
3459
|
-
const monthPickerRef =
|
|
3460
|
-
const monthPickerContainerRef =
|
|
3461
|
-
|
|
3920
|
+
const [currentDate, setCurrentDate] = useState9(selectedDate || /* @__PURE__ */ new Date());
|
|
3921
|
+
const [isMonthPickerOpen, setIsMonthPickerOpen] = useState9(false);
|
|
3922
|
+
const monthPickerRef = useRef6(null);
|
|
3923
|
+
const monthPickerContainerRef = useRef6(null);
|
|
3924
|
+
useEffect8(() => {
|
|
3462
3925
|
const handleClickOutside = (event) => {
|
|
3463
3926
|
if (monthPickerContainerRef.current && !monthPickerContainerRef.current.contains(event.target)) {
|
|
3464
3927
|
setIsMonthPickerOpen(false);
|
|
@@ -3533,28 +3996,28 @@ var Calendar = ({
|
|
|
3533
3996
|
onDateSelect?.(day.date);
|
|
3534
3997
|
};
|
|
3535
3998
|
if (variant === "navigation") {
|
|
3536
|
-
return /* @__PURE__ */
|
|
3537
|
-
/* @__PURE__ */
|
|
3538
|
-
/* @__PURE__ */
|
|
3539
|
-
/* @__PURE__ */
|
|
3999
|
+
return /* @__PURE__ */ jsxs19("div", { className: cn("bg-background rounded-xl pt-6", className), children: [
|
|
4000
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-between mb-4 px-6", children: [
|
|
4001
|
+
/* @__PURE__ */ jsxs19("div", { className: "relative", ref: monthPickerContainerRef, children: [
|
|
4002
|
+
/* @__PURE__ */ jsxs19(
|
|
3540
4003
|
"button",
|
|
3541
4004
|
{
|
|
3542
4005
|
onClick: toggleMonthPicker,
|
|
3543
4006
|
className: "flex items-center group gap-1 rounded transition-colors cursor-pointer",
|
|
3544
4007
|
children: [
|
|
3545
|
-
/* @__PURE__ */
|
|
4008
|
+
/* @__PURE__ */ jsxs19("span", { className: "text-sm font-medium text-text-600 group-hover:text-primary-950", children: [
|
|
3546
4009
|
MONTH_NAMES[currentDate.getMonth()],
|
|
3547
4010
|
" ",
|
|
3548
4011
|
currentDate.getFullYear()
|
|
3549
4012
|
] }),
|
|
3550
|
-
/* @__PURE__ */
|
|
4013
|
+
/* @__PURE__ */ jsx26(
|
|
3551
4014
|
"svg",
|
|
3552
4015
|
{
|
|
3553
4016
|
className: `w-4 h-4 text-primary-950 transition-transform ${isMonthPickerOpen ? "rotate-180" : ""}`,
|
|
3554
4017
|
fill: "none",
|
|
3555
4018
|
stroke: "currentColor",
|
|
3556
4019
|
viewBox: "0 0 24 24",
|
|
3557
|
-
children: /* @__PURE__ */
|
|
4020
|
+
children: /* @__PURE__ */ jsx26(
|
|
3558
4021
|
"path",
|
|
3559
4022
|
{
|
|
3560
4023
|
strokeLinecap: "round",
|
|
@@ -3568,7 +4031,7 @@ var Calendar = ({
|
|
|
3568
4031
|
]
|
|
3569
4032
|
}
|
|
3570
4033
|
),
|
|
3571
|
-
isMonthPickerOpen && /* @__PURE__ */
|
|
4034
|
+
isMonthPickerOpen && /* @__PURE__ */ jsx26(
|
|
3572
4035
|
MonthYearPicker,
|
|
3573
4036
|
{
|
|
3574
4037
|
monthPickerRef,
|
|
@@ -3579,21 +4042,21 @@ var Calendar = ({
|
|
|
3579
4042
|
}
|
|
3580
4043
|
)
|
|
3581
4044
|
] }),
|
|
3582
|
-
/* @__PURE__ */
|
|
3583
|
-
/* @__PURE__ */
|
|
4045
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-10", children: [
|
|
4046
|
+
/* @__PURE__ */ jsx26(
|
|
3584
4047
|
"button",
|
|
3585
4048
|
{
|
|
3586
4049
|
onClick: goToPreviousMonth,
|
|
3587
4050
|
className: "p-1 rounded hover:bg-background-100 transition-colors",
|
|
3588
4051
|
"aria-label": "M\xEAs anterior",
|
|
3589
|
-
children: /* @__PURE__ */
|
|
4052
|
+
children: /* @__PURE__ */ jsx26(
|
|
3590
4053
|
"svg",
|
|
3591
4054
|
{
|
|
3592
4055
|
className: "w-6 h-6 text-primary-950",
|
|
3593
4056
|
fill: "none",
|
|
3594
4057
|
stroke: "currentColor",
|
|
3595
4058
|
viewBox: "0 0 24 24",
|
|
3596
|
-
children: /* @__PURE__ */
|
|
4059
|
+
children: /* @__PURE__ */ jsx26(
|
|
3597
4060
|
"path",
|
|
3598
4061
|
{
|
|
3599
4062
|
strokeLinecap: "round",
|
|
@@ -3606,20 +4069,20 @@ var Calendar = ({
|
|
|
3606
4069
|
)
|
|
3607
4070
|
}
|
|
3608
4071
|
),
|
|
3609
|
-
/* @__PURE__ */
|
|
4072
|
+
/* @__PURE__ */ jsx26(
|
|
3610
4073
|
"button",
|
|
3611
4074
|
{
|
|
3612
4075
|
onClick: goToNextMonth,
|
|
3613
4076
|
className: "p-1 rounded hover:bg-background-100 transition-colors",
|
|
3614
4077
|
"aria-label": "Pr\xF3ximo m\xEAs",
|
|
3615
|
-
children: /* @__PURE__ */
|
|
4078
|
+
children: /* @__PURE__ */ jsx26(
|
|
3616
4079
|
"svg",
|
|
3617
4080
|
{
|
|
3618
4081
|
className: "w-6 h-6 text-primary-950",
|
|
3619
4082
|
fill: "none",
|
|
3620
4083
|
stroke: "currentColor",
|
|
3621
4084
|
viewBox: "0 0 24 24",
|
|
3622
|
-
children: /* @__PURE__ */
|
|
4085
|
+
children: /* @__PURE__ */ jsx26(
|
|
3623
4086
|
"path",
|
|
3624
4087
|
{
|
|
3625
4088
|
strokeLinecap: "round",
|
|
@@ -3634,7 +4097,7 @@ var Calendar = ({
|
|
|
3634
4097
|
)
|
|
3635
4098
|
] })
|
|
3636
4099
|
] }),
|
|
3637
|
-
/* @__PURE__ */
|
|
4100
|
+
/* @__PURE__ */ jsx26("div", { className: "grid grid-cols-7 gap-1 mb-2 px-3", children: WEEK_DAYS_SHORT.map((day, index) => /* @__PURE__ */ jsx26(
|
|
3638
4101
|
"div",
|
|
3639
4102
|
{
|
|
3640
4103
|
className: "h-9 flex items-center justify-center text-xs font-normal text-text-600",
|
|
@@ -3642,13 +4105,13 @@ var Calendar = ({
|
|
|
3642
4105
|
},
|
|
3643
4106
|
`${day}-${index}`
|
|
3644
4107
|
)) }),
|
|
3645
|
-
/* @__PURE__ */
|
|
4108
|
+
/* @__PURE__ */ jsx26("div", { className: "grid grid-cols-7 gap-1 px-3", children: calendarData.map((day) => {
|
|
3646
4109
|
if (!day.isCurrentMonth) {
|
|
3647
|
-
return /* @__PURE__ */
|
|
4110
|
+
return /* @__PURE__ */ jsx26(
|
|
3648
4111
|
"div",
|
|
3649
4112
|
{
|
|
3650
4113
|
className: "flex items-center justify-center",
|
|
3651
|
-
children: /* @__PURE__ */
|
|
4114
|
+
children: /* @__PURE__ */ jsx26("div", { className: "w-9 h-9" })
|
|
3652
4115
|
},
|
|
3653
4116
|
day.date.getTime()
|
|
3654
4117
|
);
|
|
@@ -3664,11 +4127,11 @@ var Calendar = ({
|
|
|
3664
4127
|
} else if (day.isSelected) {
|
|
3665
4128
|
spanClass = "h-6 w-6 rounded-full bg-primary-950 text-text";
|
|
3666
4129
|
}
|
|
3667
|
-
return /* @__PURE__ */
|
|
4130
|
+
return /* @__PURE__ */ jsx26(
|
|
3668
4131
|
"div",
|
|
3669
4132
|
{
|
|
3670
4133
|
className: "flex items-center justify-center",
|
|
3671
|
-
children: /* @__PURE__ */
|
|
4134
|
+
children: /* @__PURE__ */ jsx26(
|
|
3672
4135
|
"button",
|
|
3673
4136
|
{
|
|
3674
4137
|
className: `
|
|
@@ -3684,7 +4147,7 @@ var Calendar = ({
|
|
|
3684
4147
|
"aria-label": `${day.date.getDate()} de ${MONTH_NAMES[day.date.getMonth()]}`,
|
|
3685
4148
|
"aria-current": day.isToday ? "date" : void 0,
|
|
3686
4149
|
tabIndex: 0,
|
|
3687
|
-
children: /* @__PURE__ */
|
|
4150
|
+
children: /* @__PURE__ */ jsx26("span", { className: spanClass, children: day.date.getDate() })
|
|
3688
4151
|
}
|
|
3689
4152
|
)
|
|
3690
4153
|
},
|
|
@@ -3693,28 +4156,28 @@ var Calendar = ({
|
|
|
3693
4156
|
}) })
|
|
3694
4157
|
] });
|
|
3695
4158
|
}
|
|
3696
|
-
return /* @__PURE__ */
|
|
3697
|
-
/* @__PURE__ */
|
|
3698
|
-
/* @__PURE__ */
|
|
3699
|
-
/* @__PURE__ */
|
|
4159
|
+
return /* @__PURE__ */ jsxs19("div", { className: cn("bg-background rounded-xl p-4", className), children: [
|
|
4160
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-between mb-3.5", children: [
|
|
4161
|
+
/* @__PURE__ */ jsxs19("div", { className: "relative", ref: monthPickerContainerRef, children: [
|
|
4162
|
+
/* @__PURE__ */ jsxs19(
|
|
3700
4163
|
"button",
|
|
3701
4164
|
{
|
|
3702
4165
|
onClick: toggleMonthPicker,
|
|
3703
4166
|
className: "flex items-center gap-2 hover:bg-background-100 rounded px-2 py-1 transition-colors",
|
|
3704
4167
|
children: [
|
|
3705
|
-
/* @__PURE__ */
|
|
4168
|
+
/* @__PURE__ */ jsxs19("h2", { className: "text-lg font-semibold text-text-950", children: [
|
|
3706
4169
|
MONTH_NAMES[currentDate.getMonth()],
|
|
3707
4170
|
" ",
|
|
3708
4171
|
currentDate.getFullYear()
|
|
3709
4172
|
] }),
|
|
3710
|
-
/* @__PURE__ */
|
|
4173
|
+
/* @__PURE__ */ jsx26(
|
|
3711
4174
|
"svg",
|
|
3712
4175
|
{
|
|
3713
4176
|
className: `w-4 h-4 text-text-400 transition-transform ${isMonthPickerOpen ? "rotate-180" : ""}`,
|
|
3714
4177
|
fill: "none",
|
|
3715
4178
|
stroke: "currentColor",
|
|
3716
4179
|
viewBox: "0 0 24 24",
|
|
3717
|
-
children: /* @__PURE__ */
|
|
4180
|
+
children: /* @__PURE__ */ jsx26(
|
|
3718
4181
|
"path",
|
|
3719
4182
|
{
|
|
3720
4183
|
strokeLinecap: "round",
|
|
@@ -3728,7 +4191,7 @@ var Calendar = ({
|
|
|
3728
4191
|
]
|
|
3729
4192
|
}
|
|
3730
4193
|
),
|
|
3731
|
-
isMonthPickerOpen && /* @__PURE__ */
|
|
4194
|
+
isMonthPickerOpen && /* @__PURE__ */ jsx26(
|
|
3732
4195
|
MonthYearPicker,
|
|
3733
4196
|
{
|
|
3734
4197
|
monthPickerRef,
|
|
@@ -3739,21 +4202,21 @@ var Calendar = ({
|
|
|
3739
4202
|
}
|
|
3740
4203
|
)
|
|
3741
4204
|
] }),
|
|
3742
|
-
/* @__PURE__ */
|
|
3743
|
-
/* @__PURE__ */
|
|
4205
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-1", children: [
|
|
4206
|
+
/* @__PURE__ */ jsx26(
|
|
3744
4207
|
"button",
|
|
3745
4208
|
{
|
|
3746
4209
|
onClick: goToPreviousMonth,
|
|
3747
4210
|
className: "p-1 rounded-md hover:bg-background-100 transition-colors",
|
|
3748
4211
|
"aria-label": "M\xEAs anterior",
|
|
3749
|
-
children: /* @__PURE__ */
|
|
4212
|
+
children: /* @__PURE__ */ jsx26(
|
|
3750
4213
|
"svg",
|
|
3751
4214
|
{
|
|
3752
4215
|
className: "w-6 h-6 text-primary-950",
|
|
3753
4216
|
fill: "none",
|
|
3754
4217
|
stroke: "currentColor",
|
|
3755
4218
|
viewBox: "0 0 24 24",
|
|
3756
|
-
children: /* @__PURE__ */
|
|
4219
|
+
children: /* @__PURE__ */ jsx26(
|
|
3757
4220
|
"path",
|
|
3758
4221
|
{
|
|
3759
4222
|
strokeLinecap: "round",
|
|
@@ -3766,20 +4229,20 @@ var Calendar = ({
|
|
|
3766
4229
|
)
|
|
3767
4230
|
}
|
|
3768
4231
|
),
|
|
3769
|
-
/* @__PURE__ */
|
|
4232
|
+
/* @__PURE__ */ jsx26(
|
|
3770
4233
|
"button",
|
|
3771
4234
|
{
|
|
3772
4235
|
onClick: goToNextMonth,
|
|
3773
4236
|
className: "p-1 rounded-md hover:bg-background-100 transition-colors",
|
|
3774
4237
|
"aria-label": "Pr\xF3ximo m\xEAs",
|
|
3775
|
-
children: /* @__PURE__ */
|
|
4238
|
+
children: /* @__PURE__ */ jsx26(
|
|
3776
4239
|
"svg",
|
|
3777
4240
|
{
|
|
3778
4241
|
className: "w-6 h-6 text-primary-950",
|
|
3779
4242
|
fill: "none",
|
|
3780
4243
|
stroke: "currentColor",
|
|
3781
4244
|
viewBox: "0 0 24 24",
|
|
3782
|
-
children: /* @__PURE__ */
|
|
4245
|
+
children: /* @__PURE__ */ jsx26(
|
|
3783
4246
|
"path",
|
|
3784
4247
|
{
|
|
3785
4248
|
strokeLinecap: "round",
|
|
@@ -3793,173 +4256,79 @@ var Calendar = ({
|
|
|
3793
4256
|
}
|
|
3794
4257
|
)
|
|
3795
4258
|
] })
|
|
3796
|
-
] }),
|
|
3797
|
-
/* @__PURE__ */
|
|
3798
|
-
"div",
|
|
3799
|
-
{
|
|
3800
|
-
className: "h-4 flex items-center justify-center text-xs font-semibold text-text-500",
|
|
3801
|
-
children: day
|
|
3802
|
-
},
|
|
3803
|
-
day
|
|
3804
|
-
)) }),
|
|
3805
|
-
/* @__PURE__ */
|
|
3806
|
-
if (!day.isCurrentMonth) {
|
|
3807
|
-
return /* @__PURE__ */
|
|
3808
|
-
"div",
|
|
3809
|
-
{
|
|
3810
|
-
className: "flex items-center justify-center",
|
|
3811
|
-
children: /* @__PURE__ */
|
|
3812
|
-
},
|
|
3813
|
-
day.date.getTime()
|
|
3814
|
-
);
|
|
3815
|
-
}
|
|
3816
|
-
const { dayStyle, textStyle } = getDayStyles(
|
|
3817
|
-
day,
|
|
3818
|
-
variant,
|
|
3819
|
-
showActivities
|
|
3820
|
-
);
|
|
3821
|
-
return /* @__PURE__ */
|
|
3822
|
-
"div",
|
|
3823
|
-
{
|
|
3824
|
-
className: "flex items-center justify-center",
|
|
3825
|
-
children: /* @__PURE__ */
|
|
3826
|
-
"button",
|
|
3827
|
-
{
|
|
3828
|
-
className: `
|
|
3829
|
-
w-9 h-9
|
|
3830
|
-
flex items-center justify-center
|
|
3831
|
-
text-lg font-normal
|
|
3832
|
-
cursor-pointer
|
|
3833
|
-
rounded-full
|
|
3834
|
-
focus:outline-none focus:ring-2 focus:ring-primary-600 focus:ring-offset-1
|
|
3835
|
-
${dayStyle}
|
|
3836
|
-
${textStyle}
|
|
3837
|
-
`,
|
|
3838
|
-
onClick: () => handleDateSelect(day),
|
|
3839
|
-
"aria-label": `${day.date.getDate()} de ${MONTH_NAMES[day.date.getMonth()]}`,
|
|
3840
|
-
"aria-current": day.isToday ? "date" : void 0,
|
|
3841
|
-
tabIndex: 0,
|
|
3842
|
-
children: day.date.getDate()
|
|
3843
|
-
}
|
|
3844
|
-
)
|
|
3845
|
-
},
|
|
3846
|
-
day.date.getTime()
|
|
3847
|
-
);
|
|
3848
|
-
}) })
|
|
3849
|
-
] });
|
|
3850
|
-
};
|
|
3851
|
-
var Calendar_default = Calendar;
|
|
3852
|
-
|
|
3853
|
-
// src/components/Modal/Modal.tsx
|
|
3854
|
-
import { useEffect as useEffect6 } from "react";
|
|
3855
|
-
import { X as X3 } from "phosphor-react";
|
|
3856
|
-
import { jsx as jsx25, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3857
|
-
var SIZE_CLASSES10 = {
|
|
3858
|
-
xs: "max-w-[360px]",
|
|
3859
|
-
sm: "max-w-[420px]",
|
|
3860
|
-
md: "max-w-[510px]",
|
|
3861
|
-
lg: "max-w-[640px]",
|
|
3862
|
-
xl: "max-w-[970px]"
|
|
3863
|
-
};
|
|
3864
|
-
var Modal = ({
|
|
3865
|
-
isOpen,
|
|
3866
|
-
onClose,
|
|
3867
|
-
title,
|
|
3868
|
-
children,
|
|
3869
|
-
size = "md",
|
|
3870
|
-
className = "",
|
|
3871
|
-
closeOnBackdropClick = true,
|
|
3872
|
-
closeOnEscape = true,
|
|
3873
|
-
footer,
|
|
3874
|
-
hideCloseButton = false
|
|
3875
|
-
}) => {
|
|
3876
|
-
useEffect6(() => {
|
|
3877
|
-
if (!isOpen || !closeOnEscape) return;
|
|
3878
|
-
const handleEscape = (event) => {
|
|
3879
|
-
if (event.key === "Escape") {
|
|
3880
|
-
onClose();
|
|
3881
|
-
}
|
|
3882
|
-
};
|
|
3883
|
-
document.addEventListener("keydown", handleEscape);
|
|
3884
|
-
return () => document.removeEventListener("keydown", handleEscape);
|
|
3885
|
-
}, [isOpen, closeOnEscape, onClose]);
|
|
3886
|
-
useEffect6(() => {
|
|
3887
|
-
const originalOverflow = document.body.style.overflow;
|
|
3888
|
-
if (isOpen) {
|
|
3889
|
-
document.body.style.overflow = "hidden";
|
|
3890
|
-
} else {
|
|
3891
|
-
document.body.style.overflow = originalOverflow;
|
|
3892
|
-
}
|
|
3893
|
-
return () => {
|
|
3894
|
-
document.body.style.overflow = originalOverflow;
|
|
3895
|
-
};
|
|
3896
|
-
}, [isOpen]);
|
|
3897
|
-
const handleBackdropClick = (event) => {
|
|
3898
|
-
if (closeOnBackdropClick && event.target === event.currentTarget) {
|
|
3899
|
-
onClose();
|
|
3900
|
-
}
|
|
3901
|
-
};
|
|
3902
|
-
const handleBackdropKeyDown = (event) => {
|
|
3903
|
-
if (closeOnBackdropClick && (event.key === "Enter" || event.key === " ")) {
|
|
3904
|
-
onClose();
|
|
3905
|
-
}
|
|
3906
|
-
};
|
|
3907
|
-
if (!isOpen) return null;
|
|
3908
|
-
const sizeClasses = SIZE_CLASSES10[size];
|
|
3909
|
-
const baseClasses = "bg-secondary-50 rounded-3xl shadow-hard-shadow-2 border border-border-100 w-full mx-4";
|
|
3910
|
-
const dialogResetClasses = "p-0 m-0 border-none outline-none max-h-none static";
|
|
3911
|
-
const modalClasses = cn(
|
|
3912
|
-
baseClasses,
|
|
3913
|
-
sizeClasses,
|
|
3914
|
-
dialogResetClasses,
|
|
3915
|
-
className
|
|
3916
|
-
);
|
|
3917
|
-
return /* @__PURE__ */ jsx25(
|
|
3918
|
-
"div",
|
|
3919
|
-
{
|
|
3920
|
-
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-xs",
|
|
3921
|
-
onClick: handleBackdropClick,
|
|
3922
|
-
onKeyDown: handleBackdropKeyDown,
|
|
3923
|
-
role: "button",
|
|
3924
|
-
tabIndex: closeOnBackdropClick ? 0 : -1,
|
|
3925
|
-
"aria-label": "Fechar modal clicando no fundo",
|
|
3926
|
-
children: /* @__PURE__ */ jsxs19("dialog", { className: modalClasses, "aria-labelledby": "modal-title", open: true, children: [
|
|
3927
|
-
/* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-between px-6 py-6", children: [
|
|
3928
|
-
/* @__PURE__ */ jsx25("h2", { id: "modal-title", className: "text-lg font-semibold text-text-950", children: title }),
|
|
3929
|
-
!hideCloseButton && /* @__PURE__ */ jsx25(
|
|
4259
|
+
] }),
|
|
4260
|
+
/* @__PURE__ */ jsx26("div", { className: "grid grid-cols-7 mb-2", children: WEEK_DAYS.map((day) => /* @__PURE__ */ jsx26(
|
|
4261
|
+
"div",
|
|
4262
|
+
{
|
|
4263
|
+
className: "h-4 flex items-center justify-center text-xs font-semibold text-text-500",
|
|
4264
|
+
children: day
|
|
4265
|
+
},
|
|
4266
|
+
day
|
|
4267
|
+
)) }),
|
|
4268
|
+
/* @__PURE__ */ jsx26("div", { className: "grid grid-cols-7", children: calendarData.map((day) => {
|
|
4269
|
+
if (!day.isCurrentMonth) {
|
|
4270
|
+
return /* @__PURE__ */ jsx26(
|
|
4271
|
+
"div",
|
|
4272
|
+
{
|
|
4273
|
+
className: "flex items-center justify-center",
|
|
4274
|
+
children: /* @__PURE__ */ jsx26("div", { className: "w-10 h-10" })
|
|
4275
|
+
},
|
|
4276
|
+
day.date.getTime()
|
|
4277
|
+
);
|
|
4278
|
+
}
|
|
4279
|
+
const { dayStyle, textStyle } = getDayStyles(
|
|
4280
|
+
day,
|
|
4281
|
+
variant,
|
|
4282
|
+
showActivities
|
|
4283
|
+
);
|
|
4284
|
+
return /* @__PURE__ */ jsx26(
|
|
4285
|
+
"div",
|
|
4286
|
+
{
|
|
4287
|
+
className: "flex items-center justify-center",
|
|
4288
|
+
children: /* @__PURE__ */ jsx26(
|
|
3930
4289
|
"button",
|
|
3931
4290
|
{
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
4291
|
+
className: `
|
|
4292
|
+
w-9 h-9
|
|
4293
|
+
flex items-center justify-center
|
|
4294
|
+
text-lg font-normal
|
|
4295
|
+
cursor-pointer
|
|
4296
|
+
rounded-full
|
|
4297
|
+
focus:outline-none focus:ring-2 focus:ring-primary-600 focus:ring-offset-1
|
|
4298
|
+
${dayStyle}
|
|
4299
|
+
${textStyle}
|
|
4300
|
+
`,
|
|
4301
|
+
onClick: () => handleDateSelect(day),
|
|
4302
|
+
"aria-label": `${day.date.getDate()} de ${MONTH_NAMES[day.date.getMonth()]}`,
|
|
4303
|
+
"aria-current": day.isToday ? "date" : void 0,
|
|
4304
|
+
tabIndex: 0,
|
|
4305
|
+
children: day.date.getDate()
|
|
3936
4306
|
}
|
|
3937
4307
|
)
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
);
|
|
4308
|
+
},
|
|
4309
|
+
day.date.getTime()
|
|
4310
|
+
);
|
|
4311
|
+
}) })
|
|
4312
|
+
] });
|
|
3944
4313
|
};
|
|
3945
|
-
var
|
|
4314
|
+
var Calendar_default = Calendar;
|
|
3946
4315
|
|
|
3947
4316
|
// src/components/Accordation/Accordation.tsx
|
|
3948
4317
|
import {
|
|
3949
4318
|
forwardRef as forwardRef13,
|
|
3950
|
-
useId as
|
|
3951
|
-
useState as
|
|
4319
|
+
useId as useId8,
|
|
4320
|
+
useState as useState11
|
|
3952
4321
|
} from "react";
|
|
3953
4322
|
|
|
3954
4323
|
// src/components/Card/Card.tsx
|
|
3955
4324
|
import {
|
|
3956
4325
|
forwardRef as forwardRef12,
|
|
3957
|
-
Fragment as
|
|
3958
|
-
useState as
|
|
3959
|
-
useRef as
|
|
4326
|
+
Fragment as Fragment4,
|
|
4327
|
+
useState as useState10,
|
|
4328
|
+
useRef as useRef7
|
|
3960
4329
|
} from "react";
|
|
3961
4330
|
import {
|
|
3962
|
-
CaretRight,
|
|
4331
|
+
CaretRight as CaretRight2,
|
|
3963
4332
|
ChatCircleText,
|
|
3964
4333
|
CheckCircle as CheckCircle3,
|
|
3965
4334
|
Clock,
|
|
@@ -3973,7 +4342,7 @@ import {
|
|
|
3973
4342
|
|
|
3974
4343
|
// src/components/IconRender/IconRender.tsx
|
|
3975
4344
|
import * as PhosphorIcons from "phosphor-react";
|
|
3976
|
-
import { jsx as
|
|
4345
|
+
import { jsx as jsx27, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3977
4346
|
var ChatPT = ({ size, color }) => /* @__PURE__ */ jsxs20(
|
|
3978
4347
|
"svg",
|
|
3979
4348
|
{
|
|
@@ -3983,21 +4352,21 @@ var ChatPT = ({ size, color }) => /* @__PURE__ */ jsxs20(
|
|
|
3983
4352
|
fill: "none",
|
|
3984
4353
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3985
4354
|
children: [
|
|
3986
|
-
/* @__PURE__ */
|
|
4355
|
+
/* @__PURE__ */ jsx27(
|
|
3987
4356
|
"path",
|
|
3988
4357
|
{
|
|
3989
4358
|
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
3990
4359
|
fill: color
|
|
3991
4360
|
}
|
|
3992
4361
|
),
|
|
3993
|
-
/* @__PURE__ */
|
|
4362
|
+
/* @__PURE__ */ jsx27(
|
|
3994
4363
|
"path",
|
|
3995
4364
|
{
|
|
3996
4365
|
d: "M21.1758 12V20.5312H19.7168V12H21.1758ZM23.8535 12V13.1719H17.0625V12H23.8535Z",
|
|
3997
4366
|
fill: color
|
|
3998
4367
|
}
|
|
3999
4368
|
),
|
|
4000
|
-
/* @__PURE__ */
|
|
4369
|
+
/* @__PURE__ */ jsx27(
|
|
4001
4370
|
"path",
|
|
4002
4371
|
{
|
|
4003
4372
|
d: "M13.2402 17.3496H11.0195V16.1836H13.2402C13.627 16.1836 13.9395 16.1211 14.1777 15.9961C14.416 15.8711 14.5898 15.6992 14.6992 15.4805C14.8125 15.2578 14.8691 15.0039 14.8691 14.7188C14.8691 14.4492 14.8125 14.1973 14.6992 13.9629C14.5898 13.7246 14.416 13.5332 14.1777 13.3887C13.9395 13.2441 13.627 13.1719 13.2402 13.1719H11.4707V20.5312H10V12H13.2402C13.9004 12 14.4609 12.1172 14.9219 12.3516C15.3867 12.582 15.7402 12.9023 15.9824 13.3125C16.2246 13.7188 16.3457 14.1836 16.3457 14.707C16.3457 15.2578 16.2246 15.7305 15.9824 16.125C15.7402 16.5195 15.3867 16.8223 14.9219 17.0332C14.4609 17.2441 13.9004 17.3496 13.2402 17.3496Z",
|
|
@@ -4016,21 +4385,21 @@ var ChatEN = ({ size, color }) => /* @__PURE__ */ jsxs20(
|
|
|
4016
4385
|
fill: "none",
|
|
4017
4386
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4018
4387
|
children: [
|
|
4019
|
-
/* @__PURE__ */
|
|
4388
|
+
/* @__PURE__ */ jsx27(
|
|
4020
4389
|
"path",
|
|
4021
4390
|
{
|
|
4022
4391
|
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
4023
4392
|
fill: color
|
|
4024
4393
|
}
|
|
4025
4394
|
),
|
|
4026
|
-
/* @__PURE__ */
|
|
4395
|
+
/* @__PURE__ */ jsx27(
|
|
4027
4396
|
"path",
|
|
4028
4397
|
{
|
|
4029
4398
|
d: "M22.5488 12V20.5312H21.0781L17.252 14.4199V20.5312H15.7812V12H17.252L21.0898 18.123V12H22.5488Z",
|
|
4030
4399
|
fill: color
|
|
4031
4400
|
}
|
|
4032
4401
|
),
|
|
4033
|
-
/* @__PURE__ */
|
|
4402
|
+
/* @__PURE__ */ jsx27(
|
|
4034
4403
|
"path",
|
|
4035
4404
|
{
|
|
4036
4405
|
d: "M14.584 19.3652V20.5312H10.0547V19.3652H14.584ZM10.4707 12V20.5312H9V12H10.4707ZM13.9922 15.5625V16.7109H10.0547V15.5625H13.9922ZM14.5547 12V13.1719H10.0547V12H14.5547Z",
|
|
@@ -4049,21 +4418,21 @@ var ChatES = ({ size, color }) => /* @__PURE__ */ jsxs20(
|
|
|
4049
4418
|
fill: "none",
|
|
4050
4419
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4051
4420
|
children: [
|
|
4052
|
-
/* @__PURE__ */
|
|
4421
|
+
/* @__PURE__ */ jsx27(
|
|
4053
4422
|
"path",
|
|
4054
4423
|
{
|
|
4055
4424
|
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
4056
4425
|
fill: color
|
|
4057
4426
|
}
|
|
4058
4427
|
),
|
|
4059
|
-
/* @__PURE__ */
|
|
4428
|
+
/* @__PURE__ */ jsx27(
|
|
4060
4429
|
"path",
|
|
4061
4430
|
{
|
|
4062
4431
|
d: "M21.1426 17.8027C21.1426 17.627 21.1152 17.4707 21.0605 17.334C21.0098 17.1973 20.918 17.0723 20.7852 16.959C20.6523 16.8457 20.4648 16.7363 20.2227 16.6309C19.9844 16.5215 19.6797 16.4102 19.3086 16.2969C18.9023 16.1719 18.5273 16.0332 18.1836 15.8809C17.8438 15.7246 17.5469 15.5449 17.293 15.3418C17.0391 15.1348 16.8418 14.8984 16.7012 14.6328C16.5605 14.3633 16.4902 14.0527 16.4902 13.7012C16.4902 13.3535 16.5625 13.0371 16.707 12.752C16.8555 12.4668 17.0645 12.2207 17.334 12.0137C17.6074 11.8027 17.9297 11.6406 18.3008 11.5273C18.6719 11.4102 19.082 11.3516 19.5312 11.3516C20.1641 11.3516 20.709 11.4688 21.166 11.7031C21.627 11.9375 21.9805 12.252 22.2266 12.6465C22.4766 13.041 22.6016 13.4766 22.6016 13.9531H21.1426C21.1426 13.6719 21.082 13.4238 20.9609 13.209C20.8438 12.9902 20.6641 12.8184 20.4219 12.6934C20.1836 12.5684 19.8809 12.5059 19.5137 12.5059C19.166 12.5059 18.877 12.5586 18.6465 12.6641C18.416 12.7695 18.2441 12.9121 18.1309 13.0918C18.0176 13.2715 17.9609 13.4746 17.9609 13.7012C17.9609 13.8613 17.998 14.0078 18.0723 14.1406C18.1465 14.2695 18.2598 14.3906 18.4121 14.5039C18.5645 14.6133 18.7559 14.7168 18.9863 14.8145C19.2168 14.9121 19.4883 15.0059 19.8008 15.0957C20.2734 15.2363 20.6855 15.3926 21.0371 15.5645C21.3887 15.7324 21.6816 15.9238 21.916 16.1387C22.1504 16.3535 22.3262 16.5977 22.4434 16.8711C22.5605 17.1406 22.6191 17.4473 22.6191 17.791C22.6191 18.1504 22.5469 18.4746 22.4023 18.7637C22.2578 19.0488 22.0508 19.293 21.7812 19.4961C21.5156 19.6953 21.1953 19.8496 20.8203 19.959C20.4492 20.0645 20.0352 20.1172 19.5781 20.1172C19.168 20.1172 18.7637 20.0625 18.3652 19.9531C17.9707 19.8438 17.6113 19.6777 17.2871 19.4551C16.9629 19.2285 16.7051 18.9473 16.5137 18.6113C16.3223 18.2715 16.2266 17.875 16.2266 17.4219H17.6973C17.6973 17.6992 17.7441 17.9355 17.8379 18.1309C17.9355 18.3262 18.0703 18.4863 18.2422 18.6113C18.4141 18.7324 18.6133 18.8223 18.8398 18.8809C19.0703 18.9395 19.3164 18.9688 19.5781 18.9688C19.9219 18.9688 20.209 18.9199 20.4395 18.8223C20.6738 18.7246 20.8496 18.5879 20.9668 18.4121C21.084 18.2363 21.1426 18.0332 21.1426 17.8027Z",
|
|
4063
4432
|
fill: color
|
|
4064
4433
|
}
|
|
4065
4434
|
),
|
|
4066
|
-
/* @__PURE__ */
|
|
4435
|
+
/* @__PURE__ */ jsx27(
|
|
4067
4436
|
"path",
|
|
4068
4437
|
{
|
|
4069
4438
|
d: "M15.4512 18.834V20H10.9219V18.834H15.4512ZM11.3379 11.4688V20H9.86719V11.4688H11.3379ZM14.8594 15.0312V16.1797H10.9219V15.0312H14.8594ZM15.4219 11.4688V12.6406H10.9219V11.4688H15.4219Z",
|
|
@@ -4081,21 +4450,21 @@ var IconRender = ({
|
|
|
4081
4450
|
}) => {
|
|
4082
4451
|
switch (iconName) {
|
|
4083
4452
|
case "Chat_PT":
|
|
4084
|
-
return /* @__PURE__ */
|
|
4453
|
+
return /* @__PURE__ */ jsx27(ChatPT, { size, color });
|
|
4085
4454
|
case "Chat_EN":
|
|
4086
|
-
return /* @__PURE__ */
|
|
4455
|
+
return /* @__PURE__ */ jsx27(ChatEN, { size, color });
|
|
4087
4456
|
case "Chat_ES":
|
|
4088
|
-
return /* @__PURE__ */
|
|
4457
|
+
return /* @__PURE__ */ jsx27(ChatES, { size, color });
|
|
4089
4458
|
default: {
|
|
4090
4459
|
const IconComponent = PhosphorIcons[iconName] || PhosphorIcons.Question;
|
|
4091
|
-
return /* @__PURE__ */
|
|
4460
|
+
return /* @__PURE__ */ jsx27(IconComponent, { size, color, weight });
|
|
4092
4461
|
}
|
|
4093
4462
|
}
|
|
4094
4463
|
};
|
|
4095
4464
|
var IconRender_default = IconRender;
|
|
4096
4465
|
|
|
4097
4466
|
// src/components/Card/Card.tsx
|
|
4098
|
-
import { Fragment as
|
|
4467
|
+
import { Fragment as Fragment5, jsx as jsx28, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4099
4468
|
var CARD_BASE_CLASSES = {
|
|
4100
4469
|
default: "w-full bg-background border border-border-50 rounded-xl",
|
|
4101
4470
|
compact: "w-full bg-background border border-border-50 rounded-lg",
|
|
@@ -4137,7 +4506,7 @@ var CardBase = forwardRef12(
|
|
|
4137
4506
|
const minHeightClasses = CARD_MIN_HEIGHT_CLASSES[minHeight];
|
|
4138
4507
|
const layoutClasses = CARD_LAYOUT_CLASSES[layout];
|
|
4139
4508
|
const cursorClasses = CARD_CURSOR_CLASSES[cursor];
|
|
4140
|
-
return /* @__PURE__ */
|
|
4509
|
+
return /* @__PURE__ */ jsx28(
|
|
4141
4510
|
"div",
|
|
4142
4511
|
{
|
|
4143
4512
|
ref,
|
|
@@ -4214,7 +4583,7 @@ var CardActivitiesResults = forwardRef12(
|
|
|
4214
4583
|
extended ? "rounded-t-xl" : "rounded-xl"
|
|
4215
4584
|
),
|
|
4216
4585
|
children: [
|
|
4217
|
-
/* @__PURE__ */
|
|
4586
|
+
/* @__PURE__ */ jsx28(
|
|
4218
4587
|
"span",
|
|
4219
4588
|
{
|
|
4220
4589
|
className: cn(
|
|
@@ -4224,7 +4593,7 @@ var CardActivitiesResults = forwardRef12(
|
|
|
4224
4593
|
children: icon
|
|
4225
4594
|
}
|
|
4226
4595
|
),
|
|
4227
|
-
/* @__PURE__ */
|
|
4596
|
+
/* @__PURE__ */ jsx28(
|
|
4228
4597
|
Text_default,
|
|
4229
4598
|
{
|
|
4230
4599
|
size: "2xs",
|
|
@@ -4233,7 +4602,7 @@ var CardActivitiesResults = forwardRef12(
|
|
|
4233
4602
|
children: title
|
|
4234
4603
|
}
|
|
4235
4604
|
),
|
|
4236
|
-
/* @__PURE__ */
|
|
4605
|
+
/* @__PURE__ */ jsx28(
|
|
4237
4606
|
"p",
|
|
4238
4607
|
{
|
|
4239
4608
|
className: cn("text-lg font-bold truncate", actionSubTitleClasses),
|
|
@@ -4244,7 +4613,7 @@ var CardActivitiesResults = forwardRef12(
|
|
|
4244
4613
|
}
|
|
4245
4614
|
),
|
|
4246
4615
|
extended && /* @__PURE__ */ jsxs21("div", { className: "flex flex-col items-center gap-2.5 pb-9.5 pt-2.5", children: [
|
|
4247
|
-
/* @__PURE__ */
|
|
4616
|
+
/* @__PURE__ */ jsx28(
|
|
4248
4617
|
"p",
|
|
4249
4618
|
{
|
|
4250
4619
|
className: cn(
|
|
@@ -4254,7 +4623,7 @@ var CardActivitiesResults = forwardRef12(
|
|
|
4254
4623
|
children: header
|
|
4255
4624
|
}
|
|
4256
4625
|
),
|
|
4257
|
-
/* @__PURE__ */
|
|
4626
|
+
/* @__PURE__ */ jsx28(Badge_default, { size: "large", action: "info", children: description })
|
|
4258
4627
|
] })
|
|
4259
4628
|
]
|
|
4260
4629
|
}
|
|
@@ -4284,9 +4653,9 @@ var CardQuestions = forwardRef12(
|
|
|
4284
4653
|
...props,
|
|
4285
4654
|
children: [
|
|
4286
4655
|
/* @__PURE__ */ jsxs21("section", { className: "flex flex-col gap-1 flex-1 min-w-0", children: [
|
|
4287
|
-
/* @__PURE__ */
|
|
4656
|
+
/* @__PURE__ */ jsx28("p", { className: "font-bold text-xs text-text-950 truncate", children: header }),
|
|
4288
4657
|
/* @__PURE__ */ jsxs21("div", { className: "flex flex-row gap-6 items-center", children: [
|
|
4289
|
-
/* @__PURE__ */
|
|
4658
|
+
/* @__PURE__ */ jsx28(
|
|
4290
4659
|
Badge_default,
|
|
4291
4660
|
{
|
|
4292
4661
|
size: "medium",
|
|
@@ -4297,11 +4666,11 @@ var CardQuestions = forwardRef12(
|
|
|
4297
4666
|
),
|
|
4298
4667
|
/* @__PURE__ */ jsxs21("span", { className: "flex flex-row items-center gap-1 text-text-700 text-xs", children: [
|
|
4299
4668
|
isDone ? "Nota" : "Sem nota",
|
|
4300
|
-
isDone && /* @__PURE__ */
|
|
4669
|
+
isDone && /* @__PURE__ */ jsx28(Badge_default, { size: "medium", action: "success", children: "00" })
|
|
4301
4670
|
] })
|
|
4302
4671
|
] })
|
|
4303
4672
|
] }),
|
|
4304
|
-
/* @__PURE__ */
|
|
4673
|
+
/* @__PURE__ */ jsx28("span", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx28(
|
|
4305
4674
|
Button_default,
|
|
4306
4675
|
{
|
|
4307
4676
|
size: "extra-small",
|
|
@@ -4332,19 +4701,19 @@ var CardProgress = forwardRef12(
|
|
|
4332
4701
|
}, ref) => {
|
|
4333
4702
|
const isHorizontal = direction === "horizontal";
|
|
4334
4703
|
const contentComponent = {
|
|
4335
|
-
horizontal: /* @__PURE__ */ jsxs21(
|
|
4704
|
+
horizontal: /* @__PURE__ */ jsxs21(Fragment5, { children: [
|
|
4336
4705
|
showDates && /* @__PURE__ */ jsxs21("div", { className: "flex flex-row gap-6 items-center", children: [
|
|
4337
4706
|
initialDate && /* @__PURE__ */ jsxs21("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
|
|
4338
|
-
/* @__PURE__ */
|
|
4339
|
-
/* @__PURE__ */
|
|
4707
|
+
/* @__PURE__ */ jsx28("p", { className: "text-text-800 font-semibold", children: "In\xEDcio" }),
|
|
4708
|
+
/* @__PURE__ */ jsx28("p", { className: "text-text-600", children: initialDate })
|
|
4340
4709
|
] }),
|
|
4341
4710
|
endDate && /* @__PURE__ */ jsxs21("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
|
|
4342
|
-
/* @__PURE__ */
|
|
4343
|
-
/* @__PURE__ */
|
|
4711
|
+
/* @__PURE__ */ jsx28("p", { className: "text-text-800 font-semibold", children: "Fim" }),
|
|
4712
|
+
/* @__PURE__ */ jsx28("p", { className: "text-text-600", children: endDate })
|
|
4344
4713
|
] })
|
|
4345
4714
|
] }),
|
|
4346
4715
|
/* @__PURE__ */ jsxs21("span", { className: "grid grid-cols-[1fr_auto] items-center gap-2", children: [
|
|
4347
|
-
/* @__PURE__ */
|
|
4716
|
+
/* @__PURE__ */ jsx28(
|
|
4348
4717
|
ProgressBar_default,
|
|
4349
4718
|
{
|
|
4350
4719
|
size: "small",
|
|
@@ -4369,7 +4738,7 @@ var CardProgress = forwardRef12(
|
|
|
4369
4738
|
)
|
|
4370
4739
|
] })
|
|
4371
4740
|
] }),
|
|
4372
|
-
vertical: /* @__PURE__ */
|
|
4741
|
+
vertical: /* @__PURE__ */ jsx28("p", { className: "text-sm text-text-800", children: subhead })
|
|
4373
4742
|
};
|
|
4374
4743
|
return /* @__PURE__ */ jsxs21(
|
|
4375
4744
|
CardBase,
|
|
@@ -4382,7 +4751,7 @@ var CardProgress = forwardRef12(
|
|
|
4382
4751
|
className: cn(isHorizontal ? "h-20" : "", className),
|
|
4383
4752
|
...props,
|
|
4384
4753
|
children: [
|
|
4385
|
-
/* @__PURE__ */
|
|
4754
|
+
/* @__PURE__ */ jsx28(
|
|
4386
4755
|
"div",
|
|
4387
4756
|
{
|
|
4388
4757
|
className: cn(
|
|
@@ -4403,7 +4772,7 @@ var CardProgress = forwardRef12(
|
|
|
4403
4772
|
!isHorizontal && "gap-4"
|
|
4404
4773
|
),
|
|
4405
4774
|
children: [
|
|
4406
|
-
/* @__PURE__ */
|
|
4775
|
+
/* @__PURE__ */ jsx28(Text_default, { size: "sm", weight: "bold", className: "text-text-950 truncate", children: header }),
|
|
4407
4776
|
contentComponent[direction]
|
|
4408
4777
|
]
|
|
4409
4778
|
}
|
|
@@ -4434,13 +4803,13 @@ var CardTopic = forwardRef12(
|
|
|
4434
4803
|
className: cn("justify-center gap-2 py-2 px-4", className),
|
|
4435
4804
|
...props,
|
|
4436
4805
|
children: [
|
|
4437
|
-
subHead && /* @__PURE__ */
|
|
4438
|
-
/* @__PURE__ */
|
|
4439
|
-
index < subHead.length - 1 && /* @__PURE__ */
|
|
4806
|
+
subHead && /* @__PURE__ */ jsx28("span", { className: "text-text-600 text-2xs flex flex-row gap-1", children: subHead.map((text, index) => /* @__PURE__ */ jsxs21(Fragment4, { children: [
|
|
4807
|
+
/* @__PURE__ */ jsx28("p", { children: text }),
|
|
4808
|
+
index < subHead.length - 1 && /* @__PURE__ */ jsx28("p", { children: "\u2022" })
|
|
4440
4809
|
] }, `${text} - ${index}`)) }),
|
|
4441
|
-
/* @__PURE__ */
|
|
4810
|
+
/* @__PURE__ */ jsx28("p", { className: "text-sm text-text-950 font-bold truncate", children: header }),
|
|
4442
4811
|
/* @__PURE__ */ jsxs21("span", { className: "grid grid-cols-[1fr_auto] items-center gap-2", children: [
|
|
4443
|
-
/* @__PURE__ */
|
|
4812
|
+
/* @__PURE__ */ jsx28(
|
|
4444
4813
|
ProgressBar_default,
|
|
4445
4814
|
{
|
|
4446
4815
|
size: "small",
|
|
@@ -4499,8 +4868,8 @@ var CardPerformance = forwardRef12(
|
|
|
4499
4868
|
children: [
|
|
4500
4869
|
/* @__PURE__ */ jsxs21("div", { className: "w-full flex flex-col justify-between gap-2", children: [
|
|
4501
4870
|
/* @__PURE__ */ jsxs21("div", { className: "flex flex-row justify-between items-center gap-2", children: [
|
|
4502
|
-
/* @__PURE__ */
|
|
4503
|
-
actionVariant === "button" && /* @__PURE__ */
|
|
4871
|
+
/* @__PURE__ */ jsx28("p", { className: "text-lg font-bold text-text-950 truncate flex-1 min-w-0", children: header }),
|
|
4872
|
+
actionVariant === "button" && /* @__PURE__ */ jsx28(
|
|
4504
4873
|
Button_default,
|
|
4505
4874
|
{
|
|
4506
4875
|
variant: "outline",
|
|
@@ -4511,17 +4880,17 @@ var CardPerformance = forwardRef12(
|
|
|
4511
4880
|
}
|
|
4512
4881
|
)
|
|
4513
4882
|
] }),
|
|
4514
|
-
/* @__PURE__ */
|
|
4883
|
+
/* @__PURE__ */ jsx28("div", { className: "w-full", children: hasProgress ? /* @__PURE__ */ jsx28(
|
|
4515
4884
|
ProgressBar_default,
|
|
4516
4885
|
{
|
|
4517
4886
|
value: progress,
|
|
4518
4887
|
label: `${progress}% ${labelProgress}`,
|
|
4519
4888
|
variant: progressVariant
|
|
4520
4889
|
}
|
|
4521
|
-
) : /* @__PURE__ */
|
|
4890
|
+
) : /* @__PURE__ */ jsx28("p", { className: "text-xs text-text-600 truncate", children: description }) })
|
|
4522
4891
|
] }),
|
|
4523
|
-
actionVariant == "caret" && /* @__PURE__ */
|
|
4524
|
-
|
|
4892
|
+
actionVariant == "caret" && /* @__PURE__ */ jsx28(
|
|
4893
|
+
CaretRight2,
|
|
4525
4894
|
{
|
|
4526
4895
|
className: "size-4.5 text-text-800 cursor-pointer",
|
|
4527
4896
|
"data-testid": "caret-icon"
|
|
@@ -4554,7 +4923,7 @@ var CardResults = forwardRef12(
|
|
|
4554
4923
|
className: cn("items-stretch cursor-pointer pr-4", className),
|
|
4555
4924
|
...props,
|
|
4556
4925
|
children: [
|
|
4557
|
-
/* @__PURE__ */
|
|
4926
|
+
/* @__PURE__ */ jsx28(
|
|
4558
4927
|
"div",
|
|
4559
4928
|
{
|
|
4560
4929
|
className: cn(
|
|
@@ -4563,7 +4932,7 @@ var CardResults = forwardRef12(
|
|
|
4563
4932
|
style: {
|
|
4564
4933
|
backgroundColor: color
|
|
4565
4934
|
},
|
|
4566
|
-
children: /* @__PURE__ */
|
|
4935
|
+
children: /* @__PURE__ */ jsx28(IconRender_default, { iconName: icon, color: "currentColor", size: 20 })
|
|
4567
4936
|
}
|
|
4568
4937
|
),
|
|
4569
4938
|
/* @__PURE__ */ jsxs21("div", { className: "w-full flex flex-row justify-between items-center", children: [
|
|
@@ -4575,7 +4944,7 @@ var CardResults = forwardRef12(
|
|
|
4575
4944
|
isRow ? "flex-row items-center gap-2" : "flex-col"
|
|
4576
4945
|
),
|
|
4577
4946
|
children: [
|
|
4578
|
-
/* @__PURE__ */
|
|
4947
|
+
/* @__PURE__ */ jsx28("p", { className: "text-sm font-bold text-text-950 flex-1", children: header }),
|
|
4579
4948
|
/* @__PURE__ */ jsxs21("span", { className: "flex flex-wrap flex-row gap-1 items-center", children: [
|
|
4580
4949
|
/* @__PURE__ */ jsxs21(
|
|
4581
4950
|
Badge_default,
|
|
@@ -4583,7 +4952,7 @@ var CardResults = forwardRef12(
|
|
|
4583
4952
|
action: "success",
|
|
4584
4953
|
variant: "solid",
|
|
4585
4954
|
size: "large",
|
|
4586
|
-
iconLeft: /* @__PURE__ */
|
|
4955
|
+
iconLeft: /* @__PURE__ */ jsx28(CheckCircle3, {}),
|
|
4587
4956
|
children: [
|
|
4588
4957
|
correct_answers,
|
|
4589
4958
|
" Corretas"
|
|
@@ -4596,7 +4965,7 @@ var CardResults = forwardRef12(
|
|
|
4596
4965
|
action: "error",
|
|
4597
4966
|
variant: "solid",
|
|
4598
4967
|
size: "large",
|
|
4599
|
-
iconLeft: /* @__PURE__ */
|
|
4968
|
+
iconLeft: /* @__PURE__ */ jsx28(XCircle2, {}),
|
|
4600
4969
|
children: [
|
|
4601
4970
|
incorrect_answers,
|
|
4602
4971
|
" Incorretas"
|
|
@@ -4607,7 +4976,7 @@ var CardResults = forwardRef12(
|
|
|
4607
4976
|
]
|
|
4608
4977
|
}
|
|
4609
4978
|
),
|
|
4610
|
-
/* @__PURE__ */
|
|
4979
|
+
/* @__PURE__ */ jsx28(CaretRight2, { className: "min-w-6 min-h-6 text-text-800" })
|
|
4611
4980
|
] })
|
|
4612
4981
|
]
|
|
4613
4982
|
}
|
|
@@ -4628,7 +4997,7 @@ var CardStatus = forwardRef12(
|
|
|
4628
4997
|
return "Em branco";
|
|
4629
4998
|
}
|
|
4630
4999
|
};
|
|
4631
|
-
return /* @__PURE__ */
|
|
5000
|
+
return /* @__PURE__ */ jsx28(
|
|
4632
5001
|
CardBase,
|
|
4633
5002
|
{
|
|
4634
5003
|
ref,
|
|
@@ -4638,21 +5007,21 @@ var CardStatus = forwardRef12(
|
|
|
4638
5007
|
className: cn("items-center cursor-pointer", className),
|
|
4639
5008
|
...props,
|
|
4640
5009
|
children: /* @__PURE__ */ jsxs21("div", { className: "flex justify-between w-full h-full flex-row items-center gap-2", children: [
|
|
4641
|
-
/* @__PURE__ */
|
|
5010
|
+
/* @__PURE__ */ jsx28("p", { className: "text-sm font-bold text-text-950 truncate flex-1 min-w-0", children: header }),
|
|
4642
5011
|
/* @__PURE__ */ jsxs21("span", { className: "flex flex-row gap-1 items-center flex-shrink-0", children: [
|
|
4643
|
-
status && /* @__PURE__ */
|
|
5012
|
+
status && /* @__PURE__ */ jsx28(
|
|
4644
5013
|
Badge_default,
|
|
4645
5014
|
{
|
|
4646
5015
|
action: status == "correct" ? "success" : "error",
|
|
4647
5016
|
variant: "solid",
|
|
4648
5017
|
size: "medium",
|
|
4649
|
-
iconLeft: status == "correct" ? /* @__PURE__ */
|
|
5018
|
+
iconLeft: status == "correct" ? /* @__PURE__ */ jsx28(CheckCircle3, {}) : /* @__PURE__ */ jsx28(XCircle2, {}),
|
|
4650
5019
|
children: getLabelBadge(status)
|
|
4651
5020
|
}
|
|
4652
5021
|
),
|
|
4653
|
-
label && /* @__PURE__ */
|
|
5022
|
+
label && /* @__PURE__ */ jsx28("p", { className: "text-sm text-text-800", children: label })
|
|
4654
5023
|
] }),
|
|
4655
|
-
/* @__PURE__ */
|
|
5024
|
+
/* @__PURE__ */ jsx28(CaretRight2, { className: "min-w-6 min-h-6 text-text-800 cursor-pointer flex-shrink-0 ml-2" })
|
|
4656
5025
|
] })
|
|
4657
5026
|
}
|
|
4658
5027
|
);
|
|
@@ -4673,9 +5042,9 @@ var CardSettings = forwardRef12(
|
|
|
4673
5042
|
),
|
|
4674
5043
|
...props,
|
|
4675
5044
|
children: [
|
|
4676
|
-
/* @__PURE__ */
|
|
4677
|
-
/* @__PURE__ */
|
|
4678
|
-
/* @__PURE__ */
|
|
5045
|
+
/* @__PURE__ */ jsx28("span", { className: "[&>svg]:size-6", children: icon }),
|
|
5046
|
+
/* @__PURE__ */ jsx28("p", { className: "w-full text-sm truncate", children: header }),
|
|
5047
|
+
/* @__PURE__ */ jsx28(CaretRight2, { size: 24, className: "cursor-pointer" })
|
|
4679
5048
|
]
|
|
4680
5049
|
}
|
|
4681
5050
|
);
|
|
@@ -4704,12 +5073,12 @@ var CardSupport = forwardRef12(
|
|
|
4704
5073
|
direction == "col" ? "flex-col" : "flex-row items-center"
|
|
4705
5074
|
),
|
|
4706
5075
|
children: [
|
|
4707
|
-
/* @__PURE__ */
|
|
4708
|
-
/* @__PURE__ */
|
|
5076
|
+
/* @__PURE__ */ jsx28("span", { className: "w-full min-w-0", children: /* @__PURE__ */ jsx28("p", { className: "text-sm text-text-950 font-bold truncate", children: header }) }),
|
|
5077
|
+
/* @__PURE__ */ jsx28("span", { className: "flex flex-row gap-1", children })
|
|
4709
5078
|
]
|
|
4710
5079
|
}
|
|
4711
5080
|
),
|
|
4712
|
-
/* @__PURE__ */
|
|
5081
|
+
/* @__PURE__ */ jsx28(CaretRight2, { className: "text-text-800 cursor-pointer", size: 24 })
|
|
4713
5082
|
]
|
|
4714
5083
|
}
|
|
4715
5084
|
);
|
|
@@ -4740,7 +5109,7 @@ var CardForum = forwardRef12(
|
|
|
4740
5109
|
className: cn("w-auto h-auto gap-3", className),
|
|
4741
5110
|
...props,
|
|
4742
5111
|
children: [
|
|
4743
|
-
/* @__PURE__ */
|
|
5112
|
+
/* @__PURE__ */ jsx28(
|
|
4744
5113
|
"button",
|
|
4745
5114
|
{
|
|
4746
5115
|
type: "button",
|
|
@@ -4751,7 +5120,7 @@ var CardForum = forwardRef12(
|
|
|
4751
5120
|
),
|
|
4752
5121
|
/* @__PURE__ */ jsxs21("div", { className: "flex flex-col gap-2 flex-1 min-w-0", children: [
|
|
4753
5122
|
/* @__PURE__ */ jsxs21("div", { className: "flex flex-row gap-1 items-center flex-wrap", children: [
|
|
4754
|
-
/* @__PURE__ */
|
|
5123
|
+
/* @__PURE__ */ jsx28("p", { className: "text-xs font-semibold text-primary-700 truncate", children: title }),
|
|
4755
5124
|
/* @__PURE__ */ jsxs21("p", { className: "text-xs text-text-600", children: [
|
|
4756
5125
|
"\u2022 ",
|
|
4757
5126
|
date,
|
|
@@ -4759,7 +5128,7 @@ var CardForum = forwardRef12(
|
|
|
4759
5128
|
hour
|
|
4760
5129
|
] })
|
|
4761
5130
|
] }),
|
|
4762
|
-
/* @__PURE__ */
|
|
5131
|
+
/* @__PURE__ */ jsx28("p", { className: "text-text-950 text-sm line-clamp-2 truncate", children: content }),
|
|
4763
5132
|
/* @__PURE__ */ jsxs21(
|
|
4764
5133
|
"button",
|
|
4765
5134
|
{
|
|
@@ -4768,7 +5137,7 @@ var CardForum = forwardRef12(
|
|
|
4768
5137
|
onClick: () => onClickComments?.(valueComments),
|
|
4769
5138
|
className: "text-text-600 flex flex-row gap-2 items-center",
|
|
4770
5139
|
children: [
|
|
4771
|
-
/* @__PURE__ */
|
|
5140
|
+
/* @__PURE__ */ jsx28(ChatCircleText, { "aria-hidden": "true", size: 16 }),
|
|
4772
5141
|
/* @__PURE__ */ jsxs21("p", { className: "text-xs", children: [
|
|
4773
5142
|
comments,
|
|
4774
5143
|
" respostas"
|
|
@@ -4796,14 +5165,14 @@ var CardAudio = forwardRef12(
|
|
|
4796
5165
|
className,
|
|
4797
5166
|
...props
|
|
4798
5167
|
}, ref) => {
|
|
4799
|
-
const [isPlaying, setIsPlaying] =
|
|
4800
|
-
const [currentTime, setCurrentTime] =
|
|
4801
|
-
const [duration, setDuration] =
|
|
4802
|
-
const [volume, setVolume] =
|
|
4803
|
-
const [showVolumeControl, setShowVolumeControl] =
|
|
4804
|
-
const [showSpeedMenu, setShowSpeedMenu] =
|
|
4805
|
-
const [playbackRate, setPlaybackRate] =
|
|
4806
|
-
const audioRef =
|
|
5168
|
+
const [isPlaying, setIsPlaying] = useState10(false);
|
|
5169
|
+
const [currentTime, setCurrentTime] = useState10(0);
|
|
5170
|
+
const [duration, setDuration] = useState10(0);
|
|
5171
|
+
const [volume, setVolume] = useState10(1);
|
|
5172
|
+
const [showVolumeControl, setShowVolumeControl] = useState10(false);
|
|
5173
|
+
const [showSpeedMenu, setShowSpeedMenu] = useState10(false);
|
|
5174
|
+
const [playbackRate, setPlaybackRate] = useState10(1);
|
|
5175
|
+
const audioRef = useRef7(null);
|
|
4807
5176
|
const formatTime2 = (time) => {
|
|
4808
5177
|
const minutes = Math.floor(time / 60);
|
|
4809
5178
|
const seconds = Math.floor(time % 60);
|
|
@@ -4868,12 +5237,12 @@ var CardAudio = forwardRef12(
|
|
|
4868
5237
|
};
|
|
4869
5238
|
const getVolumeIcon = () => {
|
|
4870
5239
|
if (volume === 0) {
|
|
4871
|
-
return /* @__PURE__ */
|
|
5240
|
+
return /* @__PURE__ */ jsx28(SpeakerSimpleX, { size: 24 });
|
|
4872
5241
|
}
|
|
4873
5242
|
if (volume < 0.5) {
|
|
4874
|
-
return /* @__PURE__ */
|
|
5243
|
+
return /* @__PURE__ */ jsx28(SpeakerLow, { size: 24 });
|
|
4875
5244
|
}
|
|
4876
|
-
return /* @__PURE__ */
|
|
5245
|
+
return /* @__PURE__ */ jsx28(SpeakerHigh, { size: 24 });
|
|
4877
5246
|
};
|
|
4878
5247
|
return /* @__PURE__ */ jsxs21(
|
|
4879
5248
|
CardBase,
|
|
@@ -4888,7 +5257,7 @@ var CardAudio = forwardRef12(
|
|
|
4888
5257
|
),
|
|
4889
5258
|
...props,
|
|
4890
5259
|
children: [
|
|
4891
|
-
/* @__PURE__ */
|
|
5260
|
+
/* @__PURE__ */ jsx28(
|
|
4892
5261
|
"audio",
|
|
4893
5262
|
{
|
|
4894
5263
|
ref: audioRef,
|
|
@@ -4900,7 +5269,7 @@ var CardAudio = forwardRef12(
|
|
|
4900
5269
|
onEnded: handleEnded,
|
|
4901
5270
|
"data-testid": "audio-element",
|
|
4902
5271
|
"aria-label": title,
|
|
4903
|
-
children: tracks ? tracks.map((track) => /* @__PURE__ */
|
|
5272
|
+
children: tracks ? tracks.map((track) => /* @__PURE__ */ jsx28(
|
|
4904
5273
|
"track",
|
|
4905
5274
|
{
|
|
4906
5275
|
kind: track.kind,
|
|
@@ -4910,7 +5279,7 @@ var CardAudio = forwardRef12(
|
|
|
4910
5279
|
default: track.default
|
|
4911
5280
|
},
|
|
4912
5281
|
track.src
|
|
4913
|
-
)) : /* @__PURE__ */
|
|
5282
|
+
)) : /* @__PURE__ */ jsx28(
|
|
4914
5283
|
"track",
|
|
4915
5284
|
{
|
|
4916
5285
|
kind: "captions",
|
|
@@ -4921,7 +5290,7 @@ var CardAudio = forwardRef12(
|
|
|
4921
5290
|
)
|
|
4922
5291
|
}
|
|
4923
5292
|
),
|
|
4924
|
-
/* @__PURE__ */
|
|
5293
|
+
/* @__PURE__ */ jsx28(
|
|
4925
5294
|
"button",
|
|
4926
5295
|
{
|
|
4927
5296
|
type: "button",
|
|
@@ -4929,14 +5298,14 @@ var CardAudio = forwardRef12(
|
|
|
4929
5298
|
disabled: !src,
|
|
4930
5299
|
className: "cursor-pointer text-text-950 hover:text-primary-600 disabled:text-text-400 disabled:cursor-not-allowed",
|
|
4931
5300
|
"aria-label": isPlaying ? "Pausar" : "Reproduzir",
|
|
4932
|
-
children: isPlaying ? /* @__PURE__ */
|
|
4933
|
-
/* @__PURE__ */
|
|
4934
|
-
/* @__PURE__ */
|
|
4935
|
-
] }) }) : /* @__PURE__ */
|
|
5301
|
+
children: isPlaying ? /* @__PURE__ */ jsx28("div", { className: "w-6 h-6 flex items-center justify-center", children: /* @__PURE__ */ jsxs21("div", { className: "flex gap-0.5", children: [
|
|
5302
|
+
/* @__PURE__ */ jsx28("div", { className: "w-1 h-4 bg-current rounded-sm" }),
|
|
5303
|
+
/* @__PURE__ */ jsx28("div", { className: "w-1 h-4 bg-current rounded-sm" })
|
|
5304
|
+
] }) }) : /* @__PURE__ */ jsx28(Play, { size: 24 })
|
|
4936
5305
|
}
|
|
4937
5306
|
),
|
|
4938
|
-
/* @__PURE__ */
|
|
4939
|
-
/* @__PURE__ */
|
|
5307
|
+
/* @__PURE__ */ jsx28("p", { className: "text-text-800 text-md font-medium min-w-[2.5rem]", children: formatTime2(currentTime) }),
|
|
5308
|
+
/* @__PURE__ */ jsx28("div", { className: "flex-1 relative", "data-testid": "progress-bar", children: /* @__PURE__ */ jsx28(
|
|
4940
5309
|
"button",
|
|
4941
5310
|
{
|
|
4942
5311
|
type: "button",
|
|
@@ -4951,7 +5320,7 @@ var CardAudio = forwardRef12(
|
|
|
4951
5320
|
}
|
|
4952
5321
|
},
|
|
4953
5322
|
"aria-label": "Barra de progresso do \xE1udio",
|
|
4954
|
-
children: /* @__PURE__ */
|
|
5323
|
+
children: /* @__PURE__ */ jsx28(
|
|
4955
5324
|
"div",
|
|
4956
5325
|
{
|
|
4957
5326
|
className: "h-full bg-primary-600 rounded-full transition-all duration-100",
|
|
@@ -4962,19 +5331,19 @@ var CardAudio = forwardRef12(
|
|
|
4962
5331
|
)
|
|
4963
5332
|
}
|
|
4964
5333
|
) }),
|
|
4965
|
-
/* @__PURE__ */
|
|
5334
|
+
/* @__PURE__ */ jsx28("p", { className: "text-text-800 text-md font-medium min-w-[2.5rem]", children: formatTime2(duration) }),
|
|
4966
5335
|
/* @__PURE__ */ jsxs21("div", { className: "relative h-6", children: [
|
|
4967
|
-
/* @__PURE__ */
|
|
5336
|
+
/* @__PURE__ */ jsx28(
|
|
4968
5337
|
"button",
|
|
4969
5338
|
{
|
|
4970
5339
|
type: "button",
|
|
4971
5340
|
onClick: toggleVolumeControl,
|
|
4972
5341
|
className: "cursor-pointer text-text-950 hover:text-primary-600",
|
|
4973
5342
|
"aria-label": "Controle de volume",
|
|
4974
|
-
children: /* @__PURE__ */
|
|
5343
|
+
children: /* @__PURE__ */ jsx28("div", { className: "w-6 h-6 flex items-center justify-center", children: getVolumeIcon() })
|
|
4975
5344
|
}
|
|
4976
5345
|
),
|
|
4977
|
-
showVolumeControl && /* @__PURE__ */
|
|
5346
|
+
showVolumeControl && /* @__PURE__ */ jsx28(
|
|
4978
5347
|
"button",
|
|
4979
5348
|
{
|
|
4980
5349
|
type: "button",
|
|
@@ -4984,7 +5353,7 @@ var CardAudio = forwardRef12(
|
|
|
4984
5353
|
setShowVolumeControl(false);
|
|
4985
5354
|
}
|
|
4986
5355
|
},
|
|
4987
|
-
children: /* @__PURE__ */
|
|
5356
|
+
children: /* @__PURE__ */ jsx28(
|
|
4988
5357
|
"input",
|
|
4989
5358
|
{
|
|
4990
5359
|
type: "range",
|
|
@@ -5026,21 +5395,21 @@ var CardAudio = forwardRef12(
|
|
|
5026
5395
|
)
|
|
5027
5396
|
] }),
|
|
5028
5397
|
/* @__PURE__ */ jsxs21("div", { className: "relative h-6", children: [
|
|
5029
|
-
/* @__PURE__ */
|
|
5398
|
+
/* @__PURE__ */ jsx28(
|
|
5030
5399
|
"button",
|
|
5031
5400
|
{
|
|
5032
5401
|
type: "button",
|
|
5033
5402
|
onClick: toggleSpeedMenu,
|
|
5034
5403
|
className: "cursor-pointer text-text-950 hover:text-primary-600",
|
|
5035
5404
|
"aria-label": "Op\xE7\xF5es de velocidade",
|
|
5036
|
-
children: /* @__PURE__ */
|
|
5405
|
+
children: /* @__PURE__ */ jsx28(DotsThreeVertical, { size: 24 })
|
|
5037
5406
|
}
|
|
5038
5407
|
),
|
|
5039
|
-
showSpeedMenu && /* @__PURE__ */
|
|
5408
|
+
showSpeedMenu && /* @__PURE__ */ jsx28("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__ */ jsx28("div", { className: "flex flex-col gap-1", children: [
|
|
5040
5409
|
{ speed: 1, label: "1x" },
|
|
5041
5410
|
{ speed: 1.5, label: "1.5x" },
|
|
5042
5411
|
{ speed: 2, label: "2x" }
|
|
5043
|
-
].map(({ speed, label }) => /* @__PURE__ */
|
|
5412
|
+
].map(({ speed, label }) => /* @__PURE__ */ jsx28(
|
|
5044
5413
|
"button",
|
|
5045
5414
|
{
|
|
5046
5415
|
type: "button",
|
|
@@ -5068,7 +5437,7 @@ var SIMULADO_BACKGROUND_CLASSES = {
|
|
|
5068
5437
|
var CardSimulado = forwardRef12(
|
|
5069
5438
|
({ title, duration, info, backgroundColor, className, ...props }, ref) => {
|
|
5070
5439
|
const backgroundClass = SIMULADO_BACKGROUND_CLASSES[backgroundColor];
|
|
5071
|
-
return /* @__PURE__ */
|
|
5440
|
+
return /* @__PURE__ */ jsx28(
|
|
5072
5441
|
CardBase,
|
|
5073
5442
|
{
|
|
5074
5443
|
ref,
|
|
@@ -5083,17 +5452,17 @@ var CardSimulado = forwardRef12(
|
|
|
5083
5452
|
...props,
|
|
5084
5453
|
children: /* @__PURE__ */ jsxs21("div", { className: "flex justify-between items-center w-full gap-4", children: [
|
|
5085
5454
|
/* @__PURE__ */ jsxs21("div", { className: "flex flex-col gap-1 flex-1 min-w-0", children: [
|
|
5086
|
-
/* @__PURE__ */
|
|
5455
|
+
/* @__PURE__ */ jsx28(Text_default, { size: "lg", weight: "bold", className: "text-text-950 truncate", children: title }),
|
|
5087
5456
|
/* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-4 text-text-700", children: [
|
|
5088
5457
|
duration && /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-1", children: [
|
|
5089
|
-
/* @__PURE__ */
|
|
5090
|
-
/* @__PURE__ */
|
|
5458
|
+
/* @__PURE__ */ jsx28(Clock, { size: 16, className: "flex-shrink-0" }),
|
|
5459
|
+
/* @__PURE__ */ jsx28(Text_default, { size: "sm", children: duration })
|
|
5091
5460
|
] }),
|
|
5092
|
-
/* @__PURE__ */
|
|
5461
|
+
/* @__PURE__ */ jsx28(Text_default, { size: "sm", className: "truncate", children: info })
|
|
5093
5462
|
] })
|
|
5094
5463
|
] }),
|
|
5095
|
-
/* @__PURE__ */
|
|
5096
|
-
|
|
5464
|
+
/* @__PURE__ */ jsx28(
|
|
5465
|
+
CaretRight2,
|
|
5097
5466
|
{
|
|
5098
5467
|
size: 24,
|
|
5099
5468
|
className: "text-text-800 flex-shrink-0",
|
|
@@ -5137,7 +5506,7 @@ var CardTest = forwardRef12(
|
|
|
5137
5506
|
const interactiveClasses = isSelectable ? "cursor-pointer focus:outline-none focus:ring-2 focus:ring-primary-950 focus:ring-offset-2" : "";
|
|
5138
5507
|
const selectedClasses = selected ? "ring-2 ring-primary-950 ring-offset-2" : "";
|
|
5139
5508
|
if (isSelectable) {
|
|
5140
|
-
return /* @__PURE__ */
|
|
5509
|
+
return /* @__PURE__ */ jsx28(
|
|
5141
5510
|
"button",
|
|
5142
5511
|
{
|
|
5143
5512
|
ref,
|
|
@@ -5150,7 +5519,7 @@ var CardTest = forwardRef12(
|
|
|
5150
5519
|
"aria-pressed": selected,
|
|
5151
5520
|
...props,
|
|
5152
5521
|
children: /* @__PURE__ */ jsxs21("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
|
|
5153
|
-
/* @__PURE__ */
|
|
5522
|
+
/* @__PURE__ */ jsx28(
|
|
5154
5523
|
Text_default,
|
|
5155
5524
|
{
|
|
5156
5525
|
size: "md",
|
|
@@ -5161,8 +5530,8 @@ var CardTest = forwardRef12(
|
|
|
5161
5530
|
),
|
|
5162
5531
|
/* @__PURE__ */ jsxs21("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
|
|
5163
5532
|
duration && /* @__PURE__ */ jsxs21("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
|
|
5164
|
-
/* @__PURE__ */
|
|
5165
|
-
/* @__PURE__ */
|
|
5533
|
+
/* @__PURE__ */ jsx28(Clock, { size: 16, className: "text-text-700" }),
|
|
5534
|
+
/* @__PURE__ */ jsx28(
|
|
5166
5535
|
Text_default,
|
|
5167
5536
|
{
|
|
5168
5537
|
size: "sm",
|
|
@@ -5171,7 +5540,7 @@ var CardTest = forwardRef12(
|
|
|
5171
5540
|
}
|
|
5172
5541
|
)
|
|
5173
5542
|
] }),
|
|
5174
|
-
/* @__PURE__ */
|
|
5543
|
+
/* @__PURE__ */ jsx28(
|
|
5175
5544
|
Text_default,
|
|
5176
5545
|
{
|
|
5177
5546
|
size: "sm",
|
|
@@ -5184,14 +5553,14 @@ var CardTest = forwardRef12(
|
|
|
5184
5553
|
}
|
|
5185
5554
|
);
|
|
5186
5555
|
}
|
|
5187
|
-
return /* @__PURE__ */
|
|
5556
|
+
return /* @__PURE__ */ jsx28(
|
|
5188
5557
|
"div",
|
|
5189
5558
|
{
|
|
5190
5559
|
ref,
|
|
5191
5560
|
className: cn(`${baseClasses} ${className}`.trim()),
|
|
5192
5561
|
...props,
|
|
5193
5562
|
children: /* @__PURE__ */ jsxs21("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
|
|
5194
|
-
/* @__PURE__ */
|
|
5563
|
+
/* @__PURE__ */ jsx28(
|
|
5195
5564
|
Text_default,
|
|
5196
5565
|
{
|
|
5197
5566
|
size: "md",
|
|
@@ -5202,8 +5571,8 @@ var CardTest = forwardRef12(
|
|
|
5202
5571
|
),
|
|
5203
5572
|
/* @__PURE__ */ jsxs21("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
|
|
5204
5573
|
duration && /* @__PURE__ */ jsxs21("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
|
|
5205
|
-
/* @__PURE__ */
|
|
5206
|
-
/* @__PURE__ */
|
|
5574
|
+
/* @__PURE__ */ jsx28(Clock, { size: 16, className: "text-text-700" }),
|
|
5575
|
+
/* @__PURE__ */ jsx28(
|
|
5207
5576
|
Text_default,
|
|
5208
5577
|
{
|
|
5209
5578
|
size: "sm",
|
|
@@ -5212,7 +5581,7 @@ var CardTest = forwardRef12(
|
|
|
5212
5581
|
}
|
|
5213
5582
|
)
|
|
5214
5583
|
] }),
|
|
5215
|
-
/* @__PURE__ */
|
|
5584
|
+
/* @__PURE__ */ jsx28(
|
|
5216
5585
|
Text_default,
|
|
5217
5586
|
{
|
|
5218
5587
|
size: "sm",
|
|
@@ -5249,14 +5618,14 @@ var SIMULATION_TYPE_STYLES = {
|
|
|
5249
5618
|
}
|
|
5250
5619
|
};
|
|
5251
5620
|
var CardSimulationHistory = forwardRef12(({ data, onSimulationClick, className, ...props }, ref) => {
|
|
5252
|
-
return /* @__PURE__ */
|
|
5621
|
+
return /* @__PURE__ */ jsx28(
|
|
5253
5622
|
"div",
|
|
5254
5623
|
{
|
|
5255
5624
|
ref,
|
|
5256
5625
|
className: cn("w-full max-w-[992px] h-auto", className),
|
|
5257
5626
|
...props,
|
|
5258
5627
|
children: /* @__PURE__ */ jsxs21("div", { className: "flex flex-col gap-0", children: [
|
|
5259
|
-
data.map((section, sectionIndex) => /* @__PURE__ */
|
|
5628
|
+
data.map((section, sectionIndex) => /* @__PURE__ */ jsx28("div", { className: "flex flex-col", children: /* @__PURE__ */ jsxs21(
|
|
5260
5629
|
"div",
|
|
5261
5630
|
{
|
|
5262
5631
|
className: cn(
|
|
@@ -5264,7 +5633,7 @@ var CardSimulationHistory = forwardRef12(({ data, onSimulationClick, className,
|
|
|
5264
5633
|
sectionIndex === 0 ? "rounded-t-3xl" : ""
|
|
5265
5634
|
),
|
|
5266
5635
|
children: [
|
|
5267
|
-
/* @__PURE__ */
|
|
5636
|
+
/* @__PURE__ */ jsx28(
|
|
5268
5637
|
Text_default,
|
|
5269
5638
|
{
|
|
5270
5639
|
size: "xs",
|
|
@@ -5273,9 +5642,9 @@ var CardSimulationHistory = forwardRef12(({ data, onSimulationClick, className,
|
|
|
5273
5642
|
children: section.date
|
|
5274
5643
|
}
|
|
5275
5644
|
),
|
|
5276
|
-
/* @__PURE__ */
|
|
5645
|
+
/* @__PURE__ */ jsx28("div", { className: "flex flex-col gap-2 flex-1", children: section.simulations.map((simulation) => {
|
|
5277
5646
|
const typeStyles = SIMULATION_TYPE_STYLES[simulation.type];
|
|
5278
|
-
return /* @__PURE__ */
|
|
5647
|
+
return /* @__PURE__ */ jsx28(
|
|
5279
5648
|
CardBase,
|
|
5280
5649
|
{
|
|
5281
5650
|
layout: "horizontal",
|
|
@@ -5289,7 +5658,7 @@ var CardSimulationHistory = forwardRef12(({ data, onSimulationClick, className,
|
|
|
5289
5658
|
onClick: () => onSimulationClick?.(simulation),
|
|
5290
5659
|
children: /* @__PURE__ */ jsxs21("div", { className: "flex justify-between items-center w-full gap-2", children: [
|
|
5291
5660
|
/* @__PURE__ */ jsxs21("div", { className: "flex flex-wrap flex-col justify-between sm:flex-row gap-2 flex-1 min-w-0", children: [
|
|
5292
|
-
/* @__PURE__ */
|
|
5661
|
+
/* @__PURE__ */ jsx28(
|
|
5293
5662
|
Text_default,
|
|
5294
5663
|
{
|
|
5295
5664
|
size: "lg",
|
|
@@ -5299,7 +5668,7 @@ var CardSimulationHistory = forwardRef12(({ data, onSimulationClick, className,
|
|
|
5299
5668
|
}
|
|
5300
5669
|
),
|
|
5301
5670
|
/* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-2", children: [
|
|
5302
|
-
/* @__PURE__ */
|
|
5671
|
+
/* @__PURE__ */ jsx28(
|
|
5303
5672
|
Badge_default,
|
|
5304
5673
|
{
|
|
5305
5674
|
variant: "examsOutlined",
|
|
@@ -5308,11 +5677,11 @@ var CardSimulationHistory = forwardRef12(({ data, onSimulationClick, className,
|
|
|
5308
5677
|
children: typeStyles.text
|
|
5309
5678
|
}
|
|
5310
5679
|
),
|
|
5311
|
-
/* @__PURE__ */
|
|
5680
|
+
/* @__PURE__ */ jsx28(Text_default, { size: "sm", className: "text-text-800 truncate", children: simulation.info })
|
|
5312
5681
|
] })
|
|
5313
5682
|
] }),
|
|
5314
|
-
/* @__PURE__ */
|
|
5315
|
-
|
|
5683
|
+
/* @__PURE__ */ jsx28(
|
|
5684
|
+
CaretRight2,
|
|
5316
5685
|
{
|
|
5317
5686
|
size: 24,
|
|
5318
5687
|
className: "text-text-800 flex-shrink-0",
|
|
@@ -5327,15 +5696,15 @@ var CardSimulationHistory = forwardRef12(({ data, onSimulationClick, className,
|
|
|
5327
5696
|
]
|
|
5328
5697
|
}
|
|
5329
5698
|
) }, section.date)),
|
|
5330
|
-
data.length > 0 && /* @__PURE__ */
|
|
5699
|
+
data.length > 0 && /* @__PURE__ */ jsx28("div", { className: "w-full h-6 bg-white rounded-b-3xl" })
|
|
5331
5700
|
] })
|
|
5332
5701
|
}
|
|
5333
5702
|
);
|
|
5334
5703
|
});
|
|
5335
5704
|
|
|
5336
5705
|
// src/components/Accordation/Accordation.tsx
|
|
5337
|
-
import { CaretRight as
|
|
5338
|
-
import { jsx as
|
|
5706
|
+
import { CaretRight as CaretRight3 } from "phosphor-react";
|
|
5707
|
+
import { jsx as jsx29, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5339
5708
|
var CardAccordation = forwardRef13(
|
|
5340
5709
|
({
|
|
5341
5710
|
trigger,
|
|
@@ -5345,8 +5714,8 @@ var CardAccordation = forwardRef13(
|
|
|
5345
5714
|
onToggleExpanded,
|
|
5346
5715
|
...props
|
|
5347
5716
|
}, ref) => {
|
|
5348
|
-
const [isExpanded, setIsExpanded] =
|
|
5349
|
-
const contentId =
|
|
5717
|
+
const [isExpanded, setIsExpanded] = useState11(defaultExpanded);
|
|
5718
|
+
const contentId = useId8();
|
|
5350
5719
|
const handleToggle = () => {
|
|
5351
5720
|
const newExpanded = !isExpanded;
|
|
5352
5721
|
setIsExpanded(newExpanded);
|
|
@@ -5378,8 +5747,8 @@ var CardAccordation = forwardRef13(
|
|
|
5378
5747
|
"aria-controls": "accordion-content",
|
|
5379
5748
|
children: [
|
|
5380
5749
|
trigger,
|
|
5381
|
-
/* @__PURE__ */
|
|
5382
|
-
|
|
5750
|
+
/* @__PURE__ */ jsx29(
|
|
5751
|
+
CaretRight3,
|
|
5383
5752
|
{
|
|
5384
5753
|
size: 20,
|
|
5385
5754
|
className: cn(
|
|
@@ -5392,7 +5761,7 @@ var CardAccordation = forwardRef13(
|
|
|
5392
5761
|
]
|
|
5393
5762
|
}
|
|
5394
5763
|
),
|
|
5395
|
-
/* @__PURE__ */
|
|
5764
|
+
/* @__PURE__ */ jsx29(
|
|
5396
5765
|
"div",
|
|
5397
5766
|
{
|
|
5398
5767
|
id: contentId,
|
|
@@ -5401,7 +5770,7 @@ var CardAccordation = forwardRef13(
|
|
|
5401
5770
|
isExpanded ? "max-h-screen opacity-100" : "max-h-0 opacity-0"
|
|
5402
5771
|
),
|
|
5403
5772
|
"data-testid": "accordion-content",
|
|
5404
|
-
children: /* @__PURE__ */
|
|
5773
|
+
children: /* @__PURE__ */ jsx29("div", { className: "p-4 pt-0 border-border-50", children })
|
|
5405
5774
|
}
|
|
5406
5775
|
)
|
|
5407
5776
|
]
|
|
@@ -5412,8 +5781,8 @@ var CardAccordation = forwardRef13(
|
|
|
5412
5781
|
|
|
5413
5782
|
// src/components/Alternative/Alternative.tsx
|
|
5414
5783
|
import { CheckCircle as CheckCircle4, XCircle as XCircle3 } from "phosphor-react";
|
|
5415
|
-
import { forwardRef as forwardRef14, useId as
|
|
5416
|
-
import { jsx as
|
|
5784
|
+
import { forwardRef as forwardRef14, useId as useId9, useState as useState12 } from "react";
|
|
5785
|
+
import { jsx as jsx30, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
5417
5786
|
var AlternativesList = ({
|
|
5418
5787
|
alternatives,
|
|
5419
5788
|
name,
|
|
@@ -5426,9 +5795,9 @@ var AlternativesList = ({
|
|
|
5426
5795
|
mode = "interactive",
|
|
5427
5796
|
selectedValue
|
|
5428
5797
|
}) => {
|
|
5429
|
-
const uniqueId =
|
|
5798
|
+
const uniqueId = useId9();
|
|
5430
5799
|
const groupName = name || `alternatives-${uniqueId}`;
|
|
5431
|
-
const [actualValue, setActualValue] =
|
|
5800
|
+
const [actualValue, setActualValue] = useState12(value);
|
|
5432
5801
|
const isReadonly = mode === "readonly";
|
|
5433
5802
|
const getStatusStyles2 = (status, isReadonly2) => {
|
|
5434
5803
|
const hoverClass = isReadonly2 ? "" : "hover:bg-background-50";
|
|
@@ -5444,9 +5813,9 @@ var AlternativesList = ({
|
|
|
5444
5813
|
const getStatusBadge2 = (status) => {
|
|
5445
5814
|
switch (status) {
|
|
5446
5815
|
case "correct":
|
|
5447
|
-
return /* @__PURE__ */
|
|
5816
|
+
return /* @__PURE__ */ jsx30(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx30(CheckCircle4, {}), children: "Resposta correta" });
|
|
5448
5817
|
case "incorrect":
|
|
5449
|
-
return /* @__PURE__ */
|
|
5818
|
+
return /* @__PURE__ */ jsx30(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ jsx30(XCircle3, {}), children: "Resposta incorreta" });
|
|
5450
5819
|
default:
|
|
5451
5820
|
return null;
|
|
5452
5821
|
}
|
|
@@ -5476,10 +5845,10 @@ var AlternativesList = ({
|
|
|
5476
5845
|
const renderRadio = () => {
|
|
5477
5846
|
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"}`;
|
|
5478
5847
|
const dotClasses = "w-3 h-3 rounded-full bg-primary-950 transition-all duration-200";
|
|
5479
|
-
return /* @__PURE__ */
|
|
5848
|
+
return /* @__PURE__ */ jsx30("div", { className: radioClasses, children: isUserSelected && /* @__PURE__ */ jsx30("div", { className: dotClasses }) });
|
|
5480
5849
|
};
|
|
5481
5850
|
if (layout === "detailed") {
|
|
5482
|
-
return /* @__PURE__ */
|
|
5851
|
+
return /* @__PURE__ */ jsx30(
|
|
5483
5852
|
"div",
|
|
5484
5853
|
{
|
|
5485
5854
|
className: cn(
|
|
@@ -5489,9 +5858,9 @@ var AlternativesList = ({
|
|
|
5489
5858
|
),
|
|
5490
5859
|
children: /* @__PURE__ */ jsxs23("div", { className: "flex items-start justify-between gap-3", children: [
|
|
5491
5860
|
/* @__PURE__ */ jsxs23("div", { className: "flex items-start gap-3 flex-1", children: [
|
|
5492
|
-
/* @__PURE__ */
|
|
5861
|
+
/* @__PURE__ */ jsx30("div", { className: "mt-1", children: renderRadio() }),
|
|
5493
5862
|
/* @__PURE__ */ jsxs23("div", { className: "flex-1", children: [
|
|
5494
|
-
/* @__PURE__ */
|
|
5863
|
+
/* @__PURE__ */ jsx30(
|
|
5495
5864
|
"p",
|
|
5496
5865
|
{
|
|
5497
5866
|
className: cn(
|
|
@@ -5501,10 +5870,10 @@ var AlternativesList = ({
|
|
|
5501
5870
|
children: alternative.label
|
|
5502
5871
|
}
|
|
5503
5872
|
),
|
|
5504
|
-
alternative.description && /* @__PURE__ */
|
|
5873
|
+
alternative.description && /* @__PURE__ */ jsx30("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
|
|
5505
5874
|
] })
|
|
5506
5875
|
] }),
|
|
5507
|
-
statusBadge && /* @__PURE__ */
|
|
5876
|
+
statusBadge && /* @__PURE__ */ jsx30("div", { className: "flex-shrink-0", children: statusBadge })
|
|
5508
5877
|
] })
|
|
5509
5878
|
},
|
|
5510
5879
|
alternativeId
|
|
@@ -5521,7 +5890,7 @@ var AlternativesList = ({
|
|
|
5521
5890
|
children: [
|
|
5522
5891
|
/* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
5523
5892
|
renderRadio(),
|
|
5524
|
-
/* @__PURE__ */
|
|
5893
|
+
/* @__PURE__ */ jsx30(
|
|
5525
5894
|
"span",
|
|
5526
5895
|
{
|
|
5527
5896
|
className: cn(
|
|
@@ -5532,14 +5901,14 @@ var AlternativesList = ({
|
|
|
5532
5901
|
}
|
|
5533
5902
|
)
|
|
5534
5903
|
] }),
|
|
5535
|
-
statusBadge && /* @__PURE__ */
|
|
5904
|
+
statusBadge && /* @__PURE__ */ jsx30("div", { className: "flex-shrink-0", children: statusBadge })
|
|
5536
5905
|
]
|
|
5537
5906
|
},
|
|
5538
5907
|
alternativeId
|
|
5539
5908
|
);
|
|
5540
5909
|
};
|
|
5541
5910
|
if (isReadonly) {
|
|
5542
|
-
return /* @__PURE__ */
|
|
5911
|
+
return /* @__PURE__ */ jsx30(
|
|
5543
5912
|
"div",
|
|
5544
5913
|
{
|
|
5545
5914
|
className: cn("flex flex-col", getLayoutClasses(), "w-full", className),
|
|
@@ -5549,7 +5918,7 @@ var AlternativesList = ({
|
|
|
5549
5918
|
}
|
|
5550
5919
|
);
|
|
5551
5920
|
}
|
|
5552
|
-
return /* @__PURE__ */
|
|
5921
|
+
return /* @__PURE__ */ jsx30(
|
|
5553
5922
|
RadioGroup,
|
|
5554
5923
|
{
|
|
5555
5924
|
name: groupName,
|
|
@@ -5566,7 +5935,7 @@ var AlternativesList = ({
|
|
|
5566
5935
|
const statusStyles = getStatusStyles2(alternative.status, false);
|
|
5567
5936
|
const statusBadge = getStatusBadge2(alternative.status);
|
|
5568
5937
|
if (layout === "detailed") {
|
|
5569
|
-
return /* @__PURE__ */
|
|
5938
|
+
return /* @__PURE__ */ jsx30(
|
|
5570
5939
|
"div",
|
|
5571
5940
|
{
|
|
5572
5941
|
className: cn(
|
|
@@ -5576,7 +5945,7 @@ var AlternativesList = ({
|
|
|
5576
5945
|
),
|
|
5577
5946
|
children: /* @__PURE__ */ jsxs23("div", { className: "flex items-start justify-between gap-3", children: [
|
|
5578
5947
|
/* @__PURE__ */ jsxs23("div", { className: "flex items-start gap-3 flex-1", children: [
|
|
5579
|
-
/* @__PURE__ */
|
|
5948
|
+
/* @__PURE__ */ jsx30(
|
|
5580
5949
|
RadioGroupItem,
|
|
5581
5950
|
{
|
|
5582
5951
|
value: alternative.value,
|
|
@@ -5586,7 +5955,7 @@ var AlternativesList = ({
|
|
|
5586
5955
|
}
|
|
5587
5956
|
),
|
|
5588
5957
|
/* @__PURE__ */ jsxs23("div", { className: "flex-1", children: [
|
|
5589
|
-
/* @__PURE__ */
|
|
5958
|
+
/* @__PURE__ */ jsx30(
|
|
5590
5959
|
"label",
|
|
5591
5960
|
{
|
|
5592
5961
|
htmlFor: alternativeId,
|
|
@@ -5598,10 +5967,10 @@ var AlternativesList = ({
|
|
|
5598
5967
|
children: alternative.label
|
|
5599
5968
|
}
|
|
5600
5969
|
),
|
|
5601
|
-
alternative.description && /* @__PURE__ */
|
|
5970
|
+
alternative.description && /* @__PURE__ */ jsx30("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
|
|
5602
5971
|
] })
|
|
5603
5972
|
] }),
|
|
5604
|
-
statusBadge && /* @__PURE__ */
|
|
5973
|
+
statusBadge && /* @__PURE__ */ jsx30("div", { className: "flex-shrink-0", children: statusBadge })
|
|
5605
5974
|
] })
|
|
5606
5975
|
},
|
|
5607
5976
|
alternativeId
|
|
@@ -5617,7 +5986,7 @@ var AlternativesList = ({
|
|
|
5617
5986
|
),
|
|
5618
5987
|
children: [
|
|
5619
5988
|
/* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
5620
|
-
/* @__PURE__ */
|
|
5989
|
+
/* @__PURE__ */ jsx30(
|
|
5621
5990
|
RadioGroupItem,
|
|
5622
5991
|
{
|
|
5623
5992
|
value: alternative.value,
|
|
@@ -5625,7 +5994,7 @@ var AlternativesList = ({
|
|
|
5625
5994
|
disabled: alternative.disabled
|
|
5626
5995
|
}
|
|
5627
5996
|
),
|
|
5628
|
-
/* @__PURE__ */
|
|
5997
|
+
/* @__PURE__ */ jsx30(
|
|
5629
5998
|
"label",
|
|
5630
5999
|
{
|
|
5631
6000
|
htmlFor: alternativeId,
|
|
@@ -5638,7 +6007,7 @@ var AlternativesList = ({
|
|
|
5638
6007
|
}
|
|
5639
6008
|
)
|
|
5640
6009
|
] }),
|
|
5641
|
-
statusBadge && /* @__PURE__ */
|
|
6010
|
+
statusBadge && /* @__PURE__ */ jsx30("div", { className: "flex-shrink-0", children: statusBadge })
|
|
5642
6011
|
]
|
|
5643
6012
|
},
|
|
5644
6013
|
alternativeId
|
|
@@ -5660,10 +6029,10 @@ var HeaderAlternative = forwardRef14(
|
|
|
5660
6029
|
...props,
|
|
5661
6030
|
children: [
|
|
5662
6031
|
/* @__PURE__ */ jsxs23("span", { className: "flex flex-col", children: [
|
|
5663
|
-
/* @__PURE__ */
|
|
5664
|
-
/* @__PURE__ */
|
|
6032
|
+
/* @__PURE__ */ jsx30("p", { className: "text-text-950 font-bold text-lg", children: title }),
|
|
6033
|
+
/* @__PURE__ */ jsx30("p", { className: "text-text-700 text-sm ", children: subTitle })
|
|
5665
6034
|
] }),
|
|
5666
|
-
/* @__PURE__ */
|
|
6035
|
+
/* @__PURE__ */ jsx30("p", { className: "text-text-950 text-md", children: content })
|
|
5667
6036
|
]
|
|
5668
6037
|
}
|
|
5669
6038
|
);
|
|
@@ -5673,9 +6042,9 @@ var HeaderAlternative = forwardRef14(
|
|
|
5673
6042
|
// src/components/AlertDialog/AlertDialog.tsx
|
|
5674
6043
|
import {
|
|
5675
6044
|
forwardRef as forwardRef15,
|
|
5676
|
-
useEffect as
|
|
6045
|
+
useEffect as useEffect9
|
|
5677
6046
|
} from "react";
|
|
5678
|
-
import { Fragment as
|
|
6047
|
+
import { Fragment as Fragment6, jsx as jsx31, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
5679
6048
|
var SIZE_CLASSES11 = {
|
|
5680
6049
|
"extra-small": "w-screen max-w-[324px]",
|
|
5681
6050
|
small: "w-screen max-w-[378px]",
|
|
@@ -5701,7 +6070,7 @@ var AlertDialog = forwardRef15(
|
|
|
5701
6070
|
size = "medium",
|
|
5702
6071
|
...props
|
|
5703
6072
|
}, ref) => {
|
|
5704
|
-
|
|
6073
|
+
useEffect9(() => {
|
|
5705
6074
|
if (!isOpen || !closeOnEscape) return;
|
|
5706
6075
|
const handleEscape = (event) => {
|
|
5707
6076
|
if (event.key === "Escape") {
|
|
@@ -5711,7 +6080,7 @@ var AlertDialog = forwardRef15(
|
|
|
5711
6080
|
document.addEventListener("keydown", handleEscape);
|
|
5712
6081
|
return () => document.removeEventListener("keydown", handleEscape);
|
|
5713
6082
|
}, [isOpen, closeOnEscape]);
|
|
5714
|
-
|
|
6083
|
+
useEffect9(() => {
|
|
5715
6084
|
if (isOpen) {
|
|
5716
6085
|
document.body.style.overflow = "hidden";
|
|
5717
6086
|
} else {
|
|
@@ -5740,7 +6109,7 @@ var AlertDialog = forwardRef15(
|
|
|
5740
6109
|
onCancel?.(cancelValue);
|
|
5741
6110
|
};
|
|
5742
6111
|
const sizeClasses = SIZE_CLASSES11[size];
|
|
5743
|
-
return /* @__PURE__ */
|
|
6112
|
+
return /* @__PURE__ */ jsx31(Fragment6, { children: isOpen && /* @__PURE__ */ jsx31(
|
|
5744
6113
|
"div",
|
|
5745
6114
|
{
|
|
5746
6115
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",
|
|
@@ -5758,7 +6127,7 @@ var AlertDialog = forwardRef15(
|
|
|
5758
6127
|
),
|
|
5759
6128
|
...props,
|
|
5760
6129
|
children: [
|
|
5761
|
-
/* @__PURE__ */
|
|
6130
|
+
/* @__PURE__ */ jsx31(
|
|
5762
6131
|
"h2",
|
|
5763
6132
|
{
|
|
5764
6133
|
id: "alert-dialog-title",
|
|
@@ -5766,7 +6135,7 @@ var AlertDialog = forwardRef15(
|
|
|
5766
6135
|
children: title
|
|
5767
6136
|
}
|
|
5768
6137
|
),
|
|
5769
|
-
/* @__PURE__ */
|
|
6138
|
+
/* @__PURE__ */ jsx31(
|
|
5770
6139
|
"p",
|
|
5771
6140
|
{
|
|
5772
6141
|
id: "alert-dialog-description",
|
|
@@ -5775,8 +6144,8 @@ var AlertDialog = forwardRef15(
|
|
|
5775
6144
|
}
|
|
5776
6145
|
),
|
|
5777
6146
|
/* @__PURE__ */ jsxs24("div", { className: "flex flex-row items-center justify-end pt-4 gap-3", children: [
|
|
5778
|
-
/* @__PURE__ */
|
|
5779
|
-
/* @__PURE__ */
|
|
6147
|
+
/* @__PURE__ */ jsx31(Button_default, { variant: "outline", size: "small", onClick: handleCancel, children: cancelButtonLabel }),
|
|
6148
|
+
/* @__PURE__ */ jsx31(
|
|
5780
6149
|
Button_default,
|
|
5781
6150
|
{
|
|
5782
6151
|
variant: "solid",
|
|
@@ -5797,9 +6166,9 @@ var AlertDialog = forwardRef15(
|
|
|
5797
6166
|
AlertDialog.displayName = "AlertDialog";
|
|
5798
6167
|
|
|
5799
6168
|
// src/components/MultipleChoice/MultipleChoice.tsx
|
|
5800
|
-
import { useEffect as
|
|
6169
|
+
import { useEffect as useEffect10, useState as useState13 } from "react";
|
|
5801
6170
|
import { CheckCircle as CheckCircle5, XCircle as XCircle4, Check as Check4 } from "phosphor-react";
|
|
5802
|
-
import { jsx as
|
|
6171
|
+
import { jsx as jsx32, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
5803
6172
|
var MultipleChoiceList = ({
|
|
5804
6173
|
disabled = false,
|
|
5805
6174
|
className = "",
|
|
@@ -5809,16 +6178,16 @@ var MultipleChoiceList = ({
|
|
|
5809
6178
|
onHandleSelectedValues,
|
|
5810
6179
|
mode = "interactive"
|
|
5811
6180
|
}) => {
|
|
5812
|
-
const [actualValue, setActualValue] =
|
|
5813
|
-
|
|
6181
|
+
const [actualValue, setActualValue] = useState13(selectedValues);
|
|
6182
|
+
useEffect10(() => {
|
|
5814
6183
|
setActualValue(selectedValues);
|
|
5815
6184
|
}, [selectedValues]);
|
|
5816
6185
|
const getStatusBadge2 = (status) => {
|
|
5817
6186
|
switch (status) {
|
|
5818
6187
|
case "correct":
|
|
5819
|
-
return /* @__PURE__ */
|
|
6188
|
+
return /* @__PURE__ */ jsx32(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx32(CheckCircle5, {}), children: "Resposta correta" });
|
|
5820
6189
|
case "incorrect":
|
|
5821
|
-
return /* @__PURE__ */
|
|
6190
|
+
return /* @__PURE__ */ jsx32(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ jsx32(XCircle4, {}), children: "Resposta incorreta" });
|
|
5822
6191
|
default:
|
|
5823
6192
|
return null;
|
|
5824
6193
|
}
|
|
@@ -5839,10 +6208,10 @@ var MultipleChoiceList = ({
|
|
|
5839
6208
|
isSelected ? "border-primary-950 bg-primary-950 text-text" : "border-border-400 bg-background",
|
|
5840
6209
|
isDisabled && "opacity-40 cursor-not-allowed"
|
|
5841
6210
|
);
|
|
5842
|
-
return /* @__PURE__ */
|
|
6211
|
+
return /* @__PURE__ */ jsx32("div", { className: checkboxClasses, children: isSelected && /* @__PURE__ */ jsx32(Check4, { size: 16, weight: "bold" }) });
|
|
5843
6212
|
};
|
|
5844
6213
|
if (mode === "readonly") {
|
|
5845
|
-
return /* @__PURE__ */
|
|
6214
|
+
return /* @__PURE__ */ jsx32("div", { className: cn("flex flex-col gap-2", className), children: choices.map((choice, i) => {
|
|
5846
6215
|
const isSelected = actualValue?.includes(choice.value) || false;
|
|
5847
6216
|
const statusStyles = getStatusStyles2(choice.status);
|
|
5848
6217
|
const statusBadge = getStatusBadge2(choice.status);
|
|
@@ -5857,7 +6226,7 @@ var MultipleChoiceList = ({
|
|
|
5857
6226
|
children: [
|
|
5858
6227
|
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
5859
6228
|
renderVisualCheckbox(isSelected, choice.disabled || disabled),
|
|
5860
|
-
/* @__PURE__ */
|
|
6229
|
+
/* @__PURE__ */ jsx32(
|
|
5861
6230
|
"span",
|
|
5862
6231
|
{
|
|
5863
6232
|
className: cn(
|
|
@@ -5869,14 +6238,14 @@ var MultipleChoiceList = ({
|
|
|
5869
6238
|
}
|
|
5870
6239
|
)
|
|
5871
6240
|
] }),
|
|
5872
|
-
statusBadge && /* @__PURE__ */
|
|
6241
|
+
statusBadge && /* @__PURE__ */ jsx32("div", { className: "flex-shrink-0", children: statusBadge })
|
|
5873
6242
|
]
|
|
5874
6243
|
},
|
|
5875
6244
|
`readonly-${choice.value}-${i}`
|
|
5876
6245
|
);
|
|
5877
6246
|
}) });
|
|
5878
6247
|
}
|
|
5879
|
-
return /* @__PURE__ */
|
|
6248
|
+
return /* @__PURE__ */ jsx32(
|
|
5880
6249
|
"div",
|
|
5881
6250
|
{
|
|
5882
6251
|
className: cn(
|
|
@@ -5884,7 +6253,7 @@ var MultipleChoiceList = ({
|
|
|
5884
6253
|
disabled ? "opacity-50 cursor-not-allowed" : "",
|
|
5885
6254
|
className
|
|
5886
6255
|
),
|
|
5887
|
-
children: /* @__PURE__ */
|
|
6256
|
+
children: /* @__PURE__ */ jsx32(
|
|
5888
6257
|
CheckboxList_default,
|
|
5889
6258
|
{
|
|
5890
6259
|
name,
|
|
@@ -5899,7 +6268,7 @@ var MultipleChoiceList = ({
|
|
|
5899
6268
|
{
|
|
5900
6269
|
className: "flex flex-row gap-2 items-center",
|
|
5901
6270
|
children: [
|
|
5902
|
-
/* @__PURE__ */
|
|
6271
|
+
/* @__PURE__ */ jsx32(
|
|
5903
6272
|
CheckboxListItem,
|
|
5904
6273
|
{
|
|
5905
6274
|
value: choice.value,
|
|
@@ -5907,7 +6276,7 @@ var MultipleChoiceList = ({
|
|
|
5907
6276
|
disabled: choice.disabled || disabled
|
|
5908
6277
|
}
|
|
5909
6278
|
),
|
|
5910
|
-
/* @__PURE__ */
|
|
6279
|
+
/* @__PURE__ */ jsx32(
|
|
5911
6280
|
"label",
|
|
5912
6281
|
{
|
|
5913
6282
|
htmlFor: `interactive-${choice.value}-${i}`,
|
|
@@ -5930,7 +6299,7 @@ var MultipleChoiceList = ({
|
|
|
5930
6299
|
};
|
|
5931
6300
|
|
|
5932
6301
|
// src/hooks/useMobile.ts
|
|
5933
|
-
import { useState as
|
|
6302
|
+
import { useState as useState14, useEffect as useEffect11 } from "react";
|
|
5934
6303
|
var MOBILE_WIDTH = 500;
|
|
5935
6304
|
var TABLET_WIDTH = 931;
|
|
5936
6305
|
var DEFAULT_WIDTH = 1200;
|
|
@@ -5945,9 +6314,9 @@ var getDeviceType = () => {
|
|
|
5945
6314
|
return width < TABLET_WIDTH ? "responsive" : "desktop";
|
|
5946
6315
|
};
|
|
5947
6316
|
var useMobile = () => {
|
|
5948
|
-
const [isMobile, setIsMobile] =
|
|
5949
|
-
const [isTablet, setIsTablet] =
|
|
5950
|
-
|
|
6317
|
+
const [isMobile, setIsMobile] = useState14(false);
|
|
6318
|
+
const [isTablet, setIsTablet] = useState14(false);
|
|
6319
|
+
useEffect11(() => {
|
|
5951
6320
|
const checkScreenSize = () => {
|
|
5952
6321
|
const width = getWindowWidth();
|
|
5953
6322
|
setIsMobile(width < MOBILE_WIDTH);
|
|
@@ -5986,218 +6355,19 @@ var useMobile = () => {
|
|
|
5986
6355
|
};
|
|
5987
6356
|
};
|
|
5988
6357
|
|
|
5989
|
-
// src/hooks/useTheme.ts
|
|
5990
|
-
import { useEffect as useEffect10, useState as useState13, useCallback, useRef as useRef7 } from "react";
|
|
5991
|
-
var useTheme = () => {
|
|
5992
|
-
const [themeMode, setThemeMode] = useState13("system");
|
|
5993
|
-
const [isDark, setIsDark] = useState13(false);
|
|
5994
|
-
const themeModeRef = useRef7("system");
|
|
5995
|
-
const applyTheme = useCallback((mode) => {
|
|
5996
|
-
const htmlElement = document.documentElement;
|
|
5997
|
-
const originalTheme = htmlElement.getAttribute("data-original-theme");
|
|
5998
|
-
if (mode === "dark") {
|
|
5999
|
-
htmlElement.setAttribute("data-theme", "dark");
|
|
6000
|
-
setIsDark(true);
|
|
6001
|
-
} else if (mode === "light") {
|
|
6002
|
-
if (originalTheme) {
|
|
6003
|
-
htmlElement.setAttribute("data-theme", originalTheme);
|
|
6004
|
-
}
|
|
6005
|
-
setIsDark(false);
|
|
6006
|
-
} else if (mode === "system") {
|
|
6007
|
-
const isSystemDark = window.matchMedia(
|
|
6008
|
-
"(prefers-color-scheme: dark)"
|
|
6009
|
-
).matches;
|
|
6010
|
-
if (isSystemDark) {
|
|
6011
|
-
htmlElement.setAttribute("data-theme", "dark");
|
|
6012
|
-
setIsDark(true);
|
|
6013
|
-
} else if (originalTheme) {
|
|
6014
|
-
htmlElement.setAttribute("data-theme", originalTheme);
|
|
6015
|
-
setIsDark(false);
|
|
6016
|
-
}
|
|
6017
|
-
}
|
|
6018
|
-
}, []);
|
|
6019
|
-
const toggleTheme = useCallback(() => {
|
|
6020
|
-
let newMode;
|
|
6021
|
-
if (themeMode === "light") {
|
|
6022
|
-
newMode = "dark";
|
|
6023
|
-
} else if (themeMode === "dark") {
|
|
6024
|
-
newMode = "light";
|
|
6025
|
-
} else {
|
|
6026
|
-
newMode = "dark";
|
|
6027
|
-
}
|
|
6028
|
-
setThemeMode(newMode);
|
|
6029
|
-
themeModeRef.current = newMode;
|
|
6030
|
-
applyTheme(newMode);
|
|
6031
|
-
localStorage.setItem("theme-mode", newMode);
|
|
6032
|
-
}, [themeMode, applyTheme]);
|
|
6033
|
-
const setTheme = useCallback(
|
|
6034
|
-
(mode) => {
|
|
6035
|
-
setThemeMode(mode);
|
|
6036
|
-
themeModeRef.current = mode;
|
|
6037
|
-
applyTheme(mode);
|
|
6038
|
-
localStorage.setItem("theme-mode", mode);
|
|
6039
|
-
},
|
|
6040
|
-
[applyTheme]
|
|
6041
|
-
);
|
|
6042
|
-
useEffect10(() => {
|
|
6043
|
-
const htmlElement = document.documentElement;
|
|
6044
|
-
const currentTheme = htmlElement.getAttribute("data-theme");
|
|
6045
|
-
if (currentTheme && !htmlElement.getAttribute("data-original-theme")) {
|
|
6046
|
-
htmlElement.setAttribute("data-original-theme", currentTheme);
|
|
6047
|
-
}
|
|
6048
|
-
const savedThemeMode = localStorage.getItem("theme-mode");
|
|
6049
|
-
const initialMode = savedThemeMode || "system";
|
|
6050
|
-
if (!savedThemeMode) {
|
|
6051
|
-
localStorage.setItem("theme-mode", "system");
|
|
6052
|
-
}
|
|
6053
|
-
setThemeMode(initialMode);
|
|
6054
|
-
themeModeRef.current = initialMode;
|
|
6055
|
-
applyTheme(initialMode);
|
|
6056
|
-
const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
|
6057
|
-
const handleSystemThemeChange = () => {
|
|
6058
|
-
if (themeModeRef.current === "system") {
|
|
6059
|
-
applyTheme("system");
|
|
6060
|
-
}
|
|
6061
|
-
};
|
|
6062
|
-
mediaQuery.addEventListener("change", handleSystemThemeChange);
|
|
6063
|
-
return () => {
|
|
6064
|
-
mediaQuery.removeEventListener("change", handleSystemThemeChange);
|
|
6065
|
-
};
|
|
6066
|
-
}, [applyTheme]);
|
|
6067
|
-
return {
|
|
6068
|
-
themeMode,
|
|
6069
|
-
isDark,
|
|
6070
|
-
toggleTheme,
|
|
6071
|
-
setTheme
|
|
6072
|
-
};
|
|
6073
|
-
};
|
|
6074
|
-
|
|
6075
|
-
// src/components/ThemeToggle/ThemeToggle.tsx
|
|
6076
|
-
import { forwardRef as forwardRef16 } from "react";
|
|
6077
|
-
import { Fragment as Fragment6, jsx as jsx32, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
6078
|
-
var ThemeToggle = forwardRef16(
|
|
6079
|
-
({
|
|
6080
|
-
variant = "simple",
|
|
6081
|
-
size = "md",
|
|
6082
|
-
showIcons = true,
|
|
6083
|
-
showLabels = true,
|
|
6084
|
-
className,
|
|
6085
|
-
children,
|
|
6086
|
-
...props
|
|
6087
|
-
}, ref) => {
|
|
6088
|
-
const { themeMode, isDark, toggleTheme, setTheme } = useTheme();
|
|
6089
|
-
const sizeClasses = {
|
|
6090
|
-
sm: "text-sm px-3 py-1.5",
|
|
6091
|
-
md: "text-md px-4 py-2",
|
|
6092
|
-
lg: "text-lg px-5 py-2.5"
|
|
6093
|
-
};
|
|
6094
|
-
const activeClasses = "bg-primary-500 text-white";
|
|
6095
|
-
const inactiveClasses = "bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-600";
|
|
6096
|
-
const baseButtonClasses = "inline-flex items-center justify-center gap-2 rounded-md border border-gray-300 dark:border-gray-600 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500";
|
|
6097
|
-
const smallButtonClasses = "px-3 py-1.5 rounded-md text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500";
|
|
6098
|
-
const renderThemeButton = (theme, icon, label, isActive, buttonSize) => {
|
|
6099
|
-
const buttonClasses = buttonSize ? cn(baseButtonClasses, sizeClasses[buttonSize]) : smallButtonClasses;
|
|
6100
|
-
const stateClasses = isActive ? activeClasses : inactiveClasses;
|
|
6101
|
-
return /* @__PURE__ */ jsxs26(
|
|
6102
|
-
"button",
|
|
6103
|
-
{
|
|
6104
|
-
type: "button",
|
|
6105
|
-
onClick: () => setTheme(theme),
|
|
6106
|
-
className: cn(buttonClasses, stateClasses),
|
|
6107
|
-
...buttonSize ? props : {},
|
|
6108
|
-
children: [
|
|
6109
|
-
showIcons && icon,
|
|
6110
|
-
showLabels && label
|
|
6111
|
-
]
|
|
6112
|
-
}
|
|
6113
|
-
);
|
|
6114
|
-
};
|
|
6115
|
-
if (variant === "simple") {
|
|
6116
|
-
return /* @__PURE__ */ jsx32(
|
|
6117
|
-
"button",
|
|
6118
|
-
{
|
|
6119
|
-
type: "button",
|
|
6120
|
-
ref,
|
|
6121
|
-
onClick: toggleTheme,
|
|
6122
|
-
className: cn(
|
|
6123
|
-
"inline-flex items-center justify-center gap-2 rounded-md border border-gray-300 dark:border-gray-600 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
|
|
6124
|
-
sizeClasses[size],
|
|
6125
|
-
className
|
|
6126
|
-
),
|
|
6127
|
-
...props,
|
|
6128
|
-
children: children || /* @__PURE__ */ jsxs26(Fragment6, { children: [
|
|
6129
|
-
showIcons && (isDark ? "\u2600\uFE0F" : "\u{1F319}"),
|
|
6130
|
-
showLabels && (isDark ? "Claro" : "Escuro")
|
|
6131
|
-
] })
|
|
6132
|
-
}
|
|
6133
|
-
);
|
|
6134
|
-
}
|
|
6135
|
-
if (variant === "detailed") {
|
|
6136
|
-
const getLabel = () => {
|
|
6137
|
-
if (themeMode === "system") return "Sistema";
|
|
6138
|
-
if (isDark) return "Escuro";
|
|
6139
|
-
return "Claro";
|
|
6140
|
-
};
|
|
6141
|
-
return /* @__PURE__ */ jsxs26("div", { className: cn("flex flex-col gap-2", className), children: [
|
|
6142
|
-
/* @__PURE__ */ jsxs26("div", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: [
|
|
6143
|
-
"Tema: ",
|
|
6144
|
-
getLabel()
|
|
6145
|
-
] }),
|
|
6146
|
-
/* @__PURE__ */ jsxs26("div", { className: "flex gap-1", children: [
|
|
6147
|
-
renderThemeButton("light", "\u2600\uFE0F ", "Claro", themeMode === "light"),
|
|
6148
|
-
renderThemeButton("dark", "\u{1F319} ", "Escuro", themeMode === "dark"),
|
|
6149
|
-
renderThemeButton(
|
|
6150
|
-
"system",
|
|
6151
|
-
"\u2699\uFE0F ",
|
|
6152
|
-
"Sistema",
|
|
6153
|
-
themeMode === "system"
|
|
6154
|
-
)
|
|
6155
|
-
] })
|
|
6156
|
-
] });
|
|
6157
|
-
}
|
|
6158
|
-
if (variant === "buttons") {
|
|
6159
|
-
return /* @__PURE__ */ jsxs26("div", { className: cn("flex gap-2", className), children: [
|
|
6160
|
-
renderThemeButton(
|
|
6161
|
-
"light",
|
|
6162
|
-
"\u2600\uFE0F",
|
|
6163
|
-
"Claro",
|
|
6164
|
-
themeMode === "light",
|
|
6165
|
-
size
|
|
6166
|
-
),
|
|
6167
|
-
renderThemeButton(
|
|
6168
|
-
"dark",
|
|
6169
|
-
"\u{1F319}",
|
|
6170
|
-
"Escuro",
|
|
6171
|
-
themeMode === "dark",
|
|
6172
|
-
size
|
|
6173
|
-
),
|
|
6174
|
-
renderThemeButton(
|
|
6175
|
-
"system",
|
|
6176
|
-
"\u2699\uFE0F",
|
|
6177
|
-
"Sistema",
|
|
6178
|
-
themeMode === "system",
|
|
6179
|
-
size
|
|
6180
|
-
)
|
|
6181
|
-
] });
|
|
6182
|
-
}
|
|
6183
|
-
return null;
|
|
6184
|
-
}
|
|
6185
|
-
);
|
|
6186
|
-
ThemeToggle.displayName = "ThemeToggle";
|
|
6187
|
-
|
|
6188
6358
|
// src/components/Select/Select.tsx
|
|
6189
6359
|
import { create as create5, useStore as useStore4 } from "zustand";
|
|
6190
6360
|
import {
|
|
6191
|
-
useEffect as
|
|
6361
|
+
useEffect as useEffect12,
|
|
6192
6362
|
useRef as useRef8,
|
|
6193
|
-
forwardRef as
|
|
6363
|
+
forwardRef as forwardRef16,
|
|
6194
6364
|
isValidElement as isValidElement4,
|
|
6195
6365
|
Children as Children4,
|
|
6196
6366
|
cloneElement as cloneElement4,
|
|
6197
|
-
useId as
|
|
6367
|
+
useId as useId10
|
|
6198
6368
|
} from "react";
|
|
6199
6369
|
import { CaretDown, Check as Check5, WarningCircle as WarningCircle5 } from "phosphor-react";
|
|
6200
|
-
import { Fragment as Fragment7, jsx as jsx33, jsxs as
|
|
6370
|
+
import { Fragment as Fragment7, jsx as jsx33, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
6201
6371
|
var VARIANT_CLASSES4 = {
|
|
6202
6372
|
outlined: "border-2 rounded-lg focus:border-primary-950",
|
|
6203
6373
|
underlined: "border-b-2 focus:border-primary-950",
|
|
@@ -6300,7 +6470,7 @@ var Select = ({
|
|
|
6300
6470
|
const store = storeRef.current;
|
|
6301
6471
|
const selectRef = useRef8(null);
|
|
6302
6472
|
const { open, setOpen, setValue, selectedLabel } = useStore4(store, (s) => s);
|
|
6303
|
-
const generatedId =
|
|
6473
|
+
const generatedId = useId10();
|
|
6304
6474
|
const selectId = id ?? `select-${generatedId}`;
|
|
6305
6475
|
const findLabelForValue = (children2, targetValue) => {
|
|
6306
6476
|
let found = null;
|
|
@@ -6319,13 +6489,13 @@ var Select = ({
|
|
|
6319
6489
|
search(children2);
|
|
6320
6490
|
return found;
|
|
6321
6491
|
};
|
|
6322
|
-
|
|
6492
|
+
useEffect12(() => {
|
|
6323
6493
|
if (!selectedLabel && defaultValue) {
|
|
6324
6494
|
const label2 = findLabelForValue(children, defaultValue);
|
|
6325
6495
|
if (label2) store.setState({ selectedLabel: label2 });
|
|
6326
6496
|
}
|
|
6327
6497
|
}, [children, defaultValue, selectedLabel]);
|
|
6328
|
-
|
|
6498
|
+
useEffect12(() => {
|
|
6329
6499
|
const handleClickOutside = (event) => {
|
|
6330
6500
|
if (selectRef.current && !selectRef.current.contains(event.target)) {
|
|
6331
6501
|
setOpen(false);
|
|
@@ -6360,7 +6530,7 @@ var Select = ({
|
|
|
6360
6530
|
document.removeEventListener("keydown", handleArrowKeys);
|
|
6361
6531
|
};
|
|
6362
6532
|
}, [open]);
|
|
6363
|
-
|
|
6533
|
+
useEffect12(() => {
|
|
6364
6534
|
if (propValue) {
|
|
6365
6535
|
setValue(propValue);
|
|
6366
6536
|
const label2 = findLabelForValue(children, propValue);
|
|
@@ -6368,7 +6538,7 @@ var Select = ({
|
|
|
6368
6538
|
}
|
|
6369
6539
|
}, [propValue]);
|
|
6370
6540
|
const sizeClasses = SIZE_CLASSES12[size];
|
|
6371
|
-
return /* @__PURE__ */
|
|
6541
|
+
return /* @__PURE__ */ jsxs26("div", { className: cn("w-full", className), children: [
|
|
6372
6542
|
label && /* @__PURE__ */ jsx33(
|
|
6373
6543
|
"label",
|
|
6374
6544
|
{
|
|
@@ -6378,9 +6548,9 @@ var Select = ({
|
|
|
6378
6548
|
}
|
|
6379
6549
|
),
|
|
6380
6550
|
/* @__PURE__ */ jsx33("div", { className: cn("relative w-full"), ref: selectRef, children: injectStore4(children, store, size, selectId) }),
|
|
6381
|
-
(helperText || errorMessage) && /* @__PURE__ */
|
|
6551
|
+
(helperText || errorMessage) && /* @__PURE__ */ jsxs26("div", { className: "mt-1.5 gap-1.5", children: [
|
|
6382
6552
|
helperText && /* @__PURE__ */ jsx33("p", { className: "text-sm text-text-500", children: helperText }),
|
|
6383
|
-
errorMessage && /* @__PURE__ */
|
|
6553
|
+
errorMessage && /* @__PURE__ */ jsxs26("p", { className: "flex gap-1 items-center text-sm text-indicator-error", children: [
|
|
6384
6554
|
/* @__PURE__ */ jsx33(WarningCircle5, { size: 16 }),
|
|
6385
6555
|
" ",
|
|
6386
6556
|
errorMessage
|
|
@@ -6397,7 +6567,7 @@ var SelectValue = ({
|
|
|
6397
6567
|
const value = useStore4(store, (s) => s.value);
|
|
6398
6568
|
return /* @__PURE__ */ jsx33("span", { className: "text-inherit flex gap-2 items-center", children: selectedLabel || placeholder || value });
|
|
6399
6569
|
};
|
|
6400
|
-
var SelectTrigger =
|
|
6570
|
+
var SelectTrigger = forwardRef16(
|
|
6401
6571
|
({
|
|
6402
6572
|
className,
|
|
6403
6573
|
invalid = false,
|
|
@@ -6414,7 +6584,7 @@ var SelectTrigger = forwardRef17(
|
|
|
6414
6584
|
const variantClasses = VARIANT_CLASSES4[variant];
|
|
6415
6585
|
const heightClasses = HEIGHT_CLASSES[size];
|
|
6416
6586
|
const paddingClasses = PADDING_CLASSES[size];
|
|
6417
|
-
return /* @__PURE__ */
|
|
6587
|
+
return /* @__PURE__ */ jsxs26(
|
|
6418
6588
|
"button",
|
|
6419
6589
|
{
|
|
6420
6590
|
ref,
|
|
@@ -6451,7 +6621,7 @@ var SelectTrigger = forwardRef17(
|
|
|
6451
6621
|
}
|
|
6452
6622
|
);
|
|
6453
6623
|
SelectTrigger.displayName = "SelectTrigger";
|
|
6454
|
-
var SelectContent =
|
|
6624
|
+
var SelectContent = forwardRef16(
|
|
6455
6625
|
({
|
|
6456
6626
|
children,
|
|
6457
6627
|
className,
|
|
@@ -6481,7 +6651,7 @@ var SelectContent = forwardRef17(
|
|
|
6481
6651
|
}
|
|
6482
6652
|
);
|
|
6483
6653
|
SelectContent.displayName = "SelectContent";
|
|
6484
|
-
var SelectItem =
|
|
6654
|
+
var SelectItem = forwardRef16(
|
|
6485
6655
|
({
|
|
6486
6656
|
className,
|
|
6487
6657
|
children,
|
|
@@ -6508,7 +6678,7 @@ var SelectItem = forwardRef17(
|
|
|
6508
6678
|
}
|
|
6509
6679
|
props.onClick?.(e);
|
|
6510
6680
|
};
|
|
6511
|
-
return /* @__PURE__ */
|
|
6681
|
+
return /* @__PURE__ */ jsxs26(
|
|
6512
6682
|
"div",
|
|
6513
6683
|
{
|
|
6514
6684
|
role: "menuitem",
|
|
@@ -6541,16 +6711,16 @@ var Select_default = Select;
|
|
|
6541
6711
|
// src/components/Menu/Menu.tsx
|
|
6542
6712
|
import { create as create6, useStore as useStore5 } from "zustand";
|
|
6543
6713
|
import {
|
|
6544
|
-
useEffect as
|
|
6714
|
+
useEffect as useEffect13,
|
|
6545
6715
|
useRef as useRef9,
|
|
6546
|
-
forwardRef as
|
|
6716
|
+
forwardRef as forwardRef17,
|
|
6547
6717
|
isValidElement as isValidElement5,
|
|
6548
6718
|
Children as Children5,
|
|
6549
6719
|
cloneElement as cloneElement5,
|
|
6550
|
-
useState as
|
|
6720
|
+
useState as useState15
|
|
6551
6721
|
} from "react";
|
|
6552
|
-
import { CaretLeft as CaretLeft2, CaretRight as
|
|
6553
|
-
import { jsx as jsx34, jsxs as
|
|
6722
|
+
import { CaretLeft as CaretLeft2, CaretRight as CaretRight4 } from "phosphor-react";
|
|
6723
|
+
import { jsx as jsx34, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
6554
6724
|
var createMenuStore = (onValueChange) => create6((set) => ({
|
|
6555
6725
|
value: "",
|
|
6556
6726
|
setValue: (value) => {
|
|
@@ -6569,7 +6739,7 @@ var VARIANT_CLASSES5 = {
|
|
|
6569
6739
|
"menu-overflow": "",
|
|
6570
6740
|
breadcrumb: "bg-transparent shadow-none !px-0"
|
|
6571
6741
|
};
|
|
6572
|
-
var Menu =
|
|
6742
|
+
var Menu = forwardRef17(
|
|
6573
6743
|
({
|
|
6574
6744
|
className,
|
|
6575
6745
|
children,
|
|
@@ -6583,7 +6753,7 @@ var Menu = forwardRef18(
|
|
|
6583
6753
|
storeRef.current ??= createMenuStore(onValueChange);
|
|
6584
6754
|
const store = storeRef.current;
|
|
6585
6755
|
const { setValue } = useStore5(store, (s) => s);
|
|
6586
|
-
|
|
6756
|
+
useEffect13(() => {
|
|
6587
6757
|
setValue(propValue ?? defaultValue);
|
|
6588
6758
|
}, [defaultValue, propValue, setValue]);
|
|
6589
6759
|
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";
|
|
@@ -6604,7 +6774,7 @@ var Menu = forwardRef18(
|
|
|
6604
6774
|
}
|
|
6605
6775
|
);
|
|
6606
6776
|
Menu.displayName = "Menu";
|
|
6607
|
-
var MenuContent =
|
|
6777
|
+
var MenuContent = forwardRef17(
|
|
6608
6778
|
({ className, children, variant = "menu", ...props }, ref) => {
|
|
6609
6779
|
const baseClasses = "w-full flex flex-row items-center gap-2";
|
|
6610
6780
|
const variantClasses = variant === "menu2" || variant === "menu-overflow" ? "overflow-x-auto scroll-smooth" : "";
|
|
@@ -6626,7 +6796,7 @@ var MenuContent = forwardRef18(
|
|
|
6626
6796
|
}
|
|
6627
6797
|
);
|
|
6628
6798
|
MenuContent.displayName = "MenuContent";
|
|
6629
|
-
var MenuItem =
|
|
6799
|
+
var MenuItem = forwardRef17(
|
|
6630
6800
|
({
|
|
6631
6801
|
className,
|
|
6632
6802
|
children,
|
|
@@ -6675,7 +6845,7 @@ var MenuItem = forwardRef18(
|
|
|
6675
6845
|
children
|
|
6676
6846
|
}
|
|
6677
6847
|
),
|
|
6678
|
-
menu2: /* @__PURE__ */
|
|
6848
|
+
menu2: /* @__PURE__ */ jsxs27(
|
|
6679
6849
|
"li",
|
|
6680
6850
|
{
|
|
6681
6851
|
"data-variant": "menu2",
|
|
@@ -6700,7 +6870,7 @@ var MenuItem = forwardRef18(
|
|
|
6700
6870
|
]
|
|
6701
6871
|
}
|
|
6702
6872
|
),
|
|
6703
|
-
"menu-overflow": /* @__PURE__ */
|
|
6873
|
+
"menu-overflow": /* @__PURE__ */ jsxs27(
|
|
6704
6874
|
"li",
|
|
6705
6875
|
{
|
|
6706
6876
|
"data-variant": "menu-overflow",
|
|
@@ -6725,7 +6895,7 @@ var MenuItem = forwardRef18(
|
|
|
6725
6895
|
]
|
|
6726
6896
|
}
|
|
6727
6897
|
),
|
|
6728
|
-
breadcrumb: /* @__PURE__ */
|
|
6898
|
+
breadcrumb: /* @__PURE__ */ jsxs27(
|
|
6729
6899
|
"li",
|
|
6730
6900
|
{
|
|
6731
6901
|
"data-variant": "breadcrumb",
|
|
@@ -6748,7 +6918,7 @@ var MenuItem = forwardRef18(
|
|
|
6748
6918
|
}
|
|
6749
6919
|
),
|
|
6750
6920
|
separator && /* @__PURE__ */ jsx34(
|
|
6751
|
-
|
|
6921
|
+
CaretRight4,
|
|
6752
6922
|
{
|
|
6753
6923
|
size: 16,
|
|
6754
6924
|
className: "text-text-600",
|
|
@@ -6785,9 +6955,9 @@ var MenuOverflow = ({
|
|
|
6785
6955
|
...props
|
|
6786
6956
|
}) => {
|
|
6787
6957
|
const containerRef = useRef9(null);
|
|
6788
|
-
const [showLeftArrow, setShowLeftArrow] =
|
|
6789
|
-
const [showRightArrow, setShowRightArrow] =
|
|
6790
|
-
|
|
6958
|
+
const [showLeftArrow, setShowLeftArrow] = useState15(false);
|
|
6959
|
+
const [showRightArrow, setShowRightArrow] = useState15(false);
|
|
6960
|
+
useEffect13(() => {
|
|
6791
6961
|
const checkScroll = () => internalCheckScroll(
|
|
6792
6962
|
containerRef.current,
|
|
6793
6963
|
setShowLeftArrow,
|
|
@@ -6802,13 +6972,13 @@ var MenuOverflow = ({
|
|
|
6802
6972
|
window.removeEventListener("resize", checkScroll);
|
|
6803
6973
|
};
|
|
6804
6974
|
}, []);
|
|
6805
|
-
return /* @__PURE__ */
|
|
6975
|
+
return /* @__PURE__ */ jsxs27(
|
|
6806
6976
|
"div",
|
|
6807
6977
|
{
|
|
6808
6978
|
"data-testid": "menu-overflow-wrapper",
|
|
6809
6979
|
className: cn("relative w-full overflow-hidden", className),
|
|
6810
6980
|
children: [
|
|
6811
|
-
showLeftArrow && /* @__PURE__ */
|
|
6981
|
+
showLeftArrow && /* @__PURE__ */ jsxs27(
|
|
6812
6982
|
"button",
|
|
6813
6983
|
{
|
|
6814
6984
|
onClick: () => internalScroll(containerRef.current, "left"),
|
|
@@ -6831,14 +7001,14 @@ var MenuOverflow = ({
|
|
|
6831
7001
|
children: /* @__PURE__ */ jsx34(MenuContent, { ref: containerRef, variant: "menu2", children })
|
|
6832
7002
|
}
|
|
6833
7003
|
),
|
|
6834
|
-
showRightArrow && /* @__PURE__ */
|
|
7004
|
+
showRightArrow && /* @__PURE__ */ jsxs27(
|
|
6835
7005
|
"button",
|
|
6836
7006
|
{
|
|
6837
7007
|
onClick: () => internalScroll(containerRef.current, "right"),
|
|
6838
7008
|
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",
|
|
6839
7009
|
"data-testid": "scroll-right-button",
|
|
6840
7010
|
children: [
|
|
6841
|
-
/* @__PURE__ */ jsx34(
|
|
7011
|
+
/* @__PURE__ */ jsx34(CaretRight4, { size: 16 }),
|
|
6842
7012
|
/* @__PURE__ */ jsx34("span", { className: "sr-only", children: "Scroll right" })
|
|
6843
7013
|
]
|
|
6844
7014
|
}
|
|
@@ -6859,8 +7029,8 @@ var injectStore5 = (children, store) => Children5.map(children, (child) => {
|
|
|
6859
7029
|
var Menu_default = Menu;
|
|
6860
7030
|
|
|
6861
7031
|
// src/components/Skeleton/Skeleton.tsx
|
|
6862
|
-
import { forwardRef as
|
|
6863
|
-
import { jsx as jsx35, jsxs as
|
|
7032
|
+
import { forwardRef as forwardRef18 } from "react";
|
|
7033
|
+
import { jsx as jsx35, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6864
7034
|
var SKELETON_ANIMATION_CLASSES = {
|
|
6865
7035
|
pulse: "animate-pulse",
|
|
6866
7036
|
none: ""
|
|
@@ -6877,7 +7047,7 @@ var SPACING_CLASSES = {
|
|
|
6877
7047
|
medium: "space-y-2",
|
|
6878
7048
|
large: "space-y-3"
|
|
6879
7049
|
};
|
|
6880
|
-
var Skeleton =
|
|
7050
|
+
var Skeleton = forwardRef18(
|
|
6881
7051
|
({
|
|
6882
7052
|
variant = "text",
|
|
6883
7053
|
width,
|
|
@@ -6926,13 +7096,13 @@ var Skeleton = forwardRef19(
|
|
|
6926
7096
|
);
|
|
6927
7097
|
}
|
|
6928
7098
|
);
|
|
6929
|
-
var SkeletonText =
|
|
7099
|
+
var SkeletonText = forwardRef18(
|
|
6930
7100
|
(props, ref) => /* @__PURE__ */ jsx35(Skeleton, { ref, variant: "text", ...props })
|
|
6931
7101
|
);
|
|
6932
|
-
var SkeletonCircle =
|
|
6933
|
-
var SkeletonRectangle =
|
|
6934
|
-
var SkeletonRounded =
|
|
6935
|
-
var SkeletonCard =
|
|
7102
|
+
var SkeletonCircle = forwardRef18((props, ref) => /* @__PURE__ */ jsx35(Skeleton, { ref, variant: "circular", ...props }));
|
|
7103
|
+
var SkeletonRectangle = forwardRef18((props, ref) => /* @__PURE__ */ jsx35(Skeleton, { ref, variant: "rectangular", ...props }));
|
|
7104
|
+
var SkeletonRounded = forwardRef18((props, ref) => /* @__PURE__ */ jsx35(Skeleton, { ref, variant: "rounded", ...props }));
|
|
7105
|
+
var SkeletonCard = forwardRef18(
|
|
6936
7106
|
({
|
|
6937
7107
|
showAvatar = true,
|
|
6938
7108
|
showTitle = true,
|
|
@@ -6942,7 +7112,7 @@ var SkeletonCard = forwardRef19(
|
|
|
6942
7112
|
className = "",
|
|
6943
7113
|
...props
|
|
6944
7114
|
}, ref) => {
|
|
6945
|
-
return /* @__PURE__ */
|
|
7115
|
+
return /* @__PURE__ */ jsxs28(
|
|
6946
7116
|
"div",
|
|
6947
7117
|
{
|
|
6948
7118
|
ref,
|
|
@@ -6952,14 +7122,14 @@ var SkeletonCard = forwardRef19(
|
|
|
6952
7122
|
),
|
|
6953
7123
|
...props,
|
|
6954
7124
|
children: [
|
|
6955
|
-
/* @__PURE__ */
|
|
7125
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-start space-x-3", children: [
|
|
6956
7126
|
showAvatar && /* @__PURE__ */ jsx35(SkeletonCircle, { width: 40, height: 40 }),
|
|
6957
|
-
/* @__PURE__ */
|
|
7127
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex-1 space-y-2", children: [
|
|
6958
7128
|
showTitle && /* @__PURE__ */ jsx35(SkeletonText, { width: "60%", height: 20 }),
|
|
6959
7129
|
showDescription && /* @__PURE__ */ jsx35(SkeletonText, { lines, spacing: "small" })
|
|
6960
7130
|
] })
|
|
6961
7131
|
] }),
|
|
6962
|
-
showActions && /* @__PURE__ */
|
|
7132
|
+
showActions && /* @__PURE__ */ jsxs28("div", { className: "flex justify-end space-x-2 mt-4", children: [
|
|
6963
7133
|
/* @__PURE__ */ jsx35(SkeletonRectangle, { width: 80, height: 32 }),
|
|
6964
7134
|
/* @__PURE__ */ jsx35(SkeletonRectangle, { width: 80, height: 32 })
|
|
6965
7135
|
] })
|
|
@@ -6968,7 +7138,7 @@ var SkeletonCard = forwardRef19(
|
|
|
6968
7138
|
);
|
|
6969
7139
|
}
|
|
6970
7140
|
);
|
|
6971
|
-
var SkeletonList =
|
|
7141
|
+
var SkeletonList = forwardRef18(
|
|
6972
7142
|
({
|
|
6973
7143
|
items = 3,
|
|
6974
7144
|
showAvatar = true,
|
|
@@ -6978,18 +7148,18 @@ var SkeletonList = forwardRef19(
|
|
|
6978
7148
|
className = "",
|
|
6979
7149
|
...props
|
|
6980
7150
|
}, ref) => {
|
|
6981
|
-
return /* @__PURE__ */ jsx35("div", { ref, className: cn("space-y-3", className), ...props, children: Array.from({ length: items }, (_, index) => /* @__PURE__ */
|
|
7151
|
+
return /* @__PURE__ */ jsx35("div", { ref, className: cn("space-y-3", className), ...props, children: Array.from({ length: items }, (_, index) => /* @__PURE__ */ jsxs28("div", { className: "flex items-start space-x-3 p-3", children: [
|
|
6982
7152
|
showAvatar && /* @__PURE__ */ jsx35(SkeletonCircle, { width: 32, height: 32 }),
|
|
6983
|
-
/* @__PURE__ */
|
|
7153
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex-1 space-y-2", children: [
|
|
6984
7154
|
showTitle && /* @__PURE__ */ jsx35(SkeletonText, { width: "40%", height: 16 }),
|
|
6985
7155
|
showDescription && /* @__PURE__ */ jsx35(SkeletonText, { lines, spacing: "small" })
|
|
6986
7156
|
] })
|
|
6987
7157
|
] }, index)) });
|
|
6988
7158
|
}
|
|
6989
7159
|
);
|
|
6990
|
-
var SkeletonTable =
|
|
7160
|
+
var SkeletonTable = forwardRef18(
|
|
6991
7161
|
({ rows = 5, columns = 4, showHeader = true, className = "", ...props }, ref) => {
|
|
6992
|
-
return /* @__PURE__ */
|
|
7162
|
+
return /* @__PURE__ */ jsxs28("div", { ref, className: cn("w-full", className), ...props, children: [
|
|
6993
7163
|
showHeader && /* @__PURE__ */ jsx35("div", { className: "flex space-x-2 mb-3", children: Array.from({ length: columns }, (_, index) => /* @__PURE__ */ jsx35(
|
|
6994
7164
|
SkeletonText,
|
|
6995
7165
|
{
|
|
@@ -7011,7 +7181,7 @@ var SkeletonTable = forwardRef19(
|
|
|
7011
7181
|
);
|
|
7012
7182
|
|
|
7013
7183
|
// src/components/NotFound/NotFound.tsx
|
|
7014
|
-
import { jsx as jsx36, jsxs as
|
|
7184
|
+
import { jsx as jsx36, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
7015
7185
|
var NotFound = ({
|
|
7016
7186
|
title,
|
|
7017
7187
|
description,
|
|
@@ -7068,7 +7238,7 @@ var NotFound = ({
|
|
|
7068
7238
|
"aria-labelledby": "error-title",
|
|
7069
7239
|
"aria-describedby": "error-description",
|
|
7070
7240
|
className: "flex flex-col items-center text-center max-w-md space-y-6",
|
|
7071
|
-
children: /* @__PURE__ */
|
|
7241
|
+
children: /* @__PURE__ */ jsxs29("section", { "aria-label": `Erro ${errorCode}`, children: [
|
|
7072
7242
|
/* @__PURE__ */ jsx36(
|
|
7073
7243
|
"div",
|
|
7074
7244
|
{
|
|
@@ -7077,7 +7247,7 @@ var NotFound = ({
|
|
|
7077
7247
|
children: errorCode
|
|
7078
7248
|
}
|
|
7079
7249
|
),
|
|
7080
|
-
/* @__PURE__ */
|
|
7250
|
+
/* @__PURE__ */ jsxs29("header", { className: "space-y-2", children: [
|
|
7081
7251
|
/* @__PURE__ */ jsx36(
|
|
7082
7252
|
Text_default,
|
|
7083
7253
|
{
|
|
@@ -7114,8 +7284,8 @@ var NotFound_default = NotFound;
|
|
|
7114
7284
|
// src/components/VideoPlayer/VideoPlayer.tsx
|
|
7115
7285
|
import {
|
|
7116
7286
|
useRef as useRef10,
|
|
7117
|
-
useState as
|
|
7118
|
-
useEffect as
|
|
7287
|
+
useState as useState16,
|
|
7288
|
+
useEffect as useEffect14,
|
|
7119
7289
|
useCallback as useCallback2
|
|
7120
7290
|
} from "react";
|
|
7121
7291
|
import { createPortal } from "react-dom";
|
|
@@ -7129,7 +7299,7 @@ import {
|
|
|
7129
7299
|
ClosedCaptioning,
|
|
7130
7300
|
DotsThreeVertical as DotsThreeVertical2
|
|
7131
7301
|
} from "phosphor-react";
|
|
7132
|
-
import { jsx as jsx37, jsxs as
|
|
7302
|
+
import { jsx as jsx37, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
7133
7303
|
var CONTROLS_HIDE_TIMEOUT = 3e3;
|
|
7134
7304
|
var LEAVE_HIDE_TIMEOUT = 1e3;
|
|
7135
7305
|
var INIT_DELAY = 100;
|
|
@@ -7164,7 +7334,7 @@ var VolumeControls = ({
|
|
|
7164
7334
|
isMuted,
|
|
7165
7335
|
onVolumeChange,
|
|
7166
7336
|
onToggleMute
|
|
7167
|
-
}) => /* @__PURE__ */
|
|
7337
|
+
}) => /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-2", children: [
|
|
7168
7338
|
/* @__PURE__ */ jsx37(
|
|
7169
7339
|
IconButton_default,
|
|
7170
7340
|
{
|
|
@@ -7218,7 +7388,7 @@ var SpeedMenu = ({
|
|
|
7218
7388
|
top: `${position.top}px`,
|
|
7219
7389
|
left: `${position.left}px`
|
|
7220
7390
|
} : void 0,
|
|
7221
|
-
children: [0.5, 0.75, 1, 1.25, 1.5, 2].map((speed) => /* @__PURE__ */
|
|
7391
|
+
children: [0.5, 0.75, 1, 1.25, 1.5, 2].map((speed) => /* @__PURE__ */ jsxs30(
|
|
7222
7392
|
"button",
|
|
7223
7393
|
{
|
|
7224
7394
|
role: "menuitemradio",
|
|
@@ -7235,7 +7405,7 @@ var SpeedMenu = ({
|
|
|
7235
7405
|
}
|
|
7236
7406
|
);
|
|
7237
7407
|
const portalContent = typeof window !== "undefined" && typeof document !== "undefined" ? createPortal(menuContent, document.body) : null;
|
|
7238
|
-
return /* @__PURE__ */
|
|
7408
|
+
return /* @__PURE__ */ jsxs30("div", { className: "relative", children: [
|
|
7239
7409
|
/* @__PURE__ */ jsx37(
|
|
7240
7410
|
IconButton_default,
|
|
7241
7411
|
{
|
|
@@ -7266,20 +7436,20 @@ var VideoPlayer = ({
|
|
|
7266
7436
|
storageKey = "video-progress"
|
|
7267
7437
|
}) => {
|
|
7268
7438
|
const videoRef = useRef10(null);
|
|
7269
|
-
const [isPlaying, setIsPlaying] =
|
|
7270
|
-
const [currentTime, setCurrentTime] =
|
|
7271
|
-
const [duration, setDuration] =
|
|
7272
|
-
const [isMuted, setIsMuted] =
|
|
7273
|
-
const [volume, setVolume] =
|
|
7274
|
-
const [isFullscreen, setIsFullscreen] =
|
|
7275
|
-
const [showControls, setShowControls] =
|
|
7276
|
-
const [hasCompleted, setHasCompleted] =
|
|
7277
|
-
const [showCaptions, setShowCaptions] =
|
|
7278
|
-
|
|
7439
|
+
const [isPlaying, setIsPlaying] = useState16(false);
|
|
7440
|
+
const [currentTime, setCurrentTime] = useState16(0);
|
|
7441
|
+
const [duration, setDuration] = useState16(0);
|
|
7442
|
+
const [isMuted, setIsMuted] = useState16(false);
|
|
7443
|
+
const [volume, setVolume] = useState16(1);
|
|
7444
|
+
const [isFullscreen, setIsFullscreen] = useState16(false);
|
|
7445
|
+
const [showControls, setShowControls] = useState16(true);
|
|
7446
|
+
const [hasCompleted, setHasCompleted] = useState16(false);
|
|
7447
|
+
const [showCaptions, setShowCaptions] = useState16(false);
|
|
7448
|
+
useEffect14(() => {
|
|
7279
7449
|
setHasCompleted(false);
|
|
7280
7450
|
}, [src]);
|
|
7281
|
-
const [playbackRate, setPlaybackRate] =
|
|
7282
|
-
const [showSpeedMenu, setShowSpeedMenu] =
|
|
7451
|
+
const [playbackRate, setPlaybackRate] = useState16(1);
|
|
7452
|
+
const [showSpeedMenu, setShowSpeedMenu] = useState16(false);
|
|
7283
7453
|
const lastSaveTimeRef = useRef10(0);
|
|
7284
7454
|
const trackRef = useRef10(null);
|
|
7285
7455
|
const controlsTimeoutRef = useRef10(null);
|
|
@@ -7347,13 +7517,13 @@ var VideoPlayer = ({
|
|
|
7347
7517
|
}, LEAVE_HIDE_TIMEOUT);
|
|
7348
7518
|
}
|
|
7349
7519
|
}, [isFullscreen, clearControlsTimeout, isUserInteracting]);
|
|
7350
|
-
|
|
7520
|
+
useEffect14(() => {
|
|
7351
7521
|
if (videoRef.current) {
|
|
7352
7522
|
videoRef.current.volume = volume;
|
|
7353
7523
|
videoRef.current.muted = isMuted;
|
|
7354
7524
|
}
|
|
7355
7525
|
}, [volume, isMuted]);
|
|
7356
|
-
|
|
7526
|
+
useEffect14(() => {
|
|
7357
7527
|
const video = videoRef.current;
|
|
7358
7528
|
if (!video) return;
|
|
7359
7529
|
const onPlay = () => setIsPlaying(true);
|
|
@@ -7368,7 +7538,7 @@ var VideoPlayer = ({
|
|
|
7368
7538
|
video.removeEventListener("ended", onEnded);
|
|
7369
7539
|
};
|
|
7370
7540
|
}, []);
|
|
7371
|
-
|
|
7541
|
+
useEffect14(() => {
|
|
7372
7542
|
if (isPlaying) {
|
|
7373
7543
|
showControlsWithTimer();
|
|
7374
7544
|
} else {
|
|
@@ -7380,7 +7550,7 @@ var VideoPlayer = ({
|
|
|
7380
7550
|
}
|
|
7381
7551
|
}
|
|
7382
7552
|
}, [isPlaying, isFullscreen, showControlsWithTimer, clearControlsTimeout]);
|
|
7383
|
-
|
|
7553
|
+
useEffect14(() => {
|
|
7384
7554
|
const handleFullscreenChange = () => {
|
|
7385
7555
|
const isCurrentlyFullscreen = !!document.fullscreenElement;
|
|
7386
7556
|
setIsFullscreen(isCurrentlyFullscreen);
|
|
@@ -7393,7 +7563,7 @@ var VideoPlayer = ({
|
|
|
7393
7563
|
document.removeEventListener("fullscreenchange", handleFullscreenChange);
|
|
7394
7564
|
};
|
|
7395
7565
|
}, [showControlsWithTimer]);
|
|
7396
|
-
|
|
7566
|
+
useEffect14(() => {
|
|
7397
7567
|
const init = () => {
|
|
7398
7568
|
if (!isFullscreen) {
|
|
7399
7569
|
showControlsWithTimer();
|
|
@@ -7426,7 +7596,7 @@ var VideoPlayer = ({
|
|
|
7426
7596
|
if (hasValidSaved) return saved;
|
|
7427
7597
|
return void 0;
|
|
7428
7598
|
}, [autoSave, storageKey, src, initialTime]);
|
|
7429
|
-
|
|
7599
|
+
useEffect14(() => {
|
|
7430
7600
|
const start = getInitialTime();
|
|
7431
7601
|
if (start !== void 0 && videoRef.current) {
|
|
7432
7602
|
videoRef.current.currentTime = start;
|
|
@@ -7547,12 +7717,12 @@ var VideoPlayer = ({
|
|
|
7547
7717
|
setDuration(videoRef.current.duration);
|
|
7548
7718
|
}
|
|
7549
7719
|
}, []);
|
|
7550
|
-
|
|
7720
|
+
useEffect14(() => {
|
|
7551
7721
|
if (trackRef.current?.track) {
|
|
7552
7722
|
trackRef.current.track.mode = showCaptions && subtitles ? "showing" : "hidden";
|
|
7553
7723
|
}
|
|
7554
7724
|
}, [subtitles, showCaptions]);
|
|
7555
|
-
|
|
7725
|
+
useEffect14(() => {
|
|
7556
7726
|
const handleVisibilityChange = () => {
|
|
7557
7727
|
if (document.hidden && isPlaying && videoRef.current) {
|
|
7558
7728
|
videoRef.current.pause();
|
|
@@ -7635,8 +7805,8 @@ var VideoPlayer = ({
|
|
|
7635
7805
|
toggleFullscreen
|
|
7636
7806
|
]
|
|
7637
7807
|
);
|
|
7638
|
-
return /* @__PURE__ */
|
|
7639
|
-
(title || subtitleText) && /* @__PURE__ */ jsx37("div", { className: "bg-subject-1 px-8 py-4 flex items-end justify-between min-h-20", children: /* @__PURE__ */
|
|
7808
|
+
return /* @__PURE__ */ jsxs30("div", { className: cn("flex flex-col", className), children: [
|
|
7809
|
+
(title || subtitleText) && /* @__PURE__ */ jsx37("div", { className: "bg-subject-1 px-8 py-4 flex items-end justify-between min-h-20", children: /* @__PURE__ */ jsxs30("div", { className: "flex flex-col gap-1", children: [
|
|
7640
7810
|
title && /* @__PURE__ */ jsx37(
|
|
7641
7811
|
Text_default,
|
|
7642
7812
|
{
|
|
@@ -7660,7 +7830,7 @@ var VideoPlayer = ({
|
|
|
7660
7830
|
}
|
|
7661
7831
|
)
|
|
7662
7832
|
] }) }),
|
|
7663
|
-
/* @__PURE__ */
|
|
7833
|
+
/* @__PURE__ */ jsxs30(
|
|
7664
7834
|
"section",
|
|
7665
7835
|
{
|
|
7666
7836
|
className: cn(
|
|
@@ -7729,7 +7899,7 @@ var VideoPlayer = ({
|
|
|
7729
7899
|
) })
|
|
7730
7900
|
}
|
|
7731
7901
|
),
|
|
7732
|
-
/* @__PURE__ */
|
|
7902
|
+
/* @__PURE__ */ jsxs30(
|
|
7733
7903
|
"div",
|
|
7734
7904
|
{
|
|
7735
7905
|
className: cn(
|
|
@@ -7746,8 +7916,8 @@ var VideoPlayer = ({
|
|
|
7746
7916
|
onSeek: handleSeek
|
|
7747
7917
|
}
|
|
7748
7918
|
),
|
|
7749
|
-
/* @__PURE__ */
|
|
7750
|
-
/* @__PURE__ */
|
|
7919
|
+
/* @__PURE__ */ jsxs30("div", { className: "flex items-center justify-between px-4 pb-4", children: [
|
|
7920
|
+
/* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-4", children: [
|
|
7751
7921
|
/* @__PURE__ */ jsx37(
|
|
7752
7922
|
IconButton_default,
|
|
7753
7923
|
{
|
|
@@ -7778,7 +7948,7 @@ var VideoPlayer = ({
|
|
|
7778
7948
|
)
|
|
7779
7949
|
}
|
|
7780
7950
|
),
|
|
7781
|
-
/* @__PURE__ */
|
|
7951
|
+
/* @__PURE__ */ jsxs30(Text_default, { size: "sm", weight: "medium", color: "text-white", children: [
|
|
7782
7952
|
formatTime(currentTime),
|
|
7783
7953
|
" / ",
|
|
7784
7954
|
formatTime(duration)
|
|
@@ -7806,9 +7976,9 @@ var VideoPlayer = ({
|
|
|
7806
7976
|
var VideoPlayer_default = VideoPlayer;
|
|
7807
7977
|
|
|
7808
7978
|
// src/components/Whiteboard/Whiteboard.tsx
|
|
7809
|
-
import { useCallback as useCallback3, useState as
|
|
7979
|
+
import { useCallback as useCallback3, useState as useState17 } from "react";
|
|
7810
7980
|
import { ArrowsOut } from "phosphor-react";
|
|
7811
|
-
import { Fragment as Fragment8, jsx as jsx38, jsxs as
|
|
7981
|
+
import { Fragment as Fragment8, jsx as jsx38, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
7812
7982
|
var IMAGE_WIDTH = 225;
|
|
7813
7983
|
var IMAGE_HEIGHT = 90;
|
|
7814
7984
|
var Whiteboard = ({
|
|
@@ -7819,7 +7989,7 @@ var Whiteboard = ({
|
|
|
7819
7989
|
imagesPerRow = 2,
|
|
7820
7990
|
...rest
|
|
7821
7991
|
}) => {
|
|
7822
|
-
const [imageErrors, setImageErrors] =
|
|
7992
|
+
const [imageErrors, setImageErrors] = useState17(/* @__PURE__ */ new Set());
|
|
7823
7993
|
const handleDownload = useCallback3(
|
|
7824
7994
|
(image) => {
|
|
7825
7995
|
if (onDownload) {
|
|
@@ -7866,7 +8036,7 @@ var Whiteboard = ({
|
|
|
7866
8036
|
className
|
|
7867
8037
|
),
|
|
7868
8038
|
...rest,
|
|
7869
|
-
children: /* @__PURE__ */ jsx38("div", { className: cn("grid gap-4", gridColsClass), children: images.map((image) => /* @__PURE__ */
|
|
8039
|
+
children: /* @__PURE__ */ jsx38("div", { className: cn("grid gap-4", gridColsClass), children: images.map((image) => /* @__PURE__ */ jsxs31(
|
|
7870
8040
|
"div",
|
|
7871
8041
|
{
|
|
7872
8042
|
className: "relative group overflow-hidden bg-gray-100 rounded-lg",
|
|
@@ -7882,7 +8052,7 @@ var Whiteboard = ({
|
|
|
7882
8052
|
width: `${IMAGE_WIDTH}px`,
|
|
7883
8053
|
height: `${IMAGE_HEIGHT}px`
|
|
7884
8054
|
},
|
|
7885
|
-
children: imageErrors.has(image.id) ? /* @__PURE__ */ jsx38("div", { className: "absolute inset-0 flex items-center justify-center bg-gray-200", children: /* @__PURE__ */ jsx38("p", { className: "text-gray-500 text-sm text-center px-2", children: "Imagem indispon\xEDvel" }) }) : /* @__PURE__ */
|
|
8055
|
+
children: imageErrors.has(image.id) ? /* @__PURE__ */ jsx38("div", { className: "absolute inset-0 flex items-center justify-center bg-gray-200", children: /* @__PURE__ */ jsx38("p", { className: "text-gray-500 text-sm text-center px-2", children: "Imagem indispon\xEDvel" }) }) : /* @__PURE__ */ jsxs31(Fragment8, { children: [
|
|
7886
8056
|
/* @__PURE__ */ jsx38(
|
|
7887
8057
|
"img",
|
|
7888
8058
|
{
|
|
@@ -7927,8 +8097,8 @@ var Whiteboard_default = Whiteboard;
|
|
|
7927
8097
|
import {
|
|
7928
8098
|
createContext,
|
|
7929
8099
|
useContext,
|
|
7930
|
-
useEffect as
|
|
7931
|
-
useState as
|
|
8100
|
+
useEffect as useEffect15,
|
|
8101
|
+
useState as useState18,
|
|
7932
8102
|
useCallback as useCallback4,
|
|
7933
8103
|
useMemo as useMemo4
|
|
7934
8104
|
} from "react";
|
|
@@ -7944,7 +8114,7 @@ var AuthProvider = ({
|
|
|
7944
8114
|
getSessionFn,
|
|
7945
8115
|
getTokensFn
|
|
7946
8116
|
}) => {
|
|
7947
|
-
const [authState, setAuthState] =
|
|
8117
|
+
const [authState, setAuthState] = useState18({
|
|
7948
8118
|
isAuthenticated: false,
|
|
7949
8119
|
isLoading: true,
|
|
7950
8120
|
...initialAuthState
|
|
@@ -7992,7 +8162,7 @@ var AuthProvider = ({
|
|
|
7992
8162
|
tokens: void 0
|
|
7993
8163
|
}));
|
|
7994
8164
|
}, [signOutFn]);
|
|
7995
|
-
|
|
8165
|
+
useEffect15(() => {
|
|
7996
8166
|
checkAuth();
|
|
7997
8167
|
}, [checkAuth]);
|
|
7998
8168
|
const contextValue = useMemo4(
|
|
@@ -8146,7 +8316,7 @@ function createZustandAuthAdapter(useAuthStore) {
|
|
|
8146
8316
|
}
|
|
8147
8317
|
|
|
8148
8318
|
// src/components/Auth/useUrlAuthentication.ts
|
|
8149
|
-
import { useEffect as
|
|
8319
|
+
import { useEffect as useEffect16, useRef as useRef11 } from "react";
|
|
8150
8320
|
import { useLocation as useLocation2 } from "react-router-dom";
|
|
8151
8321
|
var getAuthParams = (location, extractParams) => {
|
|
8152
8322
|
const searchParams = new URLSearchParams(location.search);
|
|
@@ -8195,7 +8365,7 @@ var handleUserData = (responseData, setUser) => {
|
|
|
8195
8365
|
function useUrlAuthentication(options) {
|
|
8196
8366
|
const location = useLocation2();
|
|
8197
8367
|
const processedRef = useRef11(false);
|
|
8198
|
-
|
|
8368
|
+
useEffect16(() => {
|
|
8199
8369
|
const handleAuthentication = async () => {
|
|
8200
8370
|
if (processedRef.current) {
|
|
8201
8371
|
return;
|
|
@@ -8279,7 +8449,7 @@ function useApiConfig(api) {
|
|
|
8279
8449
|
// src/components/Quiz/Quiz.tsx
|
|
8280
8450
|
import {
|
|
8281
8451
|
CaretLeft as CaretLeft3,
|
|
8282
|
-
CaretRight as
|
|
8452
|
+
CaretRight as CaretRight5,
|
|
8283
8453
|
Clock as Clock2,
|
|
8284
8454
|
SquaresFour,
|
|
8285
8455
|
BookOpen,
|
|
@@ -8287,11 +8457,11 @@ import {
|
|
|
8287
8457
|
XCircle as XCircle5
|
|
8288
8458
|
} from "phosphor-react";
|
|
8289
8459
|
import {
|
|
8290
|
-
forwardRef as
|
|
8291
|
-
useEffect as
|
|
8460
|
+
forwardRef as forwardRef19,
|
|
8461
|
+
useEffect as useEffect17,
|
|
8292
8462
|
useMemo as useMemo6,
|
|
8293
|
-
useId as
|
|
8294
|
-
useState as
|
|
8463
|
+
useId as useId11,
|
|
8464
|
+
useState as useState19,
|
|
8295
8465
|
useCallback as useCallback5,
|
|
8296
8466
|
useRef as useRef12
|
|
8297
8467
|
} from "react";
|
|
@@ -8930,7 +9100,7 @@ var useQuizStore = create7()(
|
|
|
8930
9100
|
var mock_image_question_default = "./mock-image-question-HEZCLFDL.png";
|
|
8931
9101
|
|
|
8932
9102
|
// src/components/Quiz/Quiz.tsx
|
|
8933
|
-
import { Fragment as Fragment10, jsx as jsx40, jsxs as
|
|
9103
|
+
import { Fragment as Fragment10, jsx as jsx40, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
8934
9104
|
var getStatusBadge = (status) => {
|
|
8935
9105
|
switch (status) {
|
|
8936
9106
|
case "correct":
|
|
@@ -8949,18 +9119,18 @@ var getStatusStyles = (variantCorrect) => {
|
|
|
8949
9119
|
return "bg-error-background border-error-300";
|
|
8950
9120
|
}
|
|
8951
9121
|
};
|
|
8952
|
-
var Quiz =
|
|
9122
|
+
var Quiz = forwardRef19(({ children, className, variant = "default", ...props }, ref) => {
|
|
8953
9123
|
const { setVariant } = useQuizStore();
|
|
8954
|
-
|
|
9124
|
+
useEffect17(() => {
|
|
8955
9125
|
setVariant(variant);
|
|
8956
9126
|
}, [variant, setVariant]);
|
|
8957
9127
|
return /* @__PURE__ */ jsx40("div", { ref, className: cn("flex flex-col", className), ...props, children });
|
|
8958
9128
|
});
|
|
8959
|
-
var QuizHeaderResult =
|
|
9129
|
+
var QuizHeaderResult = forwardRef19(
|
|
8960
9130
|
({ className, ...props }, ref) => {
|
|
8961
9131
|
const { getQuestionResultByQuestionId, getCurrentQuestion } = useQuizStore();
|
|
8962
|
-
const [status, setStatus] =
|
|
8963
|
-
|
|
9132
|
+
const [status, setStatus] = useState19(void 0);
|
|
9133
|
+
useEffect17(() => {
|
|
8964
9134
|
const cq = getCurrentQuestion();
|
|
8965
9135
|
if (!cq) {
|
|
8966
9136
|
setStatus(void 0);
|
|
@@ -8995,7 +9165,7 @@ var QuizHeaderResult = forwardRef20(
|
|
|
8995
9165
|
return "N\xE3o foi dessa vez...voc\xEA deixou a resposta em branco";
|
|
8996
9166
|
}
|
|
8997
9167
|
};
|
|
8998
|
-
return /* @__PURE__ */
|
|
9168
|
+
return /* @__PURE__ */ jsxs32(
|
|
8999
9169
|
"div",
|
|
9000
9170
|
{
|
|
9001
9171
|
ref,
|
|
@@ -9013,7 +9183,7 @@ var QuizHeaderResult = forwardRef20(
|
|
|
9013
9183
|
);
|
|
9014
9184
|
}
|
|
9015
9185
|
);
|
|
9016
|
-
var QuizTitle =
|
|
9186
|
+
var QuizTitle = forwardRef19(
|
|
9017
9187
|
({ className, ...props }, ref) => {
|
|
9018
9188
|
const {
|
|
9019
9189
|
currentQuestionIndex,
|
|
@@ -9023,7 +9193,7 @@ var QuizTitle = forwardRef20(
|
|
|
9023
9193
|
formatTime: formatTime2,
|
|
9024
9194
|
isStarted
|
|
9025
9195
|
} = useQuizStore();
|
|
9026
|
-
const [showExitConfirmation, setShowExitConfirmation] =
|
|
9196
|
+
const [showExitConfirmation, setShowExitConfirmation] = useState19(false);
|
|
9027
9197
|
const totalQuestions = getTotalQuestions();
|
|
9028
9198
|
const quizTitle = getQuizTitle();
|
|
9029
9199
|
const handleBackClick = () => {
|
|
@@ -9040,8 +9210,8 @@ var QuizTitle = forwardRef20(
|
|
|
9040
9210
|
const handleCancelExit = () => {
|
|
9041
9211
|
setShowExitConfirmation(false);
|
|
9042
9212
|
};
|
|
9043
|
-
return /* @__PURE__ */
|
|
9044
|
-
/* @__PURE__ */
|
|
9213
|
+
return /* @__PURE__ */ jsxs32(Fragment10, { children: [
|
|
9214
|
+
/* @__PURE__ */ jsxs32(
|
|
9045
9215
|
"div",
|
|
9046
9216
|
{
|
|
9047
9217
|
ref,
|
|
@@ -9060,7 +9230,7 @@ var QuizTitle = forwardRef20(
|
|
|
9060
9230
|
onClick: handleBackClick
|
|
9061
9231
|
}
|
|
9062
9232
|
),
|
|
9063
|
-
/* @__PURE__ */
|
|
9233
|
+
/* @__PURE__ */ jsxs32("span", { className: "flex flex-col gap-2 text-center", children: [
|
|
9064
9234
|
/* @__PURE__ */ jsx40("p", { className: "text-text-950 font-bold text-md", children: quizTitle }),
|
|
9065
9235
|
/* @__PURE__ */ jsx40("p", { className: "text-text-600 text-xs", children: totalQuestions > 0 ? `${currentQuestionIndex + 1} de ${totalQuestions}` : "0 de 0" })
|
|
9066
9236
|
] }),
|
|
@@ -9084,7 +9254,7 @@ var QuizTitle = forwardRef20(
|
|
|
9084
9254
|
] });
|
|
9085
9255
|
}
|
|
9086
9256
|
);
|
|
9087
|
-
var QuizSubTitle =
|
|
9257
|
+
var QuizSubTitle = forwardRef19(
|
|
9088
9258
|
({ subTitle, ...props }, ref) => {
|
|
9089
9259
|
return /* @__PURE__ */ jsx40("div", { className: "px-4 pb-2 pt-6", ...props, ref, children: /* @__PURE__ */ jsx40("p", { className: "font-bold text-lg text-text-950", children: subTitle }) });
|
|
9090
9260
|
}
|
|
@@ -9101,7 +9271,7 @@ var QuizHeader = () => {
|
|
|
9101
9271
|
}
|
|
9102
9272
|
);
|
|
9103
9273
|
};
|
|
9104
|
-
var QuizContainer =
|
|
9274
|
+
var QuizContainer = forwardRef19(({ children, className, ...props }, ref) => {
|
|
9105
9275
|
return /* @__PURE__ */ jsx40(
|
|
9106
9276
|
"div",
|
|
9107
9277
|
{
|
|
@@ -9115,7 +9285,7 @@ var QuizContainer = forwardRef20(({ children, className, ...props }, ref) => {
|
|
|
9115
9285
|
}
|
|
9116
9286
|
);
|
|
9117
9287
|
});
|
|
9118
|
-
var QuizContent =
|
|
9288
|
+
var QuizContent = forwardRef19(({ paddingBottom }) => {
|
|
9119
9289
|
const { getCurrentQuestion } = useQuizStore();
|
|
9120
9290
|
const currentQuestion = getCurrentQuestion();
|
|
9121
9291
|
const questionComponents = {
|
|
@@ -9166,7 +9336,7 @@ var QuizAlternative = ({ paddingBottom }) => {
|
|
|
9166
9336
|
});
|
|
9167
9337
|
if (!alternatives)
|
|
9168
9338
|
return /* @__PURE__ */ jsx40("div", { children: /* @__PURE__ */ jsx40("p", { children: "N\xE3o h\xE1 Alternativas" }) });
|
|
9169
|
-
return /* @__PURE__ */
|
|
9339
|
+
return /* @__PURE__ */ jsxs32(Fragment10, { children: [
|
|
9170
9340
|
/* @__PURE__ */ jsx40(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
9171
9341
|
/* @__PURE__ */ jsx40(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx40("div", { className: "space-y-4", children: /* @__PURE__ */ jsx40(
|
|
9172
9342
|
AlternativesList,
|
|
@@ -9267,7 +9437,7 @@ var QuizMultipleChoice = ({ paddingBottom }) => {
|
|
|
9267
9437
|
});
|
|
9268
9438
|
if (!choices)
|
|
9269
9439
|
return /* @__PURE__ */ jsx40("div", { children: /* @__PURE__ */ jsx40("p", { children: "N\xE3o h\xE1 Escolhas Multiplas" }) });
|
|
9270
|
-
return /* @__PURE__ */
|
|
9440
|
+
return /* @__PURE__ */ jsxs32(Fragment10, { children: [
|
|
9271
9441
|
/* @__PURE__ */ jsx40(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
9272
9442
|
/* @__PURE__ */ jsx40(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx40("div", { className: "space-y-4", children: /* @__PURE__ */ jsx40(
|
|
9273
9443
|
MultipleChoiceList,
|
|
@@ -9311,14 +9481,14 @@ var QuizDissertative = ({ paddingBottom }) => {
|
|
|
9311
9481
|
textareaRef.current.style.height = `${newHeight}px`;
|
|
9312
9482
|
}
|
|
9313
9483
|
}, []);
|
|
9314
|
-
|
|
9484
|
+
useEffect17(() => {
|
|
9315
9485
|
adjustTextareaHeight();
|
|
9316
9486
|
}, [currentAnswer, adjustTextareaHeight]);
|
|
9317
9487
|
if (!currentQuestion) {
|
|
9318
9488
|
return /* @__PURE__ */ jsx40("div", { className: "space-y-4", children: /* @__PURE__ */ jsx40("p", { className: "text-text-600 text-md", children: "Nenhuma quest\xE3o dispon\xEDvel" }) });
|
|
9319
9489
|
}
|
|
9320
9490
|
const localAnswer = (variant == "result" ? currentQuestionResult?.answer : currentAnswer?.answer) || "";
|
|
9321
|
-
return /* @__PURE__ */
|
|
9491
|
+
return /* @__PURE__ */ jsxs32(Fragment10, { children: [
|
|
9322
9492
|
/* @__PURE__ */ jsx40(QuizSubTitle, { subTitle: "Resposta" }),
|
|
9323
9493
|
/* @__PURE__ */ jsx40(QuizContainer, { className: cn(variant != "result" && paddingBottom), children: /* @__PURE__ */ jsx40("div", { className: "space-y-4 max-h-[600px] overflow-y-auto", children: variant === "default" ? /* @__PURE__ */ jsx40("div", { className: "space-y-4", children: /* @__PURE__ */ jsx40(
|
|
9324
9494
|
TextArea_default,
|
|
@@ -9331,7 +9501,7 @@ var QuizDissertative = ({ paddingBottom }) => {
|
|
|
9331
9501
|
className: "min-h-[120px] max-h-[400px] resize-none overflow-y-auto"
|
|
9332
9502
|
}
|
|
9333
9503
|
) }) : /* @__PURE__ */ jsx40("div", { className: "space-y-4", children: /* @__PURE__ */ jsx40("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: localAnswer || "Nenhuma resposta fornecida" }) }) }) }),
|
|
9334
|
-
variant === "result" && currentQuestionResult?.answerStatus == "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && /* @__PURE__ */
|
|
9504
|
+
variant === "result" && currentQuestionResult?.answerStatus == "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && /* @__PURE__ */ jsxs32(Fragment10, { children: [
|
|
9335
9505
|
/* @__PURE__ */ jsx40(QuizSubTitle, { subTitle: "Observa\xE7\xE3o do professor" }),
|
|
9336
9506
|
/* @__PURE__ */ jsx40(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx40("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Integer euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse potenti. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit. Sed ut imperdiet nisi. Proin condimentum fermentum nunc. Etiam pharetra, erat sed fermentum feugiat, velit mauris egestas quam, ut aliquam massa nisl quis neque. Suspendisse in orci enim. Mauris euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Integer euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse potenti. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit. Sed ut imperdiet nisi. Proin condimentum fermentum nunc. Etiam pharetra, erat sed fermentum feugiat, velit mauris egestas quam, ut aliquam massa nisl quis neque. Suspendisse in orci enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Integer euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse potenti. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit. Sed ut imperdiet nisi. Proin condimentum fermentum nunc. Etiam pharetra, erat sed fermentum feugiat, velit mauris egestas quam, ut aliquam massa nisl quis neque. Suspendisse in orci enim." }) })
|
|
9337
9507
|
] })
|
|
@@ -9359,16 +9529,16 @@ var QuizTrueOrFalse = ({ paddingBottom }) => {
|
|
|
9359
9529
|
];
|
|
9360
9530
|
const getLetterByIndex = (index) => String.fromCharCode(97 + index);
|
|
9361
9531
|
const isDefaultVariant = variant == "default";
|
|
9362
|
-
return /* @__PURE__ */
|
|
9532
|
+
return /* @__PURE__ */ jsxs32(Fragment10, { children: [
|
|
9363
9533
|
/* @__PURE__ */ jsx40(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
9364
9534
|
/* @__PURE__ */ jsx40(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx40("div", { className: "flex flex-col gap-3.5", children: options.map((option, index) => {
|
|
9365
9535
|
const variantCorrect = option.isCorrect ? "correct" : "incorrect";
|
|
9366
|
-
return /* @__PURE__ */
|
|
9536
|
+
return /* @__PURE__ */ jsxs32(
|
|
9367
9537
|
"section",
|
|
9368
9538
|
{
|
|
9369
9539
|
className: "flex flex-col gap-2",
|
|
9370
9540
|
children: [
|
|
9371
|
-
/* @__PURE__ */
|
|
9541
|
+
/* @__PURE__ */ jsxs32(
|
|
9372
9542
|
"div",
|
|
9373
9543
|
{
|
|
9374
9544
|
className: cn(
|
|
@@ -9377,9 +9547,9 @@ var QuizTrueOrFalse = ({ paddingBottom }) => {
|
|
|
9377
9547
|
),
|
|
9378
9548
|
children: [
|
|
9379
9549
|
/* @__PURE__ */ jsx40("p", { className: "text-text-900 text-sm", children: getLetterByIndex(index).concat(") ").concat(option.label) }),
|
|
9380
|
-
isDefaultVariant ? /* @__PURE__ */
|
|
9550
|
+
isDefaultVariant ? /* @__PURE__ */ jsxs32(Select_default, { size: "medium", children: [
|
|
9381
9551
|
/* @__PURE__ */ jsx40(SelectTrigger, { className: "w-[180px]", children: /* @__PURE__ */ jsx40(SelectValue, { placeholder: "Selecione opc\xE3o" }) }),
|
|
9382
|
-
/* @__PURE__ */
|
|
9552
|
+
/* @__PURE__ */ jsxs32(SelectContent, { children: [
|
|
9383
9553
|
/* @__PURE__ */ jsx40(SelectItem, { value: "V", children: "Verdadeiro" }),
|
|
9384
9554
|
/* @__PURE__ */ jsx40(SelectItem, { value: "F", children: "Falso" })
|
|
9385
9555
|
] })
|
|
@@ -9387,7 +9557,7 @@ var QuizTrueOrFalse = ({ paddingBottom }) => {
|
|
|
9387
9557
|
]
|
|
9388
9558
|
}
|
|
9389
9559
|
),
|
|
9390
|
-
!isDefaultVariant && /* @__PURE__ */
|
|
9560
|
+
!isDefaultVariant && /* @__PURE__ */ jsxs32("span", { className: "flex flex-row gap-2 items-center", children: [
|
|
9391
9561
|
/* @__PURE__ */ jsx40("p", { className: "text-text-800 text-2xs", children: "Resposta selecionada: V" }),
|
|
9392
9562
|
!option.isCorrect && /* @__PURE__ */ jsx40("p", { className: "text-text-800 text-2xs", children: "Resposta correta: F" })
|
|
9393
9563
|
] })
|
|
@@ -9450,7 +9620,7 @@ var QuizConnectDots = ({ paddingBottom }) => {
|
|
|
9450
9620
|
isCorrect: false
|
|
9451
9621
|
}
|
|
9452
9622
|
];
|
|
9453
|
-
const [userAnswers, setUserAnswers] =
|
|
9623
|
+
const [userAnswers, setUserAnswers] = useState19(() => {
|
|
9454
9624
|
if (variant === "result") {
|
|
9455
9625
|
return mockUserAnswers;
|
|
9456
9626
|
}
|
|
@@ -9479,13 +9649,13 @@ var QuizConnectDots = ({ paddingBottom }) => {
|
|
|
9479
9649
|
const assignedDots = new Set(
|
|
9480
9650
|
userAnswers.map((a) => a.dotOption).filter(Boolean)
|
|
9481
9651
|
);
|
|
9482
|
-
return /* @__PURE__ */
|
|
9652
|
+
return /* @__PURE__ */ jsxs32(Fragment10, { children: [
|
|
9483
9653
|
/* @__PURE__ */ jsx40(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
9484
9654
|
/* @__PURE__ */ jsx40(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx40("div", { className: "flex flex-col gap-3.5", children: options.map((option, index) => {
|
|
9485
9655
|
const answer = userAnswers[index];
|
|
9486
9656
|
const variantCorrect = answer.isCorrect ? "correct" : "incorrect";
|
|
9487
|
-
return /* @__PURE__ */
|
|
9488
|
-
/* @__PURE__ */
|
|
9657
|
+
return /* @__PURE__ */ jsxs32("section", { className: "flex flex-col gap-2", children: [
|
|
9658
|
+
/* @__PURE__ */ jsxs32(
|
|
9489
9659
|
"div",
|
|
9490
9660
|
{
|
|
9491
9661
|
className: cn(
|
|
@@ -9494,7 +9664,7 @@ var QuizConnectDots = ({ paddingBottom }) => {
|
|
|
9494
9664
|
),
|
|
9495
9665
|
children: [
|
|
9496
9666
|
/* @__PURE__ */ jsx40("p", { className: "text-text-900 text-sm", children: getLetterByIndex(index) + ") " + option.label }),
|
|
9497
|
-
isDefaultVariant ? /* @__PURE__ */
|
|
9667
|
+
isDefaultVariant ? /* @__PURE__ */ jsxs32(
|
|
9498
9668
|
Select_default,
|
|
9499
9669
|
{
|
|
9500
9670
|
size: "medium",
|
|
@@ -9511,12 +9681,12 @@ var QuizConnectDots = ({ paddingBottom }) => {
|
|
|
9511
9681
|
]
|
|
9512
9682
|
}
|
|
9513
9683
|
),
|
|
9514
|
-
!isDefaultVariant && /* @__PURE__ */
|
|
9515
|
-
/* @__PURE__ */
|
|
9684
|
+
!isDefaultVariant && /* @__PURE__ */ jsxs32("span", { className: "flex flex-row gap-2 items-center", children: [
|
|
9685
|
+
/* @__PURE__ */ jsxs32("p", { className: "text-text-800 text-2xs", children: [
|
|
9516
9686
|
"Resposta selecionada: ",
|
|
9517
9687
|
answer.dotOption || "Nenhuma"
|
|
9518
9688
|
] }),
|
|
9519
|
-
!answer.isCorrect && /* @__PURE__ */
|
|
9689
|
+
!answer.isCorrect && /* @__PURE__ */ jsxs32("p", { className: "text-text-800 text-2xs", children: [
|
|
9520
9690
|
"Resposta correta: ",
|
|
9521
9691
|
answer.correctOption
|
|
9522
9692
|
] })
|
|
@@ -9569,8 +9739,8 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
9569
9739
|
isCorrect: true
|
|
9570
9740
|
}
|
|
9571
9741
|
];
|
|
9572
|
-
const [answers, setAnswers] =
|
|
9573
|
-
const baseId =
|
|
9742
|
+
const [answers, setAnswers] = useState19({});
|
|
9743
|
+
const baseId = useId11();
|
|
9574
9744
|
const getAvailableOptionsForSelect = (selectId) => {
|
|
9575
9745
|
const usedOptions = Object.entries(answers).filter(([key]) => key !== selectId).map(([, value]) => value);
|
|
9576
9746
|
return options.filter((option) => !usedOptions.includes(option));
|
|
@@ -9586,7 +9756,7 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
9586
9756
|
return /* @__PURE__ */ jsx40("p", { className: "inline-flex mb-2.5 text-success-600 font-semibold text-md border-b-2 border-success-600", children: mockAnswer?.correctAnswer });
|
|
9587
9757
|
};
|
|
9588
9758
|
const renderDefaultElement = (selectId, startIndex, selectedValue, availableOptionsForThisSelect) => {
|
|
9589
|
-
return /* @__PURE__ */
|
|
9759
|
+
return /* @__PURE__ */ jsxs32(
|
|
9590
9760
|
Select_default,
|
|
9591
9761
|
{
|
|
9592
9762
|
value: selectedValue,
|
|
@@ -9671,7 +9841,7 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
9671
9841
|
}
|
|
9672
9842
|
return elements;
|
|
9673
9843
|
};
|
|
9674
|
-
return /* @__PURE__ */
|
|
9844
|
+
return /* @__PURE__ */ jsxs32(Fragment10, { children: [
|
|
9675
9845
|
/* @__PURE__ */ jsx40(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
9676
9846
|
/* @__PURE__ */ jsx40(QuizContainer, { className: "h-auto pb-0", children: /* @__PURE__ */ jsx40("div", { className: "space-y-6 px-4 h-auto", children: /* @__PURE__ */ jsx40(
|
|
9677
9847
|
"div",
|
|
@@ -9683,7 +9853,7 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
9683
9853
|
children: renderTextWithSelects(exampleText).map((element) => /* @__PURE__ */ jsx40("span", { children: element.element }, element.id))
|
|
9684
9854
|
}
|
|
9685
9855
|
) }) }),
|
|
9686
|
-
variant === "result" && /* @__PURE__ */
|
|
9856
|
+
variant === "result" && /* @__PURE__ */ jsxs32(Fragment10, { children: [
|
|
9687
9857
|
/* @__PURE__ */ jsx40(QuizSubTitle, { subTitle: "Resultado" }),
|
|
9688
9858
|
/* @__PURE__ */ jsx40(QuizContainer, { className: "h-auto pb-0", children: /* @__PURE__ */ jsx40("div", { className: "space-y-6 px-4", children: /* @__PURE__ */ jsx40(
|
|
9689
9859
|
"div",
|
|
@@ -9707,7 +9877,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
9707
9877
|
};
|
|
9708
9878
|
const correctRadiusRelative = calculateCorrectRadiusRelative();
|
|
9709
9879
|
const mockUserAnswerRelative = { x: 0.72, y: 0.348 };
|
|
9710
|
-
const [clickPositionRelative, setClickPositionRelative] =
|
|
9880
|
+
const [clickPositionRelative, setClickPositionRelative] = useState19(variant == "result" ? mockUserAnswerRelative : null);
|
|
9711
9881
|
const convertToRelativeCoordinates = (x, y, rect) => {
|
|
9712
9882
|
const safeWidth = Math.max(rect.width, 1e-3);
|
|
9713
9883
|
const safeHeight = Math.max(rect.height, 1e-3);
|
|
@@ -9743,36 +9913,36 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
9743
9913
|
}
|
|
9744
9914
|
return "bg-success-600/70 border-white";
|
|
9745
9915
|
};
|
|
9746
|
-
return /* @__PURE__ */
|
|
9916
|
+
return /* @__PURE__ */ jsxs32(Fragment10, { children: [
|
|
9747
9917
|
/* @__PURE__ */ jsx40(QuizSubTitle, { subTitle: "Clique na \xE1rea correta" }),
|
|
9748
|
-
/* @__PURE__ */ jsx40(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */
|
|
9918
|
+
/* @__PURE__ */ jsx40(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsxs32(
|
|
9749
9919
|
"div",
|
|
9750
9920
|
{
|
|
9751
9921
|
"data-testid": "quiz-image-container",
|
|
9752
9922
|
className: "space-y-6 p-3 relative inline-block",
|
|
9753
9923
|
children: [
|
|
9754
|
-
variant == "result" && /* @__PURE__ */
|
|
9924
|
+
variant == "result" && /* @__PURE__ */ jsxs32(
|
|
9755
9925
|
"div",
|
|
9756
9926
|
{
|
|
9757
9927
|
"data-testid": "quiz-legend",
|
|
9758
9928
|
className: "flex items-center gap-4 text-xs",
|
|
9759
9929
|
children: [
|
|
9760
|
-
/* @__PURE__ */
|
|
9930
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-2", children: [
|
|
9761
9931
|
/* @__PURE__ */ jsx40("div", { className: "w-3 h-3 rounded-full bg-indicator-primary/70 border border-[#F8CC2E]" }),
|
|
9762
9932
|
/* @__PURE__ */ jsx40("span", { className: "text-text-600 font-medium text-sm", children: "\xC1rea correta" })
|
|
9763
9933
|
] }),
|
|
9764
|
-
/* @__PURE__ */
|
|
9934
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-2", children: [
|
|
9765
9935
|
/* @__PURE__ */ jsx40("div", { className: "w-3 h-3 rounded-full bg-success-600/70 border border-white" }),
|
|
9766
9936
|
/* @__PURE__ */ jsx40("span", { className: "text-text-600 font-medium text-sm", children: "Resposta correta" })
|
|
9767
9937
|
] }),
|
|
9768
|
-
/* @__PURE__ */
|
|
9938
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-2", children: [
|
|
9769
9939
|
/* @__PURE__ */ jsx40("div", { className: "w-3 h-3 rounded-full bg-indicator-error/70 border border-white" }),
|
|
9770
9940
|
/* @__PURE__ */ jsx40("span", { className: "text-text-600 font-medium text-sm", children: "Resposta incorreta" })
|
|
9771
9941
|
] })
|
|
9772
9942
|
]
|
|
9773
9943
|
}
|
|
9774
9944
|
),
|
|
9775
|
-
/* @__PURE__ */
|
|
9945
|
+
/* @__PURE__ */ jsxs32(
|
|
9776
9946
|
"button",
|
|
9777
9947
|
{
|
|
9778
9948
|
"data-testid": "quiz-image-button",
|
|
@@ -9879,11 +10049,11 @@ var QuizQuestionList = ({
|
|
|
9879
10049
|
return "Em branco";
|
|
9880
10050
|
}
|
|
9881
10051
|
};
|
|
9882
|
-
return /* @__PURE__ */
|
|
10052
|
+
return /* @__PURE__ */ jsxs32("div", { className: "space-y-6 px-4 h-full", children: [
|
|
9883
10053
|
Object.entries(filteredGroupedQuestions).length == 0 && /* @__PURE__ */ jsx40("div", { className: "flex items-center justify-center text-gray-500 py-8 h-full", children: /* @__PURE__ */ jsx40("p", { className: "text-lg", children: "Nenhum resultado" }) }),
|
|
9884
10054
|
Object.entries(filteredGroupedQuestions).map(
|
|
9885
|
-
([subjectId, questions]) => /* @__PURE__ */
|
|
9886
|
-
/* @__PURE__ */
|
|
10055
|
+
([subjectId, questions]) => /* @__PURE__ */ jsxs32("section", { className: "flex flex-col gap-2", children: [
|
|
10056
|
+
/* @__PURE__ */ jsxs32("span", { className: "pt-6 pb-4 flex flex-row gap-2", children: [
|
|
9887
10057
|
/* @__PURE__ */ jsx40("div", { className: "bg-primary-500 p-1 rounded-sm flex items-center justify-center", children: /* @__PURE__ */ jsx40(BookOpen, { size: 17, className: "text-white" }) }),
|
|
9888
10058
|
/* @__PURE__ */ jsx40("p", { className: "text-text-800 font-bold text-lg", children: questions?.[0]?.knowledgeMatrix?.[0]?.subject?.name ?? "Sem mat\xE9ria" })
|
|
9889
10059
|
] }),
|
|
@@ -9907,7 +10077,7 @@ var QuizQuestionList = ({
|
|
|
9907
10077
|
)
|
|
9908
10078
|
] });
|
|
9909
10079
|
};
|
|
9910
|
-
var QuizFooter =
|
|
10080
|
+
var QuizFooter = forwardRef19(
|
|
9911
10081
|
({
|
|
9912
10082
|
className,
|
|
9913
10083
|
onGoToSimulated,
|
|
@@ -9935,11 +10105,11 @@ var QuizFooter = forwardRef20(
|
|
|
9935
10105
|
const currentAnswer = getCurrentAnswer();
|
|
9936
10106
|
const currentQuestion = getCurrentQuestion();
|
|
9937
10107
|
const isCurrentQuestionSkipped = currentQuestion ? getQuestionStatusFromUserAnswers(currentQuestion.id) === "skipped" : false;
|
|
9938
|
-
const [alertDialogOpen, setAlertDialogOpen] =
|
|
9939
|
-
const [modalResultOpen, setModalResultOpen] =
|
|
9940
|
-
const [modalNavigateOpen, setModalNavigateOpen] =
|
|
9941
|
-
const [modalResolutionOpen, setModalResolutionOpen] =
|
|
9942
|
-
const [filterType, setFilterType] =
|
|
10108
|
+
const [alertDialogOpen, setAlertDialogOpen] = useState19(false);
|
|
10109
|
+
const [modalResultOpen, setModalResultOpen] = useState19(false);
|
|
10110
|
+
const [modalNavigateOpen, setModalNavigateOpen] = useState19(false);
|
|
10111
|
+
const [modalResolutionOpen, setModalResolutionOpen] = useState19(false);
|
|
10112
|
+
const [filterType, setFilterType] = useState19("all");
|
|
9943
10113
|
const unansweredQuestions = getUnansweredQuestionsFromUserAnswers();
|
|
9944
10114
|
const allQuestions = getTotalQuestions();
|
|
9945
10115
|
const handleFinishQuiz = async () => {
|
|
@@ -9970,7 +10140,7 @@ var QuizFooter = forwardRef20(
|
|
|
9970
10140
|
return;
|
|
9971
10141
|
}
|
|
9972
10142
|
};
|
|
9973
|
-
return /* @__PURE__ */
|
|
10143
|
+
return /* @__PURE__ */ jsxs32(Fragment10, { children: [
|
|
9974
10144
|
/* @__PURE__ */ jsx40(
|
|
9975
10145
|
"footer",
|
|
9976
10146
|
{
|
|
@@ -9980,8 +10150,8 @@ var QuizFooter = forwardRef20(
|
|
|
9980
10150
|
className
|
|
9981
10151
|
),
|
|
9982
10152
|
...props,
|
|
9983
|
-
children: variant === "default" ? /* @__PURE__ */
|
|
9984
|
-
/* @__PURE__ */
|
|
10153
|
+
children: variant === "default" ? /* @__PURE__ */ jsxs32(Fragment10, { children: [
|
|
10154
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-row items-center gap-1", children: [
|
|
9985
10155
|
/* @__PURE__ */ jsx40(
|
|
9986
10156
|
IconButton_default,
|
|
9987
10157
|
{
|
|
@@ -10044,7 +10214,7 @@ var QuizFooter = forwardRef20(
|
|
|
10044
10214
|
size: "medium",
|
|
10045
10215
|
variant: "link",
|
|
10046
10216
|
action: "primary",
|
|
10047
|
-
iconRight: /* @__PURE__ */ jsx40(
|
|
10217
|
+
iconRight: /* @__PURE__ */ jsx40(CaretRight5, { size: 18 }),
|
|
10048
10218
|
disabled: !currentAnswer && !isCurrentQuestionSkipped,
|
|
10049
10219
|
onClick: () => {
|
|
10050
10220
|
goToNextQuestion();
|
|
@@ -10082,15 +10252,14 @@ var QuizFooter = forwardRef20(
|
|
|
10082
10252
|
isOpen: modalResultOpen,
|
|
10083
10253
|
onClose: () => setModalResultOpen(false),
|
|
10084
10254
|
title: "",
|
|
10085
|
-
closeOnBackdropClick: false,
|
|
10086
10255
|
closeOnEscape: false,
|
|
10087
10256
|
hideCloseButton: true,
|
|
10088
10257
|
size: "md",
|
|
10089
|
-
children: /* @__PURE__ */
|
|
10258
|
+
children: /* @__PURE__ */ jsxs32("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
|
|
10090
10259
|
resultImageComponent ? /* @__PURE__ */ jsx40("div", { className: "w-[282px] h-auto", children: resultImageComponent }) : /* @__PURE__ */ jsx40("div", { className: "w-[282px] h-[200px] bg-gray-100 rounded-md flex items-center justify-center", children: /* @__PURE__ */ jsx40("span", { className: "text-gray-500 text-sm", children: "Imagem de resultado" }) }),
|
|
10091
|
-
/* @__PURE__ */
|
|
10260
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-2 text-center", children: [
|
|
10092
10261
|
/* @__PURE__ */ jsx40("h2", { className: "text-text-950 font-bold text-lg", children: "Voc\xEA concluiu o simulado!" }),
|
|
10093
|
-
/* @__PURE__ */
|
|
10262
|
+
/* @__PURE__ */ jsxs32("p", { className: "text-text-500 font-sm", children: [
|
|
10094
10263
|
"Voc\xEA acertou",
|
|
10095
10264
|
" ",
|
|
10096
10265
|
getQuestionResultStatistics()?.correctAnswers ?? "--",
|
|
@@ -10100,7 +10269,7 @@ var QuizFooter = forwardRef20(
|
|
|
10100
10269
|
" quest\xF5es."
|
|
10101
10270
|
] })
|
|
10102
10271
|
] }),
|
|
10103
|
-
/* @__PURE__ */
|
|
10272
|
+
/* @__PURE__ */ jsxs32("div", { className: "px-6 flex flex-row items-center gap-2 w-full", children: [
|
|
10104
10273
|
/* @__PURE__ */ jsx40(
|
|
10105
10274
|
Button_default,
|
|
10106
10275
|
{
|
|
@@ -10123,10 +10292,10 @@ var QuizFooter = forwardRef20(
|
|
|
10123
10292
|
onClose: () => setModalNavigateOpen(false),
|
|
10124
10293
|
title: "Quest\xF5es",
|
|
10125
10294
|
size: "lg",
|
|
10126
|
-
children: /* @__PURE__ */
|
|
10127
|
-
/* @__PURE__ */
|
|
10295
|
+
children: /* @__PURE__ */ jsxs32("div", { className: "flex flex-col w-full not-lg:h-[calc(100vh-200px)] lg:max-h-[687px] lg:h-[687px]", children: [
|
|
10296
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-row justify-between items-center py-6 pt-6 pb-4 border-b border-border-200 flex-shrink-0", children: [
|
|
10128
10297
|
/* @__PURE__ */ jsx40("p", { className: "text-text-950 font-bold text-lg", children: "Filtrar por" }),
|
|
10129
|
-
/* @__PURE__ */ jsx40("span", { className: "max-w-[266px]", children: /* @__PURE__ */
|
|
10298
|
+
/* @__PURE__ */ jsx40("span", { className: "max-w-[266px]", children: /* @__PURE__ */ jsxs32(Select_default, { value: filterType, onValueChange: setFilterType, children: [
|
|
10130
10299
|
/* @__PURE__ */ jsx40(
|
|
10131
10300
|
SelectTrigger,
|
|
10132
10301
|
{
|
|
@@ -10135,7 +10304,7 @@ var QuizFooter = forwardRef20(
|
|
|
10135
10304
|
children: /* @__PURE__ */ jsx40(SelectValue, { placeholder: "Selecione uma op\xE7\xE3o" })
|
|
10136
10305
|
}
|
|
10137
10306
|
),
|
|
10138
|
-
/* @__PURE__ */
|
|
10307
|
+
/* @__PURE__ */ jsxs32(SelectContent, { children: [
|
|
10139
10308
|
/* @__PURE__ */ jsx40(SelectItem, { value: "all", children: "Todas" }),
|
|
10140
10309
|
/* @__PURE__ */ jsx40(SelectItem, { value: "unanswered", children: "Em branco" }),
|
|
10141
10310
|
/* @__PURE__ */ jsx40(SelectItem, { value: "answered", children: "Respondidas" })
|
|
@@ -10184,10 +10353,10 @@ var QuizBadge = ({
|
|
|
10184
10353
|
return /* @__PURE__ */ jsx40(Badge_default, { variant: "solid", action: "info", "data-testid": "quiz-badge", children: subtype });
|
|
10185
10354
|
}
|
|
10186
10355
|
};
|
|
10187
|
-
var QuizResultHeaderTitle =
|
|
10356
|
+
var QuizResultHeaderTitle = forwardRef19(({ className, ...props }, ref) => {
|
|
10188
10357
|
const { getActiveQuiz } = useQuizStore();
|
|
10189
10358
|
const activeQuiz = getActiveQuiz();
|
|
10190
|
-
return /* @__PURE__ */
|
|
10359
|
+
return /* @__PURE__ */ jsxs32(
|
|
10191
10360
|
"div",
|
|
10192
10361
|
{
|
|
10193
10362
|
ref,
|
|
@@ -10200,7 +10369,7 @@ var QuizResultHeaderTitle = forwardRef20(({ className, ...props }, ref) => {
|
|
|
10200
10369
|
}
|
|
10201
10370
|
);
|
|
10202
10371
|
});
|
|
10203
|
-
var QuizResultTitle =
|
|
10372
|
+
var QuizResultTitle = forwardRef19(({ className, ...props }, ref) => {
|
|
10204
10373
|
const { getQuizTitle } = useQuizStore();
|
|
10205
10374
|
const quizTitle = getQuizTitle();
|
|
10206
10375
|
return /* @__PURE__ */ jsx40(
|
|
@@ -10213,7 +10382,7 @@ var QuizResultTitle = forwardRef20(({ className, ...props }, ref) => {
|
|
|
10213
10382
|
}
|
|
10214
10383
|
);
|
|
10215
10384
|
});
|
|
10216
|
-
var QuizResultPerformance =
|
|
10385
|
+
var QuizResultPerformance = forwardRef19(
|
|
10217
10386
|
({ ...props }, ref) => {
|
|
10218
10387
|
const {
|
|
10219
10388
|
getTotalQuestions,
|
|
@@ -10255,14 +10424,14 @@ var QuizResultPerformance = forwardRef20(
|
|
|
10255
10424
|
});
|
|
10256
10425
|
}
|
|
10257
10426
|
const percentage = totalQuestions > 0 ? Math.round(correctAnswers / totalQuestions * 100) : 0;
|
|
10258
|
-
return /* @__PURE__ */
|
|
10427
|
+
return /* @__PURE__ */ jsxs32(
|
|
10259
10428
|
"div",
|
|
10260
10429
|
{
|
|
10261
10430
|
className: "flex flex-row gap-6 p-6 rounded-xl bg-background justify-between",
|
|
10262
10431
|
ref,
|
|
10263
10432
|
...props,
|
|
10264
10433
|
children: [
|
|
10265
|
-
/* @__PURE__ */
|
|
10434
|
+
/* @__PURE__ */ jsxs32("div", { className: "relative", children: [
|
|
10266
10435
|
/* @__PURE__ */ jsx40(
|
|
10267
10436
|
ProgressCircle_default,
|
|
10268
10437
|
{
|
|
@@ -10273,14 +10442,14 @@ var QuizResultPerformance = forwardRef20(
|
|
|
10273
10442
|
label: ""
|
|
10274
10443
|
}
|
|
10275
10444
|
),
|
|
10276
|
-
/* @__PURE__ */
|
|
10277
|
-
/* @__PURE__ */
|
|
10445
|
+
/* @__PURE__ */ jsxs32("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
10446
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-1 mb-1", children: [
|
|
10278
10447
|
/* @__PURE__ */ jsx40(Clock2, { size: 12, weight: "regular", className: "text-text-800" }),
|
|
10279
10448
|
/* @__PURE__ */ jsx40("span", { className: "text-2xs font-medium text-text-800", children: formatTime2(
|
|
10280
10449
|
(getQuestionResultStatistics()?.timeSpent ?? 0) * 60
|
|
10281
10450
|
) })
|
|
10282
10451
|
] }),
|
|
10283
|
-
/* @__PURE__ */
|
|
10452
|
+
/* @__PURE__ */ jsxs32("div", { className: "text-2xl font-medium text-text-800 leading-7", children: [
|
|
10284
10453
|
getQuestionResultStatistics()?.correctAnswers ?? "--",
|
|
10285
10454
|
" de",
|
|
10286
10455
|
" ",
|
|
@@ -10289,7 +10458,7 @@ var QuizResultPerformance = forwardRef20(
|
|
|
10289
10458
|
/* @__PURE__ */ jsx40("div", { className: "text-2xs font-medium text-text-600 mt-1", children: "Corretas" })
|
|
10290
10459
|
] })
|
|
10291
10460
|
] }),
|
|
10292
|
-
/* @__PURE__ */
|
|
10461
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-4 w-full", children: [
|
|
10293
10462
|
/* @__PURE__ */ jsx40(
|
|
10294
10463
|
ProgressBar_default,
|
|
10295
10464
|
{
|
|
@@ -10338,7 +10507,7 @@ var QuizResultPerformance = forwardRef20(
|
|
|
10338
10507
|
);
|
|
10339
10508
|
}
|
|
10340
10509
|
);
|
|
10341
|
-
var QuizListResult =
|
|
10510
|
+
var QuizListResult = forwardRef19(({ className, onSubjectClick, ...props }, ref) => {
|
|
10342
10511
|
const { getQuestionsGroupedBySubject } = useQuizStore();
|
|
10343
10512
|
const groupedQuestions = getQuestionsGroupedBySubject();
|
|
10344
10513
|
const subjectsStats = Object.entries(groupedQuestions).map(
|
|
@@ -10365,7 +10534,7 @@ var QuizListResult = forwardRef20(({ className, onSubjectClick, ...props }, ref)
|
|
|
10365
10534
|
};
|
|
10366
10535
|
}
|
|
10367
10536
|
);
|
|
10368
|
-
return /* @__PURE__ */
|
|
10537
|
+
return /* @__PURE__ */ jsxs32("section", { ref, className, ...props, children: [
|
|
10369
10538
|
/* @__PURE__ */ jsx40("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Mat\xE9rias" }),
|
|
10370
10539
|
/* @__PURE__ */ jsx40("ul", { className: "flex flex-col gap-2", children: subjectsStats.map((subject) => /* @__PURE__ */ jsx40("li", { children: /* @__PURE__ */ jsx40(
|
|
10371
10540
|
CardResults,
|
|
@@ -10389,9 +10558,9 @@ var QuizListResultByMateria = ({
|
|
|
10389
10558
|
const { getQuestionsGroupedBySubject, getQuestionIndex } = useQuizStore();
|
|
10390
10559
|
const groupedQuestions = getQuestionsGroupedBySubject();
|
|
10391
10560
|
const answeredQuestions = groupedQuestions[subject] || [];
|
|
10392
|
-
return /* @__PURE__ */
|
|
10561
|
+
return /* @__PURE__ */ jsxs32("div", { className: "flex flex-col", children: [
|
|
10393
10562
|
/* @__PURE__ */ jsx40("div", { className: "flex flex-row pt-4 justify-between", children: /* @__PURE__ */ jsx40("p", { className: "text-text-950 font-bold text-2xl", children: answeredQuestions?.[0]?.knowledgeMatrix?.[0]?.subject?.name ?? "Sem mat\xE9ria" }) }),
|
|
10394
|
-
/* @__PURE__ */
|
|
10563
|
+
/* @__PURE__ */ jsxs32("section", { className: "flex flex-col ", children: [
|
|
10395
10564
|
/* @__PURE__ */ jsx40("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Resultado das quest\xF5es" }),
|
|
10396
10565
|
/* @__PURE__ */ jsx40("ul", { className: "flex flex-col gap-2 pt-4", children: answeredQuestions.map((question) => {
|
|
10397
10566
|
const questionIndex = getQuestionIndex(
|
|
@@ -10421,9 +10590,9 @@ var QuizListResultByMateria = ({
|
|
|
10421
10590
|
};
|
|
10422
10591
|
|
|
10423
10592
|
// src/components/LoadingModal/loadingModal.tsx
|
|
10424
|
-
import { forwardRef as
|
|
10425
|
-
import { jsx as jsx41, jsxs as
|
|
10426
|
-
var LoadingModal =
|
|
10593
|
+
import { forwardRef as forwardRef20 } from "react";
|
|
10594
|
+
import { jsx as jsx41, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
10595
|
+
var LoadingModal = forwardRef20(
|
|
10427
10596
|
({ open, title = "Titulo...", subtitle = "Subtitulo...", ...props }, ref) => {
|
|
10428
10597
|
if (!open) return null;
|
|
10429
10598
|
return /* @__PURE__ */ jsx41(
|
|
@@ -10435,8 +10604,8 @@ var LoadingModal = forwardRef21(
|
|
|
10435
10604
|
"aria-describedby": "loading-modal-subtitle",
|
|
10436
10605
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-background/90 backdrop-blur-xs",
|
|
10437
10606
|
...props,
|
|
10438
|
-
children: /* @__PURE__ */
|
|
10439
|
-
/* @__PURE__ */ jsx41("span", { className: "animate-spin", "aria-hidden": "true", children: /* @__PURE__ */
|
|
10607
|
+
children: /* @__PURE__ */ jsxs33("div", { className: "w-full max-w-[364px] flex flex-col items-center justify-center gap-14", children: [
|
|
10608
|
+
/* @__PURE__ */ jsx41("span", { className: "animate-spin", "aria-hidden": "true", children: /* @__PURE__ */ jsxs33(
|
|
10440
10609
|
"svg",
|
|
10441
10610
|
{
|
|
10442
10611
|
width: "102",
|
|
@@ -10464,7 +10633,7 @@ var LoadingModal = forwardRef21(
|
|
|
10464
10633
|
]
|
|
10465
10634
|
}
|
|
10466
10635
|
) }),
|
|
10467
|
-
/* @__PURE__ */
|
|
10636
|
+
/* @__PURE__ */ jsxs33("span", { className: "flex flex-col gap-4 text-center", children: [
|
|
10468
10637
|
/* @__PURE__ */ jsx41("p", { id: "loading-modal-title", className: "text-text-950 text-lg", children: title }),
|
|
10469
10638
|
/* @__PURE__ */ jsx41("p", { id: "loading-modal-subtitle", className: "text-text-600 text-lg", children: subtitle })
|
|
10470
10639
|
] })
|
|
@@ -10477,7 +10646,7 @@ var loadingModal_default = LoadingModal;
|
|
|
10477
10646
|
|
|
10478
10647
|
// src/components/NotificationCard/NotificationCard.tsx
|
|
10479
10648
|
import { DotsThreeVertical as DotsThreeVertical3, Bell as Bell2 } from "phosphor-react";
|
|
10480
|
-
import { useState as
|
|
10649
|
+
import { useState as useState20, useEffect as useEffect18 } from "react";
|
|
10481
10650
|
|
|
10482
10651
|
// src/store/notificationStore.ts
|
|
10483
10652
|
import { create as create8 } from "zustand";
|
|
@@ -10720,13 +10889,13 @@ var createNotificationStore = (apiClient) => {
|
|
|
10720
10889
|
};
|
|
10721
10890
|
|
|
10722
10891
|
// src/components/NotificationCard/NotificationCard.tsx
|
|
10723
|
-
import { Fragment as Fragment11, jsx as jsx42, jsxs as
|
|
10892
|
+
import { Fragment as Fragment11, jsx as jsx42, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
10724
10893
|
var NotificationEmpty = ({
|
|
10725
10894
|
emptyStateImage,
|
|
10726
10895
|
emptyStateTitle = "Nenhuma notifica\xE7\xE3o no momento",
|
|
10727
10896
|
emptyStateDescription = "Voc\xEA est\xE1 em dia com todas as novidades. Volte depois para conferir atualiza\xE7\xF5es!"
|
|
10728
10897
|
}) => {
|
|
10729
|
-
return /* @__PURE__ */
|
|
10898
|
+
return /* @__PURE__ */ jsxs34("div", { className: "flex flex-col items-center justify-center gap-4 p-6 w-full", children: [
|
|
10730
10899
|
emptyStateImage && /* @__PURE__ */ jsx42("div", { className: "w-20 h-20 flex items-center justify-center", children: /* @__PURE__ */ jsx42(
|
|
10731
10900
|
"img",
|
|
10732
10901
|
{
|
|
@@ -10745,7 +10914,7 @@ var NotificationHeader = ({
|
|
|
10745
10914
|
unreadCount,
|
|
10746
10915
|
variant = "modal"
|
|
10747
10916
|
}) => {
|
|
10748
|
-
return /* @__PURE__ */
|
|
10917
|
+
return /* @__PURE__ */ jsxs34("div", { className: "flex items-center justify-between gap-2", children: [
|
|
10749
10918
|
variant === "modal" ? /* @__PURE__ */ jsx42(Text_default, { size: "sm", weight: "bold", className: "text-text-950", children: "Notifica\xE7\xF5es" }) : /* @__PURE__ */ jsx42("h3", { className: "text-sm font-semibold text-text-950", children: "Notifica\xE7\xF5es" }),
|
|
10750
10919
|
unreadCount > 0 && /* @__PURE__ */ jsx42(
|
|
10751
10920
|
Badge_default,
|
|
@@ -10789,7 +10958,7 @@ var SingleNotificationCard = ({
|
|
|
10789
10958
|
onNavigate();
|
|
10790
10959
|
}
|
|
10791
10960
|
};
|
|
10792
|
-
return /* @__PURE__ */
|
|
10961
|
+
return /* @__PURE__ */ jsxs34(
|
|
10793
10962
|
"div",
|
|
10794
10963
|
{
|
|
10795
10964
|
className: cn(
|
|
@@ -10798,10 +10967,10 @@ var SingleNotificationCard = ({
|
|
|
10798
10967
|
className
|
|
10799
10968
|
),
|
|
10800
10969
|
children: [
|
|
10801
|
-
/* @__PURE__ */
|
|
10970
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-2 w-full", children: [
|
|
10802
10971
|
!isRead && /* @__PURE__ */ jsx42("div", { className: "w-[7px] h-[7px] bg-info-300 rounded-full flex-shrink-0" }),
|
|
10803
10972
|
/* @__PURE__ */ jsx42("h3", { className: "font-bold text-sm leading-4 text-text-950 flex-grow", children: title }),
|
|
10804
|
-
/* @__PURE__ */
|
|
10973
|
+
/* @__PURE__ */ jsxs34(DropdownMenu_default, { children: [
|
|
10805
10974
|
/* @__PURE__ */ jsx42(
|
|
10806
10975
|
DropdownMenuTrigger,
|
|
10807
10976
|
{
|
|
@@ -10810,7 +10979,7 @@ var SingleNotificationCard = ({
|
|
|
10810
10979
|
children: /* @__PURE__ */ jsx42(DotsThreeVertical3, { size: 24 })
|
|
10811
10980
|
}
|
|
10812
10981
|
),
|
|
10813
|
-
/* @__PURE__ */
|
|
10982
|
+
/* @__PURE__ */ jsxs34(DropdownMenuContent, { align: "end", className: "min-w-[160px]", children: [
|
|
10814
10983
|
!isRead && /* @__PURE__ */ jsx42(
|
|
10815
10984
|
DropdownMenuItem,
|
|
10816
10985
|
{
|
|
@@ -10824,7 +10993,7 @@ var SingleNotificationCard = ({
|
|
|
10824
10993
|
] })
|
|
10825
10994
|
] }),
|
|
10826
10995
|
/* @__PURE__ */ jsx42("p", { className: "text-sm leading-[21px] text-text-800 w-full", children: message }),
|
|
10827
|
-
/* @__PURE__ */
|
|
10996
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex items-center justify-between w-full", children: [
|
|
10828
10997
|
/* @__PURE__ */ jsx42("span", { className: "text-sm font-medium text-text-400", children: time }),
|
|
10829
10998
|
onNavigate && actionLabel && /* @__PURE__ */ jsx42(
|
|
10830
10999
|
"button",
|
|
@@ -10853,7 +11022,7 @@ var NotificationList = ({
|
|
|
10853
11022
|
className
|
|
10854
11023
|
}) => {
|
|
10855
11024
|
if (error) {
|
|
10856
|
-
return /* @__PURE__ */
|
|
11025
|
+
return /* @__PURE__ */ jsxs34("div", { className: "flex flex-col items-center gap-4 p-6 w-full", children: [
|
|
10857
11026
|
/* @__PURE__ */ jsx42("p", { className: "text-sm text-error-600", children: error }),
|
|
10858
11027
|
onRetry && /* @__PURE__ */ jsx42(
|
|
10859
11028
|
"button",
|
|
@@ -10880,7 +11049,7 @@ var NotificationList = ({
|
|
|
10880
11049
|
if (!groupedNotifications || groupedNotifications.length === 0) {
|
|
10881
11050
|
return renderEmpty ? /* @__PURE__ */ jsx42("div", { className: "w-full", children: renderEmpty() }) : /* @__PURE__ */ jsx42(NotificationEmpty, {});
|
|
10882
11051
|
}
|
|
10883
|
-
return /* @__PURE__ */ jsx42("div", { className: cn("flex flex-col gap-0 w-full", className), children: groupedNotifications.map((group, idx) => /* @__PURE__ */
|
|
11052
|
+
return /* @__PURE__ */ jsx42("div", { className: cn("flex flex-col gap-0 w-full", className), children: groupedNotifications.map((group, idx) => /* @__PURE__ */ jsxs34("div", { className: "flex flex-col", children: [
|
|
10884
11053
|
/* @__PURE__ */ jsx42("div", { className: "flex items-end px-4 py-6 pb-4", children: /* @__PURE__ */ jsx42("h4", { className: "text-lg font-bold text-text-500 flex-grow", children: group.label }) }),
|
|
10885
11054
|
group.notifications.map((notification) => /* @__PURE__ */ jsx42(
|
|
10886
11055
|
SingleNotificationCard,
|
|
@@ -10923,7 +11092,7 @@ var NotificationCenter = ({
|
|
|
10923
11092
|
className
|
|
10924
11093
|
}) => {
|
|
10925
11094
|
const { isMobile } = useMobile();
|
|
10926
|
-
const [isModalOpen, setIsModalOpen] =
|
|
11095
|
+
const [isModalOpen, setIsModalOpen] = useState20(false);
|
|
10927
11096
|
const handleMobileClick = () => {
|
|
10928
11097
|
setIsModalOpen(true);
|
|
10929
11098
|
onFetchNotifications?.();
|
|
@@ -10931,7 +11100,7 @@ var NotificationCenter = ({
|
|
|
10931
11100
|
const handleDesktopClick = () => {
|
|
10932
11101
|
onToggleActive?.();
|
|
10933
11102
|
};
|
|
10934
|
-
|
|
11103
|
+
useEffect18(() => {
|
|
10935
11104
|
if (isActive) {
|
|
10936
11105
|
onFetchNotifications?.();
|
|
10937
11106
|
}
|
|
@@ -10949,7 +11118,7 @@ var NotificationCenter = ({
|
|
|
10949
11118
|
}
|
|
10950
11119
|
);
|
|
10951
11120
|
if (isMobile) {
|
|
10952
|
-
return /* @__PURE__ */
|
|
11121
|
+
return /* @__PURE__ */ jsxs34(Fragment11, { children: [
|
|
10953
11122
|
/* @__PURE__ */ jsx42(
|
|
10954
11123
|
IconButton_default,
|
|
10955
11124
|
{
|
|
@@ -10967,10 +11136,9 @@ var NotificationCenter = ({
|
|
|
10967
11136
|
title: "Notifica\xE7\xF5es",
|
|
10968
11137
|
size: "md",
|
|
10969
11138
|
hideCloseButton: false,
|
|
10970
|
-
closeOnBackdropClick: true,
|
|
10971
11139
|
closeOnEscape: true,
|
|
10972
|
-
children: /* @__PURE__ */
|
|
10973
|
-
/* @__PURE__ */
|
|
11140
|
+
children: /* @__PURE__ */ jsxs34("div", { className: "flex flex-col h-full max-h-[80vh]", children: [
|
|
11141
|
+
/* @__PURE__ */ jsxs34("div", { className: "px-0 pb-3 border-b border-border-200", children: [
|
|
10974
11142
|
/* @__PURE__ */ jsx42(NotificationHeader, { unreadCount, variant: "modal" }),
|
|
10975
11143
|
unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */ jsx42(
|
|
10976
11144
|
"button",
|
|
@@ -11005,7 +11173,7 @@ var NotificationCenter = ({
|
|
|
11005
11173
|
)
|
|
11006
11174
|
] });
|
|
11007
11175
|
}
|
|
11008
|
-
return /* @__PURE__ */
|
|
11176
|
+
return /* @__PURE__ */ jsxs34(DropdownMenu_default, { children: [
|
|
11009
11177
|
/* @__PURE__ */ jsx42(DropdownMenuTrigger, { className: "text-primary cursor-pointer", children: /* @__PURE__ */ jsx42(
|
|
11010
11178
|
IconButton_default,
|
|
11011
11179
|
{
|
|
@@ -11027,8 +11195,8 @@ var NotificationCenter = ({
|
|
|
11027
11195
|
className: "min-w-[320px] max-w-[400px] max-h-[500px] overflow-hidden",
|
|
11028
11196
|
side: "bottom",
|
|
11029
11197
|
align: "end",
|
|
11030
|
-
children: /* @__PURE__ */
|
|
11031
|
-
/* @__PURE__ */
|
|
11198
|
+
children: /* @__PURE__ */ jsxs34("div", { className: "flex flex-col", children: [
|
|
11199
|
+
/* @__PURE__ */ jsxs34("div", { className: "px-4 py-3 border-b border-border-200", children: [
|
|
11032
11200
|
/* @__PURE__ */ jsx42(NotificationHeader, { unreadCount, variant: "dropdown" }),
|
|
11033
11201
|
unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */ jsx42(
|
|
11034
11202
|
"button",
|
|
@@ -11271,6 +11439,7 @@ export {
|
|
|
11271
11439
|
ProfileMenuHeader,
|
|
11272
11440
|
ProfileMenuSection,
|
|
11273
11441
|
ProfileMenuTrigger,
|
|
11442
|
+
ProfileToggleTheme,
|
|
11274
11443
|
ProgressBar_default as ProgressBar,
|
|
11275
11444
|
ProgressCircle_default as ProgressCircle,
|
|
11276
11445
|
ProtectedRoute,
|