@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,73 +1,48 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
14
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
15
- if (ar || !(i in from)) {
16
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
17
- ar[i] = from[i];
18
- }
19
- }
20
- return to.concat(ar || Array.prototype.slice.call(from));
21
- };
22
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
23
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
24
4
  };
25
5
  Object.defineProperty(exports, "__esModule", { value: true });
26
6
  exports.DataGrid = void 0;
27
- var jsx_runtime_1 = require("react/jsx-runtime");
28
- var react_1 = require("react");
29
- var Table_1 = require("../Table");
30
- var DataGridHead_1 = require("./DataGridHead");
31
- var DataGridBody_1 = require("./DataGridBody");
32
- var DataGridLoader_1 = __importDefault(require("./DataGridLoader/DataGridLoader"));
33
- var DataGridNoData_1 = require("./DataGridNoData");
34
- var styles_1 = require("./styles");
35
- function DataGrid(_a) {
36
- 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;
37
- var selectable = Boolean(onSelectRow);
38
- var handleSelectAllRows = function (event) {
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const react_1 = require("react");
9
+ const Table_1 = require("../Table");
10
+ const DataGridHead_1 = require("./DataGridHead");
11
+ const DataGridBody_1 = require("./DataGridBody");
12
+ const DataGridLoader_1 = __importDefault(require("./DataGridLoader/DataGridLoader"));
13
+ const DataGridNoData_1 = require("./DataGridNoData");
14
+ const styles_1 = require("./styles");
15
+ function DataGrid({ columns, rows = [], selectedRows = [], sorting, maxHeight, minDisplayRows = 10, onRowClick, onSelectRow, Footer, noDataPlaceholder, loading, onSort, keyId, emptyCellValue, }) {
16
+ const selectable = Boolean(onSelectRow);
17
+ const handleSelectAllRows = (event) => {
39
18
  if (!onSelectRow) {
40
19
  return;
41
20
  }
42
21
  if (event.target.checked) {
43
- var mergedSelectedRows = __spreadArray(__spreadArray([], selectedRows, true), rows, true);
22
+ const mergedSelectedRows = [...selectedRows, ...rows];
44
23
  return onSelectRow(mergedSelectedRows);
45
24
  }
46
- var filteredRows = selectedRows.filter(function (selectedRow) { return !rows.find(function (row) { return row[keyId] === selectedRow[keyId]; }); });
25
+ const filteredRows = selectedRows.filter((selectedRow) => !rows.find((row) => row[keyId] === selectedRow[keyId]));
47
26
  onSelectRow(filteredRows);
48
27
  };
49
- var handleSelectRow = (0, react_1.useCallback)(function (row) {
50
- return function (event) {
51
- if (!onSelectRow) {
52
- return;
53
- }
54
- if (event.target.checked) {
55
- return onSelectRow(__spreadArray(__spreadArray([], selectedRows, true), [row], false));
56
- }
57
- return onSelectRow(selectedRows.filter(function (selectedRow) { return selectedRow[keyId] !== row[keyId]; }));
58
- };
28
+ const handleSelectRow = (0, react_1.useCallback)((row) => (event) => {
29
+ if (!onSelectRow) {
30
+ return;
31
+ }
32
+ if (event.target.checked) {
33
+ return onSelectRow([...selectedRows, row]);
34
+ }
35
+ return onSelectRow(selectedRows.filter((selectedRow) => selectedRow[keyId] !== row[keyId]));
59
36
  }, [selectedRows, onSelectRow, keyId]);
60
- var uncheckedRowsCount = (0, react_1.useMemo)(function () {
61
- return rows.filter(function (row) {
62
- return !selectedRows.find(function (selectedRow) { return selectedRow[keyId] === row[keyId]; });
63
- }).length;
37
+ const uncheckedRowsCount = (0, react_1.useMemo)(() => {
38
+ return rows.filter((row) => !selectedRows.find((selectedRow) => selectedRow[keyId] === row[keyId])).length;
64
39
  }, [rows, selectedRows, keyId]);
65
- var renderedPlaceholder = (0, react_1.useCallback)(function () {
40
+ const renderedPlaceholder = (0, react_1.useCallback)(() => {
66
41
  if (!loading) {
67
42
  return noDataPlaceholder || (0, jsx_runtime_1.jsx)(DataGridNoData_1.DataGridNoData, {});
68
43
  }
69
44
  return null;
70
45
  }, [noDataPlaceholder, loading]);
71
- return ((0, jsx_runtime_1.jsxs)(styles_1.DataGridContainer, { children: [(0, jsx_runtime_1.jsxs)(styles_1.StyledTableContainer, __assign({ maxHeight: maxHeight }, { children: [(0, jsx_runtime_1.jsxs)(Table_1.Table, __assign({ stickyHeader: true }, { children: [(0, jsx_runtime_1.jsx)(DataGridHead_1.DataGridHead, { onSort: onSort, rowsCount: rows.length, uncheckedRowsCount: uncheckedRowsCount, onSelectAllRows: handleSelectAllRows, selectable: selectable, sorting: sorting, columns: columns }), (0, jsx_runtime_1.jsx)(DataGridBody_1.DataGridBody, { keyId: keyId, selectedRows: selectedRows, minDisplayRows: minDisplayRows, onRowClick: onRowClick, onSelectRow: handleSelectRow, selectable: selectable, rows: rows, columns: columns, emptyCellValue: emptyCellValue, noDataPlaceholder: renderedPlaceholder() })] })), (0, jsx_runtime_1.jsx)(DataGridLoader_1.default, { loading: loading })] })), rows.length ? Footer : null] }));
46
+ return ((0, jsx_runtime_1.jsxs)(styles_1.DataGridContainer, { children: [(0, jsx_runtime_1.jsxs)(styles_1.StyledTableContainer, Object.assign({ maxHeight: maxHeight }, { children: [(0, jsx_runtime_1.jsxs)(Table_1.Table, Object.assign({ stickyHeader: true }, { children: [(0, jsx_runtime_1.jsx)(DataGridHead_1.DataGridHead, { onSort: onSort, rowsCount: rows.length, uncheckedRowsCount: uncheckedRowsCount, onSelectAllRows: handleSelectAllRows, selectable: selectable, sorting: sorting, columns: columns }), (0, jsx_runtime_1.jsx)(DataGridBody_1.DataGridBody, { keyId: keyId, selectedRows: selectedRows, minDisplayRows: minDisplayRows, onRowClick: onRowClick, onSelectRow: handleSelectRow, selectable: selectable, rows: rows, columns: columns, emptyCellValue: emptyCellValue, noDataPlaceholder: renderedPlaceholder() })] })), (0, jsx_runtime_1.jsx)(DataGridLoader_1.default, { loading: loading })] })), rows.length ? Footer : null] }));
72
47
  }
73
48
  exports.DataGrid = DataGrid;
@@ -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,44 +1,32 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
3
  exports.DataGridBody = void 0;
15
- var jsx_runtime_1 = require("react/jsx-runtime");
16
- var react_1 = require("react");
17
- var Table_1 = require("../../Table");
18
- var DataGridCell_1 = require("../DataGridCell");
19
- var Checkbox_1 = require("../../Checkbox");
20
- var styles_1 = require("./styles");
21
- function DataGridBody(_a) {
22
- 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;
23
- var renderCells = (0, react_1.useCallback)(function (row, rowId) {
24
- return columns.map(function (cell, index) {
25
- var cellId = "".concat(rowId, "-").concat(index);
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const Table_1 = require("../../Table");
7
+ const DataGridCell_1 = require("../DataGridCell");
8
+ const Checkbox_1 = require("../../Checkbox");
9
+ const styles_1 = require("./styles");
10
+ function DataGridBody({ rows, columns, selectable, onRowClick, onSelectRow, selectedRows = [], minDisplayRows, keyId, emptyCellValue, noDataPlaceholder, }) {
11
+ const renderCells = (0, react_1.useCallback)((row, rowId) => {
12
+ return columns.map((cell, index) => {
13
+ const cellId = `${rowId}-${index}`;
26
14
  return ((0, jsx_runtime_1.jsx)(DataGridCell_1.DataGridCell, { row: row, cell: cell, emptyCellValue: emptyCellValue }, cellId));
27
15
  });
28
16
  }, [columns]);
29
- var handleRowClick = function (row) { return function () {
17
+ const handleRowClick = (row) => () => {
30
18
  if (onRowClick) {
31
19
  onRowClick(row);
32
20
  }
33
- }; };
34
- var renderedRows = (0, react_1.useMemo)(function () {
35
- return rows.map(function (row) {
36
- var rowId = row[keyId];
37
- var checked = selectable &&
38
- Boolean(selectedRows.find(function (selectedRow) { return selectedRow[keyId] === rowId; }));
39
- return ((0, jsx_runtime_1.jsxs)(Table_1.TableRow, __assign({ hover: Boolean(onRowClick), onClick: handleRowClick(row) }, { children: [selectable && ((0, jsx_runtime_1.jsx)(Table_1.TableCell, __assign({ padding: "checkbox", onClick: function (event) { return event.stopPropagation(); } }, { children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: checked, onChange: onSelectRow(row) }) }))), renderCells(row, rowId)] }), rowId));
21
+ };
22
+ const renderedRows = (0, react_1.useMemo)(() => {
23
+ return rows.map((row) => {
24
+ const rowId = row[keyId];
25
+ const checked = selectable &&
26
+ Boolean(selectedRows.find((selectedRow) => selectedRow[keyId] === rowId));
27
+ return ((0, jsx_runtime_1.jsxs)(Table_1.TableRow, Object.assign({ hover: Boolean(onRowClick), onClick: handleRowClick(row) }, { children: [selectable && ((0, jsx_runtime_1.jsx)(Table_1.TableCell, Object.assign({ padding: "checkbox", onClick: (event) => event.stopPropagation() }, { children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: checked, onChange: onSelectRow(row) }) }))), renderCells(row, rowId)] }), rowId));
40
28
  });
41
29
  }, [rows, keyId, selectable, selectedRows, onSelectRow, onRowClick, columns]);
42
- return ((0, jsx_runtime_1.jsx)(styles_1.StyledTableBody, __assign({ empty: !rows.length, minDisplayRows: minDisplayRows }, { children: rows.length ? renderedRows : noDataPlaceholder })));
30
+ return ((0, jsx_runtime_1.jsx)(styles_1.StyledTableBody, Object.assign({ empty: !rows.length, minDisplayRows: minDisplayRows }, { children: rows.length ? renderedRows : noDataPlaceholder })));
43
31
  }
44
32
  exports.DataGridBody = DataGridBody;
@@ -1,17 +1,13 @@
1
1
  "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
2
  Object.defineProperty(exports, "__esModule", { value: true });
7
3
  exports.StyledTableBody = void 0;
8
- var styles_1 = require("../../styles");
9
- var Table_1 = require("../../Table");
10
- var TABLE_ROW_HEIGHT = 44;
4
+ const styles_1 = require("../../styles");
5
+ const Table_1 = require("../../Table");
6
+ const TABLE_ROW_HEIGHT = 44;
11
7
  exports.StyledTableBody = (0, styles_1.styled)(Table_1.TableBody, {
12
- shouldForwardProp: function (prop) { return prop !== 'empty' && prop !== 'minDisplayRows'; },
13
- })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n\n height: ", ";\n"], ["\n position: relative;\n\n height: ", ";\n"])), function (_a) {
14
- var empty = _a.empty, minDisplayRows = _a.minDisplayRows;
15
- return empty ? "".concat(TABLE_ROW_HEIGHT * minDisplayRows, "px") : 'auto';
16
- });
17
- var templateObject_1;
8
+ shouldForwardProp: (prop) => prop !== 'empty' && prop !== 'minDisplayRows',
9
+ }) `
10
+ position: relative;
11
+
12
+ height: ${({ empty, minDisplayRows }) => empty ? `${TABLE_ROW_HEIGHT * minDisplayRows}px` : 'auto'};
13
+ `;
@@ -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,24 +1,12 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
3
  exports.DataGridCell = void 0;
15
- var jsx_runtime_1 = require("react/jsx-runtime");
16
- var react_1 = require("react");
17
- var Table_1 = require("../../Table");
18
- var Typography_1 = require("../../Typography");
19
- function DataGridCell(_a) {
20
- 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;
21
- var formattedValue = (0, react_1.useMemo)(function () {
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const Table_1 = require("../../Table");
7
+ const Typography_1 = require("../../Typography");
8
+ function DataGridCell({ row, cell: { field, renderCell, format, align = 'left' }, emptyCellValue = '-', }) {
9
+ const formattedValue = (0, react_1.useMemo)(() => {
22
10
  if (format) {
23
11
  return format(row);
24
12
  }
@@ -27,6 +15,6 @@ function DataGridCell(_a) {
27
15
  }
28
16
  return emptyCellValue;
29
17
  }, [field, format, row, emptyCellValue]);
30
- return ((0, jsx_runtime_1.jsxs)(Table_1.TableCell, __assign({ align: align }, { children: [renderCell && renderCell(row), !renderCell && ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: formattedValue }) }))] })));
18
+ return ((0, jsx_runtime_1.jsxs)(Table_1.TableCell, Object.assign({ align: align }, { children: [renderCell && renderCell(row), !renderCell && ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: formattedValue }) }))] })));
31
19
  }
32
20
  exports.DataGridCell = DataGridCell;
@@ -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,33 +1,21 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
3
  exports.DataGridHead = void 0;
15
- var jsx_runtime_1 = require("react/jsx-runtime");
16
- var react_1 = require("react");
17
- var TableHead_1 = require("../../Table/TableHead");
18
- var Table_1 = require("../../Table");
19
- var Checkbox_1 = require("../../Checkbox");
20
- var constants_1 = require("../constants");
21
- var DataGridHeadColumn_1 = require("../DataGridHeadColumn");
22
- function DataGridHead(_a) {
23
- var columns = _a.columns, selectable = _a.selectable, onSelectAllRows = _a.onSelectAllRows, rowsCount = _a.rowsCount, onSort = _a.onSort, sorting = _a.sorting, uncheckedRowsCount = _a.uncheckedRowsCount;
24
- var checked = (0, react_1.useMemo)(function () { return !Boolean(uncheckedRowsCount) && rowsCount > 0; }, [uncheckedRowsCount, rowsCount]);
25
- var indeterminate = (0, react_1.useMemo)(function () { return uncheckedRowsCount > 0 && uncheckedRowsCount < rowsCount; }, [uncheckedRowsCount, rowsCount]);
26
- var handleSort = (0, react_1.useCallback)(function (field) {
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const TableHead_1 = require("../../Table/TableHead");
7
+ const Table_1 = require("../../Table");
8
+ const Checkbox_1 = require("../../Checkbox");
9
+ const constants_1 = require("../constants");
10
+ const DataGridHeadColumn_1 = require("../DataGridHeadColumn");
11
+ function DataGridHead({ columns, selectable, onSelectAllRows, rowsCount, onSort, sorting, uncheckedRowsCount, }) {
12
+ const checked = (0, react_1.useMemo)(() => !Boolean(uncheckedRowsCount) && rowsCount > 0, [uncheckedRowsCount, rowsCount]);
13
+ const indeterminate = (0, react_1.useMemo)(() => uncheckedRowsCount > 0 && uncheckedRowsCount < rowsCount, [uncheckedRowsCount, rowsCount]);
14
+ const handleSort = (0, react_1.useCallback)((field) => {
27
15
  if (!onSort) {
28
16
  return;
29
17
  }
30
- var isCurrentField = (sorting === null || sorting === void 0 ? void 0 : sorting.fieldId) === field;
18
+ const isCurrentField = (sorting === null || sorting === void 0 ? void 0 : sorting.fieldId) === field;
31
19
  // если для выбранного столбца текущая сортировка ASC - меняем на DESC
32
20
  if (isCurrentField && sorting.sort === constants_1.SortStates.ASC) {
33
21
  return onSort({ fieldId: field, sort: constants_1.SortStates.DESC });
@@ -39,12 +27,11 @@ function DataGridHead(_a) {
39
27
  // если для выбранного столбца нет сортировки - добавляем сортировку ASC
40
28
  onSort({ fieldId: field, sort: constants_1.SortStates.ASC });
41
29
  }, [sorting, onSort]);
42
- var renderColumns = (0, react_1.useMemo)(function () {
43
- return columns.map(function (_a) {
44
- var field = _a.field, label = _a.label, sortable = _a.sortable, align = _a.align, width = _a.width;
30
+ const renderColumns = (0, react_1.useMemo)(() => {
31
+ return columns.map(({ field, label, sortable, align, width }) => {
45
32
  return ((0, jsx_runtime_1.jsx)(DataGridHeadColumn_1.DataGridHeadColumn, { sorting: sorting, field: field, onSort: handleSort, label: label, sortable: sortable, align: align, width: width }, label));
46
33
  });
47
34
  }, [columns, handleSort, sorting]);
48
- return ((0, jsx_runtime_1.jsx)(TableHead_1.TableHead, { children: (0, jsx_runtime_1.jsxs)(Table_1.TableRow, { children: [selectable && ((0, jsx_runtime_1.jsx)(Table_1.TableCell, __assign({ padding: "checkbox" }, { children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: checked, indeterminate: indeterminate, onChange: onSelectAllRows }) }))), renderColumns] }) }));
35
+ return ((0, jsx_runtime_1.jsx)(TableHead_1.TableHead, { children: (0, jsx_runtime_1.jsxs)(Table_1.TableRow, { children: [selectable && ((0, jsx_runtime_1.jsx)(Table_1.TableCell, Object.assign({ padding: "checkbox" }, { children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: checked, indeterminate: indeterminate, onChange: onSelectAllRows }) }))), renderColumns] }) }));
49
36
  }
50
37
  exports.DataGridHead = DataGridHead;
@@ -1,25 +1,13 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
3
  exports.DataGridHeadColumn = void 0;
15
- var jsx_runtime_1 = require("react/jsx-runtime");
16
- var react_1 = require("react");
17
- var icons_1 = require("@astral/icons");
18
- var constants_1 = require("../constants");
19
- var styles_1 = require("./styles");
20
- function DataGridHeadColumn(_a) {
21
- var onSort = _a.onSort, field = _a.field, sortable = _a.sortable, align = _a.align, label = _a.label, sorting = _a.sorting, width = _a.width;
22
- var sortIcon = (0, react_1.useMemo)(function () {
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const icons_1 = require("@astral/icons");
7
+ const constants_1 = require("../constants");
8
+ const styles_1 = require("./styles");
9
+ function DataGridHeadColumn({ onSort, field, sortable, align, label, sorting, width, }) {
10
+ const sortIcon = (0, react_1.useMemo)(() => {
23
11
  if (!sortable) {
24
12
  return null;
25
13
  }
@@ -35,11 +23,11 @@ function DataGridHeadColumn(_a) {
35
23
  return (0, jsx_runtime_1.jsx)(icons_1.SortFillSm, {});
36
24
  }
37
25
  }, [sorting, sortable, field]);
38
- var handleSortClick = function () {
26
+ const handleSortClick = () => {
39
27
  if (field && sortable) {
40
28
  onSort(field);
41
29
  }
42
30
  };
43
- return ((0, jsx_runtime_1.jsx)(styles_1.StyledTableCell, __assign({ onClick: handleSortClick, align: align, width: width, sortable: sortable }, { children: (0, jsx_runtime_1.jsxs)(styles_1.TableCellTitle, __assign({ variant: "pointer" }, { children: [label, sortIcon] })) })));
31
+ return ((0, jsx_runtime_1.jsx)(styles_1.StyledTableCell, Object.assign({ onClick: handleSortClick, align: align, width: width, sortable: sortable }, { children: (0, jsx_runtime_1.jsxs)(styles_1.TableCellTitle, Object.assign({ variant: "pointer" }, { children: [label, sortIcon] })) })));
44
32
  }
45
33
  exports.DataGridHeadColumn = DataGridHeadColumn;
@@ -1,27 +1,27 @@
1
1
  "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
2
  Object.defineProperty(exports, "__esModule", { value: true });
7
3
  exports.TableCellTitle = exports.StyledTableCell = void 0;
8
- var styles_1 = require("../../styles");
9
- var Table_1 = require("../../Table");
10
- var Typography_1 = require("../../Typography");
4
+ const styles_1 = require("../../styles");
5
+ const Table_1 = require("../../Table");
6
+ const Typography_1 = require("../../Typography");
11
7
  exports.StyledTableCell = (0, styles_1.styled)(Table_1.TableCell, {
12
- shouldForwardProp: function (prop) { return prop !== 'width' && prop !== 'sortable'; },
13
- })(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) {
14
- var _b = _a.width, width = _b === void 0 ? 'auto' : _b;
15
- return width;
16
- }, function (_a) {
17
- var theme = _a.theme;
18
- return theme.spacing(3, 4);
19
- }, function (_a) {
20
- var theme = _a.theme;
21
- return theme.palette.grey[700];
22
- }, function (_a) {
23
- var sortable = _a.sortable;
24
- return (sortable ? 'pointer' : 'initial');
25
- });
26
- exports.TableCellTitle = (0, styles_1.styled)(Typography_1.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"])));
27
- var templateObject_1, templateObject_2;
8
+ shouldForwardProp: (prop) => prop !== 'width' && prop !== 'sortable',
9
+ }) `
10
+ width: ${({ width = 'auto' }) => width};
11
+ padding: ${({ theme }) => theme.spacing(3, 4)};
12
+
13
+ color: ${({ theme }) => theme.palette.grey[700]};
14
+
15
+ cursor: ${({ sortable }) => (sortable ? 'pointer' : 'initial')};
16
+
17
+ user-select: none;
18
+ `;
19
+ exports.TableCellTitle = (0, styles_1.styled)(Typography_1.Typography) `
20
+ display: flex;
21
+ align-items: center;
22
+
23
+ > svg {
24
+ width: 16px;
25
+ height: 16px;
26
+ }
27
+ `;
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var jsx_runtime_1 = require("react/jsx-runtime");
4
- var styles_1 = require("./styles");
5
- var DataGridLoader = function (_a) {
6
- var _b = _a.loading, loading = _b === void 0 ? false : _b;
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ const styles_1 = require("./styles");
5
+ const DataGridLoader = ({ loading = false }) => {
7
6
  return ((0, jsx_runtime_1.jsxs)(styles_1.LoaderWrapper, { children: [loading && (0, jsx_runtime_1.jsx)(styles_1.Backdrop, {}), loading ? (0, jsx_runtime_1.jsx)(styles_1.StyledLinearProgress, {}) : (0, jsx_runtime_1.jsx)(styles_1.StyledDivider, {})] }));
8
7
  };
9
8
  exports.default = DataGridLoader;
@@ -1,18 +1,25 @@
1
1
  "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
2
  Object.defineProperty(exports, "__esModule", { value: true });
7
3
  exports.StyledLinearProgress = exports.LoaderWrapper = exports.StyledDivider = exports.Backdrop = void 0;
8
- var material_1 = require("@mui/material");
9
- var Divider_1 = require("../../Divider");
10
- var styles_1 = require("../../styles");
11
- exports.Backdrop = styles_1.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) {
12
- var theme = _a.theme;
13
- return theme.palette.grey['100'];
14
- });
15
- exports.StyledDivider = (0, styles_1.styled)(Divider_1.Divider)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border-width: 1px;\n"], ["\n border-width: 1px;\n"])));
16
- exports.LoaderWrapper = styles_1.styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n height: 2px;\n"], ["\n height: 2px;\n"])));
17
- exports.StyledLinearProgress = (0, styles_1.styled)(material_1.LinearProgress)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n height: 2px;\n"], ["\n height: 2px;\n"])));
18
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
4
+ const material_1 = require("@mui/material");
5
+ const Divider_1 = require("../../Divider");
6
+ const styles_1 = require("../../styles");
7
+ exports.Backdrop = styles_1.styled.div `
8
+ position: absolute;
9
+ top: 0;
10
+
11
+ width: 100%;
12
+ height: 100%;
13
+
14
+ background-color: ${({ theme }) => theme.palette.grey['100']};
15
+ opacity: 0.6;
16
+ `;
17
+ exports.StyledDivider = (0, styles_1.styled)(Divider_1.Divider) `
18
+ border-width: 1px;
19
+ `;
20
+ exports.LoaderWrapper = styles_1.styled.div `
21
+ height: 2px;
22
+ `;
23
+ exports.StyledLinearProgress = (0, styles_1.styled)(material_1.LinearProgress) `
24
+ height: 2px;
25
+ `;
@@ -1,22 +1,10 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
3
  exports.DataGridNoData = void 0;
15
- var jsx_runtime_1 = require("react/jsx-runtime");
16
- var styles_1 = require("./styles");
17
- var BaseNoDataIcon = function () { return ((0, jsx_runtime_1.jsxs)("svg", __assign({ viewBox: "0 0 124 124", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [(0, jsx_runtime_1.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" }), (0, jsx_runtime_1.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" }), (0, jsx_runtime_1.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" }), (0, jsx_runtime_1.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" }), (0, jsx_runtime_1.jsx)("path", { stroke: "#B7C2CE", strokeLinecap: "round", strokeWidth: "2.1", d: "m57.1 74 5.6 2.8m4.6 2.3 2.4 1.2" }), (0, jsx_runtime_1.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" }), (0, jsx_runtime_1.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" }), (0, jsx_runtime_1.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" }), (0, jsx_runtime_1.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" }), (0, jsx_runtime_1.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" }), (0, jsx_runtime_1.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" }), (0, jsx_runtime_1.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" }), (0, jsx_runtime_1.jsx)("circle", { cx: "19.8", cy: "35.9", r: "2", fill: "#F0F4F7" }), (0, jsx_runtime_1.jsx)("circle", { cx: "101.2", cy: "28.3", r: "2.7", fill: "#F0F4F7" }), (0, jsx_runtime_1.jsx)("circle", { cx: "29.5", cy: "98.4", r: "1.9", fill: "#DDE2E8" }), (0, jsx_runtime_1.jsx)("circle", { cx: "24.3", cy: "29.7", r: "1.3", fill: "#DDE2E8" }), (0, jsx_runtime_1.jsx)("circle", { cx: "96.7", cy: "23.1", r: "1.3", fill: "#DDE2E8" }), (0, jsx_runtime_1.jsx)("circle", { cx: "103.9", cy: "86.3", r: "1.3", fill: "#EBEEF1" })] }))); };
18
- var DataGridNoData = function (_a) {
19
- 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;
20
- return ((0, jsx_runtime_1.jsx)(styles_1.DataGridNoDataWrapper, { children: (0, jsx_runtime_1.jsxs)(styles_1.DataGridNoDataFigure, { children: [(0, jsx_runtime_1.jsx)(styles_1.DataGridNoDataIcon, __assign({ noDataIconWidth: noDataIconWidth }, { children: noDataIcon })), (0, jsx_runtime_1.jsx)(styles_1.DataGridNoDataFigcaption, __assign({ component: "figcaption", variant: "h4" }, { children: title }))] }) }));
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const styles_1 = require("./styles");
6
+ const BaseNoDataIcon = () => ((0, jsx_runtime_1.jsxs)("svg", Object.assign({ viewBox: "0 0 124 124", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [(0, jsx_runtime_1.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" }), (0, jsx_runtime_1.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" }), (0, jsx_runtime_1.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" }), (0, jsx_runtime_1.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" }), (0, jsx_runtime_1.jsx)("path", { stroke: "#B7C2CE", strokeLinecap: "round", strokeWidth: "2.1", d: "m57.1 74 5.6 2.8m4.6 2.3 2.4 1.2" }), (0, jsx_runtime_1.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" }), (0, jsx_runtime_1.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" }), (0, jsx_runtime_1.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" }), (0, jsx_runtime_1.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" }), (0, jsx_runtime_1.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" }), (0, jsx_runtime_1.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" }), (0, jsx_runtime_1.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" }), (0, jsx_runtime_1.jsx)("circle", { cx: "19.8", cy: "35.9", r: "2", fill: "#F0F4F7" }), (0, jsx_runtime_1.jsx)("circle", { cx: "101.2", cy: "28.3", r: "2.7", fill: "#F0F4F7" }), (0, jsx_runtime_1.jsx)("circle", { cx: "29.5", cy: "98.4", r: "1.9", fill: "#DDE2E8" }), (0, jsx_runtime_1.jsx)("circle", { cx: "24.3", cy: "29.7", r: "1.3", fill: "#DDE2E8" }), (0, jsx_runtime_1.jsx)("circle", { cx: "96.7", cy: "23.1", r: "1.3", fill: "#DDE2E8" }), (0, jsx_runtime_1.jsx)("circle", { cx: "103.9", cy: "86.3", r: "1.3", fill: "#EBEEF1" })] })));
7
+ const DataGridNoData = ({ title = 'Нет данных', noDataIcon = BaseNoDataIcon(), noDataIconWidth = 250, }) => {
8
+ return ((0, jsx_runtime_1.jsx)(styles_1.DataGridNoDataWrapper, { children: (0, jsx_runtime_1.jsxs)(styles_1.DataGridNoDataFigure, { children: [(0, jsx_runtime_1.jsx)(styles_1.DataGridNoDataIcon, Object.assign({ noDataIconWidth: noDataIconWidth }, { children: noDataIcon })), (0, jsx_runtime_1.jsx)(styles_1.DataGridNoDataFigcaption, Object.assign({ component: "figcaption", variant: "h4" }, { children: title }))] }) }));
21
9
  };
22
10
  exports.DataGridNoData = DataGridNoData;
@@ -1,20 +1,32 @@
1
1
  "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
2
  Object.defineProperty(exports, "__esModule", { value: true });
7
3
  exports.DataGridNoDataFigcaption = exports.DataGridNoDataIcon = exports.DataGridNoDataFigure = exports.DataGridNoDataWrapper = void 0;
8
- var Typography_1 = require("../../Typography");
9
- var styles_1 = require("../../styles");
10
- exports.DataGridNoDataWrapper = styles_1.styled.tr(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: sticky;\n top: 50%;\n left: 50%;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n transform: translate(-50%, -50%);\n"], ["\n position: sticky;\n top: 50%;\n left: 50%;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n transform: translate(-50%, -50%);\n"])));
11
- exports.DataGridNoDataFigure = styles_1.styled.figure(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: absolute;\n\n display: flex;\n flex-direction: column;\n align-items: center;\n"], ["\n position: absolute;\n\n display: flex;\n flex-direction: column;\n align-items: center;\n"])));
12
- exports.DataGridNoDataIcon = styles_1.styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n svg {\n width: ", ";\n height: auto;\n }\n"], ["\n svg {\n width: ", ";\n height: auto;\n }\n"])), function (_a) {
13
- var noDataIconWidth = _a.noDataIconWidth;
14
- return "".concat(noDataIconWidth, "px");
15
- });
16
- exports.DataGridNoDataFigcaption = (0, styles_1.styled)(Typography_1.Typography)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), function (_a) {
17
- var theme = _a.theme;
18
- return theme.palette.grey[600];
19
- });
20
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
4
+ const Typography_1 = require("../../Typography");
5
+ const styles_1 = require("../../styles");
6
+ exports.DataGridNoDataWrapper = styles_1.styled.tr `
7
+ position: sticky;
8
+ top: 50%;
9
+ left: 50%;
10
+
11
+ display: flex;
12
+ align-items: center;
13
+ justify-content: center;
14
+
15
+ transform: translate(-50%, -50%);
16
+ `;
17
+ exports.DataGridNoDataFigure = styles_1.styled.figure `
18
+ position: absolute;
19
+
20
+ display: flex;
21
+ flex-direction: column;
22
+ align-items: center;
23
+ `;
24
+ exports.DataGridNoDataIcon = styles_1.styled.div `
25
+ svg {
26
+ width: ${({ noDataIconWidth }) => `${noDataIconWidth}px`};
27
+ height: auto;
28
+ }
29
+ `;
30
+ exports.DataGridNoDataFigcaption = (0, styles_1.styled)(Typography_1.Typography) `
31
+ color: ${({ theme }) => theme.palette.grey[600]};
32
+ `;