@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.
Files changed (174) hide show
  1. package/components/ContentState/ContentState.d.ts +1 -1
  2. package/components/ContentState/ContentState.js +2 -2
  3. package/components/ContentState/types.d.ts +4 -0
  4. package/components/DataGrid/Body/Body.d.ts +1 -1
  5. package/components/DataGrid/Body/Body.js +14 -7
  6. package/components/DataGrid/Body/constants.d.ts +4 -0
  7. package/components/DataGrid/Body/constants.js +5 -0
  8. package/components/DataGrid/Body/styles.d.ts +0 -3
  9. package/components/DataGrid/Body/styles.js +14 -1
  10. package/components/DataGrid/Body/useLogic/index.d.ts +1 -0
  11. package/components/DataGrid/Body/useLogic/index.js +1 -0
  12. package/components/DataGrid/Body/useLogic/useLogic.d.ts +9 -0
  13. package/components/DataGrid/Body/useLogic/useLogic.js +15 -0
  14. package/components/DataGrid/Cell/Cell.js +20 -4
  15. package/components/DataGrid/Cell/constants.d.ts +7 -0
  16. package/components/DataGrid/Cell/constants.js +8 -0
  17. package/components/DataGrid/Cell/styles.d.ts +14 -0
  18. package/components/DataGrid/Cell/styles.js +47 -0
  19. package/components/DataGrid/Cell/useLogic/useLogic.d.ts +2 -0
  20. package/components/DataGrid/Cell/useLogic/useLogic.js +3 -2
  21. package/components/DataGrid/DataGrid.js +42 -8
  22. package/components/DataGrid/Head/Head.js +1 -1
  23. package/components/DataGrid/Head/styles.js +4 -0
  24. package/components/DataGrid/Loader/styles.js +4 -0
  25. package/components/DataGrid/MobileSkeleton/MobileSkeleton.d.ts +6 -0
  26. package/components/DataGrid/MobileSkeleton/MobileSkeleton.js +10 -0
  27. package/components/DataGrid/MobileSkeleton/index.d.ts +1 -0
  28. package/components/DataGrid/MobileSkeleton/index.js +1 -0
  29. package/components/DataGrid/MobileSkeleton/styles.d.ts +17 -0
  30. package/components/DataGrid/MobileSkeleton/styles.js +37 -0
  31. package/components/DataGrid/Row/NestedChildren/styles.js +5 -0
  32. package/components/DataGrid/Row/Row.js +25 -8
  33. package/components/DataGrid/Row/constants.d.ts +8 -0
  34. package/components/DataGrid/Row/constants.js +8 -0
  35. package/components/DataGrid/Row/styles.d.ts +4 -9
  36. package/components/DataGrid/Row/styles.js +66 -14
  37. package/components/DataGrid/Row/types.d.ts +5 -1
  38. package/components/DataGrid/Row/useLogic/hooks/index.d.ts +1 -0
  39. package/components/DataGrid/Row/useLogic/hooks/index.js +1 -0
  40. package/components/DataGrid/Row/useLogic/hooks/useMobileLogic.d.ts +5 -0
  41. package/components/DataGrid/Row/useLogic/hooks/useMobileLogic.js +15 -0
  42. package/components/DataGrid/Row/useLogic/useLogic.d.ts +868 -3
  43. package/components/DataGrid/Row/useLogic/useLogic.js +28 -13
  44. package/components/DataGrid/constants.d.ts +4 -0
  45. package/components/DataGrid/constants.js +4 -0
  46. package/components/DataGrid/index.d.ts +1 -0
  47. package/components/DataGrid/index.js +1 -0
  48. package/components/DataGrid/styles.d.ts +0 -9
  49. package/components/DataGrid/styles.js +43 -12
  50. package/components/DataGrid/types.d.ts +7 -0
  51. package/components/DataGrid/useLogic/hooks/index.d.ts +1 -1
  52. package/components/DataGrid/useLogic/hooks/index.js +1 -1
  53. package/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/index.d.ts +1 -0
  54. package/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/index.js +1 -0
  55. package/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/useDataGridMobileLogic.d.ts +16 -0
  56. package/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/useDataGridMobileLogic.js +32 -0
  57. package/components/DataGrid/useLogic/hooks/usePinnedColumns/usePinnedColumns.js +11 -3
  58. package/components/DataGrid/useLogic/useLogic.d.ts +10 -4
  59. package/components/DataGrid/useLogic/useLogic.js +17 -12
  60. package/components/DataGrid/useLogic/utils/getIsAllowHorizontalScroll/getIsAllowHorizontalScroll.js +1 -1
  61. package/components/DataGrid/utils/getDataGridCssVars/getDataGridCssVars.d.ts +2 -0
  62. package/components/DataGrid/utils/getDataGridCssVars/getDataGridCssVars.js +5 -0
  63. package/components/DataGrid/utils/getDataGridCssVars/index.d.ts +1 -0
  64. package/components/DataGrid/utils/getDataGridCssVars/index.js +1 -0
  65. package/components/DataGrid/utils/index.d.ts +1 -0
  66. package/components/DataGrid/utils/index.js +1 -0
  67. package/components/DataGridActionCell/DataGridSecondaryActions/DataGridSecondaryActions.js +1 -1
  68. package/components/DataGridInfinite/DataGridInfinite.js +5 -4
  69. package/components/DataGridInfinite/useLogic/useLogic.d.ts +7 -1
  70. package/components/DataGridInfinite/useLogic/useLogic.js +12 -2
  71. package/components/DescriptionCell/styles.js +12 -3
  72. package/components/NewStepper/index.d.ts +1 -0
  73. package/components/NewStepper/index.js +1 -0
  74. package/components/NewStepper/public.d.ts +1 -0
  75. package/components/NewStepper/public.js +1 -0
  76. package/components/PageLayoutSection/PageLayoutSection.d.ts +4 -0
  77. package/components/PageLayoutSection/PageLayoutSection.js +13 -4
  78. package/components/PageLayoutSection/constants.d.ts +5 -0
  79. package/components/PageLayoutSection/constants.js +6 -0
  80. package/components/PageLayoutSection/styles.d.ts +1 -1
  81. package/components/PageLayoutSection/styles.js +6 -1
  82. package/components/placeholders/LoadingPlaceholder/LoadingPlaceholder.d.ts +5 -1
  83. package/components/placeholders/LoadingPlaceholder/LoadingPlaceholder.js +5 -4
  84. package/node/components/ContentState/ContentState.d.ts +1 -1
  85. package/node/components/ContentState/ContentState.js +2 -2
  86. package/node/components/ContentState/types.d.ts +4 -0
  87. package/node/components/DataGrid/Body/Body.d.ts +1 -1
  88. package/node/components/DataGrid/Body/Body.js +14 -7
  89. package/node/components/DataGrid/Body/constants.d.ts +4 -0
  90. package/node/components/DataGrid/Body/constants.js +8 -0
  91. package/node/components/DataGrid/Body/styles.d.ts +0 -3
  92. package/node/components/DataGrid/Body/styles.js +14 -1
  93. package/node/components/DataGrid/Body/useLogic/index.d.ts +1 -0
  94. package/node/components/DataGrid/{useLogic/hooks/useClassnames → Body/useLogic}/index.js +1 -1
  95. package/node/components/DataGrid/Body/useLogic/useLogic.d.ts +9 -0
  96. package/node/components/DataGrid/Body/useLogic/useLogic.js +19 -0
  97. package/node/components/DataGrid/Cell/Cell.js +18 -2
  98. package/node/components/DataGrid/Cell/constants.d.ts +7 -0
  99. package/node/components/DataGrid/Cell/constants.js +11 -0
  100. package/node/components/DataGrid/Cell/styles.d.ts +14 -0
  101. package/node/components/DataGrid/Cell/styles.js +48 -1
  102. package/node/components/DataGrid/Cell/useLogic/useLogic.d.ts +2 -0
  103. package/node/components/DataGrid/Cell/useLogic/useLogic.js +3 -2
  104. package/node/components/DataGrid/DataGrid.js +41 -7
  105. package/node/components/DataGrid/Head/Head.js +1 -1
  106. package/node/components/DataGrid/Head/styles.js +4 -0
  107. package/node/components/DataGrid/Loader/styles.js +4 -0
  108. package/node/components/DataGrid/MobileSkeleton/MobileSkeleton.d.ts +6 -0
  109. package/node/components/DataGrid/MobileSkeleton/MobileSkeleton.js +14 -0
  110. package/node/components/DataGrid/MobileSkeleton/index.d.ts +1 -0
  111. package/node/components/DataGrid/MobileSkeleton/index.js +17 -0
  112. package/node/components/DataGrid/MobileSkeleton/styles.d.ts +17 -0
  113. package/node/components/DataGrid/MobileSkeleton/styles.js +40 -0
  114. package/node/components/DataGrid/Row/NestedChildren/styles.js +5 -0
  115. package/node/components/DataGrid/Row/Row.js +23 -6
  116. package/node/components/DataGrid/Row/constants.d.ts +8 -0
  117. package/node/components/DataGrid/Row/constants.js +9 -1
  118. package/node/components/DataGrid/Row/styles.d.ts +4 -9
  119. package/node/components/DataGrid/Row/styles.js +66 -14
  120. package/node/components/DataGrid/Row/types.d.ts +5 -1
  121. package/node/components/DataGrid/Row/useLogic/hooks/index.d.ts +1 -0
  122. package/node/components/DataGrid/Row/useLogic/hooks/index.js +17 -0
  123. package/node/components/DataGrid/Row/useLogic/hooks/useMobileLogic.d.ts +5 -0
  124. package/node/components/DataGrid/Row/useLogic/hooks/useMobileLogic.js +19 -0
  125. package/node/components/DataGrid/Row/useLogic/useLogic.d.ts +868 -3
  126. package/node/components/DataGrid/Row/useLogic/useLogic.js +28 -13
  127. package/node/components/DataGrid/constants.d.ts +4 -0
  128. package/node/components/DataGrid/constants.js +5 -1
  129. package/node/components/DataGrid/index.d.ts +1 -0
  130. package/node/components/DataGrid/index.js +3 -1
  131. package/node/components/DataGrid/styles.d.ts +0 -9
  132. package/node/components/DataGrid/styles.js +43 -12
  133. package/node/components/DataGrid/types.d.ts +7 -0
  134. package/node/components/DataGrid/useLogic/hooks/index.d.ts +1 -1
  135. package/node/components/DataGrid/useLogic/hooks/index.js +1 -1
  136. package/node/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/index.d.ts +1 -0
  137. package/node/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/index.js +17 -0
  138. package/node/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/useDataGridMobileLogic.d.ts +16 -0
  139. package/node/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/useDataGridMobileLogic.js +36 -0
  140. package/node/components/DataGrid/useLogic/hooks/usePinnedColumns/usePinnedColumns.js +11 -3
  141. package/node/components/DataGrid/useLogic/useLogic.d.ts +10 -4
  142. package/node/components/DataGrid/useLogic/useLogic.js +19 -14
  143. package/node/components/DataGrid/useLogic/utils/getIsAllowHorizontalScroll/getIsAllowHorizontalScroll.js +1 -1
  144. package/node/components/DataGrid/utils/getDataGridCssVars/getDataGridCssVars.d.ts +2 -0
  145. package/node/components/DataGrid/utils/getDataGridCssVars/getDataGridCssVars.js +9 -0
  146. package/node/components/DataGrid/utils/getDataGridCssVars/index.d.ts +1 -0
  147. package/node/components/DataGrid/utils/getDataGridCssVars/index.js +5 -0
  148. package/node/components/DataGrid/utils/index.d.ts +1 -0
  149. package/node/components/DataGrid/utils/index.js +3 -1
  150. package/node/components/DataGridActionCell/DataGridSecondaryActions/DataGridSecondaryActions.js +1 -1
  151. package/node/components/DataGridInfinite/DataGridInfinite.js +5 -4
  152. package/node/components/DataGridInfinite/useLogic/useLogic.d.ts +7 -1
  153. package/node/components/DataGridInfinite/useLogic/useLogic.js +11 -1
  154. package/node/components/DescriptionCell/styles.js +15 -6
  155. package/node/components/NewStepper/index.d.ts +1 -0
  156. package/node/components/NewStepper/index.js +3 -1
  157. package/node/components/NewStepper/public.d.ts +1 -0
  158. package/node/components/NewStepper/public.js +3 -1
  159. package/node/components/PageLayoutSection/PageLayoutSection.d.ts +4 -0
  160. package/node/components/PageLayoutSection/PageLayoutSection.js +12 -3
  161. package/node/components/PageLayoutSection/constants.d.ts +5 -0
  162. package/node/components/PageLayoutSection/constants.js +9 -0
  163. package/node/components/PageLayoutSection/styles.d.ts +1 -1
  164. package/node/components/PageLayoutSection/styles.js +7 -2
  165. package/node/components/placeholders/LoadingPlaceholder/LoadingPlaceholder.d.ts +5 -1
  166. package/node/components/placeholders/LoadingPlaceholder/LoadingPlaceholder.js +5 -4
  167. package/package.json +1 -1
  168. package/components/DataGrid/useLogic/hooks/useClassnames/index.d.ts +0 -1
  169. package/components/DataGrid/useLogic/hooks/useClassnames/index.js +0 -1
  170. package/components/DataGrid/useLogic/hooks/useClassnames/useClassnames.d.ts +0 -12
  171. package/components/DataGrid/useLogic/hooks/useClassnames/useClassnames.js +0 -14
  172. package/node/components/DataGrid/useLogic/hooks/useClassnames/index.d.ts +0 -1
  173. package/node/components/DataGrid/useLogic/hooks/useClassnames/useClassnames.d.ts +0 -12
  174. package/node/components/DataGrid/useLogic/hooks/useClassnames/useClassnames.js +0 -18
@@ -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;
@@ -5,13 +5,13 @@ import { LoadingPlaceholder } from '../placeholders/LoadingPlaceholder';
5
5
  import { Placeholder } from '../placeholders/Placeholder';
6
6
  import { Typography } from '../Typography';
7
7
  import { useLogic } from './useLogic';
8
- export const ContentState = ({ isLoading, isError, isCustom, errorState, customState, children, loadingContent, loadingTitle, placeholderSize, isSmoothLoading, }) => {
8
+ export const ContentState = ({ isLoading, isError, isCustom, errorState, customState, children, loadingContent, loadingTitle, placeholderSize, isSmoothLoading, loadingPlaceholderClassname, }) => {
9
9
  const { imagesMap, isLoadingPhase, isShowLoader } = useLogic({
10
10
  isLoading,
11
11
  isSmoothLoading,
12
12
  });
13
13
  if (isLoadingPhase) {
14
- return (_jsx(LoadingPlaceholder, { content: loadingContent, title: loadingTitle, isShowLoader: isShowLoader }));
14
+ return (_jsx(LoadingPlaceholder, { content: loadingContent, title: loadingTitle, isShowLoader: isShowLoader, className: loadingPlaceholderClassname }));
15
15
  }
16
16
  if (isCustom && customState) {
17
17
  return _jsx(Placeholder, { ...customState });
@@ -78,4 +78,8 @@ export type ContentStateProps = {
78
78
  * лоадер показывается и скрывается сразу при изменении `isLoading`.
79
79
  */
80
80
  isSmoothLoading?: boolean;
81
+ /**
82
+ * Класс применяемый для loading placeholder
83
+ */
84
+ loadingPlaceholderClassname?: string;
81
85
  };
@@ -1,2 +1,2 @@
1
1
  import type { BodyProps } from './types';
2
- export declare const Body: <TData extends Record<string, unknown>>(props: BodyProps<TData>) => import("react/jsx-runtime").JSX.Element;
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;
@@ -1,18 +1,25 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useContext } from 'react';
3
- import { ConfigContext } from '../../ConfigProvider';
2
+ import { classNames } from '../../utils/classNames';
3
+ import { cva } from '../../utils/cva';
4
4
  import { Row } from '../Row';
5
5
  import { RowContextProvider } from '../Row/RowContext';
6
+ import { bodyClassnames } from './constants';
6
7
  import { Wrapper } from './styles';
8
+ import { useLogic } from './useLogic';
7
9
  const INITIAL_LEVEL = 0;
8
- export const Body = (props) => {
9
- const { components } = useContext(ConfigContext);
10
- const disableMinHeight = components?.dataGrid?.defaultProps?.disableMinHeight;
11
- const { rows, selectedRows = [], minDisplayRows, keyId, noDataPlaceholder, className, ...rowProps } = props;
10
+ const bodyCva = cva(bodyClassnames.root, {
11
+ variants: {
12
+ disableMinHeight: {
13
+ true: bodyClassnames.disableMinHeight,
14
+ },
15
+ },
16
+ });
17
+ export const Body = ({ rows, selectedRows = [], minDisplayRows, keyId, noDataPlaceholder, className, ...rowProps }) => {
18
+ const { disableMinHeight, bodyCssVars } = useLogic({ minDisplayRows });
12
19
  const renderedRows = rows.map(({ children, options, ...row }) => {
13
20
  const rowId = row[keyId];
14
21
  const isSelected = Boolean(selectedRows?.find((selectedRow) => selectedRow[keyId] === rowId));
15
22
  return (_jsx(RowContextProvider, { children: _jsx(Row, { row: row, selectedRows: selectedRows, options: options, keyId: keyId, level: INITIAL_LEVEL, nestedChildren: children, isSelected: isSelected, ...rowProps }, rowId) }, rowId));
16
23
  });
17
- return (_jsx(Wrapper, { className: className, "$minDisplayRows": minDisplayRows, "$disableMinHeight": disableMinHeight, children: rows.length ? renderedRows : noDataPlaceholder }));
24
+ return (_jsx(Wrapper, { className: classNames(className, bodyCva({ disableMinHeight })), style: bodyCssVars, children: rows.length ? renderedRows : noDataPlaceholder }));
18
25
  };
@@ -0,0 +1,4 @@
1
+ export declare const bodyClassnames: {
2
+ root: string;
3
+ disableMinHeight: string;
4
+ };
@@ -0,0 +1,5 @@
1
+ import { createUIKitClassname } from '../../utils/createUIKitClassname';
2
+ export const bodyClassnames = {
3
+ root: createUIKitClassname('data-grid__body'),
4
+ disableMinHeight: createUIKitClassname('data-grid__body_disable-min-height'),
5
+ };
@@ -2,7 +2,4 @@
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
- $minDisplayRows: number;
7
- $disableMinHeight?: boolean | undefined;
8
5
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, {}>;
@@ -1,19 +1,32 @@
1
1
  import { styled } from '../../styled';
2
2
  import { dataGridClassnames, MIN_ROW_HEIGHT } from '../constants';
3
+ import { bodyClassnames } from './constants';
3
4
  export const Wrapper = styled.ul `
5
+ --min-display-rows: 0;
6
+
4
7
  overflow-y: auto;
5
8
 
6
9
  width: fit-content;
7
10
  min-width: 100%;
8
11
  height: 100%;
9
- min-height: ${({ $minDisplayRows, $disableMinHeight }) => ($disableMinHeight ? 'unset' : `${MIN_ROW_HEIGHT * $minDisplayRows}px`)};
12
+ min-height: calc(var(--min-display-rows) * ${MIN_ROW_HEIGHT}px);
10
13
  margin: 0;
11
14
  padding: 0;
12
15
 
13
16
  list-style-type: none;
14
17
 
18
+ &.${bodyClassnames.disableMinHeight} {
19
+ min-height: unset;
20
+ }
21
+
15
22
  &.${dataGridClassnames.bodyEmpty} {
16
23
  display: flex;
17
24
  align-items: center;
18
25
  }
26
+
27
+ ${({ theme }) => theme.breakpoints.down('sm')} {
28
+ overflow: initial;
29
+
30
+ width: 100%;
31
+ }
19
32
  `;
@@ -0,0 +1 @@
1
+ export * from './useLogic';
@@ -0,0 +1 @@
1
+ export * from './useLogic';
@@ -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,15 @@
1
+ import { useContext } from 'react';
2
+ import { ConfigContext } from '../../../ConfigProvider';
3
+ export const useLogic = ({ minDisplayRows, }) => {
4
+ const { components } = useContext(ConfigContext);
5
+ const disableMinHeight = components?.dataGrid?.defaultProps?.disableMinHeight;
6
+ const bodyCssVars = !disableMinHeight && minDisplayRows
7
+ ? {
8
+ '--min-display-rows': minDisplayRows,
9
+ }
10
+ : {};
11
+ return {
12
+ disableMinHeight,
13
+ bodyCssVars,
14
+ };
15
+ };
@@ -1,16 +1,32 @@
1
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { OverflowTypography } from '../../OverflowTypography';
3
3
  import { useHidePersonalData } from '../../personalDataSecurity';
4
4
  import { classNames } from '../../utils/classNames';
5
+ import { cva } from '../../utils/cva';
5
6
  import { getInertProps } from '../../utils/getInertProps';
6
- import { Wrapper } from './styles';
7
+ import { dataGridCellClassnames } from './constants';
8
+ import { CellContent, ColumnLabel, Wrapper } from './styles';
7
9
  import { useLogic } from './useLogic';
10
+ const cellCva = cva(dataGridCellClassnames.root, {
11
+ variants: {
12
+ isHideOnMobile: {
13
+ true: dataGridCellClassnames.isHideOnMobile,
14
+ },
15
+ },
16
+ });
17
+ const cellContentCva = cva(dataGridCellClassnames.cellContent, {
18
+ variants: {
19
+ isActionColumn: {
20
+ true: dataGridCellClassnames.actionColumn,
21
+ },
22
+ },
23
+ });
8
24
  export const Cell = (props) => {
9
- const { formattedValue, hasStartAdornment } = useLogic(props);
25
+ const { formattedValue, hasStartAdornment, isActionColumn, label } = useLogic(props);
10
26
  const { className, startAdornment, row, cell, isDisabled, isHidePersonalData, } = props;
11
27
  const { renderCell, align = 'left' } = cell;
12
28
  const hidePersonalDataClassname = useHidePersonalData({
13
29
  isEnabled: isHidePersonalData === true,
14
30
  });
15
- return (_jsxs(Wrapper, { "$isDisabled": isDisabled, "$align": align, "$hasStartAdornment": hasStartAdornment, className: classNames(className, hidePersonalDataClassname), ...getInertProps(isDisabled), children: [startAdornment && startAdornment, renderCell?.(row), !renderCell && (_jsx(OverflowTypography, { rowsCount: 2, tooltipProps: { className: hidePersonalDataClassname }, children: _jsx(_Fragment, { children: formattedValue }) }))] }));
31
+ return (_jsxs(Wrapper, { "$isDisabled": isDisabled, "$align": align, "$hasStartAdornment": hasStartAdornment, className: classNames(className, hidePersonalDataClassname, cellCva({ isHideOnMobile: cell.isHideOnMobile })), ...getInertProps(isDisabled), children: [startAdornment && startAdornment, _jsxs(CellContent, { className: cellContentCva({ isActionColumn }), children: [_jsx(ColumnLabel, { variant: "caption", color: "textSecondary", className: dataGridCellClassnames.columnLabel, children: label }), renderCell?.(row), !renderCell && (_jsx(OverflowTypography, { rowsCount: 2, tooltipProps: { className: hidePersonalDataClassname }, children: _jsx(_Fragment, { children: formattedValue }) }))] })] }));
16
32
  };
@@ -0,0 +1,7 @@
1
+ export declare const dataGridCellClassnames: {
2
+ root: string;
3
+ isHideOnMobile: string;
4
+ columnLabel: string;
5
+ actionColumn: string;
6
+ cellContent: string;
7
+ };
@@ -0,0 +1,8 @@
1
+ import { createUIKitClassname } from '../../utils/createUIKitClassname';
2
+ export const dataGridCellClassnames = {
3
+ root: createUIKitClassname('data-grid__cell'),
4
+ isHideOnMobile: createUIKitClassname('data-grid__cell_hide-on-mobile'),
5
+ columnLabel: createUIKitClassname('data-grid__cell-column-label'),
6
+ actionColumn: createUIKitClassname('data-grid__cell_action-column'),
7
+ cellContent: createUIKitClassname('data-grid__cell-content'),
8
+ };
@@ -9,4 +9,18 @@ export declare const Wrapper: import("../../styled").StyledComponent<{
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("../../styled").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("../../styled").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,6 +1,9 @@
1
1
  import { styled } from '../../styled';
2
+ import { Typography } from '../../Typography';
2
3
  import { MIN_ROW_HEIGHT } from '../constants';
4
+ import { dataGridRowClassnames } from '../Row/constants';
3
5
  import { alignToJustifyContent } from '../utils';
6
+ import { dataGridCellClassnames } from './constants';
4
7
  export const Wrapper = styled('div', {
5
8
  shouldForwardProp: (prop) => !['$align', '$isDisabled', '$hasStartAdornment'].includes(prop),
6
9
  }) `
@@ -13,4 +16,48 @@ export const Wrapper = styled('div', {
13
16
  padding: ${({ theme, $hasStartAdornment }) => $hasStartAdornment ? theme.spacing(1, 2, 1, 0) : theme.spacing(1, 2)};
14
17
 
15
18
  opacity: ${({ $isDisabled }) => ($isDisabled ? 0.5 : 1)};
19
+
20
+ ${({ theme }) => theme.breakpoints.down('sm')} {
21
+ justify-content: space-between;
22
+
23
+ min-height: unset;
24
+ padding: 0;
25
+
26
+ &.${dataGridCellClassnames.isHideOnMobile} {
27
+ display: none;
28
+ }
29
+
30
+
31
+ & .${dataGridRowClassnames.checkbox} {
32
+ align-self: flex-start;
33
+ order: 1;
34
+ }
35
+ }
36
+ `;
37
+ export const ColumnLabel = styled(Typography) `
38
+ display: none;
39
+
40
+ ${({ theme }) => theme.breakpoints.down('sm')} {
41
+ display: block;
42
+ }
43
+ `;
44
+ export const CellContent = styled.div `
45
+ min-width: 0;
46
+
47
+ ${({ theme }) => theme.breakpoints.down('sm')} {
48
+ display: flex;
49
+ flex-direction: column;
50
+ gap: ${({ theme }) => theme.spacing(1)};
51
+ align-items: flex-start;
52
+
53
+ width: 100%;
54
+
55
+ &.${dataGridCellClassnames.actionColumn} {
56
+ align-items: flex-end;
57
+
58
+ & .${dataGridCellClassnames.columnLabel} {
59
+ display: none;
60
+ }
61
+ }
62
+ }
16
63
  `;
@@ -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 {};
@@ -1,6 +1,6 @@
1
1
  import { useMemo } from 'react';
2
2
  export const useLogic = ({ row, cell, emptyCellValue, startAdornment, }) => {
3
- const { format, field } = cell;
3
+ const { format, field, label } = cell;
4
4
  const isValidValue = (value) => {
5
5
  return Boolean(value) || value === 0;
6
6
  };
@@ -14,5 +14,6 @@ export const useLogic = ({ row, cell, emptyCellValue, startAdornment, }) => {
14
14
  return emptyCellValue;
15
15
  }, [field, format, row, emptyCellValue]);
16
16
  const hasStartAdornment = Boolean(startAdornment);
17
- return { formattedValue, hasStartAdornment };
17
+ const isActionColumn = cell.field === 'actions';
18
+ return { formattedValue, hasStartAdornment, isActionColumn, label };
18
19
  };
@@ -2,24 +2,51 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useCallback, useContext } from 'react';
3
3
  import { ConfigContext } from '../ConfigProvider';
4
4
  import { ContentState } from '../ContentState';
5
+ import { classNames } from '../utils/classNames';
6
+ import { cva } from '../utils/cva';
5
7
  import { getInertProps } from '../utils/getInertProps';
6
8
  import { Body } from './Body';
7
- import { EXPANDED_LEVEL_BY_DEFAULT, INITIAL_OPENED_NESTED_CHILDREN_COUNT_BY_DEFAULT, MIN_DISPLAY_ROWS_BY_DEFAULT, } from './constants';
9
+ import { dataGridClassnames, EXPANDED_LEVEL_BY_DEFAULT, INITIAL_OPENED_NESTED_CHILDREN_COUNT_BY_DEFAULT, MIN_DISPLAY_ROWS_BY_DEFAULT, } from './constants';
8
10
  import { DataGridContextProvider } from './DataGridContext';
9
11
  import { Variant } from './enums';
10
12
  import { Head } from './Head';
11
13
  import { Loader } from './Loader';
14
+ import { MobileSkeleton } from './MobileSkeleton';
12
15
  import { NoData } from './NoData';
13
16
  import { PinnedSections } from './PinnedSections';
14
17
  import { Container, DataGridWrapper, DisabledDataGridWrapper } from './styles';
15
18
  import { useLogic } from './useLogic';
19
+ const pinnedSectionsCva = cva(dataGridClassnames.pinnedSections, {
20
+ variants: {
21
+ isDisabled: {
22
+ true: dataGridClassnames.disabled,
23
+ },
24
+ },
25
+ });
26
+ const dataGridCva = cva(dataGridClassnames.root, {
27
+ variants: {
28
+ hasPinnedColumns: {
29
+ true: dataGridClassnames.dataGridHasPinnedSections,
30
+ },
31
+ isAllowHorizontalScroll: {
32
+ true: dataGridClassnames.isAllowHorizontalScroll,
33
+ },
34
+ },
35
+ });
36
+ const bodyCva = cva(dataGridClassnames.body, {
37
+ variants: {
38
+ isNoData: {
39
+ true: dataGridClassnames.bodyEmpty,
40
+ },
41
+ },
42
+ });
16
43
  export const DataGrid = (props) => {
17
- const { isDataGridDisabled, treeRenderConfig, headColumns, headProps, bodyProps, gridColumns, loaderProps, renderRows, isAllowHorizontalScroll, isHideHead, hasPinnedColumns, pinnedSectionsClassname, dataGridClassname, contentStateProps, rowHoverProps, containerRef, sections, isNoData, bodyClassName, } = useLogic(props);
44
+ const { dataGridClassName, isDataGridDisabled, treeRenderConfig, headColumns, headProps, bodyProps, gridColumns, loaderProps, renderRows, isAllowHorizontalScroll, isHideHead, hasPinnedColumns, contentStateProps, rowHoverProps, containerRef, sections, isNoData, isMobile, mobileSkeletonProps, isLoading, containerCssVars, } = useLogic(props);
18
45
  const { emptySymbol } = useContext(ConfigContext);
19
- const { columns, selectedRows = [], maxHeight, minDisplayRows = MIN_DISPLAY_ROWS_BY_DEFAULT, variant = Variant.Tree, footer, noDataPlaceholder, isLoading, subrows, keyId, activeRowId, emptyCellValue = emptySymbol, onRowClick, noDataOptions, headPreAddon, } = props;
46
+ const { columns, selectedRows = [], minDisplayRows = MIN_DISPLAY_ROWS_BY_DEFAULT, variant = Variant.Tree, footer, noDataPlaceholder, subrows, keyId, activeRowId, emptyCellValue = emptySymbol, onRowClick, noDataOptions, headPreAddon, } = props;
20
47
  const { moreButtonColumnPosition = 1, isVisibleCollapseButton = true } = subrows || {};
21
48
  const { isInitialExpanded = false, expandedLevel = EXPANDED_LEVEL_BY_DEFAULT, initialVisibleChildrenCount = INITIAL_OPENED_NESTED_CHILDREN_COUNT_BY_DEFAULT, } = treeRenderConfig || {};
22
- const TableContainer = isDataGridDisabled
49
+ const Wrapper = isDataGridDisabled
23
50
  ? DisabledDataGridWrapper
24
51
  : DataGridWrapper;
25
52
  const renderedPlaceholder = useCallback(() => {
@@ -47,10 +74,17 @@ export const DataGrid = (props) => {
47
74
  ...rowHoverProps,
48
75
  };
49
76
  const renderTableContent = () => {
50
- if (!hasPinnedColumns) {
51
- return (_jsxs(TableContainer, { "$isAllowHorizontalScroll": isAllowHorizontalScroll, ...getInertProps(isDataGridDisabled), children: [headPreAddon, !isHideHead && (_jsx(Head, { ...headProps, columns: headColumns, gridColumns: gridColumns })), _jsx(ContentState, { ...contentStateProps, children: _jsx(Body, { ...commonBodyProps, columns: columns, gridColumns: gridColumns, className: bodyClassName }) })] }));
77
+ if (!hasPinnedColumns || isMobile) {
78
+ return (_jsxs(Wrapper, { ...getInertProps(isDataGridDisabled), className: dataGridClassnames.wrapper, children: [headPreAddon, !isHideHead && (_jsx(Head, { ...headProps, columns: headColumns, gridColumns: gridColumns })), _jsx(ContentState, { ...contentStateProps, loadingContent: isMobile && _jsx(MobileSkeleton, { ...mobileSkeletonProps }), children: _jsx(Body, { ...commonBodyProps, columns: columns, gridColumns: gridColumns, className: bodyCva({
79
+ isNoData,
80
+ }) }) })] }));
52
81
  }
53
- return (_jsx(ContentState, { ...contentStateProps, children: _jsx(PinnedSections, { sections: sections, className: pinnedSectionsClassname, isDisabled: isDataGridDisabled, headProps: headProps, gridColumns: gridColumns, bodyProps: commonBodyProps, isNoData: isNoData }) }));
82
+ return (_jsx(ContentState, { ...contentStateProps, children: _jsx(PinnedSections, { sections: sections, className: pinnedSectionsCva({
83
+ isDisabled: isDataGridDisabled,
84
+ }), isDisabled: isDataGridDisabled, headProps: headProps, gridColumns: gridColumns, bodyProps: commonBodyProps, isNoData: isNoData }) }));
54
85
  };
55
- return (_jsx(DataGridContextProvider, { isLoading: isLoading, children: _jsxs(Container, { ref: containerRef, "$maxHeight": maxHeight, "$isAllowHorizontalScroll": isAllowHorizontalScroll, className: dataGridClassname, children: [renderTableContent(), _jsx(Loader, { ...loaderProps }), footer && footer] }) }));
86
+ return (_jsx(DataGridContextProvider, { isLoading: isLoading, children: _jsxs(Container, { ref: containerRef, style: containerCssVars, className: classNames(dataGridClassName, dataGridCva({
87
+ isAllowHorizontalScroll,
88
+ hasPinnedColumns,
89
+ })), children: [renderTableContent(), _jsx(Loader, { ...loaderProps }), footer && footer] }) }));
56
90
  };
@@ -29,5 +29,5 @@ export const Head = (props) => {
29
29
  onSelectAllRows,
30
30
  handleSort,
31
31
  ]);
32
- return (_jsx(Wrapper, { className: dataGridClassnames.header, "$gridColumns": gridColumns, children: renderColumns }));
32
+ return (_jsx(Wrapper, { role: "heading", className: dataGridClassnames.header, "$gridColumns": gridColumns, children: renderColumns }));
33
33
  };
@@ -10,6 +10,10 @@ export const Wrapper = styled('header', {
10
10
  min-width: 100%;
11
11
 
12
12
  border-bottom: 1px solid ${({ theme }) => theme.palette.components.border.default};
13
+
14
+ ${({ theme }) => theme.breakpoints.down('sm')} {
15
+ display: none;
16
+ }
13
17
  `;
14
18
  export const CheckboxCell = styled.div `
15
19
  display: flex;
@@ -18,6 +18,10 @@ export const LoaderWrapper = styled.div `
18
18
  position: sticky;
19
19
  z-index: ${({ theme }) => theme.zIndex.fab};
20
20
  left: 0;
21
+
22
+ ${({ theme }) => theme.breakpoints.down('sm')} {
23
+ display: none;
24
+ }
21
25
  `;
22
26
  export const StyledLinearProgress = styled(LinearProgress) `
23
27
  height: 2px;
@@ -0,0 +1,6 @@
1
+ type MobileSkeletonProps = {
2
+ cellsCount: number;
3
+ rowsCount: number;
4
+ };
5
+ export declare const MobileSkeleton: ({ cellsCount, rowsCount, }: MobileSkeletonProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Skeleton } from '../../Skeleton';
3
+ import { Actions, Cell, Root, RowWrapper } from './styles';
4
+ export const MobileSkeleton = ({ cellsCount, rowsCount, }) => {
5
+ return (_jsx(Root, { children: Array.from({ length: rowsCount }, (_, rowIndex) => (_jsxs(RowWrapper
6
+ // biome-ignore lint/suspicious/noArrayIndexKey: Статичный скелетон
7
+ , { children: [Array.from({ length: cellsCount - 1 }, (_cell, cellIndex) => (
8
+ // biome-ignore lint/suspicious/noArrayIndexKey: Статичный скелетон
9
+ _jsxs(Cell, { children: [_jsx(Skeleton, { variant: "rounded", height: 20 }), _jsx(Skeleton, { variant: "rounded", height: 16, width: "50%" })] }, cellIndex))), _jsx(Actions, { children: _jsx(Skeleton, { variant: "rounded", width: "100%", height: 40 }) })] }, rowIndex))) }));
10
+ };
@@ -0,0 +1 @@
1
+ export * from './MobileSkeleton';
@@ -0,0 +1 @@
1
+ export * from './MobileSkeleton';
@@ -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
+ `;
@@ -26,6 +26,11 @@ export const NestedRows = styled('ul', {
26
26
 
27
27
  border-left: 1px solid ${({ theme }) => theme.palette.components.border.default};
28
28
  }
29
+
30
+ /* TODO: Убрать после реализации задачи по адаптации вложенных строк https://track.astral.ru/soft/browse/UIKIT-2188 */
31
+ ${({ theme }) => theme.breakpoints.down('sm')} {
32
+ display: none;
33
+ }
29
34
  `;
30
35
  export const MoreButtonRow = styled('li', {
31
36
  shouldForwardProp: (prop) => !['$level', '$isShowConnector', '$gridColumns'].includes(prop),
@@ -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, { "$level": isFirstCell ? level : 0, row: row, cell: cell, emptyCellValue: emptyCellValue, startAdornment: isFirstCell && renderStartAdornment(), isDisabled: isDisabledCell, isHidePersonalData: cell.isHidePersonalData }, cellId));
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, { "$level": level, "$isShowConnector": isShowConnector, className: className, ...selfProps, children: [_jsx(Tooltip, { followCursor: true, arrow: false, ...tooltipProps, children: _jsx(ContentWrapper, { "$level": level, "data-row-id": rowId, ref: rowRef, onPointerEnter: () => onRowEnter?.(rowId), onPointerLeave: (event) => onRowLeave?.(rowId, event.nativeEvent), "$isShowConnector": isShowConnector, "$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,
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
  };