@proef/common-ui 2.6.20 → 2.6.22
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/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/legacy/components/atoms/Acronym/Acronym.js.map +1 -1
- package/dist/esm/legacy/components/atoms/BreadCrumb/BreadCrumb.js.map +1 -1
- package/dist/esm/legacy/components/atoms/Button/variants/ActionButton.js.map +1 -1
- package/dist/esm/legacy/components/atoms/Button/variants/FilterButton.js.map +1 -1
- package/dist/esm/legacy/components/atoms/Button/variants/IconButton.js.map +1 -1
- package/dist/esm/legacy/components/atoms/Button/variants/MainButton.js.map +1 -1
- package/dist/esm/legacy/components/atoms/Button/variants/TabButton.js.map +1 -1
- package/dist/esm/legacy/components/atoms/Field/Field.js.map +1 -1
- package/dist/esm/legacy/components/atoms/IconText/IconText.js.map +1 -1
- package/dist/esm/legacy/components/atoms/Icone/Icone.js.map +1 -1
- package/dist/esm/legacy/components/atoms/Input/Input.js.map +1 -1
- package/dist/esm/legacy/components/atoms/InputData/InputData.js.map +1 -1
- package/dist/esm/legacy/components/atoms/Label/Label.js.map +1 -1
- package/dist/esm/legacy/components/atoms/MultiTagPickerTag/MultiTagPickerTag.js.map +1 -1
- package/dist/esm/legacy/components/atoms/Select/Select.js.map +1 -1
- package/dist/esm/legacy/components/atoms/Stack/Stack.js.map +1 -1
- package/dist/esm/legacy/components/atoms/Switch/CustomSwitch.js.map +1 -1
- package/dist/esm/legacy/components/charts/Charts.js.map +1 -1
- package/dist/esm/legacy/components/layout/AppLauncher/AppLauncher.js.map +1 -1
- package/dist/esm/legacy/components/layout/Error/Error.js.map +1 -1
- package/dist/esm/legacy/components/layout/Footer/Footer.js.map +1 -1
- package/dist/esm/legacy/components/layout/Header/Header.js.map +1 -1
- package/dist/esm/legacy/components/layout/Layout/Layout.js.map +1 -1
- package/dist/esm/legacy/components/layout/Sidebar/Sidebar.js.map +1 -1
- package/dist/esm/legacy/components/layout/TopBar/TopBar.js.map +1 -1
- package/dist/esm/legacy/components/layout/TopNavLayout/TopNavLayout.js.map +1 -1
- package/dist/esm/legacy/components/molecules/BarraValor/BarraValor.js.map +1 -1
- package/dist/esm/legacy/components/molecules/ColumnPicker/ColumnPicker.js.map +1 -1
- package/dist/esm/legacy/components/molecules/ConfirmModal/ConfirmModal.js.map +1 -1
- package/dist/esm/legacy/components/molecules/DataTable/DataTable.js.map +1 -1
- package/dist/esm/legacy/components/molecules/FileDropzone/FileDropzone.js.map +1 -1
- package/dist/esm/legacy/components/molecules/LanguageSwitcher/LanguageSwitcher.js.map +1 -1
- package/dist/esm/legacy/components/molecules/Modal/Modal.js.map +1 -1
- package/dist/esm/legacy/components/molecules/MultiTagPicker/MultiTagPicker.js.map +1 -1
- package/dist/esm/legacy/components/molecules/PhotoAvatar/PhotoAvatar.js.map +1 -1
- package/dist/esm/legacy/components/molecules/PhotoAvatar/identidade.js.map +1 -1
- package/dist/esm/legacy/components/molecules/PhotoAvatar/pessoas.js.map +1 -1
- package/dist/esm/legacy/components/molecules/SeletorPesquisa/SeletorPesquisa.js.map +1 -1
- package/dist/esm/legacy/components/molecules/Sidebar/Sidebar.js.map +1 -1
- package/dist/esm/legacy/components/molecules/UserAvatar/UserAvatar.js.map +1 -1
- package/dist/esm/legacy/components/organisms/GanttChart/GanttChart.js.map +1 -1
- package/dist/esm/legacy/components/organisms/Kanban/Kanban.js.map +1 -1
- package/dist/esm/legacy/components/organisms/LazyLoader/LazyLoader.js.map +1 -1
- package/dist/esm/legacy/components/organisms/MapaPontos/MapaPontos.js.map +1 -1
- package/dist/esm/legacy/components/organisms/PainelFiltros/PainelFiltros.js.map +1 -1
- package/dist/esm/legacy/components/organisms/PesquisaRapida/PesquisaRapida.js.map +1 -1
- package/dist/esm/legacy/components/organisms/Profile/Profile.js.map +1 -1
- package/dist/esm/legacy/components/organisms/RoleGuard/RoleGuard.js.map +1 -1
- package/dist/esm/legacy/components/organisms/Selector/Selector.js.map +1 -1
- package/dist/esm/legacy/components/organisms/StatusMatrix/StatusMatrix.js.map +1 -1
- package/dist/esm/legacy/components/ui/Avisos.js.map +1 -1
- package/dist/esm/legacy/components/ui/BarraAcoes.js.map +1 -1
- package/dist/esm/legacy/components/ui/CabecalhoPagina.js.map +1 -1
- package/dist/esm/legacy/components/ui/CaixaPesquisa.js.map +1 -1
- package/dist/esm/legacy/components/ui/Confirmacao.js.map +1 -1
- package/dist/esm/legacy/components/ui/Escolha.js.map +1 -1
- package/dist/esm/legacy/components/ui/FaixaAviso.js.map +1 -1
- package/dist/esm/legacy/components/ui/MenuAcoes.js.map +1 -1
- package/dist/esm/legacy/components/ui/Passos.js.map +1 -1
- package/dist/esm/legacy/components/ui/Separadores.js.map +1 -1
- package/dist/esm/legacy/components/ui/TextoAuto.js.map +1 -1
- package/dist/esm/legacy/components/ui/Ui.js.map +1 -1
- package/dist/esm/legacy/components/ui/painelFlutuante.js.map +1 -1
- package/dist/esm/legacy/constants/Colors.js.map +1 -1
- package/dist/esm/legacy/constants/FontWeight.js.map +1 -1
- package/dist/esm/legacy/contexts/apiContext.js.map +1 -1
- package/dist/esm/legacy/contexts/authContext.js.map +1 -1
- package/dist/esm/legacy/contexts/socketContext.js.map +1 -1
- package/dist/esm/legacy/hooks/useApi.js.map +1 -1
- package/dist/esm/legacy/pages/Error/ErrorPage.js.map +1 -1
- package/dist/esm/legacy/pages/Loading/Loading.js.map +1 -1
- package/dist/esm/legacy/pages/Login/LoginScreen.js.map +1 -1
- package/dist/esm/legacy/pages/NotFound/NotFound.js.map +1 -1
- package/dist/esm/legacy/styles/themes/ButtonThemes.js.map +1 -1
- package/dist/esm/legacy/styles/utils/utils.js.map +1 -1
- package/dist/esm/legacy/utils/stringUtils.js.map +1 -1
- package/dist/esm/v1/capabilities/graph-photos/cacheDeFotos.js.map +1 -1
- package/dist/esm/v1/capabilities/graph-photos/loteDeFotos.js.map +1 -1
- package/dist/esm/v1/capabilities/onepoint-rn/bridge.js +2 -1
- package/dist/esm/v1/capabilities/onepoint-rn/bridge.js.map +1 -1
- package/dist/esm/v1/capabilities/onepoint-rn/dentroDaApp.js.map +1 -1
- package/dist/esm/v1/capabilities/onepoint-rn/onepoint.js.map +1 -1
- package/dist/esm/v1/capabilities/onepoint-rn/useBarraEstadoNaApp.js +11 -0
- package/dist/esm/v1/capabilities/onepoint-rn/useBarraEstadoNaApp.js.map +1 -0
- package/dist/esm/v1/capabilities/onepoint-rn/useMenuLateralNaApp.js.map +1 -1
- package/dist/esm/v1/capabilities/onepoint-rn/useOrientacaoNaApp.js.map +1 -1
- package/dist/esm/v1/capabilities/overlay/useFloatingPanel.js.map +1 -1
- package/dist/esm/v1/capabilities/theme/useIsDark.js.map +1 -1
- package/dist/esm/v1/capabilities/theme/useTheme.js.map +1 -1
- package/dist/esm/v1/components/data/Charts/Charts.js.map +1 -1
- package/dist/esm/v1/components/data/DayTimeline/DayTimeline.js.map +1 -1
- package/dist/esm/v1/components/data/MonthCalendar/MonthCalendar.js.map +1 -1
- package/dist/esm/v1/components/data/Pagination/Pagination.js.map +1 -1
- package/dist/esm/v1/components/feedback/Toast/Toast.js.map +1 -1
- package/dist/esm/v1/components/forms/FormField/FormField.js.map +1 -1
- package/dist/esm/v1/components/forms/FormGrid/FormGrid.js.map +1 -1
- package/dist/esm/v1/components/layout/AppShell/AppShell.js +8 -5
- package/dist/esm/v1/components/layout/AppShell/AppShell.js.map +1 -1
- package/dist/esm/v1/components/layout/Page/Page.js.map +1 -1
- package/dist/esm/v1/components/layout/PageHeader/PageHeader.js.map +1 -1
- package/dist/esm/v1/components/layout/SideNav/SideNav.js +265 -225
- package/dist/esm/v1/components/layout/SideNav/SideNav.js.map +1 -1
- package/dist/esm/v1/components/layout/navTrail.js.map +1 -1
- package/dist/esm/v1/components/lists/ListFinder/ListFinder.js.map +1 -1
- package/dist/esm/v1/components/lists/ListFinder/labels.js.map +1 -1
- package/dist/esm/v1/components/overlays/ConfirmDialog/ConfirmDialog.js.map +1 -1
- package/dist/esm/v1/components/overlays/Dialog/Dialog.js.map +1 -1
- package/dist/esm/v1/components/overlays/DropdownMenu/DropdownMenu.js.map +1 -1
- package/dist/esm/v1/components/overlays/Tooltip/Tooltip.js.map +1 -1
- package/dist/esm/v1/components/overlays/Tooltip/TooltipLayer.js.map +1 -1
- package/dist/esm/v1/components/overlays/Tooltip/TooltipPanel.js.map +1 -1
- package/dist/esm/v1/components/overlays/topLayer.js.map +1 -1
- package/dist/esm/v1/components/tables/PaginatedTable/PaginatedTable.js.map +1 -1
- package/dist/esm/v1/components/tables/Table/ColumnFilter.js.map +1 -1
- package/dist/esm/v1/components/tables/Table/OverlayScrollbar.js.map +1 -1
- package/dist/esm/v1/components/tables/Table/Table.js.map +1 -1
- package/dist/esm/v1/components/tables/Table/labels.js.map +1 -1
- package/dist/esm/v1/foundations/icons/icons.js.map +1 -1
- package/dist/esm/v1/primitives/buttons/Button/Button.js.map +1 -1
- package/dist/esm/v1/primitives/buttons/SegmentedControl/SegmentedControl.js.map +1 -1
- package/dist/esm/v1/primitives/buttons/SegmentedControl/segmentedStyles.js.map +1 -1
- package/dist/esm/v1/primitives/display/Avatar/Avatar.js.map +1 -1
- package/dist/esm/v1/primitives/display/AvatarStack/AvatarStack.js.map +1 -1
- package/dist/esm/v1/primitives/display/Badge/Badge.js.map +1 -1
- package/dist/esm/v1/primitives/display/Card/Card.js.map +1 -1
- package/dist/esm/v1/primitives/display/DescriptionList/DescriptionList.js.map +1 -1
- package/dist/esm/v1/primitives/display/FilterChips/FilterChips.js.map +1 -1
- package/dist/esm/v1/primitives/display/Kpi/Kpi.js.map +1 -1
- package/dist/esm/v1/primitives/display/Notice/Notice.js.map +1 -1
- package/dist/esm/v1/primitives/display/PeopleFilter/PeopleFilter.js.map +1 -1
- package/dist/esm/v1/primitives/display/Person/Person.js.map +1 -1
- package/dist/esm/v1/primitives/display/RichText/RichText.js.map +1 -1
- package/dist/esm/v1/primitives/display/RichText/utils.js.map +1 -1
- package/dist/esm/v1/primitives/feedback/Spinner/Spinner.js.map +1 -1
- package/dist/esm/v1/primitives/forms/Checkbox/Checkbox.js.map +1 -1
- package/dist/esm/v1/primitives/forms/DateInput/DateInput.js.map +1 -1
- package/dist/esm/v1/primitives/forms/LookupInput/LookupInput.js.map +1 -1
- package/dist/esm/v1/primitives/forms/RichTextEditor/RichTextEditor.js.map +1 -1
- package/dist/esm/v1/primitives/forms/SearchInput/SearchInput.js.map +1 -1
- package/dist/esm/v1/primitives/forms/SelectInput/SelectInput.js.map +1 -1
- package/dist/esm/v1/primitives/forms/Switch/Switch.js.map +1 -1
- package/dist/esm/v1/primitives/forms/TextArea/TextArea.js.map +1 -1
- package/dist/esm/v1/primitives/forms/TextInput/TextInput.js.map +1 -1
- package/dist/esm/v1/primitives/forms/field.js.map +1 -1
- package/dist/esm/v1/primitives/lists/ListItem/ListItem.js.map +1 -1
- package/dist/esm/v1/primitives/navigation/Steps/Steps.js.map +1 -1
- package/dist/esm/v1/primitives/navigation/Tabs/Tabs.js.map +1 -1
- package/dist/style.components.css +2 -2
- package/dist/style.css +2 -2
- package/dist/style.layered.css +2 -2
- package/dist/tailwind.css +24 -24
- package/dist/theme.css +300 -300
- package/dist/tokens.css +131 -131
- package/dist/types/v1/capabilities/onepoint-rn/bridge.d.ts +3 -1
- package/dist/types/v1/capabilities/onepoint-rn/useBarraEstadoNaApp.d.ts +2 -0
- package/dist/types/v1/components/layout/SideNav/SideNav.d.ts +1 -0
- package/dist/types/v1/index.d.ts +1 -0
- package/package.json +125 -125
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { jsxs,
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import React, { useState, useEffect, useRef } from "react";
|
|
3
3
|
import { useLocation, NavLink } from "react-router-dom";
|
|
4
4
|
import { dentroDaApp } from "../../../capabilities/onepoint-rn/dentroDaApp.js";
|
|
5
5
|
import { useMenuLateralNaApp } from "../../../capabilities/onepoint-rn/useMenuLateralNaApp.js";
|
|
6
|
+
import { useBarraEstadoNaApp } from "../../../capabilities/onepoint-rn/useBarraEstadoNaApp.js";
|
|
7
|
+
import { useIsDark } from "../../../capabilities/theme/useIsDark.js";
|
|
6
8
|
import { nativo } from "../../../capabilities/onepoint-rn/bridge.js";
|
|
7
9
|
import { SunIcon, MoonIcon, MonitorIcon, CloseIcon, ChevronLeftIcon, ChevronRightIcon, PanelOpenIcon, ChevronDownIcon, GlobeIcon, LogOutIcon, ExternalLinkIcon } from "../../../foundations/icons/icons.js";
|
|
8
10
|
const SIDENAV_LABELS = {
|
|
@@ -19,6 +21,7 @@ const SIDENAV_LABELS = {
|
|
|
19
21
|
language: "Idioma",
|
|
20
22
|
logout: "Terminar sessão",
|
|
21
23
|
backToApp: "Sair",
|
|
24
|
+
leavingToApp: "A sair…",
|
|
22
25
|
deployedAt: "Último deploy"
|
|
23
26
|
};
|
|
24
27
|
const DRAWER_MAX = 1024;
|
|
@@ -58,8 +61,11 @@ function SideNav({
|
|
|
58
61
|
[menuProp, naApp, naAppPorOmissao]
|
|
59
62
|
);
|
|
60
63
|
const mostrarLogout = onLogout && !naApp;
|
|
64
|
+
const [aSair, setASair] = useState(false);
|
|
61
65
|
const voltarAOnePoint = () => {
|
|
62
|
-
|
|
66
|
+
if (aSair) return;
|
|
67
|
+
setASair(true);
|
|
68
|
+
nativo.sairDoPortal().catch(() => setASair(false));
|
|
63
69
|
};
|
|
64
70
|
const labels = { ...SIDENAV_LABELS, ...labelsProp };
|
|
65
71
|
const location = useLocation();
|
|
@@ -75,6 +81,8 @@ function SideNav({
|
|
|
75
81
|
return () => mq.removeEventListener("change", onChange);
|
|
76
82
|
}, []);
|
|
77
83
|
useMenuLateralNaApp(gaveta);
|
|
84
|
+
const escuro = useIsDark();
|
|
85
|
+
useBarraEstadoNaApp(gaveta ? open || escuro ? "claros" : "escuros" : null);
|
|
78
86
|
const expanded = open || hovered || gaveta;
|
|
79
87
|
const [animar, setAnimar] = useState(false);
|
|
80
88
|
const estadoVisto = useRef(`${open}|${expanded}`);
|
|
@@ -135,7 +143,7 @@ function SideNav({
|
|
|
135
143
|
if (!a.moveu && Math.abs(d) < 6) return;
|
|
136
144
|
a.moveu = true;
|
|
137
145
|
a.desvio = open ? Math.max(-a.tamanho, Math.min(0, d)) : Math.max(0, Math.min(a.tamanho, d));
|
|
138
|
-
setDesvio({ px: a.desvio, deitado: a.deitado });
|
|
146
|
+
setDesvio({ px: a.desvio, deitado: a.deitado, tamanho: a.tamanho });
|
|
139
147
|
};
|
|
140
148
|
const onTabUp = (e) => {
|
|
141
149
|
const a = arrasto.current;
|
|
@@ -213,249 +221,281 @@ function SideNav({
|
|
|
213
221
|
item.to
|
|
214
222
|
);
|
|
215
223
|
};
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
224
|
+
const fundo = desvio ? Math.abs((open ? desvio.tamanho : 0) + desvio.px) / Math.max(1, desvio.tamanho) : open ? 1 : 0;
|
|
225
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
226
|
+
/* @__PURE__ */ jsx(
|
|
227
|
+
"div",
|
|
228
|
+
{
|
|
229
|
+
"aria-hidden": true,
|
|
230
|
+
onClick: () => onOpenChange(false),
|
|
231
|
+
style: {
|
|
232
|
+
opacity: fundo,
|
|
233
|
+
visibility: fundo > 0 ? "visible" : "hidden",
|
|
234
|
+
pointerEvents: open && !desvio ? "auto" : "none",
|
|
235
|
+
transition: desvio ? "none" : "opacity 300ms, visibility 300ms"
|
|
236
|
+
},
|
|
237
|
+
className: "fixed inset-0 z-30 bg-slate-900/50 backdrop-blur-sm lg:hidden"
|
|
238
|
+
}
|
|
239
|
+
),
|
|
240
|
+
/* @__PURE__ */ jsxs(
|
|
241
|
+
"aside",
|
|
242
|
+
{
|
|
243
|
+
onPointerEnter: (e) => {
|
|
244
|
+
if (e.pointerType === "mouse" && !open) setHovered(true);
|
|
245
|
+
},
|
|
246
|
+
onPointerLeave: () => setHovered(false),
|
|
247
|
+
ref: asideRef,
|
|
248
|
+
style: {
|
|
249
|
+
top: "var(--app-shell-top, 0px)",
|
|
250
|
+
height: "calc(100dvh - var(--app-shell-top, 0px))",
|
|
251
|
+
paddingTop: "var(--sidenav-topo, 0px)",
|
|
252
|
+
// A espreitar (toque com a gaveta fechada): com a transição de sempre, para ir e voltar suave.
|
|
253
|
+
...espreita !== null && !open && !desvio && { translate: espreita ? "0 calc(-100% + 20px)" : "calc(-100% + 20px) 0" },
|
|
254
|
+
...desvio && {
|
|
255
|
+
translate: desvio.deitado ? `0 calc(${open ? "0%" : "-100%"} + ${desvio.px}px)` : `calc(${open ? "0%" : "-100%"} + ${desvio.px}px) 0`,
|
|
256
|
+
transition: "none"
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
className: (
|
|
260
|
+
// max-lg:overflow-visible: o separador vive fora da gaveta (a lista e o rodapé tratam do seu próprio scroll).
|
|
261
|
+
// Gaveta (max-lg) sem o risco da borda: o separador sai dessa borda e o risco cortava-o da gaveta.
|
|
262
|
+
// Deitado, o canto de baixo à esquerda é reto — é dali que o separador se pendura.
|
|
263
|
+
`fixed left-0 z-40 flex w-64 flex-col overflow-hidden max-lg:overflow-visible border-r border-white/10 max-lg:border-r-0 bg-proef-navy text-white duration-300 ${animar ? "transition-[translate,width,box-shadow]" : ""} max-lg:[@media(max-height:500px)]:right-0 max-lg:[@media(max-height:500px)]:w-auto max-lg:[@media(max-height:500px)]:h-auto! max-lg:[@media(max-height:500px)]:max-h-[85dvh] max-lg:[@media(max-height:500px)]:rounded-br-2xl max-lg:[@media(max-height:500px)]:pl-[env(safe-area-inset-left)] max-lg:[@media(max-height:500px)]:pr-[env(safe-area-inset-right)] max-lg:[@media(max-height:500px)]:translate-x-0 ${open ? "translate-x-0 max-lg:[@media(max-height:500px)]:translate-y-0 max-lg:[@media(max-height:500px)]:shadow-2xl" : "-translate-x-full max-lg:[@media(max-height:500px)]:-translate-y-full"} lg:translate-x-0 ${expanded ? "lg:w-64" : "lg:w-20"}`
|
|
264
|
+
),
|
|
265
|
+
children: [
|
|
266
|
+
/* @__PURE__ */ jsxs("div", { className: `flex h-16 max-lg:[@media(max-height:500px)]:h-14 flex-none items-center px-4 ${expanded ? "justify-between" : "justify-center"}`, children: [
|
|
267
|
+
expanded && /* @__PURE__ */ jsxs("div", { className: "flex flex-col pl-2", children: [
|
|
268
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
269
|
+
/* @__PURE__ */ jsx("span", { className: "text-3xl font-black tracking-tighter text-white", children: "proef" }),
|
|
270
|
+
/* @__PURE__ */ jsx("span", { className: "mt-3 h-2 w-2 rounded-full bg-proef-turquoise motion-safe:animate-pulse" })
|
|
271
|
+
] }),
|
|
272
|
+
appTitle && /* @__PURE__ */ jsx("span", { className: "mt-1 pl-1 text-[10px] font-black tracking-[0.3em] text-white/50 uppercase", children: appTitle })
|
|
246
273
|
] }),
|
|
247
|
-
|
|
274
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
275
|
+
avatar && /* @__PURE__ */ jsx("div", { className: "flex-none", children: avatar }),
|
|
276
|
+
open && expanded && !gaveta && /* @__PURE__ */ jsxs(
|
|
277
|
+
"button",
|
|
278
|
+
{
|
|
279
|
+
type: "button",
|
|
280
|
+
onClick: () => onOpenChange(false),
|
|
281
|
+
"aria-label": isDrawer() ? labels.closeMenu : labels.collapseMenu,
|
|
282
|
+
className: "flex cursor-pointer items-center justify-center rounded-lg border-0 bg-white/5 p-2.5 text-white/40 transition-colors hover:bg-white/10 hover:text-white focus-visible:ring-2 focus-visible:ring-proef-turquoise/50 focus-visible:outline-none max-lg:hidden lg:p-1.5",
|
|
283
|
+
children: [
|
|
284
|
+
/* @__PURE__ */ jsx(CloseIcon, { size: 18, className: "lg:hidden" }),
|
|
285
|
+
/* @__PURE__ */ jsx(ChevronLeftIcon, { size: 16, className: "hidden lg:block" })
|
|
286
|
+
]
|
|
287
|
+
}
|
|
288
|
+
),
|
|
289
|
+
!open && expanded && /* @__PURE__ */ jsx(
|
|
290
|
+
"button",
|
|
291
|
+
{
|
|
292
|
+
type: "button",
|
|
293
|
+
onClick: () => onOpenChange(true),
|
|
294
|
+
"aria-label": labels.expandMenu,
|
|
295
|
+
className: "hidden cursor-pointer items-center justify-center rounded-lg border-0 bg-white/5 p-1.5 text-white/40 transition-colors hover:bg-white/10 hover:text-white focus-visible:ring-2 focus-visible:ring-proef-turquoise/50 focus-visible:outline-none lg:flex",
|
|
296
|
+
children: /* @__PURE__ */ jsx(ChevronRightIcon, { size: 16 })
|
|
297
|
+
}
|
|
298
|
+
)
|
|
299
|
+
] })
|
|
248
300
|
] }),
|
|
249
|
-
/* @__PURE__ */ jsxs("
|
|
250
|
-
|
|
251
|
-
open && expanded && !gaveta && /* @__PURE__ */ jsxs(
|
|
252
|
-
"button",
|
|
253
|
-
{
|
|
254
|
-
type: "button",
|
|
255
|
-
onClick: () => onOpenChange(false),
|
|
256
|
-
"aria-label": isDrawer() ? labels.closeMenu : labels.collapseMenu,
|
|
257
|
-
className: "flex cursor-pointer items-center justify-center rounded-lg border-0 bg-white/5 p-2.5 text-white/40 transition-colors hover:bg-white/10 hover:text-white focus-visible:ring-2 focus-visible:ring-proef-turquoise/50 focus-visible:outline-none max-lg:hidden lg:p-1.5",
|
|
258
|
-
children: [
|
|
259
|
-
/* @__PURE__ */ jsx(CloseIcon, { size: 18, className: "lg:hidden" }),
|
|
260
|
-
/* @__PURE__ */ jsx(ChevronLeftIcon, { size: 16, className: "hidden lg:block" })
|
|
261
|
-
]
|
|
262
|
-
}
|
|
263
|
-
),
|
|
264
|
-
!open && expanded && /* @__PURE__ */ jsx(
|
|
301
|
+
/* @__PURE__ */ jsxs("nav", { className: "flex-1 overflow-x-hidden overflow-y-auto pt-2 max-lg:[@media(max-height:500px)]:flex max-lg:[@media(max-height:500px)]:min-h-0 max-lg:[@media(max-height:500px)]:items-stretch max-lg:[@media(max-height:500px)]:overflow-y-hidden max-lg:[@media(max-height:500px)]:gap-1 max-lg:[@media(max-height:500px)]:px-2 max-lg:[@media(max-height:500px)]:pt-0 max-lg:[@media(max-height:500px)]:pb-2", children: [
|
|
302
|
+
!expanded && /* @__PURE__ */ jsx(
|
|
265
303
|
"button",
|
|
266
304
|
{
|
|
267
305
|
type: "button",
|
|
268
306
|
onClick: () => onOpenChange(true),
|
|
307
|
+
"data-tip": labels.expandMenu,
|
|
269
308
|
"aria-label": labels.expandMenu,
|
|
270
|
-
className: "
|
|
271
|
-
children: /* @__PURE__ */ jsx(
|
|
309
|
+
className: "mb-1 flex w-full cursor-pointer items-center justify-center border-0 bg-transparent py-3 text-white/40 transition-colors hover:bg-white/5 hover:text-white focus-visible:ring-2 focus-visible:ring-proef-turquoise/50 focus-visible:outline-none",
|
|
310
|
+
children: /* @__PURE__ */ jsx(PanelOpenIcon, { size: 20 })
|
|
272
311
|
}
|
|
273
|
-
)
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
312
|
+
),
|
|
313
|
+
ungrouped.length > 0 && /* @__PURE__ */ jsx("div", { className: "max-lg:[@media(max-height:500px)]:min-w-40 max-lg:[@media(max-height:500px)]:flex-1 max-lg:[@media(max-height:500px)]:min-h-0 max-lg:[@media(max-height:500px)]:overflow-y-auto max-lg:[@media(max-height:500px)]:mt-[1.875rem]", children: ungrouped.map(renderItem) }),
|
|
314
|
+
groups.map((g) => {
|
|
315
|
+
const isOpen = expanded ? !collapsed[g] : g === activeGroup;
|
|
316
|
+
const name = groupLabels[g] ?? g;
|
|
317
|
+
return /* @__PURE__ */ jsxs(
|
|
318
|
+
"div",
|
|
319
|
+
{
|
|
320
|
+
className: "max-lg:[@media(max-height:500px)]:flex max-lg:[@media(max-height:500px)]:min-h-0 max-lg:[@media(max-height:500px)]:min-w-40 max-lg:[@media(max-height:500px)]:flex-1 max-lg:[@media(max-height:500px)]:flex-col",
|
|
321
|
+
children: [
|
|
322
|
+
expanded ? /* @__PURE__ */ jsxs(
|
|
323
|
+
"button",
|
|
324
|
+
{
|
|
325
|
+
type: "button",
|
|
326
|
+
onClick: () => setCollapsed((prev) => ({ ...prev, [g]: !prev[g] })),
|
|
327
|
+
"aria-expanded": isOpen,
|
|
328
|
+
"aria-label": `${isOpen ? labels.closeGroup : labels.openGroup} ${name}`,
|
|
329
|
+
className: "group/grp w-full cursor-pointer border-0 bg-transparent px-6 pt-5 pb-3 text-left focus-visible:outline-none lg:pb-1.5 max-lg:[@media(max-height:500px)]:flex-none max-lg:[@media(max-height:500px)]:px-3 max-lg:[@media(max-height:500px)]:pt-2 max-lg:[@media(max-height:500px)]:pb-1.5",
|
|
330
|
+
children: [
|
|
331
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-center justify-between", children: [
|
|
332
|
+
/* @__PURE__ */ jsx("span", { className: "text-[9px] font-black tracking-[0.25em] text-white/30 uppercase transition-colors group-hover/grp:text-white/50 group-focus-visible/grp:text-white", children: name }),
|
|
333
|
+
/* @__PURE__ */ jsx(ChevronDownIcon, { size: 10, className: `text-white/30 transition-transform group-hover/grp:text-white/50 ${isOpen ? "" : "-rotate-90"}` })
|
|
334
|
+
] }),
|
|
335
|
+
/* @__PURE__ */ jsx("span", { className: "mt-1 block h-px bg-white/10" })
|
|
336
|
+
]
|
|
337
|
+
}
|
|
338
|
+
) : isOpen && /* @__PURE__ */ jsx("div", { className: "mx-auto my-3 h-px w-8 bg-white/15" }),
|
|
339
|
+
isOpen && /* @__PURE__ */ jsx("div", { className: "max-lg:[@media(max-height:500px)]:min-h-0 max-lg:[@media(max-height:500px)]:flex-1 max-lg:[@media(max-height:500px)]:overflow-y-auto max-lg:[@media(max-height:500px)]:[scrollbar-width:thin] max-lg:[@media(max-height:500px)]:[scrollbar-color:rgba(255,255,255,0.15)_transparent]", children: menu.filter((item) => item.group === g).map(renderItem) })
|
|
340
|
+
]
|
|
341
|
+
},
|
|
342
|
+
g
|
|
343
|
+
);
|
|
344
|
+
})
|
|
345
|
+
] }),
|
|
346
|
+
/* @__PURE__ */ jsxs(
|
|
347
|
+
"div",
|
|
279
348
|
{
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
}
|
|
287
|
-
),
|
|
288
|
-
ungrouped.length > 0 && /* @__PURE__ */ jsx("div", { className: "max-lg:[@media(max-height:500px)]:min-w-40 max-lg:[@media(max-height:500px)]:flex-1 max-lg:[@media(max-height:500px)]:min-h-0 max-lg:[@media(max-height:500px)]:overflow-y-auto max-lg:[@media(max-height:500px)]:mt-[1.875rem]", children: ungrouped.map(renderItem) }),
|
|
289
|
-
groups.map((g) => {
|
|
290
|
-
const isOpen = expanded ? !collapsed[g] : g === activeGroup;
|
|
291
|
-
const name = groupLabels[g] ?? g;
|
|
292
|
-
return /* @__PURE__ */ jsxs(
|
|
293
|
-
"div",
|
|
294
|
-
{
|
|
295
|
-
className: "max-lg:[@media(max-height:500px)]:flex max-lg:[@media(max-height:500px)]:min-h-0 max-lg:[@media(max-height:500px)]:min-w-40 max-lg:[@media(max-height:500px)]:flex-1 max-lg:[@media(max-height:500px)]:flex-col",
|
|
296
|
-
children: [
|
|
297
|
-
expanded ? /* @__PURE__ */ jsxs(
|
|
349
|
+
className: `mt-auto flex flex-none flex-col border-t border-white/10 px-2 py-3 max-lg:[@media(max-height:500px)]:mt-0 max-lg:[@media(max-height:500px)]:flex-row max-lg:[@media(max-height:500px)]:items-center max-lg:[@media(max-height:500px)]:px-3 max-lg:[@media(max-height:500px)]:py-2 ${expanded ? "gap-2" : "items-center gap-3"}`,
|
|
350
|
+
children: [
|
|
351
|
+
footer && /* @__PURE__ */ jsx("div", { className: expanded ? "max-lg:[@media(max-height:500px)]:min-w-0 max-lg:[@media(max-height:500px)]:flex-1" : "flex w-full justify-center", children: footer(expanded) }),
|
|
352
|
+
onThemeChange && (expanded ? /* @__PURE__ */ jsxs("div", { children: [
|
|
353
|
+
/* @__PURE__ */ jsx("p", { className: "m-0 px-1 pb-1 text-[8px] font-black tracking-[0.25em] text-white/30 uppercase", children: labels.theme }),
|
|
354
|
+
/* @__PURE__ */ jsx("div", { role: "group", "aria-label": labels.theme, className: "grid grid-cols-3 gap-1 rounded-lg border border-white/5 bg-white/5 p-1", children: themeOptions.map(({ value, Icon, label }) => /* @__PURE__ */ jsxs(
|
|
298
355
|
"button",
|
|
299
356
|
{
|
|
300
357
|
type: "button",
|
|
301
|
-
onClick: () =>
|
|
302
|
-
"aria-
|
|
303
|
-
|
|
304
|
-
className: "group/grp w-full cursor-pointer border-0 bg-transparent px-6 pt-5 pb-3 text-left focus-visible:outline-none lg:pb-1.5 max-lg:[@media(max-height:500px)]:flex-none max-lg:[@media(max-height:500px)]:px-3 max-lg:[@media(max-height:500px)]:pt-2 max-lg:[@media(max-height:500px)]:pb-1.5",
|
|
358
|
+
onClick: () => onThemeChange(value),
|
|
359
|
+
"aria-pressed": currentTheme.value === value,
|
|
360
|
+
className: `flex cursor-pointer flex-col items-center gap-1 rounded-md border-0 py-1.5 text-[8px] font-black tracking-wider uppercase transition-colors focus-visible:ring-2 focus-visible:ring-proef-turquoise/50 focus-visible:outline-none ${currentTheme.value === value ? "bg-proef-turquoise/15 text-proef-turquoise" : "bg-transparent text-white/40 hover:bg-white/5 hover:text-white/70"}`,
|
|
305
361
|
children: [
|
|
306
|
-
/* @__PURE__ */
|
|
307
|
-
|
|
308
|
-
/* @__PURE__ */ jsx(ChevronDownIcon, { size: 10, className: `text-white/30 transition-transform group-hover/grp:text-white/50 ${isOpen ? "" : "-rotate-90"}` })
|
|
309
|
-
] }),
|
|
310
|
-
/* @__PURE__ */ jsx("span", { className: "mt-1 block h-px bg-white/10" })
|
|
362
|
+
/* @__PURE__ */ jsx(Icon, { size: 14 }),
|
|
363
|
+
label
|
|
311
364
|
]
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
]
|
|
316
|
-
},
|
|
317
|
-
g
|
|
318
|
-
);
|
|
319
|
-
})
|
|
320
|
-
] }),
|
|
321
|
-
/* @__PURE__ */ jsxs(
|
|
322
|
-
"div",
|
|
323
|
-
{
|
|
324
|
-
className: `mt-auto flex flex-none flex-col border-t border-white/10 px-2 py-3 max-lg:[@media(max-height:500px)]:mt-0 max-lg:[@media(max-height:500px)]:flex-row max-lg:[@media(max-height:500px)]:items-center max-lg:[@media(max-height:500px)]:px-3 max-lg:[@media(max-height:500px)]:py-2 ${expanded ? "gap-2" : "items-center gap-3"}`,
|
|
325
|
-
children: [
|
|
326
|
-
footer && /* @__PURE__ */ jsx("div", { className: expanded ? "max-lg:[@media(max-height:500px)]:min-w-0 max-lg:[@media(max-height:500px)]:flex-1" : "flex w-full justify-center", children: footer(expanded) }),
|
|
327
|
-
onThemeChange && (expanded ? /* @__PURE__ */ jsxs("div", { children: [
|
|
328
|
-
/* @__PURE__ */ jsx("p", { className: "m-0 px-1 pb-1 text-[8px] font-black tracking-[0.25em] text-white/30 uppercase", children: labels.theme }),
|
|
329
|
-
/* @__PURE__ */ jsx("div", { role: "group", "aria-label": labels.theme, className: "grid grid-cols-3 gap-1 rounded-lg border border-white/5 bg-white/5 p-1", children: themeOptions.map(({ value, Icon, label }) => /* @__PURE__ */ jsxs(
|
|
365
|
+
},
|
|
366
|
+
value
|
|
367
|
+
)) })
|
|
368
|
+
] }) : /* @__PURE__ */ jsx(
|
|
330
369
|
"button",
|
|
331
370
|
{
|
|
332
371
|
type: "button",
|
|
333
|
-
onClick: () => onThemeChange(value),
|
|
334
|
-
"aria-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
"aria-label": `${labels.theme}: ${currentTheme.label}`,
|
|
349
|
-
"data-tip": `${labels.theme}: ${currentTheme.label}`,
|
|
350
|
-
className: footerIconButton,
|
|
351
|
-
children: /* @__PURE__ */ jsx(currentTheme.Icon, { size: 18 })
|
|
352
|
-
}
|
|
353
|
-
)),
|
|
354
|
-
languages && languages.length > 0 && onLanguageChange && (expanded ? /* @__PURE__ */ jsx("div", { role: "group", "aria-label": labels.language, className: "flex gap-1 max-lg:[@media(max-height:500px)]:w-28 max-lg:[@media(max-height:500px)]:flex-none", children: languages.map((l) => /* @__PURE__ */ jsx(
|
|
355
|
-
"button",
|
|
356
|
-
{
|
|
357
|
-
type: "button",
|
|
358
|
-
onClick: () => onLanguageChange(l.code),
|
|
359
|
-
"aria-pressed": currentLanguage === l.code,
|
|
360
|
-
className: `flex-1 cursor-pointer rounded-md border bg-transparent py-1.5 text-[10px] font-black tracking-widest uppercase transition-colors focus-visible:ring-2 focus-visible:ring-proef-turquoise/50 focus-visible:outline-none ${currentLanguage === l.code ? "border-proef-turquoise/40 text-proef-turquoise" : "border-white/5 text-white/40 hover:border-white/20 hover:text-white"}`,
|
|
361
|
-
children: l.label
|
|
362
|
-
},
|
|
363
|
-
l.code
|
|
364
|
-
)) }) : /* @__PURE__ */ jsx(
|
|
365
|
-
"button",
|
|
366
|
-
{
|
|
367
|
-
type: "button",
|
|
368
|
-
onClick: () => {
|
|
369
|
-
const codes = languages.map((l) => l.code);
|
|
370
|
-
onLanguageChange(cycle(codes, currentLanguage ?? codes[0]));
|
|
372
|
+
onClick: () => onThemeChange(cycle(themeOptions, currentTheme).value),
|
|
373
|
+
"aria-label": `${labels.theme}: ${currentTheme.label}`,
|
|
374
|
+
"data-tip": `${labels.theme}: ${currentTheme.label}`,
|
|
375
|
+
className: footerIconButton,
|
|
376
|
+
children: /* @__PURE__ */ jsx(currentTheme.Icon, { size: 18 })
|
|
377
|
+
}
|
|
378
|
+
)),
|
|
379
|
+
languages && languages.length > 0 && onLanguageChange && (expanded ? /* @__PURE__ */ jsx("div", { role: "group", "aria-label": labels.language, className: "flex gap-1 max-lg:[@media(max-height:500px)]:w-28 max-lg:[@media(max-height:500px)]:flex-none", children: languages.map((l) => /* @__PURE__ */ jsx(
|
|
380
|
+
"button",
|
|
381
|
+
{
|
|
382
|
+
type: "button",
|
|
383
|
+
onClick: () => onLanguageChange(l.code),
|
|
384
|
+
"aria-pressed": currentLanguage === l.code,
|
|
385
|
+
className: `flex-1 cursor-pointer rounded-md border bg-transparent py-1.5 text-[10px] font-black tracking-widest uppercase transition-colors focus-visible:ring-2 focus-visible:ring-proef-turquoise/50 focus-visible:outline-none ${currentLanguage === l.code ? "border-proef-turquoise/40 text-proef-turquoise" : "border-white/5 text-white/40 hover:border-white/20 hover:text-white"}`,
|
|
386
|
+
children: l.label
|
|
371
387
|
},
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
viewBox: "0 0 22 72",
|
|
432
|
-
className: "pointer-events-none absolute -top-2 -left-0.5 h-[72px] w-[22px] fill-proef-navy max-lg:[@media(max-height:500px)]:hidden",
|
|
433
|
-
children: /* @__PURE__ */ jsx("path", { d: "M0 0H2A8 8 0 0 0 10 8H14A8 8 0 0 1 22 16V56A8 8 0 0 1 14 64H10A8 8 0 0 0 2 72H0Z" })
|
|
388
|
+
l.code
|
|
389
|
+
)) }) : /* @__PURE__ */ jsx(
|
|
390
|
+
"button",
|
|
391
|
+
{
|
|
392
|
+
type: "button",
|
|
393
|
+
onClick: () => {
|
|
394
|
+
const codes = languages.map((l) => l.code);
|
|
395
|
+
onLanguageChange(cycle(codes, currentLanguage ?? codes[0]));
|
|
396
|
+
},
|
|
397
|
+
"aria-label": `${labels.language}: ${currentLanguage?.toUpperCase() ?? ""}`,
|
|
398
|
+
"data-tip": `${labels.language}: ${currentLanguage?.toUpperCase() ?? ""}`,
|
|
399
|
+
className: footerIconButton,
|
|
400
|
+
children: /* @__PURE__ */ jsx(GlobeIcon, { size: 18 })
|
|
401
|
+
}
|
|
402
|
+
)),
|
|
403
|
+
mostrarLogout && (expanded ? /* @__PURE__ */ jsx(
|
|
404
|
+
"button",
|
|
405
|
+
{
|
|
406
|
+
type: "button",
|
|
407
|
+
onClick: onLogout,
|
|
408
|
+
className: "w-full max-lg:[@media(max-height:500px)]:w-auto max-lg:[@media(max-height:500px)]:flex-none max-lg:[@media(max-height:500px)]:px-4 max-lg:[@media(max-height:500px)]:py-2 cursor-pointer rounded-lg border border-white/5 bg-transparent py-2.5 text-center text-[10px] font-black tracking-widest text-white/40 uppercase transition-colors hover:border-proef-turquoise/30 hover:text-proef-turquoise focus-visible:ring-2 focus-visible:ring-proef-turquoise/50 focus-visible:outline-none",
|
|
409
|
+
children: labels.logout
|
|
410
|
+
}
|
|
411
|
+
) : /* @__PURE__ */ jsx("button", { type: "button", onClick: onLogout, "aria-label": labels.logout, "data-tip": labels.logout, className: footerIconButton, children: /* @__PURE__ */ jsx(LogOutIcon, { size: 18 }) })),
|
|
412
|
+
naApp && (expanded ? /* @__PURE__ */ jsx(
|
|
413
|
+
"button",
|
|
414
|
+
{
|
|
415
|
+
type: "button",
|
|
416
|
+
onClick: voltarAOnePoint,
|
|
417
|
+
disabled: aSair,
|
|
418
|
+
"aria-busy": aSair,
|
|
419
|
+
className: `w-full max-lg:[@media(max-height:500px)]:w-auto max-lg:[@media(max-height:500px)]:flex-none max-lg:[@media(max-height:500px)]:px-4 max-lg:[@media(max-height:500px)]:py-2 cursor-pointer rounded-lg border py-2.5 text-center text-[10px] font-black tracking-widest uppercase transition-[color,background-color,border-color,transform] duration-150 hover:border-proef-turquoise/30 hover:text-proef-turquoise active:scale-[0.97] active:border-proef-turquoise/50 active:bg-proef-turquoise/10 active:text-proef-turquoise focus-visible:ring-2 focus-visible:ring-proef-turquoise/50 focus-visible:outline-none disabled:cursor-default ${aSair ? "animate-pulse border-proef-turquoise/50 bg-proef-turquoise/10 text-proef-turquoise" : "border-white/5 bg-transparent text-white/40"}`,
|
|
420
|
+
children: aSair ? labels.leavingToApp : labels.backToApp
|
|
421
|
+
}
|
|
422
|
+
) : /* @__PURE__ */ jsx(
|
|
423
|
+
"button",
|
|
424
|
+
{
|
|
425
|
+
type: "button",
|
|
426
|
+
onClick: voltarAOnePoint,
|
|
427
|
+
disabled: aSair,
|
|
428
|
+
"aria-busy": aSair,
|
|
429
|
+
"aria-label": aSair ? labels.leavingToApp : labels.backToApp,
|
|
430
|
+
"data-tip": aSair ? labels.leavingToApp : labels.backToApp,
|
|
431
|
+
className: `${footerIconButton} active:scale-[0.94] ${aSair ? "animate-pulse text-proef-turquoise" : ""}`,
|
|
432
|
+
children: /* @__PURE__ */ jsx(ChevronLeftIcon, { size: 18 })
|
|
433
|
+
}
|
|
434
|
+
)),
|
|
435
|
+
deployedAt != null && expanded && /* @__PURE__ */ jsx("p", { "data-tip": labels.deployedAt, className: "m-0 text-center text-[9px] tracking-wider text-white/25 tabular-nums select-text max-lg:[@media(max-height:500px)]:flex-none max-lg:[@media(max-height:500px)]:whitespace-nowrap", children: formatDeploy(deployedAt) })
|
|
436
|
+
]
|
|
437
|
+
}
|
|
438
|
+
),
|
|
439
|
+
gaveta && /* @__PURE__ */ jsxs(
|
|
440
|
+
"button",
|
|
441
|
+
{
|
|
442
|
+
type: "button",
|
|
443
|
+
onClick: (e) => {
|
|
444
|
+
if (ignorarClique.current) {
|
|
445
|
+
ignorarClique.current = false;
|
|
446
|
+
return;
|
|
434
447
|
}
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
"aria-hidden": true,
|
|
440
|
-
viewBox: "0 0 56 22",
|
|
441
|
-
className: "pointer-events-none absolute -top-0.5 -left-2 hidden h-[22px] w-14 fill-proef-navy max-lg:[@media(max-height:500px)]:block",
|
|
442
|
-
children: /* @__PURE__ */ jsx("path", { d: "M0 0H56V2A8 8 0 0 0 48 10V14A8 8 0 0 1 40 22H16A8 8 0 0 1 8 14V10A8 8 0 0 0 0 2Z" })
|
|
448
|
+
if (!open && e.detail !== 0) {
|
|
449
|
+
setAnimar(true);
|
|
450
|
+
setEspreita(isTopDrawer());
|
|
451
|
+
return;
|
|
443
452
|
}
|
|
453
|
+
onOpenChange(!open);
|
|
454
|
+
},
|
|
455
|
+
onPointerDown: onTabDown,
|
|
456
|
+
onPointerMove: onTabMove,
|
|
457
|
+
onPointerUp: onTabUp,
|
|
458
|
+
onPointerCancel: onTabCancel,
|
|
459
|
+
"aria-expanded": open,
|
|
460
|
+
"aria-label": open ? labels.closeMenu : labels.openMenu,
|
|
461
|
+
className: (
|
|
462
|
+
// touch-none: o arrasto é nosso — sem ele o browser rolava a página com o mesmo dedo.
|
|
463
|
+
`group/tab absolute top-[calc(0.75rem+var(--sidenav-topo,0px))] left-full flex h-14 w-5 touch-none select-none items-center justify-center gap-[3px] border-0 bg-transparent p-0 outline-none [-webkit-tap-highlight-color:transparent] lg:hidden ${desvio ? "cursor-grabbing" : "cursor-grab"} after:absolute after:-top-1 after:-bottom-1 after:left-0 after:-right-5 after:content-[''] max-lg:[@media(max-height:500px)]:top-full max-lg:[@media(max-height:500px)]:left-[calc(env(safe-area-inset-left,0px)+0.5rem)] max-lg:[@media(max-height:500px)]:h-5 max-lg:[@media(max-height:500px)]:w-10 max-lg:[@media(max-height:500px)]:flex-col max-lg:[@media(max-height:500px)]:after:right-0 max-lg:[@media(max-height:500px)]:after:-bottom-5`
|
|
444
464
|
),
|
|
445
|
-
[
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
465
|
+
children: [
|
|
466
|
+
/* @__PURE__ */ jsx(
|
|
467
|
+
"svg",
|
|
468
|
+
{
|
|
469
|
+
"aria-hidden": true,
|
|
470
|
+
viewBox: "0 0 22 72",
|
|
471
|
+
className: "pointer-events-none absolute -top-2 -left-0.5 h-[72px] w-[22px] fill-proef-navy max-lg:[@media(max-height:500px)]:hidden",
|
|
472
|
+
children: /* @__PURE__ */ jsx("path", { d: "M0 0H2A8 8 0 0 0 10 8H14A8 8 0 0 1 22 16V56A8 8 0 0 1 14 64H10A8 8 0 0 0 2 72H0Z" })
|
|
473
|
+
}
|
|
474
|
+
),
|
|
475
|
+
/* @__PURE__ */ jsx(
|
|
476
|
+
"svg",
|
|
477
|
+
{
|
|
478
|
+
"aria-hidden": true,
|
|
479
|
+
viewBox: "0 0 56 22",
|
|
480
|
+
className: "pointer-events-none absolute -top-0.5 -left-2 hidden h-[22px] w-14 fill-proef-navy max-lg:[@media(max-height:500px)]:block",
|
|
481
|
+
children: /* @__PURE__ */ jsx("path", { d: "M0 0H56V2A8 8 0 0 0 48 10V14A8 8 0 0 1 40 22H16A8 8 0 0 1 8 14V10A8 8 0 0 0 0 2Z" })
|
|
482
|
+
}
|
|
483
|
+
),
|
|
484
|
+
[0, 1].map((i) => /* @__PURE__ */ jsx(
|
|
485
|
+
"span",
|
|
486
|
+
{
|
|
487
|
+
"aria-hidden": true,
|
|
488
|
+
className: `pointer-events-none relative h-3.5 w-0.5 rounded-full transition-colors duration-150 max-lg:[@media(max-height:500px)]:h-0.5 max-lg:[@media(max-height:500px)]:w-3.5 group-active/tab:bg-proef-turquoise group-focus-visible/tab:bg-proef-turquoise ${desvio ? "bg-proef-turquoise" : "bg-white/35"}`
|
|
489
|
+
},
|
|
490
|
+
i
|
|
491
|
+
))
|
|
492
|
+
]
|
|
493
|
+
}
|
|
494
|
+
)
|
|
495
|
+
]
|
|
496
|
+
}
|
|
497
|
+
)
|
|
498
|
+
] });
|
|
459
499
|
}
|
|
460
500
|
export {
|
|
461
501
|
DRAWER_MAX,
|