@astral/ui 0.38.0 → 0.41.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 (383) hide show
  1. package/ActionCell/ActionCell.js +7 -6
  2. package/ActionCell/index.js +5 -1
  3. package/Autocomplete/Autocomplete.js +4 -4
  4. package/Autocomplete/index.js +5 -1
  5. package/Badge/Badge.js +1 -1
  6. package/Badge/index.js +5 -1
  7. package/Badge/styled.d.ts +3 -3
  8. package/Badge/styled.js +24 -12
  9. package/Button/Button.d.ts +1 -1
  10. package/Button/Button.js +4 -3
  11. package/Button/index.js +5 -1
  12. package/ButtonBase/ButtonBase.d.ts +1 -1
  13. package/ButtonBase/ButtonBase.js +1 -1
  14. package/ButtonBase/index.js +5 -1
  15. package/ButtonBase/styled.js +9 -3
  16. package/Checkbox/Checkbox.js +2 -2
  17. package/Checkbox/icons.js +3 -3
  18. package/Checkbox/index.js +5 -1
  19. package/CircularProgress/CircularProgress.d.ts +1 -1
  20. package/CircularProgress/CircularProgress.js +1 -1
  21. package/CircularProgress/CircularProgressStory.js +1 -1
  22. package/CircularProgress/CircularProgressStoryTemplate.js +1 -1
  23. package/CircularProgress/index.js +5 -1
  24. package/Collapse/index.js +5 -1
  25. package/ContentState/ContentState.js +9 -8
  26. package/ContentState/index.js +5 -1
  27. package/ContentState/styles.js +1 -1
  28. package/DashboardLayout/DashboardLayout.js +1 -1
  29. package/DashboardLayout/DashboardLayoutStory.js +1 -1
  30. package/DashboardLayout/DashboardLayoutStoryTemplate.js +1 -1
  31. package/DashboardLayout/Header/Header.js +1 -1
  32. package/DashboardLayout/Header/index.js +5 -1
  33. package/DashboardLayout/Main/Main.js +1 -1
  34. package/DashboardLayout/Main/index.js +5 -1
  35. package/DashboardLayout/Sidebar/Sidebar.js +1 -1
  36. package/DashboardLayout/Sidebar/index.js +5 -1
  37. package/DashboardLayout/Sidebar/styled.d.ts +1 -1
  38. package/DashboardLayout/index.js +5 -1
  39. package/DataGrid/DataGrid.d.ts +73 -3
  40. package/DataGrid/DataGrid.js +7 -5
  41. package/DataGrid/DataGridBody/DataGridBody.d.ts +14 -3
  42. package/DataGrid/DataGridBody/DataGridBody.js +4 -4
  43. package/DataGrid/DataGridBody/index.js +5 -1
  44. package/DataGrid/DataGridBody/styled.d.ts +1 -1
  45. package/DataGrid/DataGridCell/DataGridCell.d.ts +8 -3
  46. package/DataGrid/DataGridCell/DataGridCell.js +7 -4
  47. package/DataGrid/DataGridCell/index.js +5 -1
  48. package/DataGrid/DataGridHead/DataGridHead.d.ts +12 -3
  49. package/DataGrid/DataGridHead/DataGridHead.js +5 -5
  50. package/DataGrid/DataGridHead/index.d.ts +0 -1
  51. package/DataGrid/DataGridHead/index.js +5 -2
  52. package/DataGrid/DataGridHeadColumn/DataGridHeadColumn.d.ts +13 -3
  53. package/DataGrid/DataGridHeadColumn/DataGridHeadColumn.js +12 -7
  54. package/DataGrid/DataGridHeadColumn/index.d.ts +0 -1
  55. package/DataGrid/DataGridHeadColumn/index.js +5 -2
  56. package/DataGrid/DataGridHeadColumn/styled.d.ts +3 -3
  57. package/DataGrid/DataGridHeadColumn/styled.js +3 -3
  58. package/DataGrid/DataGridLoader/DataGridLoader.d.ts +3 -1
  59. package/DataGrid/DataGridLoader/DataGridLoader.js +1 -1
  60. package/DataGrid/DataGridLoader/index.d.ts +0 -1
  61. package/DataGrid/DataGridLoader/index.js +5 -2
  62. package/DataGrid/DataGridLoader/styled.d.ts +3 -3
  63. package/DataGrid/index.js +5 -1
  64. package/DataGrid/styled.d.ts +1 -1
  65. package/DataGrid/types.d.ts +48 -24
  66. package/DataGridPagination/DataGridPagination.js +1 -1
  67. package/DataGridPagination/index.js +5 -1
  68. package/DataGridPagination/styled.d.ts +1 -1
  69. package/DatePicker/DatePicker.js +3 -3
  70. package/DatePicker/DatePickerDay/DatePickerDay.js +1 -1
  71. package/DatePicker/DatePickerDay/styled.d.ts +1 -1
  72. package/DatePicker/DatePickerHeader/DatePickerHeader.js +1 -1
  73. package/DatePicker/DatePickerHeader/styled.d.ts +1 -1
  74. package/DatePicker/index.js +5 -1
  75. package/DatePickerProvider/DatePickerProvider.js +1 -1
  76. package/DatePickerProvider/index.js +5 -1
  77. package/Dialog/Dialog.js +3 -2
  78. package/Dialog/index.js +5 -1
  79. package/DialogActions/DialogActions.js +1 -1
  80. package/DialogActions/index.js +5 -1
  81. package/DialogContent/index.js +5 -1
  82. package/DialogContentText/index.js +5 -1
  83. package/DialogTitle/DialogTitle.js +6 -3
  84. package/DialogTitle/index.js +5 -1
  85. package/Divider/index.js +5 -1
  86. package/DropdownButton/DropdownButton.d.ts +1 -1
  87. package/DropdownButton/DropdownButton.js +1 -1
  88. package/DropdownButton/index.js +5 -1
  89. package/DropdownButton/styles.d.ts +1 -1
  90. package/FormControlLabel/FormControlLabel.js +1 -1
  91. package/FormControlLabel/index.js +5 -1
  92. package/FormHelperText/FormHelperText.js +3 -3
  93. package/FormHelperText/index.js +5 -1
  94. package/FormHelperText/styled.d.ts +2 -6
  95. package/GlobalStyles/GlobalStyles.js +2 -2
  96. package/GlobalStyles/index.js +5 -1
  97. package/Grid/Grid.js +1 -1
  98. package/Grid/index.js +5 -1
  99. package/Grid/styled.d.ts +2 -2
  100. package/IconButton/IconButton.d.ts +1 -1
  101. package/IconButton/IconButton.js +1 -1
  102. package/IconButton/index.js +5 -1
  103. package/IconButton/styled.d.ts +1 -1
  104. package/IconButton/styled.js +2 -1
  105. package/IconDropdownButton/IconDropdownButton.d.ts +1 -1
  106. package/IconDropdownButton/IconDropdownButton.js +1 -1
  107. package/IconDropdownButton/index.js +5 -1
  108. package/List/List.js +1 -1
  109. package/List/index.js +5 -1
  110. package/List/styled.d.ts +2 -2
  111. package/ListItem/ListItem.js +1 -1
  112. package/ListItem/index.js +5 -1
  113. package/ListItem/styled.d.ts +6 -6
  114. package/ListItem/styled.js +8 -4
  115. package/ListItemAvatar/index.js +5 -1
  116. package/ListItemButton/ListItemButton.js +1 -1
  117. package/ListItemButton/index.js +5 -1
  118. package/ListItemButton/styled.d.ts +2 -2
  119. package/ListItemButton/styled.js +6 -3
  120. package/ListItemIcon/ListItemIcon.js +1 -1
  121. package/ListItemIcon/index.js +5 -1
  122. package/ListItemSecondaryAction/index.js +5 -1
  123. package/ListItemText/ListItemText.js +1 -1
  124. package/ListItemText/index.js +5 -1
  125. package/ListProvider/index.js +5 -1
  126. package/ListSubheader/index.js +5 -1
  127. package/LocalizationProvider/LocalizationProvider.js +1 -1
  128. package/LocalizationProvider/index.js +5 -1
  129. package/MaskField/MaskField.js +2 -2
  130. package/MaskField/index.js +5 -1
  131. package/Menu/index.js +5 -1
  132. package/MenuGroup/MenuGroup.js +1 -1
  133. package/MenuGroup/index.js +5 -1
  134. package/MenuGroup/stories/Icons.js +7 -7
  135. package/MenuGroup/stories/styled.d.ts +3 -3
  136. package/MenuGroup/styled.d.ts +1 -1
  137. package/MenuItem/MenuItem.js +1 -1
  138. package/MenuItem/index.js +5 -1
  139. package/MenuItem/styled.d.ts +2 -2
  140. package/MenuList/MenuList.js +1 -1
  141. package/MenuList/index.js +5 -1
  142. package/MenuList/styled.d.ts +2 -2
  143. package/Notification/NotificationContainer/NotificationContainer.js +1 -1
  144. package/Notification/NotificationContainer/index.js +5 -1
  145. package/Notification/NotificationTemplate/NotificationTemplate.js +3 -3
  146. package/Notification/NotificationTemplate/index.js +5 -1
  147. package/Notification/NotificationTemplate/styled.d.ts +3 -5
  148. package/Notification/NotificationTemplate/utils/getActionsDirection/index.js +5 -1
  149. package/Notification/NotificationTemplate/utils/getNotificationTemplateStyles/getNotificationTemplateStyles.js +2 -1
  150. package/Notification/NotificationTemplate/utils/getNotificationTemplateStyles/index.js +5 -1
  151. package/Notification/NotificationTemplate/utils/index.js +5 -1
  152. package/Notification/constants/index.js +5 -1
  153. package/Notification/constants/notificationVariant.js +4 -4
  154. package/Notification/index.js +5 -1
  155. package/Notification/styled.d.ts +4 -12
  156. package/Notification/utils/getNotificationIconByVariant/getNotificationIconByVariant.d.ts +1 -0
  157. package/Notification/utils/getNotificationIconByVariant/getNotificationIconByVariant.js +4 -4
  158. package/Notification/utils/getNotificationIconByVariant/index.js +5 -1
  159. package/Notification/utils/index.js +5 -1
  160. package/Notification/utils/notificationTemplatePropsCreator/index.js +5 -1
  161. package/Pagination/Pagination.js +1 -1
  162. package/Pagination/index.js +5 -1
  163. package/Placeholder/Placeholder.js +1 -1
  164. package/Placeholder/index.js +5 -1
  165. package/Placeholder/styled.d.ts +2 -2
  166. package/Product/Product.d.ts +1 -1
  167. package/Product/Product.js +1 -1
  168. package/Product/index.js +5 -1
  169. package/Profile/Profile.js +1 -1
  170. package/Profile/index.js +5 -1
  171. package/Profile/styled.d.ts +2 -4
  172. package/Radio/Icon.js +2 -2
  173. package/Radio/Radio.d.ts +1 -1
  174. package/Radio/Radio.js +2 -2
  175. package/Radio/index.js +5 -1
  176. package/RadioGroup/index.js +5 -1
  177. package/Select/Select.js +2 -2
  178. package/Select/index.js +5 -1
  179. package/Select/styled.d.ts +2 -2
  180. package/SideDialog/SideDialog.js +1 -1
  181. package/SideDialog/index.js +5 -1
  182. package/SideDialogActions/index.js +5 -1
  183. package/SideDialogContent/index.js +5 -1
  184. package/SideDialogContentText/index.js +5 -1
  185. package/SideDialogTitle/index.js +5 -1
  186. package/Table/Table.js +1 -1
  187. package/Table/TableBody/index.js +5 -1
  188. package/Table/TableCell/index.js +5 -1
  189. package/Table/TableContainer/index.js +5 -1
  190. package/Table/TableFooter/index.js +5 -1
  191. package/Table/TableHead/index.js +5 -1
  192. package/Table/TableRow/index.js +5 -1
  193. package/Table/TableSortLabel/index.js +5 -1
  194. package/Table/index.js +5 -1
  195. package/Tag/Tag.js +1 -1
  196. package/Tag/index.js +5 -1
  197. package/Tag/styled.d.ts +3 -3
  198. package/Tag/styled.js +6 -3
  199. package/TextArea/TextArea.d.ts +1 -1
  200. package/TextArea/TextArea.js +1 -1
  201. package/TextArea/index.js +5 -1
  202. package/TextField/TextField.d.ts +1 -1
  203. package/TextField/TextField.js +6 -5
  204. package/TextField/index.js +5 -1
  205. package/ThemeProvider/ThemeProvider.js +1 -1
  206. package/ThemeProvider/index.js +5 -1
  207. package/Tooltip/Tooltip.d.ts +1 -1
  208. package/Tooltip/Tooltip.js +1 -1
  209. package/Tooltip/index.js +5 -1
  210. package/Tooltip/styled.js +1 -1
  211. package/Typography/index.js +5 -1
  212. package/esm/ActionCell/ActionCell.js +7 -6
  213. package/esm/Autocomplete/Autocomplete.js +4 -4
  214. package/esm/Badge/Badge.js +1 -1
  215. package/esm/Badge/styled.d.ts +3 -3
  216. package/esm/Badge/styled.js +24 -12
  217. package/esm/Button/Button.d.ts +1 -1
  218. package/esm/Button/Button.js +5 -4
  219. package/esm/ButtonBase/ButtonBase.d.ts +1 -1
  220. package/esm/ButtonBase/ButtonBase.js +1 -1
  221. package/esm/ButtonBase/styled.js +4 -2
  222. package/esm/Checkbox/Checkbox.js +2 -2
  223. package/esm/Checkbox/icons.js +3 -3
  224. package/esm/CircularProgress/CircularProgress.d.ts +1 -1
  225. package/esm/CircularProgress/CircularProgress.js +1 -1
  226. package/esm/CircularProgress/CircularProgressStory.js +1 -1
  227. package/esm/CircularProgress/CircularProgressStoryTemplate.js +1 -1
  228. package/esm/ContentState/ContentState.js +10 -9
  229. package/esm/ContentState/styles.js +1 -1
  230. package/esm/DashboardLayout/DashboardLayout.js +1 -1
  231. package/esm/DashboardLayout/DashboardLayoutStory.js +1 -1
  232. package/esm/DashboardLayout/DashboardLayoutStoryTemplate.js +1 -1
  233. package/esm/DashboardLayout/Header/Header.js +1 -1
  234. package/esm/DashboardLayout/Main/Main.js +1 -1
  235. package/esm/DashboardLayout/Sidebar/Sidebar.js +1 -1
  236. package/esm/DashboardLayout/Sidebar/styled.d.ts +1 -1
  237. package/esm/DataGrid/DataGrid.d.ts +73 -3
  238. package/esm/DataGrid/DataGrid.js +7 -5
  239. package/esm/DataGrid/DataGridBody/DataGridBody.d.ts +14 -3
  240. package/esm/DataGrid/DataGridBody/DataGridBody.js +4 -4
  241. package/esm/DataGrid/DataGridBody/styled.d.ts +1 -1
  242. package/esm/DataGrid/DataGridCell/DataGridCell.d.ts +8 -3
  243. package/esm/DataGrid/DataGridCell/DataGridCell.js +8 -5
  244. package/esm/DataGrid/DataGridHead/DataGridHead.d.ts +12 -3
  245. package/esm/DataGrid/DataGridHead/DataGridHead.js +5 -5
  246. package/esm/DataGrid/DataGridHead/index.d.ts +0 -1
  247. package/esm/DataGrid/DataGridHead/index.js +0 -1
  248. package/esm/DataGrid/DataGridHeadColumn/DataGridHeadColumn.d.ts +13 -3
  249. package/esm/DataGrid/DataGridHeadColumn/DataGridHeadColumn.js +12 -7
  250. package/esm/DataGrid/DataGridHeadColumn/index.d.ts +0 -1
  251. package/esm/DataGrid/DataGridHeadColumn/index.js +0 -1
  252. package/esm/DataGrid/DataGridHeadColumn/styled.d.ts +3 -3
  253. package/esm/DataGrid/DataGridHeadColumn/styled.js +3 -3
  254. package/esm/DataGrid/DataGridLoader/DataGridLoader.d.ts +3 -1
  255. package/esm/DataGrid/DataGridLoader/DataGridLoader.js +1 -1
  256. package/esm/DataGrid/DataGridLoader/index.d.ts +0 -1
  257. package/esm/DataGrid/DataGridLoader/index.js +0 -1
  258. package/esm/DataGrid/DataGridLoader/styled.d.ts +3 -3
  259. package/esm/DataGrid/styled.d.ts +1 -1
  260. package/esm/DataGrid/types.d.ts +48 -24
  261. package/esm/DataGridPagination/DataGridPagination.js +1 -1
  262. package/esm/DataGridPagination/styled.d.ts +1 -1
  263. package/esm/DatePicker/DatePicker.js +3 -3
  264. package/esm/DatePicker/DatePickerDay/DatePickerDay.js +1 -1
  265. package/esm/DatePicker/DatePickerDay/styled.d.ts +1 -1
  266. package/esm/DatePicker/DatePickerHeader/DatePickerHeader.js +1 -1
  267. package/esm/DatePicker/DatePickerHeader/styled.d.ts +1 -1
  268. package/esm/DatePickerProvider/DatePickerProvider.js +1 -1
  269. package/esm/Dialog/Dialog.js +3 -2
  270. package/esm/DialogActions/DialogActions.js +1 -1
  271. package/esm/DialogTitle/DialogTitle.js +6 -3
  272. package/esm/DropdownButton/DropdownButton.d.ts +1 -1
  273. package/esm/DropdownButton/DropdownButton.js +1 -1
  274. package/esm/DropdownButton/styles.d.ts +1 -1
  275. package/esm/FormControlLabel/FormControlLabel.js +1 -1
  276. package/esm/FormHelperText/FormHelperText.js +5 -5
  277. package/esm/FormHelperText/styled.d.ts +2 -6
  278. package/esm/GlobalStyles/GlobalStyles.js +2 -2
  279. package/esm/Grid/Grid.js +1 -1
  280. package/esm/Grid/styled.d.ts +2 -2
  281. package/esm/IconButton/IconButton.d.ts +1 -1
  282. package/esm/IconButton/IconButton.js +1 -1
  283. package/esm/IconButton/styled.d.ts +1 -1
  284. package/esm/IconButton/styled.js +2 -1
  285. package/esm/IconDropdownButton/IconDropdownButton.d.ts +1 -1
  286. package/esm/IconDropdownButton/IconDropdownButton.js +1 -1
  287. package/esm/List/List.js +1 -1
  288. package/esm/List/styled.d.ts +2 -2
  289. package/esm/ListItem/ListItem.js +1 -1
  290. package/esm/ListItem/styled.d.ts +6 -6
  291. package/esm/ListItem/styled.js +8 -4
  292. package/esm/ListItemButton/ListItemButton.js +1 -1
  293. package/esm/ListItemButton/styled.d.ts +2 -2
  294. package/esm/ListItemButton/styled.js +6 -3
  295. package/esm/ListItemIcon/ListItemIcon.js +1 -1
  296. package/esm/ListItemText/ListItemText.js +1 -1
  297. package/esm/LocalizationProvider/LocalizationProvider.js +1 -1
  298. package/esm/MaskField/MaskField.js +2 -2
  299. package/esm/MenuGroup/MenuGroup.js +1 -1
  300. package/esm/MenuGroup/stories/Icons.js +7 -7
  301. package/esm/MenuGroup/stories/styled.d.ts +3 -3
  302. package/esm/MenuGroup/styled.d.ts +1 -1
  303. package/esm/MenuItem/MenuItem.js +1 -1
  304. package/esm/MenuItem/styled.d.ts +2 -2
  305. package/esm/MenuList/MenuList.js +1 -1
  306. package/esm/MenuList/styled.d.ts +2 -2
  307. package/esm/Notification/NotificationContainer/NotificationContainer.js +1 -1
  308. package/esm/Notification/NotificationTemplate/NotificationTemplate.js +3 -3
  309. package/esm/Notification/NotificationTemplate/styled.d.ts +3 -5
  310. package/esm/Notification/NotificationTemplate/utils/getNotificationTemplateStyles/getNotificationTemplateStyles.js +2 -1
  311. package/esm/Notification/constants/notificationVariant.js +4 -4
  312. package/esm/Notification/styled.d.ts +4 -12
  313. package/esm/Notification/utils/getNotificationIconByVariant/getNotificationIconByVariant.d.ts +1 -0
  314. package/esm/Notification/utils/getNotificationIconByVariant/getNotificationIconByVariant.js +4 -4
  315. package/esm/Pagination/Pagination.js +1 -1
  316. package/esm/Placeholder/Placeholder.js +1 -1
  317. package/esm/Placeholder/styled.d.ts +2 -2
  318. package/esm/Product/Product.d.ts +1 -1
  319. package/esm/Product/Product.js +1 -1
  320. package/esm/Profile/Profile.js +3 -3
  321. package/esm/Profile/styled.d.ts +2 -4
  322. package/esm/Radio/Icon.js +2 -2
  323. package/esm/Radio/Radio.d.ts +1 -1
  324. package/esm/Radio/Radio.js +2 -2
  325. package/esm/Select/Select.js +2 -2
  326. package/esm/Select/styled.d.ts +2 -2
  327. package/esm/SideDialog/SideDialog.js +1 -1
  328. package/esm/Table/Table.js +1 -1
  329. package/esm/Tag/Tag.js +1 -1
  330. package/esm/Tag/styled.d.ts +3 -3
  331. package/esm/Tag/styled.js +6 -3
  332. package/esm/TextArea/TextArea.d.ts +1 -1
  333. package/esm/TextArea/TextArea.js +1 -1
  334. package/esm/TextField/TextField.d.ts +1 -1
  335. package/esm/TextField/TextField.js +8 -7
  336. package/esm/ThemeProvider/ThemeProvider.js +1 -1
  337. package/esm/Tooltip/Tooltip.d.ts +1 -1
  338. package/esm/Tooltip/Tooltip.js +1 -1
  339. package/esm/Tooltip/styled.js +1 -1
  340. package/esm/hooks/useMenu.js +2 -1
  341. package/esm/theme/components/components.js +0 -6
  342. package/hooks/index.js +5 -1
  343. package/hooks/useMenu.js +2 -1
  344. package/index.js +5 -1
  345. package/package.json +7 -7
  346. package/server/index.js +5 -1
  347. package/theme/components/components.js +0 -6
  348. package/theme/components/index.js +5 -1
  349. package/theme/hooks/index.js +5 -1
  350. package/theme/index.js +5 -1
  351. package/theme/palette/index.js +5 -1
  352. package/DataGrid/DataGridBody/types.d.ts +0 -12
  353. package/DataGrid/DataGridBody/types.js +0 -2
  354. package/DataGrid/DataGridCell/types.d.ts +0 -5
  355. package/DataGrid/DataGridCell/types.js +0 -2
  356. package/DataGrid/DataGridHead/types.d.ts +0 -11
  357. package/DataGrid/DataGridHead/types.js +0 -2
  358. package/DataGrid/DataGridHeadColumn/types.d.ts +0 -11
  359. package/DataGrid/DataGridHeadColumn/types.js +0 -2
  360. package/DataGrid/DataGridLoader/types.d.ts +0 -3
  361. package/DataGrid/DataGridLoader/types.js +0 -2
  362. package/esm/DataGrid/DataGridBody/types.d.ts +0 -12
  363. package/esm/DataGrid/DataGridBody/types.js +0 -1
  364. package/esm/DataGrid/DataGridCell/types.d.ts +0 -5
  365. package/esm/DataGrid/DataGridCell/types.js +0 -1
  366. package/esm/DataGrid/DataGridHead/types.d.ts +0 -11
  367. package/esm/DataGrid/DataGridHead/types.js +0 -1
  368. package/esm/DataGrid/DataGridHeadColumn/types.d.ts +0 -11
  369. package/esm/DataGrid/DataGridHeadColumn/types.js +0 -1
  370. package/esm/DataGrid/DataGridLoader/types.d.ts +0 -3
  371. package/esm/DataGrid/DataGridLoader/types.js +0 -1
  372. package/esm/theme/components/MuiCalendarPicker.d.ts +0 -2
  373. package/esm/theme/components/MuiCalendarPicker.js +0 -16
  374. package/esm/theme/components/MuiPickersDay.d.ts +0 -2
  375. package/esm/theme/components/MuiPickersDay.js +0 -46
  376. package/esm/theme/components/MuiYearPicker.d.ts +0 -2
  377. package/esm/theme/components/MuiYearPicker.js +0 -13
  378. package/theme/components/MuiCalendarPicker.d.ts +0 -2
  379. package/theme/components/MuiCalendarPicker.js +0 -19
  380. package/theme/components/MuiPickersDay.d.ts +0 -2
  381. package/theme/components/MuiPickersDay.js +0 -49
  382. package/theme/components/MuiYearPicker.d.ts +0 -2
  383. package/theme/components/MuiYearPicker.js +0 -16
@@ -21,7 +21,7 @@ var ListItemText_1 = require("../ListItemText");
21
21
  var DashboardLayout_1 = require("../DashboardLayout");
22
22
  var DashboardLayoutStory = function (props) {
23
23
  var header = props.header;
24
- return ((0, jsx_runtime_1.jsxs)(DashboardLayout_1.DashboardLayout, { children: [(0, jsx_runtime_1.jsx)(DashboardLayout_1.DashboardLayout.Header, __assign({}, header), void 0), (0, jsx_runtime_1.jsx)(DashboardLayout_1.DashboardLayout.Sidebar, { children: (0, jsx_runtime_1.jsxs)(List_1.List, { children: [(0, jsx_runtime_1.jsxs)(material_1.ListItemButton, { children: [(0, jsx_runtime_1.jsx)(ListItemIcon_1.ListItemIcon, { children: (0, jsx_runtime_1.jsx)(icons_1.ProfileOutlineMd, {}, void 0) }, void 0), (0, jsx_runtime_1.jsx)(ListItemText_1.ListItemText, { children: "\u0413\u043B\u0430\u0432\u043D\u0430\u044F" }, void 0)] }, void 0), (0, jsx_runtime_1.jsxs)(material_1.ListItemButton, { children: [(0, jsx_runtime_1.jsx)(ListItemIcon_1.ListItemIcon, { children: (0, jsx_runtime_1.jsx)(icons_1.CompanyOutlineMd, {}, void 0) }, void 0), (0, jsx_runtime_1.jsx)(ListItemText_1.ListItemText, { children: "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u044B" }, void 0)] }, void 0), (0, jsx_runtime_1.jsxs)(material_1.ListItemButton, { children: [(0, jsx_runtime_1.jsx)(ListItemIcon_1.ListItemIcon, { children: (0, jsx_runtime_1.jsx)(icons_1.SettingsFillMd, {}, void 0) }, void 0), (0, jsx_runtime_1.jsx)(ListItemText_1.ListItemText, { children: "\u041A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u044B" }, void 0)] }, void 0)] }, void 0) }, void 0), (0, jsx_runtime_1.jsx)(DashboardLayout_1.DashboardLayout.Main, { children: "main-content" }, void 0)] }, void 0));
24
+ return ((0, jsx_runtime_1.jsxs)(DashboardLayout_1.DashboardLayout, { children: [(0, jsx_runtime_1.jsx)(DashboardLayout_1.DashboardLayout.Header, __assign({}, header)), (0, jsx_runtime_1.jsx)(DashboardLayout_1.DashboardLayout.Sidebar, { children: (0, jsx_runtime_1.jsxs)(List_1.List, { children: [(0, jsx_runtime_1.jsxs)(material_1.ListItemButton, { children: [(0, jsx_runtime_1.jsx)(ListItemIcon_1.ListItemIcon, { children: (0, jsx_runtime_1.jsx)(icons_1.ProfileOutlineMd, {}) }), (0, jsx_runtime_1.jsx)(ListItemText_1.ListItemText, { children: "\u0413\u043B\u0430\u0432\u043D\u0430\u044F" })] }), (0, jsx_runtime_1.jsxs)(material_1.ListItemButton, { children: [(0, jsx_runtime_1.jsx)(ListItemIcon_1.ListItemIcon, { children: (0, jsx_runtime_1.jsx)(icons_1.CompanyOutlineMd, {}) }), (0, jsx_runtime_1.jsx)(ListItemText_1.ListItemText, { children: "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u044B" })] }), (0, jsx_runtime_1.jsxs)(material_1.ListItemButton, { children: [(0, jsx_runtime_1.jsx)(ListItemIcon_1.ListItemIcon, { children: (0, jsx_runtime_1.jsx)(icons_1.SettingsFillMd, {}) }), (0, jsx_runtime_1.jsx)(ListItemText_1.ListItemText, { children: "\u041A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u044B" })] })] }) }), (0, jsx_runtime_1.jsx)(DashboardLayout_1.DashboardLayout.Main, { children: "main-content" })] }));
25
25
  };
26
26
  exports.DashboardLayoutStory = DashboardLayoutStory;
27
27
  exports.default = exports.DashboardLayoutStory;
@@ -15,7 +15,7 @@ exports.DashboardLayoutStoryTemplate = void 0;
15
15
  var jsx_runtime_1 = require("react/jsx-runtime");
16
16
  var DashboardLayoutStory_1 = require("./DashboardLayoutStory");
17
17
  var DashboardLayoutStoryTemplate = function (args) {
18
- return (0, jsx_runtime_1.jsx)(DashboardLayoutStory_1.DashboardLayoutStory, __assign({}, args), void 0);
18
+ return (0, jsx_runtime_1.jsx)(DashboardLayoutStory_1.DashboardLayoutStory, __assign({}, args));
19
19
  };
20
20
  exports.DashboardLayoutStoryTemplate = DashboardLayoutStoryTemplate;
21
21
  exports.default = exports.DashboardLayoutStoryTemplate;
@@ -22,6 +22,6 @@ exports.Header = (0, react_1.forwardRef)(function (props, ref) {
22
22
  var ProductSwitcher = props.productSwitcher, product = props.product,
23
23
  // menu: Menu,
24
24
  profile = props.profile;
25
- return ((0, jsx_runtime_1.jsxs)(styled_1.HeaderRoot, __assign({ ref: ref }, { children: [(0, jsx_runtime_1.jsxs)(styled_1.HeaderNav, { children: [ProductSwitcher && (0, jsx_runtime_1.jsx)(ProductSwitcher, {}, void 0), (0, jsx_runtime_1.jsx)(Product_1.Product, __assign({}, product), void 0)] }, void 0), (0, jsx_runtime_1.jsx)(Profile_1.Profile, __assign({}, profile), void 0)] }), void 0));
25
+ return ((0, jsx_runtime_1.jsxs)(styled_1.HeaderRoot, __assign({ ref: ref }, { children: [(0, jsx_runtime_1.jsxs)(styled_1.HeaderNav, { children: [ProductSwitcher && (0, jsx_runtime_1.jsx)(ProductSwitcher, {}), (0, jsx_runtime_1.jsx)(Product_1.Product, __assign({}, product))] }), (0, jsx_runtime_1.jsx)(Profile_1.Profile, __assign({}, profile))] })));
26
26
  });
27
27
  exports.default = exports.Header;
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -17,6 +17,6 @@ var react_1 = require("react");
17
17
  var styled_1 = require("./styled");
18
18
  exports.Main = (0, react_1.forwardRef)(function (_a, ref) {
19
19
  var children = _a.children;
20
- return (0, jsx_runtime_1.jsx)(styled_1.MainRoot, __assign({ ref: ref }, { children: children }), void 0);
20
+ return (0, jsx_runtime_1.jsx)(styled_1.MainRoot, __assign({ ref: ref }, { children: children }));
21
21
  });
22
22
  exports.default = exports.Main;
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -17,6 +17,6 @@ var react_1 = require("react");
17
17
  var styled_1 = require("./styled");
18
18
  exports.Sidebar = (0, react_1.forwardRef)(function (_a, ref) {
19
19
  var children = _a.children;
20
- return ((0, jsx_runtime_1.jsxs)(styled_1.SidebarRoot, __assign({ ref: ref }, { children: [(0, jsx_runtime_1.jsx)("nav", { children: children }, void 0), (0, jsx_runtime_1.jsx)(styled_1.SidebarToggler, __assign({ variant: "text" }, { children: "\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u043C\u0435\u043D\u044E" }), void 0)] }), void 0));
20
+ return ((0, jsx_runtime_1.jsxs)(styled_1.SidebarRoot, __assign({ ref: ref }, { children: [(0, jsx_runtime_1.jsx)("nav", { children: children }), (0, jsx_runtime_1.jsx)(styled_1.SidebarToggler, __assign({ variant: "text" }, { children: "\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u043C\u0435\u043D\u044E" }))] })));
21
21
  });
22
22
  exports.default = exports.Sidebar;
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -3,6 +3,6 @@ export declare const SidebarRoot: import("@emotion/styled").StyledComponent<{
3
3
  theme?: import("@emotion/react").Theme | undefined;
4
4
  as?: import("react").ElementType<any> | undefined;
5
5
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
6
- export declare const SidebarToggler: import("@emotion/styled").StyledComponent<Pick<import("../../Button").ButtonProps, "disabled" | "component" | "href" | "onFocusVisible" | "tabIndex" | "type" | "action" | "children" | "form" | "slot" | "title" | "key" | "css" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "size" | "variant" | "selected" | keyof import("@mui/material/OverridableComponent").CommonProps | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "sx" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "startIcon" | "loading" | "loadingIndicator" | "loadingPosition"> & import("react").RefAttributes<HTMLButtonElement> & {
6
+ export declare const SidebarToggler: import("@emotion/styled").StyledComponent<Pick<import("../../Button").ButtonProps, "disabled" | "href" | "onFocusVisible" | "tabIndex" | "type" | "action" | "children" | "form" | "slot" | "title" | "key" | "css" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | "size" | "component" | "selected" | keyof import("@mui/material/OverridableComponent").CommonProps | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "sx" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "startIcon" | "loading" | "loadingIndicator" | "loadingPosition"> & import("react").RefAttributes<HTMLButtonElement> & {
7
7
  theme?: import("@emotion/react").Theme | undefined;
8
8
  }, {}, {}>;
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -1,3 +1,73 @@
1
- /// <reference types="react" />
2
- import { DataGridProps } from './types';
3
- export declare function DataGrid<T>({ columns, rows, selectedRows, sorting, maxHeight, minDisplayRows, onRowClick, onSelectRow, Footer, loading, onSort, keyId, }: DataGridProps<T>): JSX.Element;
1
+ import { ReactNode } from 'react';
2
+ import { DataGridColumns, DataGridRow, DataGridSort } from './types';
3
+ export declare type DataGridProps<Data = DataGridRow, SortField extends keyof Data = keyof Data> = {
4
+ /**
5
+ * @example <DataGrid rows={[{name: 'test'}]} />
6
+ * Массив данных для таблицы
7
+ */
8
+ rows: Data[];
9
+ /**
10
+ * @example <DataGrid columns={[
11
+ * {
12
+ * field: 'test',
13
+ * label: 'Тестовая колонка',
14
+ * sortable: true,
15
+ * }]} />
16
+ * Конфигурация колонок для таблицы
17
+ */
18
+ columns: DataGridColumns<Data>[];
19
+ keyId: keyof DataGridRow;
20
+ /**
21
+ * @example <DataGrid onRowClick={(row) => console.log('clicked')} />
22
+ * Обработчик клика строки таблицы
23
+ */
24
+ onRowClick?: (row: Data) => void;
25
+ /**
26
+ * @example <DataGrid selectedRows={[{name: 'test'}]} />
27
+ * Массив выбранных строк
28
+ */
29
+ selectedRows?: Array<Data>;
30
+ /**
31
+ * @example <DataGrid onSelectRow={(row) => console.log(select)} />
32
+ * Обработчик выбора строки
33
+ */
34
+ onSelectRow?: (row: Data[]) => void;
35
+ /**
36
+ * @example <DataGrid sorting={[{fieldId: 'test', sort: 'asc'}]} />
37
+ * Массив сортируемых колонок
38
+ */
39
+ sorting?: DataGridSort<SortField>[];
40
+ /**
41
+ * @example <DataGrid onSort={({fieldId: 'test', sort: 'asc'}) => console.log('sorted')} />
42
+ * Обработчик сортировки
43
+ */
44
+ onSort: (sorting: DataGridSort<SortField>[]) => void;
45
+ /**
46
+ * @example <DataGrid Footer={<DataGridPagination />} />
47
+ * Компонент кастомного футера (н-р Pagination)
48
+ */
49
+ Footer?: ReactNode;
50
+ /**
51
+ * @example <DataGrid maxHeight={900} />
52
+ * Максимальная высота для таблицы
53
+ */
54
+ maxHeight?: number;
55
+ /**
56
+ * @example <DataGrid loading={true} />
57
+ * Флажок загрузки данных
58
+ */
59
+ loading?: boolean;
60
+ /**
61
+ * @default '-'
62
+ * @example <DataGrid emptyCellValue{'Нет данных'} />
63
+ * Заглушка для пустых ячеек (если отсутствует field и filter и renderCell)
64
+ */
65
+ emptyCellValue?: ReactNode;
66
+ /**
67
+ * @default 10
68
+ * @example <DataGrid minDisplayRows{10} />
69
+ * используется для отображения переданного кол-ва строк при отсутствии данных
70
+ */
71
+ minDisplayRows?: number;
72
+ };
73
+ export declare function DataGrid<Data extends object, SortField extends keyof Data>({ columns, rows, selectedRows, sorting, maxHeight, minDisplayRows, onRowClick, onSelectRow, Footer, loading, onSort, keyId, emptyCellValue, }: DataGridProps<Data, SortField>): JSX.Element;
@@ -32,11 +32,12 @@ var DataGridBody_1 = require("./DataGridBody");
32
32
  var DataGridLoader_1 = __importDefault(require("./DataGridLoader/DataGridLoader"));
33
33
  var styled_1 = require("./styled");
34
34
  function DataGrid(_a) {
35
- var columns = _a.columns, _b = _a.rows, rows = _b === void 0 ? [] : _b, _c = _a.selectedRows, selectedRows = _c === void 0 ? [] : _c, _d = _a.sorting, sorting = _d === void 0 ? [] : _d, maxHeight = _a.maxHeight, _e = _a.minDisplayRows, minDisplayRows = _e === void 0 ? 10 : _e, onRowClick = _a.onRowClick, onSelectRow = _a.onSelectRow, Footer = _a.Footer, loading = _a.loading, onSort = _a.onSort, keyId = _a.keyId;
35
+ var columns = _a.columns, _b = _a.rows, rows = _b === void 0 ? [] : _b, _c = _a.selectedRows, selectedRows = _c === void 0 ? [] : _c, _d = _a.sorting, sorting = _d === void 0 ? [] : _d, maxHeight = _a.maxHeight, _e = _a.minDisplayRows, minDisplayRows = _e === void 0 ? 10 : _e, onRowClick = _a.onRowClick, onSelectRow = _a.onSelectRow, Footer = _a.Footer, loading = _a.loading, onSort = _a.onSort, keyId = _a.keyId, emptyCellValue = _a.emptyCellValue;
36
36
  var selectable = Boolean(onSelectRow);
37
37
  var handleSelectAllRows = function (event) {
38
- if (!onSelectRow)
38
+ if (!onSelectRow) {
39
39
  return;
40
+ }
40
41
  if (event.target.checked) {
41
42
  var mergedSelectedRows = __spreadArray(__spreadArray([], selectedRows, true), rows, true);
42
43
  return onSelectRow(mergedSelectedRows);
@@ -46,19 +47,20 @@ function DataGrid(_a) {
46
47
  };
47
48
  var handleSelectRow = (0, react_1.useCallback)(function (row) {
48
49
  return function (event) {
49
- if (!onSelectRow)
50
+ if (!onSelectRow) {
50
51
  return;
52
+ }
51
53
  if (event.target.checked) {
52
54
  return onSelectRow(__spreadArray(__spreadArray([], selectedRows, true), [row], false));
53
55
  }
54
56
  return onSelectRow(selectedRows.filter(function (selectedRow) { return selectedRow[keyId] !== row[keyId]; }));
55
57
  };
56
- }, [selectedRows, onSelectRow]);
58
+ }, [selectedRows, onSelectRow, keyId]);
57
59
  var uncheckedRowsCount = (0, react_1.useMemo)(function () {
58
60
  return rows.filter(function (row) {
59
61
  return !selectedRows.find(function (selectedRow) { return selectedRow[keyId] === row[keyId]; });
60
62
  }).length;
61
63
  }, [rows, selectedRows, keyId]);
62
- return ((0, jsx_runtime_1.jsxs)(styled_1.DataGridContainer, { children: [(0, jsx_runtime_1.jsxs)(styled_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 }, void 0), (0, jsx_runtime_1.jsx)(DataGridBody_1.DataGridBody, { keyId: keyId, selectedRows: selectedRows, minDisplayRows: minDisplayRows, onRowClick: onRowClick, onSelectRow: handleSelectRow, selectable: selectable, rows: rows, columns: columns }, void 0)] }), void 0), (0, jsx_runtime_1.jsx)(DataGridLoader_1.default, { loading: loading }, void 0)] }), void 0), Footer] }, void 0));
64
+ return ((0, jsx_runtime_1.jsxs)(styled_1.DataGridContainer, { children: [(0, jsx_runtime_1.jsxs)(styled_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 })] })), (0, jsx_runtime_1.jsx)(DataGridLoader_1.default, { loading: loading })] })), Footer] }));
63
65
  }
64
66
  exports.DataGrid = DataGrid;
@@ -1,3 +1,14 @@
1
- /// <reference types="react" />
2
- import { DataGridBodyProps } from './types';
3
- export declare function DataGridBody<T>({ rows, columns, selectable, onRowClick, onSelectRow, selectedRows, minDisplayRows, keyId, }: DataGridBodyProps<T>): JSX.Element;
1
+ import { ChangeEvent, ReactNode } from 'react';
2
+ import { DataGridColumns, DataGridRow } from '../types';
3
+ export declare type DataGridBodyProps<Data> = {
4
+ columns: DataGridColumns<Data>[];
5
+ keyId: keyof DataGridRow;
6
+ onRowClick?: (row: Data) => void;
7
+ selectable?: boolean;
8
+ selectedRows?: Array<Data>;
9
+ rows: Data[];
10
+ onSelectRow: (row: Data) => (event: ChangeEvent<HTMLInputElement>) => void;
11
+ minDisplayRows: number;
12
+ emptyCellValue?: ReactNode;
13
+ };
14
+ export declare function DataGridBody<Data>({ rows, columns, selectable, onRowClick, onSelectRow, selectedRows, minDisplayRows, keyId, emptyCellValue, }: DataGridBodyProps<Data>): JSX.Element;
@@ -19,11 +19,11 @@ var DataGridCell_1 = require("../DataGridCell");
19
19
  var Checkbox_1 = require("../../Checkbox");
20
20
  var styled_1 = require("./styled");
21
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;
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;
23
23
  var renderCells = (0, react_1.useCallback)(function (row, rowId) {
24
24
  return columns.map(function (cell, index) {
25
25
  var cellId = "".concat(rowId, "-").concat(index);
26
- return (0, jsx_runtime_1.jsx)(DataGridCell_1.DataGridCell, { row: row, cell: cell }, cellId);
26
+ return ((0, jsx_runtime_1.jsx)(DataGridCell_1.DataGridCell, { row: row, cell: cell, emptyCellValue: emptyCellValue }, cellId));
27
27
  });
28
28
  }, [columns]);
29
29
  var handleRowClick = function (row) { return function () {
@@ -36,9 +36,9 @@ function DataGridBody(_a) {
36
36
  var rowId = row[keyId];
37
37
  var checked = selectable &&
38
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) }, void 0) }), void 0)), renderCells(row, rowId)] }), 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));
40
40
  });
41
41
  }, [rows, keyId, selectable, selectedRows, onSelectRow, onRowClick, columns]);
42
- return ((0, jsx_runtime_1.jsx)(styled_1.StyledTableBody, __assign({ empty: !rows.length, minDisplayRows: minDisplayRows }, { children: renderedRows }), void 0));
42
+ return ((0, jsx_runtime_1.jsx)(styled_1.StyledTableBody, __assign({ empty: !rows.length, minDisplayRows: minDisplayRows }, { children: renderedRows })));
43
43
  }
44
44
  exports.DataGridBody = DataGridBody;
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -3,7 +3,7 @@ export declare const StyledTableBody: import("@emotion/styled").StyledComponent<
3
3
  children?: import("react").ReactNode;
4
4
  classes?: Partial<import("@mui/material").TableBodyClasses> | undefined;
5
5
  sx?: import("@mui/system").SxProps<import("@mui/material").Theme> | undefined;
6
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "tabIndex" | "children" | "className" | "slot" | "style" | "title" | "key" | "css" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
6
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "key" | "css" | keyof import("react").HTMLAttributes<HTMLTableSectionElement>> & {
7
7
  ref?: ((instance: HTMLTableSectionElement | null) => void) | import("react").RefObject<HTMLTableSectionElement> | null | undefined;
8
8
  }, "children" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx"> & {
9
9
  theme?: import("@emotion/react").Theme | undefined;
@@ -1,3 +1,8 @@
1
- /// <reference types="react" />
2
- import { CellProps } from './types';
3
- export declare function DataGridCell<T>({ row, cell: { field, renderCell, format, align }, }: CellProps<T>): JSX.Element;
1
+ import { ReactNode } from 'react';
2
+ import { DataGridColumns } from '../types';
3
+ export declare type CellProps<Data> = {
4
+ row: Data;
5
+ cell: DataGridColumns<Data>;
6
+ emptyCellValue?: ReactNode;
7
+ };
8
+ export declare function DataGridCell<Data>({ row, cell: { field, renderCell, format, align }, emptyCellValue, }: CellProps<Data>): JSX.Element;
@@ -17,13 +17,16 @@ var react_1 = require("react");
17
17
  var Table_1 = require("../../Table");
18
18
  var Typography_1 = require("../../Typography");
19
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;
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
21
  var formattedValue = (0, react_1.useMemo)(function () {
22
22
  if (format) {
23
23
  return format(row);
24
24
  }
25
- return row[field];
26
- }, [field, format, row]);
27
- 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: formattedValue }, void 0)] }), void 0));
25
+ if (field) {
26
+ return row[field];
27
+ }
28
+ return emptyCellValue;
29
+ }, [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 }) }))] })));
28
31
  }
29
32
  exports.DataGridCell = DataGridCell;
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -1,3 +1,12 @@
1
- /// <reference types="react" />
2
- import { DataGridHeadProps } from './types';
3
- export declare function DataGridHead<T>({ columns, selectable, onSelectAllRows, rowsCount, onSort, sorting, uncheckedRowsCount, }: DataGridHeadProps<T>): JSX.Element;
1
+ import { ChangeEvent } from 'react';
2
+ import { DataGridColumns, DataGridRow, DataGridSort } from '../types';
3
+ export declare type DataGridHeadProps<Data = DataGridRow, SortField extends keyof Data = keyof Data> = {
4
+ columns: DataGridColumns<Data>[];
5
+ selectable: boolean;
6
+ onSelectAllRows: (event: ChangeEvent<HTMLInputElement>) => void;
7
+ sorting: DataGridSort<SortField>[];
8
+ onSort: (sorting: DataGridSort<SortField>[]) => void;
9
+ uncheckedRowsCount: number;
10
+ rowsCount: number;
11
+ };
12
+ export declare function DataGridHead<Data, SortField extends keyof Data>({ columns, selectable, onSelectAllRows, rowsCount, onSort, sorting, uncheckedRowsCount, }: DataGridHeadProps<Data, SortField>): JSX.Element;
@@ -32,7 +32,7 @@ function DataGridHead(_a) {
32
32
  var columns = _a.columns, selectable = _a.selectable, onSelectAllRows = _a.onSelectAllRows, rowsCount = _a.rowsCount, onSort = _a.onSort, _b = _a.sorting, sorting = _b === void 0 ? [] : _b, uncheckedRowsCount = _a.uncheckedRowsCount;
33
33
  var checked = (0, react_1.useMemo)(function () { return !Boolean(uncheckedRowsCount) && rowsCount > 0; }, [uncheckedRowsCount, rowsCount]);
34
34
  var indeterminate = (0, react_1.useMemo)(function () { return uncheckedRowsCount > 0 && uncheckedRowsCount < rowsCount; }, [uncheckedRowsCount, rowsCount]);
35
- var handleSort = (0, react_1.useCallback)(function (field, sortable) { return function () {
35
+ var handleSort = (0, react_1.useCallback)(function (field, sortable) {
36
36
  if (sortable) {
37
37
  var currentSort = sorting.find(function (_a) {
38
38
  var fieldId = _a.fieldId;
@@ -59,13 +59,13 @@ function DataGridHead(_a) {
59
59
  // если для выбранного столбца нет сортировки - добавляем сортировку ASC
60
60
  onSort(__spreadArray(__spreadArray([], sorting, true), [{ fieldId: field, sort: constants_1.SortStates.ASC }], false));
61
61
  }
62
- }; }, [sorting]);
62
+ }, [sorting, onSort]);
63
63
  var renderColumns = (0, react_1.useMemo)(function () {
64
64
  return columns.map(function (_a) {
65
- var field = _a.field, label = _a.label, sortable = _a.sortable, align = _a.align, renderCell = _a.renderCell;
66
- return ((0, jsx_runtime_1.jsx)(DataGridHeadColumn_1.DataGridHeadColumn, { sorting: sorting, renderCell: renderCell, field: field, onSort: handleSort, label: label, sortable: sortable, align: align }, field));
65
+ var field = _a.field, label = _a.label, sortable = _a.sortable, align = _a.align, width = _a.width;
66
+ return ((0, jsx_runtime_1.jsx)(DataGridHeadColumn_1.DataGridHeadColumn, { sorting: sorting, field: field, onSort: handleSort, label: label, sortable: sortable, align: align, width: width }, label));
67
67
  });
68
68
  }, [columns, handleSort, sorting]);
69
- 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 }, void 0) }), void 0)), renderColumns] }, void 0) }, void 0));
69
+ 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] }) }));
70
70
  }
71
71
  exports.DataGridHead = DataGridHead;
@@ -1,2 +1 @@
1
1
  export * from './DataGridHead';
2
- export * from './types';
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -11,4 +15,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
11
15
  };
12
16
  Object.defineProperty(exports, "__esModule", { value: true });
13
17
  __exportStar(require("./DataGridHead"), exports);
14
- __exportStar(require("./types"), exports);
@@ -1,3 +1,13 @@
1
- /// <reference types="react" />
2
- import { DataGridHeadColumnProps } from './types';
3
- export declare function DataGridHeadColumn<T>({ onSort, field, sortable, align, label, sorting, renderCell, }: DataGridHeadColumnProps<T>): JSX.Element;
1
+ import { CSSProperties } from 'react';
2
+ import { TableCellProps } from '@mui/material';
3
+ import { DataGridRow, DataGridSort } from '../types';
4
+ export declare type DataGridHeadColumnProps<Data = DataGridRow, SortField extends keyof Data = keyof Data> = {
5
+ onSort: (field: SortField, sortable?: boolean) => void;
6
+ sorting: DataGridSort<SortField>[];
7
+ label?: string;
8
+ sortable?: boolean;
9
+ align?: TableCellProps['align'];
10
+ field?: keyof Data;
11
+ width?: CSSProperties['width'];
12
+ };
13
+ export declare function DataGridHeadColumn<Data, SortField extends keyof Data>({ onSort, field, sortable, align, label, sorting, width, }: DataGridHeadColumnProps<Data, SortField>): JSX.Element;
@@ -13,18 +13,23 @@ var __assign = (this && this.__assign) || function () {
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
14
  exports.DataGridHeadColumn = void 0;
15
15
  var jsx_runtime_1 = require("react/jsx-runtime");
16
+ var react_1 = require("react");
16
17
  var Typography_1 = require("../../Typography/Typography");
17
18
  var constants_1 = require("../constants");
18
19
  var styled_1 = require("./styled");
19
20
  function DataGridHeadColumn(_a) {
20
- var onSort = _a.onSort, field = _a.field, sortable = _a.sortable, align = _a.align, label = _a.label, sorting = _a.sorting, renderCell = _a.renderCell;
21
- var sortParams = sorting.find(function (_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 sortParams = (0, react_1.useMemo)(function () { return sorting.find(function (_a) {
22
23
  var fieldId = _a.fieldId;
23
24
  return field === fieldId;
24
- });
25
- var hideSortIcon = !Boolean(sortParams);
26
- var sortDirection = sortParams ? sortParams.sort : constants_1.SortStates.ASC;
27
- var fitContent = Boolean(renderCell);
28
- return ((0, jsx_runtime_1.jsxs)(styled_1.StyledTableCell, __assign({ onClick: onSort(field, sortable), fitContent: fitContent, align: align }, { children: [(0, jsx_runtime_1.jsx)(Typography_1.Typography, __assign({ variant: "pointer" }, { children: label }), void 0), sortable && ((0, jsx_runtime_1.jsx)(styled_1.StyledTableSortLabel, { hideSortIcon: hideSortIcon, direction: sortDirection, active: true }, void 0))] }), void 0));
25
+ }); }, [sorting, field]);
26
+ var hideSortIcon = (0, react_1.useMemo)(function () { return !Boolean(sortParams); }, [sortParams]);
27
+ var sortDirection = (0, react_1.useMemo)(function () { return (sortParams ? sortParams.sort : constants_1.SortStates.ASC); }, [sortParams]);
28
+ var handleSortClick = function () {
29
+ if (field) {
30
+ onSort(field, sortable);
31
+ }
32
+ };
33
+ return ((0, jsx_runtime_1.jsxs)(styled_1.StyledTableCell, __assign({ onClick: handleSortClick, align: align, width: width }, { children: [(0, jsx_runtime_1.jsx)(Typography_1.Typography, __assign({ variant: "pointer" }, { children: label })), sortable && ((0, jsx_runtime_1.jsx)(styled_1.StyledTableSortLabel, { hideSortIcon: hideSortIcon, direction: sortDirection, active: true }))] })));
29
34
  }
30
35
  exports.DataGridHeadColumn = DataGridHeadColumn;
@@ -1,2 +1 @@
1
1
  export * from './DataGridHeadColumn';
2
- export * from './types';
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -11,4 +15,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
11
15
  };
12
16
  Object.defineProperty(exports, "__esModule", { value: true });
13
17
  __exportStar(require("./DataGridHeadColumn"), exports);
14
- __exportStar(require("./types"), exports);
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { TableCellProps } from '@mui/material';
2
+ import { CSSProperties } from 'react';
3
3
  export declare const StyledTableSortLabel: import("@emotion/styled").StyledComponent<{
4
4
  active?: boolean | undefined;
5
5
  children?: import("react").ReactNode;
@@ -26,7 +26,7 @@ export declare const StyledTableSortLabel: import("@emotion/styled").StyledCompo
26
26
  tabIndex?: number | undefined;
27
27
  TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
28
28
  touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
29
- }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "tabIndex" | "children" | "className" | "slot" | "style" | "title" | "key" | "css" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
29
+ }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | "css" | keyof import("react").HTMLAttributes<HTMLSpanElement>> & {
30
30
  ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
31
31
  }, "disabled" | "active" | "onFocusVisible" | "tabIndex" | "action" | "children" | "direction" | keyof import("@mui/material/OverridableComponent").CommonProps | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "sx" | "TouchRippleProps" | "touchRippleRef" | "hideSortIcon" | "IconComponent"> & {
32
32
  theme?: import("@emotion/react").Theme | undefined;
@@ -34,5 +34,5 @@ export declare const StyledTableSortLabel: import("@emotion/styled").StyledCompo
34
34
  export declare const StyledTableCell: import("@emotion/styled").StyledComponent<TableCellProps & {
35
35
  theme?: import("@emotion/react").Theme | undefined;
36
36
  } & {
37
- fitContent?: boolean | undefined;
37
+ width?: CSSProperties['width'];
38
38
  }, {}, {}>;