@astral/ui 1.16.2 → 1.17.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 (422) hide show
  1. package/ActionCell/ActionCell.js +19 -39
  2. package/ActionCell/styles.js +5 -7
  3. package/Alert/Alert.js +11 -22
  4. package/Alert/styles.js +17 -20
  5. package/Autocomplete/Autocomplete.js +23 -34
  6. package/BackdropStack/hooks/useBackdropStackToggle/useBackdropStackToggle.js +11 -12
  7. package/BackdropStack/services/BackdropStackManager/BackdropStackManager.js +17 -19
  8. package/Badge/Badge.js +5 -16
  9. package/Badge/styled.d.ts +2 -16
  10. package/Badge/styled.js +26 -31
  11. package/Button/Button.js +10 -21
  12. package/Button/styles.js +16 -22
  13. package/ButtonBase/ButtonBase.js +7 -18
  14. package/ButtonBase/styles.d.ts +3 -3
  15. package/ButtonBase/styles.js +68 -73
  16. package/Checkbox/Checkbox.js +6 -17
  17. package/Checkbox/icons.js +8 -19
  18. package/Checkbox/styled.js +47 -32
  19. package/Chevron/Chevron.js +3 -14
  20. package/Chevron/styles.js +11 -18
  21. package/CircularProgress/CircularProgress.js +7 -18
  22. package/CircularProgress/CircularProgressStory.js +4 -4
  23. package/CircularProgress/CircularProgressStoryTemplate.js +4 -15
  24. package/Collapse/Collapse.js +1 -1
  25. package/ConfigProvider/ConfigProvider.js +7 -19
  26. package/ContentState/ContentState.d.ts +1 -1
  27. package/ContentState/ContentState.js +12 -24
  28. package/ContentState/styles.js +8 -7
  29. package/DashboardLayout/DashboardLayout.js +7 -7
  30. package/DashboardLayout/DashboardLayoutStory.js +5 -16
  31. package/DashboardLayout/DashboardLayoutStoryTemplate.js +4 -15
  32. package/DashboardLayout/Header/Header.js +9 -20
  33. package/DashboardLayout/Header/styles.js +17 -20
  34. package/DashboardLayout/Main/Main.js +5 -17
  35. package/DashboardLayout/Main/styled.js +7 -7
  36. package/DashboardLayout/Sidebar/Sidebar.js +13 -24
  37. package/DashboardLayout/Sidebar/SidebarNav/SidebarNav.js +5 -16
  38. package/DashboardLayout/Sidebar/SidebarToggler/SidebarToggleButton/SidebarToggleButton.js +7 -18
  39. package/DashboardLayout/Sidebar/SidebarToggler/SidebarToggleButton/styles.js +13 -11
  40. package/DashboardLayout/Sidebar/SidebarToggler/SidebarToggler.js +8 -19
  41. package/DashboardLayout/Sidebar/SidebarToggler/styled.js +11 -12
  42. package/DashboardLayout/Sidebar/styles.js +16 -24
  43. package/DashboardLayout/styles.js +11 -9
  44. package/DataGrid/DataGrid.js +25 -50
  45. package/DataGrid/DataGridBody/DataGridBody.d.ts +2 -2
  46. package/DataGrid/DataGridBody/DataGridBody.js +19 -31
  47. package/DataGrid/DataGridBody/styles.js +9 -13
  48. package/DataGrid/DataGridCell/DataGridCell.d.ts +2 -2
  49. package/DataGrid/DataGridCell/DataGridCell.js +7 -19
  50. package/DataGrid/DataGridHead/DataGridHead.d.ts +2 -2
  51. package/DataGrid/DataGridHead/DataGridHead.js +15 -28
  52. package/DataGrid/DataGridHeadColumn/DataGridHeadColumn.js +9 -21
  53. package/DataGrid/DataGridHeadColumn/styles.js +23 -23
  54. package/DataGrid/DataGridLoader/DataGridLoader.js +3 -4
  55. package/DataGrid/DataGridLoader/styles.js +22 -15
  56. package/DataGrid/DataGridNoData/DataGridNoData.js +5 -17
  57. package/DataGrid/DataGridNoData/styles.js +29 -17
  58. package/DataGrid/styles.js +12 -13
  59. package/DataGrid/types.d.ts +1 -1
  60. package/DataGridPagination/DataGridPagination.js +11 -22
  61. package/DataGridPagination/styles.js +11 -15
  62. package/DatePicker/DatePicker.js +22 -33
  63. package/DatePicker/DatePickerDay/DatePickerDay.js +4 -15
  64. package/DatePicker/DatePickerDay/styled.js +6 -8
  65. package/DatePicker/DatePickerHeader/DatePickerHeader.js +12 -23
  66. package/DatePicker/DatePickerHeader/styled.js +10 -9
  67. package/DatePicker/styled.js +94 -70
  68. package/DatePickerProvider/DatePickerProvider.js +4 -4
  69. package/Description/Description.js +5 -6
  70. package/Description/Name/Name.js +5 -16
  71. package/Description/Value/Value.js +6 -17
  72. package/Description/styles.js +14 -13
  73. package/Dialog/Dialog.js +8 -19
  74. package/DialogActions/DialogActions.js +6 -17
  75. package/DialogTitle/DialogTitle.js +8 -19
  76. package/Divider/Divider.js +1 -1
  77. package/DropdownButton/DropdownButton.js +11 -22
  78. package/ErrorBoundary/ErrorBoundary.js +19 -48
  79. package/Fab/Fab.js +7 -18
  80. package/Fab/styles.js +33 -37
  81. package/Fade/Fade.js +1 -1
  82. package/FormControlLabel/FormControlLabel.js +4 -15
  83. package/FormControlLabel/styled.js +10 -11
  84. package/FormHelperText/FormHelperText.js +6 -6
  85. package/FormHelperText/styled.js +16 -18
  86. package/GlobalStyles/GlobalStyles.js +12 -25
  87. package/Grid/Grid.js +5 -16
  88. package/Grid/styled.js +5 -11
  89. package/Grow/Grow.js +1 -1
  90. package/IconButton/IconButton.js +6 -17
  91. package/IconButton/styles.js +15 -21
  92. package/IconDropdownButton/IconDropdownButton.js +10 -21
  93. package/List/List.js +4 -15
  94. package/ListItem/ListItem.js +4 -15
  95. package/ListItem/styles.js +19 -32
  96. package/ListItemAvatar/ListItemAvatar.js +1 -1
  97. package/ListItemButton/ListItemButton.js +5 -16
  98. package/ListItemIcon/ListItemIcon.js +5 -16
  99. package/ListItemIcon/styled.js +5 -11
  100. package/ListItemSecondaryAction/ListItemSecondaryAction.js +1 -1
  101. package/ListItemText/ListItemText.js +4 -15
  102. package/ListSubheader/ListSubheader.js +1 -1
  103. package/LocalizationProvider/LocalizationProvider.js +6 -18
  104. package/MaskField/MaskField.js +12 -23
  105. package/Menu/Menu.js +1 -1
  106. package/MenuGroup/MenuGroup.js +7 -18
  107. package/MenuGroup/stories/Icons.js +8 -19
  108. package/MenuGroup/stories/styled.js +12 -17
  109. package/MenuGroup/styled.js +14 -21
  110. package/MenuItem/MenuItem.js +5 -16
  111. package/MenuItem/styled.js +5 -11
  112. package/MenuList/MenuList.js +5 -16
  113. package/MenuList/styled.js +10 -17
  114. package/NavMenu/NavMenu.js +7 -18
  115. package/NavMenu/NavMenuItem/NavMenuItem.js +13 -25
  116. package/NavMenu/NavMenuItem/NavMenuItemButton/NavMenuItemButton.js +8 -19
  117. package/NavMenu/NavMenuItem/NavMenuItemButton/styles.js +29 -30
  118. package/NavMenu/NavMenuItem/NavMenuItemList/NavMenuItemList.js +8 -19
  119. package/Notification/Notification.js +6 -37
  120. package/Notification/NotificationContainer/NotificationContainer.js +7 -18
  121. package/Notification/NotificationContainer/styled.js +16 -7
  122. package/Notification/NotificationTemplate/NotificationTemplate.js +10 -22
  123. package/Notification/NotificationTemplate/styled.js +51 -51
  124. package/Notification/NotificationTemplate/utils/getActionsDirection/getActionsDirection.js +2 -2
  125. package/Notification/NotificationTemplate/utils/getNotificationTemplateStyles/getNotificationTemplateStyles.js +3 -3
  126. package/Notification/constants/notificationVariant.js +7 -18
  127. package/Notification/constants/positions.js +1 -1
  128. package/Notification/styled.js +18 -27
  129. package/Notification/utils/getNotificationIconByVariant/getNotificationIconByVariant.js +5 -6
  130. package/Notification/utils/notificationTemplatePropsCreator/notificationTemplatePropsCreator.js +2 -13
  131. package/OverflowTypography/OverflowTypography.js +13 -22
  132. package/OverflowTypography/hooks/useOverflowed/useOverflowed.js +13 -16
  133. package/OverflowTypography/styles.js +14 -12
  134. package/Pagination/Pagination.js +4 -15
  135. package/Placeholder/Placeholder.d.ts +9 -1
  136. package/Placeholder/Placeholder.js +4 -16
  137. package/Placeholder/styles.js +70 -76
  138. package/Product/Product.js +6 -17
  139. package/Profile/Profile.js +10 -21
  140. package/Profile/styled.js +32 -36
  141. package/Radio/Icon.js +6 -17
  142. package/Radio/Radio.d.ts +1 -1
  143. package/Radio/Radio.js +7 -18
  144. package/Radio/styled.js +43 -32
  145. package/Select/Select.js +16 -26
  146. package/Select/styled.js +36 -31
  147. package/SideDialog/SideDialog.js +6 -17
  148. package/SideDialog/styled.js +8 -8
  149. package/Slide/Slide.js +1 -1
  150. package/SwipeableDrawer/SwipeableDrawer.js +5 -16
  151. package/SwipeableDrawer/styles.js +73 -78
  152. package/Tab/Tab.js +1 -1
  153. package/Table/Table.js +5 -16
  154. package/Table/TableBody/TableBody.js +1 -1
  155. package/Table/TableCell/TableCell.js +1 -1
  156. package/Table/TableContainer/TableContainer.js +1 -1
  157. package/Table/TableFooter/TableFooter.js +1 -1
  158. package/Table/TableHead/TableHead.js +1 -1
  159. package/Table/TableRow/TableRow.js +1 -1
  160. package/Table/TableSortLabel/TableSortLabel.js +1 -1
  161. package/Tabs/Tabs.js +1 -1
  162. package/Tag/Tag.js +7 -18
  163. package/Tag/styled.js +84 -60
  164. package/TextArea/TextArea.js +6 -17
  165. package/TextField/TextField.js +11 -22
  166. package/ThemeProvider/ThemeProvider.js +7 -18
  167. package/Tooltip/Tooltip.js +7 -18
  168. package/Tooltip/styled.js +43 -58
  169. package/Typography/Typography.js +8 -19
  170. package/Zoom/Zoom.js +1 -1
  171. package/esm/ActionCell/ActionCell.js +11 -31
  172. package/esm/ActionCell/styles.js +4 -6
  173. package/esm/Alert/Alert.js +4 -15
  174. package/esm/Alert/styles.js +15 -18
  175. package/esm/Autocomplete/Autocomplete.js +12 -23
  176. package/esm/Autocomplete/constants.js +1 -1
  177. package/esm/BackdropStack/hooks/useBackdropStackToggle/useBackdropStackToggle.js +8 -9
  178. package/esm/BackdropStack/services/BackdropStackManager/BackdropStackManager.js +17 -19
  179. package/esm/Badge/Badge.js +3 -14
  180. package/esm/Badge/styled.d.ts +2 -16
  181. package/esm/Badge/styled.js +25 -30
  182. package/esm/Button/Button.js +4 -15
  183. package/esm/Button/styles.js +13 -19
  184. package/esm/ButtonBase/ButtonBase.js +3 -14
  185. package/esm/ButtonBase/styles.d.ts +3 -3
  186. package/esm/ButtonBase/styles.js +66 -71
  187. package/esm/Checkbox/Checkbox.js +3 -14
  188. package/esm/Checkbox/icons.js +6 -17
  189. package/esm/Checkbox/styled.js +45 -30
  190. package/esm/Chevron/Chevron.js +1 -12
  191. package/esm/Chevron/styles.js +10 -17
  192. package/esm/CircularProgress/CircularProgress.js +4 -15
  193. package/esm/CircularProgress/CircularProgressStory.js +2 -2
  194. package/esm/CircularProgress/CircularProgressStoryTemplate.js +2 -13
  195. package/esm/ConfigProvider/ConfigProvider.js +5 -17
  196. package/esm/ContentState/ContentState.d.ts +1 -1
  197. package/esm/ContentState/ContentState.js +6 -18
  198. package/esm/ContentState/styles.js +7 -6
  199. package/esm/DashboardLayout/DashboardLayout.js +2 -2
  200. package/esm/DashboardLayout/DashboardLayoutStory.js +3 -14
  201. package/esm/DashboardLayout/DashboardLayoutStoryTemplate.js +2 -13
  202. package/esm/DashboardLayout/Header/Header.js +4 -15
  203. package/esm/DashboardLayout/Header/styles.js +16 -19
  204. package/esm/DashboardLayout/Main/Main.js +2 -14
  205. package/esm/DashboardLayout/Main/styled.js +6 -6
  206. package/esm/DashboardLayout/Sidebar/Sidebar.js +6 -17
  207. package/esm/DashboardLayout/Sidebar/SidebarNav/SidebarNav.js +3 -14
  208. package/esm/DashboardLayout/Sidebar/SidebarToggler/SidebarToggleButton/SidebarToggleButton.js +3 -14
  209. package/esm/DashboardLayout/Sidebar/SidebarToggler/SidebarToggleButton/styles.js +11 -9
  210. package/esm/DashboardLayout/Sidebar/SidebarToggler/SidebarToggler.js +4 -15
  211. package/esm/DashboardLayout/Sidebar/SidebarToggler/styled.js +9 -10
  212. package/esm/DashboardLayout/Sidebar/styles.js +15 -23
  213. package/esm/DashboardLayout/styles.js +10 -8
  214. package/esm/DataGrid/DataGrid.js +17 -42
  215. package/esm/DataGrid/DataGridBody/DataGridBody.d.ts +2 -2
  216. package/esm/DataGrid/DataGridBody/DataGridBody.js +13 -25
  217. package/esm/DataGrid/DataGridBody/styles.js +8 -12
  218. package/esm/DataGrid/DataGridCell/DataGridCell.d.ts +2 -2
  219. package/esm/DataGrid/DataGridCell/DataGridCell.js +3 -15
  220. package/esm/DataGrid/DataGridHead/DataGridHead.d.ts +2 -2
  221. package/esm/DataGrid/DataGridHead/DataGridHead.js +8 -21
  222. package/esm/DataGrid/DataGridHeadColumn/DataGridHeadColumn.js +4 -16
  223. package/esm/DataGrid/DataGridHeadColumn/styles.js +21 -21
  224. package/esm/DataGrid/DataGridLoader/DataGridLoader.js +1 -2
  225. package/esm/DataGrid/DataGridLoader/styles.js +19 -12
  226. package/esm/DataGrid/DataGridNoData/DataGridNoData.js +3 -15
  227. package/esm/DataGrid/DataGridNoData/styles.js +27 -15
  228. package/esm/DataGrid/styles.js +11 -12
  229. package/esm/DataGrid/types.d.ts +1 -1
  230. package/esm/DataGridPagination/DataGridPagination.js +7 -18
  231. package/esm/DataGridPagination/styles.js +9 -13
  232. package/esm/DatePicker/DatePicker.js +11 -22
  233. package/esm/DatePicker/DatePickerDay/DatePickerDay.js +2 -13
  234. package/esm/DatePicker/DatePickerDay/styled.js +4 -6
  235. package/esm/DatePicker/DatePickerHeader/DatePickerHeader.js +5 -16
  236. package/esm/DatePicker/DatePickerHeader/styled.js +8 -7
  237. package/esm/DatePicker/styled.js +93 -69
  238. package/esm/DatePickerProvider/DatePickerProvider.js +2 -2
  239. package/esm/Description/Description.js +1 -2
  240. package/esm/Description/Name/Name.js +3 -14
  241. package/esm/Description/Value/Value.js +4 -15
  242. package/esm/Description/styles.js +13 -12
  243. package/esm/Dialog/Dialog.js +5 -16
  244. package/esm/DialogActions/DialogActions.js +3 -14
  245. package/esm/DialogTitle/DialogTitle.js +4 -15
  246. package/esm/DropdownButton/DropdownButton.js +4 -15
  247. package/esm/ErrorBoundary/ErrorBoundary.js +14 -43
  248. package/esm/Fab/Fab.js +3 -14
  249. package/esm/Fab/styles.js +31 -35
  250. package/esm/FormControlLabel/FormControlLabel.js +2 -13
  251. package/esm/FormControlLabel/styled.js +8 -9
  252. package/esm/FormHelperText/FormHelperText.js +3 -3
  253. package/esm/FormHelperText/styled.js +14 -16
  254. package/esm/GlobalStyles/GlobalStyles.js +8 -21
  255. package/esm/Grid/Grid.js +3 -14
  256. package/esm/Grid/styled.js +3 -9
  257. package/esm/IconButton/IconButton.js +3 -14
  258. package/esm/IconButton/styles.js +14 -20
  259. package/esm/IconDropdownButton/IconDropdownButton.js +4 -15
  260. package/esm/List/List.js +2 -13
  261. package/esm/ListItem/ListItem.js +2 -13
  262. package/esm/ListItem/styles.js +17 -30
  263. package/esm/ListItemButton/ListItemButton.js +2 -13
  264. package/esm/ListItemIcon/ListItemIcon.js +2 -13
  265. package/esm/ListItemIcon/styled.js +3 -9
  266. package/esm/ListItemText/ListItemText.js +2 -13
  267. package/esm/LocalizationProvider/LocalizationProvider.js +2 -14
  268. package/esm/MaskField/MaskField.js +9 -20
  269. package/esm/MenuGroup/MenuGroup.js +4 -15
  270. package/esm/MenuGroup/stories/Icons.js +7 -18
  271. package/esm/MenuGroup/stories/styled.js +9 -14
  272. package/esm/MenuGroup/styled.js +12 -19
  273. package/esm/MenuItem/MenuItem.js +3 -14
  274. package/esm/MenuItem/styled.js +3 -9
  275. package/esm/MenuList/MenuList.js +3 -14
  276. package/esm/MenuList/styled.js +8 -15
  277. package/esm/NavMenu/NavMenu.js +3 -14
  278. package/esm/NavMenu/NavMenuItem/NavMenuItem.js +8 -20
  279. package/esm/NavMenu/NavMenuItem/NavMenuItemButton/NavMenuItemButton.js +3 -14
  280. package/esm/NavMenu/NavMenuItem/NavMenuItemButton/styles.js +25 -26
  281. package/esm/NavMenu/NavMenuItem/NavMenuItemList/NavMenuItemList.js +4 -15
  282. package/esm/Notification/Notification.js +5 -36
  283. package/esm/Notification/NotificationContainer/NotificationContainer.js +2 -13
  284. package/esm/Notification/NotificationContainer/styled.js +15 -6
  285. package/esm/Notification/NotificationTemplate/NotificationTemplate.js +6 -18
  286. package/esm/Notification/NotificationTemplate/styled.js +48 -48
  287. package/esm/Notification/NotificationTemplate/utils/getActionsDirection/getActionsDirection.js +2 -2
  288. package/esm/Notification/NotificationTemplate/utils/getNotificationTemplateStyles/getNotificationTemplateStyles.js +3 -3
  289. package/esm/Notification/constants/defaultNotificationProps.js +1 -1
  290. package/esm/Notification/constants/notificationVariant.js +5 -16
  291. package/esm/Notification/constants/positions.js +1 -1
  292. package/esm/Notification/styled.js +20 -29
  293. package/esm/Notification/utils/getNotificationIconByVariant/getNotificationIconByVariant.js +2 -3
  294. package/esm/Notification/utils/notificationTemplatePropsCreator/notificationTemplatePropsCreator.js +2 -13
  295. package/esm/OverflowTypography/OverflowTypography.js +9 -18
  296. package/esm/OverflowTypography/hooks/useOverflowed/useOverflowed.js +11 -14
  297. package/esm/OverflowTypography/styles.js +13 -11
  298. package/esm/Pagination/Pagination.js +2 -13
  299. package/esm/Placeholder/Placeholder.d.ts +9 -1
  300. package/esm/Placeholder/Placeholder.js +2 -14
  301. package/esm/Placeholder/styles.js +68 -74
  302. package/esm/Product/Product.js +3 -14
  303. package/esm/Profile/Profile.js +4 -15
  304. package/esm/Profile/styled.js +30 -34
  305. package/esm/Radio/Icon.js +4 -15
  306. package/esm/Radio/Radio.d.ts +1 -1
  307. package/esm/Radio/Radio.js +3 -14
  308. package/esm/Radio/styled.js +41 -30
  309. package/esm/Select/Select.js +8 -18
  310. package/esm/Select/styled.js +34 -29
  311. package/esm/SideDialog/SideDialog.js +3 -14
  312. package/esm/SideDialog/styled.js +6 -6
  313. package/esm/SwipeableDrawer/SwipeableDrawer.js +3 -14
  314. package/esm/SwipeableDrawer/styles.js +71 -76
  315. package/esm/Table/Table.js +3 -14
  316. package/esm/Tag/Tag.js +3 -14
  317. package/esm/Tag/styled.js +82 -58
  318. package/esm/TextArea/TextArea.js +3 -14
  319. package/esm/TextField/TextField.js +7 -18
  320. package/esm/ThemeProvider/ThemeProvider.js +3 -14
  321. package/esm/Tooltip/Tooltip.js +3 -14
  322. package/esm/Tooltip/styled.js +39 -54
  323. package/esm/Typography/Typography.js +4 -15
  324. package/esm/hooks/useMenu.js +7 -8
  325. package/esm/theme/baseTheme/baseTheme.js +7 -7
  326. package/esm/theme/baseTheme/baseTheme.test.js +12 -12
  327. package/esm/theme/breakpoints.js +1 -1
  328. package/esm/theme/components/MuiAlert.js +7 -12
  329. package/esm/theme/components/MuiAutocomplete.js +13 -20
  330. package/esm/theme/components/MuiButton.js +42 -43
  331. package/esm/theme/components/MuiButtonBase.js +1 -1
  332. package/esm/theme/components/MuiCircularProgress.js +3 -4
  333. package/esm/theme/components/MuiDialog.js +3 -5
  334. package/esm/theme/components/MuiDialogActions.js +2 -3
  335. package/esm/theme/components/MuiDialogContent.js +2 -3
  336. package/esm/theme/components/MuiDialogTitle.js +2 -3
  337. package/esm/theme/components/MuiFormHelperText.js +2 -3
  338. package/esm/theme/components/MuiFormLabel.js +2 -2
  339. package/esm/theme/components/MuiInputBase.js +2 -3
  340. package/esm/theme/components/MuiInputLabel.js +2 -3
  341. package/esm/theme/components/MuiListItemButton.js +2 -3
  342. package/esm/theme/components/MuiListItemText.js +2 -2
  343. package/esm/theme/components/MuiLoadingButton.js +10 -12
  344. package/esm/theme/components/MuiMenu.js +3 -5
  345. package/esm/theme/components/MuiMenuItem.js +2 -3
  346. package/esm/theme/components/MuiOutlinedInput.js +7 -12
  347. package/esm/theme/components/MuiPaginationItem.js +5 -7
  348. package/esm/theme/components/MuiTab.js +2 -3
  349. package/esm/theme/components/MuiTableCell.js +2 -2
  350. package/esm/theme/components/MuiTableHead.js +3 -4
  351. package/esm/theme/components/MuiTableRow.js +2 -3
  352. package/esm/theme/components/MuiTabs.js +3 -4
  353. package/esm/theme/components/MuiTypography.js +1 -1
  354. package/esm/theme/components/components.js +64 -35
  355. package/esm/theme/constants.js +1 -1
  356. package/esm/theme/elevation.js +1 -1
  357. package/esm/theme/hooks/useTheme/index.js +1 -1
  358. package/esm/theme/palette/brandPalette.js +16 -17
  359. package/esm/theme/palette/palette.js +3 -15
  360. package/esm/theme/shape.js +1 -1
  361. package/esm/theme/typography.js +4 -5
  362. package/hooks/useMenu.js +8 -9
  363. package/package.json +14 -14
  364. package/theme/baseTheme/baseTheme.js +14 -14
  365. package/theme/baseTheme/baseTheme.test.js +14 -14
  366. package/theme/components/MuiAlert.js +6 -11
  367. package/theme/components/MuiAutocomplete.js +13 -20
  368. package/theme/components/MuiButton.js +43 -44
  369. package/theme/components/MuiCircularProgress.js +2 -3
  370. package/theme/components/MuiDialog.js +2 -4
  371. package/theme/components/MuiDialogActions.js +1 -2
  372. package/theme/components/MuiDialogContent.js +1 -2
  373. package/theme/components/MuiDialogTitle.js +1 -2
  374. package/theme/components/MuiFormHelperText.js +1 -2
  375. package/theme/components/MuiFormLabel.js +1 -1
  376. package/theme/components/MuiInputBase.js +1 -2
  377. package/theme/components/MuiInputLabel.js +1 -2
  378. package/theme/components/MuiListItemButton.js +1 -2
  379. package/theme/components/MuiListItemText.js +1 -1
  380. package/theme/components/MuiLoadingButton.js +12 -14
  381. package/theme/components/MuiMenu.js +2 -4
  382. package/theme/components/MuiMenuItem.js +1 -2
  383. package/theme/components/MuiOutlinedInput.js +6 -11
  384. package/theme/components/MuiPaginationItem.js +4 -6
  385. package/theme/components/MuiTab.js +1 -2
  386. package/theme/components/MuiTableCell.js +1 -1
  387. package/theme/components/MuiTableHead.js +2 -3
  388. package/theme/components/MuiTableRow.js +1 -2
  389. package/theme/components/MuiTabs.js +2 -3
  390. package/theme/components/components.js +64 -35
  391. package/theme/hooks/useTheme/index.js +2 -2
  392. package/theme/palette/brandPalette.js +17 -18
  393. package/theme/palette/palette.js +5 -17
  394. package/theme/typography.js +3 -4
  395. package/docs/Case/Case.d.ts +0 -8
  396. package/docs/Case/Case.js +0 -31
  397. package/docs/Case/index.d.ts +0 -1
  398. package/docs/Case/index.js +0 -17
  399. package/docs/Case/styles.d.ts +0 -5
  400. package/docs/Case/styles.js +0 -16
  401. package/docs/ExampleTemplate/ExampleTemplate.d.ts +0 -13
  402. package/docs/ExampleTemplate/ExampleTemplate.js +0 -26
  403. package/docs/ExampleTemplate/index.d.ts +0 -1
  404. package/docs/ExampleTemplate/index.js +0 -17
  405. package/docs/ExampleTemplate/styles.d.ts +0 -9
  406. package/docs/ExampleTemplate/styles.js +0 -13
  407. package/docs/index.d.ts +0 -2
  408. package/docs/index.js +0 -18
  409. package/esm/docs/Case/Case.d.ts +0 -8
  410. package/esm/docs/Case/Case.js +0 -27
  411. package/esm/docs/Case/index.d.ts +0 -1
  412. package/esm/docs/Case/index.js +0 -1
  413. package/esm/docs/Case/styles.d.ts +0 -5
  414. package/esm/docs/Case/styles.js +0 -13
  415. package/esm/docs/ExampleTemplate/ExampleTemplate.d.ts +0 -13
  416. package/esm/docs/ExampleTemplate/ExampleTemplate.js +0 -22
  417. package/esm/docs/ExampleTemplate/index.d.ts +0 -1
  418. package/esm/docs/ExampleTemplate/index.js +0 -1
  419. package/esm/docs/ExampleTemplate/styles.d.ts +0 -9
  420. package/esm/docs/ExampleTemplate/styles.js +0 -10
  421. package/esm/docs/index.d.ts +0 -2
  422. package/esm/docs/index.js +0 -2
@@ -1,11 +1,13 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
1
  import { styled } from '../../../../styles';
6
2
  import { Button } from '../../../../Button';
7
- export var SidebarTogglerButtonRoot = styled(Button)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n gap: 0;\n justify-content: flex-start;\n width: 100%;\n min-width: 0;\n padding: ", ";\n\n &.MuiButton-root .MuiButton-startIcon {\n margin: 0;\n }\n"], ["\n gap: 0;\n justify-content: flex-start;\n width: 100%;\n min-width: 0;\n padding: ", ";\n\n &.MuiButton-root .MuiButton-startIcon {\n margin: 0;\n }\n"])), function (_a) {
8
- var theme = _a.theme;
9
- return theme.spacing(2);
10
- });
11
- var templateObject_1;
3
+ export const SidebarTogglerButtonRoot = styled(Button) `
4
+ gap: 0;
5
+ justify-content: flex-start;
6
+ width: 100%;
7
+ min-width: 0;
8
+ padding: ${({ theme }) => theme.spacing(2)};
9
+
10
+ &.MuiButton-root .MuiButton-startIcon {
11
+ margin: 0;
12
+ }
13
+ `;
@@ -1,22 +1,11 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
1
  import { jsx as _jsx } from "react/jsx-runtime";
13
2
  import { forwardRef } from 'react';
14
3
  import { Collapse } from '../../../Collapse';
15
4
  import { SidebarTogglerContent, SidebarTogglerRoot } from './styled';
16
- export var SidebarToggler = forwardRef(function (props, ref) {
17
- var collapsedIn = props.collapsedIn, onToggle = props.onToggle;
18
- var handleButtonClick = function () {
5
+ export const SidebarToggler = forwardRef((props, ref) => {
6
+ const { collapsedIn, onToggle } = props;
7
+ const handleButtonClick = () => {
19
8
  onToggle();
20
9
  };
21
- return (_jsx(SidebarTogglerRoot, __assign({ ref: ref, collapsedIn: collapsedIn, onClick: handleButtonClick }, { children: _jsx(Collapse, __assign({ orientation: "horizontal", in: collapsedIn }, { children: _jsx(SidebarTogglerContent, { children: "\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u043C\u0435\u043D\u044E" }) })) })));
10
+ return (_jsx(SidebarTogglerRoot, Object.assign({ ref: ref, collapsedIn: collapsedIn, onClick: handleButtonClick }, { children: _jsx(Collapse, Object.assign({ orientation: "horizontal", in: collapsedIn }, { children: _jsx(SidebarTogglerContent, { children: "\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u043C\u0435\u043D\u044E" }) })) })));
22
11
  });
@@ -1,12 +1,11 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
1
  import { styled } from '../../../styles';
6
2
  import { SidebarTogglerButton } from './SidebarToggleButton';
7
- export var SidebarTogglerRoot = styled(SidebarTogglerButton)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 40px;\n margin-top: auto;\n"], ["\n height: 40px;\n margin-top: auto;\n"])));
8
- export var SidebarTogglerContent = styled.span(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin-left: ", ";\n\n white-space: nowrap;\n"], ["\n margin-left: ", ";\n\n white-space: nowrap;\n"])), function (_a) {
9
- var theme = _a.theme;
10
- return theme.spacing(4);
11
- });
12
- var templateObject_1, templateObject_2;
3
+ export const SidebarTogglerRoot = styled(SidebarTogglerButton) `
4
+ height: 40px;
5
+ margin-top: auto;
6
+ `;
7
+ export const SidebarTogglerContent = styled.span `
8
+ margin-left: ${({ theme }) => theme.spacing(4)};
9
+
10
+ white-space: nowrap;
11
+ `;
@@ -1,27 +1,19 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
1
  import { styled } from '../../styles';
6
- export var SidebarRoot = styled.aside(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n z-index: ", ";\n\n display: flex;\n flex-direction: column;\n grid-area: sidebar;\n min-width: ", ";\n padding: ", ";\n\n background-color: ", ";\n border-right: 1px solid ", ";\n\n transition: ", ";\n"], ["\n z-index: ", ";\n\n display: flex;\n flex-direction: column;\n grid-area: sidebar;\n min-width: ", ";\n padding: ", ";\n\n background-color: ", ";\n border-right: 1px solid ", ";\n\n transition: ", ";\n"])), function (_a) {
7
- var theme = _a.theme;
8
- return theme.zIndex.appBar - 1;
9
- }, function (_a) {
10
- var collapsedIn = _a.collapsedIn;
11
- return (collapsedIn ? '240px' : '100%');
12
- }, function (_a) {
13
- var theme = _a.theme;
14
- return theme.spacing(2);
15
- }, function (_a) {
16
- var theme = _a.theme;
17
- return theme.palette.background.element;
18
- }, function (_a) {
19
- var theme = _a.theme;
20
- return theme.palette.grey[300];
21
- }, function (_a) {
22
- var theme = _a.theme;
2
+ export const SidebarRoot = styled.aside `
3
+ z-index: ${({ theme }) => theme.zIndex.appBar - 1};
4
+
5
+ display: flex;
6
+ flex-direction: column;
7
+ grid-area: sidebar;
8
+ min-width: ${({ collapsedIn }) => (collapsedIn ? '240px' : '100%')};
9
+ padding: ${({ theme }) => theme.spacing(2)};
10
+
11
+ background-color: ${({ theme }) => theme.palette.background.element};
12
+ border-right: 1px solid ${({ theme }) => theme.palette.grey[300]};
13
+
14
+ transition: ${({ theme }) => {
23
15
  return theme.transitions.create('min-width', {
24
16
  duration: theme.transitions.duration.standard,
25
17
  });
26
- });
27
- var templateObject_1;
18
+ }};
19
+ `;
@@ -1,9 +1,11 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
1
  import { styled } from '../styles';
6
- export var DashboardLayoutRoot = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: grid;\n grid-template: ", ";\n height: 100vh;\n"], ["\n display: grid;\n grid-template: ", ";\n height: 100vh;\n"])), function () {
7
- return "\n\n [header-start] \"header header\" [header-end]\n [main-start] \"sidebar main\" 1fr [main-end] / auto 1fr\n ";
8
- });
9
- var templateObject_1;
2
+ export const DashboardLayoutRoot = styled.div `
3
+ display: grid;
4
+ grid-template: ${() => {
5
+ return `\n
6
+ [header-start] "header header" [header-end]
7
+ [main-start] "sidebar main" 1fr [main-end] / auto 1fr
8
+ `;
9
+ }};
10
+ height: 100vh;
11
+ `;
@@ -1,23 +1,3 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
13
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
14
- if (ar || !(i in from)) {
15
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
16
- ar[i] = from[i];
17
- }
18
- }
19
- return to.concat(ar || Array.prototype.slice.call(from));
20
- };
21
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
2
  import { useCallback, useMemo } from 'react';
23
3
  import { Table } from '../Table';
@@ -26,41 +6,36 @@ import { DataGridBody } from './DataGridBody';
26
6
  import DataGridLoader from './DataGridLoader/DataGridLoader';
27
7
  import { DataGridNoData } from './DataGridNoData';
28
8
  import { DataGridContainer, StyledTableContainer } from './styles';
29
- export function DataGrid(_a) {
30
- var columns = _a.columns, _b = _a.rows, rows = _b === void 0 ? [] : _b, _c = _a.selectedRows, selectedRows = _c === void 0 ? [] : _c, sorting = _a.sorting, maxHeight = _a.maxHeight, _d = _a.minDisplayRows, minDisplayRows = _d === void 0 ? 10 : _d, onRowClick = _a.onRowClick, onSelectRow = _a.onSelectRow, Footer = _a.Footer, noDataPlaceholder = _a.noDataPlaceholder, loading = _a.loading, onSort = _a.onSort, keyId = _a.keyId, emptyCellValue = _a.emptyCellValue;
31
- var selectable = Boolean(onSelectRow);
32
- var handleSelectAllRows = function (event) {
9
+ export function DataGrid({ columns, rows = [], selectedRows = [], sorting, maxHeight, minDisplayRows = 10, onRowClick, onSelectRow, Footer, noDataPlaceholder, loading, onSort, keyId, emptyCellValue, }) {
10
+ const selectable = Boolean(onSelectRow);
11
+ const handleSelectAllRows = (event) => {
33
12
  if (!onSelectRow) {
34
13
  return;
35
14
  }
36
15
  if (event.target.checked) {
37
- var mergedSelectedRows = __spreadArray(__spreadArray([], selectedRows, true), rows, true);
16
+ const mergedSelectedRows = [...selectedRows, ...rows];
38
17
  return onSelectRow(mergedSelectedRows);
39
18
  }
40
- var filteredRows = selectedRows.filter(function (selectedRow) { return !rows.find(function (row) { return row[keyId] === selectedRow[keyId]; }); });
19
+ const filteredRows = selectedRows.filter((selectedRow) => !rows.find((row) => row[keyId] === selectedRow[keyId]));
41
20
  onSelectRow(filteredRows);
42
21
  };
43
- var handleSelectRow = useCallback(function (row) {
44
- return function (event) {
45
- if (!onSelectRow) {
46
- return;
47
- }
48
- if (event.target.checked) {
49
- return onSelectRow(__spreadArray(__spreadArray([], selectedRows, true), [row], false));
50
- }
51
- return onSelectRow(selectedRows.filter(function (selectedRow) { return selectedRow[keyId] !== row[keyId]; }));
52
- };
22
+ const handleSelectRow = useCallback((row) => (event) => {
23
+ if (!onSelectRow) {
24
+ return;
25
+ }
26
+ if (event.target.checked) {
27
+ return onSelectRow([...selectedRows, row]);
28
+ }
29
+ return onSelectRow(selectedRows.filter((selectedRow) => selectedRow[keyId] !== row[keyId]));
53
30
  }, [selectedRows, onSelectRow, keyId]);
54
- var uncheckedRowsCount = useMemo(function () {
55
- return rows.filter(function (row) {
56
- return !selectedRows.find(function (selectedRow) { return selectedRow[keyId] === row[keyId]; });
57
- }).length;
31
+ const uncheckedRowsCount = useMemo(() => {
32
+ return rows.filter((row) => !selectedRows.find((selectedRow) => selectedRow[keyId] === row[keyId])).length;
58
33
  }, [rows, selectedRows, keyId]);
59
- var renderedPlaceholder = useCallback(function () {
34
+ const renderedPlaceholder = useCallback(() => {
60
35
  if (!loading) {
61
36
  return noDataPlaceholder || _jsx(DataGridNoData, {});
62
37
  }
63
38
  return null;
64
39
  }, [noDataPlaceholder, loading]);
65
- return (_jsxs(DataGridContainer, { children: [_jsxs(StyledTableContainer, __assign({ maxHeight: maxHeight }, { children: [_jsxs(Table, __assign({ stickyHeader: true }, { children: [_jsx(DataGridHead, { onSort: onSort, rowsCount: rows.length, uncheckedRowsCount: uncheckedRowsCount, onSelectAllRows: handleSelectAllRows, selectable: selectable, sorting: sorting, columns: columns }), _jsx(DataGridBody, { keyId: keyId, selectedRows: selectedRows, minDisplayRows: minDisplayRows, onRowClick: onRowClick, onSelectRow: handleSelectRow, selectable: selectable, rows: rows, columns: columns, emptyCellValue: emptyCellValue, noDataPlaceholder: renderedPlaceholder() })] })), _jsx(DataGridLoader, { loading: loading })] })), rows.length ? Footer : null] }));
40
+ return (_jsxs(DataGridContainer, { children: [_jsxs(StyledTableContainer, Object.assign({ maxHeight: maxHeight }, { children: [_jsxs(Table, Object.assign({ stickyHeader: true }, { children: [_jsx(DataGridHead, { onSort: onSort, rowsCount: rows.length, uncheckedRowsCount: uncheckedRowsCount, onSelectAllRows: handleSelectAllRows, selectable: selectable, sorting: sorting, columns: columns }), _jsx(DataGridBody, { keyId: keyId, selectedRows: selectedRows, minDisplayRows: minDisplayRows, onRowClick: onRowClick, onSelectRow: handleSelectRow, selectable: selectable, rows: rows, columns: columns, emptyCellValue: emptyCellValue, noDataPlaceholder: renderedPlaceholder() })] })), _jsx(DataGridLoader, { loading: loading })] })), rows.length ? Footer : null] }));
66
41
  }
@@ -1,6 +1,6 @@
1
1
  import { ChangeEvent, ReactNode } from 'react';
2
2
  import { DataGridColumns, DataGridRow } from '../types';
3
- export declare type DataGridBodyProps<Data> = {
3
+ export declare type DataGridBodyProps<Data extends object> = {
4
4
  columns: DataGridColumns<Data>[];
5
5
  keyId: keyof DataGridRow;
6
6
  onRowClick?: (row: Data) => void;
@@ -12,4 +12,4 @@ export declare type DataGridBodyProps<Data> = {
12
12
  emptyCellValue?: ReactNode;
13
13
  noDataPlaceholder?: ReactNode;
14
14
  };
15
- export declare function DataGridBody<Data>({ rows, columns, selectable, onRowClick, onSelectRow, selectedRows, minDisplayRows, keyId, emptyCellValue, noDataPlaceholder, }: DataGridBodyProps<Data>): JSX.Element;
15
+ export declare function DataGridBody<Data extends object>({ rows, columns, selectable, onRowClick, onSelectRow, selectedRows, minDisplayRows, keyId, emptyCellValue, noDataPlaceholder, }: DataGridBodyProps<Data>): JSX.Element;
@@ -1,40 +1,28 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
2
  import { useCallback, useMemo } from 'react';
14
3
  import { TableCell, TableRow } from '../../Table';
15
4
  import { DataGridCell } from '../DataGridCell';
16
5
  import { Checkbox } from '../../Checkbox';
17
6
  import { StyledTableBody } from './styles';
18
- export function DataGridBody(_a) {
19
- var rows = _a.rows, columns = _a.columns, selectable = _a.selectable, onRowClick = _a.onRowClick, onSelectRow = _a.onSelectRow, _b = _a.selectedRows, selectedRows = _b === void 0 ? [] : _b, minDisplayRows = _a.minDisplayRows, keyId = _a.keyId, emptyCellValue = _a.emptyCellValue, noDataPlaceholder = _a.noDataPlaceholder;
20
- var renderCells = useCallback(function (row, rowId) {
21
- return columns.map(function (cell, index) {
22
- var cellId = "".concat(rowId, "-").concat(index);
7
+ export function DataGridBody({ rows, columns, selectable, onRowClick, onSelectRow, selectedRows = [], minDisplayRows, keyId, emptyCellValue, noDataPlaceholder, }) {
8
+ const renderCells = useCallback((row, rowId) => {
9
+ return columns.map((cell, index) => {
10
+ const cellId = `${rowId}-${index}`;
23
11
  return (_jsx(DataGridCell, { row: row, cell: cell, emptyCellValue: emptyCellValue }, cellId));
24
12
  });
25
13
  }, [columns]);
26
- var handleRowClick = function (row) { return function () {
14
+ const handleRowClick = (row) => () => {
27
15
  if (onRowClick) {
28
16
  onRowClick(row);
29
17
  }
30
- }; };
31
- var renderedRows = useMemo(function () {
32
- return rows.map(function (row) {
33
- var rowId = row[keyId];
34
- var checked = selectable &&
35
- Boolean(selectedRows.find(function (selectedRow) { return selectedRow[keyId] === rowId; }));
36
- return (_jsxs(TableRow, __assign({ hover: Boolean(onRowClick), onClick: handleRowClick(row) }, { children: [selectable && (_jsx(TableCell, __assign({ padding: "checkbox", onClick: function (event) { return event.stopPropagation(); } }, { children: _jsx(Checkbox, { checked: checked, onChange: onSelectRow(row) }) }))), renderCells(row, rowId)] }), rowId));
18
+ };
19
+ const renderedRows = useMemo(() => {
20
+ return rows.map((row) => {
21
+ const rowId = row[keyId];
22
+ const checked = selectable &&
23
+ Boolean(selectedRows.find((selectedRow) => selectedRow[keyId] === rowId));
24
+ return (_jsxs(TableRow, Object.assign({ hover: Boolean(onRowClick), onClick: handleRowClick(row) }, { children: [selectable && (_jsx(TableCell, Object.assign({ padding: "checkbox", onClick: (event) => event.stopPropagation() }, { children: _jsx(Checkbox, { checked: checked, onChange: onSelectRow(row) }) }))), renderCells(row, rowId)] }), rowId));
37
25
  });
38
26
  }, [rows, keyId, selectable, selectedRows, onSelectRow, onRowClick, columns]);
39
- return (_jsx(StyledTableBody, __assign({ empty: !rows.length, minDisplayRows: minDisplayRows }, { children: rows.length ? renderedRows : noDataPlaceholder })));
27
+ return (_jsx(StyledTableBody, Object.assign({ empty: !rows.length, minDisplayRows: minDisplayRows }, { children: rows.length ? renderedRows : noDataPlaceholder })));
40
28
  }
@@ -1,14 +1,10 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
1
  import { styled } from '../../styles';
6
2
  import { TableBody } from '../../Table';
7
- var TABLE_ROW_HEIGHT = 44;
8
- export var StyledTableBody = styled(TableBody, {
9
- shouldForwardProp: function (prop) { return prop !== 'empty' && prop !== 'minDisplayRows'; },
10
- })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n\n height: ", ";\n"], ["\n position: relative;\n\n height: ", ";\n"])), function (_a) {
11
- var empty = _a.empty, minDisplayRows = _a.minDisplayRows;
12
- return empty ? "".concat(TABLE_ROW_HEIGHT * minDisplayRows, "px") : 'auto';
13
- });
14
- var templateObject_1;
3
+ const TABLE_ROW_HEIGHT = 44;
4
+ export const StyledTableBody = styled(TableBody, {
5
+ shouldForwardProp: (prop) => prop !== 'empty' && prop !== 'minDisplayRows',
6
+ }) `
7
+ position: relative;
8
+
9
+ height: ${({ empty, minDisplayRows }) => empty ? `${TABLE_ROW_HEIGHT * minDisplayRows}px` : 'auto'};
10
+ `;
@@ -1,8 +1,8 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { DataGridColumns } from '../types';
3
- export declare type CellProps<Data> = {
3
+ export declare type CellProps<Data extends object> = {
4
4
  row: Data;
5
5
  cell: DataGridColumns<Data>;
6
6
  emptyCellValue?: ReactNode;
7
7
  };
8
- export declare function DataGridCell<Data>({ row, cell: { field, renderCell, format, align }, emptyCellValue, }: CellProps<Data>): JSX.Element;
8
+ export declare function DataGridCell<Data extends object>({ row, cell: { field, renderCell, format, align }, emptyCellValue, }: CellProps<Data>): JSX.Element;
@@ -1,21 +1,9 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
2
  import { useMemo } from 'react';
14
3
  import { TableCell } from '../../Table';
15
4
  import { Typography } from '../../Typography';
16
- export function DataGridCell(_a) {
17
- var row = _a.row, _b = _a.cell, field = _b.field, renderCell = _b.renderCell, format = _b.format, _c = _b.align, align = _c === void 0 ? 'left' : _c, _d = _a.emptyCellValue, emptyCellValue = _d === void 0 ? '-' : _d;
18
- var formattedValue = useMemo(function () {
5
+ export function DataGridCell({ row, cell: { field, renderCell, format, align = 'left' }, emptyCellValue = '-', }) {
6
+ const formattedValue = useMemo(() => {
19
7
  if (format) {
20
8
  return format(row);
21
9
  }
@@ -24,5 +12,5 @@ export function DataGridCell(_a) {
24
12
  }
25
13
  return emptyCellValue;
26
14
  }, [field, format, row, emptyCellValue]);
27
- return (_jsxs(TableCell, __assign({ align: align }, { children: [renderCell && renderCell(row), !renderCell && (_jsx(Typography, { children: _jsx(_Fragment, { children: formattedValue }) }))] })));
15
+ return (_jsxs(TableCell, Object.assign({ align: align }, { children: [renderCell && renderCell(row), !renderCell && (_jsx(Typography, { children: _jsx(_Fragment, { children: formattedValue }) }))] })));
28
16
  }
@@ -1,6 +1,6 @@
1
1
  import { ChangeEvent } from 'react';
2
2
  import { DataGridColumns, DataGridRow, DataGridSort } from '../types';
3
- export declare type DataGridHeadProps<Data = DataGridRow, SortField extends keyof Data = keyof Data> = {
3
+ export declare type DataGridHeadProps<Data extends object = DataGridRow, SortField extends keyof Data = keyof Data> = {
4
4
  columns: DataGridColumns<Data>[];
5
5
  selectable: boolean;
6
6
  onSelectAllRows: (event: ChangeEvent<HTMLInputElement>) => void;
@@ -9,4 +9,4 @@ export declare type DataGridHeadProps<Data = DataGridRow, SortField extends keyo
9
9
  uncheckedRowsCount: number;
10
10
  rowsCount: number;
11
11
  };
12
- export declare function DataGridHead<Data, SortField extends keyof Data>({ columns, selectable, onSelectAllRows, rowsCount, onSort, sorting, uncheckedRowsCount, }: DataGridHeadProps<Data, SortField>): JSX.Element;
12
+ export declare function DataGridHead<Data extends object, SortField extends keyof Data>({ columns, selectable, onSelectAllRows, rowsCount, onSort, sorting, uncheckedRowsCount, }: DataGridHeadProps<Data, SortField>): JSX.Element;
@@ -1,14 +1,3 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
2
  import { useCallback, useMemo } from 'react';
14
3
  import { TableHead } from '../../Table/TableHead';
@@ -16,15 +5,14 @@ import { TableCell, TableRow } from '../../Table';
16
5
  import { Checkbox } from '../../Checkbox';
17
6
  import { SortStates } from '../constants';
18
7
  import { DataGridHeadColumn } from '../DataGridHeadColumn';
19
- export function DataGridHead(_a) {
20
- var columns = _a.columns, selectable = _a.selectable, onSelectAllRows = _a.onSelectAllRows, rowsCount = _a.rowsCount, onSort = _a.onSort, sorting = _a.sorting, uncheckedRowsCount = _a.uncheckedRowsCount;
21
- var checked = useMemo(function () { return !Boolean(uncheckedRowsCount) && rowsCount > 0; }, [uncheckedRowsCount, rowsCount]);
22
- var indeterminate = useMemo(function () { return uncheckedRowsCount > 0 && uncheckedRowsCount < rowsCount; }, [uncheckedRowsCount, rowsCount]);
23
- var handleSort = useCallback(function (field) {
8
+ export function DataGridHead({ columns, selectable, onSelectAllRows, rowsCount, onSort, sorting, uncheckedRowsCount, }) {
9
+ const checked = useMemo(() => !Boolean(uncheckedRowsCount) && rowsCount > 0, [uncheckedRowsCount, rowsCount]);
10
+ const indeterminate = useMemo(() => uncheckedRowsCount > 0 && uncheckedRowsCount < rowsCount, [uncheckedRowsCount, rowsCount]);
11
+ const handleSort = useCallback((field) => {
24
12
  if (!onSort) {
25
13
  return;
26
14
  }
27
- var isCurrentField = (sorting === null || sorting === void 0 ? void 0 : sorting.fieldId) === field;
15
+ const isCurrentField = (sorting === null || sorting === void 0 ? void 0 : sorting.fieldId) === field;
28
16
  // если для выбранного столбца текущая сортировка ASC - меняем на DESC
29
17
  if (isCurrentField && sorting.sort === SortStates.ASC) {
30
18
  return onSort({ fieldId: field, sort: SortStates.DESC });
@@ -36,11 +24,10 @@ export function DataGridHead(_a) {
36
24
  // если для выбранного столбца нет сортировки - добавляем сортировку ASC
37
25
  onSort({ fieldId: field, sort: SortStates.ASC });
38
26
  }, [sorting, onSort]);
39
- var renderColumns = useMemo(function () {
40
- return columns.map(function (_a) {
41
- var field = _a.field, label = _a.label, sortable = _a.sortable, align = _a.align, width = _a.width;
27
+ const renderColumns = useMemo(() => {
28
+ return columns.map(({ field, label, sortable, align, width }) => {
42
29
  return (_jsx(DataGridHeadColumn, { sorting: sorting, field: field, onSort: handleSort, label: label, sortable: sortable, align: align, width: width }, label));
43
30
  });
44
31
  }, [columns, handleSort, sorting]);
45
- return (_jsx(TableHead, { children: _jsxs(TableRow, { children: [selectable && (_jsx(TableCell, __assign({ padding: "checkbox" }, { children: _jsx(Checkbox, { checked: checked, indeterminate: indeterminate, onChange: onSelectAllRows }) }))), renderColumns] }) }));
32
+ return (_jsx(TableHead, { children: _jsxs(TableRow, { children: [selectable && (_jsx(TableCell, Object.assign({ padding: "checkbox" }, { children: _jsx(Checkbox, { checked: checked, indeterminate: indeterminate, onChange: onSelectAllRows }) }))), renderColumns] }) }));
46
33
  }
@@ -1,22 +1,10 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
2
  import { useMemo } from 'react';
14
3
  import { SortDownFillSm, SortFillSm, SortUpFillSm } from '@astral/icons';
15
4
  import { SortStates } from '../constants';
16
5
  import { StyledTableCell, TableCellTitle } from './styles';
17
- export function DataGridHeadColumn(_a) {
18
- var onSort = _a.onSort, field = _a.field, sortable = _a.sortable, align = _a.align, label = _a.label, sorting = _a.sorting, width = _a.width;
19
- var sortIcon = useMemo(function () {
6
+ export function DataGridHeadColumn({ onSort, field, sortable, align, label, sorting, width, }) {
7
+ const sortIcon = useMemo(() => {
20
8
  if (!sortable) {
21
9
  return null;
22
10
  }
@@ -32,10 +20,10 @@ export function DataGridHeadColumn(_a) {
32
20
  return _jsx(SortFillSm, {});
33
21
  }
34
22
  }, [sorting, sortable, field]);
35
- var handleSortClick = function () {
23
+ const handleSortClick = () => {
36
24
  if (field && sortable) {
37
25
  onSort(field);
38
26
  }
39
27
  };
40
- return (_jsx(StyledTableCell, __assign({ onClick: handleSortClick, align: align, width: width, sortable: sortable }, { children: _jsxs(TableCellTitle, __assign({ variant: "pointer" }, { children: [label, sortIcon] })) })));
28
+ return (_jsx(StyledTableCell, Object.assign({ onClick: handleSortClick, align: align, width: width, sortable: sortable }, { children: _jsxs(TableCellTitle, Object.assign({ variant: "pointer" }, { children: [label, sortIcon] })) })));
41
29
  }
@@ -1,24 +1,24 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
1
  import { styled } from '../../styles';
6
2
  import { TableCell } from '../../Table';
7
3
  import { Typography } from '../../Typography';
8
- export var StyledTableCell = styled(TableCell, {
9
- shouldForwardProp: function (prop) { return prop !== 'width' && prop !== 'sortable'; },
10
- })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: ", ";\n padding: ", ";\n\n color: ", ";\n\n cursor: ", ";\n\n user-select: none;\n"], ["\n width: ", ";\n padding: ", ";\n\n color: ", ";\n\n cursor: ", ";\n\n user-select: none;\n"])), function (_a) {
11
- var _b = _a.width, width = _b === void 0 ? 'auto' : _b;
12
- return width;
13
- }, function (_a) {
14
- var theme = _a.theme;
15
- return theme.spacing(3, 4);
16
- }, function (_a) {
17
- var theme = _a.theme;
18
- return theme.palette.grey[700];
19
- }, function (_a) {
20
- var sortable = _a.sortable;
21
- return (sortable ? 'pointer' : 'initial');
22
- });
23
- export var TableCellTitle = styled(Typography)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n\n > svg {\n width: 16px;\n height: 16px;\n }\n"], ["\n display: flex;\n align-items: center;\n\n > svg {\n width: 16px;\n height: 16px;\n }\n"])));
24
- var templateObject_1, templateObject_2;
4
+ export const StyledTableCell = styled(TableCell, {
5
+ shouldForwardProp: (prop) => prop !== 'width' && prop !== 'sortable',
6
+ }) `
7
+ width: ${({ width = 'auto' }) => width};
8
+ padding: ${({ theme }) => theme.spacing(3, 4)};
9
+
10
+ color: ${({ theme }) => theme.palette.grey[700]};
11
+
12
+ cursor: ${({ sortable }) => (sortable ? 'pointer' : 'initial')};
13
+
14
+ user-select: none;
15
+ `;
16
+ export const TableCellTitle = styled(Typography) `
17
+ display: flex;
18
+ align-items: center;
19
+
20
+ > svg {
21
+ width: 16px;
22
+ height: 16px;
23
+ }
24
+ `;
@@ -1,7 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Backdrop, LoaderWrapper, StyledDivider, StyledLinearProgress, } from './styles';
3
- var DataGridLoader = function (_a) {
4
- var _b = _a.loading, loading = _b === void 0 ? false : _b;
3
+ const DataGridLoader = ({ loading = false }) => {
5
4
  return (_jsxs(LoaderWrapper, { children: [loading && _jsx(Backdrop, {}), loading ? _jsx(StyledLinearProgress, {}) : _jsx(StyledDivider, {})] }));
6
5
  };
7
6
  export default DataGridLoader;
@@ -1,15 +1,22 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
1
  import { LinearProgress } from '@mui/material';
6
2
  import { Divider } from '../../Divider';
7
3
  import { styled } from '../../styles';
8
- export var Backdrop = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n\n width: 100%;\n height: 100%;\n\n background-color: ", ";\n opacity: 0.6;\n"], ["\n position: absolute;\n top: 0;\n\n width: 100%;\n height: 100%;\n\n background-color: ", ";\n opacity: 0.6;\n"])), function (_a) {
9
- var theme = _a.theme;
10
- return theme.palette.grey['100'];
11
- });
12
- export var StyledDivider = styled(Divider)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border-width: 1px;\n"], ["\n border-width: 1px;\n"])));
13
- export var LoaderWrapper = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n height: 2px;\n"], ["\n height: 2px;\n"])));
14
- export var StyledLinearProgress = styled(LinearProgress)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n height: 2px;\n"], ["\n height: 2px;\n"])));
15
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
4
+ export const Backdrop = styled.div `
5
+ position: absolute;
6
+ top: 0;
7
+
8
+ width: 100%;
9
+ height: 100%;
10
+
11
+ background-color: ${({ theme }) => theme.palette.grey['100']};
12
+ opacity: 0.6;
13
+ `;
14
+ export const StyledDivider = styled(Divider) `
15
+ border-width: 1px;
16
+ `;
17
+ export const LoaderWrapper = styled.div `
18
+ height: 2px;
19
+ `;
20
+ export const StyledLinearProgress = styled(LinearProgress) `
21
+ height: 2px;
22
+ `;
@@ -1,18 +1,6 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
2
  import { DataGridNoDataFigcaption, DataGridNoDataFigure, DataGridNoDataIcon, DataGridNoDataWrapper, } from './styles';
14
- var BaseNoDataIcon = function () { return (_jsxs("svg", __assign({ viewBox: "0 0 124 124", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { fill: "#EBEEF1", stroke: "#B7C2CE", d: "M106.5 62a43.5 43.5 0 1 1-87 0 43.5 43.5 0 0 1 87 0Z" }), _jsx("path", { fill: "#B7C2CE", fillRule: "evenodd", d: "m48.3 74 22.5-44.7a5.3 5.3 0 0 1 7-2.3l23.7 12a5 5 0 0 1 2.7 3l4.7 14.8c.4 1.3.3 2.7-.3 4L91 95.4a5.3 5.3 0 0 1-7.1 2.3L50.6 81a5.3 5.3 0 0 1-2.3-7Zm.9.4 22.5-44.6c1-2.1 3.6-3 5.7-1.9l23.7 12c.7.3 1.2.8 1.6 1.4l-3.3 6.5a5.3 5.3 0 0 0 2.4 7l6.3 3.3c0 .7 0 1.5-.4 2.2L90.2 95a4.4 4.4 0 0 1-5.8 1.8L51.1 80.1c-2.1-1-3-3.6-2-5.7Z", clipRule: "evenodd" }), _jsx("path", { fill: "#fff", d: "M71.7 29.8 49.2 74.4c-1 2-.2 4.7 1.9 5.7L84.4 97c2.1 1.1 4.7.3 5.8-1.8l17.5-34.8c.3-.7.5-1.5.4-2.2l-6.3-3.2a5.3 5.3 0 0 1-2.4-7l3.3-6.6c-.4-.6-1-1.1-1.6-1.4L77.4 28c-2.1-1-4.7-.2-5.7 1.9Z" }), _jsx("path", { fill: "#B7C2CE", fillRule: "evenodd", d: "M77 33.9c.1-.4.6-.5 1-.3l17.5 8.8a.7.7 0 0 1-.6 1.3l-17.6-8.9a.7.7 0 0 1-.3-1Zm-2.4 4.6c.2-.3.6-.5 1-.3l6.1 3.1a.7.7 0 0 1-.6 1.3l-6.2-3.1a.7.7 0 0 1-.3-1Z", clipRule: "evenodd" }), _jsx("path", { stroke: "#B7C2CE", strokeLinecap: "round", strokeWidth: "2.1", d: "m57.1 74 5.6 2.8m4.6 2.3 2.4 1.2" }), _jsx("path", { fill: "#B7C2CE", fillRule: "evenodd", d: "M67.8 50.5a2.6 2.6 0 0 1 3.5-1.1l25.5 12.8c1.3.6 1.8 2.2 1.1 3.5l-7.5 15a2.6 2.6 0 0 1-3.6 1.2L61.4 69a2.6 2.6 0 0 1-1.2-3.5l7.6-15Zm3-.3 25.5 12.9c.8.4 1.2 1.4.7 2.2l-1 2.3-28.5-14.3 1.2-2.3c.4-.8 1.4-1.2 2.2-.8Zm-3.7 4-1.8 3.5L93.6 72l1.9-3.6L67 54.1Zm26.1 18.7L64.8 58.6 62.6 63l28.3 14.3 2.3-4.4Zm-2.6 5.3h-.2L62.2 63.8l-1 2c-.5.9-.2 1.8.6 2.3L87.3 81c.8.4 1.8 0 2.2-.7l1-2.1Z", clipRule: "evenodd" }), _jsx("path", { fill: "#fff", d: "M41.1 30.7c.7-.3 1.4-.5 2.1-.5l3.7 6.3a5.3 5.3 0 0 0 7.2 2l6.1-3.7c.7.4 1.2 1 1.6 1.6l19.5 33.7c1.2 2 .5 4.7-1.6 5.9L47.4 94.6c-2 1.2-4.7.5-5.9-1.5l-25-43.3c-1.1-2-.4-4.6 1.6-5.8l23-13.3Z" }), _jsx("path", { fill: "#B7C2CE", fillRule: "evenodd", d: "M61.2 34.3c-.5-.4-1-.7-1.7-.8l-14.8-4.1a5.3 5.3 0 0 0-4 .5L17.6 43a5.3 5.3 0 0 0-2 7.2l25 43.3a5.3 5.3 0 0 0 7.2 2l32.3-18.8a5.3 5.3 0 0 0 2-7.2L62.7 36c-.4-.6-.9-1.2-1.5-1.6Zm-18-4.1c-.7 0-1.4.2-2 .5L18.1 44a4.3 4.3 0 0 0-1.6 5.8l25 43.3c1.1 2 3.7 2.7 5.8 1.5L79.7 76c2-1.2 2.8-3.8 1.6-5.9L61.8 36.4c-.4-.7-.9-1.2-1.6-1.6l-6.1 3.6a5.3 5.3 0 0 1-7.2-2l-3.7-6.2Z", clipRule: "evenodd" }), _jsx("path", { fill: "#B7C2CE", fillRule: "evenodd", d: "M23 47.8c-.2-.4-.2-1 .2-1.1l17-9.9c.4-.2.8 0 1.1.5.3.4.2 1-.1 1.1l-17 9.9c-.4.2-1 0-1.2-.5Zm2.6 4.5c-.2-.4-.2-1 .2-1.1l6-3.5c.3-.2.8 0 1 .5.3.4.2 1-.1 1.2l-6 3.4c-.3.2-.8 0-1-.5ZM45 87.2c-.2-.2-.1-.5.1-.6l6.4-3.7a.5.5 0 0 1 .5.8l-6.4 3.7c-.2.1-.5 0-.7-.2Zm9.8-5.7c-.1-.2 0-.5.2-.6l3.3-2c.2 0 .5 0 .6.2.1.3 0 .6-.2.7l-3.3 1.9c-.2.1-.5 0-.6-.2Zm-23-17.1a2.6 2.6 0 0 1 1-3.6l26.4-15.2c1.3-.8 2.9-.3 3.6 1L71.2 61c.7 1.2.3 2.8-1 3.6L43.8 79.9c-1.3.8-2.9.3-3.6-1l-8.4-14.5Zm1.5-2.7 26.4-15.3c.8-.4 1.8-.1 2.2.6l8.4 14.6c.5.8.2 1.8-.6 2.2L43.3 79.1c-.8.4-1.8.2-2.2-.6l-1.2-2 29.3-17-.5-.8-29.3 16.9-2.5-4.3 29.3-16.9-.5-.9-29.3 17-2-3.5 29.3-17-.5-.8-29.3 17-1.2-2.3c-.5-.7-.2-1.7.6-2.2Z", clipRule: "evenodd" }), _jsx("path", { fill: "#fff", d: "M34.7 30.1v64.1c0 3 2.4 5.4 5.4 5.4h45.4c3 0 5.4-2.4 5.4-5.4v-50c0-.6-.1-1.2-.3-1.7h-9.2A6.4 6.4 0 0 1 75 36V25.4c-.8-.4-1.8-.7-2.7-.7H40c-3 0-5.4 2.4-5.4 5.4Z" }), _jsx("path", { fill: "#B7C2CE", fillRule: "evenodd", d: "M75 24.3c-.9-.4-1.8-.6-2.7-.6H40a6.4 6.4 0 0 0-6.4 6.4v64.1c0 3.6 2.9 6.4 6.4 6.4h45.4c3.5 0 6.4-2.8 6.4-6.4v-50a6.4 6.4 0 0 0-1.8-4.4l-13-14a6.4 6.4 0 0 0-2-1.5Zm-40.3 70V30c0-3 2.4-5.4 5.4-5.4h32.2c1 0 1.9.3 2.7.7V36c0 3.5 2.9 6.4 6.4 6.4h9.2c.2.5.3 1 .3 1.7v50c0 3-2.4 5.4-5.4 5.4H40c-3 0-5.4-2.4-5.4-5.4Z", clipRule: "evenodd" }), _jsx("path", { fill: "#B7C2CE", fillRule: "evenodd", d: "M43 34c0-.5.5-1 1-1h20.7c.5 0 1 .5 1 1s-.5 1-1 1H44a1 1 0 0 1-1-1Zm0 3.8c0-.5.5-1 1-1h7.6c.5 0 .9.5.9 1s-.4 1-.9 1H44a1 1 0 0 1-1-1Zm-.8 52c0-.2.1-.4.4-.4H52c.3 0 .5.2.5.4 0 .3-.2.5-.5.5h-9.4c-.3 0-.4-.2-.4-.5Zm14 0c0-.2.2-.4.5-.4h4.7c.3 0 .5.2.5.4 0 .3-.2.5-.5.5h-4.7c-.3 0-.5-.2-.5-.5Zm-15-34.9c0-1.2 1-2.1 2.1-2.1h39c1.1 0 2 1 2 2v24a2 2 0 0 1-2 2.1h-39a2 2 0 0 1-2-2v-24Zm2.1-1.1h39c.6 0 1 .5 1 1v4.6h-41V55c0-.6.4-1.1 1-1.1Zm-1 20.6v4.4c0 .6.4 1.1 1 1.1h39c.6 0 1-.5 1-1v-4.5h-41Zm41-1h-41V67h41v6.6Zm0-13.1V66h-41v-5.7h41Z", clipRule: "evenodd" }), _jsx("circle", { cx: "19.8", cy: "35.9", r: "2", fill: "#F0F4F7" }), _jsx("circle", { cx: "101.2", cy: "28.3", r: "2.7", fill: "#F0F4F7" }), _jsx("circle", { cx: "29.5", cy: "98.4", r: "1.9", fill: "#DDE2E8" }), _jsx("circle", { cx: "24.3", cy: "29.7", r: "1.3", fill: "#DDE2E8" }), _jsx("circle", { cx: "96.7", cy: "23.1", r: "1.3", fill: "#DDE2E8" }), _jsx("circle", { cx: "103.9", cy: "86.3", r: "1.3", fill: "#EBEEF1" })] }))); };
15
- export var DataGridNoData = function (_a) {
16
- var _b = _a.title, title = _b === void 0 ? 'Нет данных' : _b, _c = _a.noDataIcon, noDataIcon = _c === void 0 ? BaseNoDataIcon() : _c, _d = _a.noDataIconWidth, noDataIconWidth = _d === void 0 ? 250 : _d;
17
- return (_jsx(DataGridNoDataWrapper, { children: _jsxs(DataGridNoDataFigure, { children: [_jsx(DataGridNoDataIcon, __assign({ noDataIconWidth: noDataIconWidth }, { children: noDataIcon })), _jsx(DataGridNoDataFigcaption, __assign({ component: "figcaption", variant: "h4" }, { children: title }))] }) }));
3
+ const BaseNoDataIcon = () => (_jsxs("svg", Object.assign({ viewBox: "0 0 124 124", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { fill: "#EBEEF1", stroke: "#B7C2CE", d: "M106.5 62a43.5 43.5 0 1 1-87 0 43.5 43.5 0 0 1 87 0Z" }), _jsx("path", { fill: "#B7C2CE", fillRule: "evenodd", d: "m48.3 74 22.5-44.7a5.3 5.3 0 0 1 7-2.3l23.7 12a5 5 0 0 1 2.7 3l4.7 14.8c.4 1.3.3 2.7-.3 4L91 95.4a5.3 5.3 0 0 1-7.1 2.3L50.6 81a5.3 5.3 0 0 1-2.3-7Zm.9.4 22.5-44.6c1-2.1 3.6-3 5.7-1.9l23.7 12c.7.3 1.2.8 1.6 1.4l-3.3 6.5a5.3 5.3 0 0 0 2.4 7l6.3 3.3c0 .7 0 1.5-.4 2.2L90.2 95a4.4 4.4 0 0 1-5.8 1.8L51.1 80.1c-2.1-1-3-3.6-2-5.7Z", clipRule: "evenodd" }), _jsx("path", { fill: "#fff", d: "M71.7 29.8 49.2 74.4c-1 2-.2 4.7 1.9 5.7L84.4 97c2.1 1.1 4.7.3 5.8-1.8l17.5-34.8c.3-.7.5-1.5.4-2.2l-6.3-3.2a5.3 5.3 0 0 1-2.4-7l3.3-6.6c-.4-.6-1-1.1-1.6-1.4L77.4 28c-2.1-1-4.7-.2-5.7 1.9Z" }), _jsx("path", { fill: "#B7C2CE", fillRule: "evenodd", d: "M77 33.9c.1-.4.6-.5 1-.3l17.5 8.8a.7.7 0 0 1-.6 1.3l-17.6-8.9a.7.7 0 0 1-.3-1Zm-2.4 4.6c.2-.3.6-.5 1-.3l6.1 3.1a.7.7 0 0 1-.6 1.3l-6.2-3.1a.7.7 0 0 1-.3-1Z", clipRule: "evenodd" }), _jsx("path", { stroke: "#B7C2CE", strokeLinecap: "round", strokeWidth: "2.1", d: "m57.1 74 5.6 2.8m4.6 2.3 2.4 1.2" }), _jsx("path", { fill: "#B7C2CE", fillRule: "evenodd", d: "M67.8 50.5a2.6 2.6 0 0 1 3.5-1.1l25.5 12.8c1.3.6 1.8 2.2 1.1 3.5l-7.5 15a2.6 2.6 0 0 1-3.6 1.2L61.4 69a2.6 2.6 0 0 1-1.2-3.5l7.6-15Zm3-.3 25.5 12.9c.8.4 1.2 1.4.7 2.2l-1 2.3-28.5-14.3 1.2-2.3c.4-.8 1.4-1.2 2.2-.8Zm-3.7 4-1.8 3.5L93.6 72l1.9-3.6L67 54.1Zm26.1 18.7L64.8 58.6 62.6 63l28.3 14.3 2.3-4.4Zm-2.6 5.3h-.2L62.2 63.8l-1 2c-.5.9-.2 1.8.6 2.3L87.3 81c.8.4 1.8 0 2.2-.7l1-2.1Z", clipRule: "evenodd" }), _jsx("path", { fill: "#fff", d: "M41.1 30.7c.7-.3 1.4-.5 2.1-.5l3.7 6.3a5.3 5.3 0 0 0 7.2 2l6.1-3.7c.7.4 1.2 1 1.6 1.6l19.5 33.7c1.2 2 .5 4.7-1.6 5.9L47.4 94.6c-2 1.2-4.7.5-5.9-1.5l-25-43.3c-1.1-2-.4-4.6 1.6-5.8l23-13.3Z" }), _jsx("path", { fill: "#B7C2CE", fillRule: "evenodd", d: "M61.2 34.3c-.5-.4-1-.7-1.7-.8l-14.8-4.1a5.3 5.3 0 0 0-4 .5L17.6 43a5.3 5.3 0 0 0-2 7.2l25 43.3a5.3 5.3 0 0 0 7.2 2l32.3-18.8a5.3 5.3 0 0 0 2-7.2L62.7 36c-.4-.6-.9-1.2-1.5-1.6Zm-18-4.1c-.7 0-1.4.2-2 .5L18.1 44a4.3 4.3 0 0 0-1.6 5.8l25 43.3c1.1 2 3.7 2.7 5.8 1.5L79.7 76c2-1.2 2.8-3.8 1.6-5.9L61.8 36.4c-.4-.7-.9-1.2-1.6-1.6l-6.1 3.6a5.3 5.3 0 0 1-7.2-2l-3.7-6.2Z", clipRule: "evenodd" }), _jsx("path", { fill: "#B7C2CE", fillRule: "evenodd", d: "M23 47.8c-.2-.4-.2-1 .2-1.1l17-9.9c.4-.2.8 0 1.1.5.3.4.2 1-.1 1.1l-17 9.9c-.4.2-1 0-1.2-.5Zm2.6 4.5c-.2-.4-.2-1 .2-1.1l6-3.5c.3-.2.8 0 1 .5.3.4.2 1-.1 1.2l-6 3.4c-.3.2-.8 0-1-.5ZM45 87.2c-.2-.2-.1-.5.1-.6l6.4-3.7a.5.5 0 0 1 .5.8l-6.4 3.7c-.2.1-.5 0-.7-.2Zm9.8-5.7c-.1-.2 0-.5.2-.6l3.3-2c.2 0 .5 0 .6.2.1.3 0 .6-.2.7l-3.3 1.9c-.2.1-.5 0-.6-.2Zm-23-17.1a2.6 2.6 0 0 1 1-3.6l26.4-15.2c1.3-.8 2.9-.3 3.6 1L71.2 61c.7 1.2.3 2.8-1 3.6L43.8 79.9c-1.3.8-2.9.3-3.6-1l-8.4-14.5Zm1.5-2.7 26.4-15.3c.8-.4 1.8-.1 2.2.6l8.4 14.6c.5.8.2 1.8-.6 2.2L43.3 79.1c-.8.4-1.8.2-2.2-.6l-1.2-2 29.3-17-.5-.8-29.3 16.9-2.5-4.3 29.3-16.9-.5-.9-29.3 17-2-3.5 29.3-17-.5-.8-29.3 17-1.2-2.3c-.5-.7-.2-1.7.6-2.2Z", clipRule: "evenodd" }), _jsx("path", { fill: "#fff", d: "M34.7 30.1v64.1c0 3 2.4 5.4 5.4 5.4h45.4c3 0 5.4-2.4 5.4-5.4v-50c0-.6-.1-1.2-.3-1.7h-9.2A6.4 6.4 0 0 1 75 36V25.4c-.8-.4-1.8-.7-2.7-.7H40c-3 0-5.4 2.4-5.4 5.4Z" }), _jsx("path", { fill: "#B7C2CE", fillRule: "evenodd", d: "M75 24.3c-.9-.4-1.8-.6-2.7-.6H40a6.4 6.4 0 0 0-6.4 6.4v64.1c0 3.6 2.9 6.4 6.4 6.4h45.4c3.5 0 6.4-2.8 6.4-6.4v-50a6.4 6.4 0 0 0-1.8-4.4l-13-14a6.4 6.4 0 0 0-2-1.5Zm-40.3 70V30c0-3 2.4-5.4 5.4-5.4h32.2c1 0 1.9.3 2.7.7V36c0 3.5 2.9 6.4 6.4 6.4h9.2c.2.5.3 1 .3 1.7v50c0 3-2.4 5.4-5.4 5.4H40c-3 0-5.4-2.4-5.4-5.4Z", clipRule: "evenodd" }), _jsx("path", { fill: "#B7C2CE", fillRule: "evenodd", d: "M43 34c0-.5.5-1 1-1h20.7c.5 0 1 .5 1 1s-.5 1-1 1H44a1 1 0 0 1-1-1Zm0 3.8c0-.5.5-1 1-1h7.6c.5 0 .9.5.9 1s-.4 1-.9 1H44a1 1 0 0 1-1-1Zm-.8 52c0-.2.1-.4.4-.4H52c.3 0 .5.2.5.4 0 .3-.2.5-.5.5h-9.4c-.3 0-.4-.2-.4-.5Zm14 0c0-.2.2-.4.5-.4h4.7c.3 0 .5.2.5.4 0 .3-.2.5-.5.5h-4.7c-.3 0-.5-.2-.5-.5Zm-15-34.9c0-1.2 1-2.1 2.1-2.1h39c1.1 0 2 1 2 2v24a2 2 0 0 1-2 2.1h-39a2 2 0 0 1-2-2v-24Zm2.1-1.1h39c.6 0 1 .5 1 1v4.6h-41V55c0-.6.4-1.1 1-1.1Zm-1 20.6v4.4c0 .6.4 1.1 1 1.1h39c.6 0 1-.5 1-1v-4.5h-41Zm41-1h-41V67h41v6.6Zm0-13.1V66h-41v-5.7h41Z", clipRule: "evenodd" }), _jsx("circle", { cx: "19.8", cy: "35.9", r: "2", fill: "#F0F4F7" }), _jsx("circle", { cx: "101.2", cy: "28.3", r: "2.7", fill: "#F0F4F7" }), _jsx("circle", { cx: "29.5", cy: "98.4", r: "1.9", fill: "#DDE2E8" }), _jsx("circle", { cx: "24.3", cy: "29.7", r: "1.3", fill: "#DDE2E8" }), _jsx("circle", { cx: "96.7", cy: "23.1", r: "1.3", fill: "#DDE2E8" }), _jsx("circle", { cx: "103.9", cy: "86.3", r: "1.3", fill: "#EBEEF1" })] })));
4
+ export const DataGridNoData = ({ title = 'Нет данных', noDataIcon = BaseNoDataIcon(), noDataIconWidth = 250, }) => {
5
+ return (_jsx(DataGridNoDataWrapper, { children: _jsxs(DataGridNoDataFigure, { children: [_jsx(DataGridNoDataIcon, Object.assign({ noDataIconWidth: noDataIconWidth }, { children: noDataIcon })), _jsx(DataGridNoDataFigcaption, Object.assign({ component: "figcaption", variant: "h4" }, { children: title }))] }) }));
18
6
  };