analytica-frontend-lib 1.1.54 → 1.1.56
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/NotificationCard/index.js +1107 -814
- package/dist/NotificationCard/index.js.map +1 -1
- package/dist/NotificationCard/index.mjs +1051 -758
- package/dist/NotificationCard/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 +19 -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 -952
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1068 -1026
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +19 -39
- package/dist/styles.css.map +1 -1
- package/package.json +1 -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,288 +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
|
-
|
|
3964
|
-
// src/components/Modal/utils/videoUtils.ts
|
|
3965
|
-
var isYouTubeUrl = (url) => {
|
|
3966
|
-
const youtubeRegex = /^(https?:\/\/)?((www|m|music)\.)?(youtube\.com|youtu\.be|youtube-nocookie\.com)\/.+/i;
|
|
3967
|
-
return youtubeRegex.test(url);
|
|
3968
|
-
};
|
|
3969
|
-
var isValidYouTubeHost = (host) => {
|
|
3970
|
-
if (host === "youtu.be") return "youtu.be";
|
|
3971
|
-
const isValidYouTubeCom = host === "youtube.com" || host.endsWith(".youtube.com") && /^(www|m|music)\.youtube\.com$/.test(host);
|
|
3972
|
-
if (isValidYouTubeCom) return "youtube";
|
|
3973
|
-
const isValidNoCookie = host === "youtube-nocookie.com" || host.endsWith(".youtube-nocookie.com") && /^(www|m|music)\.youtube-nocookie\.com$/.test(host);
|
|
3974
|
-
if (isValidNoCookie) return "nocookie";
|
|
3975
|
-
return null;
|
|
3976
|
-
};
|
|
3977
|
-
var extractYoutuBeId = (pathname) => {
|
|
3978
|
-
const firstSeg = pathname.split("/").filter(Boolean)[0];
|
|
3979
|
-
return firstSeg || null;
|
|
3980
|
-
};
|
|
3981
|
-
var extractYouTubeId = (pathname, searchParams) => {
|
|
3982
|
-
const parts = pathname.split("/").filter(Boolean);
|
|
3983
|
-
const [first, second] = parts;
|
|
3984
|
-
if (first === "embed" && second) return second;
|
|
3985
|
-
if (first === "shorts" && second) return second;
|
|
3986
|
-
if (first === "live" && second) return second;
|
|
3987
|
-
const v = searchParams.get("v");
|
|
3988
|
-
if (v) return v;
|
|
3989
|
-
return null;
|
|
3990
|
-
};
|
|
3991
|
-
var getYouTubeVideoId = (url) => {
|
|
3992
|
-
try {
|
|
3993
|
-
const u = new URL(url);
|
|
3994
|
-
const hostType = isValidYouTubeHost(u.hostname.toLowerCase());
|
|
3995
|
-
if (!hostType) return null;
|
|
3996
|
-
if (hostType === "youtu.be") {
|
|
3997
|
-
return extractYoutuBeId(u.pathname);
|
|
3998
|
-
}
|
|
3999
|
-
return extractYouTubeId(u.pathname, u.searchParams);
|
|
4000
|
-
} catch {
|
|
4001
|
-
return null;
|
|
4002
|
-
}
|
|
4003
|
-
};
|
|
4004
|
-
var getYouTubeEmbedUrl = (videoId) => {
|
|
4005
|
-
return `https://www.youtube-nocookie.com/embed/${videoId}?autoplay=0&rel=0&modestbranding=1`;
|
|
4006
|
-
};
|
|
4007
|
-
|
|
4008
|
-
// src/components/Modal/Modal.tsx
|
|
4009
|
-
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
4010
|
-
var SIZE_CLASSES10 = {
|
|
4011
|
-
xs: "max-w-[360px]",
|
|
4012
|
-
sm: "max-w-[420px]",
|
|
4013
|
-
md: "max-w-[510px]",
|
|
4014
|
-
lg: "max-w-[640px]",
|
|
4015
|
-
xl: "max-w-[970px]"
|
|
4016
|
-
};
|
|
4017
|
-
var Modal = ({
|
|
4018
|
-
isOpen,
|
|
4019
|
-
onClose,
|
|
4020
|
-
title,
|
|
4021
|
-
children,
|
|
4022
|
-
size = "md",
|
|
4023
|
-
className = "",
|
|
4024
|
-
closeOnEscape = true,
|
|
4025
|
-
footer,
|
|
4026
|
-
hideCloseButton = false,
|
|
4027
|
-
variant = "default",
|
|
4028
|
-
description,
|
|
4029
|
-
image,
|
|
4030
|
-
imageAlt,
|
|
4031
|
-
actionLink,
|
|
4032
|
-
actionLabel
|
|
4033
|
-
}) => {
|
|
4034
|
-
const titleId = (0, import_react13.useId)();
|
|
4035
|
-
(0, import_react13.useEffect)(() => {
|
|
4036
|
-
if (!isOpen || !closeOnEscape) return;
|
|
4037
|
-
const handleEscape = (event) => {
|
|
4038
|
-
if (event.key === "Escape") {
|
|
4039
|
-
onClose();
|
|
4040
|
-
}
|
|
4041
|
-
};
|
|
4042
|
-
document.addEventListener("keydown", handleEscape);
|
|
4043
|
-
return () => document.removeEventListener("keydown", handleEscape);
|
|
4044
|
-
}, [isOpen, closeOnEscape, onClose]);
|
|
4045
|
-
(0, import_react13.useEffect)(() => {
|
|
4046
|
-
const originalOverflow = document.body.style.overflow;
|
|
4047
|
-
if (isOpen) {
|
|
4048
|
-
document.body.style.overflow = "hidden";
|
|
4049
|
-
} else {
|
|
4050
|
-
document.body.style.overflow = originalOverflow;
|
|
4051
|
-
}
|
|
4052
|
-
return () => {
|
|
4053
|
-
document.body.style.overflow = originalOverflow;
|
|
4054
|
-
};
|
|
4055
|
-
}, [isOpen]);
|
|
4056
|
-
if (!isOpen) return null;
|
|
4057
|
-
const sizeClasses = SIZE_CLASSES10[size];
|
|
4058
|
-
const baseClasses = "bg-secondary-50 rounded-3xl shadow-hard-shadow-2 border border-border-100 w-full mx-4";
|
|
4059
|
-
const dialogResetClasses = "p-0 m-0 border-none outline-none max-h-none static";
|
|
4060
|
-
const modalClasses = cn(
|
|
4061
|
-
baseClasses,
|
|
4062
|
-
sizeClasses,
|
|
4063
|
-
dialogResetClasses,
|
|
4064
|
-
className
|
|
4065
|
-
);
|
|
4066
|
-
const normalizeUrl = (href) => /^https?:\/\//i.test(href) ? href : `https://${href}`;
|
|
4067
|
-
const handleActionClick = () => {
|
|
4068
|
-
if (actionLink) {
|
|
4069
|
-
window.open(normalizeUrl(actionLink), "_blank", "noopener,noreferrer");
|
|
4070
|
-
}
|
|
4071
|
-
};
|
|
4072
|
-
if (variant === "activity") {
|
|
4073
|
-
return /* @__PURE__ */ (0, import_jsx_runtime25.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_runtime25.jsxs)(
|
|
4074
|
-
"dialog",
|
|
4075
|
-
{
|
|
4076
|
-
className: modalClasses,
|
|
4077
|
-
"aria-labelledby": titleId,
|
|
4078
|
-
"aria-modal": "true",
|
|
4079
|
-
open: true,
|
|
4080
|
-
children: [
|
|
4081
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex justify-end p-6 pb-0", children: !hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4082
|
-
"button",
|
|
4083
|
-
{
|
|
4084
|
-
onClick: onClose,
|
|
4085
|
-
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",
|
|
4086
|
-
"aria-label": "Fechar modal",
|
|
4087
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_phosphor_react11.X, { size: 18 })
|
|
4088
|
-
}
|
|
4089
|
-
) }),
|
|
4090
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-col items-center px-6 pb-6 gap-5", children: [
|
|
4091
|
-
image && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4092
|
-
"img",
|
|
4093
|
-
{
|
|
4094
|
-
src: image,
|
|
4095
|
-
alt: imageAlt ?? "",
|
|
4096
|
-
className: "w-[122px] h-[122px] object-contain"
|
|
4097
|
-
}
|
|
4098
|
-
) }),
|
|
4099
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4100
|
-
"h2",
|
|
4101
|
-
{
|
|
4102
|
-
id: titleId,
|
|
4103
|
-
className: "text-lg font-semibold text-text-950 text-center",
|
|
4104
|
-
children: title
|
|
4105
|
-
}
|
|
4106
|
-
),
|
|
4107
|
-
description && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-sm font-normal text-text-400 text-center max-w-md leading-[21px]", children: description }),
|
|
4108
|
-
actionLink && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "w-full", children: [
|
|
4109
|
-
(() => {
|
|
4110
|
-
const normalized = normalizeUrl(actionLink);
|
|
4111
|
-
const isYT = isYouTubeUrl(normalized);
|
|
4112
|
-
if (!isYT) return null;
|
|
4113
|
-
const id = getYouTubeVideoId(normalized);
|
|
4114
|
-
if (!id) {
|
|
4115
|
-
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4116
|
-
Button_default,
|
|
4117
|
-
{
|
|
4118
|
-
variant: "solid",
|
|
4119
|
-
action: "primary",
|
|
4120
|
-
size: "large",
|
|
4121
|
-
className: "w-full",
|
|
4122
|
-
onClick: handleActionClick,
|
|
4123
|
-
children: actionLabel || "Iniciar Atividade"
|
|
4124
|
-
}
|
|
4125
|
-
);
|
|
4126
|
-
}
|
|
4127
|
-
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4128
|
-
"iframe",
|
|
4129
|
-
{
|
|
4130
|
-
src: getYouTubeEmbedUrl(id),
|
|
4131
|
-
className: "w-full aspect-video rounded-lg",
|
|
4132
|
-
allowFullScreen: true,
|
|
4133
|
-
allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
|
|
4134
|
-
title: "V\xEDdeo YouTube"
|
|
4135
|
-
}
|
|
4136
|
-
);
|
|
4137
|
-
})(),
|
|
4138
|
-
!isYouTubeUrl(normalizeUrl(actionLink)) && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4139
|
-
Button_default,
|
|
4140
|
-
{
|
|
4141
|
-
variant: "solid",
|
|
4142
|
-
action: "primary",
|
|
4143
|
-
size: "large",
|
|
4144
|
-
className: "w-full",
|
|
4145
|
-
onClick: handleActionClick,
|
|
4146
|
-
children: actionLabel || "Iniciar Atividade"
|
|
4147
|
-
}
|
|
4148
|
-
)
|
|
4149
|
-
] })
|
|
4150
|
-
] })
|
|
4151
|
-
]
|
|
4152
|
-
}
|
|
4153
|
-
) });
|
|
4154
|
-
}
|
|
4155
|
-
return /* @__PURE__ */ (0, import_jsx_runtime25.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_runtime25.jsxs)(
|
|
4156
|
-
"dialog",
|
|
4157
|
-
{
|
|
4158
|
-
className: modalClasses,
|
|
4159
|
-
"aria-labelledby": titleId,
|
|
4160
|
-
"aria-modal": "true",
|
|
4161
|
-
open: true,
|
|
4162
|
-
children: [
|
|
4163
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center justify-between px-6 py-6", children: [
|
|
4164
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h2", { id: titleId, className: "text-lg font-semibold text-text-950", children: title }),
|
|
4165
|
-
!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)(
|
|
4166
4397
|
"button",
|
|
4167
4398
|
{
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
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()
|
|
4172
4414
|
}
|
|
4173
4415
|
)
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
) });
|
|
4416
|
+
},
|
|
4417
|
+
day.date.getTime()
|
|
4418
|
+
);
|
|
4419
|
+
}) })
|
|
4420
|
+
] });
|
|
4180
4421
|
};
|
|
4181
|
-
var
|
|
4422
|
+
var Calendar_default = Calendar;
|
|
4182
4423
|
|
|
4183
4424
|
// src/components/Accordation/Accordation.tsx
|
|
4184
|
-
var
|
|
4425
|
+
var import_react17 = require("react");
|
|
4185
4426
|
|
|
4186
4427
|
// src/components/Card/Card.tsx
|
|
4187
|
-
var
|
|
4188
|
-
var
|
|
4428
|
+
var import_react16 = require("react");
|
|
4429
|
+
var import_phosphor_react13 = require("phosphor-react");
|
|
4189
4430
|
|
|
4190
4431
|
// src/components/IconRender/IconRender.tsx
|
|
4191
4432
|
var PhosphorIcons = __toESM(require("phosphor-react"));
|
|
4192
|
-
var
|
|
4193
|
-
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)(
|
|
4194
4435
|
"svg",
|
|
4195
4436
|
{
|
|
4196
4437
|
width: size,
|
|
@@ -4199,21 +4440,21 @@ var ChatPT = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)
|
|
|
4199
4440
|
fill: "none",
|
|
4200
4441
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4201
4442
|
children: [
|
|
4202
|
-
/* @__PURE__ */ (0,
|
|
4443
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4203
4444
|
"path",
|
|
4204
4445
|
{
|
|
4205
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",
|
|
4206
4447
|
fill: color
|
|
4207
4448
|
}
|
|
4208
4449
|
),
|
|
4209
|
-
/* @__PURE__ */ (0,
|
|
4450
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4210
4451
|
"path",
|
|
4211
4452
|
{
|
|
4212
4453
|
d: "M21.1758 12V20.5312H19.7168V12H21.1758ZM23.8535 12V13.1719H17.0625V12H23.8535Z",
|
|
4213
4454
|
fill: color
|
|
4214
4455
|
}
|
|
4215
4456
|
),
|
|
4216
|
-
/* @__PURE__ */ (0,
|
|
4457
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4217
4458
|
"path",
|
|
4218
4459
|
{
|
|
4219
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",
|
|
@@ -4223,7 +4464,7 @@ var ChatPT = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)
|
|
|
4223
4464
|
]
|
|
4224
4465
|
}
|
|
4225
4466
|
);
|
|
4226
|
-
var ChatEN = ({ size, color }) => /* @__PURE__ */ (0,
|
|
4467
|
+
var ChatEN = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
4227
4468
|
"svg",
|
|
4228
4469
|
{
|
|
4229
4470
|
width: size,
|
|
@@ -4232,21 +4473,21 @@ var ChatEN = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)
|
|
|
4232
4473
|
fill: "none",
|
|
4233
4474
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4234
4475
|
children: [
|
|
4235
|
-
/* @__PURE__ */ (0,
|
|
4476
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4236
4477
|
"path",
|
|
4237
4478
|
{
|
|
4238
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",
|
|
4239
4480
|
fill: color
|
|
4240
4481
|
}
|
|
4241
4482
|
),
|
|
4242
|
-
/* @__PURE__ */ (0,
|
|
4483
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4243
4484
|
"path",
|
|
4244
4485
|
{
|
|
4245
4486
|
d: "M22.5488 12V20.5312H21.0781L17.252 14.4199V20.5312H15.7812V12H17.252L21.0898 18.123V12H22.5488Z",
|
|
4246
4487
|
fill: color
|
|
4247
4488
|
}
|
|
4248
4489
|
),
|
|
4249
|
-
/* @__PURE__ */ (0,
|
|
4490
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4250
4491
|
"path",
|
|
4251
4492
|
{
|
|
4252
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",
|
|
@@ -4256,7 +4497,7 @@ var ChatEN = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)
|
|
|
4256
4497
|
]
|
|
4257
4498
|
}
|
|
4258
4499
|
);
|
|
4259
|
-
var ChatES = ({ size, color }) => /* @__PURE__ */ (0,
|
|
4500
|
+
var ChatES = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
4260
4501
|
"svg",
|
|
4261
4502
|
{
|
|
4262
4503
|
width: size,
|
|
@@ -4265,21 +4506,21 @@ var ChatES = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)
|
|
|
4265
4506
|
fill: "none",
|
|
4266
4507
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4267
4508
|
children: [
|
|
4268
|
-
/* @__PURE__ */ (0,
|
|
4509
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4269
4510
|
"path",
|
|
4270
4511
|
{
|
|
4271
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",
|
|
4272
4513
|
fill: color
|
|
4273
4514
|
}
|
|
4274
4515
|
),
|
|
4275
|
-
/* @__PURE__ */ (0,
|
|
4516
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4276
4517
|
"path",
|
|
4277
4518
|
{
|
|
4278
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",
|
|
4279
4520
|
fill: color
|
|
4280
4521
|
}
|
|
4281
4522
|
),
|
|
4282
|
-
/* @__PURE__ */ (0,
|
|
4523
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4283
4524
|
"path",
|
|
4284
4525
|
{
|
|
4285
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",
|
|
@@ -4297,21 +4538,21 @@ var IconRender = ({
|
|
|
4297
4538
|
}) => {
|
|
4298
4539
|
switch (iconName) {
|
|
4299
4540
|
case "Chat_PT":
|
|
4300
|
-
return /* @__PURE__ */ (0,
|
|
4541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ChatPT, { size, color });
|
|
4301
4542
|
case "Chat_EN":
|
|
4302
|
-
return /* @__PURE__ */ (0,
|
|
4543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ChatEN, { size, color });
|
|
4303
4544
|
case "Chat_ES":
|
|
4304
|
-
return /* @__PURE__ */ (0,
|
|
4545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ChatES, { size, color });
|
|
4305
4546
|
default: {
|
|
4306
4547
|
const IconComponent = PhosphorIcons[iconName] || PhosphorIcons.Question;
|
|
4307
|
-
return /* @__PURE__ */ (0,
|
|
4548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IconComponent, { size, color, weight });
|
|
4308
4549
|
}
|
|
4309
4550
|
}
|
|
4310
4551
|
};
|
|
4311
4552
|
var IconRender_default = IconRender;
|
|
4312
4553
|
|
|
4313
4554
|
// src/components/Card/Card.tsx
|
|
4314
|
-
var
|
|
4555
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
4315
4556
|
var CARD_BASE_CLASSES = {
|
|
4316
4557
|
default: "w-full bg-background border border-border-50 rounded-xl",
|
|
4317
4558
|
compact: "w-full bg-background border border-border-50 rounded-lg",
|
|
@@ -4337,7 +4578,7 @@ var CARD_CURSOR_CLASSES = {
|
|
|
4337
4578
|
default: "",
|
|
4338
4579
|
pointer: "cursor-pointer"
|
|
4339
4580
|
};
|
|
4340
|
-
var CardBase = (0,
|
|
4581
|
+
var CardBase = (0, import_react16.forwardRef)(
|
|
4341
4582
|
({
|
|
4342
4583
|
children,
|
|
4343
4584
|
variant = "default",
|
|
@@ -4353,7 +4594,7 @@ var CardBase = (0, import_react14.forwardRef)(
|
|
|
4353
4594
|
const minHeightClasses = CARD_MIN_HEIGHT_CLASSES[minHeight];
|
|
4354
4595
|
const layoutClasses = CARD_LAYOUT_CLASSES[layout];
|
|
4355
4596
|
const cursorClasses = CARD_CURSOR_CLASSES[cursor];
|
|
4356
|
-
return /* @__PURE__ */ (0,
|
|
4597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4357
4598
|
"div",
|
|
4358
4599
|
{
|
|
4359
4600
|
ref,
|
|
@@ -4395,7 +4636,7 @@ var ACTION_HEADER_CLASSES = {
|
|
|
4395
4636
|
error: "text-error-300",
|
|
4396
4637
|
info: "text-info-300"
|
|
4397
4638
|
};
|
|
4398
|
-
var CardActivitiesResults = (0,
|
|
4639
|
+
var CardActivitiesResults = (0, import_react16.forwardRef)(
|
|
4399
4640
|
({
|
|
4400
4641
|
icon,
|
|
4401
4642
|
title,
|
|
@@ -4411,7 +4652,7 @@ var CardActivitiesResults = (0, import_react14.forwardRef)(
|
|
|
4411
4652
|
const actionIconClasses = ACTION_ICON_CLASSES[action];
|
|
4412
4653
|
const actionSubTitleClasses = ACTION_SUBTITLE_CLASSES[action];
|
|
4413
4654
|
const actionHeaderClasses = ACTION_HEADER_CLASSES[action];
|
|
4414
|
-
return /* @__PURE__ */ (0,
|
|
4655
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4415
4656
|
"div",
|
|
4416
4657
|
{
|
|
4417
4658
|
ref,
|
|
@@ -4421,7 +4662,7 @@ var CardActivitiesResults = (0, import_react14.forwardRef)(
|
|
|
4421
4662
|
),
|
|
4422
4663
|
...props,
|
|
4423
4664
|
children: [
|
|
4424
|
-
/* @__PURE__ */ (0,
|
|
4665
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4425
4666
|
"div",
|
|
4426
4667
|
{
|
|
4427
4668
|
className: cn(
|
|
@@ -4430,7 +4671,7 @@ var CardActivitiesResults = (0, import_react14.forwardRef)(
|
|
|
4430
4671
|
extended ? "rounded-t-xl" : "rounded-xl"
|
|
4431
4672
|
),
|
|
4432
4673
|
children: [
|
|
4433
|
-
/* @__PURE__ */ (0,
|
|
4674
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4434
4675
|
"span",
|
|
4435
4676
|
{
|
|
4436
4677
|
className: cn(
|
|
@@ -4440,7 +4681,7 @@ var CardActivitiesResults = (0, import_react14.forwardRef)(
|
|
|
4440
4681
|
children: icon
|
|
4441
4682
|
}
|
|
4442
4683
|
),
|
|
4443
|
-
/* @__PURE__ */ (0,
|
|
4684
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4444
4685
|
Text_default,
|
|
4445
4686
|
{
|
|
4446
4687
|
size: "2xs",
|
|
@@ -4449,7 +4690,7 @@ var CardActivitiesResults = (0, import_react14.forwardRef)(
|
|
|
4449
4690
|
children: title
|
|
4450
4691
|
}
|
|
4451
4692
|
),
|
|
4452
|
-
/* @__PURE__ */ (0,
|
|
4693
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4453
4694
|
"p",
|
|
4454
4695
|
{
|
|
4455
4696
|
className: cn("text-lg font-bold truncate", actionSubTitleClasses),
|
|
@@ -4459,8 +4700,8 @@ var CardActivitiesResults = (0, import_react14.forwardRef)(
|
|
|
4459
4700
|
]
|
|
4460
4701
|
}
|
|
4461
4702
|
),
|
|
4462
|
-
extended && /* @__PURE__ */ (0,
|
|
4463
|
-
/* @__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)(
|
|
4464
4705
|
"p",
|
|
4465
4706
|
{
|
|
4466
4707
|
className: cn(
|
|
@@ -4470,14 +4711,14 @@ var CardActivitiesResults = (0, import_react14.forwardRef)(
|
|
|
4470
4711
|
children: header
|
|
4471
4712
|
}
|
|
4472
4713
|
),
|
|
4473
|
-
/* @__PURE__ */ (0,
|
|
4714
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Badge_default, { size: "large", action: "info", children: description })
|
|
4474
4715
|
] })
|
|
4475
4716
|
]
|
|
4476
4717
|
}
|
|
4477
4718
|
);
|
|
4478
4719
|
}
|
|
4479
4720
|
);
|
|
4480
|
-
var CardQuestions = (0,
|
|
4721
|
+
var CardQuestions = (0, import_react16.forwardRef)(
|
|
4481
4722
|
({
|
|
4482
4723
|
header,
|
|
4483
4724
|
state = "undone",
|
|
@@ -4489,7 +4730,7 @@ var CardQuestions = (0, import_react14.forwardRef)(
|
|
|
4489
4730
|
const isDone = state === "done";
|
|
4490
4731
|
const stateLabel = isDone ? "Realizado" : "N\xE3o Realizado";
|
|
4491
4732
|
const buttonLabel = isDone ? "Ver Quest\xE3o" : "Responder";
|
|
4492
|
-
return /* @__PURE__ */ (0,
|
|
4733
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4493
4734
|
CardBase,
|
|
4494
4735
|
{
|
|
4495
4736
|
ref,
|
|
@@ -4499,10 +4740,10 @@ var CardQuestions = (0, import_react14.forwardRef)(
|
|
|
4499
4740
|
className: cn("justify-between gap-4", className),
|
|
4500
4741
|
...props,
|
|
4501
4742
|
children: [
|
|
4502
|
-
/* @__PURE__ */ (0,
|
|
4503
|
-
/* @__PURE__ */ (0,
|
|
4504
|
-
/* @__PURE__ */ (0,
|
|
4505
|
-
/* @__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)(
|
|
4506
4747
|
Badge_default,
|
|
4507
4748
|
{
|
|
4508
4749
|
size: "medium",
|
|
@@ -4511,13 +4752,13 @@ var CardQuestions = (0, import_react14.forwardRef)(
|
|
|
4511
4752
|
children: stateLabel
|
|
4512
4753
|
}
|
|
4513
4754
|
),
|
|
4514
|
-
/* @__PURE__ */ (0,
|
|
4755
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "flex flex-row items-center gap-1 text-text-700 text-xs", children: [
|
|
4515
4756
|
isDone ? "Nota" : "Sem nota",
|
|
4516
|
-
isDone && /* @__PURE__ */ (0,
|
|
4757
|
+
isDone && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Badge_default, { size: "medium", action: "success", children: "00" })
|
|
4517
4758
|
] })
|
|
4518
4759
|
] })
|
|
4519
4760
|
] }),
|
|
4520
|
-
/* @__PURE__ */ (0,
|
|
4761
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4521
4762
|
Button_default,
|
|
4522
4763
|
{
|
|
4523
4764
|
size: "extra-small",
|
|
@@ -4531,7 +4772,7 @@ var CardQuestions = (0, import_react14.forwardRef)(
|
|
|
4531
4772
|
);
|
|
4532
4773
|
}
|
|
4533
4774
|
);
|
|
4534
|
-
var CardProgress = (0,
|
|
4775
|
+
var CardProgress = (0, import_react16.forwardRef)(
|
|
4535
4776
|
({
|
|
4536
4777
|
header,
|
|
4537
4778
|
subhead,
|
|
@@ -4548,19 +4789,19 @@ var CardProgress = (0, import_react14.forwardRef)(
|
|
|
4548
4789
|
}, ref) => {
|
|
4549
4790
|
const isHorizontal = direction === "horizontal";
|
|
4550
4791
|
const contentComponent = {
|
|
4551
|
-
horizontal: /* @__PURE__ */ (0,
|
|
4552
|
-
showDates && /* @__PURE__ */ (0,
|
|
4553
|
-
initialDate && /* @__PURE__ */ (0,
|
|
4554
|
-
/* @__PURE__ */ (0,
|
|
4555
|
-
/* @__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 })
|
|
4556
4797
|
] }),
|
|
4557
|
-
endDate && /* @__PURE__ */ (0,
|
|
4558
|
-
/* @__PURE__ */ (0,
|
|
4559
|
-
/* @__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 })
|
|
4560
4801
|
] })
|
|
4561
4802
|
] }),
|
|
4562
|
-
/* @__PURE__ */ (0,
|
|
4563
|
-
/* @__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)(
|
|
4564
4805
|
ProgressBar_default,
|
|
4565
4806
|
{
|
|
4566
4807
|
size: "small",
|
|
@@ -4569,7 +4810,7 @@ var CardProgress = (0, import_react14.forwardRef)(
|
|
|
4569
4810
|
"data-testid": "progress-bar"
|
|
4570
4811
|
}
|
|
4571
4812
|
),
|
|
4572
|
-
/* @__PURE__ */ (0,
|
|
4813
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4573
4814
|
Text_default,
|
|
4574
4815
|
{
|
|
4575
4816
|
size: "xs",
|
|
@@ -4585,9 +4826,9 @@ var CardProgress = (0, import_react14.forwardRef)(
|
|
|
4585
4826
|
)
|
|
4586
4827
|
] })
|
|
4587
4828
|
] }),
|
|
4588
|
-
vertical: /* @__PURE__ */ (0,
|
|
4829
|
+
vertical: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-sm text-text-800", children: subhead })
|
|
4589
4830
|
};
|
|
4590
|
-
return /* @__PURE__ */ (0,
|
|
4831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4591
4832
|
CardBase,
|
|
4592
4833
|
{
|
|
4593
4834
|
ref,
|
|
@@ -4598,7 +4839,7 @@ var CardProgress = (0, import_react14.forwardRef)(
|
|
|
4598
4839
|
className: cn(isHorizontal ? "h-20" : "", className),
|
|
4599
4840
|
...props,
|
|
4600
4841
|
children: [
|
|
4601
|
-
/* @__PURE__ */ (0,
|
|
4842
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4602
4843
|
"div",
|
|
4603
4844
|
{
|
|
4604
4845
|
className: cn(
|
|
@@ -4611,7 +4852,7 @@ var CardProgress = (0, import_react14.forwardRef)(
|
|
|
4611
4852
|
children: icon
|
|
4612
4853
|
}
|
|
4613
4854
|
),
|
|
4614
|
-
/* @__PURE__ */ (0,
|
|
4855
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4615
4856
|
"div",
|
|
4616
4857
|
{
|
|
4617
4858
|
className: cn(
|
|
@@ -4619,7 +4860,7 @@ var CardProgress = (0, import_react14.forwardRef)(
|
|
|
4619
4860
|
!isHorizontal && "gap-4"
|
|
4620
4861
|
),
|
|
4621
4862
|
children: [
|
|
4622
|
-
/* @__PURE__ */ (0,
|
|
4863
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text_default, { size: "sm", weight: "bold", className: "text-text-950 truncate", children: header }),
|
|
4623
4864
|
contentComponent[direction]
|
|
4624
4865
|
]
|
|
4625
4866
|
}
|
|
@@ -4629,7 +4870,7 @@ var CardProgress = (0, import_react14.forwardRef)(
|
|
|
4629
4870
|
);
|
|
4630
4871
|
}
|
|
4631
4872
|
);
|
|
4632
|
-
var CardTopic = (0,
|
|
4873
|
+
var CardTopic = (0, import_react16.forwardRef)(
|
|
4633
4874
|
({
|
|
4634
4875
|
header,
|
|
4635
4876
|
subHead,
|
|
@@ -4639,7 +4880,7 @@ var CardTopic = (0, import_react14.forwardRef)(
|
|
|
4639
4880
|
className = "",
|
|
4640
4881
|
...props
|
|
4641
4882
|
}, ref) => {
|
|
4642
|
-
return /* @__PURE__ */ (0,
|
|
4883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4643
4884
|
CardBase,
|
|
4644
4885
|
{
|
|
4645
4886
|
ref,
|
|
@@ -4650,13 +4891,13 @@ var CardTopic = (0, import_react14.forwardRef)(
|
|
|
4650
4891
|
className: cn("justify-center gap-2 py-2 px-4", className),
|
|
4651
4892
|
...props,
|
|
4652
4893
|
children: [
|
|
4653
|
-
subHead && /* @__PURE__ */ (0,
|
|
4654
|
-
/* @__PURE__ */ (0,
|
|
4655
|
-
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" })
|
|
4656
4897
|
] }, `${text} - ${index}`)) }),
|
|
4657
|
-
/* @__PURE__ */ (0,
|
|
4658
|
-
/* @__PURE__ */ (0,
|
|
4659
|
-
/* @__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)(
|
|
4660
4901
|
ProgressBar_default,
|
|
4661
4902
|
{
|
|
4662
4903
|
size: "small",
|
|
@@ -4665,7 +4906,7 @@ var CardTopic = (0, import_react14.forwardRef)(
|
|
|
4665
4906
|
"data-testid": "progress-bar"
|
|
4666
4907
|
}
|
|
4667
4908
|
),
|
|
4668
|
-
showPercentage && /* @__PURE__ */ (0,
|
|
4909
|
+
showPercentage && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4669
4910
|
Text_default,
|
|
4670
4911
|
{
|
|
4671
4912
|
size: "xs",
|
|
@@ -4685,7 +4926,7 @@ var CardTopic = (0, import_react14.forwardRef)(
|
|
|
4685
4926
|
);
|
|
4686
4927
|
}
|
|
4687
4928
|
);
|
|
4688
|
-
var CardPerformance = (0,
|
|
4929
|
+
var CardPerformance = (0, import_react16.forwardRef)(
|
|
4689
4930
|
({
|
|
4690
4931
|
header,
|
|
4691
4932
|
progress,
|
|
@@ -4699,7 +4940,7 @@ var CardPerformance = (0, import_react14.forwardRef)(
|
|
|
4699
4940
|
...props
|
|
4700
4941
|
}, ref) => {
|
|
4701
4942
|
const hasProgress = progress !== void 0;
|
|
4702
|
-
return /* @__PURE__ */ (0,
|
|
4943
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4703
4944
|
CardBase,
|
|
4704
4945
|
{
|
|
4705
4946
|
ref,
|
|
@@ -4713,10 +4954,10 @@ var CardPerformance = (0, import_react14.forwardRef)(
|
|
|
4713
4954
|
onClick: () => actionVariant == "caret" && onClickButton?.(valueButton),
|
|
4714
4955
|
...props,
|
|
4715
4956
|
children: [
|
|
4716
|
-
/* @__PURE__ */ (0,
|
|
4717
|
-
/* @__PURE__ */ (0,
|
|
4718
|
-
/* @__PURE__ */ (0,
|
|
4719
|
-
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)(
|
|
4720
4961
|
Button_default,
|
|
4721
4962
|
{
|
|
4722
4963
|
variant: "outline",
|
|
@@ -4727,17 +4968,17 @@ var CardPerformance = (0, import_react14.forwardRef)(
|
|
|
4727
4968
|
}
|
|
4728
4969
|
)
|
|
4729
4970
|
] }),
|
|
4730
|
-
/* @__PURE__ */ (0,
|
|
4971
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "w-full", children: hasProgress ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4731
4972
|
ProgressBar_default,
|
|
4732
4973
|
{
|
|
4733
4974
|
value: progress,
|
|
4734
4975
|
label: `${progress}% ${labelProgress}`,
|
|
4735
4976
|
variant: progressVariant
|
|
4736
4977
|
}
|
|
4737
|
-
) : /* @__PURE__ */ (0,
|
|
4978
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-xs text-text-600 truncate", children: description }) })
|
|
4738
4979
|
] }),
|
|
4739
|
-
actionVariant == "caret" && /* @__PURE__ */ (0,
|
|
4740
|
-
|
|
4980
|
+
actionVariant == "caret" && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4981
|
+
import_phosphor_react13.CaretRight,
|
|
4741
4982
|
{
|
|
4742
4983
|
className: "size-4.5 text-text-800 cursor-pointer",
|
|
4743
4984
|
"data-testid": "caret-icon"
|
|
@@ -4748,7 +4989,7 @@ var CardPerformance = (0, import_react14.forwardRef)(
|
|
|
4748
4989
|
);
|
|
4749
4990
|
}
|
|
4750
4991
|
);
|
|
4751
|
-
var CardResults = (0,
|
|
4992
|
+
var CardResults = (0, import_react16.forwardRef)(
|
|
4752
4993
|
({
|
|
4753
4994
|
header,
|
|
4754
4995
|
correct_answers,
|
|
@@ -4760,7 +5001,7 @@ var CardResults = (0, import_react14.forwardRef)(
|
|
|
4760
5001
|
...props
|
|
4761
5002
|
}, ref) => {
|
|
4762
5003
|
const isRow = direction == "row";
|
|
4763
|
-
return /* @__PURE__ */ (0,
|
|
5004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4764
5005
|
CardBase,
|
|
4765
5006
|
{
|
|
4766
5007
|
ref,
|
|
@@ -4770,7 +5011,7 @@ var CardResults = (0, import_react14.forwardRef)(
|
|
|
4770
5011
|
className: cn("items-stretch cursor-pointer pr-4", className),
|
|
4771
5012
|
...props,
|
|
4772
5013
|
children: [
|
|
4773
|
-
/* @__PURE__ */ (0,
|
|
5014
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4774
5015
|
"div",
|
|
4775
5016
|
{
|
|
4776
5017
|
className: cn(
|
|
@@ -4779,11 +5020,11 @@ var CardResults = (0, import_react14.forwardRef)(
|
|
|
4779
5020
|
style: {
|
|
4780
5021
|
backgroundColor: color
|
|
4781
5022
|
},
|
|
4782
|
-
children: /* @__PURE__ */ (0,
|
|
5023
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(IconRender_default, { iconName: icon, color: "currentColor", size: 20 })
|
|
4783
5024
|
}
|
|
4784
5025
|
),
|
|
4785
|
-
/* @__PURE__ */ (0,
|
|
4786
|
-
/* @__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)(
|
|
4787
5028
|
"div",
|
|
4788
5029
|
{
|
|
4789
5030
|
className: cn(
|
|
@@ -4791,28 +5032,28 @@ var CardResults = (0, import_react14.forwardRef)(
|
|
|
4791
5032
|
isRow ? "flex-row items-center gap-2" : "flex-col"
|
|
4792
5033
|
),
|
|
4793
5034
|
children: [
|
|
4794
|
-
/* @__PURE__ */ (0,
|
|
4795
|
-
/* @__PURE__ */ (0,
|
|
4796
|
-
/* @__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)(
|
|
4797
5038
|
Badge_default,
|
|
4798
5039
|
{
|
|
4799
5040
|
action: "success",
|
|
4800
5041
|
variant: "solid",
|
|
4801
5042
|
size: "large",
|
|
4802
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
5043
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_phosphor_react13.CheckCircle, {}),
|
|
4803
5044
|
children: [
|
|
4804
5045
|
correct_answers,
|
|
4805
5046
|
" Corretas"
|
|
4806
5047
|
]
|
|
4807
5048
|
}
|
|
4808
5049
|
),
|
|
4809
|
-
/* @__PURE__ */ (0,
|
|
5050
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4810
5051
|
Badge_default,
|
|
4811
5052
|
{
|
|
4812
5053
|
action: "error",
|
|
4813
5054
|
variant: "solid",
|
|
4814
5055
|
size: "large",
|
|
4815
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
5056
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_phosphor_react13.XCircle, {}),
|
|
4816
5057
|
children: [
|
|
4817
5058
|
incorrect_answers,
|
|
4818
5059
|
" Incorretas"
|
|
@@ -4823,14 +5064,14 @@ var CardResults = (0, import_react14.forwardRef)(
|
|
|
4823
5064
|
]
|
|
4824
5065
|
}
|
|
4825
5066
|
),
|
|
4826
|
-
/* @__PURE__ */ (0,
|
|
5067
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_phosphor_react13.CaretRight, { className: "min-w-6 min-h-6 text-text-800" })
|
|
4827
5068
|
] })
|
|
4828
5069
|
]
|
|
4829
5070
|
}
|
|
4830
5071
|
);
|
|
4831
5072
|
}
|
|
4832
5073
|
);
|
|
4833
|
-
var CardStatus = (0,
|
|
5074
|
+
var CardStatus = (0, import_react16.forwardRef)(
|
|
4834
5075
|
({ header, className, status, label, ...props }, ref) => {
|
|
4835
5076
|
const getLabelBadge = (status2) => {
|
|
4836
5077
|
switch (status2) {
|
|
@@ -4844,7 +5085,7 @@ var CardStatus = (0, import_react14.forwardRef)(
|
|
|
4844
5085
|
return "Em branco";
|
|
4845
5086
|
}
|
|
4846
5087
|
};
|
|
4847
|
-
return /* @__PURE__ */ (0,
|
|
5088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4848
5089
|
CardBase,
|
|
4849
5090
|
{
|
|
4850
5091
|
ref,
|
|
@@ -4853,30 +5094,30 @@ var CardStatus = (0, import_react14.forwardRef)(
|
|
|
4853
5094
|
minHeight: "medium",
|
|
4854
5095
|
className: cn("items-center cursor-pointer", className),
|
|
4855
5096
|
...props,
|
|
4856
|
-
children: /* @__PURE__ */ (0,
|
|
4857
|
-
/* @__PURE__ */ (0,
|
|
4858
|
-
/* @__PURE__ */ (0,
|
|
4859
|
-
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)(
|
|
4860
5101
|
Badge_default,
|
|
4861
5102
|
{
|
|
4862
5103
|
action: status == "correct" ? "success" : "error",
|
|
4863
5104
|
variant: "solid",
|
|
4864
5105
|
size: "medium",
|
|
4865
|
-
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, {}),
|
|
4866
5107
|
children: getLabelBadge(status)
|
|
4867
5108
|
}
|
|
4868
5109
|
),
|
|
4869
|
-
label && /* @__PURE__ */ (0,
|
|
5110
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-sm text-text-800", children: label })
|
|
4870
5111
|
] }),
|
|
4871
|
-
/* @__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" })
|
|
4872
5113
|
] })
|
|
4873
5114
|
}
|
|
4874
5115
|
);
|
|
4875
5116
|
}
|
|
4876
5117
|
);
|
|
4877
|
-
var CardSettings = (0,
|
|
5118
|
+
var CardSettings = (0, import_react16.forwardRef)(
|
|
4878
5119
|
({ header, className, icon, ...props }, ref) => {
|
|
4879
|
-
return /* @__PURE__ */ (0,
|
|
5120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4880
5121
|
CardBase,
|
|
4881
5122
|
{
|
|
4882
5123
|
ref,
|
|
@@ -4889,17 +5130,17 @@ var CardSettings = (0, import_react14.forwardRef)(
|
|
|
4889
5130
|
),
|
|
4890
5131
|
...props,
|
|
4891
5132
|
children: [
|
|
4892
|
-
/* @__PURE__ */ (0,
|
|
4893
|
-
/* @__PURE__ */ (0,
|
|
4894
|
-
/* @__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" })
|
|
4895
5136
|
]
|
|
4896
5137
|
}
|
|
4897
5138
|
);
|
|
4898
5139
|
}
|
|
4899
5140
|
);
|
|
4900
|
-
var CardSupport = (0,
|
|
5141
|
+
var CardSupport = (0, import_react16.forwardRef)(
|
|
4901
5142
|
({ header, className, direction = "col", children, ...props }, ref) => {
|
|
4902
|
-
return /* @__PURE__ */ (0,
|
|
5143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4903
5144
|
CardBase,
|
|
4904
5145
|
{
|
|
4905
5146
|
ref,
|
|
@@ -4912,7 +5153,7 @@ var CardSupport = (0, import_react14.forwardRef)(
|
|
|
4912
5153
|
),
|
|
4913
5154
|
...props,
|
|
4914
5155
|
children: [
|
|
4915
|
-
/* @__PURE__ */ (0,
|
|
5156
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4916
5157
|
"div",
|
|
4917
5158
|
{
|
|
4918
5159
|
className: cn(
|
|
@@ -4920,18 +5161,18 @@ var CardSupport = (0, import_react14.forwardRef)(
|
|
|
4920
5161
|
direction == "col" ? "flex-col" : "flex-row items-center"
|
|
4921
5162
|
),
|
|
4922
5163
|
children: [
|
|
4923
|
-
/* @__PURE__ */ (0,
|
|
4924
|
-
/* @__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 })
|
|
4925
5166
|
]
|
|
4926
5167
|
}
|
|
4927
5168
|
),
|
|
4928
|
-
/* @__PURE__ */ (0,
|
|
5169
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_phosphor_react13.CaretRight, { className: "text-text-800 cursor-pointer", size: 24 })
|
|
4929
5170
|
]
|
|
4930
5171
|
}
|
|
4931
5172
|
);
|
|
4932
5173
|
}
|
|
4933
5174
|
);
|
|
4934
|
-
var CardForum = (0,
|
|
5175
|
+
var CardForum = (0, import_react16.forwardRef)(
|
|
4935
5176
|
({
|
|
4936
5177
|
title,
|
|
4937
5178
|
content,
|
|
@@ -4945,7 +5186,7 @@ var CardForum = (0, import_react14.forwardRef)(
|
|
|
4945
5186
|
hour,
|
|
4946
5187
|
...props
|
|
4947
5188
|
}, ref) => {
|
|
4948
|
-
return /* @__PURE__ */ (0,
|
|
5189
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
4949
5190
|
CardBase,
|
|
4950
5191
|
{
|
|
4951
5192
|
ref,
|
|
@@ -4956,7 +5197,7 @@ var CardForum = (0, import_react14.forwardRef)(
|
|
|
4956
5197
|
className: cn("w-auto h-auto gap-3", className),
|
|
4957
5198
|
...props,
|
|
4958
5199
|
children: [
|
|
4959
|
-
/* @__PURE__ */ (0,
|
|
5200
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4960
5201
|
"button",
|
|
4961
5202
|
{
|
|
4962
5203
|
type: "button",
|
|
@@ -4965,18 +5206,18 @@ var CardForum = (0, import_react14.forwardRef)(
|
|
|
4965
5206
|
className: "min-w-8 h-8 rounded-full bg-background-950"
|
|
4966
5207
|
}
|
|
4967
5208
|
),
|
|
4968
|
-
/* @__PURE__ */ (0,
|
|
4969
|
-
/* @__PURE__ */ (0,
|
|
4970
|
-
/* @__PURE__ */ (0,
|
|
4971
|
-
/* @__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: [
|
|
4972
5213
|
"\u2022 ",
|
|
4973
5214
|
date,
|
|
4974
5215
|
" \u2022 ",
|
|
4975
5216
|
hour
|
|
4976
5217
|
] })
|
|
4977
5218
|
] }),
|
|
4978
|
-
/* @__PURE__ */ (0,
|
|
4979
|
-
/* @__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)(
|
|
4980
5221
|
"button",
|
|
4981
5222
|
{
|
|
4982
5223
|
type: "button",
|
|
@@ -4984,8 +5225,8 @@ var CardForum = (0, import_react14.forwardRef)(
|
|
|
4984
5225
|
onClick: () => onClickComments?.(valueComments),
|
|
4985
5226
|
className: "text-text-600 flex flex-row gap-2 items-center",
|
|
4986
5227
|
children: [
|
|
4987
|
-
/* @__PURE__ */ (0,
|
|
4988
|
-
/* @__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: [
|
|
4989
5230
|
comments,
|
|
4990
5231
|
" respostas"
|
|
4991
5232
|
] })
|
|
@@ -4998,7 +5239,7 @@ var CardForum = (0, import_react14.forwardRef)(
|
|
|
4998
5239
|
);
|
|
4999
5240
|
}
|
|
5000
5241
|
);
|
|
5001
|
-
var CardAudio = (0,
|
|
5242
|
+
var CardAudio = (0, import_react16.forwardRef)(
|
|
5002
5243
|
({
|
|
5003
5244
|
src,
|
|
5004
5245
|
title,
|
|
@@ -5012,14 +5253,14 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
5012
5253
|
className,
|
|
5013
5254
|
...props
|
|
5014
5255
|
}, ref) => {
|
|
5015
|
-
const [isPlaying, setIsPlaying] = (0,
|
|
5016
|
-
const [currentTime, setCurrentTime] = (0,
|
|
5017
|
-
const [duration, setDuration] = (0,
|
|
5018
|
-
const [volume, setVolume] = (0,
|
|
5019
|
-
const [showVolumeControl, setShowVolumeControl] = (0,
|
|
5020
|
-
const [showSpeedMenu, setShowSpeedMenu] = (0,
|
|
5021
|
-
const [playbackRate, setPlaybackRate] = (0,
|
|
5022
|
-
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);
|
|
5023
5264
|
const formatTime2 = (time) => {
|
|
5024
5265
|
const minutes = Math.floor(time / 60);
|
|
5025
5266
|
const seconds = Math.floor(time % 60);
|
|
@@ -5084,14 +5325,14 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
5084
5325
|
};
|
|
5085
5326
|
const getVolumeIcon = () => {
|
|
5086
5327
|
if (volume === 0) {
|
|
5087
|
-
return /* @__PURE__ */ (0,
|
|
5328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_phosphor_react13.SpeakerSimpleX, { size: 24 });
|
|
5088
5329
|
}
|
|
5089
5330
|
if (volume < 0.5) {
|
|
5090
|
-
return /* @__PURE__ */ (0,
|
|
5331
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_phosphor_react13.SpeakerLow, { size: 24 });
|
|
5091
5332
|
}
|
|
5092
|
-
return /* @__PURE__ */ (0,
|
|
5333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_phosphor_react13.SpeakerHigh, { size: 24 });
|
|
5093
5334
|
};
|
|
5094
|
-
return /* @__PURE__ */ (0,
|
|
5335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
5095
5336
|
CardBase,
|
|
5096
5337
|
{
|
|
5097
5338
|
ref,
|
|
@@ -5104,7 +5345,7 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
5104
5345
|
),
|
|
5105
5346
|
...props,
|
|
5106
5347
|
children: [
|
|
5107
|
-
/* @__PURE__ */ (0,
|
|
5348
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5108
5349
|
"audio",
|
|
5109
5350
|
{
|
|
5110
5351
|
ref: audioRef,
|
|
@@ -5116,7 +5357,7 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
5116
5357
|
onEnded: handleEnded,
|
|
5117
5358
|
"data-testid": "audio-element",
|
|
5118
5359
|
"aria-label": title,
|
|
5119
|
-
children: tracks ? tracks.map((track) => /* @__PURE__ */ (0,
|
|
5360
|
+
children: tracks ? tracks.map((track) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5120
5361
|
"track",
|
|
5121
5362
|
{
|
|
5122
5363
|
kind: track.kind,
|
|
@@ -5126,7 +5367,7 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
5126
5367
|
default: track.default
|
|
5127
5368
|
},
|
|
5128
5369
|
track.src
|
|
5129
|
-
)) : /* @__PURE__ */ (0,
|
|
5370
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5130
5371
|
"track",
|
|
5131
5372
|
{
|
|
5132
5373
|
kind: "captions",
|
|
@@ -5137,7 +5378,7 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
5137
5378
|
)
|
|
5138
5379
|
}
|
|
5139
5380
|
),
|
|
5140
|
-
/* @__PURE__ */ (0,
|
|
5381
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5141
5382
|
"button",
|
|
5142
5383
|
{
|
|
5143
5384
|
type: "button",
|
|
@@ -5145,14 +5386,14 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
5145
5386
|
disabled: !src,
|
|
5146
5387
|
className: "cursor-pointer text-text-950 hover:text-primary-600 disabled:text-text-400 disabled:cursor-not-allowed",
|
|
5147
5388
|
"aria-label": isPlaying ? "Pausar" : "Reproduzir",
|
|
5148
|
-
children: isPlaying ? /* @__PURE__ */ (0,
|
|
5149
|
-
/* @__PURE__ */ (0,
|
|
5150
|
-
/* @__PURE__ */ (0,
|
|
5151
|
-
] }) }) : /* @__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 })
|
|
5152
5393
|
}
|
|
5153
5394
|
),
|
|
5154
|
-
/* @__PURE__ */ (0,
|
|
5155
|
-
/* @__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)(
|
|
5156
5397
|
"button",
|
|
5157
5398
|
{
|
|
5158
5399
|
type: "button",
|
|
@@ -5167,7 +5408,7 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
5167
5408
|
}
|
|
5168
5409
|
},
|
|
5169
5410
|
"aria-label": "Barra de progresso do \xE1udio",
|
|
5170
|
-
children: /* @__PURE__ */ (0,
|
|
5411
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5171
5412
|
"div",
|
|
5172
5413
|
{
|
|
5173
5414
|
className: "h-full bg-primary-600 rounded-full transition-all duration-100",
|
|
@@ -5178,19 +5419,19 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
5178
5419
|
)
|
|
5179
5420
|
}
|
|
5180
5421
|
) }),
|
|
5181
|
-
/* @__PURE__ */ (0,
|
|
5182
|
-
/* @__PURE__ */ (0,
|
|
5183
|
-
/* @__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)(
|
|
5184
5425
|
"button",
|
|
5185
5426
|
{
|
|
5186
5427
|
type: "button",
|
|
5187
5428
|
onClick: toggleVolumeControl,
|
|
5188
5429
|
className: "cursor-pointer text-text-950 hover:text-primary-600",
|
|
5189
5430
|
"aria-label": "Controle de volume",
|
|
5190
|
-
children: /* @__PURE__ */ (0,
|
|
5431
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "w-6 h-6 flex items-center justify-center", children: getVolumeIcon() })
|
|
5191
5432
|
}
|
|
5192
5433
|
),
|
|
5193
|
-
showVolumeControl && /* @__PURE__ */ (0,
|
|
5434
|
+
showVolumeControl && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5194
5435
|
"button",
|
|
5195
5436
|
{
|
|
5196
5437
|
type: "button",
|
|
@@ -5200,7 +5441,7 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
5200
5441
|
setShowVolumeControl(false);
|
|
5201
5442
|
}
|
|
5202
5443
|
},
|
|
5203
|
-
children: /* @__PURE__ */ (0,
|
|
5444
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5204
5445
|
"input",
|
|
5205
5446
|
{
|
|
5206
5447
|
type: "range",
|
|
@@ -5241,22 +5482,22 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
5241
5482
|
}
|
|
5242
5483
|
)
|
|
5243
5484
|
] }),
|
|
5244
|
-
/* @__PURE__ */ (0,
|
|
5245
|
-
/* @__PURE__ */ (0,
|
|
5485
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "relative h-6", children: [
|
|
5486
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5246
5487
|
"button",
|
|
5247
5488
|
{
|
|
5248
5489
|
type: "button",
|
|
5249
5490
|
onClick: toggleSpeedMenu,
|
|
5250
5491
|
className: "cursor-pointer text-text-950 hover:text-primary-600",
|
|
5251
5492
|
"aria-label": "Op\xE7\xF5es de velocidade",
|
|
5252
|
-
children: /* @__PURE__ */ (0,
|
|
5493
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_phosphor_react13.DotsThreeVertical, { size: 24 })
|
|
5253
5494
|
}
|
|
5254
5495
|
),
|
|
5255
|
-
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: [
|
|
5256
5497
|
{ speed: 1, label: "1x" },
|
|
5257
5498
|
{ speed: 1.5, label: "1.5x" },
|
|
5258
5499
|
{ speed: 2, label: "2x" }
|
|
5259
|
-
].map(({ speed, label }) => /* @__PURE__ */ (0,
|
|
5500
|
+
].map(({ speed, label }) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5260
5501
|
"button",
|
|
5261
5502
|
{
|
|
5262
5503
|
type: "button",
|
|
@@ -5281,10 +5522,10 @@ var SIMULADO_BACKGROUND_CLASSES = {
|
|
|
5281
5522
|
simuladao: "bg-exam-3",
|
|
5282
5523
|
vestibular: "bg-exam-4"
|
|
5283
5524
|
};
|
|
5284
|
-
var CardSimulado = (0,
|
|
5525
|
+
var CardSimulado = (0, import_react16.forwardRef)(
|
|
5285
5526
|
({ title, duration, info, backgroundColor, className, ...props }, ref) => {
|
|
5286
5527
|
const backgroundClass = SIMULADO_BACKGROUND_CLASSES[backgroundColor];
|
|
5287
|
-
return /* @__PURE__ */ (0,
|
|
5528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5288
5529
|
CardBase,
|
|
5289
5530
|
{
|
|
5290
5531
|
ref,
|
|
@@ -5297,19 +5538,19 @@ var CardSimulado = (0, import_react14.forwardRef)(
|
|
|
5297
5538
|
className
|
|
5298
5539
|
),
|
|
5299
5540
|
...props,
|
|
5300
|
-
children: /* @__PURE__ */ (0,
|
|
5301
|
-
/* @__PURE__ */ (0,
|
|
5302
|
-
/* @__PURE__ */ (0,
|
|
5303
|
-
/* @__PURE__ */ (0,
|
|
5304
|
-
duration && /* @__PURE__ */ (0,
|
|
5305
|
-
/* @__PURE__ */ (0,
|
|
5306
|
-
/* @__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 })
|
|
5307
5548
|
] }),
|
|
5308
|
-
/* @__PURE__ */ (0,
|
|
5549
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text_default, { size: "sm", className: "truncate", children: info })
|
|
5309
5550
|
] })
|
|
5310
5551
|
] }),
|
|
5311
|
-
/* @__PURE__ */ (0,
|
|
5312
|
-
|
|
5552
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5553
|
+
import_phosphor_react13.CaretRight,
|
|
5313
5554
|
{
|
|
5314
5555
|
size: 24,
|
|
5315
5556
|
className: "text-text-800 flex-shrink-0",
|
|
@@ -5321,7 +5562,7 @@ var CardSimulado = (0, import_react14.forwardRef)(
|
|
|
5321
5562
|
);
|
|
5322
5563
|
}
|
|
5323
5564
|
);
|
|
5324
|
-
var CardTest = (0,
|
|
5565
|
+
var CardTest = (0, import_react16.forwardRef)(
|
|
5325
5566
|
({
|
|
5326
5567
|
title,
|
|
5327
5568
|
duration,
|
|
@@ -5353,7 +5594,7 @@ var CardTest = (0, import_react14.forwardRef)(
|
|
|
5353
5594
|
const interactiveClasses = isSelectable ? "cursor-pointer focus:outline-none focus:ring-2 focus:ring-primary-950 focus:ring-offset-2" : "";
|
|
5354
5595
|
const selectedClasses = selected ? "ring-2 ring-primary-950 ring-offset-2" : "";
|
|
5355
5596
|
if (isSelectable) {
|
|
5356
|
-
return /* @__PURE__ */ (0,
|
|
5597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5357
5598
|
"button",
|
|
5358
5599
|
{
|
|
5359
5600
|
ref,
|
|
@@ -5365,8 +5606,8 @@ var CardTest = (0, import_react14.forwardRef)(
|
|
|
5365
5606
|
onKeyDown: handleKeyDown,
|
|
5366
5607
|
"aria-pressed": selected,
|
|
5367
5608
|
...props,
|
|
5368
|
-
children: /* @__PURE__ */ (0,
|
|
5369
|
-
/* @__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)(
|
|
5370
5611
|
Text_default,
|
|
5371
5612
|
{
|
|
5372
5613
|
size: "md",
|
|
@@ -5375,10 +5616,10 @@ var CardTest = (0, import_react14.forwardRef)(
|
|
|
5375
5616
|
children: title
|
|
5376
5617
|
}
|
|
5377
5618
|
),
|
|
5378
|
-
/* @__PURE__ */ (0,
|
|
5379
|
-
duration && /* @__PURE__ */ (0,
|
|
5380
|
-
/* @__PURE__ */ (0,
|
|
5381
|
-
/* @__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)(
|
|
5382
5623
|
Text_default,
|
|
5383
5624
|
{
|
|
5384
5625
|
size: "sm",
|
|
@@ -5387,7 +5628,7 @@ var CardTest = (0, import_react14.forwardRef)(
|
|
|
5387
5628
|
}
|
|
5388
5629
|
)
|
|
5389
5630
|
] }),
|
|
5390
|
-
/* @__PURE__ */ (0,
|
|
5631
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5391
5632
|
Text_default,
|
|
5392
5633
|
{
|
|
5393
5634
|
size: "sm",
|
|
@@ -5400,14 +5641,14 @@ var CardTest = (0, import_react14.forwardRef)(
|
|
|
5400
5641
|
}
|
|
5401
5642
|
);
|
|
5402
5643
|
}
|
|
5403
|
-
return /* @__PURE__ */ (0,
|
|
5644
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5404
5645
|
"div",
|
|
5405
5646
|
{
|
|
5406
5647
|
ref,
|
|
5407
5648
|
className: cn(`${baseClasses} ${className}`.trim()),
|
|
5408
5649
|
...props,
|
|
5409
|
-
children: /* @__PURE__ */ (0,
|
|
5410
|
-
/* @__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)(
|
|
5411
5652
|
Text_default,
|
|
5412
5653
|
{
|
|
5413
5654
|
size: "md",
|
|
@@ -5416,10 +5657,10 @@ var CardTest = (0, import_react14.forwardRef)(
|
|
|
5416
5657
|
children: title
|
|
5417
5658
|
}
|
|
5418
5659
|
),
|
|
5419
|
-
/* @__PURE__ */ (0,
|
|
5420
|
-
duration && /* @__PURE__ */ (0,
|
|
5421
|
-
/* @__PURE__ */ (0,
|
|
5422
|
-
/* @__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)(
|
|
5423
5664
|
Text_default,
|
|
5424
5665
|
{
|
|
5425
5666
|
size: "sm",
|
|
@@ -5428,7 +5669,7 @@ var CardTest = (0, import_react14.forwardRef)(
|
|
|
5428
5669
|
}
|
|
5429
5670
|
)
|
|
5430
5671
|
] }),
|
|
5431
|
-
/* @__PURE__ */ (0,
|
|
5672
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5432
5673
|
Text_default,
|
|
5433
5674
|
{
|
|
5434
5675
|
size: "sm",
|
|
@@ -5464,15 +5705,15 @@ var SIMULATION_TYPE_STYLES = {
|
|
|
5464
5705
|
text: "Vestibular"
|
|
5465
5706
|
}
|
|
5466
5707
|
};
|
|
5467
|
-
var CardSimulationHistory = (0,
|
|
5468
|
-
return /* @__PURE__ */ (0,
|
|
5708
|
+
var CardSimulationHistory = (0, import_react16.forwardRef)(({ data, onSimulationClick, className, ...props }, ref) => {
|
|
5709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5469
5710
|
"div",
|
|
5470
5711
|
{
|
|
5471
5712
|
ref,
|
|
5472
5713
|
className: cn("w-full max-w-[992px] h-auto", className),
|
|
5473
5714
|
...props,
|
|
5474
|
-
children: /* @__PURE__ */ (0,
|
|
5475
|
-
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)(
|
|
5476
5717
|
"div",
|
|
5477
5718
|
{
|
|
5478
5719
|
className: cn(
|
|
@@ -5480,7 +5721,7 @@ var CardSimulationHistory = (0, import_react14.forwardRef)(({ data, onSimulation
|
|
|
5480
5721
|
sectionIndex === 0 ? "rounded-t-3xl" : ""
|
|
5481
5722
|
),
|
|
5482
5723
|
children: [
|
|
5483
|
-
/* @__PURE__ */ (0,
|
|
5724
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5484
5725
|
Text_default,
|
|
5485
5726
|
{
|
|
5486
5727
|
size: "xs",
|
|
@@ -5489,9 +5730,9 @@ var CardSimulationHistory = (0, import_react14.forwardRef)(({ data, onSimulation
|
|
|
5489
5730
|
children: section.date
|
|
5490
5731
|
}
|
|
5491
5732
|
),
|
|
5492
|
-
/* @__PURE__ */ (0,
|
|
5733
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex flex-col gap-2 flex-1", children: section.simulations.map((simulation) => {
|
|
5493
5734
|
const typeStyles = SIMULATION_TYPE_STYLES[simulation.type];
|
|
5494
|
-
return /* @__PURE__ */ (0,
|
|
5735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5495
5736
|
CardBase,
|
|
5496
5737
|
{
|
|
5497
5738
|
layout: "horizontal",
|
|
@@ -5503,9 +5744,9 @@ var CardSimulationHistory = (0, import_react14.forwardRef)(({ data, onSimulation
|
|
|
5503
5744
|
transition-shadow duration-200 h-auto min-h-[61px]`
|
|
5504
5745
|
),
|
|
5505
5746
|
onClick: () => onSimulationClick?.(simulation),
|
|
5506
|
-
children: /* @__PURE__ */ (0,
|
|
5507
|
-
/* @__PURE__ */ (0,
|
|
5508
|
-
/* @__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)(
|
|
5509
5750
|
Text_default,
|
|
5510
5751
|
{
|
|
5511
5752
|
size: "lg",
|
|
@@ -5514,8 +5755,8 @@ var CardSimulationHistory = (0, import_react14.forwardRef)(({ data, onSimulation
|
|
|
5514
5755
|
children: simulation.title
|
|
5515
5756
|
}
|
|
5516
5757
|
),
|
|
5517
|
-
/* @__PURE__ */ (0,
|
|
5518
|
-
/* @__PURE__ */ (0,
|
|
5758
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
5759
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5519
5760
|
Badge_default,
|
|
5520
5761
|
{
|
|
5521
5762
|
variant: "examsOutlined",
|
|
@@ -5524,11 +5765,11 @@ var CardSimulationHistory = (0, import_react14.forwardRef)(({ data, onSimulation
|
|
|
5524
5765
|
children: typeStyles.text
|
|
5525
5766
|
}
|
|
5526
5767
|
),
|
|
5527
|
-
/* @__PURE__ */ (0,
|
|
5768
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text_default, { size: "sm", className: "text-text-800 truncate", children: simulation.info })
|
|
5528
5769
|
] })
|
|
5529
5770
|
] }),
|
|
5530
|
-
/* @__PURE__ */ (0,
|
|
5531
|
-
|
|
5771
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5772
|
+
import_phosphor_react13.CaretRight,
|
|
5532
5773
|
{
|
|
5533
5774
|
size: 24,
|
|
5534
5775
|
className: "text-text-800 flex-shrink-0",
|
|
@@ -5543,16 +5784,16 @@ var CardSimulationHistory = (0, import_react14.forwardRef)(({ data, onSimulation
|
|
|
5543
5784
|
]
|
|
5544
5785
|
}
|
|
5545
5786
|
) }, section.date)),
|
|
5546
|
-
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" })
|
|
5547
5788
|
] })
|
|
5548
5789
|
}
|
|
5549
5790
|
);
|
|
5550
5791
|
});
|
|
5551
5792
|
|
|
5552
5793
|
// src/components/Accordation/Accordation.tsx
|
|
5553
|
-
var
|
|
5554
|
-
var
|
|
5555
|
-
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)(
|
|
5556
5797
|
({
|
|
5557
5798
|
trigger,
|
|
5558
5799
|
children,
|
|
@@ -5561,8 +5802,8 @@ var CardAccordation = (0, import_react15.forwardRef)(
|
|
|
5561
5802
|
onToggleExpanded,
|
|
5562
5803
|
...props
|
|
5563
5804
|
}, ref) => {
|
|
5564
|
-
const [isExpanded, setIsExpanded] = (0,
|
|
5565
|
-
const contentId = (0,
|
|
5805
|
+
const [isExpanded, setIsExpanded] = (0, import_react17.useState)(defaultExpanded);
|
|
5806
|
+
const contentId = (0, import_react17.useId)();
|
|
5566
5807
|
const handleToggle = () => {
|
|
5567
5808
|
const newExpanded = !isExpanded;
|
|
5568
5809
|
setIsExpanded(newExpanded);
|
|
@@ -5574,7 +5815,7 @@ var CardAccordation = (0, import_react15.forwardRef)(
|
|
|
5574
5815
|
handleToggle();
|
|
5575
5816
|
}
|
|
5576
5817
|
};
|
|
5577
|
-
return /* @__PURE__ */ (0,
|
|
5818
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
5578
5819
|
CardBase,
|
|
5579
5820
|
{
|
|
5580
5821
|
ref,
|
|
@@ -5584,7 +5825,7 @@ var CardAccordation = (0, import_react15.forwardRef)(
|
|
|
5584
5825
|
className: cn("overflow-hidden", className),
|
|
5585
5826
|
...props,
|
|
5586
5827
|
children: [
|
|
5587
|
-
/* @__PURE__ */ (0,
|
|
5828
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
5588
5829
|
"button",
|
|
5589
5830
|
{
|
|
5590
5831
|
onClick: handleToggle,
|
|
@@ -5594,8 +5835,8 @@ var CardAccordation = (0, import_react15.forwardRef)(
|
|
|
5594
5835
|
"aria-controls": "accordion-content",
|
|
5595
5836
|
children: [
|
|
5596
5837
|
trigger,
|
|
5597
|
-
/* @__PURE__ */ (0,
|
|
5598
|
-
|
|
5838
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5839
|
+
import_phosphor_react14.CaretRight,
|
|
5599
5840
|
{
|
|
5600
5841
|
size: 20,
|
|
5601
5842
|
className: cn(
|
|
@@ -5608,7 +5849,7 @@ var CardAccordation = (0, import_react15.forwardRef)(
|
|
|
5608
5849
|
]
|
|
5609
5850
|
}
|
|
5610
5851
|
),
|
|
5611
|
-
/* @__PURE__ */ (0,
|
|
5852
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5612
5853
|
"div",
|
|
5613
5854
|
{
|
|
5614
5855
|
id: contentId,
|
|
@@ -5617,7 +5858,7 @@ var CardAccordation = (0, import_react15.forwardRef)(
|
|
|
5617
5858
|
isExpanded ? "max-h-screen opacity-100" : "max-h-0 opacity-0"
|
|
5618
5859
|
),
|
|
5619
5860
|
"data-testid": "accordion-content",
|
|
5620
|
-
children: /* @__PURE__ */ (0,
|
|
5861
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "p-4 pt-0 border-border-50", children })
|
|
5621
5862
|
}
|
|
5622
5863
|
)
|
|
5623
5864
|
]
|
|
@@ -5627,9 +5868,9 @@ var CardAccordation = (0, import_react15.forwardRef)(
|
|
|
5627
5868
|
);
|
|
5628
5869
|
|
|
5629
5870
|
// src/components/Alternative/Alternative.tsx
|
|
5630
|
-
var
|
|
5631
|
-
var
|
|
5632
|
-
var
|
|
5871
|
+
var import_phosphor_react15 = require("phosphor-react");
|
|
5872
|
+
var import_react18 = require("react");
|
|
5873
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
5633
5874
|
var AlternativesList = ({
|
|
5634
5875
|
alternatives,
|
|
5635
5876
|
name,
|
|
@@ -5642,9 +5883,9 @@ var AlternativesList = ({
|
|
|
5642
5883
|
mode = "interactive",
|
|
5643
5884
|
selectedValue
|
|
5644
5885
|
}) => {
|
|
5645
|
-
const uniqueId = (0,
|
|
5886
|
+
const uniqueId = (0, import_react18.useId)();
|
|
5646
5887
|
const groupName = name || `alternatives-${uniqueId}`;
|
|
5647
|
-
const [actualValue, setActualValue] = (0,
|
|
5888
|
+
const [actualValue, setActualValue] = (0, import_react18.useState)(value);
|
|
5648
5889
|
const isReadonly = mode === "readonly";
|
|
5649
5890
|
const getStatusStyles2 = (status, isReadonly2) => {
|
|
5650
5891
|
const hoverClass = isReadonly2 ? "" : "hover:bg-background-50";
|
|
@@ -5660,9 +5901,9 @@ var AlternativesList = ({
|
|
|
5660
5901
|
const getStatusBadge2 = (status) => {
|
|
5661
5902
|
switch (status) {
|
|
5662
5903
|
case "correct":
|
|
5663
|
-
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" });
|
|
5664
5905
|
case "incorrect":
|
|
5665
|
-
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" });
|
|
5666
5907
|
default:
|
|
5667
5908
|
return null;
|
|
5668
5909
|
}
|
|
@@ -5692,10 +5933,10 @@ var AlternativesList = ({
|
|
|
5692
5933
|
const renderRadio = () => {
|
|
5693
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"}`;
|
|
5694
5935
|
const dotClasses = "w-3 h-3 rounded-full bg-primary-950 transition-all duration-200";
|
|
5695
|
-
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 }) });
|
|
5696
5937
|
};
|
|
5697
5938
|
if (layout === "detailed") {
|
|
5698
|
-
return /* @__PURE__ */ (0,
|
|
5939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5699
5940
|
"div",
|
|
5700
5941
|
{
|
|
5701
5942
|
className: cn(
|
|
@@ -5703,11 +5944,11 @@ var AlternativesList = ({
|
|
|
5703
5944
|
statusStyles,
|
|
5704
5945
|
alternative.disabled ? "opacity-50" : ""
|
|
5705
5946
|
),
|
|
5706
|
-
children: /* @__PURE__ */ (0,
|
|
5707
|
-
/* @__PURE__ */ (0,
|
|
5708
|
-
/* @__PURE__ */ (0,
|
|
5709
|
-
/* @__PURE__ */ (0,
|
|
5710
|
-
/* @__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)(
|
|
5711
5952
|
"p",
|
|
5712
5953
|
{
|
|
5713
5954
|
className: cn(
|
|
@@ -5717,16 +5958,16 @@ var AlternativesList = ({
|
|
|
5717
5958
|
children: alternative.label
|
|
5718
5959
|
}
|
|
5719
5960
|
),
|
|
5720
|
-
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 })
|
|
5721
5962
|
] })
|
|
5722
5963
|
] }),
|
|
5723
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
5964
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
5724
5965
|
] })
|
|
5725
5966
|
},
|
|
5726
5967
|
alternativeId
|
|
5727
5968
|
);
|
|
5728
5969
|
}
|
|
5729
|
-
return /* @__PURE__ */ (0,
|
|
5970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
5730
5971
|
"div",
|
|
5731
5972
|
{
|
|
5732
5973
|
className: cn(
|
|
@@ -5735,9 +5976,9 @@ var AlternativesList = ({
|
|
|
5735
5976
|
alternative.disabled ? "opacity-50" : ""
|
|
5736
5977
|
),
|
|
5737
5978
|
children: [
|
|
5738
|
-
/* @__PURE__ */ (0,
|
|
5979
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
5739
5980
|
renderRadio(),
|
|
5740
|
-
/* @__PURE__ */ (0,
|
|
5981
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5741
5982
|
"span",
|
|
5742
5983
|
{
|
|
5743
5984
|
className: cn(
|
|
@@ -5748,14 +5989,14 @@ var AlternativesList = ({
|
|
|
5748
5989
|
}
|
|
5749
5990
|
)
|
|
5750
5991
|
] }),
|
|
5751
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
5992
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
5752
5993
|
]
|
|
5753
5994
|
},
|
|
5754
5995
|
alternativeId
|
|
5755
5996
|
);
|
|
5756
5997
|
};
|
|
5757
5998
|
if (isReadonly) {
|
|
5758
|
-
return /* @__PURE__ */ (0,
|
|
5999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5759
6000
|
"div",
|
|
5760
6001
|
{
|
|
5761
6002
|
className: cn("flex flex-col", getLayoutClasses(), "w-full", className),
|
|
@@ -5765,7 +6006,7 @@ var AlternativesList = ({
|
|
|
5765
6006
|
}
|
|
5766
6007
|
);
|
|
5767
6008
|
}
|
|
5768
|
-
return /* @__PURE__ */ (0,
|
|
6009
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5769
6010
|
RadioGroup,
|
|
5770
6011
|
{
|
|
5771
6012
|
name: groupName,
|
|
@@ -5782,7 +6023,7 @@ var AlternativesList = ({
|
|
|
5782
6023
|
const statusStyles = getStatusStyles2(alternative.status, false);
|
|
5783
6024
|
const statusBadge = getStatusBadge2(alternative.status);
|
|
5784
6025
|
if (layout === "detailed") {
|
|
5785
|
-
return /* @__PURE__ */ (0,
|
|
6026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5786
6027
|
"div",
|
|
5787
6028
|
{
|
|
5788
6029
|
className: cn(
|
|
@@ -5790,9 +6031,9 @@ var AlternativesList = ({
|
|
|
5790
6031
|
statusStyles,
|
|
5791
6032
|
alternative.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
5792
6033
|
),
|
|
5793
|
-
children: /* @__PURE__ */ (0,
|
|
5794
|
-
/* @__PURE__ */ (0,
|
|
5795
|
-
/* @__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)(
|
|
5796
6037
|
RadioGroupItem,
|
|
5797
6038
|
{
|
|
5798
6039
|
value: alternative.value,
|
|
@@ -5801,8 +6042,8 @@ var AlternativesList = ({
|
|
|
5801
6042
|
className: "mt-1"
|
|
5802
6043
|
}
|
|
5803
6044
|
),
|
|
5804
|
-
/* @__PURE__ */ (0,
|
|
5805
|
-
/* @__PURE__ */ (0,
|
|
6045
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex-1", children: [
|
|
6046
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5806
6047
|
"label",
|
|
5807
6048
|
{
|
|
5808
6049
|
htmlFor: alternativeId,
|
|
@@ -5814,16 +6055,16 @@ var AlternativesList = ({
|
|
|
5814
6055
|
children: alternative.label
|
|
5815
6056
|
}
|
|
5816
6057
|
),
|
|
5817
|
-
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 })
|
|
5818
6059
|
] })
|
|
5819
6060
|
] }),
|
|
5820
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
6061
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
5821
6062
|
] })
|
|
5822
6063
|
},
|
|
5823
6064
|
alternativeId
|
|
5824
6065
|
);
|
|
5825
6066
|
}
|
|
5826
|
-
return /* @__PURE__ */ (0,
|
|
6067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
5827
6068
|
"div",
|
|
5828
6069
|
{
|
|
5829
6070
|
className: cn(
|
|
@@ -5832,8 +6073,8 @@ var AlternativesList = ({
|
|
|
5832
6073
|
alternative.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
5833
6074
|
),
|
|
5834
6075
|
children: [
|
|
5835
|
-
/* @__PURE__ */ (0,
|
|
5836
|
-
/* @__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)(
|
|
5837
6078
|
RadioGroupItem,
|
|
5838
6079
|
{
|
|
5839
6080
|
value: alternative.value,
|
|
@@ -5841,7 +6082,7 @@ var AlternativesList = ({
|
|
|
5841
6082
|
disabled: alternative.disabled
|
|
5842
6083
|
}
|
|
5843
6084
|
),
|
|
5844
|
-
/* @__PURE__ */ (0,
|
|
6085
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5845
6086
|
"label",
|
|
5846
6087
|
{
|
|
5847
6088
|
htmlFor: alternativeId,
|
|
@@ -5854,7 +6095,7 @@ var AlternativesList = ({
|
|
|
5854
6095
|
}
|
|
5855
6096
|
)
|
|
5856
6097
|
] }),
|
|
5857
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
6098
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
5858
6099
|
]
|
|
5859
6100
|
},
|
|
5860
6101
|
alternativeId
|
|
@@ -5863,9 +6104,9 @@ var AlternativesList = ({
|
|
|
5863
6104
|
}
|
|
5864
6105
|
);
|
|
5865
6106
|
};
|
|
5866
|
-
var HeaderAlternative = (0,
|
|
6107
|
+
var HeaderAlternative = (0, import_react18.forwardRef)(
|
|
5867
6108
|
({ className, title, subTitle, content, ...props }, ref) => {
|
|
5868
|
-
return /* @__PURE__ */ (0,
|
|
6109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
5869
6110
|
"div",
|
|
5870
6111
|
{
|
|
5871
6112
|
ref,
|
|
@@ -5875,11 +6116,11 @@ var HeaderAlternative = (0, import_react16.forwardRef)(
|
|
|
5875
6116
|
),
|
|
5876
6117
|
...props,
|
|
5877
6118
|
children: [
|
|
5878
|
-
/* @__PURE__ */ (0,
|
|
5879
|
-
/* @__PURE__ */ (0,
|
|
5880
|
-
/* @__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 })
|
|
5881
6122
|
] }),
|
|
5882
|
-
/* @__PURE__ */ (0,
|
|
6123
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-text-950 text-md", children: content })
|
|
5883
6124
|
]
|
|
5884
6125
|
}
|
|
5885
6126
|
);
|
|
@@ -5887,8 +6128,8 @@ var HeaderAlternative = (0, import_react16.forwardRef)(
|
|
|
5887
6128
|
);
|
|
5888
6129
|
|
|
5889
6130
|
// src/components/AlertDialog/AlertDialog.tsx
|
|
5890
|
-
var
|
|
5891
|
-
var
|
|
6131
|
+
var import_react19 = require("react");
|
|
6132
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
5892
6133
|
var SIZE_CLASSES11 = {
|
|
5893
6134
|
"extra-small": "w-screen max-w-[324px]",
|
|
5894
6135
|
small: "w-screen max-w-[378px]",
|
|
@@ -5896,7 +6137,7 @@ var SIZE_CLASSES11 = {
|
|
|
5896
6137
|
large: "w-screen max-w-[578px]",
|
|
5897
6138
|
"extra-large": "w-screen max-w-[912px]"
|
|
5898
6139
|
};
|
|
5899
|
-
var AlertDialog = (0,
|
|
6140
|
+
var AlertDialog = (0, import_react19.forwardRef)(
|
|
5900
6141
|
({
|
|
5901
6142
|
description,
|
|
5902
6143
|
cancelButtonLabel = "Cancelar",
|
|
@@ -5914,7 +6155,7 @@ var AlertDialog = (0, import_react17.forwardRef)(
|
|
|
5914
6155
|
size = "medium",
|
|
5915
6156
|
...props
|
|
5916
6157
|
}, ref) => {
|
|
5917
|
-
(0,
|
|
6158
|
+
(0, import_react19.useEffect)(() => {
|
|
5918
6159
|
if (!isOpen || !closeOnEscape) return;
|
|
5919
6160
|
const handleEscape = (event) => {
|
|
5920
6161
|
if (event.key === "Escape") {
|
|
@@ -5924,7 +6165,7 @@ var AlertDialog = (0, import_react17.forwardRef)(
|
|
|
5924
6165
|
document.addEventListener("keydown", handleEscape);
|
|
5925
6166
|
return () => document.removeEventListener("keydown", handleEscape);
|
|
5926
6167
|
}, [isOpen, closeOnEscape]);
|
|
5927
|
-
(0,
|
|
6168
|
+
(0, import_react19.useEffect)(() => {
|
|
5928
6169
|
if (isOpen) {
|
|
5929
6170
|
document.body.style.overflow = "hidden";
|
|
5930
6171
|
} else {
|
|
@@ -5953,14 +6194,14 @@ var AlertDialog = (0, import_react17.forwardRef)(
|
|
|
5953
6194
|
onCancel?.(cancelValue);
|
|
5954
6195
|
};
|
|
5955
6196
|
const sizeClasses = SIZE_CLASSES11[size];
|
|
5956
|
-
return /* @__PURE__ */ (0,
|
|
6197
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_jsx_runtime31.Fragment, { children: isOpen && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5957
6198
|
"div",
|
|
5958
6199
|
{
|
|
5959
6200
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",
|
|
5960
6201
|
onClick: handleBackdropClick,
|
|
5961
6202
|
onKeyDown: handleBackdropKeyDown,
|
|
5962
6203
|
"data-testid": "alert-dialog-overlay",
|
|
5963
|
-
children: /* @__PURE__ */ (0,
|
|
6204
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
5964
6205
|
"div",
|
|
5965
6206
|
{
|
|
5966
6207
|
ref,
|
|
@@ -5971,7 +6212,7 @@ var AlertDialog = (0, import_react17.forwardRef)(
|
|
|
5971
6212
|
),
|
|
5972
6213
|
...props,
|
|
5973
6214
|
children: [
|
|
5974
|
-
/* @__PURE__ */ (0,
|
|
6215
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5975
6216
|
"h2",
|
|
5976
6217
|
{
|
|
5977
6218
|
id: "alert-dialog-title",
|
|
@@ -5979,7 +6220,7 @@ var AlertDialog = (0, import_react17.forwardRef)(
|
|
|
5979
6220
|
children: title
|
|
5980
6221
|
}
|
|
5981
6222
|
),
|
|
5982
|
-
/* @__PURE__ */ (0,
|
|
6223
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5983
6224
|
"p",
|
|
5984
6225
|
{
|
|
5985
6226
|
id: "alert-dialog-description",
|
|
@@ -5987,9 +6228,9 @@ var AlertDialog = (0, import_react17.forwardRef)(
|
|
|
5987
6228
|
children: description
|
|
5988
6229
|
}
|
|
5989
6230
|
),
|
|
5990
|
-
/* @__PURE__ */ (0,
|
|
5991
|
-
/* @__PURE__ */ (0,
|
|
5992
|
-
/* @__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)(
|
|
5993
6234
|
Button_default,
|
|
5994
6235
|
{
|
|
5995
6236
|
variant: "solid",
|
|
@@ -6010,9 +6251,9 @@ var AlertDialog = (0, import_react17.forwardRef)(
|
|
|
6010
6251
|
AlertDialog.displayName = "AlertDialog";
|
|
6011
6252
|
|
|
6012
6253
|
// src/components/MultipleChoice/MultipleChoice.tsx
|
|
6013
|
-
var
|
|
6014
|
-
var
|
|
6015
|
-
var
|
|
6254
|
+
var import_react20 = require("react");
|
|
6255
|
+
var import_phosphor_react16 = require("phosphor-react");
|
|
6256
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
6016
6257
|
var MultipleChoiceList = ({
|
|
6017
6258
|
disabled = false,
|
|
6018
6259
|
className = "",
|
|
@@ -6022,16 +6263,16 @@ var MultipleChoiceList = ({
|
|
|
6022
6263
|
onHandleSelectedValues,
|
|
6023
6264
|
mode = "interactive"
|
|
6024
6265
|
}) => {
|
|
6025
|
-
const [actualValue, setActualValue] = (0,
|
|
6026
|
-
(0,
|
|
6266
|
+
const [actualValue, setActualValue] = (0, import_react20.useState)(selectedValues);
|
|
6267
|
+
(0, import_react20.useEffect)(() => {
|
|
6027
6268
|
setActualValue(selectedValues);
|
|
6028
6269
|
}, [selectedValues]);
|
|
6029
6270
|
const getStatusBadge2 = (status) => {
|
|
6030
6271
|
switch (status) {
|
|
6031
6272
|
case "correct":
|
|
6032
|
-
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" });
|
|
6033
6274
|
case "incorrect":
|
|
6034
|
-
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" });
|
|
6035
6276
|
default:
|
|
6036
6277
|
return null;
|
|
6037
6278
|
}
|
|
@@ -6052,14 +6293,14 @@ var MultipleChoiceList = ({
|
|
|
6052
6293
|
isSelected ? "border-primary-950 bg-primary-950 text-text" : "border-border-400 bg-background",
|
|
6053
6294
|
isDisabled && "opacity-40 cursor-not-allowed"
|
|
6054
6295
|
);
|
|
6055
|
-
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" }) });
|
|
6056
6297
|
};
|
|
6057
6298
|
if (mode === "readonly") {
|
|
6058
|
-
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) => {
|
|
6059
6300
|
const isSelected = actualValue?.includes(choice.value) || false;
|
|
6060
6301
|
const statusStyles = getStatusStyles2(choice.status);
|
|
6061
6302
|
const statusBadge = getStatusBadge2(choice.status);
|
|
6062
|
-
return /* @__PURE__ */ (0,
|
|
6303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
6063
6304
|
"div",
|
|
6064
6305
|
{
|
|
6065
6306
|
className: cn(
|
|
@@ -6068,9 +6309,9 @@ var MultipleChoiceList = ({
|
|
|
6068
6309
|
choice.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
6069
6310
|
),
|
|
6070
6311
|
children: [
|
|
6071
|
-
/* @__PURE__ */ (0,
|
|
6312
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
6072
6313
|
renderVisualCheckbox(isSelected, choice.disabled || disabled),
|
|
6073
|
-
/* @__PURE__ */ (0,
|
|
6314
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
6074
6315
|
"span",
|
|
6075
6316
|
{
|
|
6076
6317
|
className: cn(
|
|
@@ -6082,14 +6323,14 @@ var MultipleChoiceList = ({
|
|
|
6082
6323
|
}
|
|
6083
6324
|
)
|
|
6084
6325
|
] }),
|
|
6085
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
6326
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
6086
6327
|
]
|
|
6087
6328
|
},
|
|
6088
6329
|
`readonly-${choice.value}-${i}`
|
|
6089
6330
|
);
|
|
6090
6331
|
}) });
|
|
6091
6332
|
}
|
|
6092
|
-
return /* @__PURE__ */ (0,
|
|
6333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
6093
6334
|
"div",
|
|
6094
6335
|
{
|
|
6095
6336
|
className: cn(
|
|
@@ -6097,7 +6338,7 @@ var MultipleChoiceList = ({
|
|
|
6097
6338
|
disabled ? "opacity-50 cursor-not-allowed" : "",
|
|
6098
6339
|
className
|
|
6099
6340
|
),
|
|
6100
|
-
children: /* @__PURE__ */ (0,
|
|
6341
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
6101
6342
|
CheckboxList_default,
|
|
6102
6343
|
{
|
|
6103
6344
|
name,
|
|
@@ -6107,12 +6348,12 @@ var MultipleChoiceList = ({
|
|
|
6107
6348
|
onHandleSelectedValues?.(v);
|
|
6108
6349
|
},
|
|
6109
6350
|
disabled,
|
|
6110
|
-
children: choices.map((choice, i) => /* @__PURE__ */ (0,
|
|
6351
|
+
children: choices.map((choice, i) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
6111
6352
|
"div",
|
|
6112
6353
|
{
|
|
6113
6354
|
className: "flex flex-row gap-2 items-center",
|
|
6114
6355
|
children: [
|
|
6115
|
-
/* @__PURE__ */ (0,
|
|
6356
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
6116
6357
|
CheckboxListItem,
|
|
6117
6358
|
{
|
|
6118
6359
|
value: choice.value,
|
|
@@ -6120,7 +6361,7 @@ var MultipleChoiceList = ({
|
|
|
6120
6361
|
disabled: choice.disabled || disabled
|
|
6121
6362
|
}
|
|
6122
6363
|
),
|
|
6123
|
-
/* @__PURE__ */ (0,
|
|
6364
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
6124
6365
|
"label",
|
|
6125
6366
|
{
|
|
6126
6367
|
htmlFor: `interactive-${choice.value}-${i}`,
|
|
@@ -6143,7 +6384,7 @@ var MultipleChoiceList = ({
|
|
|
6143
6384
|
};
|
|
6144
6385
|
|
|
6145
6386
|
// src/hooks/useMobile.ts
|
|
6146
|
-
var
|
|
6387
|
+
var import_react21 = require("react");
|
|
6147
6388
|
var MOBILE_WIDTH = 500;
|
|
6148
6389
|
var TABLET_WIDTH = 931;
|
|
6149
6390
|
var DEFAULT_WIDTH = 1200;
|
|
@@ -6158,9 +6399,9 @@ var getDeviceType = () => {
|
|
|
6158
6399
|
return width < TABLET_WIDTH ? "responsive" : "desktop";
|
|
6159
6400
|
};
|
|
6160
6401
|
var useMobile = () => {
|
|
6161
|
-
const [isMobile, setIsMobile] = (0,
|
|
6162
|
-
const [isTablet, setIsTablet] = (0,
|
|
6163
|
-
(0,
|
|
6402
|
+
const [isMobile, setIsMobile] = (0, import_react21.useState)(false);
|
|
6403
|
+
const [isTablet, setIsTablet] = (0, import_react21.useState)(false);
|
|
6404
|
+
(0, import_react21.useEffect)(() => {
|
|
6164
6405
|
const checkScreenSize = () => {
|
|
6165
6406
|
const width = getWindowWidth();
|
|
6166
6407
|
setIsMobile(width < MOBILE_WIDTH);
|
|
@@ -6199,209 +6440,10 @@ var useMobile = () => {
|
|
|
6199
6440
|
};
|
|
6200
6441
|
};
|
|
6201
6442
|
|
|
6202
|
-
// src/hooks/useTheme.ts
|
|
6203
|
-
var import_react20 = require("react");
|
|
6204
|
-
var useTheme = () => {
|
|
6205
|
-
const [themeMode, setThemeMode] = (0, import_react20.useState)("system");
|
|
6206
|
-
const [isDark, setIsDark] = (0, import_react20.useState)(false);
|
|
6207
|
-
const themeModeRef = (0, import_react20.useRef)("system");
|
|
6208
|
-
const applyTheme = (0, import_react20.useCallback)((mode) => {
|
|
6209
|
-
const htmlElement = document.documentElement;
|
|
6210
|
-
const originalTheme = htmlElement.getAttribute("data-original-theme");
|
|
6211
|
-
if (mode === "dark") {
|
|
6212
|
-
htmlElement.setAttribute("data-theme", "dark");
|
|
6213
|
-
setIsDark(true);
|
|
6214
|
-
} else if (mode === "light") {
|
|
6215
|
-
if (originalTheme) {
|
|
6216
|
-
htmlElement.setAttribute("data-theme", originalTheme);
|
|
6217
|
-
}
|
|
6218
|
-
setIsDark(false);
|
|
6219
|
-
} else if (mode === "system") {
|
|
6220
|
-
const isSystemDark = window.matchMedia(
|
|
6221
|
-
"(prefers-color-scheme: dark)"
|
|
6222
|
-
).matches;
|
|
6223
|
-
if (isSystemDark) {
|
|
6224
|
-
htmlElement.setAttribute("data-theme", "dark");
|
|
6225
|
-
setIsDark(true);
|
|
6226
|
-
} else if (originalTheme) {
|
|
6227
|
-
htmlElement.setAttribute("data-theme", originalTheme);
|
|
6228
|
-
setIsDark(false);
|
|
6229
|
-
}
|
|
6230
|
-
}
|
|
6231
|
-
}, []);
|
|
6232
|
-
const toggleTheme = (0, import_react20.useCallback)(() => {
|
|
6233
|
-
let newMode;
|
|
6234
|
-
if (themeMode === "light") {
|
|
6235
|
-
newMode = "dark";
|
|
6236
|
-
} else if (themeMode === "dark") {
|
|
6237
|
-
newMode = "light";
|
|
6238
|
-
} else {
|
|
6239
|
-
newMode = "dark";
|
|
6240
|
-
}
|
|
6241
|
-
setThemeMode(newMode);
|
|
6242
|
-
themeModeRef.current = newMode;
|
|
6243
|
-
applyTheme(newMode);
|
|
6244
|
-
localStorage.setItem("theme-mode", newMode);
|
|
6245
|
-
}, [themeMode, applyTheme]);
|
|
6246
|
-
const setTheme = (0, import_react20.useCallback)(
|
|
6247
|
-
(mode) => {
|
|
6248
|
-
setThemeMode(mode);
|
|
6249
|
-
themeModeRef.current = mode;
|
|
6250
|
-
applyTheme(mode);
|
|
6251
|
-
localStorage.setItem("theme-mode", mode);
|
|
6252
|
-
},
|
|
6253
|
-
[applyTheme]
|
|
6254
|
-
);
|
|
6255
|
-
(0, import_react20.useEffect)(() => {
|
|
6256
|
-
const htmlElement = document.documentElement;
|
|
6257
|
-
const currentTheme = htmlElement.getAttribute("data-theme");
|
|
6258
|
-
if (currentTheme && !htmlElement.getAttribute("data-original-theme")) {
|
|
6259
|
-
htmlElement.setAttribute("data-original-theme", currentTheme);
|
|
6260
|
-
}
|
|
6261
|
-
const savedThemeMode = localStorage.getItem("theme-mode");
|
|
6262
|
-
const initialMode = savedThemeMode || "system";
|
|
6263
|
-
if (!savedThemeMode) {
|
|
6264
|
-
localStorage.setItem("theme-mode", "system");
|
|
6265
|
-
}
|
|
6266
|
-
setThemeMode(initialMode);
|
|
6267
|
-
themeModeRef.current = initialMode;
|
|
6268
|
-
applyTheme(initialMode);
|
|
6269
|
-
const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
|
6270
|
-
const handleSystemThemeChange = () => {
|
|
6271
|
-
if (themeModeRef.current === "system") {
|
|
6272
|
-
applyTheme("system");
|
|
6273
|
-
}
|
|
6274
|
-
};
|
|
6275
|
-
mediaQuery.addEventListener("change", handleSystemThemeChange);
|
|
6276
|
-
return () => {
|
|
6277
|
-
mediaQuery.removeEventListener("change", handleSystemThemeChange);
|
|
6278
|
-
};
|
|
6279
|
-
}, [applyTheme]);
|
|
6280
|
-
return {
|
|
6281
|
-
themeMode,
|
|
6282
|
-
isDark,
|
|
6283
|
-
toggleTheme,
|
|
6284
|
-
setTheme
|
|
6285
|
-
};
|
|
6286
|
-
};
|
|
6287
|
-
|
|
6288
|
-
// src/components/ThemeToggle/ThemeToggle.tsx
|
|
6289
|
-
var import_react21 = require("react");
|
|
6290
|
-
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
6291
|
-
var ThemeToggle = (0, import_react21.forwardRef)(
|
|
6292
|
-
({
|
|
6293
|
-
variant = "simple",
|
|
6294
|
-
size = "md",
|
|
6295
|
-
showIcons = true,
|
|
6296
|
-
showLabels = true,
|
|
6297
|
-
className,
|
|
6298
|
-
children,
|
|
6299
|
-
...props
|
|
6300
|
-
}, ref) => {
|
|
6301
|
-
const { themeMode, isDark, toggleTheme, setTheme } = useTheme();
|
|
6302
|
-
const sizeClasses = {
|
|
6303
|
-
sm: "text-sm px-3 py-1.5",
|
|
6304
|
-
md: "text-md px-4 py-2",
|
|
6305
|
-
lg: "text-lg px-5 py-2.5"
|
|
6306
|
-
};
|
|
6307
|
-
const activeClasses = "bg-primary-500 text-white";
|
|
6308
|
-
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";
|
|
6309
|
-
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";
|
|
6310
|
-
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";
|
|
6311
|
-
const renderThemeButton = (theme, icon, label, isActive, buttonSize) => {
|
|
6312
|
-
const buttonClasses = buttonSize ? cn(baseButtonClasses, sizeClasses[buttonSize]) : smallButtonClasses;
|
|
6313
|
-
const stateClasses = isActive ? activeClasses : inactiveClasses;
|
|
6314
|
-
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
6315
|
-
"button",
|
|
6316
|
-
{
|
|
6317
|
-
type: "button",
|
|
6318
|
-
onClick: () => setTheme(theme),
|
|
6319
|
-
className: cn(buttonClasses, stateClasses),
|
|
6320
|
-
...buttonSize ? props : {},
|
|
6321
|
-
children: [
|
|
6322
|
-
showIcons && icon,
|
|
6323
|
-
showLabels && label
|
|
6324
|
-
]
|
|
6325
|
-
}
|
|
6326
|
-
);
|
|
6327
|
-
};
|
|
6328
|
-
if (variant === "simple") {
|
|
6329
|
-
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
6330
|
-
"button",
|
|
6331
|
-
{
|
|
6332
|
-
type: "button",
|
|
6333
|
-
ref,
|
|
6334
|
-
onClick: toggleTheme,
|
|
6335
|
-
className: cn(
|
|
6336
|
-
"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",
|
|
6337
|
-
sizeClasses[size],
|
|
6338
|
-
className
|
|
6339
|
-
),
|
|
6340
|
-
...props,
|
|
6341
|
-
children: children || /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
|
|
6342
|
-
showIcons && (isDark ? "\u2600\uFE0F" : "\u{1F319}"),
|
|
6343
|
-
showLabels && (isDark ? "Claro" : "Escuro")
|
|
6344
|
-
] })
|
|
6345
|
-
}
|
|
6346
|
-
);
|
|
6347
|
-
}
|
|
6348
|
-
if (variant === "detailed") {
|
|
6349
|
-
const getLabel = () => {
|
|
6350
|
-
if (themeMode === "system") return "Sistema";
|
|
6351
|
-
if (isDark) return "Escuro";
|
|
6352
|
-
return "Claro";
|
|
6353
|
-
};
|
|
6354
|
-
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: cn("flex flex-col gap-2", className), children: [
|
|
6355
|
-
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: [
|
|
6356
|
-
"Tema: ",
|
|
6357
|
-
getLabel()
|
|
6358
|
-
] }),
|
|
6359
|
-
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex gap-1", children: [
|
|
6360
|
-
renderThemeButton("light", "\u2600\uFE0F ", "Claro", themeMode === "light"),
|
|
6361
|
-
renderThemeButton("dark", "\u{1F319} ", "Escuro", themeMode === "dark"),
|
|
6362
|
-
renderThemeButton(
|
|
6363
|
-
"system",
|
|
6364
|
-
"\u2699\uFE0F ",
|
|
6365
|
-
"Sistema",
|
|
6366
|
-
themeMode === "system"
|
|
6367
|
-
)
|
|
6368
|
-
] })
|
|
6369
|
-
] });
|
|
6370
|
-
}
|
|
6371
|
-
if (variant === "buttons") {
|
|
6372
|
-
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: cn("flex gap-2", className), children: [
|
|
6373
|
-
renderThemeButton(
|
|
6374
|
-
"light",
|
|
6375
|
-
"\u2600\uFE0F",
|
|
6376
|
-
"Claro",
|
|
6377
|
-
themeMode === "light",
|
|
6378
|
-
size
|
|
6379
|
-
),
|
|
6380
|
-
renderThemeButton(
|
|
6381
|
-
"dark",
|
|
6382
|
-
"\u{1F319}",
|
|
6383
|
-
"Escuro",
|
|
6384
|
-
themeMode === "dark",
|
|
6385
|
-
size
|
|
6386
|
-
),
|
|
6387
|
-
renderThemeButton(
|
|
6388
|
-
"system",
|
|
6389
|
-
"\u2699\uFE0F",
|
|
6390
|
-
"Sistema",
|
|
6391
|
-
themeMode === "system",
|
|
6392
|
-
size
|
|
6393
|
-
)
|
|
6394
|
-
] });
|
|
6395
|
-
}
|
|
6396
|
-
return null;
|
|
6397
|
-
}
|
|
6398
|
-
);
|
|
6399
|
-
ThemeToggle.displayName = "ThemeToggle";
|
|
6400
|
-
|
|
6401
6443
|
// src/components/Select/Select.tsx
|
|
6402
6444
|
var import_zustand5 = require("zustand");
|
|
6403
6445
|
var import_react22 = require("react");
|
|
6404
|
-
var
|
|
6446
|
+
var import_phosphor_react17 = require("phosphor-react");
|
|
6405
6447
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
6406
6448
|
var VARIANT_CLASSES4 = {
|
|
6407
6449
|
outlined: "border-2 rounded-lg focus:border-primary-950",
|
|
@@ -6586,7 +6628,7 @@ var Select = ({
|
|
|
6586
6628
|
(helperText || errorMessage) && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "mt-1.5 gap-1.5", children: [
|
|
6587
6629
|
helperText && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-sm text-text-500", children: helperText }),
|
|
6588
6630
|
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("p", { className: "flex gap-1 items-center text-sm text-indicator-error", children: [
|
|
6589
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
6631
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_phosphor_react17.WarningCircle, { size: 16 }),
|
|
6590
6632
|
" ",
|
|
6591
6633
|
errorMessage
|
|
6592
6634
|
] })
|
|
@@ -6642,7 +6684,7 @@ var SelectTrigger = (0, import_react22.forwardRef)(
|
|
|
6642
6684
|
children: [
|
|
6643
6685
|
props.children,
|
|
6644
6686
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
6645
|
-
|
|
6687
|
+
import_phosphor_react17.CaretDown,
|
|
6646
6688
|
{
|
|
6647
6689
|
className: cn(
|
|
6648
6690
|
"h-[1em] w-[1em] opacity-50 transition-transform",
|
|
@@ -6733,7 +6775,7 @@ var SelectItem = (0, import_react22.forwardRef)(
|
|
|
6733
6775
|
tabIndex: disabled ? -1 : 0,
|
|
6734
6776
|
...props,
|
|
6735
6777
|
children: [
|
|
6736
|
-
/* @__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: "" }) }),
|
|
6737
6779
|
children
|
|
6738
6780
|
]
|
|
6739
6781
|
}
|
|
@@ -6746,7 +6788,7 @@ var Select_default = Select;
|
|
|
6746
6788
|
// src/components/Menu/Menu.tsx
|
|
6747
6789
|
var import_zustand6 = require("zustand");
|
|
6748
6790
|
var import_react23 = require("react");
|
|
6749
|
-
var
|
|
6791
|
+
var import_phosphor_react18 = require("phosphor-react");
|
|
6750
6792
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
6751
6793
|
var createMenuStore = (onValueChange) => (0, import_zustand6.create)((set) => ({
|
|
6752
6794
|
value: "",
|
|
@@ -6945,7 +6987,7 @@ var MenuItem = (0, import_react23.forwardRef)(
|
|
|
6945
6987
|
}
|
|
6946
6988
|
),
|
|
6947
6989
|
separator && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6948
|
-
|
|
6990
|
+
import_phosphor_react18.CaretRight,
|
|
6949
6991
|
{
|
|
6950
6992
|
size: 16,
|
|
6951
6993
|
className: "text-text-600",
|
|
@@ -7012,7 +7054,7 @@ var MenuOverflow = ({
|
|
|
7012
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",
|
|
7013
7055
|
"data-testid": "scroll-left-button",
|
|
7014
7056
|
children: [
|
|
7015
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
7057
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_phosphor_react18.CaretLeft, { size: 16 }),
|
|
7016
7058
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "sr-only", children: "Scroll left" })
|
|
7017
7059
|
]
|
|
7018
7060
|
}
|
|
@@ -7035,7 +7077,7 @@ var MenuOverflow = ({
|
|
|
7035
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",
|
|
7036
7078
|
"data-testid": "scroll-right-button",
|
|
7037
7079
|
children: [
|
|
7038
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
7080
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_phosphor_react18.CaretRight, { size: 16 }),
|
|
7039
7081
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "sr-only", children: "Scroll right" })
|
|
7040
7082
|
]
|
|
7041
7083
|
}
|
|
@@ -7311,7 +7353,7 @@ var NotFound_default = NotFound;
|
|
|
7311
7353
|
// src/components/VideoPlayer/VideoPlayer.tsx
|
|
7312
7354
|
var import_react25 = require("react");
|
|
7313
7355
|
var import_react_dom = require("react-dom");
|
|
7314
|
-
var
|
|
7356
|
+
var import_phosphor_react19 = require("phosphor-react");
|
|
7315
7357
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
7316
7358
|
var CONTROLS_HIDE_TIMEOUT = 3e3;
|
|
7317
7359
|
var LEAVE_HIDE_TIMEOUT = 1e3;
|
|
@@ -7351,7 +7393,7 @@ var VolumeControls = ({
|
|
|
7351
7393
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
7352
7394
|
IconButton_default,
|
|
7353
7395
|
{
|
|
7354
|
-
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 }),
|
|
7355
7397
|
onClick: onToggleMute,
|
|
7356
7398
|
"aria-label": isMuted ? "Unmute" : "Mute",
|
|
7357
7399
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
@@ -7423,7 +7465,7 @@ var SpeedMenu = ({
|
|
|
7423
7465
|
IconButton_default,
|
|
7424
7466
|
{
|
|
7425
7467
|
ref: buttonRef,
|
|
7426
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
7468
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_phosphor_react19.DotsThreeVertical, { size: 24 }),
|
|
7427
7469
|
onClick: onToggleMenu,
|
|
7428
7470
|
"aria-label": "Playback speed",
|
|
7429
7471
|
"aria-haspopup": "menu",
|
|
@@ -7888,7 +7930,7 @@ var VideoPlayer = ({
|
|
|
7888
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)(
|
|
7889
7931
|
IconButton_default,
|
|
7890
7932
|
{
|
|
7891
|
-
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" }),
|
|
7892
7934
|
onClick: togglePlayPause,
|
|
7893
7935
|
"aria-label": "Play video",
|
|
7894
7936
|
className: "!bg-transparent !text-white !w-auto !h-auto hover:!bg-transparent hover:!text-gray-200"
|
|
@@ -7904,7 +7946,7 @@ var VideoPlayer = ({
|
|
|
7904
7946
|
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "flex justify-start", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
7905
7947
|
IconButton_default,
|
|
7906
7948
|
{
|
|
7907
|
-
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 }),
|
|
7908
7950
|
onClick: toggleFullscreen,
|
|
7909
7951
|
"aria-label": isFullscreen ? "Exit fullscreen" : "Enter fullscreen",
|
|
7910
7952
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
@@ -7934,7 +7976,7 @@ var VideoPlayer = ({
|
|
|
7934
7976
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
7935
7977
|
IconButton_default,
|
|
7936
7978
|
{
|
|
7937
|
-
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 }),
|
|
7938
7980
|
onClick: togglePlayPause,
|
|
7939
7981
|
"aria-label": isPlaying ? "Pause" : "Play",
|
|
7940
7982
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
@@ -7952,7 +7994,7 @@ var VideoPlayer = ({
|
|
|
7952
7994
|
subtitles && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
7953
7995
|
IconButton_default,
|
|
7954
7996
|
{
|
|
7955
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
7997
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_phosphor_react19.ClosedCaptioning, { size: 24 }),
|
|
7956
7998
|
onClick: toggleCaptions,
|
|
7957
7999
|
"aria-label": showCaptions ? "Hide captions" : "Show captions",
|
|
7958
8000
|
className: cn(
|
|
@@ -7990,7 +8032,7 @@ var VideoPlayer_default = VideoPlayer;
|
|
|
7990
8032
|
|
|
7991
8033
|
// src/components/Whiteboard/Whiteboard.tsx
|
|
7992
8034
|
var import_react26 = require("react");
|
|
7993
|
-
var
|
|
8035
|
+
var import_phosphor_react20 = require("phosphor-react");
|
|
7994
8036
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
7995
8037
|
var IMAGE_WIDTH = 225;
|
|
7996
8038
|
var IMAGE_HEIGHT = 90;
|
|
@@ -8088,7 +8130,7 @@ var Whiteboard = ({
|
|
|
8088
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",
|
|
8089
8131
|
"aria-label": `Download ${image.title || "imagem"}`,
|
|
8090
8132
|
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
8091
|
-
|
|
8133
|
+
import_phosphor_react20.ArrowsOut,
|
|
8092
8134
|
{
|
|
8093
8135
|
size: 24,
|
|
8094
8136
|
weight: "regular",
|
|
@@ -8453,7 +8495,7 @@ function useApiConfig(api) {
|
|
|
8453
8495
|
}
|
|
8454
8496
|
|
|
8455
8497
|
// src/components/Quiz/Quiz.tsx
|
|
8456
|
-
var
|
|
8498
|
+
var import_phosphor_react21 = require("phosphor-react");
|
|
8457
8499
|
var import_react30 = require("react");
|
|
8458
8500
|
|
|
8459
8501
|
// src/components/Quiz/useQuizStore.ts
|
|
@@ -9094,9 +9136,9 @@ var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
|
9094
9136
|
var getStatusBadge = (status) => {
|
|
9095
9137
|
switch (status) {
|
|
9096
9138
|
case "correct":
|
|
9097
|
-
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" });
|
|
9098
9140
|
case "incorrect":
|
|
9099
|
-
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" });
|
|
9100
9142
|
default:
|
|
9101
9143
|
return null;
|
|
9102
9144
|
}
|
|
@@ -9214,7 +9256,7 @@ var QuizTitle = (0, import_react30.forwardRef)(
|
|
|
9214
9256
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
9215
9257
|
IconButton_default,
|
|
9216
9258
|
{
|
|
9217
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
9259
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_phosphor_react21.CaretLeft, { size: 24 }),
|
|
9218
9260
|
size: "md",
|
|
9219
9261
|
"aria-label": "Voltar",
|
|
9220
9262
|
onClick: handleBackClick
|
|
@@ -9224,7 +9266,7 @@ var QuizTitle = (0, import_react30.forwardRef)(
|
|
|
9224
9266
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "text-text-950 font-bold text-md", children: quizTitle }),
|
|
9225
9267
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "text-text-600 text-xs", children: totalQuestions > 0 ? `${currentQuestionIndex + 1} de ${totalQuestions}` : "0 de 0" })
|
|
9226
9268
|
] }),
|
|
9227
|
-
/* @__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" }) })
|
|
9228
9270
|
]
|
|
9229
9271
|
}
|
|
9230
9272
|
),
|
|
@@ -9766,7 +9808,7 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
9766
9808
|
);
|
|
9767
9809
|
if (!mockAnswer) return null;
|
|
9768
9810
|
const action = mockAnswer.isCorrect ? "success" : "error";
|
|
9769
|
-
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, {});
|
|
9770
9812
|
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
9771
9813
|
Badge_default,
|
|
9772
9814
|
{
|
|
@@ -10044,7 +10086,7 @@ var QuizQuestionList = ({
|
|
|
10044
10086
|
Object.entries(filteredGroupedQuestions).map(
|
|
10045
10087
|
([subjectId, questions]) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("section", { className: "flex flex-col gap-2", children: [
|
|
10046
10088
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { className: "pt-6 pb-4 flex flex-row gap-2", children: [
|
|
10047
|
-
/* @__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" }) }),
|
|
10048
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" })
|
|
10049
10091
|
] }),
|
|
10050
10092
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("ul", { className: "flex flex-col gap-2", children: questions.map((question) => {
|
|
@@ -10145,7 +10187,7 @@ var QuizFooter = (0, import_react30.forwardRef)(
|
|
|
10145
10187
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10146
10188
|
IconButton_default,
|
|
10147
10189
|
{
|
|
10148
|
-
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" }),
|
|
10149
10191
|
size: "md",
|
|
10150
10192
|
onClick: () => setModalNavigateOpen(true)
|
|
10151
10193
|
}
|
|
@@ -10167,7 +10209,7 @@ var QuizFooter = (0, import_react30.forwardRef)(
|
|
|
10167
10209
|
size: "medium",
|
|
10168
10210
|
variant: "link",
|
|
10169
10211
|
action: "primary",
|
|
10170
|
-
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10212
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_phosphor_react21.CaretLeft, { size: 18 }),
|
|
10171
10213
|
onClick: () => {
|
|
10172
10214
|
goToPreviousQuestion();
|
|
10173
10215
|
},
|
|
@@ -10204,7 +10246,7 @@ var QuizFooter = (0, import_react30.forwardRef)(
|
|
|
10204
10246
|
size: "medium",
|
|
10205
10247
|
variant: "link",
|
|
10206
10248
|
action: "primary",
|
|
10207
|
-
iconRight: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10249
|
+
iconRight: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_phosphor_react21.CaretRight, { size: 18 }),
|
|
10208
10250
|
disabled: !currentAnswer && !isCurrentQuestionSkipped,
|
|
10209
10251
|
onClick: () => {
|
|
10210
10252
|
goToNextQuestion();
|
|
@@ -10434,7 +10476,7 @@ var QuizResultPerformance = (0, import_react30.forwardRef)(
|
|
|
10434
10476
|
),
|
|
10435
10477
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
10436
10478
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex items-center gap-1 mb-1", children: [
|
|
10437
|
-
/* @__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" }),
|
|
10438
10480
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-2xs font-medium text-text-800", children: formatTime2(
|
|
10439
10481
|
(getQuestionResultStatistics()?.timeSpent ?? 0) * 60
|
|
10440
10482
|
) })
|
|
@@ -10635,7 +10677,7 @@ var LoadingModal = (0, import_react31.forwardRef)(
|
|
|
10635
10677
|
var loadingModal_default = LoadingModal;
|
|
10636
10678
|
|
|
10637
10679
|
// src/components/NotificationCard/NotificationCard.tsx
|
|
10638
|
-
var
|
|
10680
|
+
var import_phosphor_react22 = require("phosphor-react");
|
|
10639
10681
|
var import_react32 = require("react");
|
|
10640
10682
|
|
|
10641
10683
|
// src/store/notificationStore.ts
|
|
@@ -10912,7 +10954,7 @@ var NotificationHeader = ({
|
|
|
10912
10954
|
variant: "solid",
|
|
10913
10955
|
action: "info",
|
|
10914
10956
|
size: "small",
|
|
10915
|
-
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" }),
|
|
10916
10958
|
className: "border-0",
|
|
10917
10959
|
children: unreadCount === 1 ? "1 n\xE3o lida" : `${unreadCount} n\xE3o lidas`
|
|
10918
10960
|
}
|
|
@@ -10966,7 +11008,7 @@ var SingleNotificationCard = ({
|
|
|
10966
11008
|
{
|
|
10967
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",
|
|
10968
11010
|
"aria-label": "Menu de a\xE7\xF5es",
|
|
10969
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11011
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_phosphor_react22.DotsThreeVertical, { size: 24 })
|
|
10970
11012
|
}
|
|
10971
11013
|
),
|
|
10972
11014
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(DropdownMenuContent, { align: "end", className: "min-w-[160px]", children: [
|
|
@@ -11114,7 +11156,7 @@ var NotificationCenter = ({
|
|
|
11114
11156
|
{
|
|
11115
11157
|
active: isModalOpen,
|
|
11116
11158
|
onClick: handleMobileClick,
|
|
11117
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11159
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_phosphor_react22.Bell, { size: 24, className: "text-primary" }),
|
|
11118
11160
|
className
|
|
11119
11161
|
}
|
|
11120
11162
|
),
|
|
@@ -11170,7 +11212,7 @@ var NotificationCenter = ({
|
|
|
11170
11212
|
active: isActive,
|
|
11171
11213
|
onClick: handleDesktopClick,
|
|
11172
11214
|
icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11173
|
-
|
|
11215
|
+
import_phosphor_react22.Bell,
|
|
11174
11216
|
{
|
|
11175
11217
|
size: 24,
|
|
11176
11218
|
className: isActive ? "text-primary-950" : "text-primary"
|
|
@@ -11430,6 +11472,7 @@ var createNotificationsHook = (apiClient) => {
|
|
|
11430
11472
|
ProfileMenuHeader,
|
|
11431
11473
|
ProfileMenuSection,
|
|
11432
11474
|
ProfileMenuTrigger,
|
|
11475
|
+
ProfileToggleTheme,
|
|
11433
11476
|
ProgressBar,
|
|
11434
11477
|
ProgressCircle,
|
|
11435
11478
|
ProtectedRoute,
|