@megafon/ui-core 9.0.0-alpha.2 → 9.0.0-alpha.21

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 (337) hide show
  1. package/dist/es/components/Accordion/Accordion.css +1 -1
  2. package/dist/es/components/Accordion/Accordion.d.ts +3 -1
  3. package/dist/es/components/Accordion/Accordion.js +3 -3
  4. package/dist/es/components/Avatar/Avatar.css +1 -1
  5. package/dist/es/components/Avatar/Avatar.d.ts +1 -1
  6. package/dist/es/components/Badges/CounterBadge/CounterBadge.js +1 -2
  7. package/dist/es/components/Badges/InfoBadge/InfoBadge.css +1 -0
  8. package/dist/es/components/Badges/InfoBadge/InfoBadge.d.ts +52 -0
  9. package/dist/es/components/Badges/InfoBadge/InfoBadge.js +226 -0
  10. package/dist/es/components/Badges/PriceBadge/PriceBadge.d.ts +1 -0
  11. package/dist/es/components/Badges/PriceBadge/PriceBadge.js +53 -13
  12. package/dist/es/components/Badges/PromoBadge/PromoBadge.css +1 -1
  13. package/dist/es/components/Badges/PromoBadge/PromoBadge.d.ts +1 -11
  14. package/dist/es/components/Badges/PromoBadge/PromoBadge.js +6 -16
  15. package/dist/es/components/Badges/StatusBadge/StatusBadge.css +1 -1
  16. package/dist/es/components/Badges/StatusBadge/StatusBadge.js +16 -7
  17. package/dist/es/components/Badges/TimerBadge/TimerBadge.d.ts +2 -0
  18. package/dist/es/components/Badges/TimerBadge/TimerBadge.js +6 -2
  19. package/dist/es/components/Buttons/Button/Button.css +1 -0
  20. package/dist/es/components/{Button → Buttons/Button}/Button.d.ts +5 -0
  21. package/dist/es/components/{Button → Buttons/Button}/Button.js +38 -12
  22. package/dist/es/components/Buttons/ButtonClose/ButtonClose.css +1 -0
  23. package/dist/es/components/Buttons/ButtonClose/ButtonClose.d.ts +34 -0
  24. package/dist/es/components/Buttons/ButtonClose/ButtonClose.js +69 -0
  25. package/dist/es/components/Calendar/components/_Month/Month.js +2 -6
  26. package/dist/es/components/Carousel/Carousel.css +1 -1
  27. package/dist/es/components/Carousel/Carousel.d.ts +9 -0
  28. package/dist/es/components/Carousel/Carousel.js +14 -2
  29. package/dist/es/components/Checkbox/Checkbox.css +1 -1
  30. package/dist/es/components/Checkbox/Checkbox.js +3 -2
  31. package/dist/es/components/Chips/Chips/Chip.css +1 -1
  32. package/dist/es/components/Chips/Chips/Chip.d.ts +9 -1
  33. package/dist/es/components/Chips/Chips/Chip.js +12 -7
  34. package/dist/es/components/Chips/Chips/Chips.d.ts +16 -1
  35. package/dist/es/components/Chips/Chips/Chips.js +28 -6
  36. package/dist/es/components/Chips/Chips/components/ChipsDropdown/ChipsDropdown.css +1 -1
  37. package/dist/es/components/Chips/Chips/components/ChipsDropdown/ChipsDropdown.d.ts +12 -4
  38. package/dist/es/components/Chips/Chips/components/ChipsDropdown/ChipsDropdown.js +55 -47
  39. package/dist/es/components/Chips/Chips/components/ChipsScrollPanel/ChipsScrollPanel.d.ts +10 -1
  40. package/dist/es/components/Chips/Chips/components/ChipsScrollPanel/ChipsScrollPanel.js +12 -7
  41. package/dist/es/components/Chips/ChipsSuggest/ChipSuggest.css +1 -1
  42. package/dist/es/components/Chips/ChipsSuggest/ChipSuggest.d.ts +7 -0
  43. package/dist/es/components/Chips/ChipsSuggest/ChipSuggest.js +7 -0
  44. package/dist/es/components/Chips/ChipsSuggest/ChipsSuggest.d.ts +4 -2
  45. package/dist/es/components/Chips/ChipsSuggest/ChipsSuggest.js +3 -0
  46. package/dist/es/components/ContentArea/ContentArea.css +1 -1
  47. package/dist/es/components/ContentArea/ContentArea.d.ts +3 -2
  48. package/dist/es/components/ContentArea/ContentArea.js +5 -0
  49. package/dist/es/components/ContentView/ContentView.css +1 -1
  50. package/dist/es/components/ContentView/ContentView.d.ts +15 -4
  51. package/dist/es/components/ContentView/ContentView.js +17 -4
  52. package/dist/es/components/Counter/Counter.css +1 -1
  53. package/dist/es/components/Counter/Counter.d.ts +2 -0
  54. package/dist/es/components/Counter/Counter.js +6 -3
  55. package/dist/es/components/Dropdown/Dropdown.css +1 -1
  56. package/dist/es/components/Dropdown/Dropdown.d.ts +6 -2
  57. package/dist/es/components/Dropdown/Dropdown.js +31 -22
  58. package/dist/es/components/ErrorLoad/ErrorLoad.css +1 -1
  59. package/dist/es/components/ErrorLoad/ErrorLoad.d.ts +1 -1
  60. package/dist/es/components/ErrorLoad/ErrorLoad.js +2 -4
  61. package/dist/es/components/Link/Link.css +1 -0
  62. package/dist/es/components/Link/Link.d.ts +1 -0
  63. package/dist/es/components/Link/Link.js +4 -2
  64. package/dist/es/components/ListData/ListData.css +1 -1
  65. package/dist/es/components/ListData/ListData.d.ts +9 -1
  66. package/dist/es/components/ListData/ListData.js +20 -14
  67. package/dist/es/components/ListData/components/ListDataSortable.css +1 -1
  68. package/dist/es/components/ListData/components/ListDataSortable.js +1 -3
  69. package/dist/es/components/Modal/Modal.css +1 -1
  70. package/dist/es/components/Modal/Modal.d.ts +23 -9
  71. package/dist/es/components/Modal/Modal.js +34 -23
  72. package/dist/es/components/Modal/_ModalContent/ModalContent.css +1 -1
  73. package/dist/es/components/Modal/_ModalContent/ModalContent.js +37 -39
  74. package/dist/es/components/Modal/_ModalDesktop/ModalDesktop.css +1 -1
  75. package/dist/es/components/Modal/_ModalMobile/ModalMobile.css +1 -0
  76. package/dist/es/components/Modal/{_ModalMobileBottom/ModalMobileBottom.d.ts → _ModalMobile/ModalMobile.d.ts} +6 -5
  77. package/dist/es/components/Modal/{_ModalMobileBottom/ModalMobileBottom.js → _ModalMobile/ModalMobile.js} +35 -26
  78. package/dist/es/components/Modal/mocks.js +0 -1
  79. package/dist/es/components/Modal/types.d.ts +1 -2
  80. package/dist/es/components/NavArrow/NavArrow.css +1 -1
  81. package/dist/es/components/NavArrow/NavArrow.js +4 -4
  82. package/dist/es/components/Notification/Notification.css +1 -1
  83. package/dist/es/components/Notification/Notification.d.ts +0 -11
  84. package/dist/es/components/Notification/Notification.js +19 -38
  85. package/dist/es/components/Pagination/Pagination.css +1 -1
  86. package/dist/es/components/Pagination/Pagination.d.ts +1 -3
  87. package/dist/es/components/Pagination/Pagination.js +4 -13
  88. package/dist/es/components/Pagination/components/PaginationButton/PaginationButton.css +1 -1
  89. package/dist/es/components/Pagination/components/PaginationButton/PaginationButton.d.ts +1 -2
  90. package/dist/es/components/Pagination/components/PaginationButton/PaginationButton.js +0 -2
  91. package/dist/es/components/Pagination/components/PaginationButtons/PaginationButtons.css +1 -1
  92. package/dist/es/components/Pagination/components/PaginationButtons/PaginationButtons.d.ts +1 -3
  93. package/dist/es/components/Pagination/components/PaginationButtons/PaginationButtons.js +5 -16
  94. package/dist/es/components/Pagination/components/PaginationNavigation/PaginationNavigation.d.ts +1 -2
  95. package/dist/es/components/Pagination/components/PaginationNavigation/PaginationNavigation.js +4 -4
  96. package/dist/es/components/Pagination/types.d.ts +1 -11
  97. package/dist/es/components/Pagination/types.js +1 -4
  98. package/dist/es/components/Pagination/usePagination.d.ts +2 -2
  99. package/dist/es/components/Pagination/usePagination.js +11 -29
  100. package/dist/es/components/Parameter/Parameter.d.ts +0 -3
  101. package/dist/es/components/Parameter/Parameter.js +3 -4
  102. package/dist/es/components/RadioButton/RadioButton.css +1 -1
  103. package/dist/es/components/Row/Row.css +1 -1
  104. package/dist/es/components/Row/Row.js +6 -4
  105. package/dist/es/components/ScrollBar/ScrollBar.d.ts +2 -0
  106. package/dist/es/components/ScrollBar/ScrollBar.js +6 -1
  107. package/dist/es/components/Search/Search.css +1 -1
  108. package/dist/es/components/Search/Search.d.ts +2 -2
  109. package/dist/es/components/Search/Search.js +72 -68
  110. package/dist/es/components/Select/Select.css +1 -1
  111. package/dist/es/components/Select/Select.d.ts +11 -20
  112. package/dist/es/components/Select/Select.js +40 -88
  113. package/dist/es/components/Select/reducer/selectReducer.js +1 -1
  114. package/dist/es/components/Selector/Selector.css +1 -1
  115. package/dist/es/components/Sliders/Slider/Slider.css +1 -1
  116. package/dist/es/components/Sliders/Slider/Slider.d.ts +12 -0
  117. package/dist/es/components/Sliders/Slider/Slider.js +26 -7
  118. package/dist/es/components/Sliders/SliderRange/SliderRange.css +1 -1
  119. package/dist/es/components/Sliders/SliderRange/SliderRange.d.ts +3 -0
  120. package/dist/es/components/Sliders/SliderRange/SliderRange.js +4 -1
  121. package/dist/es/components/Sliders/SliderRatio/SliderRatio.css +1 -1
  122. package/dist/es/components/Sliders/components/SliderScale/SliderScale.css +1 -1
  123. package/dist/es/components/Sliders/components/SliderScale/SliderScale.d.ts +6 -0
  124. package/dist/es/components/Sliders/components/SliderScale/SliderScale.js +8 -1
  125. package/dist/es/components/Sliders/helpers.d.ts +1 -0
  126. package/dist/es/components/Sliders/helpers.js +7 -0
  127. package/dist/es/components/Snackbar/Snackbar.css +1 -1
  128. package/dist/es/components/Snackbar/Snackbar.js +20 -21
  129. package/dist/es/components/Stepper/Stepper.css +1 -0
  130. package/dist/es/components/Stepper/Stepper.d.ts +52 -0
  131. package/dist/es/components/Stepper/Stepper.js +159 -0
  132. package/dist/es/components/Stepper/StepperItem.css +1 -0
  133. package/dist/es/components/Stepper/StepperItem.d.ts +57 -0
  134. package/dist/es/components/Stepper/StepperItem.js +101 -0
  135. package/dist/es/components/Stepper/img/separator-mobile.png +0 -0
  136. package/dist/es/components/Stepper/img/separator-vertical.png +0 -0
  137. package/dist/es/components/Stepper/img/separator.png +0 -0
  138. package/dist/es/components/Switcher/Switcher.css +1 -1
  139. package/dist/es/components/Switcher/Switcher.d.ts +5 -0
  140. package/dist/es/components/Switcher/Switcher.js +22 -10
  141. package/dist/es/components/Tabs/Tabs.css +1 -1
  142. package/dist/es/components/Tabs/Tabs.d.ts +2 -0
  143. package/dist/es/components/Tabs/Tabs.js +64 -55
  144. package/dist/es/components/TextField/TextField.css +1 -1
  145. package/dist/es/components/TextField/TextField.d.ts +2 -2
  146. package/dist/es/components/TextField/TextField.js +16 -9
  147. package/dist/es/components/Tooltip/Tooltip.css +1 -1
  148. package/dist/es/components/Tooltip/Tooltip.d.ts +9 -0
  149. package/dist/es/components/Tooltip/Tooltip.js +22 -17
  150. package/dist/es/components/UploadForm/UploadField/UploadField.css +1 -1
  151. package/dist/es/components/UploadForm/UploadField/UploadField.d.ts +4 -1
  152. package/dist/es/components/UploadForm/UploadField/UploadField.js +8 -2
  153. package/dist/es/components/UploadForm/UploadField/components/_UploadFieldDropArea/UploadFieldDropArea.css +1 -1
  154. package/dist/es/components/UploadForm/UploadField/components/_UploadFieldDropArea/UploadFieldDropArea.d.ts +3 -1
  155. package/dist/es/components/UploadForm/UploadField/components/_UploadFieldDropArea/UploadFieldDropArea.js +30 -5
  156. package/dist/es/components/UploadForm/UploadFileItem/UploadFileItem.css +1 -1
  157. package/dist/es/components/UploadForm/UploadFileItem/UploadFileItem.d.ts +3 -1
  158. package/dist/es/components/UploadForm/UploadFileItem/UploadFileItem.js +9 -6
  159. package/dist/es/components/UploadForm/UploadFileItem/components/_UploadFileItemIcon/UploadFileItemIcon.js +6 -0
  160. package/dist/es/hooks/useResolution.js +15 -23
  161. package/dist/es/index.d.ts +6 -3
  162. package/dist/es/index.js +6 -3
  163. package/dist/lib/components/Accordion/Accordion.css +1 -1
  164. package/dist/lib/components/Accordion/Accordion.d.ts +3 -1
  165. package/dist/lib/components/Accordion/Accordion.js +3 -3
  166. package/dist/lib/components/Avatar/Avatar.css +1 -1
  167. package/dist/lib/components/Avatar/Avatar.d.ts +1 -1
  168. package/dist/lib/components/Badges/CounterBadge/CounterBadge.js +1 -2
  169. package/dist/lib/components/Badges/InfoBadge/InfoBadge.css +1 -0
  170. package/dist/lib/components/Badges/InfoBadge/InfoBadge.d.ts +52 -0
  171. package/dist/lib/components/Badges/InfoBadge/InfoBadge.js +235 -0
  172. package/dist/lib/components/Badges/PriceBadge/PriceBadge.d.ts +1 -0
  173. package/dist/lib/components/Badges/PriceBadge/PriceBadge.js +54 -13
  174. package/dist/lib/components/Badges/PromoBadge/PromoBadge.css +1 -1
  175. package/dist/lib/components/Badges/PromoBadge/PromoBadge.d.ts +1 -11
  176. package/dist/lib/components/Badges/PromoBadge/PromoBadge.js +7 -17
  177. package/dist/lib/components/Badges/StatusBadge/StatusBadge.css +1 -1
  178. package/dist/lib/components/Badges/StatusBadge/StatusBadge.js +16 -7
  179. package/dist/lib/components/Badges/TimerBadge/TimerBadge.d.ts +2 -0
  180. package/dist/lib/components/Badges/TimerBadge/TimerBadge.js +6 -2
  181. package/dist/lib/components/Buttons/Button/Button.css +1 -0
  182. package/dist/lib/components/{Button → Buttons/Button}/Button.d.ts +5 -0
  183. package/dist/lib/components/{Button → Buttons/Button}/Button.js +38 -12
  184. package/dist/lib/components/Buttons/ButtonClose/ButtonClose.css +1 -0
  185. package/dist/lib/components/Buttons/ButtonClose/ButtonClose.d.ts +34 -0
  186. package/dist/lib/components/Buttons/ButtonClose/ButtonClose.js +78 -0
  187. package/dist/lib/components/Calendar/components/_Month/Month.js +2 -6
  188. package/dist/lib/components/Carousel/Carousel.css +1 -1
  189. package/dist/lib/components/Carousel/Carousel.d.ts +9 -0
  190. package/dist/lib/components/Carousel/Carousel.js +15 -3
  191. package/dist/lib/components/Checkbox/Checkbox.css +1 -1
  192. package/dist/lib/components/Checkbox/Checkbox.js +3 -2
  193. package/dist/lib/components/Chips/Chips/Chip.css +1 -1
  194. package/dist/lib/components/Chips/Chips/Chip.d.ts +9 -1
  195. package/dist/lib/components/Chips/Chips/Chip.js +13 -8
  196. package/dist/lib/components/Chips/Chips/Chips.d.ts +16 -1
  197. package/dist/lib/components/Chips/Chips/Chips.js +28 -6
  198. package/dist/lib/components/Chips/Chips/components/ChipsDropdown/ChipsDropdown.css +1 -1
  199. package/dist/lib/components/Chips/Chips/components/ChipsDropdown/ChipsDropdown.d.ts +12 -4
  200. package/dist/lib/components/Chips/Chips/components/ChipsDropdown/ChipsDropdown.js +55 -47
  201. package/dist/lib/components/Chips/Chips/components/ChipsScrollPanel/ChipsScrollPanel.d.ts +10 -1
  202. package/dist/lib/components/Chips/Chips/components/ChipsScrollPanel/ChipsScrollPanel.js +11 -6
  203. package/dist/lib/components/Chips/ChipsSuggest/ChipSuggest.css +1 -1
  204. package/dist/lib/components/Chips/ChipsSuggest/ChipSuggest.d.ts +7 -0
  205. package/dist/lib/components/Chips/ChipsSuggest/ChipSuggest.js +8 -1
  206. package/dist/lib/components/Chips/ChipsSuggest/ChipsSuggest.d.ts +4 -2
  207. package/dist/lib/components/Chips/ChipsSuggest/ChipsSuggest.js +3 -0
  208. package/dist/lib/components/ContentArea/ContentArea.css +1 -1
  209. package/dist/lib/components/ContentArea/ContentArea.d.ts +3 -2
  210. package/dist/lib/components/ContentArea/ContentArea.js +5 -0
  211. package/dist/lib/components/ContentView/ContentView.css +1 -1
  212. package/dist/lib/components/ContentView/ContentView.d.ts +15 -4
  213. package/dist/lib/components/ContentView/ContentView.js +17 -4
  214. package/dist/lib/components/Counter/Counter.css +1 -1
  215. package/dist/lib/components/Counter/Counter.d.ts +2 -0
  216. package/dist/lib/components/Counter/Counter.js +6 -3
  217. package/dist/lib/components/Dropdown/Dropdown.css +1 -1
  218. package/dist/lib/components/Dropdown/Dropdown.d.ts +6 -2
  219. package/dist/lib/components/Dropdown/Dropdown.js +31 -22
  220. package/dist/lib/components/ErrorLoad/ErrorLoad.css +1 -1
  221. package/dist/lib/components/ErrorLoad/ErrorLoad.d.ts +1 -1
  222. package/dist/lib/components/ErrorLoad/ErrorLoad.js +2 -4
  223. package/dist/lib/components/Link/Link.css +1 -0
  224. package/dist/lib/components/Link/Link.d.ts +1 -0
  225. package/dist/lib/components/Link/Link.js +2 -1
  226. package/dist/lib/components/ListData/ListData.css +1 -1
  227. package/dist/lib/components/ListData/ListData.d.ts +9 -1
  228. package/dist/lib/components/ListData/ListData.js +20 -14
  229. package/dist/lib/components/ListData/components/ListDataSortable.css +1 -1
  230. package/dist/lib/components/ListData/components/ListDataSortable.js +1 -3
  231. package/dist/lib/components/Modal/Modal.css +1 -1
  232. package/dist/lib/components/Modal/Modal.d.ts +23 -9
  233. package/dist/lib/components/Modal/Modal.js +35 -24
  234. package/dist/lib/components/Modal/_ModalContent/ModalContent.css +1 -1
  235. package/dist/lib/components/Modal/_ModalContent/ModalContent.js +37 -39
  236. package/dist/lib/components/Modal/_ModalDesktop/ModalDesktop.css +1 -1
  237. package/dist/lib/components/Modal/_ModalMobile/ModalMobile.css +1 -0
  238. package/dist/lib/components/Modal/{_ModalMobileBottom/ModalMobileBottom.d.ts → _ModalMobile/ModalMobile.d.ts} +6 -5
  239. package/dist/lib/components/Modal/{_ModalMobileBottom/ModalMobileBottom.js → _ModalMobile/ModalMobile.js} +34 -25
  240. package/dist/lib/components/Modal/mocks.js +0 -1
  241. package/dist/lib/components/Modal/types.d.ts +1 -2
  242. package/dist/lib/components/NavArrow/NavArrow.css +1 -1
  243. package/dist/lib/components/NavArrow/NavArrow.js +4 -4
  244. package/dist/lib/components/Notification/Notification.css +1 -1
  245. package/dist/lib/components/Notification/Notification.d.ts +0 -11
  246. package/dist/lib/components/Notification/Notification.js +18 -37
  247. package/dist/lib/components/Pagination/Pagination.css +1 -1
  248. package/dist/lib/components/Pagination/Pagination.d.ts +1 -3
  249. package/dist/lib/components/Pagination/Pagination.js +4 -13
  250. package/dist/lib/components/Pagination/components/PaginationButton/PaginationButton.css +1 -1
  251. package/dist/lib/components/Pagination/components/PaginationButton/PaginationButton.d.ts +1 -2
  252. package/dist/lib/components/Pagination/components/PaginationButton/PaginationButton.js +0 -2
  253. package/dist/lib/components/Pagination/components/PaginationButtons/PaginationButtons.css +1 -1
  254. package/dist/lib/components/Pagination/components/PaginationButtons/PaginationButtons.d.ts +1 -3
  255. package/dist/lib/components/Pagination/components/PaginationButtons/PaginationButtons.js +5 -16
  256. package/dist/lib/components/Pagination/components/PaginationNavigation/PaginationNavigation.d.ts +1 -2
  257. package/dist/lib/components/Pagination/components/PaginationNavigation/PaginationNavigation.js +4 -4
  258. package/dist/lib/components/Pagination/types.d.ts +1 -11
  259. package/dist/lib/components/Pagination/types.js +1 -6
  260. package/dist/lib/components/Pagination/usePagination.d.ts +2 -2
  261. package/dist/lib/components/Pagination/usePagination.js +11 -29
  262. package/dist/lib/components/Parameter/Parameter.d.ts +0 -3
  263. package/dist/lib/components/Parameter/Parameter.js +3 -4
  264. package/dist/lib/components/RadioButton/RadioButton.css +1 -1
  265. package/dist/lib/components/Row/Row.css +1 -1
  266. package/dist/lib/components/Row/Row.js +5 -3
  267. package/dist/lib/components/ScrollBar/ScrollBar.d.ts +2 -0
  268. package/dist/lib/components/ScrollBar/ScrollBar.js +6 -1
  269. package/dist/lib/components/Search/Search.css +1 -1
  270. package/dist/lib/components/Search/Search.d.ts +2 -2
  271. package/dist/lib/components/Search/Search.js +72 -68
  272. package/dist/lib/components/Select/Select.css +1 -1
  273. package/dist/lib/components/Select/Select.d.ts +11 -20
  274. package/dist/lib/components/Select/Select.js +40 -88
  275. package/dist/lib/components/Select/reducer/selectReducer.js +1 -1
  276. package/dist/lib/components/Selector/Selector.css +1 -1
  277. package/dist/lib/components/Sliders/Slider/Slider.css +1 -1
  278. package/dist/lib/components/Sliders/Slider/Slider.d.ts +12 -0
  279. package/dist/lib/components/Sliders/Slider/Slider.js +25 -6
  280. package/dist/lib/components/Sliders/SliderRange/SliderRange.css +1 -1
  281. package/dist/lib/components/Sliders/SliderRange/SliderRange.d.ts +3 -0
  282. package/dist/lib/components/Sliders/SliderRange/SliderRange.js +4 -1
  283. package/dist/lib/components/Sliders/SliderRatio/SliderRatio.css +1 -1
  284. package/dist/lib/components/Sliders/components/SliderScale/SliderScale.css +1 -1
  285. package/dist/lib/components/Sliders/components/SliderScale/SliderScale.d.ts +6 -0
  286. package/dist/lib/components/Sliders/components/SliderScale/SliderScale.js +9 -2
  287. package/dist/lib/components/Sliders/helpers.d.ts +1 -0
  288. package/dist/lib/components/Sliders/helpers.js +8 -1
  289. package/dist/lib/components/Snackbar/Snackbar.css +1 -1
  290. package/dist/lib/components/Snackbar/Snackbar.js +20 -21
  291. package/dist/lib/components/Stepper/Stepper.css +1 -0
  292. package/dist/lib/components/Stepper/Stepper.d.ts +52 -0
  293. package/dist/lib/components/Stepper/Stepper.js +168 -0
  294. package/dist/lib/components/Stepper/StepperItem.css +1 -0
  295. package/dist/lib/components/Stepper/StepperItem.d.ts +57 -0
  296. package/dist/lib/components/Stepper/StepperItem.js +110 -0
  297. package/dist/lib/components/Stepper/img/separator-mobile.png +0 -0
  298. package/dist/lib/components/Stepper/img/separator-vertical.png +0 -0
  299. package/dist/lib/components/Stepper/img/separator.png +0 -0
  300. package/dist/lib/components/Switcher/Switcher.css +1 -1
  301. package/dist/lib/components/Switcher/Switcher.d.ts +5 -0
  302. package/dist/lib/components/Switcher/Switcher.js +21 -9
  303. package/dist/lib/components/Tabs/Tabs.css +1 -1
  304. package/dist/lib/components/Tabs/Tabs.d.ts +2 -0
  305. package/dist/lib/components/Tabs/Tabs.js +64 -55
  306. package/dist/lib/components/TextField/TextField.css +1 -1
  307. package/dist/lib/components/TextField/TextField.d.ts +2 -2
  308. package/dist/lib/components/TextField/TextField.js +16 -9
  309. package/dist/lib/components/Tooltip/Tooltip.css +1 -1
  310. package/dist/lib/components/Tooltip/Tooltip.d.ts +9 -0
  311. package/dist/lib/components/Tooltip/Tooltip.js +23 -18
  312. package/dist/lib/components/UploadForm/UploadField/UploadField.css +1 -1
  313. package/dist/lib/components/UploadForm/UploadField/UploadField.d.ts +4 -1
  314. package/dist/lib/components/UploadForm/UploadField/UploadField.js +8 -2
  315. package/dist/lib/components/UploadForm/UploadField/components/_UploadFieldDropArea/UploadFieldDropArea.css +1 -1
  316. package/dist/lib/components/UploadForm/UploadField/components/_UploadFieldDropArea/UploadFieldDropArea.d.ts +3 -1
  317. package/dist/lib/components/UploadForm/UploadField/components/_UploadFieldDropArea/UploadFieldDropArea.js +30 -5
  318. package/dist/lib/components/UploadForm/UploadFileItem/UploadFileItem.css +1 -1
  319. package/dist/lib/components/UploadForm/UploadFileItem/UploadFileItem.d.ts +3 -1
  320. package/dist/lib/components/UploadForm/UploadFileItem/UploadFileItem.js +9 -6
  321. package/dist/lib/components/UploadForm/UploadFileItem/components/_UploadFileItemIcon/UploadFileItemIcon.js +6 -0
  322. package/dist/lib/hooks/useResolution.js +15 -23
  323. package/dist/lib/index.d.ts +6 -3
  324. package/dist/lib/index.js +32 -11
  325. package/package.json +5 -5
  326. package/styles/base.scss +54 -0
  327. package/styles/colors.css +14 -0
  328. package/dist/es/components/Button/Button.css +0 -1
  329. package/dist/es/components/Modal/_ModalMobileBottom/ModalMobileBottom.css +0 -1
  330. package/dist/es/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.css +0 -1
  331. package/dist/es/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.d.ts +0 -8
  332. package/dist/es/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.js +0 -56
  333. package/dist/lib/components/Button/Button.css +0 -1
  334. package/dist/lib/components/Modal/_ModalMobileBottom/ModalMobileBottom.css +0 -1
  335. package/dist/lib/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.css +0 -1
  336. package/dist/lib/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.d.ts +0 -8
  337. package/dist/lib/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.js +0 -65
@@ -1,10 +1,16 @@
1
1
  import * as React from 'react';
2
2
  import type { IScrollBarProps } from '../ScrollBar/ScrollBar';
3
3
  import './Modal.scss';
4
- export declare enum MODAL_MOBILE_VIEWS_ENUM {
5
- FULL_SCREEN = "fullScreen",// use camelCase for simple using in props from backend
6
- BOTTOM = "bottom"
7
- }
4
+ declare const ModalMobileViews: {
5
+ readonly FULL_SCREEN: "fullScreen";
6
+ readonly BOTTOM: "bottom";
7
+ };
8
+ type ModalMobileViewsType = (typeof ModalMobileViews)[keyof typeof ModalMobileViews];
9
+ export declare const HeaderButtonsTheme: {
10
+ readonly DEFAULT: "default";
11
+ readonly WHITE: "white";
12
+ };
13
+ export type HeaderButtonsThemeType = (typeof HeaderButtonsTheme)[keyof typeof HeaderButtonsTheme];
8
14
  export declare enum MODAL_TRANSITIONS_STEPS_ENUM {
9
15
  INITIAL_STEP = "initial-step",
10
16
  MOVE_STEP = "move-step",
@@ -43,16 +49,20 @@ export type ModalHeaderPropsType = {
43
49
  showBackButton?: boolean;
44
50
  /** Скрыть крестик */
45
51
  hideCloseButton?: boolean;
46
- /** Отобразить дополнительный контент в шапке */
52
+ /** Дополнительный контент в шапке */
47
53
  headerAdditionalContent?: JSX.Element | JSX.Element[] | string | null;
54
+ /** Кастомный контент в шапке */
55
+ headerCustomContent?: JSX.Element | JSX.Element[] | string | null;
56
+ /** Цветовая тема кнопок */
57
+ buttonsTheme?: HeaderButtonsThemeType;
48
58
  /** Отобразить тень у шапки */
49
59
  hasHeaderShadow?: boolean;
50
- /** Отобразить кнопки с подложкой */
51
- hasHeaderButtonsShadow?: boolean;
52
60
  /** Закрепленная шапка */
53
61
  isStickyHeader?: boolean;
54
- /** Кнопки находятся вне основной шапке */
62
+ /** Кнопки находятся вне основной шапки */
55
63
  isOutSideHeaderButtons?: boolean;
64
+ /** Использовать серый фон в шапке */
65
+ isGrayColorHeader?: boolean;
56
66
  /** Обработчик для стрелки назад */
57
67
  onBackButtonClick?: () => void;
58
68
  };
@@ -63,6 +73,8 @@ export type ModalFooterPropsType = {
63
73
  isStickyFooter?: boolean;
64
74
  /** Отобразить тень у футера */
65
75
  hasFooterShadow?: boolean;
76
+ /** Использовать серый фон в футере */
77
+ isGrayColorFooter?: boolean;
66
78
  };
67
79
  export interface IModalProps {
68
80
  /** Дополнительные классы для корневого элемента */
@@ -80,11 +92,13 @@ export interface IModalProps {
80
92
  /** Настройки для футера модального окна */
81
93
  footerProps?: ModalFooterPropsType;
82
94
  /** Вид модального окна на разрешении 767- */
83
- mobileView?: MODAL_MOBILE_VIEWS_ENUM;
95
+ mobileView?: ModalMobileViewsType;
84
96
  /** Включить дефолтный скролл (отключает кастомный компонент скролла) */
85
97
  isEnabledNativeScroll?: boolean;
86
98
  /** Отключить закрытие шторки свайпом */
87
99
  isSwipeDisabled?: boolean;
100
+ /** Использовать серый фон для основного контента модального окна */
101
+ isGrayColorModal?: boolean;
88
102
  /** Отключить закрытие модального окна при клике на фон */
89
103
  isDisabledBackgroundClick?: boolean;
90
104
  /** Восстанавливает фокус на элементе, который был сфокусирован до открытия модального окна */
@@ -8,17 +8,20 @@ import THROTTLE_TIME from "../../constants/throttleTime";
8
8
  import usePrevious from "../../hooks/usePrevious";
9
9
  import useResolution from "../../hooks/useResolution";
10
10
  import ModalDesktop from "./_ModalDesktop/ModalDesktop";
11
- import ModalMobileBottom from "./_ModalMobileBottom/ModalMobileBottom";
12
- import ModalMobileFullScreen from "./_ModalMobileFullScreen/ModalMobileFullScreen";
11
+ import ModalMobile from "./_ModalMobile/ModalMobile";
13
12
  import { changeBodyPadding, getCorrectMaxHeight } from "./utils/utils";
14
13
  import "./Modal.css";
15
14
  var MOBILE_BIG_START = breakpoints.MOBILE_BIG_START;
16
15
  var HEIGHT_TRANSITION_PROPERTY = 'height';
17
- export var MODAL_MOBILE_VIEWS_ENUM;
18
- (function (MODAL_MOBILE_VIEWS_ENUM) {
19
- MODAL_MOBILE_VIEWS_ENUM["FULL_SCREEN"] = "fullScreen";
20
- MODAL_MOBILE_VIEWS_ENUM["BOTTOM"] = "bottom";
21
- })(MODAL_MOBILE_VIEWS_ENUM || (MODAL_MOBILE_VIEWS_ENUM = {}));
16
+ var ModalMobileViews = {
17
+ FULL_SCREEN: 'fullScreen',
18
+ // use camelCase for simple using in props from backend
19
+ BOTTOM: 'bottom'
20
+ };
21
+ export var HeaderButtonsTheme = {
22
+ DEFAULT: 'default',
23
+ WHITE: 'white'
24
+ };
22
25
  export var MODAL_TRANSITIONS_STEPS_ENUM;
23
26
  (function (MODAL_TRANSITIONS_STEPS_ENUM) {
24
27
  MODAL_TRANSITIONS_STEPS_ENUM["INITIAL_STEP"] = "initial-step";
@@ -37,9 +40,11 @@ var Modal = function Modal(_ref) {
37
40
  headerProps = _ref.headerProps,
38
41
  footerProps = _ref.footerProps,
39
42
  _ref$mobileView = _ref.mobileView,
40
- mobileView = _ref$mobileView === void 0 ? MODAL_MOBILE_VIEWS_ENUM.FULL_SCREEN : _ref$mobileView,
43
+ mobileView = _ref$mobileView === void 0 ? ModalMobileViews.FULL_SCREEN : _ref$mobileView,
41
44
  isEnabledNativeScroll = _ref.isEnabledNativeScroll,
42
45
  isSwipeDisabled = _ref.isSwipeDisabled,
46
+ _ref$isGrayColorModal = _ref.isGrayColorModal,
47
+ isGrayColorModal = _ref$isGrayColorModal === void 0 ? false : _ref$isGrayColorModal,
43
48
  isDisabledBackgroundClick = _ref.isDisabledBackgroundClick,
44
49
  isRecalculateHeight = _ref.isRecalculateHeight,
45
50
  _ref$hideAriaApp = _ref.hideAriaApp,
@@ -91,8 +96,8 @@ var Modal = function Modal(_ref) {
91
96
  var resizeObserver = React.useRef(null);
92
97
  var _useResolution = useResolution(),
93
98
  isMobile = _useResolution.isMobile;
94
- var isFullScreenView = mobileView === MODAL_MOBILE_VIEWS_ENUM.FULL_SCREEN && isMobile;
95
- var isBottomView = mobileView === MODAL_MOBILE_VIEWS_ENUM.BOTTOM && isMobile;
99
+ var isFullScreenView = mobileView === 'fullScreen' && isMobile;
100
+ var isBottomView = mobileView === 'bottom' && isMobile;
96
101
  var isBottomTransitionIn = transitionStep !== MODAL_TRANSITIONS_STEPS_ENUM.END_STEP && transitionStep !== MODAL_TRANSITIONS_STEPS_ENUM.MOVE_END_STEP;
97
102
  var isTransitionMoveStep = transitionStep === MODAL_TRANSITIONS_STEPS_ENUM.MOVE_STEP;
98
103
  var isTransitionEndStep = transitionStep === MODAL_TRANSITIONS_STEPS_ENUM.END_STEP;
@@ -165,7 +170,7 @@ var Modal = function Modal(_ref) {
165
170
  };
166
171
  var handleTransitionExited = function handleTransitionExited() {
167
172
  setTransitionStep(MODAL_TRANSITIONS_STEPS_ENUM.INITIAL_STEP);
168
- isBottomView && setContainerWrapTransform('none');
173
+ (isBottomView || isFullScreenView) && setContainerWrapTransform('none');
169
174
  onClose === null || onClose === void 0 ? void 0 : onClose();
170
175
  };
171
176
  var handleTransitionEnd = function handleTransitionEnd(e) {
@@ -180,6 +185,15 @@ var Modal = function Modal(_ref) {
180
185
  if (!isOpened) {
181
186
  setContainerWrapHeight(undefined);
182
187
  }
188
+ var setViewportHeightVar = function setViewportHeightVar() {
189
+ var vhUnit = "".concat(window.innerHeight * 0.01, "px");
190
+ document.documentElement.style.setProperty('--vh', vhUnit);
191
+ };
192
+ setViewportHeightVar();
193
+ window.addEventListener('resize', setViewportHeightVar);
194
+ return function () {
195
+ window.removeEventListener('resize', setViewportHeightVar);
196
+ };
183
197
  }, [isOpened]);
184
198
  React.useEffect(function () {
185
199
  if (isMobile || window.innerWidth < MOBILE_BIG_START || !window.ResizeObserver) {
@@ -254,8 +268,8 @@ var Modal = function Modal(_ref) {
254
268
  scrollBarScrollableRef: scrollBarScrollableRef
255
269
  },
256
270
  isEnabledNativeScroll: isEnabledNativeScroll,
271
+ isGrayColorModal: isGrayColorModal,
257
272
  isDisabledBackgroundClick: isDisabledBackgroundClick,
258
- isMobile: isMobile,
259
273
  isTransitionMoveStep: isTransitionMoveStep,
260
274
  isTransitionEndStep: isTransitionEndStep,
261
275
  containerWrapTransform: containerWrapTransform,
@@ -268,18 +282,15 @@ var Modal = function Modal(_ref) {
268
282
  onTransitionEnd: handleTransitionEnd
269
283
  };
270
284
  var renderContent = function renderContent() {
271
- switch (true) {
272
- case isFullScreenView:
273
- return /*#__PURE__*/React.createElement(ModalMobileFullScreen, contextProps, children);
274
- case isBottomView:
275
- return /*#__PURE__*/React.createElement(ModalMobileBottom, _extends({}, contextProps, {
276
- isSwipeDisabled: isSwipeDisabled,
277
- onChangeTransitionStep: handleChangeTransitionStep,
278
- onChangeContainerWrapTransform: handleChangeContainerWrapTransform
279
- }), children);
280
- default:
281
- return /*#__PURE__*/React.createElement(ModalDesktop, contextProps, children);
285
+ if (!isMobile) {
286
+ return /*#__PURE__*/React.createElement(ModalDesktop, contextProps, children);
282
287
  }
288
+ return /*#__PURE__*/React.createElement(ModalMobile, _extends({}, contextProps, {
289
+ isSwipeDisabled: isSwipeDisabled,
290
+ isFullView: isFullScreenView,
291
+ onChangeTransitionStep: handleChangeTransitionStep,
292
+ onChangeContainerWrapTransform: handleChangeContainerWrapTransform
293
+ }), children);
283
294
  };
284
295
  return /*#__PURE__*/React.createElement(ReactModal, {
285
296
  className: cn('modal-content', classes === null || classes === void 0 ? void 0 : classes.modalContent),
@@ -1 +1 @@
1
- h1,h2,h3,h4,h5{margin:0}.mfui-9-modal-content__background{background-color:rgba(0,0,0,.8);bottom:0;left:0;position:fixed;right:0;top:0}.mfui-9-modal-content__container-wrap{-webkit-animation:show-popup .3s ease-out;animation:show-popup .3s ease-out;position:relative;width:100%}@media screen and (min-width:768px){.mfui-9-modal-content__container-wrap{-webkit-transition:height .1s;transition:height .1s;width:740px}}.mfui-9-modal-content__container-inner{background-color:var(--background);font-family:inherit;width:100%}.mfui-9-modal-content__container-inner_native-scroll{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}@media screen and (min-width:768px){.mfui-9-modal-content__container-inner_native-scroll{max-height:80vh}}.mfui-9-modal-content__header{position:relative}.mfui-9-modal-content__header_shadow{-webkit-box-shadow:0 2px 12px rgba(0,0,0,.1);box-shadow:0 2px 12px rgba(0,0,0,.1)}.mfui-9-modal-content__header_native-scroll{background-color:var(--background);border-radius:12px;position:sticky;top:0}.mfui-9-modal-content__header-main{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;min-height:52px}@media screen and (min-width:768px){.mfui-9-modal-content__header-main{min-height:64px}}.mfui-9-modal-content__header-button{display:-webkit-box;display:-ms-flexbox;display:flex;position:absolute;top:12px;z-index:2;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;background:transparent;border:none;cursor:pointer;height:32px;justify-content:center;outline:none;width:32px}@media screen and (min-width:768px){.mfui-9-modal-content__header-button{height:40px;width:40px}}.mfui-9-modal-content__header-button_back{left:16px}.mfui-9-modal-content__header-button_close{right:16px}.mfui-9-modal-content__header-button_shadow{background:var(--base);border-radius:50%;-webkit-box-shadow:0 2px 12px rgba(0,0,0,.1);box-shadow:0 2px 12px rgba(0,0,0,.1)}.mfui-9-modal-content__header-icon{height:32px;min-width:32px;width:32px;fill:var(--content)}@media screen and (min-width:768px){.mfui-9-modal-content__header-icon{height:40px;min-width:40px;width:40px}}.mfui-9-modal-content__title-area{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 48px;padding:12px}@media screen and (min-width:768px){.mfui-9-modal-content__title-area{margin:0 56px;padding:16px}}.mfui-9-modal-content__title{font-size:18px;font-weight:500;letter-spacing:.5px;line-height:24px;text-align:center}@media screen and (min-width:1280px){.mfui-9-modal-content__title{font-size:20px;line-height:28px}}@media screen and (min-width:768px){.mfui-9-modal-content__title{font-size:20px;font-weight:500;letter-spacing:.5px;line-height:28px}}.mfui-9-modal-content__header-additional{-webkit-box-sizing:border-box;box-sizing:border-box;padding:8px 16px;text-align:center}@media screen and (min-width:768px){.mfui-9-modal-content__header-additional{padding-left:32px;padding-right:32px}}.mfui-9-modal-content__container-body{-webkit-box-sizing:border-box;box-sizing:border-box;padding-bottom:24px;padding-right:6px}@media screen and (min-width:768px){.mfui-9-modal-content__container-body{padding-bottom:32px;padding-right:12px}}.mfui-9-modal-content__container-body_native-scroll{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;overflow-x:hidden;overflow-y:auto}.mfui-9-modal-content__children{-webkit-box-sizing:border-box;box-sizing:border-box;padding-left:16px;padding-right:4px;padding-top:24px}@media screen and (min-width:768px){.mfui-9-modal-content__children{padding-left:32px;padding-right:14px}}.mfui-9-modal-content__container-wrap_static-header .mfui-9-modal-content__container-body{padding-top:24px}.mfui-9-modal-content__container-wrap_static-header .mfui-9-modal-content__children{padding-top:0}.mfui-9-modal-content__container-wrap_static-header .mfui-9-modal-content__header{margin-bottom:24px;margin-left:-16px;margin-right:-16px}@media screen and (min-width:768px){.mfui-9-modal-content__container-wrap_static-header .mfui-9-modal-content__header{margin-left:-32px;margin-right:-32px}}.mfui-9-modal-content__container-wrap_static-header .mfui-9-modal-content__header-main{min-height:40px}.mfui-9-modal-content__container-wrap_static-header .mfui-9-modal-content__header-button{top:0}.mfui-9-modal-content__container-wrap_static-header .mfui-9-modal-content__title-area{padding-bottom:4px;padding-top:4px}.mfui-9-modal-content__container-wrap_hide-header .mfui-9-modal-content__container-body{padding-top:24px}.mfui-9-modal-content__container-wrap_hide-header .mfui-9-modal-content__children{padding-top:0}.mfui-9-modal-content__container-wrap_sticky-footer .mfui-9-modal-content__container-body{padding-bottom:0}.mfui-9-modal-content__container-wrap_sticky-footer .mfui-9-modal-content__footer{padding-left:16px;padding-right:16px}@media screen and (min-width:768px){.mfui-9-modal-content__container-wrap_sticky-footer .mfui-9-modal-content__footer{padding-left:32px;padding-right:32px}}.mfui-9-modal-content__container-wrap_sticky-footer .mfui-9-modal-content__footer_native-scroll{background-color:var(--background);border-radius:12px;bottom:0;position:sticky}.mfui-9-modal-content__container-wrap_sticky-footer .mfui-9-modal-content__footer_shadow{-webkit-box-shadow:0 2px 12px rgba(0,0,0,.1);box-shadow:0 2px 12px rgba(0,0,0,.1)}.mfui-9-modal-content__container-wrap_out-side-buttons .mfui-9-modal-content__container-body{padding-top:24px}.mfui-9-modal-content__container-wrap_native-scroll .mfui-9-modal-content__children,.mfui-9-modal-content__container-wrap_native-scroll .mfui-9-modal-content__container-body{padding:0}.mfui-9-modal-content__container-wrap_transition-end{-webkit-animation:hide-popup .2s ease-in;animation:hide-popup .2s ease-in}@-webkit-keyframes show-popup{0%{-webkit-transform:scale(95%);transform:scale(95%);-webkit-transform-origin:top;transform-origin:top}to{-webkit-transform:scale(100%);transform:scale(100%)}}@keyframes show-popup{0%{-webkit-transform:scale(95%);transform:scale(95%);-webkit-transform-origin:top;transform-origin:top}to{-webkit-transform:scale(100%);transform:scale(100%)}}@-webkit-keyframes hide-popup{0%{-webkit-transform:scale(100%);transform:scale(100%)}to{-webkit-transform:scale(95%);transform:scale(95%)}}@keyframes hide-popup{0%{-webkit-transform:scale(100%);transform:scale(100%)}to{-webkit-transform:scale(95%);transform:scale(95%)}}
1
+ h1,h2,h3,h4,h5{margin:0}.mfui-9-modal-content__background{background-color:rgba(0,0,0,.8);bottom:0;left:0;position:fixed;right:0;top:0}.mfui-9-modal-content__container-wrap{-webkit-animation:show-popup .3s ease-out;animation:show-popup .3s ease-out;position:relative;width:100%}@media screen and (min-width:768px){.mfui-9-modal-content__container-wrap{-webkit-transition:height .1s;transition:height .1s;width:740px}}.mfui-9-modal-content__container-inner{background-color:var(--background);font-family:inherit;width:100%}.mfui-9-modal-content__container-inner_native-scroll{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}@media screen and (min-width:768px){.mfui-9-modal-content__container-inner_native-scroll{max-height:80vh}}.mfui-9-modal-content__header{position:relative}.mfui-9-modal-content__header_shadow{-webkit-box-shadow:0 2px 12px rgba(0,0,0,.1);box-shadow:0 2px 12px rgba(0,0,0,.1)}.mfui-9-modal-content__header_gray{background-color:var(--backgroundGray)}.mfui-9-modal-content__header_native-scroll{background-color:var(--background);border-radius:12px;position:sticky;top:0}.mfui-9-modal-content__header-main{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;min-height:64px}@media screen and (min-width:768px){.mfui-9-modal-content__header-main{min-height:64px}}.mfui-9-modal-content__header-custom-content{width:100%}.mfui-9-modal-content__header-button{display:-webkit-box;display:-ms-flexbox;display:flex;position:absolute;top:12px;z-index:2;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;background:transparent;border:none;cursor:pointer;height:44px;justify-content:center;outline:none;width:44px}.mfui-9-modal-content__header-button_back{left:14px}@media screen and (max-width:767px){.mfui-9-modal-content__header-button_back{left:10px;top:10px}}.mfui-9-modal-content__header-button_close{right:18px}@media screen and (max-width:767px){.mfui-9-modal-content__header-button_close{right:10px;top:10px}}.mfui-9-modal-content__header-inner{background-color:var(--spbSky0);border-radius:12px;height:32px;position:relative;-webkit-transition:background-color .3s;transition:background-color .3s;width:32px}.mfui-9-modal-content__header-inner:focus-visible{-webkit-animation:focus-outline-shrink .3s linear forwards;animation:focus-outline-shrink .3s linear forwards;outline-offset:2px}@-webkit-keyframes focus-outline-shrink{0%{outline:0 solid var(--137C)}to{outline:4px solid var(--137C)}}@keyframes focus-outline-shrink{0%{outline:0 solid var(--137C)}to{outline:4px solid var(--137C)}}.mfui-9-modal-content__header-inner:focus{outline:none}.mfui-9-modal-content__header-inner:hover{background-color:var(--spbSky1)}.mfui-9-modal-content__header-inner:active{background-color:var(--spbSky2)}.mfui-9-modal-content__header-icon{height:32px;min-width:32px;width:32px;fill:var(--content)}.mfui-9-modal-content__title-area{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 48px;padding:12px}@media screen and (min-width:768px){.mfui-9-modal-content__title-area{margin:0 56px;padding:16px}}.mfui-9-modal-content__title{font-size:18px;font-weight:500;letter-spacing:.5px;line-height:24px;text-align:center}@media screen and (min-width:1280px){.mfui-9-modal-content__title{font-size:20px;line-height:28px}}@media screen and (min-width:768px){.mfui-9-modal-content__title{font-size:20px;font-weight:500;letter-spacing:.5px;line-height:28px}}.mfui-9-modal-content__header-additional{-webkit-box-sizing:border-box;box-sizing:border-box;padding:8px 16px;text-align:center}@media screen and (min-width:768px){.mfui-9-modal-content__header-additional{padding-left:32px;padding-right:32px}}.mfui-9-modal-content__container-body{-webkit-box-sizing:border-box;box-sizing:border-box;padding-bottom:24px;padding-right:6px}@media screen and (min-width:768px){.mfui-9-modal-content__container-body{padding-bottom:24px;padding-right:12px}}.mfui-9-modal-content__container-body_native-scroll{-webkit-box-flex:1;-ms-flex-positive:1;background-color:var(--base);border-bottom-left-radius:32px;border-top-left-radius:32px;flex-grow:1;overflow-x:hidden;overflow-y:auto}.mfui-9-modal-content__container-body_gray{background-color:var(--backgroundGray)}.mfui-9-modal-content__container-body_gray-with-footer{background-color:var(--backgroundGray);border-bottom-left-radius:32px;border-bottom-right-radius:32px}.mfui-9-modal-content__children{-webkit-box-sizing:border-box;box-sizing:border-box;padding-left:16px;padding-right:4px;padding-top:24px}@media screen and (min-width:768px){.mfui-9-modal-content__children{padding-left:24px;padding-right:6px}}.mfui-9-modal-content__header-button_theme_white .mfui-9-modal-content__header-inner{background-color:var(--stcWhite);position:relative}.mfui-9-modal-content__header-button_theme_white .mfui-9-modal-content__header-inner:after{background-color:var(--stcBlack);border-radius:12px;bottom:0;content:"";left:0;opacity:0;pointer-events:none;position:absolute;right:0;top:0;-webkit-transition:opacity .3s;transition:opacity .3s}.mfui-9-modal-content__header-button_theme_white .mfui-9-modal-content__header-inner:hover:after{opacity:.1}.mfui-9-modal-content__header-button_theme_white .mfui-9-modal-content__header-inner:active:after{opacity:.2}.mfui-9-modal-content__header-button_theme_white .mfui-9-modal-content__header-icon{fill:var(--stcBlack)}.mfui-9-modal-content__container-wrap_static-header .mfui-9-modal-content__container-body{padding-top:24px}.mfui-9-modal-content__container-wrap_static-header .mfui-9-modal-content__children{overflow-x:hidden;padding-top:0}.mfui-9-modal-content__container-wrap_static-header .mfui-9-modal-content__header{margin-bottom:24px;margin-left:-16px;margin-right:-16px}@media screen and (min-width:768px){.mfui-9-modal-content__container-wrap_static-header .mfui-9-modal-content__header{margin-left:-32px;margin-right:-32px}}.mfui-9-modal-content__container-wrap_static-header .mfui-9-modal-content__header-main{min-height:40px}.mfui-9-modal-content__container-wrap_static-header .mfui-9-modal-content__header-button{top:0}.mfui-9-modal-content__container-wrap_static-header .mfui-9-modal-content__title-area{padding-bottom:4px;padding-top:4px}.mfui-9-modal-content__container-wrap_hide-header .mfui-9-modal-content__container-body{padding-top:24px}.mfui-9-modal-content__container-wrap_hide-header .mfui-9-modal-content__children{padding-top:0}.mfui-9-modal-content__container-wrap_sticky-footer .mfui-9-modal-content__container-body{padding-bottom:0}.mfui-9-modal-content__container-wrap_sticky-footer .mfui-9-modal-content__footer{padding-left:16px;padding-right:16px}@media screen and (min-width:768px){.mfui-9-modal-content__container-wrap_sticky-footer .mfui-9-modal-content__footer{padding-left:32px;padding-right:32px}}.mfui-9-modal-content__container-wrap_sticky-footer .mfui-9-modal-content__footer_native-scroll{background-color:var(--background);border-radius:12px;bottom:0;position:sticky}.mfui-9-modal-content__container-wrap_sticky-footer .mfui-9-modal-content__footer_shadow{-webkit-box-shadow:0 2px 12px rgba(0,0,0,.1);box-shadow:0 2px 12px rgba(0,0,0,.1)}.mfui-9-modal-content__container-wrap_sticky-footer .mfui-9-modal-content__footer_gray{background-color:var(--backgroundGray);border-bottom-left-radius:32px;border-bottom-right-radius:32px}.mfui-9-modal-content__container-wrap_out-side-buttons .mfui-9-modal-content__container-body{padding-top:24px}.mfui-9-modal-content__container-wrap_native-scroll .mfui-9-modal-content__children,.mfui-9-modal-content__container-wrap_native-scroll .mfui-9-modal-content__container-body{padding:0}.mfui-9-modal-content__container-wrap_transition-end{-webkit-animation:hide-popup .2s ease-in;animation:hide-popup .2s ease-in}@-webkit-keyframes show-popup{0%{-webkit-transform:scale(95%);transform:scale(95%);-webkit-transform-origin:top;transform-origin:top}to{-webkit-transform:scale(100%);transform:scale(100%)}}@keyframes show-popup{0%{-webkit-transform:scale(95%);transform:scale(95%);-webkit-transform-origin:top;transform-origin:top}to{-webkit-transform:scale(100%);transform:scale(100%)}}@-webkit-keyframes hide-popup{0%{-webkit-transform:scale(100%);transform:scale(100%)}to{-webkit-transform:scale(95%);transform:scale(95%)}}@keyframes hide-popup{0%{-webkit-transform:scale(100%);transform:scale(100%)}to{-webkit-transform:scale(95%);transform:scale(95%)}}
@@ -9,29 +9,14 @@ var ArrowLeft24 = function ArrowLeft24(props) {
9
9
  return /*#__PURE__*/React.createElement("svg", _extends({
10
10
  viewBox: "0 0 32 32"
11
11
  }, props), /*#__PURE__*/React.createElement("path", {
12
- d: "M19.5 20.8L14.7 16l4.8-4.8-1.6-1.7-6.4 6.5 6.4 6.5z"
12
+ d: "M13.906 9.114a1.25 1.25 0 111.764 1.772l-3.871 3.853H23a1.25 1.25 0 110 2.5H11.777l3.893 3.875a1.25 1.25 0 01-1.764 1.772l-5.618-5.592a1.825 1.825 0 010-2.588l5.618-5.592z"
13
13
  }));
14
14
  };
15
15
  var Cancel24 = function Cancel24(props) {
16
16
  return /*#__PURE__*/React.createElement("svg", _extends({
17
17
  viewBox: "0 0 32 32"
18
18
  }, props), /*#__PURE__*/React.createElement("path", {
19
- className: "Cancel24__st0",
20
- d: "M16 14.5L11.5 10 10 11.5l4.5 4.5-4.5 4.5 1.5 1.5 4.5-4.5 4.5 4.5 1.5-1.5-4.5-4.5 4.5-4.5-1.5-1.5-4.5 4.5z"
21
- }));
22
- };
23
- var ArrowLeft32 = function ArrowLeft32(props) {
24
- return /*#__PURE__*/React.createElement("svg", _extends({
25
- viewBox: "0 0 40 40"
26
- }, props), /*#__PURE__*/React.createElement("path", {
27
- d: "M24 26l-6-6 6-6-2-2-8 8 8 8z"
28
- }));
29
- };
30
- var Cancel32 = function Cancel32(props) {
31
- return /*#__PURE__*/React.createElement("svg", _extends({
32
- viewBox: "0 0 40 40"
33
- }, props), /*#__PURE__*/React.createElement("path", {
34
- d: "M20 18.586l6.364-6.364 1.414 1.414L21.414 20l6.364 6.364-1.414 1.414L20 21.414l-6.364 6.364-1.414-1.414L18.586 20l-6.364-6.364 1.414-1.414L20 18.586z"
19
+ d: "M9.405 9.402a1.558 1.558 0 012.201 0l4.348 4.344 4.337-4.333a1.555 1.555 0 112.201 2.2l-4.338 4.331 4.339 4.335a1.555 1.555 0 11-2.201 2.2l-4.34-4.336-4.348 4.346a1.554 1.554 0 11-2.2-2.2l4.348-4.344L9.405 11.6a1.554 1.554 0 010-2.2z"
35
20
  }));
36
21
  };
37
22
  var cn = cnCreate('mfui-9-modal-content');
@@ -45,25 +30,29 @@ var ModalContent = function ModalContent(_ref) {
45
30
  showBackButton = _ref$headerProps2.showBackButton,
46
31
  hideCloseButton = _ref$headerProps2.hideCloseButton,
47
32
  headerAdditionalContent = _ref$headerProps2.headerAdditionalContent,
33
+ headerCustomContent = _ref$headerProps2.headerCustomContent,
34
+ buttonsTheme = _ref$headerProps2.buttonsTheme,
48
35
  hasHeaderShadow = _ref$headerProps2.hasHeaderShadow,
49
- hasHeaderButtonsShadow = _ref$headerProps2.hasHeaderButtonsShadow,
50
36
  _ref$headerProps2$isS = _ref$headerProps2.isStickyHeader,
51
37
  isStickyHeaderProps = _ref$headerProps2$isS === void 0 ? true : _ref$headerProps2$isS,
52
38
  isOutSideHeaderButtons = _ref$headerProps2.isOutSideHeaderButtons,
39
+ isGrayColorHeader = _ref$headerProps2.isGrayColorHeader,
53
40
  onBackButtonClick = _ref$headerProps2.onBackButtonClick,
54
41
  _ref$footerProps = _ref.footerProps,
55
42
  _ref$footerProps2 = _ref$footerProps === void 0 ? {} : _ref$footerProps,
56
43
  footer = _ref$footerProps2.footer,
57
44
  isStickyFooterProps = _ref$footerProps2.isStickyFooter,
58
45
  hasFooterShadow = _ref$footerProps2.hasFooterShadow,
46
+ isGrayColorFooter = _ref$footerProps2.isGrayColorFooter,
59
47
  _ref$refs = _ref.refs,
60
48
  headerRef = _ref$refs.headerRef,
61
49
  footerRef = _ref$refs.footerRef,
62
50
  containerInnerRef = _ref$refs.containerInnerRef,
63
51
  containerBodyRef = _ref$refs.containerBodyRef,
52
+ containerWrapRef = _ref$refs.containerWrapRef,
64
53
  isEnabledNativeScroll = _ref.isEnabledNativeScroll,
54
+ isGrayColorModal = _ref.isGrayColorModal,
65
55
  isDisabledBackgroundClick = _ref.isDisabledBackgroundClick,
66
- isMobile = _ref.isMobile,
67
56
  isTransitionMoveStep = _ref.isTransitionMoveStep,
68
57
  isTransitionEndStep = _ref.isTransitionEndStep,
69
58
  containerWrapTransform = _ref.containerWrapTransform,
@@ -80,12 +69,11 @@ var ModalContent = function ModalContent(_ref) {
80
69
  showHeaderShadow = _React$useState2[0],
81
70
  setShowHeaderShadow = _React$useState2[1];
82
71
  var showHeaderMain = !!showBackButton || !!headerTitle || !hideCloseButton;
83
- var showHeader = showHeaderMain || !!headerAdditionalContent;
72
+ var showHeader = showHeaderMain || !!headerAdditionalContent || !!headerCustomContent;
84
73
  var isStickyHeader = showHeader && isStickyHeaderProps;
85
74
  var isStaticHeader = showHeader && !isStickyHeaderProps;
86
75
  var isStickyFooter = !!footer && !!isStickyFooterProps;
87
76
  var isStaticFooter = !!footer && !isStickyFooterProps;
88
- var isSmallIcon = isMobile || !!hasHeaderButtonsShadow;
89
77
  var handleChangeShadowState = React.useCallback(function (e) {
90
78
  var scrollTop = e.nativeEvent.target.scrollTop;
91
79
  setShowHeaderShadow(scrollTop > 0);
@@ -93,45 +81,55 @@ var ModalContent = function ModalContent(_ref) {
93
81
  var renderBackButton = /*#__PURE__*/React.createElement("button", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.headerBackButton), {
94
82
  className: cn('header-button', {
95
83
  back: true,
96
- shadow: hasHeaderButtonsShadow
84
+ theme: buttonsTheme
97
85
  }, classes === null || classes === void 0 ? void 0 : classes.headerBackButton),
98
86
  type: "button",
99
- onClick: onBackButtonClick
100
- }), isSmallIcon ? /*#__PURE__*/React.createElement(ArrowLeft24, {
101
- className: cn('header-icon')
102
- }) : /*#__PURE__*/React.createElement(ArrowLeft32, {
87
+ onClick: onBackButtonClick,
88
+ tabIndex: -1
89
+ }), /*#__PURE__*/React.createElement("div", {
90
+ className: cn('header-inner'),
91
+ role: "button",
92
+ tabIndex: 0
93
+ }, /*#__PURE__*/React.createElement(ArrowLeft24, {
103
94
  className: cn('header-icon')
104
- }));
95
+ })));
105
96
  var renderCloseButton = /*#__PURE__*/React.createElement("button", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.headerCloseButton), {
106
97
  className: cn('header-button', {
107
98
  close: true,
108
- shadow: hasHeaderButtonsShadow
99
+ theme: buttonsTheme
109
100
  }, classes === null || classes === void 0 ? void 0 : classes.headerCloseButton),
110
101
  type: "button",
111
- onClick: onPopupClose
112
- }), isSmallIcon ? /*#__PURE__*/React.createElement(Cancel24, {
113
- className: cn('header-icon')
114
- }) : /*#__PURE__*/React.createElement(Cancel32, {
102
+ onClick: onPopupClose,
103
+ tabIndex: -1
104
+ }), /*#__PURE__*/React.createElement("div", {
105
+ className: cn('header-inner'),
106
+ role: "button",
107
+ tabIndex: 0
108
+ }, /*#__PURE__*/React.createElement(Cancel24, {
115
109
  className: cn('header-icon')
116
- }));
110
+ })));
117
111
  var renderHeader = /*#__PURE__*/React.createElement("div", {
118
112
  className: cn('header', {
119
113
  shadow: showHeaderShadow,
114
+ gray: isGrayColorHeader,
120
115
  'native-scroll': isEnabledNativeScroll && isStickyHeader
121
116
  }, classes === null || classes === void 0 ? void 0 : classes.header),
122
117
  ref: headerRef
123
118
  }, !!isOutSideHeaderButtons && showBackButton && renderBackButton, !isOutSideHeaderButtons && showHeaderMain && /*#__PURE__*/React.createElement("div", {
124
119
  className: cn('header-main')
125
- }, showBackButton && renderBackButton, !!headerTitle && /*#__PURE__*/React.createElement("div", {
120
+ }, showBackButton && renderBackButton, !!headerCustomContent && /*#__PURE__*/React.createElement("div", {
121
+ className: cn('header-custom-content')
122
+ }, headerCustomContent), !!headerTitle && !headerCustomContent && /*#__PURE__*/React.createElement("div", {
126
123
  className: cn('title-area', classes === null || classes === void 0 ? void 0 : classes.titleArea)
127
124
  }, /*#__PURE__*/React.createElement("div", {
128
125
  className: cn('title', classes === null || classes === void 0 ? void 0 : classes.title)
129
- }, headerTitle)), !hideCloseButton && renderCloseButton), !!isOutSideHeaderButtons && !hideCloseButton && renderCloseButton, !!headerAdditionalContent && /*#__PURE__*/React.createElement("div", {
126
+ }, headerTitle)), !hideCloseButton && renderCloseButton), !!isOutSideHeaderButtons && !hideCloseButton && renderCloseButton, !!headerAdditionalContent && !headerCustomContent && /*#__PURE__*/React.createElement("div", {
130
127
  className: cn('header-additional')
131
128
  }, headerAdditionalContent));
132
129
  var renderFooter = /*#__PURE__*/React.createElement("div", {
133
130
  className: cn('footer', {
134
131
  shadow: hasFooterShadow,
132
+ gray: isGrayColorFooter,
135
133
  'native-scroll': isEnabledNativeScroll && isStickyFooter
136
134
  }, classes === null || classes === void 0 ? void 0 : classes.footer),
137
135
  ref: footerRef
@@ -161,12 +159,11 @@ var ModalContent = function ModalContent(_ref) {
161
159
  className: cn('container-inner', {
162
160
  'native-scroll': isEnabledNativeScroll
163
161
  }, classes === null || classes === void 0 ? void 0 : classes.containerInner),
164
- ref: containerInnerRef,
165
- onClick: function onClick(e) {
166
- return e.stopPropagation();
167
- }
162
+ ref: containerInnerRef
168
163
  }), isStickyHeader && renderHeader, /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.containerBody), {
169
164
  className: cn('container-body', {
165
+ gray: isGrayColorModal,
166
+ 'gray-with-footer': isGrayColorModal && !isStickyFooter,
170
167
  'native-scroll': isEnabledNativeScroll
171
168
  }, classes === null || classes === void 0 ? void 0 : classes.containerBody),
172
169
  ref: containerBodyRef,
@@ -176,6 +173,7 @@ var ModalContent = function ModalContent(_ref) {
176
173
  className: cn('background', classes === null || classes === void 0 ? void 0 : classes.background),
177
174
  onClick: isDisabledBackgroundClick ? undefined : onPopupClose
178
175
  })), /*#__PURE__*/React.createElement(CSSTransition, {
176
+ nodeRef: containerWrapRef,
179
177
  "in": isBottomTransitionIn,
180
178
  timeout: 190,
181
179
  onExited: onTransitionExited
@@ -1 +1 @@
1
- h1,h2,h3,h4,h5{margin:0}.mfui-9-modal-desktop__container-inner{border-radius:12px}
1
+ h1,h2,h3,h4,h5{margin:0}.mfui-9-modal-desktop__container-inner{border-radius:32px;overflow:hidden}
@@ -0,0 +1 @@
1
+ h1,h2,h3,h4,h5{margin:0}.mfui-9-modal-mobile{width:100%}.mfui-9-modal-mobile_full-view .mfui-9-modal-mobile__container-wrap{display:block;height:calc(var(--vh)*100 - 72px);width:100%}.mfui-9-modal-mobile_full-view .mfui-9-modal-mobile__container-inner{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%}.mfui-9-modal-mobile_full-view .mfui-9-modal-mobile__container-body{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;overflow-y:auto}.mfui-9-modal-mobile_full-view .mfui-9-modal-mobile__children{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%}.mfui-9-modal-mobile_full-view .mfui-9-modal-mobile__children-content{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.mfui-9-modal-mobile_full-view .mfui-9-modal-mobile__scroll-content,.mfui-9-modal-mobile_full-view .mfui-9-modal-mobile__scroll-init,.mfui-9-modal-mobile_full-view .mfui-9-modal-mobile__scroll-root{height:100%}.mfui-9-modal-mobile__container-wrap{bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;position:fixed;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:end;-ms-flex-pack:end;-webkit-animation:show-popup-from-bottom .3s linear;animation:show-popup-from-bottom .3s linear;height:auto;justify-content:flex-end;max-height:100%;overflow:hidden;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}.mfui-9-modal-mobile__container-wrap:before{content:"";display:block;-ms-flex-item-align:end;align-self:flex-end;background-color:var(--spbSky2);border-radius:10px;height:6px;margin:0 auto 8px;width:40px}.mfui-9-modal-mobile__container-wrap_move{-webkit-transition:none;transition:none}.mfui-9-modal-mobile__container-wrap_transition-end{-webkit-animation:hide-popup-to-bottom .2s linear forwards;animation:hide-popup-to-bottom .2s linear forwards}.mfui-9-modal-mobile__container-inner{-webkit-box-flex:0;-ms-flex-positive:0;border-top-left-radius:32px;border-top-right-radius:32px;flex-grow:0;height:auto;overflow:hidden}@-webkit-keyframes show-popup-from-bottom{0%{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes show-popup-from-bottom{0%{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes hide-popup-to-bottom{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes hide-popup-to-bottom{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}}
@@ -1,12 +1,13 @@
1
1
  import * as React from 'react';
2
2
  import { MODAL_TRANSITIONS_STEPS_ENUM } from '../Modal';
3
3
  import type ModalContextPropsType from '../types';
4
- import './ModalMobileBottom.scss';
5
- export interface IModalMobileBottomProps extends ModalContextPropsType {
4
+ import './ModalMobile.scss';
5
+ export interface IModalMobileProps extends ModalContextPropsType {
6
6
  isSwipeDisabled?: boolean;
7
+ isFullView?: boolean;
8
+ children?: React.ReactNode;
7
9
  onChangeTransitionStep: (value: MODAL_TRANSITIONS_STEPS_ENUM) => void;
8
10
  onChangeContainerWrapTransform: (value: string) => void;
9
- children?: React.ReactNode;
10
11
  }
11
- declare const ModalMobileBottom: React.FC<IModalMobileBottomProps>;
12
- export default ModalMobileBottom;
12
+ declare const ModalMobile: React.FC<IModalMobileProps>;
13
+ export default ModalMobile;
@@ -14,20 +14,33 @@ import * as React from 'react';
14
14
  import { cnCreate } from '@megafon/ui-helpers';
15
15
  import ModalContent from "../_ModalContent/ModalContent";
16
16
  import { MODAL_TRANSITIONS_STEPS_ENUM } from "../Modal";
17
- import "./ModalMobileBottom.css";
17
+ import "./ModalMobile.css";
18
18
  var HALF_DIVIDER = 2;
19
- var cn = cnCreate('mfui-9-modal-mobile-bottom');
20
- var ModalMobileBottom = function ModalMobileBottom(_a) {
19
+ var cn = cnCreate('mfui-9-modal-mobile');
20
+ var ModalMobile = function ModalMobile(_a) {
21
21
  var _b = _a.classes,
22
22
  _c = _b === void 0 ? {} : _b,
23
23
  containerWrap = _c.containerWrap,
24
24
  containerInner = _c.containerInner,
25
- restClasses = __rest(_c, ["containerWrap", "containerInner"]),
25
+ containerBody = _c.containerBody,
26
+ childrenClass = _c.children,
27
+ childrenContent = _c.childrenContent,
28
+ restClasses = __rest(_c, ["containerWrap", "containerInner", "containerBody", "children", "childrenContent"]),
29
+ _d = _a.scrollBarParams,
30
+ _e = _d.classes,
31
+ _f = _e === void 0 ? {} : _e,
32
+ root = _f.root,
33
+ init = _f.init,
34
+ scrollContent = _f.scrollContent,
35
+ restClassesScrollBar = __rest(_f, ["root", "init", "scrollContent"]),
36
+ restScrollBarParams = __rest(_d, ["classes"]),
26
37
  isSwipeDisabled = _a.isSwipeDisabled,
38
+ _a$isFullView = _a.isFullView,
39
+ isFullView = _a$isFullView === void 0 ? true : _a$isFullView,
27
40
  children = _a.children,
28
41
  onChangeTransitionStep = _a.onChangeTransitionStep,
29
42
  onChangeContainerWrapTransform = _a.onChangeContainerWrapTransform,
30
- restProps = __rest(_a, ["classes", "isSwipeDisabled", "children", "onChangeTransitionStep", "onChangeContainerWrapTransform"]);
43
+ restProps = __rest(_a, ["classes", "scrollBarParams", "isSwipeDisabled", "isFullView", "children", "onChangeTransitionStep", "onChangeContainerWrapTransform"]);
31
44
  var _restProps$refs = restProps.refs,
32
45
  containerWrapRef = _restProps$refs.containerWrapRef,
33
46
  containerInnerRef = _restProps$refs.containerInnerRef,
@@ -79,6 +92,7 @@ var ModalMobileBottom = function ModalMobileBottom(_a) {
79
92
  });
80
93
  }, [containerWrapRef, scrollBarScrollableRef, initialContainerWrapHeight, initialTouchPosition, onChangeContainerWrapTransform, onChangeTransitionStep]);
81
94
  var handleWindowTouchEnd = React.useCallback(function (e) {
95
+ var _a;
82
96
  var containerWrapNode = containerWrapRef.current;
83
97
  var scrollableNode = scrollBarScrollableRef.current;
84
98
  var isScrollTop = ((scrollableNode === null || scrollableNode === void 0 ? void 0 : scrollableNode.scrollTop) || 0) === 0;
@@ -86,24 +100,7 @@ var ModalMobileBottom = function ModalMobileBottom(_a) {
86
100
  return;
87
101
  }
88
102
  window.cancelAnimationFrame(animationFrameId.current);
89
- if (!e.changedTouches.length) {
90
- setInitialTouchPosition(null);
91
- return;
92
- }
93
- var touchStartY = initialTouchPosition;
94
- var touchEndY = e.changedTouches[0].clientY;
95
- if (touchStartY === null) {
96
- setInitialTouchPosition(null);
97
- return;
98
- }
99
- var deltaY = touchStartY - touchEndY;
100
- var absDeltaY = Math.abs(deltaY);
101
- if (absDeltaY < 5 || touchStartY > touchEndY) {
102
- setInitialTouchPosition(null);
103
- return;
104
- }
105
- var containerCenterPosition = containerWrapNode.offsetTop + offsetHeightCenter;
106
- var isMoreHalfClosed = touchEndY > containerCenterPosition;
103
+ var isMoreHalfClosed = ((_a = e.changedTouches[0]) === null || _a === void 0 ? void 0 : _a.clientY) - (initialTouchPosition || 0) > offsetHeightCenter;
107
104
  setInitialTouchPosition(null);
108
105
  onChangeContainerWrapTransform(isMoreHalfClosed ? 'translateY(100%)' : 'none');
109
106
  onChangeTransitionStep(isMoreHalfClosed ? MODAL_TRANSITIONS_STEPS_ENUM.MOVE_END_STEP : MODAL_TRANSITIONS_STEPS_ENUM.INITIAL_STEP);
@@ -120,15 +117,27 @@ var ModalMobileBottom = function ModalMobileBottom(_a) {
120
117
  };
121
118
  }, [handleWindowTouchEnd, handleWindowTouchMove, isSwipeDisabled]);
122
119
  return /*#__PURE__*/React.createElement("div", {
123
- className: cn()
120
+ className: cn({
121
+ 'full-view': isFullView
122
+ })
124
123
  }, /*#__PURE__*/React.createElement(ModalContent, _extends({}, restProps, {
125
124
  classes: _extends(_extends({}, restClasses), {
126
125
  containerWrap: cn('container-wrap', {
127
126
  move: isTransitionMoveStep,
128
127
  'transition-end': isTransitionEndStep
129
128
  }, containerWrap),
130
- containerInner: cn('container-inner', containerInner)
129
+ containerInner: cn('container-inner', containerInner),
130
+ containerBody: cn('container-body', containerBody),
131
+ children: cn('children', childrenClass),
132
+ childrenContent: cn('children-content', childrenContent)
133
+ }),
134
+ scrollBarParams: _extends(_extends({}, restScrollBarParams), {
135
+ classes: _extends(_extends({}, restClassesScrollBar), {
136
+ root: cn('scroll-root', root),
137
+ init: cn('scroll-init', init),
138
+ scrollContent: cn('scroll-content', scrollContent)
139
+ })
131
140
  })
132
141
  }), children));
133
142
  };
134
- export default ModalMobileBottom;
143
+ export default ModalMobile;
@@ -68,7 +68,6 @@ var mockModalContextProps = {
68
68
  current: null
69
69
  }
70
70
  },
71
- isMobile: false,
72
71
  isTransitionMoveStep: false,
73
72
  isTransitionEndStep: false,
74
73
  containerWrapTransform: '',
@@ -1,6 +1,6 @@
1
1
  import type { IScrollBarProps } from '../ScrollBar/ScrollBar';
2
2
  import type { IModalProps } from './Modal';
3
- type ModalComponentPropsType = Pick<IModalProps, 'classes' | 'dataAttrs' | 'headerProps' | 'footerProps' | 'isEnabledNativeScroll' | 'isDisabledBackgroundClick'>;
3
+ type ModalComponentPropsType = Pick<IModalProps, 'classes' | 'dataAttrs' | 'headerProps' | 'footerProps' | 'isEnabledNativeScroll' | 'isDisabledBackgroundClick' | 'isGrayColorModal'>;
4
4
  type RefType = React.MutableRefObject<HTMLDivElement | null>;
5
5
  type ModalContextPropsType = ModalComponentPropsType & {
6
6
  scrollBarParams: IScrollBarProps;
@@ -13,7 +13,6 @@ type ModalContextPropsType = ModalComponentPropsType & {
13
13
  containerBodyRef: RefType;
14
14
  scrollBarScrollableRef: React.MutableRefObject<HTMLElement | null>;
15
15
  };
16
- isMobile: boolean;
17
16
  isTransitionMoveStep: boolean;
18
17
  isTransitionEndStep: boolean;
19
18
  containerWrapTransform: string;
@@ -1 +1 @@
1
- h1,h2,h3,h4,h5{margin:0}.mfui-9-nav-arrow{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;margin:0;outline:none;-webkit-transition:background-color .3s,opacity .3s;transition:background-color .3s,opacity .3s;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mfui-9-nav-arrow:disabled{cursor:default;opacity:.3;pointer-events:none}.mfui-9-nav-arrow__icon{display:block;height:100%;width:100%;fill:var(--stcWhite)}.mfui-9-nav-arrow_size_middle{height:40px;padding:4px;width:40px}.mfui-9-nav-arrow_size_large{height:64px;padding:12px;width:64px}.mfui-9-nav-arrow_theme_purple{background-color:var(--brandPurple)}.mfui-9-nav-arrow_theme_purple:hover{background-color:var(--buttonHoverPurple)}.mfui-9-nav-arrow_theme_purple:active{background-color:var(--buttonDown)}.mfui-9-nav-arrow_theme_dark{background-color:var(--stcBlack20)}.mfui-9-nav-arrow_theme_dark:hover{background-color:var(--stcBlack50)}.mfui-9-nav-arrow_theme_dark:active{background-color:var(--buttonDown)}.mfui-9-nav-arrow_theme_white{background-color:var(--stcWhite);-webkit-box-shadow:0 2px 12px 0 rgba(0,0,0,.1);box-shadow:0 2px 12px 0 rgba(0,0,0,.1)}.mfui-9-nav-arrow_theme_white:hover{-webkit-box-shadow:0 8px 28px 0 rgba(0,0,0,.1);box-shadow:0 8px 28px 0 rgba(0,0,0,.1)}.mfui-9-nav-arrow_theme_white:active{-webkit-box-shadow:0 2px 8px 0 rgba(0,0,0,.16);box-shadow:0 2px 8px 0 rgba(0,0,0,.16)}.mfui-9-nav-arrow_theme_white .mfui-9-nav-arrow__icon{fill:var(--stcBlack)}
1
+ h1,h2,h3,h4,h5{margin:0}.mfui-9-nav-arrow{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;margin:0;outline:none;-webkit-transition:background-color .3s,opacity .3s;transition:background-color .3s,opacity .3s;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mfui-9-nav-arrow:focus-visible{-webkit-animation:focus-outline-shrink .3s linear forwards;animation:focus-outline-shrink .3s linear forwards;outline-offset:2px}@-webkit-keyframes focus-outline-shrink{0%{outline:0 solid var(--137C)}to{outline:4px solid var(--137C)}}@keyframes focus-outline-shrink{0%{outline:0 solid var(--137C)}to{outline:4px solid var(--137C)}}.mfui-9-nav-arrow:focus{outline:none}.mfui-9-nav-arrow:disabled{cursor:default;opacity:.3;pointer-events:none}.mfui-9-nav-arrow__icon{display:block;height:100%;width:100%;fill:var(--stcWhite)}.mfui-9-nav-arrow_size_middle{height:40px;padding:4px;width:40px}.mfui-9-nav-arrow_size_large{height:64px;padding:12px;width:64px}.mfui-9-nav-arrow_theme_purple{background-color:var(--brandPurple)}.mfui-9-nav-arrow_theme_purple:hover{background-color:var(--buttonHoverPurple)}.mfui-9-nav-arrow_theme_purple:active{background-color:var(--buttonDown)}.mfui-9-nav-arrow_theme_dark{background-color:var(--stcBlack20)}.mfui-9-nav-arrow_theme_dark:hover{background-color:var(--stcBlack50)}.mfui-9-nav-arrow_theme_dark:active{background-color:var(--buttonDown)}.mfui-9-nav-arrow_theme_white{background-color:var(--stcWhite);-webkit-box-shadow:0 2px 12px 0 rgba(0,0,0,.1);box-shadow:0 2px 12px 0 rgba(0,0,0,.1)}.mfui-9-nav-arrow_theme_white:hover{-webkit-box-shadow:0 8px 28px 0 rgba(0,0,0,.1);box-shadow:0 8px 28px 0 rgba(0,0,0,.1)}.mfui-9-nav-arrow_theme_white:active{-webkit-box-shadow:0 2px 8px 0 rgba(0,0,0,.16);box-shadow:0 2px 8px 0 rgba(0,0,0,.16)}.mfui-9-nav-arrow_theme_white .mfui-9-nav-arrow__icon{fill:var(--stcBlack)}
@@ -6,28 +6,28 @@ var ArrowLeft24 = function ArrowLeft24(props) {
6
6
  return /*#__PURE__*/React.createElement("svg", _extends({
7
7
  viewBox: "0 0 32 32"
8
8
  }, props), /*#__PURE__*/React.createElement("path", {
9
- d: "M19.5 20.8L14.7 16l4.8-4.8-1.6-1.7-6.4 6.5 6.4 6.5z"
9
+ d: "M13.906 9.114a1.25 1.25 0 111.764 1.772l-3.871 3.853H23a1.25 1.25 0 110 2.5H11.777l3.893 3.875a1.25 1.25 0 01-1.764 1.772l-5.618-5.592a1.825 1.825 0 010-2.588l5.618-5.592z"
10
10
  }));
11
11
  };
12
12
  var ArrowRight24 = function ArrowRight24(props) {
13
13
  return /*#__PURE__*/React.createElement("svg", _extends({
14
14
  viewBox: "0 0 32 32"
15
15
  }, props), /*#__PURE__*/React.createElement("path", {
16
- d: "M12.5 20.8l4.8-4.8-4.8-4.8 1.6-1.7 6.4 6.5-6.4 6.5z"
16
+ d: "M16.326 9.118a1.25 1.25 0 011.768-.004l5.618 5.592a1.825 1.825 0 010 2.588l-5.618 5.592a1.25 1.25 0 01-1.764-1.772l3.871-3.853H9a1.25 1.25 0 010-2.5h11.223l-3.893-3.875a1.25 1.25 0 01-.004-1.768z"
17
17
  }));
18
18
  };
19
19
  var ArrowLeft32 = function ArrowLeft32(props) {
20
20
  return /*#__PURE__*/React.createElement("svg", _extends({
21
21
  viewBox: "0 0 40 40"
22
22
  }, props), /*#__PURE__*/React.createElement("path", {
23
- d: "M24 26l-6-6 6-6-2-2-8 8 8 8z"
23
+ d: "M16.964 10.562a1.972 1.972 0 112.757 2.822l-4.732 4.628h14.538a1.973 1.973 0 010 3.947H14.96l4.762 4.657a1.973 1.973 0 11-2.757 2.822l-7.633-7.465a2.76 2.76 0 010-3.946l7.633-7.465z"
24
24
  }));
25
25
  };
26
26
  var ArrowRight32 = function ArrowRight32(props) {
27
27
  return /*#__PURE__*/React.createElement("svg", _extends({
28
28
  viewBox: "0 0 40 40"
29
29
  }, props), /*#__PURE__*/React.createElement("path", {
30
- d: "M16 26l6-6-6-6 2-2 8 8-8 8z"
30
+ d: "M19.996 10.594a1.972 1.972 0 012.79-.032l7.633 7.465a2.759 2.759 0 010 3.946l-7.634 7.465a1.972 1.972 0 11-2.756-2.822l4.732-4.628H10.223a1.973 1.973 0 010-3.947H24.79l-4.761-4.657a1.974 1.974 0 01-.033-2.79z"
31
31
  }));
32
32
  };
33
33
  export var Theme = {