nurseitaly-components 0.0.1
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/README.md +93 -0
- package/dist/basic/Avatar/Avatar.d.ts +12 -0
- package/dist/basic/Avatar/Avatar.js +24 -0
- package/dist/basic/Avatar/avatar.png +0 -0
- package/dist/basic/Avatar/index.d.ts +2 -0
- package/dist/basic/Avatar/index.js +2 -0
- package/dist/basic/Avatar/styles.scss +80 -0
- package/dist/basic/Badge/Badge.d.ts +13 -0
- package/dist/basic/Badge/Badge.js +17 -0
- package/dist/basic/Badge/index.d.ts +2 -0
- package/dist/basic/Badge/index.js +2 -0
- package/dist/basic/Badge/styles.scss +68 -0
- package/dist/basic/Button/Button.d.ts +25 -0
- package/dist/basic/Button/Button.js +42 -0
- package/dist/basic/Button/index.d.ts +2 -0
- package/dist/basic/Button/index.js +2 -0
- package/dist/basic/Button/logo-ud.png +0 -0
- package/dist/basic/Button/styles.scss +248 -0
- package/dist/basic/CheckboxField/CheckboxField.d.ts +10 -0
- package/dist/basic/CheckboxField/CheckboxField.js +9 -0
- package/dist/basic/CheckboxField/index.d.ts +2 -0
- package/dist/basic/CheckboxField/index.js +2 -0
- package/dist/basic/CheckboxField/style.scss +4 -0
- package/dist/basic/DatePickerField/DatePickerField.d.ts +26 -0
- package/dist/basic/DatePickerField/DatePickerField.js +90 -0
- package/dist/basic/DatePickerField/DatePickerTheme.d.ts +2 -0
- package/dist/basic/DatePickerField/DatePickerTheme.js +59 -0
- package/dist/basic/DatePickerField/index.d.ts +1 -0
- package/dist/basic/DatePickerField/index.js +1 -0
- package/dist/basic/DatePickerField/styles.scss +26 -0
- package/dist/basic/DropdownButton/DropdownButton.d.ts +18 -0
- package/dist/basic/DropdownButton/DropdownButton.js +44 -0
- package/dist/basic/DropdownButton/index.d.ts +2 -0
- package/dist/basic/DropdownButton/index.js +2 -0
- package/dist/basic/DropdownButton/styles.scss +172 -0
- package/dist/basic/DropdownList/DropdownItemList.d.ts +16 -0
- package/dist/basic/DropdownList/DropdownItemList.js +17 -0
- package/dist/basic/DropdownList/DropdownList.d.ts +9 -0
- package/dist/basic/DropdownList/DropdownList.js +10 -0
- package/dist/basic/DropdownList/index.d.ts +2 -0
- package/dist/basic/DropdownList/index.js +2 -0
- package/dist/basic/DropdownList/styles.scss +56 -0
- package/dist/basic/DropdownMenu/DropdownMenu.d.ts +13 -0
- package/dist/basic/DropdownMenu/DropdownMenu.js +12 -0
- package/dist/basic/DropdownMenu/index.d.ts +2 -0
- package/dist/basic/DropdownMenu/index.js +2 -0
- package/dist/basic/DropdownMenu/styles.scss +54 -0
- package/dist/basic/Dummy/Dummy.d.ts +9 -0
- package/dist/basic/Dummy/Dummy.js +8 -0
- package/dist/basic/Dummy/index.d.ts +2 -0
- package/dist/basic/Dummy/index.js +2 -0
- package/dist/basic/Dummy/styles.scss +4 -0
- package/dist/basic/FilterDropdown/FilterDropdown.d.ts +16 -0
- package/dist/basic/FilterDropdown/FilterDropdown.js +56 -0
- package/dist/basic/FilterDropdown/index.d.ts +2 -0
- package/dist/basic/FilterDropdown/index.js +2 -0
- package/dist/basic/FilterDropdown/styles.scss +97 -0
- package/dist/basic/Icon/Icon.d.ts +15 -0
- package/dist/basic/Icon/Icon.js +20 -0
- package/dist/basic/Icon/IconSizes.d.ts +10 -0
- package/dist/basic/Icon/IconSizes.js +11 -0
- package/dist/basic/Icon/index.d.ts +2 -0
- package/dist/basic/Icon/index.js +2 -0
- package/dist/basic/Icon/styles.scss +249 -0
- package/dist/basic/IconButton/IconButton.d.ts +24 -0
- package/dist/basic/IconButton/IconButton.js +42 -0
- package/dist/basic/IconButton/index.d.ts +2 -0
- package/dist/basic/IconButton/index.js +2 -0
- package/dist/basic/IconButton/styles.scss +192 -0
- package/dist/basic/Pill/Pill.d.ts +17 -0
- package/dist/basic/Pill/Pill.js +22 -0
- package/dist/basic/Pill/index.d.ts +2 -0
- package/dist/basic/Pill/index.js +2 -0
- package/dist/basic/Pill/styles.scss +70 -0
- package/dist/basic/SelectField/AsyncSelectField.d.ts +21 -0
- package/dist/basic/SelectField/AsyncSelectField.js +131 -0
- package/dist/basic/SelectField/SelectAutocompleteTheme.d.ts +2 -0
- package/dist/basic/SelectField/SelectAutocompleteTheme.js +78 -0
- package/dist/basic/SelectField/SelectField.d.ts +27 -0
- package/dist/basic/SelectField/SelectField.js +81 -0
- package/dist/basic/SelectField/SelectFieldTheme.d.ts +7 -0
- package/dist/basic/SelectField/SelectFieldTheme.js +57 -0
- package/dist/basic/SelectField/SelectMultipleField.d.ts +28 -0
- package/dist/basic/SelectField/SelectMultipleField.js +98 -0
- package/dist/basic/SelectField/index.d.ts +2 -0
- package/dist/basic/SelectField/index.js +2 -0
- package/dist/basic/SelectField/styles.scss +38 -0
- package/dist/basic/Spinner/Spinner.d.ts +14 -0
- package/dist/basic/Spinner/Spinner.js +37 -0
- package/dist/basic/Spinner/index.d.ts +2 -0
- package/dist/basic/Spinner/index.js +2 -0
- package/dist/basic/Spinner/styles.scss +37 -0
- package/dist/basic/SwitchField/SwitchField.d.ts +11 -0
- package/dist/basic/SwitchField/SwitchField.js +13 -0
- package/dist/basic/SwitchField/index.d.ts +2 -0
- package/dist/basic/SwitchField/index.js +2 -0
- package/dist/basic/SwitchField/style.scss +4 -0
- package/dist/basic/Tabs/Tabs.d.ts +17 -0
- package/dist/basic/Tabs/Tabs.js +9 -0
- package/dist/basic/Tabs/index.d.ts +2 -0
- package/dist/basic/Tabs/index.js +2 -0
- package/dist/basic/Tabs/styles.scss +51 -0
- package/dist/basic/Tag/Tag.d.ts +18 -0
- package/dist/basic/Tag/Tag.js +30 -0
- package/dist/basic/Tag/index.d.ts +2 -0
- package/dist/basic/Tag/index.js +2 -0
- package/dist/basic/Tag/styles.scss +101 -0
- package/dist/basic/TextField/TextField.d.ts +34 -0
- package/dist/basic/TextField/TextField.js +164 -0
- package/dist/basic/TextField/TextFieldTheme.d.ts +6 -0
- package/dist/basic/TextField/TextFieldTheme.js +70 -0
- package/dist/basic/TextField/index.d.ts +2 -0
- package/dist/basic/TextField/index.js +2 -0
- package/dist/basic/TextField/inputRefManager.d.ts +4 -0
- package/dist/basic/TextField/inputRefManager.js +18 -0
- package/dist/basic/TextField/styles.scss +44 -0
- package/dist/basic/Tooltip/Tooltip.d.ts +26 -0
- package/dist/basic/Tooltip/Tooltip.js +37 -0
- package/dist/basic/Tooltip/index.d.ts +2 -0
- package/dist/basic/Tooltip/index.js +2 -0
- package/dist/basic/Tooltip/styles.scss +73 -0
- package/dist/basic/VerticalButton/VerticalButton.d.ts +6 -0
- package/dist/basic/VerticalButton/VerticalButton.js +8 -0
- package/dist/basic/VerticalButton/index.d.ts +2 -0
- package/dist/basic/VerticalButton/index.js +2 -0
- package/dist/basic/VerticalButton/styles.scss +24 -0
- package/dist/basic/fonts/material-symbols-outlined.woff2 +0 -0
- package/dist/basic/fonts/work-sans-latin-ext.woff2 +0 -0
- package/dist/basic/fonts/work-sans-latin.woff2 +0 -0
- package/dist/basic/fonts/work-sans-vietnamese.woff2 +0 -0
- package/dist/basic/fonts.d.ts +1 -0
- package/dist/basic/fonts.js +111 -0
- package/dist/basic/index.d.ts +33 -0
- package/dist/basic/index.js +29 -0
- package/dist/common/AppAnalytics/AppAnalytics.d.ts +1 -0
- package/dist/common/AppAnalytics/AppAnalytics.js +25 -0
- package/dist/common/AppAnalytics/index.d.ts +2 -0
- package/dist/common/AppAnalytics/index.js +2 -0
- package/dist/common/AppCard/AppCard.d.ts +13 -0
- package/dist/common/AppCard/AppCard.js +7 -0
- package/dist/common/AppCard/index.d.ts +2 -0
- package/dist/common/AppCard/index.js +2 -0
- package/dist/common/AppCard/style.scss +33 -0
- package/dist/common/AppClipboard/AppClipboard.d.ts +7 -0
- package/dist/common/AppClipboard/AppClipboard.js +23 -0
- package/dist/common/AppClipboard/index.d.ts +2 -0
- package/dist/common/AppClipboard/index.js +2 -0
- package/dist/common/AppColorpicker/AppColorpicker.d.ts +9 -0
- package/dist/common/AppColorpicker/AppColorpicker.js +22 -0
- package/dist/common/AppColorpicker/index.d.ts +2 -0
- package/dist/common/AppColorpicker/index.js +2 -0
- package/dist/common/AppColorpicker/style.scss +26 -0
- package/dist/common/AppCopyText/AppCopyText.d.ts +11 -0
- package/dist/common/AppCopyText/AppCopyText.js +35 -0
- package/dist/common/AppCopyText/index.d.ts +2 -0
- package/dist/common/AppCopyText/index.js +2 -0
- package/dist/common/AppCopyText/styles.scss +55 -0
- package/dist/common/AppDropzone/AppDropzone.d.ts +19 -0
- package/dist/common/AppDropzone/AppDropzone.js +13 -0
- package/dist/common/AppDropzone/AppDropzoneBody.d.ts +22 -0
- package/dist/common/AppDropzone/AppDropzoneBody.js +74 -0
- package/dist/common/AppDropzone/UploadService.d.ts +6 -0
- package/dist/common/AppDropzone/UploadService.js +18 -0
- package/dist/common/AppDropzone/UploadedFile.d.ts +14 -0
- package/dist/common/AppDropzone/UploadedFile.js +1 -0
- package/dist/common/AppDropzone/index.d.ts +4 -0
- package/dist/common/AppDropzone/index.js +4 -0
- package/dist/common/AppDropzone/style.scss +42 -0
- package/dist/common/AppDropzoneLocal/AppDropzoneBodyLocal.d.ts +15 -0
- package/dist/common/AppDropzoneLocal/AppDropzoneBodyLocal.js +55 -0
- package/dist/common/AppDropzoneLocal/AppDropzoneLocal.d.ts +15 -0
- package/dist/common/AppDropzoneLocal/AppDropzoneLocal.js +13 -0
- package/dist/common/AppDropzoneLocal/UploadedFileLocal.d.ts +5 -0
- package/dist/common/AppDropzoneLocal/UploadedFileLocal.js +1 -0
- package/dist/common/AppDropzoneLocal/index.d.ts +5 -0
- package/dist/common/AppDropzoneLocal/index.js +4 -0
- package/dist/common/AppDropzoneLocal/style.scss +75 -0
- package/dist/common/AppForm/AppForm.d.ts +16 -0
- package/dist/common/AppForm/AppForm.js +67 -0
- package/dist/common/AppForm/AppFormField.d.ts +37 -0
- package/dist/common/AppForm/AppFormField.js +10 -0
- package/dist/common/AppForm/AppFormInfo.d.ts +9 -0
- package/dist/common/AppForm/AppFormInfo.js +45 -0
- package/dist/common/AppForm/FormColorField.d.ts +12 -0
- package/dist/common/AppForm/FormColorField.js +23 -0
- package/dist/common/AppForm/index.d.ts +2 -0
- package/dist/common/AppForm/index.js +2 -0
- package/dist/common/AppForm/style.scss +60 -0
- package/dist/common/AppLoading/AppLoading.d.ts +7 -0
- package/dist/common/AppLoading/AppLoading.js +8 -0
- package/dist/common/AppLoading/index.d.ts +2 -0
- package/dist/common/AppLoading/index.js +2 -0
- package/dist/common/AppLoading/style.scss +5 -0
- package/dist/common/AppModal/AppModal.d.ts +27 -0
- package/dist/common/AppModal/AppModal.js +42 -0
- package/dist/common/AppModal/AppModalConfirm.d.ts +15 -0
- package/dist/common/AppModal/AppModalConfirm.js +37 -0
- package/dist/common/AppModal/AppModalRemove.d.ts +22 -0
- package/dist/common/AppModal/AppModalRemove.js +35 -0
- package/dist/common/AppModal/AppModalUtils.d.ts +2 -0
- package/dist/common/AppModal/AppModalUtils.js +17 -0
- package/dist/common/AppModal/index.d.ts +2 -0
- package/dist/common/AppModal/index.js +2 -0
- package/dist/common/AppModal/style.scss +100 -0
- package/dist/common/AppPagination/AppPagination.d.ts +12 -0
- package/dist/common/AppPagination/AppPagination.js +212 -0
- package/dist/common/AppPagination/index.d.ts +2 -0
- package/dist/common/AppPagination/index.js +2 -0
- package/dist/common/AppPagination/styles.scss +230 -0
- package/dist/common/AppPicture/AppPicture.d.ts +10 -0
- package/dist/common/AppPicture/AppPicture.js +18 -0
- package/dist/common/AppPicture/index.d.ts +2 -0
- package/dist/common/AppPicture/index.js +2 -0
- package/dist/common/AppPicture/style.scss +0 -0
- package/dist/common/AppPlaceholder/AppPlaceholder.d.ts +12 -0
- package/dist/common/AppPlaceholder/AppPlaceholder.js +7 -0
- package/dist/common/AppPlaceholder/index.d.ts +2 -0
- package/dist/common/AppPlaceholder/index.js +2 -0
- package/dist/common/AppPlaceholder/style.scss +25 -0
- package/dist/common/AppSwitchGroup/AppSwitchGroup.d.ts +12 -0
- package/dist/common/AppSwitchGroup/AppSwitchGroup.js +8 -0
- package/dist/common/AppSwitchGroup/index.d.ts +2 -0
- package/dist/common/AppSwitchGroup/index.js +2 -0
- package/dist/common/AppSwitchGroup/style.scss +18 -0
- package/dist/common/AppTable/AppTable.d.ts +19 -0
- package/dist/common/AppTable/AppTable.js +62 -0
- package/dist/common/AppTable/AppTableList.d.ts +14 -0
- package/dist/common/AppTable/AppTableList.js +48 -0
- package/dist/common/AppTable/AppTableTheme.d.ts +1 -0
- package/dist/common/AppTable/AppTableTheme.js +45 -0
- package/dist/common/AppTable/AppTableUtils.d.ts +8 -0
- package/dist/common/AppTable/AppTableUtils.js +24 -0
- package/dist/common/AppTable/index.d.ts +2 -0
- package/dist/common/AppTable/index.js +2 -0
- package/dist/common/AppTable/styles.scss +65 -0
- package/dist/common/AppTable/types/AppPage.d.ts +29 -0
- package/dist/common/AppTable/types/AppPage.js +18 -0
- package/dist/common/AppTable/types/AppPageable.d.ts +15 -0
- package/dist/common/AppTable/types/AppPageable.js +19 -0
- package/dist/common/AppTextArea/AppTextArea.d.ts +11 -0
- package/dist/common/AppTextArea/AppTextArea.js +29 -0
- package/dist/common/AppTextArea/index.d.ts +1 -0
- package/dist/common/AppTextArea/index.js +1 -0
- package/dist/common/AppTextArea/style.scss +47 -0
- package/dist/common/AppToast/AppToast.d.ts +2 -0
- package/dist/common/AppToast/AppToast.js +81 -0
- package/dist/common/AppToast/ToastMessage.d.ts +8 -0
- package/dist/common/AppToast/ToastMessage.js +4 -0
- package/dist/common/AppToast/index.d.ts +2 -0
- package/dist/common/AppToast/index.js +2 -0
- package/dist/common/AppToast/style.scss +0 -0
- package/dist/common/index.d.ts +27 -0
- package/dist/common/index.js +23 -0
- package/dist/configs/CommonContext.d.ts +10 -0
- package/dist/configs/CommonContext.js +9 -0
- package/dist/configs/CookieStorage.d.ts +15 -0
- package/dist/configs/CookieStorage.js +45 -0
- package/dist/configs/Localization.d.ts +28 -0
- package/dist/configs/Localization.js +63 -0
- package/dist/configs/Storage.d.ts +9 -0
- package/dist/configs/Storage.js +16 -0
- package/dist/configs/api.d.ts +10 -0
- package/dist/configs/api.js +52 -0
- package/dist/configs/index.d.ts +8 -0
- package/dist/configs/index.js +7 -0
- package/dist/configs/localization/BaseTexts.d.ts +44 -0
- package/dist/configs/localization/BaseTexts.js +44 -0
- package/dist/configs/localization/CommentsTexts.d.ts +95 -0
- package/dist/configs/localization/CommentsTexts.js +95 -0
- package/dist/configs/localization/CommonTexts.d.ts +239 -0
- package/dist/configs/localization/CommonTexts.js +239 -0
- package/dist/configs/localization/ConsentTexts.d.ts +116 -0
- package/dist/configs/localization/ConsentTexts.js +203 -0
- package/dist/configs/localization/HeaderAppTexts.d.ts +106 -0
- package/dist/configs/localization/HeaderAppTexts.js +106 -0
- package/dist/configs/localization/HeaderTexts.d.ts +68 -0
- package/dist/configs/localization/HeaderTexts.js +68 -0
- package/dist/configs/localization/HelpTexts.d.ts +38 -0
- package/dist/configs/localization/HelpTexts.js +38 -0
- package/dist/configs/localization/HistoryTexts.d.ts +428 -0
- package/dist/configs/localization/HistoryTexts.js +428 -0
- package/dist/configs/localization/ParametersTexts.d.ts +137 -0
- package/dist/configs/localization/ParametersTexts.js +137 -0
- package/dist/configs/localization/SentenceTexts.d.ts +56 -0
- package/dist/configs/localization/SentenceTexts.js +56 -0
- package/dist/configs/localization/TreeTexts.d.ts +46 -0
- package/dist/configs/localization/TreeTexts.js +46 -0
- package/dist/configs/localization/UploadTexts.d.ts +23 -0
- package/dist/configs/localization/UploadTexts.js +23 -0
- package/dist/configs/services/ProfileService.d.ts +5 -0
- package/dist/configs/services/ProfileService.js +8 -0
- package/dist/configs/sessionTypes.d.ts +42 -0
- package/dist/configs/sessionTypes.js +63 -0
- package/dist/configs/useLoggedUtils.d.ts +7 -0
- package/dist/configs/useLoggedUtils.js +24 -0
- package/dist/configs/useMessageUtils.d.ts +22 -0
- package/dist/configs/useMessageUtils.js +71 -0
- package/dist/fonts/material-symbols-outlined.woff2 +0 -0
- package/dist/fonts/work-sans-latin-ext.woff2 +0 -0
- package/dist/fonts/work-sans-latin.woff2 +0 -0
- package/dist/fonts/work-sans-vietnamese.woff2 +0 -0
- package/dist/functions/DateUtils.d.ts +15 -0
- package/dist/functions/DateUtils.js +52 -0
- package/dist/functions/FilterUtils.d.ts +13 -0
- package/dist/functions/FilterUtils.js +56 -0
- package/dist/functions/FormUtils.d.ts +13 -0
- package/dist/functions/FormUtils.js +58 -0
- package/dist/functions/ImageUtils.d.ts +5 -0
- package/dist/functions/ImageUtils.js +13 -0
- package/dist/functions/SecurityUtils.d.ts +6 -0
- package/dist/functions/SecurityUtils.js +28 -0
- package/dist/functions/UsabilityUtils.d.ts +10 -0
- package/dist/functions/UsabilityUtils.js +47 -0
- package/dist/functions/index.d.ts +6 -0
- package/dist/functions/index.js +6 -0
- package/dist/functions/logo-ud.png +0 -0
- package/dist/functions/placeholder-image.png +0 -0
- package/dist/functions/placeholder-person.png +0 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/styles/base/_borders.scss +30 -0
- package/dist/styles/base/_colors.scss +100 -0
- package/dist/styles/base/_displays.scss +207 -0
- package/dist/styles/base/_margins.css +174 -0
- package/dist/styles/base/_spacing.scss +26 -0
- package/dist/styles/base/_tokens.scss +330 -0
- package/dist/styles/base/_typographs.scss +376 -0
- package/dist/styles/font-googleapis.scss +222 -0
- package/dist/styles/main.scss +112 -0
- package/dist/vendor/index.d.ts +5 -0
- package/dist/vendor/index.js +4 -0
- package/package.json +118 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import './style.scss';
|
|
2
|
+
type Props = {
|
|
3
|
+
title: string;
|
|
4
|
+
subtitle: string;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onConfirm: () => void;
|
|
7
|
+
disableClose?: boolean;
|
|
8
|
+
disableEscapeClose?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export default function AppModalRemove({ title, subtitle, onClose, onConfirm, disableClose, disableEscapeClose, }: Props): import("react").JSX.Element;
|
|
11
|
+
export declare const modalRemoveStyle: {
|
|
12
|
+
position: string;
|
|
13
|
+
top: string;
|
|
14
|
+
left: string;
|
|
15
|
+
transform: string;
|
|
16
|
+
width: string;
|
|
17
|
+
maxWidth: string;
|
|
18
|
+
borderRadius: string;
|
|
19
|
+
boxShadow: number;
|
|
20
|
+
bgcolor: string;
|
|
21
|
+
};
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Modal } from '@mui/material';
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import { Button, Icon } from '../../basic';
|
|
6
|
+
import './style.scss';
|
|
7
|
+
import { attachCloseToEscape, stopEventPropagation } from './AppModalUtils';
|
|
8
|
+
export default function AppModalRemove({ title, subtitle, onClose, onConfirm, disableClose, disableEscapeClose, }) {
|
|
9
|
+
const { t } = useTranslation('common');
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
if (disableEscapeClose)
|
|
12
|
+
return;
|
|
13
|
+
return attachCloseToEscape(onClose);
|
|
14
|
+
}, [onClose, disableEscapeClose]);
|
|
15
|
+
return (_jsx(Modal, { open: true, disableEscapeKeyDown: !!disableEscapeClose, onClose: (event) => {
|
|
16
|
+
stopEventPropagation(event);
|
|
17
|
+
if (disableClose)
|
|
18
|
+
return;
|
|
19
|
+
onClose();
|
|
20
|
+
}, children: _jsxs(Box, { className: "modal-container modal-remove", sx: modalRemoveStyle, children: [_jsxs("div", { className: "body", children: [_jsx(Icon, { name: "delete", size: "large", filled: true }), _jsxs("div", { className: "texts", children: [_jsx("span", { className: "title", children: title }), _jsx("span", { className: "subtitle", children: subtitle })] })] }), _jsxs("div", { className: "footer", children: [_jsx(Button, { onClick: (e) => {
|
|
21
|
+
stopEventPropagation(e);
|
|
22
|
+
onClose();
|
|
23
|
+
}, text: t('button.cancel'), mode: "tonal" }), _jsx(Button, { onClick: onConfirm, text: t('button.confirm') })] })] }) }));
|
|
24
|
+
}
|
|
25
|
+
export const modalRemoveStyle = {
|
|
26
|
+
position: 'absolute',
|
|
27
|
+
top: '40%',
|
|
28
|
+
left: '50%',
|
|
29
|
+
transform: 'translate(-50%, -50%)',
|
|
30
|
+
width: '30%',
|
|
31
|
+
maxWidth: '580px',
|
|
32
|
+
borderRadius: 'var(--radius-200)',
|
|
33
|
+
boxShadow: 24,
|
|
34
|
+
bgcolor: 'var(--background-default)',
|
|
35
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const stopEventPropagation = (event) => {
|
|
2
|
+
const e = event;
|
|
3
|
+
e.preventDefault?.();
|
|
4
|
+
e.stopPropagation?.();
|
|
5
|
+
e.stopImmediatePropagation?.();
|
|
6
|
+
};
|
|
7
|
+
export const attachCloseToEscape = (handleClose) => {
|
|
8
|
+
const closeOnEscape = (e) => {
|
|
9
|
+
if (e.key === "Escape" || e.code === "Escape") {
|
|
10
|
+
stopEventPropagation(e);
|
|
11
|
+
handleClose();
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
// Capture phase makes this resilient if inner components stopPropagation() on Escape.
|
|
15
|
+
window.addEventListener("keydown", closeOnEscape, { capture: true });
|
|
16
|
+
return () => window.removeEventListener("keydown", closeOnEscape, { capture: true });
|
|
17
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
.modal-container {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
|
|
5
|
+
> .header {
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
border-bottom: 1px solid var(--border-subtle-1);
|
|
9
|
+
padding: var(--spacing-300) var(--spacing-200) var(--spacing-150);
|
|
10
|
+
|
|
11
|
+
.titles {
|
|
12
|
+
.title {
|
|
13
|
+
@include label-large-2;
|
|
14
|
+
display: block;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.subtitle {
|
|
18
|
+
display: block;
|
|
19
|
+
@include body-medium-1;
|
|
20
|
+
color: var(--text-secondary);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
> .ds-icon {
|
|
25
|
+
margin-left: auto;
|
|
26
|
+
margin-bottom: auto;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
> .body {
|
|
31
|
+
padding: var(--spacing-300) var(--spacing-200) var(--spacing-150);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
> .footer {
|
|
35
|
+
display: flex;
|
|
36
|
+
justify-content: end;
|
|
37
|
+
margin-top: auto;
|
|
38
|
+
gap: 10px;
|
|
39
|
+
padding: var(--spacing-200) var(--spacing-200) var(--spacing-150);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&.modal-remove,
|
|
43
|
+
&.modal-confirm {
|
|
44
|
+
> .body {
|
|
45
|
+
display: flex;
|
|
46
|
+
gap: 16px;
|
|
47
|
+
|
|
48
|
+
> .ds-icon {
|
|
49
|
+
color: var(--icon-warning);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.texts {
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
|
|
56
|
+
> .title {
|
|
57
|
+
@include subtitle-medium-2;
|
|
58
|
+
color: var(--text-primary);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
> .subtitle {
|
|
62
|
+
@include body-medium-1;
|
|
63
|
+
color: var(--text-secondary);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&.modal-remove > .body > .ds-icon {
|
|
70
|
+
color: var(--icon-error);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@media (max-width: 1366px) {
|
|
75
|
+
.modal-container {
|
|
76
|
+
width: 40%;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@media (max-width: 768px) {
|
|
81
|
+
.modal-container {
|
|
82
|
+
width: 90% !important;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@media (max-width: 767px) {
|
|
87
|
+
.modal-container {
|
|
88
|
+
.footer {
|
|
89
|
+
.ds-button {
|
|
90
|
+
font-size: 16px;
|
|
91
|
+
font-weight: 600;
|
|
92
|
+
line-height: 100%;
|
|
93
|
+
letter-spacing: 0.32px;
|
|
94
|
+
text-transform: uppercase;
|
|
95
|
+
padding: var(--spacing-100) var(--spacing-200);
|
|
96
|
+
height: 40px;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PaginationState } from '@tanstack/react-table';
|
|
2
|
+
import './styles.scss';
|
|
3
|
+
type Props<TData> = {
|
|
4
|
+
totalElements: number;
|
|
5
|
+
pagination: PaginationState;
|
|
6
|
+
setPagination: (p: PaginationState) => void;
|
|
7
|
+
hideItensPage?: boolean;
|
|
8
|
+
numItens?: number[];
|
|
9
|
+
size?: 'medium' | 'small';
|
|
10
|
+
};
|
|
11
|
+
export default function AppPagination<TData>({ totalElements, pagination, setPagination, hideItensPage, numItens, size, }: Props<TData>): import("react").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, } from 'react';
|
|
4
|
+
import { Trans, useTranslation } from 'react-i18next';
|
|
5
|
+
import { Icon, IconButton } from '../../basic';
|
|
6
|
+
import './styles.scss';
|
|
7
|
+
const DRAG_THRESHOLD_PX = 6;
|
|
8
|
+
export default function AppPagination({ totalElements, pagination, setPagination, hideItensPage, numItens = [10, 25, 50], size = 'medium', }) {
|
|
9
|
+
const { t } = useTranslation('common');
|
|
10
|
+
const scrollContainerRef = useRef(null);
|
|
11
|
+
const activePageButtonRef = useRef(null);
|
|
12
|
+
const [stripScrollEdges, setStripScrollEdges] = useState({
|
|
13
|
+
overflow: false,
|
|
14
|
+
canScrollLeft: false,
|
|
15
|
+
canScrollRight: false,
|
|
16
|
+
});
|
|
17
|
+
const { isDraggingScroll, suppressPageClickRef, pagesTotalPointerHandlers } = useDragToScrollRow(scrollContainerRef, DRAG_THRESHOLD_PX);
|
|
18
|
+
const updateStripScrollEdgeState = useCallback(() => {
|
|
19
|
+
const el = scrollContainerRef.current;
|
|
20
|
+
if (!el)
|
|
21
|
+
return;
|
|
22
|
+
const maxScroll = el.scrollWidth - el.clientWidth;
|
|
23
|
+
const overflow = maxScroll > 1;
|
|
24
|
+
setStripScrollEdges({
|
|
25
|
+
overflow,
|
|
26
|
+
canScrollLeft: overflow && el.scrollLeft > 1,
|
|
27
|
+
canScrollRight: overflow && el.scrollLeft < maxScroll - 1,
|
|
28
|
+
});
|
|
29
|
+
}, []);
|
|
30
|
+
const scrollPageStrip = useCallback((direction) => {
|
|
31
|
+
const el = scrollContainerRef.current;
|
|
32
|
+
if (!el)
|
|
33
|
+
return;
|
|
34
|
+
const step = Math.max(72, Math.floor(el.clientWidth * 0.8));
|
|
35
|
+
el.scrollBy({ left: direction * step, behavior: 'smooth' });
|
|
36
|
+
}, []);
|
|
37
|
+
const numPages = Math.ceil(totalElements / pagination.pageSize);
|
|
38
|
+
const currentPage = pagination.pageIndex + 1;
|
|
39
|
+
const getFirstElementNumber = () => pagination.pageIndex * pagination.pageSize + 1;
|
|
40
|
+
const getLastElementNumber = () => Math.min((pagination.pageIndex + 1) * pagination.pageSize, totalElements);
|
|
41
|
+
const setPageSize = (p) => {
|
|
42
|
+
setPagination({ ...pagination, pageSize: p });
|
|
43
|
+
};
|
|
44
|
+
const setPageIndex = (p) => {
|
|
45
|
+
setPagination({ ...pagination, pageIndex: p });
|
|
46
|
+
};
|
|
47
|
+
/** Scroll only the page strip — never `scrollIntoView`, which can scroll the document. */
|
|
48
|
+
const scrollActivePageIntoCenter = useCallback(() => {
|
|
49
|
+
const container = scrollContainerRef.current;
|
|
50
|
+
const button = activePageButtonRef.current;
|
|
51
|
+
if (!container || !button)
|
|
52
|
+
return;
|
|
53
|
+
const maxScroll = Math.max(0, container.scrollWidth - container.clientWidth);
|
|
54
|
+
if (maxScroll <= 0)
|
|
55
|
+
return;
|
|
56
|
+
const cRect = container.getBoundingClientRect();
|
|
57
|
+
const bRect = button.getBoundingClientRect();
|
|
58
|
+
const buttonLeftInContent = container.scrollLeft + (bRect.left - cRect.left);
|
|
59
|
+
const targetScrollLeft = buttonLeftInContent - container.clientWidth / 2 + button.offsetWidth / 2;
|
|
60
|
+
const clamped = Math.max(0, Math.min(maxScroll, targetScrollLeft));
|
|
61
|
+
container.scrollTo({ left: clamped, behavior: 'smooth' });
|
|
62
|
+
}, []);
|
|
63
|
+
useLayoutEffect(() => {
|
|
64
|
+
scrollActivePageIntoCenter();
|
|
65
|
+
requestAnimationFrame(() => updateStripScrollEdgeState());
|
|
66
|
+
}, [
|
|
67
|
+
numPages,
|
|
68
|
+
pagination.pageIndex,
|
|
69
|
+
pagination.pageSize,
|
|
70
|
+
scrollActivePageIntoCenter,
|
|
71
|
+
updateStripScrollEdgeState,
|
|
72
|
+
]);
|
|
73
|
+
useEffect(() => {
|
|
74
|
+
const el = scrollContainerRef.current;
|
|
75
|
+
if (!el)
|
|
76
|
+
return;
|
|
77
|
+
const onScroll = () => updateStripScrollEdgeState();
|
|
78
|
+
el.addEventListener('scroll', onScroll, { passive: true });
|
|
79
|
+
const ro = new ResizeObserver(() => updateStripScrollEdgeState());
|
|
80
|
+
ro.observe(el);
|
|
81
|
+
return () => {
|
|
82
|
+
el.removeEventListener('scroll', onScroll);
|
|
83
|
+
ro.disconnect();
|
|
84
|
+
};
|
|
85
|
+
}, [updateStripScrollEdgeState]);
|
|
86
|
+
useEffect(() => {
|
|
87
|
+
const el = scrollContainerRef.current;
|
|
88
|
+
if (!el)
|
|
89
|
+
return;
|
|
90
|
+
const onWheel = (e) => {
|
|
91
|
+
if (el.scrollWidth <= el.clientWidth + 1)
|
|
92
|
+
return;
|
|
93
|
+
const dominantX = Math.abs(e.deltaX) > Math.abs(e.deltaY);
|
|
94
|
+
const scrollDelta = dominantX ? e.deltaX : e.deltaY;
|
|
95
|
+
if (scrollDelta === 0)
|
|
96
|
+
return;
|
|
97
|
+
const maxScroll = el.scrollWidth - el.clientWidth;
|
|
98
|
+
const nextLeft = el.scrollLeft + scrollDelta;
|
|
99
|
+
const clamped = Math.max(0, Math.min(maxScroll, nextLeft));
|
|
100
|
+
const atStart = el.scrollLeft <= 0;
|
|
101
|
+
const atEnd = el.scrollLeft >= maxScroll - 1;
|
|
102
|
+
if ((scrollDelta < 0 && atStart) || (scrollDelta > 0 && atEnd)) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
el.scrollLeft = clamped;
|
|
106
|
+
e.preventDefault();
|
|
107
|
+
};
|
|
108
|
+
el.addEventListener('wheel', onWheel, { passive: false });
|
|
109
|
+
return () => el.removeEventListener('wheel', onWheel);
|
|
110
|
+
}, []);
|
|
111
|
+
return (_jsxs("div", { className: classNames('app-table-pagination', {
|
|
112
|
+
small: size === 'small',
|
|
113
|
+
}), children: [_jsxs("div", { className: "itens-container", children: [!hideItensPage && (_jsxs("div", { className: "itens-page", children: [_jsx("span", { className: "itens-page-label", children: t('table.label.rows-page') }), _jsx("select", { className: "select-pages", value: pagination.pageSize, onChange: (e) => setPageSize(Number(e.target.value)), children: numItens.map((pageSizeOption) => (_jsx("option", { value: pageSizeOption, children: pageSizeOption }, pageSizeOption))) })] })), _jsx("div", { className: "itens-total", children: _jsx("span", { children: _jsx(Trans, { t: t, i18nKey: "table.label.items", values: {
|
|
114
|
+
first: getFirstElementNumber(),
|
|
115
|
+
last: getLastElementNumber(),
|
|
116
|
+
total: totalElements,
|
|
117
|
+
} }) }) })] }), _jsxs("div", { className: "pages-navigation", children: [_jsx(IconButton, { size: size, mode: "tonal", onClick: () => setPageIndex(pagination.pageIndex - 1), disabled: pagination.pageIndex === 0, name: "chevron_backward" }), stripScrollEdges.overflow && (_jsx("button", { type: "button", className: "page-strip-nudge", disabled: !stripScrollEdges.canScrollLeft, onClick: () => scrollPageStrip(-1), "aria-label": t('table.pagination.scroll-strip-left'), title: t('table.pagination.scroll-strip-left'), children: _jsx(Icon, { name: "keyboard_double_arrow_left", size: "x-small" }) })), _jsx("div", { ref: scrollContainerRef, className: classNames('pages-total', {
|
|
118
|
+
'is-dragging': isDraggingScroll,
|
|
119
|
+
}), ...pagesTotalPointerHandlers, children: Array.from({ length: numPages }, (_, index) => {
|
|
120
|
+
const pageNum = index + 1;
|
|
121
|
+
const isActive = pageNum === currentPage;
|
|
122
|
+
return (_jsx("button", { ref: isActive ? activePageButtonRef : undefined, type: "button", className: classNames('page-number', { active: isActive }), onClick: () => {
|
|
123
|
+
if (suppressPageClickRef.current) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
setPageIndex(index);
|
|
127
|
+
}, "aria-current": isActive ? 'page' : undefined, children: pageNum }, pageNum));
|
|
128
|
+
}) }), _jsx("div", { className: "pages-total-mobile", children: _jsx("select", { className: "select-pages", value: currentPage, onChange: (e) => setPageIndex(Number(e.target.value) - 1), children: Array.from({ length: numPages }, (_, index) => (_jsx("option", { value: index + 1, children: index + 1 }, index + 1))) }) }), stripScrollEdges.overflow && (_jsx("button", { type: "button", className: "page-strip-nudge", disabled: !stripScrollEdges.canScrollRight, onClick: () => scrollPageStrip(1), "aria-label": t('table.pagination.scroll-strip-right'), title: t('table.pagination.scroll-strip-right'), children: _jsx(Icon, { name: "keyboard_double_arrow_right", size: "x-small" }) })), _jsx(IconButton, { size: size, mode: "tonal", onClick: () => setPageIndex(pagination.pageIndex + 1), disabled: pagination.pageIndex >= numPages - 1, name: "chevron_forward" })] })] }));
|
|
129
|
+
}
|
|
130
|
+
const initialDragRow = {
|
|
131
|
+
pointerId: null,
|
|
132
|
+
startX: 0,
|
|
133
|
+
startScrollLeft: 0,
|
|
134
|
+
dragging: false,
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* Horizontal drag-to-scroll for an overflow-x container: hides reliance on
|
|
138
|
+
* the scrollbar (paired with CSS) while keeping click-vs-drag distinct.
|
|
139
|
+
*/
|
|
140
|
+
function useDragToScrollRow(containerRef, dragThresholdPx) {
|
|
141
|
+
const suppressPageClickRef = useRef(false);
|
|
142
|
+
const dragRef = useRef({ ...initialDragRow });
|
|
143
|
+
const [isDraggingScroll, setIsDraggingScroll] = useState(false);
|
|
144
|
+
const pagesTotalPointerHandlers = useMemo(() => {
|
|
145
|
+
const endPointer = (e) => {
|
|
146
|
+
const d = dragRef.current;
|
|
147
|
+
if (d.pointerId !== e.pointerId)
|
|
148
|
+
return;
|
|
149
|
+
const el = containerRef.current;
|
|
150
|
+
if (d.dragging) {
|
|
151
|
+
suppressPageClickRef.current = true;
|
|
152
|
+
window.setTimeout(() => {
|
|
153
|
+
suppressPageClickRef.current = false;
|
|
154
|
+
}, 0);
|
|
155
|
+
}
|
|
156
|
+
dragRef.current = { ...initialDragRow };
|
|
157
|
+
setIsDraggingScroll(false);
|
|
158
|
+
if (el) {
|
|
159
|
+
try {
|
|
160
|
+
el.releasePointerCapture(e.pointerId);
|
|
161
|
+
}
|
|
162
|
+
catch {
|
|
163
|
+
/* capture may already be released */
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
return {
|
|
168
|
+
onPointerDown(e) {
|
|
169
|
+
if (e.button !== 0)
|
|
170
|
+
return;
|
|
171
|
+
const target = e.target;
|
|
172
|
+
if (target?.closest('.page-number')) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
const el = containerRef.current;
|
|
176
|
+
if (!el)
|
|
177
|
+
return;
|
|
178
|
+
dragRef.current = {
|
|
179
|
+
pointerId: e.pointerId,
|
|
180
|
+
startX: e.clientX,
|
|
181
|
+
startScrollLeft: el.scrollLeft,
|
|
182
|
+
dragging: false,
|
|
183
|
+
};
|
|
184
|
+
el.setPointerCapture(e.pointerId);
|
|
185
|
+
},
|
|
186
|
+
onPointerMove(e) {
|
|
187
|
+
const d = dragRef.current;
|
|
188
|
+
if (d.pointerId !== e.pointerId)
|
|
189
|
+
return;
|
|
190
|
+
const el = containerRef.current;
|
|
191
|
+
if (!el)
|
|
192
|
+
return;
|
|
193
|
+
const dx = e.clientX - d.startX;
|
|
194
|
+
if (!d.dragging && Math.abs(dx) > dragThresholdPx) {
|
|
195
|
+
d.dragging = true;
|
|
196
|
+
setIsDraggingScroll(true);
|
|
197
|
+
}
|
|
198
|
+
if (d.dragging) {
|
|
199
|
+
el.scrollLeft = d.startScrollLeft - dx;
|
|
200
|
+
e.preventDefault();
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
onPointerUp: endPointer,
|
|
204
|
+
onPointerCancel: endPointer,
|
|
205
|
+
};
|
|
206
|
+
}, [containerRef, dragThresholdPx]);
|
|
207
|
+
return {
|
|
208
|
+
isDraggingScroll,
|
|
209
|
+
suppressPageClickRef,
|
|
210
|
+
pagesTotalPointerHandlers,
|
|
211
|
+
};
|
|
212
|
+
}
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
.app-table-pagination {
|
|
2
|
+
display: flex;
|
|
3
|
+
padding: var(--spacing-150) var(--spacing-100);
|
|
4
|
+
border-top: 1px solid var(--border-subtle-2);
|
|
5
|
+
|
|
6
|
+
.itens-container {
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
gap: 16px;
|
|
10
|
+
|
|
11
|
+
.itens-page {
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
margin-right: 16px;
|
|
15
|
+
gap: 16px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.itens-total {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
margin-right: auto;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.pages-total-mobile {
|
|
26
|
+
display: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.pages-total {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
gap: 4px;
|
|
33
|
+
flex-wrap: nowrap;
|
|
34
|
+
max-width: 196px;
|
|
35
|
+
overflow-x: auto;
|
|
36
|
+
overflow-y: hidden;
|
|
37
|
+
cursor: grab;
|
|
38
|
+
touch-action: pan-x;
|
|
39
|
+
overscroll-behavior-x: contain;
|
|
40
|
+
overscroll-behavior-y: contain;
|
|
41
|
+
scrollbar-width: none;
|
|
42
|
+
-ms-overflow-style: none;
|
|
43
|
+
user-select: none;
|
|
44
|
+
|
|
45
|
+
&::-webkit-scrollbar {
|
|
46
|
+
display: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.is-dragging {
|
|
50
|
+
cursor: grabbing;
|
|
51
|
+
|
|
52
|
+
.page-number {
|
|
53
|
+
cursor: grabbing;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.page-number {
|
|
58
|
+
flex-shrink: 0;
|
|
59
|
+
display: inline-flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
justify-content: center;
|
|
62
|
+
min-width: 36px;
|
|
63
|
+
height: 40px;
|
|
64
|
+
padding: 0 var(--spacing-50);
|
|
65
|
+
margin: 0;
|
|
66
|
+
border: none;
|
|
67
|
+
border-radius: 0;
|
|
68
|
+
font-family: 'Work Sans', sans-serif;
|
|
69
|
+
@include button-small;
|
|
70
|
+
color: var(--text-on-color-dark);
|
|
71
|
+
background-color: var(--button-secondary-default);
|
|
72
|
+
cursor: pointer;
|
|
73
|
+
|
|
74
|
+
&:hover:not(.active) {
|
|
75
|
+
filter: brightness(1.05);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&.active {
|
|
79
|
+
background-color: var(--button-primary-default);
|
|
80
|
+
color: var(--text-on-color-light);
|
|
81
|
+
cursor: default;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&:focus-visible {
|
|
85
|
+
outline: 2px solid var(--border-focus);
|
|
86
|
+
outline-offset: 2px;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.pages-navigation {
|
|
92
|
+
display: flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
gap: 4px;
|
|
95
|
+
margin-left: auto;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.select-pages {
|
|
99
|
+
box-sizing: border-box;
|
|
100
|
+
min-width: 56px;
|
|
101
|
+
height: 40px;
|
|
102
|
+
margin: 0;
|
|
103
|
+
padding: var(--spacing-0) 28px var(--spacing-0) var(--spacing-100);
|
|
104
|
+
border: none;
|
|
105
|
+
border-radius: 0;
|
|
106
|
+
font-family: 'Work Sans', sans-serif;
|
|
107
|
+
@include button-small;
|
|
108
|
+
color: var(--text-on-color-dark);
|
|
109
|
+
background-color: var(--button-secondary-default);
|
|
110
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24'%3E%3Cpath fill='%23222' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
|
|
111
|
+
background-repeat: no-repeat;
|
|
112
|
+
background-position: right 4px center;
|
|
113
|
+
background-size: 20px 20px;
|
|
114
|
+
cursor: pointer;
|
|
115
|
+
appearance: none;
|
|
116
|
+
|
|
117
|
+
&:hover {
|
|
118
|
+
filter: brightness(1.05);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&:focus-visible {
|
|
122
|
+
outline: 2px solid var(--border-focus);
|
|
123
|
+
outline-offset: 2px;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.page-strip-nudge {
|
|
128
|
+
flex-shrink: 0;
|
|
129
|
+
display: inline-flex;
|
|
130
|
+
align-items: center;
|
|
131
|
+
justify-content: center;
|
|
132
|
+
width: 22px;
|
|
133
|
+
min-width: 22px;
|
|
134
|
+
height: 40px;
|
|
135
|
+
padding: 0;
|
|
136
|
+
margin: 0;
|
|
137
|
+
border: none;
|
|
138
|
+
border-radius: 0;
|
|
139
|
+
background-color: var(--button-secondary-default);
|
|
140
|
+
color: var(--text-on-color-dark);
|
|
141
|
+
cursor: pointer;
|
|
142
|
+
|
|
143
|
+
&:hover:not(:disabled) {
|
|
144
|
+
filter: brightness(1.05);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&:disabled {
|
|
148
|
+
opacity: 0.4;
|
|
149
|
+
cursor: default;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&:focus-visible {
|
|
153
|
+
outline: 2px solid var(--border-focus);
|
|
154
|
+
outline-offset: 2px;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&.small {
|
|
159
|
+
padding: var(--spacing-100);
|
|
160
|
+
|
|
161
|
+
.itens-page {
|
|
162
|
+
margin-right: 12px;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.pages-total {
|
|
166
|
+
width: 160px;
|
|
167
|
+
|
|
168
|
+
.page-number {
|
|
169
|
+
min-width: 28px;
|
|
170
|
+
height: 32px;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.page-strip-nudge {
|
|
175
|
+
height: 32px;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.select-pages {
|
|
179
|
+
height: 32px;
|
|
180
|
+
background-position: right 2px center;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
@media (max-width: 768px) {
|
|
186
|
+
.app-table-pagination {
|
|
187
|
+
flex-direction: column;
|
|
188
|
+
|
|
189
|
+
.itens-container .itens-total {
|
|
190
|
+
margin-right: unset;
|
|
191
|
+
margin-left: auto;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.pages-navigation {
|
|
195
|
+
justify-content: center;
|
|
196
|
+
margin-left: auto;
|
|
197
|
+
margin-right: auto;
|
|
198
|
+
margin-top: 16px;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
@media (max-width: 767px) {
|
|
204
|
+
.app-table-pagination {
|
|
205
|
+
flex-direction: row;
|
|
206
|
+
justify-content: space-between;
|
|
207
|
+
padding: 12px 0px;
|
|
208
|
+
|
|
209
|
+
.itens-container {
|
|
210
|
+
.itens-page {
|
|
211
|
+
.itens-page-label {
|
|
212
|
+
display: none;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.pages-total-mobile {
|
|
218
|
+
display: block;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.pages-total {
|
|
222
|
+
display: none;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.pages-navigation {
|
|
226
|
+
justify-content: center;
|
|
227
|
+
margin: 0px;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import './style.scss';
|
|
2
|
+
type PictureProps = {
|
|
3
|
+
src: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
person?: boolean;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
};
|
|
9
|
+
export default function AppPicture({ src, title, className, person, onClick, }: PictureProps): import("react").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import cx from 'classnames';
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
4
|
+
import ImageUtils from '../../functions/ImageUtils';
|
|
5
|
+
import './style.scss';
|
|
6
|
+
export default function AppPicture({ src, title, className, person, onClick, }) {
|
|
7
|
+
const [empty, setEmpty] = useState(false);
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
setEmpty(!src);
|
|
10
|
+
}, []);
|
|
11
|
+
return (_jsx("div", { className: `app-picture-container ${empty ? 'empty' : ''}`, children: _jsx("img", { className: cx(className, { 'picture-placeholder': !src }), src: ImageUtils.display(src, person), title: title, onClick: () => onClick && onClick(), onError: ({ currentTarget }) => {
|
|
12
|
+
setEmpty(true);
|
|
13
|
+
/* eslint-disable no-param-reassign */
|
|
14
|
+
currentTarget.onerror = null; // prevents looping
|
|
15
|
+
currentTarget.src = ImageUtils.getPlaceHolder(person);
|
|
16
|
+
/* eslint-enable no-param-reassign */
|
|
17
|
+
} }) }));
|
|
18
|
+
}
|