@astral/ui 4.13.0 → 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 (327) 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/Tag/styles.js +2 -0
  147. package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useScrollManagement/useScrollManagement.d.ts +2 -1
  148. package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useScrollManagement/useScrollManagement.js +13 -3
  149. package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useStickyButton/useStickyButton.js +2 -2
  150. package/components/hooks/index.d.ts +1 -0
  151. package/components/hooks/index.js +1 -0
  152. package/components/placeholders/LoadingPlaceholder/LoadingPlaceholder.js +4 -3
  153. package/components/placeholders/LoadingPlaceholder/constants.d.ts +3 -0
  154. package/components/placeholders/LoadingPlaceholder/constants.js +4 -0
  155. package/components/placeholders/LoadingPlaceholder/index.d.ts +1 -0
  156. package/components/placeholders/LoadingPlaceholder/index.js +1 -0
  157. package/node/components/CardGridInfinite/Card/Card.d.ts +3 -0
  158. package/node/components/CardGridInfinite/Card/Card.js +16 -0
  159. package/node/components/CardGridInfinite/Card/CardActionContext/CardActionContext.d.ts +10 -0
  160. package/node/components/CardGridInfinite/Card/CardActionContext/CardActionContext.js +11 -0
  161. package/node/components/CardGridInfinite/Card/CardActionContext/CardActionContextProvider/CardActionContextProvider.d.ts +9 -0
  162. package/node/components/CardGridInfinite/Card/CardActionContext/CardActionContextProvider/CardActionContextProvider.js +30 -0
  163. package/node/components/CardGridInfinite/Card/CardActionContext/CardActionContextProvider/index.d.ts +1 -0
  164. package/node/components/CardGridInfinite/Card/CardActionContext/CardActionContextProvider/index.js +17 -0
  165. package/node/components/CardGridInfinite/Card/CardActionContext/index.d.ts +2 -0
  166. package/node/components/CardGridInfinite/Card/CardActionContext/index.js +18 -0
  167. package/node/components/CardGridInfinite/Card/SecondaryActionButton/SecondaryActionButton.d.ts +7 -0
  168. package/node/components/CardGridInfinite/Card/SecondaryActionButton/SecondaryActionButton.js +25 -0
  169. package/node/components/CardGridInfinite/Card/SecondaryActionButton/index.d.ts +1 -0
  170. package/node/components/CardGridInfinite/Card/SecondaryActionButton/index.js +17 -0
  171. package/node/components/CardGridInfinite/Card/SecondaryActionButton/styles.d.ts +12 -0
  172. package/node/components/CardGridInfinite/Card/SecondaryActionButton/styles.js +8 -0
  173. package/node/components/CardGridInfinite/Card/index.d.ts +3 -0
  174. package/node/components/CardGridInfinite/Card/index.js +18 -0
  175. package/node/components/CardGridInfinite/Card/styles.d.ts +16 -0
  176. package/node/components/CardGridInfinite/Card/styles.js +25 -0
  177. package/node/components/CardGridInfinite/Card/types.d.ts +32 -0
  178. package/node/components/CardGridInfinite/Card/types.js +2 -0
  179. package/node/components/CardGridInfinite/Card/useLogic/index.d.ts +1 -0
  180. package/node/components/CardGridInfinite/Card/useLogic/index.js +17 -0
  181. package/node/components/CardGridInfinite/Card/useLogic/useLogic.d.ts +7 -0
  182. package/node/components/CardGridInfinite/Card/useLogic/useLogic.js +11 -0
  183. package/node/components/CardGridInfinite/CardGridInfinite.d.ts +3 -0
  184. package/node/components/CardGridInfinite/CardGridInfinite.js +25 -0
  185. package/node/components/CardGridInfinite/CardGridMainActions/Action/Action.d.ts +3 -0
  186. package/node/components/CardGridInfinite/CardGridMainActions/Action/Action.js +20 -0
  187. package/node/components/CardGridInfinite/CardGridMainActions/Action/index.d.ts +1 -0
  188. package/node/components/CardGridInfinite/CardGridMainActions/Action/index.js +17 -0
  189. package/node/components/CardGridInfinite/CardGridMainActions/Action/types.d.ts +13 -0
  190. package/node/components/CardGridInfinite/CardGridMainActions/Action/types.js +2 -0
  191. package/node/components/CardGridInfinite/CardGridMainActions/Action/useLogic/index.d.ts +1 -0
  192. package/node/components/CardGridInfinite/CardGridMainActions/Action/useLogic/index.js +17 -0
  193. package/node/components/CardGridInfinite/CardGridMainActions/Action/useLogic/useLogic.d.ts +11 -0
  194. package/node/components/CardGridInfinite/CardGridMainActions/Action/useLogic/useLogic.js +20 -0
  195. package/node/components/CardGridInfinite/CardGridMainActions/CardGridMainActions.d.ts +30 -0
  196. package/node/components/CardGridInfinite/CardGridMainActions/CardGridMainActions.js +33 -0
  197. package/node/components/CardGridInfinite/CardGridMainActions/index.d.ts +4 -0
  198. package/node/components/CardGridInfinite/CardGridMainActions/index.js +22 -0
  199. package/node/components/CardGridInfinite/CardGridMainActions/styles.d.ts +5 -0
  200. package/node/components/CardGridInfinite/CardGridMainActions/styles.js +12 -0
  201. package/node/components/CardGridInfinite/CardGridMainActions/types.d.ts +44 -0
  202. package/node/components/CardGridInfinite/CardGridMainActions/types.js +2 -0
  203. package/node/components/CardGridInfinite/CardGridMainActions/utils/index.d.ts +1 -0
  204. package/node/components/CardGridInfinite/CardGridMainActions/utils/index.js +17 -0
  205. package/node/components/CardGridInfinite/CardGridMainActions/utils/replaceActionComponent/index.d.ts +1 -0
  206. package/node/components/CardGridInfinite/CardGridMainActions/utils/replaceActionComponent/index.js +17 -0
  207. package/node/components/CardGridInfinite/CardGridMainActions/utils/replaceActionComponent/replaceActionComponent.d.ts +8 -0
  208. package/node/components/CardGridInfinite/CardGridMainActions/utils/replaceActionComponent/replaceActionComponent.js +15 -0
  209. package/node/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActions.d.ts +18 -0
  210. package/node/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActions.js +38 -0
  211. package/node/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/CardGridSecondaryActionsSkeleton.d.ts +2 -0
  212. package/node/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/CardGridSecondaryActionsSkeleton.js +8 -0
  213. package/node/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/index.d.ts +1 -0
  214. package/node/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/index.js +17 -0
  215. package/node/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/styles.d.ts +9 -0
  216. package/node/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/styles.js +34 -0
  217. package/node/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuContext.d.ts +12 -0
  218. package/node/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuContext.js +8 -0
  219. package/node/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuProvider/SecondaryActionsMenuProvider.d.ts +8 -0
  220. package/node/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuProvider/SecondaryActionsMenuProvider.js +9 -0
  221. package/node/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuProvider/index.d.ts +1 -0
  222. package/node/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuProvider/index.js +5 -0
  223. package/node/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/index.d.ts +2 -0
  224. package/node/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/index.js +18 -0
  225. package/node/components/CardGridInfinite/CardGridSecondaryAction/index.d.ts +4 -0
  226. package/node/components/CardGridInfinite/CardGridSecondaryAction/index.js +22 -0
  227. package/node/components/CardGridInfinite/CardGridSecondaryAction/types.d.ts +59 -0
  228. package/node/components/CardGridInfinite/CardGridSecondaryAction/types.js +2 -0
  229. package/node/components/CardGridInfinite/EndData/EndData.d.ts +6 -0
  230. package/node/components/CardGridInfinite/EndData/EndData.js +8 -0
  231. package/node/components/CardGridInfinite/EndData/constants.d.ts +1 -0
  232. package/node/components/CardGridInfinite/EndData/constants.js +4 -0
  233. package/node/components/CardGridInfinite/EndData/index.d.ts +1 -0
  234. package/node/components/CardGridInfinite/EndData/index.js +17 -0
  235. package/node/components/CardGridInfinite/ErrorMessage/ErrorMessage.d.ts +6 -0
  236. package/node/components/CardGridInfinite/ErrorMessage/ErrorMessage.js +10 -0
  237. package/node/components/CardGridInfinite/ErrorMessage/constants.d.ts +1 -0
  238. package/node/components/CardGridInfinite/ErrorMessage/constants.js +4 -0
  239. package/node/components/CardGridInfinite/ErrorMessage/index.d.ts +1 -0
  240. package/node/components/CardGridInfinite/ErrorMessage/index.js +17 -0
  241. package/node/components/CardGridInfinite/ErrorMessage/styles.d.ts +5 -0
  242. package/node/components/CardGridInfinite/ErrorMessage/styles.js +20 -0
  243. package/node/components/CardGridInfinite/Footer/Footer.d.ts +10 -0
  244. package/node/components/CardGridInfinite/Footer/Footer.js +16 -0
  245. package/node/components/CardGridInfinite/Footer/index.d.ts +1 -0
  246. package/node/components/CardGridInfinite/Footer/index.js +17 -0
  247. package/node/components/CardGridInfinite/Footer/styles.d.ts +9 -0
  248. package/node/components/CardGridInfinite/Footer/styles.js +19 -0
  249. package/node/components/CardGridInfinite/List/List.d.ts +8 -0
  250. package/node/components/CardGridInfinite/List/List.js +7 -0
  251. package/node/components/CardGridInfinite/List/index.d.ts +1 -0
  252. package/node/components/CardGridInfinite/List/index.js +17 -0
  253. package/node/components/CardGridInfinite/List/styles.d.ts +10 -0
  254. package/node/components/CardGridInfinite/List/styles.js +13 -0
  255. package/node/components/CardGridInfinite/NoDataPlaceholder/NoDataPlaceholder.d.ts +6 -0
  256. package/node/components/CardGridInfinite/NoDataPlaceholder/NoDataPlaceholder.js +14 -0
  257. package/node/components/CardGridInfinite/NoDataPlaceholder/constants.d.ts +1 -0
  258. package/node/components/CardGridInfinite/NoDataPlaceholder/constants.js +4 -0
  259. package/node/components/CardGridInfinite/NoDataPlaceholder/index.d.ts +1 -0
  260. package/node/components/CardGridInfinite/NoDataPlaceholder/index.js +17 -0
  261. package/node/components/CardGridInfinite/OnTopButton/OnTopButton.d.ts +8 -0
  262. package/node/components/CardGridInfinite/OnTopButton/OnTopButton.js +14 -0
  263. package/node/components/CardGridInfinite/OnTopButton/index.d.ts +1 -0
  264. package/node/components/CardGridInfinite/OnTopButton/index.js +17 -0
  265. package/node/components/CardGridInfinite/OnTopButton/styles.d.ts +3 -0
  266. package/node/components/CardGridInfinite/OnTopButton/styles.js +12 -0
  267. package/node/components/CardGridInfinite/SkeletonGrid/SkeletonGrid.d.ts +11 -0
  268. package/node/components/CardGridInfinite/SkeletonGrid/SkeletonGrid.js +9 -0
  269. package/node/components/CardGridInfinite/SkeletonGrid/index.d.ts +1 -0
  270. package/node/components/CardGridInfinite/SkeletonGrid/index.js +5 -0
  271. package/node/components/CardGridInfinite/SkeletonGrid/styles.d.ts +12 -0
  272. package/node/components/CardGridInfinite/SkeletonGrid/styles.js +8 -0
  273. package/node/components/CardGridInfinite/constants.d.ts +7 -0
  274. package/node/components/CardGridInfinite/constants.js +11 -0
  275. package/node/components/CardGridInfinite/hooks/index.d.ts +1 -0
  276. package/node/components/CardGridInfinite/hooks/index.js +17 -0
  277. package/node/components/CardGridInfinite/hooks/useBlockingActions/index.d.ts +1 -0
  278. package/node/components/CardGridInfinite/hooks/useBlockingActions/index.js +17 -0
  279. package/node/components/CardGridInfinite/hooks/useBlockingActions/useBlockingActions.d.ts +9 -0
  280. package/node/components/CardGridInfinite/hooks/useBlockingActions/useBlockingActions.js +27 -0
  281. package/node/components/CardGridInfinite/index.d.ts +8 -0
  282. package/node/components/CardGridInfinite/index.js +13 -0
  283. package/node/components/CardGridInfinite/styles.d.ts +13 -0
  284. package/node/components/CardGridInfinite/styles.js +29 -0
  285. package/node/components/CardGridInfinite/types.d.ts +98 -0
  286. package/node/components/CardGridInfinite/types.js +2 -0
  287. package/node/components/CardGridInfinite/useLogic/index.d.ts +1 -0
  288. package/node/components/CardGridInfinite/useLogic/index.js +17 -0
  289. package/node/components/CardGridInfinite/useLogic/useLogic.d.ts +41 -0
  290. package/node/components/CardGridInfinite/useLogic/useLogic.js +77 -0
  291. package/node/components/DashboardLayout/Sidebar/styles.d.ts +1 -4
  292. package/node/components/DatePicker/styles.d.ts +1 -4
  293. package/node/components/DateRangePicker/styles.d.ts +1 -4
  294. package/node/components/Description/styles.js +1 -1
  295. package/node/components/InfiniteTreeList/useLogic/useLogic.js +3 -3
  296. package/node/components/PageLayout/PageContent/styles.js +5 -2
  297. package/node/components/PageLayout/PageLayoutContainer/index.d.ts +1 -0
  298. package/node/components/PageLayout/PageLayoutContainer/index.js +3 -0
  299. package/node/components/PageLayout/PageLayoutContainer/styles.d.ts +1 -4
  300. package/node/components/Paper/Paper.d.ts +1 -1
  301. package/node/components/Paper/Paper.js +4 -4
  302. package/node/components/Tag/styles.js +2 -0
  303. package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useScrollManagement/useScrollManagement.d.ts +2 -1
  304. package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useScrollManagement/useScrollManagement.js +13 -3
  305. package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useStickyButton/useStickyButton.js +3 -3
  306. package/node/components/hooks/index.d.ts +1 -0
  307. package/node/components/hooks/index.js +4 -1
  308. package/node/components/placeholders/LoadingPlaceholder/LoadingPlaceholder.js +4 -3
  309. package/node/components/placeholders/LoadingPlaceholder/constants.d.ts +3 -0
  310. package/node/components/placeholders/LoadingPlaceholder/constants.js +7 -0
  311. package/node/components/placeholders/LoadingPlaceholder/index.d.ts +1 -0
  312. package/node/components/placeholders/LoadingPlaceholder/index.js +3 -0
  313. package/package.json +8 -1
  314. /package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/index.d.ts +0 -0
  315. /package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/index.js +0 -0
  316. /package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useScrollManagement/index.d.ts +0 -0
  317. /package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useScrollManagement/index.js +0 -0
  318. /package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useStickyButton/index.d.ts +0 -0
  319. /package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useStickyButton/index.js +0 -0
  320. /package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useStickyButton/useStickyButton.d.ts +0 -0
  321. /package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/index.d.ts +0 -0
  322. /package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/index.js +0 -0
  323. /package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useScrollManagement/index.d.ts +0 -0
  324. /package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useScrollManagement/index.js +0 -0
  325. /package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useStickyButton/index.d.ts +0 -0
  326. /package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useStickyButton/index.js +0 -0
  327. /package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useStickyButton/useStickyButton.d.ts +0 -0
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SecondaryActionButton = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const material_1 = require("@mui/material");
6
+ const react_1 = require("react");
7
+ const icons_1 = require("../../../../icons");
8
+ const hooks_1 = require("../../../hooks");
9
+ const CardGridSecondaryAction_1 = require("../../CardGridSecondaryAction");
10
+ const CardActionContext_1 = require("../CardActionContext");
11
+ const styles_1 = require("./styles");
12
+ const SecondaryActionButton = ({ renderActions, }) => {
13
+ const buttonRef = (0, react_1.useRef)(null);
14
+ const { open, anchorRef, handleOpenMenu, handleCloseMenu } = (0, hooks_1.useMenu)(buttonRef);
15
+ const { isDisabled, isDisabledCard } = (0, react_1.useContext)(CardActionContext_1.CardActionContext);
16
+ // Если контент единожды отрендерился, то будем рендерить его дальше,
17
+ // чтобы были актуальные статусы loading для блокировки действий
18
+ const [isOnceOpen, setIsOnceOpen] = (0, react_1.useState)(false);
19
+ const handleOpen = () => {
20
+ setIsOnceOpen(true);
21
+ handleOpenMenu();
22
+ };
23
+ return ((0, jsx_runtime_1.jsxs)(CardGridSecondaryAction_1.SecondaryActionsMenuProvider, { value: { open, anchorEl: anchorRef.current }, children: [(0, jsx_runtime_1.jsx)(material_1.ClickAwayListener, { onClickAway: handleCloseMenu, mouseEvent: "onMouseUp", children: (0, jsx_runtime_1.jsx)(styles_1.StyledIconButton, { ref: anchorRef, onClick: handleOpen, selected: open, variant: "outlined", color: "grey", disabled: isDisabled || isDisabledCard, children: (0, jsx_runtime_1.jsx)(icons_1.DotsVOutlineMd, {}) }) }), isOnceOpen && renderActions({ isLoading: false })] }));
24
+ };
25
+ exports.SecondaryActionButton = SecondaryActionButton;
@@ -0,0 +1 @@
1
+ export * from './SecondaryActionButton';
@@ -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("./SecondaryActionButton"), exports);
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ export declare const StyledIconButton: import("@emotion/styled").StyledComponent<Omit<import("../../..").WithoutEmotionSpecific<import("@mui/material").ButtonProps>, "color" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "variant"> & {
3
+ variant?: "link" | "light" | "outlined" | "contained" | "text" | undefined;
4
+ loading?: boolean | undefined;
5
+ color?: "grey" | "error" | "success" | "warning" | "primary" | undefined;
6
+ component?: import("react").ElementType | undefined;
7
+ selected?: boolean | undefined;
8
+ } & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
9
+ ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
10
+ }, ""> & import("react").RefAttributes<HTMLButtonElement> & {
11
+ theme?: import("@emotion/react").Theme | undefined;
12
+ }, {}, {}>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StyledIconButton = void 0;
4
+ const IconButton_1 = require("../../../IconButton");
5
+ const styles_1 = require("../../../styles");
6
+ exports.StyledIconButton = (0, styles_1.styled)(IconButton_1.IconButton) `
7
+ align-self: flex-start;
8
+ `;
@@ -0,0 +1,3 @@
1
+ export * from './Card';
2
+ export * from './CardActionContext';
3
+ export type { CardProps } from './types';
@@ -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("./Card"), exports);
18
+ __exportStar(require("./CardActionContext"), exports);
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ export declare const Wrapper: import("@emotion/styled").StyledComponent<{
3
+ theme?: import("@emotion/react").Theme | undefined;
4
+ as?: import("react").ElementType<any> | undefined;
5
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
6
+ export declare const StyledDivider: import("@emotion/styled").StyledComponent<import("../../Divider").DividerProps & {
7
+ theme?: import("@emotion/react").Theme | undefined;
8
+ }, {}, {}>;
9
+ export declare const CardHeader: import("@emotion/styled").StyledComponent<{
10
+ theme?: import("@emotion/react").Theme | undefined;
11
+ as?: import("react").ElementType<any> | undefined;
12
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
13
+ export declare const HeaderWrapper: import("@emotion/styled").StyledComponent<{
14
+ theme?: import("@emotion/react").Theme | undefined;
15
+ as?: import("react").ElementType<any> | undefined;
16
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HeaderWrapper = exports.CardHeader = exports.StyledDivider = exports.Wrapper = void 0;
4
+ const Divider_1 = require("../../Divider");
5
+ const styles_1 = require("../../styles");
6
+ exports.Wrapper = styles_1.styled.div `
7
+ padding: ${({ theme }) => theme.spacing(4, 5)};
8
+
9
+ ${({ theme }) => theme.breakpoints.down('sm')} {
10
+ padding: ${({ theme }) => theme.spacing(5, 4)};
11
+ }
12
+ `;
13
+ exports.StyledDivider = (0, styles_1.styled)(Divider_1.Divider) `
14
+ margin: ${({ theme }) => theme.spacing(4, 0)}
15
+ `;
16
+ exports.CardHeader = styles_1.styled.div `
17
+ display: flex;
18
+ gap: ${({ theme }) => theme.spacing(1)};
19
+ align-items: center;
20
+ justify-content: space-between;
21
+ `;
22
+ exports.HeaderWrapper = styles_1.styled.div `
23
+ overflow: hidden;
24
+ flex: 1;
25
+ `;
@@ -0,0 +1,32 @@
1
+ import { type FunctionComponent, type ReactNode } from 'react';
2
+ export type CardProps<TItem> = {
3
+ /**
4
+ * Header элемента
5
+ */
6
+ header?: ReactNode;
7
+ /**
8
+ * Основные действия элемента отображающиеся в footer
9
+ * Может быть как функцией без параметров, так и React компонентом
10
+ */
11
+ mainActions?: FunctionComponent;
12
+ /**
13
+ * Дополнительные действия элемента отображающиеся в header в виде кнопки с троеточием
14
+ */
15
+ secondaryActions?: () => ReactNode;
16
+ /**
17
+ * Основной контент отображающийся в центральной части элемента
18
+ */
19
+ content: ReactNode;
20
+ /**
21
+ * Если `true`, элемент будет заблокирован для взаимодействия
22
+ */
23
+ isDisabled?: boolean;
24
+ /**
25
+ * Причина блокировки элемента
26
+ */
27
+ disabledReason?: string;
28
+ /**
29
+ * Данные элемента
30
+ */
31
+ item: TItem;
32
+ };
@@ -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 { CardGridActionHandler } from '../../CardGridMainActions';
2
+ import type { CardProps } from '../types';
3
+ type UseLogicParams<TItem> = CardProps<TItem>;
4
+ export declare const useLogic: <TItem>({ item }: UseLogicParams<TItem>) => {
5
+ handleActionClick: CardGridActionHandler<TItem>;
6
+ };
7
+ export {};
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useLogic = void 0;
4
+ const react_1 = require("react");
5
+ const useLogic = ({ item }) => {
6
+ const handleActionClick = (0, react_1.useCallback)((onClick) => () => {
7
+ onClick?.(item);
8
+ }, [item]);
9
+ return { handleActionClick };
10
+ };
11
+ exports.useLogic = useLogic;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import type { CardGridInfiniteProps } from './types';
3
+ export declare const CardGridInfinite: <TDataItem extends Record<string, unknown>>(props: CardGridInfiniteProps<TDataItem>) => JSX.Element;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CardGridInfinite = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const react_virtuoso_1 = require("react-virtuoso");
7
+ const ContentState_1 = require("../ContentState");
8
+ const Card_1 = require("./Card");
9
+ const constants_1 = require("./constants");
10
+ const Footer_1 = require("./Footer");
11
+ const List_1 = require("./List");
12
+ const NoDataPlaceholder_1 = require("./NoDataPlaceholder");
13
+ const OnTopButton_1 = require("./OnTopButton");
14
+ const SkeletonGrid_1 = require("./SkeletonGrid");
15
+ const styles_1 = require("./styles");
16
+ const useLogic_1 = require("./useLogic");
17
+ const CardGridInfinite = (props) => {
18
+ const { contentStateProps, desktopCardWidth, virtuosoProps, scrollParent, skeleton, footerProps, onTopButtonProps, list, noDataImgSrc, defineCard, classnames, } = (0, useLogic_1.useLogic)(props);
19
+ const VirtuosoList = (0, react_1.useMemo)(() => (0, react_1.forwardRef)((listProps, ref) => ((0, jsx_runtime_1.jsx)(List_1.List, { ...listProps, ref: ref, desktopCardWidth: desktopCardWidth }))), [desktopCardWidth]);
20
+ return ((0, jsx_runtime_1.jsx)(styles_1.ContentStateWrapper, { className: classnames, children: (0, jsx_runtime_1.jsx)(ContentState_1.ContentState, { ...contentStateProps, loadingContent: (0, jsx_runtime_1.jsx)(SkeletonGrid_1.SkeletonGrid, { skeleton: skeleton, desktopCardWidth: desktopCardWidth }), children: list?.length && scrollParent ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_virtuoso_1.VirtuosoGrid, { ...virtuosoProps, data: list, customScrollParent: scrollParent, listClassName: constants_1.cardGridClassnames.list, components: {
21
+ List: VirtuosoList,
22
+ Footer: () => (0, jsx_runtime_1.jsx)(Footer_1.Footer, { ...footerProps }),
23
+ }, itemContent: (_, item) => ((0, jsx_runtime_1.jsx)(Card_1.Card, { item: item, ...defineCard(item) })) }), (0, jsx_runtime_1.jsx)(OnTopButton_1.OnTopButton, { ...onTopButtonProps })] })) : ((0, jsx_runtime_1.jsx)(NoDataPlaceholder_1.NoDataPlaceholder, { noDataImgSrc: noDataImgSrc })) }) }));
24
+ };
25
+ exports.CardGridInfinite = CardGridInfinite;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import type { ActionProps } from './types';
3
+ export declare const Action: <TAction>(props: ActionProps<TAction>) => JSX.Element;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Action = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const Button_1 = require("../../../Button");
6
+ const ConfirmAction_1 = require("../../../ConfirmAction");
7
+ const Tooltip_1 = require("../../../Tooltip");
8
+ const useLogic_1 = require("./useLogic");
9
+ const Action = (props) => {
10
+ const { tooltipProps } = (0, useLogic_1.useLogic)(props);
11
+ const { action, onActionClick, isDisabled } = props;
12
+ const { name, needConfirm, confirmText, confirmButtonProps, disabledReason, disabled, loading, isBlockingOperation, loadingNote, note, onClick, component, variant, color, ...restProps } = action;
13
+ const renderButton = (renderProps) => {
14
+ return ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { withoutContainer: !disabled, placement: "bottom", ...tooltipProps, children: (0, jsx_runtime_1.jsx)(Button_1.Button, { disabled: isDisabled || disabled, loading: loading, component: component, variant: variant, color: color, ...restProps, ...renderProps, children: name }) }, name));
15
+ };
16
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: needConfirm ? ((0, jsx_runtime_1.jsx)(ConfirmAction_1.ConfirmAction, { text: confirmText, confirmButtonProps: confirmButtonProps, actionComponent: (renderProps) => renderButton(renderProps), onConfirm: onActionClick(onClick) })) : (renderButton({
17
+ onClick: onActionClick(onClick),
18
+ })) }));
19
+ };
20
+ exports.Action = Action;
@@ -0,0 +1 @@
1
+ export * from './Action';
@@ -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("./Action"), exports);
@@ -0,0 +1,13 @@
1
+ import type { ElementType } from 'react';
2
+ import type { CardGridActionHandler, CardGridMainActionComponent } from '../types';
3
+ export type ActionProps<TAction> = {
4
+ action: CardGridMainActionComponent<TAction, ElementType>;
5
+ /**
6
+ * Обработчик клика на действие
7
+ */
8
+ onActionClick: CardGridActionHandler<TAction>;
9
+ /**
10
+ * Если true, action не доступен
11
+ */
12
+ isDisabled?: boolean;
13
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,11 @@
1
+ import type { ActionProps } from '../types';
2
+ type UseLogicParam<TAction> = ActionProps<TAction>;
3
+ export declare const useLogic: <TAction>({ action }: UseLogicParam<TAction>) => {
4
+ tooltipProps: {
5
+ title: string | undefined;
6
+ open: boolean;
7
+ onOpen: () => void;
8
+ onClose: () => void;
9
+ };
10
+ };
11
+ export {};
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useLogic = void 0;
4
+ const react_1 = require("react");
5
+ const useLogic = ({ action }) => {
6
+ const { loading, disabledReason, note } = action;
7
+ const [isVisibleTooltip, setVisibleTooltip] = (0, react_1.useState)(false);
8
+ const handleOpenTooltip = () => setVisibleTooltip(true);
9
+ const handleCloseTooltip = () => setVisibleTooltip(false);
10
+ const title = note || disabledReason;
11
+ return {
12
+ tooltipProps: {
13
+ title,
14
+ open: isVisibleTooltip && !loading,
15
+ onOpen: handleOpenTooltip,
16
+ onClose: handleCloseTooltip,
17
+ },
18
+ };
19
+ };
20
+ exports.useLogic = useLogic;
@@ -0,0 +1,30 @@
1
+ /// <reference types="react" />
2
+ import type { CardGridMainAction } from './types';
3
+ export type CardGridMainActionsProps<TAction> = {
4
+ /**
5
+ * Действия отображаются слева направо в порядке, указанном в массиве
6
+ * Каждый элемент может иметь свой component (например, 'button', 'a', и т.д.)
7
+ * с соответствующими пропсами для этого компонента
8
+ */
9
+ actions?: CardGridMainAction<TAction>[];
10
+ };
11
+ /**
12
+ * Компонент для отображения основных действий в карточке CardGrid.
13
+ *
14
+ * Основные действия отображаются в виде отдельных кнопок в футере карточки
15
+ * и предназначены для наиболее часто используемых операций над ней
16
+ *
17
+ * @remarks
18
+ * - Компонент автоматически обрабатывает блокирующие операции, что предотвращает одновременное выполнение нескольких действий
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * <CardGridMainActions
23
+ * actions={[
24
+ * { name: 'Редактировать', onClick: handleEdit },
25
+ * { name: 'Удалить', onClick: handleDelete, isBlockingOperation: true }
26
+ * ]}
27
+ * />
28
+ * ```
29
+ */
30
+ export declare const CardGridMainActions: <TAction>({ actions, }: CardGridMainActionsProps<TAction>) => JSX.Element;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CardGridMainActions = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const hooks_1 = require("../hooks");
6
+ const Action_1 = require("./Action");
7
+ const styles_1 = require("./styles");
8
+ /**
9
+ * Компонент для отображения основных действий в карточке CardGrid.
10
+ *
11
+ * Основные действия отображаются в виде отдельных кнопок в футере карточки
12
+ * и предназначены для наиболее часто используемых операций над ней
13
+ *
14
+ * @remarks
15
+ * - Компонент автоматически обрабатывает блокирующие операции, что предотвращает одновременное выполнение нескольких действий
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * <CardGridMainActions
20
+ * actions={[
21
+ * { name: 'Редактировать', onClick: handleEdit },
22
+ * { name: 'Удалить', onClick: handleDelete, isBlockingOperation: true }
23
+ * ]}
24
+ * />
25
+ * ```
26
+ */
27
+ const CardGridMainActions = ({ actions, }) => {
28
+ const { isDisabled, onActionClick } = (0, hooks_1.useBlockingActions)(actions);
29
+ return ((0, jsx_runtime_1.jsx)(styles_1.Wrapper, { children: actions?.map((action) => {
30
+ return ((0, jsx_runtime_1.jsx)(Action_1.Action, { action: action, onActionClick: onActionClick, isDisabled: isDisabled }, action.name));
31
+ }) }));
32
+ };
33
+ exports.CardGridMainActions = CardGridMainActions;
@@ -0,0 +1,4 @@
1
+ export * from './CardGridMainActions';
2
+ export * from './types';
3
+ export * from './Action';
4
+ export { replaceActionComponent } from './utils';
@@ -0,0 +1,22 @@
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
+ exports.replaceActionComponent = void 0;
18
+ __exportStar(require("./CardGridMainActions"), exports);
19
+ __exportStar(require("./types"), exports);
20
+ __exportStar(require("./Action"), exports);
21
+ var utils_1 = require("./utils");
22
+ Object.defineProperty(exports, "replaceActionComponent", { enumerable: true, get: function () { return utils_1.replaceActionComponent; } });
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare const Wrapper: import("@emotion/styled").StyledComponent<{
3
+ theme?: import("@emotion/react").Theme | undefined;
4
+ as?: import("react").ElementType<any> | undefined;
5
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Wrapper = void 0;
4
+ const styles_1 = require("../../styles");
5
+ exports.Wrapper = styles_1.styled.div `
6
+ display: grid;
7
+ grid-auto-columns: 1fr;
8
+ grid-auto-flow: column;
9
+ gap: ${({ theme }) => theme.spacing(3)};
10
+
11
+ padding-top: ${({ theme }) => theme.spacing(6)};
12
+ `;
@@ -0,0 +1,44 @@
1
+ import type { ElementType, MouseEventHandler } from 'react';
2
+ import type { ButtonProps } from '../../Button';
3
+ import type { ConfirmActionProps } from '../../ConfirmAction';
4
+ export type CardGridMainActionBase<TItem> = {
5
+ /**
6
+ * Название действия (также используется как текст внутри кнопки)
7
+ */
8
+ name: string;
9
+ /**
10
+ * Если `true`, при клике на кнопку будет вызываться подтверждение действия
11
+ */
12
+ needConfirm?: boolean;
13
+ /**
14
+ * Поясняющий текст для подтверждения действия
15
+ */
16
+ confirmText?: ConfirmActionProps['text'];
17
+ /**
18
+ * Параметры кнопки подтверждения действия
19
+ */
20
+ confirmButtonProps?: ConfirmActionProps['confirmButtonProps'];
21
+ /**
22
+ * Если true, блокирует взаимодействие с actions
23
+ */
24
+ isBlockingOperation?: boolean;
25
+ /**
26
+ * Причина блокировки действия
27
+ */
28
+ disabledReason?: string;
29
+ /**
30
+ * Текст тултипа при наведении на кнопку
31
+ */
32
+ note?: string;
33
+ /**
34
+ * Причина блокировки строки во время загрузки
35
+ */
36
+ loadingNote?: string;
37
+ /**
38
+ * Обработчик действия
39
+ */
40
+ onClick?: (data: TItem) => void;
41
+ };
42
+ export type CardGridMainActionComponent<TItem, TComponent extends ElementType = ElementType> = CardGridMainActionBase<TItem> & Omit<ButtonProps<TComponent>, 'children' | 'onClick'>;
43
+ export type CardGridActionHandler<TItem> = (onClick: CardGridMainActionComponent<TItem>['onClick']) => MouseEventHandler<HTMLElement> | undefined;
44
+ export type CardGridMainAction<TItem> = CardGridMainActionComponent<TItem, ElementType>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from './replaceActionComponent';
@@ -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("./replaceActionComponent"), exports);
@@ -0,0 +1 @@
1
+ export * from './replaceActionComponent';
@@ -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("./replaceActionComponent"), exports);
@@ -0,0 +1,8 @@
1
+ import { type ElementType } from 'react';
2
+ import type { CardGridMainActionComponent } from '../../types';
3
+ /**
4
+ * Заменяет дефолтный параметр component на кастомный
5
+ * @param component - Кастомный компонент для замены Button
6
+ * @param props - Параметры компонента
7
+ */
8
+ export declare const replaceActionComponent: <TItem, TComponent extends ElementType>(component: TComponent, props: Omit<CardGridMainActionComponent<TItem, TComponent>, "component">) => CardGridMainActionComponent<TItem, ElementType>;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.replaceActionComponent = void 0;
4
+ /**
5
+ * Заменяет дефолтный параметр component на кастомный
6
+ * @param component - Кастомный компонент для замены Button
7
+ * @param props - Параметры компонента
8
+ */
9
+ const replaceActionComponent = (component, props) => {
10
+ return {
11
+ ...props,
12
+ component,
13
+ };
14
+ };
15
+ exports.replaceActionComponent = replaceActionComponent;