@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
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Root: import("../../styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
+
export declare const RowWrapper: import("../../styled").StyledComponent<{
|
|
7
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
9
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
|
+
export declare const Cell: import("../../styled").StyledComponent<{
|
|
11
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
13
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
14
|
+
export declare const Actions: import("../../styled").StyledComponent<{
|
|
15
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
16
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
17
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { styled } from '../../styled';
|
|
2
|
+
export const Root = styled.div `
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
|
|
6
|
+
width: 100%;
|
|
7
|
+
`;
|
|
8
|
+
export const RowWrapper = styled.div `
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
gap: ${({ theme }) => theme.spacing(3)};
|
|
12
|
+
|
|
13
|
+
padding-top: ${({ theme }) => theme.spacing(1)};
|
|
14
|
+
padding-bottom: ${({ theme }) => theme.spacing(5)};
|
|
15
|
+
|
|
16
|
+
&:not(:last-of-type) {
|
|
17
|
+
border-bottom: 1px solid ${({ theme }) => theme.palette.grey[300]};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&:not(:first-of-type) {
|
|
21
|
+
padding-top: ${({ theme }) => theme.spacing(5)};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&:last-of-type {
|
|
25
|
+
padding-bottom: 0;
|
|
26
|
+
}
|
|
27
|
+
`;
|
|
28
|
+
export const Cell = styled.div `
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
gap: ${({ theme }) => theme.spacing(1)};
|
|
32
|
+
|
|
33
|
+
width: 100%;
|
|
34
|
+
`;
|
|
35
|
+
export const Actions = styled.div `
|
|
36
|
+
padding-top: ${({ theme }) => theme.spacing(2)};
|
|
37
|
+
`;
|
|
@@ -40,7 +40,7 @@ export const DataGridSection = styled.div `
|
|
|
40
40
|
|
|
41
41
|
height: 100%;
|
|
42
42
|
|
|
43
|
-
border-right: 1px solid ${({ theme }) => theme.palette.
|
|
43
|
+
border-right: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
& .${dataGridClassnames.header} {
|
|
@@ -79,7 +79,7 @@ export const DataGridSection = styled.div `
|
|
|
79
79
|
|
|
80
80
|
height: 100%;
|
|
81
81
|
|
|
82
|
-
border-left: 1px solid ${({ theme }) => theme.palette.
|
|
82
|
+
border-left: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
& .${dataGridClassnames.header} {
|
|
@@ -24,7 +24,12 @@ export const NestedRows = styled('ul', {
|
|
|
24
24
|
width: 0;
|
|
25
25
|
height: 100%;
|
|
26
26
|
|
|
27
|
-
border-left: 1px solid ${({ theme }) => theme.palette.
|
|
27
|
+
border-left: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* TODO: Убрать после реализации задачи по адаптации вложенных строк https://track.astral.ru/soft/browse/UIKIT-2188 */
|
|
31
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
32
|
+
display: none;
|
|
28
33
|
}
|
|
29
34
|
`;
|
|
30
35
|
export const MoreButtonRow = styled('li', {
|
|
@@ -50,8 +55,8 @@ export const MoreButtonRow = styled('li', {
|
|
|
50
55
|
width: ${TREE_LINE_WIDTH}px;
|
|
51
56
|
height: 50%;
|
|
52
57
|
|
|
53
|
-
border-bottom: 1px solid ${({ theme }) => theme.palette.
|
|
54
|
-
border-left: 1px solid ${({ theme }) => theme.palette.
|
|
58
|
+
border-bottom: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
59
|
+
border-left: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
55
60
|
border-radius: 0 0 0 ${({ theme }) => theme.shape.small};
|
|
56
61
|
}
|
|
57
62
|
`;
|
|
@@ -1,17 +1,34 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { memo, useCallback } from 'react';
|
|
3
|
+
import { BottomDrawer } from '../../BottomDrawer';
|
|
3
4
|
import { Checkbox } from '../../Checkbox';
|
|
4
5
|
import { Tooltip } from '../../Tooltip';
|
|
5
6
|
import { checkIsDeepEqual } from '../../utils/checkIsDeepEqual';
|
|
7
|
+
import { classNames } from '../../utils/classNames';
|
|
8
|
+
import { cva } from '../../utils/cva';
|
|
6
9
|
import { getInertProps } from '../../utils/getInertProps';
|
|
7
|
-
import { DISABLE_ROW_ATTR } from './constants';
|
|
10
|
+
import { DISABLE_ROW_ATTR, dataGridRowClassnames, dataGridRowContentClassnames, } from './constants';
|
|
8
11
|
import { NestedChildren } from './NestedChildren';
|
|
9
|
-
import { CellStyled, CheckboxCell, ChevronIcon, CollapseButton, CollapseCell, ContentWrapper, Wrapper, } from './styles';
|
|
12
|
+
import { BottomDrawerContent, CellStyled, CheckboxCell, ChevronIcon, CollapseButton, CollapseCell, ContentWrapper, Wrapper, } from './styles';
|
|
10
13
|
import { useLogic } from './useLogic';
|
|
11
14
|
import { checkIsDisabled } from './utils';
|
|
15
|
+
const rootCva = cva(dataGridRowClassnames.root, {
|
|
16
|
+
variants: {
|
|
17
|
+
isShowConnector: {
|
|
18
|
+
true: dataGridRowClassnames.showConnector,
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
const rowContentCva = cva(dataGridRowContentClassnames.root, {
|
|
23
|
+
variants: {
|
|
24
|
+
isHovered: {
|
|
25
|
+
true: dataGridRowContentClassnames.hovered,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
});
|
|
12
29
|
const RowComponent = (props) => {
|
|
13
|
-
const { isOpen, isShowConnector, childrenColumns, rowId, handleToggle, checkboxProps, rowProps, tooltipProps, nestedChildrenProps, disabled, isRenderCollapseButton, rowRef, } = useLogic(props);
|
|
14
|
-
const { className, row, options, variant, isSelectable, gridColumns, isInitialExpanded, expandedLevel, level, nestedChildren, initialVisibleChildrenCount, moreButtonColumnPosition, isVisibleCollapseButton, columns, emptyCellValue, selectedRows, activeRowId, keyId, onSelectRow, onRowClick, sectionOffset, totalColumnsCount, registerRowElement, unregisterRowElement, onRowEnter, onRowLeave,
|
|
30
|
+
const { isOpen, isShowConnector, childrenColumns, rowId, handleToggle, checkboxProps, rowProps, isHovered, tooltipProps, nestedChildrenProps, disabled, isRenderCollapseButton, rowRef, rowStyles, drawerProps, disabledReasonText, } = useLogic(props);
|
|
31
|
+
const { className, row, options, variant, isSelectable, gridColumns, isInitialExpanded, expandedLevel, level, nestedChildren, initialVisibleChildrenCount, moreButtonColumnPosition, isVisibleCollapseButton, columns, emptyCellValue, selectedRows, activeRowId, keyId, onSelectRow, onRowClick, sectionOffset, totalColumnsCount, registerRowElement, unregisterRowElement, onRowEnter, onRowLeave, style,
|
|
15
32
|
// В этот rest-оператор попадают специфичные пропсы (атрибуты) virtuoso
|
|
16
33
|
// Необходимы для DataGridInfinite
|
|
17
34
|
...selfProps } = props;
|
|
@@ -20,7 +37,7 @@ const RowComponent = (props) => {
|
|
|
20
37
|
if (!isRenderCollapseButton && (!isSelectable || isNotSelectable)) {
|
|
21
38
|
return null;
|
|
22
39
|
}
|
|
23
|
-
return (_jsxs(_Fragment, { children: [isRenderCollapseButton && (_jsx(CollapseCell, { children: _jsx(CollapseButton, { variant: "text", onClick: handleToggle, children: _jsx(ChevronIcon, { "$isActive": isOpen }) }) })), isSelectable && !isNotSelectable && (_jsx(CheckboxCell, { ...getInertProps(disabled), onClick: (event) => event.stopPropagation(), children: _jsx(Checkbox, { ...checkboxProps }) }))] }));
|
|
40
|
+
return (_jsxs(_Fragment, { children: [isRenderCollapseButton && (_jsx(CollapseCell, { children: _jsx(CollapseButton, { variant: "text", onClick: handleToggle, children: _jsx(ChevronIcon, { "$isActive": isOpen }) }) })), isSelectable && !isNotSelectable && (_jsx(CheckboxCell, { ...getInertProps(disabled), onClick: (event) => event.stopPropagation(), className: dataGridRowClassnames.checkbox, children: _jsx(Checkbox, { ...checkboxProps }) }))] }));
|
|
24
41
|
};
|
|
25
42
|
const renderCells = useCallback(() => {
|
|
26
43
|
const lastCellGlobalIndex = (totalColumnsCount ?? columns.length) - 1;
|
|
@@ -32,7 +49,7 @@ const RowComponent = (props) => {
|
|
|
32
49
|
const globalIndex = (sectionOffset ?? 0) + index;
|
|
33
50
|
const isDisabledCell = checkIsDisabled(disabled, availableCellsByIndex, globalIndex);
|
|
34
51
|
const isFirstCell = globalIndex === 0;
|
|
35
|
-
return (_jsx(CellStyled, {
|
|
52
|
+
return (_jsx(CellStyled, { row: row, cell: cell, emptyCellValue: emptyCellValue, startAdornment: isFirstCell && renderStartAdornment(), isDisabled: isDisabledCell, isHidePersonalData: cell.isHidePersonalData }, cellId));
|
|
36
53
|
});
|
|
37
54
|
}, [
|
|
38
55
|
isOpen,
|
|
@@ -63,10 +80,10 @@ const RowComponent = (props) => {
|
|
|
63
80
|
onRowEnter,
|
|
64
81
|
onRowLeave,
|
|
65
82
|
]);
|
|
66
|
-
return (_jsxs(Wrapper, {
|
|
83
|
+
return (_jsxs(Wrapper, { className: classNames(className, rootCva({ isShowConnector })), style: rowStyles, ...selfProps, children: [_jsx(Tooltip, { followCursor: true, arrow: false, ...tooltipProps, children: _jsx(ContentWrapper, { "data-row-id": rowId, ref: rowRef, onPointerEnter: () => onRowEnter?.(rowId), onPointerLeave: (event) => onRowLeave?.(rowId, event.nativeEvent), className: rowContentCva({ isHovered }), "$gridColumns": gridColumns, [DISABLE_ROW_ATTR]: disabled, ...rowProps, children: renderCells() }) }), _jsx(NestedChildren, { ...nestedChildrenProps, data: nestedChildren, keyId: keyId, level: level, variant: variant, gridColumns: gridColumns, initialVisibleChildrenCount: initialVisibleChildrenCount, moreButtonColumnPosition: moreButtonColumnPosition,
|
|
67
84
|
// biome-ignore lint/suspicious/noTsIgnore: <>
|
|
68
85
|
// @ts-ignore
|
|
69
|
-
renderRow: renderRow })] }));
|
|
86
|
+
renderRow: renderRow }), _jsx(BottomDrawer, { ...drawerProps, children: _jsx(BottomDrawerContent, { children: disabledReasonText }) })] }));
|
|
70
87
|
};
|
|
71
88
|
const arePropsEqual = (prevProps, nextProps) => {
|
|
72
89
|
const deepEqualityProps = new Set(['row']);
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
export declare const DISABLE_ROW_ATTR = "data-row-disable";
|
|
2
|
+
export declare const MOBILE_DRAWER_TITLE = "\u041F\u0440\u0438\u0447\u0438\u043D\u0430 ";
|
|
2
3
|
export declare const dataGridRowClassnames: {
|
|
4
|
+
root: string;
|
|
5
|
+
showConnector: string;
|
|
3
6
|
hidden: string;
|
|
4
7
|
hover: string;
|
|
5
8
|
hasPinnedColumns: string;
|
|
9
|
+
checkbox: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const dataGridRowContentClassnames: {
|
|
12
|
+
root: string;
|
|
13
|
+
hovered: string;
|
|
6
14
|
};
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { createUIKitClassname } from '../../utils/createUIKitClassname';
|
|
2
2
|
export const DISABLE_ROW_ATTR = 'data-row-disable';
|
|
3
|
+
export const MOBILE_DRAWER_TITLE = 'Причина ';
|
|
3
4
|
export const dataGridRowClassnames = {
|
|
5
|
+
root: createUIKitClassname('data-grid__row'),
|
|
6
|
+
showConnector: createUIKitClassname('data-grid__row_show-connector'),
|
|
4
7
|
hidden: createUIKitClassname('data-grid__row_hidden'),
|
|
5
8
|
hover: createUIKitClassname('data-grid__row_hover'),
|
|
6
9
|
hasPinnedColumns: createUIKitClassname('data-grid__row_has-pinned-columns'),
|
|
10
|
+
checkbox: createUIKitClassname('data-grid__row-checkbox'),
|
|
11
|
+
};
|
|
12
|
+
export const dataGridRowContentClassnames = {
|
|
13
|
+
root: createUIKitClassname('data-grid__row-content'),
|
|
14
|
+
hovered: createUIKitClassname('data-grid__row-content_hovered'),
|
|
7
15
|
};
|
|
@@ -2,24 +2,15 @@
|
|
|
2
2
|
export declare const Wrapper: import("../../styled").StyledComponent<{
|
|
3
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
4
|
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
5
|
-
} & {
|
|
6
|
-
$isShowConnector: boolean;
|
|
7
|
-
$level: number;
|
|
8
5
|
}, import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, {}>;
|
|
9
6
|
export declare const ContentWrapper: import("../../styled").StyledComponent<{
|
|
10
7
|
theme?: import("@emotion/react").Theme | undefined;
|
|
11
8
|
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
12
9
|
} & {
|
|
13
|
-
$isShowConnector: boolean;
|
|
14
|
-
$isHovered?: boolean | undefined;
|
|
15
|
-
$isSelected?: boolean | undefined;
|
|
16
10
|
$gridColumns: string;
|
|
17
|
-
$level: number;
|
|
18
11
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
19
12
|
export declare const CellStyled: import("../../styled").StyledComponent<import("../Cell").CellProps<Record<string, unknown>> & {
|
|
20
13
|
theme?: import("@emotion/react").Theme | undefined;
|
|
21
|
-
} & {
|
|
22
|
-
$level: number;
|
|
23
14
|
}, {}, {}>;
|
|
24
15
|
export declare const CheckboxCell: import("../../styled").StyledComponent<{
|
|
25
16
|
theme?: import("@emotion/react").Theme | undefined;
|
|
@@ -48,3 +39,7 @@ export declare const ChevronIcon: import("../../styled").StyledComponent<{
|
|
|
48
39
|
} & {
|
|
49
40
|
$isActive?: boolean | undefined;
|
|
50
41
|
}, {}, {}>;
|
|
42
|
+
export declare const BottomDrawerContent: import("../../styled").StyledComponent<{
|
|
43
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
44
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
45
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -3,8 +3,9 @@ import { IconButton } from '../../IconButton';
|
|
|
3
3
|
import { styled } from '../../styled';
|
|
4
4
|
import { Cell } from '../Cell';
|
|
5
5
|
import { ROOT_ACTION_CELL_WIDTH, TREE_LINE_WIDTH } from '../constants';
|
|
6
|
-
import { dataGridRowClassnames } from './constants';
|
|
6
|
+
import { dataGridRowClassnames, dataGridRowContentClassnames, } from './constants';
|
|
7
7
|
export const Wrapper = styled.li `
|
|
8
|
+
--level: 0;
|
|
8
9
|
position: relative;
|
|
9
10
|
|
|
10
11
|
&:not(:last-of-type)::before,
|
|
@@ -14,14 +15,35 @@ export const Wrapper = styled.li `
|
|
|
14
15
|
position: absolute;
|
|
15
16
|
z-index: 1;
|
|
16
17
|
top: 0;
|
|
17
|
-
transform:
|
|
18
|
+
transform: translateX(calc(${ROOT_ACTION_CELL_WIDTH}px * var(--level) - ${TREE_LINE_WIDTH}px));
|
|
18
19
|
|
|
19
|
-
display:
|
|
20
|
+
display: none;
|
|
20
21
|
|
|
21
22
|
width: 0;
|
|
22
23
|
height: 100%;
|
|
23
24
|
|
|
24
|
-
border-left: 1px solid ${({ theme }) => theme.palette.
|
|
25
|
+
border-left: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
${({ theme }) => theme.breakpoints.up('sm')} {
|
|
29
|
+
&.${dataGridRowClassnames.showConnector}::before,
|
|
30
|
+
& .${dataGridRowContentClassnames.root}::before {
|
|
31
|
+
display: block;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
36
|
+
padding-bottom: ${({ theme }) => theme.spacing(3)};
|
|
37
|
+
|
|
38
|
+
border-bottom: 1px solid ${({ theme }) => theme.palette.grey[300]};
|
|
39
|
+
|
|
40
|
+
&:not(:first-of-type) {
|
|
41
|
+
padding-top: ${({ theme }) => theme.spacing(5)};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&:first-of-type {
|
|
45
|
+
padding-top: ${({ theme }) => theme.spacing(1)};
|
|
46
|
+
}
|
|
25
47
|
}
|
|
26
48
|
`;
|
|
27
49
|
export const ContentWrapper = styled.div `
|
|
@@ -30,42 +52,63 @@ export const ContentWrapper = styled.div `
|
|
|
30
52
|
display: grid;
|
|
31
53
|
grid-template-columns: ${({ $gridColumns }) => $gridColumns};
|
|
32
54
|
|
|
33
|
-
background-color:
|
|
55
|
+
background-color: transparent;
|
|
34
56
|
|
|
35
57
|
&::before {
|
|
36
58
|
content: '';
|
|
37
59
|
|
|
38
60
|
position: absolute;
|
|
39
61
|
top: 0;
|
|
40
|
-
transform:
|
|
41
|
-
|
|
42
|
-
display: ${({ $isShowConnector }) => ($isShowConnector ? 'block' : 'none')};
|
|
62
|
+
transform: translateX(calc(${ROOT_ACTION_CELL_WIDTH}px * var(--level) - ${TREE_LINE_WIDTH}px));
|
|
43
63
|
|
|
44
64
|
width: ${TREE_LINE_WIDTH}px;
|
|
45
65
|
height: 50%;
|
|
46
66
|
|
|
47
|
-
border-bottom: 1px solid ${({ theme }) => theme.palette.
|
|
48
|
-
border-left: 1px solid ${({ theme }) => theme.palette.
|
|
67
|
+
border-bottom: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
68
|
+
border-left: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
49
69
|
border-radius: 0 0 0 ${({ theme }) => theme.shape.small};
|
|
70
|
+
|
|
71
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
72
|
+
display: none;
|
|
73
|
+
}
|
|
50
74
|
}
|
|
51
75
|
|
|
52
76
|
&:hover {
|
|
53
|
-
cursor: ${({ $isHovered }) => ($isHovered ? 'pointer' : 'default')};
|
|
54
|
-
|
|
55
77
|
background-color: ${({ theme }) => theme.palette.background.elementHover};
|
|
78
|
+
&.${dataGridRowContentClassnames.hovered} {
|
|
79
|
+
cursor: pointer;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
83
|
+
cursor: initial;
|
|
84
|
+
|
|
85
|
+
background-color: transparent;
|
|
86
|
+
}
|
|
56
87
|
}
|
|
57
88
|
|
|
58
89
|
|
|
59
90
|
&.${dataGridRowClassnames.hover} {
|
|
60
|
-
|
|
91
|
+
background-color: ${({ theme }) => theme.palette.background.elementHover};
|
|
92
|
+
&.${dataGridRowContentClassnames.hovered} {
|
|
93
|
+
cursor: pointer;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
97
|
+
cursor: initial;
|
|
98
|
+
|
|
99
|
+
background-color: transparent;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
61
102
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
: theme.
|
|
103
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
104
|
+
grid-template-columns: 1fr;
|
|
105
|
+
gap: ${({ theme }) => theme.spacing(3)};
|
|
65
106
|
}
|
|
66
107
|
`;
|
|
67
108
|
export const CellStyled = styled(Cell) `
|
|
68
|
-
|
|
109
|
+
&:first-of-type {
|
|
110
|
+
margin-left: calc(var(--level) * ${ROOT_ACTION_CELL_WIDTH}px);
|
|
111
|
+
}
|
|
69
112
|
`;
|
|
70
113
|
export const CheckboxCell = styled.div `
|
|
71
114
|
display: flex;
|
|
@@ -81,6 +124,10 @@ export const CollapseCell = styled.div `
|
|
|
81
124
|
justify-content: center;
|
|
82
125
|
|
|
83
126
|
width: ${ROOT_ACTION_CELL_WIDTH}px;
|
|
127
|
+
|
|
128
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
129
|
+
display: none;
|
|
130
|
+
}
|
|
84
131
|
`;
|
|
85
132
|
export const CollapseButton = styled(IconButton) `
|
|
86
133
|
width: 24px;
|
|
@@ -102,3 +149,8 @@ export const ChevronIcon = styled(ChevronROutlineMd, {
|
|
|
102
149
|
duration: theme.transitions.duration.short,
|
|
103
150
|
})};
|
|
104
151
|
`;
|
|
152
|
+
export const BottomDrawerContent = styled.div `
|
|
153
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
154
|
+
padding: ${({ theme }) => theme.spacing(5, 4)};
|
|
155
|
+
}
|
|
156
|
+
`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ChangeEvent, type ReactNode } from 'react';
|
|
1
|
+
import { type ChangeEvent, type CSSProperties, type ReactNode } from 'react';
|
|
2
2
|
import { type Variant } from '../enums';
|
|
3
3
|
import { type CellValue, type DataGridColumns, type DataGridRowOptions } from '../types';
|
|
4
4
|
export type RowProps<TData extends Record<string, CellValue>> = {
|
|
@@ -115,4 +115,8 @@ export type RowProps<TData extends Record<string, CellValue>> = {
|
|
|
115
115
|
* Обработчик выхода из строки
|
|
116
116
|
*/
|
|
117
117
|
onRowLeave?: (rowId: string, event: PointerEvent) => void;
|
|
118
|
+
/**
|
|
119
|
+
* Стили для строки
|
|
120
|
+
*/
|
|
121
|
+
style?: CSSProperties;
|
|
118
122
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useMobileLogic';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useMobileLogic';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { useViewportType } from '../../../../useViewportType';
|
|
3
|
+
export const useMobileLogic = () => {
|
|
4
|
+
const { isMobile } = useViewportType();
|
|
5
|
+
const [isDrawerOpen, setIsDrawerOpen] = useState(false);
|
|
6
|
+
const handleOpenDrawer = () => {
|
|
7
|
+
if (isMobile) {
|
|
8
|
+
setIsDrawerOpen(true);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
const handleCloseDrawer = () => {
|
|
12
|
+
setIsDrawerOpen(false);
|
|
13
|
+
};
|
|
14
|
+
return { isDrawerOpen, handleOpenDrawer, handleCloseDrawer };
|
|
15
|
+
};
|