@astral/ui 4.55.4 → 4.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/BottomDrawer/styles.js +1 -1
- package/components/CardGridInfinite/Footer/styles.js +1 -1
- package/components/CheckableTag/styles.js +1 -1
- package/components/Checkbox/styles.js +4 -2
- package/components/Chip/styles.js +1 -1
- package/components/CodeField/styles.js +1 -1
- package/components/ComplianceStatus/styles.js +1 -1
- package/components/ContentState/ContentState.d.ts +1 -1
- package/components/ContentState/ContentState.js +2 -2
- package/components/ContentState/types.d.ts +4 -0
- package/components/DashboardLayout/DashboardWrapper/styles.js +1 -1
- package/components/DashboardLayout/Header/styles.js +4 -4
- package/components/DashboardLayoutSkeleton/styles.js +1 -1
- package/components/DashboardSidebar/styles.js +2 -2
- package/components/DashboardSidebarSkeleton/styles.js +1 -1
- package/components/DataGrid/Body/Body.d.ts +1 -1
- package/components/DataGrid/Body/Body.js +14 -7
- package/components/DataGrid/Body/constants.d.ts +4 -0
- package/components/DataGrid/Body/constants.js +5 -0
- package/components/DataGrid/Body/styles.d.ts +0 -3
- package/components/DataGrid/Body/styles.js +14 -1
- package/components/DataGrid/Body/useLogic/index.d.ts +1 -0
- package/components/DataGrid/Body/useLogic/index.js +1 -0
- package/components/DataGrid/Body/useLogic/useLogic.d.ts +9 -0
- package/components/DataGrid/Body/useLogic/useLogic.js +15 -0
- package/components/DataGrid/Cell/Cell.js +20 -4
- package/components/DataGrid/Cell/constants.d.ts +7 -0
- package/components/DataGrid/Cell/constants.js +8 -0
- package/components/DataGrid/Cell/styles.d.ts +14 -0
- package/components/DataGrid/Cell/styles.js +47 -0
- package/components/DataGrid/Cell/useLogic/useLogic.d.ts +2 -0
- package/components/DataGrid/Cell/useLogic/useLogic.js +3 -2
- package/components/DataGrid/DataGrid.js +42 -8
- package/components/DataGrid/Head/Head.js +1 -1
- package/components/DataGrid/Head/styles.js +5 -1
- package/components/DataGrid/Loader/styles.js +4 -0
- package/components/DataGrid/MobileSkeleton/MobileSkeleton.d.ts +6 -0
- package/components/DataGrid/MobileSkeleton/MobileSkeleton.js +10 -0
- package/components/DataGrid/MobileSkeleton/index.d.ts +1 -0
- package/components/DataGrid/MobileSkeleton/index.js +1 -0
- package/components/DataGrid/MobileSkeleton/styles.d.ts +17 -0
- package/components/DataGrid/MobileSkeleton/styles.js +37 -0
- package/components/DataGrid/PinnedSections/Section/styles.js +2 -2
- package/components/DataGrid/Row/NestedChildren/styles.js +8 -3
- package/components/DataGrid/Row/Row.js +25 -8
- package/components/DataGrid/Row/constants.d.ts +8 -0
- package/components/DataGrid/Row/constants.js +8 -0
- package/components/DataGrid/Row/styles.d.ts +4 -9
- package/components/DataGrid/Row/styles.js +69 -17
- package/components/DataGrid/Row/types.d.ts +5 -1
- package/components/DataGrid/Row/useLogic/hooks/index.d.ts +1 -0
- package/components/DataGrid/Row/useLogic/hooks/index.js +1 -0
- package/components/DataGrid/Row/useLogic/hooks/useMobileLogic.d.ts +5 -0
- package/components/DataGrid/Row/useLogic/hooks/useMobileLogic.js +15 -0
- package/components/DataGrid/Row/useLogic/useLogic.d.ts +868 -3
- package/components/DataGrid/Row/useLogic/useLogic.js +28 -13
- package/components/DataGrid/constants.d.ts +4 -0
- package/components/DataGrid/constants.js +4 -0
- package/components/DataGrid/index.d.ts +1 -0
- package/components/DataGrid/index.js +1 -0
- package/components/DataGrid/styles.d.ts +0 -9
- package/components/DataGrid/styles.js +43 -12
- package/components/DataGrid/types.d.ts +7 -0
- package/components/DataGrid/useLogic/hooks/index.d.ts +1 -1
- package/components/DataGrid/useLogic/hooks/index.js +1 -1
- package/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/index.d.ts +1 -0
- package/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/index.js +1 -0
- package/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/useDataGridMobileLogic.d.ts +16 -0
- package/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/useDataGridMobileLogic.js +32 -0
- package/components/DataGrid/useLogic/hooks/usePinnedColumns/usePinnedColumns.js +11 -3
- package/components/DataGrid/useLogic/useLogic.d.ts +10 -4
- package/components/DataGrid/useLogic/useLogic.js +17 -12
- package/components/DataGrid/useLogic/utils/getIsAllowHorizontalScroll/getIsAllowHorizontalScroll.js +1 -1
- package/components/DataGrid/utils/getDataGridCssVars/getDataGridCssVars.d.ts +2 -0
- package/components/DataGrid/utils/getDataGridCssVars/getDataGridCssVars.js +5 -0
- package/components/DataGrid/utils/getDataGridCssVars/index.d.ts +1 -0
- package/components/DataGrid/utils/getDataGridCssVars/index.js +1 -0
- package/components/DataGrid/utils/index.d.ts +1 -0
- package/components/DataGrid/utils/index.js +1 -0
- package/components/DataGridActionCell/DataGridSecondaryActions/DataGridSecondaryActions.js +1 -1
- package/components/DataGridInfinite/DataGridInfinite.js +5 -4
- package/components/DataGridInfinite/useLogic/useLogic.d.ts +7 -1
- package/components/DataGridInfinite/useLogic/useLogic.js +12 -2
- package/components/DateRangePicker/styles.js +1 -1
- package/components/Description/Name/styles.js +1 -1
- package/components/DescriptionCell/styles.js +12 -3
- package/components/DescriptionList/styles.js +4 -2
- package/components/ExpansionPanel/styles.js +1 -1
- package/components/InfiniteDataList/styles.js +1 -1
- package/components/InfiniteTreeList/TreeItem/styles.js +1 -1
- package/components/MenuOrganization/styles.js +2 -2
- package/components/NewStepper/Step/Description/styles.js +1 -1
- package/components/NewStepper/Step/styles.js +2 -2
- package/components/NewStepper/index.d.ts +1 -0
- package/components/NewStepper/index.js +1 -0
- package/components/NewStepper/public.d.ts +1 -0
- package/components/NewStepper/public.js +1 -0
- package/components/PageAside/styles.js +3 -3
- package/components/PageContent/PageContentHeader/styles.js +2 -2
- package/components/PageContent/styles.js +4 -2
- package/components/PageHeader/HeaderContent/styles.js +1 -1
- package/components/PageHeader/styles.js +2 -2
- package/components/PageLayoutLoader/styles.js +1 -1
- package/components/PageLayoutSection/PageLayoutSection.d.ts +4 -0
- package/components/PageLayoutSection/PageLayoutSection.js +13 -4
- package/components/PageLayoutSection/PageLayoutSectionContainer/styles.js +1 -1
- package/components/PageLayoutSection/constants.d.ts +5 -0
- package/components/PageLayoutSection/constants.js +6 -0
- package/components/PageLayoutSection/styles.d.ts +1 -1
- package/components/PageLayoutSection/styles.js +7 -2
- package/components/PagePinnableAside/styles.js +6 -6
- package/components/PdfViewer/PdfPage/styles.js +2 -2
- package/components/Radio/styles.js +4 -2
- package/components/RadioCard/styles.js +13 -5
- package/components/SideDialogActions/styles.js +1 -1
- package/components/SideDialogHeader/styles.js +1 -1
- package/components/SideDialogTitle/styles.js +1 -1
- package/components/Stepper/styles.js +2 -2
- package/components/Tag/styles.js +1 -1
- package/components/Tree/TreeItem/styles.js +3 -3
- package/components/fileUploading/FileUploaderDropzone/DropzoneWrapper/styles.js +1 -1
- package/components/fileUploading/FileUploaderFile/styles.js +1 -1
- package/components/placeholders/LoadingPlaceholder/LoadingPlaceholder.d.ts +5 -1
- package/components/placeholders/LoadingPlaceholder/LoadingPlaceholder.js +5 -4
- package/components/theme/components/MuiButton.js +1 -1
- package/components/theme/components/MuiDivider.d.ts +3 -0
- package/components/theme/components/MuiDivider.js +9 -0
- package/components/theme/components/MuiListItem.d.ts +3 -0
- package/components/theme/components/MuiListItem.js +9 -0
- package/components/theme/components/MuiOutlinedInput.js +2 -2
- package/components/theme/components/MuiPaper.js +1 -1
- package/components/theme/components/MuiStepConnector.js +4 -1
- package/components/theme/components/components.js +4 -0
- package/components/theme/palette/componentsColors/componentsColors.d.ts +3 -0
- package/components/theme/palette/componentsColors/componentsColors.js +3 -0
- package/node/components/BottomDrawer/styles.js +1 -1
- package/node/components/CardGridInfinite/Footer/styles.js +1 -1
- package/node/components/CheckableTag/styles.js +1 -1
- package/node/components/Checkbox/styles.js +4 -2
- package/node/components/Chip/styles.js +1 -1
- package/node/components/CodeField/styles.js +1 -1
- package/node/components/ComplianceStatus/styles.js +1 -1
- package/node/components/ContentState/ContentState.d.ts +1 -1
- package/node/components/ContentState/ContentState.js +2 -2
- package/node/components/ContentState/types.d.ts +4 -0
- package/node/components/DashboardLayout/DashboardWrapper/styles.js +1 -1
- package/node/components/DashboardLayout/Header/styles.js +4 -4
- package/node/components/DashboardLayoutSkeleton/styles.js +1 -1
- package/node/components/DashboardSidebar/styles.js +2 -2
- package/node/components/DashboardSidebarSkeleton/styles.js +1 -1
- package/node/components/DataGrid/Body/Body.d.ts +1 -1
- package/node/components/DataGrid/Body/Body.js +14 -7
- package/node/components/DataGrid/Body/constants.d.ts +4 -0
- package/node/components/DataGrid/Body/constants.js +8 -0
- package/node/components/DataGrid/Body/styles.d.ts +0 -3
- package/node/components/DataGrid/Body/styles.js +14 -1
- package/node/components/DataGrid/Body/useLogic/index.d.ts +1 -0
- package/node/components/DataGrid/{useLogic/hooks/useClassnames → Body/useLogic}/index.js +1 -1
- package/node/components/DataGrid/Body/useLogic/useLogic.d.ts +9 -0
- package/node/components/DataGrid/Body/useLogic/useLogic.js +19 -0
- package/node/components/DataGrid/Cell/Cell.js +18 -2
- package/node/components/DataGrid/Cell/constants.d.ts +7 -0
- package/node/components/DataGrid/Cell/constants.js +11 -0
- package/node/components/DataGrid/Cell/styles.d.ts +14 -0
- package/node/components/DataGrid/Cell/styles.js +48 -1
- package/node/components/DataGrid/Cell/useLogic/useLogic.d.ts +2 -0
- package/node/components/DataGrid/Cell/useLogic/useLogic.js +3 -2
- package/node/components/DataGrid/DataGrid.js +41 -7
- package/node/components/DataGrid/Head/Head.js +1 -1
- package/node/components/DataGrid/Head/styles.js +5 -1
- package/node/components/DataGrid/Loader/styles.js +4 -0
- package/node/components/DataGrid/MobileSkeleton/MobileSkeleton.d.ts +6 -0
- package/node/components/DataGrid/MobileSkeleton/MobileSkeleton.js +14 -0
- package/node/components/DataGrid/MobileSkeleton/index.d.ts +1 -0
- package/node/components/DataGrid/MobileSkeleton/index.js +17 -0
- package/node/components/DataGrid/MobileSkeleton/styles.d.ts +17 -0
- package/node/components/DataGrid/MobileSkeleton/styles.js +40 -0
- package/node/components/DataGrid/PinnedSections/Section/styles.js +2 -2
- package/node/components/DataGrid/Row/NestedChildren/styles.js +8 -3
- package/node/components/DataGrid/Row/Row.js +23 -6
- package/node/components/DataGrid/Row/constants.d.ts +8 -0
- package/node/components/DataGrid/Row/constants.js +9 -1
- package/node/components/DataGrid/Row/styles.d.ts +4 -9
- package/node/components/DataGrid/Row/styles.js +69 -17
- package/node/components/DataGrid/Row/types.d.ts +5 -1
- package/node/components/DataGrid/Row/useLogic/hooks/index.d.ts +1 -0
- package/node/components/DataGrid/Row/useLogic/hooks/index.js +17 -0
- package/node/components/DataGrid/Row/useLogic/hooks/useMobileLogic.d.ts +5 -0
- package/node/components/DataGrid/Row/useLogic/hooks/useMobileLogic.js +19 -0
- package/node/components/DataGrid/Row/useLogic/useLogic.d.ts +868 -3
- package/node/components/DataGrid/Row/useLogic/useLogic.js +28 -13
- package/node/components/DataGrid/constants.d.ts +4 -0
- package/node/components/DataGrid/constants.js +5 -1
- package/node/components/DataGrid/index.d.ts +1 -0
- package/node/components/DataGrid/index.js +3 -1
- package/node/components/DataGrid/styles.d.ts +0 -9
- package/node/components/DataGrid/styles.js +43 -12
- package/node/components/DataGrid/types.d.ts +7 -0
- package/node/components/DataGrid/useLogic/hooks/index.d.ts +1 -1
- package/node/components/DataGrid/useLogic/hooks/index.js +1 -1
- package/node/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/index.d.ts +1 -0
- package/node/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/index.js +17 -0
- package/node/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/useDataGridMobileLogic.d.ts +16 -0
- package/node/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/useDataGridMobileLogic.js +36 -0
- package/node/components/DataGrid/useLogic/hooks/usePinnedColumns/usePinnedColumns.js +11 -3
- package/node/components/DataGrid/useLogic/useLogic.d.ts +10 -4
- package/node/components/DataGrid/useLogic/useLogic.js +19 -14
- package/node/components/DataGrid/useLogic/utils/getIsAllowHorizontalScroll/getIsAllowHorizontalScroll.js +1 -1
- package/node/components/DataGrid/utils/getDataGridCssVars/getDataGridCssVars.d.ts +2 -0
- package/node/components/DataGrid/utils/getDataGridCssVars/getDataGridCssVars.js +9 -0
- package/node/components/DataGrid/utils/getDataGridCssVars/index.d.ts +1 -0
- package/node/components/DataGrid/utils/getDataGridCssVars/index.js +5 -0
- package/node/components/DataGrid/utils/index.d.ts +1 -0
- package/node/components/DataGrid/utils/index.js +3 -1
- package/node/components/DataGridActionCell/DataGridSecondaryActions/DataGridSecondaryActions.js +1 -1
- package/node/components/DataGridInfinite/DataGridInfinite.js +5 -4
- package/node/components/DataGridInfinite/useLogic/useLogic.d.ts +7 -1
- package/node/components/DataGridInfinite/useLogic/useLogic.js +11 -1
- package/node/components/DateRangePicker/styles.js +1 -1
- package/node/components/Description/Name/styles.js +1 -1
- package/node/components/DescriptionCell/styles.js +15 -6
- package/node/components/DescriptionList/styles.js +4 -2
- package/node/components/ExpansionPanel/styles.js +1 -1
- package/node/components/InfiniteDataList/styles.js +1 -1
- package/node/components/InfiniteTreeList/TreeItem/styles.js +1 -1
- package/node/components/MenuOrganization/styles.js +2 -2
- package/node/components/NewStepper/Step/Description/styles.js +1 -1
- package/node/components/NewStepper/Step/styles.js +2 -2
- package/node/components/NewStepper/index.d.ts +1 -0
- package/node/components/NewStepper/index.js +3 -1
- package/node/components/NewStepper/public.d.ts +1 -0
- package/node/components/NewStepper/public.js +3 -1
- package/node/components/PageAside/styles.js +3 -3
- package/node/components/PageContent/PageContentHeader/styles.js +2 -2
- package/node/components/PageContent/styles.js +4 -2
- package/node/components/PageHeader/HeaderContent/styles.js +1 -1
- package/node/components/PageHeader/styles.js +2 -2
- package/node/components/PageLayoutLoader/styles.js +1 -1
- package/node/components/PageLayoutSection/PageLayoutSection.d.ts +4 -0
- package/node/components/PageLayoutSection/PageLayoutSection.js +12 -3
- package/node/components/PageLayoutSection/PageLayoutSectionContainer/styles.js +1 -1
- package/node/components/PageLayoutSection/constants.d.ts +5 -0
- package/node/components/PageLayoutSection/constants.js +9 -0
- package/node/components/PageLayoutSection/styles.d.ts +1 -1
- package/node/components/PageLayoutSection/styles.js +8 -3
- package/node/components/PagePinnableAside/styles.js +6 -6
- package/node/components/PdfViewer/PdfPage/styles.js +2 -2
- package/node/components/Radio/styles.js +4 -2
- package/node/components/RadioCard/styles.js +13 -5
- package/node/components/SideDialogActions/styles.js +1 -1
- package/node/components/SideDialogHeader/styles.js +1 -1
- package/node/components/SideDialogTitle/styles.js +1 -1
- package/node/components/Stepper/styles.js +2 -2
- package/node/components/Tag/styles.js +1 -1
- package/node/components/Tree/TreeItem/styles.js +3 -3
- package/node/components/fileUploading/FileUploaderDropzone/DropzoneWrapper/styles.js +1 -1
- package/node/components/fileUploading/FileUploaderFile/styles.js +1 -1
- package/node/components/placeholders/LoadingPlaceholder/LoadingPlaceholder.d.ts +5 -1
- package/node/components/placeholders/LoadingPlaceholder/LoadingPlaceholder.js +5 -4
- package/node/components/theme/components/MuiButton.js +1 -1
- package/node/components/theme/components/MuiDivider.d.ts +3 -0
- package/node/components/theme/components/MuiDivider.js +12 -0
- package/node/components/theme/components/MuiListItem.d.ts +3 -0
- package/node/components/theme/components/MuiListItem.js +12 -0
- package/node/components/theme/components/MuiOutlinedInput.js +2 -2
- package/node/components/theme/components/MuiPaper.js +1 -1
- package/node/components/theme/components/MuiStepConnector.js +4 -1
- package/node/components/theme/components/components.js +4 -0
- package/node/components/theme/palette/componentsColors/componentsColors.d.ts +3 -0
- package/node/components/theme/palette/componentsColors/componentsColors.js +3 -0
- package/package.json +20 -1
- package/components/DataGrid/useLogic/hooks/useClassnames/index.d.ts +0 -1
- package/components/DataGrid/useLogic/hooks/useClassnames/index.js +0 -1
- package/components/DataGrid/useLogic/hooks/useClassnames/useClassnames.d.ts +0 -12
- package/components/DataGrid/useLogic/hooks/useClassnames/useClassnames.js +0 -14
- package/node/components/DataGrid/useLogic/hooks/useClassnames/index.d.ts +0 -1
- package/node/components/DataGrid/useLogic/hooks/useClassnames/useClassnames.d.ts +0 -12
- package/node/components/DataGrid/useLogic/hooks/useClassnames/useClassnames.js +0 -18
|
@@ -51,7 +51,7 @@ export const MuiOutlinedInput = {
|
|
|
51
51
|
},
|
|
52
52
|
'&::placeholder': {
|
|
53
53
|
opacity: 1,
|
|
54
|
-
color: theme.palette.grey[
|
|
54
|
+
color: theme.palette.grey[500],
|
|
55
55
|
},
|
|
56
56
|
};
|
|
57
57
|
},
|
|
@@ -64,7 +64,7 @@ export const MuiOutlinedInput = {
|
|
|
64
64
|
notchedOutline({ theme }) {
|
|
65
65
|
return {
|
|
66
66
|
borderWidth: 1,
|
|
67
|
-
borderColor: theme.palette.
|
|
67
|
+
borderColor: theme.palette.components.border.default,
|
|
68
68
|
top: 0,
|
|
69
69
|
transition: theme.transitions.create(['border-color'], {
|
|
70
70
|
easing: theme.transitions.easing.easeInOut,
|
|
@@ -4,7 +4,10 @@ export const MuiStepConnector = {
|
|
|
4
4
|
return { top: theme.microSpacing(5) };
|
|
5
5
|
},
|
|
6
6
|
lineHorizontal({ theme }) {
|
|
7
|
-
return {
|
|
7
|
+
return {
|
|
8
|
+
borderTopWidth: 2,
|
|
9
|
+
borderColor: theme.palette.components.border.default,
|
|
10
|
+
};
|
|
8
11
|
},
|
|
9
12
|
},
|
|
10
13
|
};
|
|
@@ -7,12 +7,14 @@ import { MuiDialog } from './MuiDialog';
|
|
|
7
7
|
import { MuiDialogActions } from './MuiDialogActions';
|
|
8
8
|
import { MuiDialogContent } from './MuiDialogContent';
|
|
9
9
|
import { MuiDialogTitle } from './MuiDialogTitle';
|
|
10
|
+
import { MuiDivider } from './MuiDivider';
|
|
10
11
|
import { MuiDrawer } from './MuiDrawer';
|
|
11
12
|
import { MuiFormControlLabel } from './MuiFormControlLabel';
|
|
12
13
|
import { MuiFormHelperText } from './MuiFormHelperText';
|
|
13
14
|
import { MuiFormLabel } from './MuiFormLabel';
|
|
14
15
|
import { MuiInputLabel } from './MuiInputLabel';
|
|
15
16
|
import { MuiLinearProgress } from './MuiLinearProgress';
|
|
17
|
+
import { MuiListItem } from './MuiListItem';
|
|
16
18
|
import { MuiListItemButton } from './MuiListItemButton';
|
|
17
19
|
import { MuiListItemText } from './MuiListItemText';
|
|
18
20
|
import { MuiListSubheader } from './MuiListSubheader';
|
|
@@ -49,6 +51,7 @@ export const getComponents = () => {
|
|
|
49
51
|
MuiAlert,
|
|
50
52
|
MuiButton,
|
|
51
53
|
MuiButtonBase,
|
|
54
|
+
MuiDivider,
|
|
52
55
|
MuiTypography,
|
|
53
56
|
MuiInputLabel,
|
|
54
57
|
MuiOutlinedInput,
|
|
@@ -72,6 +75,7 @@ export const getComponents = () => {
|
|
|
72
75
|
MuiPaginationItem,
|
|
73
76
|
MuiPaper,
|
|
74
77
|
MuiCircularProgress,
|
|
78
|
+
MuiListItem,
|
|
75
79
|
MuiListItemButton,
|
|
76
80
|
MuiListItemText,
|
|
77
81
|
MuiLinearProgress,
|
|
@@ -33,7 +33,7 @@ exports.Header = styled_1.styled.header `
|
|
|
33
33
|
height: ${({ drawerHeaderHeight }) => `${drawerHeaderHeight}px`};
|
|
34
34
|
padding: ${({ theme }) => theme.spacing(1, 2, 1, 4)};
|
|
35
35
|
|
|
36
|
-
border-bottom: 1px solid ${({ theme }) => theme.palette.
|
|
36
|
+
border-bottom: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
37
37
|
`;
|
|
38
38
|
exports.HeaderTitle = (0, styled_1.styled)(Typography_1.default) `
|
|
39
39
|
margin-right: ${({ theme }) => theme.spacing(2)};
|
|
@@ -12,7 +12,7 @@ exports.Wrapper = styled_1.styled.footer `
|
|
|
12
12
|
max-height: 76px;
|
|
13
13
|
margin-top: ${({ theme }) => theme.spacing(4)};
|
|
14
14
|
|
|
15
|
-
border-top: 1px solid ${({ theme }) => theme.palette.
|
|
15
|
+
border-top: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
16
16
|
`;
|
|
17
17
|
exports.FooterDummy = styled_1.styled.div `
|
|
18
18
|
min-height: 20px;
|
|
@@ -89,7 +89,7 @@ const getBorder = ({ isChecked, variant, color, theme, disabled, tagState = 'def
|
|
|
89
89
|
if (tagState === 'default') {
|
|
90
90
|
`1px solid ${theme.palette.grey[600]}`;
|
|
91
91
|
}
|
|
92
|
-
return `1px solid ${theme.palette.
|
|
92
|
+
return `1px solid ${theme.palette.components.border.default}`;
|
|
93
93
|
};
|
|
94
94
|
exports.Wrapper = styled_1.styled.label `
|
|
95
95
|
width: fit-content;
|
|
@@ -6,7 +6,7 @@ const mixins_1 = require("../styled/mixins");
|
|
|
6
6
|
const constants_1 = require("./constants");
|
|
7
7
|
const getOutlineColor = ({ theme, isHover, isDisabled, isError, isChecked, isIndeterminate, }) => {
|
|
8
8
|
if (isDisabled) {
|
|
9
|
-
return theme.palette.
|
|
9
|
+
return theme.palette.components.border.default;
|
|
10
10
|
}
|
|
11
11
|
if (isError) {
|
|
12
12
|
return isHover ? theme.palette.error[700] : theme.palette.error[800];
|
|
@@ -14,7 +14,9 @@ const getOutlineColor = ({ theme, isHover, isDisabled, isError, isChecked, isInd
|
|
|
14
14
|
if (isChecked || isIndeterminate) {
|
|
15
15
|
return isHover ? theme.palette.primary[700] : theme.palette.primary[800];
|
|
16
16
|
}
|
|
17
|
-
return isHover
|
|
17
|
+
return isHover
|
|
18
|
+
? theme.palette.grey[900]
|
|
19
|
+
: theme.palette.components.border.default;
|
|
18
20
|
};
|
|
19
21
|
exports.Wrapper = (0, styled_1.styled)('span', {
|
|
20
22
|
shouldForwardProp: (prop) => !['$isDisabled', '$isError', '$isChecked', '$isIndeterminate'].includes(prop),
|
|
@@ -17,7 +17,7 @@ exports.Wrapper = styled_1.styled.div `
|
|
|
17
17
|
padding: ${({ theme }) => theme.spacing(0, 2)};
|
|
18
18
|
|
|
19
19
|
background-color: ${({ theme }) => theme.palette.background.default};
|
|
20
|
-
border: 1px solid ${({ theme }) => theme.palette.
|
|
20
|
+
border: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
21
21
|
border-radius: ${({ theme }) => theme.shape.medium};
|
|
22
22
|
|
|
23
23
|
transition: ${({ theme }) => theme.transitions.create(['border-color', 'background-color'], {
|
|
@@ -10,7 +10,7 @@ const getBorder = (theme, isDisabled, isError) => {
|
|
|
10
10
|
}
|
|
11
11
|
return isError
|
|
12
12
|
? `1px solid ${theme.palette.error[800]}`
|
|
13
|
-
: `1px solid ${theme.palette.
|
|
13
|
+
: `1px solid ${theme.palette.components.border.default};`;
|
|
14
14
|
};
|
|
15
15
|
exports.Wrapper = styled_1.styled.div `
|
|
16
16
|
display: flex;
|
|
@@ -40,7 +40,7 @@ exports.Wrapper = styled_1.styled.article `
|
|
|
40
40
|
&.${constants_1.complianceStatusClassnames.outlined} {
|
|
41
41
|
padding: ${({ theme }) => theme.spacing(3)};
|
|
42
42
|
|
|
43
|
-
border: 1px solid ${({ theme }) => theme.palette.
|
|
43
|
+
border: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
44
44
|
}
|
|
45
45
|
`;
|
|
46
46
|
exports.Inner = (0, styled_1.styled)('ul') `
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ContentStateProps } from './types';
|
|
2
|
-
export declare const ContentState: ({ isLoading, isError, isCustom, errorState, customState, children, loadingContent, loadingTitle, placeholderSize, isSmoothLoading, }: ContentStateProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const ContentState: ({ isLoading, isError, isCustom, errorState, customState, children, loadingContent, loadingTitle, placeholderSize, isSmoothLoading, loadingPlaceholderClassname, }: ContentStateProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -8,13 +8,13 @@ const LoadingPlaceholder_1 = require("../placeholders/LoadingPlaceholder");
|
|
|
8
8
|
const Placeholder_1 = require("../placeholders/Placeholder");
|
|
9
9
|
const Typography_1 = require("../Typography");
|
|
10
10
|
const useLogic_1 = require("./useLogic");
|
|
11
|
-
const ContentState = ({ isLoading, isError, isCustom, errorState, customState, children, loadingContent, loadingTitle, placeholderSize, isSmoothLoading, }) => {
|
|
11
|
+
const ContentState = ({ isLoading, isError, isCustom, errorState, customState, children, loadingContent, loadingTitle, placeholderSize, isSmoothLoading, loadingPlaceholderClassname, }) => {
|
|
12
12
|
const { imagesMap, isLoadingPhase, isShowLoader } = (0, useLogic_1.useLogic)({
|
|
13
13
|
isLoading,
|
|
14
14
|
isSmoothLoading,
|
|
15
15
|
});
|
|
16
16
|
if (isLoadingPhase) {
|
|
17
|
-
return ((0, jsx_runtime_1.jsx)(LoadingPlaceholder_1.LoadingPlaceholder, { content: loadingContent, title: loadingTitle, isShowLoader: isShowLoader }));
|
|
17
|
+
return ((0, jsx_runtime_1.jsx)(LoadingPlaceholder_1.LoadingPlaceholder, { content: loadingContent, title: loadingTitle, isShowLoader: isShowLoader, className: loadingPlaceholderClassname }));
|
|
18
18
|
}
|
|
19
19
|
if (isCustom && customState) {
|
|
20
20
|
return (0, jsx_runtime_1.jsx)(Placeholder_1.Placeholder, { ...customState });
|
|
@@ -22,7 +22,7 @@ exports.DecorativeHeaderBackground = styled_1.styled.div `
|
|
|
22
22
|
height: ${({ $isFocusedMode }) => ($isFocusedMode ? 0 : constants_1.HEADER_HEIGHT_DESKTOP)};
|
|
23
23
|
|
|
24
24
|
background-color: ${({ theme }) => theme.palette.background.default};
|
|
25
|
-
border-bottom: 1px solid ${({ theme }) => theme.palette.
|
|
25
|
+
border-bottom: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
26
26
|
|
|
27
27
|
transition: ${({ theme }) => {
|
|
28
28
|
return theme.transitions.create(['height'], {
|
|
@@ -45,7 +45,7 @@ exports.HeaderRoot = (0, styled_1.styled)('header', {
|
|
|
45
45
|
padding: ${({ theme }) => theme.spacing(0, 2, 0, 1)};
|
|
46
46
|
|
|
47
47
|
background-color: ${({ theme }) => theme.palette.background.default};
|
|
48
|
-
border-bottom: 1px solid ${({ theme }) => theme.palette.
|
|
48
|
+
border-bottom: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
49
49
|
|
|
50
50
|
transition: unset;
|
|
51
51
|
}
|
|
@@ -160,14 +160,14 @@ exports.PriorityFeatureWrapper = styled_1.styled.div `
|
|
|
160
160
|
height: ${constants_3.MOBILE_BUTTON_HEIGHT};
|
|
161
161
|
padding: ${({ theme }) => theme.spacing(3, 4)};
|
|
162
162
|
|
|
163
|
-
border-bottom: 1px solid ${({ theme }) => theme.palette.
|
|
163
|
+
border-bottom: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
164
164
|
|
|
165
165
|
&:hover {
|
|
166
|
-
border-bottom: 1px solid ${({ theme }) => theme.palette.
|
|
166
|
+
border-bottom: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
&:active {
|
|
170
|
-
border-bottom: 1px solid ${({ theme }) => theme.palette.
|
|
170
|
+
border-bottom: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
|
|
@@ -9,7 +9,7 @@ exports.Content = styled_1.styled.div `
|
|
|
9
9
|
min-height: 0;
|
|
10
10
|
|
|
11
11
|
background-color: ${({ theme }) => theme.palette.common.white};
|
|
12
|
-
border: 1px solid ${({ theme }) => theme.palette.
|
|
12
|
+
border: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
13
13
|
border-radius: ${({ theme }) => theme.shape.medium};
|
|
14
14
|
|
|
15
15
|
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
@@ -88,7 +88,7 @@ exports.SidebarHeader = styled_1.styled.header `
|
|
|
88
88
|
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
89
89
|
padding: ${({ theme }) => theme.spacing(4)};
|
|
90
90
|
|
|
91
|
-
border-bottom: 1px solid ${({ theme }) => theme.palette.
|
|
91
|
+
border-bottom: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
92
92
|
|
|
93
93
|
/* Причина игнора: Не критично для отображения */
|
|
94
94
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
@@ -151,7 +151,7 @@ exports.Footer = styled_1.styled.footer `
|
|
|
151
151
|
margin-top: auto;
|
|
152
152
|
|
|
153
153
|
background-color: ${({ theme }) => theme.palette.background.default};
|
|
154
|
-
border-top: 1px solid ${({ theme }) => theme.palette.
|
|
154
|
+
border-top: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
155
155
|
border-bottom-right-radius: ${({ theme }) => theme.shape.medium};
|
|
156
156
|
border-bottom-left-radius: ${({ theme }) => theme.shape.medium};
|
|
157
157
|
|
|
@@ -15,7 +15,7 @@ exports.Wrapper = (0, styled_1.styled)('div', {
|
|
|
15
15
|
padding: ${({ theme, $isPinned }) => $isPinned ? theme.spacing(4, 3) : theme.spacing(4, 2)};
|
|
16
16
|
|
|
17
17
|
background-color: ${({ theme }) => theme.palette.background.default};
|
|
18
|
-
border: 1px solid ${({ theme }) => theme.palette.
|
|
18
|
+
border: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
19
19
|
border-radius: ${({ theme }) => theme.shape.medium};
|
|
20
20
|
|
|
21
21
|
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { BodyProps } from './types';
|
|
2
|
-
export declare const Body: <TData extends Record<string, unknown>>(
|
|
2
|
+
export declare const Body: <TData extends Record<string, unknown>>({ rows, selectedRows, minDisplayRows, keyId, noDataPlaceholder, className, ...rowProps }: BodyProps<TData>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,21 +2,28 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Body = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const classNames_1 = require("../../utils/classNames");
|
|
6
|
+
const cva_1 = require("../../utils/cva");
|
|
7
7
|
const Row_1 = require("../Row");
|
|
8
8
|
const RowContext_1 = require("../Row/RowContext");
|
|
9
|
+
const constants_1 = require("./constants");
|
|
9
10
|
const styles_1 = require("./styles");
|
|
11
|
+
const useLogic_1 = require("./useLogic");
|
|
10
12
|
const INITIAL_LEVEL = 0;
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
const bodyCva = (0, cva_1.cva)(constants_1.bodyClassnames.root, {
|
|
14
|
+
variants: {
|
|
15
|
+
disableMinHeight: {
|
|
16
|
+
true: constants_1.bodyClassnames.disableMinHeight,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
const Body = ({ rows, selectedRows = [], minDisplayRows, keyId, noDataPlaceholder, className, ...rowProps }) => {
|
|
21
|
+
const { disableMinHeight, bodyCssVars } = (0, useLogic_1.useLogic)({ minDisplayRows });
|
|
15
22
|
const renderedRows = rows.map(({ children, options, ...row }) => {
|
|
16
23
|
const rowId = row[keyId];
|
|
17
24
|
const isSelected = Boolean(selectedRows?.find((selectedRow) => selectedRow[keyId] === rowId));
|
|
18
25
|
return ((0, jsx_runtime_1.jsx)(RowContext_1.RowContextProvider, { children: (0, jsx_runtime_1.jsx)(Row_1.Row, { row: row, selectedRows: selectedRows, options: options, keyId: keyId, level: INITIAL_LEVEL, nestedChildren: children, isSelected: isSelected, ...rowProps }, rowId) }, rowId));
|
|
19
26
|
});
|
|
20
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.Wrapper, { className: className,
|
|
27
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.Wrapper, { className: (0, classNames_1.classNames)(className, bodyCva({ disableMinHeight })), style: bodyCssVars, children: rows.length ? renderedRows : noDataPlaceholder }));
|
|
21
28
|
};
|
|
22
29
|
exports.Body = Body;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bodyClassnames = void 0;
|
|
4
|
+
const createUIKitClassname_1 = require("../../utils/createUIKitClassname");
|
|
5
|
+
exports.bodyClassnames = {
|
|
6
|
+
root: (0, createUIKitClassname_1.createUIKitClassname)('data-grid__body'),
|
|
7
|
+
disableMinHeight: (0, createUIKitClassname_1.createUIKitClassname)('data-grid__body_disable-min-height'),
|
|
8
|
+
};
|
|
@@ -2,7 +2,4 @@
|
|
|
2
2
|
export declare const Wrapper: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
3
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
4
|
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
5
|
-
} & {
|
|
6
|
-
$minDisplayRows: number;
|
|
7
|
-
$disableMinHeight?: boolean | undefined;
|
|
8
5
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, {}>;
|
|
@@ -3,20 +3,33 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Wrapper = void 0;
|
|
4
4
|
const styled_1 = require("../../styled");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
|
+
const constants_2 = require("./constants");
|
|
6
7
|
exports.Wrapper = styled_1.styled.ul `
|
|
8
|
+
--min-display-rows: 0;
|
|
9
|
+
|
|
7
10
|
overflow-y: auto;
|
|
8
11
|
|
|
9
12
|
width: fit-content;
|
|
10
13
|
min-width: 100%;
|
|
11
14
|
height: 100%;
|
|
12
|
-
min-height:
|
|
15
|
+
min-height: calc(var(--min-display-rows) * ${constants_1.MIN_ROW_HEIGHT}px);
|
|
13
16
|
margin: 0;
|
|
14
17
|
padding: 0;
|
|
15
18
|
|
|
16
19
|
list-style-type: none;
|
|
17
20
|
|
|
21
|
+
&.${constants_2.bodyClassnames.disableMinHeight} {
|
|
22
|
+
min-height: unset;
|
|
23
|
+
}
|
|
24
|
+
|
|
18
25
|
&.${constants_1.dataGridClassnames.bodyEmpty} {
|
|
19
26
|
display: flex;
|
|
20
27
|
align-items: center;
|
|
21
28
|
}
|
|
29
|
+
|
|
30
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
31
|
+
overflow: initial;
|
|
32
|
+
|
|
33
|
+
width: 100%;
|
|
34
|
+
}
|
|
22
35
|
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useLogic';
|
|
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./useLogic"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type CSSProperties } from 'react';
|
|
2
|
+
import { type CellValue } from '../../types';
|
|
3
|
+
import type { BodyProps } from '../types';
|
|
4
|
+
type UseLogicParams<TData extends Record<string, CellValue>> = Pick<BodyProps<TData>, 'minDisplayRows'>;
|
|
5
|
+
export declare const useLogic: <TData extends Record<string, unknown>>({ minDisplayRows, }: UseLogicParams<TData>) => {
|
|
6
|
+
disableMinHeight: boolean | undefined;
|
|
7
|
+
bodyCssVars: CSSProperties;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useLogic = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const ConfigProvider_1 = require("../../../ConfigProvider");
|
|
6
|
+
const useLogic = ({ minDisplayRows, }) => {
|
|
7
|
+
const { components } = (0, react_1.useContext)(ConfigProvider_1.ConfigContext);
|
|
8
|
+
const disableMinHeight = components?.dataGrid?.defaultProps?.disableMinHeight;
|
|
9
|
+
const bodyCssVars = !disableMinHeight && minDisplayRows
|
|
10
|
+
? {
|
|
11
|
+
'--min-display-rows': minDisplayRows,
|
|
12
|
+
}
|
|
13
|
+
: {};
|
|
14
|
+
return {
|
|
15
|
+
disableMinHeight,
|
|
16
|
+
bodyCssVars,
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
exports.useLogic = useLogic;
|
|
@@ -5,16 +5,32 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const OverflowTypography_1 = require("../../OverflowTypography");
|
|
6
6
|
const personalDataSecurity_1 = require("../../personalDataSecurity");
|
|
7
7
|
const classNames_1 = require("../../utils/classNames");
|
|
8
|
+
const cva_1 = require("../../utils/cva");
|
|
8
9
|
const getInertProps_1 = require("../../utils/getInertProps");
|
|
10
|
+
const constants_1 = require("./constants");
|
|
9
11
|
const styles_1 = require("./styles");
|
|
10
12
|
const useLogic_1 = require("./useLogic");
|
|
13
|
+
const cellCva = (0, cva_1.cva)(constants_1.dataGridCellClassnames.root, {
|
|
14
|
+
variants: {
|
|
15
|
+
isHideOnMobile: {
|
|
16
|
+
true: constants_1.dataGridCellClassnames.isHideOnMobile,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
const cellContentCva = (0, cva_1.cva)(constants_1.dataGridCellClassnames.cellContent, {
|
|
21
|
+
variants: {
|
|
22
|
+
isActionColumn: {
|
|
23
|
+
true: constants_1.dataGridCellClassnames.actionColumn,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
});
|
|
11
27
|
const Cell = (props) => {
|
|
12
|
-
const { formattedValue, hasStartAdornment } = (0, useLogic_1.useLogic)(props);
|
|
28
|
+
const { formattedValue, hasStartAdornment, isActionColumn, label } = (0, useLogic_1.useLogic)(props);
|
|
13
29
|
const { className, startAdornment, row, cell, isDisabled, isHidePersonalData, } = props;
|
|
14
30
|
const { renderCell, align = 'left' } = cell;
|
|
15
31
|
const hidePersonalDataClassname = (0, personalDataSecurity_1.useHidePersonalData)({
|
|
16
32
|
isEnabled: isHidePersonalData === true,
|
|
17
33
|
});
|
|
18
|
-
return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { "$isDisabled": isDisabled, "$align": align, "$hasStartAdornment": hasStartAdornment, className: (0, classNames_1.classNames)(className, hidePersonalDataClassname), ...(0, getInertProps_1.getInertProps)(isDisabled), children: [startAdornment && startAdornment, renderCell?.(row), !renderCell && ((0, jsx_runtime_1.jsx)(OverflowTypography_1.OverflowTypography, { rowsCount: 2, tooltipProps: { className: hidePersonalDataClassname }, children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: formattedValue }) }))] }));
|
|
34
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { "$isDisabled": isDisabled, "$align": align, "$hasStartAdornment": hasStartAdornment, className: (0, classNames_1.classNames)(className, hidePersonalDataClassname, cellCva({ isHideOnMobile: cell.isHideOnMobile })), ...(0, getInertProps_1.getInertProps)(isDisabled), children: [startAdornment && startAdornment, (0, jsx_runtime_1.jsxs)(styles_1.CellContent, { className: cellContentCva({ isActionColumn }), children: [(0, jsx_runtime_1.jsx)(styles_1.ColumnLabel, { variant: "caption", color: "textSecondary", className: constants_1.dataGridCellClassnames.columnLabel, children: label }), renderCell?.(row), !renderCell && ((0, jsx_runtime_1.jsx)(OverflowTypography_1.OverflowTypography, { rowsCount: 2, tooltipProps: { className: hidePersonalDataClassname }, children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: formattedValue }) }))] })] }));
|
|
19
35
|
};
|
|
20
36
|
exports.Cell = Cell;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dataGridCellClassnames = void 0;
|
|
4
|
+
const createUIKitClassname_1 = require("../../utils/createUIKitClassname");
|
|
5
|
+
exports.dataGridCellClassnames = {
|
|
6
|
+
root: (0, createUIKitClassname_1.createUIKitClassname)('data-grid__cell'),
|
|
7
|
+
isHideOnMobile: (0, createUIKitClassname_1.createUIKitClassname)('data-grid__cell_hide-on-mobile'),
|
|
8
|
+
columnLabel: (0, createUIKitClassname_1.createUIKitClassname)('data-grid__cell-column-label'),
|
|
9
|
+
actionColumn: (0, createUIKitClassname_1.createUIKitClassname)('data-grid__cell_action-column'),
|
|
10
|
+
cellContent: (0, createUIKitClassname_1.createUIKitClassname)('data-grid__cell-content'),
|
|
11
|
+
};
|
|
@@ -9,4 +9,18 @@ export declare const Wrapper: import("@emotion/styled/dist/declarations/src/type
|
|
|
9
9
|
theme?: import("@emotion/react").Theme | undefined;
|
|
10
10
|
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
11
11
|
} & HeadCellProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
12
|
+
export declare const ColumnLabel: import("@emotion/styled/dist/declarations/src/types").StyledComponent<import("../../Typography/types").TypographyPropsBase & {
|
|
13
|
+
color?: import("../../Typography").TypographyColor | undefined;
|
|
14
|
+
variant?: import("../../Typography").TypographyVariant | undefined;
|
|
15
|
+
colorIntensity?: import("../../Typography").Intensity | undefined;
|
|
16
|
+
component?: import("../../Typography/types").ComponentProp | undefined;
|
|
17
|
+
isUpperCase?: boolean | undefined;
|
|
18
|
+
withoutCalt?: boolean | undefined;
|
|
19
|
+
} & import("react").HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLSpanElement> & {
|
|
20
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
21
|
+
}, {}, {}>;
|
|
22
|
+
export declare const CellContent: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
23
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
24
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
25
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
12
26
|
export {};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Wrapper = void 0;
|
|
3
|
+
exports.CellContent = exports.ColumnLabel = exports.Wrapper = void 0;
|
|
4
4
|
const styled_1 = require("../../styled");
|
|
5
|
+
const Typography_1 = require("../../Typography");
|
|
5
6
|
const constants_1 = require("../constants");
|
|
7
|
+
const constants_2 = require("../Row/constants");
|
|
6
8
|
const utils_1 = require("../utils");
|
|
9
|
+
const constants_3 = require("./constants");
|
|
7
10
|
exports.Wrapper = (0, styled_1.styled)('div', {
|
|
8
11
|
shouldForwardProp: (prop) => !['$align', '$isDisabled', '$hasStartAdornment'].includes(prop),
|
|
9
12
|
}) `
|
|
@@ -16,4 +19,48 @@ exports.Wrapper = (0, styled_1.styled)('div', {
|
|
|
16
19
|
padding: ${({ theme, $hasStartAdornment }) => $hasStartAdornment ? theme.spacing(1, 2, 1, 0) : theme.spacing(1, 2)};
|
|
17
20
|
|
|
18
21
|
opacity: ${({ $isDisabled }) => ($isDisabled ? 0.5 : 1)};
|
|
22
|
+
|
|
23
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
24
|
+
justify-content: space-between;
|
|
25
|
+
|
|
26
|
+
min-height: unset;
|
|
27
|
+
padding: 0;
|
|
28
|
+
|
|
29
|
+
&.${constants_3.dataGridCellClassnames.isHideOnMobile} {
|
|
30
|
+
display: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
& .${constants_2.dataGridRowClassnames.checkbox} {
|
|
35
|
+
align-self: flex-start;
|
|
36
|
+
order: 1;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
`;
|
|
40
|
+
exports.ColumnLabel = (0, styled_1.styled)(Typography_1.Typography) `
|
|
41
|
+
display: none;
|
|
42
|
+
|
|
43
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
44
|
+
display: block;
|
|
45
|
+
}
|
|
46
|
+
`;
|
|
47
|
+
exports.CellContent = styled_1.styled.div `
|
|
48
|
+
min-width: 0;
|
|
49
|
+
|
|
50
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
gap: ${({ theme }) => theme.spacing(1)};
|
|
54
|
+
align-items: flex-start;
|
|
55
|
+
|
|
56
|
+
width: 100%;
|
|
57
|
+
|
|
58
|
+
&.${constants_3.dataGridCellClassnames.actionColumn} {
|
|
59
|
+
align-items: flex-end;
|
|
60
|
+
|
|
61
|
+
& .${constants_3.dataGridCellClassnames.columnLabel} {
|
|
62
|
+
display: none;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
19
66
|
`;
|
|
@@ -4,5 +4,7 @@ type UseLogicParams<TData extends Record<string, CellValue>> = CellProps<TData>;
|
|
|
4
4
|
export declare const useLogic: <TData extends Record<string, unknown>>({ row, cell, emptyCellValue, startAdornment, }: UseLogicParams<TData>) => {
|
|
5
5
|
formattedValue: unknown;
|
|
6
6
|
hasStartAdornment: boolean;
|
|
7
|
+
isActionColumn: boolean;
|
|
8
|
+
label: string | undefined;
|
|
7
9
|
};
|
|
8
10
|
export {};
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.useLogic = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const useLogic = ({ row, cell, emptyCellValue, startAdornment, }) => {
|
|
6
|
-
const { format, field } = cell;
|
|
6
|
+
const { format, field, label } = cell;
|
|
7
7
|
const isValidValue = (value) => {
|
|
8
8
|
return Boolean(value) || value === 0;
|
|
9
9
|
};
|
|
@@ -17,6 +17,7 @@ const useLogic = ({ row, cell, emptyCellValue, startAdornment, }) => {
|
|
|
17
17
|
return emptyCellValue;
|
|
18
18
|
}, [field, format, row, emptyCellValue]);
|
|
19
19
|
const hasStartAdornment = Boolean(startAdornment);
|
|
20
|
-
|
|
20
|
+
const isActionColumn = cell.field === 'actions';
|
|
21
|
+
return { formattedValue, hasStartAdornment, isActionColumn, label };
|
|
21
22
|
};
|
|
22
23
|
exports.useLogic = useLogic;
|