@proef/common-ui 2.6.13 → 2.6.15
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 +12 -3
- 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/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/documents/QRScanning/scanQRCodes.js.map +1 -1
- package/dist/esm/v1/capabilities/{onepoint → onepoint-rn}/bridge.js +2 -1
- package/dist/esm/v1/capabilities/onepoint-rn/bridge.js.map +1 -0
- package/dist/esm/v1/capabilities/onepoint-rn/dentroDaApp.js.map +1 -0
- package/dist/esm/v1/capabilities/onepoint-rn/onepoint.js.map +1 -0
- package/dist/esm/v1/capabilities/onepoint-rn/useOrientacaoNaApp.js +15 -0
- package/dist/esm/v1/capabilities/onepoint-rn/useOrientacaoNaApp.js.map +1 -0
- 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 +152 -0
- package/dist/esm/v1/components/data/DayTimeline/DayTimeline.js.map +1 -0
- package/dist/esm/v1/components/data/MonthCalendar/MonthCalendar.js +63 -30
- 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/documents/DocumentDropzone/DocumentDropzone.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.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 +1 -1
- 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 +10 -5
- 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/documents/PdfPreview/PdfPreview.js.map +1 -1
- package/dist/esm/v1/primitives/documents/PdfPreview/pdfjs.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 -295
- package/dist/tokens.css +131 -126
- package/dist/types/v1/capabilities/{onepoint → onepoint-rn}/bridge.d.ts +3 -1
- package/dist/types/v1/capabilities/onepoint-rn/useOrientacaoNaApp.d.ts +2 -0
- package/dist/types/v1/components/data/DayTimeline/DayTimeline.d.ts +72 -0
- package/dist/types/v1/components/data/MonthCalendar/MonthCalendar.d.ts +11 -2
- package/dist/types/v1/components/overlays/Dialog/Dialog.d.ts +11 -2
- package/dist/types/v1/index.d.ts +6 -3
- package/package.json +125 -125
- package/dist/esm/v1/capabilities/onepoint/bridge.js.map +0 -1
- package/dist/esm/v1/capabilities/onepoint/dentroDaApp.js.map +0 -1
- package/dist/esm/v1/capabilities/onepoint/onepoint.js.map +0 -1
- /package/dist/esm/v1/capabilities/{onepoint → onepoint-rn}/dentroDaApp.js +0 -0
- /package/dist/esm/v1/capabilities/{onepoint → onepoint-rn}/onepoint.js +0 -0
- /package/dist/types/v1/capabilities/{onepoint → onepoint-rn}/dentroDaApp.d.ts +0 -0
- /package/dist/types/v1/capabilities/{onepoint → onepoint-rn}/onepoint.d.ts +0 -0
package/dist/esm/index.js
CHANGED
|
@@ -98,10 +98,11 @@ import { BadgeSla, BarraFiltros, Btn, BtnGroup, Campo, CampoInterruptor, CampoPe
|
|
|
98
98
|
import { BarChart, DonutChart, LineChart, shortDateLabel, useChartPalette } from "./v1/components/data/Charts/Charts.js";
|
|
99
99
|
import { BoldIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsUpDownIcon, CloseIcon, ErrorIcon, ExternalLinkIcon, FilterIcon, GlobeIcon, ImageIcon, InfoIcon, ItalicIcon, LayersIcon, ListBulletIcon, ListIcon, ListNumberedIcon, LockIcon, LogOutIcon, MaximizeIcon, MenuIcon, MinimizeIcon, MonitorIcon, MoonIcon, MoreIcon, PanelOpenIcon, PrefilledIcon, QrCodeIcon, QuoteIcon, SearchIcon, SlidersIcon, SparklesIcon, StrikethroughIcon, SunIcon, UnderlineIcon, WarningIcon } from "./v1/foundations/icons/icons.js";
|
|
100
100
|
import { Card } from "./v1/primitives/display/Card/Card.js";
|
|
101
|
+
import { DEFAULT_DAY_TIMELINE_LABELS, DayTimeline, DayTimelineScale, scheduleParts, toMinutes, uncoveredIntervals } from "./v1/components/data/DayTimeline/DayTimeline.js";
|
|
101
102
|
import { DEFAULT_LIST_FINDER_LABELS } from "./v1/components/lists/ListFinder/labels.js";
|
|
102
103
|
import { DEFAULT_TABLE_LABELS } from "./v1/components/tables/Table/labels.js";
|
|
103
104
|
import { DescriptionList } from "./v1/primitives/display/DescriptionList/DescriptionList.js";
|
|
104
|
-
import { ErroBridge, nativo, pedirAoNativo } from "./v1/capabilities/onepoint/bridge.js";
|
|
105
|
+
import { ErroBridge, nativo, pedirAoNativo } from "./v1/capabilities/onepoint-rn/bridge.js";
|
|
105
106
|
import { FilterChips } from "./v1/primitives/display/FilterChips/FilterChips.js";
|
|
106
107
|
import { FontWeight } from "./legacy/constants/FontWeight.js";
|
|
107
108
|
import { InputData, InputHora } from "./legacy/components/atoms/InputData/InputData.js";
|
|
@@ -116,15 +117,16 @@ import { Selector } from "./legacy/components/organisms/Selector/Selector.js";
|
|
|
116
117
|
import { SocketProvider, useSocket } from "./legacy/contexts/socketContext.js";
|
|
117
118
|
import { Spinner } from "./v1/primitives/feedback/Spinner/Spinner.js";
|
|
118
119
|
import { THEME_STORAGE_KEY, applyTheme, themeBootScript, useTheme } from "./v1/capabilities/theme/useTheme.js";
|
|
119
|
-
import { arrancarDentroDaApp, contaDaApp, ligarPonte, obterTokenApi, sairDentroDaApp, terminarSessao } from "./v1/capabilities/onepoint/onepoint.js";
|
|
120
|
+
import { arrancarDentroDaApp, contaDaApp, ligarPonte, obterTokenApi, sairDentroDaApp, terminarSessao } from "./v1/capabilities/onepoint-rn/onepoint.js";
|
|
120
121
|
import { configurePdfWorker } from "./v1/primitives/documents/PdfPreview/pdfjs.js";
|
|
121
122
|
import { configureQRScanner, scanQRCodes } from "./v1/capabilities/documents/QRScanning/scanQRCodes.js";
|
|
122
|
-
import { dentroDaApp } from "./v1/capabilities/onepoint/dentroDaApp.js";
|
|
123
|
+
import { dentroDaApp } from "./v1/capabilities/onepoint-rn/dentroDaApp.js";
|
|
123
124
|
import { getAcronym, getFirstAndLastName, partialMatchWithUsername } from "./legacy/utils/stringUtils.js";
|
|
124
125
|
import { getCSSVariable } from "./legacy/styles/utils/utils.js";
|
|
125
126
|
import { isRichText, richTextContentClasses, richTextIsEmpty, richTextToPlain, sanitizeRichText, textToRichText } from "./v1/primitives/display/RichText/utils.js";
|
|
126
127
|
import { useApi } from "./legacy/hooks/useApi.js";
|
|
127
128
|
import { useIsDark } from "./v1/capabilities/theme/useIsDark.js";
|
|
129
|
+
import { useOrientacaoNaApp } from "./v1/capabilities/onepoint-rn/useOrientacaoNaApp.js";
|
|
128
130
|
export {
|
|
129
131
|
default3 as Acronym,
|
|
130
132
|
default4 as ActionButton,
|
|
@@ -173,12 +175,15 @@ export {
|
|
|
173
175
|
ConfirmProvider,
|
|
174
176
|
default17 as Confirmacao,
|
|
175
177
|
default18 as CustomSwitch,
|
|
178
|
+
DEFAULT_DAY_TIMELINE_LABELS,
|
|
176
179
|
DEFAULT_DROPDOWN_MENU_LABELS,
|
|
177
180
|
DEFAULT_LIST_FINDER_LABELS,
|
|
178
181
|
DEFAULT_STEPS_LABELS,
|
|
179
182
|
DEFAULT_TABLE_LABELS,
|
|
180
183
|
default19 as DataTable,
|
|
181
184
|
DateInput,
|
|
185
|
+
DayTimeline,
|
|
186
|
+
DayTimelineScale,
|
|
182
187
|
DescriptionList,
|
|
183
188
|
default20 as Dialog,
|
|
184
189
|
default21 as DocumentDropzone,
|
|
@@ -338,12 +343,15 @@ export {
|
|
|
338
343
|
sairDentroDaApp,
|
|
339
344
|
sanitizeRichText,
|
|
340
345
|
scanQRCodes,
|
|
346
|
+
scheduleParts,
|
|
341
347
|
shortDateLabel,
|
|
342
348
|
terminarSessao,
|
|
343
349
|
termosDaPesquisa,
|
|
344
350
|
textToRichText,
|
|
345
351
|
themeBootScript,
|
|
346
352
|
timestampDeData,
|
|
353
|
+
toMinutes,
|
|
354
|
+
uncoveredIntervals,
|
|
347
355
|
usarAtalhoPesquisa,
|
|
348
356
|
useApi,
|
|
349
357
|
useAuth,
|
|
@@ -353,6 +361,7 @@ export {
|
|
|
353
361
|
useConfirm,
|
|
354
362
|
useDialogContainer,
|
|
355
363
|
useIsDark,
|
|
364
|
+
useOrientacaoNaApp,
|
|
356
365
|
useSocket,
|
|
357
366
|
useTheme,
|
|
358
367
|
useToast
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Acronym.js","sources":["../../../../../../src/legacy/components/atoms/Acronym/Acronym.tsx"],"sourcesContent":["import React, { useEffect, useState, useRef } from 'react'\
|
|
1
|
+
{"version":3,"file":"Acronym.js","sources":["../../../../../../src/legacy/components/atoms/Acronym/Acronym.tsx"],"sourcesContent":["import React, { useEffect, useState, useRef } from 'react'\nimport { AcronymTheme } from '../../../types/themes/AcronymThemes'\n\nimport './Acronym.scss'\n\ntype Props = {\n name: string\n acronymOnly?: boolean\n theme: AcronymTheme\n}\n\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\nconst Acronym = ({ name, acronymOnly, theme }: Props) => {\n const [initials, setInitials] = useState('')\n const [displayName, setDisplayName] = useState('')\n const { mode } = theme\n\n useEffect(() => {\n const trimmedName = name.trim()\n if (trimmedName) {\n const words = trimmedName.split(/\\s+/)\n const first = words[0]\n const last = words[words.length - 1]\n setInitials(\n (first[0]?.toUpperCase() || '') + (last[0]?.toUpperCase() || '')\n )\n setDisplayName(`${first} ${last}`)\n } else {\n setInitials('')\n setDisplayName('')\n }\n }, [name])\n\n return (\n <div className={`cui-acronym ${mode === 'dark' ? 'dark-bg' : 'light-bg'}`}>\n <div className=\"cui-initials\" title={name}>\n {initials}\n </div>\n {!acronymOnly && <div className=\"cui-full\">{displayName}</div>}\n </div>\n )\n}\n\nexport default Acronym\n"],"names":[],"mappings":";;;AAYA,MAAM,UAAU,CAAC,EAAE,MAAM,aAAa,YAAmB;AACvD,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,EAAE;AAC3C,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,EAAE;AACjD,QAAM,EAAE,SAAS;AAEjB,YAAU,MAAM;AACd,UAAM,cAAc,KAAK,KAAA;AACzB,QAAI,aAAa;AACf,YAAM,QAAQ,YAAY,MAAM,KAAK;AACrC,YAAM,QAAQ,MAAM,CAAC;AACrB,YAAM,OAAO,MAAM,MAAM,SAAS,CAAC;AACnC;AAAA,SACG,MAAM,CAAC,GAAG,YAAA,KAAiB,OAAO,KAAK,CAAC,GAAG,YAAA,KAAiB;AAAA,MAAA;AAE/D,qBAAe,GAAG,KAAK,IAAI,IAAI,EAAE;AAAA,IACnC,OAAO;AACL,kBAAY,EAAE;AACd,qBAAe,EAAE;AAAA,IACnB;AAAA,EACF,GAAG,CAAC,IAAI,CAAC;AAET,SACE,qBAAC,SAAI,WAAW,eAAe,SAAS,SAAS,YAAY,UAAU,IACrE,UAAA;AAAA,IAAA,oBAAC,OAAA,EAAI,WAAU,gBAAe,OAAO,MAClC,UAAA,UACH;AAAA,IACC,CAAC,eAAe,oBAAC,OAAA,EAAI,WAAU,YAAY,UAAA,YAAA,CAAY;AAAA,EAAA,GAC1D;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BreadCrumb.js","sources":["../../../../../../src/legacy/components/atoms/BreadCrumb/BreadCrumb.tsx"],"sourcesContent":["import React from 'react'\
|
|
1
|
+
{"version":3,"file":"BreadCrumb.js","sources":["../../../../../../src/legacy/components/atoms/BreadCrumb/BreadCrumb.tsx"],"sourcesContent":["import React from 'react'\nimport './BreadCrumb.scss'\nimport { faArrowRight } from '@fortawesome/free-solid-svg-icons'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\n\ninterface BreadcrumbItem {\n label: string\n path: string\n isLast?: boolean\n}\n\ninterface BreadCrumbProps {\n location: string\n onNavigate?: (path: string) => void\n}\n\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\nconst BreadCrumb: React.FC<BreadCrumbProps> = ({ location, onNavigate }) => {\n const generateBreadcrumbs = (): BreadcrumbItem[] => {\n const paths = location.split('/').filter(Boolean)\n\n if (paths.length === 0) {\n return []\n }\n\n const breadcrumbs: BreadcrumbItem[] = [{ label: 'Home', path: '/' }]\n\n paths.forEach((path, index) => {\n const previousPath = index === 0 ? '/' : breadcrumbs[index].path\n const newPath = `${previousPath}${path}/`\n\n breadcrumbs.push({\n label: capitalize(path),\n path: newPath,\n })\n })\n\n breadcrumbs[breadcrumbs.length - 1].isLast = true\n\n return breadcrumbs\n }\n\n const capitalize = (str: string): string => {\n if (!str) return ''\n return str.charAt(0).toUpperCase() + str.slice(1)\n }\n\n const handleClick = (path: string, isLast: boolean | undefined) => {\n if (!isLast && onNavigate) {\n onNavigate(path)\n }\n }\n\n const breadcrumbs = generateBreadcrumbs()\n\n return (\n <div className={'cui-breadcrumb'}>\n <nav aria-label=\"breadcrumb\">\n {breadcrumbs.map((item, index) => (\n <React.Fragment key={item.path}>\n {item.isLast ? (\n <span className=\"cui-breadcrumb-last\" aria-current=\"page\">\n {item.label}\n </span>\n ) : (\n <button\n className=\"cui-breadcrumb-link\"\n onClick={() => handleClick(item.path, item.isLast)}\n type=\"button\"\n >\n {item.label}\n </button>\n )}\n {index < breadcrumbs.length - 1 && (\n <span className=\"cui-breadcrumb-separator\">\n <FontAwesomeIcon\n icon={faArrowRight}\n className=\"cui-breadcrumb-icon\"\n size=\"xs\"\n />\n </span>\n )}\n </React.Fragment>\n ))}\n </nav>\n </div>\n )\n}\n\nexport default BreadCrumb\n"],"names":["breadcrumbs"],"mappings":";;;;;AAiBA,MAAM,aAAwC,CAAC,EAAE,UAAU,iBAAiB;AAC1E,QAAM,sBAAsB,MAAwB;AAClD,UAAM,QAAQ,SAAS,MAAM,GAAG,EAAE,OAAO,OAAO;AAEhD,QAAI,MAAM,WAAW,GAAG;AACtB,aAAO,CAAA;AAAA,IACT;AAEA,UAAMA,eAAgC,CAAC,EAAE,OAAO,QAAQ,MAAM,KAAK;AAEnE,UAAM,QAAQ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
|
|
|
1
|
-
{"version":3,"file":"ActionButton.js","sources":["../../../../../../../src/legacy/components/atoms/Button/variants/ActionButton.tsx"],"sourcesContent":["import React from 'react'\
|
|
1
|
+
{"version":3,"file":"ActionButton.js","sources":["../../../../../../../src/legacy/components/atoms/Button/variants/ActionButton.tsx"],"sourcesContent":["import React from 'react'\nimport { PropsWithChildren } from 'react'\n\nimport { FontWeight, WeightValue } from '../../../../constants/FontWeight'\nimport { ActionButtonTheme } from '../../../../types/themes/ButtonThemes'\n\nimport './ActionButton.scss'\n\ntype Props = PropsWithChildren<{\n icon?: React.ReactNode\n title: string\n theme: ActionButtonTheme\n onClick: () => void\n disabled?: boolean\n}>\n\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\nconst ActionButton = ({\n icon,\n title,\n theme,\n onClick,\n disabled = false,\n}: Props) => {\n const {\n backgroundColor,\n fontColor,\n iconColor,\n fontWeight,\n size,\n hoverBackgroundColor = backgroundColor,\n } = theme\n\n return (\n <button\n className={`cui-button cui-action-button cui-action-button-size-${size}`}\n style={{\n color: fontColor,\n backgroundColor,\n fontWeight: WeightValue[fontWeight || FontWeight.MEDIUM],\n ['--hover-bg-color' as any]: hoverBackgroundColor,\n }}\n onClick={onClick}\n disabled={disabled}\n >\n {icon && (\n <span\n className={`cui-icon ${!title ? 'cui-icon-only':''}`}\n style={{\n color: iconColor,\n }}\n >\n {icon}\n </span>\n )}\n {title}\n </button>\n )\n}\n\nexport default ActionButton\n"],"names":[],"mappings":";;;AAiBA,MAAM,eAAe,CAAC;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AACb,MAAa;AACX,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,uBAAuB;AAAA,EAAA,IACrB;AAEJ,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,uDAAuD,IAAI;AAAA,MACtE,OAAO;AAAA,QACL,OAAO;AAAA,QACP;AAAA,QACA,YAAY,YAAY,cAAc,WAAW,MAAM;AAAA,QACvD,CAAC,kBAAyB,GAAG;AAAA,MAAA;AAAA,MAE/B;AAAA,MACA;AAAA,MAEC,UAAA;AAAA,QAAA,QACC;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAW,YAAY,CAAC,QAAQ,kBAAgB,EAAE;AAAA,YAClD,OAAO;AAAA,cACL,OAAO;AAAA,YAAA;AAAA,YAGR,UAAA;AAAA,UAAA;AAAA,QAAA;AAAA,QAGJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterButton.js","sources":["../../../../../../../src/legacy/components/atoms/Button/variants/FilterButton.tsx"],"sourcesContent":["import React from 'react'\
|
|
1
|
+
{"version":3,"file":"FilterButton.js","sources":["../../../../../../../src/legacy/components/atoms/Button/variants/FilterButton.tsx"],"sourcesContent":["import React from 'react'\nimport { PropsWithChildren } from 'react'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport { faCircleCheck } from '@fortawesome/free-solid-svg-icons'\nimport { faCircle } from '@fortawesome/free-regular-svg-icons'\n\nimport './FilterButton.scss'\n\ntype Props = PropsWithChildren<{\n title: string\n selected: boolean\n onClick: () => void\n disabled?: boolean\n}>\n\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\nconst FilterButton = ({\n title,\n selected,\n onClick,\n disabled = false,\n}: Props) => {\n return (\n <button\n className={`cui-button cui-filter-button ${\n selected ? 'cui-selected' : ''\n }`}\n onClick={onClick}\n disabled={disabled}\n >\n {title}\n\n <FontAwesomeIcon\n icon={selected ? faCircleCheck : faCircle}\n className=\"cui-icon\"\n />\n </button>\n )\n}\n\nexport default FilterButton\n"],"names":[],"mappings":";;;;;AAgBA,MAAM,eAAe,CAAC;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AACb,MAAa;AACX,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,gCACT,WAAW,iBAAiB,EAC9B;AAAA,MACA;AAAA,MACA;AAAA,MAEC,UAAA;AAAA,QAAA;AAAA,QAED;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAM,WAAW,gBAAgB;AAAA,YACjC,WAAU;AAAA,UAAA;AAAA,QAAA;AAAA,MACZ;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.js","sources":["../../../../../../../src/legacy/components/atoms/Button/variants/IconButton.tsx"],"sourcesContent":["import React, { CSSProperties } from 'react'\
|
|
1
|
+
{"version":3,"file":"IconButton.js","sources":["../../../../../../../src/legacy/components/atoms/Button/variants/IconButton.tsx"],"sourcesContent":["import React, { CSSProperties } from 'react'\nimport { PropsWithChildren } from 'react'\nimport Icone, { type IconeQualquer } from '../../Icone/Icone'\n\nimport { IconButtonTheme } from '../../../../types/themes/ButtonThemes'\n\nimport './IconButton.scss'\n\ntype Props = PropsWithChildren<{\n /** FontAwesome, componente lucide ou elemento ja construido. */\n icon: IconeQualquer\n onClick: () => void\n theme: IconButtonTheme\n disabled?: boolean\n /**\n * Nome acessivel. Um botao so com icone nao tem texto, por isso sem isto fica\n * anunciado como \"botao\" por um leitor de ecra — e invisivel para testes.\n */\n ariaLabel?: string\n /** Tooltip nativa; sem valor proprio assume o `ariaLabel`. */\n title?: string\n}>\n\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\nconst IconButton = ({\n icon,\n onClick,\n theme,\n disabled = false,\n ariaLabel,\n title,\n}: Props) => {\n const { backgroundColor, iconColor, size } = theme\n\n return (\n <button\n className={`cui-button cui-icon-button cui-icon-button-size-${size}`}\n style={{ backgroundColor }}\n onClick={onClick}\n disabled={disabled}\n aria-label={ariaLabel}\n title={title ?? ariaLabel}\n >\n <Icone icone={icon} cor={iconColor} className=\"cui-icon\" />\n </button>\n )\n}\n\nexport default IconButton\n"],"names":[],"mappings":";;;AAwBA,MAAM,aAAa,CAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA;AACF,MAAa;AACX,QAAM,EAAE,iBAAiB,WAAW,KAAA,IAAS;AAE7C,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,mDAAmD,IAAI;AAAA,MAClE,OAAO,EAAE,gBAAA;AAAA,MACT;AAAA,MACA;AAAA,MACA,cAAY;AAAA,MACZ,OAAO,SAAS;AAAA,MAEhB,8BAAC,OAAA,EAAM,OAAO,MAAM,KAAK,WAAW,WAAU,WAAA,CAAW;AAAA,IAAA;AAAA,EAAA;AAG/D;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MainButton.js","sources":["../../../../../../../src/legacy/components/atoms/Button/variants/MainButton.tsx"],"sourcesContent":["import React from 'react'\
|
|
1
|
+
{"version":3,"file":"MainButton.js","sources":["../../../../../../../src/legacy/components/atoms/Button/variants/MainButton.tsx"],"sourcesContent":["import React from 'react'\nimport { PropsWithChildren } from 'react'\nimport Icone, { type IconeQualquer } from '../../Icone/Icone'\nimport { MainButtonTheme } from '../../../../types/themes/ButtonThemes'\n\nimport './MainButton.scss'\n\ntype Props = PropsWithChildren<{\n /** FontAwesome, componente lucide ou elemento ja construido. */\n icon: IconeQualquer\n title: string\n description?: string\n theme: MainButtonTheme\n onClick: () => void\n disabled?: boolean\n}>\n\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\nconst MainButton = ({\n icon,\n title,\n description,\n theme,\n onClick,\n disabled = false,\n}: Props) => {\n const { backgroundColor, color } = theme\n\n return (\n <button\n className={`cui-button cui-main-button cui-main-button-size-default`}\n style={{\n color: color,\n backgroundColor,\n }}\n onClick={onClick}\n disabled={disabled}\n >\n <div className=\"cui-main-button-content\">\n <div className=\"cui-main-button-top\">\n <div className=\"cui-icon-container\">\n <Icone icone={icon} cor={color} className=\"cui-icon\" />\n </div>\n <div className=\"cui-title-container\">{title}</div>\n </div>\n {description && (\n <div className=\"cui-description-container\" title={description}>\n {description}\n </div>\n )}\n </div>\n </button>\n )\n}\n\nexport default MainButton\n"],"names":[],"mappings":";;;AAkBA,MAAM,aAAa,CAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AACb,MAAa;AACX,QAAM,EAAE,iBAAiB,MAAA,IAAU;AAEnC,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,MACX,OAAO;AAAA,QACL;AAAA,QACA;AAAA,MAAA;AAAA,MAEF;AAAA,MACA;AAAA,MAEA,UAAA,qBAAC,OAAA,EAAI,WAAU,2BACb,UAAA;AAAA,QAAA,qBAAC,OAAA,EAAI,WAAU,uBACb,UAAA;AAAA,UAAA,oBAAC,OAAA,EAAI,WAAU,sBACb,UAAA,oBAAC,OAAA,EAAM,OAAO,MAAM,KAAK,OAAO,WAAU,WAAA,CAAW,GACvD;AAAA,UACA,oBAAC,OAAA,EAAI,WAAU,uBAAuB,UAAA,MAAA,CAAM;AAAA,QAAA,GAC9C;AAAA,QACC,eACC,oBAAC,OAAA,EAAI,WAAU,6BAA4B,OAAO,aAC/C,UAAA,YAAA,CACH;AAAA,MAAA,EAAA,CAEJ;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabButton.js","sources":["../../../../../../../src/legacy/components/atoms/Button/variants/TabButton.tsx"],"sourcesContent":["import React, { CSSProperties } from 'react'\
|
|
1
|
+
{"version":3,"file":"TabButton.js","sources":["../../../../../../../src/legacy/components/atoms/Button/variants/TabButton.tsx"],"sourcesContent":["import React, { CSSProperties } from 'react'\nimport { PropsWithChildren } from 'react'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport { IconProp } from '@fortawesome/fontawesome-svg-core'\n\nimport './TabButton.scss'\n\ntype Props = PropsWithChildren<{\n icon: IconProp\n title: string\n selected: boolean\n onClick: () => void\n disabled?: boolean\n}>\n\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\nconst TabButton = ({ icon, title, selected, onClick, disabled }: Props) => {\n return (\n <button\n className={`cui-button cui-tab-button ${selected ? 'cui-selected' : ''}`}\n onClick={onClick}\n disabled={disabled}\n >\n <FontAwesomeIcon icon={icon} className=\"cui-icon\" />\n {title}\n </button>\n )\n}\n\nexport default TabButton\n"],"names":[],"mappings":";;;AAgBA,MAAM,YAAY,CAAC,EAAE,MAAM,OAAO,UAAU,SAAS,eAAsB;AACzE,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,6BAA6B,WAAW,iBAAiB,EAAE;AAAA,MACtE;AAAA,MACA;AAAA,MAEA,UAAA;AAAA,QAAA,oBAAC,iBAAA,EAAgB,MAAY,WAAU,WAAA,CAAW;AAAA,QACjD;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Field.js","sources":["../../../../../../src/legacy/components/atoms/Field/Field.tsx"],"sourcesContent":["import React, { useState } from 'react'\
|
|
1
|
+
{"version":3,"file":"Field.js","sources":["../../../../../../src/legacy/components/atoms/Field/Field.tsx"],"sourcesContent":["import React, { useState } from 'react'\nimport './Field.scss'\nimport { IconProp } from '@fortawesome/fontawesome-svg-core'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport { faChevronUp, faChevronDown } from '@fortawesome/free-solid-svg-icons'\n\ntype Props = {\n iconPrev?: IconProp\n type?: 'cui-added' | 'cui-adding' | 'cui-adding_operator_name' | 'cui-number'\n placeholder?: string\n disabled: boolean\n readOnly: boolean\n value?: string\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void\n}\n\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\nconst Field = ({\n type,\n placeholder = 'Enter text...',\n disabled,\n readOnly,\n iconPrev,\n value,\n onChange,\n}: Props) => {\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n if (onChange) onChange(e)\n }\n\n const handleIncrement = () => {\n if (onChange) {\n onChange({\n target: { value: String(Number(value || 0) + 1) },\n } as React.ChangeEvent<HTMLInputElement>)\n }\n }\n\n const handleDecrement = () => {\n if (onChange) {\n onChange({\n target: { value: String(Math.max(Number(value || 0) - 1, 0)) },\n } as React.ChangeEvent<HTMLInputElement>)\n }\n }\n\n return (\n <div className={`cui-field ${type ? type : ''}`}>\n {iconPrev && <FontAwesomeIcon icon={iconPrev} className=\"cui-icon\" />}\n\n <div className=\"cui-inputWrapper\">\n <input\n className={`cui-input ${iconPrev ? 'cui-with-icon' : ''} ${\n type ? type : ''\n }`}\n type={type === 'cui-number' ? 'number' : 'text'}\n placeholder={iconPrev ? '' : placeholder}\n disabled={disabled}\n readOnly={readOnly}\n value={value}\n onChange={onChange}\n />\n\n {type === 'cui-number' && (\n <div className=\"cui-number_controls\">\n <button\n type=\"button\"\n className=\"cui-increment\"\n onClick={handleIncrement}\n >\n <FontAwesomeIcon icon={faChevronUp} />\n </button>\n <button\n type=\"button\"\n className=\"cui-decrement\"\n onClick={handleDecrement}\n >\n <FontAwesomeIcon icon={faChevronDown} />\n </button>\n </div>\n )}\n\n {iconPrev && <span className=\"cui-placeholder\">{placeholder}</span>}\n </div>\n </div>\n )\n}\n\nexport default Field\n"],"names":[],"mappings":";;;;AAiBA,MAAM,QAAQ,CAAC;AAAA,EACb;AAAA,EACA,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAa;AAKX,QAAM,kBAAkB,MAAM;AAC5B,QAAI,UAAU;AACZ,eAAS;AAAA,QACP,QAAQ,EAAE,OAAO,OAAO,OAAO,SAAS,CAAC,IAAI,CAAC,EAAA;AAAA,MAAE,CACV;AAAA,IAC1C;AAAA,EACF;AAEA,QAAM,kBAAkB,MAAM;AAC5B,QAAI,UAAU;AACZ,eAAS;AAAA,QACP,QAAQ,EAAE,OAAO,OAAO,KAAK,IAAI,OAAO,SAAS,CAAC,IAAI,GAAG,CAAC,CAAC,EAAA;AAAA,MAAE,CACvB;AAAA,IAC1C;AAAA,EACF;AAEA,8BACG,OAAA,EAAI,WAAW,aAAa,OAAO,OAAO,EAAE,IAC1C,UAAA;AAAA,IAAA,YAAY,oBAAC,iBAAA,EAAgB,MAAM,UAAU,WAAU,YAAW;AAAA,IAEnE,qBAAC,OAAA,EAAI,WAAU,oBACb,UAAA;AAAA,MAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAW,aAAa,WAAW,kBAAkB,EAAE,IACrD,OAAO,OAAO,EAChB;AAAA,UACA,MAAM,SAAS,eAAe,WAAW;AAAA,UACzC,aAAa,WAAW,KAAK;AAAA,UAC7B;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA,MAAA;AAAA,MAGD,SAAS,gBACR,qBAAC,OAAA,EAAI,WAAU,uBACb,UAAA;AAAA,QAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,WAAU;AAAA,YACV,SAAS;AAAA,YAET,UAAA,oBAAC,iBAAA,EAAgB,MAAM,YAAA,CAAa;AAAA,UAAA;AAAA,QAAA;AAAA,QAEtC;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,WAAU;AAAA,YACV,SAAS;AAAA,YAET,UAAA,oBAAC,iBAAA,EAAgB,MAAM,cAAA,CAAe;AAAA,UAAA;AAAA,QAAA;AAAA,MACxC,GACF;AAAA,MAGD,YAAY,oBAAC,QAAA,EAAK,WAAU,mBAAmB,UAAA,YAAA,CAAY;AAAA,IAAA,EAAA,CAC9D;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconText.js","sources":["../../../../../../src/legacy/components/atoms/IconText/IconText.tsx"],"sourcesContent":["import React from 'react'\
|
|
1
|
+
{"version":3,"file":"IconText.js","sources":["../../../../../../src/legacy/components/atoms/IconText/IconText.tsx"],"sourcesContent":["import React from 'react'\nimport { IconProp } from '@fortawesome/fontawesome-svg-core'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport { FontWeight, WeightValue } from '../../../constants/FontWeight'\n\nimport './IconText.scss'\nimport { IconTextTheme } from '../../../types/themes/IconTextThemes'\n\ninterface IconTextProps {\n icon: IconProp\n text: string\n theme: IconTextTheme\n}\n\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\nconst IconText: React.FC<IconTextProps> = ({ icon, text, theme }) => {\n const { color, fontWeight } = theme\n\n return (\n <div\n className={'cui-icon-text'}\n style={{\n color,\n fontWeight: WeightValue[fontWeight || FontWeight.MEDIUM],\n }}\n >\n <FontAwesomeIcon icon={icon} className=\"cui-icon\" />\n <p title={text}>{text}</p>\n </div>\n )\n}\n\nexport default IconText\n"],"names":[],"mappings":";;;;AAeA,MAAM,WAAoC,CAAC,EAAE,MAAM,MAAM,YAAY;AACnE,QAAM,EAAE,OAAO,WAAA,IAAe;AAE9B,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,MACX,OAAO;AAAA,QACL;AAAA,QACA,YAAY,YAAY,cAAc,WAAW,MAAM;AAAA,MAAA;AAAA,MAGzD,UAAA;AAAA,QAAA,oBAAC,iBAAA,EAAgB,MAAY,WAAU,WAAA,CAAW;AAAA,QAClD,oBAAC,KAAA,EAAE,OAAO,MAAO,UAAA,KAAA,CAAK;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG5B;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icone.js","sources":["../../../../../../src/legacy/components/atoms/Icone/Icone.tsx"],"sourcesContent":["import React, { type ReactNode, isValidElement } from 'react'\
|
|
1
|
+
{"version":3,"file":"Icone.js","sources":["../../../../../../src/legacy/components/atoms/Icone/Icone.tsx"],"sourcesContent":["import React, { type ReactNode, isValidElement } from 'react'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport type { IconProp } from '@fortawesome/fontawesome-svg-core'\n\n/**\n * Ícone agnóstico da biblioteca de ícones.\n *\n * A biblioteca nasceu em FontAwesome, mas todos os portais usam lucide — e o\n * `Sidebar` sempre aceitou componentes ao estilo lucide. Resultado: metade da\n * API pedia `IconProp` e obrigava um portal a instalar o FontAwesome só para\n * pôr um ícone num botão.\n *\n * Este componente aceita as três formas, para a API poder ser uniformizada sem\n * partir quem já passa `IconProp`:\n * - `IconProp` (FontAwesome), como antes;\n * - um elemento React já construído (`<Play size={14} />`);\n * - um componente de ícone (lucide: `Play`), que recebe `size` e `className`.\n * @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy.\n */\nexport type IconeQualquer =\n | IconProp\n | ReactNode\n | React.ComponentType<{ size?: number; className?: string }>\n\ninterface Props {\n icone: IconeQualquer\n /** Só aplicado às formas que o aceitam (componente de ícone e FontAwesome). */\n tamanho?: number\n cor?: string\n className?: string\n}\n\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\nexport default function Icone({ icone, tamanho, cor, className }: Props): React.JSX.Element | null {\n if (icone === null || icone === undefined) return null\n\n // Elemento já construído: devolve-se tal e qual, para não sobrepor as props\n // que quem o escreveu já escolheu.\n if (isValidElement(icone)) return <>{icone}</>\n\n if (typeof icone === 'function') {\n const Componente = icone as React.ComponentType<{\n size?: number\n className?: string\n color?: string\n }>\n return <Componente size={tamanho} className={className} color={cor} />\n }\n\n return (\n <FontAwesomeIcon\n icon={icone as IconProp}\n color={cor}\n className={className}\n style={tamanho ? { fontSize: tamanho } : undefined}\n />\n )\n}\n"],"names":[],"mappings":";;;AAiCA,SAAwB,MAAM,EAAE,OAAO,SAAS,KAAK,aAA8C;AACjG,MAAI,UAAU,QAAQ,UAAU,OAAW,QAAO;AAIlD,MAAI,eAAe,KAAK,EAAG,wCAAU,UAAA,OAAM;AAE3C,MAAI,OAAO,UAAU,YAAY;AAC/B,UAAM,aAAa;AAKnB,+BAAQ,YAAA,EAAW,MAAM,SAAS,WAAsB,OAAO,KAAK;AAAA,EACtE;AAEA,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAM;AAAA,MACN,OAAO;AAAA,MACP;AAAA,MACA,OAAO,UAAU,EAAE,UAAU,YAAY;AAAA,IAAA;AAAA,EAAA;AAG/C;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sources":["../../../../../../src/legacy/components/atoms/Input/Input.tsx"],"sourcesContent":["import React, { ChangeEvent } from 'react'\
|
|
1
|
+
{"version":3,"file":"Input.js","sources":["../../../../../../src/legacy/components/atoms/Input/Input.tsx"],"sourcesContent":["import React, { ChangeEvent } from 'react'\n\nimport './Input.scss'\n\ntype Props = {\n placeholder?: string\n onChange: (e: ChangeEvent<HTMLInputElement>) => void\n onBlur?: (e: ChangeEvent<HTMLInputElement>) => void\n type?: 'number' | 'text'\n value?: string | number | null\n disabled?: boolean\n}\n\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\nconst Input = ({\n placeholder,\n onChange,\n onBlur,\n type,\n value,\n disabled,\n}: Props) => {\n return (\n <input\n type={type}\n value={value ?? ''}\n className={'cui-input'}\n placeholder={placeholder}\n onChange={onChange}\n onBlur={onBlur}\n disabled={disabled}\n autoComplete=\"off\"\n />\n )\n}\n\nexport default Input\n"],"names":[],"mappings":";;AAcA,MAAM,QAAQ,CAAC;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAa;AACX,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,OAAO,SAAS;AAAA,MAChB,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,cAAa;AAAA,IAAA;AAAA,EAAA;AAGnB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputData.js","sources":["../../../../../../src/legacy/components/atoms/InputData/InputData.tsx"],"sourcesContent":["import React from 'react'\
|
|
1
|
+
{"version":3,"file":"InputData.js","sources":["../../../../../../src/legacy/components/atoms/InputData/InputData.tsx"],"sourcesContent":["import React from 'react'\nimport DateInput from '../../../../v1/primitives/forms/DateInput/DateInput'\n\n/**\n * Campo de data e campo de hora.\n *\n * Deliberadamente em cima do `<input type=\"date|time\">` do browser: o calendário\n * nativo é acessível, traduzido e com teclado, e um calendário próprio seria\n * centenas de linhas para ficar pior. O que a biblioteca acrescenta é o aspeto\n * uniforme e a mesma API dos restantes campos.\n *\n * O valor é sempre `yyyy-mm-dd` (data) e `hh:mm` (hora) — os formatos que o\n * input devolve, independentemente do que o browser mostra ao utilizador.\n */\n\ninterface PropsBase {\n value: string\n onChange: (valor: string) => void\n disabled?: boolean\n /** Para associar a uma etiqueta externa. */\n id?: string\n}\n\nconst classes =\n 'cui-input-data w-full border border-slate-200 px-2 py-2 text-sm rounded-lg outline-none focus:border-proef-turquoise disabled:bg-slate-50 disabled:text-slate-400'\n\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\nexport interface InputDataProps extends PropsBase {\n /** Limites, no mesmo formato do valor (yyyy-mm-dd). */\n min?: string\n max?: string\n}\n\n/**\n * Migrado para o V1: adaptador do `DateInput` (dd/mm/aaaa sempre, calendário pelo ícone).\n * @deprecated Legacy — usar o `DateInput` do V1. Ver Storybook › Legacy.\n */\nexport function InputData({ value, onChange, disabled, id, min, max }: InputDataProps) {\n return <DateInput id={id} value={value} onChange={onChange} disabled={disabled} min={min} max={max} />\n}\n\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\nexport interface InputHoraProps extends PropsBase {\n /** Passo em segundos; 60 esconde os segundos (o default do browser). */\n step?: number\n}\n\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\nexport function InputHora({ value, onChange, disabled, id, step }: InputHoraProps) {\n return (\n <input\n id={id}\n type=\"time\"\n value={value}\n step={step}\n disabled={disabled}\n onChange={(e) => onChange(e.target.value)}\n className={classes}\n />\n )\n}\n\nexport default InputData\n"],"names":[],"mappings":";;AAuBA,MAAM,UACJ;AAaK,SAAS,UAAU,EAAE,OAAO,UAAU,UAAU,IAAI,KAAK,OAAuB;AACrF,6BAAQ,WAAA,EAAU,IAAQ,OAAc,UAAoB,UAAoB,KAAU,KAAU;AACtG;AASO,SAAS,UAAU,EAAE,OAAO,UAAU,UAAU,IAAI,QAAwB;AACjF,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,MAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA,UAAU,CAAC,MAAM,SAAS,EAAE,OAAO,KAAK;AAAA,MACxC,WAAW;AAAA,IAAA;AAAA,EAAA;AAGjB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.js","sources":["../../../../../../src/legacy/components/atoms/Label/Label.tsx"],"sourcesContent":["import React, { CSSProperties } from 'react'\
|
|
1
|
+
{"version":3,"file":"Label.js","sources":["../../../../../../src/legacy/components/atoms/Label/Label.tsx"],"sourcesContent":["import React, { CSSProperties } from 'react'\nimport './Label.scss'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport { IconProp } from '@fortawesome/fontawesome-svg-core'\n\ntype Props = {\n title: string\n type:\n | 'cui-main_options'\n | 'cui-added'\n | 'cui-adding'\n | 'cui-form_title'\n | 'cui-choose_operator_title'\n | 'cui-add_operator_title'\n | 'cui-choose_operator_name'\n | 'cui-add_operator_name'\n | 'cui-title'\n | 'cui-mode'\n | 'cui-breadcrumb'\n iconPrev?: IconProp\n}\n\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\nconst Label = ({ title, type, iconPrev }: Props) => {\n return (\n <div className={`cui-label ${type ? type : ''}`}>\n {/* Show the icon only if type is: */}\n {(type === 'cui-choose_operator_title' ||\n type === 'cui-add_operator_title' ||\n type === 'cui-mode') &&\n iconPrev && <FontAwesomeIcon icon={iconPrev} className=\"cui-icon\" />}\n {title}\n </div>\n )\n}\n\nexport default Label\n"],"names":[],"mappings":";;;AAuBA,MAAM,QAAQ,CAAC,EAAE,OAAO,MAAM,eAAsB;AAClD,8BACG,OAAA,EAAI,WAAW,aAAa,OAAO,OAAO,EAAE,IAEzC,UAAA;AAAA,KAAA,SAAS,+BACT,SAAS,4BACT,SAAS,eACT,YAAY,oBAAC,iBAAA,EAAgB,MAAM,UAAU,WAAU,WAAA,CAAW;AAAA,IACnE;AAAA,EAAA,GACH;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiTagPickerTag.js","sources":["../../../../../../src/legacy/components/atoms/MultiTagPickerTag/MultiTagPickerTag.tsx"],"sourcesContent":["import React from 'react'\
|
|
1
|
+
{"version":3,"file":"MultiTagPickerTag.js","sources":["../../../../../../src/legacy/components/atoms/MultiTagPickerTag/MultiTagPickerTag.tsx"],"sourcesContent":["import React from 'react'\nimport './MultiTagPickerTag.scss'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport { faMinus, faPlus } from '@fortawesome/free-solid-svg-icons'\n\ninterface TagProps {\n id: string,\n label: string,\n selected: boolean,\n handleTagChange: (changedTo: boolean) => void\n}\n\nconst Select: React.FC<TagProps> = (props: TagProps) => {\n\n const { id, label, selected, handleTagChange } = props\n\n if (selected)\n return (\n <div title={label} className='cui-multitag-container selected'>\n <div className='cui-multitag-name-container'>\n <p className='cui-multitag-name selected'>{label}</p>\n </div>\n <FontAwesomeIcon size='xl' icon={faMinus} className=\"cui-icon\" color='#F8F8F8' onClick={() => handleTagChange(false)}/>\n </div>\n )\n else\n return (\n <div title={label} className=\"cui-multitag-container\">\n <div className='cui-multitag-name-container'>\n <p className='cui-multitag-name'>{label}</p>\n </div>\n <FontAwesomeIcon size='xl' icon={faPlus} className=\"cui-icon\" color='#010060' onClick={() => handleTagChange(true)}/>\n </div>\n )\n}\n\nexport default Select\n"],"names":[],"mappings":";;;;AAYA,MAAM,SAA6B,CAAC,UAAoB;AAEpD,QAAM,EAAE,IAAI,OAAO,UAAU,oBAAoB;AAEjD,MAAI;AACA,WACI,qBAAC,OAAA,EAAI,OAAO,OAAO,WAAU,mCACzB,UAAA;AAAA,MAAA,oBAAC,OAAA,EAAI,WAAU,+BACX,UAAA,oBAAC,OAAE,WAAU,8BAA8B,iBAAM,EAAA,CACrD;AAAA,MACA,oBAAC,iBAAA,EAAgB,MAAK,MAAK,MAAM,SAAS,WAAU,YAAW,OAAM,WAAU,SAAS,MAAM,gBAAgB,KAAK,EAAA,CAAE;AAAA,IAAA,GACzH;AAAA;AAGJ,WACI,qBAAC,OAAA,EAAI,OAAO,OAAO,WAAU,0BACzB,UAAA;AAAA,MAAA,oBAAC,OAAA,EAAI,WAAU,+BACX,UAAA,oBAAC,OAAE,WAAU,qBAAqB,iBAAM,EAAA,CAC5C;AAAA,MACA,oBAAC,iBAAA,EAAgB,MAAK,MAAK,MAAM,QAAQ,WAAU,YAAW,OAAM,WAAU,SAAS,MAAM,gBAAgB,IAAI,EAAA,CAAE;AAAA,IAAA,GACvH;AAEZ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sources":["../../../../../../src/legacy/components/atoms/Select/Select.tsx"],"sourcesContent":["import React from 'react'\
|
|
1
|
+
{"version":3,"file":"Select.js","sources":["../../../../../../src/legacy/components/atoms/Select/Select.tsx"],"sourcesContent":["import React from 'react'\nimport './Select.scss'\n\ninterface SelectOption {\n value: string\n label: string\n}\n\ninterface SelectProps {\n placeholder: string\n options: SelectOption[]\n value: string\n onChange: (value: string) => void\n disabled?: boolean\n}\n\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\nconst Select: React.FC<SelectProps> = ({\n placeholder,\n options,\n value,\n onChange,\n disabled = false,\n}) => {\n return (\n <select\n value={value}\n onChange={(e) => onChange(e.target.value)}\n disabled={disabled}\n className=\"cui-select\"\n >\n <option value=\"\" disabled>\n {placeholder}\n </option>\n {options.map((option) => (\n <option key={option.value} value={option.value}>\n {option.label}\n </option>\n ))}\n </select>\n )\n}\n\nexport default Select\n"],"names":[],"mappings":";;AAiBA,MAAM,SAAgC,CAAC;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AACb,MAAM;AACJ,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,UAAU,CAAC,MAAM,SAAS,EAAE,OAAO,KAAK;AAAA,MACxC;AAAA,MACA,WAAU;AAAA,MAEV,UAAA;AAAA,QAAA,oBAAC,UAAA,EAAO,OAAM,IAAG,UAAQ,MACtB,UAAA,aACH;AAAA,QACC,QAAQ,IAAI,CAAC,WACZ,oBAAC,UAAA,EAA0B,OAAO,OAAO,OACtC,UAAA,OAAO,MAAA,GADG,OAAO,KAEpB,CACD;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.js","sources":["../../../../../../src/legacy/components/atoms/Stack/Stack.tsx"],"sourcesContent":["import React, { CSSProperties, PropsWithChildren } from 'react'\
|
|
1
|
+
{"version":3,"file":"Stack.js","sources":["../../../../../../src/legacy/components/atoms/Stack/Stack.tsx"],"sourcesContent":["import React, { CSSProperties, PropsWithChildren } from 'react'\n\ntype Props = PropsWithChildren<{\n spacing?: number\n direction: 'row' | 'column'\n wrap: boolean\n}>\n\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\nconst Stack = ({\n children,\n spacing = 2,\n direction = 'row',\n wrap = false,\n}: Props) => {\n const style: CSSProperties = {\n display: 'flex',\n gap: `${spacing * 0.25}rem`,\n flexDirection: direction,\n flexWrap: wrap ? 'wrap' : 'nowrap',\n justifyContent: 'center',\n }\n\n return <div style={style}>{children}</div>\n}\n\nexport default Stack\n"],"names":[],"mappings":";AASA,MAAM,QAAQ,CAAC;AAAA,EACb;AAAA,EACA,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,OAAO;AACT,MAAa;AACX,QAAM,QAAuB;AAAA,IAC3B,SAAS;AAAA,IACT,KAAK,GAAG,UAAU,IAAI;AAAA,IACtB,eAAe;AAAA,IACf,UAAU,OAAO,SAAS;AAAA,IAC1B,gBAAgB;AAAA,EAAA;AAGlB,SAAO,oBAAC,OAAA,EAAI,OAAe,SAAA,CAAS;AACtC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomSwitch.js","sources":["../../../../../../src/legacy/components/atoms/Switch/CustomSwitch.tsx"],"sourcesContent":["import React from 'react'\
|
|
1
|
+
{"version":3,"file":"CustomSwitch.js","sources":["../../../../../../src/legacy/components/atoms/Switch/CustomSwitch.tsx"],"sourcesContent":["import React from 'react'\nimport { CustomSwitchTheme } from '../../../types/themes/CustomSwitchThemes'\nimport Switch from '../../../../v1/primitives/forms/Switch/Switch'\n\ntype CustomSwitchProps = {\n label: string\n activated: boolean\n onChange: () => void\n /** Já não muda nada: o interruptor tem um tamanho só (o do V1). */\n theme: CustomSwitchTheme\n}\n\n/**\n * Adaptador: mostra o `Switch` do V1, com o texto antes.\n * @deprecated Legacy — não usar em código novo. Usar o `Switch` (V1).\n */\nconst CustomSwitch: React.FC<CustomSwitchProps> = ({ label, activated, onChange }) => {\n return (\n <span className=\"inline-flex items-center gap-2 text-control text-foreground\">\n <span>{label}</span>\n <Switch checked={activated} onChange={() => onChange()} aria-label={label} />\n </span>\n )\n}\n\nexport default CustomSwitch\n"],"names":[],"mappings":";;AAgBA,MAAM,eAA4C,CAAC,EAAE,OAAO,WAAW,eAAe;AACpF,SACE,qBAAC,QAAA,EAAK,WAAU,+DACd,UAAA;AAAA,IAAA,oBAAC,UAAM,UAAA,MAAA,CAAM;AAAA,IACb,oBAAC,UAAO,SAAS,WAAW,UAAU,MAAM,SAAA,GAAY,cAAY,MAAA,CAAO;AAAA,EAAA,GAC7E;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Charts.js","sources":["../../../../../src/legacy/components/charts/Charts.tsx"],"sourcesContent":["import React from 'react'\r\nimport { Chart as ChartJS, registerables } from 'chart.js'\r\nimport ChartDataLabels from 'chartjs-plugin-datalabels'\r\nimport { Bubble } from 'react-chartjs-2'\r\nimport { useIsDark } from '../../../v1/capabilities/theme/useIsDark'\r\nimport { BarChart, DonutChart, LineChart } from '../../../v1/components/data/Charts/Charts'\r\n\r\n// ---------------------------------------------------------------------------\r\n// Local types (inlined — originally imported from CRE `../types`).\r\n// ---------------------------------------------------------------------------\r\n\r\n/**\r\n * Stacked series over a set of shared labels (e.g. a dimension over time).\r\n * @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy.\r\n */\r\nexport interface SerieEmpilhada {\r\n labels: string[]\r\n series: { nome: string; valores: number[] }[]\r\n}\r\n\r\n/**\r\n * A simple distribution: parallel arrays of labels and values.\r\n * @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy.\r\n */\r\nexport interface Distribuicao {\r\n labels: string[]\r\n valores: number[]\r\n}\r\n\r\n/**\r\n * Clique num elemento do gráfico: a etiqueta (ex: \"Incidente\"), a posição dela\r\n * e o nome da série (quando há várias). Serve para filtrar ao clicar.\r\n */\r\nexport type CliqueGrafico = (label: string, indice: number, serie?: string) => void\r\n\r\n// ---------------------------------------------------------------------------\r\n// Local formatting helpers (inlined — originally imported from CRE `../lib/format`).\r\n// Behavior kept close to the originals; the library stays self-contained.\r\n// ---------------------------------------------------------------------------\r\n\r\n/**\r\n * Currency formatter. Thousands separated by '.', decimals by ',', suffixed ' €'.\r\n * Independent of Intl/ICU so the thousands separator is stable across browsers.\r\n */\r\nfunction euros(v: number | null | undefined): string {\r\n if (v == null) return '—'\r\n const negativo = v < 0\r\n const [inteiro, decimal] = Math.abs(v).toFixed(2).split('.')\r\n const comMilhares = inteiro.replace(/\\B(?=(\\d{3})+(?!\\d))/g, '.')\r\n return `${negativo ? '-' : ''}${comMilhares},${decimal} €`\r\n}\r\n\r\n// ---------------------------------------------------------------------------\r\n// Chart.js registration (once, at module load).\r\n// ---------------------------------------------------------------------------\r\n\r\n// Regista TUDO (registerables inclui Filler, controllers, scales) + o plugin de\r\n// datalabels. O registo parcial degenerava a geometria (doughnut colapsado) e o\r\n// aviso \"fill sem Filler\". registerables = equivalente a chart.js/auto.\r\nChartJS.register(...registerables, ChartDataLabels)\r\n// Datalabels off by default — enabled only where it improves readability.\r\nChartJS.defaults.set('plugins.datalabels', { display: false })\r\nChartJS.defaults.font.family = \"'Montserrat', sans-serif\"\r\nChartJS.defaults.color = '#5B6577'\r\n\r\n/**\r\n * Categorical palette. Stable order so the same dimension always maps to the same color.\r\n * @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy.\r\n */\r\nexport const PALETA = [\r\n '#1868B0',\r\n '#1F8A55',\r\n '#B96E00',\r\n '#C23B34',\r\n '#7C3AED',\r\n '#0891B2',\r\n '#DB2777',\r\n '#65A30D',\r\n '#4B5563',\r\n '#D97706',\r\n '#2563EB',\r\n '#059669',\r\n]\r\n\r\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\r\nexport function cor(i: number): string {\r\n return PALETA[i % PALETA.length]!\r\n}\r\n\r\n/**\r\n * Cores do texto e da grelha conforme o tema: as do claro sobre o fundo escuro\r\n * deixavam os eixos e os valores ilegíveis.\r\n */\r\nfunction useTema() {\r\n const escuro = useIsDark()\r\n return escuro\r\n ? { texto: '#CBD5E1', forte: '#E2E8F0', grelha: '#1E293B' }\r\n : { texto: '#5B6577', forte: '#182238', grelha: '#EEF1F5' }\r\n}\r\n\r\n// ---------------------------------------------------------------------------\r\n// Barras, Anel e Linhas: adaptadores dos gráficos V1 (BarChart, DonutChart, LineChart),\r\n// com as props de sempre. Só as Bolhas continuam desenhadas aqui.\r\n// ---------------------------------------------------------------------------\r\n\r\nexport interface BarrasProps {\r\n labels: string[]\r\n /** Uma ou várias séries (ex: \"Atribuídos\" e \"Resolvidos\"), lado a lado ou empilhadas. */\r\n series: { nome: string; valores: number[]; cor?: string }[]\r\n /** Barras deitadas, com as etiquetas à esquerda (bom para nomes compridos e rankings). */\r\n horizontal?: boolean\r\n /** Séries empilhadas em vez de lado a lado. */\r\n empilhado?: boolean\r\n /** Altura em px. Nas horizontais, por omissão cresce com o número de barras. */\r\n altura?: number\r\n /** Só as primeiras N (ex: top 10). */\r\n limite?: number\r\n /** Cor de cada barra, quando há uma só série (ex: a cor de cada estado). */\r\n cores?: string[]\r\n /** Formato dos valores no tooltip, nas etiquetas e no eixo (ex: minutos → \"7h30\"). */\r\n formatar?: (v: number) => string\r\n /** Mostra o valor na ponta de cada barra. */\r\n valores?: boolean\r\n /** Junta a percentagem do total ao valor (ex: \"12 (34%)\"); só com uma série. */\r\n percentagem?: boolean\r\n /** Legenda das séries. Por omissão, só quando há mais do que uma. */\r\n legenda?: boolean\r\n /** Formato das etiquetas do eixo (ex: datas). Por omissão, datas ISO ficam curtas. */\r\n formatarEtiqueta?: (label: string) => string\r\n /** Clique numa barra: devolve a etiqueta, a posição e a série. */\r\n onClick?: CliqueGrafico\r\n}\r\n\r\n/**\r\n * Migrado para o V1: adaptador do `BarChart` (mesmas props de sempre).\r\n * @deprecated Legacy — usar o `BarChart` do V1. Ver Storybook › Legacy.\r\n */\r\nexport function Barras({\r\n labels,\r\n series,\r\n horizontal,\r\n empilhado,\r\n altura,\r\n limite,\r\n cores,\r\n formatar,\r\n valores,\r\n percentagem,\r\n legenda,\r\n formatarEtiqueta,\r\n onClick,\r\n}: BarrasProps) {\r\n return (\r\n <BarChart\r\n labels={labels}\r\n series={series.map((s) => ({ name: s.nome, values: s.valores, color: s.cor }))}\r\n horizontal={horizontal}\r\n stacked={empilhado}\r\n height={altura}\r\n limit={limite}\r\n colors={cores}\r\n format={formatar}\r\n showValues={valores}\r\n showPercent={percentagem}\r\n legend={legenda}\r\n formatLabel={formatarEtiqueta}\r\n onClick={onClick}\r\n />\r\n )\r\n}\r\n\r\n/**\r\n * Stacked bars for a dimension over time.\r\n * @deprecated Legacy — usar o `BarChart` do V1 com `stacked`. Ver Storybook › Legacy.\r\n */\r\nexport function BarrasEmpilhadas({ serie, altura = 280, onClick }: { serie: SerieEmpilhada; altura?: number; onClick?: CliqueGrafico }) {\r\n return <Barras labels={serie.labels} series={serie.series} empilhado altura={altura} onClick={onClick} legenda />\r\n}\r\n\r\n/**\r\n * Horizontal bars of a distribution (top N).\r\n * @deprecated Legacy — usar o `BarChart` do V1 com `horizontal`. Ver Storybook › Legacy.\r\n */\r\nexport function BarrasHorizontais({\r\n dados,\r\n altura = 280,\r\n limite = 12,\r\n onClick,\r\n}: {\r\n dados: Distribuicao\r\n altura?: number\r\n limite?: number\r\n onClick?: CliqueGrafico\r\n}) {\r\n const n = Math.min(limite, dados.labels.length)\r\n return (\r\n <Barras\r\n horizontal\r\n labels={dados.labels}\r\n series={[{ nome: '', valores: dados.valores }]}\r\n cores={Array.from({ length: n }, (_, i) => cor(i))}\r\n limite={limite}\r\n altura={altura}\r\n onClick={onClick}\r\n />\r\n )\r\n}\r\n\r\n/**\r\n * Migrado para o V1: adaptador do `DonutChart`.\r\n * @deprecated Legacy — usar o `DonutChart` do V1. Ver Storybook › Legacy.\r\n */\r\nexport function Anel({\r\n dados,\r\n altura = 260,\r\n cores,\r\n formatar,\r\n onClick,\r\n}: {\r\n dados: Distribuicao\r\n altura?: number\r\n cores?: string[]\r\n /** Formato dos valores no tooltip. */\r\n formatar?: (v: number) => string\r\n /** Clique numa fatia: devolve a etiqueta e a posição. */\r\n onClick?: CliqueGrafico\r\n}) {\r\n return <DonutChart labels={dados.labels} values={dados.valores} height={altura} colors={cores} format={formatar} onClick={onClick} />\r\n}\r\n\r\n/**\r\n * Simple line chart — optionally formats values as currency.\r\n * @deprecated Legacy — usar o `LineChart` do V1. Ver Storybook › Legacy.\r\n */\r\nexport function Linha({\r\n dados,\r\n altura = 260,\r\n euros: emEuros = false,\r\n onClick,\r\n}: {\r\n dados: Distribuicao\r\n altura?: number\r\n euros?: boolean\r\n onClick?: CliqueGrafico\r\n}) {\r\n return (\r\n <LineChart\r\n labels={dados.labels}\r\n series={[{ name: '', values: dados.valores, color: '#C23B34' }]}\r\n area\r\n height={altura}\r\n format={emEuros ? (v) => euros(v) : undefined}\r\n legend={false}\r\n onClick={onClick}\r\n />\r\n )\r\n}\r\n\r\n/**\r\n * Several lines over the same labels — NOT stacked.\r\n * Migrado para o V1: adaptador do `LineChart` (com a legenda sempre, como antes).\r\n * @deprecated Legacy — usar o `LineChart` do V1. Ver Storybook › Legacy.\r\n */\r\nexport function Linhas({\r\n serie,\r\n altura = 280,\r\n area = false,\r\n cores,\r\n formatar,\r\n formatarEtiqueta,\r\n onClick,\r\n}: {\r\n serie: SerieEmpilhada\r\n altura?: number\r\n /// Fill under each line. Only legible with one or two series.\r\n area?: boolean\r\n /** Cor de cada série, pela ordem. */\r\n cores?: string[]\r\n /** Formato dos valores no tooltip e no eixo. */\r\n formatar?: (v: number) => string\r\n /** Formato das etiquetas do eixo (ex: datas). */\r\n formatarEtiqueta?: (label: string) => string\r\n /** Clique num ponto: devolve a etiqueta (ex: o dia) e a série. */\r\n onClick?: CliqueGrafico\r\n}) {\r\n return (\r\n <LineChart\r\n labels={serie.labels}\r\n series={serie.series.map((s) => ({ name: s.nome, values: s.valores }))}\r\n area={area}\r\n colors={cores}\r\n format={formatar}\r\n formatLabel={formatarEtiqueta}\r\n height={altura}\r\n legend\r\n onClick={onClick}\r\n />\r\n )\r\n}\r\n\r\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\r\nexport interface PontoRisco {\r\n responsavel: string\r\n otsAtivas: number\r\n percentagemForaPrazo: number\r\n valorPenalizado: number\r\n}\r\n\r\n/**\r\n * Risk-map bubbles: x = active OTs, y = % overdue, r = penalized value.\r\n * The radius is normalized against the max so bubbles stay readable at any scale.\r\n *\r\n * Axis titles and the tooltip formatter are exposed as optional props with\r\n * neutral English defaults (previously hardcoded Portuguese) so the component\r\n * carries no locale of its own.\r\n * @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy.\r\n */\r\nexport function Bolhas({\r\n pontos,\r\n altura = 280,\r\n onClick,\r\n xTitle = 'Active OTs',\r\n yTitle = '% overdue',\r\n tooltipLabel = (p) => `${p.responsavel}: ${p.otsAtivas} active, ${p.percentagemForaPrazo}% overdue, ${euros(p.valorPenalizado)}`,\r\n}: {\r\n pontos: PontoRisco[]\r\n altura?: number\r\n onClick?: (p: PontoRisco) => void\r\n xTitle?: string\r\n yTitle?: string\r\n tooltipLabel?: (p: PontoRisco) => string\r\n}) {\r\n const tema = useTema()\r\n const maxValor = Math.max(1, ...pontos.map((p) => p.valorPenalizado))\r\n return (\r\n <div style={{ height: altura }}>\r\n <Bubble\r\n data={{\r\n datasets: pontos.map((p, i) => ({\r\n label: p.responsavel,\r\n data: [\r\n {\r\n x: p.otsAtivas,\r\n y: p.percentagemForaPrazo,\r\n r: 6 + (p.valorPenalizado / maxValor) * 18,\r\n },\r\n ],\r\n backgroundColor: `${cor(i)}CC`,\r\n borderColor: cor(i),\r\n })),\r\n }}\r\n options={{\r\n maintainAspectRatio: false,\r\n responsive: true,\r\n onClick: (_e, elements) => {\r\n const idx = elements[0]?.datasetIndex\r\n if (idx != null && onClick) onClick(pontos[idx]!)\r\n },\r\n plugins: {\r\n legend: { display: false },\r\n tooltip: {\r\n callbacks: {\r\n label: (c) => tooltipLabel(pontos[c.datasetIndex]!),\r\n },\r\n },\r\n },\r\n scales: {\r\n x: { beginAtZero: true, title: { display: true, text: xTitle, color: tema.texto }, grid: { color: tema.grelha }, ticks: { color: tema.texto } },\r\n y: { beginAtZero: true, title: { display: true, text: yTitle, color: tema.texto }, grid: { color: tema.grelha }, ticks: { color: tema.texto } },\r\n },\r\n }}\r\n />\r\n </div>\r\n )\r\n}\r\n"],"names":["ChartJS"],"mappings":";;;;;;AA4CA,SAAS,MAAM,GAAsC;AACnD,MAAI,KAAK,KAAM,QAAO;AACtB,QAAM,WAAW,IAAI;AACrB,QAAM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ACzB,gBAAM,MAAM,SAAS,CAAC,GAAG;AACzB,cAAI,OAAO,QAAQ,QAAS,SAAQ,OAAO,GAAG,CAAE;AAAA,QAClD;AAAA,QACA,SAAS;AAAA,UACP,QAAQ,EAAE,SAAS,MAAA;AAAA,UACnB,SAAS;AAAA,YACP,WAAW;AAAA,cACT,OAAO,CAAC,MAAM,aAAa,OAAO,EAAE,YAAY,CAAE;AAAA,YAAA;AAAA,UACpD;AAAA,QACF;AAAA,QAEF,QAAQ;AAAA,UACN,GAAG,EAAE,aAAa,MAAM,OAAO,EAAE,SAAS,MAAM,MAAM,QAAQ,OAAO,KAAK,SAAS,MAAM,EAAE,OAAO,KAAK,OAAA,GAAU,OAAO,EAAE,OAAO,KAAK,QAAM;AAAA,UAC5I,GAAG,EAAE,aAAa,MAAM,OAAO,EAAE,SAAS,MAAM,MAAM,QAAQ,OAAO,KAAK,SAAS,MAAM,EAAE,OAAO,KAAK,UAAU,OAAO,EAAE,OAAO,KAAK,MAAA,EAAM;AAAA,QAAE;AAAA,MAChJ;AAAA,IACF;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"Charts.js","sources":["../../../../../src/legacy/components/charts/Charts.tsx"],"sourcesContent":["import React from 'react'\nimport { Chart as ChartJS, registerables } from 'chart.js'\nimport ChartDataLabels from 'chartjs-plugin-datalabels'\nimport { Bubble } from 'react-chartjs-2'\nimport { useIsDark } from '../../../v1/capabilities/theme/useIsDark'\nimport { BarChart, DonutChart, LineChart } from '../../../v1/components/data/Charts/Charts'\n\n// ---------------------------------------------------------------------------\n// Local types (inlined — originally imported from CRE `../types`).\n// ---------------------------------------------------------------------------\n\n/**\n * Stacked series over a set of shared labels (e.g. a dimension over time).\n * @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy.\n */\nexport interface SerieEmpilhada {\n labels: string[]\n series: { nome: string; valores: number[] }[]\n}\n\n/**\n * A simple distribution: parallel arrays of labels and values.\n * @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy.\n */\nexport interface Distribuicao {\n labels: string[]\n valores: number[]\n}\n\n/**\n * Clique num elemento do gráfico: a etiqueta (ex: \"Incidente\"), a posição dela\n * e o nome da série (quando há várias). Serve para filtrar ao clicar.\n */\nexport type CliqueGrafico = (label: string, indice: number, serie?: string) => void\n\n// ---------------------------------------------------------------------------\n// Local formatting helpers (inlined — originally imported from CRE `../lib/format`).\n// Behavior kept close to the originals; the library stays self-contained.\n// ---------------------------------------------------------------------------\n\n/**\n * Currency formatter. Thousands separated by '.', decimals by ',', suffixed ' €'.\n * Independent of Intl/ICU so the thousands separator is stable across browsers.\n */\nfunction euros(v: number | null | undefined): string {\n if (v == null) return '—'\n const negativo = v < 0\n const [inteiro, decimal] = Math.abs(v).toFixed(2).split('.')\n const comMilhares = inteiro.replace(/\\B(?=(\\d{3})+(?!\\d))/g, '.')\n return `${negativo ? '-' : ''}${comMilhares},${decimal} €`\n}\n\n// ---------------------------------------------------------------------------\n// Chart.js registration (once, at module load).\n// ---------------------------------------------------------------------------\n\n// Regista TUDO (registerables inclui Filler, controllers, scales) + o plugin de\n// datalabels. O registo parcial degenerava a geometria (doughnut colapsado) e o\n// aviso \"fill sem Filler\". registerables = equivalente a chart.js/auto.\nChartJS.register(...registerables, ChartDataLabels)\n// Datalabels off by default — enabled only where it improves readability.\nChartJS.defaults.set('plugins.datalabels', { display: false })\nChartJS.defaults.font.family = \"'Montserrat', sans-serif\"\nChartJS.defaults.color = '#5B6577'\n\n/**\n * Categorical palette. Stable order so the same dimension always maps to the same color.\n * @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy.\n */\nexport const PALETA = [\n '#1868B0',\n '#1F8A55',\n '#B96E00',\n '#C23B34',\n '#7C3AED',\n '#0891B2',\n '#DB2777',\n '#65A30D',\n '#4B5563',\n '#D97706',\n '#2563EB',\n '#059669',\n]\n\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\nexport function cor(i: number): string {\n return PALETA[i % PALETA.length]!\n}\n\n/**\n * Cores do texto e da grelha conforme o tema: as do claro sobre o fundo escuro\n * deixavam os eixos e os valores ilegíveis.\n */\nfunction useTema() {\n const escuro = useIsDark()\n return escuro\n ? { texto: '#CBD5E1', forte: '#E2E8F0', grelha: '#1E293B' }\n : { texto: '#5B6577', forte: '#182238', grelha: '#EEF1F5' }\n}\n\n// ---------------------------------------------------------------------------\n// Barras, Anel e Linhas: adaptadores dos gráficos V1 (BarChart, DonutChart, LineChart),\n// com as props de sempre. Só as Bolhas continuam desenhadas aqui.\n// ---------------------------------------------------------------------------\n\nexport interface BarrasProps {\n labels: string[]\n /** Uma ou várias séries (ex: \"Atribuídos\" e \"Resolvidos\"), lado a lado ou empilhadas. */\n series: { nome: string; valores: number[]; cor?: string }[]\n /** Barras deitadas, com as etiquetas à esquerda (bom para nomes compridos e rankings). */\n horizontal?: boolean\n /** Séries empilhadas em vez de lado a lado. */\n empilhado?: boolean\n /** Altura em px. Nas horizontais, por omissão cresce com o número de barras. */\n altura?: number\n /** Só as primeiras N (ex: top 10). */\n limite?: number\n /** Cor de cada barra, quando há uma só série (ex: a cor de cada estado). */\n cores?: string[]\n /** Formato dos valores no tooltip, nas etiquetas e no eixo (ex: minutos → \"7h30\"). */\n formatar?: (v: number) => string\n /** Mostra o valor na ponta de cada barra. */\n valores?: boolean\n /** Junta a percentagem do total ao valor (ex: \"12 (34%)\"); só com uma série. */\n percentagem?: boolean\n /** Legenda das séries. Por omissão, só quando há mais do que uma. */\n legenda?: boolean\n /** Formato das etiquetas do eixo (ex: datas). Por omissão, datas ISO ficam curtas. */\n formatarEtiqueta?: (label: string) => string\n /** Clique numa barra: devolve a etiqueta, a posição e a série. */\n onClick?: CliqueGrafico\n}\n\n/**\n * Migrado para o V1: adaptador do `BarChart` (mesmas props de sempre).\n * @deprecated Legacy — usar o `BarChart` do V1. Ver Storybook › Legacy.\n */\nexport function Barras({\n labels,\n series,\n horizontal,\n empilhado,\n altura,\n limite,\n cores,\n formatar,\n valores,\n percentagem,\n legenda,\n formatarEtiqueta,\n onClick,\n}: BarrasProps) {\n return (\n <BarChart\n labels={labels}\n series={series.map((s) => ({ name: s.nome, values: s.valores, color: s.cor }))}\n horizontal={horizontal}\n stacked={empilhado}\n height={altura}\n limit={limite}\n colors={cores}\n format={formatar}\n showValues={valores}\n showPercent={percentagem}\n legend={legenda}\n formatLabel={formatarEtiqueta}\n onClick={onClick}\n />\n )\n}\n\n/**\n * Stacked bars for a dimension over time.\n * @deprecated Legacy — usar o `BarChart` do V1 com `stacked`. Ver Storybook › Legacy.\n */\nexport function BarrasEmpilhadas({ serie, altura = 280, onClick }: { serie: SerieEmpilhada; altura?: number; onClick?: CliqueGrafico }) {\n return <Barras labels={serie.labels} series={serie.series} empilhado altura={altura} onClick={onClick} legenda />\n}\n\n/**\n * Horizontal bars of a distribution (top N).\n * @deprecated Legacy — usar o `BarChart` do V1 com `horizontal`. Ver Storybook › Legacy.\n */\nexport function BarrasHorizontais({\n dados,\n altura = 280,\n limite = 12,\n onClick,\n}: {\n dados: Distribuicao\n altura?: number\n limite?: number\n onClick?: CliqueGrafico\n}) {\n const n = Math.min(limite, dados.labels.length)\n return (\n <Barras\n horizontal\n labels={dados.labels}\n series={[{ nome: '', valores: dados.valores }]}\n cores={Array.from({ length: n }, (_, i) => cor(i))}\n limite={limite}\n altura={altura}\n onClick={onClick}\n />\n )\n}\n\n/**\n * Migrado para o V1: adaptador do `DonutChart`.\n * @deprecated Legacy — usar o `DonutChart` do V1. Ver Storybook › Legacy.\n */\nexport function Anel({\n dados,\n altura = 260,\n cores,\n formatar,\n onClick,\n}: {\n dados: Distribuicao\n altura?: number\n cores?: string[]\n /** Formato dos valores no tooltip. */\n formatar?: (v: number) => string\n /** Clique numa fatia: devolve a etiqueta e a posição. */\n onClick?: CliqueGrafico\n}) {\n return <DonutChart labels={dados.labels} values={dados.valores} height={altura} colors={cores} format={formatar} onClick={onClick} />\n}\n\n/**\n * Simple line chart — optionally formats values as currency.\n * @deprecated Legacy — usar o `LineChart` do V1. Ver Storybook › Legacy.\n */\nexport function Linha({\n dados,\n altura = 260,\n euros: emEuros = false,\n onClick,\n}: {\n dados: Distribuicao\n altura?: number\n euros?: boolean\n onClick?: CliqueGrafico\n}) {\n return (\n <LineChart\n labels={dados.labels}\n series={[{ name: '', values: dados.valores, color: '#C23B34' }]}\n area\n height={altura}\n format={emEuros ? (v) => euros(v) : undefined}\n legend={false}\n onClick={onClick}\n />\n )\n}\n\n/**\n * Several lines over the same labels — NOT stacked.\n * Migrado para o V1: adaptador do `LineChart` (com a legenda sempre, como antes).\n * @deprecated Legacy — usar o `LineChart` do V1. Ver Storybook › Legacy.\n */\nexport function Linhas({\n serie,\n altura = 280,\n area = false,\n cores,\n formatar,\n formatarEtiqueta,\n onClick,\n}: {\n serie: SerieEmpilhada\n altura?: number\n /// Fill under each line. Only legible with one or two series.\n area?: boolean\n /** Cor de cada série, pela ordem. */\n cores?: string[]\n /** Formato dos valores no tooltip e no eixo. */\n formatar?: (v: number) => string\n /** Formato das etiquetas do eixo (ex: datas). */\n formatarEtiqueta?: (label: string) => string\n /** Clique num ponto: devolve a etiqueta (ex: o dia) e a série. */\n onClick?: CliqueGrafico\n}) {\n return (\n <LineChart\n labels={serie.labels}\n series={serie.series.map((s) => ({ name: s.nome, values: s.valores }))}\n area={area}\n colors={cores}\n format={formatar}\n formatLabel={formatarEtiqueta}\n height={altura}\n legend\n onClick={onClick}\n />\n )\n}\n\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\nexport interface PontoRisco {\n responsavel: string\n otsAtivas: number\n percentagemForaPrazo: number\n valorPenalizado: number\n}\n\n/**\n * Risk-map bubbles: x = active OTs, y = % overdue, r = penalized value.\n * The radius is normalized against the max so bubbles stay readable at any scale.\n *\n * Axis titles and the tooltip formatter are exposed as optional props with\n * neutral English defaults (previously hardcoded Portuguese) so the component\n * carries no locale of its own.\n * @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy.\n */\nexport function Bolhas({\n pontos,\n altura = 280,\n onClick,\n xTitle = 'Active OTs',\n yTitle = '% overdue',\n tooltipLabel = (p) => `${p.responsavel}: ${p.otsAtivas} active, ${p.percentagemForaPrazo}% overdue, ${euros(p.valorPenalizado)}`,\n}: {\n pontos: PontoRisco[]\n altura?: number\n onClick?: (p: PontoRisco) => void\n xTitle?: string\n yTitle?: string\n tooltipLabel?: (p: PontoRisco) => string\n}) {\n const tema = useTema()\n const maxValor = Math.max(1, ...pontos.map((p) => p.valorPenalizado))\n return (\n <div style={{ height: altura }}>\n <Bubble\n data={{\n datasets: pontos.map((p, i) => ({\n label: p.responsavel,\n data: [\n {\n x: p.otsAtivas,\n y: p.percentagemForaPrazo,\n r: 6 + (p.valorPenalizado / maxValor) * 18,\n },\n ],\n backgroundColor: `${cor(i)}CC`,\n borderColor: cor(i),\n })),\n }}\n options={{\n maintainAspectRatio: false,\n responsive: true,\n onClick: (_e, elements) => {\n const idx = elements[0]?.datasetIndex\n if (idx != null && onClick) onClick(pontos[idx]!)\n },\n plugins: {\n legend: { display: false },\n tooltip: {\n callbacks: {\n label: (c) => tooltipLabel(pontos[c.datasetIndex]!),\n },\n },\n },\n scales: {\n x: { beginAtZero: true, title: { display: true, text: xTitle, color: tema.texto }, grid: { color: tema.grelha }, ticks: { color: tema.texto } },\n y: { beginAtZero: true, title: { display: true, text: yTitle, color: tema.texto }, grid: { color: tema.grelha }, ticks: { color: tema.texto } },\n },\n }}\n />\n </div>\n )\n}\n"],"names":["ChartJS"],"mappings":";;;;;;AA4CA,SAAS,MAAM,GAAsC;AACnD,MAAI,KAAK,KAAM,QAAO;AACtB,QAAM,WAAW,IAAI;AACrB,QAAM,CAAC,SAAS,OAAO,IAAI,KAAK,IAAI,CAAC,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG;AAC3D,QAAM,cAAc,QAAQ,QAAQ,yBAAyB,GAAG;AAChE,SAAO,GAAG,WAAW,MAAM,EAAE,GAAG,WAAW,IAAI,OAAO;AACxD;AASAA,MAAQ,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,CAAC,MAAM,aAAa,OAAO,EAAE,YAAY,CAAE;AAAA,YAAA;AAAA,UACpD;AAAA,QACF;AAAA,QAEF,QAAQ;AAAA,UACN,GAAG,EAAE,aAAa,MAAM,OAAO,EAAE,SAAS,MAAM,MAAM,QAAQ,OAAO,KAAK,SAAS,MAAM,EAAE,OAAO,KAAK,OAAA,GAAU,OAAO,EAAE,OAAO,KAAK,QAAM;AAAA,UAC5I,GAAG,EAAE,aAAa,MAAM,OAAO,EAAE,SAAS,MAAM,MAAM,QAAQ,OAAO,KAAK,SAAS,MAAM,EAAE,OAAO,KAAK,UAAU,OAAO,EAAE,OAAO,KAAK,MAAA,EAAM;AAAA,QAAE;AAAA,MAChJ;AAAA,IACF;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppLauncher.js","sources":["../../../../../../src/legacy/components/layout/AppLauncher/AppLauncher.tsx"],"sourcesContent":["import React from 'react'\
|
|
1
|
+
{"version":3,"file":"AppLauncher.js","sources":["../../../../../../src/legacy/components/layout/AppLauncher/AppLauncher.tsx"],"sourcesContent":["import React from 'react'\n\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\nexport interface LauncherApp {\n /** Título da app (linha principal). */\n title: string\n /** Subtítulo opcional. */\n description?: string\n /** Ícone (ReactNode) — a app passa o seu (ex: <FontAwesomeIcon .../>). */\n icon?: React.ReactNode\n onClick: () => void\n /** Tooltip opcional; default = description || title. */\n title2?: string\n}\n\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\nexport interface AppLauncherProps {\n apps: LauncherApp[]\n /** Cabeçalho (ex: <>Bem-vindo <strong>Vinst</strong></>). O <strong> fica turquesa. */\n heading?: React.ReactNode\n /** Texto quando não há apps. */\n emptyLabel?: string\n /** Fundo: cor sólida (default) ou imagem. */\n bgColor?: string\n bgImage?: string | null\n accentColor1?: string\n accentColor2?: string\n /** Altura da nav do TopNavLayout para o cálculo de min-height. */\n navHeight?: string\n}\n\n/**\n * Ecrã de launcher de aplicações (grid centrado de cartões em vidro sobre fundo\n * escuro). Feito para viver dentro do <main> do TopNavLayout — cancela o padding\n * dele com margens negativas para ficar full-bleed. Ícones vêm da app (ReactNode).\n * @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy.\n */\nexport default function AppLauncher({\n apps,\n heading,\n emptyLabel,\n bgColor = '#001b63',\n bgImage,\n accentColor1 = '#0076ce',\n accentColor2 = '#00d28d',\n navHeight = '3.0625rem',\n}: AppLauncherProps) {\n const useSolidBg = !bgImage\n\n return (\n <div\n style={{\n position: 'relative',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n overflow: 'hidden',\n // Full-bleed dentro do <main> do TopNavLayout (px-3 sm:px-5 py-4).\n margin: '-1rem -0.75rem',\n minHeight: `calc(100dvh - ${navHeight})`,\n backgroundRepeat: 'no-repeat',\n backgroundAttachment: 'fixed',\n backgroundSize: 'cover',\n ...(useSolidBg ? { backgroundColor: bgColor } : { backgroundImage: `url(${bgImage})` }),\n }}\n >\n {useSolidBg && (\n <div style={{ position: 'absolute', inset: 0, overflow: 'hidden', pointerEvents: 'none' }}>\n <div style={{ position: 'absolute', width: '34rem', height: '34rem', borderRadius: '50%', filter: 'blur(90px)', top: '-12rem', right: '-10rem', opacity: 0.22, backgroundColor: accentColor1 }} />\n <div style={{ position: 'absolute', width: '34rem', height: '34rem', borderRadius: '50%', filter: 'blur(90px)', bottom: '-14rem', left: '-12rem', opacity: 0.28, backgroundColor: accentColor2 }} />\n </div>\n )}\n\n <div style={{ position: 'relative', zIndex: 1, width: 'min(1500px, 92%)', margin: '0 auto', padding: 'clamp(1.5rem, 4vh, 3rem) 0' }}>\n {heading && (\n <h2 style={{ margin: '0 0 clamp(1.5rem, 3vh, 2.5rem)', textAlign: 'center', color: '#fff', fontSize: 'clamp(1.35rem, 1.6vw + 0.6rem, 2.25rem)', fontWeight: 700, letterSpacing: '-0.02em' }} className=\"[&_strong]:text-proef-turquoise\">\n {heading}\n </h2>\n )}\n\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: 'repeat(auto-fit, minmax(clamp(280px, 22vw, 340px), 340px))',\n justifyContent: 'center',\n gap: 'clamp(0.875rem, 1vw, 1.25rem)',\n }}\n >\n {apps.map((app, i) => (\n <button\n key={i}\n type=\"button\"\n onClick={app.onClick}\n title={app.title2 ?? app.description ?? app.title}\n className=\"group\"\n style={{\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n gap: 'clamp(0.875rem, 0.8vw, 1.125rem)',\n width: '100%',\n padding: 'clamp(1.125rem, 1.1vw, 1.5rem) clamp(1.25rem, 1.3vw, 1.75rem)',\n textAlign: 'left',\n cursor: 'pointer',\n color: '#fff',\n background: 'rgba(255,255,255,0.07)',\n border: '1px solid rgba(255,255,255,0.14)',\n borderRadius: '10px',\n backdropFilter: 'blur(10px)',\n transition: 'transform .15s ease, background .15s ease, border-color .15s ease',\n }}\n onMouseEnter={(e) => { e.currentTarget.style.transform = 'translateY(-2px)'; e.currentTarget.style.background = 'rgba(255,255,255,0.13)'; e.currentTarget.style.borderColor = '#00d28d' }}\n onMouseLeave={(e) => { e.currentTarget.style.transform = 'translateY(0)'; e.currentTarget.style.background = 'rgba(255,255,255,0.07)'; e.currentTarget.style.borderColor = 'rgba(255,255,255,0.14)' }}\n >\n {app.icon != null && (\n <span style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0, width: 'clamp(2.5rem, 2.4vw, 3.25rem)', height: 'clamp(2.5rem, 2.4vw, 3.25rem)', fontSize: 'clamp(1.05rem, 1vw, 1.35rem)', color: '#00d28d', background: 'rgba(0,210,141,0.12)', borderRadius: '8px' }}>\n {app.icon}\n </span>\n )}\n <span style={{ minWidth: 0 }}>\n <span style={{ display: 'block', fontSize: 'clamp(0.95rem, 0.85vw, 1.15rem)', fontWeight: 600, lineHeight: 1.25 }}>{app.title}</span>\n {app.description && (\n <span style={{ display: 'block', marginTop: '0.2rem', fontSize: 'clamp(0.78rem, 0.7vw, 0.92rem)', lineHeight: 1.3, color: 'rgba(255,255,255,0.6)' }}>{app.description}</span>\n )}\n </span>\n </button>\n ))}\n </div>\n\n {apps.length === 0 && emptyLabel && (\n <p style={{ textAlign: 'center', color: 'rgba(255,255,255,0.6)', fontSize: '0.9rem' }}>{emptyLabel}</p>\n )}\n </div>\n </div>\n )\n}\n"],"names":[],"mappings":";AAqCA,SAAwB,YAAY;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA,eAAe;AAAA,EACf,eAAe;AAAA,EACf,YAAY;AACd,GAAqB;AACnB,QAAM,aAAa,CAAC;AAEpB,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,UAAU;AAAA,QACV,SAAS;AAAA,QACT,eAAe;AAAA,QACf,gBAAgB;AAAA,QAChB,UAAU;AAAA;AAAA,QAEV,QAAQ;AAAA,QACR,WAAW,iBAAiB,SAAS;AAAA,QACrC,kBAAkB;AAAA,QAClB,sBAAsB;AAAA,QACtB,gBAAgB;AAAA,QAChB,GAAI,aAAa,EAAE,iBAAiB,QAAA,IAAY,EAAE,iBAAiB,OAAO,OAAO,IAAA;AAAA,MAAI;AAAA,MAGtF,UAAA;AAAA,QAAA,cACC,qBAAC,OAAA,EAAI,OAAO,EAAE,UAAU,YAAY,OAAO,GAAG,UAAU,UAAU,eAAe,OAAA,GAC/E,UAAA;AAAA,UAAA,oBAAC,OAAA,EAAI,OAAO,EAAE,UAAU,YAAY,OAAO,SAAS,QAAQ,SAAS,cAAc,OAAO,QAAQ,cAAc,KAAK,UAAU,OAAO,UAAU,SAAS,MAAM,iBAAiB,aAAA,EAAa,CAAG;AAAA,UAChM,oBAAC,SAAI,OAAO,EAAE,UAAU,YAAY,OAAO,SAAS,QAAQ,SAAS,cAAc,OAAO,QAAQ,cAAc,QAAQ,UAAU,MAAM,UAAU,SAAS,MAAM,iBAAiB,eAAa,CAAG;A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X,oBAAC,QAAA,EAAK,OAAO,EAAE,SAAS,QAAQ,YAAY,UAAU,gBAAgB,UAAU,YAAY,GAAG,OAAO,iCAAiC,QAAQ,iCAAiC,UAAU,gCAAgC,OAAO,WAAW,YAAY,wBAAwB,cAAc,MAAA,GAC3R,UAAA,IAAI,MACP;AAAA,yCAED,QAAA,EAAK,OAAO,EAAE,UAAU,KACvB,UAAA;AAAA,sBAAA,oBAAC,QAAA,EAAK,OAAO,EAAE,SAAS,SAAS,UAAU,mCAAmC,YAAY,KAAK,YAAY,KAAA,GAAS,cAAI,OAAM;AAAA,sBAC7H,IAAI,eACH,oBAAC,UAAK,OAAO,EAAE,SAAS,SAAS,WAAW,UAAU,UAAU,kCAAkC,YAAY,KAAK,OAAO,2BAA4B,cAAI,YAAA,CAAY;AAAA,oBAAA,EAAA,CAE1K;AAAA,kBAAA;AAAA,gBAAA;AAAA,gBAlCK;AAAA,cAAA,CAoCR;AAAA,YAAA;AAAA,UAAA;AAAA,UAGF,KAAK,WAAW,KAAK,kCACnB,KAAA,EAAE,OAAO,EAAE,WAAW,UAAU,OAAO,yBAAyB,UAAU,SAAA,GAAa,UAAA,WAAA,CAAW;AAAA,QAAA,EAAA,CAEvG;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Error.js","sources":["../../../../../../src/legacy/components/layout/Error/Error.tsx"],"sourcesContent":["import React from 'react'\
|
|
1
|
+
{"version":3,"file":"Error.js","sources":["../../../../../../src/legacy/components/layout/Error/Error.tsx"],"sourcesContent":["import React from 'react'\n\nimport './Error.scss'\n\ninterface ErrorProps {\n messages: string[]\n}\n\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\nconst Error: React.FC<ErrorProps> = ({ messages }) => {\n return (\n <div className=\"error\">\n <div className=\"cui-error\">\n <h4>Ooops....</h4>\n <ul className=\"cui-error-list\">\n {messages ? (\n messages.map((message, index) => (\n <li key={index} className=\"cui-error-message\">\n {message}\n </li>\n ))\n ) : (\n <li>An unexpected error occurred.</li>\n )}\n </ul>\n </div>\n </div>\n )\n}\n\nexport default Error\n"],"names":[],"mappings":";;AASA,MAAM,QAA8B,CAAC,EAAE,eAAe;AACpD,6BACG,OAAA,EAAI,WAAU,SACb,UAAA,qBAAC,OAAA,EAAI,WAAU,aACb,UAAA;AAAA,IAAA,oBAAC,QAAG,UAAA,YAAA,CAAS;AAAA,IACb,oBAAC,QAAG,WAAU,kBACX,qBACC,SAAS,IAAI,CAAC,SAAS,8BACpB,MAAA,EAAe,WAAU,qBACvB,UAAA,QAAA,GADM,KAET,CACD,IAED,oBAAC,MAAA,EAAG,UAAA,gCAAA,CAA6B,EAAA,CAErC;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Footer.js","sources":["../../../../../../src/legacy/components/layout/Footer/Footer.tsx"],"sourcesContent":["import React from 'react'\
|
|
1
|
+
{"version":3,"file":"Footer.js","sources":["../../../../../../src/legacy/components/layout/Footer/Footer.tsx"],"sourcesContent":["import React from 'react'\n\nimport logoIcon from '../../../assets/svgs/proef-footer-logo.svg'\n\nimport './Footer.scss'\n\nexport interface FooterProps {\n /** Nome do responsável pelo tratamento de dados (aviso RGPD). */\n companyName?: string\n /** Email de contacto para exercer direitos RGPD. */\n contactEmail?: string\n}\n\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\nconst Footer: React.FC<FooterProps> = ({\n companyName = 'the data controller',\n contactEmail,\n}) => {\n return (\n <div className=\"cui-footer\">\n <div className=\"cui-footer__container\">\n <p className=\"cui-footer__title\">Developed By</p>\n <img className=\"cui-footer__icon\" src={logoIcon} alt=\"logo\" />\n <p className=\"cui-footer__text\">\n In accordance with the provisions of the Personal Data Protection\n Legislation, we inform you that your personal data will be\n incorporated into our Personal Data File, for the purpose of managing\n our company's contact diary, the party responsible for processing\n your data is {companyName}. You can exercise your rights of access,\n rectification, opposition and erasure through this email address\n {contactEmail ? `, or through the email ${contactEmail}` : ''}.\n </p>\n </div>\n </div>\n )\n}\n\nexport default Footer\n"],"names":[],"mappings":";;;AAcA,MAAM,SAAgC,CAAC;AAAA,EACrC,cAAc;AAAA,EACd;AACF,MAAM;AACJ,6BACG,OAAA,EAAI,WAAU,cACb,UAAA,qBAAC,OAAA,EAAI,WAAU,yBACb,UAAA;AAAA,IAAA,oBAAC,KAAA,EAAE,WAAU,qBAAoB,UAAA,gBAAY;AAAA,wBAC5C,OAAA,EAAI,WAAU,oBAAmB,KAAK,UAAU,KAAI,QAAO;AAAA,IAC5D,qBAAC,KAAA,EAAE,WAAU,oBAAmB,UAAA;AAAA,MAAA;AAAA,MAKhB;AAAA,MAAY;AAAA,MAEzB,eAAe,0BAA0B,YAAY,KAAK;AAAA,MAAG;AAAA,IAAA,EAAA,CAChE;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sources":["../../../../../../src/legacy/components/layout/Header/Header.tsx"],"sourcesContent":["import React, { ReactNode } from 'react'\
|
|
1
|
+
{"version":3,"file":"Header.js","sources":["../../../../../../src/legacy/components/layout/Header/Header.tsx"],"sourcesContent":["import React, { ReactNode } from 'react'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport { faBars, faHouse } from '@fortawesome/free-solid-svg-icons'\nimport './Header.scss'\nimport { IconProp } from '@fortawesome/fontawesome-svg-core'\n\ntype Props = {\n title: string\n subTitle?: string\n icon?: IconProp\n sideBar: boolean\n handleSideBar: () => void\n profile: ReactNode\n handleHome: () => void\n // Sobrepõe o fundo (gradiente/imagem) por defeito. Aceita qualquer valor\n // válido da propriedade CSS \"background\" (cor sólida, gradiente, url(...)).\n background?: string\n}\n\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\nconst Header = ({\n title,\n subTitle,\n icon,\n sideBar,\n handleSideBar,\n profile,\n handleHome,\n background,\n}: Props) => {\n return (\n <div className=\"cui-header\">\n <header\n className=\"cui-header__wrapper\"\n style={background ? ({ '--cui-header-bg': background } as React.CSSProperties) : undefined}\n >\n <div className=\"cui-header__container\">\n <div className=\"cui-header__left\">\n {sideBar && (\n <div className=\"cui-header__sidebar\" onClick={handleSideBar}>\n <FontAwesomeIcon icon={faBars} className=\"cui-header__icon\" />\n </div>\n )}\n <div className=\"cui-header__title\" onClick={handleHome}>\n {icon && (\n <FontAwesomeIcon icon={icon} className=\"cui-header__icon\" />\n )}\n <h1>{title}</h1>\n </div>\n {subTitle && (\n <div className=\"cui-header__subtitle\">\n <h2>{subTitle}</h2>\n </div>\n )}\n </div>\n <div className=\"cui-header__right\">\n <div className=\"cui-header__profile\">{profile}</div>\n </div>\n </div>\n </header>\n </div>\n )\n}\n\nexport default Header\n"],"names":[],"mappings":";;;;AAoBA,MAAM,SAAS,CAAC;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAa;AACX,SACE,oBAAC,OAAA,EAAI,WAAU,cACb,UAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV,OAAO,aAAc,EAAE,mBAAmB,eAAuC;AAAA,MAEjF,UAAA,qBAAC,OAAA,EAAI,WAAU,yBACb,UAAA;AAAA,QAAA,qBAAC,OAAA,EAAI,WAAU,oBACZ,UAAA;AAAA,UAAA,WACC,oBAAC,OAAA,EAAI,WAAU,uBAAsB,SAAS,eAC5C,UAAA,oBAAC,iBAAA,EAAgB,MAAM,QAAQ,WAAU,mBAAA,CAAmB,GAC9D;AAAA,UAEF,qBAAC,OAAA,EAAI,WAAU,qBAAoB,SAAS,YACzC,UAAA;AAAA,YAAA,QACC,oBAAC,iBAAA,EAAgB,MAAY,WAAU,oBAAmB;AAAA,YAE5D,oBAAC,QAAI,UAAA,MAAA,CAAM;AAAA,UAAA,GACb;AAAA,UACC,gCACE,OAAA,EAAI,WAAU,wBACb,UAAA,oBAAC,MAAA,EAAI,oBAAS,EAAA,CAChB;AAAA,QAAA,GAEJ;AAAA,QACA,oBAAC,SAAI,WAAU,qBACb,8BAAC,OAAA,EAAI,WAAU,uBAAuB,UAAA,QAAA,CAAQ,EAAA,CAChD;AAAA,MAAA,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Layout.js","sources":["../../../../../../src/legacy/components/layout/Layout/Layout.tsx"],"sourcesContent":["import React from 'react'\
|
|
1
|
+
{"version":3,"file":"Layout.js","sources":["../../../../../../src/legacy/components/layout/Layout/Layout.tsx"],"sourcesContent":["import React from 'react'\nimport AppShell from '../../../../v1/components/layout/AppShell/AppShell'\nimport { labelsV1, menuV1, type SidebarMenuItem, type SidebarLanguage, type SidebarTheme } from '../Sidebar/Sidebar'\n\n/*\n * Migrado para o V1: a moldura da app é o `AppShell` do V1. Este ficheiro só\n * mantém a API antiga, e os seus textos por omissão, para as apps que ainda a\n * usam.\n */\n\n/** @deprecated Legacy — usar `AppShellProps` do V1. */\nexport interface LayoutProps {\n children: React.ReactNode\n menus: SidebarMenuItem[]\n groupLabels?: Record<string, string>\n appTitle?: string\n /** Barra superior opcional (título/alertas), sticky acima do conteúdo. */\n topBar?: React.ReactNode\n avatar?: React.ReactNode\n onLogout?: () => void\n logoutLabel?: string\n languages?: SidebarLanguage[]\n currentLang?: string\n onLanguageChange?: (code: string) => void\n theme?: SidebarTheme\n onThemeChange?: (theme: SidebarTheme) => void\n themeLabels?: { label?: string; light?: string; dark?: string; system?: string }\n footer?: (isExpanded: boolean) => React.ReactNode\n deployedAt?: string | number | Date\n deployedAtLabel?: string\n /** Estado inicial da sidebar (aberta/fechada). */\n sidebarOpen?: boolean\n /** Chamado quando a pessoa abre/fecha a sidebar. */\n onSidebarOpenChange?: (open: boolean) => void\n /**\n * O que fazer, dentro da app OnePoint, às entradas sem `naApp` definido.\n *\n * Por omissão `true`: o menu aparece inteiro, como sempre apareceu. Um\n * portal com muitas entradas de secretária põe isto a `false` e marca\n * `naApp: true` só nas que servem em telemóvel. Ver `SideNavProps`.\n */\n naAppPorOmissao?: boolean\n}\n\n/** @deprecated Legacy — usar `AppShell` do V1. */\nconst Layout = ({\n children,\n menus,\n currentLang,\n logoutLabel,\n themeLabels,\n deployedAtLabel,\n footer,\n sidebarOpen,\n onSidebarOpenChange,\n ...rest\n}: LayoutProps) => (\n <AppShell\n {...rest}\n menu={menuV1(menus)}\n currentLanguage={currentLang}\n labels={labelsV1({ logoutLabel, themeLabels, deployedAtLabel })}\n sidebarFooter={footer}\n defaultOpen={sidebarOpen}\n onOpenChange={onSidebarOpenChange}\n >\n {children}\n </AppShell>\n)\n\nexport default Layout\n"],"names":[],"mappings":";;;AA6CA,MAAM,SAAS,CAAC;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAAC;AAAA,EAAA;AAAA,IACE,GAAG;AAAA,IACJ,MAAM,OAAO,KAAK;AAAA,IAClB,iBAAiB;AAAA,IACjB,QAAQ,SAAS,EAAE,aAAa,aAAa,iBAAiB;AAAA,IAC9D,eAAe;AAAA,IACf,aAAa;AAAA,IACb,cAAc;AAAA,IAEb;AAAA,EAAA;AACH;"}
|