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.js
CHANGED
|
@@ -80,6 +80,7 @@ __export(src_exports, {
|
|
|
80
80
|
ProfileMenuHeader: () => ProfileMenuHeader,
|
|
81
81
|
ProfileMenuSection: () => ProfileMenuSection,
|
|
82
82
|
ProfileMenuTrigger: () => ProfileMenuTrigger,
|
|
83
|
+
ProfileToggleTheme: () => ProfileToggleTheme,
|
|
83
84
|
ProgressBar: () => ProgressBar_default,
|
|
84
85
|
ProgressCircle: () => ProgressCircle_default,
|
|
85
86
|
ProtectedRoute: () => ProtectedRoute,
|
|
@@ -1913,14 +1914,397 @@ var Input = (0, import_react9.forwardRef)(
|
|
|
1913
1914
|
var Input_default = Input;
|
|
1914
1915
|
|
|
1915
1916
|
// src/components/Search/Search.tsx
|
|
1916
|
-
var
|
|
1917
|
-
var
|
|
1917
|
+
var import_phosphor_react10 = require("phosphor-react");
|
|
1918
|
+
var import_react14 = require("react");
|
|
1918
1919
|
|
|
1919
1920
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
1920
|
-
var
|
|
1921
|
-
var
|
|
1921
|
+
var import_phosphor_react9 = require("phosphor-react");
|
|
1922
|
+
var import_react13 = require("react");
|
|
1922
1923
|
var import_zustand4 = require("zustand");
|
|
1924
|
+
|
|
1925
|
+
// src/components/Modal/Modal.tsx
|
|
1926
|
+
var import_react10 = require("react");
|
|
1927
|
+
var import_phosphor_react7 = require("phosphor-react");
|
|
1928
|
+
|
|
1929
|
+
// src/components/Modal/utils/videoUtils.ts
|
|
1930
|
+
var isYouTubeUrl = (url) => {
|
|
1931
|
+
const youtubeRegex = /^(https?:\/\/)?((www|m|music)\.)?(youtube\.com|youtu\.be|youtube-nocookie\.com)\/.+/i;
|
|
1932
|
+
return youtubeRegex.test(url);
|
|
1933
|
+
};
|
|
1934
|
+
var isValidYouTubeHost = (host) => {
|
|
1935
|
+
if (host === "youtu.be") return "youtu.be";
|
|
1936
|
+
const isValidYouTubeCom = host === "youtube.com" || host.endsWith(".youtube.com") && /^(www|m|music)\.youtube\.com$/.test(host);
|
|
1937
|
+
if (isValidYouTubeCom) return "youtube";
|
|
1938
|
+
const isValidNoCookie = host === "youtube-nocookie.com" || host.endsWith(".youtube-nocookie.com") && /^(www|m|music)\.youtube-nocookie\.com$/.test(host);
|
|
1939
|
+
if (isValidNoCookie) return "nocookie";
|
|
1940
|
+
return null;
|
|
1941
|
+
};
|
|
1942
|
+
var extractYoutuBeId = (pathname) => {
|
|
1943
|
+
const firstSeg = pathname.split("/").filter(Boolean)[0];
|
|
1944
|
+
return firstSeg || null;
|
|
1945
|
+
};
|
|
1946
|
+
var extractYouTubeId = (pathname, searchParams) => {
|
|
1947
|
+
const parts = pathname.split("/").filter(Boolean);
|
|
1948
|
+
const [first, second] = parts;
|
|
1949
|
+
if (first === "embed" && second) return second;
|
|
1950
|
+
if (first === "shorts" && second) return second;
|
|
1951
|
+
if (first === "live" && second) return second;
|
|
1952
|
+
const v = searchParams.get("v");
|
|
1953
|
+
if (v) return v;
|
|
1954
|
+
return null;
|
|
1955
|
+
};
|
|
1956
|
+
var getYouTubeVideoId = (url) => {
|
|
1957
|
+
try {
|
|
1958
|
+
const u = new URL(url);
|
|
1959
|
+
const hostType = isValidYouTubeHost(u.hostname.toLowerCase());
|
|
1960
|
+
if (!hostType) return null;
|
|
1961
|
+
if (hostType === "youtu.be") {
|
|
1962
|
+
return extractYoutuBeId(u.pathname);
|
|
1963
|
+
}
|
|
1964
|
+
return extractYouTubeId(u.pathname, u.searchParams);
|
|
1965
|
+
} catch {
|
|
1966
|
+
return null;
|
|
1967
|
+
}
|
|
1968
|
+
};
|
|
1969
|
+
var getYouTubeEmbedUrl = (videoId) => {
|
|
1970
|
+
return `https://www.youtube-nocookie.com/embed/${videoId}?autoplay=0&rel=0&modestbranding=1`;
|
|
1971
|
+
};
|
|
1972
|
+
|
|
1973
|
+
// src/components/Modal/Modal.tsx
|
|
1923
1974
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1975
|
+
var SIZE_CLASSES7 = {
|
|
1976
|
+
xs: "max-w-[360px]",
|
|
1977
|
+
sm: "max-w-[420px]",
|
|
1978
|
+
md: "max-w-[510px]",
|
|
1979
|
+
lg: "max-w-[640px]",
|
|
1980
|
+
xl: "max-w-[970px]"
|
|
1981
|
+
};
|
|
1982
|
+
var Modal = ({
|
|
1983
|
+
isOpen,
|
|
1984
|
+
onClose,
|
|
1985
|
+
title,
|
|
1986
|
+
children,
|
|
1987
|
+
size = "md",
|
|
1988
|
+
className = "",
|
|
1989
|
+
closeOnEscape = true,
|
|
1990
|
+
footer,
|
|
1991
|
+
hideCloseButton = false,
|
|
1992
|
+
variant = "default",
|
|
1993
|
+
description,
|
|
1994
|
+
image,
|
|
1995
|
+
imageAlt,
|
|
1996
|
+
actionLink,
|
|
1997
|
+
actionLabel
|
|
1998
|
+
}) => {
|
|
1999
|
+
const titleId = (0, import_react10.useId)();
|
|
2000
|
+
(0, import_react10.useEffect)(() => {
|
|
2001
|
+
if (!isOpen || !closeOnEscape) return;
|
|
2002
|
+
const handleEscape = (event) => {
|
|
2003
|
+
if (event.key === "Escape") {
|
|
2004
|
+
onClose();
|
|
2005
|
+
}
|
|
2006
|
+
};
|
|
2007
|
+
document.addEventListener("keydown", handleEscape);
|
|
2008
|
+
return () => document.removeEventListener("keydown", handleEscape);
|
|
2009
|
+
}, [isOpen, closeOnEscape, onClose]);
|
|
2010
|
+
(0, import_react10.useEffect)(() => {
|
|
2011
|
+
const originalOverflow = document.body.style.overflow;
|
|
2012
|
+
if (isOpen) {
|
|
2013
|
+
document.body.style.overflow = "hidden";
|
|
2014
|
+
} else {
|
|
2015
|
+
document.body.style.overflow = originalOverflow;
|
|
2016
|
+
}
|
|
2017
|
+
return () => {
|
|
2018
|
+
document.body.style.overflow = originalOverflow;
|
|
2019
|
+
};
|
|
2020
|
+
}, [isOpen]);
|
|
2021
|
+
if (!isOpen) return null;
|
|
2022
|
+
const sizeClasses = SIZE_CLASSES7[size];
|
|
2023
|
+
const baseClasses = "bg-secondary-50 rounded-3xl shadow-hard-shadow-2 border border-border-100 w-full mx-4";
|
|
2024
|
+
const dialogResetClasses = "p-0 m-0 border-none outline-none max-h-none static";
|
|
2025
|
+
const modalClasses = cn(
|
|
2026
|
+
baseClasses,
|
|
2027
|
+
sizeClasses,
|
|
2028
|
+
dialogResetClasses,
|
|
2029
|
+
className
|
|
2030
|
+
);
|
|
2031
|
+
const normalizeUrl = (href) => /^https?:\/\//i.test(href) ? href : `https://${href}`;
|
|
2032
|
+
const handleActionClick = () => {
|
|
2033
|
+
if (actionLink) {
|
|
2034
|
+
window.open(normalizeUrl(actionLink), "_blank", "noopener,noreferrer");
|
|
2035
|
+
}
|
|
2036
|
+
};
|
|
2037
|
+
if (variant === "activity") {
|
|
2038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("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__ */ (0, import_jsx_runtime18.jsxs)(
|
|
2039
|
+
"dialog",
|
|
2040
|
+
{
|
|
2041
|
+
className: modalClasses,
|
|
2042
|
+
"aria-labelledby": titleId,
|
|
2043
|
+
"aria-modal": "true",
|
|
2044
|
+
open: true,
|
|
2045
|
+
children: [
|
|
2046
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex justify-end p-6 pb-0", children: !hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2047
|
+
"button",
|
|
2048
|
+
{
|
|
2049
|
+
onClick: onClose,
|
|
2050
|
+
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",
|
|
2051
|
+
"aria-label": "Fechar modal",
|
|
2052
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_phosphor_react7.X, { size: 18 })
|
|
2053
|
+
}
|
|
2054
|
+
) }),
|
|
2055
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col items-center px-6 pb-6 gap-5", children: [
|
|
2056
|
+
image && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2057
|
+
"img",
|
|
2058
|
+
{
|
|
2059
|
+
src: image,
|
|
2060
|
+
alt: imageAlt ?? "",
|
|
2061
|
+
className: "w-[122px] h-[122px] object-contain"
|
|
2062
|
+
}
|
|
2063
|
+
) }),
|
|
2064
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2065
|
+
"h2",
|
|
2066
|
+
{
|
|
2067
|
+
id: titleId,
|
|
2068
|
+
className: "text-lg font-semibold text-text-950 text-center",
|
|
2069
|
+
children: title
|
|
2070
|
+
}
|
|
2071
|
+
),
|
|
2072
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-sm font-normal text-text-400 text-center max-w-md leading-[21px]", children: description }),
|
|
2073
|
+
actionLink && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "w-full", children: [
|
|
2074
|
+
(() => {
|
|
2075
|
+
const normalized = normalizeUrl(actionLink);
|
|
2076
|
+
const isYT = isYouTubeUrl(normalized);
|
|
2077
|
+
if (!isYT) return null;
|
|
2078
|
+
const id = getYouTubeVideoId(normalized);
|
|
2079
|
+
if (!id) {
|
|
2080
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2081
|
+
Button_default,
|
|
2082
|
+
{
|
|
2083
|
+
variant: "solid",
|
|
2084
|
+
action: "primary",
|
|
2085
|
+
size: "large",
|
|
2086
|
+
className: "w-full",
|
|
2087
|
+
onClick: handleActionClick,
|
|
2088
|
+
children: actionLabel || "Iniciar Atividade"
|
|
2089
|
+
}
|
|
2090
|
+
);
|
|
2091
|
+
}
|
|
2092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2093
|
+
"iframe",
|
|
2094
|
+
{
|
|
2095
|
+
src: getYouTubeEmbedUrl(id),
|
|
2096
|
+
className: "w-full aspect-video rounded-lg",
|
|
2097
|
+
allowFullScreen: true,
|
|
2098
|
+
allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
|
|
2099
|
+
title: "V\xEDdeo YouTube"
|
|
2100
|
+
}
|
|
2101
|
+
);
|
|
2102
|
+
})(),
|
|
2103
|
+
!isYouTubeUrl(normalizeUrl(actionLink)) && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2104
|
+
Button_default,
|
|
2105
|
+
{
|
|
2106
|
+
variant: "solid",
|
|
2107
|
+
action: "primary",
|
|
2108
|
+
size: "large",
|
|
2109
|
+
className: "w-full",
|
|
2110
|
+
onClick: handleActionClick,
|
|
2111
|
+
children: actionLabel || "Iniciar Atividade"
|
|
2112
|
+
}
|
|
2113
|
+
)
|
|
2114
|
+
] })
|
|
2115
|
+
] })
|
|
2116
|
+
]
|
|
2117
|
+
}
|
|
2118
|
+
) });
|
|
2119
|
+
}
|
|
2120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("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__ */ (0, import_jsx_runtime18.jsxs)(
|
|
2121
|
+
"dialog",
|
|
2122
|
+
{
|
|
2123
|
+
className: modalClasses,
|
|
2124
|
+
"aria-labelledby": titleId,
|
|
2125
|
+
"aria-modal": "true",
|
|
2126
|
+
open: true,
|
|
2127
|
+
children: [
|
|
2128
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center justify-between px-6 py-6", children: [
|
|
2129
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h2", { id: titleId, className: "text-lg font-semibold text-text-950", children: title }),
|
|
2130
|
+
!hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2131
|
+
"button",
|
|
2132
|
+
{
|
|
2133
|
+
onClick: onClose,
|
|
2134
|
+
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",
|
|
2135
|
+
"aria-label": "Fechar modal",
|
|
2136
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_phosphor_react7.X, { size: 18 })
|
|
2137
|
+
}
|
|
2138
|
+
)
|
|
2139
|
+
] }),
|
|
2140
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "px-6 pb-6", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "text-text-500 font-normal text-sm leading-6", children }) }),
|
|
2141
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex justify-end gap-3 px-6 pb-6", children: footer })
|
|
2142
|
+
]
|
|
2143
|
+
}
|
|
2144
|
+
) });
|
|
2145
|
+
};
|
|
2146
|
+
var Modal_default = Modal;
|
|
2147
|
+
|
|
2148
|
+
// src/components/ThemeToggle/ThemeToggle.tsx
|
|
2149
|
+
var import_phosphor_react8 = require("phosphor-react");
|
|
2150
|
+
var import_react12 = require("react");
|
|
2151
|
+
|
|
2152
|
+
// src/hooks/useTheme.ts
|
|
2153
|
+
var import_react11 = require("react");
|
|
2154
|
+
var useTheme = () => {
|
|
2155
|
+
const [themeMode, setThemeMode] = (0, import_react11.useState)("system");
|
|
2156
|
+
const [isDark, setIsDark] = (0, import_react11.useState)(false);
|
|
2157
|
+
const themeModeRef = (0, import_react11.useRef)("system");
|
|
2158
|
+
const applyTheme = (0, import_react11.useCallback)((mode) => {
|
|
2159
|
+
const htmlElement = document.documentElement;
|
|
2160
|
+
const originalTheme = htmlElement.getAttribute("data-original-theme");
|
|
2161
|
+
if (mode === "dark") {
|
|
2162
|
+
htmlElement.setAttribute("data-theme", "dark");
|
|
2163
|
+
setIsDark(true);
|
|
2164
|
+
} else if (mode === "light") {
|
|
2165
|
+
if (originalTheme) {
|
|
2166
|
+
htmlElement.setAttribute("data-theme", originalTheme);
|
|
2167
|
+
}
|
|
2168
|
+
setIsDark(false);
|
|
2169
|
+
} else if (mode === "system") {
|
|
2170
|
+
const isSystemDark = window.matchMedia(
|
|
2171
|
+
"(prefers-color-scheme: dark)"
|
|
2172
|
+
).matches;
|
|
2173
|
+
if (isSystemDark) {
|
|
2174
|
+
htmlElement.setAttribute("data-theme", "dark");
|
|
2175
|
+
setIsDark(true);
|
|
2176
|
+
} else if (originalTheme) {
|
|
2177
|
+
htmlElement.setAttribute("data-theme", originalTheme);
|
|
2178
|
+
setIsDark(false);
|
|
2179
|
+
}
|
|
2180
|
+
}
|
|
2181
|
+
}, []);
|
|
2182
|
+
const toggleTheme = (0, import_react11.useCallback)(() => {
|
|
2183
|
+
let newMode;
|
|
2184
|
+
if (themeMode === "light") {
|
|
2185
|
+
newMode = "dark";
|
|
2186
|
+
} else if (themeMode === "dark") {
|
|
2187
|
+
newMode = "light";
|
|
2188
|
+
} else {
|
|
2189
|
+
newMode = "dark";
|
|
2190
|
+
}
|
|
2191
|
+
setThemeMode(newMode);
|
|
2192
|
+
themeModeRef.current = newMode;
|
|
2193
|
+
applyTheme(newMode);
|
|
2194
|
+
localStorage.setItem("theme-mode", newMode);
|
|
2195
|
+
}, [themeMode, applyTheme]);
|
|
2196
|
+
const setTheme = (0, import_react11.useCallback)(
|
|
2197
|
+
(mode) => {
|
|
2198
|
+
setThemeMode(mode);
|
|
2199
|
+
themeModeRef.current = mode;
|
|
2200
|
+
applyTheme(mode);
|
|
2201
|
+
localStorage.setItem("theme-mode", mode);
|
|
2202
|
+
},
|
|
2203
|
+
[applyTheme]
|
|
2204
|
+
);
|
|
2205
|
+
(0, import_react11.useEffect)(() => {
|
|
2206
|
+
const htmlElement = document.documentElement;
|
|
2207
|
+
const currentTheme = htmlElement.getAttribute("data-theme");
|
|
2208
|
+
if (currentTheme && !htmlElement.getAttribute("data-original-theme")) {
|
|
2209
|
+
htmlElement.setAttribute("data-original-theme", currentTheme);
|
|
2210
|
+
}
|
|
2211
|
+
const savedThemeMode = localStorage.getItem("theme-mode");
|
|
2212
|
+
const initialMode = savedThemeMode || "system";
|
|
2213
|
+
if (!savedThemeMode) {
|
|
2214
|
+
localStorage.setItem("theme-mode", "system");
|
|
2215
|
+
}
|
|
2216
|
+
setThemeMode(initialMode);
|
|
2217
|
+
themeModeRef.current = initialMode;
|
|
2218
|
+
applyTheme(initialMode);
|
|
2219
|
+
const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
|
2220
|
+
const handleSystemThemeChange = () => {
|
|
2221
|
+
if (themeModeRef.current === "system") {
|
|
2222
|
+
applyTheme("system");
|
|
2223
|
+
}
|
|
2224
|
+
};
|
|
2225
|
+
mediaQuery.addEventListener("change", handleSystemThemeChange);
|
|
2226
|
+
return () => {
|
|
2227
|
+
mediaQuery.removeEventListener("change", handleSystemThemeChange);
|
|
2228
|
+
};
|
|
2229
|
+
}, [applyTheme]);
|
|
2230
|
+
return {
|
|
2231
|
+
themeMode,
|
|
2232
|
+
isDark,
|
|
2233
|
+
toggleTheme,
|
|
2234
|
+
setTheme
|
|
2235
|
+
};
|
|
2236
|
+
};
|
|
2237
|
+
|
|
2238
|
+
// src/components/ThemeToggle/ThemeToggle.tsx
|
|
2239
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2240
|
+
var ThemeToggle = ({
|
|
2241
|
+
variant = "default",
|
|
2242
|
+
onToggle
|
|
2243
|
+
}) => {
|
|
2244
|
+
const { themeMode, setTheme } = useTheme();
|
|
2245
|
+
const [tempTheme, setTempTheme] = (0, import_react12.useState)(themeMode);
|
|
2246
|
+
(0, import_react12.useEffect)(() => {
|
|
2247
|
+
setTempTheme(themeMode);
|
|
2248
|
+
}, [themeMode]);
|
|
2249
|
+
const problemTypes = [
|
|
2250
|
+
{
|
|
2251
|
+
id: "light",
|
|
2252
|
+
title: "Claro",
|
|
2253
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_phosphor_react8.Sun, { size: 24 })
|
|
2254
|
+
},
|
|
2255
|
+
{
|
|
2256
|
+
id: "dark",
|
|
2257
|
+
title: "Escuro",
|
|
2258
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_phosphor_react8.Moon, { size: 24 })
|
|
2259
|
+
},
|
|
2260
|
+
{
|
|
2261
|
+
id: "system",
|
|
2262
|
+
title: "Sistema",
|
|
2263
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2264
|
+
"svg",
|
|
2265
|
+
{
|
|
2266
|
+
width: "25",
|
|
2267
|
+
height: "25",
|
|
2268
|
+
viewBox: "0 0 25 25",
|
|
2269
|
+
fill: "none",
|
|
2270
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2271
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2272
|
+
"path",
|
|
2273
|
+
{
|
|
2274
|
+
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",
|
|
2275
|
+
fill: "#525252"
|
|
2276
|
+
}
|
|
2277
|
+
)
|
|
2278
|
+
}
|
|
2279
|
+
)
|
|
2280
|
+
}
|
|
2281
|
+
];
|
|
2282
|
+
const handleThemeSelect = (selectedTheme) => {
|
|
2283
|
+
if (variant === "with-save") {
|
|
2284
|
+
setTempTheme(selectedTheme);
|
|
2285
|
+
} else {
|
|
2286
|
+
setTheme(selectedTheme);
|
|
2287
|
+
}
|
|
2288
|
+
if (onToggle) {
|
|
2289
|
+
onToggle(selectedTheme);
|
|
2290
|
+
}
|
|
2291
|
+
};
|
|
2292
|
+
const currentTheme = variant === "with-save" ? tempTheme : themeMode;
|
|
2293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "flex flex-row gap-2 sm:gap-4 py-2", children: problemTypes.map((type) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2294
|
+
SelectionButton_default,
|
|
2295
|
+
{
|
|
2296
|
+
icon: type.icon,
|
|
2297
|
+
label: type.title,
|
|
2298
|
+
selected: currentTheme === type.id,
|
|
2299
|
+
onClick: () => handleThemeSelect(type.id),
|
|
2300
|
+
className: "w-full p-2 sm:p-4"
|
|
2301
|
+
},
|
|
2302
|
+
type.id
|
|
2303
|
+
)) });
|
|
2304
|
+
};
|
|
2305
|
+
|
|
2306
|
+
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
2307
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1924
2308
|
function createDropdownStore() {
|
|
1925
2309
|
return (0, import_zustand4.create)((set) => ({
|
|
1926
2310
|
open: false,
|
|
@@ -1936,8 +2320,8 @@ var useDropdownStore = (externalStore) => {
|
|
|
1936
2320
|
return externalStore;
|
|
1937
2321
|
};
|
|
1938
2322
|
var injectStore3 = (children, store) => {
|
|
1939
|
-
return
|
|
1940
|
-
if ((0,
|
|
2323
|
+
return import_react13.Children.map(children, (child) => {
|
|
2324
|
+
if ((0, import_react13.isValidElement)(child)) {
|
|
1941
2325
|
const typedChild = child;
|
|
1942
2326
|
const newProps = {
|
|
1943
2327
|
store
|
|
@@ -1945,7 +2329,7 @@ var injectStore3 = (children, store) => {
|
|
|
1945
2329
|
if (typedChild.props.children) {
|
|
1946
2330
|
newProps.children = injectStore3(typedChild.props.children, store);
|
|
1947
2331
|
}
|
|
1948
|
-
return (0,
|
|
2332
|
+
return (0, import_react13.cloneElement)(typedChild, newProps);
|
|
1949
2333
|
}
|
|
1950
2334
|
return child;
|
|
1951
2335
|
});
|
|
@@ -1955,14 +2339,14 @@ var DropdownMenu = ({
|
|
|
1955
2339
|
open: propOpen,
|
|
1956
2340
|
onOpenChange
|
|
1957
2341
|
}) => {
|
|
1958
|
-
const storeRef = (0,
|
|
2342
|
+
const storeRef = (0, import_react13.useRef)(null);
|
|
1959
2343
|
storeRef.current ??= createDropdownStore();
|
|
1960
2344
|
const store = storeRef.current;
|
|
1961
2345
|
const { open, setOpen: storeSetOpen } = (0, import_zustand4.useStore)(store, (s) => s);
|
|
1962
2346
|
const setOpen = (newOpen) => {
|
|
1963
2347
|
storeSetOpen(newOpen);
|
|
1964
2348
|
};
|
|
1965
|
-
const menuRef = (0,
|
|
2349
|
+
const menuRef = (0, import_react13.useRef)(null);
|
|
1966
2350
|
const handleArrowDownOrArrowUp = (event) => {
|
|
1967
2351
|
const menuContent = menuRef.current?.querySelector('[role="menu"]');
|
|
1968
2352
|
if (menuContent) {
|
|
@@ -1996,7 +2380,7 @@ var DropdownMenu = ({
|
|
|
1996
2380
|
setOpen(false);
|
|
1997
2381
|
}
|
|
1998
2382
|
};
|
|
1999
|
-
(0,
|
|
2383
|
+
(0, import_react13.useEffect)(() => {
|
|
2000
2384
|
if (open) {
|
|
2001
2385
|
document.addEventListener("mousedown", handleClickOutside);
|
|
2002
2386
|
document.addEventListener("keydown", handleDownkey);
|
|
@@ -2006,16 +2390,16 @@ var DropdownMenu = ({
|
|
|
2006
2390
|
document.removeEventListener("keydown", handleDownkey);
|
|
2007
2391
|
};
|
|
2008
2392
|
}, [open]);
|
|
2009
|
-
(0,
|
|
2393
|
+
(0, import_react13.useEffect)(() => {
|
|
2010
2394
|
setOpen(open);
|
|
2011
2395
|
onOpenChange?.(open);
|
|
2012
2396
|
}, [open, onOpenChange]);
|
|
2013
|
-
(0,
|
|
2397
|
+
(0, import_react13.useEffect)(() => {
|
|
2014
2398
|
if (propOpen) {
|
|
2015
2399
|
setOpen(propOpen);
|
|
2016
2400
|
}
|
|
2017
2401
|
}, [propOpen]);
|
|
2018
|
-
return /* @__PURE__ */ (0,
|
|
2402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "relative", ref: menuRef, children: injectStore3(children, store) });
|
|
2019
2403
|
};
|
|
2020
2404
|
var DropdownMenuTrigger = ({
|
|
2021
2405
|
className,
|
|
@@ -2027,7 +2411,7 @@ var DropdownMenuTrigger = ({
|
|
|
2027
2411
|
const store = useDropdownStore(externalStore);
|
|
2028
2412
|
const open = (0, import_zustand4.useStore)(store, (s) => s.open);
|
|
2029
2413
|
const toggleOpen = () => store.setState({ open: !open });
|
|
2030
|
-
return /* @__PURE__ */ (0,
|
|
2414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2031
2415
|
"button",
|
|
2032
2416
|
{
|
|
2033
2417
|
onClick: (e) => {
|
|
@@ -2062,8 +2446,8 @@ var MENUCONTENT_VARIANT_CLASSES = {
|
|
|
2062
2446
|
menu: "p-1",
|
|
2063
2447
|
profile: "p-6"
|
|
2064
2448
|
};
|
|
2065
|
-
var MenuLabel = (0,
|
|
2066
|
-
return /* @__PURE__ */ (0,
|
|
2449
|
+
var MenuLabel = (0, import_react13.forwardRef)(({ className, inset, store: _store, ...props }, ref) => {
|
|
2450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2067
2451
|
"div",
|
|
2068
2452
|
{
|
|
2069
2453
|
ref,
|
|
@@ -2073,7 +2457,7 @@ var MenuLabel = (0, import_react10.forwardRef)(({ className, inset, store: _stor
|
|
|
2073
2457
|
);
|
|
2074
2458
|
});
|
|
2075
2459
|
MenuLabel.displayName = "MenuLabel";
|
|
2076
|
-
var DropdownMenuContent = (0,
|
|
2460
|
+
var DropdownMenuContent = (0, import_react13.forwardRef)(
|
|
2077
2461
|
({
|
|
2078
2462
|
className,
|
|
2079
2463
|
align = "start",
|
|
@@ -2086,8 +2470,8 @@ var DropdownMenuContent = (0, import_react10.forwardRef)(
|
|
|
2086
2470
|
}, ref) => {
|
|
2087
2471
|
const store = useDropdownStore(externalStore);
|
|
2088
2472
|
const open = (0, import_zustand4.useStore)(store, (s) => s.open);
|
|
2089
|
-
const [isVisible, setIsVisible] = (0,
|
|
2090
|
-
(0,
|
|
2473
|
+
const [isVisible, setIsVisible] = (0, import_react13.useState)(open);
|
|
2474
|
+
(0, import_react13.useEffect)(() => {
|
|
2091
2475
|
if (open) {
|
|
2092
2476
|
setIsVisible(true);
|
|
2093
2477
|
} else {
|
|
@@ -2102,7 +2486,7 @@ var DropdownMenuContent = (0, import_react10.forwardRef)(
|
|
|
2102
2486
|
return `absolute ${vertical} ${horizontal}`;
|
|
2103
2487
|
};
|
|
2104
2488
|
const variantClasses = MENUCONTENT_VARIANT_CLASSES[variant];
|
|
2105
|
-
return /* @__PURE__ */ (0,
|
|
2489
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2106
2490
|
"div",
|
|
2107
2491
|
{
|
|
2108
2492
|
ref,
|
|
@@ -2127,7 +2511,7 @@ var DropdownMenuContent = (0, import_react10.forwardRef)(
|
|
|
2127
2511
|
}
|
|
2128
2512
|
);
|
|
2129
2513
|
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
2130
|
-
var DropdownMenuItem = (0,
|
|
2514
|
+
var DropdownMenuItem = (0, import_react13.forwardRef)(
|
|
2131
2515
|
({
|
|
2132
2516
|
className,
|
|
2133
2517
|
size = "small",
|
|
@@ -2161,7 +2545,7 @@ var DropdownMenuItem = (0, import_react10.forwardRef)(
|
|
|
2161
2545
|
const getVariantProps = () => {
|
|
2162
2546
|
return variant === "profile" ? { "data-variant": "profile" } : {};
|
|
2163
2547
|
};
|
|
2164
|
-
return /* @__PURE__ */ (0,
|
|
2548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2165
2549
|
"div",
|
|
2166
2550
|
{
|
|
2167
2551
|
ref,
|
|
@@ -2183,7 +2567,7 @@ var DropdownMenuItem = (0, import_react10.forwardRef)(
|
|
|
2183
2567
|
...props,
|
|
2184
2568
|
children: [
|
|
2185
2569
|
iconLeft,
|
|
2186
|
-
/* @__PURE__ */ (0,
|
|
2570
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "w-full", children }),
|
|
2187
2571
|
iconRight
|
|
2188
2572
|
]
|
|
2189
2573
|
}
|
|
@@ -2191,7 +2575,7 @@ var DropdownMenuItem = (0, import_react10.forwardRef)(
|
|
|
2191
2575
|
}
|
|
2192
2576
|
);
|
|
2193
2577
|
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
2194
|
-
var DropdownMenuSeparator = (0,
|
|
2578
|
+
var DropdownMenuSeparator = (0, import_react13.forwardRef)(({ className, store: _store, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2195
2579
|
"div",
|
|
2196
2580
|
{
|
|
2197
2581
|
ref,
|
|
@@ -2200,11 +2584,11 @@ var DropdownMenuSeparator = (0, import_react10.forwardRef)(({ className, store:
|
|
|
2200
2584
|
}
|
|
2201
2585
|
));
|
|
2202
2586
|
DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
|
|
2203
|
-
var ProfileMenuTrigger = (0,
|
|
2587
|
+
var ProfileMenuTrigger = (0, import_react13.forwardRef)(({ className, onClick, store: externalStore, ...props }, ref) => {
|
|
2204
2588
|
const store = useDropdownStore(externalStore);
|
|
2205
2589
|
const open = (0, import_zustand4.useStore)(store, (s) => s.open);
|
|
2206
2590
|
const toggleOpen = () => store.setState({ open: !open });
|
|
2207
|
-
return /* @__PURE__ */ (0,
|
|
2591
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2208
2592
|
"button",
|
|
2209
2593
|
{
|
|
2210
2594
|
ref,
|
|
@@ -2219,13 +2603,13 @@ var ProfileMenuTrigger = (0, import_react10.forwardRef)(({ className, onClick, s
|
|
|
2219
2603
|
},
|
|
2220
2604
|
"aria-expanded": open,
|
|
2221
2605
|
...props,
|
|
2222
|
-
children: /* @__PURE__ */ (0,
|
|
2606
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "size-6 rounded-full bg-primary-100 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_phosphor_react9.User, { className: "text-primary-950", size: 18 }) })
|
|
2223
2607
|
}
|
|
2224
2608
|
);
|
|
2225
2609
|
});
|
|
2226
2610
|
ProfileMenuTrigger.displayName = "ProfileMenuTrigger";
|
|
2227
|
-
var ProfileMenuHeader = (0,
|
|
2228
|
-
return /* @__PURE__ */ (0,
|
|
2611
|
+
var ProfileMenuHeader = (0, import_react13.forwardRef)(({ className, name, email, store: _store, ...props }, ref) => {
|
|
2612
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2229
2613
|
"div",
|
|
2230
2614
|
{
|
|
2231
2615
|
ref,
|
|
@@ -2233,18 +2617,98 @@ var ProfileMenuHeader = (0, import_react10.forwardRef)(({ className, name, email
|
|
|
2233
2617
|
className: cn("flex flex-row gap-4 items-center", className),
|
|
2234
2618
|
...props,
|
|
2235
2619
|
children: [
|
|
2236
|
-
/* @__PURE__ */ (0,
|
|
2237
|
-
/* @__PURE__ */ (0,
|
|
2238
|
-
/* @__PURE__ */ (0,
|
|
2239
|
-
/* @__PURE__ */ (0,
|
|
2620
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "size-16 bg-primary-100 rounded-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_phosphor_react9.User, { size: 34, className: "text-primary-950" }) }),
|
|
2621
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex flex-col ", children: [
|
|
2622
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text_default, { size: "xl", weight: "bold", color: "text-text-950", children: name }),
|
|
2623
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text_default, { size: "md", color: "text-text-600", children: email })
|
|
2240
2624
|
] })
|
|
2241
2625
|
]
|
|
2242
2626
|
}
|
|
2243
2627
|
);
|
|
2244
2628
|
});
|
|
2245
2629
|
ProfileMenuHeader.displayName = "ProfileMenuHeader";
|
|
2246
|
-
var
|
|
2247
|
-
|
|
2630
|
+
var ProfileToggleTheme = ({ ...props }) => {
|
|
2631
|
+
const { themeMode, setTheme } = useTheme();
|
|
2632
|
+
const [modalThemeToggle, setModalThemeToggle] = (0, import_react13.useState)(false);
|
|
2633
|
+
const [selectedTheme, setSelectedTheme] = (0, import_react13.useState)(themeMode);
|
|
2634
|
+
const handleClick = (e) => {
|
|
2635
|
+
e.preventDefault();
|
|
2636
|
+
e.stopPropagation();
|
|
2637
|
+
setModalThemeToggle(true);
|
|
2638
|
+
};
|
|
2639
|
+
const handleSave = () => {
|
|
2640
|
+
setTheme(selectedTheme);
|
|
2641
|
+
setModalThemeToggle(false);
|
|
2642
|
+
};
|
|
2643
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
2644
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2645
|
+
"div",
|
|
2646
|
+
{
|
|
2647
|
+
role: "menuitem",
|
|
2648
|
+
"data-variant": "profile",
|
|
2649
|
+
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",
|
|
2650
|
+
onClick: handleClick,
|
|
2651
|
+
onKeyDown: (e) => {
|
|
2652
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
2653
|
+
e.preventDefault();
|
|
2654
|
+
e.stopPropagation();
|
|
2655
|
+
setModalThemeToggle(true);
|
|
2656
|
+
}
|
|
2657
|
+
},
|
|
2658
|
+
tabIndex: 0,
|
|
2659
|
+
...props,
|
|
2660
|
+
children: [
|
|
2661
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2662
|
+
"svg",
|
|
2663
|
+
{
|
|
2664
|
+
width: "25",
|
|
2665
|
+
height: "25",
|
|
2666
|
+
viewBox: "0 0 25 25",
|
|
2667
|
+
fill: "none",
|
|
2668
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2669
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2670
|
+
"path",
|
|
2671
|
+
{
|
|
2672
|
+
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",
|
|
2673
|
+
fill: "#525252"
|
|
2674
|
+
}
|
|
2675
|
+
)
|
|
2676
|
+
}
|
|
2677
|
+
),
|
|
2678
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text_default, { className: "w-full", size: "md", children: "Apar\xEAncia" }),
|
|
2679
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_phosphor_react9.CaretRight, {})
|
|
2680
|
+
]
|
|
2681
|
+
}
|
|
2682
|
+
),
|
|
2683
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2684
|
+
Modal_default,
|
|
2685
|
+
{
|
|
2686
|
+
isOpen: modalThemeToggle,
|
|
2687
|
+
onClose: () => setModalThemeToggle(false),
|
|
2688
|
+
title: "Apar\xEAncia",
|
|
2689
|
+
size: "md",
|
|
2690
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex gap-3", children: [
|
|
2691
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2692
|
+
Button_default,
|
|
2693
|
+
{
|
|
2694
|
+
variant: "outline",
|
|
2695
|
+
onClick: () => setModalThemeToggle(false),
|
|
2696
|
+
children: "Cancelar"
|
|
2697
|
+
}
|
|
2698
|
+
),
|
|
2699
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Button_default, { variant: "solid", onClick: () => handleSave(), children: "Salvar" })
|
|
2700
|
+
] }),
|
|
2701
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex flex-col", children: [
|
|
2702
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-sm text-text-500", children: "Escolha o tema:" }),
|
|
2703
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ThemeToggle, { variant: "with-save", onToggle: setSelectedTheme })
|
|
2704
|
+
] })
|
|
2705
|
+
}
|
|
2706
|
+
)
|
|
2707
|
+
] });
|
|
2708
|
+
};
|
|
2709
|
+
ProfileToggleTheme.displayName = "ProfileToggleTheme";
|
|
2710
|
+
var ProfileMenuSection = (0, import_react13.forwardRef)(({ className, children, store: _store, ...props }, ref) => {
|
|
2711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { ref, className: cn("flex flex-col p-2", className), ...props, children });
|
|
2248
2712
|
});
|
|
2249
2713
|
ProfileMenuSection.displayName = "ProfileMenuSection";
|
|
2250
2714
|
var ProfileMenuFooter = ({
|
|
@@ -2256,7 +2720,7 @@ var ProfileMenuFooter = ({
|
|
|
2256
2720
|
}) => {
|
|
2257
2721
|
const store = useDropdownStore(externalStore);
|
|
2258
2722
|
const setOpen = (0, import_zustand4.useStore)(store, (s) => s.setOpen);
|
|
2259
|
-
return /* @__PURE__ */ (0,
|
|
2723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2260
2724
|
Button_default,
|
|
2261
2725
|
{
|
|
2262
2726
|
variant: "outline",
|
|
@@ -2268,8 +2732,8 @@ var ProfileMenuFooter = ({
|
|
|
2268
2732
|
},
|
|
2269
2733
|
...props,
|
|
2270
2734
|
children: [
|
|
2271
|
-
/* @__PURE__ */ (0,
|
|
2272
|
-
/* @__PURE__ */ (0,
|
|
2735
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "mr-2 flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_phosphor_react9.SignOut, {}) }),
|
|
2736
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text_default, { children: "Sair" })
|
|
2273
2737
|
]
|
|
2274
2738
|
}
|
|
2275
2739
|
);
|
|
@@ -2278,7 +2742,7 @@ ProfileMenuFooter.displayName = "ProfileMenuFooter";
|
|
|
2278
2742
|
var DropdownMenu_default = DropdownMenu;
|
|
2279
2743
|
|
|
2280
2744
|
// src/components/Search/Search.tsx
|
|
2281
|
-
var
|
|
2745
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2282
2746
|
var filterOptions = (options, query) => {
|
|
2283
2747
|
if (!query || query.length < 1) return [];
|
|
2284
2748
|
return options.filter(
|
|
@@ -2303,7 +2767,7 @@ var updateInputValue = (value, ref, onChange) => {
|
|
|
2303
2767
|
onChange(event);
|
|
2304
2768
|
}
|
|
2305
2769
|
};
|
|
2306
|
-
var Search = (0,
|
|
2770
|
+
var Search = (0, import_react14.forwardRef)(
|
|
2307
2771
|
({
|
|
2308
2772
|
options = [],
|
|
2309
2773
|
onSelect,
|
|
@@ -2323,10 +2787,10 @@ var Search = (0, import_react11.forwardRef)(
|
|
|
2323
2787
|
placeholder = "Buscar...",
|
|
2324
2788
|
...props
|
|
2325
2789
|
}, ref) => {
|
|
2326
|
-
const [dropdownOpen, setDropdownOpen] = (0,
|
|
2327
|
-
const dropdownStore = (0,
|
|
2328
|
-
const dropdownRef = (0,
|
|
2329
|
-
const filteredOptions = (0,
|
|
2790
|
+
const [dropdownOpen, setDropdownOpen] = (0, import_react14.useState)(false);
|
|
2791
|
+
const dropdownStore = (0, import_react14.useRef)(createDropdownStore()).current;
|
|
2792
|
+
const dropdownRef = (0, import_react14.useRef)(null);
|
|
2793
|
+
const filteredOptions = (0, import_react14.useMemo)(() => {
|
|
2330
2794
|
if (!options.length) {
|
|
2331
2795
|
return [];
|
|
2332
2796
|
}
|
|
@@ -2334,7 +2798,7 @@ var Search = (0, import_react11.forwardRef)(
|
|
|
2334
2798
|
return filtered;
|
|
2335
2799
|
}, [options, value]);
|
|
2336
2800
|
const showDropdown = controlledShowDropdown ?? (dropdownOpen && value && String(value).length > 0);
|
|
2337
|
-
(0,
|
|
2801
|
+
(0, import_react14.useEffect)(() => {
|
|
2338
2802
|
const shouldShow = Boolean(value && String(value).length > 0);
|
|
2339
2803
|
setDropdownOpen(shouldShow);
|
|
2340
2804
|
dropdownStore.setState({ open: shouldShow });
|
|
@@ -2346,7 +2810,7 @@ var Search = (0, import_react11.forwardRef)(
|
|
|
2346
2810
|
dropdownStore.setState({ open: false });
|
|
2347
2811
|
updateInputValue(option, ref, onChange);
|
|
2348
2812
|
};
|
|
2349
|
-
(0,
|
|
2813
|
+
(0, import_react14.useEffect)(() => {
|
|
2350
2814
|
const handleClickOutside = (event) => {
|
|
2351
2815
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
2352
2816
|
setDropdownOpen(false);
|
|
@@ -2360,7 +2824,7 @@ var Search = (0, import_react11.forwardRef)(
|
|
|
2360
2824
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
2361
2825
|
};
|
|
2362
2826
|
}, [showDropdown, dropdownStore]);
|
|
2363
|
-
const generatedId = (0,
|
|
2827
|
+
const generatedId = (0, import_react14.useId)();
|
|
2364
2828
|
const inputId = id ?? `search-${generatedId}`;
|
|
2365
2829
|
const handleClear = () => {
|
|
2366
2830
|
if (onClear) {
|
|
@@ -2389,24 +2853,24 @@ var Search = (0, import_react11.forwardRef)(
|
|
|
2389
2853
|
return "hover:border-border-400";
|
|
2390
2854
|
};
|
|
2391
2855
|
const showClearButton = value && !disabled && !readOnly;
|
|
2392
|
-
return /* @__PURE__ */ (0,
|
|
2856
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
2393
2857
|
"div",
|
|
2394
2858
|
{
|
|
2395
2859
|
ref: dropdownRef,
|
|
2396
2860
|
className: `w-full max-w-lg md:w-[488px] ${containerClassName}`,
|
|
2397
2861
|
children: [
|
|
2398
|
-
/* @__PURE__ */ (0,
|
|
2399
|
-
/* @__PURE__ */ (0,
|
|
2862
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "relative flex items-center", children: [
|
|
2863
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "absolute left-3 top-1/2 transform -translate-y-1/2", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2400
2864
|
"button",
|
|
2401
2865
|
{
|
|
2402
2866
|
type: "button",
|
|
2403
2867
|
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",
|
|
2404
2868
|
onClick: handleLeftIconClick,
|
|
2405
2869
|
"aria-label": "Voltar",
|
|
2406
|
-
children: /* @__PURE__ */ (0,
|
|
2870
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_phosphor_react10.CaretLeft, {})
|
|
2407
2871
|
}
|
|
2408
2872
|
) }),
|
|
2409
|
-
/* @__PURE__ */ (0,
|
|
2873
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2410
2874
|
"input",
|
|
2411
2875
|
{
|
|
2412
2876
|
ref,
|
|
@@ -2424,24 +2888,24 @@ var Search = (0, import_react11.forwardRef)(
|
|
|
2424
2888
|
...props
|
|
2425
2889
|
}
|
|
2426
2890
|
),
|
|
2427
|
-
showClearButton && /* @__PURE__ */ (0,
|
|
2891
|
+
showClearButton && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "absolute right-3 top-1/2 transform -translate-y-1/2", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2428
2892
|
"button",
|
|
2429
2893
|
{
|
|
2430
2894
|
type: "button",
|
|
2431
2895
|
className: "p-0 border-0 bg-transparent cursor-pointer",
|
|
2432
2896
|
onMouseDown: handleClearClick,
|
|
2433
2897
|
"aria-label": "Limpar busca",
|
|
2434
|
-
children: /* @__PURE__ */ (0,
|
|
2898
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "w-6 h-6 text-text-800 flex items-center justify-center hover:text-text-600 transition-colors", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_phosphor_react10.X, {}) })
|
|
2435
2899
|
}
|
|
2436
2900
|
) })
|
|
2437
2901
|
] }),
|
|
2438
|
-
showDropdown && /* @__PURE__ */ (0,
|
|
2902
|
+
showDropdown && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DropdownMenu_default, { open: showDropdown, onOpenChange: setDropdownOpen, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2439
2903
|
DropdownMenuContent,
|
|
2440
2904
|
{
|
|
2441
2905
|
className: "w-full mt-1",
|
|
2442
2906
|
style: { maxHeight: dropdownMaxHeight },
|
|
2443
2907
|
align: "start",
|
|
2444
|
-
children: filteredOptions.length > 0 ? filteredOptions.map((option) => /* @__PURE__ */ (0,
|
|
2908
|
+
children: filteredOptions.length > 0 ? filteredOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2445
2909
|
DropdownMenuItem,
|
|
2446
2910
|
{
|
|
2447
2911
|
onClick: () => handleSelectOption(option),
|
|
@@ -2449,7 +2913,7 @@ var Search = (0, import_react11.forwardRef)(
|
|
|
2449
2913
|
children: option
|
|
2450
2914
|
},
|
|
2451
2915
|
option
|
|
2452
|
-
)) : /* @__PURE__ */ (0,
|
|
2916
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "px-3 py-3 text-text-700 text-base", children: noResultsText })
|
|
2453
2917
|
}
|
|
2454
2918
|
) })
|
|
2455
2919
|
]
|
|
@@ -2461,8 +2925,8 @@ Search.displayName = "Search";
|
|
|
2461
2925
|
var Search_default = Search;
|
|
2462
2926
|
|
|
2463
2927
|
// src/components/Chips/Chips.tsx
|
|
2464
|
-
var
|
|
2465
|
-
var
|
|
2928
|
+
var import_phosphor_react11 = require("phosphor-react");
|
|
2929
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2466
2930
|
var STATE_CLASSES5 = {
|
|
2467
2931
|
default: "bg-background text-text-950 border border-border-100 hover:bg-secondary-50 hover:border-border-300",
|
|
2468
2932
|
selected: "bg-info-background text-primary-950 border-2 border-primary-950 hover:bg-secondary-50 focus-visible:border-0"
|
|
@@ -2477,7 +2941,7 @@ var Chips = ({
|
|
|
2477
2941
|
}) => {
|
|
2478
2942
|
const stateClasses = selected ? STATE_CLASSES5.selected : STATE_CLASSES5.default;
|
|
2479
2943
|
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";
|
|
2480
|
-
return /* @__PURE__ */ (0,
|
|
2944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
2481
2945
|
"button",
|
|
2482
2946
|
{
|
|
2483
2947
|
className: cn(baseClasses, stateClasses, className),
|
|
@@ -2485,8 +2949,8 @@ var Chips = ({
|
|
|
2485
2949
|
type,
|
|
2486
2950
|
...props,
|
|
2487
2951
|
children: [
|
|
2488
|
-
selected && /* @__PURE__ */ (0,
|
|
2489
|
-
/* @__PURE__ */ (0,
|
|
2952
|
+
selected && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: `flex items-center`, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_phosphor_react11.Check, { weight: "bold", size: 16 }) }),
|
|
2953
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "flex-1", children })
|
|
2490
2954
|
]
|
|
2491
2955
|
}
|
|
2492
2956
|
);
|
|
@@ -2494,8 +2958,8 @@ var Chips = ({
|
|
|
2494
2958
|
var Chips_default = Chips;
|
|
2495
2959
|
|
|
2496
2960
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
2497
|
-
var
|
|
2498
|
-
var
|
|
2961
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2962
|
+
var SIZE_CLASSES8 = {
|
|
2499
2963
|
small: {
|
|
2500
2964
|
container: "h-1",
|
|
2501
2965
|
// 4px height (h-1 = 4px in Tailwind)
|
|
@@ -2606,20 +3070,20 @@ var renderStackedHitCountDisplay = (showHitCount, showPercentage, clampedValue,
|
|
|
2606
3070
|
max,
|
|
2607
3071
|
percentage
|
|
2608
3072
|
);
|
|
2609
|
-
return /* @__PURE__ */ (0,
|
|
3073
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2610
3074
|
"div",
|
|
2611
3075
|
{
|
|
2612
3076
|
className: cn(
|
|
2613
3077
|
"text-xs font-medium leading-[14px] text-right",
|
|
2614
3078
|
percentageClassName
|
|
2615
3079
|
),
|
|
2616
|
-
children: displayPriority.type === "hitCount" ? /* @__PURE__ */ (0,
|
|
2617
|
-
/* @__PURE__ */ (0,
|
|
2618
|
-
/* @__PURE__ */ (0,
|
|
3080
|
+
children: displayPriority.type === "hitCount" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
3081
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-success-200", children: Math.round(clampedValue) }),
|
|
3082
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "text-text-600", children: [
|
|
2619
3083
|
" de ",
|
|
2620
3084
|
max
|
|
2621
3085
|
] })
|
|
2622
|
-
] }) : /* @__PURE__ */ (0,
|
|
3086
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Text_default, { size: "xs", weight: "medium", className: "text-success-200", children: [
|
|
2623
3087
|
Math.round(percentage),
|
|
2624
3088
|
"%"
|
|
2625
3089
|
] })
|
|
@@ -2634,7 +3098,7 @@ var ProgressBarBase = ({
|
|
|
2634
3098
|
variantClasses,
|
|
2635
3099
|
containerClassName,
|
|
2636
3100
|
fillClassName
|
|
2637
|
-
}) => /* @__PURE__ */ (0,
|
|
3101
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2638
3102
|
"div",
|
|
2639
3103
|
{
|
|
2640
3104
|
className: cn(
|
|
@@ -2643,7 +3107,7 @@ var ProgressBarBase = ({
|
|
|
2643
3107
|
"overflow-hidden relative"
|
|
2644
3108
|
),
|
|
2645
3109
|
children: [
|
|
2646
|
-
/* @__PURE__ */ (0,
|
|
3110
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2647
3111
|
"progress",
|
|
2648
3112
|
{
|
|
2649
3113
|
value: clampedValue,
|
|
@@ -2652,7 +3116,7 @@ var ProgressBarBase = ({
|
|
|
2652
3116
|
className: "absolute inset-0 w-full h-full opacity-0"
|
|
2653
3117
|
}
|
|
2654
3118
|
),
|
|
2655
|
-
/* @__PURE__ */ (0,
|
|
3119
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2656
3120
|
"div",
|
|
2657
3121
|
{
|
|
2658
3122
|
className: cn(
|
|
@@ -2678,7 +3142,7 @@ var StackedLayout = ({
|
|
|
2678
3142
|
percentage,
|
|
2679
3143
|
variantClasses,
|
|
2680
3144
|
dimensions
|
|
2681
|
-
}) => /* @__PURE__ */ (0,
|
|
3145
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2682
3146
|
"div",
|
|
2683
3147
|
{
|
|
2684
3148
|
className: cn(
|
|
@@ -2688,8 +3152,8 @@ var StackedLayout = ({
|
|
|
2688
3152
|
className
|
|
2689
3153
|
),
|
|
2690
3154
|
children: [
|
|
2691
|
-
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ (0,
|
|
2692
|
-
label && /* @__PURE__ */ (0,
|
|
3155
|
+
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex flex-row justify-between items-center w-full h-[19px]", children: [
|
|
3156
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2693
3157
|
Text_default,
|
|
2694
3158
|
{
|
|
2695
3159
|
as: "div",
|
|
@@ -2708,7 +3172,7 @@ var StackedLayout = ({
|
|
|
2708
3172
|
percentageClassName
|
|
2709
3173
|
)
|
|
2710
3174
|
] }),
|
|
2711
|
-
/* @__PURE__ */ (0,
|
|
3175
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2712
3176
|
ProgressBarBase,
|
|
2713
3177
|
{
|
|
2714
3178
|
clampedValue,
|
|
@@ -2750,7 +3214,7 @@ var CompactLayout = ({
|
|
|
2750
3214
|
percentageClassName,
|
|
2751
3215
|
labelClassName
|
|
2752
3216
|
});
|
|
2753
|
-
return /* @__PURE__ */ (0,
|
|
3217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2754
3218
|
"div",
|
|
2755
3219
|
{
|
|
2756
3220
|
className: cn(
|
|
@@ -2760,7 +3224,7 @@ var CompactLayout = ({
|
|
|
2760
3224
|
className
|
|
2761
3225
|
),
|
|
2762
3226
|
children: [
|
|
2763
|
-
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ (0,
|
|
3227
|
+
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2764
3228
|
Text_default,
|
|
2765
3229
|
{
|
|
2766
3230
|
as: "div",
|
|
@@ -2771,7 +3235,7 @@ var CompactLayout = ({
|
|
|
2771
3235
|
children: content
|
|
2772
3236
|
}
|
|
2773
3237
|
),
|
|
2774
|
-
/* @__PURE__ */ (0,
|
|
3238
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2775
3239
|
ProgressBarBase,
|
|
2776
3240
|
{
|
|
2777
3241
|
clampedValue,
|
|
@@ -2807,9 +3271,9 @@ var DefaultLayout = ({
|
|
|
2807
3271
|
label,
|
|
2808
3272
|
showPercentage
|
|
2809
3273
|
);
|
|
2810
|
-
return /* @__PURE__ */ (0,
|
|
2811
|
-
displayConfig.showHeader && /* @__PURE__ */ (0,
|
|
2812
|
-
label && /* @__PURE__ */ (0,
|
|
3274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: cn("flex", sizeClasses.layout, gapClass, className), children: [
|
|
3275
|
+
displayConfig.showHeader && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex flex-row items-center justify-between w-full", children: [
|
|
3276
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2813
3277
|
Text_default,
|
|
2814
3278
|
{
|
|
2815
3279
|
as: "div",
|
|
@@ -2822,7 +3286,7 @@ var DefaultLayout = ({
|
|
|
2822
3286
|
children: label
|
|
2823
3287
|
}
|
|
2824
3288
|
),
|
|
2825
|
-
showPercentage && /* @__PURE__ */ (0,
|
|
3289
|
+
showPercentage && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2826
3290
|
Text_default,
|
|
2827
3291
|
{
|
|
2828
3292
|
size: "xs",
|
|
@@ -2838,7 +3302,7 @@ var DefaultLayout = ({
|
|
|
2838
3302
|
}
|
|
2839
3303
|
)
|
|
2840
3304
|
] }),
|
|
2841
|
-
/* @__PURE__ */ (0,
|
|
3305
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2842
3306
|
ProgressBarBase,
|
|
2843
3307
|
{
|
|
2844
3308
|
clampedValue,
|
|
@@ -2858,7 +3322,7 @@ var DefaultLayout = ({
|
|
|
2858
3322
|
)
|
|
2859
3323
|
}
|
|
2860
3324
|
),
|
|
2861
|
-
displayConfig.showPercentage && /* @__PURE__ */ (0,
|
|
3325
|
+
displayConfig.showPercentage && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2862
3326
|
Text_default,
|
|
2863
3327
|
{
|
|
2864
3328
|
size: "xs",
|
|
@@ -2873,7 +3337,7 @@ var DefaultLayout = ({
|
|
|
2873
3337
|
]
|
|
2874
3338
|
}
|
|
2875
3339
|
),
|
|
2876
|
-
displayConfig.showLabel && /* @__PURE__ */ (0,
|
|
3340
|
+
displayConfig.showLabel && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2877
3341
|
Text_default,
|
|
2878
3342
|
{
|
|
2879
3343
|
as: "div",
|
|
@@ -2906,10 +3370,10 @@ var ProgressBar = ({
|
|
|
2906
3370
|
compactHeight
|
|
2907
3371
|
}) => {
|
|
2908
3372
|
const { clampedValue, percentage } = calculateProgressValues(value, max);
|
|
2909
|
-
const sizeClasses =
|
|
3373
|
+
const sizeClasses = SIZE_CLASSES8[size];
|
|
2910
3374
|
const variantClasses = VARIANT_CLASSES2[variant];
|
|
2911
3375
|
if (layout === "stacked") {
|
|
2912
|
-
return /* @__PURE__ */ (0,
|
|
3376
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2913
3377
|
StackedLayout,
|
|
2914
3378
|
{
|
|
2915
3379
|
className,
|
|
@@ -2930,7 +3394,7 @@ var ProgressBar = ({
|
|
|
2930
3394
|
);
|
|
2931
3395
|
}
|
|
2932
3396
|
if (layout === "compact") {
|
|
2933
|
-
return /* @__PURE__ */ (0,
|
|
3397
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2934
3398
|
CompactLayout,
|
|
2935
3399
|
{
|
|
2936
3400
|
className,
|
|
@@ -2950,7 +3414,7 @@ var ProgressBar = ({
|
|
|
2950
3414
|
}
|
|
2951
3415
|
);
|
|
2952
3416
|
}
|
|
2953
|
-
return /* @__PURE__ */ (0,
|
|
3417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2954
3418
|
DefaultLayout,
|
|
2955
3419
|
{
|
|
2956
3420
|
className,
|
|
@@ -2970,8 +3434,8 @@ var ProgressBar = ({
|
|
|
2970
3434
|
var ProgressBar_default = ProgressBar;
|
|
2971
3435
|
|
|
2972
3436
|
// src/components/ProgressCircle/ProgressCircle.tsx
|
|
2973
|
-
var
|
|
2974
|
-
var
|
|
3437
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
3438
|
+
var SIZE_CLASSES9 = {
|
|
2975
3439
|
small: {
|
|
2976
3440
|
container: "w-[90px] h-[90px]",
|
|
2977
3441
|
// 90px circle from design specs
|
|
@@ -3045,14 +3509,14 @@ var ProgressCircle = ({
|
|
|
3045
3509
|
const safeValue = isNaN(value) ? 0 : value;
|
|
3046
3510
|
const clampedValue = Math.max(0, Math.min(safeValue, max));
|
|
3047
3511
|
const percentage = max === 0 ? 0 : clampedValue / max * 100;
|
|
3048
|
-
const sizeClasses =
|
|
3512
|
+
const sizeClasses = SIZE_CLASSES9[size];
|
|
3049
3513
|
const variantClasses = VARIANT_CLASSES3[variant];
|
|
3050
3514
|
const radius = size === "small" ? 37 : 64;
|
|
3051
3515
|
const circumference = 2 * Math.PI * radius;
|
|
3052
3516
|
const strokeDashoffset = circumference - percentage / 100 * circumference;
|
|
3053
3517
|
const center = size === "small" ? 45 : 76;
|
|
3054
3518
|
const svgSize = size === "small" ? 90 : 152;
|
|
3055
|
-
return /* @__PURE__ */ (0,
|
|
3519
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
3056
3520
|
"div",
|
|
3057
3521
|
{
|
|
3058
3522
|
className: cn(
|
|
@@ -3062,7 +3526,7 @@ var ProgressCircle = ({
|
|
|
3062
3526
|
className
|
|
3063
3527
|
),
|
|
3064
3528
|
children: [
|
|
3065
|
-
/* @__PURE__ */ (0,
|
|
3529
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
3066
3530
|
"svg",
|
|
3067
3531
|
{
|
|
3068
3532
|
className: "absolute inset-0 transform -rotate-90",
|
|
@@ -3071,7 +3535,7 @@ var ProgressCircle = ({
|
|
|
3071
3535
|
viewBox: `0 0 ${svgSize} ${svgSize}`,
|
|
3072
3536
|
"aria-hidden": "true",
|
|
3073
3537
|
children: [
|
|
3074
|
-
/* @__PURE__ */ (0,
|
|
3538
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3075
3539
|
"circle",
|
|
3076
3540
|
{
|
|
3077
3541
|
cx: center,
|
|
@@ -3082,7 +3546,7 @@ var ProgressCircle = ({
|
|
|
3082
3546
|
className: cn(variantClasses.background, "rounded-lg")
|
|
3083
3547
|
}
|
|
3084
3548
|
),
|
|
3085
|
-
/* @__PURE__ */ (0,
|
|
3549
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3086
3550
|
"circle",
|
|
3087
3551
|
{
|
|
3088
3552
|
cx: center,
|
|
@@ -3102,7 +3566,7 @@ var ProgressCircle = ({
|
|
|
3102
3566
|
]
|
|
3103
3567
|
}
|
|
3104
3568
|
),
|
|
3105
|
-
/* @__PURE__ */ (0,
|
|
3569
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3106
3570
|
"progress",
|
|
3107
3571
|
{
|
|
3108
3572
|
value: clampedValue,
|
|
@@ -3111,7 +3575,7 @@ var ProgressCircle = ({
|
|
|
3111
3575
|
className: "absolute opacity-0 w-0 h-0"
|
|
3112
3576
|
}
|
|
3113
3577
|
),
|
|
3114
|
-
/* @__PURE__ */ (0,
|
|
3578
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
3115
3579
|
"div",
|
|
3116
3580
|
{
|
|
3117
3581
|
className: cn(
|
|
@@ -3120,7 +3584,7 @@ var ProgressCircle = ({
|
|
|
3120
3584
|
sizeClasses.contentWidth
|
|
3121
3585
|
),
|
|
3122
3586
|
children: [
|
|
3123
|
-
showPercentage && /* @__PURE__ */ (0,
|
|
3587
|
+
showPercentage && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
3124
3588
|
Text_default,
|
|
3125
3589
|
{
|
|
3126
3590
|
size: sizeClasses.textSize,
|
|
@@ -3136,7 +3600,7 @@ var ProgressCircle = ({
|
|
|
3136
3600
|
]
|
|
3137
3601
|
}
|
|
3138
3602
|
),
|
|
3139
|
-
label && /* @__PURE__ */ (0,
|
|
3603
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3140
3604
|
Text_default,
|
|
3141
3605
|
{
|
|
3142
3606
|
as: "span",
|
|
@@ -3160,9 +3624,9 @@ var ProgressCircle = ({
|
|
|
3160
3624
|
var ProgressCircle_default = ProgressCircle;
|
|
3161
3625
|
|
|
3162
3626
|
// src/components/Stepper/Stepper.tsx
|
|
3163
|
-
var
|
|
3164
|
-
var
|
|
3165
|
-
var
|
|
3627
|
+
var import_phosphor_react12 = require("phosphor-react");
|
|
3628
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
3629
|
+
var SIZE_CLASSES10 = {
|
|
3166
3630
|
small: {
|
|
3167
3631
|
container: "gap-2",
|
|
3168
3632
|
// 8px gap as specified in CSS
|
|
@@ -3288,7 +3752,7 @@ var Step = ({
|
|
|
3288
3752
|
}
|
|
3289
3753
|
return `${step.label}${suffix}`;
|
|
3290
3754
|
};
|
|
3291
|
-
return /* @__PURE__ */ (0,
|
|
3755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3292
3756
|
"div",
|
|
3293
3757
|
{
|
|
3294
3758
|
className: `
|
|
@@ -3301,7 +3765,7 @@ var Step = ({
|
|
|
3301
3765
|
overflow-visible
|
|
3302
3766
|
`,
|
|
3303
3767
|
children: [
|
|
3304
|
-
/* @__PURE__ */ (0,
|
|
3768
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3305
3769
|
"div",
|
|
3306
3770
|
{
|
|
3307
3771
|
className: `
|
|
@@ -3310,7 +3774,7 @@ var Step = ({
|
|
|
3310
3774
|
`
|
|
3311
3775
|
}
|
|
3312
3776
|
),
|
|
3313
|
-
/* @__PURE__ */ (0,
|
|
3777
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3314
3778
|
"div",
|
|
3315
3779
|
{
|
|
3316
3780
|
className: `
|
|
@@ -3320,7 +3784,7 @@ var Step = ({
|
|
|
3320
3784
|
overflow-visible
|
|
3321
3785
|
`,
|
|
3322
3786
|
children: [
|
|
3323
|
-
/* @__PURE__ */ (0,
|
|
3787
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3324
3788
|
"div",
|
|
3325
3789
|
{
|
|
3326
3790
|
className: `
|
|
@@ -3330,8 +3794,8 @@ var Step = ({
|
|
|
3330
3794
|
w-4 h-4 sm:w-5 sm:h-5 md:w-5 md:h-5 lg:w-6 lg:h-6
|
|
3331
3795
|
`,
|
|
3332
3796
|
"aria-label": getAriaLabel(),
|
|
3333
|
-
children: isCompleted ? /* @__PURE__ */ (0,
|
|
3334
|
-
|
|
3797
|
+
children: isCompleted ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3798
|
+
import_phosphor_react12.Check,
|
|
3335
3799
|
{
|
|
3336
3800
|
weight: "bold",
|
|
3337
3801
|
className: `
|
|
@@ -3339,7 +3803,7 @@ var Step = ({
|
|
|
3339
3803
|
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
|
|
3340
3804
|
`
|
|
3341
3805
|
}
|
|
3342
|
-
) : /* @__PURE__ */ (0,
|
|
3806
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3343
3807
|
Text_default,
|
|
3344
3808
|
{
|
|
3345
3809
|
size: sizeClasses.indicatorTextSize,
|
|
@@ -3354,7 +3818,7 @@ var Step = ({
|
|
|
3354
3818
|
)
|
|
3355
3819
|
}
|
|
3356
3820
|
),
|
|
3357
|
-
/* @__PURE__ */ (0,
|
|
3821
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3358
3822
|
Text_default,
|
|
3359
3823
|
{
|
|
3360
3824
|
size: sizeClasses.labelTextSize,
|
|
@@ -3404,9 +3868,9 @@ var Stepper = ({
|
|
|
3404
3868
|
progressText,
|
|
3405
3869
|
responsive = true
|
|
3406
3870
|
}) => {
|
|
3407
|
-
const sizeClasses =
|
|
3871
|
+
const sizeClasses = SIZE_CLASSES10[size];
|
|
3408
3872
|
const steps = currentStep !== void 0 ? calculateStepStates(initialSteps, currentStep) : initialSteps;
|
|
3409
|
-
return /* @__PURE__ */ (0,
|
|
3873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3410
3874
|
"fieldset",
|
|
3411
3875
|
{
|
|
3412
3876
|
className: cn(
|
|
@@ -3415,8 +3879,8 @@ var Stepper = ({
|
|
|
3415
3879
|
"border-0 p-0 m-0"
|
|
3416
3880
|
),
|
|
3417
3881
|
children: [
|
|
3418
|
-
/* @__PURE__ */ (0,
|
|
3419
|
-
showProgress && currentStep !== void 0 && /* @__PURE__ */ (0,
|
|
3882
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("legend", { className: "absolute w-px h-px p-0 -m-px overflow-hidden whitespace-nowrap border-0", children: "Stepper de formul\xE1rio" }),
|
|
3883
|
+
showProgress && currentStep !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3420
3884
|
Text_default,
|
|
3421
3885
|
{
|
|
3422
3886
|
size: "sm",
|
|
@@ -3425,7 +3889,7 @@ var Stepper = ({
|
|
|
3425
3889
|
children: getProgressText(currentStep, steps.length, progressText)
|
|
3426
3890
|
}
|
|
3427
3891
|
),
|
|
3428
|
-
/* @__PURE__ */ (0,
|
|
3892
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3429
3893
|
"div",
|
|
3430
3894
|
{
|
|
3431
3895
|
className: cn(
|
|
@@ -3438,7 +3902,7 @@ var Stepper = ({
|
|
|
3438
3902
|
"aria-label": "Progress steps",
|
|
3439
3903
|
children: steps.map((step, index) => {
|
|
3440
3904
|
const stateClasses = STATE_CLASSES6[step.state];
|
|
3441
|
-
return /* @__PURE__ */ (0,
|
|
3905
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3442
3906
|
Step,
|
|
3443
3907
|
{
|
|
3444
3908
|
step,
|
|
@@ -3461,8 +3925,8 @@ var Stepper = ({
|
|
|
3461
3925
|
var Stepper_default = Stepper;
|
|
3462
3926
|
|
|
3463
3927
|
// src/components/Calendar/Calendar.tsx
|
|
3464
|
-
var
|
|
3465
|
-
var
|
|
3928
|
+
var import_react15 = require("react");
|
|
3929
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
3466
3930
|
var WEEK_DAYS = ["SEG", "TER", "QUA", "QUI", "SEX", "S\xC1B", "DOM"];
|
|
3467
3931
|
var WEEK_DAYS_SHORT = ["S", "T", "Q", "Q", "S", "S", "D"];
|
|
3468
3932
|
var MONTH_NAMES = [
|
|
@@ -3485,15 +3949,15 @@ var MonthYearPicker = ({
|
|
|
3485
3949
|
currentDate,
|
|
3486
3950
|
onYearChange,
|
|
3487
3951
|
onMonthChange
|
|
3488
|
-
}) => /* @__PURE__ */ (0,
|
|
3952
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
3489
3953
|
"div",
|
|
3490
3954
|
{
|
|
3491
3955
|
ref: monthPickerRef,
|
|
3492
3956
|
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]",
|
|
3493
3957
|
children: [
|
|
3494
|
-
/* @__PURE__ */ (0,
|
|
3495
|
-
/* @__PURE__ */ (0,
|
|
3496
|
-
/* @__PURE__ */ (0,
|
|
3958
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "mb-4", children: [
|
|
3959
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("h3", { className: "text-sm font-medium text-text-700 mb-2", children: "Selecionar Ano" }),
|
|
3960
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "grid grid-cols-4 gap-1 max-h-32 overflow-y-auto", children: availableYears.map((year) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3497
3961
|
"button",
|
|
3498
3962
|
{
|
|
3499
3963
|
onClick: () => onYearChange(year),
|
|
@@ -3506,9 +3970,9 @@ var MonthYearPicker = ({
|
|
|
3506
3970
|
year
|
|
3507
3971
|
)) })
|
|
3508
3972
|
] }),
|
|
3509
|
-
/* @__PURE__ */ (0,
|
|
3510
|
-
/* @__PURE__ */ (0,
|
|
3511
|
-
/* @__PURE__ */ (0,
|
|
3973
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { children: [
|
|
3974
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("h3", { className: "text-sm font-medium text-text-700 mb-2", children: "Selecionar M\xEAs" }),
|
|
3975
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "grid grid-cols-3 gap-1", children: MONTH_NAMES.map((month, index) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3512
3976
|
"button",
|
|
3513
3977
|
{
|
|
3514
3978
|
onClick: () => onMonthChange(index, currentDate.getFullYear()),
|
|
@@ -3561,11 +4025,11 @@ var Calendar = ({
|
|
|
3561
4025
|
showActivities = true,
|
|
3562
4026
|
className = ""
|
|
3563
4027
|
}) => {
|
|
3564
|
-
const [currentDate, setCurrentDate] = (0,
|
|
3565
|
-
const [isMonthPickerOpen, setIsMonthPickerOpen] = (0,
|
|
3566
|
-
const monthPickerRef = (0,
|
|
3567
|
-
const monthPickerContainerRef = (0,
|
|
3568
|
-
(0,
|
|
4028
|
+
const [currentDate, setCurrentDate] = (0, import_react15.useState)(selectedDate || /* @__PURE__ */ new Date());
|
|
4029
|
+
const [isMonthPickerOpen, setIsMonthPickerOpen] = (0, import_react15.useState)(false);
|
|
4030
|
+
const monthPickerRef = (0, import_react15.useRef)(null);
|
|
4031
|
+
const monthPickerContainerRef = (0, import_react15.useRef)(null);
|
|
4032
|
+
(0, import_react15.useEffect)(() => {
|
|
3569
4033
|
const handleClickOutside = (event) => {
|
|
3570
4034
|
if (monthPickerContainerRef.current && !monthPickerContainerRef.current.contains(event.target)) {
|
|
3571
4035
|
setIsMonthPickerOpen(false);
|
|
@@ -3579,7 +4043,7 @@ var Calendar = ({
|
|
|
3579
4043
|
};
|
|
3580
4044
|
}, [isMonthPickerOpen]);
|
|
3581
4045
|
const today = /* @__PURE__ */ new Date();
|
|
3582
|
-
const availableYears = (0,
|
|
4046
|
+
const availableYears = (0, import_react15.useMemo)(() => {
|
|
3583
4047
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
3584
4048
|
const years = [];
|
|
3585
4049
|
for (let year = currentYear - 10; year <= currentYear + 10; year++) {
|
|
@@ -3587,7 +4051,7 @@ var Calendar = ({
|
|
|
3587
4051
|
}
|
|
3588
4052
|
return years;
|
|
3589
4053
|
}, []);
|
|
3590
|
-
const calendarData = (0,
|
|
4054
|
+
const calendarData = (0, import_react15.useMemo)(() => {
|
|
3591
4055
|
const year = currentDate.getFullYear();
|
|
3592
4056
|
const month = currentDate.getMonth();
|
|
3593
4057
|
const firstDay = new Date(year, month, 1);
|
|
@@ -3640,28 +4104,28 @@ var Calendar = ({
|
|
|
3640
4104
|
onDateSelect?.(day.date);
|
|
3641
4105
|
};
|
|
3642
4106
|
if (variant === "navigation") {
|
|
3643
|
-
return /* @__PURE__ */ (0,
|
|
3644
|
-
/* @__PURE__ */ (0,
|
|
3645
|
-
/* @__PURE__ */ (0,
|
|
3646
|
-
/* @__PURE__ */ (0,
|
|
4107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: cn("bg-background rounded-xl pt-6", className), children: [
|
|
4108
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center justify-between mb-4 px-6", children: [
|
|
4109
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "relative", ref: monthPickerContainerRef, children: [
|
|
4110
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
3647
4111
|
"button",
|
|
3648
4112
|
{
|
|
3649
4113
|
onClick: toggleMonthPicker,
|
|
3650
4114
|
className: "flex items-center group gap-1 rounded transition-colors cursor-pointer",
|
|
3651
4115
|
children: [
|
|
3652
|
-
/* @__PURE__ */ (0,
|
|
4116
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { className: "text-sm font-medium text-text-600 group-hover:text-primary-950", children: [
|
|
3653
4117
|
MONTH_NAMES[currentDate.getMonth()],
|
|
3654
4118
|
" ",
|
|
3655
4119
|
currentDate.getFullYear()
|
|
3656
4120
|
] }),
|
|
3657
|
-
/* @__PURE__ */ (0,
|
|
4121
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3658
4122
|
"svg",
|
|
3659
4123
|
{
|
|
3660
4124
|
className: `w-4 h-4 text-primary-950 transition-transform ${isMonthPickerOpen ? "rotate-180" : ""}`,
|
|
3661
4125
|
fill: "none",
|
|
3662
4126
|
stroke: "currentColor",
|
|
3663
4127
|
viewBox: "0 0 24 24",
|
|
3664
|
-
children: /* @__PURE__ */ (0,
|
|
4128
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3665
4129
|
"path",
|
|
3666
4130
|
{
|
|
3667
4131
|
strokeLinecap: "round",
|
|
@@ -3675,7 +4139,7 @@ var Calendar = ({
|
|
|
3675
4139
|
]
|
|
3676
4140
|
}
|
|
3677
4141
|
),
|
|
3678
|
-
isMonthPickerOpen && /* @__PURE__ */ (0,
|
|
4142
|
+
isMonthPickerOpen && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3679
4143
|
MonthYearPicker,
|
|
3680
4144
|
{
|
|
3681
4145
|
monthPickerRef,
|
|
@@ -3686,21 +4150,21 @@ var Calendar = ({
|
|
|
3686
4150
|
}
|
|
3687
4151
|
)
|
|
3688
4152
|
] }),
|
|
3689
|
-
/* @__PURE__ */ (0,
|
|
3690
|
-
/* @__PURE__ */ (0,
|
|
4153
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center gap-10", children: [
|
|
4154
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3691
4155
|
"button",
|
|
3692
4156
|
{
|
|
3693
4157
|
onClick: goToPreviousMonth,
|
|
3694
4158
|
className: "p-1 rounded hover:bg-background-100 transition-colors",
|
|
3695
4159
|
"aria-label": "M\xEAs anterior",
|
|
3696
|
-
children: /* @__PURE__ */ (0,
|
|
4160
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3697
4161
|
"svg",
|
|
3698
4162
|
{
|
|
3699
4163
|
className: "w-6 h-6 text-primary-950",
|
|
3700
4164
|
fill: "none",
|
|
3701
4165
|
stroke: "currentColor",
|
|
3702
4166
|
viewBox: "0 0 24 24",
|
|
3703
|
-
children: /* @__PURE__ */ (0,
|
|
4167
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3704
4168
|
"path",
|
|
3705
4169
|
{
|
|
3706
4170
|
strokeLinecap: "round",
|
|
@@ -3713,20 +4177,20 @@ var Calendar = ({
|
|
|
3713
4177
|
)
|
|
3714
4178
|
}
|
|
3715
4179
|
),
|
|
3716
|
-
/* @__PURE__ */ (0,
|
|
4180
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3717
4181
|
"button",
|
|
3718
4182
|
{
|
|
3719
4183
|
onClick: goToNextMonth,
|
|
3720
4184
|
className: "p-1 rounded hover:bg-background-100 transition-colors",
|
|
3721
4185
|
"aria-label": "Pr\xF3ximo m\xEAs",
|
|
3722
|
-
children: /* @__PURE__ */ (0,
|
|
4186
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3723
4187
|
"svg",
|
|
3724
4188
|
{
|
|
3725
4189
|
className: "w-6 h-6 text-primary-950",
|
|
3726
4190
|
fill: "none",
|
|
3727
4191
|
stroke: "currentColor",
|
|
3728
4192
|
viewBox: "0 0 24 24",
|
|
3729
|
-
children: /* @__PURE__ */ (0,
|
|
4193
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3730
4194
|
"path",
|
|
3731
4195
|
{
|
|
3732
4196
|
strokeLinecap: "round",
|
|
@@ -3741,7 +4205,7 @@ var Calendar = ({
|
|
|
3741
4205
|
)
|
|
3742
4206
|
] })
|
|
3743
4207
|
] }),
|
|
3744
|
-
/* @__PURE__ */ (0,
|
|
4208
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "grid grid-cols-7 gap-1 mb-2 px-3", children: WEEK_DAYS_SHORT.map((day, index) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3745
4209
|
"div",
|
|
3746
4210
|
{
|
|
3747
4211
|
className: "h-9 flex items-center justify-center text-xs font-normal text-text-600",
|
|
@@ -3749,13 +4213,13 @@ var Calendar = ({
|
|
|
3749
4213
|
},
|
|
3750
4214
|
`${day}-${index}`
|
|
3751
4215
|
)) }),
|
|
3752
|
-
/* @__PURE__ */ (0,
|
|
4216
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "grid grid-cols-7 gap-1 px-3", children: calendarData.map((day) => {
|
|
3753
4217
|
if (!day.isCurrentMonth) {
|
|
3754
|
-
return /* @__PURE__ */ (0,
|
|
4218
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3755
4219
|
"div",
|
|
3756
4220
|
{
|
|
3757
4221
|
className: "flex items-center justify-center",
|
|
3758
|
-
children: /* @__PURE__ */ (0,
|
|
4222
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "w-9 h-9" })
|
|
3759
4223
|
},
|
|
3760
4224
|
day.date.getTime()
|
|
3761
4225
|
);
|
|
@@ -3771,11 +4235,11 @@ var Calendar = ({
|
|
|
3771
4235
|
} else if (day.isSelected) {
|
|
3772
4236
|
spanClass = "h-6 w-6 rounded-full bg-primary-950 text-text";
|
|
3773
4237
|
}
|
|
3774
|
-
return /* @__PURE__ */ (0,
|
|
4238
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3775
4239
|
"div",
|
|
3776
4240
|
{
|
|
3777
4241
|
className: "flex items-center justify-center",
|
|
3778
|
-
children: /* @__PURE__ */ (0,
|
|
4242
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3779
4243
|
"button",
|
|
3780
4244
|
{
|
|
3781
4245
|
className: `
|
|
@@ -3791,7 +4255,7 @@ var Calendar = ({
|
|
|
3791
4255
|
"aria-label": `${day.date.getDate()} de ${MONTH_NAMES[day.date.getMonth()]}`,
|
|
3792
4256
|
"aria-current": day.isToday ? "date" : void 0,
|
|
3793
4257
|
tabIndex: 0,
|
|
3794
|
-
children: /* @__PURE__ */ (0,
|
|
4258
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: spanClass, children: day.date.getDate() })
|
|
3795
4259
|
}
|
|
3796
4260
|
)
|
|
3797
4261
|
},
|
|
@@ -3800,28 +4264,28 @@ var Calendar = ({
|
|
|
3800
4264
|
}) })
|
|
3801
4265
|
] });
|
|
3802
4266
|
}
|
|
3803
|
-
return /* @__PURE__ */ (0,
|
|
3804
|
-
/* @__PURE__ */ (0,
|
|
3805
|
-
/* @__PURE__ */ (0,
|
|
3806
|
-
/* @__PURE__ */ (0,
|
|
4267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: cn("bg-background rounded-xl p-4", className), children: [
|
|
4268
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center justify-between mb-3.5", children: [
|
|
4269
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "relative", ref: monthPickerContainerRef, children: [
|
|
4270
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
3807
4271
|
"button",
|
|
3808
4272
|
{
|
|
3809
4273
|
onClick: toggleMonthPicker,
|
|
3810
4274
|
className: "flex items-center gap-2 hover:bg-background-100 rounded px-2 py-1 transition-colors",
|
|
3811
4275
|
children: [
|
|
3812
|
-
/* @__PURE__ */ (0,
|
|
4276
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("h2", { className: "text-lg font-semibold text-text-950", children: [
|
|
3813
4277
|
MONTH_NAMES[currentDate.getMonth()],
|
|
3814
4278
|
" ",
|
|
3815
4279
|
currentDate.getFullYear()
|
|
3816
4280
|
] }),
|
|
3817
|
-
/* @__PURE__ */ (0,
|
|
4281
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3818
4282
|
"svg",
|
|
3819
4283
|
{
|
|
3820
4284
|
className: `w-4 h-4 text-text-400 transition-transform ${isMonthPickerOpen ? "rotate-180" : ""}`,
|
|
3821
4285
|
fill: "none",
|
|
3822
4286
|
stroke: "currentColor",
|
|
3823
4287
|
viewBox: "0 0 24 24",
|
|
3824
|
-
children: /* @__PURE__ */ (0,
|
|
4288
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3825
4289
|
"path",
|
|
3826
4290
|
{
|
|
3827
4291
|
strokeLinecap: "round",
|
|
@@ -3835,7 +4299,7 @@ var Calendar = ({
|
|
|
3835
4299
|
]
|
|
3836
4300
|
}
|
|
3837
4301
|
),
|
|
3838
|
-
isMonthPickerOpen && /* @__PURE__ */ (0,
|
|
4302
|
+
isMonthPickerOpen && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3839
4303
|
MonthYearPicker,
|
|
3840
4304
|
{
|
|
3841
4305
|
monthPickerRef,
|
|
@@ -3846,21 +4310,21 @@ var Calendar = ({
|
|
|
3846
4310
|
}
|
|
3847
4311
|
)
|
|
3848
4312
|
] }),
|
|
3849
|
-
/* @__PURE__ */ (0,
|
|
3850
|
-
/* @__PURE__ */ (0,
|
|
4313
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
4314
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3851
4315
|
"button",
|
|
3852
4316
|
{
|
|
3853
4317
|
onClick: goToPreviousMonth,
|
|
3854
4318
|
className: "p-1 rounded-md hover:bg-background-100 transition-colors",
|
|
3855
4319
|
"aria-label": "M\xEAs anterior",
|
|
3856
|
-
children: /* @__PURE__ */ (0,
|
|
4320
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3857
4321
|
"svg",
|
|
3858
4322
|
{
|
|
3859
4323
|
className: "w-6 h-6 text-primary-950",
|
|
3860
4324
|
fill: "none",
|
|
3861
4325
|
stroke: "currentColor",
|
|
3862
4326
|
viewBox: "0 0 24 24",
|
|
3863
|
-
children: /* @__PURE__ */ (0,
|
|
4327
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3864
4328
|
"path",
|
|
3865
4329
|
{
|
|
3866
4330
|
strokeLinecap: "round",
|
|
@@ -3873,20 +4337,20 @@ var Calendar = ({
|
|
|
3873
4337
|
)
|
|
3874
4338
|
}
|
|
3875
4339
|
),
|
|
3876
|
-
/* @__PURE__ */ (0,
|
|
4340
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3877
4341
|
"button",
|
|
3878
4342
|
{
|
|
3879
4343
|
onClick: goToNextMonth,
|
|
3880
4344
|
className: "p-1 rounded-md hover:bg-background-100 transition-colors",
|
|
3881
4345
|
"aria-label": "Pr\xF3ximo m\xEAs",
|
|
3882
|
-
children: /* @__PURE__ */ (0,
|
|
4346
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3883
4347
|
"svg",
|
|
3884
4348
|
{
|
|
3885
4349
|
className: "w-6 h-6 text-primary-950",
|
|
3886
4350
|
fill: "none",
|
|
3887
4351
|
stroke: "currentColor",
|
|
3888
4352
|
viewBox: "0 0 24 24",
|
|
3889
|
-
children: /* @__PURE__ */ (0,
|
|
4353
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3890
4354
|
"path",
|
|
3891
4355
|
{
|
|
3892
4356
|
strokeLinecap: "round",
|
|
@@ -3901,7 +4365,7 @@ var Calendar = ({
|
|
|
3901
4365
|
)
|
|
3902
4366
|
] })
|
|
3903
4367
|
] }),
|
|
3904
|
-
/* @__PURE__ */ (0,
|
|
4368
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "grid grid-cols-7 mb-2", children: WEEK_DAYS.map((day) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3905
4369
|
"div",
|
|
3906
4370
|
{
|
|
3907
4371
|
className: "h-4 flex items-center justify-center text-xs font-semibold text-text-500",
|
|
@@ -3909,159 +4373,65 @@ var Calendar = ({
|
|
|
3909
4373
|
},
|
|
3910
4374
|
day
|
|
3911
4375
|
)) }),
|
|
3912
|
-
/* @__PURE__ */ (0,
|
|
4376
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "grid grid-cols-7", children: calendarData.map((day) => {
|
|
3913
4377
|
if (!day.isCurrentMonth) {
|
|
3914
|
-
return /* @__PURE__ */ (0,
|
|
4378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3915
4379
|
"div",
|
|
3916
4380
|
{
|
|
3917
4381
|
className: "flex items-center justify-center",
|
|
3918
|
-
children: /* @__PURE__ */ (0,
|
|
3919
|
-
},
|
|
3920
|
-
day.date.getTime()
|
|
3921
|
-
);
|
|
3922
|
-
}
|
|
3923
|
-
const { dayStyle, textStyle } = getDayStyles(
|
|
3924
|
-
day,
|
|
3925
|
-
variant,
|
|
3926
|
-
showActivities
|
|
3927
|
-
);
|
|
3928
|
-
return /* @__PURE__ */ (0,
|
|
3929
|
-
"div",
|
|
3930
|
-
{
|
|
3931
|
-
className: "flex items-center justify-center",
|
|
3932
|
-
children: /* @__PURE__ */ (0,
|
|
3933
|
-
"button",
|
|
3934
|
-
{
|
|
3935
|
-
className: `
|
|
3936
|
-
w-9 h-9
|
|
3937
|
-
flex items-center justify-center
|
|
3938
|
-
text-lg font-normal
|
|
3939
|
-
cursor-pointer
|
|
3940
|
-
rounded-full
|
|
3941
|
-
focus:outline-none focus:ring-2 focus:ring-primary-600 focus:ring-offset-1
|
|
3942
|
-
${dayStyle}
|
|
3943
|
-
${textStyle}
|
|
3944
|
-
`,
|
|
3945
|
-
onClick: () => handleDateSelect(day),
|
|
3946
|
-
"aria-label": `${day.date.getDate()} de ${MONTH_NAMES[day.date.getMonth()]}`,
|
|
3947
|
-
"aria-current": day.isToday ? "date" : void 0,
|
|
3948
|
-
tabIndex: 0,
|
|
3949
|
-
children: day.date.getDate()
|
|
3950
|
-
}
|
|
3951
|
-
)
|
|
3952
|
-
},
|
|
3953
|
-
day.date.getTime()
|
|
3954
|
-
);
|
|
3955
|
-
}) })
|
|
3956
|
-
] });
|
|
3957
|
-
};
|
|
3958
|
-
var Calendar_default = Calendar;
|
|
3959
|
-
|
|
3960
|
-
// src/components/Modal/Modal.tsx
|
|
3961
|
-
var import_react13 = require("react");
|
|
3962
|
-
var import_phosphor_react11 = require("phosphor-react");
|
|
3963
|
-
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
3964
|
-
var SIZE_CLASSES10 = {
|
|
3965
|
-
xs: "max-w-[360px]",
|
|
3966
|
-
sm: "max-w-[420px]",
|
|
3967
|
-
md: "max-w-[510px]",
|
|
3968
|
-
lg: "max-w-[640px]",
|
|
3969
|
-
xl: "max-w-[970px]"
|
|
3970
|
-
};
|
|
3971
|
-
var Modal = ({
|
|
3972
|
-
isOpen,
|
|
3973
|
-
onClose,
|
|
3974
|
-
title,
|
|
3975
|
-
children,
|
|
3976
|
-
size = "md",
|
|
3977
|
-
className = "",
|
|
3978
|
-
closeOnBackdropClick = true,
|
|
3979
|
-
closeOnEscape = true,
|
|
3980
|
-
footer,
|
|
3981
|
-
hideCloseButton = false
|
|
3982
|
-
}) => {
|
|
3983
|
-
(0, import_react13.useEffect)(() => {
|
|
3984
|
-
if (!isOpen || !closeOnEscape) return;
|
|
3985
|
-
const handleEscape = (event) => {
|
|
3986
|
-
if (event.key === "Escape") {
|
|
3987
|
-
onClose();
|
|
3988
|
-
}
|
|
3989
|
-
};
|
|
3990
|
-
document.addEventListener("keydown", handleEscape);
|
|
3991
|
-
return () => document.removeEventListener("keydown", handleEscape);
|
|
3992
|
-
}, [isOpen, closeOnEscape, onClose]);
|
|
3993
|
-
(0, import_react13.useEffect)(() => {
|
|
3994
|
-
const originalOverflow = document.body.style.overflow;
|
|
3995
|
-
if (isOpen) {
|
|
3996
|
-
document.body.style.overflow = "hidden";
|
|
3997
|
-
} else {
|
|
3998
|
-
document.body.style.overflow = originalOverflow;
|
|
3999
|
-
}
|
|
4000
|
-
return () => {
|
|
4001
|
-
document.body.style.overflow = originalOverflow;
|
|
4002
|
-
};
|
|
4003
|
-
}, [isOpen]);
|
|
4004
|
-
const handleBackdropClick = (event) => {
|
|
4005
|
-
if (closeOnBackdropClick && event.target === event.currentTarget) {
|
|
4006
|
-
onClose();
|
|
4007
|
-
}
|
|
4008
|
-
};
|
|
4009
|
-
const handleBackdropKeyDown = (event) => {
|
|
4010
|
-
if (closeOnBackdropClick && (event.key === "Enter" || event.key === " ")) {
|
|
4011
|
-
onClose();
|
|
4012
|
-
}
|
|
4013
|
-
};
|
|
4014
|
-
if (!isOpen) return null;
|
|
4015
|
-
const sizeClasses = SIZE_CLASSES10[size];
|
|
4016
|
-
const baseClasses = "bg-secondary-50 rounded-3xl shadow-hard-shadow-2 border border-border-100 w-full mx-4";
|
|
4017
|
-
const dialogResetClasses = "p-0 m-0 border-none outline-none max-h-none static";
|
|
4018
|
-
const modalClasses = cn(
|
|
4019
|
-
baseClasses,
|
|
4020
|
-
sizeClasses,
|
|
4021
|
-
dialogResetClasses,
|
|
4022
|
-
className
|
|
4023
|
-
);
|
|
4024
|
-
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4025
|
-
"div",
|
|
4026
|
-
{
|
|
4027
|
-
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-xs",
|
|
4028
|
-
onClick: handleBackdropClick,
|
|
4029
|
-
onKeyDown: handleBackdropKeyDown,
|
|
4030
|
-
role: "button",
|
|
4031
|
-
tabIndex: closeOnBackdropClick ? 0 : -1,
|
|
4032
|
-
"aria-label": "Fechar modal clicando no fundo",
|
|
4033
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("dialog", { className: modalClasses, "aria-labelledby": "modal-title", open: true, children: [
|
|
4034
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center justify-between px-6 py-6", children: [
|
|
4035
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h2", { id: "modal-title", className: "text-lg font-semibold text-text-950", children: title }),
|
|
4036
|
-
!hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4382
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "w-10 h-10" })
|
|
4383
|
+
},
|
|
4384
|
+
day.date.getTime()
|
|
4385
|
+
);
|
|
4386
|
+
}
|
|
4387
|
+
const { dayStyle, textStyle } = getDayStyles(
|
|
4388
|
+
day,
|
|
4389
|
+
variant,
|
|
4390
|
+
showActivities
|
|
4391
|
+
);
|
|
4392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4393
|
+
"div",
|
|
4394
|
+
{
|
|
4395
|
+
className: "flex items-center justify-center",
|
|
4396
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4037
4397
|
"button",
|
|
4038
4398
|
{
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4399
|
+
className: `
|
|
4400
|
+
w-9 h-9
|
|
4401
|
+
flex items-center justify-center
|
|
4402
|
+
text-lg font-normal
|
|
4403
|
+
cursor-pointer
|
|
4404
|
+
rounded-full
|
|
4405
|
+
focus:outline-none focus:ring-2 focus:ring-primary-600 focus:ring-offset-1
|
|
4406
|
+
${dayStyle}
|
|
4407
|
+
${textStyle}
|
|
4408
|
+
`,
|
|
4409
|
+
onClick: () => handleDateSelect(day),
|
|
4410
|
+
"aria-label": `${day.date.getDate()} de ${MONTH_NAMES[day.date.getMonth()]}`,
|
|
4411
|
+
"aria-current": day.isToday ? "date" : void 0,
|
|
4412
|
+
tabIndex: 0,
|
|
4413
|
+
children: day.date.getDate()
|
|
4043
4414
|
}
|
|
4044
4415
|
)
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
);
|
|
4416
|
+
},
|
|
4417
|
+
day.date.getTime()
|
|
4418
|
+
);
|
|
4419
|
+
}) })
|
|
4420
|
+
] });
|
|
4051
4421
|
};
|
|
4052
|
-
var
|
|
4422
|
+
var Calendar_default = Calendar;
|
|
4053
4423
|
|
|
4054
4424
|
// src/components/Accordation/Accordation.tsx
|
|
4055
|
-
var
|
|
4425
|
+
var import_react17 = require("react");
|
|
4056
4426
|
|
|
4057
4427
|
// src/components/Card/Card.tsx
|
|
4058
|
-
var
|
|
4059
|
-
var
|
|
4428
|
+
var import_react16 = require("react");
|
|
4429
|
+
var import_phosphor_react13 = require("phosphor-react");
|
|
4060
4430
|
|
|
4061
4431
|
// src/components/IconRender/IconRender.tsx
|
|
4062
4432
|
var PhosphorIcons = __toESM(require("phosphor-react"));
|
|
4063
|
-
var
|
|
4064
|
-
var ChatPT = ({ size, color }) => /* @__PURE__ */ (0,
|
|
4433
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
4434
|
+
var ChatPT = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
4065
4435
|
"svg",
|
|
4066
4436
|
{
|
|
4067
4437
|
width: size,
|
|
@@ -4070,21 +4440,21 @@ var ChatPT = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)
|
|
|
4070
4440
|
fill: "none",
|
|
4071
4441
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4072
4442
|
children: [
|
|
4073
|
-
/* @__PURE__ */ (0,
|
|
4443
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4074
4444
|
"path",
|
|
4075
4445
|
{
|
|
4076
4446
|
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",
|
|
4077
4447
|
fill: color
|
|
4078
4448
|
}
|
|
4079
4449
|
),
|
|
4080
|
-
/* @__PURE__ */ (0,
|
|
4450
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4081
4451
|
"path",
|
|
4082
4452
|
{
|
|
4083
4453
|
d: "M21.1758 12V20.5312H19.7168V12H21.1758ZM23.8535 12V13.1719H17.0625V12H23.8535Z",
|
|
4084
4454
|
fill: color
|
|
4085
4455
|
}
|
|
4086
4456
|
),
|
|
4087
|
-
/* @__PURE__ */ (0,
|
|
4457
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4088
4458
|
"path",
|
|
4089
4459
|
{
|
|
4090
4460
|
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",
|
|
@@ -4094,7 +4464,7 @@ var ChatPT = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)
|
|
|
4094
4464
|
]
|
|
4095
4465
|
}
|
|
4096
4466
|
);
|
|
4097
|
-
var ChatEN = ({ size, color }) => /* @__PURE__ */ (0,
|
|
4467
|
+
var ChatEN = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
4098
4468
|
"svg",
|
|
4099
4469
|
{
|
|
4100
4470
|
width: size,
|
|
@@ -4103,21 +4473,21 @@ var ChatEN = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)
|
|
|
4103
4473
|
fill: "none",
|
|
4104
4474
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4105
4475
|
children: [
|
|
4106
|
-
/* @__PURE__ */ (0,
|
|
4476
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4107
4477
|
"path",
|
|
4108
4478
|
{
|
|
4109
4479
|
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",
|
|
4110
4480
|
fill: color
|
|
4111
4481
|
}
|
|
4112
4482
|
),
|
|
4113
|
-
/* @__PURE__ */ (0,
|
|
4483
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4114
4484
|
"path",
|
|
4115
4485
|
{
|
|
4116
4486
|
d: "M22.5488 12V20.5312H21.0781L17.252 14.4199V20.5312H15.7812V12H17.252L21.0898 18.123V12H22.5488Z",
|
|
4117
4487
|
fill: color
|
|
4118
4488
|
}
|
|
4119
4489
|
),
|
|
4120
|
-
/* @__PURE__ */ (0,
|
|
4490
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4121
4491
|
"path",
|
|
4122
4492
|
{
|
|
4123
4493
|
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",
|
|
@@ -4127,7 +4497,7 @@ var ChatEN = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)
|
|
|
4127
4497
|
]
|
|
4128
4498
|
}
|
|
4129
4499
|
);
|
|
4130
|
-
var ChatES = ({ size, color }) => /* @__PURE__ */ (0,
|
|
4500
|
+
var ChatES = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
4131
4501
|
"svg",
|
|
4132
4502
|
{
|
|
4133
4503
|
width: size,
|
|
@@ -4136,21 +4506,21 @@ var ChatES = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)
|
|
|
4136
4506
|
fill: "none",
|
|
4137
4507
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4138
4508
|
children: [
|
|
4139
|
-
/* @__PURE__ */ (0,
|
|
4509
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4140
4510
|
"path",
|
|
4141
4511
|
{
|
|
4142
4512
|
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",
|
|
4143
4513
|
fill: color
|
|
4144
4514
|
}
|
|
4145
4515
|
),
|
|
4146
|
-
/* @__PURE__ */ (0,
|
|
4516
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4147
4517
|
"path",
|
|
4148
4518
|
{
|
|
4149
4519
|
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",
|
|
4150
4520
|
fill: color
|
|
4151
4521
|
}
|
|
4152
4522
|
),
|
|
4153
|
-
/* @__PURE__ */ (0,
|
|
4523
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4154
4524
|
"path",
|
|
4155
4525
|
{
|
|
4156
4526
|
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",
|
|
@@ -4168,21 +4538,21 @@ var IconRender = ({
|
|
|
4168
4538
|
}) => {
|
|
4169
4539
|
switch (iconName) {
|
|
4170
4540
|
case "Chat_PT":
|
|
4171
|
-
return /* @__PURE__ */ (0,
|
|
4541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ChatPT, { size, color });
|
|
4172
4542
|
case "Chat_EN":
|
|
4173
|
-
return /* @__PURE__ */ (0,
|
|
4543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ChatEN, { size, color });
|
|
4174
4544
|
case "Chat_ES":
|
|
4175
|
-
return /* @__PURE__ */ (0,
|
|
4545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ChatES, { size, color });
|
|
4176
4546
|
default: {
|
|
4177
4547
|
const IconComponent = PhosphorIcons[iconName] || PhosphorIcons.Question;
|
|
4178
|
-
return /* @__PURE__ */ (0,
|
|
4548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IconComponent, { size, color, weight });
|
|
4179
4549
|
}
|
|
4180
4550
|
}
|
|
4181
4551
|
};
|
|
4182
4552
|
var IconRender_default = IconRender;
|
|
4183
4553
|
|
|
4184
4554
|
// src/components/Card/Card.tsx
|
|
4185
|
-
var
|
|
4555
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
4186
4556
|
var CARD_BASE_CLASSES = {
|
|
4187
4557
|
default: "w-full bg-background border border-border-50 rounded-xl",
|
|
4188
4558
|
compact: "w-full bg-background border border-border-50 rounded-lg",
|
|
@@ -4208,7 +4578,7 @@ var CARD_CURSOR_CLASSES = {
|
|
|
4208
4578
|
default: "",
|
|
4209
4579
|
pointer: "cursor-pointer"
|
|
4210
4580
|
};
|
|
4211
|
-
var CardBase = (0,
|
|
4581
|
+
var CardBase = (0, import_react16.forwardRef)(
|
|
4212
4582
|
({
|
|
4213
4583
|
children,
|
|
4214
4584
|
variant = "default",
|
|
@@ -4224,7 +4594,7 @@ var CardBase = (0, import_react14.forwardRef)(
|
|
|
4224
4594
|
const minHeightClasses = CARD_MIN_HEIGHT_CLASSES[minHeight];
|
|
4225
4595
|
const layoutClasses = CARD_LAYOUT_CLASSES[layout];
|
|
4226
4596
|
const cursorClasses = CARD_CURSOR_CLASSES[cursor];
|
|
4227
|
-
return /* @__PURE__ */ (0,
|
|
4597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4228
4598
|
"div",
|
|
4229
4599
|
{
|
|
4230
4600
|
ref,
|
|
@@ -4266,7 +4636,7 @@ var ACTION_HEADER_CLASSES = {
|
|
|
4266
4636
|
error: "text-error-300",
|
|
4267
4637
|
info: "text-info-300"
|
|
4268
4638
|
};
|
|
4269
|
-
var CardActivitiesResults = (0,
|
|
4639
|
+
var CardActivitiesResults = (0, import_react16.forwardRef)(
|
|
4270
4640
|
({
|
|
4271
4641
|
icon,
|
|
4272
4642
|
title,
|
|
@@ -4282,7 +4652,7 @@ var CardActivitiesResults = (0, import_react14.forwardRef)(
|
|
|
4282
4652
|
const actionIconClasses = ACTION_ICON_CLASSES[action];
|
|
4283
4653
|
const actionSubTitleClasses = ACTION_SUBTITLE_CLASSES[action];
|
|
4284
4654
|
const actionHeaderClasses = ACTION_HEADER_CLASSES[action];
|
|
4285
|
-
return /* @__PURE__ */ (0,
|
|
4655
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4286
4656
|
"div",
|
|
4287
4657
|
{
|
|
4288
4658
|
ref,
|
|
@@ -4292,7 +4662,7 @@ var CardActivitiesResults = (0, import_react14.forwardRef)(
|
|
|
4292
4662
|
),
|
|
4293
4663
|
...props,
|
|
4294
4664
|
children: [
|
|
4295
|
-
/* @__PURE__ */ (0,
|
|
4665
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4296
4666
|
"div",
|
|
4297
4667
|
{
|
|
4298
4668
|
className: cn(
|
|
@@ -4301,7 +4671,7 @@ var CardActivitiesResults = (0, import_react14.forwardRef)(
|
|
|
4301
4671
|
extended ? "rounded-t-xl" : "rounded-xl"
|
|
4302
4672
|
),
|
|
4303
4673
|
children: [
|
|
4304
|
-
/* @__PURE__ */ (0,
|
|
4674
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4305
4675
|
"span",
|
|
4306
4676
|
{
|
|
4307
4677
|
className: cn(
|
|
@@ -4311,7 +4681,7 @@ var CardActivitiesResults = (0, import_react14.forwardRef)(
|
|
|
4311
4681
|
children: icon
|
|
4312
4682
|
}
|
|
4313
4683
|
),
|
|
4314
|
-
/* @__PURE__ */ (0,
|
|
4684
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4315
4685
|
Text_default,
|
|
4316
4686
|
{
|
|
4317
4687
|
size: "2xs",
|
|
@@ -4320,7 +4690,7 @@ var CardActivitiesResults = (0, import_react14.forwardRef)(
|
|
|
4320
4690
|
children: title
|
|
4321
4691
|
}
|
|
4322
4692
|
),
|
|
4323
|
-
/* @__PURE__ */ (0,
|
|
4693
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4324
4694
|
"p",
|
|
4325
4695
|
{
|
|
4326
4696
|
className: cn("text-lg font-bold truncate", actionSubTitleClasses),
|
|
@@ -4330,8 +4700,8 @@ var CardActivitiesResults = (0, import_react14.forwardRef)(
|
|
|
4330
4700
|
]
|
|
4331
4701
|
}
|
|
4332
4702
|
),
|
|
4333
|
-
extended && /* @__PURE__ */ (0,
|
|
4334
|
-
/* @__PURE__ */ (0,
|
|
4703
|
+
extended && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col items-center gap-2.5 pb-9.5 pt-2.5", children: [
|
|
4704
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4335
4705
|
"p",
|
|
4336
4706
|
{
|
|
4337
4707
|
className: cn(
|
|
@@ -4341,14 +4711,14 @@ var CardActivitiesResults = (0, import_react14.forwardRef)(
|
|
|
4341
4711
|
children: header
|
|
4342
4712
|
}
|
|
4343
4713
|
),
|
|
4344
|
-
/* @__PURE__ */ (0,
|
|
4714
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Badge_default, { size: "large", action: "info", children: description })
|
|
4345
4715
|
] })
|
|
4346
4716
|
]
|
|
4347
4717
|
}
|
|
4348
4718
|
);
|
|
4349
4719
|
}
|
|
4350
4720
|
);
|
|
4351
|
-
var CardQuestions = (0,
|
|
4721
|
+
var CardQuestions = (0, import_react16.forwardRef)(
|
|
4352
4722
|
({
|
|
4353
4723
|
header,
|
|
4354
4724
|
state = "undone",
|
|
@@ -4360,7 +4730,7 @@ var CardQuestions = (0, import_react14.forwardRef)(
|
|
|
4360
4730
|
const isDone = state === "done";
|
|
4361
4731
|
const stateLabel = isDone ? "Realizado" : "N\xE3o Realizado";
|
|
4362
4732
|
const buttonLabel = isDone ? "Ver Quest\xE3o" : "Responder";
|
|
4363
|
-
return /* @__PURE__ */ (0,
|
|
4733
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4364
4734
|
CardBase,
|
|
4365
4735
|
{
|
|
4366
4736
|
ref,
|
|
@@ -4370,10 +4740,10 @@ var CardQuestions = (0, import_react14.forwardRef)(
|
|
|
4370
4740
|
className: cn("justify-between gap-4", className),
|
|
4371
4741
|
...props,
|
|
4372
4742
|
children: [
|
|
4373
|
-
/* @__PURE__ */ (0,
|
|
4374
|
-
/* @__PURE__ */ (0,
|
|
4375
|
-
/* @__PURE__ */ (0,
|
|
4376
|
-
/* @__PURE__ */ (0,
|
|
4743
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("section", { className: "flex flex-col gap-1 flex-1 min-w-0", children: [
|
|
4744
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "font-bold text-xs text-text-950 truncate", children: header }),
|
|
4745
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-row gap-6 items-center", children: [
|
|
4746
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4377
4747
|
Badge_default,
|
|
4378
4748
|
{
|
|
4379
4749
|
size: "medium",
|
|
@@ -4382,13 +4752,13 @@ var CardQuestions = (0, import_react14.forwardRef)(
|
|
|
4382
4752
|
children: stateLabel
|
|
4383
4753
|
}
|
|
4384
4754
|
),
|
|
4385
|
-
/* @__PURE__ */ (0,
|
|
4755
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "flex flex-row items-center gap-1 text-text-700 text-xs", children: [
|
|
4386
4756
|
isDone ? "Nota" : "Sem nota",
|
|
4387
|
-
isDone && /* @__PURE__ */ (0,
|
|
4757
|
+
isDone && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Badge_default, { size: "medium", action: "success", children: "00" })
|
|
4388
4758
|
] })
|
|
4389
4759
|
] })
|
|
4390
4760
|
] }),
|
|
4391
|
-
/* @__PURE__ */ (0,
|
|
4761
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4392
4762
|
Button_default,
|
|
4393
4763
|
{
|
|
4394
4764
|
size: "extra-small",
|
|
@@ -4402,7 +4772,7 @@ var CardQuestions = (0, import_react14.forwardRef)(
|
|
|
4402
4772
|
);
|
|
4403
4773
|
}
|
|
4404
4774
|
);
|
|
4405
|
-
var CardProgress = (0,
|
|
4775
|
+
var CardProgress = (0, import_react16.forwardRef)(
|
|
4406
4776
|
({
|
|
4407
4777
|
header,
|
|
4408
4778
|
subhead,
|
|
@@ -4419,19 +4789,19 @@ var CardProgress = (0, import_react14.forwardRef)(
|
|
|
4419
4789
|
}, ref) => {
|
|
4420
4790
|
const isHorizontal = direction === "horizontal";
|
|
4421
4791
|
const contentComponent = {
|
|
4422
|
-
horizontal: /* @__PURE__ */ (0,
|
|
4423
|
-
showDates && /* @__PURE__ */ (0,
|
|
4424
|
-
initialDate && /* @__PURE__ */ (0,
|
|
4425
|
-
/* @__PURE__ */ (0,
|
|
4426
|
-
/* @__PURE__ */ (0,
|
|
4792
|
+
horizontal: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
|
|
4793
|
+
showDates && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-row gap-6 items-center", children: [
|
|
4794
|
+
initialDate && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
|
|
4795
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-text-800 font-semibold", children: "In\xEDcio" }),
|
|
4796
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-text-600", children: initialDate })
|
|
4427
4797
|
] }),
|
|
4428
|
-
endDate && /* @__PURE__ */ (0,
|
|
4429
|
-
/* @__PURE__ */ (0,
|
|
4430
|
-
/* @__PURE__ */ (0,
|
|
4798
|
+
endDate && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
|
|
4799
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-text-800 font-semibold", children: "Fim" }),
|
|
4800
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-text-600", children: endDate })
|
|
4431
4801
|
] })
|
|
4432
4802
|
] }),
|
|
4433
|
-
/* @__PURE__ */ (0,
|
|
4434
|
-
/* @__PURE__ */ (0,
|
|
4803
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "grid grid-cols-[1fr_auto] items-center gap-2", children: [
|
|
4804
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4435
4805
|
ProgressBar_default,
|
|
4436
4806
|
{
|
|
4437
4807
|
size: "small",
|
|
@@ -4440,7 +4810,7 @@ var CardProgress = (0, import_react14.forwardRef)(
|
|
|
4440
4810
|
"data-testid": "progress-bar"
|
|
4441
4811
|
}
|
|
4442
4812
|
),
|
|
4443
|
-
/* @__PURE__ */ (0,
|
|
4813
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4444
4814
|
Text_default,
|
|
4445
4815
|
{
|
|
4446
4816
|
size: "xs",
|
|
@@ -4456,9 +4826,9 @@ var CardProgress = (0, import_react14.forwardRef)(
|
|
|
4456
4826
|
)
|
|
4457
4827
|
] })
|
|
4458
4828
|
] }),
|
|
4459
|
-
vertical: /* @__PURE__ */ (0,
|
|
4829
|
+
vertical: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-sm text-text-800", children: subhead })
|
|
4460
4830
|
};
|
|
4461
|
-
return /* @__PURE__ */ (0,
|
|
4831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4462
4832
|
CardBase,
|
|
4463
4833
|
{
|
|
4464
4834
|
ref,
|
|
@@ -4469,7 +4839,7 @@ var CardProgress = (0, import_react14.forwardRef)(
|
|
|
4469
4839
|
className: cn(isHorizontal ? "h-20" : "", className),
|
|
4470
4840
|
...props,
|
|
4471
4841
|
children: [
|
|
4472
|
-
/* @__PURE__ */ (0,
|
|
4842
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4473
4843
|
"div",
|
|
4474
4844
|
{
|
|
4475
4845
|
className: cn(
|
|
@@ -4482,7 +4852,7 @@ var CardProgress = (0, import_react14.forwardRef)(
|
|
|
4482
4852
|
children: icon
|
|
4483
4853
|
}
|
|
4484
4854
|
),
|
|
4485
|
-
/* @__PURE__ */ (0,
|
|
4855
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4486
4856
|
"div",
|
|
4487
4857
|
{
|
|
4488
4858
|
className: cn(
|
|
@@ -4490,7 +4860,7 @@ var CardProgress = (0, import_react14.forwardRef)(
|
|
|
4490
4860
|
!isHorizontal && "gap-4"
|
|
4491
4861
|
),
|
|
4492
4862
|
children: [
|
|
4493
|
-
/* @__PURE__ */ (0,
|
|
4863
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text_default, { size: "sm", weight: "bold", className: "text-text-950 truncate", children: header }),
|
|
4494
4864
|
contentComponent[direction]
|
|
4495
4865
|
]
|
|
4496
4866
|
}
|
|
@@ -4500,7 +4870,7 @@ var CardProgress = (0, import_react14.forwardRef)(
|
|
|
4500
4870
|
);
|
|
4501
4871
|
}
|
|
4502
4872
|
);
|
|
4503
|
-
var CardTopic = (0,
|
|
4873
|
+
var CardTopic = (0, import_react16.forwardRef)(
|
|
4504
4874
|
({
|
|
4505
4875
|
header,
|
|
4506
4876
|
subHead,
|
|
@@ -4510,7 +4880,7 @@ var CardTopic = (0, import_react14.forwardRef)(
|
|
|
4510
4880
|
className = "",
|
|
4511
4881
|
...props
|
|
4512
4882
|
}, ref) => {
|
|
4513
|
-
return /* @__PURE__ */ (0,
|
|
4883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4514
4884
|
CardBase,
|
|
4515
4885
|
{
|
|
4516
4886
|
ref,
|
|
@@ -4521,13 +4891,13 @@ var CardTopic = (0, import_react14.forwardRef)(
|
|
|
4521
4891
|
className: cn("justify-center gap-2 py-2 px-4", className),
|
|
4522
4892
|
...props,
|
|
4523
4893
|
children: [
|
|
4524
|
-
subHead && /* @__PURE__ */ (0,
|
|
4525
|
-
/* @__PURE__ */ (0,
|
|
4526
|
-
index < subHead.length - 1 && /* @__PURE__ */ (0,
|
|
4894
|
+
subHead && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-text-600 text-2xs flex flex-row gap-1", children: subHead.map((text, index) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_react16.Fragment, { children: [
|
|
4895
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { children: text }),
|
|
4896
|
+
index < subHead.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { children: "\u2022" })
|
|
4527
4897
|
] }, `${text} - ${index}`)) }),
|
|
4528
|
-
/* @__PURE__ */ (0,
|
|
4529
|
-
/* @__PURE__ */ (0,
|
|
4530
|
-
/* @__PURE__ */ (0,
|
|
4898
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-sm text-text-950 font-bold truncate", children: header }),
|
|
4899
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "grid grid-cols-[1fr_auto] items-center gap-2", children: [
|
|
4900
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4531
4901
|
ProgressBar_default,
|
|
4532
4902
|
{
|
|
4533
4903
|
size: "small",
|
|
@@ -4536,7 +4906,7 @@ var CardTopic = (0, import_react14.forwardRef)(
|
|
|
4536
4906
|
"data-testid": "progress-bar"
|
|
4537
4907
|
}
|
|
4538
4908
|
),
|
|
4539
|
-
showPercentage && /* @__PURE__ */ (0,
|
|
4909
|
+
showPercentage && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4540
4910
|
Text_default,
|
|
4541
4911
|
{
|
|
4542
4912
|
size: "xs",
|
|
@@ -4556,7 +4926,7 @@ var CardTopic = (0, import_react14.forwardRef)(
|
|
|
4556
4926
|
);
|
|
4557
4927
|
}
|
|
4558
4928
|
);
|
|
4559
|
-
var CardPerformance = (0,
|
|
4929
|
+
var CardPerformance = (0, import_react16.forwardRef)(
|
|
4560
4930
|
({
|
|
4561
4931
|
header,
|
|
4562
4932
|
progress,
|
|
@@ -4570,7 +4940,7 @@ var CardPerformance = (0, import_react14.forwardRef)(
|
|
|
4570
4940
|
...props
|
|
4571
4941
|
}, ref) => {
|
|
4572
4942
|
const hasProgress = progress !== void 0;
|
|
4573
|
-
return /* @__PURE__ */ (0,
|
|
4943
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4574
4944
|
CardBase,
|
|
4575
4945
|
{
|
|
4576
4946
|
ref,
|
|
@@ -4584,10 +4954,10 @@ var CardPerformance = (0, import_react14.forwardRef)(
|
|
|
4584
4954
|
onClick: () => actionVariant == "caret" && onClickButton?.(valueButton),
|
|
4585
4955
|
...props,
|
|
4586
4956
|
children: [
|
|
4587
|
-
/* @__PURE__ */ (0,
|
|
4588
|
-
/* @__PURE__ */ (0,
|
|
4589
|
-
/* @__PURE__ */ (0,
|
|
4590
|
-
actionVariant === "button" && /* @__PURE__ */ (0,
|
|
4957
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "w-full flex flex-col justify-between gap-2", children: [
|
|
4958
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-row justify-between items-center gap-2", children: [
|
|
4959
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-lg font-bold text-text-950 truncate flex-1 min-w-0", children: header }),
|
|
4960
|
+
actionVariant === "button" && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4591
4961
|
Button_default,
|
|
4592
4962
|
{
|
|
4593
4963
|
variant: "outline",
|
|
@@ -4598,17 +4968,17 @@ var CardPerformance = (0, import_react14.forwardRef)(
|
|
|
4598
4968
|
}
|
|
4599
4969
|
)
|
|
4600
4970
|
] }),
|
|
4601
|
-
/* @__PURE__ */ (0,
|
|
4971
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "w-full", children: hasProgress ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4602
4972
|
ProgressBar_default,
|
|
4603
4973
|
{
|
|
4604
4974
|
value: progress,
|
|
4605
4975
|
label: `${progress}% ${labelProgress}`,
|
|
4606
4976
|
variant: progressVariant
|
|
4607
4977
|
}
|
|
4608
|
-
) : /* @__PURE__ */ (0,
|
|
4978
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-xs text-text-600 truncate", children: description }) })
|
|
4609
4979
|
] }),
|
|
4610
|
-
actionVariant == "caret" && /* @__PURE__ */ (0,
|
|
4611
|
-
|
|
4980
|
+
actionVariant == "caret" && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4981
|
+
import_phosphor_react13.CaretRight,
|
|
4612
4982
|
{
|
|
4613
4983
|
className: "size-4.5 text-text-800 cursor-pointer",
|
|
4614
4984
|
"data-testid": "caret-icon"
|
|
@@ -4619,7 +4989,7 @@ var CardPerformance = (0, import_react14.forwardRef)(
|
|
|
4619
4989
|
);
|
|
4620
4990
|
}
|
|
4621
4991
|
);
|
|
4622
|
-
var CardResults = (0,
|
|
4992
|
+
var CardResults = (0, import_react16.forwardRef)(
|
|
4623
4993
|
({
|
|
4624
4994
|
header,
|
|
4625
4995
|
correct_answers,
|
|
@@ -4631,7 +5001,7 @@ var CardResults = (0, import_react14.forwardRef)(
|
|
|
4631
5001
|
...props
|
|
4632
5002
|
}, ref) => {
|
|
4633
5003
|
const isRow = direction == "row";
|
|
4634
|
-
return /* @__PURE__ */ (0,
|
|
5004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4635
5005
|
CardBase,
|
|
4636
5006
|
{
|
|
4637
5007
|
ref,
|
|
@@ -4641,7 +5011,7 @@ var CardResults = (0, import_react14.forwardRef)(
|
|
|
4641
5011
|
className: cn("items-stretch cursor-pointer pr-4", className),
|
|
4642
5012
|
...props,
|
|
4643
5013
|
children: [
|
|
4644
|
-
/* @__PURE__ */ (0,
|
|
5014
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4645
5015
|
"div",
|
|
4646
5016
|
{
|
|
4647
5017
|
className: cn(
|
|
@@ -4650,11 +5020,11 @@ var CardResults = (0, import_react14.forwardRef)(
|
|
|
4650
5020
|
style: {
|
|
4651
5021
|
backgroundColor: color
|
|
4652
5022
|
},
|
|
4653
|
-
children: /* @__PURE__ */ (0,
|
|
5023
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(IconRender_default, { iconName: icon, color: "currentColor", size: 20 })
|
|
4654
5024
|
}
|
|
4655
5025
|
),
|
|
4656
|
-
/* @__PURE__ */ (0,
|
|
4657
|
-
/* @__PURE__ */ (0,
|
|
5026
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "w-full flex flex-row justify-between items-center", children: [
|
|
5027
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4658
5028
|
"div",
|
|
4659
5029
|
{
|
|
4660
5030
|
className: cn(
|
|
@@ -4662,28 +5032,28 @@ var CardResults = (0, import_react14.forwardRef)(
|
|
|
4662
5032
|
isRow ? "flex-row items-center gap-2" : "flex-col"
|
|
4663
5033
|
),
|
|
4664
5034
|
children: [
|
|
4665
|
-
/* @__PURE__ */ (0,
|
|
4666
|
-
/* @__PURE__ */ (0,
|
|
4667
|
-
/* @__PURE__ */ (0,
|
|
5035
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-sm font-bold text-text-950 flex-1", children: header }),
|
|
5036
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "flex flex-wrap flex-row gap-1 items-center", children: [
|
|
5037
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4668
5038
|
Badge_default,
|
|
4669
5039
|
{
|
|
4670
5040
|
action: "success",
|
|
4671
5041
|
variant: "solid",
|
|
4672
5042
|
size: "large",
|
|
4673
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
5043
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_phosphor_react13.CheckCircle, {}),
|
|
4674
5044
|
children: [
|
|
4675
5045
|
correct_answers,
|
|
4676
5046
|
" Corretas"
|
|
4677
5047
|
]
|
|
4678
5048
|
}
|
|
4679
5049
|
),
|
|
4680
|
-
/* @__PURE__ */ (0,
|
|
5050
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4681
5051
|
Badge_default,
|
|
4682
5052
|
{
|
|
4683
5053
|
action: "error",
|
|
4684
5054
|
variant: "solid",
|
|
4685
5055
|
size: "large",
|
|
4686
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
5056
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_phosphor_react13.XCircle, {}),
|
|
4687
5057
|
children: [
|
|
4688
5058
|
incorrect_answers,
|
|
4689
5059
|
" Incorretas"
|
|
@@ -4694,14 +5064,14 @@ var CardResults = (0, import_react14.forwardRef)(
|
|
|
4694
5064
|
]
|
|
4695
5065
|
}
|
|
4696
5066
|
),
|
|
4697
|
-
/* @__PURE__ */ (0,
|
|
5067
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_phosphor_react13.CaretRight, { className: "min-w-6 min-h-6 text-text-800" })
|
|
4698
5068
|
] })
|
|
4699
5069
|
]
|
|
4700
5070
|
}
|
|
4701
5071
|
);
|
|
4702
5072
|
}
|
|
4703
5073
|
);
|
|
4704
|
-
var CardStatus = (0,
|
|
5074
|
+
var CardStatus = (0, import_react16.forwardRef)(
|
|
4705
5075
|
({ header, className, status, label, ...props }, ref) => {
|
|
4706
5076
|
const getLabelBadge = (status2) => {
|
|
4707
5077
|
switch (status2) {
|
|
@@ -4715,7 +5085,7 @@ var CardStatus = (0, import_react14.forwardRef)(
|
|
|
4715
5085
|
return "Em branco";
|
|
4716
5086
|
}
|
|
4717
5087
|
};
|
|
4718
|
-
return /* @__PURE__ */ (0,
|
|
5088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4719
5089
|
CardBase,
|
|
4720
5090
|
{
|
|
4721
5091
|
ref,
|
|
@@ -4724,30 +5094,30 @@ var CardStatus = (0, import_react14.forwardRef)(
|
|
|
4724
5094
|
minHeight: "medium",
|
|
4725
5095
|
className: cn("items-center cursor-pointer", className),
|
|
4726
5096
|
...props,
|
|
4727
|
-
children: /* @__PURE__ */ (0,
|
|
4728
|
-
/* @__PURE__ */ (0,
|
|
4729
|
-
/* @__PURE__ */ (0,
|
|
4730
|
-
status && /* @__PURE__ */ (0,
|
|
5097
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex justify-between w-full h-full flex-row items-center gap-2", children: [
|
|
5098
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-sm font-bold text-text-950 truncate flex-1 min-w-0", children: header }),
|
|
5099
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "flex flex-row gap-1 items-center flex-shrink-0", children: [
|
|
5100
|
+
status && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4731
5101
|
Badge_default,
|
|
4732
5102
|
{
|
|
4733
5103
|
action: status == "correct" ? "success" : "error",
|
|
4734
5104
|
variant: "solid",
|
|
4735
5105
|
size: "medium",
|
|
4736
|
-
iconLeft: status == "correct" ? /* @__PURE__ */ (0,
|
|
5106
|
+
iconLeft: status == "correct" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_phosphor_react13.CheckCircle, {}) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_phosphor_react13.XCircle, {}),
|
|
4737
5107
|
children: getLabelBadge(status)
|
|
4738
5108
|
}
|
|
4739
5109
|
),
|
|
4740
|
-
label && /* @__PURE__ */ (0,
|
|
5110
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-sm text-text-800", children: label })
|
|
4741
5111
|
] }),
|
|
4742
|
-
/* @__PURE__ */ (0,
|
|
5112
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_phosphor_react13.CaretRight, { className: "min-w-6 min-h-6 text-text-800 cursor-pointer flex-shrink-0 ml-2" })
|
|
4743
5113
|
] })
|
|
4744
5114
|
}
|
|
4745
5115
|
);
|
|
4746
5116
|
}
|
|
4747
5117
|
);
|
|
4748
|
-
var CardSettings = (0,
|
|
5118
|
+
var CardSettings = (0, import_react16.forwardRef)(
|
|
4749
5119
|
({ header, className, icon, ...props }, ref) => {
|
|
4750
|
-
return /* @__PURE__ */ (0,
|
|
5120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4751
5121
|
CardBase,
|
|
4752
5122
|
{
|
|
4753
5123
|
ref,
|
|
@@ -4760,17 +5130,17 @@ var CardSettings = (0, import_react14.forwardRef)(
|
|
|
4760
5130
|
),
|
|
4761
5131
|
...props,
|
|
4762
5132
|
children: [
|
|
4763
|
-
/* @__PURE__ */ (0,
|
|
4764
|
-
/* @__PURE__ */ (0,
|
|
4765
|
-
/* @__PURE__ */ (0,
|
|
5133
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "[&>svg]:size-6", children: icon }),
|
|
5134
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "w-full text-sm truncate", children: header }),
|
|
5135
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_phosphor_react13.CaretRight, { size: 24, className: "cursor-pointer" })
|
|
4766
5136
|
]
|
|
4767
5137
|
}
|
|
4768
5138
|
);
|
|
4769
5139
|
}
|
|
4770
5140
|
);
|
|
4771
|
-
var CardSupport = (0,
|
|
5141
|
+
var CardSupport = (0, import_react16.forwardRef)(
|
|
4772
5142
|
({ header, className, direction = "col", children, ...props }, ref) => {
|
|
4773
|
-
return /* @__PURE__ */ (0,
|
|
5143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4774
5144
|
CardBase,
|
|
4775
5145
|
{
|
|
4776
5146
|
ref,
|
|
@@ -4783,7 +5153,7 @@ var CardSupport = (0, import_react14.forwardRef)(
|
|
|
4783
5153
|
),
|
|
4784
5154
|
...props,
|
|
4785
5155
|
children: [
|
|
4786
|
-
/* @__PURE__ */ (0,
|
|
5156
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4787
5157
|
"div",
|
|
4788
5158
|
{
|
|
4789
5159
|
className: cn(
|
|
@@ -4791,18 +5161,18 @@ var CardSupport = (0, import_react14.forwardRef)(
|
|
|
4791
5161
|
direction == "col" ? "flex-col" : "flex-row items-center"
|
|
4792
5162
|
),
|
|
4793
5163
|
children: [
|
|
4794
|
-
/* @__PURE__ */ (0,
|
|
4795
|
-
/* @__PURE__ */ (0,
|
|
5164
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "w-full min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-sm text-text-950 font-bold truncate", children: header }) }),
|
|
5165
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "flex flex-row gap-1", children })
|
|
4796
5166
|
]
|
|
4797
5167
|
}
|
|
4798
5168
|
),
|
|
4799
|
-
/* @__PURE__ */ (0,
|
|
5169
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_phosphor_react13.CaretRight, { className: "text-text-800 cursor-pointer", size: 24 })
|
|
4800
5170
|
]
|
|
4801
5171
|
}
|
|
4802
5172
|
);
|
|
4803
5173
|
}
|
|
4804
5174
|
);
|
|
4805
|
-
var CardForum = (0,
|
|
5175
|
+
var CardForum = (0, import_react16.forwardRef)(
|
|
4806
5176
|
({
|
|
4807
5177
|
title,
|
|
4808
5178
|
content,
|
|
@@ -4816,7 +5186,7 @@ var CardForum = (0, import_react14.forwardRef)(
|
|
|
4816
5186
|
hour,
|
|
4817
5187
|
...props
|
|
4818
5188
|
}, ref) => {
|
|
4819
|
-
return /* @__PURE__ */ (0,
|
|
5189
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4820
5190
|
CardBase,
|
|
4821
5191
|
{
|
|
4822
5192
|
ref,
|
|
@@ -4827,7 +5197,7 @@ var CardForum = (0, import_react14.forwardRef)(
|
|
|
4827
5197
|
className: cn("w-auto h-auto gap-3", className),
|
|
4828
5198
|
...props,
|
|
4829
5199
|
children: [
|
|
4830
|
-
/* @__PURE__ */ (0,
|
|
5200
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4831
5201
|
"button",
|
|
4832
5202
|
{
|
|
4833
5203
|
type: "button",
|
|
@@ -4836,18 +5206,18 @@ var CardForum = (0, import_react14.forwardRef)(
|
|
|
4836
5206
|
className: "min-w-8 h-8 rounded-full bg-background-950"
|
|
4837
5207
|
}
|
|
4838
5208
|
),
|
|
4839
|
-
/* @__PURE__ */ (0,
|
|
4840
|
-
/* @__PURE__ */ (0,
|
|
4841
|
-
/* @__PURE__ */ (0,
|
|
4842
|
-
/* @__PURE__ */ (0,
|
|
5209
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col gap-2 flex-1 min-w-0", children: [
|
|
5210
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-row gap-1 items-center flex-wrap", children: [
|
|
5211
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-xs font-semibold text-primary-700 truncate", children: title }),
|
|
5212
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("p", { className: "text-xs text-text-600", children: [
|
|
4843
5213
|
"\u2022 ",
|
|
4844
5214
|
date,
|
|
4845
5215
|
" \u2022 ",
|
|
4846
5216
|
hour
|
|
4847
5217
|
] })
|
|
4848
5218
|
] }),
|
|
4849
|
-
/* @__PURE__ */ (0,
|
|
4850
|
-
/* @__PURE__ */ (0,
|
|
5219
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-text-950 text-sm line-clamp-2 truncate", children: content }),
|
|
5220
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4851
5221
|
"button",
|
|
4852
5222
|
{
|
|
4853
5223
|
type: "button",
|
|
@@ -4855,8 +5225,8 @@ var CardForum = (0, import_react14.forwardRef)(
|
|
|
4855
5225
|
onClick: () => onClickComments?.(valueComments),
|
|
4856
5226
|
className: "text-text-600 flex flex-row gap-2 items-center",
|
|
4857
5227
|
children: [
|
|
4858
|
-
/* @__PURE__ */ (0,
|
|
4859
|
-
/* @__PURE__ */ (0,
|
|
5228
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_phosphor_react13.ChatCircleText, { "aria-hidden": "true", size: 16 }),
|
|
5229
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("p", { className: "text-xs", children: [
|
|
4860
5230
|
comments,
|
|
4861
5231
|
" respostas"
|
|
4862
5232
|
] })
|
|
@@ -4869,7 +5239,7 @@ var CardForum = (0, import_react14.forwardRef)(
|
|
|
4869
5239
|
);
|
|
4870
5240
|
}
|
|
4871
5241
|
);
|
|
4872
|
-
var CardAudio = (0,
|
|
5242
|
+
var CardAudio = (0, import_react16.forwardRef)(
|
|
4873
5243
|
({
|
|
4874
5244
|
src,
|
|
4875
5245
|
title,
|
|
@@ -4883,14 +5253,14 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
4883
5253
|
className,
|
|
4884
5254
|
...props
|
|
4885
5255
|
}, ref) => {
|
|
4886
|
-
const [isPlaying, setIsPlaying] = (0,
|
|
4887
|
-
const [currentTime, setCurrentTime] = (0,
|
|
4888
|
-
const [duration, setDuration] = (0,
|
|
4889
|
-
const [volume, setVolume] = (0,
|
|
4890
|
-
const [showVolumeControl, setShowVolumeControl] = (0,
|
|
4891
|
-
const [showSpeedMenu, setShowSpeedMenu] = (0,
|
|
4892
|
-
const [playbackRate, setPlaybackRate] = (0,
|
|
4893
|
-
const audioRef = (0,
|
|
5256
|
+
const [isPlaying, setIsPlaying] = (0, import_react16.useState)(false);
|
|
5257
|
+
const [currentTime, setCurrentTime] = (0, import_react16.useState)(0);
|
|
5258
|
+
const [duration, setDuration] = (0, import_react16.useState)(0);
|
|
5259
|
+
const [volume, setVolume] = (0, import_react16.useState)(1);
|
|
5260
|
+
const [showVolumeControl, setShowVolumeControl] = (0, import_react16.useState)(false);
|
|
5261
|
+
const [showSpeedMenu, setShowSpeedMenu] = (0, import_react16.useState)(false);
|
|
5262
|
+
const [playbackRate, setPlaybackRate] = (0, import_react16.useState)(1);
|
|
5263
|
+
const audioRef = (0, import_react16.useRef)(null);
|
|
4894
5264
|
const formatTime2 = (time) => {
|
|
4895
5265
|
const minutes = Math.floor(time / 60);
|
|
4896
5266
|
const seconds = Math.floor(time % 60);
|
|
@@ -4955,14 +5325,14 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
4955
5325
|
};
|
|
4956
5326
|
const getVolumeIcon = () => {
|
|
4957
5327
|
if (volume === 0) {
|
|
4958
|
-
return /* @__PURE__ */ (0,
|
|
5328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_phosphor_react13.SpeakerSimpleX, { size: 24 });
|
|
4959
5329
|
}
|
|
4960
5330
|
if (volume < 0.5) {
|
|
4961
|
-
return /* @__PURE__ */ (0,
|
|
5331
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_phosphor_react13.SpeakerLow, { size: 24 });
|
|
4962
5332
|
}
|
|
4963
|
-
return /* @__PURE__ */ (0,
|
|
5333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_phosphor_react13.SpeakerHigh, { size: 24 });
|
|
4964
5334
|
};
|
|
4965
|
-
return /* @__PURE__ */ (0,
|
|
5335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4966
5336
|
CardBase,
|
|
4967
5337
|
{
|
|
4968
5338
|
ref,
|
|
@@ -4975,7 +5345,7 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
4975
5345
|
),
|
|
4976
5346
|
...props,
|
|
4977
5347
|
children: [
|
|
4978
|
-
/* @__PURE__ */ (0,
|
|
5348
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4979
5349
|
"audio",
|
|
4980
5350
|
{
|
|
4981
5351
|
ref: audioRef,
|
|
@@ -4987,7 +5357,7 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
4987
5357
|
onEnded: handleEnded,
|
|
4988
5358
|
"data-testid": "audio-element",
|
|
4989
5359
|
"aria-label": title,
|
|
4990
|
-
children: tracks ? tracks.map((track) => /* @__PURE__ */ (0,
|
|
5360
|
+
children: tracks ? tracks.map((track) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4991
5361
|
"track",
|
|
4992
5362
|
{
|
|
4993
5363
|
kind: track.kind,
|
|
@@ -4997,7 +5367,7 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
4997
5367
|
default: track.default
|
|
4998
5368
|
},
|
|
4999
5369
|
track.src
|
|
5000
|
-
)) : /* @__PURE__ */ (0,
|
|
5370
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5001
5371
|
"track",
|
|
5002
5372
|
{
|
|
5003
5373
|
kind: "captions",
|
|
@@ -5008,7 +5378,7 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
5008
5378
|
)
|
|
5009
5379
|
}
|
|
5010
5380
|
),
|
|
5011
|
-
/* @__PURE__ */ (0,
|
|
5381
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5012
5382
|
"button",
|
|
5013
5383
|
{
|
|
5014
5384
|
type: "button",
|
|
@@ -5016,14 +5386,14 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
5016
5386
|
disabled: !src,
|
|
5017
5387
|
className: "cursor-pointer text-text-950 hover:text-primary-600 disabled:text-text-400 disabled:cursor-not-allowed",
|
|
5018
5388
|
"aria-label": isPlaying ? "Pausar" : "Reproduzir",
|
|
5019
|
-
children: isPlaying ? /* @__PURE__ */ (0,
|
|
5020
|
-
/* @__PURE__ */ (0,
|
|
5021
|
-
/* @__PURE__ */ (0,
|
|
5022
|
-
] }) }) : /* @__PURE__ */ (0,
|
|
5389
|
+
children: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "w-6 h-6 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex gap-0.5", children: [
|
|
5390
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "w-1 h-4 bg-current rounded-sm" }),
|
|
5391
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "w-1 h-4 bg-current rounded-sm" })
|
|
5392
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_phosphor_react13.Play, { size: 24 })
|
|
5023
5393
|
}
|
|
5024
5394
|
),
|
|
5025
|
-
/* @__PURE__ */ (0,
|
|
5026
|
-
/* @__PURE__ */ (0,
|
|
5395
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-text-800 text-md font-medium min-w-[2.5rem]", children: formatTime2(currentTime) }),
|
|
5396
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex-1 relative", "data-testid": "progress-bar", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5027
5397
|
"button",
|
|
5028
5398
|
{
|
|
5029
5399
|
type: "button",
|
|
@@ -5038,7 +5408,7 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
5038
5408
|
}
|
|
5039
5409
|
},
|
|
5040
5410
|
"aria-label": "Barra de progresso do \xE1udio",
|
|
5041
|
-
children: /* @__PURE__ */ (0,
|
|
5411
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5042
5412
|
"div",
|
|
5043
5413
|
{
|
|
5044
5414
|
className: "h-full bg-primary-600 rounded-full transition-all duration-100",
|
|
@@ -5049,19 +5419,19 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
5049
5419
|
)
|
|
5050
5420
|
}
|
|
5051
5421
|
) }),
|
|
5052
|
-
/* @__PURE__ */ (0,
|
|
5053
|
-
/* @__PURE__ */ (0,
|
|
5054
|
-
/* @__PURE__ */ (0,
|
|
5422
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-text-800 text-md font-medium min-w-[2.5rem]", children: formatTime2(duration) }),
|
|
5423
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "relative h-6", children: [
|
|
5424
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5055
5425
|
"button",
|
|
5056
5426
|
{
|
|
5057
5427
|
type: "button",
|
|
5058
5428
|
onClick: toggleVolumeControl,
|
|
5059
5429
|
className: "cursor-pointer text-text-950 hover:text-primary-600",
|
|
5060
5430
|
"aria-label": "Controle de volume",
|
|
5061
|
-
children: /* @__PURE__ */ (0,
|
|
5431
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "w-6 h-6 flex items-center justify-center", children: getVolumeIcon() })
|
|
5062
5432
|
}
|
|
5063
5433
|
),
|
|
5064
|
-
showVolumeControl && /* @__PURE__ */ (0,
|
|
5434
|
+
showVolumeControl && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5065
5435
|
"button",
|
|
5066
5436
|
{
|
|
5067
5437
|
type: "button",
|
|
@@ -5071,7 +5441,7 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
5071
5441
|
setShowVolumeControl(false);
|
|
5072
5442
|
}
|
|
5073
5443
|
},
|
|
5074
|
-
children: /* @__PURE__ */ (0,
|
|
5444
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5075
5445
|
"input",
|
|
5076
5446
|
{
|
|
5077
5447
|
type: "range",
|
|
@@ -5112,22 +5482,22 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
5112
5482
|
}
|
|
5113
5483
|
)
|
|
5114
5484
|
] }),
|
|
5115
|
-
/* @__PURE__ */ (0,
|
|
5116
|
-
/* @__PURE__ */ (0,
|
|
5485
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "relative h-6", children: [
|
|
5486
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5117
5487
|
"button",
|
|
5118
5488
|
{
|
|
5119
5489
|
type: "button",
|
|
5120
5490
|
onClick: toggleSpeedMenu,
|
|
5121
5491
|
className: "cursor-pointer text-text-950 hover:text-primary-600",
|
|
5122
5492
|
"aria-label": "Op\xE7\xF5es de velocidade",
|
|
5123
|
-
children: /* @__PURE__ */ (0,
|
|
5493
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_phosphor_react13.DotsThreeVertical, { size: 24 })
|
|
5124
5494
|
}
|
|
5125
5495
|
),
|
|
5126
|
-
showSpeedMenu && /* @__PURE__ */ (0,
|
|
5496
|
+
showSpeedMenu && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "absolute bottom-full right-0 mb-2 p-2 bg-background border border-border-100 rounded-lg shadow-lg min-w-24 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex flex-col gap-1", children: [
|
|
5127
5497
|
{ speed: 1, label: "1x" },
|
|
5128
5498
|
{ speed: 1.5, label: "1.5x" },
|
|
5129
5499
|
{ speed: 2, label: "2x" }
|
|
5130
|
-
].map(({ speed, label }) => /* @__PURE__ */ (0,
|
|
5500
|
+
].map(({ speed, label }) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5131
5501
|
"button",
|
|
5132
5502
|
{
|
|
5133
5503
|
type: "button",
|
|
@@ -5152,10 +5522,10 @@ var SIMULADO_BACKGROUND_CLASSES = {
|
|
|
5152
5522
|
simuladao: "bg-exam-3",
|
|
5153
5523
|
vestibular: "bg-exam-4"
|
|
5154
5524
|
};
|
|
5155
|
-
var CardSimulado = (0,
|
|
5525
|
+
var CardSimulado = (0, import_react16.forwardRef)(
|
|
5156
5526
|
({ title, duration, info, backgroundColor, className, ...props }, ref) => {
|
|
5157
5527
|
const backgroundClass = SIMULADO_BACKGROUND_CLASSES[backgroundColor];
|
|
5158
|
-
return /* @__PURE__ */ (0,
|
|
5528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5159
5529
|
CardBase,
|
|
5160
5530
|
{
|
|
5161
5531
|
ref,
|
|
@@ -5168,19 +5538,19 @@ var CardSimulado = (0, import_react14.forwardRef)(
|
|
|
5168
5538
|
className
|
|
5169
5539
|
),
|
|
5170
5540
|
...props,
|
|
5171
|
-
children: /* @__PURE__ */ (0,
|
|
5172
|
-
/* @__PURE__ */ (0,
|
|
5173
|
-
/* @__PURE__ */ (0,
|
|
5174
|
-
/* @__PURE__ */ (0,
|
|
5175
|
-
duration && /* @__PURE__ */ (0,
|
|
5176
|
-
/* @__PURE__ */ (0,
|
|
5177
|
-
/* @__PURE__ */ (0,
|
|
5541
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex justify-between items-center w-full gap-4", children: [
|
|
5542
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col gap-1 flex-1 min-w-0", children: [
|
|
5543
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text_default, { size: "lg", weight: "bold", className: "text-text-950 truncate", children: title }),
|
|
5544
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center gap-4 text-text-700", children: [
|
|
5545
|
+
duration && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
5546
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_phosphor_react13.Clock, { size: 16, className: "flex-shrink-0" }),
|
|
5547
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text_default, { size: "sm", children: duration })
|
|
5178
5548
|
] }),
|
|
5179
|
-
/* @__PURE__ */ (0,
|
|
5549
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text_default, { size: "sm", className: "truncate", children: info })
|
|
5180
5550
|
] })
|
|
5181
5551
|
] }),
|
|
5182
|
-
/* @__PURE__ */ (0,
|
|
5183
|
-
|
|
5552
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5553
|
+
import_phosphor_react13.CaretRight,
|
|
5184
5554
|
{
|
|
5185
5555
|
size: 24,
|
|
5186
5556
|
className: "text-text-800 flex-shrink-0",
|
|
@@ -5192,7 +5562,7 @@ var CardSimulado = (0, import_react14.forwardRef)(
|
|
|
5192
5562
|
);
|
|
5193
5563
|
}
|
|
5194
5564
|
);
|
|
5195
|
-
var CardTest = (0,
|
|
5565
|
+
var CardTest = (0, import_react16.forwardRef)(
|
|
5196
5566
|
({
|
|
5197
5567
|
title,
|
|
5198
5568
|
duration,
|
|
@@ -5224,7 +5594,7 @@ var CardTest = (0, import_react14.forwardRef)(
|
|
|
5224
5594
|
const interactiveClasses = isSelectable ? "cursor-pointer focus:outline-none focus:ring-2 focus:ring-primary-950 focus:ring-offset-2" : "";
|
|
5225
5595
|
const selectedClasses = selected ? "ring-2 ring-primary-950 ring-offset-2" : "";
|
|
5226
5596
|
if (isSelectable) {
|
|
5227
|
-
return /* @__PURE__ */ (0,
|
|
5597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5228
5598
|
"button",
|
|
5229
5599
|
{
|
|
5230
5600
|
ref,
|
|
@@ -5236,8 +5606,8 @@ var CardTest = (0, import_react14.forwardRef)(
|
|
|
5236
5606
|
onKeyDown: handleKeyDown,
|
|
5237
5607
|
"aria-pressed": selected,
|
|
5238
5608
|
...props,
|
|
5239
|
-
children: /* @__PURE__ */ (0,
|
|
5240
|
-
/* @__PURE__ */ (0,
|
|
5609
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
|
|
5610
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5241
5611
|
Text_default,
|
|
5242
5612
|
{
|
|
5243
5613
|
size: "md",
|
|
@@ -5246,10 +5616,10 @@ var CardTest = (0, import_react14.forwardRef)(
|
|
|
5246
5616
|
children: title
|
|
5247
5617
|
}
|
|
5248
5618
|
),
|
|
5249
|
-
/* @__PURE__ */ (0,
|
|
5250
|
-
duration && /* @__PURE__ */ (0,
|
|
5251
|
-
/* @__PURE__ */ (0,
|
|
5252
|
-
/* @__PURE__ */ (0,
|
|
5619
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
|
|
5620
|
+
duration && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
|
|
5621
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_phosphor_react13.Clock, { size: 16, className: "text-text-700" }),
|
|
5622
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5253
5623
|
Text_default,
|
|
5254
5624
|
{
|
|
5255
5625
|
size: "sm",
|
|
@@ -5258,7 +5628,7 @@ var CardTest = (0, import_react14.forwardRef)(
|
|
|
5258
5628
|
}
|
|
5259
5629
|
)
|
|
5260
5630
|
] }),
|
|
5261
|
-
/* @__PURE__ */ (0,
|
|
5631
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5262
5632
|
Text_default,
|
|
5263
5633
|
{
|
|
5264
5634
|
size: "sm",
|
|
@@ -5271,14 +5641,14 @@ var CardTest = (0, import_react14.forwardRef)(
|
|
|
5271
5641
|
}
|
|
5272
5642
|
);
|
|
5273
5643
|
}
|
|
5274
|
-
return /* @__PURE__ */ (0,
|
|
5644
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5275
5645
|
"div",
|
|
5276
5646
|
{
|
|
5277
5647
|
ref,
|
|
5278
5648
|
className: cn(`${baseClasses} ${className}`.trim()),
|
|
5279
5649
|
...props,
|
|
5280
|
-
children: /* @__PURE__ */ (0,
|
|
5281
|
-
/* @__PURE__ */ (0,
|
|
5650
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
|
|
5651
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5282
5652
|
Text_default,
|
|
5283
5653
|
{
|
|
5284
5654
|
size: "md",
|
|
@@ -5287,10 +5657,10 @@ var CardTest = (0, import_react14.forwardRef)(
|
|
|
5287
5657
|
children: title
|
|
5288
5658
|
}
|
|
5289
5659
|
),
|
|
5290
|
-
/* @__PURE__ */ (0,
|
|
5291
|
-
duration && /* @__PURE__ */ (0,
|
|
5292
|
-
/* @__PURE__ */ (0,
|
|
5293
|
-
/* @__PURE__ */ (0,
|
|
5660
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
|
|
5661
|
+
duration && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
|
|
5662
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_phosphor_react13.Clock, { size: 16, className: "text-text-700" }),
|
|
5663
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5294
5664
|
Text_default,
|
|
5295
5665
|
{
|
|
5296
5666
|
size: "sm",
|
|
@@ -5299,7 +5669,7 @@ var CardTest = (0, import_react14.forwardRef)(
|
|
|
5299
5669
|
}
|
|
5300
5670
|
)
|
|
5301
5671
|
] }),
|
|
5302
|
-
/* @__PURE__ */ (0,
|
|
5672
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5303
5673
|
Text_default,
|
|
5304
5674
|
{
|
|
5305
5675
|
size: "sm",
|
|
@@ -5335,15 +5705,15 @@ var SIMULATION_TYPE_STYLES = {
|
|
|
5335
5705
|
text: "Vestibular"
|
|
5336
5706
|
}
|
|
5337
5707
|
};
|
|
5338
|
-
var CardSimulationHistory = (0,
|
|
5339
|
-
return /* @__PURE__ */ (0,
|
|
5708
|
+
var CardSimulationHistory = (0, import_react16.forwardRef)(({ data, onSimulationClick, className, ...props }, ref) => {
|
|
5709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5340
5710
|
"div",
|
|
5341
5711
|
{
|
|
5342
5712
|
ref,
|
|
5343
5713
|
className: cn("w-full max-w-[992px] h-auto", className),
|
|
5344
5714
|
...props,
|
|
5345
|
-
children: /* @__PURE__ */ (0,
|
|
5346
|
-
data.map((section, sectionIndex) => /* @__PURE__ */ (0,
|
|
5715
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col gap-0", children: [
|
|
5716
|
+
data.map((section, sectionIndex) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
5347
5717
|
"div",
|
|
5348
5718
|
{
|
|
5349
5719
|
className: cn(
|
|
@@ -5351,7 +5721,7 @@ var CardSimulationHistory = (0, import_react14.forwardRef)(({ data, onSimulation
|
|
|
5351
5721
|
sectionIndex === 0 ? "rounded-t-3xl" : ""
|
|
5352
5722
|
),
|
|
5353
5723
|
children: [
|
|
5354
|
-
/* @__PURE__ */ (0,
|
|
5724
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5355
5725
|
Text_default,
|
|
5356
5726
|
{
|
|
5357
5727
|
size: "xs",
|
|
@@ -5360,9 +5730,9 @@ var CardSimulationHistory = (0, import_react14.forwardRef)(({ data, onSimulation
|
|
|
5360
5730
|
children: section.date
|
|
5361
5731
|
}
|
|
5362
5732
|
),
|
|
5363
|
-
/* @__PURE__ */ (0,
|
|
5733
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex flex-col gap-2 flex-1", children: section.simulations.map((simulation) => {
|
|
5364
5734
|
const typeStyles = SIMULATION_TYPE_STYLES[simulation.type];
|
|
5365
|
-
return /* @__PURE__ */ (0,
|
|
5735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5366
5736
|
CardBase,
|
|
5367
5737
|
{
|
|
5368
5738
|
layout: "horizontal",
|
|
@@ -5374,9 +5744,9 @@ var CardSimulationHistory = (0, import_react14.forwardRef)(({ data, onSimulation
|
|
|
5374
5744
|
transition-shadow duration-200 h-auto min-h-[61px]`
|
|
5375
5745
|
),
|
|
5376
5746
|
onClick: () => onSimulationClick?.(simulation),
|
|
5377
|
-
children: /* @__PURE__ */ (0,
|
|
5378
|
-
/* @__PURE__ */ (0,
|
|
5379
|
-
/* @__PURE__ */ (0,
|
|
5747
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex justify-between items-center w-full gap-2", children: [
|
|
5748
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-wrap flex-col justify-between sm:flex-row gap-2 flex-1 min-w-0", children: [
|
|
5749
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5380
5750
|
Text_default,
|
|
5381
5751
|
{
|
|
5382
5752
|
size: "lg",
|
|
@@ -5385,8 +5755,8 @@ var CardSimulationHistory = (0, import_react14.forwardRef)(({ data, onSimulation
|
|
|
5385
5755
|
children: simulation.title
|
|
5386
5756
|
}
|
|
5387
5757
|
),
|
|
5388
|
-
/* @__PURE__ */ (0,
|
|
5389
|
-
/* @__PURE__ */ (0,
|
|
5758
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
5759
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5390
5760
|
Badge_default,
|
|
5391
5761
|
{
|
|
5392
5762
|
variant: "examsOutlined",
|
|
@@ -5395,11 +5765,11 @@ var CardSimulationHistory = (0, import_react14.forwardRef)(({ data, onSimulation
|
|
|
5395
5765
|
children: typeStyles.text
|
|
5396
5766
|
}
|
|
5397
5767
|
),
|
|
5398
|
-
/* @__PURE__ */ (0,
|
|
5768
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text_default, { size: "sm", className: "text-text-800 truncate", children: simulation.info })
|
|
5399
5769
|
] })
|
|
5400
5770
|
] }),
|
|
5401
|
-
/* @__PURE__ */ (0,
|
|
5402
|
-
|
|
5771
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5772
|
+
import_phosphor_react13.CaretRight,
|
|
5403
5773
|
{
|
|
5404
5774
|
size: 24,
|
|
5405
5775
|
className: "text-text-800 flex-shrink-0",
|
|
@@ -5414,16 +5784,16 @@ var CardSimulationHistory = (0, import_react14.forwardRef)(({ data, onSimulation
|
|
|
5414
5784
|
]
|
|
5415
5785
|
}
|
|
5416
5786
|
) }, section.date)),
|
|
5417
|
-
data.length > 0 && /* @__PURE__ */ (0,
|
|
5787
|
+
data.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "w-full h-6 bg-white rounded-b-3xl" })
|
|
5418
5788
|
] })
|
|
5419
5789
|
}
|
|
5420
5790
|
);
|
|
5421
5791
|
});
|
|
5422
5792
|
|
|
5423
5793
|
// src/components/Accordation/Accordation.tsx
|
|
5424
|
-
var
|
|
5425
|
-
var
|
|
5426
|
-
var CardAccordation = (0,
|
|
5794
|
+
var import_phosphor_react14 = require("phosphor-react");
|
|
5795
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
5796
|
+
var CardAccordation = (0, import_react17.forwardRef)(
|
|
5427
5797
|
({
|
|
5428
5798
|
trigger,
|
|
5429
5799
|
children,
|
|
@@ -5432,8 +5802,8 @@ var CardAccordation = (0, import_react15.forwardRef)(
|
|
|
5432
5802
|
onToggleExpanded,
|
|
5433
5803
|
...props
|
|
5434
5804
|
}, ref) => {
|
|
5435
|
-
const [isExpanded, setIsExpanded] = (0,
|
|
5436
|
-
const contentId = (0,
|
|
5805
|
+
const [isExpanded, setIsExpanded] = (0, import_react17.useState)(defaultExpanded);
|
|
5806
|
+
const contentId = (0, import_react17.useId)();
|
|
5437
5807
|
const handleToggle = () => {
|
|
5438
5808
|
const newExpanded = !isExpanded;
|
|
5439
5809
|
setIsExpanded(newExpanded);
|
|
@@ -5445,7 +5815,7 @@ var CardAccordation = (0, import_react15.forwardRef)(
|
|
|
5445
5815
|
handleToggle();
|
|
5446
5816
|
}
|
|
5447
5817
|
};
|
|
5448
|
-
return /* @__PURE__ */ (0,
|
|
5818
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
5449
5819
|
CardBase,
|
|
5450
5820
|
{
|
|
5451
5821
|
ref,
|
|
@@ -5455,7 +5825,7 @@ var CardAccordation = (0, import_react15.forwardRef)(
|
|
|
5455
5825
|
className: cn("overflow-hidden", className),
|
|
5456
5826
|
...props,
|
|
5457
5827
|
children: [
|
|
5458
|
-
/* @__PURE__ */ (0,
|
|
5828
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
5459
5829
|
"button",
|
|
5460
5830
|
{
|
|
5461
5831
|
onClick: handleToggle,
|
|
@@ -5465,8 +5835,8 @@ var CardAccordation = (0, import_react15.forwardRef)(
|
|
|
5465
5835
|
"aria-controls": "accordion-content",
|
|
5466
5836
|
children: [
|
|
5467
5837
|
trigger,
|
|
5468
|
-
/* @__PURE__ */ (0,
|
|
5469
|
-
|
|
5838
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5839
|
+
import_phosphor_react14.CaretRight,
|
|
5470
5840
|
{
|
|
5471
5841
|
size: 20,
|
|
5472
5842
|
className: cn(
|
|
@@ -5479,7 +5849,7 @@ var CardAccordation = (0, import_react15.forwardRef)(
|
|
|
5479
5849
|
]
|
|
5480
5850
|
}
|
|
5481
5851
|
),
|
|
5482
|
-
/* @__PURE__ */ (0,
|
|
5852
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5483
5853
|
"div",
|
|
5484
5854
|
{
|
|
5485
5855
|
id: contentId,
|
|
@@ -5488,7 +5858,7 @@ var CardAccordation = (0, import_react15.forwardRef)(
|
|
|
5488
5858
|
isExpanded ? "max-h-screen opacity-100" : "max-h-0 opacity-0"
|
|
5489
5859
|
),
|
|
5490
5860
|
"data-testid": "accordion-content",
|
|
5491
|
-
children: /* @__PURE__ */ (0,
|
|
5861
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "p-4 pt-0 border-border-50", children })
|
|
5492
5862
|
}
|
|
5493
5863
|
)
|
|
5494
5864
|
]
|
|
@@ -5498,9 +5868,9 @@ var CardAccordation = (0, import_react15.forwardRef)(
|
|
|
5498
5868
|
);
|
|
5499
5869
|
|
|
5500
5870
|
// src/components/Alternative/Alternative.tsx
|
|
5501
|
-
var
|
|
5502
|
-
var
|
|
5503
|
-
var
|
|
5871
|
+
var import_phosphor_react15 = require("phosphor-react");
|
|
5872
|
+
var import_react18 = require("react");
|
|
5873
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
5504
5874
|
var AlternativesList = ({
|
|
5505
5875
|
alternatives,
|
|
5506
5876
|
name,
|
|
@@ -5513,9 +5883,9 @@ var AlternativesList = ({
|
|
|
5513
5883
|
mode = "interactive",
|
|
5514
5884
|
selectedValue
|
|
5515
5885
|
}) => {
|
|
5516
|
-
const uniqueId = (0,
|
|
5886
|
+
const uniqueId = (0, import_react18.useId)();
|
|
5517
5887
|
const groupName = name || `alternatives-${uniqueId}`;
|
|
5518
|
-
const [actualValue, setActualValue] = (0,
|
|
5888
|
+
const [actualValue, setActualValue] = (0, import_react18.useState)(value);
|
|
5519
5889
|
const isReadonly = mode === "readonly";
|
|
5520
5890
|
const getStatusStyles2 = (status, isReadonly2) => {
|
|
5521
5891
|
const hoverClass = isReadonly2 ? "" : "hover:bg-background-50";
|
|
@@ -5531,9 +5901,9 @@ var AlternativesList = ({
|
|
|
5531
5901
|
const getStatusBadge2 = (status) => {
|
|
5532
5902
|
switch (status) {
|
|
5533
5903
|
case "correct":
|
|
5534
|
-
return /* @__PURE__ */ (0,
|
|
5904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_phosphor_react15.CheckCircle, {}), children: "Resposta correta" });
|
|
5535
5905
|
case "incorrect":
|
|
5536
|
-
return /* @__PURE__ */ (0,
|
|
5906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_phosphor_react15.XCircle, {}), children: "Resposta incorreta" });
|
|
5537
5907
|
default:
|
|
5538
5908
|
return null;
|
|
5539
5909
|
}
|
|
@@ -5563,10 +5933,10 @@ var AlternativesList = ({
|
|
|
5563
5933
|
const renderRadio = () => {
|
|
5564
5934
|
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"}`;
|
|
5565
5935
|
const dotClasses = "w-3 h-3 rounded-full bg-primary-950 transition-all duration-200";
|
|
5566
|
-
return /* @__PURE__ */ (0,
|
|
5936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: radioClasses, children: isUserSelected && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: dotClasses }) });
|
|
5567
5937
|
};
|
|
5568
5938
|
if (layout === "detailed") {
|
|
5569
|
-
return /* @__PURE__ */ (0,
|
|
5939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5570
5940
|
"div",
|
|
5571
5941
|
{
|
|
5572
5942
|
className: cn(
|
|
@@ -5574,11 +5944,11 @@ var AlternativesList = ({
|
|
|
5574
5944
|
statusStyles,
|
|
5575
5945
|
alternative.disabled ? "opacity-50" : ""
|
|
5576
5946
|
),
|
|
5577
|
-
children: /* @__PURE__ */ (0,
|
|
5578
|
-
/* @__PURE__ */ (0,
|
|
5579
|
-
/* @__PURE__ */ (0,
|
|
5580
|
-
/* @__PURE__ */ (0,
|
|
5581
|
-
/* @__PURE__ */ (0,
|
|
5947
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
5948
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-start gap-3 flex-1", children: [
|
|
5949
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "mt-1", children: renderRadio() }),
|
|
5950
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex-1", children: [
|
|
5951
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5582
5952
|
"p",
|
|
5583
5953
|
{
|
|
5584
5954
|
className: cn(
|
|
@@ -5588,16 +5958,16 @@ var AlternativesList = ({
|
|
|
5588
5958
|
children: alternative.label
|
|
5589
5959
|
}
|
|
5590
5960
|
),
|
|
5591
|
-
alternative.description && /* @__PURE__ */ (0,
|
|
5961
|
+
alternative.description && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
|
|
5592
5962
|
] })
|
|
5593
5963
|
] }),
|
|
5594
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
5964
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
5595
5965
|
] })
|
|
5596
5966
|
},
|
|
5597
5967
|
alternativeId
|
|
5598
5968
|
);
|
|
5599
5969
|
}
|
|
5600
|
-
return /* @__PURE__ */ (0,
|
|
5970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
5601
5971
|
"div",
|
|
5602
5972
|
{
|
|
5603
5973
|
className: cn(
|
|
@@ -5606,9 +5976,9 @@ var AlternativesList = ({
|
|
|
5606
5976
|
alternative.disabled ? "opacity-50" : ""
|
|
5607
5977
|
),
|
|
5608
5978
|
children: [
|
|
5609
|
-
/* @__PURE__ */ (0,
|
|
5979
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
5610
5980
|
renderRadio(),
|
|
5611
|
-
/* @__PURE__ */ (0,
|
|
5981
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5612
5982
|
"span",
|
|
5613
5983
|
{
|
|
5614
5984
|
className: cn(
|
|
@@ -5619,14 +5989,14 @@ var AlternativesList = ({
|
|
|
5619
5989
|
}
|
|
5620
5990
|
)
|
|
5621
5991
|
] }),
|
|
5622
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
5992
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
5623
5993
|
]
|
|
5624
5994
|
},
|
|
5625
5995
|
alternativeId
|
|
5626
5996
|
);
|
|
5627
5997
|
};
|
|
5628
5998
|
if (isReadonly) {
|
|
5629
|
-
return /* @__PURE__ */ (0,
|
|
5999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5630
6000
|
"div",
|
|
5631
6001
|
{
|
|
5632
6002
|
className: cn("flex flex-col", getLayoutClasses(), "w-full", className),
|
|
@@ -5636,7 +6006,7 @@ var AlternativesList = ({
|
|
|
5636
6006
|
}
|
|
5637
6007
|
);
|
|
5638
6008
|
}
|
|
5639
|
-
return /* @__PURE__ */ (0,
|
|
6009
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5640
6010
|
RadioGroup,
|
|
5641
6011
|
{
|
|
5642
6012
|
name: groupName,
|
|
@@ -5653,7 +6023,7 @@ var AlternativesList = ({
|
|
|
5653
6023
|
const statusStyles = getStatusStyles2(alternative.status, false);
|
|
5654
6024
|
const statusBadge = getStatusBadge2(alternative.status);
|
|
5655
6025
|
if (layout === "detailed") {
|
|
5656
|
-
return /* @__PURE__ */ (0,
|
|
6026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5657
6027
|
"div",
|
|
5658
6028
|
{
|
|
5659
6029
|
className: cn(
|
|
@@ -5661,9 +6031,9 @@ var AlternativesList = ({
|
|
|
5661
6031
|
statusStyles,
|
|
5662
6032
|
alternative.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
5663
6033
|
),
|
|
5664
|
-
children: /* @__PURE__ */ (0,
|
|
5665
|
-
/* @__PURE__ */ (0,
|
|
5666
|
-
/* @__PURE__ */ (0,
|
|
6034
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
6035
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-start gap-3 flex-1", children: [
|
|
6036
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5667
6037
|
RadioGroupItem,
|
|
5668
6038
|
{
|
|
5669
6039
|
value: alternative.value,
|
|
@@ -5672,8 +6042,8 @@ var AlternativesList = ({
|
|
|
5672
6042
|
className: "mt-1"
|
|
5673
6043
|
}
|
|
5674
6044
|
),
|
|
5675
|
-
/* @__PURE__ */ (0,
|
|
5676
|
-
/* @__PURE__ */ (0,
|
|
6045
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex-1", children: [
|
|
6046
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5677
6047
|
"label",
|
|
5678
6048
|
{
|
|
5679
6049
|
htmlFor: alternativeId,
|
|
@@ -5685,16 +6055,16 @@ var AlternativesList = ({
|
|
|
5685
6055
|
children: alternative.label
|
|
5686
6056
|
}
|
|
5687
6057
|
),
|
|
5688
|
-
alternative.description && /* @__PURE__ */ (0,
|
|
6058
|
+
alternative.description && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
|
|
5689
6059
|
] })
|
|
5690
6060
|
] }),
|
|
5691
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
6061
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
5692
6062
|
] })
|
|
5693
6063
|
},
|
|
5694
6064
|
alternativeId
|
|
5695
6065
|
);
|
|
5696
6066
|
}
|
|
5697
|
-
return /* @__PURE__ */ (0,
|
|
6067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
5698
6068
|
"div",
|
|
5699
6069
|
{
|
|
5700
6070
|
className: cn(
|
|
@@ -5703,8 +6073,8 @@ var AlternativesList = ({
|
|
|
5703
6073
|
alternative.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
5704
6074
|
),
|
|
5705
6075
|
children: [
|
|
5706
|
-
/* @__PURE__ */ (0,
|
|
5707
|
-
/* @__PURE__ */ (0,
|
|
6076
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
6077
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5708
6078
|
RadioGroupItem,
|
|
5709
6079
|
{
|
|
5710
6080
|
value: alternative.value,
|
|
@@ -5712,7 +6082,7 @@ var AlternativesList = ({
|
|
|
5712
6082
|
disabled: alternative.disabled
|
|
5713
6083
|
}
|
|
5714
6084
|
),
|
|
5715
|
-
/* @__PURE__ */ (0,
|
|
6085
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5716
6086
|
"label",
|
|
5717
6087
|
{
|
|
5718
6088
|
htmlFor: alternativeId,
|
|
@@ -5725,7 +6095,7 @@ var AlternativesList = ({
|
|
|
5725
6095
|
}
|
|
5726
6096
|
)
|
|
5727
6097
|
] }),
|
|
5728
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
6098
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
5729
6099
|
]
|
|
5730
6100
|
},
|
|
5731
6101
|
alternativeId
|
|
@@ -5734,9 +6104,9 @@ var AlternativesList = ({
|
|
|
5734
6104
|
}
|
|
5735
6105
|
);
|
|
5736
6106
|
};
|
|
5737
|
-
var HeaderAlternative = (0,
|
|
6107
|
+
var HeaderAlternative = (0, import_react18.forwardRef)(
|
|
5738
6108
|
({ className, title, subTitle, content, ...props }, ref) => {
|
|
5739
|
-
return /* @__PURE__ */ (0,
|
|
6109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
5740
6110
|
"div",
|
|
5741
6111
|
{
|
|
5742
6112
|
ref,
|
|
@@ -5746,11 +6116,11 @@ var HeaderAlternative = (0, import_react16.forwardRef)(
|
|
|
5746
6116
|
),
|
|
5747
6117
|
...props,
|
|
5748
6118
|
children: [
|
|
5749
|
-
/* @__PURE__ */ (0,
|
|
5750
|
-
/* @__PURE__ */ (0,
|
|
5751
|
-
/* @__PURE__ */ (0,
|
|
6119
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "flex flex-col", children: [
|
|
6120
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-text-950 font-bold text-lg", children: title }),
|
|
6121
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-text-700 text-sm ", children: subTitle })
|
|
5752
6122
|
] }),
|
|
5753
|
-
/* @__PURE__ */ (0,
|
|
6123
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-text-950 text-md", children: content })
|
|
5754
6124
|
]
|
|
5755
6125
|
}
|
|
5756
6126
|
);
|
|
@@ -5758,8 +6128,8 @@ var HeaderAlternative = (0, import_react16.forwardRef)(
|
|
|
5758
6128
|
);
|
|
5759
6129
|
|
|
5760
6130
|
// src/components/AlertDialog/AlertDialog.tsx
|
|
5761
|
-
var
|
|
5762
|
-
var
|
|
6131
|
+
var import_react19 = require("react");
|
|
6132
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
5763
6133
|
var SIZE_CLASSES11 = {
|
|
5764
6134
|
"extra-small": "w-screen max-w-[324px]",
|
|
5765
6135
|
small: "w-screen max-w-[378px]",
|
|
@@ -5767,7 +6137,7 @@ var SIZE_CLASSES11 = {
|
|
|
5767
6137
|
large: "w-screen max-w-[578px]",
|
|
5768
6138
|
"extra-large": "w-screen max-w-[912px]"
|
|
5769
6139
|
};
|
|
5770
|
-
var AlertDialog = (0,
|
|
6140
|
+
var AlertDialog = (0, import_react19.forwardRef)(
|
|
5771
6141
|
({
|
|
5772
6142
|
description,
|
|
5773
6143
|
cancelButtonLabel = "Cancelar",
|
|
@@ -5785,7 +6155,7 @@ var AlertDialog = (0, import_react17.forwardRef)(
|
|
|
5785
6155
|
size = "medium",
|
|
5786
6156
|
...props
|
|
5787
6157
|
}, ref) => {
|
|
5788
|
-
(0,
|
|
6158
|
+
(0, import_react19.useEffect)(() => {
|
|
5789
6159
|
if (!isOpen || !closeOnEscape) return;
|
|
5790
6160
|
const handleEscape = (event) => {
|
|
5791
6161
|
if (event.key === "Escape") {
|
|
@@ -5795,7 +6165,7 @@ var AlertDialog = (0, import_react17.forwardRef)(
|
|
|
5795
6165
|
document.addEventListener("keydown", handleEscape);
|
|
5796
6166
|
return () => document.removeEventListener("keydown", handleEscape);
|
|
5797
6167
|
}, [isOpen, closeOnEscape]);
|
|
5798
|
-
(0,
|
|
6168
|
+
(0, import_react19.useEffect)(() => {
|
|
5799
6169
|
if (isOpen) {
|
|
5800
6170
|
document.body.style.overflow = "hidden";
|
|
5801
6171
|
} else {
|
|
@@ -5824,14 +6194,14 @@ var AlertDialog = (0, import_react17.forwardRef)(
|
|
|
5824
6194
|
onCancel?.(cancelValue);
|
|
5825
6195
|
};
|
|
5826
6196
|
const sizeClasses = SIZE_CLASSES11[size];
|
|
5827
|
-
return /* @__PURE__ */ (0,
|
|
6197
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_jsx_runtime31.Fragment, { children: isOpen && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5828
6198
|
"div",
|
|
5829
6199
|
{
|
|
5830
6200
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",
|
|
5831
6201
|
onClick: handleBackdropClick,
|
|
5832
6202
|
onKeyDown: handleBackdropKeyDown,
|
|
5833
6203
|
"data-testid": "alert-dialog-overlay",
|
|
5834
|
-
children: /* @__PURE__ */ (0,
|
|
6204
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
5835
6205
|
"div",
|
|
5836
6206
|
{
|
|
5837
6207
|
ref,
|
|
@@ -5842,7 +6212,7 @@ var AlertDialog = (0, import_react17.forwardRef)(
|
|
|
5842
6212
|
),
|
|
5843
6213
|
...props,
|
|
5844
6214
|
children: [
|
|
5845
|
-
/* @__PURE__ */ (0,
|
|
6215
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5846
6216
|
"h2",
|
|
5847
6217
|
{
|
|
5848
6218
|
id: "alert-dialog-title",
|
|
@@ -5850,7 +6220,7 @@ var AlertDialog = (0, import_react17.forwardRef)(
|
|
|
5850
6220
|
children: title
|
|
5851
6221
|
}
|
|
5852
6222
|
),
|
|
5853
|
-
/* @__PURE__ */ (0,
|
|
6223
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5854
6224
|
"p",
|
|
5855
6225
|
{
|
|
5856
6226
|
id: "alert-dialog-description",
|
|
@@ -5858,9 +6228,9 @@ var AlertDialog = (0, import_react17.forwardRef)(
|
|
|
5858
6228
|
children: description
|
|
5859
6229
|
}
|
|
5860
6230
|
),
|
|
5861
|
-
/* @__PURE__ */ (0,
|
|
5862
|
-
/* @__PURE__ */ (0,
|
|
5863
|
-
/* @__PURE__ */ (0,
|
|
6231
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-row items-center justify-end pt-4 gap-3", children: [
|
|
6232
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Button_default, { variant: "outline", size: "small", onClick: handleCancel, children: cancelButtonLabel }),
|
|
6233
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5864
6234
|
Button_default,
|
|
5865
6235
|
{
|
|
5866
6236
|
variant: "solid",
|
|
@@ -5881,9 +6251,9 @@ var AlertDialog = (0, import_react17.forwardRef)(
|
|
|
5881
6251
|
AlertDialog.displayName = "AlertDialog";
|
|
5882
6252
|
|
|
5883
6253
|
// src/components/MultipleChoice/MultipleChoice.tsx
|
|
5884
|
-
var
|
|
5885
|
-
var
|
|
5886
|
-
var
|
|
6254
|
+
var import_react20 = require("react");
|
|
6255
|
+
var import_phosphor_react16 = require("phosphor-react");
|
|
6256
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
5887
6257
|
var MultipleChoiceList = ({
|
|
5888
6258
|
disabled = false,
|
|
5889
6259
|
className = "",
|
|
@@ -5893,16 +6263,16 @@ var MultipleChoiceList = ({
|
|
|
5893
6263
|
onHandleSelectedValues,
|
|
5894
6264
|
mode = "interactive"
|
|
5895
6265
|
}) => {
|
|
5896
|
-
const [actualValue, setActualValue] = (0,
|
|
5897
|
-
(0,
|
|
6266
|
+
const [actualValue, setActualValue] = (0, import_react20.useState)(selectedValues);
|
|
6267
|
+
(0, import_react20.useEffect)(() => {
|
|
5898
6268
|
setActualValue(selectedValues);
|
|
5899
6269
|
}, [selectedValues]);
|
|
5900
6270
|
const getStatusBadge2 = (status) => {
|
|
5901
6271
|
switch (status) {
|
|
5902
6272
|
case "correct":
|
|
5903
|
-
return /* @__PURE__ */ (0,
|
|
6273
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_phosphor_react16.CheckCircle, {}), children: "Resposta correta" });
|
|
5904
6274
|
case "incorrect":
|
|
5905
|
-
return /* @__PURE__ */ (0,
|
|
6275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_phosphor_react16.XCircle, {}), children: "Resposta incorreta" });
|
|
5906
6276
|
default:
|
|
5907
6277
|
return null;
|
|
5908
6278
|
}
|
|
@@ -5923,14 +6293,14 @@ var MultipleChoiceList = ({
|
|
|
5923
6293
|
isSelected ? "border-primary-950 bg-primary-950 text-text" : "border-border-400 bg-background",
|
|
5924
6294
|
isDisabled && "opacity-40 cursor-not-allowed"
|
|
5925
6295
|
);
|
|
5926
|
-
return /* @__PURE__ */ (0,
|
|
6296
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: checkboxClasses, children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_phosphor_react16.Check, { size: 16, weight: "bold" }) });
|
|
5927
6297
|
};
|
|
5928
6298
|
if (mode === "readonly") {
|
|
5929
|
-
return /* @__PURE__ */ (0,
|
|
6299
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: cn("flex flex-col gap-2", className), children: choices.map((choice, i) => {
|
|
5930
6300
|
const isSelected = actualValue?.includes(choice.value) || false;
|
|
5931
6301
|
const statusStyles = getStatusStyles2(choice.status);
|
|
5932
6302
|
const statusBadge = getStatusBadge2(choice.status);
|
|
5933
|
-
return /* @__PURE__ */ (0,
|
|
6303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
5934
6304
|
"div",
|
|
5935
6305
|
{
|
|
5936
6306
|
className: cn(
|
|
@@ -5939,9 +6309,9 @@ var MultipleChoiceList = ({
|
|
|
5939
6309
|
choice.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
5940
6310
|
),
|
|
5941
6311
|
children: [
|
|
5942
|
-
/* @__PURE__ */ (0,
|
|
6312
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
5943
6313
|
renderVisualCheckbox(isSelected, choice.disabled || disabled),
|
|
5944
|
-
/* @__PURE__ */ (0,
|
|
6314
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5945
6315
|
"span",
|
|
5946
6316
|
{
|
|
5947
6317
|
className: cn(
|
|
@@ -5953,14 +6323,14 @@ var MultipleChoiceList = ({
|
|
|
5953
6323
|
}
|
|
5954
6324
|
)
|
|
5955
6325
|
] }),
|
|
5956
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
6326
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
5957
6327
|
]
|
|
5958
6328
|
},
|
|
5959
6329
|
`readonly-${choice.value}-${i}`
|
|
5960
6330
|
);
|
|
5961
6331
|
}) });
|
|
5962
6332
|
}
|
|
5963
|
-
return /* @__PURE__ */ (0,
|
|
6333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5964
6334
|
"div",
|
|
5965
6335
|
{
|
|
5966
6336
|
className: cn(
|
|
@@ -5968,7 +6338,7 @@ var MultipleChoiceList = ({
|
|
|
5968
6338
|
disabled ? "opacity-50 cursor-not-allowed" : "",
|
|
5969
6339
|
className
|
|
5970
6340
|
),
|
|
5971
|
-
children: /* @__PURE__ */ (0,
|
|
6341
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5972
6342
|
CheckboxList_default,
|
|
5973
6343
|
{
|
|
5974
6344
|
name,
|
|
@@ -5978,12 +6348,12 @@ var MultipleChoiceList = ({
|
|
|
5978
6348
|
onHandleSelectedValues?.(v);
|
|
5979
6349
|
},
|
|
5980
6350
|
disabled,
|
|
5981
|
-
children: choices.map((choice, i) => /* @__PURE__ */ (0,
|
|
6351
|
+
children: choices.map((choice, i) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
5982
6352
|
"div",
|
|
5983
6353
|
{
|
|
5984
6354
|
className: "flex flex-row gap-2 items-center",
|
|
5985
6355
|
children: [
|
|
5986
|
-
/* @__PURE__ */ (0,
|
|
6356
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5987
6357
|
CheckboxListItem,
|
|
5988
6358
|
{
|
|
5989
6359
|
value: choice.value,
|
|
@@ -5991,7 +6361,7 @@ var MultipleChoiceList = ({
|
|
|
5991
6361
|
disabled: choice.disabled || disabled
|
|
5992
6362
|
}
|
|
5993
6363
|
),
|
|
5994
|
-
/* @__PURE__ */ (0,
|
|
6364
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5995
6365
|
"label",
|
|
5996
6366
|
{
|
|
5997
6367
|
htmlFor: `interactive-${choice.value}-${i}`,
|
|
@@ -6014,7 +6384,7 @@ var MultipleChoiceList = ({
|
|
|
6014
6384
|
};
|
|
6015
6385
|
|
|
6016
6386
|
// src/hooks/useMobile.ts
|
|
6017
|
-
var
|
|
6387
|
+
var import_react21 = require("react");
|
|
6018
6388
|
var MOBILE_WIDTH = 500;
|
|
6019
6389
|
var TABLET_WIDTH = 931;
|
|
6020
6390
|
var DEFAULT_WIDTH = 1200;
|
|
@@ -6029,9 +6399,9 @@ var getDeviceType = () => {
|
|
|
6029
6399
|
return width < TABLET_WIDTH ? "responsive" : "desktop";
|
|
6030
6400
|
};
|
|
6031
6401
|
var useMobile = () => {
|
|
6032
|
-
const [isMobile, setIsMobile] = (0,
|
|
6033
|
-
const [isTablet, setIsTablet] = (0,
|
|
6034
|
-
(0,
|
|
6402
|
+
const [isMobile, setIsMobile] = (0, import_react21.useState)(false);
|
|
6403
|
+
const [isTablet, setIsTablet] = (0, import_react21.useState)(false);
|
|
6404
|
+
(0, import_react21.useEffect)(() => {
|
|
6035
6405
|
const checkScreenSize = () => {
|
|
6036
6406
|
const width = getWindowWidth();
|
|
6037
6407
|
setIsMobile(width < MOBILE_WIDTH);
|
|
@@ -6070,209 +6440,10 @@ var useMobile = () => {
|
|
|
6070
6440
|
};
|
|
6071
6441
|
};
|
|
6072
6442
|
|
|
6073
|
-
// src/hooks/useTheme.ts
|
|
6074
|
-
var import_react20 = require("react");
|
|
6075
|
-
var useTheme = () => {
|
|
6076
|
-
const [themeMode, setThemeMode] = (0, import_react20.useState)("system");
|
|
6077
|
-
const [isDark, setIsDark] = (0, import_react20.useState)(false);
|
|
6078
|
-
const themeModeRef = (0, import_react20.useRef)("system");
|
|
6079
|
-
const applyTheme = (0, import_react20.useCallback)((mode) => {
|
|
6080
|
-
const htmlElement = document.documentElement;
|
|
6081
|
-
const originalTheme = htmlElement.getAttribute("data-original-theme");
|
|
6082
|
-
if (mode === "dark") {
|
|
6083
|
-
htmlElement.setAttribute("data-theme", "dark");
|
|
6084
|
-
setIsDark(true);
|
|
6085
|
-
} else if (mode === "light") {
|
|
6086
|
-
if (originalTheme) {
|
|
6087
|
-
htmlElement.setAttribute("data-theme", originalTheme);
|
|
6088
|
-
}
|
|
6089
|
-
setIsDark(false);
|
|
6090
|
-
} else if (mode === "system") {
|
|
6091
|
-
const isSystemDark = window.matchMedia(
|
|
6092
|
-
"(prefers-color-scheme: dark)"
|
|
6093
|
-
).matches;
|
|
6094
|
-
if (isSystemDark) {
|
|
6095
|
-
htmlElement.setAttribute("data-theme", "dark");
|
|
6096
|
-
setIsDark(true);
|
|
6097
|
-
} else if (originalTheme) {
|
|
6098
|
-
htmlElement.setAttribute("data-theme", originalTheme);
|
|
6099
|
-
setIsDark(false);
|
|
6100
|
-
}
|
|
6101
|
-
}
|
|
6102
|
-
}, []);
|
|
6103
|
-
const toggleTheme = (0, import_react20.useCallback)(() => {
|
|
6104
|
-
let newMode;
|
|
6105
|
-
if (themeMode === "light") {
|
|
6106
|
-
newMode = "dark";
|
|
6107
|
-
} else if (themeMode === "dark") {
|
|
6108
|
-
newMode = "light";
|
|
6109
|
-
} else {
|
|
6110
|
-
newMode = "dark";
|
|
6111
|
-
}
|
|
6112
|
-
setThemeMode(newMode);
|
|
6113
|
-
themeModeRef.current = newMode;
|
|
6114
|
-
applyTheme(newMode);
|
|
6115
|
-
localStorage.setItem("theme-mode", newMode);
|
|
6116
|
-
}, [themeMode, applyTheme]);
|
|
6117
|
-
const setTheme = (0, import_react20.useCallback)(
|
|
6118
|
-
(mode) => {
|
|
6119
|
-
setThemeMode(mode);
|
|
6120
|
-
themeModeRef.current = mode;
|
|
6121
|
-
applyTheme(mode);
|
|
6122
|
-
localStorage.setItem("theme-mode", mode);
|
|
6123
|
-
},
|
|
6124
|
-
[applyTheme]
|
|
6125
|
-
);
|
|
6126
|
-
(0, import_react20.useEffect)(() => {
|
|
6127
|
-
const htmlElement = document.documentElement;
|
|
6128
|
-
const currentTheme = htmlElement.getAttribute("data-theme");
|
|
6129
|
-
if (currentTheme && !htmlElement.getAttribute("data-original-theme")) {
|
|
6130
|
-
htmlElement.setAttribute("data-original-theme", currentTheme);
|
|
6131
|
-
}
|
|
6132
|
-
const savedThemeMode = localStorage.getItem("theme-mode");
|
|
6133
|
-
const initialMode = savedThemeMode || "system";
|
|
6134
|
-
if (!savedThemeMode) {
|
|
6135
|
-
localStorage.setItem("theme-mode", "system");
|
|
6136
|
-
}
|
|
6137
|
-
setThemeMode(initialMode);
|
|
6138
|
-
themeModeRef.current = initialMode;
|
|
6139
|
-
applyTheme(initialMode);
|
|
6140
|
-
const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
|
6141
|
-
const handleSystemThemeChange = () => {
|
|
6142
|
-
if (themeModeRef.current === "system") {
|
|
6143
|
-
applyTheme("system");
|
|
6144
|
-
}
|
|
6145
|
-
};
|
|
6146
|
-
mediaQuery.addEventListener("change", handleSystemThemeChange);
|
|
6147
|
-
return () => {
|
|
6148
|
-
mediaQuery.removeEventListener("change", handleSystemThemeChange);
|
|
6149
|
-
};
|
|
6150
|
-
}, [applyTheme]);
|
|
6151
|
-
return {
|
|
6152
|
-
themeMode,
|
|
6153
|
-
isDark,
|
|
6154
|
-
toggleTheme,
|
|
6155
|
-
setTheme
|
|
6156
|
-
};
|
|
6157
|
-
};
|
|
6158
|
-
|
|
6159
|
-
// src/components/ThemeToggle/ThemeToggle.tsx
|
|
6160
|
-
var import_react21 = require("react");
|
|
6161
|
-
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
6162
|
-
var ThemeToggle = (0, import_react21.forwardRef)(
|
|
6163
|
-
({
|
|
6164
|
-
variant = "simple",
|
|
6165
|
-
size = "md",
|
|
6166
|
-
showIcons = true,
|
|
6167
|
-
showLabels = true,
|
|
6168
|
-
className,
|
|
6169
|
-
children,
|
|
6170
|
-
...props
|
|
6171
|
-
}, ref) => {
|
|
6172
|
-
const { themeMode, isDark, toggleTheme, setTheme } = useTheme();
|
|
6173
|
-
const sizeClasses = {
|
|
6174
|
-
sm: "text-sm px-3 py-1.5",
|
|
6175
|
-
md: "text-md px-4 py-2",
|
|
6176
|
-
lg: "text-lg px-5 py-2.5"
|
|
6177
|
-
};
|
|
6178
|
-
const activeClasses = "bg-primary-500 text-white";
|
|
6179
|
-
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";
|
|
6180
|
-
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";
|
|
6181
|
-
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";
|
|
6182
|
-
const renderThemeButton = (theme, icon, label, isActive, buttonSize) => {
|
|
6183
|
-
const buttonClasses = buttonSize ? cn(baseButtonClasses, sizeClasses[buttonSize]) : smallButtonClasses;
|
|
6184
|
-
const stateClasses = isActive ? activeClasses : inactiveClasses;
|
|
6185
|
-
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
6186
|
-
"button",
|
|
6187
|
-
{
|
|
6188
|
-
type: "button",
|
|
6189
|
-
onClick: () => setTheme(theme),
|
|
6190
|
-
className: cn(buttonClasses, stateClasses),
|
|
6191
|
-
...buttonSize ? props : {},
|
|
6192
|
-
children: [
|
|
6193
|
-
showIcons && icon,
|
|
6194
|
-
showLabels && label
|
|
6195
|
-
]
|
|
6196
|
-
}
|
|
6197
|
-
);
|
|
6198
|
-
};
|
|
6199
|
-
if (variant === "simple") {
|
|
6200
|
-
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
6201
|
-
"button",
|
|
6202
|
-
{
|
|
6203
|
-
type: "button",
|
|
6204
|
-
ref,
|
|
6205
|
-
onClick: toggleTheme,
|
|
6206
|
-
className: cn(
|
|
6207
|
-
"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",
|
|
6208
|
-
sizeClasses[size],
|
|
6209
|
-
className
|
|
6210
|
-
),
|
|
6211
|
-
...props,
|
|
6212
|
-
children: children || /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
|
|
6213
|
-
showIcons && (isDark ? "\u2600\uFE0F" : "\u{1F319}"),
|
|
6214
|
-
showLabels && (isDark ? "Claro" : "Escuro")
|
|
6215
|
-
] })
|
|
6216
|
-
}
|
|
6217
|
-
);
|
|
6218
|
-
}
|
|
6219
|
-
if (variant === "detailed") {
|
|
6220
|
-
const getLabel = () => {
|
|
6221
|
-
if (themeMode === "system") return "Sistema";
|
|
6222
|
-
if (isDark) return "Escuro";
|
|
6223
|
-
return "Claro";
|
|
6224
|
-
};
|
|
6225
|
-
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: cn("flex flex-col gap-2", className), children: [
|
|
6226
|
-
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: [
|
|
6227
|
-
"Tema: ",
|
|
6228
|
-
getLabel()
|
|
6229
|
-
] }),
|
|
6230
|
-
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex gap-1", children: [
|
|
6231
|
-
renderThemeButton("light", "\u2600\uFE0F ", "Claro", themeMode === "light"),
|
|
6232
|
-
renderThemeButton("dark", "\u{1F319} ", "Escuro", themeMode === "dark"),
|
|
6233
|
-
renderThemeButton(
|
|
6234
|
-
"system",
|
|
6235
|
-
"\u2699\uFE0F ",
|
|
6236
|
-
"Sistema",
|
|
6237
|
-
themeMode === "system"
|
|
6238
|
-
)
|
|
6239
|
-
] })
|
|
6240
|
-
] });
|
|
6241
|
-
}
|
|
6242
|
-
if (variant === "buttons") {
|
|
6243
|
-
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: cn("flex gap-2", className), children: [
|
|
6244
|
-
renderThemeButton(
|
|
6245
|
-
"light",
|
|
6246
|
-
"\u2600\uFE0F",
|
|
6247
|
-
"Claro",
|
|
6248
|
-
themeMode === "light",
|
|
6249
|
-
size
|
|
6250
|
-
),
|
|
6251
|
-
renderThemeButton(
|
|
6252
|
-
"dark",
|
|
6253
|
-
"\u{1F319}",
|
|
6254
|
-
"Escuro",
|
|
6255
|
-
themeMode === "dark",
|
|
6256
|
-
size
|
|
6257
|
-
),
|
|
6258
|
-
renderThemeButton(
|
|
6259
|
-
"system",
|
|
6260
|
-
"\u2699\uFE0F",
|
|
6261
|
-
"Sistema",
|
|
6262
|
-
themeMode === "system",
|
|
6263
|
-
size
|
|
6264
|
-
)
|
|
6265
|
-
] });
|
|
6266
|
-
}
|
|
6267
|
-
return null;
|
|
6268
|
-
}
|
|
6269
|
-
);
|
|
6270
|
-
ThemeToggle.displayName = "ThemeToggle";
|
|
6271
|
-
|
|
6272
6443
|
// src/components/Select/Select.tsx
|
|
6273
6444
|
var import_zustand5 = require("zustand");
|
|
6274
6445
|
var import_react22 = require("react");
|
|
6275
|
-
var
|
|
6446
|
+
var import_phosphor_react17 = require("phosphor-react");
|
|
6276
6447
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
6277
6448
|
var VARIANT_CLASSES4 = {
|
|
6278
6449
|
outlined: "border-2 rounded-lg focus:border-primary-950",
|
|
@@ -6457,7 +6628,7 @@ var Select = ({
|
|
|
6457
6628
|
(helperText || errorMessage) && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "mt-1.5 gap-1.5", children: [
|
|
6458
6629
|
helperText && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-sm text-text-500", children: helperText }),
|
|
6459
6630
|
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("p", { className: "flex gap-1 items-center text-sm text-indicator-error", children: [
|
|
6460
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
6631
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_phosphor_react17.WarningCircle, { size: 16 }),
|
|
6461
6632
|
" ",
|
|
6462
6633
|
errorMessage
|
|
6463
6634
|
] })
|
|
@@ -6513,7 +6684,7 @@ var SelectTrigger = (0, import_react22.forwardRef)(
|
|
|
6513
6684
|
children: [
|
|
6514
6685
|
props.children,
|
|
6515
6686
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
6516
|
-
|
|
6687
|
+
import_phosphor_react17.CaretDown,
|
|
6517
6688
|
{
|
|
6518
6689
|
className: cn(
|
|
6519
6690
|
"h-[1em] w-[1em] opacity-50 transition-transform",
|
|
@@ -6604,7 +6775,7 @@ var SelectItem = (0, import_react22.forwardRef)(
|
|
|
6604
6775
|
tabIndex: disabled ? -1 : 0,
|
|
6605
6776
|
...props,
|
|
6606
6777
|
children: [
|
|
6607
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: selectedValue === value && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
6778
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: selectedValue === value && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_phosphor_react17.Check, { className: "" }) }),
|
|
6608
6779
|
children
|
|
6609
6780
|
]
|
|
6610
6781
|
}
|
|
@@ -6617,7 +6788,7 @@ var Select_default = Select;
|
|
|
6617
6788
|
// src/components/Menu/Menu.tsx
|
|
6618
6789
|
var import_zustand6 = require("zustand");
|
|
6619
6790
|
var import_react23 = require("react");
|
|
6620
|
-
var
|
|
6791
|
+
var import_phosphor_react18 = require("phosphor-react");
|
|
6621
6792
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
6622
6793
|
var createMenuStore = (onValueChange) => (0, import_zustand6.create)((set) => ({
|
|
6623
6794
|
value: "",
|
|
@@ -6816,7 +6987,7 @@ var MenuItem = (0, import_react23.forwardRef)(
|
|
|
6816
6987
|
}
|
|
6817
6988
|
),
|
|
6818
6989
|
separator && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6819
|
-
|
|
6990
|
+
import_phosphor_react18.CaretRight,
|
|
6820
6991
|
{
|
|
6821
6992
|
size: 16,
|
|
6822
6993
|
className: "text-text-600",
|
|
@@ -6883,7 +7054,7 @@ var MenuOverflow = ({
|
|
|
6883
7054
|
className: "absolute left-0 top-1/2 -translate-y-1/2 z-10 flex h-8 w-8 items-center justify-center rounded-full bg-white shadow-md cursor-pointer",
|
|
6884
7055
|
"data-testid": "scroll-left-button",
|
|
6885
7056
|
children: [
|
|
6886
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
7057
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_phosphor_react18.CaretLeft, { size: 16 }),
|
|
6887
7058
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "sr-only", children: "Scroll left" })
|
|
6888
7059
|
]
|
|
6889
7060
|
}
|
|
@@ -6906,7 +7077,7 @@ var MenuOverflow = ({
|
|
|
6906
7077
|
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",
|
|
6907
7078
|
"data-testid": "scroll-right-button",
|
|
6908
7079
|
children: [
|
|
6909
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
7080
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_phosphor_react18.CaretRight, { size: 16 }),
|
|
6910
7081
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "sr-only", children: "Scroll right" })
|
|
6911
7082
|
]
|
|
6912
7083
|
}
|
|
@@ -7182,7 +7353,7 @@ var NotFound_default = NotFound;
|
|
|
7182
7353
|
// src/components/VideoPlayer/VideoPlayer.tsx
|
|
7183
7354
|
var import_react25 = require("react");
|
|
7184
7355
|
var import_react_dom = require("react-dom");
|
|
7185
|
-
var
|
|
7356
|
+
var import_phosphor_react19 = require("phosphor-react");
|
|
7186
7357
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
7187
7358
|
var CONTROLS_HIDE_TIMEOUT = 3e3;
|
|
7188
7359
|
var LEAVE_HIDE_TIMEOUT = 1e3;
|
|
@@ -7222,7 +7393,7 @@ var VolumeControls = ({
|
|
|
7222
7393
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
7223
7394
|
IconButton_default,
|
|
7224
7395
|
{
|
|
7225
|
-
icon: isMuted ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
7396
|
+
icon: isMuted ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_phosphor_react19.SpeakerSlash, { size: 24 }) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_phosphor_react19.SpeakerHigh, { size: 24 }),
|
|
7226
7397
|
onClick: onToggleMute,
|
|
7227
7398
|
"aria-label": isMuted ? "Unmute" : "Mute",
|
|
7228
7399
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
@@ -7294,7 +7465,7 @@ var SpeedMenu = ({
|
|
|
7294
7465
|
IconButton_default,
|
|
7295
7466
|
{
|
|
7296
7467
|
ref: buttonRef,
|
|
7297
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
7468
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_phosphor_react19.DotsThreeVertical, { size: 24 }),
|
|
7298
7469
|
onClick: onToggleMenu,
|
|
7299
7470
|
"aria-label": "Playback speed",
|
|
7300
7471
|
"aria-haspopup": "menu",
|
|
@@ -7759,7 +7930,7 @@ var VideoPlayer = ({
|
|
|
7759
7930
|
!isPlaying && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "absolute inset-0 flex items-center justify-center bg-black/30 transition-opacity", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
7760
7931
|
IconButton_default,
|
|
7761
7932
|
{
|
|
7762
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
7933
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_phosphor_react19.Play, { size: 32, weight: "regular", className: "ml-1" }),
|
|
7763
7934
|
onClick: togglePlayPause,
|
|
7764
7935
|
"aria-label": "Play video",
|
|
7765
7936
|
className: "!bg-transparent !text-white !w-auto !h-auto hover:!bg-transparent hover:!text-gray-200"
|
|
@@ -7775,7 +7946,7 @@ var VideoPlayer = ({
|
|
|
7775
7946
|
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "flex justify-start", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
7776
7947
|
IconButton_default,
|
|
7777
7948
|
{
|
|
7778
|
-
icon: isFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
7949
|
+
icon: isFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_phosphor_react19.ArrowsInSimple, { size: 24 }) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_phosphor_react19.ArrowsOutSimple, { size: 24 }),
|
|
7779
7950
|
onClick: toggleFullscreen,
|
|
7780
7951
|
"aria-label": isFullscreen ? "Exit fullscreen" : "Enter fullscreen",
|
|
7781
7952
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
@@ -7805,7 +7976,7 @@ var VideoPlayer = ({
|
|
|
7805
7976
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
7806
7977
|
IconButton_default,
|
|
7807
7978
|
{
|
|
7808
|
-
icon: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
7979
|
+
icon: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_phosphor_react19.Pause, { size: 24 }) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_phosphor_react19.Play, { size: 24 }),
|
|
7809
7980
|
onClick: togglePlayPause,
|
|
7810
7981
|
"aria-label": isPlaying ? "Pause" : "Play",
|
|
7811
7982
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
@@ -7823,7 +7994,7 @@ var VideoPlayer = ({
|
|
|
7823
7994
|
subtitles && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
7824
7995
|
IconButton_default,
|
|
7825
7996
|
{
|
|
7826
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
7997
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_phosphor_react19.ClosedCaptioning, { size: 24 }),
|
|
7827
7998
|
onClick: toggleCaptions,
|
|
7828
7999
|
"aria-label": showCaptions ? "Hide captions" : "Show captions",
|
|
7829
8000
|
className: cn(
|
|
@@ -7861,7 +8032,7 @@ var VideoPlayer_default = VideoPlayer;
|
|
|
7861
8032
|
|
|
7862
8033
|
// src/components/Whiteboard/Whiteboard.tsx
|
|
7863
8034
|
var import_react26 = require("react");
|
|
7864
|
-
var
|
|
8035
|
+
var import_phosphor_react20 = require("phosphor-react");
|
|
7865
8036
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
7866
8037
|
var IMAGE_WIDTH = 225;
|
|
7867
8038
|
var IMAGE_HEIGHT = 90;
|
|
@@ -7959,7 +8130,7 @@ var Whiteboard = ({
|
|
|
7959
8130
|
className: "cursor-pointer absolute bottom-3 right-3 flex items-center justify-center bg-black/20 backdrop-blur-sm rounded hover:bg-black/30 transition-colors duration-200 group/button w-6 h-6",
|
|
7960
8131
|
"aria-label": `Download ${image.title || "imagem"}`,
|
|
7961
8132
|
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
7962
|
-
|
|
8133
|
+
import_phosphor_react20.ArrowsOut,
|
|
7963
8134
|
{
|
|
7964
8135
|
size: 24,
|
|
7965
8136
|
weight: "regular",
|
|
@@ -8324,7 +8495,7 @@ function useApiConfig(api) {
|
|
|
8324
8495
|
}
|
|
8325
8496
|
|
|
8326
8497
|
// src/components/Quiz/Quiz.tsx
|
|
8327
|
-
var
|
|
8498
|
+
var import_phosphor_react21 = require("phosphor-react");
|
|
8328
8499
|
var import_react30 = require("react");
|
|
8329
8500
|
|
|
8330
8501
|
// src/components/Quiz/useQuizStore.ts
|
|
@@ -8965,9 +9136,9 @@ var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
|
8965
9136
|
var getStatusBadge = (status) => {
|
|
8966
9137
|
switch (status) {
|
|
8967
9138
|
case "correct":
|
|
8968
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
9139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_phosphor_react21.CheckCircle, {}), children: "Resposta correta" });
|
|
8969
9140
|
case "incorrect":
|
|
8970
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
9141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_phosphor_react21.XCircle, {}), children: "Resposta incorreta" });
|
|
8971
9142
|
default:
|
|
8972
9143
|
return null;
|
|
8973
9144
|
}
|
|
@@ -9085,7 +9256,7 @@ var QuizTitle = (0, import_react30.forwardRef)(
|
|
|
9085
9256
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
9086
9257
|
IconButton_default,
|
|
9087
9258
|
{
|
|
9088
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
9259
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_phosphor_react21.CaretLeft, { size: 24 }),
|
|
9089
9260
|
size: "md",
|
|
9090
9261
|
"aria-label": "Voltar",
|
|
9091
9262
|
onClick: handleBackClick
|
|
@@ -9095,7 +9266,7 @@ var QuizTitle = (0, import_react30.forwardRef)(
|
|
|
9095
9266
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "text-text-950 font-bold text-md", children: quizTitle }),
|
|
9096
9267
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "text-text-600 text-xs", children: totalQuestions > 0 ? `${currentQuestionIndex + 1} de ${totalQuestions}` : "0 de 0" })
|
|
9097
9268
|
] }),
|
|
9098
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "flex flex-row items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Badge_default, { variant: "outlined", action: "info", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
9269
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "flex flex-row items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Badge_default, { variant: "outlined", action: "info", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_phosphor_react21.Clock, {}), children: isStarted ? formatTime2(timeElapsed) : "00:00" }) })
|
|
9099
9270
|
]
|
|
9100
9271
|
}
|
|
9101
9272
|
),
|
|
@@ -9637,7 +9808,7 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
9637
9808
|
);
|
|
9638
9809
|
if (!mockAnswer) return null;
|
|
9639
9810
|
const action = mockAnswer.isCorrect ? "success" : "error";
|
|
9640
|
-
const icon = mockAnswer.isCorrect ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
9811
|
+
const icon = mockAnswer.isCorrect ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_phosphor_react21.CheckCircle, {}) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_phosphor_react21.XCircle, {});
|
|
9641
9812
|
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
9642
9813
|
Badge_default,
|
|
9643
9814
|
{
|
|
@@ -9915,7 +10086,7 @@ var QuizQuestionList = ({
|
|
|
9915
10086
|
Object.entries(filteredGroupedQuestions).map(
|
|
9916
10087
|
([subjectId, questions]) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("section", { className: "flex flex-col gap-2", children: [
|
|
9917
10088
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { className: "pt-6 pb-4 flex flex-row gap-2", children: [
|
|
9918
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "bg-primary-500 p-1 rounded-sm flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10089
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "bg-primary-500 p-1 rounded-sm flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_phosphor_react21.BookOpen, { size: 17, className: "text-white" }) }),
|
|
9919
10090
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "text-text-800 font-bold text-lg", children: questions?.[0]?.knowledgeMatrix?.[0]?.subject?.name ?? "Sem mat\xE9ria" })
|
|
9920
10091
|
] }),
|
|
9921
10092
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("ul", { className: "flex flex-col gap-2", children: questions.map((question) => {
|
|
@@ -10016,7 +10187,7 @@ var QuizFooter = (0, import_react30.forwardRef)(
|
|
|
10016
10187
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10017
10188
|
IconButton_default,
|
|
10018
10189
|
{
|
|
10019
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10190
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_phosphor_react21.SquaresFour, { size: 24, className: "text-text-950" }),
|
|
10020
10191
|
size: "md",
|
|
10021
10192
|
onClick: () => setModalNavigateOpen(true)
|
|
10022
10193
|
}
|
|
@@ -10038,7 +10209,7 @@ var QuizFooter = (0, import_react30.forwardRef)(
|
|
|
10038
10209
|
size: "medium",
|
|
10039
10210
|
variant: "link",
|
|
10040
10211
|
action: "primary",
|
|
10041
|
-
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10212
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_phosphor_react21.CaretLeft, { size: 18 }),
|
|
10042
10213
|
onClick: () => {
|
|
10043
10214
|
goToPreviousQuestion();
|
|
10044
10215
|
},
|
|
@@ -10075,7 +10246,7 @@ var QuizFooter = (0, import_react30.forwardRef)(
|
|
|
10075
10246
|
size: "medium",
|
|
10076
10247
|
variant: "link",
|
|
10077
10248
|
action: "primary",
|
|
10078
|
-
iconRight: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10249
|
+
iconRight: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_phosphor_react21.CaretRight, { size: 18 }),
|
|
10079
10250
|
disabled: !currentAnswer && !isCurrentQuestionSkipped,
|
|
10080
10251
|
onClick: () => {
|
|
10081
10252
|
goToNextQuestion();
|
|
@@ -10113,7 +10284,6 @@ var QuizFooter = (0, import_react30.forwardRef)(
|
|
|
10113
10284
|
isOpen: modalResultOpen,
|
|
10114
10285
|
onClose: () => setModalResultOpen(false),
|
|
10115
10286
|
title: "",
|
|
10116
|
-
closeOnBackdropClick: false,
|
|
10117
10287
|
closeOnEscape: false,
|
|
10118
10288
|
hideCloseButton: true,
|
|
10119
10289
|
size: "md",
|
|
@@ -10306,7 +10476,7 @@ var QuizResultPerformance = (0, import_react30.forwardRef)(
|
|
|
10306
10476
|
),
|
|
10307
10477
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
10308
10478
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex items-center gap-1 mb-1", children: [
|
|
10309
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10479
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_phosphor_react21.Clock, { size: 12, weight: "regular", className: "text-text-800" }),
|
|
10310
10480
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-2xs font-medium text-text-800", children: formatTime2(
|
|
10311
10481
|
(getQuestionResultStatistics()?.timeSpent ?? 0) * 60
|
|
10312
10482
|
) })
|
|
@@ -10507,7 +10677,7 @@ var LoadingModal = (0, import_react31.forwardRef)(
|
|
|
10507
10677
|
var loadingModal_default = LoadingModal;
|
|
10508
10678
|
|
|
10509
10679
|
// src/components/NotificationCard/NotificationCard.tsx
|
|
10510
|
-
var
|
|
10680
|
+
var import_phosphor_react22 = require("phosphor-react");
|
|
10511
10681
|
var import_react32 = require("react");
|
|
10512
10682
|
|
|
10513
10683
|
// src/store/notificationStore.ts
|
|
@@ -10784,7 +10954,7 @@ var NotificationHeader = ({
|
|
|
10784
10954
|
variant: "solid",
|
|
10785
10955
|
action: "info",
|
|
10786
10956
|
size: "small",
|
|
10787
|
-
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
10957
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_phosphor_react22.Bell, { size: 12, "aria-hidden": "true", focusable: "false" }),
|
|
10788
10958
|
className: "border-0",
|
|
10789
10959
|
children: unreadCount === 1 ? "1 n\xE3o lida" : `${unreadCount} n\xE3o lidas`
|
|
10790
10960
|
}
|
|
@@ -10838,7 +11008,7 @@ var SingleNotificationCard = ({
|
|
|
10838
11008
|
{
|
|
10839
11009
|
className: "flex-shrink-0 inline-flex items-center justify-center font-medium bg-transparent text-text-950 cursor-pointer hover:bg-info-50 w-6 h-6 rounded-lg",
|
|
10840
11010
|
"aria-label": "Menu de a\xE7\xF5es",
|
|
10841
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11011
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_phosphor_react22.DotsThreeVertical, { size: 24 })
|
|
10842
11012
|
}
|
|
10843
11013
|
),
|
|
10844
11014
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(DropdownMenuContent, { align: "end", className: "min-w-[160px]", children: [
|
|
@@ -10986,7 +11156,7 @@ var NotificationCenter = ({
|
|
|
10986
11156
|
{
|
|
10987
11157
|
active: isModalOpen,
|
|
10988
11158
|
onClick: handleMobileClick,
|
|
10989
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11159
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_phosphor_react22.Bell, { size: 24, className: "text-primary" }),
|
|
10990
11160
|
className
|
|
10991
11161
|
}
|
|
10992
11162
|
),
|
|
@@ -10998,7 +11168,6 @@ var NotificationCenter = ({
|
|
|
10998
11168
|
title: "Notifica\xE7\xF5es",
|
|
10999
11169
|
size: "md",
|
|
11000
11170
|
hideCloseButton: false,
|
|
11001
|
-
closeOnBackdropClick: true,
|
|
11002
11171
|
closeOnEscape: true,
|
|
11003
11172
|
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex flex-col h-full max-h-[80vh]", children: [
|
|
11004
11173
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "px-0 pb-3 border-b border-border-200", children: [
|
|
@@ -11043,7 +11212,7 @@ var NotificationCenter = ({
|
|
|
11043
11212
|
active: isActive,
|
|
11044
11213
|
onClick: handleDesktopClick,
|
|
11045
11214
|
icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11046
|
-
|
|
11215
|
+
import_phosphor_react22.Bell,
|
|
11047
11216
|
{
|
|
11048
11217
|
size: 24,
|
|
11049
11218
|
className: isActive ? "text-primary-950" : "text-primary"
|
|
@@ -11303,6 +11472,7 @@ var createNotificationsHook = (apiClient) => {
|
|
|
11303
11472
|
ProfileMenuHeader,
|
|
11304
11473
|
ProfileMenuSection,
|
|
11305
11474
|
ProfileMenuTrigger,
|
|
11475
|
+
ProfileToggleTheme,
|
|
11306
11476
|
ProgressBar,
|
|
11307
11477
|
ProgressCircle,
|
|
11308
11478
|
ProtectedRoute,
|