@codezee/sixtify-brahma 0.2.6 → 0.2.7
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/package.json +7 -2
- package/.github/workflows/deploy-storybook.yml +0 -40
- package/.husky/commit-msg +0 -4
- package/.husky/pre-commit +0 -4
- package/.husky/pre-push +0 -4
- package/.lintstagedrc +0 -5
- package/.prettierignore +0 -11
- package/.prettierrc +0 -22
- package/.vscode/extensions.json +0 -22
- package/.vscode/settings.json +0 -17
- package/apps/docs/.eslintrc.cjs +0 -4
- package/apps/docs/.eslintrc.js +0 -9
- package/apps/docs/.storybook/main.ts +0 -23
- package/apps/docs/.storybook/preview.tsx +0 -27
- package/apps/docs/next-env.d.ts +0 -5
- package/apps/docs/next.config.mjs +0 -4
- package/apps/docs/package.json +0 -38
- package/apps/docs/public/globals.css +0 -25
- package/apps/docs/stories/AgGrid/AgGrid.stories.tsx +0 -69
- package/apps/docs/stories/AppBar/AppBar.stories.tsx +0 -39
- package/apps/docs/stories/Breadcrumbs/Breadcrumbs.stories.tsx +0 -37
- package/apps/docs/stories/Button/ButtonGroup.stories.tsx +0 -99
- package/apps/docs/stories/Button/button.stories.tsx +0 -99
- package/apps/docs/stories/Card/AttendanceCard.stories.tsx +0 -37
- package/apps/docs/stories/Card/Card.stories.tsx +0 -39
- package/apps/docs/stories/Charts/PieChart.stories.tsx +0 -264
- package/apps/docs/stories/Chips/Chip.stories.tsx +0 -141
- package/apps/docs/stories/Chips/ChipWithBorder.stories.tsx +0 -18
- package/apps/docs/stories/Chips/FilterPill.stories.tsx +0 -24
- package/apps/docs/stories/Color/Color.stories.tsx +0 -14
- package/apps/docs/stories/Dialog/ButtomDialog.stories.tsx +0 -47
- package/apps/docs/stories/Dialog/DeleteDialog.stories.tsx +0 -31
- package/apps/docs/stories/Dialog/Dialog.stories.tsx +0 -47
- package/apps/docs/stories/Drawer/Drawer.stories.tsx +0 -94
- package/apps/docs/stories/FilterList/FilterList.stories.tsx +0 -88
- package/apps/docs/stories/FilterList/FilterListV2.stories.tsx +0 -92
- package/apps/docs/stories/FormFields/AutoComplete.stories.tsx +0 -87
- package/apps/docs/stories/FormFields/CheckBox.stories.tsx +0 -61
- package/apps/docs/stories/FormFields/DatePicker.stories.tsx +0 -98
- package/apps/docs/stories/FormFields/DateRangePicker.stories.tsx +0 -37
- package/apps/docs/stories/FormFields/FileUpload.stories.tsx +0 -83
- package/apps/docs/stories/FormFields/ImageUpload.stories.tsx +0 -69
- package/apps/docs/stories/FormFields/ListItemButton.stories.tsx +0 -59
- package/apps/docs/stories/FormFields/RadioGroupField.stories.tsx +0 -170
- package/apps/docs/stories/FormFields/SearchField.stories.tsx +0 -72
- package/apps/docs/stories/FormFields/TextField.stories.tsx +0 -111
- package/apps/docs/stories/FormFields/TimeField.stories.tsx +0 -82
- package/apps/docs/stories/FormFields/TimePicker.stories.tsx +0 -82
- package/apps/docs/stories/Indicator/Indicator.stories.tsx +0 -33
- package/apps/docs/stories/Indicator/SeverityIndicator.stories.tsx +0 -27
- package/apps/docs/stories/Layouts/FormRow.stories.tsx +0 -45
- package/apps/docs/stories/PadBox/PadBox.stories.tsx +0 -49
- package/apps/docs/stories/Stepper/Stepper.stories.tsx +0 -75
- package/apps/docs/stories/Stepper/StepperV2.stories.tsx +0 -44
- package/apps/docs/stories/Timeline/AttendanceStatus.stories.tsx +0 -29
- package/apps/docs/stories/Timeline/Timeline.stories.tsx +0 -38
- package/apps/docs/stories/Tooltip/Tooltip.stories.tsx +0 -30
- package/apps/docs/stories/UserProfileMenu/UserProfileMenu.stories.tsx +0 -112
- package/apps/docs/tsconfig.json +0 -19
- package/commitlint.config.cjs +0 -6
- package/index.ts +0 -1
- package/packages/eslint-config/README.md +0 -3
- package/packages/eslint-config/library.js +0 -88
- package/packages/eslint-config/next.js +0 -85
- package/packages/eslint-config/package.json +0 -19
- package/packages/eslint-config/react-internal.js +0 -89
- package/packages/shared-components/.eslintrc.js +0 -10
- package/packages/shared-components/package.json +0 -22
- package/packages/shared-components/src/Actions/AddAction.tsx +0 -13
- package/packages/shared-components/src/Actions/CalendarAction.tsx +0 -13
- package/packages/shared-components/src/Actions/ConfigureAction.tsx +0 -13
- package/packages/shared-components/src/Actions/DeleteAction.tsx +0 -13
- package/packages/shared-components/src/Actions/DownloadAction.tsx +0 -13
- package/packages/shared-components/src/Actions/EditAction.tsx +0 -13
- package/packages/shared-components/src/Actions/HistoryAction.tsx +0 -13
- package/packages/shared-components/src/Actions/index.ts +0 -7
- package/packages/shared-components/src/AgGrid/ActionCell/ActionCell.tsx +0 -57
- package/packages/shared-components/src/AgGrid/ActionCell/Popover.tsx +0 -32
- package/packages/shared-components/src/AgGrid/AgGrid.tsx +0 -93
- package/packages/shared-components/src/AgGrid/LoadingCell.tsx +0 -5
- package/packages/shared-components/src/AgGrid/index.ts +0 -3
- package/packages/shared-components/src/AppBar/AppBar.styled.tsx +0 -25
- package/packages/shared-components/src/AppBar/AppBar.tsx +0 -20
- package/packages/shared-components/src/AppBar/index.ts +0 -1
- package/packages/shared-components/src/Breadcrumbs/Breadcrumbs.tsx +0 -76
- package/packages/shared-components/src/Breadcrumbs/index.ts +0 -1
- package/packages/shared-components/src/Button/ActionButton.tsx +0 -38
- package/packages/shared-components/src/Button/Button.tsx +0 -19
- package/packages/shared-components/src/Button/ButtonGroup.tsx +0 -37
- package/packages/shared-components/src/Button/index.ts +0 -3
- package/packages/shared-components/src/Card/AttendanceCard.tsx +0 -51
- package/packages/shared-components/src/Card/Card.tsx +0 -34
- package/packages/shared-components/src/Card/CardItem/CardItem.tsx +0 -33
- package/packages/shared-components/src/Card/CardItem/CardItemValue.tsx +0 -98
- package/packages/shared-components/src/Card/CardItem/index.ts +0 -2
- package/packages/shared-components/src/Card/ProfileCard/ProfileCard.tsx +0 -40
- package/packages/shared-components/src/Card/ProfileCard/ProfileCardItem/ProfileCardBody.tsx +0 -53
- package/packages/shared-components/src/Card/ProfileCard/ProfileCardItem/ProfileCardHeader.tsx +0 -96
- package/packages/shared-components/src/Card/index.ts +0 -6
- package/packages/shared-components/src/Charts/PieChart.tsx +0 -81
- package/packages/shared-components/src/Charts/Skeleton.tsx +0 -36
- package/packages/shared-components/src/Charts/index.ts +0 -1
- package/packages/shared-components/src/Chips/Chip.tsx +0 -26
- package/packages/shared-components/src/Chips/ChipWithBorder.tsx +0 -39
- package/packages/shared-components/src/Chips/FilterPill.tsx +0 -47
- package/packages/shared-components/src/Chips/index.ts +0 -3
- package/packages/shared-components/src/Dialog/BottomDialog.styled.tsx +0 -28
- package/packages/shared-components/src/Dialog/BottomDialog.tsx +0 -37
- package/packages/shared-components/src/Dialog/DeleteDialog.tsx +0 -48
- package/packages/shared-components/src/Dialog/Dialog.tsx +0 -61
- package/packages/shared-components/src/Dialog/index.ts +0 -3
- package/packages/shared-components/src/Drawer/Bullet.tsx +0 -12
- package/packages/shared-components/src/Drawer/CloseDrawer/CloseDrawerMenuItem.tsx +0 -57
- package/packages/shared-components/src/Drawer/CloseDrawer/CloseDrawerMenuItemList.tsx +0 -109
- package/packages/shared-components/src/Drawer/CloseDrawer/CloseDrawerSubMenuItemList.tsx +0 -124
- package/packages/shared-components/src/Drawer/CloseDrawer/MenuItem.tsx +0 -0
- package/packages/shared-components/src/Drawer/CloseDrawer/Popover.tsx +0 -45
- package/packages/shared-components/src/Drawer/CloseDrawer/Popper.tsx +0 -43
- package/packages/shared-components/src/Drawer/Drawer.styled.tsx +0 -51
- package/packages/shared-components/src/Drawer/Drawer.tsx +0 -55
- package/packages/shared-components/src/Drawer/MenuItem.tsx +0 -75
- package/packages/shared-components/src/Drawer/OpenDrawer/OpenDrawerCollapse.tsx +0 -13
- package/packages/shared-components/src/Drawer/OpenDrawer/OpenDrawerMenuItem.tsx +0 -46
- package/packages/shared-components/src/Drawer/OpenDrawer/OpenDrawerMenuItemList.tsx +0 -197
- package/packages/shared-components/src/Drawer/index.ts +0 -1
- package/packages/shared-components/src/FilterList/FilterList.tsx +0 -172
- package/packages/shared-components/src/FilterList/FilterListV2.tsx +0 -515
- package/packages/shared-components/src/FilterList/FilterPopup.tsx +0 -148
- package/packages/shared-components/src/FilterList/FilterPopupWrapper.tsx +0 -113
- package/packages/shared-components/src/FilterList/FilterTypeWrapper.tsx +0 -58
- package/packages/shared-components/src/FilterList/getFormData.ts +0 -29
- package/packages/shared-components/src/FilterList/index.ts +0 -5
- package/packages/shared-components/src/FormFields/Autocomplete/Autocomplete.tsx +0 -510
- package/packages/shared-components/src/FormFields/Autocomplete/Skeleton.tsx +0 -26
- package/packages/shared-components/src/FormFields/Autocomplete/index.ts +0 -1
- package/packages/shared-components/src/FormFields/CheckBox/CheckBox.styled.tsx +0 -67
- package/packages/shared-components/src/FormFields/CheckBox/CheckBox.tsx +0 -44
- package/packages/shared-components/src/FormFields/CheckBox/Skeleton.tsx +0 -12
- package/packages/shared-components/src/FormFields/CheckBox/index.ts +0 -1
- package/packages/shared-components/src/FormFields/DatePicker/DatePicker.tsx +0 -217
- package/packages/shared-components/src/FormFields/DatePicker/Skeleton.tsx +0 -28
- package/packages/shared-components/src/FormFields/DatePicker/index.ts +0 -1
- package/packages/shared-components/src/FormFields/DateRangePicker/DateRangePicker.tsx +0 -96
- package/packages/shared-components/src/FormFields/DateRangePicker/Skeleton.tsx +0 -38
- package/packages/shared-components/src/FormFields/DateRangePicker/index.ts +0 -1
- package/packages/shared-components/src/FormFields/DateTimePicker/DateTimePicker.tsx +0 -250
- package/packages/shared-components/src/FormFields/DateTimePicker/Skeleton.tsx +0 -24
- package/packages/shared-components/src/FormFields/DateTimePicker/index.ts +0 -1
- package/packages/shared-components/src/FormFields/FileUpload/FileNames.tsx +0 -32
- package/packages/shared-components/src/FormFields/FileUpload/FileUpload.styled.tsx +0 -22
- package/packages/shared-components/src/FormFields/FileUpload/FileUpload.tsx +0 -157
- package/packages/shared-components/src/FormFields/FileUpload/Skeleton.tsx +0 -21
- package/packages/shared-components/src/FormFields/FileUpload/UploadedFileName.tsx +0 -27
- package/packages/shared-components/src/FormFields/FileUpload/index.ts +0 -2
- package/packages/shared-components/src/FormFields/ImageUpload/ImageUpload.styled.tsx +0 -16
- package/packages/shared-components/src/FormFields/ImageUpload/ImageUpload.tsx +0 -181
- package/packages/shared-components/src/FormFields/ImageUpload/ImageUploadView.tsx +0 -65
- package/packages/shared-components/src/FormFields/ImageUpload/PhotoCaptureDialog.tsx +0 -74
- package/packages/shared-components/src/FormFields/ImageUpload/Skeleton.tsx +0 -31
- package/packages/shared-components/src/FormFields/ImageUpload/index.ts +0 -2
- package/packages/shared-components/src/FormFields/ListItemButton/ListItemButton.styled.tsx +0 -22
- package/packages/shared-components/src/FormFields/ListItemButton/ListItemButton.tsx +0 -52
- package/packages/shared-components/src/FormFields/ListItemButton/index.ts +0 -1
- package/packages/shared-components/src/FormFields/PasswordField/PasswordField.tsx +0 -50
- package/packages/shared-components/src/FormFields/PasswordField/index.ts +0 -1
- package/packages/shared-components/src/FormFields/RadioGroupField/RadioGroupField.tsx +0 -105
- package/packages/shared-components/src/FormFields/RadioGroupField/Skeleton.tsx +0 -26
- package/packages/shared-components/src/FormFields/RadioGroupField/index.ts +0 -1
- package/packages/shared-components/src/FormFields/SearchField/SearchField.tsx +0 -21
- package/packages/shared-components/src/FormFields/SearchField/index.ts +0 -1
- package/packages/shared-components/src/FormFields/Switch/Skeleton.tsx +0 -12
- package/packages/shared-components/src/FormFields/Switch/Switch.tsx +0 -33
- package/packages/shared-components/src/FormFields/Switch/index.ts +0 -1
- package/packages/shared-components/src/FormFields/TextField/Skeleton.tsx +0 -31
- package/packages/shared-components/src/FormFields/TextField/TextField.tsx +0 -92
- package/packages/shared-components/src/FormFields/TextField/index.ts +0 -1
- package/packages/shared-components/src/FormFields/TimeField/Skeleton.tsx +0 -24
- package/packages/shared-components/src/FormFields/TimeField/TimeField.tsx +0 -120
- package/packages/shared-components/src/FormFields/TimeField/index.ts +0 -1
- package/packages/shared-components/src/FormFields/TimePicker/Skeleton.tsx +0 -24
- package/packages/shared-components/src/FormFields/TimePicker/TimePicker.tsx +0 -168
- package/packages/shared-components/src/FormFields/TimePicker/index.ts +0 -1
- package/packages/shared-components/src/FormFields/index.ts +0 -13
- package/packages/shared-components/src/Indicator/Indicator.tsx +0 -18
- package/packages/shared-components/src/Indicator/SeverityIndicator.tsx +0 -34
- package/packages/shared-components/src/Indicator/index.ts +0 -2
- package/packages/shared-components/src/Layouts/FormContainer.tsx +0 -6
- package/packages/shared-components/src/Layouts/FormGridLayout.tsx +0 -27
- package/packages/shared-components/src/Layouts/FormRow/FormRow.styled.tsx +0 -39
- package/packages/shared-components/src/Layouts/FormRow/FormRow.tsx +0 -20
- package/packages/shared-components/src/Layouts/FormRow/index.ts +0 -1
- package/packages/shared-components/src/Layouts/FormSection.tsx +0 -22
- package/packages/shared-components/src/Layouts/index.ts +0 -4
- package/packages/shared-components/src/Loader/FacebookCircularProgress.tsx +0 -41
- package/packages/shared-components/src/Loader/index.ts +0 -1
- package/packages/shared-components/src/PadBox/PadBox.tsx +0 -21
- package/packages/shared-components/src/PadBox/index.ts +0 -1
- package/packages/shared-components/src/Pagination/Pagination.tsx +0 -42
- package/packages/shared-components/src/Pagination/index.ts +0 -1
- package/packages/shared-components/src/Stepper/Stepper.tsx +0 -54
- package/packages/shared-components/src/Stepper/StepperV2.tsx +0 -115
- package/packages/shared-components/src/Stepper/StepperV3.tsx +0 -72
- package/packages/shared-components/src/Stepper/index.ts +0 -3
- package/packages/shared-components/src/Svgs/AppLogo/AppLogoMedium.tsx +0 -65
- package/packages/shared-components/src/Svgs/AppLogo/AppLogoSmall.tsx +0 -48
- package/packages/shared-components/src/Svgs/ArrowUp.tsx +0 -11
- package/packages/shared-components/src/Svgs/Company/CompanyBanner.tsx +0 -480
- package/packages/shared-components/src/Svgs/Company/index.ts +0 -1
- package/packages/shared-components/src/Svgs/Drawer/SettingIcon.tsx +0 -31
- package/packages/shared-components/src/Svgs/Drawer/SvgBankConfig.tsx +0 -36
- package/packages/shared-components/src/Svgs/Drawer/SvgConfiguration.tsx +0 -16
- package/packages/shared-components/src/Svgs/Drawer/SvgPayroll.tsx +0 -32
- package/packages/shared-components/src/Svgs/Drawer/SvgsEmployees.tsx +0 -25
- package/packages/shared-components/src/Svgs/Drawer/SvgsOrganization.tsx +0 -36
- package/packages/shared-components/src/Svgs/Drawer/SvgsTransaction.tsx +0 -81
- package/packages/shared-components/src/Svgs/Drawer/index.ts +0 -7
- package/packages/shared-components/src/Svgs/FormAction.tsx +0 -118
- package/packages/shared-components/src/Svgs/ImportExcelSuccessIcon.tsx +0 -54
- package/packages/shared-components/src/Svgs/LogoIcon.tsx +0 -74
- package/packages/shared-components/src/Svgs/SvgAdd.tsx +0 -28
- package/packages/shared-components/src/Svgs/SvgCalendar.tsx +0 -89
- package/packages/shared-components/src/Svgs/SvgConfigure.tsx +0 -51
- package/packages/shared-components/src/Svgs/SvgDelete.tsx +0 -55
- package/packages/shared-components/src/Svgs/SvgDownload.tsx +0 -20
- package/packages/shared-components/src/Svgs/SvgEmail.tsx +0 -24
- package/packages/shared-components/src/Svgs/SvgFilterList.tsx +0 -19
- package/packages/shared-components/src/Svgs/SvgNoLogo.tsx +0 -66
- package/packages/shared-components/src/Svgs/SvgNoSign.tsx +0 -28
- package/packages/shared-components/src/Svgs/SvgPhone.tsx +0 -16
- package/packages/shared-components/src/Svgs/SvgsDrop.tsx +0 -44
- package/packages/shared-components/src/Svgs/SvgsEdit.tsx +0 -42
- package/packages/shared-components/src/Svgs/SvgsHistory.tsx +0 -40
- package/packages/shared-components/src/Svgs/SvgsHome.tsx +0 -18
- package/packages/shared-components/src/Svgs/SvgsIndicator.tsx +0 -24
- package/packages/shared-components/src/Svgs/index.ts +0 -14
- package/packages/shared-components/src/Tab/Skeleton.tsx +0 -15
- package/packages/shared-components/src/Tab/Tabs.tsx +0 -64
- package/packages/shared-components/src/Tab/index.ts +0 -1
- package/packages/shared-components/src/Timeline/AttendanceStatus.tsx +0 -56
- package/packages/shared-components/src/Timeline/Timeline.tsx +0 -171
- package/packages/shared-components/src/Timeline/TimelineTrackSegments.tsx +0 -130
- package/packages/shared-components/src/Timeline/index.ts +0 -2
- package/packages/shared-components/src/Toast/Toast.tsx +0 -59
- package/packages/shared-components/src/Toast/ToastBody.tsx +0 -26
- package/packages/shared-components/src/Toast/ToastFooterLink.tsx +0 -19
- package/packages/shared-components/src/Toast/Toaster.styled.tsx +0 -76
- package/packages/shared-components/src/Toast/Toaster.tsx +0 -21
- package/packages/shared-components/src/Toast/index.ts +0 -3
- package/packages/shared-components/src/Toast/toasts.tsx +0 -28
- package/packages/shared-components/src/Toast/types.ts +0 -13
- package/packages/shared-components/src/Tooltip/Tooltip.tsx +0 -36
- package/packages/shared-components/src/Tooltip/index.ts +0 -1
- package/packages/shared-components/src/UserProfileMenu/UserProfileMenu.styled.tsx +0 -33
- package/packages/shared-components/src/UserProfileMenu/UserProfileMenu.tsx +0 -168
- package/packages/shared-components/src/UserProfileMenu/index.ts +0 -1
- package/packages/shared-components/src/index.ts +0 -25
- package/packages/shared-components/src/utils/colorVariant.ts +0 -162
- package/packages/shared-components/src/utils/date.ts +0 -25
- package/packages/shared-components/src/utils/file.ts +0 -20
- package/packages/shared-components/src/utils/fileSizeValidate.ts +0 -5
- package/packages/shared-components/src/utils/index.ts +0 -9
- package/packages/shared-components/src/utils/theme/colorPalette.ts +0 -112
- package/packages/shared-components/src/utils/theme/colorPaletteUI.tsx +0 -44
- package/packages/shared-components/src/utils/theme/paletteDark.ts +0 -10
- package/packages/shared-components/src/utils/theme/paletteLight.ts +0 -31
- package/packages/shared-components/src/utils/theme/theme.ts +0 -297
- package/packages/shared-components/src/utils/theme/types.ts +0 -18
- package/packages/shared-components/src/utils/theme/typography.ts +0 -52
- package/packages/shared-components/src/utils/urlToNestedObject.ts +0 -9
- package/packages/shared-components/tsconfig.json +0 -8
- package/packages/shared-components/tsconfig.lint.json +0 -8
- package/packages/shared-components/turbo/generators/config.ts +0 -33
- package/packages/shared-components/turbo/generators/templates/component.hbs +0 -8
- package/packages/typescript-config/base.json +0 -20
- package/packages/typescript-config/nextjs.json +0 -13
- package/packages/typescript-config/package.json +0 -9
- package/packages/typescript-config/react-library.json +0 -8
- package/pnpm-workspace.yaml +0 -3
- package/turbo.json +0 -44
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Box, Skeleton, Stack, Typography } from "@mui/material";
|
|
2
|
-
import { PadBox } from "../PadBox";
|
|
3
|
-
import { SvgsIndicator } from "../Svgs/SvgsIndicator";
|
|
4
|
-
import { getColorByVariant, type WorkDayType } from "../utils/colorVariant";
|
|
5
|
-
|
|
6
|
-
type AttendanceCardProps = {
|
|
7
|
-
variant: WorkDayType;
|
|
8
|
-
label: string;
|
|
9
|
-
value: string;
|
|
10
|
-
isLoading: boolean;
|
|
11
|
-
};
|
|
12
|
-
export const AttendanceCard = ({
|
|
13
|
-
variant,
|
|
14
|
-
label,
|
|
15
|
-
value,
|
|
16
|
-
isLoading = false,
|
|
17
|
-
}: AttendanceCardProps) => {
|
|
18
|
-
return (
|
|
19
|
-
<Box
|
|
20
|
-
sx={{
|
|
21
|
-
width: "223px",
|
|
22
|
-
height: "93px",
|
|
23
|
-
borderRadius: "8px",
|
|
24
|
-
border: `1px solid ${getColorByVariant(variant)}`,
|
|
25
|
-
backgroundColor: `${getColorByVariant(variant, "light")}`,
|
|
26
|
-
position: "relative",
|
|
27
|
-
}}
|
|
28
|
-
>
|
|
29
|
-
<PadBox padding={{ padding: "15px" }}>
|
|
30
|
-
<Stack gap="15px">
|
|
31
|
-
<Typography>{label}</Typography>
|
|
32
|
-
{isLoading ? (
|
|
33
|
-
<Skeleton
|
|
34
|
-
width={80}
|
|
35
|
-
height={25}
|
|
36
|
-
sx={{
|
|
37
|
-
transform: "scale(1)",
|
|
38
|
-
borderRadius: "4px",
|
|
39
|
-
}}
|
|
40
|
-
/>
|
|
41
|
-
) : (
|
|
42
|
-
<Typography variant="h6">{value}</Typography>
|
|
43
|
-
)}
|
|
44
|
-
</Stack>
|
|
45
|
-
<Box sx={{ position: "absolute", top: "0px", right: "5px" }}>
|
|
46
|
-
<SvgsIndicator variant={variant} />
|
|
47
|
-
</Box>
|
|
48
|
-
</PadBox>
|
|
49
|
-
</Box>
|
|
50
|
-
);
|
|
51
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Box, Stack, Typography, useTheme } from "@mui/material";
|
|
2
|
-
import type { PropsWithChildren, ReactNode } from "react";
|
|
3
|
-
import { PadBox } from "../PadBox";
|
|
4
|
-
|
|
5
|
-
type CardProps = PropsWithChildren<{
|
|
6
|
-
heading?: ReactNode;
|
|
7
|
-
action?: ReactNode;
|
|
8
|
-
}>;
|
|
9
|
-
|
|
10
|
-
export function Card({ heading, children, action }: Readonly<CardProps>) {
|
|
11
|
-
const theme = useTheme();
|
|
12
|
-
|
|
13
|
-
const { lightBlue } = theme.palette.app.color;
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<Box bgcolor={lightBlue[50]} flex={1} sx={{ borderRadius: "5px" }}>
|
|
17
|
-
<PadBox padding={{ padding: 2 }}>
|
|
18
|
-
<Stack gap="10px">
|
|
19
|
-
<Stack
|
|
20
|
-
flexDirection="row"
|
|
21
|
-
alignItems="center"
|
|
22
|
-
justifyContent="space-between"
|
|
23
|
-
>
|
|
24
|
-
<Typography variant="h6">{heading}</Typography>
|
|
25
|
-
|
|
26
|
-
<Box>{action}</Box>
|
|
27
|
-
</Stack>
|
|
28
|
-
|
|
29
|
-
{children}
|
|
30
|
-
</Stack>
|
|
31
|
-
</PadBox>
|
|
32
|
-
</Box>
|
|
33
|
-
);
|
|
34
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Stack, Typography } from "@mui/material";
|
|
2
|
-
import type { ReactNode } from "react";
|
|
3
|
-
|
|
4
|
-
type CardItemProps = Readonly<{
|
|
5
|
-
label: ReactNode;
|
|
6
|
-
value?: ReactNode;
|
|
7
|
-
}>;
|
|
8
|
-
|
|
9
|
-
export function CardItem({ label, value }: CardItemProps) {
|
|
10
|
-
return (
|
|
11
|
-
<Stack
|
|
12
|
-
direction="row"
|
|
13
|
-
justifyContent="space-between"
|
|
14
|
-
alignItems="center"
|
|
15
|
-
gap="5px"
|
|
16
|
-
>
|
|
17
|
-
{typeof label === "string" ? (
|
|
18
|
-
<Typography
|
|
19
|
-
variant="body1"
|
|
20
|
-
sx={{ fontWeight: 500 }}
|
|
21
|
-
flex={1}
|
|
22
|
-
maxWidth="400px"
|
|
23
|
-
>
|
|
24
|
-
{label} :
|
|
25
|
-
</Typography>
|
|
26
|
-
) : (
|
|
27
|
-
<> {label} :</>
|
|
28
|
-
)}
|
|
29
|
-
|
|
30
|
-
{value}
|
|
31
|
-
</Stack>
|
|
32
|
-
);
|
|
33
|
-
}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import type { AvatarOwnProps, SxProps, Theme } from "@mui/material";
|
|
2
|
-
import { Avatar, Skeleton, Stack, Typography, useTheme } from "@mui/material";
|
|
3
|
-
|
|
4
|
-
type CardItemValueProps = {
|
|
5
|
-
title?: string;
|
|
6
|
-
subTitle?: string;
|
|
7
|
-
loading?: boolean;
|
|
8
|
-
avatar?: string;
|
|
9
|
-
showAvatar?: boolean;
|
|
10
|
-
sx?: SxProps<Theme>;
|
|
11
|
-
isHideTitle?: boolean;
|
|
12
|
-
variant?: AvatarOwnProps["variant"];
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export const CardItemValue = ({
|
|
16
|
-
title,
|
|
17
|
-
subTitle,
|
|
18
|
-
avatar,
|
|
19
|
-
loading = false,
|
|
20
|
-
showAvatar = false,
|
|
21
|
-
isHideTitle = false,
|
|
22
|
-
variant = "circular",
|
|
23
|
-
sx,
|
|
24
|
-
}: CardItemValueProps) => {
|
|
25
|
-
const theme = useTheme();
|
|
26
|
-
|
|
27
|
-
const { slate, iron } = theme.palette.app.color;
|
|
28
|
-
|
|
29
|
-
if (loading) {
|
|
30
|
-
return (
|
|
31
|
-
<Stack gap="10px " flex="1">
|
|
32
|
-
<Stack direction="row" gap="10px" alignItems="center">
|
|
33
|
-
{avatar && (
|
|
34
|
-
<Skeleton
|
|
35
|
-
variant="circular"
|
|
36
|
-
height="30px"
|
|
37
|
-
animation="wave"
|
|
38
|
-
width="30px"
|
|
39
|
-
/>
|
|
40
|
-
)}
|
|
41
|
-
<Skeleton
|
|
42
|
-
variant="rounded"
|
|
43
|
-
height={20}
|
|
44
|
-
animation="wave"
|
|
45
|
-
width="150px"
|
|
46
|
-
/>
|
|
47
|
-
</Stack>
|
|
48
|
-
|
|
49
|
-
{subTitle && (
|
|
50
|
-
<Skeleton
|
|
51
|
-
variant="rounded"
|
|
52
|
-
height={20}
|
|
53
|
-
animation="wave"
|
|
54
|
-
width="200px"
|
|
55
|
-
/>
|
|
56
|
-
)}
|
|
57
|
-
</Stack>
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
return (
|
|
62
|
-
<Stack gap="10px" flex="1">
|
|
63
|
-
<Stack gap="10px" direction="row" alignItems="center">
|
|
64
|
-
{showAvatar && <Avatar alt={title} src={avatar} variant={variant} />}
|
|
65
|
-
|
|
66
|
-
{!isHideTitle && (
|
|
67
|
-
<Typography
|
|
68
|
-
variant="body1"
|
|
69
|
-
sx={{
|
|
70
|
-
fontWeight: 400,
|
|
71
|
-
color: slate[900],
|
|
72
|
-
overflow: "hidden",
|
|
73
|
-
textOverflow: "ellipsis",
|
|
74
|
-
display: "-webkit-box",
|
|
75
|
-
WebkitLineClamp: 1,
|
|
76
|
-
WebkitBoxOrient: "vertical",
|
|
77
|
-
width: "min-contact",
|
|
78
|
-
...sx,
|
|
79
|
-
}}
|
|
80
|
-
>
|
|
81
|
-
{title ? title : "-"}
|
|
82
|
-
</Typography>
|
|
83
|
-
)}
|
|
84
|
-
</Stack>
|
|
85
|
-
|
|
86
|
-
{subTitle && (
|
|
87
|
-
<Typography
|
|
88
|
-
variant="body1"
|
|
89
|
-
sx={{
|
|
90
|
-
color: iron[500],
|
|
91
|
-
}}
|
|
92
|
-
>
|
|
93
|
-
{subTitle}
|
|
94
|
-
</Typography>
|
|
95
|
-
)}
|
|
96
|
-
</Stack>
|
|
97
|
-
);
|
|
98
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Box, Stack, useTheme } from "@mui/material";
|
|
2
|
-
import type { PropsWithChildren, ReactNode } from "react";
|
|
3
|
-
import { PadBox } from "../../PadBox";
|
|
4
|
-
|
|
5
|
-
type ProfileCardProps = PropsWithChildren<{
|
|
6
|
-
header: ReactNode;
|
|
7
|
-
body: ReactNode;
|
|
8
|
-
onClick: (e: React.MouseEvent) => void;
|
|
9
|
-
}>;
|
|
10
|
-
|
|
11
|
-
export function ProfileCard({
|
|
12
|
-
onClick,
|
|
13
|
-
header,
|
|
14
|
-
body,
|
|
15
|
-
}: Readonly<ProfileCardProps>) {
|
|
16
|
-
const theme = useTheme();
|
|
17
|
-
|
|
18
|
-
const { lightBlue, butterflyBlue } = theme.palette.app.color;
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<Box
|
|
22
|
-
bgcolor={lightBlue[50]}
|
|
23
|
-
flex={1}
|
|
24
|
-
sx={{
|
|
25
|
-
borderRadius: "10px",
|
|
26
|
-
cursor: "pointer",
|
|
27
|
-
":hover": { background: butterflyBlue[600] },
|
|
28
|
-
}}
|
|
29
|
-
height="400px"
|
|
30
|
-
onClick={onClick}
|
|
31
|
-
>
|
|
32
|
-
<PadBox padding={{ padding: "10px" }}>
|
|
33
|
-
<Stack height="100%" justifyContent="space-between">
|
|
34
|
-
{header}
|
|
35
|
-
{body}
|
|
36
|
-
</Stack>
|
|
37
|
-
</PadBox>
|
|
38
|
-
</Box>
|
|
39
|
-
);
|
|
40
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { Box, Stack } from "@mui/material";
|
|
2
|
-
import type { PropsWithChildren } from "react";
|
|
3
|
-
import { PadBox } from "../../../PadBox";
|
|
4
|
-
import { SvgEmail } from "../../../Svgs/SvgEmail";
|
|
5
|
-
import { SvgPhone } from "../../../Svgs/SvgPhone";
|
|
6
|
-
import { CardItem, CardItemValue } from "../../CardItem";
|
|
7
|
-
|
|
8
|
-
type ProfileCardBodyProps = PropsWithChildren<{
|
|
9
|
-
joiningDate: string;
|
|
10
|
-
department: string;
|
|
11
|
-
subDepartment: string;
|
|
12
|
-
email: string;
|
|
13
|
-
phone: string;
|
|
14
|
-
loading?: boolean;
|
|
15
|
-
}>;
|
|
16
|
-
|
|
17
|
-
export function ProfileCardBody({
|
|
18
|
-
joiningDate,
|
|
19
|
-
department,
|
|
20
|
-
subDepartment,
|
|
21
|
-
email,
|
|
22
|
-
phone,
|
|
23
|
-
loading,
|
|
24
|
-
}: ProfileCardBodyProps) {
|
|
25
|
-
return (
|
|
26
|
-
<Box bgcolor="#F3F5F7" sx={{ borderRadius: "10px" }}>
|
|
27
|
-
<PadBox padding={{ padding: "12px" }}>
|
|
28
|
-
<Stack gap="10px">
|
|
29
|
-
<CardItem
|
|
30
|
-
label="Date of Joining"
|
|
31
|
-
value={<CardItemValue title={joiningDate} loading={loading} />}
|
|
32
|
-
/>
|
|
33
|
-
<CardItem
|
|
34
|
-
label="Department"
|
|
35
|
-
value={<CardItemValue title={department} loading={loading} />}
|
|
36
|
-
/>
|
|
37
|
-
<CardItem
|
|
38
|
-
label="Sub Department"
|
|
39
|
-
value={<CardItemValue title={subDepartment} loading={loading} />}
|
|
40
|
-
/>
|
|
41
|
-
<CardItem
|
|
42
|
-
label={<SvgEmail />}
|
|
43
|
-
value={<CardItemValue title={email} loading={loading} />}
|
|
44
|
-
/>
|
|
45
|
-
<CardItem
|
|
46
|
-
label={<SvgPhone />}
|
|
47
|
-
value={<CardItemValue title={phone} loading={loading} />}
|
|
48
|
-
/>
|
|
49
|
-
</Stack>
|
|
50
|
-
</PadBox>
|
|
51
|
-
</Box>
|
|
52
|
-
);
|
|
53
|
-
}
|
package/packages/shared-components/src/Card/ProfileCard/ProfileCardItem/ProfileCardHeader.tsx
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import type { SxProps, Theme } from "@mui/material";
|
|
2
|
-
import { Box, Skeleton, Stack, Typography } from "@mui/material";
|
|
3
|
-
import type { PropsWithChildren, ReactNode } from "react";
|
|
4
|
-
import { DeleteAction } from "../../../Actions";
|
|
5
|
-
import { Chip } from "../../../Chips";
|
|
6
|
-
import { PadBox } from "../../../PadBox";
|
|
7
|
-
import { CardItemValue } from "../../CardItem";
|
|
8
|
-
|
|
9
|
-
type ProfileCardHeaderProps = PropsWithChildren<{
|
|
10
|
-
avatar: ReactNode;
|
|
11
|
-
employeeName: string;
|
|
12
|
-
designation: string;
|
|
13
|
-
employeeCode: string;
|
|
14
|
-
loading: boolean;
|
|
15
|
-
isDraft?: boolean;
|
|
16
|
-
sx?: SxProps<Theme>;
|
|
17
|
-
onDeleteClick?: (e: React.MouseEvent) => void;
|
|
18
|
-
}>;
|
|
19
|
-
|
|
20
|
-
export function ProfileCardHeader({
|
|
21
|
-
avatar,
|
|
22
|
-
employeeName,
|
|
23
|
-
designation,
|
|
24
|
-
employeeCode,
|
|
25
|
-
loading,
|
|
26
|
-
isDraft = false,
|
|
27
|
-
onDeleteClick,
|
|
28
|
-
}: ProfileCardHeaderProps) {
|
|
29
|
-
return (
|
|
30
|
-
<Box>
|
|
31
|
-
<PadBox padding={{ padding: "10px 5px 0px 10px" }}>
|
|
32
|
-
<Stack
|
|
33
|
-
gap="10px"
|
|
34
|
-
direction="row"
|
|
35
|
-
alignItems="center"
|
|
36
|
-
justifyContent="space-between"
|
|
37
|
-
>
|
|
38
|
-
{loading ? (
|
|
39
|
-
<Skeleton
|
|
40
|
-
variant="rounded"
|
|
41
|
-
height={20}
|
|
42
|
-
animation="wave"
|
|
43
|
-
width="100px"
|
|
44
|
-
/>
|
|
45
|
-
) : // eslint-disable-next-line sonarjs/no-nested-conditional
|
|
46
|
-
isDraft ? (
|
|
47
|
-
<Chip label="Draft" size="small" color="error" variant="outlined" />
|
|
48
|
-
) : (
|
|
49
|
-
<CardItemValue title={employeeCode} loading={loading} />
|
|
50
|
-
)}
|
|
51
|
-
|
|
52
|
-
{isDraft &&
|
|
53
|
-
(loading ? (
|
|
54
|
-
<Skeleton
|
|
55
|
-
variant="rounded"
|
|
56
|
-
height={20}
|
|
57
|
-
animation="wave"
|
|
58
|
-
width="50px"
|
|
59
|
-
/>
|
|
60
|
-
) : (
|
|
61
|
-
<DeleteAction onClick={onDeleteClick} />
|
|
62
|
-
))}
|
|
63
|
-
</Stack>
|
|
64
|
-
</PadBox>
|
|
65
|
-
<Stack alignItems="center" gap="8px">
|
|
66
|
-
{avatar}
|
|
67
|
-
{loading ? (
|
|
68
|
-
<Skeleton
|
|
69
|
-
variant="rounded"
|
|
70
|
-
height={30}
|
|
71
|
-
animation="wave"
|
|
72
|
-
width="300px"
|
|
73
|
-
/>
|
|
74
|
-
) : (
|
|
75
|
-
<Typography
|
|
76
|
-
variant="h6"
|
|
77
|
-
sx={{
|
|
78
|
-
overflow: "hidden",
|
|
79
|
-
textOverflow: "ellipsis",
|
|
80
|
-
display: "-webkit-box",
|
|
81
|
-
WebkitLineClamp: 1,
|
|
82
|
-
WebkitBoxOrient: "vertical",
|
|
83
|
-
}}
|
|
84
|
-
width="330px"
|
|
85
|
-
fontWeight="500"
|
|
86
|
-
textAlign="center"
|
|
87
|
-
>
|
|
88
|
-
{employeeName ?? "-"}
|
|
89
|
-
</Typography>
|
|
90
|
-
)}
|
|
91
|
-
|
|
92
|
-
<CardItemValue title={designation} loading={loading} />
|
|
93
|
-
</Stack>
|
|
94
|
-
</Box>
|
|
95
|
-
);
|
|
96
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { styled } from "@mui/material/styles";
|
|
2
|
-
import type { PieSeriesType, PieValueType } from "@mui/x-charts";
|
|
3
|
-
import { useDrawingArea } from "@mui/x-charts/hooks";
|
|
4
|
-
import type { MakeOptional } from "@mui/x-charts/internals";
|
|
5
|
-
import type { PieChartProps as MuiPieChartProps } from "@mui/x-charts/PieChart";
|
|
6
|
-
import { PieChart as MuiPieChart } from "@mui/x-charts/PieChart";
|
|
7
|
-
import type { ReactNode } from "react";
|
|
8
|
-
import { Skeleton } from "./Skeleton";
|
|
9
|
-
|
|
10
|
-
type PieChartProps = Omit<MuiPieChartProps, "series"> & {
|
|
11
|
-
series: MakeOptional<PieSeriesType<MakeOptional<PieValueType, "id">>, "type">;
|
|
12
|
-
label?: string;
|
|
13
|
-
valueFormatter?: (item: { value: number }) => string;
|
|
14
|
-
loading?: boolean;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
type PieCenterLabelProps = {
|
|
18
|
-
children: ReactNode;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const PieChart = ({
|
|
22
|
-
height = 235,
|
|
23
|
-
skipAnimation = false,
|
|
24
|
-
loading = false,
|
|
25
|
-
valueFormatter = (item: MakeOptional<PieValueType, "id">) => `${item.value}%`,
|
|
26
|
-
tooltip,
|
|
27
|
-
label,
|
|
28
|
-
series,
|
|
29
|
-
...rest
|
|
30
|
-
}: PieChartProps) => {
|
|
31
|
-
const StyledText = styled("text")(({ theme }) => ({
|
|
32
|
-
fill: theme.palette.text.primary,
|
|
33
|
-
textAnchor: "middle",
|
|
34
|
-
dominantBaseline: "central",
|
|
35
|
-
fontSize: 20,
|
|
36
|
-
}));
|
|
37
|
-
|
|
38
|
-
const outerRadius = Number(series.outerRadius ?? 0);
|
|
39
|
-
|
|
40
|
-
const innerRadius = Number(series.innerRadius ?? 0);
|
|
41
|
-
|
|
42
|
-
const radius = outerRadius - innerRadius;
|
|
43
|
-
|
|
44
|
-
// eslint-disable-next-line sonarjs/no-unstable-nested-components
|
|
45
|
-
const PieCenterLabel = ({ children }: PieCenterLabelProps) => {
|
|
46
|
-
const { width, height, left, top } = useDrawingArea();
|
|
47
|
-
|
|
48
|
-
return (
|
|
49
|
-
<StyledText x={left + width / 2} y={top + height / 2}>
|
|
50
|
-
{children}
|
|
51
|
-
</StyledText>
|
|
52
|
-
);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
if (loading) {
|
|
56
|
-
return <Skeleton height={height} radius={radius} />;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
return (
|
|
60
|
-
<MuiPieChart
|
|
61
|
-
height={height}
|
|
62
|
-
sx={{
|
|
63
|
-
transform: "translate(50px, 0px)",
|
|
64
|
-
overflow: "visible",
|
|
65
|
-
}}
|
|
66
|
-
series={[
|
|
67
|
-
{
|
|
68
|
-
arcLabel: (params) => params.label ?? "",
|
|
69
|
-
arcLabelMinAngle: 20,
|
|
70
|
-
valueFormatter,
|
|
71
|
-
...series,
|
|
72
|
-
},
|
|
73
|
-
]}
|
|
74
|
-
{...rest}
|
|
75
|
-
tooltip={tooltip}
|
|
76
|
-
skipAnimation={skipAnimation}
|
|
77
|
-
>
|
|
78
|
-
<PieCenterLabel>{label}</PieCenterLabel>
|
|
79
|
-
</MuiPieChart>
|
|
80
|
-
);
|
|
81
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Box, Skeleton as MuiSkeleton } from "@mui/material";
|
|
2
|
-
|
|
3
|
-
export const Skeleton = ({
|
|
4
|
-
height = 235,
|
|
5
|
-
radius = 18,
|
|
6
|
-
}: {
|
|
7
|
-
height?: string | number;
|
|
8
|
-
radius?: number;
|
|
9
|
-
}) => {
|
|
10
|
-
return (
|
|
11
|
-
<Box position="relative" display="flex" justifyContent="center">
|
|
12
|
-
<MuiSkeleton
|
|
13
|
-
sx={{
|
|
14
|
-
transform: "unset",
|
|
15
|
-
width: "162px",
|
|
16
|
-
height: { height },
|
|
17
|
-
borderRadius: "50%",
|
|
18
|
-
border: `${radius}px solid #e0e0e0`,
|
|
19
|
-
background: "transparent",
|
|
20
|
-
boxSizing: "border-box",
|
|
21
|
-
}}
|
|
22
|
-
/>
|
|
23
|
-
|
|
24
|
-
<MuiSkeleton
|
|
25
|
-
sx={{
|
|
26
|
-
position: "absolute",
|
|
27
|
-
top: "50%",
|
|
28
|
-
left: "50%",
|
|
29
|
-
transform: "translate(-50%, -50%)",
|
|
30
|
-
width: "80px",
|
|
31
|
-
height: "25px",
|
|
32
|
-
}}
|
|
33
|
-
/>
|
|
34
|
-
</Box>
|
|
35
|
-
);
|
|
36
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./PieChart";
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Avatar,
|
|
3
|
-
Chip as MuiChip,
|
|
4
|
-
type ChipProps as MuiChipProps,
|
|
5
|
-
} from "@mui/material";
|
|
6
|
-
|
|
7
|
-
type ChipProps = {
|
|
8
|
-
imgURL?: string;
|
|
9
|
-
} & MuiChipProps;
|
|
10
|
-
|
|
11
|
-
export const Chip = ({
|
|
12
|
-
label,
|
|
13
|
-
variant = "outlined",
|
|
14
|
-
imgURL,
|
|
15
|
-
avatar,
|
|
16
|
-
...rest
|
|
17
|
-
}: ChipProps) => {
|
|
18
|
-
return (
|
|
19
|
-
<MuiChip
|
|
20
|
-
avatar={avatar && <Avatar alt="Natacha" src={imgURL} />}
|
|
21
|
-
label={label}
|
|
22
|
-
variant={variant}
|
|
23
|
-
{...rest}
|
|
24
|
-
/>
|
|
25
|
-
);
|
|
26
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { ChipProps } from "@mui/material";
|
|
2
|
-
import { alpha, Chip, Tooltip } from "@mui/material";
|
|
3
|
-
|
|
4
|
-
type ChipWithBorderProps = Omit<ChipProps, "color"> & {
|
|
5
|
-
label: string;
|
|
6
|
-
color?: string;
|
|
7
|
-
toolTipLabel?: string;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export const ChipWithBorder = ({
|
|
11
|
-
label,
|
|
12
|
-
color = "green",
|
|
13
|
-
toolTipLabel,
|
|
14
|
-
...rest
|
|
15
|
-
}: ChipWithBorderProps) => {
|
|
16
|
-
return (
|
|
17
|
-
<Tooltip title={toolTipLabel} arrow placement="top">
|
|
18
|
-
<Chip
|
|
19
|
-
label={label}
|
|
20
|
-
{...rest}
|
|
21
|
-
sx={{
|
|
22
|
-
border: `1px solid ${color}`,
|
|
23
|
-
borderColor: color,
|
|
24
|
-
backgroundColor: alpha(color, 0.2),
|
|
25
|
-
borderRadius: "3px",
|
|
26
|
-
height: "20px",
|
|
27
|
-
width: "auto",
|
|
28
|
-
padding: "0px",
|
|
29
|
-
".MuiChip-label": {
|
|
30
|
-
color,
|
|
31
|
-
fontSize: "12px",
|
|
32
|
-
fontWeight: 600,
|
|
33
|
-
padding: "5px",
|
|
34
|
-
},
|
|
35
|
-
}}
|
|
36
|
-
></Chip>
|
|
37
|
-
</Tooltip>
|
|
38
|
-
);
|
|
39
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef } from "react";
|
|
2
|
-
import { Chip } from "../Chips";
|
|
3
|
-
import { ClearIcon } from "@mui/x-date-pickers/icons";
|
|
4
|
-
import { useTheme } from "@mui/material";
|
|
5
|
-
|
|
6
|
-
type FilterPillProps = {
|
|
7
|
-
onDelete?: () => void;
|
|
8
|
-
label: React.ReactNode;
|
|
9
|
-
onClick?: (e: { currentTarget: HTMLDivElement | null }) => void;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const FilterPill = forwardRef<HTMLDivElement, FilterPillProps>(
|
|
13
|
-
({ onDelete, label, onClick }, ref) => {
|
|
14
|
-
const theme = useTheme();
|
|
15
|
-
|
|
16
|
-
const { black, sapphireBlue, iron } = theme.palette.app.color;
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<Chip
|
|
20
|
-
ref={ref}
|
|
21
|
-
label={label}
|
|
22
|
-
variant="filled"
|
|
23
|
-
deleteIcon={onDelete && <ClearIcon />}
|
|
24
|
-
sx={{
|
|
25
|
-
maxWidth: "200px",
|
|
26
|
-
borderRadius: "20px",
|
|
27
|
-
color: black[900],
|
|
28
|
-
backgroundColor: `${sapphireBlue[400]} !important`,
|
|
29
|
-
"&:hover": {
|
|
30
|
-
backgroundColor: sapphireBlue[500],
|
|
31
|
-
},
|
|
32
|
-
"& .MuiChip-deleteIcon": {
|
|
33
|
-
color: iron[800],
|
|
34
|
-
"&:hover": {
|
|
35
|
-
color: iron[900],
|
|
36
|
-
backgroundColor: sapphireBlue[400],
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
}}
|
|
40
|
-
onDelete={onDelete}
|
|
41
|
-
onClick={onClick}
|
|
42
|
-
/>
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
FilterPill.displayName = "FilterPill";
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { StyledComponent } from "@emotion/styled";
|
|
2
|
-
import type { StackProps } from "@mui/material";
|
|
3
|
-
import { Stack, styled } from "@mui/material";
|
|
4
|
-
import type { DialogProps as MuiDialogProps } from "./Dialog";
|
|
5
|
-
import { Dialog } from "./Dialog";
|
|
6
|
-
|
|
7
|
-
export const BottomDialogStyled: StyledComponent<MuiDialogProps> = styled(
|
|
8
|
-
Dialog
|
|
9
|
-
)({
|
|
10
|
-
height: "85%",
|
|
11
|
-
top: "auto",
|
|
12
|
-
"& .MuiDialogContent-root": {
|
|
13
|
-
display: "grid",
|
|
14
|
-
padding: "unset",
|
|
15
|
-
},
|
|
16
|
-
"& .MuiDialog-paper": {
|
|
17
|
-
borderTopLeftRadius: "12px",
|
|
18
|
-
borderTopRightRadius: "12px",
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
export const BottomDialogBody: StyledComponent<StackProps> = styled(Stack)(
|
|
23
|
-
() => ({
|
|
24
|
-
"& > *": {
|
|
25
|
-
flex: "1 1 auto",
|
|
26
|
-
},
|
|
27
|
-
})
|
|
28
|
-
);
|