@proef/common-ui 0.0.0-stage → 2.2.0
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/assets/imagem-6ee08a37d9.png +0 -0
- package/dist/esm/assets/imagem-6fcae1b87b.png +0 -0
- package/dist/esm/index.js +301 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/legacy/assets/svgs/proef-footer-logo.svg.js +5 -0
- package/dist/esm/legacy/assets/svgs/proef-footer-logo.svg.js.map +1 -0
- package/dist/esm/legacy/components/atoms/Acronym/Acronym.css +43 -0
- package/dist/esm/legacy/components/atoms/Acronym/Acronym.js +31 -0
- package/dist/esm/legacy/components/atoms/Acronym/Acronym.js.map +1 -0
- package/dist/esm/legacy/components/atoms/BreadCrumb/BreadCrumb.css +36 -0
- package/dist/esm/legacy/components/atoms/BreadCrumb/BreadCrumb.js +57 -0
- package/dist/esm/legacy/components/atoms/BreadCrumb/BreadCrumb.js.map +1 -0
- package/dist/esm/legacy/components/atoms/Button/variants/ActionButton.css +218 -0
- package/dist/esm/legacy/components/atoms/Button/variants/ActionButton.js +50 -0
- package/dist/esm/legacy/components/atoms/Button/variants/ActionButton.js.map +1 -0
- package/dist/esm/legacy/components/atoms/Button/variants/FilterButton.css +56 -0
- package/dist/esm/legacy/components/atoms/Button/variants/FilterButton.js +34 -0
- package/dist/esm/legacy/components/atoms/Button/variants/FilterButton.js.map +1 -0
- package/dist/esm/legacy/components/atoms/Button/variants/IconButton.css +74 -0
- package/dist/esm/legacy/components/atoms/Button/variants/IconButton.js +29 -0
- package/dist/esm/legacy/components/atoms/Button/variants/IconButton.js.map +1 -0
- package/dist/esm/legacy/components/atoms/Button/variants/MainButton.css +99 -0
- package/dist/esm/legacy/components/atoms/Button/variants/MainButton.js +36 -0
- package/dist/esm/legacy/components/atoms/Button/variants/MainButton.js.map +1 -0
- package/dist/esm/legacy/components/atoms/Button/variants/TabButton.css +63 -0
- package/dist/esm/legacy/components/atoms/Button/variants/TabButton.js +21 -0
- package/dist/esm/legacy/components/atoms/Button/variants/TabButton.js.map +1 -0
- package/dist/esm/legacy/components/atoms/Field/Field.css +171 -0
- package/dist/esm/legacy/components/atoms/Field/Field.js +70 -0
- package/dist/esm/legacy/components/atoms/Field/Field.js.map +1 -0
- package/dist/esm/legacy/components/atoms/IconText/IconText.css +10 -0
- package/dist/esm/legacy/components/atoms/IconText/IconText.js +25 -0
- package/dist/esm/legacy/components/atoms/IconText/IconText.js.map +1 -0
- package/dist/esm/legacy/components/atoms/Icone/Icone.js +24 -0
- package/dist/esm/legacy/components/atoms/Icone/Icone.js.map +1 -0
- package/dist/esm/legacy/components/atoms/Input/Input.css +12 -0
- package/dist/esm/legacy/components/atoms/Input/Input.js +28 -0
- package/dist/esm/legacy/components/atoms/Input/Input.js.map +1 -0
- package/dist/esm/legacy/components/atoms/InputData/InputData.js +25 -0
- package/dist/esm/legacy/components/atoms/InputData/InputData.js.map +1 -0
- package/dist/esm/legacy/components/atoms/Label/Label.css +192 -0
- package/dist/esm/legacy/components/atoms/Label/Label.js +13 -0
- package/dist/esm/legacy/components/atoms/Label/Label.js.map +1 -0
- package/dist/esm/legacy/components/atoms/MultiTagPickerTag/MultiTagPickerTag.css +40 -0
- package/dist/esm/legacy/components/atoms/MultiTagPickerTag/MultiTagPickerTag.js +21 -0
- package/dist/esm/legacy/components/atoms/MultiTagPickerTag/MultiTagPickerTag.js.map +1 -0
- package/dist/esm/legacy/components/atoms/Select/Select.css +16 -0
- package/dist/esm/legacy/components/atoms/Select/Select.js +27 -0
- package/dist/esm/legacy/components/atoms/Select/Select.js.map +1 -0
- package/dist/esm/legacy/components/atoms/Stack/Stack.js +20 -0
- package/dist/esm/legacy/components/atoms/Stack/Stack.js.map +1 -0
- package/dist/esm/legacy/components/atoms/Switch/CustomSwitch.css +36 -0
- package/dist/esm/legacy/components/atoms/Switch/CustomSwitch.js +29 -0
- package/dist/esm/legacy/components/atoms/Switch/CustomSwitch.js.map +1 -0
- package/dist/esm/legacy/components/charts/Charts.js +349 -0
- package/dist/esm/legacy/components/charts/Charts.js.map +1 -0
- package/dist/esm/legacy/components/layout/AppLauncher/AppLauncher.js +100 -0
- package/dist/esm/legacy/components/layout/AppLauncher/AppLauncher.js.map +1 -0
- package/dist/esm/legacy/components/layout/Error/Error.css +20 -0
- package/dist/esm/legacy/components/layout/Error/Error.js +12 -0
- package/dist/esm/legacy/components/layout/Error/Error.js.map +1 -0
- package/dist/esm/legacy/components/layout/Footer/Footer.css +42 -0
- package/dist/esm/legacy/components/layout/Footer/Footer.js +23 -0
- package/dist/esm/legacy/components/layout/Footer/Footer.js.map +1 -0
- package/dist/esm/legacy/components/layout/Header/Header.css +66 -0
- package/dist/esm/legacy/components/layout/Header/Header.js +37 -0
- package/dist/esm/legacy/components/layout/Header/Header.js.map +1 -0
- package/dist/esm/legacy/components/layout/Layout/Layout.js +31 -0
- package/dist/esm/legacy/components/layout/Layout/Layout.js.map +1 -0
- package/dist/esm/legacy/components/layout/Sidebar/Sidebar.js +38 -0
- package/dist/esm/legacy/components/layout/Sidebar/Sidebar.js.map +1 -0
- package/dist/esm/legacy/components/layout/Spinner/Spinner.css +10 -0
- package/dist/esm/legacy/components/layout/Spinner/Spinner.js +19 -0
- package/dist/esm/legacy/components/layout/Spinner/Spinner.js.map +1 -0
- package/dist/esm/legacy/components/layout/TopBar/TopBar.js +34 -0
- package/dist/esm/legacy/components/layout/TopBar/TopBar.js.map +1 -0
- package/dist/esm/legacy/components/layout/TopNavLayout/TopNavLayout.js +82 -0
- package/dist/esm/legacy/components/layout/TopNavLayout/TopNavLayout.js.map +1 -0
- package/dist/esm/legacy/components/molecules/BarraValor/BarraValor.js +25 -0
- package/dist/esm/legacy/components/molecules/BarraValor/BarraValor.js.map +1 -0
- package/dist/esm/legacy/components/molecules/ColumnPicker/ColumnPicker.js +246 -0
- package/dist/esm/legacy/components/molecules/ColumnPicker/ColumnPicker.js.map +1 -0
- package/dist/esm/legacy/components/molecules/ConfirmModal/ConfirmModal.css +3 -0
- package/dist/esm/legacy/components/molecules/ConfirmModal/ConfirmModal.js +33 -0
- package/dist/esm/legacy/components/molecules/ConfirmModal/ConfirmModal.js.map +1 -0
- package/dist/esm/legacy/components/molecules/DataTable/DataTable.js +1259 -0
- package/dist/esm/legacy/components/molecules/DataTable/DataTable.js.map +1 -0
- package/dist/esm/legacy/components/molecules/FileDropzone/FileDropzone.js +68 -0
- package/dist/esm/legacy/components/molecules/FileDropzone/FileDropzone.js.map +1 -0
- package/dist/esm/legacy/components/molecules/LanguageSwitcher/LanguageSwitcher.js +96 -0
- package/dist/esm/legacy/components/molecules/LanguageSwitcher/LanguageSwitcher.js.map +1 -0
- package/dist/esm/legacy/components/molecules/Modal/Modal.css +54 -0
- package/dist/esm/legacy/components/molecules/Modal/Modal.js +64 -0
- package/dist/esm/legacy/components/molecules/Modal/Modal.js.map +1 -0
- package/dist/esm/legacy/components/molecules/MultiTagPicker/MultiTagPicker.css +97 -0
- package/dist/esm/legacy/components/molecules/MultiTagPicker/MultiTagPicker.js +113 -0
- package/dist/esm/legacy/components/molecules/MultiTagPicker/MultiTagPicker.js.map +1 -0
- package/dist/esm/legacy/components/molecules/PhotoAvatar/PhotoAvatar.js +114 -0
- package/dist/esm/legacy/components/molecules/PhotoAvatar/PhotoAvatar.js.map +1 -0
- package/dist/esm/legacy/components/molecules/SeletorPesquisa/SeletorPesquisa.js +116 -0
- package/dist/esm/legacy/components/molecules/SeletorPesquisa/SeletorPesquisa.js.map +1 -0
- package/dist/esm/legacy/components/molecules/Sidebar/Sidebar.css +69 -0
- package/dist/esm/legacy/components/molecules/Sidebar/Sidebar.js +62 -0
- package/dist/esm/legacy/components/molecules/Sidebar/Sidebar.js.map +1 -0
- package/dist/esm/legacy/components/molecules/UserAvatar/UserAvatar.js +23 -0
- package/dist/esm/legacy/components/molecules/UserAvatar/UserAvatar.js.map +1 -0
- package/dist/esm/legacy/components/organisms/GanttChart/GanttChart.js +162 -0
- package/dist/esm/legacy/components/organisms/GanttChart/GanttChart.js.map +1 -0
- package/dist/esm/legacy/components/organisms/Kanban/Kanban.js +88 -0
- package/dist/esm/legacy/components/organisms/Kanban/Kanban.js.map +1 -0
- package/dist/esm/legacy/components/organisms/LazyLoader/LazyLoader.js +87 -0
- package/dist/esm/legacy/components/organisms/LazyLoader/LazyLoader.js.map +1 -0
- package/dist/esm/legacy/components/organisms/MapaPontos/MapaPontos.js +427 -0
- package/dist/esm/legacy/components/organisms/MapaPontos/MapaPontos.js.map +1 -0
- package/dist/esm/legacy/components/organisms/PainelFiltros/PainelFiltros.js +218 -0
- package/dist/esm/legacy/components/organisms/PainelFiltros/PainelFiltros.js.map +1 -0
- package/dist/esm/legacy/components/organisms/PesquisaRapida/PesquisaRapida.js +147 -0
- package/dist/esm/legacy/components/organisms/PesquisaRapida/PesquisaRapida.js.map +1 -0
- package/dist/esm/legacy/components/organisms/Profile/Profile.css +26 -0
- package/dist/esm/legacy/components/organisms/Profile/Profile.js +26 -0
- package/dist/esm/legacy/components/organisms/Profile/Profile.js.map +1 -0
- package/dist/esm/legacy/components/organisms/RoleGuard/RoleGuard.js +79 -0
- package/dist/esm/legacy/components/organisms/RoleGuard/RoleGuard.js.map +1 -0
- package/dist/esm/legacy/components/organisms/Selector/Selector.css +87 -0
- package/dist/esm/legacy/components/organisms/Selector/Selector.js +181 -0
- package/dist/esm/legacy/components/organisms/Selector/Selector.js.map +1 -0
- package/dist/esm/legacy/components/organisms/StatusMatrix/StatusMatrix.js +115 -0
- package/dist/esm/legacy/components/organisms/StatusMatrix/StatusMatrix.js.map +1 -0
- package/dist/esm/legacy/components/ui/Avisos.js +33 -0
- package/dist/esm/legacy/components/ui/Avisos.js.map +1 -0
- package/dist/esm/legacy/components/ui/BarraAcoes.js +19 -0
- package/dist/esm/legacy/components/ui/BarraAcoes.js.map +1 -0
- package/dist/esm/legacy/components/ui/CabecalhoPagina.js +19 -0
- package/dist/esm/legacy/components/ui/CabecalhoPagina.js.map +1 -0
- package/dist/esm/legacy/components/ui/CaixaPesquisa.js +9 -0
- package/dist/esm/legacy/components/ui/CaixaPesquisa.js.map +1 -0
- package/dist/esm/legacy/components/ui/Confirmacao.js +34 -0
- package/dist/esm/legacy/components/ui/Confirmacao.js.map +1 -0
- package/dist/esm/legacy/components/ui/Escolha.js +41 -0
- package/dist/esm/legacy/components/ui/Escolha.js.map +1 -0
- package/dist/esm/legacy/components/ui/FaixaAviso.js +19 -0
- package/dist/esm/legacy/components/ui/FaixaAviso.js.map +1 -0
- package/dist/esm/legacy/components/ui/MenuAcoes.js +116 -0
- package/dist/esm/legacy/components/ui/MenuAcoes.js.map +1 -0
- package/dist/esm/legacy/components/ui/Passos.js +32 -0
- package/dist/esm/legacy/components/ui/Passos.js.map +1 -0
- package/dist/esm/legacy/components/ui/Separadores.js +17 -0
- package/dist/esm/legacy/components/ui/Separadores.js.map +1 -0
- package/dist/esm/legacy/components/ui/TextoAuto.js +33 -0
- package/dist/esm/legacy/components/ui/TextoAuto.js.map +1 -0
- package/dist/esm/legacy/components/ui/Ui.js +263 -0
- package/dist/esm/legacy/components/ui/Ui.js.map +1 -0
- package/dist/esm/legacy/components/ui/painelFlutuante.js +13 -0
- package/dist/esm/legacy/components/ui/painelFlutuante.js.map +1 -0
- package/dist/esm/legacy/constants/Colors.js +33 -0
- package/dist/esm/legacy/constants/Colors.js.map +1 -0
- package/dist/esm/legacy/constants/FontWeight.js +35 -0
- package/dist/esm/legacy/constants/FontWeight.js.map +1 -0
- package/dist/esm/legacy/contexts/apiContext.js +25 -0
- package/dist/esm/legacy/contexts/apiContext.js.map +1 -0
- package/dist/esm/legacy/contexts/authContext.js +85 -0
- package/dist/esm/legacy/contexts/authContext.js.map +1 -0
- package/dist/esm/legacy/contexts/socketContext.js +34 -0
- package/dist/esm/legacy/contexts/socketContext.js.map +1 -0
- package/dist/esm/legacy/hooks/useApi.js +62 -0
- package/dist/esm/legacy/hooks/useApi.js.map +1 -0
- package/dist/esm/legacy/pages/Error/ErrorPage.css +18 -0
- package/dist/esm/legacy/pages/Error/ErrorPage.js +50 -0
- package/dist/esm/legacy/pages/Error/ErrorPage.js.map +1 -0
- package/dist/esm/legacy/pages/Loading/Loading.css +46 -0
- package/dist/esm/legacy/pages/Loading/Loading.js +9 -0
- package/dist/esm/legacy/pages/Loading/Loading.js.map +1 -0
- package/dist/esm/legacy/pages/Login/LoginScreen.js +46 -0
- package/dist/esm/legacy/pages/Login/LoginScreen.js.map +1 -0
- package/dist/esm/legacy/pages/NotFound/NotFound.css +21 -0
- package/dist/esm/legacy/pages/NotFound/NotFound.js +24 -0
- package/dist/esm/legacy/pages/NotFound/NotFound.js.map +1 -0
- package/dist/esm/legacy/styles/themes/ButtonThemes.js +28 -0
- package/dist/esm/legacy/styles/themes/ButtonThemes.js.map +1 -0
- package/dist/esm/legacy/styles/utils/utils.js +7 -0
- package/dist/esm/legacy/styles/utils/utils.js.map +1 -0
- package/dist/esm/legacy/utils/stringUtils.js +35 -0
- package/dist/esm/legacy/utils/stringUtils.js.map +1 -0
- package/dist/esm/v1/capabilities/documents/QRScanning/scanQRCodes.js +157 -0
- package/dist/esm/v1/capabilities/documents/QRScanning/scanQRCodes.js.map +1 -0
- package/dist/esm/v1/capabilities/overlay/useFloatingPanel.js +52 -0
- package/dist/esm/v1/capabilities/overlay/useFloatingPanel.js.map +1 -0
- package/dist/esm/v1/capabilities/theme/useIsDark.js +15 -0
- package/dist/esm/v1/capabilities/theme/useIsDark.js.map +1 -0
- package/dist/esm/v1/capabilities/theme/useTheme.js +66 -0
- package/dist/esm/v1/capabilities/theme/useTheme.js.map +1 -0
- package/dist/esm/v1/components/data/Pagination/Pagination.js +66 -0
- package/dist/esm/v1/components/data/Pagination/Pagination.js.map +1 -0
- package/dist/esm/v1/components/documents/DocumentDropzone/DocumentDropzone.js +307 -0
- package/dist/esm/v1/components/documents/DocumentDropzone/DocumentDropzone.js.map +1 -0
- package/dist/esm/v1/components/feedback/Toast/Toast.js +105 -0
- package/dist/esm/v1/components/feedback/Toast/Toast.js.map +1 -0
- package/dist/esm/v1/components/forms/FormField/FormField.js +59 -0
- package/dist/esm/v1/components/forms/FormField/FormField.js.map +1 -0
- package/dist/esm/v1/components/forms/FormGrid/FormGrid.js +20 -0
- package/dist/esm/v1/components/forms/FormGrid/FormGrid.js.map +1 -0
- package/dist/esm/v1/components/layout/AppShell/AppShell.js +89 -0
- package/dist/esm/v1/components/layout/AppShell/AppShell.js.map +1 -0
- package/dist/esm/v1/components/layout/Page/Page.js +16 -0
- package/dist/esm/v1/components/layout/Page/Page.js.map +1 -0
- package/dist/esm/v1/components/layout/PageHeader/PageHeader.js +26 -0
- package/dist/esm/v1/components/layout/PageHeader/PageHeader.js.map +1 -0
- package/dist/esm/v1/components/layout/SideNav/SideNav.js +287 -0
- package/dist/esm/v1/components/layout/SideNav/SideNav.js.map +1 -0
- package/dist/esm/v1/components/layout/navTrail.js +19 -0
- package/dist/esm/v1/components/layout/navTrail.js.map +1 -0
- package/dist/esm/v1/components/lists/ListFinder/ListFinder.js +214 -0
- package/dist/esm/v1/components/lists/ListFinder/ListFinder.js.map +1 -0
- package/dist/esm/v1/components/lists/ListFinder/labels.js +18 -0
- package/dist/esm/v1/components/lists/ListFinder/labels.js.map +1 -0
- package/dist/esm/v1/components/overlays/ConfirmDialog/ConfirmDialog.js +95 -0
- package/dist/esm/v1/components/overlays/ConfirmDialog/ConfirmDialog.js.map +1 -0
- package/dist/esm/v1/components/overlays/Dialog/Dialog.js +141 -0
- package/dist/esm/v1/components/overlays/Dialog/Dialog.js.map +1 -0
- package/dist/esm/v1/components/overlays/Tooltip/Tooltip.js +98 -0
- package/dist/esm/v1/components/overlays/Tooltip/Tooltip.js.map +1 -0
- package/dist/esm/v1/components/overlays/Tooltip/TooltipLayer.js +84 -0
- package/dist/esm/v1/components/overlays/Tooltip/TooltipLayer.js.map +1 -0
- package/dist/esm/v1/components/overlays/Tooltip/TooltipPanel.js +33 -0
- package/dist/esm/v1/components/overlays/Tooltip/TooltipPanel.js.map +1 -0
- package/dist/esm/v1/components/overlays/topLayer.js +28 -0
- package/dist/esm/v1/components/overlays/topLayer.js.map +1 -0
- package/dist/esm/v1/components/tables/PaginatedTable/PaginatedTable.js +50 -0
- package/dist/esm/v1/components/tables/PaginatedTable/PaginatedTable.js.map +1 -0
- package/dist/esm/v1/components/tables/Table/ColumnFilter.js +292 -0
- package/dist/esm/v1/components/tables/Table/ColumnFilter.js.map +1 -0
- package/dist/esm/v1/components/tables/Table/OverlayScrollbar.js +129 -0
- package/dist/esm/v1/components/tables/Table/OverlayScrollbar.js.map +1 -0
- package/dist/esm/v1/components/tables/Table/Table.js +1410 -0
- package/dist/esm/v1/components/tables/Table/Table.js.map +1 -0
- package/dist/esm/v1/components/tables/Table/labels.js +44 -0
- package/dist/esm/v1/components/tables/Table/labels.js.map +1 -0
- package/dist/esm/v1/foundations/icons/icons.js +178 -0
- package/dist/esm/v1/foundations/icons/icons.js.map +1 -0
- package/dist/esm/v1/primitives/buttons/Button/Button.js +41 -0
- package/dist/esm/v1/primitives/buttons/Button/Button.js.map +1 -0
- package/dist/esm/v1/primitives/buttons/SegmentedControl/SegmentedControl.js +65 -0
- package/dist/esm/v1/primitives/buttons/SegmentedControl/SegmentedControl.js.map +1 -0
- package/dist/esm/v1/primitives/buttons/SegmentedControl/segmentedStyles.js +10 -0
- package/dist/esm/v1/primitives/buttons/SegmentedControl/segmentedStyles.js.map +1 -0
- package/dist/esm/v1/primitives/display/Avatar/Avatar.js +120 -0
- package/dist/esm/v1/primitives/display/Avatar/Avatar.js.map +1 -0
- package/dist/esm/v1/primitives/display/Badge/Badge.js +23 -0
- package/dist/esm/v1/primitives/display/Badge/Badge.js.map +1 -0
- package/dist/esm/v1/primitives/display/Card/Card.js +22 -0
- package/dist/esm/v1/primitives/display/Card/Card.js.map +1 -0
- package/dist/esm/v1/primitives/display/FilterChips/FilterChips.js +45 -0
- package/dist/esm/v1/primitives/display/FilterChips/FilterChips.js.map +1 -0
- package/dist/esm/v1/primitives/display/Kpi/Kpi.js +103 -0
- package/dist/esm/v1/primitives/display/Kpi/Kpi.js.map +1 -0
- package/dist/esm/v1/primitives/display/Notice/Notice.js +71 -0
- package/dist/esm/v1/primitives/display/Notice/Notice.js.map +1 -0
- package/dist/esm/v1/primitives/display/Person/Person.js +14 -0
- package/dist/esm/v1/primitives/display/Person/Person.js.map +1 -0
- package/dist/esm/v1/primitives/documents/PdfPreview/PdfPreview.js +137 -0
- package/dist/esm/v1/primitives/documents/PdfPreview/PdfPreview.js.map +1 -0
- package/dist/esm/v1/primitives/documents/PdfPreview/pdfjs.js +26 -0
- package/dist/esm/v1/primitives/documents/PdfPreview/pdfjs.js.map +1 -0
- package/dist/esm/v1/primitives/forms/Checkbox/Checkbox.js +37 -0
- package/dist/esm/v1/primitives/forms/Checkbox/Checkbox.js.map +1 -0
- package/dist/esm/v1/primitives/forms/DateInput/DateInput.js +150 -0
- package/dist/esm/v1/primitives/forms/DateInput/DateInput.js.map +1 -0
- package/dist/esm/v1/primitives/forms/LookupInput/LookupInput.js +37 -0
- package/dist/esm/v1/primitives/forms/LookupInput/LookupInput.js.map +1 -0
- package/dist/esm/v1/primitives/forms/SearchInput/SearchInput.js +43 -0
- package/dist/esm/v1/primitives/forms/SearchInput/SearchInput.js.map +1 -0
- package/dist/esm/v1/primitives/forms/SelectInput/SelectInput.js +207 -0
- package/dist/esm/v1/primitives/forms/SelectInput/SelectInput.js.map +1 -0
- package/dist/esm/v1/primitives/forms/TextArea/TextArea.js +75 -0
- package/dist/esm/v1/primitives/forms/TextArea/TextArea.js.map +1 -0
- package/dist/esm/v1/primitives/forms/TextInput/TextInput.js +21 -0
- package/dist/esm/v1/primitives/forms/TextInput/TextInput.js.map +1 -0
- package/dist/esm/v1/primitives/forms/field.js +14 -0
- package/dist/esm/v1/primitives/forms/field.js.map +1 -0
- package/dist/esm/v1/primitives/lists/ListItem/ListItem.js +39 -0
- package/dist/esm/v1/primitives/lists/ListItem/ListItem.js.map +1 -0
- package/dist/esm/v1/primitives/navigation/Tabs/Tabs.js +96 -0
- package/dist/esm/v1/primitives/navigation/Tabs/Tabs.js.map +1 -0
- package/dist/style.components.css +3 -0
- package/dist/style.css +2 -0
- package/dist/style.layered.css +2 -0
- package/dist/tailwind.css +24 -0
- package/dist/theme-boot.js +1 -0
- package/dist/theme.css +265 -0
- package/dist/tokens.css +121 -0
- package/dist/types/index.d.ts +14 -0
- package/dist/types/legacy/components/atoms/Acronym/Acronym.d.ts +11 -0
- package/dist/types/legacy/components/atoms/BreadCrumb/BreadCrumb.d.ts +9 -0
- package/dist/types/legacy/components/atoms/Button/variants/ActionButton.d.ts +14 -0
- package/dist/types/legacy/components/atoms/Button/variants/FilterButton.d.ts +12 -0
- package/dist/types/legacy/components/atoms/Button/variants/IconButton.d.ts +22 -0
- package/dist/types/legacy/components/atoms/Button/variants/MainButton.d.ts +17 -0
- package/dist/types/legacy/components/atoms/Button/variants/TabButton.d.ts +14 -0
- package/dist/types/legacy/components/atoms/Field/Field.d.ts +15 -0
- package/dist/types/legacy/components/atoms/IconText/IconText.d.ts +12 -0
- package/dist/types/legacy/components/atoms/Icone/Icone.d.ts +31 -0
- package/dist/types/legacy/components/atoms/Input/Input.d.ts +13 -0
- package/dist/types/legacy/components/atoms/InputData/InputData.d.ts +38 -0
- package/dist/types/legacy/components/atoms/Label/Label.d.ts +11 -0
- package/dist/types/legacy/components/atoms/MultiTagPickerTag/MultiTagPickerTag.d.ts +10 -0
- package/dist/types/legacy/components/atoms/SearchSelect/SearchSelect.d.ts +15 -0
- package/dist/types/legacy/components/atoms/Select/Select.d.ts +16 -0
- package/dist/types/legacy/components/atoms/Stack/Stack.d.ts +9 -0
- package/dist/types/legacy/components/atoms/Switch/CustomSwitch.d.ts +12 -0
- package/dist/types/legacy/components/charts/Charts.d.ts +149 -0
- package/dist/types/legacy/components/layout/AppLauncher/AppLauncher.d.ts +35 -0
- package/dist/types/legacy/components/layout/Error/Error.d.ts +8 -0
- package/dist/types/legacy/components/layout/Footer/Footer.d.ts +11 -0
- package/dist/types/legacy/components/layout/Header/Header.d.ts +16 -0
- package/dist/types/legacy/components/layout/Layout/Layout.d.ts +35 -0
- package/dist/types/legacy/components/layout/Sidebar/Sidebar.d.ts +56 -0
- package/dist/types/legacy/components/layout/Spinner/Spinner.d.ts +5 -0
- package/dist/types/legacy/components/layout/TopBar/TopBar.d.ts +10 -0
- package/dist/types/legacy/components/layout/TopNavLayout/TopNavLayout.d.ts +43 -0
- package/dist/types/legacy/components/molecules/BarraValor/BarraValor.d.ts +28 -0
- package/dist/types/legacy/components/molecules/ColumnPicker/ColumnPicker.d.ts +116 -0
- package/dist/types/legacy/components/molecules/ConfirmModal/ConfirmModal.d.ts +13 -0
- package/dist/types/legacy/components/molecules/DataTable/DataTable.d.ts +344 -0
- package/dist/types/legacy/components/molecules/FileDropzone/FileDropzone.d.ts +25 -0
- package/dist/types/legacy/components/molecules/LanguageSwitcher/LanguageSwitcher.d.ts +33 -0
- package/dist/types/legacy/components/molecules/Modal/Modal.d.ts +22 -0
- package/dist/types/legacy/components/molecules/MultiTagPicker/MultiTagPicker.d.ts +25 -0
- package/dist/types/legacy/components/molecules/PhotoAvatar/PhotoAvatar.d.ts +34 -0
- package/dist/types/legacy/components/molecules/SeletorPesquisa/SeletorPesquisa.d.ts +48 -0
- package/dist/types/legacy/components/molecules/Sidebar/Sidebar.d.ts +12 -0
- package/dist/types/legacy/components/molecules/UserAvatar/UserAvatar.d.ts +19 -0
- package/dist/types/legacy/components/organisms/GanttChart/GanttChart.d.ts +62 -0
- package/dist/types/legacy/components/organisms/Kanban/Kanban.d.ts +44 -0
- package/dist/types/legacy/components/organisms/LazyLoader/LazyLoader.d.ts +16 -0
- package/dist/types/legacy/components/organisms/MapaPontos/MapaPontos.d.ts +206 -0
- package/dist/types/legacy/components/organisms/PainelFiltros/PainelFiltros.d.ts +69 -0
- package/dist/types/legacy/components/organisms/PesquisaRapida/PesquisaRapida.d.ts +53 -0
- package/dist/types/legacy/components/organisms/Profile/Profile.d.ts +12 -0
- package/dist/types/legacy/components/organisms/RoleGuard/RoleGuard.d.ts +37 -0
- package/dist/types/legacy/components/organisms/Selector/Selector.d.ts +20 -0
- package/dist/types/legacy/components/organisms/StatusMatrix/StatusMatrix.d.ts +54 -0
- package/dist/types/legacy/components/ui/Avisos.d.ts +33 -0
- package/dist/types/legacy/components/ui/BarraAcoes.d.ts +19 -0
- package/dist/types/legacy/components/ui/CabecalhoPagina.d.ts +23 -0
- package/dist/types/legacy/components/ui/CaixaPesquisa.d.ts +14 -0
- package/dist/types/legacy/components/ui/Confirmacao.d.ts +24 -0
- package/dist/types/legacy/components/ui/Escolha.d.ts +35 -0
- package/dist/types/legacy/components/ui/FaixaAviso.d.ts +19 -0
- package/dist/types/legacy/components/ui/MenuAcoes.d.ts +31 -0
- package/dist/types/legacy/components/ui/Passos.d.ts +31 -0
- package/dist/types/legacy/components/ui/Separadores.d.ts +19 -0
- package/dist/types/legacy/components/ui/TextoAuto.d.ts +23 -0
- package/dist/types/legacy/components/ui/Ui.d.ts +181 -0
- package/dist/types/legacy/components/ui/painelFlutuante.d.ts +16 -0
- package/dist/types/legacy/constants/Colors.d.ts +28 -0
- package/dist/types/legacy/constants/FontWeight.d.ts +9 -0
- package/dist/types/legacy/contexts/apiContext.d.ts +10 -0
- package/dist/types/legacy/contexts/authContext.d.ts +31 -0
- package/dist/types/legacy/contexts/socketContext.d.ts +16 -0
- package/dist/types/legacy/exports/assets.d.ts +0 -0
- package/dist/types/legacy/exports/atoms.d.ts +19 -0
- package/dist/types/legacy/exports/charts.d.ts +2 -0
- package/dist/types/legacy/exports/constants.d.ts +0 -0
- package/dist/types/legacy/exports/contexts.d.ts +3 -0
- package/dist/types/legacy/exports/hooks.d.ts +4 -0
- package/dist/types/legacy/exports/layout.d.ts +14 -0
- package/dist/types/legacy/exports/molecules.d.ts +21 -0
- package/dist/types/legacy/exports/organisms.d.ts +17 -0
- package/dist/types/legacy/exports/pages.d.ts +5 -0
- package/dist/types/legacy/exports/styles.d.ts +2 -0
- package/dist/types/legacy/exports/types.d.ts +7 -0
- package/dist/types/legacy/exports/ui.d.ts +24 -0
- package/dist/types/legacy/exports/utils.d.ts +1 -0
- package/dist/types/legacy/hooks/useApi.d.ts +19 -0
- package/dist/types/legacy/pages/Error/ErrorPage.d.ts +16 -0
- package/dist/types/legacy/pages/Loading/Loading.d.ts +8 -0
- package/dist/types/legacy/pages/Login/LoginScreen.d.ts +42 -0
- package/dist/types/legacy/pages/NotFound/NotFound.d.ts +8 -0
- package/dist/types/legacy/styles/themes/ButtonThemes.d.ts +6 -0
- package/dist/types/legacy/styles/utils/utils.d.ts +2 -0
- package/dist/types/legacy/types/Fetcher.d.ts +5 -0
- package/dist/types/legacy/types/LoggedUser.d.ts +10 -0
- package/dist/types/legacy/types/SelectableElement.d.ts +6 -0
- package/dist/types/legacy/types/SidebarMenu.d.ts +12 -0
- package/dist/types/legacy/types/themes/AcronymThemes.d.ts +4 -0
- package/dist/types/legacy/types/themes/ButtonThemes.d.ts +21 -0
- package/dist/types/legacy/types/themes/CustomSwitchThemes.d.ts +4 -0
- package/dist/types/legacy/types/themes/IconTextThemes.d.ts +6 -0
- package/dist/types/legacy/utils/keycloak.d.ts +0 -0
- package/dist/types/legacy/utils/stringUtils.d.ts +6 -0
- package/dist/types/v1/capabilities/documents/QRScanning/scanQRCodes.d.ts +25 -0
- package/dist/types/v1/capabilities/overlay/useFloatingPanel.d.ts +20 -0
- package/dist/types/v1/capabilities/theme/useIsDark.d.ts +10 -0
- package/dist/types/v1/capabilities/theme/useTheme.d.ts +29 -0
- package/dist/types/v1/components/data/Pagination/Pagination.d.ts +33 -0
- package/dist/types/v1/components/documents/DocumentDropzone/DocumentDropzone.d.ts +60 -0
- package/dist/types/v1/components/feedback/Toast/Toast.d.ts +51 -0
- package/dist/types/v1/components/forms/FormField/FormField.d.ts +44 -0
- package/dist/types/v1/components/forms/FormGrid/FormGrid.d.ts +23 -0
- package/dist/types/v1/components/layout/AppShell/AppShell.d.ts +35 -0
- package/dist/types/v1/components/layout/Page/Page.d.ts +23 -0
- package/dist/types/v1/components/layout/PageHeader/PageHeader.d.ts +35 -0
- package/dist/types/v1/components/layout/SideNav/SideNav.d.ts +92 -0
- package/dist/types/v1/components/layout/navTrail.d.ts +15 -0
- package/dist/types/v1/components/lists/ListFinder/ListFinder.d.ts +60 -0
- package/dist/types/v1/components/lists/ListFinder/labels.d.ts +24 -0
- package/dist/types/v1/components/overlays/ConfirmDialog/ConfirmDialog.d.ts +59 -0
- package/dist/types/v1/components/overlays/Dialog/Dialog.d.ts +66 -0
- package/dist/types/v1/components/overlays/Tooltip/Tooltip.d.ts +34 -0
- package/dist/types/v1/components/overlays/Tooltip/TooltipLayer.d.ts +18 -0
- package/dist/types/v1/components/overlays/Tooltip/TooltipPanel.d.ts +23 -0
- package/dist/types/v1/components/overlays/topLayer.d.ts +23 -0
- package/dist/types/v1/components/tables/PaginatedTable/PaginatedTable.d.ts +41 -0
- package/dist/types/v1/components/tables/Table/ColumnFilter.d.ts +48 -0
- package/dist/types/v1/components/tables/Table/OverlayScrollbar.d.ts +34 -0
- package/dist/types/v1/components/tables/Table/Table.d.ts +250 -0
- package/dist/types/v1/components/tables/Table/labels.d.ts +54 -0
- package/dist/types/v1/foundations/icons/icons.d.ts +61 -0
- package/dist/types/v1/index.d.ts +81 -0
- package/dist/types/v1/primitives/buttons/Button/Button.d.ts +35 -0
- package/dist/types/v1/primitives/buttons/SegmentedControl/SegmentedControl.d.ts +28 -0
- package/dist/types/v1/primitives/buttons/SegmentedControl/segmentedStyles.d.ts +16 -0
- package/dist/types/v1/primitives/display/Avatar/Avatar.d.ts +30 -0
- package/dist/types/v1/primitives/display/Badge/Badge.d.ts +25 -0
- package/dist/types/v1/primitives/display/Card/Card.d.ts +22 -0
- package/dist/types/v1/primitives/display/FilterChips/FilterChips.d.ts +33 -0
- package/dist/types/v1/primitives/display/Kpi/Kpi.d.ts +68 -0
- package/dist/types/v1/primitives/display/Notice/Notice.d.ts +29 -0
- package/dist/types/v1/primitives/display/Person/Person.d.ts +15 -0
- package/dist/types/v1/primitives/documents/PdfPreview/PdfPreview.d.ts +17 -0
- package/dist/types/v1/primitives/documents/PdfPreview/pdfjs.d.ts +11 -0
- package/dist/types/v1/primitives/forms/Checkbox/Checkbox.d.ts +25 -0
- package/dist/types/v1/primitives/forms/DateInput/DateInput.d.ts +43 -0
- package/dist/types/v1/primitives/forms/LookupInput/LookupInput.d.ts +28 -0
- package/dist/types/v1/primitives/forms/SearchInput/SearchInput.d.ts +23 -0
- package/dist/types/v1/primitives/forms/SelectInput/SelectInput.d.ts +70 -0
- package/dist/types/v1/primitives/forms/TextArea/TextArea.d.ts +40 -0
- package/dist/types/v1/primitives/forms/TextInput/TextInput.d.ts +16 -0
- package/dist/types/v1/primitives/forms/field.d.ts +22 -0
- package/dist/types/v1/primitives/lists/ListItem/ListItem.d.ts +36 -0
- package/dist/types/v1/primitives/navigation/Tabs/Tabs.d.ts +58 -0
- package/package.json +120 -6
- package/README.md +0 -3
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Quadro em colunas, ao estilo do Planner/Jira.
|
|
4
|
+
*
|
|
5
|
+
* Não conhece domínio nenhum: recebe as colunas, os itens, a função que diz em
|
|
6
|
+
* que coluna cai cada item e o que desenhar dentro do cartão. Foi extraído do
|
|
7
|
+
* quadro do portal de Tickets, que estava preso aos tipos daquele projeto.
|
|
8
|
+
*
|
|
9
|
+
* Arrastar e largar é opcional: sem `onMover`, o quadro é só de leitura — é o
|
|
10
|
+
* caso de quem mostra dados de um sistema externo que não pode escrever.
|
|
11
|
+
* @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy.
|
|
12
|
+
*/
|
|
13
|
+
export interface KanbanColuna {
|
|
14
|
+
id: string;
|
|
15
|
+
titulo: string;
|
|
16
|
+
/** Classe de cor do ponto do cabeçalho (ex: `bg-emerald-500`). */
|
|
17
|
+
cor?: string;
|
|
18
|
+
/** Conteúdo extra no cabeçalho, à direita da contagem (ex: total de horas). */
|
|
19
|
+
extra?: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */
|
|
22
|
+
export interface KanbanProps<T> {
|
|
23
|
+
colunas: KanbanColuna[];
|
|
24
|
+
itens: T[];
|
|
25
|
+
/** Em que coluna cai o item — devolve o `id` da coluna. */
|
|
26
|
+
colunaDoItem: (item: T) => string;
|
|
27
|
+
chaveDoItem: (item: T) => string;
|
|
28
|
+
/** Conteúdo do cartão. O invólucro (moldura, arrastar, clique) é do Kanban. */
|
|
29
|
+
cartao: (item: T) => ReactNode;
|
|
30
|
+
onAbrirItem?: (item: T) => void;
|
|
31
|
+
/**
|
|
32
|
+
* Largar um cartão noutra coluna. Sem isto não há arrastar: um quadro de
|
|
33
|
+
* leitura não deve sugerir que se pode mexer.
|
|
34
|
+
*/
|
|
35
|
+
onMover?: (itemId: string, colunaId: string) => void;
|
|
36
|
+
/** Botão "+" no cabeçalho de cada coluna. */
|
|
37
|
+
onAdicionar?: (colunaId: string) => void;
|
|
38
|
+
labels?: {
|
|
39
|
+
semItens?: string;
|
|
40
|
+
adicionar?: string;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */
|
|
44
|
+
export default function Kanban<T>({ colunas, itens, colunaDoItem, chaveDoItem, cartao, onAbrirItem, onMover, onAdicionar, labels, }: KanbanProps<T>): React.JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
interface LazyLoaderProps<T> {
|
|
3
|
+
endpoint: string;
|
|
4
|
+
params?: Record<string, unknown>;
|
|
5
|
+
children: (items: T[], loading: boolean, error: ReactNode | null) => ReactNode;
|
|
6
|
+
scrollableTarget?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
height?: number | string;
|
|
9
|
+
scrollThreshold?: number | string;
|
|
10
|
+
limit?: number;
|
|
11
|
+
}
|
|
12
|
+
/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */
|
|
13
|
+
export declare const LazyLoader: <T extends {
|
|
14
|
+
id: string | number;
|
|
15
|
+
}>({ endpoint, params, children, scrollableTarget, className, height, scrollThreshold, limit, }: LazyLoaderProps<T>) => React.JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import 'leaflet.markercluster';
|
|
3
|
+
import 'leaflet.heat';
|
|
4
|
+
/**
|
|
5
|
+
* Mapa de pontos com agrupamento, para listas grandes.
|
|
6
|
+
*
|
|
7
|
+
* Genérico de propósito: recebe pontos com coordenadas e devolve as funções de
|
|
8
|
+
* cor e de rótulo a quem o usa. Não sabe o que é uma ordem de trabalho nem um
|
|
9
|
+
* cliente — quem sabe é o ecrã que o monta.
|
|
10
|
+
*
|
|
11
|
+
* O Leaflet entra por import ESTÁTICO, e não dinâmico.
|
|
12
|
+
*
|
|
13
|
+
* As duas alternativas falharam, cada uma à sua maneira:
|
|
14
|
+
* - import dinâmico + webpack `externals` → o UMD gera
|
|
15
|
+
* `try{return require("leaflet")}catch{}`, e no browser não há `require`:
|
|
16
|
+
* o catch engole o erro e o componente diz que falta a biblioteca;
|
|
17
|
+
* - import dinâmico sem `externals` → o Leaflet fica em chunks separados
|
|
18
|
+
* (481.bundle.js) que vivem no node_modules da biblioteca e nunca chegam ao
|
|
19
|
+
* dist da aplicação: o pedido devolve o index.html e dá
|
|
20
|
+
* `Unexpected token '<'`.
|
|
21
|
+
*
|
|
22
|
+
* Estático, o bundler da aplicação resolve-o como qualquer outro import. Custa
|
|
23
|
+
* ~150 KB a quem não usa mapas — o preço de funcionar sempre.
|
|
24
|
+
*
|
|
25
|
+
* As folhas de estilo do Leaflet têm de ser importadas pelo projeto:
|
|
26
|
+
* import 'leaflet/dist/leaflet.css'
|
|
27
|
+
* import 'leaflet.markercluster/dist/MarkerCluster.css'
|
|
28
|
+
* @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy.
|
|
29
|
+
*/
|
|
30
|
+
export interface PontoMapa {
|
|
31
|
+
id: string;
|
|
32
|
+
lat: number;
|
|
33
|
+
lng: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Um fundo de mapa: o que o selector mostra e o que o Leaflet carrega.
|
|
37
|
+
* @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy.
|
|
38
|
+
*/
|
|
39
|
+
export interface FundoMapa {
|
|
40
|
+
id: string;
|
|
41
|
+
rotulo: string;
|
|
42
|
+
url: string;
|
|
43
|
+
atribuicao?: string;
|
|
44
|
+
/** Fundos de satélite ficam melhor sem a dessaturação do tema `suave`. */
|
|
45
|
+
semFiltro?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Lado do tile em píxeis. 256 por omissão, que é o do OpenStreetMap.
|
|
48
|
+
*
|
|
49
|
+
* Importa para quem paga por pedido: um tile de 512 cobre a área de quatro
|
|
50
|
+
* de 256, e o mesmo ecrã passa a custar um quarto. Com 512 é preciso
|
|
51
|
+
* `deslocamentoZoom: -1`, senão o mapa desenha um nível de zoom ao lado.
|
|
52
|
+
*/
|
|
53
|
+
tamanhoTile?: number;
|
|
54
|
+
deslocamentoZoom?: number;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Uma fatia do anel de um marcador: uma cor e quantos registos ela representa.
|
|
58
|
+
* @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy.
|
|
59
|
+
*/
|
|
60
|
+
export interface FatiaMapa {
|
|
61
|
+
cor: string;
|
|
62
|
+
n: number;
|
|
63
|
+
/** Nome legível, para a dica nativa do marcador. */
|
|
64
|
+
rotulo?: string;
|
|
65
|
+
}
|
|
66
|
+
/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */
|
|
67
|
+
export interface MapaPontosLabels {
|
|
68
|
+
semPontos: string;
|
|
69
|
+
semBiblioteca: string;
|
|
70
|
+
aCarregar: string;
|
|
71
|
+
/** {n} é substituído pelo número de pontos fora do limite. */
|
|
72
|
+
truncado?: string;
|
|
73
|
+
fecharAviso?: string;
|
|
74
|
+
}
|
|
75
|
+
/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */
|
|
76
|
+
export interface MapaPontosProps<T extends PontoMapa> {
|
|
77
|
+
pontos: T[];
|
|
78
|
+
/** Cor do marcador. Devolver a mesma cor para todos é perfeitamente válido. */
|
|
79
|
+
cor?: (ponto: T) => string;
|
|
80
|
+
/** HTML do balão. Sem isto não há balão. */
|
|
81
|
+
balao?: (ponto: T) => string;
|
|
82
|
+
/**
|
|
83
|
+
* Forma do marcador.
|
|
84
|
+
*
|
|
85
|
+
* `circulo` para agregados — o tamanho pode variar com a contagem e lê-se
|
|
86
|
+
* como densidade. `pin` para registos individuais: a ponta assenta na
|
|
87
|
+
* coordenada exata, e é isso que se quer quando o ponto é um sítio e não um
|
|
88
|
+
* número.
|
|
89
|
+
*/
|
|
90
|
+
forma?: 'circulo' | 'pin' | 'anel';
|
|
91
|
+
/**
|
|
92
|
+
* Composição do marcador, para a forma `anel`.
|
|
93
|
+
*
|
|
94
|
+
* Um agregado pintado de UMA cor — a do caso mais grave, ou a da contagem —
|
|
95
|
+
* diz "há aqui pelo menos um destes" e esconde tudo o resto: cinquenta
|
|
96
|
+
* registos misturados liam-se como cinquenta urgentes. As fatias mostram a
|
|
97
|
+
* composição sem obrigar a abrir o grupo, e deixam a cor dizer SITUAÇÃO
|
|
98
|
+
* enquanto o tamanho diz VOLUME — duas perguntas diferentes, dois canais.
|
|
99
|
+
*/
|
|
100
|
+
fatias?: (ponto: T) => FatiaMapa[];
|
|
101
|
+
/**
|
|
102
|
+
* Selo por cima do marcador: uma marca que se soma à cor em vez de competir
|
|
103
|
+
* com ela (ex: "está suspensa"). Null não desenha nada.
|
|
104
|
+
*/
|
|
105
|
+
selo?: (ponto: T) => {
|
|
106
|
+
texto: string;
|
|
107
|
+
cor: string;
|
|
108
|
+
titulo?: string;
|
|
109
|
+
} | null;
|
|
110
|
+
/**
|
|
111
|
+
* Contorno do marcador, por fora das fatias.
|
|
112
|
+
*
|
|
113
|
+
* Para uma segunda dimensão que não é exclusiva da primeira — um prazo
|
|
114
|
+
* excedido pode acontecer em qualquer estado, e por isso não pode ser uma
|
|
115
|
+
* fatia: somá-la ao anel faria as fatias deixarem de somar o total.
|
|
116
|
+
*/
|
|
117
|
+
contorno?: (ponto: T) => string | null;
|
|
118
|
+
/** Raio do marcador em píxeis. Só se aplica à forma `circulo`. */
|
|
119
|
+
raio?: (ponto: T) => number;
|
|
120
|
+
/**
|
|
121
|
+
* Texto por cima do marcador (ex: a contagem de uma zona).
|
|
122
|
+
*
|
|
123
|
+
* Pensado para o modo agregado: em vez de desenhar dezenas de milhares de
|
|
124
|
+
* pontos, desenha-se um círculo por concelho com o número dentro. O mapa
|
|
125
|
+
* deixa de precisar de zoom para dizer alguma coisa.
|
|
126
|
+
*/
|
|
127
|
+
rotulo?: (ponto: T) => string | null;
|
|
128
|
+
/**
|
|
129
|
+
* Marca o ponto como aproximado — desenhado a tracejado.
|
|
130
|
+
* Serve para distinguir uma morada confirmada de uma posição estimada, que
|
|
131
|
+
* no mapa parecem iguais e não são.
|
|
132
|
+
*/
|
|
133
|
+
aproximado?: (ponto: T) => boolean;
|
|
134
|
+
onPontoClick?: (ponto: T) => void;
|
|
135
|
+
/** Centro inicial. Sem isto, enquadra-se pelos pontos. */
|
|
136
|
+
centro?: [number, number];
|
|
137
|
+
zoom?: number;
|
|
138
|
+
altura?: string;
|
|
139
|
+
/**
|
|
140
|
+
* Aspeto do fundo.
|
|
141
|
+
*
|
|
142
|
+
* `suave` dessatura os tiles por CSS, deixando os marcadores com cor — num
|
|
143
|
+
* mapa de dados, o fundo não deve disputar atenção com o que está em cima.
|
|
144
|
+
* Faz o que o basemap claro do CARTO fazia, sem precisar de chave.
|
|
145
|
+
*/
|
|
146
|
+
tema?: 'normal' | 'suave';
|
|
147
|
+
/** Agrupar pontos próximos. Com milhares de pontos, desligar trava o browser. */
|
|
148
|
+
agrupar?: boolean;
|
|
149
|
+
/** Tiles. Por omissão, OpenStreetMap — sem necessidade de chave. */
|
|
150
|
+
urlTiles?: string;
|
|
151
|
+
atribuicaoTiles?: string;
|
|
152
|
+
/**
|
|
153
|
+
* Fundos alternativos, com um selector no canto do mapa.
|
|
154
|
+
*
|
|
155
|
+
* Os que precisam de chave ficam de fora por omissão: quem a tiver passa-os
|
|
156
|
+
* aqui, e a chave fica do lado de quem a tem em vez de vir na biblioteca.
|
|
157
|
+
*/
|
|
158
|
+
fundos?: FundoMapa[];
|
|
159
|
+
/** Quantos pontos ficaram de fora, para avisar quem vê. */
|
|
160
|
+
truncadoEm?: number;
|
|
161
|
+
/**
|
|
162
|
+
* Um traçado a unir pontos, em [lat, lng].
|
|
163
|
+
*
|
|
164
|
+
* Serve para mostrar um percurso — a ordem por que se visita, e por onde se
|
|
165
|
+
* passa. Sem ele, uma sequência numerada obriga a segui-la com o olho de
|
|
166
|
+
* número em número, que é exactamente o trabalho que o mapa devia poupar.
|
|
167
|
+
*
|
|
168
|
+
* Quem passa o traçado decide o que ele é: se vier de um serviço de rotas,
|
|
169
|
+
* são estradas; se forem só as paragens, são linhas rectas. O componente
|
|
170
|
+
* desenha o que recebe e não opina — mas quem o usa deve dizer ao
|
|
171
|
+
* utilizador qual dos dois é.
|
|
172
|
+
*/
|
|
173
|
+
percurso?: [number, number][] | null;
|
|
174
|
+
/**
|
|
175
|
+
* Mapa de calor por cima dos pontos.
|
|
176
|
+
*
|
|
177
|
+
* Responde a outra pergunta: os marcadores dizem o que cada ordem é, o calor
|
|
178
|
+
* diz onde há concentração. Com dez mil pontos, contar marcadores não se faz
|
|
179
|
+
* — e agrupados, o número do grupo diz quantos mas não onde eles se apertam
|
|
180
|
+
* lá dentro.
|
|
181
|
+
*
|
|
182
|
+
* Soma-se aos marcadores em vez de os substituir: quem liga o calor quer ver
|
|
183
|
+
* a mancha E continuar a poder clicar numa ordem.
|
|
184
|
+
*/
|
|
185
|
+
calor?: boolean;
|
|
186
|
+
/**
|
|
187
|
+
* Quanto cada ponto pesa no calor. Por omissão, um.
|
|
188
|
+
*
|
|
189
|
+
* Serve para quando um marcador representa muitos — um concelho com 300
|
|
190
|
+
* ordens não deve pesar o mesmo que uma ordem solta.
|
|
191
|
+
*/
|
|
192
|
+
pesoCalor?: (p: T) => number;
|
|
193
|
+
/**
|
|
194
|
+
* Selecção por caixa: `Shift` + arrastar devolve os pontos dentro dela.
|
|
195
|
+
*
|
|
196
|
+
* Com `Shift` e não só arrastar, porque arrastar já é a forma de deslocar o
|
|
197
|
+
* mapa — tirar isso ao arrasto simples trocaria o gesto mais usado pelo mais
|
|
198
|
+
* raro.
|
|
199
|
+
*/
|
|
200
|
+
onSeleccionarArea?: (pontos: T[]) => void;
|
|
201
|
+
legenda?: React.ReactNode;
|
|
202
|
+
labels?: Partial<MapaPontosLabels>;
|
|
203
|
+
className?: string;
|
|
204
|
+
}
|
|
205
|
+
/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */
|
|
206
|
+
export default function MapaPontos<T extends PontoMapa>({ pontos, cor, balao, forma, fatias, selo, contorno, raio, rotulo, aproximado, onPontoClick, centro, zoom, altura, agrupar, tema, urlTiles, atribuicaoTiles, truncadoEm, percurso, calor, pesoCalor, fundos, onSeleccionarArea, legenda, labels, className, }: MapaPontosProps<T>): React.JSX.Element;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Painel lateral de filtros facetados.
|
|
4
|
+
*
|
|
5
|
+
* O que o torna útil é a CONTAGEM ao lado de cada opção: diz quantos registos
|
|
6
|
+
* ficariam se a opção fosse escolhida, com os restantes filtros mantidos. Quem
|
|
7
|
+
* monta o painel é que calcula essas contagens — o componente não sabe o que
|
|
8
|
+
* está a contar, e tem de ser assim: a conta certa exige tirar a própria
|
|
9
|
+
* dimensão do filtro, e isso só o servidor sabe fazer.
|
|
10
|
+
*
|
|
11
|
+
* Genérico de propósito: recebe secções e opções, devolve escolhas.
|
|
12
|
+
* @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy.
|
|
13
|
+
*/
|
|
14
|
+
export interface OpcaoFiltro {
|
|
15
|
+
valor: string;
|
|
16
|
+
rotulo: string;
|
|
17
|
+
/** Quantos registos esta opção daria. `undefined` não desenha contagem. */
|
|
18
|
+
total?: number;
|
|
19
|
+
}
|
|
20
|
+
/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */
|
|
21
|
+
export type TipoCampoFiltro = 'opcoes' | 'atalhos' | 'livre';
|
|
22
|
+
/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */
|
|
23
|
+
export interface CampoFiltro {
|
|
24
|
+
/** Identifica o campo nos valores devolvidos. */
|
|
25
|
+
chave: string;
|
|
26
|
+
rotulo: string;
|
|
27
|
+
tipo?: TipoCampoFiltro;
|
|
28
|
+
opcoes?: OpcaoFiltro[];
|
|
29
|
+
/**
|
|
30
|
+
* Escolha única. Por omissão o campo é múltiplo — é o que a maioria das
|
|
31
|
+
* dimensões quer, e forçar única obrigaria a limpar antes de trocar.
|
|
32
|
+
*/
|
|
33
|
+
unico?: boolean;
|
|
34
|
+
/** A partir de quantas opções aparece a caixa de pesquisa. */
|
|
35
|
+
pesquisarACimaDe?: number;
|
|
36
|
+
/** Conteúdo próprio (datas, interruptores…), quando `tipo` é `livre`. */
|
|
37
|
+
conteudo?: React.ReactNode;
|
|
38
|
+
}
|
|
39
|
+
/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */
|
|
40
|
+
export interface SeccaoFiltros {
|
|
41
|
+
chave: string;
|
|
42
|
+
titulo: string;
|
|
43
|
+
campos: CampoFiltro[];
|
|
44
|
+
/** Aberta na primeira vez. Depois manda o que o utilizador fizer. */
|
|
45
|
+
aberta?: boolean;
|
|
46
|
+
}
|
|
47
|
+
/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */
|
|
48
|
+
export interface PainelFiltrosLabels {
|
|
49
|
+
titulo: string;
|
|
50
|
+
limpar: string;
|
|
51
|
+
pesquisar: string;
|
|
52
|
+
semOpcoes: string;
|
|
53
|
+
ocultar: string;
|
|
54
|
+
mostrar: string;
|
|
55
|
+
verTodas: string;
|
|
56
|
+
verMenos: string;
|
|
57
|
+
}
|
|
58
|
+
/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */
|
|
59
|
+
export interface PainelFiltrosProps {
|
|
60
|
+
seccoes: SeccaoFiltros[];
|
|
61
|
+
/** Valores actuais: chave do campo → valores escolhidos. */
|
|
62
|
+
valores: Record<string, string[]>;
|
|
63
|
+
onChange: (chave: string, valores: string[]) => void;
|
|
64
|
+
onLimpar?: () => void;
|
|
65
|
+
labels?: Partial<PainelFiltrosLabels>;
|
|
66
|
+
className?: string;
|
|
67
|
+
}
|
|
68
|
+
/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */
|
|
69
|
+
export default function PainelFiltros({ seccoes, valores, onChange, onLimpar, labels, className, }: PainelFiltrosProps): React.JSX.Element;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Pesquisa rápida — a paleta que abre com Ctrl/Cmd + K.
|
|
4
|
+
*
|
|
5
|
+
* Genérica: recebe uma função de procura e devolve o que foi escolhido. Não
|
|
6
|
+
* sabe o que procura nem onde — quem a monta é que sabe.
|
|
7
|
+
*
|
|
8
|
+
* O atalho é registado em `window` e não num campo: a utilidade disto é poder
|
|
9
|
+
* ser chamada de qualquer sítio da aplicação sem ter de lá chegar com o rato.
|
|
10
|
+
* @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy.
|
|
11
|
+
*/
|
|
12
|
+
export interface ResultadoPesquisa {
|
|
13
|
+
id: string;
|
|
14
|
+
titulo: string;
|
|
15
|
+
/** Segunda linha: o que distingue dois resultados com o mesmo título. */
|
|
16
|
+
detalhe?: string;
|
|
17
|
+
/** Agrupador opcional, mostrado como cabeçalho. */
|
|
18
|
+
grupo?: string;
|
|
19
|
+
}
|
|
20
|
+
/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */
|
|
21
|
+
export interface PesquisaRapidaLabels {
|
|
22
|
+
titulo: string;
|
|
23
|
+
placeholder: string;
|
|
24
|
+
semResultados: string;
|
|
25
|
+
aEscrever: string;
|
|
26
|
+
dica: string;
|
|
27
|
+
}
|
|
28
|
+
/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */
|
|
29
|
+
export interface PesquisaRapidaProps {
|
|
30
|
+
aberta: boolean;
|
|
31
|
+
onFechar: () => void;
|
|
32
|
+
/** Procura. Pode devolver poucos resultados — a lista não é paginada. */
|
|
33
|
+
procurar: (termo: string) => Promise<ResultadoPesquisa[]>;
|
|
34
|
+
onEscolher: (resultado: ResultadoPesquisa) => void;
|
|
35
|
+
/** Mínimo de caracteres antes de procurar. */
|
|
36
|
+
minimo?: number;
|
|
37
|
+
labels?: Partial<PesquisaRapidaLabels>;
|
|
38
|
+
}
|
|
39
|
+
/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */
|
|
40
|
+
export default function PesquisaRapida({ aberta, onFechar, procurar, onEscolher, minimo, labels, }: PesquisaRapidaProps): React.JSX.Element | null;
|
|
41
|
+
/**
|
|
42
|
+
* Regista Ctrl/Cmd + K e devolve o estado de abertura.
|
|
43
|
+
*
|
|
44
|
+
* Em hook para quem usa a paleta não ter de repetir a escuta do teclado — e
|
|
45
|
+
* porque o atalho tem de ser removido ao desmontar, que é o passo que se
|
|
46
|
+
* esquece.
|
|
47
|
+
* @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy.
|
|
48
|
+
*/
|
|
49
|
+
export declare function usarAtalhoPesquisa(): {
|
|
50
|
+
aberta: boolean;
|
|
51
|
+
abrir: () => void;
|
|
52
|
+
fechar: () => void;
|
|
53
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { LoggedUser } from '../../../types/LoggedUser';
|
|
3
|
+
import './Profile.scss';
|
|
4
|
+
type Props = {
|
|
5
|
+
user: LoggedUser;
|
|
6
|
+
handleLogout: () => void;
|
|
7
|
+
notifications?: ReactNode;
|
|
8
|
+
logoutLabel?: string;
|
|
9
|
+
};
|
|
10
|
+
/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */
|
|
11
|
+
declare const Profile: ({ user, handleLogout, notifications, logoutLabel }: Props) => React.JSX.Element;
|
|
12
|
+
export default Profile;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Restringe o acesso ao portal a um conjunto de app roles.
|
|
4
|
+
*
|
|
5
|
+
* Não conhece o MSAL da aplicação: recebe funções para obter o token. É
|
|
6
|
+
* deliberado — quando o bundler duplica o `@azure/msal-react`, um `useMsal`
|
|
7
|
+
* dentro da biblioteca lê um contexto diferente do da app, a conta vem a null e
|
|
8
|
+
* o acesso é negado a quem tem a role certa. Passando o token por fora, isso
|
|
9
|
+
* não pode acontecer.
|
|
10
|
+
*
|
|
11
|
+
* As roles vêm no ACCESS token da API, não no id token — é o erro mais comum
|
|
12
|
+
* nesta integração, e a razão de `obterToken` dever pedir o scope da API.
|
|
13
|
+
* @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy.
|
|
14
|
+
*/
|
|
15
|
+
export interface RoleGuardProps {
|
|
16
|
+
/** Roles com acesso. Lista vazia = qualquer autenticado entra. */
|
|
17
|
+
rolesPermitidas: string[];
|
|
18
|
+
/** Há sessão iniciada? Enquanto false, mostra-se `semSessao`. */
|
|
19
|
+
temSessao: boolean;
|
|
20
|
+
/** Ainda a resolver a autenticação — evita decidir cedo de mais. */
|
|
21
|
+
aAutenticar?: boolean;
|
|
22
|
+
/** Token de acesso da API. `forcarRenovacao` ignora a cache. */
|
|
23
|
+
obterToken: (forcarRenovacao?: boolean) => Promise<string>;
|
|
24
|
+
/** Chamado quando falta consentimento e é preciso um redirect interactivo. */
|
|
25
|
+
onPrecisaInteracao?: () => void;
|
|
26
|
+
semSessao: ReactNode;
|
|
27
|
+
aCarregar: ReactNode;
|
|
28
|
+
semPermissao: ReactNode;
|
|
29
|
+
children: ReactNode;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Lê a claim `roles` de um JWT, sem validar a assinatura (quem valida é a API).
|
|
33
|
+
* @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy.
|
|
34
|
+
*/
|
|
35
|
+
export declare function lerRolesDoToken(accessToken: string): string[];
|
|
36
|
+
/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */
|
|
37
|
+
export default function RoleGuard({ rolesPermitidas, temSessao, aAutenticar, obterToken, onPrecisaInteracao, semSessao, aCarregar, semPermissao, children, }: RoleGuardProps): React.JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
3
|
+
import { Fetcher } from '../../../types/Fetcher';
|
|
4
|
+
import './Selector.scss';
|
|
5
|
+
import { SelectableElement } from '../../../types/SelectableElement';
|
|
6
|
+
type SelectorProps<T extends SelectableElement> = {
|
|
7
|
+
title: string;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
onConfirm: (selected: T[]) => void;
|
|
10
|
+
onDisabled?: (disabled: T) => ReactNode;
|
|
11
|
+
initiallySelected: T[];
|
|
12
|
+
blocked?: string[];
|
|
13
|
+
single?: boolean;
|
|
14
|
+
icon: IconProp;
|
|
15
|
+
fetcher: Fetcher;
|
|
16
|
+
working?: boolean;
|
|
17
|
+
};
|
|
18
|
+
/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */
|
|
19
|
+
export declare const Selector: <T extends SelectableElement>({ title, icon, onClose, onConfirm, initiallySelected, blocked, fetcher, single, working, onDisabled, }: SelectorProps<T>) => React.JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */
|
|
3
|
+
export interface StatusMatrixRow {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
/** Cabeçalho de secção mostrado antes da linha quando muda (ex: "Fundações"). */
|
|
7
|
+
group?: string;
|
|
8
|
+
/** Texto pequeno à direita do rótulo (ex: "12/40"). */
|
|
9
|
+
sublabel?: string;
|
|
10
|
+
}
|
|
11
|
+
/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */
|
|
12
|
+
export interface StatusMatrixColumn {
|
|
13
|
+
id: string;
|
|
14
|
+
label: string;
|
|
15
|
+
/** Faixa por cima das colunas consecutivas com o mesmo grupo (ex: "Ramal 1"). */
|
|
16
|
+
group?: string;
|
|
17
|
+
}
|
|
18
|
+
/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */
|
|
19
|
+
export interface StatusMatrixStatus {
|
|
20
|
+
label: string;
|
|
21
|
+
/** Cor da célula (CSS). */
|
|
22
|
+
color: string;
|
|
23
|
+
}
|
|
24
|
+
/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */
|
|
25
|
+
export interface StatusMatrixCell {
|
|
26
|
+
/** Chave em `statuses`. Sem estado = célula vazia. */
|
|
27
|
+
status?: string;
|
|
28
|
+
/** Texto curto dentro da célula (ex: nº de dias). */
|
|
29
|
+
text?: string;
|
|
30
|
+
tooltip?: React.ReactNode;
|
|
31
|
+
/** Mostra um ponto de aviso no canto da célula. */
|
|
32
|
+
warning?: boolean;
|
|
33
|
+
}
|
|
34
|
+
/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */
|
|
35
|
+
export interface StatusMatrixProps {
|
|
36
|
+
rows: StatusMatrixRow[];
|
|
37
|
+
columns: StatusMatrixColumn[];
|
|
38
|
+
statuses: Record<string, StatusMatrixStatus>;
|
|
39
|
+
/** Conteúdo de cada célula; null/undefined = vazia. */
|
|
40
|
+
cell: (row: StatusMatrixRow, column: StatusMatrixColumn) => StatusMatrixCell | null | undefined;
|
|
41
|
+
cellSize?: number;
|
|
42
|
+
labelWidth?: number;
|
|
43
|
+
/** Texto do canto superior esquerdo (ex: "Tarefa \ Apoio"). */
|
|
44
|
+
corner?: string;
|
|
45
|
+
/** Mostra a legenda dos estados por cima da matriz. */
|
|
46
|
+
showLegend?: boolean;
|
|
47
|
+
onCellClick?: (row: StatusMatrixRow, column: StatusMatrixColumn) => void;
|
|
48
|
+
emptyText?: string;
|
|
49
|
+
className?: string;
|
|
50
|
+
/** Altura (px) do cabeçalho das colunas (rótulos verticais). Omisso = automática pelo rótulo mais comprido (64–260). */
|
|
51
|
+
columnHeaderHeight?: number;
|
|
52
|
+
}
|
|
53
|
+
/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */
|
|
54
|
+
export default function StatusMatrix({ rows, columns, statuses, cell, cellSize, labelWidth, corner, showLegend, onCellClick, emptyText, className, columnHeaderHeight, }: StatusMatrixProps): React.JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
/** @deprecated Legacy — usar `useToast` do V1. */
|
|
3
|
+
export type TipoAviso = 'sucesso' | 'erro' | 'aviso' | 'info';
|
|
4
|
+
/** @deprecated Legacy — usar `ToastOptions` do V1. */
|
|
5
|
+
export interface OpcoesAviso {
|
|
6
|
+
/** Botão no aviso (ex: "Tentar de novo", "Desfazer"). */
|
|
7
|
+
acao?: {
|
|
8
|
+
rotulo: string;
|
|
9
|
+
onClick: () => void;
|
|
10
|
+
};
|
|
11
|
+
/** Milissegundos até fechar sozinho. 0 = só fecha à mão. */
|
|
12
|
+
duracao?: number;
|
|
13
|
+
}
|
|
14
|
+
/** @deprecated Legacy — usar `ToastApi` do V1. */
|
|
15
|
+
export interface AvisosApi {
|
|
16
|
+
sucesso: (mensagem: ReactNode, opcoes?: OpcoesAviso) => number;
|
|
17
|
+
erro: (mensagem: ReactNode, opcoes?: OpcoesAviso) => number;
|
|
18
|
+
aviso: (mensagem: ReactNode, opcoes?: OpcoesAviso) => number;
|
|
19
|
+
info: (mensagem: ReactNode, opcoes?: OpcoesAviso) => number;
|
|
20
|
+
fechar: (id: number) => void;
|
|
21
|
+
}
|
|
22
|
+
/** @deprecated Legacy — usar `ToastProviderProps` do V1. */
|
|
23
|
+
export interface AvisosProviderProps {
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
/** Rótulo do botão de fechar (leitores de ecrã). */
|
|
26
|
+
rotuloFechar?: string;
|
|
27
|
+
/** Máximo de avisos visíveis ao mesmo tempo; os mais antigos saem. */
|
|
28
|
+
maximo?: number;
|
|
29
|
+
}
|
|
30
|
+
/** @deprecated Legacy — usar `ToastProvider` do V1. */
|
|
31
|
+
export declare function AvisosProvider({ children, rotuloFechar, maximo }: AvisosProviderProps): React.JSX.Element;
|
|
32
|
+
/** @deprecated Legacy — usar `useToast` do V1. */
|
|
33
|
+
export declare function useAvisos(): AvisosApi;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */
|
|
3
|
+
export interface BarraAcoesProps {
|
|
4
|
+
/** Ações principais, à direita (ex: "Guardar"). A principal vai em último. */
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
/** Ações secundárias, à esquerda (ex: "Voltar à lista"). */
|
|
7
|
+
esquerda?: ReactNode;
|
|
8
|
+
/** Fica colada ao fundo do ecrã enquanto se desce na página. Por omissão sim. */
|
|
9
|
+
fixa?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Barra de ações de uma página de detalhe ou formulário.
|
|
13
|
+
*
|
|
14
|
+
* Fixa ao fundo para "Guardar" estar sempre à vista: numa página longa o botão
|
|
15
|
+
* no topo desaparece ao descer, e os botões repetidos em cima e em baixo
|
|
16
|
+
* acabavam com textos diferentes.
|
|
17
|
+
* @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy.
|
|
18
|
+
*/
|
|
19
|
+
export default function BarraAcoes({ children, esquerda, fixa }: BarraAcoesProps): React.JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
/** @deprecated Legacy — usar `BreadcrumbItem` do V1. */
|
|
3
|
+
export interface NivelCaminho {
|
|
4
|
+
rotulo: ReactNode;
|
|
5
|
+
/** Ligação normal. Para o router da app, usar `onClick` (ex: `() => navigate('/x')`). */
|
|
6
|
+
href?: string;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
}
|
|
9
|
+
/** @deprecated Legacy — usar `PageHeaderProps` do V1. */
|
|
10
|
+
export interface CabecalhoPaginaProps {
|
|
11
|
+
titulo: ReactNode;
|
|
12
|
+
descricao?: ReactNode;
|
|
13
|
+
/** Caminho até à página (área › lista › registo). O último nível é a página atual. */
|
|
14
|
+
caminho?: NivelCaminho[];
|
|
15
|
+
/** Botões da página (ex: "Novo", "Editar"). */
|
|
16
|
+
acoes?: ReactNode;
|
|
17
|
+
/** Linha extra por baixo da descrição (etiquetas de estado, responsável…). */
|
|
18
|
+
extra?: ReactNode;
|
|
19
|
+
/** Rótulo acessível da navegação do caminho. */
|
|
20
|
+
rotuloCaminho?: string;
|
|
21
|
+
}
|
|
22
|
+
/** @deprecated Legacy — usar `PageHeader` (ou `Page`) do V1. */
|
|
23
|
+
export default function CabecalhoPagina({ titulo, descricao, caminho, acoes, extra, rotuloCaminho }: CabecalhoPaginaProps): React.JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/** @deprecated Legacy — usar `SearchInputProps` do V1. */
|
|
3
|
+
export interface CaixaPesquisaProps {
|
|
4
|
+
valor: string;
|
|
5
|
+
onMudar: (valor: string) => void;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
/** Nome acessível (leitores de ecrã). Por omissão, o placeholder. */
|
|
8
|
+
rotulo?: string;
|
|
9
|
+
/** Largura (classes tailwind). Por omissão w-56. */
|
|
10
|
+
className?: string;
|
|
11
|
+
autoFocus?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/** @deprecated Legacy — usar `SearchInput` do V1. */
|
|
14
|
+
export default function CaixaPesquisa({ valor, onMudar, placeholder, rotulo, className, autoFocus }: CaixaPesquisaProps): React.JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
/** @deprecated Legacy — usar `ConfirmDialog` ou `useConfirm` do V1. */
|
|
3
|
+
export interface ConfirmacaoProps {
|
|
4
|
+
aberto: boolean;
|
|
5
|
+
titulo: ReactNode;
|
|
6
|
+
/** Explicação: o que vai acontecer, a que registo, se é reversível. */
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
onConfirmar: () => void;
|
|
9
|
+
onCancelar: () => void;
|
|
10
|
+
/** Texto do botão — o verbo da ação ("Eliminar", "Submeter"), não "OK". */
|
|
11
|
+
textoConfirmar?: string;
|
|
12
|
+
textoCancelar?: string;
|
|
13
|
+
/** `perigo` pinta a ação a vermelho e põe o foco em Cancelar. */
|
|
14
|
+
variante?: 'normal' | 'perigo';
|
|
15
|
+
/** A ação está a correr: botões desativados. */
|
|
16
|
+
aConfirmar?: boolean;
|
|
17
|
+
/** Uma segunda saída (ex: "Desativar" em vez de eliminar, "Eliminar só o contrato"). */
|
|
18
|
+
acaoSecundaria?: {
|
|
19
|
+
rotulo: string;
|
|
20
|
+
onClick: () => void;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/** @deprecated Legacy — usar `ConfirmDialog` ou `useConfirm` do V1. */
|
|
24
|
+
export default function Confirmacao({ aberto, titulo, children, onConfirmar, onCancelar, textoConfirmar, textoCancelar, variante, aConfirmar, acaoSecundaria, }: ConfirmacaoProps): React.JSX.Element;
|