@astral/ui 4.92.2 → 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 (233) 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/Fieldset/styles.js +1 -0
  6. package/components/Radio/Radio.js +1 -1
  7. package/components/Radio/constants.d.ts +3 -0
  8. package/components/Radio/constants.js +3 -0
  9. package/components/Radio/index.d.ts +1 -1
  10. package/components/Radio/index.js +1 -1
  11. package/components/Radio/styles.js +9 -9
  12. package/components/Tree/MultipleTreeList/MultipleTreeList.js +2 -2
  13. package/components/Tree/MultipleTreeList/TreeItem/TreeItem.js +4 -7
  14. package/components/Tree/MultipleTreeList/TreeItem/styles.d.ts +1 -17
  15. package/components/Tree/MultipleTreeList/TreeItem/styles.js +19 -2
  16. package/components/Tree/MultipleTreeList/TreeItem/useLogic/useLogic.d.ts +4 -1
  17. package/components/Tree/MultipleTreeList/TreeItem/useLogic/useLogic.js +8 -2
  18. package/components/Tree/MultipleTreeList/styles.d.ts +4 -0
  19. package/components/Tree/MultipleTreeList/styles.js +25 -0
  20. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanel.d.ts +2 -0
  21. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanel.js +11 -0
  22. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/MobileSlidePanelContent.d.ts +2 -0
  23. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/MobileSlidePanelContent.js +50 -0
  24. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/index.d.ts +1 -0
  25. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/index.js +1 -0
  26. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/styles.d.ts +404 -0
  27. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/styles.js +172 -0
  28. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/types.d.ts +11 -0
  29. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/types.js +1 -0
  30. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/index.d.ts +3 -0
  31. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/index.js +3 -0
  32. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount/index.d.ts +1 -0
  33. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount/index.js +1 -0
  34. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount/useDelayedUnmount.d.ts +11 -0
  35. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount/useDelayedUnmount.js +18 -0
  36. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/usePanelHeader/index.d.ts +1 -0
  37. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/usePanelHeader/index.js +1 -0
  38. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/usePanelHeader/usePanelHeader.d.ts +24 -0
  39. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/usePanelHeader/usePanelHeader.js +50 -0
  40. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useRegisterClose/index.d.ts +1 -0
  41. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useRegisterClose/index.js +1 -0
  42. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useRegisterClose/useRegisterClose.d.ts +13 -0
  43. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useRegisterClose/useRegisterClose.js +17 -0
  44. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/index.d.ts +1 -0
  45. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/index.js +1 -0
  46. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/useLogic.d.ts +19 -0
  47. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/useLogic.js +39 -0
  48. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContext.d.ts +13 -0
  49. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContext.js +6 -0
  50. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContextProvider/MobileSlidePanelContextProvider.d.ts +7 -0
  51. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContextProvider/MobileSlidePanelContextProvider.js +12 -0
  52. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContextProvider/index.d.ts +1 -0
  53. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContextProvider/index.js +1 -0
  54. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/index.d.ts +2 -0
  55. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/index.js +2 -0
  56. package/components/Tree/TreeItem/MobileSlidePanel/constants.d.ts +11 -0
  57. package/components/Tree/TreeItem/MobileSlidePanel/constants.js +12 -0
  58. package/components/Tree/TreeItem/MobileSlidePanel/index.d.ts +2 -0
  59. package/components/Tree/TreeItem/MobileSlidePanel/index.js +2 -0
  60. package/components/Tree/TreeItem/MobileSlidePanel/types.d.ts +49 -0
  61. package/components/Tree/TreeItem/MobileSlidePanel/types.js +1 -0
  62. package/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/index.d.ts +1 -0
  63. package/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/index.js +1 -0
  64. package/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/usePanelStack/index.d.ts +1 -0
  65. package/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/usePanelStack/index.js +1 -0
  66. package/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/usePanelStack/usePanelStack.d.ts +14 -0
  67. package/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/usePanelStack/usePanelStack.js +62 -0
  68. package/components/Tree/TreeItem/MobileSlidePanel/useLogic/index.d.ts +1 -0
  69. package/components/Tree/TreeItem/MobileSlidePanel/useLogic/index.js +1 -0
  70. package/components/Tree/TreeItem/MobileSlidePanel/useLogic/useLogic.d.ts +9 -0
  71. package/components/Tree/TreeItem/MobileSlidePanel/useLogic/useLogic.js +11 -0
  72. package/components/Tree/TreeItem/TreeItem.d.ts +2 -1
  73. package/components/Tree/TreeItem/TreeItem.js +49 -9
  74. package/components/Tree/TreeItem/constants.d.ts +9 -0
  75. package/components/Tree/TreeItem/constants.js +9 -0
  76. package/components/Tree/TreeItem/styles.d.ts +4 -13
  77. package/components/Tree/TreeItem/styles.js +153 -39
  78. package/components/Tree/TreeItem/types.d.ts +18 -0
  79. package/components/Tree/TreeItem/useLogic/useLogic.d.ts +21 -7
  80. package/components/Tree/TreeItem/useLogic/useLogic.js +40 -2
  81. package/components/Tree/TreeList/TreeItem/TreeItem.js +5 -5
  82. package/components/Tree/TreeList/TreeItem/styles.d.ts +19 -0
  83. package/components/Tree/TreeList/TreeItem/styles.js +36 -0
  84. package/components/Tree/TreeList/TreeItem/useLogic/useLogic.d.ts +6 -0
  85. package/components/Tree/TreeList/TreeItem/useLogic/useLogic.js +11 -0
  86. package/components/Tree/TreeList/TreeList.js +2 -2
  87. package/components/Tree/TreeList/styles.d.ts +4 -0
  88. package/components/Tree/TreeList/styles.js +26 -0
  89. package/components/TreeAsyncAutocomplete/OptionsModal/NoData/styles.js +5 -0
  90. package/components/TreeAsyncAutocomplete/OptionsModal/OptionsModal.js +2 -3
  91. package/components/TreeAsyncAutocomplete/OptionsModal/styles.d.ts +17 -0
  92. package/components/TreeAsyncAutocomplete/OptionsModal/styles.js +75 -5
  93. package/components/TreeAutocomplete/OptionsModal/NoData/styles.js +5 -0
  94. package/components/TreeAutocomplete/OptionsModal/OptionsModal.js +2 -3
  95. package/components/TreeAutocomplete/OptionsModal/styles.d.ts +17 -0
  96. package/components/TreeAutocomplete/OptionsModal/styles.js +36 -0
  97. package/components/TreeLikeAsyncAutocomplete/OptionsModal/NoData/styles.js +5 -0
  98. package/components/TreeLikeAsyncAutocomplete/OptionsModal/OptionsModal.js +5 -9
  99. package/components/TreeLikeAsyncAutocomplete/OptionsModal/styles.d.ts +35 -0
  100. package/components/TreeLikeAsyncAutocomplete/OptionsModal/styles.js +96 -5
  101. package/components/TreeLikeAsyncAutocomplete/OptionsModal/useLogic/useLogic.d.ts +1 -0
  102. package/components/TreeLikeAsyncAutocomplete/OptionsModal/useLogic/useLogic.js +17 -2
  103. package/components/TreeLikeAutocomplete/OptionsModal/NoData/styles.js +5 -0
  104. package/components/TreeLikeAutocomplete/OptionsModal/OptionsModal.js +5 -6
  105. package/components/TreeLikeAutocomplete/OptionsModal/styles.d.ts +27 -0
  106. package/components/TreeLikeAutocomplete/OptionsModal/styles.js +44 -1
  107. package/components/TreeLikeAutocomplete/OptionsModal/useLogic/useLogic.d.ts +1 -0
  108. package/components/TreeLikeAutocomplete/OptionsModal/useLogic/useLogic.js +14 -1
  109. package/components/TreeLikeList/TreeItem/TreeItem.js +11 -4
  110. package/components/TreeLikeList/TreeItem/styles.d.ts +14 -17
  111. package/components/TreeLikeList/TreeItem/styles.js +48 -1
  112. package/components/TreeLikeList/TreeItem/useLogic/useLogic.d.ts +8 -2
  113. package/components/TreeLikeList/TreeItem/useLogic/useLogic.js +35 -13
  114. package/components/TreeLikeList/TreeLikeList.js +2 -2
  115. package/components/TreeLikeList/styles.d.ts +4 -0
  116. package/components/TreeLikeList/styles.js +25 -0
  117. package/node/components/BottomDrawer/index.d.ts +1 -1
  118. package/node/components/BottomDrawer/index.js +3 -1
  119. package/node/components/ClickAwayListener/ClickAwayListener.d.ts +1 -1
  120. package/node/components/ClickAwayListener/ClickAwayListener.js +8 -2
  121. package/node/components/Fieldset/styles.js +1 -0
  122. package/node/components/Radio/Radio.js +1 -1
  123. package/node/components/Radio/constants.d.ts +3 -0
  124. package/node/components/Radio/constants.js +4 -1
  125. package/node/components/Radio/index.d.ts +1 -1
  126. package/node/components/Radio/index.js +3 -1
  127. package/node/components/Radio/styles.js +8 -8
  128. package/node/components/Tree/MultipleTreeList/MultipleTreeList.js +1 -1
  129. package/node/components/Tree/MultipleTreeList/TreeItem/TreeItem.js +4 -7
  130. package/node/components/Tree/MultipleTreeList/TreeItem/styles.d.ts +1 -17
  131. package/node/components/Tree/MultipleTreeList/TreeItem/styles.js +18 -1
  132. package/node/components/Tree/MultipleTreeList/TreeItem/useLogic/useLogic.d.ts +4 -1
  133. package/node/components/Tree/MultipleTreeList/TreeItem/useLogic/useLogic.js +8 -2
  134. package/node/components/Tree/MultipleTreeList/styles.d.ts +4 -0
  135. package/node/components/Tree/MultipleTreeList/styles.js +26 -1
  136. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanel.d.ts +2 -0
  137. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanel.js +15 -0
  138. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/MobileSlidePanelContent.d.ts +2 -0
  139. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/MobileSlidePanelContent.js +54 -0
  140. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/index.d.ts +1 -0
  141. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/index.js +17 -0
  142. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/styles.d.ts +404 -0
  143. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/styles.js +175 -0
  144. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/types.d.ts +11 -0
  145. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/types.js +2 -0
  146. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/index.d.ts +3 -0
  147. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/index.js +19 -0
  148. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount/index.d.ts +1 -0
  149. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount/index.js +17 -0
  150. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount/useDelayedUnmount.d.ts +11 -0
  151. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount/useDelayedUnmount.js +22 -0
  152. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/usePanelHeader/index.d.ts +1 -0
  153. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/usePanelHeader/index.js +17 -0
  154. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/usePanelHeader/usePanelHeader.d.ts +24 -0
  155. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/usePanelHeader/usePanelHeader.js +54 -0
  156. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useRegisterClose/index.d.ts +1 -0
  157. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useRegisterClose/index.js +17 -0
  158. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useRegisterClose/useRegisterClose.d.ts +13 -0
  159. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useRegisterClose/useRegisterClose.js +21 -0
  160. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/index.d.ts +1 -0
  161. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/index.js +17 -0
  162. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/useLogic.d.ts +19 -0
  163. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/useLogic.js +43 -0
  164. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContext.d.ts +13 -0
  165. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContext.js +9 -0
  166. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContextProvider/MobileSlidePanelContextProvider.d.ts +7 -0
  167. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContextProvider/MobileSlidePanelContextProvider.js +16 -0
  168. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContextProvider/index.d.ts +1 -0
  169. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/MobileSlidePanelContextProvider/index.js +17 -0
  170. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/index.d.ts +2 -0
  171. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContext/index.js +18 -0
  172. package/node/components/Tree/TreeItem/MobileSlidePanel/constants.d.ts +11 -0
  173. package/node/components/Tree/TreeItem/MobileSlidePanel/constants.js +15 -0
  174. package/node/components/Tree/TreeItem/MobileSlidePanel/index.d.ts +2 -0
  175. package/node/components/Tree/TreeItem/MobileSlidePanel/index.js +18 -0
  176. package/node/components/Tree/TreeItem/MobileSlidePanel/types.d.ts +49 -0
  177. package/node/components/Tree/TreeItem/MobileSlidePanel/types.js +2 -0
  178. package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/index.d.ts +1 -0
  179. package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/index.js +17 -0
  180. package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/usePanelStack/index.d.ts +1 -0
  181. package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/usePanelStack/index.js +17 -0
  182. package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/usePanelStack/usePanelStack.d.ts +14 -0
  183. package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/hooks/usePanelStack/usePanelStack.js +66 -0
  184. package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/index.d.ts +1 -0
  185. package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/index.js +17 -0
  186. package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/useLogic.d.ts +9 -0
  187. package/node/components/Tree/TreeItem/MobileSlidePanel/useLogic/useLogic.js +15 -0
  188. package/node/components/Tree/TreeItem/TreeItem.d.ts +2 -1
  189. package/node/components/Tree/TreeItem/TreeItem.js +48 -9
  190. package/node/components/Tree/TreeItem/constants.d.ts +9 -0
  191. package/node/components/Tree/TreeItem/constants.js +10 -1
  192. package/node/components/Tree/TreeItem/styles.d.ts +4 -13
  193. package/node/components/Tree/TreeItem/styles.js +153 -39
  194. package/node/components/Tree/TreeItem/types.d.ts +18 -0
  195. package/node/components/Tree/TreeItem/useLogic/useLogic.d.ts +21 -7
  196. package/node/components/Tree/TreeItem/useLogic/useLogic.js +39 -1
  197. package/node/components/Tree/TreeList/TreeItem/TreeItem.js +4 -4
  198. package/node/components/Tree/TreeList/TreeItem/styles.d.ts +19 -0
  199. package/node/components/Tree/TreeList/TreeItem/styles.js +60 -1
  200. package/node/components/Tree/TreeList/TreeItem/useLogic/useLogic.d.ts +6 -0
  201. package/node/components/Tree/TreeList/TreeItem/useLogic/useLogic.js +11 -0
  202. package/node/components/Tree/TreeList/TreeList.js +1 -1
  203. package/node/components/Tree/TreeList/styles.d.ts +4 -0
  204. package/node/components/Tree/TreeList/styles.js +27 -1
  205. package/node/components/TreeAsyncAutocomplete/OptionsModal/NoData/styles.js +5 -0
  206. package/node/components/TreeAsyncAutocomplete/OptionsModal/OptionsModal.js +1 -2
  207. package/node/components/TreeAsyncAutocomplete/OptionsModal/styles.d.ts +17 -0
  208. package/node/components/TreeAsyncAutocomplete/OptionsModal/styles.js +76 -6
  209. package/node/components/TreeAutocomplete/OptionsModal/NoData/styles.js +5 -0
  210. package/node/components/TreeAutocomplete/OptionsModal/OptionsModal.js +1 -2
  211. package/node/components/TreeAutocomplete/OptionsModal/styles.d.ts +17 -0
  212. package/node/components/TreeAutocomplete/OptionsModal/styles.js +37 -1
  213. package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/NoData/styles.js +5 -0
  214. package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/OptionsModal.js +3 -7
  215. package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/styles.d.ts +35 -0
  216. package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/styles.js +97 -6
  217. package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/useLogic/useLogic.d.ts +1 -0
  218. package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/useLogic/useLogic.js +17 -2
  219. package/node/components/TreeLikeAutocomplete/OptionsModal/NoData/styles.js +5 -0
  220. package/node/components/TreeLikeAutocomplete/OptionsModal/OptionsModal.js +3 -4
  221. package/node/components/TreeLikeAutocomplete/OptionsModal/styles.d.ts +27 -0
  222. package/node/components/TreeLikeAutocomplete/OptionsModal/styles.js +45 -2
  223. package/node/components/TreeLikeAutocomplete/OptionsModal/useLogic/useLogic.d.ts +1 -0
  224. package/node/components/TreeLikeAutocomplete/OptionsModal/useLogic/useLogic.js +14 -1
  225. package/node/components/TreeLikeList/TreeItem/TreeItem.js +9 -2
  226. package/node/components/TreeLikeList/TreeItem/styles.d.ts +14 -17
  227. package/node/components/TreeLikeList/TreeItem/styles.js +48 -1
  228. package/node/components/TreeLikeList/TreeItem/useLogic/useLogic.d.ts +8 -2
  229. package/node/components/TreeLikeList/TreeItem/useLogic/useLogic.js +34 -12
  230. package/node/components/TreeLikeList/TreeLikeList.js +1 -1
  231. package/node/components/TreeLikeList/styles.d.ts +4 -0
  232. package/node/components/TreeLikeList/styles.js +26 -1
  233. package/package.json +1 -1
@@ -5,4 +5,9 @@ export const Wrapper = styled.div `
5
5
  justify-content: center;
6
6
 
7
7
  height: 100%;
8
+
9
+ ${({ theme }) => theme.breakpoints.down('sm')} {
10
+ padding: ${({ theme }) => theme.spacing(0, 4)};
11
+ text-align: center;
12
+ }
8
13
  `;
@@ -2,7 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Button } from '../../Button';
3
3
  import { Dialog } from '../../Dialog';
4
4
  import { DialogActions } from '../../DialogActions';
5
- import { Paper } from '../../Paper';
6
5
  import { TreeList } from '../../Tree';
7
6
  import { Typography } from '../../Typography';
8
7
  import { SEARCH_FIELD_HELPER_TEXT } from './constants';
@@ -10,7 +9,7 @@ import { ErrorMessage } from './ErrorMessage';
10
9
  import { Loader } from './Loader';
11
10
  import { NoData } from './NoData';
12
11
  import { SearchSuggestion } from './SearchSuggestion';
13
- import { StyledDialogContent, StyledSearchField, TreeListWrapper, UserHintWrapper, } from './styles';
12
+ import { CancelButton, SearchFieldWrapper, StyledDialogContent, StyledPaper, StyledSearchField, TreeListWrapper, UserHintWrapper, } from './styles';
14
13
  import { useLogic } from './useLogic';
15
14
  export const OptionsModal = (props) => {
16
15
  const { isNoResult, searchFieldProps, modalProps, treeListProps, cancelButtonProps, confirmButtonProps, handleRetry, isShowUserHint, isShowModalLoader, isShowSearchFieldLoader, isShowSearchSuggestion, isLoadingError, treeProps, loadingErrorMsg, } = useLogic(props);
@@ -29,5 +28,5 @@ export const OptionsModal = (props) => {
29
28
  }
30
29
  return (_jsx(TreeList, { ...treeProps, ...treeListProps }));
31
30
  };
32
- return (_jsxs(Dialog, { ...modalProps, children: [_jsxs(StyledDialogContent, { "$size": modalProps.size, children: [_jsx(StyledSearchField, { fullWidth: true, ...searchFieldProps, isLoading: isShowSearchFieldLoader, helperText: SEARCH_FIELD_HELPER_TEXT }), _jsx(Paper, { variant: "outlined", children: _jsxs(TreeListWrapper, { children: [renderComponent(), isShowUserHint && (_jsx(UserHintWrapper, { children: _jsx(Typography, { variant: "caption", color: "grey", colorIntensity: "600", children: "\u0423\u0442\u043E\u0447\u043D\u0438\u0442\u0435 \u0437\u0430\u043F\u0440\u043E\u0441 \u0434\u043B\u044F \u0431\u043E\u043B\u0435\u0435 \u043B\u0443\u0447\u0448\u0435\u0433\u043E \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u0430 \u043F\u043E\u0438\u0441\u043A\u0430" }) }))] }) })] }), _jsxs(DialogActions, { children: [_jsx(Button, { variant: "text", ...cancelButtonProps, children: "\u041E\u0442\u043C\u0435\u043D\u0430" }), _jsx(Button, { ...confirmButtonProps, children: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C" })] })] }));
31
+ return (_jsxs(Dialog, { ...modalProps, children: [_jsxs(StyledDialogContent, { "$size": modalProps.size, children: [_jsx(SearchFieldWrapper, { children: _jsx(StyledSearchField, { fullWidth: true, ...searchFieldProps, isLoading: isShowSearchFieldLoader, helperText: SEARCH_FIELD_HELPER_TEXT }) }), _jsx(StyledPaper, { variant: "outlined", children: _jsxs(TreeListWrapper, { children: [renderComponent(), isShowUserHint && (_jsx(UserHintWrapper, { children: _jsx(Typography, { variant: "caption", color: "grey", colorIntensity: "600", children: "\u0423\u0442\u043E\u0447\u043D\u0438\u0442\u0435 \u0437\u0430\u043F\u0440\u043E\u0441 \u0434\u043B\u044F \u0431\u043E\u043B\u0435\u0435 \u043B\u0443\u0447\u0448\u0435\u0433\u043E \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u0430 \u043F\u043E\u0438\u0441\u043A\u0430" }) }))] }) })] }), _jsxs(DialogActions, { children: [_jsx(CancelButton, { variant: "text", ...cancelButtonProps, children: "\u041E\u0442\u043C\u0435\u043D\u0430" }), _jsx(Button, { ...confirmButtonProps, children: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C" })] })] }));
33
32
  };
@@ -9,9 +9,26 @@ 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>, {}>;
12
16
  export declare const StyledSearchField: import("../../styled").StyledComponent<Omit<import("../../SearchField").SearchFieldProps, "ref"> & import("react").RefAttributes<HTMLDivElement> & {
13
17
  theme?: import("@emotion/react").Theme | undefined;
14
18
  }, {}, {}>;
19
+ export declare const StyledPaper: import("../../styled").StyledComponent<Omit<import("../../Paper").PaperProps, "ref"> & import("react").RefAttributes<HTMLDivElement> & {
20
+ theme?: import("@emotion/react").Theme | undefined;
21
+ }, {}, {}>;
22
+ 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"> & {
23
+ variant?: "light" | "link" | "text" | "contained" | "outlined" | undefined;
24
+ loading?: boolean | undefined;
25
+ color?: "primary" | "success" | "warning" | "error" | "grey" | undefined;
26
+ component?: import("react").ElementType | undefined;
27
+ selected?: boolean | undefined;
28
+ size?: "large" | "medium" | undefined;
29
+ } & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, ""> & import("react").RefAttributes<HTMLButtonElement> & {
30
+ theme?: import("@emotion/react").Theme | undefined;
31
+ }, {}, {}>;
15
32
  export declare const UserHintWrapper: import("../../styled").StyledComponent<{
16
33
  theme?: import("@emotion/react").Theme | undefined;
17
34
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
@@ -1,7 +1,14 @@
1
1
  import { formHelperTextClasses } from '@mui/material/FormHelperText';
2
+ import { inputBaseClasses } from '@mui/material/InputBase';
3
+ import { paperClasses } from '@mui/material/Paper';
4
+ import { DEFAULT_HEADER_HEIGHT, OFFSET_TOP_SCREEN } from '../../BottomDrawer';
5
+ import { Button } from '../../Button';
2
6
  import { DIALOG_SIZES } from '../../Dialog';
3
7
  import { DialogContent } from '../../DialogContent';
8
+ import { loaderClassnames } from '../../Loader';
9
+ import { Paper } from '../../Paper';
4
10
  import { SearchField } from '../../SearchField';
11
+ import { svgIconClassnames } from '../../SvgIcon';
5
12
  import { styled } from '../../styled';
6
13
  import { treeListClassnames } from '../../Tree';
7
14
  export const StyledDialogContent = styled(DialogContent, {
@@ -14,29 +21,87 @@ export const StyledDialogContent = styled(DialogContent, {
14
21
 
15
22
  width: ${({ $size }) => DIALOG_SIZES[$size].minWidth};
16
23
  height: ${({ $size }) => DIALOG_SIZES[$size].minWidth};
17
-
24
+
18
25
  ${({ theme }) => theme.breakpoints.down('sm')} {
19
26
  width: auto;
27
+ padding: 0;
28
+ gap: ${({ theme }) => theme.spacing(3)};
29
+
30
+ height: calc(100vh - ${OFFSET_TOP_SCREEN} - ${DEFAULT_HEADER_HEIGHT}px - 72px);
31
+
32
+ /* Причина игнора: Прогрессивное улучшение */
33
+ /* stylelint-disable plugin/no-unsupported-browser-features */
34
+ @supports (height: 100dvh) {
35
+ height: calc(100dvh - ${OFFSET_TOP_SCREEN} - ${DEFAULT_HEADER_HEIGHT}px - 72px);
36
+ }
37
+ /* stylelint-enable plugin/no-unsupported-browser-features */
20
38
  }
21
39
  `;
22
40
  export const TreeListWrapper = styled.div `
23
- overflow: auto;
41
+ overflow: auto;
42
+
43
+ height: 100%;
24
44
 
25
- height: 100%;
26
-
27
45
  & .${treeListClassnames.list} {
28
46
  width: auto;
29
47
  min-width: max-content;
30
48
  }
49
+
50
+ ${({ theme }) => theme.breakpoints.down('sm')} {
51
+ & .${treeListClassnames.list} {
52
+ min-width: unset;
53
+ }
54
+
55
+ /* stylelint-disable plugin/no-unsupported-browser-features */
56
+ &:not(:has(.${treeListClassnames.list})) {
57
+ height: 100%;
58
+ }
59
+ /* stylelint-enable plugin/no-unsupported-browser-features */
60
+
61
+ height: auto;
62
+ }
63
+ `;
64
+ export const SearchFieldWrapper = styled.div `
65
+ ${({ theme }) => theme.breakpoints.down('sm')} {
66
+ padding: ${({ theme }) => theme.spacing(3, 4, 0)};
67
+ }
31
68
  `;
32
69
  export const StyledSearchField = styled(SearchField) `
33
70
  & .${formHelperTextClasses.root} {
34
71
  display: flex;
35
72
 
36
73
  margin-top: ${({ theme }) => theme.spacing(2)};
37
-
74
+
38
75
  color: ${({ theme }) => theme.palette.grey[500]};
39
76
  }
77
+
78
+ ${({ theme }) => theme.breakpoints.down('sm')} {
79
+ & .${formHelperTextClasses.root} {
80
+ display: none;
81
+ }
82
+
83
+ & .${inputBaseClasses.root}.${inputBaseClasses.adornedEnd} .${loaderClassnames.root} .${svgIconClassnames.root} {
84
+ width: 20px;
85
+ height: 20px;
86
+ }
87
+ }
88
+ `;
89
+ export const StyledPaper = styled(Paper) `
90
+ ${({ theme }) => theme.breakpoints.down('sm')} {
91
+ &.${paperClasses.root} {
92
+ border-top-left-radius: 0;
93
+ border-top-right-radius: 0;
94
+ }
95
+
96
+ border: unset;
97
+
98
+ overflow: auto;
99
+ }
100
+ `;
101
+ export const CancelButton = styled(Button) `
102
+ ${({ theme }) => theme.breakpoints.down('sm')} {
103
+ display: none;
104
+ }
40
105
  `;
41
106
  export const UserHintWrapper = styled.div `
42
107
  display: flex;
@@ -44,4 +109,9 @@ export const UserHintWrapper = styled.div `
44
109
  justify-content: center;
45
110
 
46
111
  height: 36px;
112
+
113
+ ${({ theme }) => theme.breakpoints.down('sm')} {
114
+ height: auto;
115
+ padding: ${({ theme }) => theme.spacing(3, 4)};
116
+ }
47
117
  `;
@@ -5,4 +5,9 @@ export const Wrapper = styled.div `
5
5
  justify-content: center;
6
6
 
7
7
  height: 100%;
8
+
9
+ ${({ theme }) => theme.breakpoints.down('sm')} {
10
+ padding: ${({ theme }) => theme.spacing(0, 4)};
11
+ text-align: center;
12
+ }
8
13
  `;
@@ -2,13 +2,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Button } from '../../Button';
3
3
  import { Dialog } from '../../Dialog';
4
4
  import { DialogActions } from '../../DialogActions';
5
- import { Paper } from '../../Paper';
6
5
  import { SearchField } from '../../SearchField';
7
6
  import { TreeList } from '../../Tree';
8
7
  import { ErrorMessage } from './ErrorMessage';
9
8
  import { Loader } from './Loader';
10
9
  import { NoData } from './NoData';
11
- import { StyledDialogContent, TreeListWrapper } from './styles';
10
+ import { CancelButton, SearchFieldWrapper, StyledDialogContent, StyledPaper, TreeListWrapper, } from './styles';
12
11
  import { useLogic } from './useLogic';
13
12
  export const OptionsModal = (props) => {
14
13
  const { isNoResult, searchFieldProps, modalProps, treeListProps, cancelButtonProps, confirmButtonProps, } = useLogic(props);
@@ -25,5 +24,5 @@ export const OptionsModal = (props) => {
25
24
  }
26
25
  return _jsx(TreeList, { ...treeProps, ...treeListProps });
27
26
  };
28
- return (_jsxs(Dialog, { ...externalDialogProps, disableRestoreFocus: true, open: isOpen, ...modalProps, children: [_jsxs(StyledDialogContent, { "$size": modalProps.size, children: [_jsx(SearchField, { fullWidth: true, ...searchFieldProps }), _jsx(Paper, { variant: "outlined", children: _jsx(TreeListWrapper, { children: renderComponent() }) })] }), _jsxs(DialogActions, { children: [_jsx(Button, { variant: "text", ...cancelButtonProps, children: "\u041E\u0442\u043C\u0435\u043D\u0430" }), _jsx(Button, { ...confirmButtonProps, children: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C" })] })] }));
27
+ return (_jsxs(Dialog, { ...externalDialogProps, disableRestoreFocus: true, open: isOpen, ...modalProps, children: [_jsxs(StyledDialogContent, { "$size": modalProps.size, children: [_jsx(SearchFieldWrapper, { children: _jsx(SearchField, { fullWidth: true, ...searchFieldProps }) }), _jsx(StyledPaper, { variant: "outlined", children: _jsx(TreeListWrapper, { children: renderComponent() }) })] }), _jsxs(DialogActions, { children: [_jsx(CancelButton, { variant: "text", ...cancelButtonProps, children: "\u041E\u0442\u043C\u0435\u043D\u0430" }), _jsx(Button, { ...confirmButtonProps, children: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C" })] })] }));
29
28
  };
@@ -9,4 +9,21 @@ 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
+ }, {}, {}>;
12
29
  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),
@@ -14,6 +18,17 @@ export const StyledDialogContent = styled(DialogContent, {
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,24 @@ 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
+
47
+ &.${paperClasses.root} {
48
+ border-top-left-radius: 0;
49
+ border-top-right-radius: 0;
50
+ }
51
+
52
+ border: unset;
53
+ }
54
+ `;
55
+ export const CancelButton = styled(Button) `
56
+ ${({ theme }) => theme.breakpoints.down('sm')} {
57
+ display: none;
58
+ }
59
+ `;
@@ -5,4 +5,9 @@ export const Wrapper = styled.div `
5
5
  justify-content: center;
6
6
 
7
7
  height: 100%;
8
+
9
+ ${({ theme }) => theme.breakpoints.down('sm')} {
10
+ padding: ${({ theme }) => theme.spacing(0, 4)};
11
+ text-align: center;
12
+ }
8
13
  `;
@@ -1,9 +1,8 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { Button } from '../../Button';
3
3
  import { CheckableTag } from '../../CheckableTag';
4
4
  import { Dialog } from '../../Dialog';
5
5
  import { DialogActions } from '../../DialogActions';
6
- import { Paper } from '../../Paper';
7
6
  import { TagBadge } from '../../TagBadge';
8
7
  import { TreeLikeList } from '../../TreeLikeList';
9
8
  import { Typography } from '../../Typography';
@@ -12,10 +11,10 @@ import { ErrorMessage } from './ErrorMessage';
12
11
  import { Loader } from './Loader';
13
12
  import { NoData } from './NoData';
14
13
  import { SearchSuggestion } from './SearchSuggestion';
15
- import { StyledDialogContent, StyledSearchField, TreeListWrapper, UserHintWrapper, } from './styles';
14
+ import { CancelButton, CheckableTagWrapper, ResetButton, SearchFieldWrapper, StyledDialogContent, StyledPaper, StyledSearchField, TreeListWrapper, TreeViewSlot, UserHintWrapper, } from './styles';
16
15
  import { useLogic } from './useLogic';
17
16
  export const OptionsModal = (props) => {
18
- const { isNoResult, searchFieldProps, modalProps, treeListProps, cancelButtonProps, confirmButtonProps, handleRetry, isShowUserHint, isShowModalLoader, isShowSearchFieldLoader, isShowSearchSuggestion, isLoadingError, treeProps, loadingErrorMsg, badgeContent, checkableTagProps, isShowSelectedTree, selectedTreeProps, } = useLogic(props);
17
+ const { isNoResult, searchFieldProps, modalProps, treeListProps, cancelButtonProps, confirmButtonProps, resetButtonProps, handleRetry, isShowUserHint, isShowModalLoader, isShowSearchFieldLoader, isShowSearchSuggestion, isLoadingError, treeProps, loadingErrorMsg, badgeContent, checkableTagProps, isShowSelectedTree, selectedTreeProps, } = useLogic(props);
19
18
  const renderComponent = () => {
20
19
  if (isShowSearchSuggestion) {
21
20
  return _jsx(SearchSuggestion, {});
@@ -29,10 +28,7 @@ export const OptionsModal = (props) => {
29
28
  if (isNoResult) {
30
29
  return _jsx(NoData, {});
31
30
  }
32
- if (isShowSelectedTree) {
33
- return (_jsx(TreeLikeList, { ...treeProps, ...selectedTreeProps }));
34
- }
35
- return (_jsx(TreeLikeList, { ...treeProps, ...treeListProps }));
31
+ return (_jsx(TreeViewSlot, { children: _jsx(TreeLikeList, { ...treeProps, ...(isShowSelectedTree ? selectedTreeProps : treeListProps) }, isShowSelectedTree ? 'selected-tree' : 'options-tree') }));
36
32
  };
37
- return (_jsxs(Dialog, { ...modalProps, children: [_jsxs(StyledDialogContent, { "$size": modalProps.size, children: [_jsx(StyledSearchField, { fullWidth: true, ...searchFieldProps, isLoading: isShowSearchFieldLoader, helperText: SEARCH_FIELD_HELPER_TEXT }), _jsx(CheckableTag, { ...checkableTagProps, endAddon: (badgeProps) => (_jsx(TagBadge, { ...badgeProps, badgeContent: badgeContent, showZero: true })) }), _jsx(Paper, { variant: "outlined", children: _jsxs(TreeListWrapper, { children: [renderComponent(), isShowUserHint && (_jsx(UserHintWrapper, { children: _jsx(Typography, { variant: "caption", color: "grey", colorIntensity: "600", children: "\u0423\u0442\u043E\u0447\u043D\u0438\u0442\u0435 \u0437\u0430\u043F\u0440\u043E\u0441 \u0434\u043B\u044F \u0431\u043E\u043B\u0435\u0435 \u043B\u0443\u0447\u0448\u0435\u0433\u043E \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u0430 \u043F\u043E\u0438\u0441\u043A\u0430" }) }))] }) })] }), _jsxs(DialogActions, { children: [_jsx(Button, { variant: "text", ...cancelButtonProps, children: "\u041E\u0442\u043C\u0435\u043D\u0430" }), _jsx(Button, { ...confirmButtonProps, children: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C" })] })] }));
33
+ return (_jsxs(Dialog, { ...modalProps, headerContent: _jsxs(_Fragment, { children: [_jsx(ResetButton, { variant: "text", color: "primary", ...resetButtonProps, children: "\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C" }), modalProps.headerContent] }), children: [_jsxs(StyledDialogContent, { "$size": modalProps.size, children: [_jsx(SearchFieldWrapper, { children: _jsx(StyledSearchField, { fullWidth: true, ...searchFieldProps, isLoading: isShowSearchFieldLoader, helperText: SEARCH_FIELD_HELPER_TEXT }) }), _jsx(CheckableTagWrapper, { children: _jsx(CheckableTag, { ...checkableTagProps, endAddon: (badgeProps) => (_jsx(TagBadge, { ...badgeProps, badgeContent: badgeContent, showZero: true })) }) }), _jsx(StyledPaper, { variant: "outlined", children: _jsxs(TreeListWrapper, { children: [renderComponent(), isShowUserHint && (_jsx(UserHintWrapper, { children: _jsx(Typography, { variant: "caption", color: "grey", colorIntensity: "600", children: "\u0423\u0442\u043E\u0447\u043D\u0438\u0442\u0435 \u0437\u0430\u043F\u0440\u043E\u0441 \u0434\u043B\u044F \u0431\u043E\u043B\u0435\u0435 \u043B\u0443\u0447\u0448\u0435\u0433\u043E \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u0430 \u043F\u043E\u0438\u0441\u043A\u0430" }) }))] }) })] }), _jsxs(DialogActions, { children: [_jsx(CancelButton, { variant: "text", ...cancelButtonProps, children: "\u041E\u0442\u043C\u0435\u043D\u0430" }), _jsx(Button, { ...confirmButtonProps, children: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C" })] })] }));
38
34
  };
@@ -9,9 +9,44 @@ 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 TreeViewSlot: 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 SearchFieldWrapper: import("../../styled").StyledComponent<{
17
+ theme?: import("@emotion/react").Theme | undefined;
18
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
19
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
20
+ export declare const CheckableTagWrapper: import("../../styled").StyledComponent<{
21
+ theme?: import("@emotion/react").Theme | undefined;
22
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
23
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
12
24
  export declare const StyledSearchField: import("../../styled").StyledComponent<Omit<import("../../SearchField").SearchFieldProps, "ref"> & import("react").RefAttributes<HTMLDivElement> & {
13
25
  theme?: import("@emotion/react").Theme | undefined;
14
26
  }, {}, {}>;
27
+ export declare const StyledPaper: import("../../styled").StyledComponent<Omit<import("../../Paper").PaperProps, "ref"> & import("react").RefAttributes<HTMLDivElement> & {
28
+ theme?: import("@emotion/react").Theme | undefined;
29
+ }, {}, {}>;
30
+ 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"> & {
31
+ variant?: "light" | "link" | "text" | "contained" | "outlined" | undefined;
32
+ loading?: boolean | undefined;
33
+ color?: "primary" | "success" | "warning" | "error" | "grey" | undefined;
34
+ component?: import("react").ElementType | undefined;
35
+ selected?: boolean | undefined;
36
+ size?: "large" | "medium" | undefined;
37
+ } & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, ""> & import("react").RefAttributes<HTMLButtonElement> & {
38
+ theme?: import("@emotion/react").Theme | undefined;
39
+ }, {}, {}>;
40
+ 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"> & {
41
+ variant?: "light" | "link" | "text" | "contained" | "outlined" | undefined;
42
+ loading?: boolean | undefined;
43
+ color?: "primary" | "success" | "warning" | "error" | "grey" | undefined;
44
+ component?: import("react").ElementType | undefined;
45
+ selected?: boolean | undefined;
46
+ size?: "large" | "medium" | undefined;
47
+ } & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, ""> & import("react").RefAttributes<HTMLButtonElement> & {
48
+ theme?: import("@emotion/react").Theme | undefined;
49
+ }, {}, {}>;
15
50
  export declare const UserHintWrapper: import("../../styled").StyledComponent<{
16
51
  theme?: import("@emotion/react").Theme | undefined;
17
52
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
@@ -1,8 +1,16 @@
1
1
  import { formHelperTextClasses } from '@mui/material/FormHelperText';
2
+ import { inputBaseClasses } from '@mui/material/InputBase';
3
+ import { paperClasses } from '@mui/material/Paper';
4
+ import { DEFAULT_HEADER_HEIGHT, OFFSET_TOP_SCREEN } from '../../BottomDrawer';
5
+ import { Button } from '../../Button';
2
6
  import { DIALOG_SIZES } from '../../Dialog';
3
7
  import { DialogContent } from '../../DialogContent';
8
+ import { loaderClassnames } from '../../Loader';
9
+ import { Paper } from '../../Paper';
4
10
  import { SearchField } from '../../SearchField';
11
+ import { svgIconClassnames } from '../../SvgIcon';
5
12
  import { styled } from '../../styled';
13
+ import { tagClassnames } from '../../Tag';
6
14
  import { treeListClassnames } from '../../Tree';
7
15
  export const StyledDialogContent = styled(DialogContent, {
8
16
  shouldForwardProp: (prop) => !['$size'].includes(prop),
@@ -14,29 +22,107 @@ export const StyledDialogContent = styled(DialogContent, {
14
22
 
15
23
  width: ${({ $size }) => DIALOG_SIZES[$size].minWidth};
16
24
  height: ${({ $size }) => DIALOG_SIZES[$size].minWidth};
17
-
25
+
18
26
  ${({ theme }) => theme.breakpoints.down('sm')} {
19
27
  width: auto;
28
+ padding: 0;
29
+ gap: ${({ theme }) => theme.spacing(3)};
30
+
31
+ height: calc(100vh - ${OFFSET_TOP_SCREEN} - ${DEFAULT_HEADER_HEIGHT}px - 72px);
32
+
33
+ /* Причина игнора: Прогрессивное улучшение */
34
+ /* stylelint-disable plugin/no-unsupported-browser-features */
35
+ @supports (height: 100dvh) {
36
+ height: calc(100dvh - ${OFFSET_TOP_SCREEN} - ${DEFAULT_HEADER_HEIGHT}px - 72px);
37
+ }
38
+ /* stylelint-enable plugin/no-unsupported-browser-features */
20
39
  }
21
40
  `;
22
41
  export const TreeListWrapper = styled.div `
23
- overflow: auto;
42
+ overflow: auto;
43
+
44
+ height: 100%;
24
45
 
25
- height: 100%;
26
-
27
46
  & .${treeListClassnames.list} {
28
47
  width: auto;
29
48
  min-width: max-content;
30
49
  }
50
+
51
+ ${({ theme }) => theme.breakpoints.down('sm')} {
52
+ & .${treeListClassnames.list} {
53
+ min-width: unset;
54
+ }
55
+
56
+ /* stylelint-disable plugin/no-unsupported-browser-features */
57
+ &:not(:has(.${treeListClassnames.list})) {
58
+ height: 100%;
59
+ }
60
+ /* stylelint-enable plugin/no-unsupported-browser-features */
61
+
62
+ height: auto;
63
+ }
64
+ `;
65
+ export const TreeViewSlot = styled.div `
66
+ height: 100%;
67
+ `;
68
+ export const SearchFieldWrapper = styled.div `
69
+ ${({ theme }) => theme.breakpoints.down('sm')} {
70
+ padding: ${({ theme }) => theme.spacing(3, 4, 0)};
71
+ }
72
+ `;
73
+ export const CheckableTagWrapper = styled.div `
74
+ ${({ theme }) => theme.breakpoints.down('sm')} {
75
+ padding: ${({ theme }) => theme.spacing(0, 4)};
76
+
77
+ & .${tagClassnames.root} {
78
+ width: 100%;
79
+ }
80
+ }
31
81
  `;
32
82
  export const StyledSearchField = styled(SearchField) `
33
83
  & .${formHelperTextClasses.root} {
34
84
  display: flex;
35
85
 
36
86
  margin-top: ${({ theme }) => theme.spacing(2)};
37
-
87
+
38
88
  color: ${({ theme }) => theme.palette.grey[500]};
39
89
  }
90
+
91
+ ${({ theme }) => theme.breakpoints.down('sm')} {
92
+ & .${formHelperTextClasses.root} {
93
+ display: none;
94
+ }
95
+
96
+ & .${inputBaseClasses.root}.${inputBaseClasses.adornedEnd} .${loaderClassnames.root} .${svgIconClassnames.root} {
97
+ width: 20px;
98
+ height: 20px;
99
+ }
100
+ }
101
+ `;
102
+ export const StyledPaper = styled(Paper) `
103
+ ${({ theme }) => theme.breakpoints.down('sm')} {
104
+ &.${paperClasses.root} {
105
+ border-top-left-radius: 0;
106
+ border-top-right-radius: 0;
107
+ }
108
+
109
+ border: unset;
110
+
111
+ overflow: auto;
112
+ }
113
+ `;
114
+ export const CancelButton = styled(Button) `
115
+ ${({ theme }) => theme.breakpoints.down('sm')} {
116
+ display: none;
117
+ }
118
+ `;
119
+ export const ResetButton = styled(Button) `
120
+ display: none;
121
+
122
+ ${({ theme }) => theme.breakpoints.down('sm')} {
123
+ display: flex;
124
+ margin-left: auto;
125
+ }
40
126
  `;
41
127
  export const UserHintWrapper = styled.div `
42
128
  display: flex;
@@ -44,4 +130,9 @@ export const UserHintWrapper = styled.div `
44
130
  justify-content: center;
45
131
 
46
132
  height: 36px;
133
+
134
+ ${({ theme }) => theme.breakpoints.down('sm')} {
135
+ padding: ${({ theme }) => theme.spacing(3, 4)};
136
+ height: auto;
137
+ }
47
138
  `;
@@ -16,6 +16,7 @@ type UseLogicResult = {
16
16
  treeListProps: TreeLikeListProps<TreeLikeAsyncAutocompleteValue>;
17
17
  cancelButtonProps: ButtonProps;
18
18
  confirmButtonProps: ButtonProps;
19
+ resetButtonProps: ButtonProps;
19
20
  handleRetry: () => void;
20
21
  isShowUserHint?: boolean;
21
22
  isShowModalLoader: boolean;
@@ -1,7 +1,10 @@
1
1
  import { useEffect, useMemo, useState, } from 'react';
2
+ import { useViewportType } from '../../../useViewportType';
2
3
  import { deepMap } from '../../../utils/array';
4
+ import { checkIsDeepEqual } from '../../../utils/checkIsDeepEqual';
3
5
  import { useSelectedTreeView } from './hooks';
4
6
  export const useLogic = ({ isOpen, initialValue, options, onChange, dialogProps, onInputChange, onRetry, meta, onShowUserHint, isLoadingModal, minSymbolsToFetch = 0, isLoading, isLoadingError, loadingErrorMsg, treeProps, }) => {
7
+ const { isMobile } = useViewportType();
5
8
  const [value, setValue] = useState(initialValue);
6
9
  const [searchValue, setSearchValue] = useState();
7
10
  const { onClose, ...restDialogProps } = dialogProps;
@@ -58,6 +61,14 @@ export const useLogic = ({ isOpen, initialValue, options, onChange, dialogProps,
58
61
  onChange?.(value);
59
62
  onClose?.(event, 'escapeKeyDown');
60
63
  };
64
+ const handleReset = () => {
65
+ const isSameAsInitial = checkIsDeepEqual((value ?? []).map(({ id }) => id).sort(), (initialValue ?? []).map(({ id }) => id).sort());
66
+ if (!isSameAsInitial) {
67
+ setValue(initialValue);
68
+ return;
69
+ }
70
+ setValue(undefined);
71
+ };
61
72
  // Определяем isNoResult в зависимости от режима
62
73
  const isNoResult = useMemo(() => {
63
74
  if (!searchValue) {
@@ -75,7 +86,7 @@ export const useLogic = ({ isOpen, initialValue, options, onChange, dialogProps,
75
86
  isNoResultInSelectedTree,
76
87
  options.length,
77
88
  ]);
78
- const isDisabledButton = !value || isNoResult;
89
+ const isDisabledButton = isNoResult || (!value?.length && !initialValue?.length);
79
90
  const handleRetry = () => {
80
91
  onRetry?.(searchValue);
81
92
  };
@@ -113,7 +124,7 @@ export const useLogic = ({ isOpen, initialValue, options, onChange, dialogProps,
113
124
  data: selectedTreeDataToRender,
114
125
  onChange: handleChange,
115
126
  isObjectMode: true,
116
- isInitialExpanded: true,
127
+ isInitialExpanded: !isMobile,
117
128
  },
118
129
  modalProps: {
119
130
  onClose: handleClose,
@@ -139,5 +150,9 @@ export const useLogic = ({ isOpen, initialValue, options, onChange, dialogProps,
139
150
  disabled: isDisabledButton,
140
151
  onClick: handleClick,
141
152
  },
153
+ resetButtonProps: {
154
+ disabled: !value?.length,
155
+ onClick: handleReset,
156
+ },
142
157
  };
143
158
  };
@@ -5,4 +5,9 @@ export const Wrapper = styled.div `
5
5
  justify-content: center;
6
6
 
7
7
  height: 100%;
8
+
9
+ ${({ theme }) => theme.breakpoints.down('sm')} {
10
+ padding: ${({ theme }) => theme.spacing(0, 4)};
11
+ text-align: center;
12
+ }
8
13
  `;
@@ -1,18 +1,17 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { Button } from '../../Button';
3
3
  import { Dialog } from '../../Dialog';
4
4
  import { DialogActions } from '../../DialogActions';
5
- import { Paper } from '../../Paper';
6
5
  import { SearchField } from '../../SearchField';
7
6
  import { TreeLikeList } from '../../TreeLikeList';
8
7
  import { ErrorMessage } from './ErrorMessage';
9
8
  import { Loader } from './Loader';
10
9
  import { NoData } from './NoData';
11
- import { StyledDialogContent, TreeListWrapper } from './styles';
10
+ import { CancelButton, ResetButton, SearchFieldWrapper, StyledDialogContent, StyledPaper, TreeListWrapper, } from './styles';
12
11
  import { useLogic } from './useLogic';
13
12
  export const OptionsModal = (props) => {
14
- const { isNoResult, searchFieldProps, modalProps, treeLikeListProps, cancelButtonProps, confirmButtonProps, } = useLogic(props);
15
- const { isOpen, initialValue, options, isConfirmChildrenSelection, isLoading, isLoadingError, loadingErrorMsg, treeProps, filterOptions, onChange, onRetry, onClose, ...externalDialogProps } = props;
13
+ const { isNoResult, searchFieldProps, modalProps, treeLikeListProps, cancelButtonProps, confirmButtonProps, resetButtonProps, } = useLogic(props);
14
+ const { isOpen, initialValue, options, isConfirmChildrenSelection, isLoading, isLoadingError, loadingErrorMsg, treeProps, filterOptions, onChange, onRetry, onClose, headerContent, ...externalDialogProps } = props;
16
15
  const renderComponent = () => {
17
16
  if (isLoading) {
18
17
  return _jsx(Loader, {});
@@ -25,5 +24,5 @@ export const OptionsModal = (props) => {
25
24
  }
26
25
  return (_jsx(TreeLikeList, { isConfirmChildrenSelection: isConfirmChildrenSelection, ...treeProps, ...treeLikeListProps }));
27
26
  };
28
- return (_jsxs(Dialog, { ...externalDialogProps, disableRestoreFocus: true, open: isOpen, ...modalProps, children: [_jsxs(StyledDialogContent, { "$size": modalProps.size, children: [_jsx(SearchField, { fullWidth: true, ...searchFieldProps }), _jsx(Paper, { variant: "outlined", children: _jsx(TreeListWrapper, { children: renderComponent() }) })] }), _jsxs(DialogActions, { children: [_jsx(Button, { variant: "text", ...cancelButtonProps, children: "\u041E\u0442\u043C\u0435\u043D\u0430" }), _jsx(Button, { ...confirmButtonProps, children: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C" })] })] }));
27
+ return (_jsxs(Dialog, { ...externalDialogProps, disableRestoreFocus: true, open: isOpen, ...modalProps, headerContent: _jsxs(_Fragment, { children: [_jsx(ResetButton, { variant: "text", color: "primary", ...resetButtonProps, children: "\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C" }), headerContent] }), children: [_jsxs(StyledDialogContent, { "$size": modalProps.size, children: [_jsx(SearchFieldWrapper, { children: _jsx(SearchField, { fullWidth: true, ...searchFieldProps }) }), _jsx(StyledPaper, { variant: "outlined", children: _jsx(TreeListWrapper, { children: renderComponent() }) })] }), _jsxs(DialogActions, { children: [_jsx(CancelButton, { variant: "text", ...cancelButtonProps, children: "\u041E\u0442\u043C\u0435\u043D\u0430" }), _jsx(Button, { ...confirmButtonProps, children: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C" })] })] }));
29
28
  };