@astral/ui 4.113.3 → 4.115.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 (293) hide show
  1. package/components/ActionGroup/ActionGroup.js +2 -2
  2. package/components/ActionGroup/SecondaryActions/SecondaryActions.d.ts +1 -1
  3. package/components/ActionGroup/SecondaryActions/SecondaryActions.js +2 -2
  4. package/components/ActionGroup/types.d.ts +9 -0
  5. package/components/DataGrid/Body/Body.d.ts +1 -1
  6. package/components/DataGrid/Body/Body.js +7 -3
  7. package/components/DataGrid/Body/types.d.ts +11 -3
  8. package/components/DataGrid/DataGrid.js +13 -6
  9. package/components/DataGrid/DataGridContext/DataGridProvider/DataGridProvider.d.ts +3 -2
  10. package/components/DataGrid/DataGridContext/DataGridProvider/DataGridProvider.js +3 -2
  11. package/components/DataGrid/DataGridSelectionContext/DataGridSelectionContext.d.ts +25 -0
  12. package/components/DataGrid/DataGridSelectionContext/DataGridSelectionContext.js +13 -0
  13. package/components/DataGrid/DataGridSelectionContext/DataGridSelectionProvider/DataGridSelectionProvider.d.ts +7 -0
  14. package/components/DataGrid/DataGridSelectionContext/DataGridSelectionProvider/DataGridSelectionProvider.js +8 -0
  15. package/components/DataGrid/DataGridSelectionContext/DataGridSelectionProvider/index.d.ts +1 -0
  16. package/components/DataGrid/DataGridSelectionContext/DataGridSelectionProvider/index.js +1 -0
  17. package/components/DataGrid/DataGridSelectionContext/index.d.ts +2 -0
  18. package/components/DataGrid/DataGridSelectionContext/index.js +2 -0
  19. package/components/DataGrid/PinnedSections/PinnedSections.js +2 -2
  20. package/components/DataGrid/PinnedSections/useLogic/useLogic.d.ts +1 -0
  21. package/components/DataGrid/PinnedSections/useLogic/useLogic.js +4 -3
  22. package/components/DataGrid/Row/Row.js +13 -9
  23. package/components/DataGrid/Row/RowContext/RowContext.d.ts +15 -4
  24. package/components/DataGrid/Row/RowContext/RowContext.js +3 -3
  25. package/components/DataGrid/Row/RowContext/RowProvider/RowProvider.d.ts +10 -1
  26. package/components/DataGrid/Row/RowContext/RowProvider/RowProvider.js +23 -17
  27. package/components/DataGrid/Row/types.d.ts +7 -3
  28. package/components/DataGrid/Row/useLogic/useLogic.d.ts +6 -4
  29. package/components/DataGrid/Row/useLogic/useLogic.js +21 -12
  30. package/components/DataGrid/RowBase/RowBase.js +5 -2
  31. package/components/DataGrid/RowBase/types.d.ts +9 -5
  32. package/components/DataGrid/RowBase/useLogic/useLogic.d.ts +5 -4
  33. package/components/DataGrid/RowBase/useLogic/useLogic.js +16 -10
  34. package/components/DataGrid/RowCheckbox/RowCheckbox.d.ts +5 -0
  35. package/components/DataGrid/RowCheckbox/RowCheckbox.js +13 -0
  36. package/components/DataGrid/RowCheckbox/constants.d.ts +4 -0
  37. package/components/DataGrid/RowCheckbox/constants.js +4 -0
  38. package/components/DataGrid/RowCheckbox/index.d.ts +1 -0
  39. package/components/DataGrid/RowCheckbox/index.js +1 -0
  40. package/components/DataGrid/RowCheckbox/types.d.ts +7 -0
  41. package/components/DataGrid/RowCheckbox/types.js +1 -0
  42. package/components/DataGrid/constants.d.ts +2 -0
  43. package/components/DataGrid/constants.js +2 -0
  44. package/components/DataGrid/hooks/index.d.ts +1 -0
  45. package/components/DataGrid/hooks/index.js +1 -0
  46. package/components/DataGrid/hooks/useWarnRowsWithoutDisabledReason/index.d.ts +1 -0
  47. package/components/DataGrid/hooks/useWarnRowsWithoutDisabledReason/index.js +1 -0
  48. package/components/DataGrid/hooks/useWarnRowsWithoutDisabledReason/useWarnRowsWithoutDisabledReason.d.ts +5 -0
  49. package/components/DataGrid/hooks/useWarnRowsWithoutDisabledReason/useWarnRowsWithoutDisabledReason.js +17 -0
  50. package/components/DataGrid/index.d.ts +1 -1
  51. package/components/DataGrid/public.d.ts +1 -1
  52. package/components/DataGrid/styles.d.ts +4 -0
  53. package/components/DataGrid/styles.js +26 -0
  54. package/components/DataGrid/tests/performance/testDataGridPerformance.d.ts +3 -1
  55. package/components/DataGrid/tests/performance/testDataGridPerformance.js +234 -2
  56. package/components/DataGrid/tests/selection/testDataGridSelection.d.ts +14 -0
  57. package/components/DataGrid/tests/selection/testDataGridSelection.js +562 -0
  58. package/components/DataGrid/types.d.ts +41 -1
  59. package/components/DataGrid/useLogic/useLogic.d.ts +8 -3
  60. package/components/DataGrid/useLogic/useLogic.js +23 -10
  61. package/components/DataGrid/utils/checkIsMassActionsOpen/checkIsMassActionsOpen.d.ts +10 -0
  62. package/components/DataGrid/utils/checkIsMassActionsOpen/checkIsMassActionsOpen.js +4 -0
  63. package/components/DataGrid/utils/checkIsMassActionsOpen/index.d.ts +1 -0
  64. package/components/DataGrid/utils/checkIsMassActionsOpen/index.js +1 -0
  65. package/components/DataGrid/utils/getRowDisabledState/getRowDisabledState.d.ts +31 -0
  66. package/components/DataGrid/utils/getRowDisabledState/getRowDisabledState.js +20 -0
  67. package/components/DataGrid/utils/getRowDisabledState/index.d.ts +1 -0
  68. package/components/DataGrid/utils/getRowDisabledState/index.js +1 -0
  69. package/components/DataGrid/utils/index.d.ts +4 -0
  70. package/components/DataGrid/utils/index.js +4 -0
  71. package/components/DataGrid/utils/resolveRowDisabled/index.d.ts +1 -0
  72. package/components/DataGrid/utils/resolveRowDisabled/index.js +1 -0
  73. package/components/DataGrid/utils/resolveRowDisabled/resolveRowDisabled.d.ts +5 -0
  74. package/components/DataGrid/utils/resolveRowDisabled/resolveRowDisabled.js +17 -0
  75. package/components/DataGrid/utils/resolveRowsDisabled/index.d.ts +1 -0
  76. package/components/DataGrid/utils/resolveRowsDisabled/index.js +1 -0
  77. package/components/DataGrid/utils/resolveRowsDisabled/resolveRowsDisabled.d.ts +16 -0
  78. package/components/DataGrid/utils/resolveRowsDisabled/resolveRowsDisabled.js +17 -0
  79. package/components/DataGridActionCell/hooks/useBlockingActions/useBlockingActions.js +3 -3
  80. package/components/DataGridCollapsibleRow/useLogic/useLogic.d.ts +3 -2
  81. package/components/DataGridCollapsibleRow/useLogic/useLogic.js +4 -3
  82. package/components/DataGridInfinite/DataGridInfinite.js +18 -14
  83. package/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContext.d.ts +1 -1
  84. package/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContext.js +1 -1
  85. package/components/DataGridInfinite/Footer/Footer.d.ts +6 -0
  86. package/components/DataGridInfinite/Footer/Footer.js +25 -0
  87. package/components/DataGridInfinite/Footer/index.d.ts +2 -0
  88. package/components/DataGridInfinite/Footer/index.js +1 -0
  89. package/components/DataGridInfinite/Footer/types.d.ts +26 -0
  90. package/components/DataGridInfinite/Footer/types.js +1 -0
  91. package/components/DataGridInfinite/Row/Row.js +2 -2
  92. package/components/DataGridInfinite/Row/index.d.ts +1 -0
  93. package/components/DataGridInfinite/Row/types.d.ts +17 -2
  94. package/components/DataGridInfinite/Row/useLogic/useLogic.d.ts +4 -2
  95. package/components/DataGridInfinite/Row/useLogic/useLogic.js +12 -4
  96. package/components/DataGridInfinite/constants.d.ts +3 -0
  97. package/components/DataGridInfinite/constants.js +3 -0
  98. package/components/DataGridInfinite/faker.d.ts +1 -5
  99. package/components/DataGridInfinite/faker.js +1 -2
  100. package/components/DataGridInfinite/styles.d.ts +4 -0
  101. package/components/DataGridInfinite/styles.js +24 -0
  102. package/components/DataGridInfinite/useLogic/useLogic.d.ts +7 -3
  103. package/components/DataGridInfinite/useLogic/useLogic.js +52 -16
  104. package/components/DataGridMassActions/DataGridMassActions.d.ts +15 -0
  105. package/components/DataGridMassActions/DataGridMassActions.js +32 -0
  106. package/components/DataGridMassActions/constants.d.ts +4 -0
  107. package/components/DataGridMassActions/constants.js +5 -0
  108. package/components/DataGridMassActions/index.d.ts +2 -0
  109. package/components/DataGridMassActions/index.js +1 -0
  110. package/components/DataGridMassActions/public.d.ts +2 -0
  111. package/components/DataGridMassActions/public.js +1 -0
  112. package/components/DataGridMassActions/styles.d.ts +8 -0
  113. package/components/DataGridMassActions/styles.js +49 -0
  114. package/components/DataGridMassActions/tests/testDataGridMassActions.d.ts +23 -0
  115. package/components/DataGridMassActions/tests/testDataGridMassActions.js +77 -0
  116. package/components/DataGridMassActions/types.d.ts +2 -0
  117. package/components/DataGridMassActions/types.js +1 -0
  118. package/components/DataGridMassActions/useLogic/index.d.ts +1 -0
  119. package/components/DataGridMassActions/useLogic/index.js +1 -0
  120. package/components/DataGridMassActions/useLogic/useLogic.d.ts +6 -0
  121. package/components/DataGridMassActions/useLogic/useLogic.js +21 -0
  122. package/components/IconDropdownButton/IconDropdownButton.d.ts +5 -0
  123. package/components/IconDropdownButton/IconDropdownButton.js +2 -2
  124. package/components/MassActions/MassActions.d.ts +5 -0
  125. package/components/MassActions/MassActions.js +17 -0
  126. package/components/MassActions/constants.d.ts +6 -0
  127. package/components/MassActions/constants.js +12 -0
  128. package/components/MassActions/index.d.ts +2 -0
  129. package/components/MassActions/index.js +1 -0
  130. package/components/MassActions/styles.d.ts +34 -0
  131. package/components/MassActions/styles.js +43 -0
  132. package/components/MassActions/types.d.ts +20 -0
  133. package/components/MassActions/types.js +1 -0
  134. package/components/MassActions/useLogic/index.d.ts +1 -0
  135. package/components/MassActions/useLogic/index.js +1 -0
  136. package/components/MassActions/useLogic/useLogic.d.ts +7 -0
  137. package/components/MassActions/useLogic/useLogic.js +9 -0
  138. package/components/PageHeader/PageActions/SecondaryActions/styles.d.ts +1 -1
  139. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/index.d.ts +0 -1
  140. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/index.js +0 -1
  141. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/useLogic.js +2 -1
  142. package/components/index.d.ts +1 -1
  143. package/node/components/ActionGroup/ActionGroup.js +2 -2
  144. package/node/components/ActionGroup/SecondaryActions/SecondaryActions.d.ts +1 -1
  145. package/node/components/ActionGroup/SecondaryActions/SecondaryActions.js +2 -2
  146. package/node/components/ActionGroup/types.d.ts +9 -0
  147. package/node/components/DataGrid/Body/Body.d.ts +1 -1
  148. package/node/components/DataGrid/Body/Body.js +7 -3
  149. package/node/components/DataGrid/Body/types.d.ts +11 -3
  150. package/node/components/DataGrid/DataGrid.js +12 -5
  151. package/node/components/DataGrid/DataGridContext/DataGridProvider/DataGridProvider.d.ts +3 -2
  152. package/node/components/DataGrid/DataGridContext/DataGridProvider/DataGridProvider.js +3 -2
  153. package/node/components/DataGrid/DataGridSelectionContext/DataGridSelectionContext.d.ts +25 -0
  154. package/node/components/DataGrid/DataGridSelectionContext/DataGridSelectionContext.js +16 -0
  155. package/node/components/DataGrid/DataGridSelectionContext/DataGridSelectionProvider/DataGridSelectionProvider.d.ts +7 -0
  156. package/node/components/DataGrid/DataGridSelectionContext/DataGridSelectionProvider/DataGridSelectionProvider.js +12 -0
  157. package/node/components/DataGrid/DataGridSelectionContext/DataGridSelectionProvider/index.d.ts +1 -0
  158. package/node/components/DataGrid/DataGridSelectionContext/DataGridSelectionProvider/index.js +17 -0
  159. package/node/components/DataGrid/DataGridSelectionContext/index.d.ts +2 -0
  160. package/node/components/DataGrid/DataGridSelectionContext/index.js +18 -0
  161. package/node/components/DataGrid/PinnedSections/PinnedSections.js +2 -2
  162. package/node/components/DataGrid/PinnedSections/useLogic/useLogic.d.ts +1 -0
  163. package/node/components/DataGrid/PinnedSections/useLogic/useLogic.js +4 -3
  164. package/node/components/DataGrid/Row/Row.js +13 -9
  165. package/node/components/DataGrid/Row/RowContext/RowContext.d.ts +15 -4
  166. package/node/components/DataGrid/Row/RowContext/RowContext.js +3 -3
  167. package/node/components/DataGrid/Row/RowContext/RowProvider/RowProvider.d.ts +10 -1
  168. package/node/components/DataGrid/Row/RowContext/RowProvider/RowProvider.js +23 -17
  169. package/node/components/DataGrid/Row/types.d.ts +7 -3
  170. package/node/components/DataGrid/Row/useLogic/useLogic.d.ts +6 -4
  171. package/node/components/DataGrid/Row/useLogic/useLogic.js +23 -14
  172. package/node/components/DataGrid/RowBase/RowBase.js +5 -2
  173. package/node/components/DataGrid/RowBase/types.d.ts +9 -5
  174. package/node/components/DataGrid/RowBase/useLogic/useLogic.d.ts +5 -4
  175. package/node/components/DataGrid/RowBase/useLogic/useLogic.js +16 -10
  176. package/node/components/DataGrid/RowCheckbox/RowCheckbox.d.ts +5 -0
  177. package/node/components/DataGrid/RowCheckbox/RowCheckbox.js +17 -0
  178. package/node/components/DataGrid/RowCheckbox/constants.d.ts +4 -0
  179. package/node/components/DataGrid/RowCheckbox/constants.js +7 -0
  180. package/node/components/DataGrid/RowCheckbox/index.d.ts +1 -0
  181. package/node/components/DataGrid/RowCheckbox/index.js +17 -0
  182. package/node/components/DataGrid/RowCheckbox/types.d.ts +7 -0
  183. package/node/components/DataGrid/RowCheckbox/types.js +2 -0
  184. package/node/components/DataGrid/constants.d.ts +2 -0
  185. package/node/components/DataGrid/constants.js +2 -0
  186. package/node/components/DataGrid/hooks/index.d.ts +1 -0
  187. package/node/components/DataGrid/hooks/index.js +1 -0
  188. package/node/components/DataGrid/hooks/useWarnRowsWithoutDisabledReason/index.d.ts +1 -0
  189. package/node/components/DataGrid/hooks/useWarnRowsWithoutDisabledReason/index.js +17 -0
  190. package/node/components/DataGrid/hooks/useWarnRowsWithoutDisabledReason/useWarnRowsWithoutDisabledReason.d.ts +5 -0
  191. package/node/components/DataGrid/hooks/useWarnRowsWithoutDisabledReason/useWarnRowsWithoutDisabledReason.js +21 -0
  192. package/node/components/DataGrid/index.d.ts +1 -1
  193. package/node/components/DataGrid/public.d.ts +1 -1
  194. package/node/components/DataGrid/styles.d.ts +4 -0
  195. package/node/components/DataGrid/styles.js +27 -1
  196. package/node/components/DataGrid/tests/performance/testDataGridPerformance.d.ts +3 -1
  197. package/node/components/DataGrid/tests/performance/testDataGridPerformance.js +232 -0
  198. package/node/components/DataGrid/tests/selection/testDataGridSelection.d.ts +14 -0
  199. package/node/components/DataGrid/tests/selection/testDataGridSelection.js +566 -0
  200. package/node/components/DataGrid/types.d.ts +41 -1
  201. package/node/components/DataGrid/useLogic/useLogic.d.ts +8 -3
  202. package/node/components/DataGrid/useLogic/useLogic.js +25 -12
  203. package/node/components/DataGrid/utils/checkIsMassActionsOpen/checkIsMassActionsOpen.d.ts +10 -0
  204. package/node/components/DataGrid/utils/checkIsMassActionsOpen/checkIsMassActionsOpen.js +8 -0
  205. package/node/components/DataGrid/utils/checkIsMassActionsOpen/index.d.ts +1 -0
  206. package/node/components/DataGrid/utils/checkIsMassActionsOpen/index.js +5 -0
  207. package/node/components/DataGrid/utils/getRowDisabledState/getRowDisabledState.d.ts +31 -0
  208. package/node/components/DataGrid/utils/getRowDisabledState/getRowDisabledState.js +24 -0
  209. package/node/components/DataGrid/utils/getRowDisabledState/index.d.ts +1 -0
  210. package/node/components/DataGrid/utils/getRowDisabledState/index.js +5 -0
  211. package/node/components/DataGrid/utils/index.d.ts +4 -0
  212. package/node/components/DataGrid/utils/index.js +9 -1
  213. package/node/components/DataGrid/utils/resolveRowDisabled/index.d.ts +1 -0
  214. package/node/components/DataGrid/utils/resolveRowDisabled/index.js +5 -0
  215. package/node/components/DataGrid/utils/resolveRowDisabled/resolveRowDisabled.d.ts +5 -0
  216. package/node/components/DataGrid/utils/resolveRowDisabled/resolveRowDisabled.js +21 -0
  217. package/node/components/DataGrid/utils/resolveRowsDisabled/index.d.ts +1 -0
  218. package/node/components/DataGrid/utils/resolveRowsDisabled/index.js +5 -0
  219. package/node/components/DataGrid/utils/resolveRowsDisabled/resolveRowsDisabled.d.ts +16 -0
  220. package/node/components/DataGrid/utils/resolveRowsDisabled/resolveRowsDisabled.js +21 -0
  221. package/node/components/DataGridActionCell/hooks/useBlockingActions/useBlockingActions.js +3 -3
  222. package/node/components/DataGridCollapsibleRow/useLogic/useLogic.d.ts +3 -2
  223. package/node/components/DataGridCollapsibleRow/useLogic/useLogic.js +4 -3
  224. package/node/components/DataGridInfinite/DataGridInfinite.js +19 -15
  225. package/node/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContext.d.ts +1 -1
  226. package/node/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContext.js +1 -1
  227. package/node/components/DataGridInfinite/Footer/Footer.d.ts +6 -0
  228. package/node/components/DataGridInfinite/Footer/Footer.js +29 -0
  229. package/node/components/DataGridInfinite/Footer/index.d.ts +2 -0
  230. package/node/components/DataGridInfinite/Footer/index.js +17 -0
  231. package/node/components/DataGridInfinite/Footer/types.d.ts +26 -0
  232. package/node/components/DataGridInfinite/Footer/types.js +2 -0
  233. package/node/components/DataGridInfinite/Row/Row.js +2 -2
  234. package/node/components/DataGridInfinite/Row/index.d.ts +1 -0
  235. package/node/components/DataGridInfinite/Row/types.d.ts +17 -2
  236. package/node/components/DataGridInfinite/Row/useLogic/useLogic.d.ts +4 -2
  237. package/node/components/DataGridInfinite/Row/useLogic/useLogic.js +12 -4
  238. package/node/components/DataGridInfinite/constants.d.ts +3 -0
  239. package/node/components/DataGridInfinite/constants.js +3 -0
  240. package/node/components/DataGridInfinite/faker.d.ts +1 -5
  241. package/node/components/DataGridInfinite/faker.js +1 -2
  242. package/node/components/DataGridInfinite/styles.d.ts +4 -0
  243. package/node/components/DataGridInfinite/styles.js +27 -3
  244. package/node/components/DataGridInfinite/useLogic/useLogic.d.ts +7 -3
  245. package/node/components/DataGridInfinite/useLogic/useLogic.js +52 -16
  246. package/node/components/DataGridMassActions/DataGridMassActions.d.ts +15 -0
  247. package/node/components/DataGridMassActions/DataGridMassActions.js +36 -0
  248. package/node/components/DataGridMassActions/constants.d.ts +4 -0
  249. package/node/components/DataGridMassActions/constants.js +8 -0
  250. package/node/components/DataGridMassActions/index.d.ts +2 -0
  251. package/node/components/DataGridMassActions/index.js +5 -0
  252. package/node/components/DataGridMassActions/public.d.ts +2 -0
  253. package/node/components/DataGridMassActions/public.js +5 -0
  254. package/node/components/DataGridMassActions/styles.d.ts +8 -0
  255. package/node/components/DataGridMassActions/styles.js +52 -0
  256. package/node/components/DataGridMassActions/tests/testDataGridMassActions.d.ts +23 -0
  257. package/node/components/DataGridMassActions/tests/testDataGridMassActions.js +81 -0
  258. package/node/components/DataGridMassActions/types.d.ts +2 -0
  259. package/node/components/DataGridMassActions/types.js +2 -0
  260. package/node/components/DataGridMassActions/useLogic/index.d.ts +1 -0
  261. package/node/components/DataGridMassActions/useLogic/index.js +17 -0
  262. package/node/components/DataGridMassActions/useLogic/useLogic.d.ts +6 -0
  263. package/node/components/DataGridMassActions/useLogic/useLogic.js +25 -0
  264. package/node/components/IconDropdownButton/IconDropdownButton.d.ts +5 -0
  265. package/node/components/IconDropdownButton/IconDropdownButton.js +2 -2
  266. package/node/components/MassActions/MassActions.d.ts +5 -0
  267. package/node/components/MassActions/MassActions.js +21 -0
  268. package/node/components/MassActions/constants.d.ts +6 -0
  269. package/node/components/MassActions/constants.js +15 -0
  270. package/node/components/MassActions/index.d.ts +2 -0
  271. package/node/components/MassActions/index.js +5 -0
  272. package/node/components/MassActions/styles.d.ts +34 -0
  273. package/node/components/MassActions/styles.js +46 -0
  274. package/node/components/MassActions/types.d.ts +20 -0
  275. package/node/components/MassActions/types.js +2 -0
  276. package/node/components/MassActions/useLogic/index.d.ts +1 -0
  277. package/node/components/MassActions/useLogic/index.js +17 -0
  278. package/node/components/MassActions/useLogic/useLogic.d.ts +7 -0
  279. package/node/components/MassActions/useLogic/useLogic.js +13 -0
  280. package/node/components/PageHeader/PageActions/SecondaryActions/styles.d.ts +1 -1
  281. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/index.d.ts +0 -1
  282. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/index.js +0 -1
  283. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/useLogic.js +2 -1
  284. package/node/components/index.d.ts +1 -1
  285. package/package.json +1 -1
  286. /package/components/{Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount → useDelayedUnmount}/index.d.ts +0 -0
  287. /package/components/{Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount → useDelayedUnmount}/index.js +0 -0
  288. /package/components/{Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount → useDelayedUnmount}/useDelayedUnmount.d.ts +0 -0
  289. /package/components/{Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount → useDelayedUnmount}/useDelayedUnmount.js +0 -0
  290. /package/node/components/{Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount → useDelayedUnmount}/index.d.ts +0 -0
  291. /package/node/components/{Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount → useDelayedUnmount}/index.js +0 -0
  292. /package/node/components/{Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount → useDelayedUnmount}/useDelayedUnmount.d.ts +0 -0
  293. /package/node/components/{Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount → useDelayedUnmount}/useDelayedUnmount.js +0 -0
@@ -0,0 +1 @@
1
+ export * from './useLogic';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = 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);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./useLogic"), exports);
@@ -0,0 +1,6 @@
1
+ export declare const useLogic: () => {
2
+ isOpen: boolean;
3
+ isMounted: boolean;
4
+ selectedCount: number;
5
+ handleClose: () => void | undefined;
6
+ };
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useLogic = void 0;
4
+ const react_1 = require("react");
5
+ const DataGridSelectionContext_1 = require("../../DataGrid/DataGridSelectionContext");
6
+ const hooks_1 = require("../../theme/hooks");
7
+ const useDelayedUnmount_1 = require("../../useDelayedUnmount");
8
+ const useLogic = () => {
9
+ const { selectedRows, onSelectRow, isMassActionsOpen: isOpen, } = (0, react_1.useContext)(DataGridSelectionContext_1.DataGridSelectionContext);
10
+ const { transitions: { duration: { leavingScreen }, }, } = (0, hooks_1.useTheme)();
11
+ const { isMounted } = (0, useDelayedUnmount_1.useDelayedUnmount)({ isOpen, duration: leavingScreen });
12
+ // Во время анимации скрытия выбор уже пустой — показываем последнее количество выбранных строк
13
+ const [lastSelectedCount, setLastSelectedCount] = (0, react_1.useState)(selectedRows.length);
14
+ if (selectedRows.length > 0 && selectedRows.length !== lastSelectedCount) {
15
+ setLastSelectedCount(selectedRows.length);
16
+ }
17
+ const handleClose = () => onSelectRow?.([]);
18
+ return {
19
+ isOpen,
20
+ isMounted,
21
+ selectedCount: lastSelectedCount,
22
+ handleClose,
23
+ };
24
+ };
25
+ exports.useLogic = useLogic;
@@ -1,9 +1,14 @@
1
1
  import { type ReactNode } from 'react';
2
2
  import { type IconButtonProps } from '../IconButton';
3
+ import { type MenuProps } from '../Menu';
3
4
  export type IconDropdownButtonProps = IconButtonProps & {
4
5
  /**
5
6
  * Иконка кнопки
6
7
  */
7
8
  icon: ReactNode;
9
+ /**
10
+ * Пропсы выпадающего меню
11
+ */
12
+ popoverProps?: Omit<MenuProps, 'open' | 'anchorEl' | 'title' | 'children'>;
8
13
  };
9
14
  export declare const IconDropdownButton: import("react").ForwardRefExoticComponent<Omit<IconDropdownButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
@@ -10,7 +10,7 @@ const react_1 = require("react");
10
10
  const IconButton_1 = require("../IconButton");
11
11
  const Menu_1 = require("../Menu");
12
12
  const useMenu_1 = require("../useMenu");
13
- exports.IconDropdownButton = (0, react_1.forwardRef)(({ children, icon, title, ...props }, ref) => {
13
+ exports.IconDropdownButton = (0, react_1.forwardRef)(({ children, icon, title, popoverProps, ...props }, ref) => {
14
14
  const { open, anchorRef, handleOpenMenu, handleCloseMenu } = (0, useMenu_1.useMenu)(ref);
15
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ClickAwayListener_1.default, { onClickAway: handleCloseMenu, mouseEvent: "onMouseUp", children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { ...props, ref: anchorRef, onClick: handleOpenMenu, selected: open, title: title, children: icon }) }), (0, jsx_runtime_1.jsx)(Menu_1.Menu, { title: title, open: open, anchorEl: anchorRef.current, children: children })] }));
15
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ClickAwayListener_1.default, { onClickAway: handleCloseMenu, mouseEvent: "onMouseUp", children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { ...props, ref: anchorRef, onClick: handleOpenMenu, selected: open, title: title, children: icon }) }), (0, jsx_runtime_1.jsx)(Menu_1.Menu, { ...popoverProps, title: title, open: open, anchorEl: anchorRef.current, children: children })] }));
16
16
  });
@@ -0,0 +1,5 @@
1
+ import { type MassActionsProps } from './types';
2
+ /**
3
+ * Базовый компонент панели массовых действий
4
+ */
5
+ export declare const MassActions: ({ main, secondary, selectedCount, entityDeclension, onClose, className, }: MassActionsProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MassActions = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const CrossOutlineMd_1 = require("../../icons/CrossOutlineMd");
6
+ const IconButton_1 = require("../IconButton");
7
+ const Tag_1 = require("../Tag");
8
+ const constants_1 = require("./constants");
9
+ const styles_1 = require("./styles");
10
+ const useLogic_1 = require("./useLogic");
11
+ /**
12
+ * Базовый компонент панели массовых действий
13
+ */
14
+ const MassActions = ({ main, secondary, selectedCount, entityDeclension, onClose, className, }) => {
15
+ const { selectionLabel, reservedLabel } = (0, useLogic_1.useLogic)({
16
+ entityDeclension,
17
+ selectedCount,
18
+ });
19
+ return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { className: className, children: [(0, jsx_runtime_1.jsx)(styles_1.StyledActionGroup, { main: main, secondary: secondary, secondaryPopoverProps: constants_1.SECONDARY_POPOVER_PROPS, size: "large" }), (0, jsx_runtime_1.jsxs)(styles_1.Selection, { children: [(0, jsx_runtime_1.jsxs)(styles_1.SelectionLabel, { children: [(0, jsx_runtime_1.jsx)(styles_1.ReservedLabel, { variant: "text", size: "large", label: reservedLabel, "aria-hidden": true }), (0, jsx_runtime_1.jsx)(Tag_1.Tag, { variant: "text", size: "large", label: selectionLabel, "aria-live": "polite" })] }), (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { variant: "text", "aria-label": "\u0421\u043D\u044F\u0442\u044C \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435", onClick: onClose, children: (0, jsx_runtime_1.jsx)(CrossOutlineMd_1.CrossOutlineMd, {}) })] })] }));
20
+ };
21
+ exports.MassActions = MassActions;
@@ -0,0 +1,6 @@
1
+ import { type IconDropdownButtonProps } from '../IconDropdownButton';
2
+ export declare const SECONDARY_POPOVER_PROPS: IconDropdownButtonProps['popoverProps'];
3
+ /**
4
+ * Количество выбранных строк, под которое заранее резервируется ширина счётчика
5
+ */
6
+ export declare const RESERVED_SELECTED_COUNT = 999;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RESERVED_SELECTED_COUNT = exports.SECONDARY_POPOVER_PROPS = void 0;
4
+ /**
5
+ * Смещение меню вверх от кнопки. Компенсирует margin-top 8px у меню из темы и оставляет отступ 8px до кнопки
6
+ */
7
+ const ANCHOR_VERTICAL_POSITION = -16;
8
+ exports.SECONDARY_POPOVER_PROPS = {
9
+ anchorOrigin: { vertical: ANCHOR_VERTICAL_POSITION, horizontal: 'left' },
10
+ transformOrigin: { vertical: 'bottom', horizontal: 'left' },
11
+ };
12
+ /**
13
+ * Количество выбранных строк, под которое заранее резервируется ширина счётчика
14
+ */
15
+ exports.RESERVED_SELECTED_COUNT = 999;
@@ -0,0 +1,2 @@
1
+ export { MassActions } from './MassActions';
2
+ export type { MassActionsProps } from './types';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MassActions = void 0;
4
+ var MassActions_1 = require("./MassActions");
5
+ Object.defineProperty(exports, "MassActions", { enumerable: true, get: function () { return MassActions_1.MassActions; } });
@@ -0,0 +1,34 @@
1
+ /// <reference types="react" />
2
+ export declare const Wrapper: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
3
+ theme?: import("@emotion/react").Theme | undefined;
4
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
5
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
6
+ export declare const Selection: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
7
+ theme?: import("@emotion/react").Theme | undefined;
8
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
9
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
10
+ export declare const StyledActionGroup: import("@emotion/styled/dist/declarations/src/types").StyledComponent<import("../ActionGroup").ActionGroupProps<import("react").ElementType, import("react").ElementType> & {
11
+ theme?: import("@emotion/react").Theme | undefined;
12
+ }, {}, {}>;
13
+ /**
14
+ * Невидимая заглушка и счётчик лежат в одной ячейке: ширину задаёт заглушка, поэтому панель не прыгает при смене количества
15
+ */
16
+ export declare const SelectionLabel: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
17
+ theme?: import("@emotion/react").Theme | undefined;
18
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
19
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
20
+ export declare const ReservedLabel: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
21
+ disabled?: boolean | undefined;
22
+ label?: import("react").ReactNode;
23
+ icon?: import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | undefined;
24
+ className?: string | undefined;
25
+ onDelete?: ((event: import("react").SyntheticEvent<Element, Event>) => void) | undefined;
26
+ color?: import("../Tag").TagColor | undefined;
27
+ variant?: import("../Tag").TagVariant | undefined;
28
+ size?: import("../Tag").TagSize | undefined;
29
+ startAddon?: import("../Tag").TagAddon | undefined;
30
+ endAddon?: import("../Tag").TagAddon | undefined;
31
+ style?: import("react").CSSProperties | undefined;
32
+ } & import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement> & {
33
+ theme?: import("@emotion/react").Theme | undefined;
34
+ }, {}, {}>;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReservedLabel = exports.SelectionLabel = exports.StyledActionGroup = exports.Selection = exports.Wrapper = void 0;
4
+ const ActionGroup_1 = require("../ActionGroup");
5
+ const styled_1 = require("../styled");
6
+ const Tag_1 = require("../Tag");
7
+ exports.Wrapper = styled_1.styled.div `
8
+ display: flex;
9
+ gap: ${({ theme }) => theme.spacing(3)};
10
+ align-items: center;
11
+
12
+ width: fit-content;
13
+ padding: ${({ theme }) => theme.spacing(4)};
14
+
15
+ background-color: ${({ theme }) => theme.palette.background.default};
16
+
17
+ /* 16px по макету, токена под это значение в теме нет */
18
+ border-radius: calc(${({ theme }) => theme.shape.medium} * 2);
19
+ box-shadow: ${({ theme }) => theme.elevation[200]};
20
+ `;
21
+ exports.Selection = styled_1.styled.div `
22
+ display: flex;
23
+ gap: ${({ theme }) => theme.spacing(2)};
24
+ align-items: center;
25
+
26
+ padding-left: ${({ theme }) => theme.spacing(2)};
27
+ `;
28
+ exports.StyledActionGroup = (0, styled_1.styled)(ActionGroup_1.ActionGroup) `
29
+ gap: ${({ theme }) => theme.spacing(3)};
30
+ `;
31
+ /**
32
+ * Невидимая заглушка и счётчик лежат в одной ячейке: ширину задаёт заглушка, поэтому панель не прыгает при смене количества
33
+ */
34
+ exports.SelectionLabel = styled_1.styled.div `
35
+ display: grid;
36
+ justify-items: start;
37
+
38
+ font-variant-numeric: tabular-nums;
39
+
40
+ & > * {
41
+ grid-area: 1 / 1;
42
+ }
43
+ `;
44
+ exports.ReservedLabel = (0, styled_1.styled)(Tag_1.Tag) `
45
+ visibility: hidden;
46
+ `;
@@ -0,0 +1,20 @@
1
+ import { type ActionGroupProps } from '../ActionGroup';
2
+ export type MassActionsProps = Pick<ActionGroupProps, 'main' | 'secondary'> & {
3
+ /**
4
+ * Количество выбранных элементов
5
+ */
6
+ selectedCount: number;
7
+ /**
8
+ * Три формы названия выбранной сущности
9
+ * @example ['документ', 'документа', 'документов']
10
+ */
11
+ entityDeclension: [string, string, string];
12
+ /**
13
+ * Обработчик закрытия панели
14
+ */
15
+ onClose: () => void;
16
+ /**
17
+ * Название класса, применяется к корневому компоненту
18
+ */
19
+ className?: string;
20
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from './useLogic';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = 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);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./useLogic"), exports);
@@ -0,0 +1,7 @@
1
+ import { type MassActionsProps } from '../types';
2
+ type UseLogicParams = Pick<MassActionsProps, 'entityDeclension' | 'selectedCount'>;
3
+ export declare const useLogic: ({ entityDeclension, selectedCount, }: UseLogicParams) => {
4
+ selectionLabel: string;
5
+ reservedLabel: string;
6
+ };
7
+ export {};
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useLogic = void 0;
4
+ const declensionOfWords_1 = require("@astral/utils/declension/declensionOfWords");
5
+ const constants_1 = require("../constants");
6
+ const useLogic = ({ entityDeclension, selectedCount, }) => {
7
+ const selectionLabel = `Выбрано: ${selectedCount} ${(0, declensionOfWords_1.declensionOfWords)(entityDeclension)(selectedCount)}`;
8
+ // Самая длинная форма слова — чтобы ширина панели не менялась при смене склонения
9
+ const longestEntity = entityDeclension.reduce((longest, entity) => entity.length > longest.length ? entity : longest);
10
+ const reservedLabel = `Выбрано: ${constants_1.RESERVED_SELECTED_COUNT} ${longestEntity}`;
11
+ return { selectionLabel, reservedLabel };
12
+ };
13
+ exports.useLogic = useLogic;
@@ -9,4 +9,4 @@ export declare const StyledMobileButton: import("@emotion/styled/dist/declaratio
9
9
  } & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, ""> & import("react").RefAttributes<HTMLButtonElement> & {
10
10
  theme?: import("@emotion/react").Theme | undefined;
11
11
  }, {}, {}>;
12
- export declare const StyledSecondaryActions: <TSecondaryActionComponent extends import("react").ElementType = import("react").ElementType>({ actions, isDisabled, className, size, }: import("../../../ActionGroup").SecondaryActionProps<TSecondaryActionComponent>) => import("react/jsx-runtime").JSX.Element | null;
12
+ export declare const StyledSecondaryActions: <TSecondaryActionComponent extends import("react").ElementType = import("react").ElementType>({ actions, isDisabled, className, size, popoverProps, }: import("../../../ActionGroup").SecondaryActionProps<TSecondaryActionComponent>) => import("react/jsx-runtime").JSX.Element | null;
@@ -1,3 +1,2 @@
1
- export * from './useDelayedUnmount';
2
1
  export * from './usePanelHeader';
3
2
  export * from './useRegisterClose';
@@ -14,6 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./useDelayedUnmount"), exports);
18
17
  __exportStar(require("./usePanelHeader"), exports);
19
18
  __exportStar(require("./useRegisterClose"), exports);
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useLogic = void 0;
4
4
  const react_1 = require("react");
5
5
  const hooks_1 = require("../../../../../theme/hooks");
6
+ const useDelayedUnmount_1 = require("../../../../../useDelayedUnmount");
6
7
  const MobileSlidePanelContext_1 = require("../../MobileSlidePanelContext");
7
8
  const hooks_2 = require("./hooks");
8
9
  /**
@@ -11,7 +12,7 @@ const hooks_2 = require("./hooks");
11
12
  const useLogic = ({ id, isOpen, onClose, activeHeader, parentLabel, parentNote, parentControl, parentAdditionalContent, isParentSelected, isParentDisabled, onParentClick, }) => {
12
13
  const { transitions: { duration: { standard: transitionDuration }, }, } = (0, hooks_1.useTheme)();
13
14
  const { register, closeTop, setHeader, removeHeader } = (0, react_1.useContext)(MobileSlidePanelContext_1.MobileSlidePanelContext) ?? {};
14
- const { isMounted: isMobileMounted } = (0, hooks_2.useDelayedUnmount)({
15
+ const { isMounted: isMobileMounted } = (0, useDelayedUnmount_1.useDelayedUnmount)({
15
16
  isOpen,
16
17
  duration: transitionDuration,
17
18
  });
@@ -131,7 +131,7 @@ export * from './MenuItem';
131
131
  export * from './MenuList';
132
132
  export { MinimalisticPagination, type MinimalisticPaginationProps, } from './MinimalisticPagination';
133
133
  export * from './NavMenu';
134
- export { type DataGridColumns, type DataGridRenderLink, type DataGridRenderLinkParams, type DataGridRow, type DataGridRowOptions, type DataGridSort, DataGrid, type DataGridProps, } from './DataGrid';
134
+ export { type DataGridColumns, type DataGridRenderLink, type DataGridRenderLinkParams, type DataGridRow, type DataGridRowDisabled, type DataGridRowOptions, type DataGridSort, DataGrid, type DataGridProps, } from './DataGrid';
135
135
  export { DataGridInfinite, type DataGridInfiniteProps, } from './DataGridInfinite';
136
136
  export { DataGridColumnHintIcon, type DataGridColumnHintIconProps, } from './DataGridColumnHintIcon';
137
137
  export { type DateItemProps, type DateRangePickerProps, type DateRangePickerValue, DateRangePicker, } from './DateRangePicker';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astral/ui",
3
- "version": "4.113.3",
3
+ "version": "4.115.0",
4
4
  "browser": "./index.js",
5
5
  "main": "./node/index.js",
6
6
  "dependencies": {