@astral/ui 4.74.0 → 4.75.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 (469) hide show
  1. package/components/CardGridInfinite/CardGridInfinite.js +11 -2
  2. package/components/CardGridInfinite/styles.js +4 -0
  3. package/components/CardGridInfinite/useLogic/useLogic.d.ts +1 -1
  4. package/components/CardGridInfinite/useLogic/useLogic.js +3 -13
  5. package/components/Chevron/Chevron.d.ts +1 -1
  6. package/components/ConfirmAction/ConfirmAction.js +3 -3
  7. package/components/ConfirmAction/constants.d.ts +1 -0
  8. package/components/ConfirmAction/constants.js +1 -0
  9. package/components/ConfirmAction/styles.js +13 -0
  10. package/components/ConfirmAction/types.d.ts +1 -1
  11. package/components/DataGrid/Body/Body.d.ts +1 -1
  12. package/components/DataGrid/Body/Body.js +5 -3
  13. package/components/DataGrid/Body/types.d.ts +5 -0
  14. package/components/DataGrid/Cell/Cell.d.ts +9 -1
  15. package/components/DataGrid/Cell/Cell.js +16 -2
  16. package/components/DataGrid/CustomRowWrapper/CustomRowWrapper.d.ts +19 -0
  17. package/components/DataGrid/CustomRowWrapper/CustomRowWrapper.js +15 -0
  18. package/components/DataGrid/CustomRowWrapper/index.d.ts +1 -0
  19. package/components/DataGrid/CustomRowWrapper/index.js +1 -0
  20. package/components/DataGrid/DataGrid.js +14 -3
  21. package/components/DataGrid/DataGridContext/DataGridContext.d.ts +9 -5
  22. package/components/DataGrid/DataGridContext/DataGridContext.js +7 -4
  23. package/components/DataGrid/DataGridContext/DataGridProvider/DataGridProvider.d.ts +3 -4
  24. package/components/DataGrid/DataGridContext/DataGridProvider/DataGridProvider.js +18 -48
  25. package/components/DataGrid/DataGridStorageContext/DataGridStorageContext.d.ts +29 -0
  26. package/components/DataGrid/DataGridStorageContext/DataGridStorageContext.js +28 -0
  27. package/components/DataGrid/DataGridStorageContext/DataGridStorageProvider/DataGridStorageProvider.d.ts +6 -0
  28. package/components/DataGrid/DataGridStorageContext/DataGridStorageProvider/DataGridStorageProvider.js +12 -0
  29. package/components/DataGrid/DataGridStorageContext/DataGridStorageProvider/index.d.ts +1 -0
  30. package/components/DataGrid/DataGridStorageContext/DataGridStorageProvider/index.js +1 -0
  31. package/components/DataGrid/DataGridStorageContext/index.d.ts +2 -0
  32. package/components/DataGrid/DataGridStorageContext/index.js +2 -0
  33. package/components/DataGrid/MobileSkeleton/MobileSkeleton.d.ts +2 -1
  34. package/components/DataGrid/MobileSkeleton/MobileSkeleton.js +21 -3
  35. package/components/DataGrid/MobileSkeleton/styles.js +12 -0
  36. package/components/DataGrid/Row/NestedChildren/NestedChildren.d.ts +1 -5
  37. package/components/DataGrid/Row/NestedChildren/NestedChildren.js +17 -7
  38. package/components/DataGrid/Row/NestedChildren/constants.d.ts +6 -0
  39. package/components/DataGrid/Row/NestedChildren/constants.js +7 -0
  40. package/components/DataGrid/Row/NestedChildren/styles.js +42 -3
  41. package/components/DataGrid/Row/NestedChildren/useLogic/useLogic.d.ts +1 -1
  42. package/components/DataGrid/Row/NestedChildren/useLogic/useLogic.js +4 -6
  43. package/components/DataGrid/Row/Row.js +34 -37
  44. package/components/DataGrid/Row/RowContext/RowContext.d.ts +10 -1
  45. package/components/DataGrid/Row/RowContext/RowContext.js +9 -0
  46. package/components/DataGrid/Row/RowContext/RowProvider/RowProvider.d.ts +3 -2
  47. package/components/DataGrid/Row/RowContext/RowProvider/RowProvider.js +25 -2
  48. package/components/DataGrid/Row/constants.d.ts +6 -0
  49. package/components/DataGrid/Row/constants.js +6 -0
  50. package/components/DataGrid/Row/styles.js +102 -3
  51. package/components/DataGrid/Row/useLogic/hooks/useMobileLogic.d.ts +1 -0
  52. package/components/DataGrid/Row/useLogic/hooks/useMobileLogic.js +1 -1
  53. package/components/DataGrid/Row/useLogic/useLogic.d.ts +5 -2
  54. package/components/DataGrid/Row/useLogic/useLogic.js +21 -19
  55. package/components/DataGrid/RowBase/GroupCell/GroupCell.d.ts +2 -0
  56. package/components/DataGrid/RowBase/GroupCell/GroupCell.js +22 -0
  57. package/components/DataGrid/RowBase/GroupCell/constants.d.ts +4 -0
  58. package/components/DataGrid/RowBase/GroupCell/constants.js +5 -0
  59. package/components/DataGrid/RowBase/GroupCell/index.d.ts +1 -0
  60. package/components/DataGrid/RowBase/GroupCell/index.js +1 -0
  61. package/components/DataGrid/RowBase/GroupCell/styles.d.ts +12 -0
  62. package/components/DataGrid/RowBase/GroupCell/styles.js +16 -0
  63. package/components/DataGrid/RowBase/GroupCell/types.d.ts +11 -0
  64. package/components/DataGrid/RowBase/GroupCell/types.js +1 -0
  65. package/components/DataGrid/RowBase/RowBase.d.ts +3 -0
  66. package/components/DataGrid/RowBase/RowBase.js +69 -0
  67. package/components/DataGrid/RowBase/constants.d.ts +9 -0
  68. package/components/DataGrid/RowBase/constants.js +10 -0
  69. package/components/DataGrid/RowBase/index.d.ts +3 -0
  70. package/components/DataGrid/RowBase/index.js +2 -0
  71. package/components/DataGrid/RowBase/styles.d.ts +17 -0
  72. package/components/DataGrid/RowBase/styles.js +87 -0
  73. package/components/DataGrid/RowBase/types.d.ts +92 -0
  74. package/components/DataGrid/RowBase/types.js +1 -0
  75. package/components/DataGrid/RowBase/useLogic/useLogic.d.ts +46 -0
  76. package/components/DataGrid/RowBase/useLogic/useLogic.js +90 -0
  77. package/components/DataGrid/constants.d.ts +8 -0
  78. package/components/DataGrid/constants.js +8 -0
  79. package/components/DataGrid/index.d.ts +3 -0
  80. package/components/DataGrid/index.js +3 -0
  81. package/components/DataGrid/styles.js +14 -0
  82. package/components/DataGrid/tests/performance/testDataGridPerformance.d.ts +21 -0
  83. package/components/DataGrid/tests/performance/testDataGridPerformance.js +102 -0
  84. package/components/DataGrid/types.d.ts +11 -0
  85. package/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/useDataGridMobileLogic.d.ts +3 -1
  86. package/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/useDataGridMobileLogic.js +2 -1
  87. package/components/DataGrid/useLogic/useLogic.d.ts +4 -1
  88. package/components/DataGrid/useLogic/useLogic.js +20 -7
  89. package/components/DataGridActionCell/DataGridMainActions/Action/MainIconButton/MainIconButton.js +4 -2
  90. package/components/DataGridActionCell/DataGridMainActions/Action/MobileMainButton/MobileMainButton.js +4 -2
  91. package/components/DataGridActionCell/types.d.ts +4 -0
  92. package/components/DataGridCollapsibleRow/DataGridCollapsibleRow.d.ts +2 -0
  93. package/components/DataGridCollapsibleRow/DataGridCollapsibleRow.js +29 -0
  94. package/components/DataGridCollapsibleRow/constants.d.ts +11 -0
  95. package/components/DataGridCollapsibleRow/constants.js +12 -0
  96. package/components/DataGridCollapsibleRow/index.d.ts +2 -0
  97. package/components/DataGridCollapsibleRow/index.js +1 -0
  98. package/components/DataGridCollapsibleRow/public.d.ts +2 -0
  99. package/components/DataGridCollapsibleRow/public.js +1 -0
  100. package/components/DataGridCollapsibleRow/styles.d.ts +42 -0
  101. package/components/DataGridCollapsibleRow/styles.js +99 -0
  102. package/components/DataGridCollapsibleRow/types.d.ts +19 -0
  103. package/components/DataGridCollapsibleRow/types.js +1 -0
  104. package/components/DataGridCollapsibleRow/useLogic/index.js +1 -0
  105. package/components/DataGridCollapsibleRow/useLogic/useLogic.d.ts +29 -0
  106. package/components/DataGridCollapsibleRow/useLogic/useLogic.js +62 -0
  107. package/components/DataGridInfinite/DataGridInfinite.js +37 -27
  108. package/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContext.d.ts +23 -0
  109. package/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContext.js +21 -0
  110. package/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContextProvider/DataGridInfiniteContextProvider.d.ts +7 -0
  111. package/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContextProvider/DataGridInfiniteContextProvider.js +5 -0
  112. package/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContextProvider/index.d.ts +1 -0
  113. package/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContextProvider/index.js +1 -0
  114. package/components/DataGridInfinite/DataGridInfiniteContext/index.d.ts +2 -0
  115. package/components/DataGridInfinite/DataGridInfiniteContext/index.js +2 -0
  116. package/components/DataGridInfinite/List/List.js +2 -1
  117. package/components/DataGridInfinite/List/constants.d.ts +3 -0
  118. package/components/DataGridInfinite/List/constants.js +4 -0
  119. package/components/DataGridInfinite/List/index.d.ts +1 -0
  120. package/components/DataGridInfinite/List/index.js +1 -0
  121. package/components/DataGridInfinite/Row/Row.d.ts +2 -0
  122. package/components/DataGridInfinite/Row/Row.js +10 -0
  123. package/components/DataGridInfinite/Row/index.d.ts +1 -0
  124. package/components/DataGridInfinite/Row/index.js +1 -0
  125. package/components/DataGridInfinite/Row/types.d.ts +2 -0
  126. package/components/DataGridInfinite/Row/types.js +1 -0
  127. package/components/DataGridInfinite/Row/useLogic/index.d.ts +1 -0
  128. package/components/DataGridInfinite/Row/useLogic/index.js +1 -0
  129. package/components/DataGridInfinite/Row/useLogic/useLogic.d.ts +33 -0
  130. package/components/DataGridInfinite/Row/useLogic/useLogic.js +35 -0
  131. package/components/DataGridInfinite/faker.js +1 -1
  132. package/components/DataGridInfinite/styles.d.ts +6 -0
  133. package/components/DataGridInfinite/styles.js +11 -0
  134. package/components/DataGridInfinite/useLogic/useLogic.d.ts +6 -3
  135. package/components/DataGridInfinite/useLogic/useLogic.js +29 -10
  136. package/components/DialogActions/styles.js +2 -0
  137. package/components/DonutChart/DonutChart.d.ts +2 -0
  138. package/components/DonutChart/DonutChart.js +9 -0
  139. package/components/DonutChart/constants.d.ts +15 -0
  140. package/components/DonutChart/constants.js +16 -0
  141. package/components/DonutChart/index.d.ts +3 -0
  142. package/components/DonutChart/index.js +2 -0
  143. package/components/DonutChart/public.d.ts +3 -0
  144. package/components/DonutChart/public.js +2 -0
  145. package/components/DonutChart/styles.d.ts +21 -0
  146. package/components/DonutChart/styles.js +41 -0
  147. package/components/DonutChart/types.d.ts +27 -0
  148. package/components/DonutChart/types.js +1 -0
  149. package/components/DonutChart/useLogic/hooks/index.d.ts +1 -0
  150. package/components/DonutChart/useLogic/hooks/index.js +1 -0
  151. package/components/DonutChart/useLogic/hooks/useRenderWidth/index.d.ts +1 -0
  152. package/components/DonutChart/useLogic/hooks/useRenderWidth/index.js +1 -0
  153. package/components/DonutChart/useLogic/hooks/useRenderWidth/useRenderWidth.d.ts +9 -0
  154. package/components/DonutChart/useLogic/hooks/useRenderWidth/useRenderWidth.js +30 -0
  155. package/components/DonutChart/useLogic/index.d.ts +1 -0
  156. package/components/DonutChart/useLogic/index.js +1 -0
  157. package/components/DonutChart/useLogic/useLogic.d.ts +15 -0
  158. package/components/DonutChart/useLogic/useLogic.js +40 -0
  159. package/components/DonutChart/useLogic/utils/getDonutChartCssVars/getDonutChartCssVars.d.ts +16 -0
  160. package/components/DonutChart/useLogic/utils/getDonutChartCssVars/getDonutChartCssVars.js +10 -0
  161. package/components/DonutChart/useLogic/utils/getDonutChartCssVars/index.d.ts +1 -0
  162. package/components/DonutChart/useLogic/utils/getDonutChartCssVars/index.js +1 -0
  163. package/components/DonutChart/useLogic/utils/getGeometry/getGeometry.d.ts +10 -0
  164. package/components/DonutChart/useLogic/utils/getGeometry/getGeometry.js +13 -0
  165. package/components/DonutChart/useLogic/utils/getGeometry/index.d.ts +1 -0
  166. package/components/DonutChart/useLogic/utils/getGeometry/index.js +1 -0
  167. package/components/DonutChart/useLogic/utils/getMeterAriaValue/getMeterAriaValue.d.ts +13 -0
  168. package/components/DonutChart/useLogic/utils/getMeterAriaValue/getMeterAriaValue.js +22 -0
  169. package/components/DonutChart/useLogic/utils/getMeterAriaValue/index.d.ts +1 -0
  170. package/components/DonutChart/useLogic/utils/getMeterAriaValue/index.js +1 -0
  171. package/components/DonutChart/useLogic/utils/getProgressCirclePath/getProgressCirclePath.d.ts +9 -0
  172. package/components/DonutChart/useLogic/utils/getProgressCirclePath/getProgressCirclePath.js +29 -0
  173. package/components/DonutChart/useLogic/utils/getProgressCirclePath/index.d.ts +1 -0
  174. package/components/DonutChart/useLogic/utils/getProgressCirclePath/index.js +1 -0
  175. package/components/DonutChart/useLogic/utils/getProgressOffset/getProgressOffset.d.ts +8 -0
  176. package/components/DonutChart/useLogic/utils/getProgressOffset/getProgressOffset.js +21 -0
  177. package/components/DonutChart/useLogic/utils/getProgressOffset/index.d.ts +1 -0
  178. package/components/DonutChart/useLogic/utils/getProgressOffset/index.js +1 -0
  179. package/components/DonutChart/useLogic/utils/getProgressPercent/getProgressPercent.d.ts +8 -0
  180. package/components/DonutChart/useLogic/utils/getProgressPercent/getProgressPercent.js +16 -0
  181. package/components/DonutChart/useLogic/utils/getProgressPercent/index.d.ts +1 -0
  182. package/components/DonutChart/useLogic/utils/getProgressPercent/index.js +1 -0
  183. package/components/DonutChart/useLogic/utils/index.d.ts +6 -0
  184. package/components/DonutChart/useLogic/utils/index.js +6 -0
  185. package/components/ExpansionPanel/Summary/styles.d.ts +1 -1
  186. package/components/MenuOrganization/OrganizationButton/styles.d.ts +1 -1
  187. package/components/NewStepper/StepIcon/StepIcon.js +3 -1
  188. package/components/NewStepper/StepIcon/useLogic/index.d.ts +1 -0
  189. package/components/NewStepper/StepIcon/useLogic/index.js +1 -0
  190. package/components/NewStepper/StepIcon/useLogic/useLogic.d.ts +8 -0
  191. package/components/NewStepper/StepIcon/useLogic/useLogic.js +6 -0
  192. package/components/PageContent/PageContent.js +23 -5
  193. package/components/PageContent/constants.d.ts +2 -0
  194. package/components/PageContent/constants.js +2 -0
  195. package/components/PageContent/styles.d.ts +0 -2
  196. package/components/PageContent/styles.js +17 -11
  197. package/components/PageContent/types.d.ts +4 -0
  198. package/components/Profile/styles.d.ts +1 -1
  199. package/components/constants/classnames.d.ts +1 -0
  200. package/components/constants/classnames.js +2 -0
  201. package/components/constants/index.d.ts +1 -0
  202. package/components/constants/index.js +1 -0
  203. package/components/fileUploading/FileUploaderDropzone/HintPlaceholder/HintPlaceholder.d.ts +2 -1
  204. package/components/fileUploading/FileUploaderDropzone/HintPlaceholder/HintPlaceholder.js +4 -1
  205. package/components/fileUploading/FileUploaderDropzone/HintPlaceholder/useLogic/useLogic.d.ts +5 -4
  206. package/components/fileUploading/PreviewFileUploaderDropZone/HintPlaceholder/HintPlaceholder.js +11 -2
  207. package/components/fileUploading/PreviewFileUploaderDropZone/HintPlaceholder/useLogic/useLogic.d.ts +5 -5
  208. package/components/fileUploading/hooks/useFileUploader/useFileUploader.d.ts +1 -1
  209. package/components/fileUploading/hooks/usePreviewFileUploader/usePreviewFileUploader.d.ts +1 -1
  210. package/components/fileUploading/types.d.ts +2 -2
  211. package/components/useProfiler/index.d.ts +1 -0
  212. package/components/useProfiler/index.js +1 -0
  213. package/components/useProfiler/useProfiler.d.ts +14 -0
  214. package/components/useProfiler/useProfiler.js +46 -0
  215. package/components/useProfiler/utils/index.d.ts +1 -0
  216. package/components/useProfiler/utils/index.js +1 -0
  217. package/components/useProfiler/utils/shallowEqual/index.d.ts +1 -0
  218. package/components/useProfiler/utils/shallowEqual/index.js +1 -0
  219. package/components/useProfiler/utils/shallowEqual/shallowEqual.d.ts +5 -0
  220. package/components/useProfiler/utils/shallowEqual/shallowEqual.js +26 -0
  221. package/hook-form/FormFilters/FormFilters.js +1 -1
  222. package/hook-form/FormFilters/FormFiltersSkeleton/FormFiltersSkeleton.d.ts +5 -1
  223. package/hook-form/FormFilters/FormFiltersSkeleton/FormFiltersSkeleton.js +4 -3
  224. package/hook-form/FormFilters/FormQuickFiltersSkeleton/FormQuickFiltersSkeleton.d.ts +1 -0
  225. package/hook-form/FormFilters/FormQuickFiltersSkeleton/FormQuickFiltersSkeleton.js +9 -0
  226. package/hook-form/FormFilters/FormQuickFiltersSkeleton/index.d.ts +1 -0
  227. package/hook-form/FormFilters/FormQuickFiltersSkeleton/index.js +1 -0
  228. package/hook-form/FormFilters/FormQuickFiltersSkeleton/styles.d.ts +5 -0
  229. package/hook-form/FormFilters/FormQuickFiltersSkeleton/styles.js +5 -0
  230. package/node/components/CardGridInfinite/CardGridInfinite.js +13 -4
  231. package/node/components/CardGridInfinite/styles.js +4 -0
  232. package/node/components/CardGridInfinite/useLogic/useLogic.d.ts +1 -1
  233. package/node/components/CardGridInfinite/useLogic/useLogic.js +1 -11
  234. package/node/components/Chevron/Chevron.d.ts +1 -1
  235. package/node/components/ConfirmAction/ConfirmAction.js +2 -2
  236. package/node/components/ConfirmAction/constants.d.ts +1 -0
  237. package/node/components/ConfirmAction/constants.js +2 -1
  238. package/node/components/ConfirmAction/styles.js +13 -0
  239. package/node/components/ConfirmAction/types.d.ts +1 -1
  240. package/node/components/DataGrid/Body/Body.d.ts +1 -1
  241. package/node/components/DataGrid/Body/Body.js +5 -3
  242. package/node/components/DataGrid/Body/types.d.ts +5 -0
  243. package/node/components/DataGrid/Cell/Cell.d.ts +9 -1
  244. package/node/components/DataGrid/Cell/Cell.js +16 -2
  245. package/node/components/DataGrid/CustomRowWrapper/CustomRowWrapper.d.ts +19 -0
  246. package/node/components/DataGrid/CustomRowWrapper/CustomRowWrapper.js +18 -0
  247. package/node/components/DataGrid/CustomRowWrapper/index.d.ts +1 -0
  248. package/node/components/DataGrid/CustomRowWrapper/index.js +5 -0
  249. package/node/components/DataGrid/DataGrid.js +27 -16
  250. package/node/components/DataGrid/DataGridContext/DataGridContext.d.ts +9 -5
  251. package/node/components/DataGrid/DataGridContext/DataGridContext.js +7 -4
  252. package/node/components/DataGrid/DataGridContext/DataGridProvider/DataGridProvider.d.ts +3 -4
  253. package/node/components/DataGrid/DataGridContext/DataGridProvider/DataGridProvider.js +17 -47
  254. package/node/components/DataGrid/DataGridStorageContext/DataGridStorageContext.d.ts +29 -0
  255. package/node/components/DataGrid/DataGridStorageContext/DataGridStorageContext.js +31 -0
  256. package/node/components/DataGrid/DataGridStorageContext/DataGridStorageProvider/DataGridStorageProvider.d.ts +6 -0
  257. package/node/components/DataGrid/DataGridStorageContext/DataGridStorageProvider/DataGridStorageProvider.js +16 -0
  258. package/node/components/DataGrid/DataGridStorageContext/DataGridStorageProvider/index.d.ts +1 -0
  259. package/node/components/DataGrid/DataGridStorageContext/DataGridStorageProvider/index.js +17 -0
  260. package/node/components/DataGrid/DataGridStorageContext/index.d.ts +2 -0
  261. package/node/components/DataGrid/DataGridStorageContext/index.js +18 -0
  262. package/node/components/DataGrid/MobileSkeleton/MobileSkeleton.d.ts +2 -1
  263. package/node/components/DataGrid/MobileSkeleton/MobileSkeleton.js +21 -3
  264. package/node/components/DataGrid/MobileSkeleton/styles.js +12 -0
  265. package/node/components/DataGrid/Row/NestedChildren/NestedChildren.d.ts +1 -5
  266. package/node/components/DataGrid/Row/NestedChildren/NestedChildren.js +18 -7
  267. package/node/components/DataGrid/Row/NestedChildren/constants.d.ts +6 -0
  268. package/node/components/DataGrid/Row/NestedChildren/constants.js +10 -0
  269. package/node/components/DataGrid/Row/NestedChildren/styles.js +41 -2
  270. package/node/components/DataGrid/Row/NestedChildren/useLogic/useLogic.d.ts +1 -1
  271. package/node/components/DataGrid/Row/NestedChildren/useLogic/useLogic.js +3 -5
  272. package/node/components/DataGrid/Row/Row.js +33 -36
  273. package/node/components/DataGrid/Row/RowContext/RowContext.d.ts +10 -1
  274. package/node/components/DataGrid/Row/RowContext/RowContext.js +9 -0
  275. package/node/components/DataGrid/Row/RowContext/RowProvider/RowProvider.d.ts +3 -2
  276. package/node/components/DataGrid/Row/RowContext/RowProvider/RowProvider.js +25 -2
  277. package/node/components/DataGrid/Row/constants.d.ts +6 -0
  278. package/node/components/DataGrid/Row/constants.js +6 -0
  279. package/node/components/DataGrid/Row/styles.js +99 -0
  280. package/node/components/DataGrid/Row/useLogic/hooks/useMobileLogic.d.ts +1 -0
  281. package/node/components/DataGrid/Row/useLogic/hooks/useMobileLogic.js +1 -1
  282. package/node/components/DataGrid/Row/useLogic/useLogic.d.ts +5 -2
  283. package/node/components/DataGrid/Row/useLogic/useLogic.js +20 -18
  284. package/node/components/DataGrid/RowBase/GroupCell/GroupCell.d.ts +2 -0
  285. package/node/components/DataGrid/RowBase/GroupCell/GroupCell.js +26 -0
  286. package/node/components/DataGrid/RowBase/GroupCell/constants.d.ts +4 -0
  287. package/node/components/DataGrid/RowBase/GroupCell/constants.js +8 -0
  288. package/node/components/DataGrid/RowBase/GroupCell/index.d.ts +1 -0
  289. package/node/components/DataGrid/RowBase/GroupCell/index.js +5 -0
  290. package/node/components/DataGrid/RowBase/GroupCell/styles.d.ts +12 -0
  291. package/node/components/DataGrid/RowBase/GroupCell/styles.js +19 -0
  292. package/node/components/DataGrid/RowBase/GroupCell/types.d.ts +11 -0
  293. package/node/components/DataGrid/RowBase/GroupCell/types.js +2 -0
  294. package/node/components/DataGrid/RowBase/RowBase.d.ts +3 -0
  295. package/node/components/DataGrid/RowBase/RowBase.js +72 -0
  296. package/node/components/DataGrid/RowBase/constants.d.ts +9 -0
  297. package/node/components/DataGrid/RowBase/constants.js +13 -0
  298. package/node/components/DataGrid/RowBase/index.d.ts +3 -0
  299. package/node/components/DataGrid/RowBase/index.js +7 -0
  300. package/node/components/DataGrid/RowBase/styles.d.ts +17 -0
  301. package/node/components/DataGrid/RowBase/styles.js +90 -0
  302. package/node/components/DataGrid/RowBase/types.d.ts +92 -0
  303. package/node/components/DataGrid/RowBase/types.js +2 -0
  304. package/node/components/DataGrid/RowBase/useLogic/index.d.ts +1 -0
  305. package/node/components/DataGrid/RowBase/useLogic/useLogic.d.ts +46 -0
  306. package/node/components/DataGrid/RowBase/useLogic/useLogic.js +94 -0
  307. package/node/components/DataGrid/constants.d.ts +8 -0
  308. package/node/components/DataGrid/constants.js +9 -1
  309. package/node/components/DataGrid/index.d.ts +3 -0
  310. package/node/components/DataGrid/index.js +7 -1
  311. package/node/components/DataGrid/styles.js +40 -26
  312. package/node/components/DataGrid/tests/performance/testDataGridPerformance.d.ts +21 -0
  313. package/node/components/DataGrid/tests/performance/testDataGridPerformance.js +106 -0
  314. package/node/components/DataGrid/types.d.ts +11 -0
  315. package/node/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/useDataGridMobileLogic.d.ts +3 -1
  316. package/node/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/useDataGridMobileLogic.js +2 -1
  317. package/node/components/DataGrid/useLogic/useLogic.d.ts +4 -1
  318. package/node/components/DataGrid/useLogic/useLogic.js +19 -6
  319. package/node/components/DataGridActionCell/DataGridMainActions/Action/MainIconButton/MainIconButton.js +4 -2
  320. package/node/components/DataGridActionCell/DataGridMainActions/Action/MobileMainButton/MobileMainButton.js +4 -2
  321. package/node/components/DataGridActionCell/types.d.ts +4 -0
  322. package/node/components/DataGridCollapsibleRow/DataGridCollapsibleRow.d.ts +2 -0
  323. package/node/components/DataGridCollapsibleRow/DataGridCollapsibleRow.js +33 -0
  324. package/node/components/DataGridCollapsibleRow/constants.d.ts +11 -0
  325. package/node/components/DataGridCollapsibleRow/constants.js +15 -0
  326. package/node/components/DataGridCollapsibleRow/index.d.ts +2 -0
  327. package/node/components/DataGridCollapsibleRow/index.js +5 -0
  328. package/node/components/DataGridCollapsibleRow/public.d.ts +2 -0
  329. package/node/components/DataGridCollapsibleRow/public.js +5 -0
  330. package/node/components/DataGridCollapsibleRow/styles.d.ts +42 -0
  331. package/node/components/DataGridCollapsibleRow/styles.js +102 -0
  332. package/node/components/DataGridCollapsibleRow/types.d.ts +19 -0
  333. package/node/components/DataGridCollapsibleRow/types.js +2 -0
  334. package/node/components/DataGridCollapsibleRow/useLogic/index.d.ts +1 -0
  335. package/node/components/DataGridCollapsibleRow/useLogic/index.js +17 -0
  336. package/node/components/DataGridCollapsibleRow/useLogic/useLogic.d.ts +29 -0
  337. package/node/components/DataGridCollapsibleRow/useLogic/useLogic.js +66 -0
  338. package/node/components/DataGridInfinite/DataGridInfinite.js +45 -35
  339. package/node/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContext.d.ts +23 -0
  340. package/node/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContext.js +24 -0
  341. package/node/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContextProvider/DataGridInfiniteContextProvider.d.ts +7 -0
  342. package/node/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContextProvider/DataGridInfiniteContextProvider.js +9 -0
  343. package/node/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContextProvider/index.d.ts +1 -0
  344. package/node/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContextProvider/index.js +17 -0
  345. package/node/components/DataGridInfinite/DataGridInfiniteContext/index.d.ts +2 -0
  346. package/node/components/DataGridInfinite/DataGridInfiniteContext/index.js +18 -0
  347. package/node/components/DataGridInfinite/List/List.js +2 -1
  348. package/node/components/DataGridInfinite/List/constants.d.ts +3 -0
  349. package/node/components/DataGridInfinite/List/constants.js +7 -0
  350. package/node/components/DataGridInfinite/List/index.d.ts +1 -0
  351. package/node/components/DataGridInfinite/List/index.js +3 -0
  352. package/node/components/DataGridInfinite/Row/Row.d.ts +2 -0
  353. package/node/components/DataGridInfinite/Row/Row.js +14 -0
  354. package/node/components/DataGridInfinite/Row/index.d.ts +1 -0
  355. package/node/components/DataGridInfinite/Row/index.js +17 -0
  356. package/node/components/DataGridInfinite/Row/types.d.ts +2 -0
  357. package/node/components/DataGridInfinite/Row/types.js +2 -0
  358. package/node/components/DataGridInfinite/Row/useLogic/index.d.ts +1 -0
  359. package/node/components/DataGridInfinite/Row/useLogic/index.js +17 -0
  360. package/node/components/DataGridInfinite/Row/useLogic/useLogic.d.ts +33 -0
  361. package/node/components/DataGridInfinite/Row/useLogic/useLogic.js +39 -0
  362. package/node/components/DataGridInfinite/faker.js +1 -1
  363. package/node/components/DataGridInfinite/styles.d.ts +6 -0
  364. package/node/components/DataGridInfinite/styles.js +12 -1
  365. package/node/components/DataGridInfinite/useLogic/useLogic.d.ts +6 -3
  366. package/node/components/DataGridInfinite/useLogic/useLogic.js +33 -14
  367. package/node/components/DialogActions/styles.js +2 -0
  368. package/node/components/DonutChart/DonutChart.d.ts +2 -0
  369. package/node/components/DonutChart/DonutChart.js +13 -0
  370. package/node/components/DonutChart/constants.d.ts +15 -0
  371. package/node/components/DonutChart/constants.js +19 -0
  372. package/node/components/DonutChart/index.d.ts +3 -0
  373. package/node/components/DonutChart/index.js +7 -0
  374. package/node/components/DonutChart/public.d.ts +3 -0
  375. package/node/components/DonutChart/public.js +7 -0
  376. package/node/components/DonutChart/styles.d.ts +21 -0
  377. package/node/components/DonutChart/styles.js +44 -0
  378. package/node/components/DonutChart/types.d.ts +27 -0
  379. package/node/components/DonutChart/types.js +2 -0
  380. package/node/components/DonutChart/useLogic/hooks/index.d.ts +1 -0
  381. package/node/components/DonutChart/useLogic/hooks/index.js +17 -0
  382. package/node/components/DonutChart/useLogic/hooks/useRenderWidth/index.d.ts +1 -0
  383. package/node/components/DonutChart/useLogic/hooks/useRenderWidth/index.js +17 -0
  384. package/node/components/DonutChart/useLogic/hooks/useRenderWidth/useRenderWidth.d.ts +9 -0
  385. package/node/components/DonutChart/useLogic/hooks/useRenderWidth/useRenderWidth.js +34 -0
  386. package/node/components/DonutChart/useLogic/index.d.ts +1 -0
  387. package/node/components/DonutChart/useLogic/index.js +17 -0
  388. package/node/components/DonutChart/useLogic/useLogic.d.ts +15 -0
  389. package/node/components/DonutChart/useLogic/useLogic.js +44 -0
  390. package/node/components/DonutChart/useLogic/utils/getDonutChartCssVars/getDonutChartCssVars.d.ts +16 -0
  391. package/node/components/DonutChart/useLogic/utils/getDonutChartCssVars/getDonutChartCssVars.js +14 -0
  392. package/node/components/DonutChart/useLogic/utils/getDonutChartCssVars/index.d.ts +1 -0
  393. package/node/components/DonutChart/useLogic/utils/getDonutChartCssVars/index.js +5 -0
  394. package/node/components/DonutChart/useLogic/utils/getGeometry/getGeometry.d.ts +10 -0
  395. package/node/components/DonutChart/useLogic/utils/getGeometry/getGeometry.js +17 -0
  396. package/node/components/DonutChart/useLogic/utils/getGeometry/index.d.ts +1 -0
  397. package/node/components/DonutChart/useLogic/utils/getGeometry/index.js +5 -0
  398. package/node/components/DonutChart/useLogic/utils/getMeterAriaValue/getMeterAriaValue.d.ts +13 -0
  399. package/node/components/DonutChart/useLogic/utils/getMeterAriaValue/getMeterAriaValue.js +26 -0
  400. package/node/components/DonutChart/useLogic/utils/getMeterAriaValue/index.d.ts +1 -0
  401. package/node/components/DonutChart/useLogic/utils/getMeterAriaValue/index.js +5 -0
  402. package/node/components/DonutChart/useLogic/utils/getProgressCirclePath/getProgressCirclePath.d.ts +9 -0
  403. package/node/components/DonutChart/useLogic/utils/getProgressCirclePath/getProgressCirclePath.js +33 -0
  404. package/node/components/DonutChart/useLogic/utils/getProgressCirclePath/index.d.ts +1 -0
  405. package/node/components/DonutChart/useLogic/utils/getProgressCirclePath/index.js +5 -0
  406. package/node/components/DonutChart/useLogic/utils/getProgressOffset/getProgressOffset.d.ts +8 -0
  407. package/node/components/DonutChart/useLogic/utils/getProgressOffset/getProgressOffset.js +25 -0
  408. package/node/components/DonutChart/useLogic/utils/getProgressOffset/index.d.ts +1 -0
  409. package/node/components/DonutChart/useLogic/utils/getProgressOffset/index.js +5 -0
  410. package/node/components/DonutChart/useLogic/utils/getProgressPercent/getProgressPercent.d.ts +8 -0
  411. package/node/components/DonutChart/useLogic/utils/getProgressPercent/getProgressPercent.js +20 -0
  412. package/node/components/DonutChart/useLogic/utils/getProgressPercent/index.d.ts +1 -0
  413. package/node/components/DonutChart/useLogic/utils/getProgressPercent/index.js +5 -0
  414. package/node/components/DonutChart/useLogic/utils/index.d.ts +6 -0
  415. package/node/components/DonutChart/useLogic/utils/index.js +15 -0
  416. package/node/components/ExpansionPanel/Summary/styles.d.ts +1 -1
  417. package/node/components/MenuOrganization/OrganizationButton/styles.d.ts +1 -1
  418. package/node/components/NewStepper/StepIcon/StepIcon.js +3 -1
  419. package/node/components/NewStepper/StepIcon/useLogic/index.d.ts +1 -0
  420. package/node/components/NewStepper/StepIcon/useLogic/index.js +17 -0
  421. package/node/components/NewStepper/StepIcon/useLogic/useLogic.d.ts +8 -0
  422. package/node/components/NewStepper/StepIcon/useLogic/useLogic.js +10 -0
  423. package/node/components/PageContent/PageContent.js +22 -4
  424. package/node/components/PageContent/constants.d.ts +2 -0
  425. package/node/components/PageContent/constants.js +2 -0
  426. package/node/components/PageContent/styles.d.ts +0 -2
  427. package/node/components/PageContent/styles.js +17 -11
  428. package/node/components/PageContent/types.d.ts +4 -0
  429. package/node/components/Profile/styles.d.ts +1 -1
  430. package/node/components/constants/classnames.d.ts +1 -0
  431. package/node/components/constants/classnames.js +5 -0
  432. package/node/components/constants/index.d.ts +1 -0
  433. package/node/components/constants/index.js +1 -0
  434. package/node/components/fileUploading/FileUploaderDropzone/HintPlaceholder/HintPlaceholder.d.ts +2 -1
  435. package/node/components/fileUploading/FileUploaderDropzone/HintPlaceholder/HintPlaceholder.js +4 -1
  436. package/node/components/fileUploading/FileUploaderDropzone/HintPlaceholder/useLogic/useLogic.d.ts +5 -4
  437. package/node/components/fileUploading/PreviewFileUploaderDropZone/HintPlaceholder/HintPlaceholder.js +10 -1
  438. package/node/components/fileUploading/PreviewFileUploaderDropZone/HintPlaceholder/useLogic/useLogic.d.ts +5 -5
  439. package/node/components/fileUploading/hooks/useFileUploader/useFileUploader.d.ts +1 -1
  440. package/node/components/fileUploading/hooks/usePreviewFileUploader/usePreviewFileUploader.d.ts +1 -1
  441. package/node/components/fileUploading/types.d.ts +2 -2
  442. package/node/components/useProfiler/index.d.ts +1 -0
  443. package/node/components/useProfiler/index.js +5 -0
  444. package/node/components/useProfiler/useProfiler.d.ts +14 -0
  445. package/node/components/useProfiler/useProfiler.js +50 -0
  446. package/node/components/useProfiler/utils/index.d.ts +1 -0
  447. package/node/components/useProfiler/utils/index.js +17 -0
  448. package/node/components/useProfiler/utils/shallowEqual/index.d.ts +1 -0
  449. package/node/components/useProfiler/utils/shallowEqual/index.js +6 -0
  450. package/node/components/useProfiler/utils/shallowEqual/shallowEqual.d.ts +5 -0
  451. package/node/components/useProfiler/utils/shallowEqual/shallowEqual.js +31 -0
  452. package/node/hook-form/FormFilters/FormFilters.js +1 -1
  453. package/node/hook-form/FormFilters/FormFiltersSkeleton/FormFiltersSkeleton.d.ts +5 -1
  454. package/node/hook-form/FormFilters/FormFiltersSkeleton/FormFiltersSkeleton.js +3 -2
  455. package/node/hook-form/FormFilters/FormQuickFiltersSkeleton/FormQuickFiltersSkeleton.d.ts +1 -0
  456. package/node/hook-form/FormFilters/FormQuickFiltersSkeleton/FormQuickFiltersSkeleton.js +13 -0
  457. package/node/hook-form/FormFilters/FormQuickFiltersSkeleton/index.d.ts +1 -0
  458. package/node/hook-form/FormFilters/FormQuickFiltersSkeleton/index.js +17 -0
  459. package/node/hook-form/FormFilters/FormQuickFiltersSkeleton/styles.d.ts +5 -0
  460. package/node/hook-form/FormFilters/FormQuickFiltersSkeleton/styles.js +8 -0
  461. package/package.json +1 -1
  462. package/components/PageContent/useLogic/useLogic.d.ts +0 -7
  463. package/components/PageContent/useLogic/useLogic.js +0 -11
  464. package/node/components/PageContent/useLogic/useLogic.d.ts +0 -7
  465. package/node/components/PageContent/useLogic/useLogic.js +0 -15
  466. /package/components/{PageContent → DataGrid/RowBase}/useLogic/index.d.ts +0 -0
  467. /package/components/{PageContent → DataGrid/RowBase}/useLogic/index.js +0 -0
  468. /package/{node/components/PageContent → components/DataGridCollapsibleRow}/useLogic/index.d.ts +0 -0
  469. /package/node/components/{PageContent → DataGrid/RowBase}/useLogic/index.js +0 -0
@@ -1,10 +1,28 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Skeleton } from '../../Skeleton';
3
+ import { cva } from '../../utils/cva';
4
+ import { dataGridClassnames, dataGridSkeletonClassnames } from '../constants';
3
5
  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
+ const rootCva = cva(dataGridSkeletonClassnames.list, {
7
+ variants: {
8
+ mobileDisplayVariant: {
9
+ cards: dataGridClassnames.mobileVariantCards,
10
+ list: dataGridClassnames.mobileVariantList,
11
+ },
12
+ },
13
+ });
14
+ const itemCva = cva(dataGridSkeletonClassnames.item, {
15
+ variants: {
16
+ mobileDisplayVariant: {
17
+ cards: dataGridClassnames.mobileVariantCards,
18
+ list: dataGridClassnames.mobileVariantList,
19
+ },
20
+ },
21
+ });
22
+ export const MobileSkeleton = ({ cellsCount, mobileDisplayVariant, rowsCount, }) => {
23
+ return (_jsx(Root, { className: rootCva({ mobileDisplayVariant }), children: Array.from({ length: rowsCount }, (_, rowIndex) => (_jsxs(RowWrapper
6
24
  // biome-ignore lint/suspicious/noArrayIndexKey: Статичный скелетон
7
- , { children: [Array.from({ length: cellsCount - 1 }, (_cell, cellIndex) => (
25
+ , { className: itemCva({ mobileDisplayVariant }), children: [Array.from({ length: cellsCount - 1 }, (_cell, cellIndex) => (
8
26
  // biome-ignore lint/suspicious/noArrayIndexKey: Статичный скелетон
9
27
  _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
28
  };
@@ -1,9 +1,14 @@
1
1
  import { styled } from '../../styled';
2
+ import { dataGridClassnames } from '../constants';
2
3
  export const Root = styled.div `
3
4
  display: flex;
4
5
  flex-direction: column;
5
6
 
6
7
  width: 100%;
8
+
9
+ &.${dataGridClassnames.mobileVariantCards} {
10
+ gap: ${({ theme }) => theme.spacing(2)};
11
+ }
7
12
  `;
8
13
  export const RowWrapper = styled.div `
9
14
  display: flex;
@@ -24,6 +29,13 @@ export const RowWrapper = styled.div `
24
29
  &:last-of-type {
25
30
  padding-bottom: 0;
26
31
  }
32
+
33
+ &.${dataGridClassnames.mobileVariantCards} {
34
+ padding: ${({ theme }) => theme.spacing(5, 4, 4)};
35
+
36
+ border: 1px solid ${({ theme }) => theme.palette.components.border.default};
37
+ border-radius: ${({ theme }) => theme.shape.medium};
38
+ }
27
39
  `;
28
40
  export const Cell = styled.div `
29
41
  display: flex;
@@ -16,10 +16,6 @@ export type NestedChildrenProps<TData extends Record<string, CellValue>> = {
16
16
  * Поле, которое будет использоваться в качестве ключа
17
17
  */
18
18
  keyId: keyof TData;
19
- /**
20
- * Идентификатор строки
21
- */
22
- rowId: string;
23
19
  /**
24
20
  * Вариант отображения вложенных элементов
25
21
  */
@@ -52,4 +48,4 @@ export type NestedChildrenProps<TData extends Record<string, CellValue>> = {
52
48
  className?: string;
53
49
  }) => ReactElement;
54
50
  };
55
- export declare const NestedChildren: import("react").MemoExoticComponent<(<TData extends Record<string, unknown>>(props: NestedChildrenProps<TData>) => import("react/jsx-runtime").JSX.Element | null)>;
51
+ export declare const NestedChildren: <TData extends Record<string, unknown>>(props: NestedChildrenProps<TData>) => import("react/jsx-runtime").JSX.Element | null;
@@ -1,16 +1,25 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { memo } from 'react';
3
2
  import { Collapse } from '../../../Collapse';
3
+ import { cva } from '../../../utils/cva';
4
4
  import { dataGridRowClassnames } from '../constants';
5
+ import { nestedChildrenClassnames } from './constants';
5
6
  import { MoreButton, MoreButtonRow, NestedRows } from './styles';
6
7
  import { useLogic } from './useLogic';
7
- export const NestedChildren = memo((props) => {
8
+ const rootCva = cva(nestedChildrenClassnames.root, {
9
+ variants: {
10
+ variant: {
11
+ subrows: nestedChildrenClassnames.variantSubrows,
12
+ tree: nestedChildrenClassnames.variantTree,
13
+ },
14
+ },
15
+ });
16
+ export const NestedChildren = (props) => {
8
17
  const { isShowAllChildren, isShowMoreButton, isShowConnector, nextLevel, initialVisibleChildren, otherChildren, handleToggleShowAllChildren, } = useLogic(props);
9
- const { isOpen, data, keyId, level, gridColumns, moreButtonColumnPosition, renderRow, } = props;
18
+ const { isOpen, data, keyId, level, gridColumns, moreButtonColumnPosition, renderRow, variant, } = props;
10
19
  if (!data || !data.length) {
11
20
  return null;
12
21
  }
13
- return (_jsx(Collapse, { in: isOpen, unmountOnExit: true, children: _jsxs(NestedRows, { "$level": level, "$isShowConnector": isShowConnector, children: [initialVisibleChildren.map(({ children, options, ...nestedRow }) => {
22
+ return (_jsx(Collapse, { in: isOpen, unmountOnExit: true, children: _jsxs(NestedRows, { "$level": level, "$isShowConnector": isShowConnector, className: rootCva({ variant }), children: [initialVisibleChildren.map(({ children, options, ...nestedRow }) => {
14
23
  const nestedRowId = nestedRow[keyId];
15
24
  return renderRow({
16
25
  key: nestedRowId,
@@ -18,8 +27,9 @@ export const NestedChildren = memo((props) => {
18
27
  options,
19
28
  nestedChildren: children,
20
29
  level: nextLevel,
30
+ className: dataGridRowClassnames.nestedChildren,
21
31
  });
22
- }), isOpen && (_jsxs(_Fragment, { children: [_jsx(Collapse, { in: isShowAllChildren, component: "li", unmountOnExit: true, children: _jsx(NestedRows, { "$level": level, "$isShowConnector": isShowConnector, children: otherChildren.map(({ children, options, ...nestedRow }) => {
32
+ }), isOpen && (_jsxs(_Fragment, { children: [_jsx(Collapse, { in: isShowAllChildren, component: "li", unmountOnExit: true, children: _jsx(NestedRows, { "$level": level, "$isShowConnector": isShowConnector, className: nestedChildrenClassnames.additionalRows, children: otherChildren.map(({ children, options, ...nestedRow }) => {
23
33
  const nestedRowId = nestedRow[keyId];
24
34
  return renderRow({
25
35
  key: nestedRowId,
@@ -27,7 +37,7 @@ export const NestedChildren = memo((props) => {
27
37
  options,
28
38
  nestedChildren: children,
29
39
  level: nextLevel,
30
- className: dataGridRowClassnames.hidden,
40
+ className: `${dataGridRowClassnames.hidden} ${dataGridRowClassnames.nestedChildren}`,
31
41
  });
32
42
  }) }) }), isShowMoreButton && (_jsx(MoreButtonRow, { "$level": nextLevel, "$isShowConnector": isShowConnector, "$gridColumns": gridColumns, children: _jsx(MoreButton, { "$moreButtonColumnPosition": moreButtonColumnPosition, variant: "link", onClick: handleToggleShowAllChildren, children: isShowAllChildren ? 'Скрыть' : 'Показать все' }) }))] }))] }) }));
33
- });
43
+ };
@@ -0,0 +1,6 @@
1
+ export declare const nestedChildrenClassnames: {
2
+ root: string;
3
+ additionalRows: string;
4
+ variantSubrows: string;
5
+ variantTree: string;
6
+ };
@@ -0,0 +1,7 @@
1
+ import { createUIKitClassname } from '../../../utils/createUIKitClassname';
2
+ export const nestedChildrenClassnames = {
3
+ root: createUIKitClassname('data-grid-nested-rows'),
4
+ additionalRows: createUIKitClassname('data-grid-nested-rows__additional-rows'),
5
+ variantSubrows: createUIKitClassname('data-grid-nested-rows_variant-subrows'),
6
+ variantTree: createUIKitClassname('data-grid-nested-rows_variant-tree'),
7
+ };
@@ -1,6 +1,9 @@
1
1
  import { Button } from '../../../Button';
2
2
  import { styled } from '../../../styled';
3
- import { ROOT_ACTION_CELL_WIDTH, TREE_LINE_WIDTH } from '../../constants';
3
+ import { dataGridCellClassnames } from '../../Cell';
4
+ import { MOBILE_TREE_LINE_WIDTH, ROOT_ACTION_CELL_WIDTH, TREE_LINE_WIDTH, } from '../../constants';
5
+ import { dataGridRowClassnames } from '../constants';
6
+ import { nestedChildrenClassnames } from './constants';
4
7
  export const NestedRows = styled('ul', {
5
8
  shouldForwardProp: (prop) => !['$level', '$isShowConnector'].includes(prop),
6
9
  }) `
@@ -27,9 +30,26 @@ export const NestedRows = styled('ul', {
27
30
  border-left: 1px solid ${({ theme }) => theme.palette.components.border.default};
28
31
  }
29
32
 
30
- /* TODO: Убрать после реализации задачи по адаптации вложенных строк https://track.astral.ru/soft/browse/UIKIT-2188 */
31
33
  ${({ theme }) => theme.breakpoints.down('sm')} {
32
- display: none;
34
+ &::before {
35
+ display: none;
36
+ }
37
+ &.${nestedChildrenClassnames.variantSubrows} .${dataGridCellClassnames.root}:first-of-type {
38
+ display: none;
39
+
40
+ & + .${dataGridCellClassnames.root} {
41
+ margin-top: 0;
42
+ }
43
+ }
44
+
45
+ & .${dataGridCellClassnames.actionColumn} {
46
+ display: none;
47
+ }
48
+
49
+ /* Высота последнего декоративного элемента полная тк у AdditionalRows есть кнопка "Показать все/Скрыть" */
50
+ &.${nestedChildrenClassnames.additionalRows} .${dataGridRowClassnames.nestedChildren}:last-of-type::before {
51
+ height: 100%;
52
+ }
33
53
  }
34
54
  `;
35
55
  export const MoreButtonRow = styled('li', {
@@ -59,6 +79,21 @@ export const MoreButtonRow = styled('li', {
59
79
  border-left: 1px solid ${({ theme }) => theme.palette.components.border.default};
60
80
  border-radius: 0 0 0 ${({ theme }) => theme.shape.small};
61
81
  }
82
+
83
+ ${({ theme }) => theme.breakpoints.down('sm')} {
84
+ /* 20px колонка под декоративный элемент рядом с кнопкой "Показать все/Скрыть" */
85
+ grid-template-columns: 20px auto;
86
+
87
+ height: 40px;
88
+
89
+ &::before {
90
+ left: 0;
91
+
92
+ display: block;
93
+
94
+ width: ${MOBILE_TREE_LINE_WIDTH}px;
95
+ }
96
+ }
62
97
  `;
63
98
  export const MoreButton = styled(Button, {
64
99
  shouldForwardProp: (prop) => !['$moreButtonColumnPosition'].includes(prop),
@@ -67,4 +102,8 @@ export const MoreButton = styled(Button, {
67
102
  justify-self: start;
68
103
 
69
104
  margin: ${({ theme }) => theme.spacing(0, 2)};
105
+
106
+ ${({ theme }) => theme.breakpoints.down('sm')} {
107
+ margin: 0;
108
+ }
70
109
  `;
@@ -2,7 +2,7 @@ import { type MouseEvent } from 'react';
2
2
  import type { CellValue } from '../../../types';
3
3
  import { type NestedChildrenProps } from '../NestedChildren';
4
4
  type UseLogicParams<TData extends Record<string, CellValue>> = NestedChildrenProps<TData>;
5
- export declare const useLogic: <TData extends Record<string, unknown>>({ rowId, data, level, variant, initialVisibleChildrenCount, }: UseLogicParams<TData>) => {
5
+ export declare const useLogic: <TData extends Record<string, unknown>>({ data, level, variant, initialVisibleChildrenCount, }: UseLogicParams<TData>) => {
6
6
  isShowAllChildren: boolean;
7
7
  isShowMoreButton: boolean;
8
8
  isShowConnector: boolean;
@@ -1,17 +1,15 @@
1
- import { useContext } from 'react';
2
- import { DataGridContext } from '../../../DataGridContext';
1
+ import { useState } from 'react';
3
2
  import { Variant } from '../../../enums';
4
- export const useLogic = ({ rowId, data, level, variant, initialVisibleChildrenCount, }) => {
5
- const { checkIsMoreOpened, toggleOpenMoreItems } = useContext(DataGridContext);
3
+ export const useLogic = ({ data, level, variant, initialVisibleChildrenCount, }) => {
6
4
  const isTreeVariant = Object.is(variant, Variant.Tree);
7
5
  const nextLevel = isTreeVariant ? level + 1 : 0;
8
6
  const initialVisibleChildren = data?.slice(0, initialVisibleChildrenCount);
9
7
  const otherChildren = data?.slice(initialVisibleChildrenCount);
10
- const isShowAllChildren = checkIsMoreOpened(rowId);
8
+ const [isShowAllChildren, setIsShowAllChildren] = useState(false);
11
9
  const isShowMoreButton = Boolean(otherChildren?.length);
12
10
  const handleToggleShowAllChildren = (event) => {
13
11
  event.stopPropagation();
14
- toggleOpenMoreItems(rowId);
12
+ setIsShowAllChildren((prev) => !prev);
15
13
  };
16
14
  return {
17
15
  isShowAllChildren,
@@ -3,13 +3,12 @@ import { Fragment, memo, useCallback } from 'react';
3
3
  import { BottomDrawer } from '../../BottomDrawer';
4
4
  import { Checkbox } from '../../Checkbox';
5
5
  import { Tooltip } from '../../Tooltip';
6
- import { checkIsDeepEqual } from '../../utils/checkIsDeepEqual';
7
6
  import { classNames } from '../../utils/classNames';
8
7
  import { cva } from '../../utils/cva';
9
8
  import { getInertProps } from '../../utils/getInertProps';
10
9
  import { dataGridCellClassnames } from '../Cell';
11
10
  import { isGroupColumns } from '../utils';
12
- import { DISABLE_ROW_ATTR, dataGridGroupedColumnLabelClassnames, dataGridRowClassnames, dataGridRowContentClassnames, } from './constants';
11
+ import { DISABLE_ROW_ATTR, dataGridGroupedColumnLabelClassnames, dataGridRowCellClassnames, dataGridRowClassnames, dataGridRowContentClassnames, } from './constants';
13
12
  import { NestedChildren } from './NestedChildren';
14
13
  import { BottomDrawerContent, CellStyled, CheckboxCell, ChevronIcon, CollapseButton, CollapseCell, ContentWrapper, GroupedColumnLabel, Wrapper, } from './styles';
15
14
  import { useLogic } from './useLogic';
@@ -19,6 +18,13 @@ const rootCva = cva(dataGridRowClassnames.root, {
19
18
  isShowConnector: {
20
19
  true: dataGridRowClassnames.showConnector,
21
20
  },
21
+ mobileDisplayVariant: {
22
+ cards: dataGridRowClassnames.mobileVariantCards,
23
+ list: dataGridRowClassnames.mobileVariantList,
24
+ },
25
+ hasNestedChildren: {
26
+ true: dataGridRowClassnames.hasNestedChildren,
27
+ },
22
28
  },
23
29
  });
24
30
  const rowContentCva = cva(dataGridRowContentClassnames.root, {
@@ -38,9 +44,21 @@ const groupedColumnLabelCva = cva(dataGridGroupedColumnLabelClassnames.root, {
38
44
  },
39
45
  },
40
46
  });
41
- const RowComponent = (props) => {
42
- const { isOpen, isShowConnector, childrenColumns, rowId, handleToggle, checkboxProps, rowProps, isHovered, tooltipProps, nestedChildrenProps, disabled, isRenderCollapseButton, rowRef, rowStyles, drawerProps, disabledReasonText, isActive, } = useLogic(props);
43
- 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,
47
+ const singleCellCva = cva(dataGridRowCellClassnames.single, {
48
+ variants: {
49
+ isFirstCell: {
50
+ true: dataGridRowCellClassnames.firstCell,
51
+ },
52
+ },
53
+ });
54
+ /**
55
+ * @deprecated Компонент Row устарел и будет удалён в будущих версиях.
56
+ * DataGrid переходит на модель кастомизации строк через параметр `renderRow`,
57
+ * который позволяет полностью контролировать рендер каждой строки.
58
+ */
59
+ const RowInner = (props) => {
60
+ const { isOpen, isShowConnector, childrenColumns, rowId, handleToggle, checkboxProps, rowProps, isHovered, tooltipProps, nestedChildrenProps, disabled, isRenderCollapseButton, rowRef, rowStyles, drawerProps, disabledReasonText, isActive, isSelectable, mobileDisplayVariant, rootRowElement, rootRowRef, } = useLogic(props);
61
+ const { className, row, options, variant, gridColumns, isInitialExpanded, expandedLevel, level, nestedChildren, initialVisibleChildrenCount, moreButtonColumnPosition, isVisibleCollapseButton, columns, emptyCellValue, activeRowId, keyId, onSelectRow, onRowClick, sectionOffset, totalColumnsCount, registerRowElement, unregisterRowElement, onRowEnter, onRowLeave, style,
44
62
  // В этот rest-оператор попадают специфичные пропсы (атрибуты) virtuoso
45
63
  // Необходимы для DataGridInfinite
46
64
  ...selfProps } = props;
@@ -68,24 +86,25 @@ const RowComponent = (props) => {
68
86
  }), children: label }), children.map((child, childIndex) => {
69
87
  const childCellId = `${cellId}-${childIndex}`;
70
88
  const shouldRenderStartAdornment = isFirstCell && childIndex === 0;
71
- return (_jsx(CellStyled, { row: row, cell: child, isHideOnMobile: isHideOnMobile, emptyCellValue: emptyCellValue, isDisabled: isDisabledCell, startAdornment: shouldRenderStartAdornment && renderStartAdornment(), isHidePersonalData: child.isHidePersonalData, className: dataGridCellClassnames.grouped }, childCellId));
89
+ return (_jsx(CellStyled, { row: row, cell: child, isHideOnMobile: isHideOnMobile, emptyCellValue: emptyCellValue, isDisabled: isDisabledCell, startAdornment: shouldRenderStartAdornment && renderStartAdornment(), isHidePersonalData: child.isHidePersonalData, hasNestedChildren: Boolean(nestedChildren?.length), className: classNames(dataGridCellClassnames.grouped), rootRowElement: rootRowElement }, childCellId));
72
90
  })] }, cellId));
73
91
  }
74
- return (_jsx(CellStyled, { row: row, cell: cell, emptyCellValue: emptyCellValue, startAdornment: isFirstCell && renderStartAdornment(), isDisabled: isDisabledCell, isHidePersonalData: cell.isHidePersonalData }, cellId));
92
+ return (_jsx(CellStyled, { className: singleCellCva({ isFirstCell }), row: row, cell: cell, emptyCellValue: emptyCellValue, startAdornment: isFirstCell && renderStartAdornment(), isDisabled: isDisabledCell, isHidePersonalData: cell.isHidePersonalData, hasNestedChildren: Boolean(nestedChildren?.length), rootRowElement: rootRowElement }, cellId));
75
93
  });
76
94
  }, [
95
+ row,
77
96
  isOpen,
78
97
  columns,
79
98
  disabled,
80
99
  checkboxProps.checked,
81
100
  totalColumnsCount,
82
101
  sectionOffset,
102
+ rootRowElement,
83
103
  ]);
84
- const renderRow = useCallback(({ key, ...nestedRowProps }) => (_jsx(Row, { keyId: keyId, ...nestedRowProps, variant: variant, isSelectable: isSelectable, selectedRows: selectedRows, gridColumns: gridColumns, isInitialExpanded: isInitialExpanded, expandedLevel: expandedLevel, initialVisibleChildrenCount: initialVisibleChildrenCount, moreButtonColumnPosition: moreButtonColumnPosition, isVisibleCollapseButton: isVisibleCollapseButton, activeRowId: activeRowId, columns: childrenColumns, onSelectRow: onSelectRow, onRowClick: onRowClick, totalColumnsCount: totalColumnsCount, registerRowElement: registerRowElement, unregisterRowElement: unregisterRowElement, onRowEnter: onRowEnter, onRowLeave: onRowLeave, sectionOffset: sectionOffset }, key)), [
104
+ const renderRow = useCallback(({ key, ...nestedRowProps }) => (_jsx(RowInner, { keyId: keyId, ...nestedRowProps, variant: variant, isSelectable: isSelectable, gridColumns: gridColumns, isInitialExpanded: isInitialExpanded, expandedLevel: expandedLevel, initialVisibleChildrenCount: initialVisibleChildrenCount, moreButtonColumnPosition: moreButtonColumnPosition, isVisibleCollapseButton: isVisibleCollapseButton, activeRowId: activeRowId, columns: childrenColumns, onSelectRow: onSelectRow, onRowClick: onRowClick, totalColumnsCount: totalColumnsCount, registerRowElement: registerRowElement, unregisterRowElement: unregisterRowElement, onRowEnter: onRowEnter, onRowLeave: onRowLeave, sectionOffset: sectionOffset }, key)), [
85
105
  keyId,
86
106
  variant,
87
107
  isSelectable,
88
- selectedRows,
89
108
  gridColumns,
90
109
  isInitialExpanded,
91
110
  expandedLevel,
@@ -102,32 +121,10 @@ const RowComponent = (props) => {
102
121
  onRowEnter,
103
122
  onRowLeave,
104
123
  ]);
105
- 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, isActive }), "$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,
106
- // biome-ignore lint/suspicious/noTsIgnore: <>
107
- // @ts-ignore
108
- renderRow: renderRow }), _jsx(BottomDrawer, { ...drawerProps, children: _jsx(BottomDrawerContent, { children: disabledReasonText }) })] }));
109
- };
110
- const arePropsEqual = (prevProps, nextProps) => {
111
- const deepEqualityProps = new Set(['row']);
112
- // Список пропсов, которые нужно игнорировать при сравнении
113
- const skipProps = new Set([
114
- 'selectedRows',
115
- 'onSelectRow',
116
- 'columns',
117
- ]);
118
- const keys = Object.keys(prevProps);
119
- return keys.every((key) => {
120
- const typedKey = key;
121
- // Не сравниваем свойства, которые нужно пропустить
122
- if (skipProps.has(typedKey)) {
123
- return true;
124
- }
125
- const prevValue = prevProps[typedKey];
126
- const nextValue = nextProps[typedKey];
127
- if (deepEqualityProps.has(typedKey)) {
128
- return checkIsDeepEqual(prevValue, nextValue);
129
- }
130
- return prevValue === nextValue;
131
- });
124
+ return (_jsxs(Wrapper, { className: classNames(className, rootCva({
125
+ isShowConnector,
126
+ mobileDisplayVariant,
127
+ hasNestedChildren: Boolean(nestedChildren?.length),
128
+ })), style: rowStyles, ...selfProps, ref: rootRowRef, 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, isActive }), "$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, renderRow: renderRow }), _jsx(BottomDrawer, { ...drawerProps, children: _jsx(BottomDrawerContent, { children: disabledReasonText }) })] }, `row-${rowId}`));
132
129
  };
133
- export const Row = memo(RowComponent, arePropsEqual);
130
+ export const Row = memo(RowInner);
@@ -1,8 +1,17 @@
1
- /// <reference types="react" />
1
+ import { type ChangeEvent } from 'react';
2
2
  export type RowContextProps = {
3
3
  isDisabled: boolean;
4
+ isSelectable?: boolean;
4
5
  disabledReason?: string;
5
6
  addDisabledRow: (disabledReason?: string) => void;
6
7
  removeDisabledRow: () => void;
8
+ row: Record<string, unknown>;
9
+ onSelectRow: (row: Record<string, unknown>) => (event: ChangeEvent<HTMLInputElement>) => void;
10
+ onRowEnter?: (rowId: string) => void;
11
+ onRowLeave?: (rowId: string, event: PointerEvent) => void;
12
+ registerRowElement?: (rowId: string, el: HTMLElement) => void;
13
+ unregisterRowElement?: (rowId: string, el: HTMLElement) => void;
14
+ itemProps?: object;
15
+ isSelected?: boolean;
7
16
  };
8
17
  export declare const RowContext: import("react").Context<RowContextProps>;
@@ -1,6 +1,15 @@
1
1
  import { createContext } from 'react';
2
2
  export const RowContext = createContext({
3
3
  isDisabled: false,
4
+ isSelectable: false,
4
5
  addDisabledRow: () => undefined,
5
6
  removeDisabledRow: () => undefined,
7
+ row: {},
8
+ onSelectRow: () => () => undefined,
9
+ onRowEnter: () => undefined,
10
+ onRowLeave: () => undefined,
11
+ registerRowElement: () => undefined,
12
+ unregisterRowElement: () => undefined,
13
+ itemProps: {},
14
+ isSelected: false,
6
15
  });
@@ -1,6 +1,7 @@
1
1
  import { type ReactNode } from 'react';
2
- type RowContextProviderProps = {
2
+ import { type RowContextProps } from '../RowContext';
3
+ type RowContextProviderProps = Pick<RowContextProps, 'row' | 'itemProps' | 'onSelectRow' | 'onRowEnter' | 'onRowLeave' | 'registerRowElement' | 'unregisterRowElement' | 'isSelectable' | 'isSelected'> & {
3
4
  children: ReactNode;
4
5
  };
5
- export declare const RowContextProvider: ({ children }: RowContextProviderProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const RowContextProvider: ({ row, itemProps, onSelectRow, onRowEnter, onRowLeave, registerRowElement, unregisterRowElement, children, isSelectable, isSelected, }: RowContextProviderProps) => import("react/jsx-runtime").JSX.Element;
6
7
  export {};
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useCallback, useMemo, useState } from 'react';
3
3
  import { RowContext } from '../RowContext';
4
- export const RowContextProvider = ({ children }) => {
4
+ export const RowContextProvider = ({ row, itemProps, onSelectRow, onRowEnter, onRowLeave, registerRowElement, unregisterRowElement, children, isSelectable, isSelected, }) => {
5
5
  const [isDisabled, setDisabled] = useState(false);
6
6
  const [disabledReason, setDisabledReason] = useState();
7
7
  const addDisabledRow = useCallback((reason) => {
@@ -14,9 +14,32 @@ export const RowContextProvider = ({ children }) => {
14
14
  }, []);
15
15
  const contextValue = useMemo(() => ({
16
16
  isDisabled,
17
+ isSelectable,
17
18
  disabledReason,
18
19
  addDisabledRow,
19
20
  removeDisabledRow,
20
- }), [isDisabled, disabledReason, addDisabledRow, removeDisabledRow]);
21
+ row,
22
+ itemProps,
23
+ onSelectRow,
24
+ onRowEnter,
25
+ onRowLeave,
26
+ registerRowElement,
27
+ unregisterRowElement,
28
+ isSelected,
29
+ }), [
30
+ isDisabled,
31
+ isSelectable,
32
+ disabledReason,
33
+ addDisabledRow,
34
+ removeDisabledRow,
35
+ row,
36
+ itemProps,
37
+ onSelectRow,
38
+ onRowEnter,
39
+ onRowLeave,
40
+ registerRowElement,
41
+ unregisterRowElement,
42
+ isSelected,
43
+ ]);
21
44
  return (_jsx(RowContext.Provider, { value: contextValue, children: children }));
22
45
  };
@@ -7,6 +7,11 @@ export declare const dataGridRowClassnames: {
7
7
  hover: string;
8
8
  hasPinnedColumns: string;
9
9
  checkbox: string;
10
+ mobileVariantCards: string;
11
+ mobileVariantList: string;
12
+ nestedChildren: string;
13
+ hasOpenChildren: string;
14
+ hasNestedChildren: string;
10
15
  };
11
16
  export declare const dataGridRowContentClassnames: {
12
17
  root: string;
@@ -16,6 +21,7 @@ export declare const dataGridRowContentClassnames: {
16
21
  export declare const dataGridRowCellClassnames: {
17
22
  single: string;
18
23
  grouped: string;
24
+ firstCell: string;
19
25
  };
20
26
  export declare const dataGridGroupedColumnLabelClassnames: {
21
27
  root: string;
@@ -8,6 +8,11 @@ export const dataGridRowClassnames = {
8
8
  hover: createUIKitClassname('data-grid__row_hover'),
9
9
  hasPinnedColumns: createUIKitClassname('data-grid__row_has-pinned-columns'),
10
10
  checkbox: createUIKitClassname('data-grid__row-checkbox'),
11
+ mobileVariantCards: createUIKitClassname('data-grid__row_mobile-variant-cards'),
12
+ mobileVariantList: createUIKitClassname('data-grid__row_mobile-variant-list'),
13
+ nestedChildren: createUIKitClassname('data-grid__row-nested-children'),
14
+ hasOpenChildren: createUIKitClassname('data-grid__row_has-open-children'),
15
+ hasNestedChildren: createUIKitClassname('data-grid__row_has-nested-children'),
11
16
  };
12
17
  export const dataGridRowContentClassnames = {
13
18
  root: createUIKitClassname('data-grid__row-content'),
@@ -17,6 +22,7 @@ export const dataGridRowContentClassnames = {
17
22
  export const dataGridRowCellClassnames = {
18
23
  single: createUIKitClassname('data-grid__row-cell_single'),
19
24
  grouped: createUIKitClassname('data-grid__row-cell_grouped'),
25
+ firstCell: createUIKitClassname('data-grid__row-cell_first'),
20
26
  };
21
27
  export const dataGridGroupedColumnLabelClassnames = {
22
28
  root: createUIKitClassname('data-grid-grouped-column-label'),
@@ -2,9 +2,9 @@ import { ChevronROutlineMd } from '../../../icons/ChevronROutlineMd';
2
2
  import { IconButton } from '../../IconButton';
3
3
  import { styled } from '../../styled';
4
4
  import { Typography } from '../../Typography';
5
- import { Cell } from '../Cell';
6
- import { ROOT_ACTION_CELL_WIDTH, TREE_LINE_WIDTH } from '../constants';
7
- import { dataGridGroupedColumnLabelClassnames, dataGridRowClassnames, dataGridRowContentClassnames, } from './constants';
5
+ import { Cell, dataGridCellClassnames } from '../Cell';
6
+ import { MOBILE_TREE_LINE_WIDTH, ROOT_ACTION_CELL_WIDTH, TREE_LINE_WIDTH, } from '../constants';
7
+ import { dataGridGroupedColumnLabelClassnames, dataGridRowCellClassnames, dataGridRowClassnames, dataGridRowContentClassnames, } from './constants';
8
8
  export const Wrapper = styled.li `
9
9
  --level: 0;
10
10
  position: relative;
@@ -45,6 +45,90 @@ export const Wrapper = styled.li `
45
45
  &:first-of-type {
46
46
  padding-top: ${({ theme }) => theme.spacing(1)};
47
47
  }
48
+
49
+ &.${dataGridRowClassnames.mobileVariantCards} {
50
+ border-bottom: none;
51
+
52
+ &:not(.${dataGridRowClassnames.nestedChildren}) {
53
+ padding: ${({ theme }) => theme.spacing(5, 4, 4)};
54
+
55
+ background-color: ${({ theme }) => theme.palette.background.default};
56
+ border: 1px solid ${({ theme }) => theme.palette.grey[300]};
57
+ border-radius: ${({ theme }) => theme.shape.medium};
58
+ }
59
+ }
60
+
61
+ &.${dataGridRowClassnames.hasNestedChildren} {
62
+ :not(.${dataGridRowClassnames.nestedChildren}) .${dataGridCellClassnames.root}:last-of-type {
63
+ padding-bottom: ${({ theme }) => theme.spacing(3)};
64
+ }
65
+
66
+ /* Ко всем ячейкам кроме первой применяем декоративный элемент слева и добавляем отступы для выравнивания с NestedChildren */
67
+ &:not(.${dataGridRowClassnames.nestedChildren}) > .${dataGridRowContentClassnames.root} .${dataGridCellClassnames.root}:not(.${dataGridRowCellClassnames.firstCell}) {
68
+ position: relative;
69
+
70
+ margin-top: 0;
71
+ padding-top: ${({ theme }) => theme.spacing(3)};
72
+ padding-left: ${({ theme }) => theme.spacing(5)};
73
+
74
+ &::before {
75
+ content: '';
76
+
77
+ position: absolute;
78
+ top: 0;
79
+ bottom: 0;
80
+ left: 0;
81
+
82
+ width: 0;
83
+
84
+ border-left: 1px solid ${({ theme }) => theme.palette.components.border.default};
85
+ }
86
+ }
87
+
88
+ /* L-коннектор применяем ко 2 ячейки основной строки */
89
+ &:not(.${dataGridRowClassnames.nestedChildren})
90
+ > .${dataGridRowContentClassnames.root} .${dataGridCellClassnames.root}.${dataGridRowCellClassnames.firstCell}
91
+ + .${dataGridCellClassnames.root} {
92
+ &::after {
93
+ content: '';
94
+
95
+ position: absolute;
96
+ top: ${({ theme }) => theme.spacing(3)};
97
+ left: 0;
98
+
99
+ width: ${MOBILE_TREE_LINE_WIDTH}px;
100
+ height: ${({ theme }) => theme.spacing(2)};
101
+
102
+ border-bottom: 1px solid ${({ theme }) => theme.palette.components.border.default};
103
+ border-left: 1px solid ${({ theme }) => theme.palette.components.border.default};
104
+ border-radius: 0 0 0 ${({ theme }) => theme.shape.small};
105
+ }
106
+ }
107
+ }
108
+
109
+ &.${dataGridRowClassnames.nestedChildren} {
110
+ padding: ${({ theme }) => theme.spacing(3, 0, 3, 5)};
111
+
112
+ &::before {
113
+ content: '';
114
+
115
+ position: absolute;
116
+ top: 0;
117
+ left: 0;
118
+ transform: unset;
119
+
120
+ display: block;
121
+
122
+ width: 0;
123
+
124
+ border-left: 1px solid ${({ theme }) => theme.palette.components.border.default};
125
+ }
126
+
127
+ &:last-of-type::before {
128
+ /* Высота последнего декоративного элемента закрывает отступ между компонентами Row */
129
+ height: ${({ theme }) => theme.spacing(3)};
130
+ }
131
+ }
48
132
  }
49
133
  `;
50
134
  export const ContentWrapper = styled.div `
@@ -74,6 +158,21 @@ export const ContentWrapper = styled.div `
74
158
  }
75
159
  }
76
160
 
161
+ /* L-коннектор для nestedChildren на мобильных устройствах */
162
+ .${dataGridRowClassnames.nestedChildren} &::before {
163
+ ${({ theme }) => theme.breakpoints.down('sm')} {
164
+ left: -20px;
165
+ transform: none;
166
+
167
+ display: block;
168
+
169
+ width: ${MOBILE_TREE_LINE_WIDTH}px;
170
+
171
+ /* Высота 8px для выравнивания с названием колонки первой ячейки */
172
+ height: ${({ theme }) => theme.spacing(2)};
173
+ }
174
+ }
175
+
77
176
  &.${dataGridRowContentClassnames.active} {
78
177
  background-color: ${({ theme }) => theme.palette.primary[100]};
79
178
  }
@@ -1,4 +1,5 @@
1
1
  export declare const useMobileLogic: () => {
2
+ isMobile: boolean;
2
3
  isDrawerOpen: boolean;
3
4
  handleOpenDrawer: () => void;
4
5
  handleCloseDrawer: () => void;
@@ -11,5 +11,5 @@ export const useMobileLogic = () => {
11
11
  const handleCloseDrawer = () => {
12
12
  setIsDrawerOpen(false);
13
13
  };
14
- return { isDrawerOpen, handleOpenDrawer, handleCloseDrawer };
14
+ return { isMobile, isDrawerOpen, handleOpenDrawer, handleCloseDrawer };
15
15
  };