@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.
Files changed (278) hide show
  1. package/components/BottomDrawer/styles.js +1 -1
  2. package/components/CardGridInfinite/Footer/styles.js +1 -1
  3. package/components/CheckableTag/styles.js +1 -1
  4. package/components/Checkbox/styles.js +4 -2
  5. package/components/Chip/styles.js +1 -1
  6. package/components/CodeField/styles.js +1 -1
  7. package/components/ComplianceStatus/styles.js +1 -1
  8. package/components/ContentState/ContentState.d.ts +1 -1
  9. package/components/ContentState/ContentState.js +2 -2
  10. package/components/ContentState/types.d.ts +4 -0
  11. package/components/DashboardLayout/DashboardWrapper/styles.js +1 -1
  12. package/components/DashboardLayout/Header/styles.js +4 -4
  13. package/components/DashboardLayoutSkeleton/styles.js +1 -1
  14. package/components/DashboardSidebar/styles.js +2 -2
  15. package/components/DashboardSidebarSkeleton/styles.js +1 -1
  16. package/components/DataGrid/Body/Body.d.ts +1 -1
  17. package/components/DataGrid/Body/Body.js +14 -7
  18. package/components/DataGrid/Body/constants.d.ts +4 -0
  19. package/components/DataGrid/Body/constants.js +5 -0
  20. package/components/DataGrid/Body/styles.d.ts +0 -3
  21. package/components/DataGrid/Body/styles.js +14 -1
  22. package/components/DataGrid/Body/useLogic/index.d.ts +1 -0
  23. package/components/DataGrid/Body/useLogic/index.js +1 -0
  24. package/components/DataGrid/Body/useLogic/useLogic.d.ts +9 -0
  25. package/components/DataGrid/Body/useLogic/useLogic.js +15 -0
  26. package/components/DataGrid/Cell/Cell.js +20 -4
  27. package/components/DataGrid/Cell/constants.d.ts +7 -0
  28. package/components/DataGrid/Cell/constants.js +8 -0
  29. package/components/DataGrid/Cell/styles.d.ts +14 -0
  30. package/components/DataGrid/Cell/styles.js +47 -0
  31. package/components/DataGrid/Cell/useLogic/useLogic.d.ts +2 -0
  32. package/components/DataGrid/Cell/useLogic/useLogic.js +3 -2
  33. package/components/DataGrid/DataGrid.js +42 -8
  34. package/components/DataGrid/Head/Head.js +1 -1
  35. package/components/DataGrid/Head/styles.js +5 -1
  36. package/components/DataGrid/Loader/styles.js +4 -0
  37. package/components/DataGrid/MobileSkeleton/MobileSkeleton.d.ts +6 -0
  38. package/components/DataGrid/MobileSkeleton/MobileSkeleton.js +10 -0
  39. package/components/DataGrid/MobileSkeleton/index.d.ts +1 -0
  40. package/components/DataGrid/MobileSkeleton/index.js +1 -0
  41. package/components/DataGrid/MobileSkeleton/styles.d.ts +17 -0
  42. package/components/DataGrid/MobileSkeleton/styles.js +37 -0
  43. package/components/DataGrid/PinnedSections/Section/styles.js +2 -2
  44. package/components/DataGrid/Row/NestedChildren/styles.js +8 -3
  45. package/components/DataGrid/Row/Row.js +25 -8
  46. package/components/DataGrid/Row/constants.d.ts +8 -0
  47. package/components/DataGrid/Row/constants.js +8 -0
  48. package/components/DataGrid/Row/styles.d.ts +4 -9
  49. package/components/DataGrid/Row/styles.js +69 -17
  50. package/components/DataGrid/Row/types.d.ts +5 -1
  51. package/components/DataGrid/Row/useLogic/hooks/index.d.ts +1 -0
  52. package/components/DataGrid/Row/useLogic/hooks/index.js +1 -0
  53. package/components/DataGrid/Row/useLogic/hooks/useMobileLogic.d.ts +5 -0
  54. package/components/DataGrid/Row/useLogic/hooks/useMobileLogic.js +15 -0
  55. package/components/DataGrid/Row/useLogic/useLogic.d.ts +868 -3
  56. package/components/DataGrid/Row/useLogic/useLogic.js +28 -13
  57. package/components/DataGrid/constants.d.ts +4 -0
  58. package/components/DataGrid/constants.js +4 -0
  59. package/components/DataGrid/index.d.ts +1 -0
  60. package/components/DataGrid/index.js +1 -0
  61. package/components/DataGrid/styles.d.ts +0 -9
  62. package/components/DataGrid/styles.js +43 -12
  63. package/components/DataGrid/types.d.ts +7 -0
  64. package/components/DataGrid/useLogic/hooks/index.d.ts +1 -1
  65. package/components/DataGrid/useLogic/hooks/index.js +1 -1
  66. package/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/index.d.ts +1 -0
  67. package/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/index.js +1 -0
  68. package/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/useDataGridMobileLogic.d.ts +16 -0
  69. package/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/useDataGridMobileLogic.js +32 -0
  70. package/components/DataGrid/useLogic/hooks/usePinnedColumns/usePinnedColumns.js +11 -3
  71. package/components/DataGrid/useLogic/useLogic.d.ts +10 -4
  72. package/components/DataGrid/useLogic/useLogic.js +17 -12
  73. package/components/DataGrid/useLogic/utils/getIsAllowHorizontalScroll/getIsAllowHorizontalScroll.js +1 -1
  74. package/components/DataGrid/utils/getDataGridCssVars/getDataGridCssVars.d.ts +2 -0
  75. package/components/DataGrid/utils/getDataGridCssVars/getDataGridCssVars.js +5 -0
  76. package/components/DataGrid/utils/getDataGridCssVars/index.d.ts +1 -0
  77. package/components/DataGrid/utils/getDataGridCssVars/index.js +1 -0
  78. package/components/DataGrid/utils/index.d.ts +1 -0
  79. package/components/DataGrid/utils/index.js +1 -0
  80. package/components/DataGridActionCell/DataGridSecondaryActions/DataGridSecondaryActions.js +1 -1
  81. package/components/DataGridInfinite/DataGridInfinite.js +5 -4
  82. package/components/DataGridInfinite/useLogic/useLogic.d.ts +7 -1
  83. package/components/DataGridInfinite/useLogic/useLogic.js +12 -2
  84. package/components/DateRangePicker/styles.js +1 -1
  85. package/components/Description/Name/styles.js +1 -1
  86. package/components/DescriptionCell/styles.js +12 -3
  87. package/components/DescriptionList/styles.js +4 -2
  88. package/components/ExpansionPanel/styles.js +1 -1
  89. package/components/InfiniteDataList/styles.js +1 -1
  90. package/components/InfiniteTreeList/TreeItem/styles.js +1 -1
  91. package/components/MenuOrganization/styles.js +2 -2
  92. package/components/NewStepper/Step/Description/styles.js +1 -1
  93. package/components/NewStepper/Step/styles.js +2 -2
  94. package/components/NewStepper/index.d.ts +1 -0
  95. package/components/NewStepper/index.js +1 -0
  96. package/components/NewStepper/public.d.ts +1 -0
  97. package/components/NewStepper/public.js +1 -0
  98. package/components/PageAside/styles.js +3 -3
  99. package/components/PageContent/PageContentHeader/styles.js +2 -2
  100. package/components/PageContent/styles.js +4 -2
  101. package/components/PageHeader/HeaderContent/styles.js +1 -1
  102. package/components/PageHeader/styles.js +2 -2
  103. package/components/PageLayoutLoader/styles.js +1 -1
  104. package/components/PageLayoutSection/PageLayoutSection.d.ts +4 -0
  105. package/components/PageLayoutSection/PageLayoutSection.js +13 -4
  106. package/components/PageLayoutSection/PageLayoutSectionContainer/styles.js +1 -1
  107. package/components/PageLayoutSection/constants.d.ts +5 -0
  108. package/components/PageLayoutSection/constants.js +6 -0
  109. package/components/PageLayoutSection/styles.d.ts +1 -1
  110. package/components/PageLayoutSection/styles.js +7 -2
  111. package/components/PagePinnableAside/styles.js +6 -6
  112. package/components/PdfViewer/PdfPage/styles.js +2 -2
  113. package/components/Radio/styles.js +4 -2
  114. package/components/RadioCard/styles.js +13 -5
  115. package/components/SideDialogActions/styles.js +1 -1
  116. package/components/SideDialogHeader/styles.js +1 -1
  117. package/components/SideDialogTitle/styles.js +1 -1
  118. package/components/Stepper/styles.js +2 -2
  119. package/components/Tag/styles.js +1 -1
  120. package/components/Tree/TreeItem/styles.js +3 -3
  121. package/components/fileUploading/FileUploaderDropzone/DropzoneWrapper/styles.js +1 -1
  122. package/components/fileUploading/FileUploaderFile/styles.js +1 -1
  123. package/components/placeholders/LoadingPlaceholder/LoadingPlaceholder.d.ts +5 -1
  124. package/components/placeholders/LoadingPlaceholder/LoadingPlaceholder.js +5 -4
  125. package/components/theme/components/MuiButton.js +1 -1
  126. package/components/theme/components/MuiDivider.d.ts +3 -0
  127. package/components/theme/components/MuiDivider.js +9 -0
  128. package/components/theme/components/MuiListItem.d.ts +3 -0
  129. package/components/theme/components/MuiListItem.js +9 -0
  130. package/components/theme/components/MuiOutlinedInput.js +2 -2
  131. package/components/theme/components/MuiPaper.js +1 -1
  132. package/components/theme/components/MuiStepConnector.js +4 -1
  133. package/components/theme/components/components.js +4 -0
  134. package/components/theme/palette/componentsColors/componentsColors.d.ts +3 -0
  135. package/components/theme/palette/componentsColors/componentsColors.js +3 -0
  136. package/node/components/BottomDrawer/styles.js +1 -1
  137. package/node/components/CardGridInfinite/Footer/styles.js +1 -1
  138. package/node/components/CheckableTag/styles.js +1 -1
  139. package/node/components/Checkbox/styles.js +4 -2
  140. package/node/components/Chip/styles.js +1 -1
  141. package/node/components/CodeField/styles.js +1 -1
  142. package/node/components/ComplianceStatus/styles.js +1 -1
  143. package/node/components/ContentState/ContentState.d.ts +1 -1
  144. package/node/components/ContentState/ContentState.js +2 -2
  145. package/node/components/ContentState/types.d.ts +4 -0
  146. package/node/components/DashboardLayout/DashboardWrapper/styles.js +1 -1
  147. package/node/components/DashboardLayout/Header/styles.js +4 -4
  148. package/node/components/DashboardLayoutSkeleton/styles.js +1 -1
  149. package/node/components/DashboardSidebar/styles.js +2 -2
  150. package/node/components/DashboardSidebarSkeleton/styles.js +1 -1
  151. package/node/components/DataGrid/Body/Body.d.ts +1 -1
  152. package/node/components/DataGrid/Body/Body.js +14 -7
  153. package/node/components/DataGrid/Body/constants.d.ts +4 -0
  154. package/node/components/DataGrid/Body/constants.js +8 -0
  155. package/node/components/DataGrid/Body/styles.d.ts +0 -3
  156. package/node/components/DataGrid/Body/styles.js +14 -1
  157. package/node/components/DataGrid/Body/useLogic/index.d.ts +1 -0
  158. package/node/components/DataGrid/{useLogic/hooks/useClassnames → Body/useLogic}/index.js +1 -1
  159. package/node/components/DataGrid/Body/useLogic/useLogic.d.ts +9 -0
  160. package/node/components/DataGrid/Body/useLogic/useLogic.js +19 -0
  161. package/node/components/DataGrid/Cell/Cell.js +18 -2
  162. package/node/components/DataGrid/Cell/constants.d.ts +7 -0
  163. package/node/components/DataGrid/Cell/constants.js +11 -0
  164. package/node/components/DataGrid/Cell/styles.d.ts +14 -0
  165. package/node/components/DataGrid/Cell/styles.js +48 -1
  166. package/node/components/DataGrid/Cell/useLogic/useLogic.d.ts +2 -0
  167. package/node/components/DataGrid/Cell/useLogic/useLogic.js +3 -2
  168. package/node/components/DataGrid/DataGrid.js +41 -7
  169. package/node/components/DataGrid/Head/Head.js +1 -1
  170. package/node/components/DataGrid/Head/styles.js +5 -1
  171. package/node/components/DataGrid/Loader/styles.js +4 -0
  172. package/node/components/DataGrid/MobileSkeleton/MobileSkeleton.d.ts +6 -0
  173. package/node/components/DataGrid/MobileSkeleton/MobileSkeleton.js +14 -0
  174. package/node/components/DataGrid/MobileSkeleton/index.d.ts +1 -0
  175. package/node/components/DataGrid/MobileSkeleton/index.js +17 -0
  176. package/node/components/DataGrid/MobileSkeleton/styles.d.ts +17 -0
  177. package/node/components/DataGrid/MobileSkeleton/styles.js +40 -0
  178. package/node/components/DataGrid/PinnedSections/Section/styles.js +2 -2
  179. package/node/components/DataGrid/Row/NestedChildren/styles.js +8 -3
  180. package/node/components/DataGrid/Row/Row.js +23 -6
  181. package/node/components/DataGrid/Row/constants.d.ts +8 -0
  182. package/node/components/DataGrid/Row/constants.js +9 -1
  183. package/node/components/DataGrid/Row/styles.d.ts +4 -9
  184. package/node/components/DataGrid/Row/styles.js +69 -17
  185. package/node/components/DataGrid/Row/types.d.ts +5 -1
  186. package/node/components/DataGrid/Row/useLogic/hooks/index.d.ts +1 -0
  187. package/node/components/DataGrid/Row/useLogic/hooks/index.js +17 -0
  188. package/node/components/DataGrid/Row/useLogic/hooks/useMobileLogic.d.ts +5 -0
  189. package/node/components/DataGrid/Row/useLogic/hooks/useMobileLogic.js +19 -0
  190. package/node/components/DataGrid/Row/useLogic/useLogic.d.ts +868 -3
  191. package/node/components/DataGrid/Row/useLogic/useLogic.js +28 -13
  192. package/node/components/DataGrid/constants.d.ts +4 -0
  193. package/node/components/DataGrid/constants.js +5 -1
  194. package/node/components/DataGrid/index.d.ts +1 -0
  195. package/node/components/DataGrid/index.js +3 -1
  196. package/node/components/DataGrid/styles.d.ts +0 -9
  197. package/node/components/DataGrid/styles.js +43 -12
  198. package/node/components/DataGrid/types.d.ts +7 -0
  199. package/node/components/DataGrid/useLogic/hooks/index.d.ts +1 -1
  200. package/node/components/DataGrid/useLogic/hooks/index.js +1 -1
  201. package/node/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/index.d.ts +1 -0
  202. package/node/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/index.js +17 -0
  203. package/node/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/useDataGridMobileLogic.d.ts +16 -0
  204. package/node/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/useDataGridMobileLogic.js +36 -0
  205. package/node/components/DataGrid/useLogic/hooks/usePinnedColumns/usePinnedColumns.js +11 -3
  206. package/node/components/DataGrid/useLogic/useLogic.d.ts +10 -4
  207. package/node/components/DataGrid/useLogic/useLogic.js +19 -14
  208. package/node/components/DataGrid/useLogic/utils/getIsAllowHorizontalScroll/getIsAllowHorizontalScroll.js +1 -1
  209. package/node/components/DataGrid/utils/getDataGridCssVars/getDataGridCssVars.d.ts +2 -0
  210. package/node/components/DataGrid/utils/getDataGridCssVars/getDataGridCssVars.js +9 -0
  211. package/node/components/DataGrid/utils/getDataGridCssVars/index.d.ts +1 -0
  212. package/node/components/DataGrid/utils/getDataGridCssVars/index.js +5 -0
  213. package/node/components/DataGrid/utils/index.d.ts +1 -0
  214. package/node/components/DataGrid/utils/index.js +3 -1
  215. package/node/components/DataGridActionCell/DataGridSecondaryActions/DataGridSecondaryActions.js +1 -1
  216. package/node/components/DataGridInfinite/DataGridInfinite.js +5 -4
  217. package/node/components/DataGridInfinite/useLogic/useLogic.d.ts +7 -1
  218. package/node/components/DataGridInfinite/useLogic/useLogic.js +11 -1
  219. package/node/components/DateRangePicker/styles.js +1 -1
  220. package/node/components/Description/Name/styles.js +1 -1
  221. package/node/components/DescriptionCell/styles.js +15 -6
  222. package/node/components/DescriptionList/styles.js +4 -2
  223. package/node/components/ExpansionPanel/styles.js +1 -1
  224. package/node/components/InfiniteDataList/styles.js +1 -1
  225. package/node/components/InfiniteTreeList/TreeItem/styles.js +1 -1
  226. package/node/components/MenuOrganization/styles.js +2 -2
  227. package/node/components/NewStepper/Step/Description/styles.js +1 -1
  228. package/node/components/NewStepper/Step/styles.js +2 -2
  229. package/node/components/NewStepper/index.d.ts +1 -0
  230. package/node/components/NewStepper/index.js +3 -1
  231. package/node/components/NewStepper/public.d.ts +1 -0
  232. package/node/components/NewStepper/public.js +3 -1
  233. package/node/components/PageAside/styles.js +3 -3
  234. package/node/components/PageContent/PageContentHeader/styles.js +2 -2
  235. package/node/components/PageContent/styles.js +4 -2
  236. package/node/components/PageHeader/HeaderContent/styles.js +1 -1
  237. package/node/components/PageHeader/styles.js +2 -2
  238. package/node/components/PageLayoutLoader/styles.js +1 -1
  239. package/node/components/PageLayoutSection/PageLayoutSection.d.ts +4 -0
  240. package/node/components/PageLayoutSection/PageLayoutSection.js +12 -3
  241. package/node/components/PageLayoutSection/PageLayoutSectionContainer/styles.js +1 -1
  242. package/node/components/PageLayoutSection/constants.d.ts +5 -0
  243. package/node/components/PageLayoutSection/constants.js +9 -0
  244. package/node/components/PageLayoutSection/styles.d.ts +1 -1
  245. package/node/components/PageLayoutSection/styles.js +8 -3
  246. package/node/components/PagePinnableAside/styles.js +6 -6
  247. package/node/components/PdfViewer/PdfPage/styles.js +2 -2
  248. package/node/components/Radio/styles.js +4 -2
  249. package/node/components/RadioCard/styles.js +13 -5
  250. package/node/components/SideDialogActions/styles.js +1 -1
  251. package/node/components/SideDialogHeader/styles.js +1 -1
  252. package/node/components/SideDialogTitle/styles.js +1 -1
  253. package/node/components/Stepper/styles.js +2 -2
  254. package/node/components/Tag/styles.js +1 -1
  255. package/node/components/Tree/TreeItem/styles.js +3 -3
  256. package/node/components/fileUploading/FileUploaderDropzone/DropzoneWrapper/styles.js +1 -1
  257. package/node/components/fileUploading/FileUploaderFile/styles.js +1 -1
  258. package/node/components/placeholders/LoadingPlaceholder/LoadingPlaceholder.d.ts +5 -1
  259. package/node/components/placeholders/LoadingPlaceholder/LoadingPlaceholder.js +5 -4
  260. package/node/components/theme/components/MuiButton.js +1 -1
  261. package/node/components/theme/components/MuiDivider.d.ts +3 -0
  262. package/node/components/theme/components/MuiDivider.js +12 -0
  263. package/node/components/theme/components/MuiListItem.d.ts +3 -0
  264. package/node/components/theme/components/MuiListItem.js +12 -0
  265. package/node/components/theme/components/MuiOutlinedInput.js +2 -2
  266. package/node/components/theme/components/MuiPaper.js +1 -1
  267. package/node/components/theme/components/MuiStepConnector.js +4 -1
  268. package/node/components/theme/components/components.js +4 -0
  269. package/node/components/theme/palette/componentsColors/componentsColors.d.ts +3 -0
  270. package/node/components/theme/palette/componentsColors/componentsColors.js +3 -0
  271. package/package.json +20 -1
  272. package/components/DataGrid/useLogic/hooks/useClassnames/index.d.ts +0 -1
  273. package/components/DataGrid/useLogic/hooks/useClassnames/index.js +0 -1
  274. package/components/DataGrid/useLogic/hooks/useClassnames/useClassnames.d.ts +0 -12
  275. package/components/DataGrid/useLogic/hooks/useClassnames/useClassnames.js +0 -14
  276. package/node/components/DataGrid/useLogic/hooks/useClassnames/index.d.ts +0 -1
  277. package/node/components/DataGrid/useLogic/hooks/useClassnames/useClassnames.d.ts +0 -12
  278. 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.grey[300]};
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.grey[300]};
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.grey[400]};
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.grey[400]};
54
- border-left: 1px solid ${({ theme }) => theme.palette.grey[400]};
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, { "$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
  };
@@ -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: ${({ $level }) => `translateX(calc(${ROOT_ACTION_CELL_WIDTH}px * ${$level} - ${TREE_LINE_WIDTH}px))`};
18
+ transform: translateX(calc(${ROOT_ACTION_CELL_WIDTH}px * var(--level) - ${TREE_LINE_WIDTH}px));
18
19
 
19
- display: ${({ $isShowConnector }) => ($isShowConnector ? 'block' : 'none')};
20
+ display: none;
20
21
 
21
22
  width: 0;
22
23
  height: 100%;
23
24
 
24
- border-left: 1px solid ${({ theme }) => theme.palette.grey[400]};
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: ${({ theme, $isSelected }) => $isSelected ? theme.palette.primary[100] : 'transparent'};
55
+ background-color: transparent;
34
56
 
35
57
  &::before {
36
58
  content: '';
37
59
 
38
60
  position: absolute;
39
61
  top: 0;
40
- transform: ${({ $level }) => `translateX(calc(${ROOT_ACTION_CELL_WIDTH}px * ${$level} - ${TREE_LINE_WIDTH}px))`};
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.grey[400]};
48
- border-left: 1px solid ${({ theme }) => theme.palette.grey[400]};
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
- cursor: ${({ $isHovered }) => ($isHovered ? 'pointer' : 'default')};
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
- background-color: ${({ theme, $isSelected }) => $isSelected
63
- ? theme.palette.primary[100]
64
- : theme.palette.background.elementHover};
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
- margin-left: ${({ $level }) => `${$level * ROOT_ACTION_CELL_WIDTH}px`};
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,5 @@
1
+ export declare const useMobileLogic: () => {
2
+ isDrawerOpen: boolean;
3
+ handleOpenDrawer: () => void;
4
+ handleCloseDrawer: () => void;
5
+ };
@@ -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
+ };