@astral/ui 4.56.0 → 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/ContentState/ContentState.d.ts +1 -1
- package/components/ContentState/ContentState.js +2 -2
- package/components/ContentState/types.d.ts +4 -0
- 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 +4 -0
- 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/Row/NestedChildren/styles.js +5 -0
- 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 +66 -14
- 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/DescriptionCell/styles.js +12 -3
- 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/PageLayoutSection/PageLayoutSection.d.ts +4 -0
- package/components/PageLayoutSection/PageLayoutSection.js +13 -4
- 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 +6 -1
- package/components/placeholders/LoadingPlaceholder/LoadingPlaceholder.d.ts +5 -1
- package/components/placeholders/LoadingPlaceholder/LoadingPlaceholder.js +5 -4
- 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/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 +4 -0
- 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/Row/NestedChildren/styles.js +5 -0
- 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 +66 -14
- 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/DescriptionCell/styles.js +15 -6
- 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/PageLayoutSection/PageLayoutSection.d.ts +4 -0
- package/node/components/PageLayoutSection/PageLayoutSection.js +12 -3
- 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 +7 -2
- package/node/components/placeholders/LoadingPlaceholder/LoadingPlaceholder.d.ts +5 -1
- package/node/components/placeholders/LoadingPlaceholder/LoadingPlaceholder.js +5 -4
- package/package.json +1 -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
|
@@ -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,15 +15,36 @@ 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
25
|
border-left: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
25
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
|
+
}
|
|
47
|
+
}
|
|
26
48
|
`;
|
|
27
49
|
export const ContentWrapper = styled.div `
|
|
28
50
|
position: relative;
|
|
@@ -30,16 +52,14 @@ 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%;
|
|
@@ -47,25 +67,48 @@ export const ContentWrapper = styled.div `
|
|
|
47
67
|
border-bottom: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
48
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
|
+
};
|