@astral/ui 4.13.1 → 4.14.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 (325) hide show
  1. package/components/CardGridInfinite/Card/Card.d.ts +3 -0
  2. package/components/CardGridInfinite/Card/Card.js +12 -0
  3. package/components/CardGridInfinite/Card/CardActionContext/CardActionContext.d.ts +10 -0
  4. package/components/CardGridInfinite/Card/CardActionContext/CardActionContext.js +8 -0
  5. package/components/CardGridInfinite/Card/CardActionContext/CardActionContextProvider/CardActionContextProvider.d.ts +9 -0
  6. package/components/CardGridInfinite/Card/CardActionContext/CardActionContextProvider/CardActionContextProvider.js +26 -0
  7. package/components/CardGridInfinite/Card/CardActionContext/CardActionContextProvider/index.d.ts +1 -0
  8. package/components/CardGridInfinite/Card/CardActionContext/CardActionContextProvider/index.js +1 -0
  9. package/components/CardGridInfinite/Card/CardActionContext/index.d.ts +2 -0
  10. package/components/CardGridInfinite/Card/CardActionContext/index.js +2 -0
  11. package/components/CardGridInfinite/Card/SecondaryActionButton/SecondaryActionButton.d.ts +7 -0
  12. package/components/CardGridInfinite/Card/SecondaryActionButton/SecondaryActionButton.js +21 -0
  13. package/components/CardGridInfinite/Card/SecondaryActionButton/index.d.ts +1 -0
  14. package/components/CardGridInfinite/Card/SecondaryActionButton/index.js +1 -0
  15. package/components/CardGridInfinite/Card/SecondaryActionButton/styles.d.ts +12 -0
  16. package/components/CardGridInfinite/Card/SecondaryActionButton/styles.js +5 -0
  17. package/components/CardGridInfinite/Card/index.d.ts +3 -0
  18. package/components/CardGridInfinite/Card/index.js +2 -0
  19. package/components/CardGridInfinite/Card/styles.d.ts +16 -0
  20. package/components/CardGridInfinite/Card/styles.js +22 -0
  21. package/components/CardGridInfinite/Card/types.d.ts +32 -0
  22. package/components/CardGridInfinite/Card/types.js +1 -0
  23. package/components/CardGridInfinite/Card/useLogic/index.d.ts +1 -0
  24. package/components/CardGridInfinite/Card/useLogic/index.js +1 -0
  25. package/components/CardGridInfinite/Card/useLogic/useLogic.d.ts +7 -0
  26. package/components/CardGridInfinite/Card/useLogic/useLogic.js +7 -0
  27. package/components/CardGridInfinite/CardGridInfinite.d.ts +3 -0
  28. package/components/CardGridInfinite/CardGridInfinite.js +21 -0
  29. package/components/CardGridInfinite/CardGridMainActions/Action/Action.d.ts +3 -0
  30. package/components/CardGridInfinite/CardGridMainActions/Action/Action.js +16 -0
  31. package/components/CardGridInfinite/CardGridMainActions/Action/index.d.ts +1 -0
  32. package/components/CardGridInfinite/CardGridMainActions/Action/index.js +1 -0
  33. package/components/CardGridInfinite/CardGridMainActions/Action/types.d.ts +13 -0
  34. package/components/CardGridInfinite/CardGridMainActions/Action/types.js +1 -0
  35. package/components/CardGridInfinite/CardGridMainActions/Action/useLogic/index.d.ts +1 -0
  36. package/components/CardGridInfinite/CardGridMainActions/Action/useLogic/index.js +1 -0
  37. package/components/CardGridInfinite/CardGridMainActions/Action/useLogic/useLogic.d.ts +11 -0
  38. package/components/CardGridInfinite/CardGridMainActions/Action/useLogic/useLogic.js +16 -0
  39. package/components/CardGridInfinite/CardGridMainActions/CardGridMainActions.d.ts +30 -0
  40. package/components/CardGridInfinite/CardGridMainActions/CardGridMainActions.js +29 -0
  41. package/components/CardGridInfinite/CardGridMainActions/index.d.ts +4 -0
  42. package/components/CardGridInfinite/CardGridMainActions/index.js +4 -0
  43. package/components/CardGridInfinite/CardGridMainActions/styles.d.ts +5 -0
  44. package/components/CardGridInfinite/CardGridMainActions/styles.js +9 -0
  45. package/components/CardGridInfinite/CardGridMainActions/types.d.ts +44 -0
  46. package/components/CardGridInfinite/CardGridMainActions/types.js +1 -0
  47. package/components/CardGridInfinite/CardGridMainActions/utils/index.d.ts +1 -0
  48. package/components/CardGridInfinite/CardGridMainActions/utils/index.js +1 -0
  49. package/components/CardGridInfinite/CardGridMainActions/utils/replaceActionComponent/index.d.ts +1 -0
  50. package/components/CardGridInfinite/CardGridMainActions/utils/replaceActionComponent/index.js +1 -0
  51. package/components/CardGridInfinite/CardGridMainActions/utils/replaceActionComponent/replaceActionComponent.d.ts +8 -0
  52. package/components/CardGridInfinite/CardGridMainActions/utils/replaceActionComponent/replaceActionComponent.js +11 -0
  53. package/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActions.d.ts +18 -0
  54. package/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActions.js +34 -0
  55. package/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/CardGridSecondaryActionsSkeleton.d.ts +2 -0
  56. package/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/CardGridSecondaryActionsSkeleton.js +4 -0
  57. package/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/index.d.ts +1 -0
  58. package/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/index.js +1 -0
  59. package/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/styles.d.ts +9 -0
  60. package/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/styles.js +31 -0
  61. package/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuContext.d.ts +12 -0
  62. package/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuContext.js +5 -0
  63. package/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuProvider/SecondaryActionsMenuProvider.d.ts +8 -0
  64. package/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuProvider/SecondaryActionsMenuProvider.js +5 -0
  65. package/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuProvider/index.d.ts +1 -0
  66. package/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuProvider/index.js +1 -0
  67. package/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/index.d.ts +2 -0
  68. package/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/index.js +2 -0
  69. package/components/CardGridInfinite/CardGridSecondaryAction/index.d.ts +4 -0
  70. package/components/CardGridInfinite/CardGridSecondaryAction/index.js +3 -0
  71. package/components/CardGridInfinite/CardGridSecondaryAction/types.d.ts +59 -0
  72. package/components/CardGridInfinite/CardGridSecondaryAction/types.js +1 -0
  73. package/components/CardGridInfinite/EndData/EndData.d.ts +6 -0
  74. package/components/CardGridInfinite/EndData/EndData.js +4 -0
  75. package/components/CardGridInfinite/EndData/constants.d.ts +1 -0
  76. package/components/CardGridInfinite/EndData/constants.js +1 -0
  77. package/components/CardGridInfinite/EndData/index.d.ts +1 -0
  78. package/components/CardGridInfinite/EndData/index.js +1 -0
  79. package/components/CardGridInfinite/ErrorMessage/ErrorMessage.d.ts +6 -0
  80. package/components/CardGridInfinite/ErrorMessage/ErrorMessage.js +6 -0
  81. package/components/CardGridInfinite/ErrorMessage/constants.d.ts +1 -0
  82. package/components/CardGridInfinite/ErrorMessage/constants.js +1 -0
  83. package/components/CardGridInfinite/ErrorMessage/index.d.ts +1 -0
  84. package/components/CardGridInfinite/ErrorMessage/index.js +1 -0
  85. package/components/CardGridInfinite/ErrorMessage/styles.d.ts +5 -0
  86. package/components/CardGridInfinite/ErrorMessage/styles.js +17 -0
  87. package/components/CardGridInfinite/Footer/Footer.d.ts +10 -0
  88. package/components/CardGridInfinite/Footer/Footer.js +12 -0
  89. package/components/CardGridInfinite/Footer/index.d.ts +1 -0
  90. package/components/CardGridInfinite/Footer/index.js +1 -0
  91. package/components/CardGridInfinite/Footer/styles.d.ts +9 -0
  92. package/components/CardGridInfinite/Footer/styles.js +16 -0
  93. package/components/CardGridInfinite/List/List.d.ts +8 -0
  94. package/components/CardGridInfinite/List/List.js +4 -0
  95. package/components/CardGridInfinite/List/index.d.ts +1 -0
  96. package/components/CardGridInfinite/List/index.js +1 -0
  97. package/components/CardGridInfinite/List/styles.d.ts +10 -0
  98. package/components/CardGridInfinite/List/styles.js +10 -0
  99. package/components/CardGridInfinite/NoDataPlaceholder/NoDataPlaceholder.d.ts +6 -0
  100. package/components/CardGridInfinite/NoDataPlaceholder/NoDataPlaceholder.js +10 -0
  101. package/components/CardGridInfinite/NoDataPlaceholder/constants.d.ts +1 -0
  102. package/components/CardGridInfinite/NoDataPlaceholder/constants.js +1 -0
  103. package/components/CardGridInfinite/NoDataPlaceholder/index.d.ts +1 -0
  104. package/components/CardGridInfinite/NoDataPlaceholder/index.js +1 -0
  105. package/components/CardGridInfinite/OnTopButton/OnTopButton.d.ts +8 -0
  106. package/components/CardGridInfinite/OnTopButton/OnTopButton.js +10 -0
  107. package/components/CardGridInfinite/OnTopButton/index.d.ts +1 -0
  108. package/components/CardGridInfinite/OnTopButton/index.js +1 -0
  109. package/components/CardGridInfinite/OnTopButton/styles.d.ts +3 -0
  110. package/components/CardGridInfinite/OnTopButton/styles.js +9 -0
  111. package/components/CardGridInfinite/SkeletonGrid/SkeletonGrid.d.ts +11 -0
  112. package/components/CardGridInfinite/SkeletonGrid/SkeletonGrid.js +5 -0
  113. package/components/CardGridInfinite/SkeletonGrid/index.d.ts +1 -0
  114. package/components/CardGridInfinite/SkeletonGrid/index.js +1 -0
  115. package/components/CardGridInfinite/SkeletonGrid/styles.d.ts +12 -0
  116. package/components/CardGridInfinite/SkeletonGrid/styles.js +5 -0
  117. package/components/CardGridInfinite/constants.d.ts +7 -0
  118. package/components/CardGridInfinite/constants.js +8 -0
  119. package/components/CardGridInfinite/hooks/index.d.ts +1 -0
  120. package/components/CardGridInfinite/hooks/index.js +1 -0
  121. package/components/CardGridInfinite/hooks/useBlockingActions/index.d.ts +1 -0
  122. package/components/CardGridInfinite/hooks/useBlockingActions/index.js +1 -0
  123. package/components/CardGridInfinite/hooks/useBlockingActions/useBlockingActions.d.ts +9 -0
  124. package/components/CardGridInfinite/hooks/useBlockingActions/useBlockingActions.js +23 -0
  125. package/components/CardGridInfinite/index.d.ts +8 -0
  126. package/components/CardGridInfinite/index.js +4 -0
  127. package/components/CardGridInfinite/styles.d.ts +13 -0
  128. package/components/CardGridInfinite/styles.js +26 -0
  129. package/components/CardGridInfinite/types.d.ts +98 -0
  130. package/components/CardGridInfinite/types.js +1 -0
  131. package/components/CardGridInfinite/useLogic/index.d.ts +1 -0
  132. package/components/CardGridInfinite/useLogic/index.js +1 -0
  133. package/components/CardGridInfinite/useLogic/useLogic.d.ts +41 -0
  134. package/components/CardGridInfinite/useLogic/useLogic.js +73 -0
  135. package/components/DashboardLayout/Sidebar/styles.d.ts +1 -4
  136. package/components/DatePicker/styles.d.ts +1 -4
  137. package/components/DateRangePicker/styles.d.ts +1 -4
  138. package/components/Description/styles.js +1 -1
  139. package/components/InfiniteTreeList/useLogic/useLogic.js +2 -2
  140. package/components/PageLayout/PageContent/styles.js +5 -2
  141. package/components/PageLayout/PageLayoutContainer/index.d.ts +1 -0
  142. package/components/PageLayout/PageLayoutContainer/index.js +1 -0
  143. package/components/PageLayout/PageLayoutContainer/styles.d.ts +1 -4
  144. package/components/Paper/Paper.d.ts +1 -1
  145. package/components/Paper/Paper.js +4 -3
  146. package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useScrollManagement/useScrollManagement.d.ts +2 -1
  147. package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useScrollManagement/useScrollManagement.js +13 -3
  148. package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useStickyButton/useStickyButton.js +2 -2
  149. package/components/hooks/index.d.ts +1 -0
  150. package/components/hooks/index.js +1 -0
  151. package/components/placeholders/LoadingPlaceholder/LoadingPlaceholder.js +4 -3
  152. package/components/placeholders/LoadingPlaceholder/constants.d.ts +3 -0
  153. package/components/placeholders/LoadingPlaceholder/constants.js +4 -0
  154. package/components/placeholders/LoadingPlaceholder/index.d.ts +1 -0
  155. package/components/placeholders/LoadingPlaceholder/index.js +1 -0
  156. package/node/components/CardGridInfinite/Card/Card.d.ts +3 -0
  157. package/node/components/CardGridInfinite/Card/Card.js +16 -0
  158. package/node/components/CardGridInfinite/Card/CardActionContext/CardActionContext.d.ts +10 -0
  159. package/node/components/CardGridInfinite/Card/CardActionContext/CardActionContext.js +11 -0
  160. package/node/components/CardGridInfinite/Card/CardActionContext/CardActionContextProvider/CardActionContextProvider.d.ts +9 -0
  161. package/node/components/CardGridInfinite/Card/CardActionContext/CardActionContextProvider/CardActionContextProvider.js +30 -0
  162. package/node/components/CardGridInfinite/Card/CardActionContext/CardActionContextProvider/index.d.ts +1 -0
  163. package/node/components/CardGridInfinite/Card/CardActionContext/CardActionContextProvider/index.js +17 -0
  164. package/node/components/CardGridInfinite/Card/CardActionContext/index.d.ts +2 -0
  165. package/node/components/CardGridInfinite/Card/CardActionContext/index.js +18 -0
  166. package/node/components/CardGridInfinite/Card/SecondaryActionButton/SecondaryActionButton.d.ts +7 -0
  167. package/node/components/CardGridInfinite/Card/SecondaryActionButton/SecondaryActionButton.js +25 -0
  168. package/node/components/CardGridInfinite/Card/SecondaryActionButton/index.d.ts +1 -0
  169. package/node/components/CardGridInfinite/Card/SecondaryActionButton/index.js +17 -0
  170. package/node/components/CardGridInfinite/Card/SecondaryActionButton/styles.d.ts +12 -0
  171. package/node/components/CardGridInfinite/Card/SecondaryActionButton/styles.js +8 -0
  172. package/node/components/CardGridInfinite/Card/index.d.ts +3 -0
  173. package/node/components/CardGridInfinite/Card/index.js +18 -0
  174. package/node/components/CardGridInfinite/Card/styles.d.ts +16 -0
  175. package/node/components/CardGridInfinite/Card/styles.js +25 -0
  176. package/node/components/CardGridInfinite/Card/types.d.ts +32 -0
  177. package/node/components/CardGridInfinite/Card/types.js +2 -0
  178. package/node/components/CardGridInfinite/Card/useLogic/index.d.ts +1 -0
  179. package/node/components/CardGridInfinite/Card/useLogic/index.js +17 -0
  180. package/node/components/CardGridInfinite/Card/useLogic/useLogic.d.ts +7 -0
  181. package/node/components/CardGridInfinite/Card/useLogic/useLogic.js +11 -0
  182. package/node/components/CardGridInfinite/CardGridInfinite.d.ts +3 -0
  183. package/node/components/CardGridInfinite/CardGridInfinite.js +25 -0
  184. package/node/components/CardGridInfinite/CardGridMainActions/Action/Action.d.ts +3 -0
  185. package/node/components/CardGridInfinite/CardGridMainActions/Action/Action.js +20 -0
  186. package/node/components/CardGridInfinite/CardGridMainActions/Action/index.d.ts +1 -0
  187. package/node/components/CardGridInfinite/CardGridMainActions/Action/index.js +17 -0
  188. package/node/components/CardGridInfinite/CardGridMainActions/Action/types.d.ts +13 -0
  189. package/node/components/CardGridInfinite/CardGridMainActions/Action/types.js +2 -0
  190. package/node/components/CardGridInfinite/CardGridMainActions/Action/useLogic/index.d.ts +1 -0
  191. package/node/components/CardGridInfinite/CardGridMainActions/Action/useLogic/index.js +17 -0
  192. package/node/components/CardGridInfinite/CardGridMainActions/Action/useLogic/useLogic.d.ts +11 -0
  193. package/node/components/CardGridInfinite/CardGridMainActions/Action/useLogic/useLogic.js +20 -0
  194. package/node/components/CardGridInfinite/CardGridMainActions/CardGridMainActions.d.ts +30 -0
  195. package/node/components/CardGridInfinite/CardGridMainActions/CardGridMainActions.js +33 -0
  196. package/node/components/CardGridInfinite/CardGridMainActions/index.d.ts +4 -0
  197. package/node/components/CardGridInfinite/CardGridMainActions/index.js +22 -0
  198. package/node/components/CardGridInfinite/CardGridMainActions/styles.d.ts +5 -0
  199. package/node/components/CardGridInfinite/CardGridMainActions/styles.js +12 -0
  200. package/node/components/CardGridInfinite/CardGridMainActions/types.d.ts +44 -0
  201. package/node/components/CardGridInfinite/CardGridMainActions/types.js +2 -0
  202. package/node/components/CardGridInfinite/CardGridMainActions/utils/index.d.ts +1 -0
  203. package/node/components/CardGridInfinite/CardGridMainActions/utils/index.js +17 -0
  204. package/node/components/CardGridInfinite/CardGridMainActions/utils/replaceActionComponent/index.d.ts +1 -0
  205. package/node/components/CardGridInfinite/CardGridMainActions/utils/replaceActionComponent/index.js +17 -0
  206. package/node/components/CardGridInfinite/CardGridMainActions/utils/replaceActionComponent/replaceActionComponent.d.ts +8 -0
  207. package/node/components/CardGridInfinite/CardGridMainActions/utils/replaceActionComponent/replaceActionComponent.js +15 -0
  208. package/node/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActions.d.ts +18 -0
  209. package/node/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActions.js +38 -0
  210. package/node/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/CardGridSecondaryActionsSkeleton.d.ts +2 -0
  211. package/node/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/CardGridSecondaryActionsSkeleton.js +8 -0
  212. package/node/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/index.d.ts +1 -0
  213. package/node/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/index.js +17 -0
  214. package/node/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/styles.d.ts +9 -0
  215. package/node/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/styles.js +34 -0
  216. package/node/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuContext.d.ts +12 -0
  217. package/node/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuContext.js +8 -0
  218. package/node/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuProvider/SecondaryActionsMenuProvider.d.ts +8 -0
  219. package/node/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuProvider/SecondaryActionsMenuProvider.js +9 -0
  220. package/node/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuProvider/index.d.ts +1 -0
  221. package/node/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuProvider/index.js +5 -0
  222. package/node/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/index.d.ts +2 -0
  223. package/node/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/index.js +18 -0
  224. package/node/components/CardGridInfinite/CardGridSecondaryAction/index.d.ts +4 -0
  225. package/node/components/CardGridInfinite/CardGridSecondaryAction/index.js +22 -0
  226. package/node/components/CardGridInfinite/CardGridSecondaryAction/types.d.ts +59 -0
  227. package/node/components/CardGridInfinite/CardGridSecondaryAction/types.js +2 -0
  228. package/node/components/CardGridInfinite/EndData/EndData.d.ts +6 -0
  229. package/node/components/CardGridInfinite/EndData/EndData.js +8 -0
  230. package/node/components/CardGridInfinite/EndData/constants.d.ts +1 -0
  231. package/node/components/CardGridInfinite/EndData/constants.js +4 -0
  232. package/node/components/CardGridInfinite/EndData/index.d.ts +1 -0
  233. package/node/components/CardGridInfinite/EndData/index.js +17 -0
  234. package/node/components/CardGridInfinite/ErrorMessage/ErrorMessage.d.ts +6 -0
  235. package/node/components/CardGridInfinite/ErrorMessage/ErrorMessage.js +10 -0
  236. package/node/components/CardGridInfinite/ErrorMessage/constants.d.ts +1 -0
  237. package/node/components/CardGridInfinite/ErrorMessage/constants.js +4 -0
  238. package/node/components/CardGridInfinite/ErrorMessage/index.d.ts +1 -0
  239. package/node/components/CardGridInfinite/ErrorMessage/index.js +17 -0
  240. package/node/components/CardGridInfinite/ErrorMessage/styles.d.ts +5 -0
  241. package/node/components/CardGridInfinite/ErrorMessage/styles.js +20 -0
  242. package/node/components/CardGridInfinite/Footer/Footer.d.ts +10 -0
  243. package/node/components/CardGridInfinite/Footer/Footer.js +16 -0
  244. package/node/components/CardGridInfinite/Footer/index.d.ts +1 -0
  245. package/node/components/CardGridInfinite/Footer/index.js +17 -0
  246. package/node/components/CardGridInfinite/Footer/styles.d.ts +9 -0
  247. package/node/components/CardGridInfinite/Footer/styles.js +19 -0
  248. package/node/components/CardGridInfinite/List/List.d.ts +8 -0
  249. package/node/components/CardGridInfinite/List/List.js +7 -0
  250. package/node/components/CardGridInfinite/List/index.d.ts +1 -0
  251. package/node/components/CardGridInfinite/List/index.js +17 -0
  252. package/node/components/CardGridInfinite/List/styles.d.ts +10 -0
  253. package/node/components/CardGridInfinite/List/styles.js +13 -0
  254. package/node/components/CardGridInfinite/NoDataPlaceholder/NoDataPlaceholder.d.ts +6 -0
  255. package/node/components/CardGridInfinite/NoDataPlaceholder/NoDataPlaceholder.js +14 -0
  256. package/node/components/CardGridInfinite/NoDataPlaceholder/constants.d.ts +1 -0
  257. package/node/components/CardGridInfinite/NoDataPlaceholder/constants.js +4 -0
  258. package/node/components/CardGridInfinite/NoDataPlaceholder/index.d.ts +1 -0
  259. package/node/components/CardGridInfinite/NoDataPlaceholder/index.js +17 -0
  260. package/node/components/CardGridInfinite/OnTopButton/OnTopButton.d.ts +8 -0
  261. package/node/components/CardGridInfinite/OnTopButton/OnTopButton.js +14 -0
  262. package/node/components/CardGridInfinite/OnTopButton/index.d.ts +1 -0
  263. package/node/components/CardGridInfinite/OnTopButton/index.js +17 -0
  264. package/node/components/CardGridInfinite/OnTopButton/styles.d.ts +3 -0
  265. package/node/components/CardGridInfinite/OnTopButton/styles.js +12 -0
  266. package/node/components/CardGridInfinite/SkeletonGrid/SkeletonGrid.d.ts +11 -0
  267. package/node/components/CardGridInfinite/SkeletonGrid/SkeletonGrid.js +9 -0
  268. package/node/components/CardGridInfinite/SkeletonGrid/index.d.ts +1 -0
  269. package/node/components/CardGridInfinite/SkeletonGrid/index.js +5 -0
  270. package/node/components/CardGridInfinite/SkeletonGrid/styles.d.ts +12 -0
  271. package/node/components/CardGridInfinite/SkeletonGrid/styles.js +8 -0
  272. package/node/components/CardGridInfinite/constants.d.ts +7 -0
  273. package/node/components/CardGridInfinite/constants.js +11 -0
  274. package/node/components/CardGridInfinite/hooks/index.d.ts +1 -0
  275. package/node/components/CardGridInfinite/hooks/index.js +17 -0
  276. package/node/components/CardGridInfinite/hooks/useBlockingActions/index.d.ts +1 -0
  277. package/node/components/CardGridInfinite/hooks/useBlockingActions/index.js +17 -0
  278. package/node/components/CardGridInfinite/hooks/useBlockingActions/useBlockingActions.d.ts +9 -0
  279. package/node/components/CardGridInfinite/hooks/useBlockingActions/useBlockingActions.js +27 -0
  280. package/node/components/CardGridInfinite/index.d.ts +8 -0
  281. package/node/components/CardGridInfinite/index.js +13 -0
  282. package/node/components/CardGridInfinite/styles.d.ts +13 -0
  283. package/node/components/CardGridInfinite/styles.js +29 -0
  284. package/node/components/CardGridInfinite/types.d.ts +98 -0
  285. package/node/components/CardGridInfinite/types.js +2 -0
  286. package/node/components/CardGridInfinite/useLogic/index.d.ts +1 -0
  287. package/node/components/CardGridInfinite/useLogic/index.js +17 -0
  288. package/node/components/CardGridInfinite/useLogic/useLogic.d.ts +41 -0
  289. package/node/components/CardGridInfinite/useLogic/useLogic.js +77 -0
  290. package/node/components/DashboardLayout/Sidebar/styles.d.ts +1 -4
  291. package/node/components/DatePicker/styles.d.ts +1 -4
  292. package/node/components/DateRangePicker/styles.d.ts +1 -4
  293. package/node/components/Description/styles.js +1 -1
  294. package/node/components/InfiniteTreeList/useLogic/useLogic.js +3 -3
  295. package/node/components/PageLayout/PageContent/styles.js +5 -2
  296. package/node/components/PageLayout/PageLayoutContainer/index.d.ts +1 -0
  297. package/node/components/PageLayout/PageLayoutContainer/index.js +3 -0
  298. package/node/components/PageLayout/PageLayoutContainer/styles.d.ts +1 -4
  299. package/node/components/Paper/Paper.d.ts +1 -1
  300. package/node/components/Paper/Paper.js +4 -4
  301. package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useScrollManagement/useScrollManagement.d.ts +2 -1
  302. package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useScrollManagement/useScrollManagement.js +13 -3
  303. package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useStickyButton/useStickyButton.js +3 -3
  304. package/node/components/hooks/index.d.ts +1 -0
  305. package/node/components/hooks/index.js +4 -1
  306. package/node/components/placeholders/LoadingPlaceholder/LoadingPlaceholder.js +4 -3
  307. package/node/components/placeholders/LoadingPlaceholder/constants.d.ts +3 -0
  308. package/node/components/placeholders/LoadingPlaceholder/constants.js +7 -0
  309. package/node/components/placeholders/LoadingPlaceholder/index.d.ts +1 -0
  310. package/node/components/placeholders/LoadingPlaceholder/index.js +3 -0
  311. package/package.json +8 -1
  312. /package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/index.d.ts +0 -0
  313. /package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/index.js +0 -0
  314. /package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useScrollManagement/index.d.ts +0 -0
  315. /package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useScrollManagement/index.js +0 -0
  316. /package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useStickyButton/index.d.ts +0 -0
  317. /package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useStickyButton/index.js +0 -0
  318. /package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useStickyButton/useStickyButton.d.ts +0 -0
  319. /package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/index.d.ts +0 -0
  320. /package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/index.js +0 -0
  321. /package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useScrollManagement/index.d.ts +0 -0
  322. /package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useScrollManagement/index.js +0 -0
  323. /package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useStickyButton/index.d.ts +0 -0
  324. /package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useStickyButton/index.js +0 -0
  325. /package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useStickyButton/useStickyButton.d.ts +0 -0
@@ -0,0 +1,98 @@
1
+ import type { ReactNode, RefObject } from 'react';
2
+ import type { CardProps } from './Card';
3
+ export type SkeletonConfig = {
4
+ /**
5
+ * Скелетон, отображающийся внутри карточки
6
+ */
7
+ component: ReactNode;
8
+ /**
9
+ * Число отображаемых элементов в состоянии загрузки
10
+ */
11
+ count: number;
12
+ };
13
+ export type CardGridInfiniteProps<TDataItem extends Record<string, unknown>> = {
14
+ /**
15
+ * Отображается skeleton
16
+ */
17
+ isLoading?: boolean;
18
+ isError?: boolean;
19
+ errorMsg?: string;
20
+ /**
21
+ * Функция обработки нажатия на кнопку "Повторить снова"
22
+ */
23
+ onRetry: () => void;
24
+ /**
25
+ * Конфигурация состояния загрузки компонента
26
+ */
27
+ skeleton: SkeletonConfig;
28
+ /**
29
+ * Изображение отображающееся при отсутствии данных
30
+ */
31
+ noDataImgSrc?: string;
32
+ /**
33
+ * Список элементов для отображения
34
+ */
35
+ list?: TDataItem[];
36
+ /**
37
+ * Конфигурация отображения элементов
38
+ *
39
+ * @example
40
+ * defineCard={({ organization, content }) => {
41
+ return {
42
+ header: <CardHeader organization={organization} />
43
+ content: <DescriptionList leader items={content} />,
44
+ mainActions: () => <MainActions />,
45
+ secondaryActions: () => <SecondaryActions />,
46
+ };
47
+ }}
48
+ */
49
+ defineCard: (itemData: TDataItem) => Omit<CardProps<TDataItem>, 'item'>;
50
+ /**
51
+ * Определяет минимальную и максимальную ширину карточек в адаптивной сетке.
52
+ * Применяется через CSS Grid.
53
+ * Колонки автоматически перестраиваются при изменении ширины контейнера.
54
+ *
55
+ * @example
56
+ * desktopCardWidth={{
57
+ * min: '350px',
58
+ * max: '1fr',
59
+ * }}
60
+ */
61
+ desktopCardWidth: {
62
+ min: string;
63
+ max: string;
64
+ };
65
+ /**
66
+ * Вызывается, когда пользователь достигает конца списка и требуется загрузить дополнительные данные
67
+ */
68
+ onLoadMore: () => void;
69
+ /**
70
+ * Флаг достижения конца списка
71
+ */
72
+ isEndReached?: boolean;
73
+ /**
74
+ * Сообщение, отображаемое при достижении конца списка
75
+ *
76
+ * @default Вы достигли конца списка
77
+ */
78
+ endOfScrollMsg?: string;
79
+ /**
80
+ * Изображение при ошибке
81
+ *
82
+ * @default Берется из контекста ConfigContext (defaultErrorImgSrc)
83
+ */
84
+ errorImgSrc?: string;
85
+ /**
86
+ * Реф на контейнер, в котором должен быть скролл
87
+ *
88
+ * Используется тот же реф, что передается в компонент PageContent
89
+ *
90
+ * @example
91
+ * const scrollRef = useRef(null);
92
+ *
93
+ * <PageContent scrollRef={scrollRef}>
94
+ * <CardGridInfinite scrollRef={scrollRef} ... />
95
+ * </PageContent>
96
+ */
97
+ scrollRef: RefObject<HTMLElement>;
98
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './useLogic';
@@ -0,0 +1 @@
1
+ export * from './useLogic';
@@ -0,0 +1,41 @@
1
+ /// <reference types="react" />
2
+ import { type ListRange } from 'react-virtuoso';
3
+ import { type ContentStateProps } from '../../ContentState';
4
+ import type { CardGridInfiniteProps } from '../types';
5
+ type UseLogicParams<TDataItem extends Record<string, unknown>> = CardGridInfiniteProps<TDataItem>;
6
+ export declare const useLogic: <TDataItem extends Record<string, unknown>>({ list, isLoading, isError, errorMsg, errorImgSrc, scrollRef, skeleton, onRetry, endOfScrollMsg, isEndReached, onLoadMore, noDataImgSrc, defineCard, desktopCardWidth, }: UseLogicParams<TDataItem>) => {
7
+ contentStateProps: Omit<ContentStateProps, "children">;
8
+ desktopCardWidth: {
9
+ min: string;
10
+ max: string;
11
+ };
12
+ virtuosoProps: {
13
+ id: string;
14
+ style: {
15
+ height: string;
16
+ };
17
+ ref: import("react").RefObject<import("react-virtuoso").VirtuosoHandle>;
18
+ overscan: number;
19
+ rangeChanged: (range: ListRange) => void;
20
+ endReached: () => void;
21
+ };
22
+ footerProps: {
23
+ isError: boolean | undefined;
24
+ isEndReached: boolean | undefined;
25
+ onRetry: () => void;
26
+ endOfScrollMsg: string | undefined;
27
+ isLoading: boolean | undefined;
28
+ };
29
+ onTopButtonProps: {
30
+ isActive: boolean;
31
+ handleScrollToTop: () => void;
32
+ scrollRef: import("react").RefObject<HTMLElement>;
33
+ };
34
+ scrollParent: HTMLElement | null;
35
+ skeleton: import("../types").SkeletonConfig;
36
+ list: TDataItem[] | undefined;
37
+ noDataImgSrc: string | undefined;
38
+ defineCard: (itemData: TDataItem) => Omit<import("..").CardProps<TDataItem>, "item">;
39
+ classnames: string;
40
+ };
41
+ export {};
@@ -0,0 +1,73 @@
1
+ import { useContext, useEffect, useMemo } from 'react';
2
+ import { ConfigContext } from '../../ConfigProvider';
3
+ import { useScrollManagement, useStickyButton, useViewportType, } from '../../hooks';
4
+ import { classNames } from '../../utils';
5
+ import { cardGridClassnames, OVERSCAN, VIRTUOSO_CONTAINER_ID, } from '../constants';
6
+ export const useLogic = ({ list, isLoading, isError, errorMsg, errorImgSrc, scrollRef, skeleton, onRetry, endOfScrollMsg, isEndReached, onLoadMore, noDataImgSrc, defineCard, desktopCardWidth, }) => {
7
+ const { imagesMap } = useContext(ConfigContext);
8
+ const { isMobile } = useViewportType();
9
+ useEffect(() => {
10
+ if (isMobile && scrollRef?.current) {
11
+ scrollRef.current.style.backgroundColor = 'unset';
12
+ scrollRef.current.style.padding = 'unset';
13
+ }
14
+ }, [isMobile]);
15
+ const contentStateProps = useMemo(() => {
16
+ const isNoData = !list?.length;
17
+ return {
18
+ isLoading: isNoData && isLoading,
19
+ isError: isNoData && isError,
20
+ loadingTitle: 'Загрузка данных',
21
+ errorState: {
22
+ imgAlt: 'Что-то пошло не так',
23
+ errorList: [errorMsg || ''],
24
+ imgSrc: errorImgSrc || imagesMap.defaultErrorImgSrc,
25
+ onRetry,
26
+ },
27
+ };
28
+ }, [list, isLoading, isError, errorMsg, errorImgSrc, imagesMap]);
29
+ const { scrollParent, recalculateVerticalScroll, handleEndReach, isEndReachedWithScroll, } = useScrollManagement({
30
+ scrollRef,
31
+ isEndReached,
32
+ onLoadMore,
33
+ virtuosoId: VIRTUOSO_CONTAINER_ID,
34
+ });
35
+ const { virtuoso, isStickyButtonActive, handleRangeChanged: propsHandleRangeChanged, handleScrollToTop, } = useStickyButton(scrollRef);
36
+ const handleRangeChanged = (range) => {
37
+ recalculateVerticalScroll();
38
+ propsHandleRangeChanged(range);
39
+ };
40
+ const classnames = useMemo(() => classNames(cardGridClassnames.root, {
41
+ [cardGridClassnames.loading]: isLoading,
42
+ }), [isLoading]);
43
+ return {
44
+ contentStateProps,
45
+ desktopCardWidth,
46
+ virtuosoProps: {
47
+ id: VIRTUOSO_CONTAINER_ID,
48
+ style: { height: '100%' },
49
+ ref: virtuoso,
50
+ overscan: OVERSCAN,
51
+ rangeChanged: handleRangeChanged,
52
+ endReached: handleEndReach,
53
+ },
54
+ footerProps: {
55
+ isError,
56
+ isEndReached: isEndReachedWithScroll,
57
+ onRetry,
58
+ endOfScrollMsg,
59
+ isLoading,
60
+ },
61
+ onTopButtonProps: {
62
+ isActive: isStickyButtonActive,
63
+ handleScrollToTop,
64
+ scrollRef,
65
+ },
66
+ scrollParent,
67
+ skeleton,
68
+ list,
69
+ noDataImgSrc,
70
+ defineCard,
71
+ classnames,
72
+ };
73
+ };
@@ -6,10 +6,7 @@ export declare const Wrapper: import("@emotion/styled").StyledComponent<{
6
6
  $isPinned: boolean;
7
7
  $alertHeight: number;
8
8
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
9
- export declare const StyledPaper: import("@emotion/styled").StyledComponent<Omit<import("../..").WithoutEmotionSpecific<import("@mui/material").PaperProps>, "elevation"> & {
10
- elevation?: 0 | 1 | 2 | undefined;
11
- shape?: "small" | "medium" | "large" | undefined;
12
- } & {
9
+ export declare const StyledPaper: import("@emotion/styled").StyledComponent<Omit<import("../../Paper").PaperProps, "ref"> & import("react").RefAttributes<HTMLDivElement> & {
13
10
  theme?: import("@emotion/react").Theme | undefined;
14
11
  }, {}, {}>;
15
12
  export declare const SidebarRoot: import("@emotion/styled").StyledComponent<{
@@ -14,9 +14,6 @@ export declare const ButtonWrapper: import("@emotion/styled").StyledComponent<{
14
14
  theme?: import("@emotion/react").Theme | undefined;
15
15
  as?: import("react").ElementType<any> | undefined;
16
16
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
17
- export declare const StyledPaper: import("@emotion/styled").StyledComponent<Omit<import("..").WithoutEmotionSpecific<import("@mui/material").PaperProps>, "elevation"> & {
18
- elevation?: 0 | 1 | 2 | undefined;
19
- shape?: "small" | "medium" | "large" | undefined;
20
- } & {
17
+ export declare const StyledPaper: import("@emotion/styled").StyledComponent<Omit<import("../Paper").PaperProps, "ref"> & import("react").RefAttributes<HTMLDivElement> & {
21
18
  theme?: import("@emotion/react").Theme | undefined;
22
19
  }, {}, {}>;
@@ -5,10 +5,7 @@ export declare const StyledDatePickerInput: import("@emotion/styled").StyledComp
5
5
  }, "ref"> & import("react").RefAttributes<HTMLInputElement> & {
6
6
  theme?: import("@emotion/react").Theme | undefined;
7
7
  }, {}, {}>;
8
- export declare const StyledPaper: import("@emotion/styled").StyledComponent<Omit<import("..").WithoutEmotionSpecific<import("@mui/material").PaperProps>, "elevation"> & {
9
- elevation?: 0 | 1 | 2 | undefined;
10
- shape?: "small" | "medium" | "large" | undefined;
11
- } & {
8
+ export declare const StyledPaper: import("@emotion/styled").StyledComponent<Omit<import("../Paper").PaperProps, "ref"> & import("react").RefAttributes<HTMLDivElement> & {
12
9
  theme?: import("@emotion/react").Theme | undefined;
13
10
  }, {}, {}>;
14
11
  export declare const PickerSplitter: import("@emotion/styled").StyledComponent<{
@@ -13,7 +13,7 @@ export const Wrapper = styled('div', {
13
13
  flex-direction: ${({ $direction }) => $direction === 'default' ? 'column' : $direction};
14
14
 
15
15
  .MuiTypography-root {
16
- font-size: ${({ theme }) => theme.typography.fontSize};
16
+ font-size: ${({ theme }) => theme.typography.fontSize}px;
17
17
  }
18
18
  }
19
19
  `;
@@ -1,9 +1,8 @@
1
1
  import { useContext, useEffect, useMemo, useRef } from 'react';
2
2
  import { ConfigContext } from '../../ConfigProvider';
3
- import { useSet } from '../../hooks';
3
+ import { useScrollManagement, useSet, useStickyButton } from '../../hooks';
4
4
  import { useTheme } from '../../theme';
5
5
  import { infiniteTreeListClassnames, VIRTUOSO_CONTAINER_ID, } from '../constants';
6
- import { useScrollManagement, useStickyButton } from './hooks';
7
6
  import { flattenTree, getDescendants, getInitialExpandedIds, sortCollapsed, } from './utils';
8
7
  export const useLogic = ({ initialExpandedLevel, items, onRetry, errorMsg, isError, isLoading, scrollRef, isEndReached, onLoadMore, renderItem, itemSkeleton, endOfScrollMsg, noDataImgSrc, errorImgSrc, }) => {
9
8
  const { imagesMap } = useContext(ConfigContext);
@@ -61,6 +60,7 @@ export const useLogic = ({ initialExpandedLevel, items, onRetry, errorMsg, isErr
61
60
  scrollRef,
62
61
  isEndReached,
63
62
  onLoadMore,
63
+ virtuosoId: VIRTUOSO_CONTAINER_ID,
64
64
  });
65
65
  const { virtuoso, isStickyButtonActive, handleRangeChanged, handleScrollToTop, } = useStickyButton(scrollRef);
66
66
  return {
@@ -24,9 +24,7 @@ export const Wrapper = styled('article', {
24
24
  order: 4;
25
25
 
26
26
  height: ${({ $isFullHeight }) => ($isFullHeight ? 'auto' : '100%')};
27
- margin: ${({ theme }) => theme.spacing(0, 4, 4)};
28
27
 
29
- background-color: ${({ theme }) => theme.palette.background.default};
30
28
  border-top: none;
31
29
  border-radius: ${({ theme }) => theme.shape.medium};
32
30
  }
@@ -63,9 +61,14 @@ export const Content = styled.div `
63
61
  padding: ${({ theme, $hasAside }) => getPaddingContent(theme, $hasAside)};
64
62
 
65
63
  ${({ theme }) => theme.breakpoints.down('sm')} {
64
+ scrollbar-gutter: unset;
65
+
66
66
  overflow: hidden;
67
67
 
68
+ margin: ${({ theme }) => theme.spacing(0, 4, 4)};
68
69
  padding: ${({ theme }) => theme.spacing(4, 4, 3)};
70
+
71
+ background-color: ${({ theme }) => theme.palette.background.default};
69
72
  }
70
73
 
71
74
  &:has(.${pdfViewerClassnames.document}.${pdfViewerClassnames.zoom}) {
@@ -1 +1,2 @@
1
1
  export * from './PageLayoutContainer';
2
+ export { pageLayoutClassnames } from './constants';
@@ -1 +1,2 @@
1
1
  export * from './PageLayoutContainer';
2
+ export { pageLayoutClassnames } from './constants';
@@ -3,9 +3,6 @@ export declare const Wrapper: 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<HTMLDivElement>, HTMLDivElement>, {}>;
6
- export declare const StylePaper: import("@emotion/styled").StyledComponent<Omit<import("../..").WithoutEmotionSpecific<import("@mui/material").PaperProps>, "elevation"> & {
7
- elevation?: 0 | 1 | 2 | undefined;
8
- shape?: "small" | "medium" | "large" | undefined;
9
- } & {
6
+ export declare const StylePaper: import("@emotion/styled").StyledComponent<Omit<import("../../Paper").PaperProps, "ref"> & import("react").RefAttributes<HTMLDivElement> & {
10
7
  theme?: import("@emotion/react").Theme | undefined;
11
8
  }, {}, {}>;
@@ -16,4 +16,4 @@ export type PaperProps = Omit<WithoutEmotionSpecific<MuiPaperProps>, 'elevation'
16
16
  */
17
17
  shape?: 'small' | 'medium' | 'large';
18
18
  };
19
- export declare const Paper: ({ shape, ...restProps }: PaperProps) => JSX.Element;
19
+ export declare const Paper: import("react").ForwardRefExoticComponent<Omit<PaperProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
2
3
  import { StyledPaper } from './styles';
3
- export const Paper = ({ shape = 'medium', ...restProps }) => {
4
- return _jsx(StyledPaper, { "$shape": shape, ...restProps });
5
- };
4
+ export const Paper = forwardRef(({ shape = 'medium', ...restProps }, ref) => {
5
+ return _jsx(StyledPaper, { ref: ref, "$shape": shape, ...restProps });
6
+ });
@@ -3,11 +3,12 @@ type UseScrollManagementParams = {
3
3
  scrollRef: RefObject<HTMLElement>;
4
4
  isEndReached?: boolean;
5
5
  onLoadMore?: () => void;
6
+ virtuosoId: string;
6
7
  };
7
8
  /**
8
9
  * Отслеживание скролла для динамического отображения футера
9
10
  */
10
- export declare const useScrollManagement: ({ scrollRef, isEndReached, onLoadMore, }: UseScrollManagementParams) => {
11
+ export declare const useScrollManagement: ({ scrollRef, isEndReached, onLoadMore, virtuosoId, }: UseScrollManagementParams) => {
11
12
  scrollParent: HTMLElement | null;
12
13
  hasVerticalScroll: boolean;
13
14
  recalculateVerticalScroll: () => void;
@@ -1,12 +1,22 @@
1
1
  import { useEffect, useState } from 'react';
2
- import { VIRTUOSO_CONTAINER_ID } from '../../../constants';
2
+ import { pageLayoutClassnames } from '../../../PageLayout/PageLayoutContainer';
3
+ import { useViewportType } from '../../useViewportType';
3
4
  /**
4
5
  * Отслеживание скролла для динамического отображения футера
5
6
  */
6
- export const useScrollManagement = ({ scrollRef, isEndReached, onLoadMore, }) => {
7
+ export const useScrollManagement = ({ scrollRef, isEndReached, onLoadMore, virtuosoId, }) => {
7
8
  const [scrollParent, setScrollParent] = useState(null);
8
9
  const [hasVerticalScroll, setHasVerticalScroll] = useState(false);
10
+ const { isMobile } = useViewportType();
9
11
  useEffect(() => {
12
+ if (isMobile) {
13
+ // На мобильных устройствах scroll находится на контейнере pageLayout
14
+ const rootScrollElement = document.querySelector(`.${pageLayoutClassnames.root}`);
15
+ if (rootScrollElement instanceof HTMLElement) {
16
+ setScrollParent(rootScrollElement);
17
+ return;
18
+ }
19
+ }
10
20
  if (scrollRef?.current) {
11
21
  setScrollParent(scrollRef.current);
12
22
  }
@@ -15,7 +25,7 @@ export const useScrollManagement = ({ scrollRef, isEndReached, onLoadMore, }) =>
15
25
  }
16
26
  }, [scrollRef]);
17
27
  const recalculateVerticalScroll = () => {
18
- const list = document.getElementById(VIRTUOSO_CONTAINER_ID);
28
+ const list = document.getElementById(virtuosoId);
19
29
  if (scrollRef?.current && list) {
20
30
  setHasVerticalScroll(list?.clientHeight > scrollRef.current?.clientHeight);
21
31
  }
@@ -1,5 +1,5 @@
1
1
  import { useCallback, useRef } from 'react';
2
- import { useToggle } from '../../../../hooks';
2
+ import { useToggle } from '../../useToggle';
3
3
  /**
4
4
  * Управление кнопкой "наверх"
5
5
  */
@@ -14,7 +14,7 @@ export const useStickyButton = (scrollRef) => {
14
14
  }, [showStickyButton, hideStickyButton]);
15
15
  const handleScrollToTop = () => {
16
16
  scrollRef.current.style.scrollBehavior = 'auto';
17
- virtuoso.current?.scrollIntoView({ index: 0, behavior: 'auto' });
17
+ virtuoso.current?.scrollToIndex(0);
18
18
  };
19
19
  return {
20
20
  virtuoso,
@@ -17,3 +17,4 @@ export { useCheckControlled } from './useCheckControlled';
17
17
  export * from './usePopoverAnimation';
18
18
  export { useAsyncOptions } from './useAsyncOptions';
19
19
  export { useLoadingState } from './useLoadingState';
20
+ export { useScrollManagement, useStickyButton } from './Infinite';
@@ -17,3 +17,4 @@ export { useCheckControlled } from './useCheckControlled';
17
17
  export * from './usePopoverAnimation';
18
18
  export { useAsyncOptions } from './useAsyncOptions';
19
19
  export { useLoadingState } from './useLoadingState';
20
+ export { useScrollManagement, useStickyButton } from './Infinite';
@@ -1,16 +1,17 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Loader } from '../../Loader';
3
3
  import { Typography } from '../../Typography';
4
+ import { loadingPlaceholderClassnames } from './constants';
4
5
  import { LoadingContainer } from './styles';
5
6
  /**
6
7
  * Дефолтный лоадер загрузки
7
8
  */
8
9
  export const LoadingPlaceholder = ({ title, content, isShowLoader = true, }) => {
9
10
  if (!isShowLoader) {
10
- return _jsx(LoadingContainer, {});
11
+ return _jsx(LoadingContainer, { className: loadingPlaceholderClassnames.root });
11
12
  }
12
13
  if (content) {
13
- return _jsx(LoadingContainer, { children: content });
14
+ return (_jsx(LoadingContainer, { className: loadingPlaceholderClassnames.root, children: content }));
14
15
  }
15
- return (_jsxs(LoadingContainer, { children: [_jsx(Loader, {}), title && _jsx(Typography, { variant: "h4", children: title })] }));
16
+ return (_jsxs(LoadingContainer, { className: loadingPlaceholderClassnames.root, children: [_jsx(Loader, {}), title && _jsx(Typography, { variant: "h4", children: title })] }));
16
17
  };
@@ -0,0 +1,3 @@
1
+ export declare const loadingPlaceholderClassnames: {
2
+ root: string;
3
+ };
@@ -0,0 +1,4 @@
1
+ import { createUIKitClassname } from '../../utils';
2
+ export const loadingPlaceholderClassnames = {
3
+ root: createUIKitClassname('loading-placeholder'),
4
+ };
@@ -1 +1,2 @@
1
1
  export * from './LoadingPlaceholder';
2
+ export { loadingPlaceholderClassnames } from './constants';
@@ -1 +1,2 @@
1
1
  export * from './LoadingPlaceholder';
2
+ export { loadingPlaceholderClassnames } from './constants';
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import type { CardProps } from './types';
3
+ export declare const Card: <TItem>(props: CardProps<TItem>) => JSX.Element;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Card = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const Paper_1 = require("../../Paper");
6
+ const Tooltip_1 = require("../../Tooltip");
7
+ const CardActionContext_1 = require("./CardActionContext");
8
+ const SecondaryActionButton_1 = require("./SecondaryActionButton");
9
+ const styles_1 = require("./styles");
10
+ const useLogic_1 = require("./useLogic");
11
+ const Card = (props) => {
12
+ const { handleActionClick } = (0, useLogic_1.useLogic)(props);
13
+ const { isDisabled, mainActions: MainActions, content, header, disabledReason, secondaryActions, } = props;
14
+ return ((0, jsx_runtime_1.jsx)(CardActionContext_1.CardActionContextProvider, { onActionClick: handleActionClick, isDisabledCard: isDisabled, children: (0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { title: isDisabled && disabledReason, withoutContainer: !isDisabled, placement: "top", componentsProps: { popper: { disablePortal: true } }, children: (0, jsx_runtime_1.jsx)(Paper_1.Paper, { variant: "outlined", inert: isDisabled ? '' : undefined, children: (0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { children: [header && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(styles_1.CardHeader, { children: [(0, jsx_runtime_1.jsx)(styles_1.HeaderWrapper, { children: header }), secondaryActions && ((0, jsx_runtime_1.jsx)(SecondaryActionButton_1.SecondaryActionButton, { renderActions: secondaryActions }))] }), (0, jsx_runtime_1.jsx)(styles_1.StyledDivider, {})] })), content, MainActions && (0, jsx_runtime_1.jsx)(MainActions, {})] }) }) }) }));
15
+ };
16
+ exports.Card = Card;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import type { CardGridActionHandler } from '../../CardGridMainActions/types';
3
+ export type CardActionContextProps<TAction> = {
4
+ isDisabledCard?: boolean;
5
+ isDisabled: boolean;
6
+ onActionClick: CardGridActionHandler<TAction>;
7
+ setDisabledActions: () => void;
8
+ removeDisabledActions: () => void;
9
+ };
10
+ export declare const CardActionContext: import("react").Context<CardActionContextProps<unknown>>;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CardActionContext = void 0;
4
+ const react_1 = require("react");
5
+ exports.CardActionContext = (0, react_1.createContext)({
6
+ isDisabledCard: false,
7
+ isDisabled: false,
8
+ onActionClick: () => undefined,
9
+ setDisabledActions: () => undefined,
10
+ removeDisabledActions: () => undefined,
11
+ });
@@ -0,0 +1,9 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { CardGridActionHandler } from '../../../CardGridMainActions';
3
+ type CardActionContextProviderProps<TAction> = {
4
+ children: ReactNode;
5
+ onActionClick: CardGridActionHandler<TAction>;
6
+ isDisabledCard?: boolean;
7
+ };
8
+ export declare const CardActionContextProvider: <TAction>({ children, isDisabledCard, onActionClick, }: CardActionContextProviderProps<TAction>) => JSX.Element;
9
+ export {};
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CardActionContextProvider = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const CardActionContext_1 = require("../CardActionContext");
7
+ const CardActionContextProvider = ({ children, isDisabledCard, onActionClick, }) => {
8
+ const [isDisabled, setDisabled] = (0, react_1.useState)(false);
9
+ const setDisabledActions = (0, react_1.useCallback)(() => {
10
+ setDisabled(true);
11
+ }, []);
12
+ const removeDisabledActions = (0, react_1.useCallback)(() => {
13
+ setDisabled(false);
14
+ }, []);
15
+ const contextValue = (0, react_1.useMemo)(() => ({
16
+ isDisabled,
17
+ isDisabledCard,
18
+ setDisabledActions,
19
+ removeDisabledActions,
20
+ onActionClick,
21
+ }), [
22
+ isDisabled,
23
+ setDisabledActions,
24
+ removeDisabledActions,
25
+ onActionClick,
26
+ isDisabledCard,
27
+ ]);
28
+ return ((0, jsx_runtime_1.jsx)(CardActionContext_1.CardActionContext.Provider, { value: contextValue, children: children }));
29
+ };
30
+ exports.CardActionContextProvider = CardActionContextProvider;
@@ -0,0 +1 @@
1
+ export * from './CardActionContextProvider';
@@ -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("./CardActionContextProvider"), exports);
@@ -0,0 +1,2 @@
1
+ export * from './CardActionContext';
2
+ export * from './CardActionContextProvider';
@@ -0,0 +1,18 @@
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("./CardActionContext"), exports);
18
+ __exportStar(require("./CardActionContextProvider"), exports);
@@ -0,0 +1,7 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type CardGridSecondaryActionsProps } from '../../CardGridSecondaryAction';
3
+ type SecondaryActionButtonProps<TAction> = {
4
+ renderActions: (props: Omit<CardGridSecondaryActionsProps<TAction>, 'mobileTitle'>) => ReactNode;
5
+ };
6
+ export declare const SecondaryActionButton: <TAction>({ renderActions, }: SecondaryActionButtonProps<TAction>) => JSX.Element;
7
+ export {};