@astral/ui 4.92.3 → 4.93.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 (231) hide show
  1. package/components/BottomDrawer/index.d.ts +1 -1
  2. package/components/BottomDrawer/index.js +1 -1
  3. package/components/ClickAwayListener/ClickAwayListener.d.ts +1 -1
  4. package/components/ClickAwayListener/ClickAwayListener.js +8 -2
  5. package/components/Radio/Radio.js +1 -1
  6. package/components/Radio/constants.d.ts +3 -0
  7. package/components/Radio/constants.js +3 -0
  8. package/components/Radio/index.d.ts +1 -1
  9. package/components/Radio/index.js +1 -1
  10. package/components/Radio/styles.js +9 -9
  11. package/components/Tree/MultipleTreeList/MultipleTreeList.js +2 -2
  12. package/components/Tree/MultipleTreeList/TreeItem/TreeItem.js +4 -7
  13. package/components/Tree/MultipleTreeList/TreeItem/styles.d.ts +1 -17
  14. package/components/Tree/MultipleTreeList/TreeItem/styles.js +19 -2
  15. package/components/Tree/MultipleTreeList/TreeItem/useLogic/useLogic.d.ts +4 -1
  16. package/components/Tree/MultipleTreeList/TreeItem/useLogic/useLogic.js +8 -2
  17. package/components/Tree/MultipleTreeList/styles.d.ts +4 -0
  18. package/components/Tree/MultipleTreeList/styles.js +25 -0
  19. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanel.d.ts +2 -0
  20. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanel.js +11 -0
  21. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/MobileSlidePanelContent.d.ts +2 -0
  22. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/MobileSlidePanelContent.js +50 -0
  23. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/index.d.ts +1 -0
  24. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/index.js +1 -0
  25. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/styles.d.ts +404 -0
  26. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/styles.js +172 -0
  27. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/types.d.ts +11 -0
  28. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/types.js +1 -0
  29. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/index.d.ts +3 -0
  30. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/index.js +3 -0
  31. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount/index.d.ts +1 -0
  32. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount/index.js +1 -0
  33. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount/useDelayedUnmount.d.ts +11 -0
  34. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount/useDelayedUnmount.js +18 -0
  35. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/usePanelHeader/index.d.ts +1 -0
  36. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/usePanelHeader/index.js +1 -0
  37. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/usePanelHeader/usePanelHeader.d.ts +24 -0
  38. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/usePanelHeader/usePanelHeader.js +50 -0
  39. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useRegisterClose/index.d.ts +1 -0
  40. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useRegisterClose/index.js +1 -0
  41. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useRegisterClose/useRegisterClose.d.ts +13 -0
  42. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useRegisterClose/useRegisterClose.js +17 -0
  43. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/index.d.ts +1 -0
  44. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/index.js +1 -0
  45. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/useLogic.d.ts +19 -0
  46. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/useLogic.js +39 -0
  47. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContext.d.ts +13 -0
  48. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContext.js +6 -0
  49. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContextProvider/MobileSlidePanelContextProvider.d.ts +7 -0
  50. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContextProvider/MobileSlidePanelContextProvider.js +12 -0
  51. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContextProvider/index.d.ts +1 -0
  52. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContextProvider/index.js +1 -0
  53. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/index.d.ts +2 -0
  54. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/index.js +2 -0
  55. package/components/Tree/TreeItem/MobileSlidePanel/constants.d.ts +11 -0
  56. package/components/Tree/TreeItem/MobileSlidePanel/constants.js +12 -0
  57. package/components/Tree/TreeItem/MobileSlidePanel/index.d.ts +2 -0
  58. package/components/Tree/TreeItem/MobileSlidePanel/index.js +2 -0
  59. package/components/Tree/TreeItem/MobileSlidePanel/types.d.ts +49 -0
  60. package/components/Tree/TreeItem/MobileSlidePanel/types.js +1 -0
  61. package/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/index.d.ts +1 -0
  62. package/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/index.js +1 -0
  63. package/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/usePanelStack/index.d.ts +1 -0
  64. package/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/usePanelStack/index.js +1 -0
  65. package/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/usePanelStack/usePanelStack.d.ts +14 -0
  66. package/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/usePanelStack/usePanelStack.js +62 -0
  67. package/components/Tree/TreeItem/MobileSlidePanel/useLogic/index.d.ts +1 -0
  68. package/components/Tree/TreeItem/MobileSlidePanel/useLogic/index.js +1 -0
  69. package/components/Tree/TreeItem/MobileSlidePanel/useLogic/useLogic.d.ts +9 -0
  70. package/components/Tree/TreeItem/MobileSlidePanel/useLogic/useLogic.js +11 -0
  71. package/components/Tree/TreeItem/TreeItem.d.ts +2 -1
  72. package/components/Tree/TreeItem/TreeItem.js +49 -9
  73. package/components/Tree/TreeItem/constants.d.ts +9 -0
  74. package/components/Tree/TreeItem/constants.js +9 -0
  75. package/components/Tree/TreeItem/styles.d.ts +4 -13
  76. package/components/Tree/TreeItem/styles.js +153 -39
  77. package/components/Tree/TreeItem/types.d.ts +18 -0
  78. package/components/Tree/TreeItem/useLogic/useLogic.d.ts +21 -7
  79. package/components/Tree/TreeItem/useLogic/useLogic.js +40 -2
  80. package/components/Tree/TreeList/TreeItem/TreeItem.js +5 -5
  81. package/components/Tree/TreeList/TreeItem/styles.d.ts +19 -0
  82. package/components/Tree/TreeList/TreeItem/styles.js +36 -0
  83. package/components/Tree/TreeList/TreeItem/useLogic/useLogic.d.ts +6 -0
  84. package/components/Tree/TreeList/TreeItem/useLogic/useLogic.js +11 -0
  85. package/components/Tree/TreeList/TreeList.js +2 -2
  86. package/components/Tree/TreeList/styles.d.ts +4 -0
  87. package/components/Tree/TreeList/styles.js +26 -0
  88. package/components/TreeAsyncAutocomplete/OptionsModal/NoData/styles.js +5 -0
  89. package/components/TreeAsyncAutocomplete/OptionsModal/OptionsModal.js +2 -3
  90. package/components/TreeAsyncAutocomplete/OptionsModal/styles.d.ts +17 -0
  91. package/components/TreeAsyncAutocomplete/OptionsModal/styles.js +75 -5
  92. package/components/TreeAutocomplete/OptionsModal/NoData/styles.js +5 -0
  93. package/components/TreeAutocomplete/OptionsModal/OptionsModal.js +2 -3
  94. package/components/TreeAutocomplete/OptionsModal/styles.d.ts +17 -0
  95. package/components/TreeAutocomplete/OptionsModal/styles.js +36 -0
  96. package/components/TreeLikeAsyncAutocomplete/OptionsModal/NoData/styles.js +5 -0
  97. package/components/TreeLikeAsyncAutocomplete/OptionsModal/OptionsModal.js +5 -9
  98. package/components/TreeLikeAsyncAutocomplete/OptionsModal/styles.d.ts +35 -0
  99. package/components/TreeLikeAsyncAutocomplete/OptionsModal/styles.js +96 -5
  100. package/components/TreeLikeAsyncAutocomplete/OptionsModal/useLogic/useLogic.d.ts +1 -0
  101. package/components/TreeLikeAsyncAutocomplete/OptionsModal/useLogic/useLogic.js +17 -2
  102. package/components/TreeLikeAutocomplete/OptionsModal/NoData/styles.js +5 -0
  103. package/components/TreeLikeAutocomplete/OptionsModal/OptionsModal.js +5 -6
  104. package/components/TreeLikeAutocomplete/OptionsModal/styles.d.ts +27 -0
  105. package/components/TreeLikeAutocomplete/OptionsModal/styles.js +44 -1
  106. package/components/TreeLikeAutocomplete/OptionsModal/useLogic/useLogic.d.ts +1 -0
  107. package/components/TreeLikeAutocomplete/OptionsModal/useLogic/useLogic.js +14 -1
  108. package/components/TreeLikeList/TreeItem/TreeItem.js +11 -4
  109. package/components/TreeLikeList/TreeItem/styles.d.ts +14 -17
  110. package/components/TreeLikeList/TreeItem/styles.js +48 -1
  111. package/components/TreeLikeList/TreeItem/useLogic/useLogic.d.ts +8 -2
  112. package/components/TreeLikeList/TreeItem/useLogic/useLogic.js +35 -13
  113. package/components/TreeLikeList/TreeLikeList.js +2 -2
  114. package/components/TreeLikeList/styles.d.ts +4 -0
  115. package/components/TreeLikeList/styles.js +25 -0
  116. package/node/components/BottomDrawer/index.d.ts +1 -1
  117. package/node/components/BottomDrawer/index.js +3 -1
  118. package/node/components/ClickAwayListener/ClickAwayListener.d.ts +1 -1
  119. package/node/components/ClickAwayListener/ClickAwayListener.js +8 -2
  120. package/node/components/Radio/Radio.js +1 -1
  121. package/node/components/Radio/constants.d.ts +3 -0
  122. package/node/components/Radio/constants.js +4 -1
  123. package/node/components/Radio/index.d.ts +1 -1
  124. package/node/components/Radio/index.js +3 -1
  125. package/node/components/Radio/styles.js +8 -8
  126. package/node/components/Tree/MultipleTreeList/MultipleTreeList.js +1 -1
  127. package/node/components/Tree/MultipleTreeList/TreeItem/TreeItem.js +4 -7
  128. package/node/components/Tree/MultipleTreeList/TreeItem/styles.d.ts +1 -17
  129. package/node/components/Tree/MultipleTreeList/TreeItem/styles.js +18 -1
  130. package/node/components/Tree/MultipleTreeList/TreeItem/useLogic/useLogic.d.ts +4 -1
  131. package/node/components/Tree/MultipleTreeList/TreeItem/useLogic/useLogic.js +8 -2
  132. package/node/components/Tree/MultipleTreeList/styles.d.ts +4 -0
  133. package/node/components/Tree/MultipleTreeList/styles.js +26 -1
  134. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanel.d.ts +2 -0
  135. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanel.js +15 -0
  136. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/MobileSlidePanelContent.d.ts +2 -0
  137. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/MobileSlidePanelContent.js +54 -0
  138. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/index.d.ts +1 -0
  139. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/index.js +17 -0
  140. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/styles.d.ts +404 -0
  141. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/styles.js +175 -0
  142. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/types.d.ts +11 -0
  143. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/types.js +2 -0
  144. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/index.d.ts +3 -0
  145. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/index.js +19 -0
  146. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount/index.d.ts +1 -0
  147. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount/index.js +17 -0
  148. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount/useDelayedUnmount.d.ts +11 -0
  149. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount/useDelayedUnmount.js +22 -0
  150. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/usePanelHeader/index.d.ts +1 -0
  151. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/usePanelHeader/index.js +17 -0
  152. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/usePanelHeader/usePanelHeader.d.ts +24 -0
  153. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/usePanelHeader/usePanelHeader.js +54 -0
  154. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useRegisterClose/index.d.ts +1 -0
  155. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useRegisterClose/index.js +17 -0
  156. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useRegisterClose/useRegisterClose.d.ts +13 -0
  157. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useRegisterClose/useRegisterClose.js +21 -0
  158. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/index.d.ts +1 -0
  159. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/index.js +17 -0
  160. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/useLogic.d.ts +19 -0
  161. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/useLogic.js +43 -0
  162. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContext.d.ts +13 -0
  163. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContext.js +9 -0
  164. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContextProvider/MobileSlidePanelContextProvider.d.ts +7 -0
  165. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContextProvider/MobileSlidePanelContextProvider.js +16 -0
  166. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContextProvider/index.d.ts +1 -0
  167. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContextProvider/index.js +17 -0
  168. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/index.d.ts +2 -0
  169. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/index.js +18 -0
  170. package/node/components/Tree/TreeItem/MobileSlidePanel/constants.d.ts +11 -0
  171. package/node/components/Tree/TreeItem/MobileSlidePanel/constants.js +15 -0
  172. package/node/components/Tree/TreeItem/MobileSlidePanel/index.d.ts +2 -0
  173. package/node/components/Tree/TreeItem/MobileSlidePanel/index.js +18 -0
  174. package/node/components/Tree/TreeItem/MobileSlidePanel/types.d.ts +49 -0
  175. package/node/components/Tree/TreeItem/MobileSlidePanel/types.js +2 -0
  176. package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/index.d.ts +1 -0
  177. package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/index.js +17 -0
  178. package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/usePanelStack/index.d.ts +1 -0
  179. package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/usePanelStack/index.js +17 -0
  180. package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/usePanelStack/usePanelStack.d.ts +14 -0
  181. package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/usePanelStack/usePanelStack.js +66 -0
  182. package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/index.d.ts +1 -0
  183. package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/index.js +17 -0
  184. package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/useLogic.d.ts +9 -0
  185. package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/useLogic.js +15 -0
  186. package/node/components/Tree/TreeItem/TreeItem.d.ts +2 -1
  187. package/node/components/Tree/TreeItem/TreeItem.js +48 -9
  188. package/node/components/Tree/TreeItem/constants.d.ts +9 -0
  189. package/node/components/Tree/TreeItem/constants.js +10 -1
  190. package/node/components/Tree/TreeItem/styles.d.ts +4 -13
  191. package/node/components/Tree/TreeItem/styles.js +153 -39
  192. package/node/components/Tree/TreeItem/types.d.ts +18 -0
  193. package/node/components/Tree/TreeItem/useLogic/useLogic.d.ts +21 -7
  194. package/node/components/Tree/TreeItem/useLogic/useLogic.js +39 -1
  195. package/node/components/Tree/TreeList/TreeItem/TreeItem.js +4 -4
  196. package/node/components/Tree/TreeList/TreeItem/styles.d.ts +19 -0
  197. package/node/components/Tree/TreeList/TreeItem/styles.js +60 -1
  198. package/node/components/Tree/TreeList/TreeItem/useLogic/useLogic.d.ts +6 -0
  199. package/node/components/Tree/TreeList/TreeItem/useLogic/useLogic.js +11 -0
  200. package/node/components/Tree/TreeList/TreeList.js +1 -1
  201. package/node/components/Tree/TreeList/styles.d.ts +4 -0
  202. package/node/components/Tree/TreeList/styles.js +27 -1
  203. package/node/components/TreeAsyncAutocomplete/OptionsModal/NoData/styles.js +5 -0
  204. package/node/components/TreeAsyncAutocomplete/OptionsModal/OptionsModal.js +1 -2
  205. package/node/components/TreeAsyncAutocomplete/OptionsModal/styles.d.ts +17 -0
  206. package/node/components/TreeAsyncAutocomplete/OptionsModal/styles.js +76 -6
  207. package/node/components/TreeAutocomplete/OptionsModal/NoData/styles.js +5 -0
  208. package/node/components/TreeAutocomplete/OptionsModal/OptionsModal.js +1 -2
  209. package/node/components/TreeAutocomplete/OptionsModal/styles.d.ts +17 -0
  210. package/node/components/TreeAutocomplete/OptionsModal/styles.js +37 -1
  211. package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/NoData/styles.js +5 -0
  212. package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/OptionsModal.js +3 -7
  213. package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/styles.d.ts +35 -0
  214. package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/styles.js +97 -6
  215. package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/useLogic/useLogic.d.ts +1 -0
  216. package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/useLogic/useLogic.js +17 -2
  217. package/node/components/TreeLikeAutocomplete/OptionsModal/NoData/styles.js +5 -0
  218. package/node/components/TreeLikeAutocomplete/OptionsModal/OptionsModal.js +3 -4
  219. package/node/components/TreeLikeAutocomplete/OptionsModal/styles.d.ts +27 -0
  220. package/node/components/TreeLikeAutocomplete/OptionsModal/styles.js +45 -2
  221. package/node/components/TreeLikeAutocomplete/OptionsModal/useLogic/useLogic.d.ts +1 -0
  222. package/node/components/TreeLikeAutocomplete/OptionsModal/useLogic/useLogic.js +14 -1
  223. package/node/components/TreeLikeList/TreeItem/TreeItem.js +9 -2
  224. package/node/components/TreeLikeList/TreeItem/styles.d.ts +14 -17
  225. package/node/components/TreeLikeList/TreeItem/styles.js +48 -1
  226. package/node/components/TreeLikeList/TreeItem/useLogic/useLogic.d.ts +8 -2
  227. package/node/components/TreeLikeList/TreeItem/useLogic/useLogic.js +34 -12
  228. package/node/components/TreeLikeList/TreeLikeList.js +1 -1
  229. package/node/components/TreeLikeList/styles.d.ts +4 -0
  230. package/node/components/TreeLikeList/styles.js +26 -1
  231. package/package.json +1 -1
@@ -9,4 +9,31 @@ export declare const TreeListWrapper: import("../../styled").StyledComponent<{
9
9
  theme?: import("@emotion/react").Theme | undefined;
10
10
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
11
11
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
12
+ export declare const SearchFieldWrapper: import("../../styled").StyledComponent<{
13
+ theme?: import("@emotion/react").Theme | undefined;
14
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
15
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
16
+ export declare const StyledPaper: import("../../styled").StyledComponent<Omit<import("../../Paper").PaperProps, "ref"> & import("react").RefAttributes<HTMLDivElement> & {
17
+ theme?: import("@emotion/react").Theme | undefined;
18
+ }, {}, {}>;
19
+ export declare const CancelButton: import("../../styled").StyledComponent<Omit<import("../..").WithoutEmotionSpecific<import("@mui/material").ButtonProps>, "color" | "component" | "size" | "variant" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple"> & {
20
+ variant?: "light" | "link" | "text" | "contained" | "outlined" | undefined;
21
+ loading?: boolean | undefined;
22
+ color?: "primary" | "success" | "warning" | "error" | "grey" | undefined;
23
+ component?: import("react").ElementType | undefined;
24
+ selected?: boolean | undefined;
25
+ size?: "large" | "medium" | undefined;
26
+ } & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, ""> & import("react").RefAttributes<HTMLButtonElement> & {
27
+ theme?: import("@emotion/react").Theme | undefined;
28
+ }, {}, {}>;
29
+ export declare const ResetButton: import("../../styled").StyledComponent<Omit<import("../..").WithoutEmotionSpecific<import("@mui/material").ButtonProps>, "color" | "component" | "size" | "variant" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple"> & {
30
+ variant?: "light" | "link" | "text" | "contained" | "outlined" | undefined;
31
+ loading?: boolean | undefined;
32
+ color?: "primary" | "success" | "warning" | "error" | "grey" | undefined;
33
+ component?: import("react").ElementType | undefined;
34
+ selected?: boolean | undefined;
35
+ size?: "large" | "medium" | undefined;
36
+ } & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, ""> & import("react").RefAttributes<HTMLButtonElement> & {
37
+ theme?: import("@emotion/react").Theme | undefined;
38
+ }, {}, {}>;
12
39
  export {};
@@ -1,5 +1,9 @@
1
+ import { paperClasses } from '@mui/material/Paper';
2
+ import { DEFAULT_HEADER_HEIGHT, OFFSET_TOP_SCREEN } from '../../BottomDrawer';
3
+ import { Button } from '../../Button';
1
4
  import { DIALOG_SIZES } from '../../Dialog';
2
5
  import { DialogContent } from '../../DialogContent';
6
+ import { Paper } from '../../Paper';
3
7
  import { styled } from '../../styled';
4
8
  export const StyledDialogContent = styled(DialogContent, {
5
9
  shouldForwardProp: (prop) => !['$size'].includes(prop),
@@ -11,9 +15,20 @@ export const StyledDialogContent = styled(DialogContent, {
11
15
 
12
16
  width: ${({ $size }) => DIALOG_SIZES[$size].minWidth};
13
17
  height: ${({ $size }) => DIALOG_SIZES[$size].minWidth};
14
-
18
+
15
19
  ${({ theme }) => theme.breakpoints.down('sm')} {
16
20
  width: auto;
21
+ padding: 0;
22
+ gap: ${({ theme }) => theme.spacing(3)};
23
+
24
+ height: calc(100vh - ${OFFSET_TOP_SCREEN} - ${DEFAULT_HEADER_HEIGHT}px - 72px);
25
+
26
+ /* Причина игнора: Прогрессивное улучшение */
27
+ /* stylelint-disable plugin/no-unsupported-browser-features */
28
+ @supports (height: 100dvh) {
29
+ height: calc(100dvh - ${OFFSET_TOP_SCREEN} - ${DEFAULT_HEADER_HEIGHT}px - 72px);
30
+ }
31
+ /* stylelint-enable plugin/no-unsupported-browser-features */
17
32
  }
18
33
  `;
19
34
  export const TreeListWrapper = styled.div `
@@ -21,3 +36,31 @@ export const TreeListWrapper = styled.div `
21
36
 
22
37
  height: 100%;
23
38
  `;
39
+ export const SearchFieldWrapper = styled.div `
40
+ ${({ theme }) => theme.breakpoints.down('sm')} {
41
+ padding: ${({ theme }) => theme.spacing(3, 4, 0)};
42
+ }
43
+ `;
44
+ export const StyledPaper = styled(Paper) `
45
+ ${({ theme }) => theme.breakpoints.down('sm')} {
46
+ &.${paperClasses.root} {
47
+ border-top-left-radius: 0;
48
+ border-top-right-radius: 0;
49
+ }
50
+
51
+ border: unset;
52
+ }
53
+ `;
54
+ export const CancelButton = styled(Button) `
55
+ ${({ theme }) => theme.breakpoints.down('sm')} {
56
+ display: none;
57
+ }
58
+ `;
59
+ export const ResetButton = styled(Button) `
60
+ display: none;
61
+
62
+ ${({ theme }) => theme.breakpoints.down('sm')} {
63
+ display: flex;
64
+ margin-left: auto;
65
+ }
66
+ `;
@@ -13,6 +13,7 @@ type UseLogicResult = {
13
13
  treeLikeListProps: TreeLikeListProps;
14
14
  cancelButtonProps: ButtonProps;
15
15
  confirmButtonProps: ButtonProps;
16
+ resetButtonProps: ButtonProps;
16
17
  };
17
18
  export declare const useLogic: ({ isOpen, isLoading, isLoadingError, initialValue, options, filterOptions, onChange, onClose, size, }: UseLogicParams) => UseLogicResult;
18
19
  export {};
@@ -1,5 +1,6 @@
1
1
  import { useEffect, useMemo, useState, } from 'react';
2
2
  import { deepMap } from '../../../utils/array';
3
+ import { checkIsDeepEqual } from '../../../utils/checkIsDeepEqual';
3
4
  import { findInTree } from './utils';
4
5
  export const useLogic = ({ isOpen, isLoading, isLoadingError, initialValue, options, filterOptions, onChange, onClose, size = 'md', }) => {
5
6
  const [value, setValue] = useState(initialValue);
@@ -41,8 +42,16 @@ export const useLogic = ({ isOpen, isLoading, isLoadingError, initialValue, opti
41
42
  onChange?.(value);
42
43
  onClose?.(event, 'escapeKeyDown');
43
44
  };
45
+ const handleReset = () => {
46
+ const isSameAsInitial = checkIsDeepEqual([...(value ?? [])].sort(), [...(initialValue ?? [])].sort());
47
+ if (!isSameAsInitial) {
48
+ setValue(initialValue);
49
+ return;
50
+ }
51
+ setValue(undefined);
52
+ };
44
53
  const isNoResult = Boolean(searchValue) && !filteredOptions.length;
45
- const isDisabledButton = !value || !value.length || isNoResult;
54
+ const isDisabledButton = isNoResult || (!value?.length && !initialValue?.length);
46
55
  return {
47
56
  isNoResult,
48
57
  modalProps: {
@@ -66,5 +75,9 @@ export const useLogic = ({ isOpen, isLoading, isLoadingError, initialValue, opti
66
75
  disabled: isDisabledButton,
67
76
  onClick: handleClick,
68
77
  },
78
+ resetButtonProps: {
79
+ disabled: !value?.length,
80
+ onClick: handleReset,
81
+ },
69
82
  };
70
83
  };
@@ -1,14 +1,21 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Button } from '../../Button';
3
+ import { ClickAwayListener } from '../../ClickAwayListener';
3
4
  import { FormControlLabel } from '../../FormControlLabel';
4
- import { List, PopoverContent, StyledCheckbox, StyledTooltip, StyledTreeItem, } from './styles';
5
+ import { ConfirmChildrenButton, ConfirmChildrenCollapse, List, PopoverContent, StyledCheckbox, StyledTooltip, StyledTreeItem, } from './styles';
5
6
  import { useLogic } from './useLogic';
6
7
  export const TreeItem = (props) => {
7
- const { isSelected, isDefaultExpanded, disabledReason, isDisabled, nextLevel, formControlLabelProps, tooltipProps, confirmChildrenButtonProps, handleChange, } = useLogic(props);
8
+ const { isSelected, isDefaultExpanded, disabledReason, isDisabled, nextLevel, formControlLabelProps, confirmChildrenProps, confirmChildrenButtonProps, handleChange, handleMobileOpenChange, isMobile, isMobilePanelOpen, isConfirmChildrenAvailable, itemRef, confirmChildrenExcludeNodes, } = useLogic(props);
8
9
  const { item, prefixId, level, renderItem, value, isConfirmChildrenSelection, isInitialExpanded, expandedLevel, chainsToSelectedItem, disabledItems, onChange, isObjectMode, } = props;
9
10
  const { id, label, note, children = [], options } = item;
11
+ const itemLabel = renderItem ? renderItem({ label, note, id }) : label;
12
+ const confirmChildrenButtonLabel = !isSelected
13
+ ? 'Исключить дочерние'
14
+ : 'Выбрать дочерние';
15
+ const renderConfirmChildrenCollapse = () => (_jsx(ConfirmChildrenCollapse, { in: confirmChildrenProps.open, unmountOnExit: true, children: _jsx(ConfirmChildrenButton, { variant: "light", ...confirmChildrenButtonProps, children: confirmChildrenButtonLabel }) }));
10
16
  if (children.length) {
11
- return (_jsx(StyledTreeItem, { id: id, prefixId: prefixId, isSelected: isSelected, isDefaultExpanded: isDefaultExpanded, isForceExpanded: options?.isForceExpanded, disabledReason: disabledReason, isDisabled: isDisabled, note: renderItem ? null : note, isNotBlockingExpandList: true, component: "li", label: _jsx(FormControlLabel, { control: _jsx(StyledTooltip, { arrow: false, placement: "right", leaveDelay: 250, title: _jsx(PopoverContent, { children: _jsx(Button, { variant: "light", ...confirmChildrenButtonProps, children: !isSelected ? 'Исключить дочерние' : 'Выбрать дочерние' }) }), ...tooltipProps, children: _jsx(StyledCheckbox, { checked: isSelected }) }), label: renderItem ? renderItem({ label, note, id }) : label, ...formControlLabelProps }), level: level, onClick: handleChange, children: _jsx(List, { children: children.map((child) => (_jsx(TreeItem, { isObjectMode: isObjectMode, prefixId: prefixId, item: child, renderItem: renderItem, level: nextLevel, isConfirmChildrenSelection: isConfirmChildrenSelection, isInitialExpanded: isInitialExpanded, expandedLevel: expandedLevel, chainsToSelectedItem: chainsToSelectedItem, disabledItems: disabledItems, value: value, onChange: onChange }, child.id))) }) }));
17
+ const checkbox = _jsx(StyledCheckbox, { checked: isSelected });
18
+ return (_jsxs(_Fragment, { children: [_jsx(StyledTreeItem, { ref: itemRef, id: id, prefixId: prefixId, isSelected: isSelected, isDefaultExpanded: isDefaultExpanded, isForceExpanded: options?.isForceExpanded, disabledReason: disabledReason, isDisabled: isDisabled, note: renderItem ? null : note, isNotBlockingExpandList: true, component: "li", label: _jsx(FormControlLabel, { control: isMobile ? (checkbox) : (_jsx(StyledTooltip, { arrow: false, placement: "right", leaveDelay: 250, title: _jsx(PopoverContent, { children: _jsx(Button, { variant: "light", ...confirmChildrenButtonProps, children: confirmChildrenButtonLabel }) }), ...confirmChildrenProps, children: checkbox })), label: itemLabel, ...formControlLabelProps }), mobileHeaderLabel: itemLabel, mobileHeaderControl: _jsx(StyledCheckbox, { checked: isSelected, disabled: isDisabled, onChange: handleChange }), mobileHeaderAdditionalContent: isConfirmChildrenAvailable && isMobilePanelOpen ? (_jsx(ClickAwayListener, { isActive: confirmChildrenProps.open, onClickAway: confirmChildrenProps.onClose, children: renderConfirmChildrenCollapse() })) : undefined, level: level, onClick: handleChange, onMobilePanelOpenChange: handleMobileOpenChange, children: _jsx(List, { children: children.map((child) => (_jsx(TreeItem, { isObjectMode: isObjectMode, prefixId: prefixId, item: child, renderItem: renderItem, level: nextLevel, isConfirmChildrenSelection: isConfirmChildrenSelection, isInitialExpanded: isInitialExpanded, expandedLevel: expandedLevel, chainsToSelectedItem: chainsToSelectedItem, disabledItems: disabledItems, value: value, onChange: onChange }, child.id))) }) }), isConfirmChildrenAvailable && !isMobilePanelOpen && (_jsx(ClickAwayListener, { isActive: confirmChildrenProps.open, excludeNodes: confirmChildrenExcludeNodes, onClickAway: confirmChildrenProps.onClose, children: _jsx("li", { children: renderConfirmChildrenCollapse() }) }))] }));
12
19
  }
13
20
  return (_jsx(StyledTreeItem, { id: id, prefixId: prefixId, isSelected: isSelected, isDisabled: isDisabled, disabledReason: disabledReason, note: renderItem ? null : note, component: "li", label: _jsx(FormControlLabel, { control: _jsx(StyledCheckbox, { checked: isSelected }), label: renderItem ? renderItem({ label, note, id }) : label, ...formControlLabelProps }), level: level, onClick: handleChange }));
14
21
  };
@@ -14,23 +14,7 @@ export declare const StyledCheckbox: import("../../styled").StyledComponent<impo
14
14
  } & import("react").RefAttributes<HTMLInputElement> & {
15
15
  theme?: import("@emotion/react").Theme | undefined;
16
16
  }, {}, {}>;
17
- export declare const StyledTreeItem: import("../../styled").StyledComponent<{
18
- className?: string | undefined;
19
- prefixId?: string | undefined;
20
- isSelected: boolean;
21
- label: import("react").ReactNode;
22
- note?: import("react").ReactNode;
23
- renderItem?: import("../..").SyncFunctionComponent<Omit<import("../../Tree").TreeListData, "children">> | undefined;
24
- children?: import("react").ReactNode;
25
- component?: import("react").ElementType | undefined;
26
- level: number;
27
- isDisabled?: boolean | undefined;
28
- disabledReason?: string | undefined;
29
- isNotBlockingExpandList?: boolean | undefined;
30
- isDefaultExpanded?: boolean | undefined;
31
- isForceExpanded?: boolean | undefined;
32
- onClick?: ((event: import("react").SyntheticEvent<Element, Event>) => void) | undefined;
33
- } & Omit<any, ""> & {
17
+ export declare const StyledTreeItem: import("../../styled").StyledComponent<Omit<import("../../Tree/TreeItem").TreeItemProps, "ref"> & import("react").RefAttributes<HTMLLIElement> & {
34
18
  theme?: import("@emotion/react").Theme | undefined;
35
19
  }, {}, {}>;
36
20
  export declare const List: import("../../styled").StyledComponent<{
@@ -44,3 +28,16 @@ export declare const PopoverContent: import("../../styled").StyledComponent<{
44
28
  theme?: import("@emotion/react").Theme | undefined;
45
29
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
46
30
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
31
+ export declare const ConfirmChildrenCollapse: import("../../styled").StyledComponent<import("../../Collapse").CollapseProps & {
32
+ theme?: import("@emotion/react").Theme | undefined;
33
+ }, {}, {}>;
34
+ export declare const ConfirmChildrenButton: import("../../styled").StyledComponent<Omit<import("../..").WithoutEmotionSpecific<import("@mui/material").ButtonProps>, "color" | "component" | "size" | "variant" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple"> & {
35
+ variant?: "light" | "link" | "text" | "contained" | "outlined" | undefined;
36
+ loading?: boolean | undefined;
37
+ color?: "primary" | "success" | "warning" | "error" | "grey" | undefined;
38
+ component?: import("react").ElementType | undefined;
39
+ selected?: boolean | undefined;
40
+ size?: "large" | "medium" | undefined;
41
+ } & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, ""> & import("react").RefAttributes<HTMLButtonElement> & {
42
+ theme?: import("@emotion/react").Theme | undefined;
43
+ }, {}, {}>;
@@ -1,5 +1,8 @@
1
+ import { formControlLabelClasses } from '@mui/material/FormControlLabel';
1
2
  import { tooltipClasses } from '@mui/material/Tooltip';
2
- import { Checkbox } from '../../Checkbox';
3
+ import { Button } from '../../Button';
4
+ import { Checkbox, checkboxClassnames, MOBILE_CHECKBOX_SIZE, } from '../../Checkbox';
5
+ import { Collapse } from '../../Collapse';
3
6
  import { styled } from '../../styled';
4
7
  import { listContainer } from '../../styled/mixins';
5
8
  import { Tooltip } from '../../Tooltip';
@@ -7,6 +10,14 @@ import { TreeItem, treeClassnames } from '../../Tree';
7
10
  export const StyledCheckbox = styled(Checkbox) `
8
11
  padding-top: 0;
9
12
  padding-bottom: 0;
13
+
14
+ ${({ theme }) => theme.breakpoints.down('sm')} {
15
+ height: 20px;
16
+
17
+ & .${checkboxClassnames.iconWrapper}, & .${checkboxClassnames.input} {
18
+ height: 20px;
19
+ }
20
+ }
10
21
  `;
11
22
  export const StyledTreeItem = styled(TreeItem) `
12
23
  .${treeClassnames.note} {
@@ -15,6 +26,21 @@ export const StyledTreeItem = styled(TreeItem) `
15
26
  /* Добавляем к отступу ширину контейнера с чекбоксом */
16
27
  margin-left: ${({ theme }) => `calc(${theme.spacing(1)} + 32px)`};
17
28
  }
29
+
30
+ ${({ theme }) => theme.breakpoints.down('sm')} {
31
+ & .${formControlLabelClasses.root} {
32
+ margin-left: 0;
33
+ gap: ${({ theme }) => theme.spacing(1)};
34
+ }
35
+
36
+ & .${formControlLabelClasses.root} .${formControlLabelClasses.label} {
37
+ margin-left: 0;
38
+ }
39
+
40
+ & .${treeClassnames.note} {
41
+ margin-left: ${({ theme }) => `calc(${theme.spacing(1)} + ${MOBILE_CHECKBOX_SIZE})`};
42
+ }
43
+ }
18
44
  `;
19
45
  export const List = styled.ul `
20
46
  ${listContainer};
@@ -29,4 +55,25 @@ export const StyledTooltip = styled(Tooltip) `
29
55
  `;
30
56
  export const PopoverContent = styled.div `
31
57
  padding: ${({ theme }) => theme.spacing(1)};
58
+
59
+ ${({ theme }) => theme.breakpoints.down('sm')} {
60
+ padding: ${({ theme }) => theme.spacing(3, 2)};
61
+ }
62
+ `;
63
+ export const ConfirmChildrenCollapse = styled(Collapse) `
64
+ ${({ theme }) => theme.breakpoints.down('sm')} {
65
+ border-bottom: 1px solid
66
+ ${({ theme }) => theme.palette.components.border.default};
67
+ }
68
+ `;
69
+ export const ConfirmChildrenButton = styled(Button) `
70
+ ${({ theme }) => theme.breakpoints.down('sm')} {
71
+ justify-content: flex-start;
72
+
73
+ width: 100%;
74
+ height: auto;
75
+ padding: ${({ theme }) => theme.spacing(3, 4)};
76
+
77
+ border-radius: 0;
78
+ }
32
79
  `;
@@ -8,18 +8,24 @@ export declare const useLogic: <TValue extends MultipleValue = string[]>({ item,
8
8
  isDisabled: boolean;
9
9
  disabledReason: string | undefined;
10
10
  nextLevel: number;
11
+ confirmChildrenExcludeNodes: import("react").RefObject<HTMLLIElement | null>[];
12
+ itemRef: import("react").RefObject<HTMLLIElement | null>;
11
13
  formControlLabelProps: {
12
14
  disabled: boolean;
13
15
  onChange: () => void;
14
16
  onClick: (event: SyntheticEvent) => void;
15
17
  };
16
- tooltipProps: {
18
+ confirmChildrenProps: {
17
19
  open: boolean;
18
20
  onClose: (...a: unknown[]) => void;
19
21
  };
20
22
  confirmChildrenButtonProps: {
21
- onClick: () => void;
23
+ onClick: (event: SyntheticEvent) => void;
22
24
  };
23
25
  handleChange: () => void;
26
+ handleMobileOpenChange: (isOpen: boolean) => void;
27
+ isMobile: boolean;
28
+ isMobilePanelOpen: boolean;
29
+ isConfirmChildrenAvailable: boolean | undefined;
24
30
  };
25
31
  export {};
@@ -1,9 +1,13 @@
1
- import { useMemo } from 'react';
1
+ import { useMemo, useRef, useState } from 'react';
2
2
  import { useToggle } from '../../../useToggle';
3
+ import { useViewportType } from '../../../useViewportType';
3
4
  import { addItem, addItemsByIds, checkIsSelected, getAllChildrenId, getCurrentValueIds, removeItem, removeItemsByIds, } from './utils';
4
5
  export const useLogic = ({ item, value = [], level, isConfirmChildrenSelection, isInitialExpanded, expandedLevel, chainsToSelectedItem = [], disabledItems, onChange, isObjectMode, }) => {
5
6
  const { id, children } = item;
6
- const [isTooltipOpen, openTooltip, closeTooltip] = useToggle();
7
+ const [isConfirmChildrenOpen, openConfirmChildren, closeConfirmChildren] = useToggle();
8
+ const [isMobilePanelOpen, setIsMobilePanelOpen] = useState(false);
9
+ const itemRef = useRef(null);
10
+ const { isMobile } = useViewportType();
7
11
  const childrenIds = useMemo(() => getAllChildrenId(children, disabledItems), [children, disabledItems]);
8
12
  const isSelected = checkIsSelected(value, id);
9
13
  const flatChainsToSelectedItem = useMemo(() => chainsToSelectedItem?.reduce((acc, chain) => acc.concat(chain), []), [chainsToSelectedItem]);
@@ -13,6 +17,16 @@ export const useLogic = ({ item, value = [], level, isConfirmChildrenSelection,
13
17
  const isDisabled = Boolean(disabledItem);
14
18
  const disabledReason = disabledItem?.disabledReason;
15
19
  const nextLevel = level + 1;
20
+ const toggleConfirmChildren = (isOpen) => {
21
+ if (!isConfirmChildrenSelection) {
22
+ return;
23
+ }
24
+ if (isOpen) {
25
+ openConfirmChildren();
26
+ return;
27
+ }
28
+ closeConfirmChildren();
29
+ };
16
30
  const handleChange = () => {
17
31
  if (isDisabled) {
18
32
  return;
@@ -21,9 +35,7 @@ export const useLogic = ({ item, value = [], level, isConfirmChildrenSelection,
21
35
  // Сбрасываем значение
22
36
  if (currentValueIds.includes(id)) {
23
37
  const hasSelectedChildren = childrenIds.some((childrenId) => currentValueIds.includes(childrenId));
24
- if (isConfirmChildrenSelection && hasSelectedChildren) {
25
- openTooltip();
26
- }
38
+ toggleConfirmChildren(hasSelectedChildren);
27
39
  const newValue = removeItem(value, id);
28
40
  return onChange(newValue);
29
41
  }
@@ -31,11 +43,14 @@ export const useLogic = ({ item, value = [], level, isConfirmChildrenSelection,
31
43
  const newValue = addItem(value, item, isObjectMode);
32
44
  onChange(newValue);
33
45
  const isAllChildrenSelected = childrenIds.every((childrenId) => currentValueIds.includes(childrenId));
34
- if (isConfirmChildrenSelection && !isAllChildrenSelected) {
35
- openTooltip();
36
- }
46
+ toggleConfirmChildren(!isAllChildrenSelected);
37
47
  };
38
- const handleConfirmChildrenSelection = () => {
48
+ const handleMobileOpenChange = (isOpen) => {
49
+ setIsMobilePanelOpen(isOpen);
50
+ closeConfirmChildren();
51
+ };
52
+ const handleConfirmChildrenSelection = (event) => {
53
+ event.stopPropagation();
39
54
  const currentValueIds = getCurrentValueIds(value);
40
55
  if (isSelected) {
41
56
  // Элемент выбран - выбираем все дочерние элементы
@@ -49,7 +64,7 @@ export const useLogic = ({ item, value = [], level, isConfirmChildrenSelection,
49
64
  const newValue = removeItemsByIds(value, idsToRemove);
50
65
  onChange(newValue);
51
66
  }
52
- closeTooltip();
67
+ closeConfirmChildren();
53
68
  };
54
69
  /**
55
70
  * Предотвращаем всплытие события, так как клик в области чекбокса или label вызывает обработчик на уровне всего item
@@ -57,24 +72,31 @@ export const useLogic = ({ item, value = [], level, isConfirmChildrenSelection,
57
72
  const handleClick = (event) => {
58
73
  event.stopPropagation();
59
74
  };
75
+ const confirmChildrenExcludeNodes = useMemo(() => [itemRef], []);
60
76
  return {
61
77
  isSelected,
62
78
  isDefaultExpanded,
63
79
  isDisabled,
64
80
  disabledReason,
65
81
  nextLevel,
82
+ confirmChildrenExcludeNodes,
83
+ itemRef,
66
84
  formControlLabelProps: {
67
85
  disabled: isDisabled,
68
86
  onChange: handleChange,
69
87
  onClick: handleClick,
70
88
  },
71
- tooltipProps: {
72
- open: isTooltipOpen,
73
- onClose: closeTooltip,
89
+ confirmChildrenProps: {
90
+ open: isConfirmChildrenOpen,
91
+ onClose: closeConfirmChildren,
74
92
  },
75
93
  confirmChildrenButtonProps: {
76
94
  onClick: handleConfirmChildrenSelection,
77
95
  },
78
96
  handleChange,
97
+ handleMobileOpenChange,
98
+ isMobile,
99
+ isMobilePanelOpen,
100
+ isConfirmChildrenAvailable: isMobile && isConfirmChildrenSelection,
79
101
  };
80
102
  };
@@ -1,12 +1,12 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { treeListClassnames } from '../Tree';
3
3
  import { cn } from '../utils/cn';
4
- import { List } from './styles';
4
+ import { List, ListWrapper } from './styles';
5
5
  import { TreeItem } from './TreeItem';
6
6
  import { useLogic } from './useLogic';
7
7
  const INITIAL_LEVEL = 0;
8
8
  export const TreeLikeList = (props) => {
9
9
  const { listProps, itemProps } = useLogic(props);
10
10
  const { data, className, expandedLevel = 10, disabledItems, ...restProps } = props;
11
- return (_jsx(List, { className: cn(className, treeListClassnames.list), ...listProps, children: data.map((item) => (_jsx(TreeItem, { item: item, level: INITIAL_LEVEL, expandedLevel: expandedLevel, ...itemProps, ...restProps }, item.id))) }));
11
+ return (_jsx(ListWrapper, { children: _jsx(List, { className: cn(className, treeListClassnames.list), ...listProps, children: data.map((item) => (_jsx(TreeItem, { item: item, level: INITIAL_LEVEL, expandedLevel: expandedLevel, ...itemProps, ...restProps }, item.id))) }) }));
12
12
  };
@@ -1,4 +1,8 @@
1
1
  /// <reference types="react" />
2
+ export declare const ListWrapper: import("../styled").StyledComponent<{
3
+ theme?: import("@emotion/react").Theme | undefined;
4
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
5
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
2
6
  export declare const List: import("../styled").StyledComponent<{
3
7
  theme?: import("@emotion/react").Theme | undefined;
4
8
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
@@ -1,8 +1,33 @@
1
1
  import { styled } from '../styled';
2
2
  import { listContainer } from '../styled/mixins';
3
+ export const ListWrapper = styled.div `
4
+ display: contents;
5
+
6
+ ${({ theme }) => theme.breakpoints.down('sm')} {
7
+ position: relative;
8
+ z-index: 0;
9
+
10
+ display: flex;
11
+ flex-direction: column;
12
+
13
+ height: 100%;
14
+ min-height: 0;
15
+
16
+ overflow: hidden;
17
+
18
+ transform: translateZ(0);
19
+ }
20
+ `;
3
21
  export const List = styled.ul `
4
22
  ${listContainer};
5
23
  overflow: hidden;
24
+
25
+ ${({ theme }) => theme.breakpoints.down('sm')} {
26
+ flex-grow: 1;
27
+ min-height: 0;
28
+
29
+ overflow-y: auto;
30
+ }
6
31
  `;
7
32
  export const InnerList = styled(List) `
8
33
  overflow: unset;
@@ -1,2 +1,2 @@
1
1
  export * from './BottomDrawer';
2
- export { bottomDrawerClassnames } from './constants';
2
+ export { bottomDrawerClassnames, OFFSET_TOP_SCREEN, DEFAULT_HEADER_HEIGHT, } from './constants';
@@ -14,7 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.bottomDrawerClassnames = void 0;
17
+ exports.DEFAULT_HEADER_HEIGHT = exports.OFFSET_TOP_SCREEN = exports.bottomDrawerClassnames = void 0;
18
18
  __exportStar(require("./BottomDrawer"), exports);
19
19
  var constants_1 = require("./constants");
20
20
  Object.defineProperty(exports, "bottomDrawerClassnames", { enumerable: true, get: function () { return constants_1.bottomDrawerClassnames; } });
21
+ Object.defineProperty(exports, "OFFSET_TOP_SCREEN", { enumerable: true, get: function () { return constants_1.OFFSET_TOP_SCREEN; } });
22
+ Object.defineProperty(exports, "DEFAULT_HEADER_HEIGHT", { enumerable: true, get: function () { return constants_1.DEFAULT_HEADER_HEIGHT; } });
@@ -7,4 +7,4 @@ export type ClickAwayListenerProps = Omit<UseClickAwayListenerOptions, 'ref' | '
7
7
  /**
8
8
  * компонент предоставляющий обертку для работы с хуком useClickAwayEffect
9
9
  */
10
- export declare const ClickAwayListener: ({ onClickAway, preventBubbling, isActive, children, }: ClickAwayListenerProps) => ReactElement<any, string | import("react").JSXElementConstructor<any>>;
10
+ export declare const ClickAwayListener: ({ onClickAway, preventBubbling, isActive, excludeNodes, children, }: ClickAwayListenerProps) => ReactElement<any, string | import("react").JSXElementConstructor<any>>;
@@ -6,9 +6,15 @@ const useClickAwayEffect_1 = require("../useClickAwayEffect");
6
6
  /**
7
7
  * компонент предоставляющий обертку для работы с хуком useClickAwayEffect
8
8
  */
9
- const ClickAwayListener = ({ onClickAway, preventBubbling, isActive = true, children, }) => {
9
+ const ClickAwayListener = ({ onClickAway, preventBubbling, isActive = true, excludeNodes, children, }) => {
10
10
  const ref = (0, react_1.useRef)(null);
11
- (0, useClickAwayEffect_1.useClickAwayEffect)({ ref, onClickAway, preventBubbling, isActive });
11
+ (0, useClickAwayEffect_1.useClickAwayEffect)({
12
+ ref,
13
+ onClickAway,
14
+ preventBubbling,
15
+ isActive,
16
+ excludeNodes,
17
+ });
12
18
  // biome-ignore lint/suspicious/noExplicitAny: ReactElement имеет generic unknown по умолчанию и не содержит ref внутри
13
19
  const child = children;
14
20
  return react_1.Children.only((0, react_1.cloneElement)(child, { ref }));
@@ -11,5 +11,5 @@ const useLogic_1 = require("./useLogic");
11
11
  exports.Radio = (0, react_1.forwardRef)((props, ref) => {
12
12
  (0, useCheckControlled_1.useCheckControlled)('Radio', props);
13
13
  const { onChange, isChecked, isError, disabled, restProps, className, name, style, inputRef, value, id, } = (0, useLogic_1.useLogic)(props);
14
- return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { "$isDisabled": disabled, "$isError": isError, "$isChecked": isChecked, className: className, style: style, ref: ref, ...restProps, children: [(0, jsx_runtime_1.jsx)(styles_1.Input, { type: "radio", name: name, checked: isChecked, disabled: disabled, onChange: onChange, "aria-checked": isChecked, "aria-disabled": disabled, ref: inputRef, value: value, id: id }), (0, jsx_runtime_1.jsx)(styles_1.IconWrapper, { className: constants_1.radioClassnames.iconWrapper, children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { className: constants_1.radioClassnames.icon }) })] }));
14
+ return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { "$isDisabled": disabled, "$isError": isError, "$isChecked": isChecked, className: className, style: style, ref: ref, ...restProps, children: [(0, jsx_runtime_1.jsx)(styles_1.Input, { type: "radio", className: constants_1.radioClassnames.input, name: name, checked: isChecked, disabled: disabled, onChange: onChange, "aria-checked": isChecked, "aria-disabled": disabled, ref: inputRef, value: value, id: id }), (0, jsx_runtime_1.jsx)(styles_1.IconWrapper, { className: constants_1.radioClassnames.iconWrapper, children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { className: constants_1.radioClassnames.icon }) })] }));
15
15
  });
@@ -1,5 +1,6 @@
1
1
  export declare const radioClassnames: {
2
2
  readonly root: string;
3
+ readonly input: string;
3
4
  readonly checked: string;
4
5
  readonly disabled: string;
5
6
  readonly iconWrapper: string;
@@ -7,3 +8,5 @@ export declare const radioClassnames: {
7
8
  readonly outerCircle: string;
8
9
  readonly dot: string;
9
10
  };
11
+ export declare const RADIO_SIZE = "32px";
12
+ export declare const MOBILE_RADIO_SIZE = "40px";
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.radioClassnames = void 0;
3
+ exports.MOBILE_RADIO_SIZE = exports.RADIO_SIZE = exports.radioClassnames = void 0;
4
4
  const createUIKitClassname_1 = require("../utils/createUIKitClassname");
5
5
  exports.radioClassnames = {
6
6
  root: (0, createUIKitClassname_1.createUIKitClassname)('radio'),
7
+ input: (0, createUIKitClassname_1.createUIKitClassname)('radio__input'),
7
8
  checked: (0, createUIKitClassname_1.createUIKitClassname)('radio_checked'),
8
9
  disabled: (0, createUIKitClassname_1.createUIKitClassname)('radio_disabled'),
9
10
  iconWrapper: (0, createUIKitClassname_1.createUIKitClassname)('radio__icon-wrapper'),
@@ -11,3 +12,5 @@ exports.radioClassnames = {
11
12
  outerCircle: (0, createUIKitClassname_1.createUIKitClassname)('radio__outer-circle'),
12
13
  dot: (0, createUIKitClassname_1.createUIKitClassname)('radio__dot'),
13
14
  };
15
+ exports.RADIO_SIZE = '32px';
16
+ exports.MOBILE_RADIO_SIZE = '40px';
@@ -1,3 +1,3 @@
1
1
  export { Radio } from './Radio';
2
- export { radioClassnames } from './constants';
2
+ export { radioClassnames, RADIO_SIZE, MOBILE_RADIO_SIZE } from './constants';
3
3
  export type { RadioProps } from './types';
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.radioClassnames = exports.Radio = void 0;
3
+ exports.MOBILE_RADIO_SIZE = exports.RADIO_SIZE = exports.radioClassnames = exports.Radio = void 0;
4
4
  var Radio_1 = require("./Radio");
5
5
  Object.defineProperty(exports, "Radio", { enumerable: true, get: function () { return Radio_1.Radio; } });
6
6
  var constants_1 = require("./constants");
7
7
  Object.defineProperty(exports, "radioClassnames", { enumerable: true, get: function () { return constants_1.radioClassnames; } });
8
+ Object.defineProperty(exports, "RADIO_SIZE", { enumerable: true, get: function () { return constants_1.RADIO_SIZE; } });
9
+ Object.defineProperty(exports, "MOBILE_RADIO_SIZE", { enumerable: true, get: function () { return constants_1.MOBILE_RADIO_SIZE; } });
@@ -85,15 +85,15 @@ exports.Input = styled_1.styled.input `
85
85
 
86
86
  position: absolute;
87
87
 
88
- width: 32px;
89
- height: 32px;
88
+ width: ${constants_1.RADIO_SIZE};
89
+ height: ${constants_1.RADIO_SIZE};
90
90
  margin: 0;
91
91
 
92
92
  opacity: 0;
93
93
 
94
94
  ${({ theme }) => theme.breakpoints.down('sm')} {
95
- width: 40px;
96
- height: 40px;
95
+ width: ${constants_1.MOBILE_RADIO_SIZE};
96
+ height: ${constants_1.MOBILE_RADIO_SIZE};
97
97
  }
98
98
 
99
99
  &:focus-visible {
@@ -109,12 +109,12 @@ exports.IconWrapper = styled_1.styled.span `
109
109
  align-items: center;
110
110
  justify-content: center;
111
111
 
112
- width: 32px;
113
- height: 32px;
112
+ width: ${constants_1.RADIO_SIZE};
113
+ height: ${constants_1.RADIO_SIZE};
114
114
 
115
115
  ${({ theme }) => theme.breakpoints.down('sm')} {
116
- width: 40px;
117
- height: 40px;
116
+ width: ${constants_1.MOBILE_RADIO_SIZE};
117
+ height: ${constants_1.MOBILE_RADIO_SIZE};
118
118
 
119
119
  .${constants_1.radioClassnames.icon} {
120
120
  width: 20px;
@@ -8,6 +8,6 @@ const useLogic_1 = require("./useLogic");
8
8
  const INITIAL_LEVEL = 0;
9
9
  const MultipleTreeList = ({ data, value, className, expandedLevel = 10, disabledItems, ...props }) => {
10
10
  const { formattedDisabledItems } = (0, useLogic_1.useLogic)({ disabledItems });
11
- return ((0, jsx_runtime_1.jsx)(styles_1.List, { className: className, children: data.map((item) => ((0, jsx_runtime_1.jsx)(TreeItem_1.TreeItem, { item: item, value: value, level: INITIAL_LEVEL, expandedLevel: expandedLevel, disabledItems: formattedDisabledItems, ...props }, item.id))) }));
11
+ return ((0, jsx_runtime_1.jsx)(styles_1.ListWrapper, { children: (0, jsx_runtime_1.jsx)(styles_1.List, { className: className, children: data.map((item) => ((0, jsx_runtime_1.jsx)(TreeItem_1.TreeItem, { item: item, value: value, level: INITIAL_LEVEL, expandedLevel: expandedLevel, disabledItems: formattedDisabledItems, ...props }, item.id))) }) }));
12
12
  };
13
13
  exports.MultipleTreeList = MultipleTreeList;