@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,181 +0,0 @@
|
|
|
1
|
-
import { Delete as DeleteIcon, Edit as EditIcon } from "@mui/icons-material";
|
|
2
|
-
import CameraAltOutlinedIcon from "@mui/icons-material/CameraAltOutlined";
|
|
3
|
-
import PersonAddAltIcon from "@mui/icons-material/PersonAddAlt";
|
|
4
|
-
import { Box, IconButton, Stack, Typography, useTheme } from "@mui/material";
|
|
5
|
-
import { useRef, useState } from "react";
|
|
6
|
-
import { Button } from "../../Button";
|
|
7
|
-
import { PadBox } from "../../PadBox";
|
|
8
|
-
import { DarkBackgroundContainer } from "./ImageUpload.styled";
|
|
9
|
-
import { PhotoCaptureDialog } from "./PhotoCaptureDialog";
|
|
10
|
-
import { Skeleton } from "./Skeleton";
|
|
11
|
-
|
|
12
|
-
export type ImageUploadProps = Readonly<{
|
|
13
|
-
onDelete: () => void;
|
|
14
|
-
onChange: (file: File[]) => void;
|
|
15
|
-
variant?: "square" | "circle";
|
|
16
|
-
isUploading?: boolean;
|
|
17
|
-
label?: string;
|
|
18
|
-
subTitle?: string;
|
|
19
|
-
defaultValue?: string;
|
|
20
|
-
isCapture?: boolean;
|
|
21
|
-
loading?: boolean;
|
|
22
|
-
}>;
|
|
23
|
-
|
|
24
|
-
export function ImageUpload({
|
|
25
|
-
variant = "square",
|
|
26
|
-
isUploading = false,
|
|
27
|
-
defaultValue = "",
|
|
28
|
-
onDelete,
|
|
29
|
-
onChange,
|
|
30
|
-
label,
|
|
31
|
-
isCapture = false,
|
|
32
|
-
loading = false,
|
|
33
|
-
subTitle = "PNG, JPEG under 5 MB",
|
|
34
|
-
}: ImageUploadProps) {
|
|
35
|
-
const inputRef = useRef<HTMLInputElement | null>(null);
|
|
36
|
-
|
|
37
|
-
const [hover, setHover] = useState(false);
|
|
38
|
-
|
|
39
|
-
const [isOpenCaptureModal, setIsOpenCaptureModal] = useState(false);
|
|
40
|
-
|
|
41
|
-
const theme = useTheme();
|
|
42
|
-
|
|
43
|
-
const { butterflyBlue, iron } = theme.palette.app.color;
|
|
44
|
-
|
|
45
|
-
const handleFileChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
|
46
|
-
if (event.target.files) {
|
|
47
|
-
const files = Array.from(event.target.files);
|
|
48
|
-
|
|
49
|
-
onChange(files);
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
const handleFileRemove = (event: React.MouseEvent<HTMLButtonElement>) => {
|
|
54
|
-
event.stopPropagation();
|
|
55
|
-
onDelete();
|
|
56
|
-
|
|
57
|
-
if (inputRef.current) {
|
|
58
|
-
inputRef.current.value = "";
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
if (loading) {
|
|
63
|
-
return <Skeleton />;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
return (
|
|
67
|
-
<>
|
|
68
|
-
<Stack gap="20px" direction="row" alignItems="center">
|
|
69
|
-
<Box
|
|
70
|
-
onClick={() => !defaultValue && inputRef.current?.click()}
|
|
71
|
-
onMouseEnter={() => setHover(true)}
|
|
72
|
-
onMouseLeave={() => setHover(false)}
|
|
73
|
-
sx={{
|
|
74
|
-
height: "120px",
|
|
75
|
-
width: "120px",
|
|
76
|
-
position: "relative",
|
|
77
|
-
overflow: "hidden",
|
|
78
|
-
border: defaultValue
|
|
79
|
-
? `2px solid ${butterflyBlue[900]}`
|
|
80
|
-
: `2px dashed ${theme.palette.grey[400]}`,
|
|
81
|
-
cursor: "pointer",
|
|
82
|
-
borderRadius: "10px",
|
|
83
|
-
"& img": {
|
|
84
|
-
borderRadius: "10px",
|
|
85
|
-
},
|
|
86
|
-
":hover": {
|
|
87
|
-
border: `2px dashed ${butterflyBlue[900]}`,
|
|
88
|
-
},
|
|
89
|
-
...(variant === "circle"
|
|
90
|
-
? {
|
|
91
|
-
borderRadius: "50%",
|
|
92
|
-
"& img": {
|
|
93
|
-
borderRadius: "50%",
|
|
94
|
-
},
|
|
95
|
-
}
|
|
96
|
-
: {}),
|
|
97
|
-
}}
|
|
98
|
-
>
|
|
99
|
-
<input
|
|
100
|
-
type="file"
|
|
101
|
-
ref={inputRef}
|
|
102
|
-
onChange={handleFileChange}
|
|
103
|
-
style={{ display: "none" }}
|
|
104
|
-
accept="image/png, image/jpeg"
|
|
105
|
-
/>
|
|
106
|
-
|
|
107
|
-
{hover && !!defaultValue && (
|
|
108
|
-
<DarkBackgroundContainer>
|
|
109
|
-
<IconButton onClick={() => inputRef.current?.click()}>
|
|
110
|
-
<EditIcon sx={{ color: "white" }} />
|
|
111
|
-
</IconButton>
|
|
112
|
-
<IconButton onClick={handleFileRemove}>
|
|
113
|
-
<DeleteIcon sx={{ color: "white" }} />
|
|
114
|
-
</IconButton>
|
|
115
|
-
</DarkBackgroundContainer>
|
|
116
|
-
)}
|
|
117
|
-
|
|
118
|
-
{isUploading && (
|
|
119
|
-
<DarkBackgroundContainer>
|
|
120
|
-
<Typography color={iron[600]}>Processing...</Typography>
|
|
121
|
-
</DarkBackgroundContainer>
|
|
122
|
-
)}
|
|
123
|
-
|
|
124
|
-
{defaultValue ? (
|
|
125
|
-
<PadBox padding={{ padding: "2px" }}>
|
|
126
|
-
<img
|
|
127
|
-
alt=""
|
|
128
|
-
src={defaultValue}
|
|
129
|
-
style={{
|
|
130
|
-
width: "100%",
|
|
131
|
-
height: "100%",
|
|
132
|
-
objectFit: "cover",
|
|
133
|
-
}}
|
|
134
|
-
/>
|
|
135
|
-
</PadBox>
|
|
136
|
-
) : (
|
|
137
|
-
<Stack
|
|
138
|
-
justifyContent="center"
|
|
139
|
-
alignItems="center"
|
|
140
|
-
sx={{ height: "100%" }}
|
|
141
|
-
>
|
|
142
|
-
<PersonAddAltIcon />
|
|
143
|
-
</Stack>
|
|
144
|
-
)}
|
|
145
|
-
</Box>
|
|
146
|
-
|
|
147
|
-
<Stack>
|
|
148
|
-
<Typography variant="subtitle1" fontWeight={500}>
|
|
149
|
-
{label}
|
|
150
|
-
</Typography>
|
|
151
|
-
|
|
152
|
-
<Typography variant="caption" color={iron[800]}>
|
|
153
|
-
{subTitle}
|
|
154
|
-
</Typography>
|
|
155
|
-
</Stack>
|
|
156
|
-
|
|
157
|
-
{isCapture && (
|
|
158
|
-
<Button
|
|
159
|
-
onClick={() => setIsOpenCaptureModal(true)}
|
|
160
|
-
variant="outlined"
|
|
161
|
-
>
|
|
162
|
-
<Stack gap="10px" direction="row">
|
|
163
|
-
<CameraAltOutlinedIcon />
|
|
164
|
-
|
|
165
|
-
<Typography variant="body1">Capture photo</Typography>
|
|
166
|
-
</Stack>
|
|
167
|
-
</Button>
|
|
168
|
-
)}
|
|
169
|
-
</Stack>
|
|
170
|
-
|
|
171
|
-
{isOpenCaptureModal && (
|
|
172
|
-
<PhotoCaptureDialog
|
|
173
|
-
onChange={onChange}
|
|
174
|
-
isUploading={isUploading}
|
|
175
|
-
open={isOpenCaptureModal}
|
|
176
|
-
onClose={() => setIsOpenCaptureModal(false)}
|
|
177
|
-
/>
|
|
178
|
-
)}
|
|
179
|
-
</>
|
|
180
|
-
);
|
|
181
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { Avatar, Box, Stack, useTheme } from "@mui/material";
|
|
2
|
-
import { PadBox } from "../../PadBox";
|
|
3
|
-
import { useState } from "react";
|
|
4
|
-
|
|
5
|
-
export type ImageUploadViewProps = Readonly<{
|
|
6
|
-
defaultValue?: string;
|
|
7
|
-
variant: string;
|
|
8
|
-
}>;
|
|
9
|
-
export function ImageUploadView({
|
|
10
|
-
defaultValue,
|
|
11
|
-
variant,
|
|
12
|
-
}: ImageUploadViewProps) {
|
|
13
|
-
const theme = useTheme();
|
|
14
|
-
|
|
15
|
-
const { butterflyBlue } = theme.palette.app.color;
|
|
16
|
-
|
|
17
|
-
const [hasError, setHasError] = useState(false);
|
|
18
|
-
|
|
19
|
-
return (
|
|
20
|
-
<Box
|
|
21
|
-
sx={{
|
|
22
|
-
height: "120px",
|
|
23
|
-
minWidth: "120px",
|
|
24
|
-
maxWidth: "120px",
|
|
25
|
-
overflow: "hidden",
|
|
26
|
-
border: `2px solid ${butterflyBlue[900]}`,
|
|
27
|
-
borderRadius: "10px",
|
|
28
|
-
"& img": {
|
|
29
|
-
borderRadius: "10px",
|
|
30
|
-
},
|
|
31
|
-
...(variant === "circle"
|
|
32
|
-
? {
|
|
33
|
-
borderRadius: "50%",
|
|
34
|
-
"& img": {
|
|
35
|
-
borderRadius: "50%",
|
|
36
|
-
},
|
|
37
|
-
}
|
|
38
|
-
: {}),
|
|
39
|
-
}}
|
|
40
|
-
>
|
|
41
|
-
{defaultValue && !hasError ? (
|
|
42
|
-
<PadBox padding={{ padding: "2px" }}>
|
|
43
|
-
<img
|
|
44
|
-
alt=""
|
|
45
|
-
src={defaultValue}
|
|
46
|
-
onError={() => setHasError(true)}
|
|
47
|
-
style={{
|
|
48
|
-
width: "100%",
|
|
49
|
-
height: "100%",
|
|
50
|
-
objectFit: "cover",
|
|
51
|
-
}}
|
|
52
|
-
/>
|
|
53
|
-
</PadBox>
|
|
54
|
-
) : (
|
|
55
|
-
<Stack
|
|
56
|
-
justifyContent="center"
|
|
57
|
-
alignItems="center"
|
|
58
|
-
sx={{ height: "100%" }}
|
|
59
|
-
>
|
|
60
|
-
<Avatar sx={{ width: "93%", height: "93%" }} />
|
|
61
|
-
</Stack>
|
|
62
|
-
)}
|
|
63
|
-
</Box>
|
|
64
|
-
);
|
|
65
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { Stack } from "@mui/material";
|
|
2
|
-
import { base64ToFile } from "file64";
|
|
3
|
-
import { useCallback, useRef } from "react";
|
|
4
|
-
import Webcam from "react-webcam";
|
|
5
|
-
import { Button } from "../../Button";
|
|
6
|
-
import { Dialog } from "../../Dialog";
|
|
7
|
-
import { toasts } from "../../Toast";
|
|
8
|
-
|
|
9
|
-
type PhotoCaptureDialogProps = {
|
|
10
|
-
open: boolean;
|
|
11
|
-
isUploading: boolean;
|
|
12
|
-
onClose: () => void;
|
|
13
|
-
onChange: (file: File[]) => void;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const PhotoCaptureDialog = ({
|
|
17
|
-
open,
|
|
18
|
-
isUploading,
|
|
19
|
-
onClose,
|
|
20
|
-
onChange,
|
|
21
|
-
}: PhotoCaptureDialogProps) => {
|
|
22
|
-
const webcamRef = useRef<Webcam | null>(null);
|
|
23
|
-
|
|
24
|
-
const capture = useCallback(async () => {
|
|
25
|
-
if (webcamRef.current) {
|
|
26
|
-
const imageSrc = webcamRef.current.getScreenshot();
|
|
27
|
-
|
|
28
|
-
if (imageSrc) {
|
|
29
|
-
try {
|
|
30
|
-
const file = await base64ToFile(imageSrc, "image/jpeg");
|
|
31
|
-
|
|
32
|
-
onChange([file]);
|
|
33
|
-
|
|
34
|
-
onClose();
|
|
35
|
-
} catch (error) {
|
|
36
|
-
toasts.error({ title: `Failed to convert base64 to file:${error}` });
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}, [webcamRef]);
|
|
41
|
-
|
|
42
|
-
return (
|
|
43
|
-
<Dialog
|
|
44
|
-
onClose={onClose}
|
|
45
|
-
open={open}
|
|
46
|
-
title="Photo Capture"
|
|
47
|
-
maxWidth="md"
|
|
48
|
-
actions={
|
|
49
|
-
<Stack direction="row" gap="5px">
|
|
50
|
-
<Button onClick={onClose} variant="outlined">
|
|
51
|
-
Cancel
|
|
52
|
-
</Button>
|
|
53
|
-
|
|
54
|
-
<Button
|
|
55
|
-
onClick={() => {
|
|
56
|
-
capture();
|
|
57
|
-
}}
|
|
58
|
-
loading={isUploading}
|
|
59
|
-
>
|
|
60
|
-
Save
|
|
61
|
-
</Button>
|
|
62
|
-
</Stack>
|
|
63
|
-
}
|
|
64
|
-
>
|
|
65
|
-
<Webcam
|
|
66
|
-
mirrored
|
|
67
|
-
ref={webcamRef}
|
|
68
|
-
screenshotFormat="image/jpeg"
|
|
69
|
-
width="835"
|
|
70
|
-
height="600"
|
|
71
|
-
/>
|
|
72
|
-
</Dialog>
|
|
73
|
-
);
|
|
74
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Skeleton as MuiSkeleton, Stack } from "@mui/material";
|
|
2
|
-
|
|
3
|
-
export const Skeleton = () => {
|
|
4
|
-
return (
|
|
5
|
-
<Stack gap="20px" direction="row" alignItems="center">
|
|
6
|
-
<MuiSkeleton
|
|
7
|
-
width="120px"
|
|
8
|
-
height="120px"
|
|
9
|
-
sx={{
|
|
10
|
-
transform: "scale(1)",
|
|
11
|
-
}}
|
|
12
|
-
></MuiSkeleton>
|
|
13
|
-
<Stack gap="8px">
|
|
14
|
-
<MuiSkeleton
|
|
15
|
-
width={129}
|
|
16
|
-
height="24px"
|
|
17
|
-
sx={{
|
|
18
|
-
transform: "scale(1)",
|
|
19
|
-
}}
|
|
20
|
-
/>
|
|
21
|
-
<MuiSkeleton
|
|
22
|
-
width={129}
|
|
23
|
-
height="16px"
|
|
24
|
-
sx={{
|
|
25
|
-
transform: "scale(1)",
|
|
26
|
-
}}
|
|
27
|
-
/>
|
|
28
|
-
</Stack>
|
|
29
|
-
</Stack>
|
|
30
|
-
);
|
|
31
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
styled,
|
|
3
|
-
ListItemButton as MuiListItemButton,
|
|
4
|
-
type ListItemButtonProps as MuiListItemButtonProps,
|
|
5
|
-
} from "@mui/material";
|
|
6
|
-
|
|
7
|
-
export const StyledListItemButton = styled(MuiListItemButton, {
|
|
8
|
-
shouldForwardProp: (prop) => prop !== "selected",
|
|
9
|
-
})<MuiListItemButtonProps & { selected?: boolean }>(({ theme, selected }) => ({
|
|
10
|
-
background: theme.palette.app.color.iron[600],
|
|
11
|
-
color: theme.palette.app.color.mirage[900],
|
|
12
|
-
borderRadius: "4px",
|
|
13
|
-
//TODO: Manish, Add a transition
|
|
14
|
-
border: `1px solid ${theme.palette.app.color.butterflyBlue[300]}`,
|
|
15
|
-
...(selected
|
|
16
|
-
? {
|
|
17
|
-
background: theme.palette.app.color.deepAqua[500],
|
|
18
|
-
color: theme.palette.app.color.mirage[900],
|
|
19
|
-
borderLeft: `6px solid ${theme.palette.app.color.butterflyBlue[900]}`,
|
|
20
|
-
}
|
|
21
|
-
: {}),
|
|
22
|
-
}));
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Stack,
|
|
3
|
-
Typography,
|
|
4
|
-
useTheme,
|
|
5
|
-
type ListItemButtonProps as MuiListItemButtonProps,
|
|
6
|
-
} from "@mui/material";
|
|
7
|
-
import type { ReactNode } from "react";
|
|
8
|
-
import { Tooltip } from "../../Tooltip";
|
|
9
|
-
import { StyledListItemButton } from "./ListItemButton.styled";
|
|
10
|
-
|
|
11
|
-
export type ListItemButtonProps = MuiListItemButtonProps & {
|
|
12
|
-
label: string;
|
|
13
|
-
actions?: ReactNode;
|
|
14
|
-
companyName?: string;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export function ListItemButton({
|
|
18
|
-
label,
|
|
19
|
-
selected,
|
|
20
|
-
actions,
|
|
21
|
-
companyName,
|
|
22
|
-
...restListItemButtonProps
|
|
23
|
-
}: ListItemButtonProps) {
|
|
24
|
-
const theme = useTheme();
|
|
25
|
-
|
|
26
|
-
const { iron } = theme.palette.app.color;
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<StyledListItemButton
|
|
30
|
-
selected={selected}
|
|
31
|
-
alignItems="flex-start"
|
|
32
|
-
{...restListItemButtonProps}
|
|
33
|
-
>
|
|
34
|
-
<Stack
|
|
35
|
-
width="100%"
|
|
36
|
-
flexDirection="row"
|
|
37
|
-
alignItems="center"
|
|
38
|
-
justifyContent="space-between"
|
|
39
|
-
>
|
|
40
|
-
<Stack gap="5px" direction="column">
|
|
41
|
-
<Tooltip toolTipLabel={label}>{label}</Tooltip>
|
|
42
|
-
|
|
43
|
-
<Typography variant="caption" color={iron[800]}>
|
|
44
|
-
{companyName}
|
|
45
|
-
</Typography>
|
|
46
|
-
</Stack>
|
|
47
|
-
|
|
48
|
-
{actions}
|
|
49
|
-
</Stack>
|
|
50
|
-
</StyledListItemButton>
|
|
51
|
-
);
|
|
52
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./ListItemButton";
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { LockOutlined } from "@mui/icons-material";
|
|
2
|
-
import VisibilityOffOutlinedIcon from "@mui/icons-material/VisibilityOffOutlined";
|
|
3
|
-
import VisibilityOutlinedIcon from "@mui/icons-material/VisibilityOutlined";
|
|
4
|
-
import { IconButton, InputAdornment } from "@mui/material";
|
|
5
|
-
import { useState } from "react";
|
|
6
|
-
import { type FieldValues } from "react-hook-form";
|
|
7
|
-
import { TextField, type TextFieldProps } from "../TextField";
|
|
8
|
-
|
|
9
|
-
type PasswordFieldProps<P extends FieldValues> = Readonly<
|
|
10
|
-
Omit<TextFieldProps<P>, "InputProps">
|
|
11
|
-
>;
|
|
12
|
-
|
|
13
|
-
export function PasswordField<P extends FieldValues>(
|
|
14
|
-
props: PasswordFieldProps<P>
|
|
15
|
-
) {
|
|
16
|
-
const [isPasswordVisible, setIsPasswordVisible] = useState(false);
|
|
17
|
-
|
|
18
|
-
const togglePasswordVisibility = () => {
|
|
19
|
-
setIsPasswordVisible((prevState) => !prevState);
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
return (
|
|
23
|
-
<TextField
|
|
24
|
-
type={isPasswordVisible ? "text" : "password"}
|
|
25
|
-
InputProps={{
|
|
26
|
-
startAdornment: (
|
|
27
|
-
<InputAdornment position="start">
|
|
28
|
-
<LockOutlined fontSize="small" />
|
|
29
|
-
</InputAdornment>
|
|
30
|
-
),
|
|
31
|
-
endAdornment: (
|
|
32
|
-
<InputAdornment position="end">
|
|
33
|
-
<IconButton
|
|
34
|
-
aria-label="toggle password visibility"
|
|
35
|
-
onClick={togglePasswordVisibility}
|
|
36
|
-
edge="end"
|
|
37
|
-
>
|
|
38
|
-
{isPasswordVisible ? (
|
|
39
|
-
<VisibilityOffOutlinedIcon fontSize="small" />
|
|
40
|
-
) : (
|
|
41
|
-
<VisibilityOutlinedIcon fontSize="small" />
|
|
42
|
-
)}
|
|
43
|
-
</IconButton>
|
|
44
|
-
</InputAdornment>
|
|
45
|
-
),
|
|
46
|
-
}}
|
|
47
|
-
{...props}
|
|
48
|
-
/>
|
|
49
|
-
);
|
|
50
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./PasswordField";
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
FormControlLabel,
|
|
3
|
-
InputLabel,
|
|
4
|
-
RadioGroup,
|
|
5
|
-
Stack,
|
|
6
|
-
Box,
|
|
7
|
-
type StackOwnProps,
|
|
8
|
-
type SxProps,
|
|
9
|
-
} from "@mui/material";
|
|
10
|
-
import Radio, { type RadioProps as MuiRadioProps } from "@mui/material/Radio";
|
|
11
|
-
import {
|
|
12
|
-
useController,
|
|
13
|
-
type ControllerRenderProps,
|
|
14
|
-
type FieldValues,
|
|
15
|
-
type UseControllerProps,
|
|
16
|
-
} from "react-hook-form";
|
|
17
|
-
import { Skeleton } from "./Skeleton";
|
|
18
|
-
import type { ReactNode } from "react";
|
|
19
|
-
|
|
20
|
-
type Options = {
|
|
21
|
-
values: boolean | string;
|
|
22
|
-
label?: ReactNode;
|
|
23
|
-
disabled: boolean;
|
|
24
|
-
direction?: StackOwnProps["direction"];
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export type RadioGroupFieldProps<P extends FieldValues> =
|
|
28
|
-
UseControllerProps<P> &
|
|
29
|
-
Omit<Omit<MuiRadioProps, "checked">, keyof ControllerRenderProps<P>> & {
|
|
30
|
-
label?: string;
|
|
31
|
-
options: Options[];
|
|
32
|
-
loading?: boolean;
|
|
33
|
-
direction?: StackOwnProps["direction"];
|
|
34
|
-
sx?: SxProps;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export function RadioGroupField<P extends FieldValues>({
|
|
38
|
-
name,
|
|
39
|
-
rules,
|
|
40
|
-
label,
|
|
41
|
-
control,
|
|
42
|
-
options,
|
|
43
|
-
defaultValue,
|
|
44
|
-
size = "small",
|
|
45
|
-
color = "secondary",
|
|
46
|
-
loading = false,
|
|
47
|
-
direction = "row",
|
|
48
|
-
sx = {},
|
|
49
|
-
...restRadioButtonProps
|
|
50
|
-
}: RadioGroupFieldProps<P>) {
|
|
51
|
-
const {
|
|
52
|
-
field: { value, onChange, ...restField },
|
|
53
|
-
} = useController({ name, control, defaultValue, rules });
|
|
54
|
-
|
|
55
|
-
if (loading) {
|
|
56
|
-
return <Skeleton />;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
return (
|
|
60
|
-
<Stack gap="5px">
|
|
61
|
-
{label && <InputLabel>{label}</InputLabel>}
|
|
62
|
-
|
|
63
|
-
<RadioGroup
|
|
64
|
-
name={name}
|
|
65
|
-
value={value}
|
|
66
|
-
onChange={(_, event) => {
|
|
67
|
-
if (event === "true") {
|
|
68
|
-
onChange(true);
|
|
69
|
-
} else if (event === "false") {
|
|
70
|
-
onChange(false);
|
|
71
|
-
} else {
|
|
72
|
-
onChange(event);
|
|
73
|
-
}
|
|
74
|
-
}}
|
|
75
|
-
>
|
|
76
|
-
<Stack
|
|
77
|
-
gap={direction === "column" ? "5px" : "45px"}
|
|
78
|
-
direction={direction}
|
|
79
|
-
>
|
|
80
|
-
{options?.map(({ label, values, disabled }, index) => {
|
|
81
|
-
return (
|
|
82
|
-
// eslint-disable-next-line sonarjs/no-array-index-key
|
|
83
|
-
<Box key={index} width="max-content">
|
|
84
|
-
<FormControlLabel
|
|
85
|
-
value={values}
|
|
86
|
-
control={
|
|
87
|
-
<Radio
|
|
88
|
-
{...restField}
|
|
89
|
-
{...restRadioButtonProps}
|
|
90
|
-
color={color}
|
|
91
|
-
size={size}
|
|
92
|
-
/>
|
|
93
|
-
}
|
|
94
|
-
disabled={disabled}
|
|
95
|
-
label={label}
|
|
96
|
-
sx={sx}
|
|
97
|
-
/>
|
|
98
|
-
</Box>
|
|
99
|
-
);
|
|
100
|
-
})}
|
|
101
|
-
</Stack>
|
|
102
|
-
</RadioGroup>
|
|
103
|
-
</Stack>
|
|
104
|
-
);
|
|
105
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Skeleton as MuiSkeleton, Stack } from "@mui/material";
|
|
2
|
-
export const Skeleton = () => {
|
|
3
|
-
return (
|
|
4
|
-
<Stack gap="10px">
|
|
5
|
-
<MuiSkeleton height="20px" width="70px" sx={{ transform: "scale(1)" }} />
|
|
6
|
-
<Stack direction="row" alignItems="center" gap="50px">
|
|
7
|
-
<Stack gap="10px" direction="row" alignItems="center">
|
|
8
|
-
<MuiSkeleton variant="circular" height="25px" width="25px" />
|
|
9
|
-
<MuiSkeleton
|
|
10
|
-
height="23px"
|
|
11
|
-
width="38px"
|
|
12
|
-
sx={{ transform: "scale(1)" }}
|
|
13
|
-
/>
|
|
14
|
-
</Stack>
|
|
15
|
-
<Stack gap="10px" direction="row" alignItems="center">
|
|
16
|
-
<MuiSkeleton variant="circular" height="25px" width="25px" />
|
|
17
|
-
<MuiSkeleton
|
|
18
|
-
height="23px"
|
|
19
|
-
width="38px"
|
|
20
|
-
sx={{ transform: "scale(1)" }}
|
|
21
|
-
/>
|
|
22
|
-
</Stack>
|
|
23
|
-
</Stack>
|
|
24
|
-
</Stack>
|
|
25
|
-
);
|
|
26
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./RadioGroupField";
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { InputAdornment } from "@mui/material";
|
|
2
|
-
import type { FieldValues } from "react-hook-form";
|
|
3
|
-
import SearchOutlinedIcon from "@mui/icons-material/SearchOutlined";
|
|
4
|
-
import type { TextFieldProps } from "../TextField";
|
|
5
|
-
import { TextField } from "../TextField";
|
|
6
|
-
|
|
7
|
-
export function SearchField<P extends FieldValues>(props: TextFieldProps<P>) {
|
|
8
|
-
return (
|
|
9
|
-
<TextField
|
|
10
|
-
placeholder="Search"
|
|
11
|
-
InputProps={{
|
|
12
|
-
startAdornment: (
|
|
13
|
-
<InputAdornment position="start">
|
|
14
|
-
<SearchOutlinedIcon fontSize="small" />
|
|
15
|
-
</InputAdornment>
|
|
16
|
-
),
|
|
17
|
-
}}
|
|
18
|
-
{...props}
|
|
19
|
-
/>
|
|
20
|
-
);
|
|
21
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./SearchField";
|