@nextelco/common-ui 2.1.97 → 2.1.99
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 +222 -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 +36 -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/atoms/Tooltip/Tooltip.css +17 -0
- package/dist/esm/legacy/components/atoms/Tooltip/Tooltip.js +41 -0
- package/dist/esm/legacy/components/atoms/Tooltip/Tooltip.js.map +1 -0
- package/dist/esm/legacy/components/charts/Charts.js +259 -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 +92 -0
- package/dist/esm/legacy/components/layout/Layout/Layout.js.map +1 -0
- package/dist/esm/legacy/components/layout/Sidebar/Sidebar.js +227 -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 +179 -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 +1145 -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 +107 -0
- package/dist/esm/legacy/components/molecules/PhotoAvatar/PhotoAvatar.js.map +1 -0
- package/dist/esm/legacy/components/molecules/Search/Search.css +18 -0
- package/dist/esm/legacy/components/molecules/Search/Search.js +30 -0
- package/dist/esm/legacy/components/molecules/Search/Search.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 +105 -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 +206 -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 +68 -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 +86 -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 +32 -0
- package/dist/esm/legacy/components/ui/CabecalhoPagina.js.map +1 -0
- package/dist/esm/legacy/components/ui/CaixaPesquisa.js +57 -0
- package/dist/esm/legacy/components/ui/CaixaPesquisa.js.map +1 -0
- package/dist/esm/legacy/components/ui/Confirmacao.js +52 -0
- package/dist/esm/legacy/components/ui/Confirmacao.js.map +1 -0
- package/dist/esm/legacy/components/ui/Escolha.js +157 -0
- package/dist/esm/legacy/components/ui/Escolha.js.map +1 -0
- package/dist/esm/legacy/components/ui/FaixaAviso.js +17 -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 +52 -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 +360 -0
- package/dist/esm/legacy/components/ui/Ui.js.map +1 -0
- package/dist/esm/legacy/components/ui/painelFlutuante.js +52 -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/hooks/useTheme.js +39 -0
- package/dist/esm/legacy/hooks/useTheme.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/components/documents/DocumentDropzone/DocumentDropzone.js +307 -0
- package/dist/esm/v1/components/documents/DocumentDropzone/DocumentDropzone.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/overlays/Dialog/Dialog.js +87 -0
- package/dist/esm/v1/components/overlays/Dialog/Dialog.js.map +1 -0
- package/dist/esm/v1/foundations/icons/icons.js +76 -0
- package/dist/esm/v1/foundations/icons/icons.js.map +1 -0
- package/dist/esm/v1/primitives/buttons/Button/Button.js +27 -0
- package/dist/esm/v1/primitives/buttons/Button/Button.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/LookupInput/LookupInput.js +37 -0
- package/dist/esm/v1/primitives/forms/LookupInput/LookupInput.js.map +1 -0
- package/dist/esm/v1/primitives/forms/SelectInput/SelectInput.js +29 -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 +12 -0
- package/dist/esm/v1/primitives/forms/field.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/style.layered.css +1 -1
- package/dist/types/index.d.ts +14 -13
- package/dist/types/{components → legacy/components}/atoms/Acronym/Acronym.d.ts +1 -0
- package/dist/types/{components → legacy/components}/atoms/BreadCrumb/BreadCrumb.d.ts +1 -0
- package/dist/types/{components → legacy/components}/atoms/Button/variants/ActionButton.d.ts +1 -0
- package/dist/types/{components → legacy/components}/atoms/Button/variants/FilterButton.d.ts +1 -0
- package/dist/types/{components → legacy/components}/atoms/Button/variants/IconButton.d.ts +1 -0
- package/dist/types/{components → legacy/components}/atoms/Button/variants/MainButton.d.ts +1 -0
- package/dist/types/{components → legacy/components}/atoms/Button/variants/TabButton.d.ts +1 -0
- package/dist/types/{components → legacy/components}/atoms/Field/Field.d.ts +1 -0
- package/dist/types/{components → legacy/components}/atoms/IconText/IconText.d.ts +1 -0
- package/dist/types/{components → legacy/components}/atoms/Icone/Icone.d.ts +2 -0
- package/dist/types/{components → legacy/components}/atoms/Input/Input.d.ts +1 -0
- package/dist/types/{components → legacy/components}/atoms/InputData/InputData.d.ts +4 -0
- package/dist/types/{components → legacy/components}/atoms/Label/Label.d.ts +1 -0
- package/dist/types/{components → legacy/components}/atoms/Select/Select.d.ts +1 -0
- package/dist/types/{components → legacy/components}/atoms/Stack/Stack.d.ts +1 -0
- package/dist/types/{components → legacy/components}/atoms/Switch/CustomSwitch.d.ts +1 -0
- package/dist/types/{components → legacy/components}/atoms/Tooltip/Tooltip.d.ts +1 -0
- package/dist/types/{components → legacy/components}/charts/Charts.d.ts +29 -6
- package/dist/types/{components → legacy/components}/layout/AppLauncher/AppLauncher.d.ts +3 -0
- package/dist/types/{components → legacy/components}/layout/Error/Error.d.ts +1 -0
- package/dist/types/{components → legacy/components}/layout/Footer/Footer.d.ts +1 -0
- package/dist/types/{components → legacy/components}/layout/Header/Header.d.ts +1 -0
- package/dist/types/{components → legacy/components}/layout/Layout/Layout.d.ts +2 -0
- package/dist/types/{components → legacy/components}/layout/Sidebar/Sidebar.d.ts +5 -0
- package/dist/types/{components → legacy/components}/layout/Spinner/Spinner.d.ts +1 -0
- package/dist/types/{components → legacy/components}/layout/TopBar/TopBar.d.ts +2 -0
- package/dist/types/{components → legacy/components}/layout/TopNavLayout/TopNavLayout.d.ts +3 -0
- package/dist/types/{components → legacy/components}/molecules/BarraValor/BarraValor.d.ts +3 -0
- package/dist/types/{components → legacy/components}/molecules/ColumnPicker/ColumnPicker.d.ts +8 -1
- package/dist/types/{components → legacy/components}/molecules/ConfirmModal/ConfirmModal.d.ts +2 -0
- package/dist/types/{components → legacy/components}/molecules/DataTable/DataTable.d.ts +6 -0
- package/dist/types/{components → legacy/components}/molecules/FileDropzone/FileDropzone.d.ts +3 -0
- package/dist/types/{components → legacy/components}/molecules/LanguageSwitcher/LanguageSwitcher.d.ts +3 -0
- package/dist/types/{components → legacy/components}/molecules/Modal/Modal.d.ts +2 -0
- package/dist/types/{components → legacy/components}/molecules/MultiTagPicker/MultiTagPicker.d.ts +2 -0
- package/dist/types/{components → legacy/components}/molecules/PhotoAvatar/PhotoAvatar.d.ts +1 -0
- package/dist/types/{components → legacy/components}/molecules/SeletorPesquisa/SeletorPesquisa.d.ts +3 -0
- package/dist/types/{components → legacy/components}/molecules/Sidebar/Sidebar.d.ts +1 -0
- package/dist/types/{components → legacy/components}/molecules/UserAvatar/UserAvatar.d.ts +1 -0
- package/dist/types/{components → legacy/components}/organisms/GanttChart/GanttChart.d.ts +8 -1
- package/dist/types/{components → legacy/components}/organisms/Kanban/Kanban.d.ts +3 -0
- package/dist/types/{components → legacy/components}/organisms/LazyLoader/LazyLoader.d.ts +1 -0
- package/dist/types/{components → legacy/components}/organisms/MapaPontos/MapaPontos.d.ts +12 -2
- package/dist/types/{components → legacy/components}/organisms/PainelFiltros/PainelFiltros.d.ts +7 -0
- package/dist/types/{components → legacy/components}/organisms/PesquisaRapida/PesquisaRapida.d.ts +5 -0
- package/dist/types/{components → legacy/components}/organisms/Profile/Profile.d.ts +1 -0
- package/dist/types/{components → legacy/components}/organisms/RoleGuard/RoleGuard.d.ts +6 -1
- package/dist/types/{components → legacy/components}/organisms/Selector/Selector.d.ts +1 -0
- package/dist/types/{components → legacy/components}/organisms/StatusMatrix/StatusMatrix.d.ts +6 -0
- package/dist/types/{components → legacy/components}/ui/Avisos.d.ts +9 -1
- package/dist/types/{components → legacy/components}/ui/BarraAcoes.d.ts +2 -0
- package/dist/types/{components → legacy/components}/ui/CabecalhoPagina.d.ts +6 -1
- package/dist/types/{components → legacy/components}/ui/Confirmacao.d.ts +2 -0
- package/dist/types/{components → legacy/components}/ui/Escolha.d.ts +14 -2
- package/dist/types/{components → legacy/components}/ui/FaixaAviso.d.ts +3 -0
- package/dist/types/{components → legacy/components}/ui/Passos.d.ts +3 -0
- package/dist/types/{components → legacy/components}/ui/Separadores.d.ts +3 -0
- package/dist/types/{components → legacy/components}/ui/TextoAuto.d.ts +2 -0
- package/dist/types/{components → legacy/components}/ui/Ui.d.ts +41 -7
- package/dist/types/{constants → legacy/constants}/FontWeight.d.ts +1 -0
- package/dist/types/{contexts → legacy/contexts}/apiContext.d.ts +1 -0
- package/dist/types/{contexts → legacy/contexts}/authContext.d.ts +2 -0
- package/dist/types/{contexts → legacy/contexts}/socketContext.d.ts +2 -0
- package/dist/types/{exports → legacy/exports}/hooks.d.ts +1 -1
- package/dist/types/{exports → legacy/exports}/molecules.d.ts +2 -1
- package/dist/types/legacy/exports/types.d.ts +7 -0
- package/dist/types/{hooks → legacy/hooks}/useApi.d.ts +2 -0
- package/dist/types/{hooks → legacy/hooks}/useTheme.d.ts +2 -0
- package/dist/types/{pages → legacy/pages}/Error/ErrorPage.d.ts +1 -0
- package/dist/types/{pages → legacy/pages}/Loading/Loading.d.ts +1 -0
- package/dist/types/{pages → legacy/pages}/Login/LoginScreen.d.ts +2 -0
- package/dist/types/{pages → legacy/pages}/NotFound/NotFound.d.ts +1 -0
- package/dist/types/legacy/styles/utils/utils.d.ts +2 -0
- package/dist/types/{types → legacy/types}/Fetcher.d.ts +1 -0
- package/dist/types/{types → legacy/types}/LoggedUser.d.ts +1 -0
- package/dist/types/{types → legacy/types}/SidebarMenu.d.ts +2 -0
- package/dist/types/legacy/types/themes/AcronymThemes.d.ts +4 -0
- package/dist/types/{types → legacy/types}/themes/ButtonThemes.d.ts +3 -0
- package/dist/types/legacy/types/themes/CustomSwitchThemes.d.ts +4 -0
- package/dist/types/{types → legacy/types}/themes/IconTextThemes.d.ts +1 -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/components/documents/DocumentDropzone/DocumentDropzone.d.ts +60 -0
- package/dist/types/v1/components/forms/FormField/FormField.d.ts +44 -0
- package/dist/types/v1/components/forms/FormGrid/FormGrid.d.ts +21 -0
- package/dist/types/v1/components/overlays/Dialog/Dialog.d.ts +55 -0
- package/dist/types/v1/foundations/icons/icons.d.ts +24 -0
- package/dist/types/v1/index.d.ts +25 -0
- package/dist/types/v1/primitives/buttons/Button/Button.d.ts +18 -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/LookupInput/LookupInput.d.ts +25 -0
- package/dist/types/v1/primitives/forms/SelectInput/SelectInput.d.ts +19 -0
- package/dist/types/v1/primitives/forms/TextArea/TextArea.d.ts +37 -0
- package/dist/types/v1/primitives/forms/TextInput/TextInput.d.ts +16 -0
- package/dist/types/v1/primitives/forms/field.d.ts +20 -0
- package/package.json +38 -33
- package/dist/bundle.js +0 -2
- package/dist/bundle.js.LICENSE.txt +0 -80
- package/dist/types/components/atoms/Icone/Icone.test.d.ts +0 -1
- package/dist/types/components/layout/Sidebar/Sidebar.test.d.ts +0 -1
- package/dist/types/components/molecules/BarraValor/BarraValor.test.d.ts +0 -1
- package/dist/types/components/molecules/DataTable/DataTable.test.d.ts +0 -1
- package/dist/types/components/molecules/SeletorPesquisa/SeletorPesquisa.test.d.ts +0 -1
- package/dist/types/components/organisms/Kanban/Kanban.test.d.ts +0 -1
- package/dist/types/components/organisms/RoleGuard/RoleGuard.test.d.ts +0 -1
- package/dist/types/components/ui/CaixaPesquisa.test.d.ts +0 -1
- package/dist/types/components/ui/Escolha.test.d.ts +0 -1
- package/dist/types/components/ui/Paginas.test.d.ts +0 -1
- package/dist/types/exports/types.d.ts +0 -7
- package/dist/types/styles/utils/utils.d.ts +0 -1
- package/dist/types/test/setup.d.ts +0 -1
- package/dist/types/types/themes/AcronymThemes.d.ts +0 -3
- package/dist/types/types/themes/CustomSwitchThemes.d.ts +0 -3
- package/dist/types/utils/stringUtils.d.ts +0 -3
- /package/dist/types/{components → legacy/components}/atoms/MultiTagPickerTag/MultiTagPickerTag.d.ts +0 -0
- /package/dist/types/{components → legacy/components}/atoms/SearchSelect/SearchSelect.d.ts +0 -0
- /package/dist/types/{components → legacy/components}/molecules/Search/Search.d.ts +0 -0
- /package/dist/types/{components → legacy/components}/ui/CaixaPesquisa.d.ts +0 -0
- /package/dist/types/{components → legacy/components}/ui/MenuAcoes.d.ts +0 -0
- /package/dist/types/{components → legacy/components}/ui/painelFlutuante.d.ts +0 -0
- /package/dist/types/{constants → legacy/constants}/Colors.d.ts +0 -0
- /package/dist/types/{exports → legacy/exports}/assets.d.ts +0 -0
- /package/dist/types/{exports → legacy/exports}/atoms.d.ts +0 -0
- /package/dist/types/{exports → legacy/exports}/charts.d.ts +0 -0
- /package/dist/types/{exports → legacy/exports}/constants.d.ts +0 -0
- /package/dist/types/{exports → legacy/exports}/contexts.d.ts +0 -0
- /package/dist/types/{exports → legacy/exports}/layout.d.ts +0 -0
- /package/dist/types/{exports → legacy/exports}/organisms.d.ts +0 -0
- /package/dist/types/{exports → legacy/exports}/pages.d.ts +0 -0
- /package/dist/types/{exports → legacy/exports}/styles.d.ts +0 -0
- /package/dist/types/{exports → legacy/exports}/ui.d.ts +0 -0
- /package/dist/types/{exports → legacy/exports}/utils.d.ts +0 -0
- /package/dist/types/{styles → legacy/styles}/themes/ButtonThemes.d.ts +0 -0
- /package/dist/types/{types → legacy/types}/SelectableElement.d.ts +0 -0
- /package/dist/types/{utils → legacy/utils}/keycloak.d.ts +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import Switch from "react-switch";
|
|
3
|
+
import './CustomSwitch.css';/* empty css */
|
|
4
|
+
const CustomSwitch = ({
|
|
5
|
+
label,
|
|
6
|
+
activated,
|
|
7
|
+
onChange,
|
|
8
|
+
theme
|
|
9
|
+
}) => {
|
|
10
|
+
return /* @__PURE__ */ jsxs("div", { className: `cui-container cui-switch-size-${theme.size}`, children: [
|
|
11
|
+
/* @__PURE__ */ jsx("label", { className: "cui-label", children: label }),
|
|
12
|
+
/* @__PURE__ */ jsx(
|
|
13
|
+
Switch,
|
|
14
|
+
{
|
|
15
|
+
onChange,
|
|
16
|
+
checked: activated,
|
|
17
|
+
offColor: "#888",
|
|
18
|
+
onColor: "#010060",
|
|
19
|
+
uncheckedIcon: false,
|
|
20
|
+
checkedIcon: false,
|
|
21
|
+
className: "cui-switch"
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
] });
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
CustomSwitch as default
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=CustomSwitch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomSwitch.js","sources":["../../../../../../src/legacy/components/atoms/Switch/CustomSwitch.tsx"],"sourcesContent":["import React from 'react'\r\nimport Switch from 'react-switch'\r\nimport { CustomSwitchTheme } from '../../../types/themes/CustomSwitchThemes'\r\n\r\nimport './CustomSwitch.scss'\r\n\r\ntype CustomSwitchProps = {\r\n label: string\r\n activated: boolean\r\n onChange: () => void\r\n theme: CustomSwitchTheme\r\n}\r\n\r\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\r\nconst CustomSwitch: React.FC<CustomSwitchProps> = ({\r\n label,\r\n activated,\r\n onChange,\r\n theme,\r\n}) => {\r\n return (\r\n <div className={`cui-container cui-switch-size-${theme.size}`}>\r\n <label className={'cui-label'}>{label}</label>\r\n <Switch\r\n onChange={onChange}\r\n checked={activated}\r\n offColor=\"#888\"\r\n onColor=\"#010060\"\r\n uncheckedIcon={false}\r\n checkedIcon={false}\r\n className={'cui-switch'}\r\n />\r\n </div>\r\n )\r\n}\r\n\r\nexport default CustomSwitch\r\n"],"names":[],"mappings":";;;AAcA,MAAM,eAA4C,CAAC;AAAA,EACjD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,8BACG,OAAA,EAAI,WAAW,iCAAiC,MAAM,IAAI,IACzD,UAAA;AAAA,IAAA,oBAAC,SAAA,EAAM,WAAW,aAAc,UAAA,OAAM;AAAA,IACtC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,SAAS;AAAA,QACT,UAAS;AAAA,QACT,SAAQ;AAAA,QACR,eAAe;AAAA,QACf,aAAa;AAAA,QACb,WAAW;AAAA,MAAA;AAAA,IAAA;AAAA,EACb,GACF;AAEJ;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.cui-tooltip-wrapper {
|
|
2
|
+
position: relative;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.cui-tooltip,
|
|
6
|
+
.cui-tooltip-interactive {
|
|
7
|
+
position: fixed;
|
|
8
|
+
z-index: 9999999;
|
|
9
|
+
background-color: black;
|
|
10
|
+
border: 1px solid black;
|
|
11
|
+
border-radius: 8px;
|
|
12
|
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.cui-tooltip-interactive {
|
|
16
|
+
pointer-events: auto !important;
|
|
17
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
import ReactDOM from "react-dom";
|
|
4
|
+
import { Tooltip } from "react-tooltip";
|
|
5
|
+
import "react-tooltip/dist/react-tooltip.css";
|
|
6
|
+
import './Tooltip.css';/* empty css */
|
|
7
|
+
const TooltipWrapper = ({
|
|
8
|
+
id,
|
|
9
|
+
children,
|
|
10
|
+
tip,
|
|
11
|
+
interactive = false,
|
|
12
|
+
disabled = false
|
|
13
|
+
}) => {
|
|
14
|
+
const generatedId = useId();
|
|
15
|
+
const tooltipId = id || generatedId;
|
|
16
|
+
if (disabled) return /* @__PURE__ */ jsx("div", { children });
|
|
17
|
+
return /* @__PURE__ */ jsxs("div", { "data-tooltip-id": tooltipId, className: "cui-tooltip-wrapper", children: [
|
|
18
|
+
children,
|
|
19
|
+
ReactDOM.createPortal(
|
|
20
|
+
/* @__PURE__ */ jsx(
|
|
21
|
+
Tooltip,
|
|
22
|
+
{
|
|
23
|
+
id: tooltipId,
|
|
24
|
+
place: "top",
|
|
25
|
+
variant: "dark",
|
|
26
|
+
delayShow: 0,
|
|
27
|
+
delayHide: interactive ? 200 : 0,
|
|
28
|
+
className: interactive ? "cui-tooltip-interactive" : "cui-tooltip",
|
|
29
|
+
"data-interactive": interactive,
|
|
30
|
+
children: /* @__PURE__ */ jsx("div", { className: "cui-tooltip__tip", children: tip })
|
|
31
|
+
}
|
|
32
|
+
),
|
|
33
|
+
document.body
|
|
34
|
+
// Render the tooltip directly to the body element
|
|
35
|
+
)
|
|
36
|
+
] });
|
|
37
|
+
};
|
|
38
|
+
export {
|
|
39
|
+
TooltipWrapper as default
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=Tooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.js","sources":["../../../../../../src/legacy/components/atoms/Tooltip/Tooltip.tsx"],"sourcesContent":["import React, { ReactNode, useId } from 'react'\r\nimport ReactDOM from 'react-dom'\r\nimport { Tooltip } from 'react-tooltip'\r\nimport 'react-tooltip/dist/react-tooltip.css'\r\nimport './Tooltip.scss'\r\n\r\ninterface TooltipWrapperProps {\r\n id?: string\r\n interactive?: boolean\r\n disabled?: boolean\r\n tip: ReactNode\r\n children: ReactNode\r\n}\r\n\r\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\r\nconst TooltipWrapper: React.FC<TooltipWrapperProps> = ({\r\n id,\r\n children,\r\n tip,\r\n interactive = false,\r\n disabled = false,\r\n}) => {\r\n const generatedId = useId()\r\n const tooltipId = id || generatedId\r\n\r\n if (disabled) return <div>{children}</div>\r\n\r\n return (\r\n <div data-tooltip-id={tooltipId} className=\"cui-tooltip-wrapper\">\r\n {children}\r\n {ReactDOM.createPortal(\r\n <Tooltip\r\n id={tooltipId}\r\n place=\"top\"\r\n variant=\"dark\"\r\n delayShow={0}\r\n delayHide={interactive ? 200 : 0}\r\n className={interactive ? 'cui-tooltip-interactive' : 'cui-tooltip'}\r\n data-interactive={interactive}\r\n >\r\n <div className=\"cui-tooltip__tip\">{tip}</div>\r\n </Tooltip>,\r\n document.body // Render the tooltip directly to the body element\r\n )}\r\n </div>\r\n )\r\n}\r\n\r\nexport default TooltipWrapper\r\n"],"names":[],"mappings":";;;;;;AAeA,MAAM,iBAAgD,CAAC;AAAA,EACrD;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,WAAW;AACb,MAAM;AACJ,QAAM,cAAc,MAAA;AACpB,QAAM,YAAY,MAAM;AAExB,MAAI,SAAU,QAAO,oBAAC,OAAA,EAAK,SAAA,CAAS;AAEpC,SACE,qBAAC,OAAA,EAAI,mBAAiB,WAAW,WAAU,uBACxC,UAAA;AAAA,IAAA;AAAA,IACA,SAAS;AAAA,MACR;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,IAAI;AAAA,UACJ,OAAM;AAAA,UACN,SAAQ;AAAA,UACR,WAAW;AAAA,UACX,WAAW,cAAc,MAAM;AAAA,UAC/B,WAAW,cAAc,4BAA4B;AAAA,UACrD,oBAAkB;AAAA,UAElB,UAAA,oBAAC,OAAA,EAAI,WAAU,oBAAoB,UAAA,IAAA,CAAI;AAAA,QAAA;AAAA,MAAA;AAAA,MAEzC,SAAS;AAAA;AAAA,IAAA;AAAA,EACX,GACF;AAEJ;"}
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Chart, registerables } from "chart.js";
|
|
3
|
+
import ChartDataLabels from "chartjs-plugin-datalabels";
|
|
4
|
+
import { Doughnut, Bar, Bubble, Line } from "react-chartjs-2";
|
|
5
|
+
function euros(v) {
|
|
6
|
+
if (v == null) return "—";
|
|
7
|
+
const negativo = v < 0;
|
|
8
|
+
const [inteiro, decimal] = Math.abs(v).toFixed(2).split(".");
|
|
9
|
+
const comMilhares = inteiro.replace(/\B(?=(\d{3})+(?!\d))/g, ".");
|
|
10
|
+
return `${negativo ? "-" : ""}${comMilhares},${decimal} €`;
|
|
11
|
+
}
|
|
12
|
+
function labelBucket(b) {
|
|
13
|
+
if (/^\d{4}-S\d{2}$/.test(b)) return `S${b.slice(6)}/${b.slice(2, 4)}`;
|
|
14
|
+
if (/^\d{4}-\d{2}$/.test(b)) return `${b.slice(5)}/${b.slice(0, 4)}`;
|
|
15
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(b)) return `${b.slice(8)}/${b.slice(5, 7)}`;
|
|
16
|
+
return b;
|
|
17
|
+
}
|
|
18
|
+
Chart.register(...registerables, ChartDataLabels);
|
|
19
|
+
Chart.defaults.set("plugins.datalabels", { display: false });
|
|
20
|
+
Chart.defaults.font.family = "'Montserrat', sans-serif";
|
|
21
|
+
Chart.defaults.color = "#5B6577";
|
|
22
|
+
const PALETA = [
|
|
23
|
+
"#1868B0",
|
|
24
|
+
"#1F8A55",
|
|
25
|
+
"#B96E00",
|
|
26
|
+
"#C23B34",
|
|
27
|
+
"#7C3AED",
|
|
28
|
+
"#0891B2",
|
|
29
|
+
"#DB2777",
|
|
30
|
+
"#65A30D",
|
|
31
|
+
"#4B5563",
|
|
32
|
+
"#D97706",
|
|
33
|
+
"#2563EB",
|
|
34
|
+
"#059669"
|
|
35
|
+
];
|
|
36
|
+
function cor(i) {
|
|
37
|
+
return PALETA[i % PALETA.length];
|
|
38
|
+
}
|
|
39
|
+
const legendaBaixo = {
|
|
40
|
+
position: "bottom",
|
|
41
|
+
labels: { boxWidth: 10, font: { size: 11 }, color: "#182238", usePointStyle: true, pointStyle: "circle" }
|
|
42
|
+
};
|
|
43
|
+
function BarrasEmpilhadas({ serie, altura = 280 }) {
|
|
44
|
+
return /* @__PURE__ */ jsx("div", { style: { height: altura }, children: /* @__PURE__ */ jsx(
|
|
45
|
+
Bar,
|
|
46
|
+
{
|
|
47
|
+
data: {
|
|
48
|
+
labels: serie.labels.map(labelBucket),
|
|
49
|
+
datasets: serie.series.map((s, i) => ({
|
|
50
|
+
label: s.nome,
|
|
51
|
+
data: s.valores,
|
|
52
|
+
backgroundColor: cor(i),
|
|
53
|
+
borderRadius: 3
|
|
54
|
+
}))
|
|
55
|
+
},
|
|
56
|
+
options: {
|
|
57
|
+
maintainAspectRatio: false,
|
|
58
|
+
responsive: true,
|
|
59
|
+
plugins: { legend: legendaBaixo },
|
|
60
|
+
scales: {
|
|
61
|
+
x: { stacked: true, grid: { display: false } },
|
|
62
|
+
y: { stacked: true, beginAtZero: true, grid: { color: "#EEF1F5" } }
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
) });
|
|
67
|
+
}
|
|
68
|
+
function BarrasHorizontais({ dados, altura = 280, limite = 12 }) {
|
|
69
|
+
const labels = dados.labels.slice(0, limite);
|
|
70
|
+
const valores = dados.valores.slice(0, limite);
|
|
71
|
+
return /* @__PURE__ */ jsx("div", { style: { height: altura }, children: /* @__PURE__ */ jsx(
|
|
72
|
+
Bar,
|
|
73
|
+
{
|
|
74
|
+
data: {
|
|
75
|
+
labels,
|
|
76
|
+
datasets: [{ label: "", data: valores, backgroundColor: labels.map((_, i) => cor(i)), borderRadius: 3 }]
|
|
77
|
+
},
|
|
78
|
+
options: {
|
|
79
|
+
indexAxis: "y",
|
|
80
|
+
maintainAspectRatio: false,
|
|
81
|
+
responsive: true,
|
|
82
|
+
plugins: {
|
|
83
|
+
legend: { display: false },
|
|
84
|
+
datalabels: { display: (c) => c.dataset.data[c.dataIndex] != null, anchor: "end", align: "end", color: "#182238", font: { size: 11, weight: 600 } }
|
|
85
|
+
},
|
|
86
|
+
scales: {
|
|
87
|
+
x: { beginAtZero: true, grid: { color: "#EEF1F5" } },
|
|
88
|
+
y: { grid: { display: false } }
|
|
89
|
+
},
|
|
90
|
+
layout: { padding: { right: 28 } }
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
) });
|
|
94
|
+
}
|
|
95
|
+
function Anel({ dados, altura = 260, cores }) {
|
|
96
|
+
return /* @__PURE__ */ jsx("div", { style: { height: altura }, children: /* @__PURE__ */ jsx(
|
|
97
|
+
Doughnut,
|
|
98
|
+
{
|
|
99
|
+
data: {
|
|
100
|
+
labels: dados.labels,
|
|
101
|
+
datasets: [
|
|
102
|
+
{
|
|
103
|
+
data: dados.valores,
|
|
104
|
+
backgroundColor: cores ?? dados.labels.map((_, i) => cor(i)),
|
|
105
|
+
borderWidth: 0
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
options: {
|
|
110
|
+
maintainAspectRatio: false,
|
|
111
|
+
responsive: true,
|
|
112
|
+
cutout: "58%",
|
|
113
|
+
plugins: {
|
|
114
|
+
legend: legendaBaixo,
|
|
115
|
+
datalabels: {
|
|
116
|
+
display: (c) => Number(c.dataset.data[c.dataIndex]) > 0,
|
|
117
|
+
color: "#182238",
|
|
118
|
+
font: { size: 11, weight: 600 }
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
) });
|
|
124
|
+
}
|
|
125
|
+
function Linha({ dados, altura = 260, euros: emEuros = false }) {
|
|
126
|
+
return /* @__PURE__ */ jsx("div", { style: { height: altura }, children: /* @__PURE__ */ jsx(
|
|
127
|
+
Line,
|
|
128
|
+
{
|
|
129
|
+
data: {
|
|
130
|
+
labels: dados.labels.map(labelBucket),
|
|
131
|
+
datasets: [
|
|
132
|
+
{
|
|
133
|
+
label: "",
|
|
134
|
+
data: dados.valores,
|
|
135
|
+
borderColor: "#C23B34",
|
|
136
|
+
backgroundColor: "rgba(194,59,52,0.12)",
|
|
137
|
+
fill: true,
|
|
138
|
+
tension: 0.25,
|
|
139
|
+
pointRadius: 3
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
options: {
|
|
144
|
+
maintainAspectRatio: false,
|
|
145
|
+
responsive: true,
|
|
146
|
+
plugins: {
|
|
147
|
+
legend: { display: false },
|
|
148
|
+
tooltip: {
|
|
149
|
+
callbacks: {
|
|
150
|
+
label: (c) => emEuros ? euros(Number(c.parsed.y)) : String(c.parsed.y)
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
scales: {
|
|
155
|
+
x: { grid: { display: false } },
|
|
156
|
+
y: {
|
|
157
|
+
beginAtZero: true,
|
|
158
|
+
grid: { color: "#EEF1F5" },
|
|
159
|
+
ticks: { callback: (v) => emEuros ? euros(Number(v)) : String(v) }
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
) });
|
|
165
|
+
}
|
|
166
|
+
function Linhas({
|
|
167
|
+
serie,
|
|
168
|
+
altura = 280,
|
|
169
|
+
area = false
|
|
170
|
+
}) {
|
|
171
|
+
return /* @__PURE__ */ jsx("div", { style: { height: altura }, children: /* @__PURE__ */ jsx(
|
|
172
|
+
Line,
|
|
173
|
+
{
|
|
174
|
+
data: {
|
|
175
|
+
labels: serie.labels.map(labelBucket),
|
|
176
|
+
datasets: serie.series.map((s, i) => ({
|
|
177
|
+
label: s.nome,
|
|
178
|
+
data: s.valores,
|
|
179
|
+
borderColor: cor(i),
|
|
180
|
+
backgroundColor: area ? `${cor(i)}22` : cor(i),
|
|
181
|
+
fill: area,
|
|
182
|
+
tension: 0.25,
|
|
183
|
+
pointRadius: serie.labels.length > 24 ? 0 : 3,
|
|
184
|
+
pointHoverRadius: 4
|
|
185
|
+
}))
|
|
186
|
+
},
|
|
187
|
+
options: {
|
|
188
|
+
maintainAspectRatio: false,
|
|
189
|
+
responsive: true,
|
|
190
|
+
interaction: { mode: "index", intersect: false },
|
|
191
|
+
plugins: { legend: legendaBaixo },
|
|
192
|
+
scales: {
|
|
193
|
+
x: { grid: { display: false } },
|
|
194
|
+
y: { beginAtZero: true, grid: { color: "#EEF1F5" } }
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
) });
|
|
199
|
+
}
|
|
200
|
+
function Bolhas({
|
|
201
|
+
pontos,
|
|
202
|
+
altura = 280,
|
|
203
|
+
onClick,
|
|
204
|
+
xTitle = "Active OTs",
|
|
205
|
+
yTitle = "% overdue",
|
|
206
|
+
tooltipLabel = (p) => `${p.responsavel}: ${p.otsAtivas} active, ${p.percentagemForaPrazo}% overdue, ${euros(p.valorPenalizado)}`
|
|
207
|
+
}) {
|
|
208
|
+
const maxValor = Math.max(1, ...pontos.map((p) => p.valorPenalizado));
|
|
209
|
+
return /* @__PURE__ */ jsx("div", { style: { height: altura }, children: /* @__PURE__ */ jsx(
|
|
210
|
+
Bubble,
|
|
211
|
+
{
|
|
212
|
+
data: {
|
|
213
|
+
datasets: pontos.map((p, i) => ({
|
|
214
|
+
label: p.responsavel,
|
|
215
|
+
data: [
|
|
216
|
+
{
|
|
217
|
+
x: p.otsAtivas,
|
|
218
|
+
y: p.percentagemForaPrazo,
|
|
219
|
+
r: 6 + p.valorPenalizado / maxValor * 18
|
|
220
|
+
}
|
|
221
|
+
],
|
|
222
|
+
backgroundColor: `${cor(i)}CC`,
|
|
223
|
+
borderColor: cor(i)
|
|
224
|
+
}))
|
|
225
|
+
},
|
|
226
|
+
options: {
|
|
227
|
+
maintainAspectRatio: false,
|
|
228
|
+
responsive: true,
|
|
229
|
+
onClick: (_e, elements) => {
|
|
230
|
+
const idx = elements[0]?.datasetIndex;
|
|
231
|
+
if (idx != null && onClick) onClick(pontos[idx]);
|
|
232
|
+
},
|
|
233
|
+
plugins: {
|
|
234
|
+
legend: { display: false },
|
|
235
|
+
tooltip: {
|
|
236
|
+
callbacks: {
|
|
237
|
+
label: (c) => tooltipLabel(pontos[c.datasetIndex])
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
scales: {
|
|
242
|
+
x: { beginAtZero: true, title: { display: true, text: xTitle }, grid: { color: "#EEF1F5" } },
|
|
243
|
+
y: { beginAtZero: true, title: { display: true, text: yTitle }, grid: { color: "#EEF1F5" } }
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
) });
|
|
248
|
+
}
|
|
249
|
+
export {
|
|
250
|
+
Anel,
|
|
251
|
+
BarrasEmpilhadas,
|
|
252
|
+
BarrasHorizontais,
|
|
253
|
+
Bolhas,
|
|
254
|
+
Linha,
|
|
255
|
+
Linhas,
|
|
256
|
+
PALETA,
|
|
257
|
+
cor
|
|
258
|
+
};
|
|
259
|
+
//# sourceMappingURL=Charts.js.map
|
|
@@ -0,0 +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 { Bar, Doughnut, Line, Bubble } from 'react-chartjs-2'\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// 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/** 'YYYY-Sxx' / 'YYYY-MM' / 'YYYY-MM-DD' → short axis label. */\r\nfunction labelBucket(b: string): string {\r\n if (/^\\d{4}-S\\d{2}$/.test(b)) return `S${b.slice(6)}/${b.slice(2, 4)}`\r\n if (/^\\d{4}-\\d{2}$/.test(b)) return `${b.slice(5)}/${b.slice(0, 4)}`\r\n if (/^\\d{4}-\\d{2}-\\d{2}$/.test(b)) return `${b.slice(8)}/${b.slice(5, 7)}`\r\n return b\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\nconst legendaBaixo = {\r\n position: 'bottom' as const,\r\n labels: { boxWidth: 10, font: { size: 11 }, color: '#182238', usePointStyle: true, pointStyle: 'circle' as const },\r\n}\r\n\r\n/**\r\n * Stacked bars for a dimension over time.\r\n * @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy.\r\n */\r\nexport function BarrasEmpilhadas({ serie, altura = 280 }: { serie: SerieEmpilhada; altura?: number }) {\r\n return (\r\n <div style={{ height: altura }}>\r\n <Bar\r\n data={{\r\n labels: serie.labels.map(labelBucket),\r\n datasets: serie.series.map((s, i) => ({\r\n label: s.nome,\r\n data: s.valores,\r\n backgroundColor: cor(i),\r\n borderRadius: 3,\r\n })),\r\n }}\r\n options={{\r\n maintainAspectRatio: false,\r\n responsive: true,\r\n plugins: { legend: legendaBaixo },\r\n scales: {\r\n x: { stacked: true, grid: { display: false } },\r\n y: { stacked: true, beginAtZero: true, grid: { color: '#EEF1F5' } },\r\n },\r\n }}\r\n />\r\n </div>\r\n )\r\n}\r\n\r\n/**\r\n * Horizontal bars of a distribution (top N).\r\n * @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy.\r\n */\r\nexport function BarrasHorizontais({ dados, altura = 280, limite = 12 }: { dados: Distribuicao; altura?: number; limite?: number }) {\r\n const labels = dados.labels.slice(0, limite)\r\n const valores = dados.valores.slice(0, limite)\r\n return (\r\n <div style={{ height: altura }}>\r\n <Bar\r\n data={{\r\n labels,\r\n datasets: [{ label: '', data: valores, backgroundColor: labels.map((_, i) => cor(i)), borderRadius: 3 }],\r\n }}\r\n options={{\r\n indexAxis: 'y',\r\n maintainAspectRatio: false,\r\n responsive: true,\r\n plugins: {\r\n legend: { display: false },\r\n datalabels: { display: (c) => c.dataset.data[c.dataIndex] != null, anchor: 'end', align: 'end', color: '#182238', font: { size: 11, weight: 600 } },\r\n },\r\n scales: {\r\n x: { beginAtZero: true, grid: { color: '#EEF1F5' } },\r\n y: { grid: { display: false } },\r\n },\r\n layout: { padding: { right: 28 } },\r\n }}\r\n />\r\n </div>\r\n )\r\n}\r\n\r\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\r\nexport function Anel({ dados, altura = 260, cores }: { dados: Distribuicao; altura?: number; cores?: string[] }) {\r\n return (\r\n <div style={{ height: altura }}>\r\n <Doughnut\r\n data={{\r\n labels: dados.labels,\r\n datasets: [\r\n {\r\n data: dados.valores,\r\n backgroundColor: cores ?? dados.labels.map((_, i) => cor(i)),\r\n borderWidth: 0,\r\n },\r\n ],\r\n }}\r\n options={{\r\n maintainAspectRatio: false,\r\n responsive: true,\r\n cutout: '58%',\r\n plugins: {\r\n legend: legendaBaixo,\r\n datalabels: {\r\n display: (c) => Number(c.dataset.data[c.dataIndex]) > 0,\r\n color: '#182238',\r\n font: { size: 11, weight: 600 },\r\n },\r\n },\r\n }}\r\n />\r\n </div>\r\n )\r\n}\r\n\r\n/**\r\n * Simple line chart — optionally formats values as currency.\r\n * @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy.\r\n */\r\nexport function Linha({ dados, altura = 260, euros: emEuros = false }: { dados: Distribuicao; altura?: number; euros?: boolean }) {\r\n return (\r\n <div style={{ height: altura }}>\r\n <Line\r\n data={{\r\n labels: dados.labels.map(labelBucket),\r\n datasets: [\r\n {\r\n label: '',\r\n data: dados.valores,\r\n borderColor: '#C23B34',\r\n backgroundColor: 'rgba(194,59,52,0.12)',\r\n fill: true,\r\n tension: 0.25,\r\n pointRadius: 3,\r\n },\r\n ],\r\n }}\r\n options={{\r\n maintainAspectRatio: false,\r\n responsive: true,\r\n plugins: {\r\n legend: { display: false },\r\n tooltip: {\r\n callbacks: {\r\n label: (c) => (emEuros ? euros(Number(c.parsed.y)) : String(c.parsed.y)),\r\n },\r\n },\r\n },\r\n scales: {\r\n x: { grid: { display: false } },\r\n y: {\r\n beginAtZero: true,\r\n grid: { color: '#EEF1F5' },\r\n ticks: { callback: (v) => (emEuros ? euros(Number(v)) : String(v)) },\r\n },\r\n },\r\n }}\r\n />\r\n </div>\r\n )\r\n}\r\n\r\n/**\r\n * Several lines over the same labels — NOT stacked.\r\n *\r\n * Separate from `BarrasEmpilhadas` on purpose: two series that measure the same\r\n * thing at two moments (created vs closed) must be read against each other, and\r\n * stacking them would draw their sum, which means nothing.\r\n * @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy.\r\n */\r\nexport function Linhas({\r\n serie,\r\n altura = 280,\r\n area = false,\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}) {\r\n return (\r\n <div style={{ height: altura }}>\r\n <Line\r\n data={{\r\n labels: serie.labels.map(labelBucket),\r\n datasets: serie.series.map((s, i) => ({\r\n label: s.nome,\r\n data: s.valores,\r\n borderColor: cor(i),\r\n backgroundColor: area ? `${cor(i)}22` : cor(i),\r\n fill: area,\r\n tension: 0.25,\r\n pointRadius: serie.labels.length > 24 ? 0 : 3,\r\n pointHoverRadius: 4,\r\n })),\r\n }}\r\n options={{\r\n maintainAspectRatio: false,\r\n responsive: true,\r\n interaction: { mode: 'index', intersect: false },\r\n plugins: { legend: legendaBaixo },\r\n scales: {\r\n x: { grid: { display: false } },\r\n y: { beginAtZero: true, grid: { color: '#EEF1F5' } },\r\n },\r\n }}\r\n />\r\n </div>\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 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 }, grid: { color: '#EEF1F5' } },\r\n y: { beginAtZero: true, title: { display: true, text: yTitle }, grid: { color: '#EEF1F5' } },\r\n },\r\n }}\r\n />\r\n </div>\r\n )\r\n}\r\n"],"names":["ChartJS"],"mappings":";;;;AAoCA,SAAS,MAAM,GAAsC;AACnD,MAAI,KAAK,KAAM,QAAO;AACtB,QAAM,WAAW,IAAI;AACrB,QAA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AE;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,UAAU,MAAM,EAAE,OAAO,YAAU;AAAA,UACzF,GAAG,EAAE,aAAa,MAAM,OAAO,EAAE,SAAS,MAAM,MAAM,UAAU,MAAM,EAAE,OAAO,YAAU;AAAA,QAAE;AAAA,MAC7F;AAAA,IACF;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
function AppLauncher({
|
|
3
|
+
apps,
|
|
4
|
+
heading,
|
|
5
|
+
emptyLabel,
|
|
6
|
+
bgColor = "#001b63",
|
|
7
|
+
bgImage,
|
|
8
|
+
accentColor1 = "#0076ce",
|
|
9
|
+
accentColor2 = "#00d28d",
|
|
10
|
+
navHeight = "3.0625rem"
|
|
11
|
+
}) {
|
|
12
|
+
const useSolidBg = !bgImage;
|
|
13
|
+
return /* @__PURE__ */ jsxs(
|
|
14
|
+
"div",
|
|
15
|
+
{
|
|
16
|
+
style: {
|
|
17
|
+
position: "relative",
|
|
18
|
+
display: "flex",
|
|
19
|
+
flexDirection: "column",
|
|
20
|
+
justifyContent: "center",
|
|
21
|
+
overflow: "hidden",
|
|
22
|
+
// Full-bleed dentro do <main> do TopNavLayout (px-3 sm:px-5 py-4).
|
|
23
|
+
margin: "-1rem -0.75rem",
|
|
24
|
+
minHeight: `calc(100dvh - ${navHeight})`,
|
|
25
|
+
backgroundRepeat: "no-repeat",
|
|
26
|
+
backgroundAttachment: "fixed",
|
|
27
|
+
backgroundSize: "cover",
|
|
28
|
+
...useSolidBg ? { backgroundColor: bgColor } : { backgroundImage: `url(${bgImage})` }
|
|
29
|
+
},
|
|
30
|
+
children: [
|
|
31
|
+
useSolidBg && /* @__PURE__ */ jsxs("div", { style: { position: "absolute", inset: 0, overflow: "hidden", pointerEvents: "none" }, children: [
|
|
32
|
+
/* @__PURE__ */ jsx("div", { style: { position: "absolute", width: "34rem", height: "34rem", borderRadius: "50%", filter: "blur(90px)", top: "-12rem", right: "-10rem", opacity: 0.22, backgroundColor: accentColor1 } }),
|
|
33
|
+
/* @__PURE__ */ jsx("div", { style: { position: "absolute", width: "34rem", height: "34rem", borderRadius: "50%", filter: "blur(90px)", bottom: "-14rem", left: "-12rem", opacity: 0.28, backgroundColor: accentColor2 } })
|
|
34
|
+
] }),
|
|
35
|
+
/* @__PURE__ */ jsxs("div", { style: { position: "relative", zIndex: 1, width: "min(1500px, 92%)", margin: "0 auto", padding: "clamp(1.5rem, 4vh, 3rem) 0" }, children: [
|
|
36
|
+
heading && /* @__PURE__ */ jsx("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", children: heading }),
|
|
37
|
+
/* @__PURE__ */ jsx(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
style: {
|
|
41
|
+
display: "grid",
|
|
42
|
+
gridTemplateColumns: "repeat(auto-fit, minmax(clamp(280px, 22vw, 340px), 340px))",
|
|
43
|
+
justifyContent: "center",
|
|
44
|
+
gap: "clamp(0.875rem, 1vw, 1.25rem)"
|
|
45
|
+
},
|
|
46
|
+
children: apps.map((app, i) => /* @__PURE__ */ jsxs(
|
|
47
|
+
"button",
|
|
48
|
+
{
|
|
49
|
+
type: "button",
|
|
50
|
+
onClick: app.onClick,
|
|
51
|
+
title: app.title2 ?? app.description ?? app.title,
|
|
52
|
+
className: "group",
|
|
53
|
+
style: {
|
|
54
|
+
position: "relative",
|
|
55
|
+
display: "flex",
|
|
56
|
+
alignItems: "center",
|
|
57
|
+
gap: "clamp(0.875rem, 0.8vw, 1.125rem)",
|
|
58
|
+
width: "100%",
|
|
59
|
+
padding: "clamp(1.125rem, 1.1vw, 1.5rem) clamp(1.25rem, 1.3vw, 1.75rem)",
|
|
60
|
+
textAlign: "left",
|
|
61
|
+
cursor: "pointer",
|
|
62
|
+
color: "#fff",
|
|
63
|
+
background: "rgba(255,255,255,0.07)",
|
|
64
|
+
border: "1px solid rgba(255,255,255,0.14)",
|
|
65
|
+
borderRadius: "10px",
|
|
66
|
+
backdropFilter: "blur(10px)",
|
|
67
|
+
transition: "transform .15s ease, background .15s ease, border-color .15s ease"
|
|
68
|
+
},
|
|
69
|
+
onMouseEnter: (e) => {
|
|
70
|
+
e.currentTarget.style.transform = "translateY(-2px)";
|
|
71
|
+
e.currentTarget.style.background = "rgba(255,255,255,0.13)";
|
|
72
|
+
e.currentTarget.style.borderColor = "#00d28d";
|
|
73
|
+
},
|
|
74
|
+
onMouseLeave: (e) => {
|
|
75
|
+
e.currentTarget.style.transform = "translateY(0)";
|
|
76
|
+
e.currentTarget.style.background = "rgba(255,255,255,0.07)";
|
|
77
|
+
e.currentTarget.style.borderColor = "rgba(255,255,255,0.14)";
|
|
78
|
+
},
|
|
79
|
+
children: [
|
|
80
|
+
app.icon != null && /* @__PURE__ */ jsx("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" }, children: app.icon }),
|
|
81
|
+
/* @__PURE__ */ jsxs("span", { style: { minWidth: 0 }, children: [
|
|
82
|
+
/* @__PURE__ */ jsx("span", { style: { display: "block", fontSize: "clamp(0.95rem, 0.85vw, 1.15rem)", fontWeight: 600, lineHeight: 1.25 }, children: app.title }),
|
|
83
|
+
app.description && /* @__PURE__ */ jsx("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)" }, children: app.description })
|
|
84
|
+
] })
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
i
|
|
88
|
+
))
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
apps.length === 0 && emptyLabel && /* @__PURE__ */ jsx("p", { style: { textAlign: "center", color: "rgba(255,255,255,0.6)", fontSize: "0.9rem" }, children: emptyLabel })
|
|
92
|
+
] })
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
export {
|
|
98
|
+
AppLauncher as default
|
|
99
|
+
};
|
|
100
|
+
//# sourceMappingURL=AppLauncher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppLauncher.js","sources":["../../../../../../src/legacy/components/layout/AppLauncher/AppLauncher.tsx"],"sourcesContent":["import React from 'react'\r\n\r\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\r\nexport interface LauncherApp {\r\n /** Título da app (linha principal). */\r\n title: string\r\n /** Subtítulo opcional. */\r\n description?: string\r\n /** Ícone (ReactNode) — a app passa o seu (ex: <FontAwesomeIcon .../>). */\r\n icon?: React.ReactNode\r\n onClick: () => void\r\n /** Tooltip opcional; default = description || title. */\r\n title2?: string\r\n}\r\n\r\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\r\nexport interface AppLauncherProps {\r\n apps: LauncherApp[]\r\n /** Cabeçalho (ex: <>Bem-vindo <strong>Vinst</strong></>). O <strong> fica turquesa. */\r\n heading?: React.ReactNode\r\n /** Texto quando não há apps. */\r\n emptyLabel?: string\r\n /** Fundo: cor sólida (default) ou imagem. */\r\n bgColor?: string\r\n bgImage?: string | null\r\n accentColor1?: string\r\n accentColor2?: string\r\n /** Altura da nav do TopNavLayout para o cálculo de min-height. */\r\n navHeight?: string\r\n}\r\n\r\n/**\r\n * Ecrã de launcher de aplicações (grid centrado de cartões em vidro sobre fundo\r\n * escuro). Feito para viver dentro do <main> do TopNavLayout — cancela o padding\r\n * dele com margens negativas para ficar full-bleed. Ícones vêm da app (ReactNode).\r\n * @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy.\r\n */\r\nexport default function AppLauncher({\r\n apps,\r\n heading,\r\n emptyLabel,\r\n bgColor = '#001b63',\r\n bgImage,\r\n accentColor1 = '#0076ce',\r\n accentColor2 = '#00d28d',\r\n navHeight = '3.0625rem',\r\n}: AppLauncherProps) {\r\n const useSolidBg = !bgImage\r\n\r\n return (\r\n <div\r\n style={{\r\n position: 'relative',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'center',\r\n overflow: 'hidden',\r\n // Full-bleed dentro do <main> do TopNavLayout (px-3 sm:px-5 py-4).\r\n margin: '-1rem -0.75rem',\r\n minHeight: `calc(100dvh - ${navHeight})`,\r\n backgroundRepeat: 'no-repeat',\r\n backgroundAttachment: 'fixed',\r\n backgroundSize: 'cover',\r\n ...(useSolidBg ? { backgroundColor: bgColor } : { backgroundImage: `url(${bgImage})` }),\r\n }}\r\n >\r\n {useSolidBg && (\r\n <div style={{ position: 'absolute', inset: 0, overflow: 'hidden', pointerEvents: 'none' }}>\r\n <div style={{ position: 'absolute', width: '34rem', height: '34rem', borderRadius: '50%', filter: 'blur(90px)', top: '-12rem', right: '-10rem', opacity: 0.22, backgroundColor: accentColor1 }} />\r\n <div style={{ position: 'absolute', width: '34rem', height: '34rem', borderRadius: '50%', filter: 'blur(90px)', bottom: '-14rem', left: '-12rem', opacity: 0.28, backgroundColor: accentColor2 }} />\r\n </div>\r\n )}\r\n\r\n <div style={{ position: 'relative', zIndex: 1, width: 'min(1500px, 92%)', margin: '0 auto', padding: 'clamp(1.5rem, 4vh, 3rem) 0' }}>\r\n {heading && (\r\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\">\r\n {heading}\r\n </h2>\r\n )}\r\n\r\n <div\r\n style={{\r\n display: 'grid',\r\n gridTemplateColumns: 'repeat(auto-fit, minmax(clamp(280px, 22vw, 340px), 340px))',\r\n justifyContent: 'center',\r\n gap: 'clamp(0.875rem, 1vw, 1.25rem)',\r\n }}\r\n >\r\n {apps.map((app, i) => (\r\n <button\r\n key={i}\r\n type=\"button\"\r\n onClick={app.onClick}\r\n title={app.title2 ?? app.description ?? app.title}\r\n className=\"group\"\r\n style={{\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'center',\r\n gap: 'clamp(0.875rem, 0.8vw, 1.125rem)',\r\n width: '100%',\r\n padding: 'clamp(1.125rem, 1.1vw, 1.5rem) clamp(1.25rem, 1.3vw, 1.75rem)',\r\n textAlign: 'left',\r\n cursor: 'pointer',\r\n color: '#fff',\r\n background: 'rgba(255,255,255,0.07)',\r\n border: '1px solid rgba(255,255,255,0.14)',\r\n borderRadius: '10px',\r\n backdropFilter: 'blur(10px)',\r\n transition: 'transform .15s ease, background .15s ease, border-color .15s ease',\r\n }}\r\n onMouseEnter={(e) => { e.currentTarget.style.transform = 'translateY(-2px)'; e.currentTarget.style.background = 'rgba(255,255,255,0.13)'; e.currentTarget.style.borderColor = '#00d28d' }}\r\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)' }}\r\n >\r\n {app.icon != null && (\r\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' }}>\r\n {app.icon}\r\n </span>\r\n )}\r\n <span style={{ minWidth: 0 }}>\r\n <span style={{ display: 'block', fontSize: 'clamp(0.95rem, 0.85vw, 1.15rem)', fontWeight: 600, lineHeight: 1.25 }}>{app.title}</span>\r\n {app.description && (\r\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>\r\n )}\r\n </span>\r\n </button>\r\n ))}\r\n </div>\r\n\r\n {apps.length === 0 && emptyLabel && (\r\n <p style={{ textAlign: 'center', color: 'rgba(255,255,255,0.6)', fontSize: '0.9rem' }}>{emptyLabel}</p>\r\n )}\r\n </div>\r\n </div>\r\n )\r\n}\r\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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
|
|
5
|
+
margin: 1rem;
|
|
6
|
+
padding: 1rem;
|
|
7
|
+
border-radius: 25px;
|
|
8
|
+
}
|
|
9
|
+
.error .cui-error-heading {
|
|
10
|
+
font-size: 1.2rem;
|
|
11
|
+
font-weight: bold;
|
|
12
|
+
}
|
|
13
|
+
.error .cui-error-list {
|
|
14
|
+
list-style: none;
|
|
15
|
+
padding: 0;
|
|
16
|
+
margin: 0;
|
|
17
|
+
}
|
|
18
|
+
.error .cui-error-message {
|
|
19
|
+
white-space: break-spaces;
|
|
20
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import './Error.css';/* empty css */
|
|
3
|
+
const Error = ({ messages }) => {
|
|
4
|
+
return /* @__PURE__ */ jsx("div", { className: "error", children: /* @__PURE__ */ jsxs("div", { className: "cui-error", children: [
|
|
5
|
+
/* @__PURE__ */ jsx("h4", { children: "Ooops...." }),
|
|
6
|
+
/* @__PURE__ */ jsx("ul", { className: "cui-error-list", children: messages ? messages.map((message, index) => /* @__PURE__ */ jsx("li", { className: "cui-error-message", children: message }, index)) : /* @__PURE__ */ jsx("li", { children: "An unexpected error occurred." }) })
|
|
7
|
+
] }) });
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
Error as default
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=Error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Error.js","sources":["../../../../../../src/legacy/components/layout/Error/Error.tsx"],"sourcesContent":["import React from 'react'\r\n\r\nimport './Error.scss'\r\n\r\ninterface ErrorProps {\r\n messages: string[]\r\n}\r\n\r\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\r\nconst Error: React.FC<ErrorProps> = ({ messages }) => {\r\n return (\r\n <div className=\"error\">\r\n <div className=\"cui-error\">\r\n <h4>Ooops....</h4>\r\n <ul className=\"cui-error-list\">\r\n {messages ? (\r\n messages.map((message, index) => (\r\n <li key={index} className=\"cui-error-message\">\r\n {message}\r\n </li>\r\n ))\r\n ) : (\r\n <li>An unexpected error occurred.</li>\r\n )}\r\n </ul>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default Error\r\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;"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
/* Intencionalmente VAZIO.
|
|
3
|
+
*
|
|
4
|
+
* As atoms antigas faziam `@import url('.../styles/index.scss')`, e este ficheiro
|
|
5
|
+
* injetava no CONSUMIDOR (via style-loader do bundle) um reset global agressivo
|
|
6
|
+
* (`* { margin:0; padding:0 }`), `@font-face` Urbanist (.ttf → 404 sob subpaths),
|
|
7
|
+
* `canvas { height:auto }` (partia o sizing dos charts) e `body { font-family;
|
|
8
|
+
* background }`. Uma LIB não pode impor nada disto — nukeava o spacing/fonte/fundo
|
|
9
|
+
* de qualquer app que importasse o common-ui (visível sobretudo em apps com
|
|
10
|
+
* utilities layered, que perdem ao `*` injetado).
|
|
11
|
+
*
|
|
12
|
+
* Cada app define o seu próprio reset/fonte/fundo. Mantido como no-op p/ os
|
|
13
|
+
* imports existentes não partirem. */
|
|
14
|
+
.cui-footer {
|
|
15
|
+
height: 5vh;
|
|
16
|
+
width: 100%;
|
|
17
|
+
margin: auto 0 0 0;
|
|
18
|
+
}
|
|
19
|
+
.cui-footer__container {
|
|
20
|
+
max-width: 90vw;
|
|
21
|
+
margin: 0 auto;
|
|
22
|
+
font-size: 10px;
|
|
23
|
+
font-weight: 600;
|
|
24
|
+
padding: 1vh;
|
|
25
|
+
color: var(--light-gray-02);
|
|
26
|
+
border-top: 1px solid var(--light-gray-02);
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
}
|
|
30
|
+
.cui-footer__title {
|
|
31
|
+
width: 30%;
|
|
32
|
+
display: flex;
|
|
33
|
+
justify-content: right;
|
|
34
|
+
font-size: 13px;
|
|
35
|
+
}
|
|
36
|
+
.cui-footer__icon {
|
|
37
|
+
width: 10%;
|
|
38
|
+
height: 20px;
|
|
39
|
+
}
|
|
40
|
+
.cui-footer__text {
|
|
41
|
+
width: 60%;
|
|
42
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import logoIcon from "../../../assets/svgs/proef-footer-logo.svg.js";
|
|
3
|
+
import './Footer.css';/* empty css */
|
|
4
|
+
const Footer = ({
|
|
5
|
+
companyName = "the data controller",
|
|
6
|
+
contactEmail
|
|
7
|
+
}) => {
|
|
8
|
+
return /* @__PURE__ */ jsx("div", { className: "cui-footer", children: /* @__PURE__ */ jsxs("div", { className: "cui-footer__container", children: [
|
|
9
|
+
/* @__PURE__ */ jsx("p", { className: "cui-footer__title", children: "Developed By" }),
|
|
10
|
+
/* @__PURE__ */ jsx("img", { className: "cui-footer__icon", src: logoIcon, alt: "logo" }),
|
|
11
|
+
/* @__PURE__ */ jsxs("p", { className: "cui-footer__text", children: [
|
|
12
|
+
"In accordance with the provisions of the Personal Data Protection Legislation, we inform you that your personal data will be incorporated into our Personal Data File, for the purpose of managing our company's contact diary, the party responsible for processing your data is ",
|
|
13
|
+
companyName,
|
|
14
|
+
". You can exercise your rights of access, rectification, opposition and erasure through this email address",
|
|
15
|
+
contactEmail ? `, or through the email ${contactEmail}` : "",
|
|
16
|
+
"."
|
|
17
|
+
] })
|
|
18
|
+
] }) });
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
Footer as default
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=Footer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Footer.js","sources":["../../../../../../src/legacy/components/layout/Footer/Footer.tsx"],"sourcesContent":["import React from 'react'\r\n\r\nimport logoIcon from '../../../assets/svgs/proef-footer-logo.svg'\r\n\r\nimport './Footer.scss'\r\n\r\nexport interface FooterProps {\r\n /** Nome do responsável pelo tratamento de dados (aviso RGPD). */\r\n companyName?: string\r\n /** Email de contacto para exercer direitos RGPD. */\r\n contactEmail?: string\r\n}\r\n\r\n/** @deprecated Legacy — não usar em código novo. Ver Storybook › Legacy. */\r\nconst Footer: React.FC<FooterProps> = ({\r\n companyName = 'the data controller',\r\n contactEmail,\r\n}) => {\r\n return (\r\n <div className=\"cui-footer\">\r\n <div className=\"cui-footer__container\">\r\n <p className=\"cui-footer__title\">Developed By</p>\r\n <img className=\"cui-footer__icon\" src={logoIcon} alt=\"logo\" />\r\n <p className=\"cui-footer__text\">\r\n In accordance with the provisions of the Personal Data Protection\r\n Legislation, we inform you that your personal data will be\r\n incorporated into our Personal Data File, for the purpose of managing\r\n our company's contact diary, the party responsible for processing\r\n your data is {companyName}. You can exercise your rights of access,\r\n rectification, opposition and erasure through this email address\r\n {contactEmail ? `, or through the email ${contactEmail}` : ''}.\r\n </p>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default Footer\r\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;"}
|