@redneckz/wildless-cms-uni-blocks 0.10.4 → 0.10.6

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 (1111) hide show
  1. package/bin/migration-scripts/0.9.9.js +8 -6
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +323 -411
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/ApplicationForm/AcquiringFormState.d.ts +11 -0
  6. package/bundle/components/ApplicationForm/ApplicationFormAcquiring.d.ts +1 -11
  7. package/bundle/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +1 -8
  8. package/bundle/components/ApplicationForm/ApplicationFormCredit.d.ts +1 -13
  9. package/bundle/components/ApplicationForm/ApplicationFormDeposit.d.ts +1 -5
  10. package/bundle/components/ApplicationForm/ApplicationFormWed.d.ts +1 -11
  11. package/bundle/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
  12. package/bundle/components/ApplicationForm/BusinessCardFormState.d.ts +8 -0
  13. package/bundle/components/ApplicationForm/CreditFormState.d.ts +13 -0
  14. package/bundle/components/ApplicationForm/CreditParameters.d.ts +3 -3
  15. package/bundle/components/ApplicationForm/DepositFormState.d.ts +4 -0
  16. package/bundle/components/ApplicationForm/InputControl.d.ts +4 -5
  17. package/bundle/components/ApplicationForm/PhoneInputControl.d.ts +2 -0
  18. package/bundle/components/ApplicationForm/ResponseNotification.d.ts +1 -1
  19. package/bundle/components/ApplicationForm/SelectControl.d.ts +2 -9
  20. package/bundle/components/ApplicationForm/WedFormState.d.ts +10 -0
  21. package/bundle/components/ApplicationForm/models.d.ts +0 -6
  22. package/bundle/components/ApplicationForm/renderAcquiringDataOrganization.d.ts +3 -10
  23. package/bundle/components/ApplicationForm/renderAcquiringRegion.d.ts +6 -9
  24. package/bundle/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +3 -10
  25. package/bundle/components/ApplicationForm/renderCreditDataOrganization.d.ts +3 -12
  26. package/bundle/components/ApplicationForm/renderCreditParameters.d.ts +3 -9
  27. package/bundle/components/ApplicationForm/renderQuestionsInterested.d.ts +3 -11
  28. package/bundle/components/ApplicationForm/renderRegion.d.ts +6 -8
  29. package/bundle/components/ApplicationForm/renderRegionDepartment.d.ts +6 -9
  30. package/bundle/components/ApplicationForm/renderSlideCheckboxes.d.ts +3 -9
  31. package/bundle/components/ApplicationForm/renderWedDataOrganization.d.ts +3 -10
  32. package/bundle/components/ApplicationForm/validators.d.ts +4 -0
  33. package/bundle/components/Filtration/renderFormItem.d.ts +2 -2
  34. package/bundle/components/TextBlock/TextBlockContent.d.ts +1 -2
  35. package/bundle/hooks/useForm.d.ts +13 -12
  36. package/bundle/ui-kit/Checkbox/CheckboxProps.d.ts +2 -2
  37. package/bundle/ui-kit/CookiePopup/CookiePopup.d.ts +8 -0
  38. package/bundle/ui-kit/Dialog/useDialogProps.d.ts +1 -1
  39. package/bundle/ui-kit/Input/InputProps.d.ts +4 -2
  40. package/bundle/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -0
  41. package/bundle/ui-kit/PhoneInput/PhoneInput.d.ts +2 -0
  42. package/bundle/ui-kit/PhoneInput/normalizePhone.d.ts +1 -0
  43. package/bundle/ui-kit/Select/Select.d.ts +6 -7
  44. package/bundle/validation/and.d.ts +2 -0
  45. package/bundle/validation/objectValidator.d.ts +2 -0
  46. package/bundle/validation/pattern.d.ts +1 -0
  47. package/bundle/validation/required.d.ts +1 -0
  48. package/bundle/validation/validator.d.ts +10 -0
  49. package/bundle/validation/withValidator.d.ts +10 -0
  50. package/dist/components/ApplicationForm/AcquiringFormState.d.ts +11 -0
  51. package/dist/components/ApplicationForm/AcquiringFormState.js +2 -0
  52. package/dist/components/ApplicationForm/AcquiringFormState.js.map +1 -0
  53. package/dist/components/ApplicationForm/ApplicationForm.js +4 -3
  54. package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  55. package/dist/components/ApplicationForm/ApplicationFormAcquiring.d.ts +1 -11
  56. package/dist/components/ApplicationForm/ApplicationFormAcquiring.js +28 -48
  57. package/dist/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
  58. package/dist/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +1 -8
  59. package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +24 -32
  60. package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
  61. package/dist/components/ApplicationForm/ApplicationFormCredit.d.ts +1 -13
  62. package/dist/components/ApplicationForm/ApplicationFormCredit.js +28 -48
  63. package/dist/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
  64. package/dist/components/ApplicationForm/ApplicationFormDeposit.d.ts +1 -5
  65. package/dist/components/ApplicationForm/ApplicationFormDeposit.js +21 -23
  66. package/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
  67. package/dist/components/ApplicationForm/ApplicationFormWed.d.ts +1 -11
  68. package/dist/components/ApplicationForm/ApplicationFormWed.js +22 -37
  69. package/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
  70. package/dist/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
  71. package/dist/components/ApplicationForm/BusinessCardFormState.d.ts +8 -0
  72. package/dist/components/ApplicationForm/BusinessCardFormState.js +2 -0
  73. package/dist/components/ApplicationForm/BusinessCardFormState.js.map +1 -0
  74. package/dist/components/ApplicationForm/CreditFormState.d.ts +13 -0
  75. package/dist/components/ApplicationForm/CreditFormState.js +2 -0
  76. package/dist/components/ApplicationForm/CreditFormState.js.map +1 -0
  77. package/dist/components/ApplicationForm/CreditParameters.d.ts +3 -3
  78. package/dist/components/ApplicationForm/CreditParameters.js +5 -5
  79. package/dist/components/ApplicationForm/CreditParameters.js.map +1 -1
  80. package/dist/components/ApplicationForm/DepositFormState.d.ts +4 -0
  81. package/dist/components/ApplicationForm/DepositFormState.js +2 -0
  82. package/dist/components/ApplicationForm/DepositFormState.js.map +1 -0
  83. package/dist/components/ApplicationForm/InputControl.d.ts +4 -5
  84. package/dist/components/ApplicationForm/InputControl.js +1 -3
  85. package/dist/components/ApplicationForm/InputControl.js.map +1 -1
  86. package/dist/components/ApplicationForm/PhoneInputControl.d.ts +2 -0
  87. package/dist/components/ApplicationForm/PhoneInputControl.js +8 -0
  88. package/dist/components/ApplicationForm/PhoneInputControl.js.map +1 -0
  89. package/dist/components/ApplicationForm/ResponseNotification.d.ts +1 -1
  90. package/dist/components/ApplicationForm/ResponseNotification.js +4 -4
  91. package/dist/components/ApplicationForm/SelectControl.d.ts +2 -9
  92. package/dist/components/ApplicationForm/SelectControl.js +1 -7
  93. package/dist/components/ApplicationForm/SelectControl.js.map +1 -1
  94. package/dist/components/ApplicationForm/WedFormState.d.ts +10 -0
  95. package/dist/components/ApplicationForm/WedFormState.js +2 -0
  96. package/dist/components/ApplicationForm/WedFormState.js.map +1 -0
  97. package/dist/components/ApplicationForm/models.d.ts +0 -6
  98. package/dist/components/ApplicationForm/renderAcquiringDataOrganization.d.ts +3 -10
  99. package/dist/components/ApplicationForm/renderAcquiringDataOrganization.js +4 -2
  100. package/dist/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -1
  101. package/dist/components/ApplicationForm/renderAcquiringRegion.d.ts +6 -9
  102. package/dist/components/ApplicationForm/renderAcquiringRegion.js +3 -2
  103. package/dist/components/ApplicationForm/renderAcquiringRegion.js.map +1 -1
  104. package/dist/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +3 -10
  105. package/dist/components/ApplicationForm/renderBusinessCardDataOrganization.js +4 -2
  106. package/dist/components/ApplicationForm/renderBusinessCardDataOrganization.js.map +1 -1
  107. package/dist/components/ApplicationForm/renderCreditDataOrganization.d.ts +3 -12
  108. package/dist/components/ApplicationForm/renderCreditDataOrganization.js +4 -2
  109. package/dist/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
  110. package/dist/components/ApplicationForm/renderCreditParameters.d.ts +3 -9
  111. package/dist/components/ApplicationForm/renderCreditParameters.js +3 -16
  112. package/dist/components/ApplicationForm/renderCreditParameters.js.map +1 -1
  113. package/dist/components/ApplicationForm/renderQuestionsInterested.d.ts +3 -11
  114. package/dist/components/ApplicationForm/renderQuestionsInterested.js +4 -1
  115. package/dist/components/ApplicationForm/renderQuestionsInterested.js.map +1 -1
  116. package/dist/components/ApplicationForm/renderRegion.d.ts +6 -8
  117. package/dist/components/ApplicationForm/renderRegion.js +3 -2
  118. package/dist/components/ApplicationForm/renderRegion.js.map +1 -1
  119. package/dist/components/ApplicationForm/renderRegionDepartment.d.ts +6 -9
  120. package/dist/components/ApplicationForm/renderRegionDepartment.js +6 -2
  121. package/dist/components/ApplicationForm/renderRegionDepartment.js.map +1 -1
  122. package/dist/components/ApplicationForm/renderSlideCheckboxes.d.ts +3 -9
  123. package/dist/components/ApplicationForm/renderSlideCheckboxes.js +1 -1
  124. package/dist/components/ApplicationForm/renderSlideCheckboxes.js.map +1 -1
  125. package/dist/components/ApplicationForm/renderSubmitButton.js +2 -1
  126. package/dist/components/ApplicationForm/renderSubmitButton.js.map +1 -1
  127. package/dist/components/ApplicationForm/renderWedDataOrganization.d.ts +3 -10
  128. package/dist/components/ApplicationForm/renderWedDataOrganization.js +4 -2
  129. package/dist/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
  130. package/dist/components/ApplicationForm/validators.d.ts +4 -0
  131. package/dist/components/ApplicationForm/validators.js +11 -0
  132. package/dist/components/ApplicationForm/validators.js.map +1 -0
  133. package/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
  134. package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  135. package/dist/components/Blocks.mobile.js +5 -1
  136. package/dist/components/Blocks.mobile.js.map +1 -1
  137. package/dist/components/Bonus/Bonus.js +1 -1
  138. package/dist/components/Bonus/Bonus.js.map +1 -1
  139. package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +1 -1
  140. package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
  141. package/dist/components/BusinessBlock/BusinessBlock.js +1 -1
  142. package/dist/components/BusinessBlock/BusinessBlock.js.map +1 -1
  143. package/dist/components/Calculator/BusinessDepositCalculatorForm.js +1 -1
  144. package/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  145. package/dist/components/Calculator/CreditCalculatorForm.js +1 -1
  146. package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  147. package/dist/components/CardTransfer/CardTransfer.js +1 -1
  148. package/dist/components/CardTransfer/CardTransfer.js.map +1 -1
  149. package/dist/components/Carousel/Carousel.js +1 -1
  150. package/dist/components/Carousel/Carousel.js.map +1 -1
  151. package/dist/components/Carousel/CarouselScrollButtons.js +1 -1
  152. package/dist/components/Carousel/CarouselScrollButtons.js.map +1 -1
  153. package/dist/components/CarouselLinks/CarouselLinks.js +1 -1
  154. package/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
  155. package/dist/components/CarouselProductCard/CarouselProductCard.js +2 -2
  156. package/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
  157. package/dist/components/CarouselRichTextCard/CarouselRichTextCard.js +1 -1
  158. package/dist/components/CarouselRichTextCard/CarouselRichTextCard.js.map +1 -1
  159. package/dist/components/ContactsBlock/ContactsBlock.js +1 -1
  160. package/dist/components/ContactsBlock/ContactsBlock.js.map +1 -1
  161. package/dist/components/ContentPage/ContentPage.js +2 -1
  162. package/dist/components/ContentPage/ContentPage.js.map +1 -1
  163. package/dist/components/ExchangeRateTile/renderInput.js.map +1 -1
  164. package/dist/components/Filtration/Filtration.js +3 -2
  165. package/dist/components/Filtration/Filtration.js.map +1 -1
  166. package/dist/components/Filtration/renderFormItem.d.ts +2 -2
  167. package/dist/components/Filtration/renderFormItem.js +4 -4
  168. package/dist/components/Filtration/renderFormItem.js.map +1 -1
  169. package/dist/components/GracePeriod/GracePeriod.js +1 -1
  170. package/dist/components/GracePeriod/GracePeriod.js.map +1 -1
  171. package/dist/components/Headline/Headline.js +1 -1
  172. package/dist/components/Headline/Headline.js.map +1 -1
  173. package/dist/components/HorizontalLayout/HorizontalLayout.js +1 -1
  174. package/dist/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
  175. package/dist/components/LinkDocs/LinkDocs.js +1 -1
  176. package/dist/components/LinkDocs/LinkDocs.js.map +1 -1
  177. package/dist/components/LinkDocs/LinkDocs.mobile.js +1 -1
  178. package/dist/components/MobileAppTile/MobileAppTile.js +1 -1
  179. package/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
  180. package/dist/components/ProductBlock/ProductBlock.js +2 -2
  181. package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
  182. package/dist/components/SafeDepositRental/WrapperSelect.js.map +1 -1
  183. package/dist/components/SafeDepositRental/useGetRegions.js +2 -1
  184. package/dist/components/SafeDepositRental/useGetRegions.js.map +1 -1
  185. package/dist/components/TariffsTable/TariffsTable.js +1 -1
  186. package/dist/components/TariffsTable/TariffsTable.js.map +1 -1
  187. package/dist/components/TextBlock/TextBlock.js +8 -4
  188. package/dist/components/TextBlock/TextBlock.js.map +1 -1
  189. package/dist/components/TextBlock/TextBlockContent.d.ts +1 -2
  190. package/dist/components/VerticalLayout/VerticalLayout.js +1 -1
  191. package/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
  192. package/dist/hooks/useForm.d.ts +13 -12
  193. package/dist/hooks/useForm.js +31 -8
  194. package/dist/hooks/useForm.js.map +1 -1
  195. package/dist/ui-kit/Checkbox/Checkbox.js +9 -4
  196. package/dist/ui-kit/Checkbox/Checkbox.js.map +1 -1
  197. package/dist/ui-kit/Checkbox/CheckboxProps.d.ts +2 -2
  198. package/dist/ui-kit/CookiePopup/CookiePopup.d.ts +8 -0
  199. package/dist/ui-kit/CookiePopup/CookiePopup.js +22 -0
  200. package/dist/ui-kit/CookiePopup/CookiePopup.js.map +1 -0
  201. package/dist/ui-kit/CurrencyInput/CurrencyInput.js +8 -14
  202. package/dist/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
  203. package/dist/ui-kit/Dialog/CloseButton.js +1 -1
  204. package/dist/ui-kit/Dialog/CloseButton.js.map +1 -1
  205. package/dist/ui-kit/Dialog/Dialog.js +1 -1
  206. package/dist/ui-kit/Dialog/Dialog.js.map +1 -1
  207. package/dist/ui-kit/Dialog/useDialogProps.d.ts +1 -1
  208. package/dist/ui-kit/Dialog/useDialogProps.js +2 -2
  209. package/dist/ui-kit/Dialog/useDialogProps.js.map +1 -1
  210. package/dist/ui-kit/Input/Input.js +4 -11
  211. package/dist/ui-kit/Input/Input.js.map +1 -1
  212. package/dist/ui-kit/Input/InputProps.d.ts +4 -2
  213. package/dist/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -0
  214. package/dist/ui-kit/LinkWrapper/LinkWrapper.js +2 -2
  215. package/dist/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
  216. package/dist/ui-kit/PhoneInput/PhoneInput.d.ts +2 -0
  217. package/dist/ui-kit/PhoneInput/PhoneInput.js +12 -0
  218. package/dist/ui-kit/PhoneInput/PhoneInput.js.map +1 -0
  219. package/dist/ui-kit/PhoneInput/normalizePhone.d.ts +1 -0
  220. package/dist/ui-kit/PhoneInput/normalizePhone.js +17 -0
  221. package/dist/ui-kit/PhoneInput/normalizePhone.js.map +1 -0
  222. package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js +1 -1
  223. package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
  224. package/dist/ui-kit/Select/Select.d.ts +6 -7
  225. package/dist/ui-kit/Select/Select.js +16 -25
  226. package/dist/ui-kit/Select/Select.js.map +1 -1
  227. package/dist/ui-kit/SlideCheckbox/SlideCheckbox.js +2 -1
  228. package/dist/ui-kit/SlideCheckbox/SlideCheckbox.js.map +1 -1
  229. package/dist/validation/and.d.ts +2 -0
  230. package/dist/validation/and.js +5 -0
  231. package/dist/validation/and.js.map +1 -0
  232. package/dist/validation/objectValidator.d.ts +2 -0
  233. package/dist/validation/objectValidator.js +7 -0
  234. package/dist/validation/objectValidator.js.map +1 -0
  235. package/dist/validation/pattern.d.ts +1 -0
  236. package/dist/validation/pattern.js +6 -0
  237. package/dist/validation/pattern.js.map +1 -0
  238. package/dist/validation/required.d.ts +1 -0
  239. package/dist/validation/required.js +5 -0
  240. package/dist/validation/required.js.map +1 -0
  241. package/dist/validation/validator.d.ts +10 -0
  242. package/dist/validation/validator.js +9 -0
  243. package/dist/validation/validator.js.map +1 -0
  244. package/dist/validation/withValidator.d.ts +10 -0
  245. package/dist/validation/withValidator.js +13 -0
  246. package/dist/validation/withValidator.js.map +1 -0
  247. package/lib/common.css +1 -1
  248. package/lib/components/ApplicationForm/AcquiringFormState.d.ts +11 -0
  249. package/lib/components/ApplicationForm/AcquiringFormState.js +2 -0
  250. package/lib/components/ApplicationForm/AcquiringFormState.js.map +1 -0
  251. package/lib/components/ApplicationForm/ApplicationForm.js +4 -3
  252. package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  253. package/lib/components/ApplicationForm/ApplicationFormAcquiring.d.ts +1 -11
  254. package/lib/components/ApplicationForm/ApplicationFormAcquiring.js +28 -48
  255. package/lib/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
  256. package/lib/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +1 -8
  257. package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +24 -32
  258. package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
  259. package/lib/components/ApplicationForm/ApplicationFormCredit.d.ts +1 -13
  260. package/lib/components/ApplicationForm/ApplicationFormCredit.js +28 -48
  261. package/lib/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
  262. package/lib/components/ApplicationForm/ApplicationFormDeposit.d.ts +1 -5
  263. package/lib/components/ApplicationForm/ApplicationFormDeposit.js +21 -23
  264. package/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
  265. package/lib/components/ApplicationForm/ApplicationFormWed.d.ts +1 -11
  266. package/lib/components/ApplicationForm/ApplicationFormWed.js +22 -37
  267. package/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
  268. package/lib/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
  269. package/lib/components/ApplicationForm/BusinessCardFormState.d.ts +8 -0
  270. package/lib/components/ApplicationForm/BusinessCardFormState.js +2 -0
  271. package/lib/components/ApplicationForm/BusinessCardFormState.js.map +1 -0
  272. package/lib/components/ApplicationForm/CreditFormState.d.ts +13 -0
  273. package/lib/components/ApplicationForm/CreditFormState.js +2 -0
  274. package/lib/components/ApplicationForm/CreditFormState.js.map +1 -0
  275. package/lib/components/ApplicationForm/CreditParameters.d.ts +3 -3
  276. package/lib/components/ApplicationForm/CreditParameters.js +5 -5
  277. package/lib/components/ApplicationForm/CreditParameters.js.map +1 -1
  278. package/lib/components/ApplicationForm/DepositFormState.d.ts +4 -0
  279. package/lib/components/ApplicationForm/DepositFormState.js +2 -0
  280. package/lib/components/ApplicationForm/DepositFormState.js.map +1 -0
  281. package/lib/components/ApplicationForm/InputControl.d.ts +4 -5
  282. package/lib/components/ApplicationForm/InputControl.js +1 -3
  283. package/lib/components/ApplicationForm/InputControl.js.map +1 -1
  284. package/lib/components/ApplicationForm/PhoneInputControl.d.ts +2 -0
  285. package/lib/components/ApplicationForm/PhoneInputControl.js +6 -0
  286. package/lib/components/ApplicationForm/PhoneInputControl.js.map +1 -0
  287. package/lib/components/ApplicationForm/ResponseNotification.d.ts +1 -1
  288. package/lib/components/ApplicationForm/ResponseNotification.js +4 -4
  289. package/lib/components/ApplicationForm/SelectControl.d.ts +2 -9
  290. package/lib/components/ApplicationForm/SelectControl.js +1 -7
  291. package/lib/components/ApplicationForm/SelectControl.js.map +1 -1
  292. package/lib/components/ApplicationForm/WedFormState.d.ts +10 -0
  293. package/lib/components/ApplicationForm/WedFormState.js +2 -0
  294. package/lib/components/ApplicationForm/WedFormState.js.map +1 -0
  295. package/lib/components/ApplicationForm/models.d.ts +0 -6
  296. package/lib/components/ApplicationForm/renderAcquiringDataOrganization.d.ts +3 -10
  297. package/lib/components/ApplicationForm/renderAcquiringDataOrganization.js +4 -2
  298. package/lib/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -1
  299. package/lib/components/ApplicationForm/renderAcquiringRegion.d.ts +6 -9
  300. package/lib/components/ApplicationForm/renderAcquiringRegion.js +3 -2
  301. package/lib/components/ApplicationForm/renderAcquiringRegion.js.map +1 -1
  302. package/lib/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +3 -10
  303. package/lib/components/ApplicationForm/renderBusinessCardDataOrganization.js +4 -2
  304. package/lib/components/ApplicationForm/renderBusinessCardDataOrganization.js.map +1 -1
  305. package/lib/components/ApplicationForm/renderCreditDataOrganization.d.ts +3 -12
  306. package/lib/components/ApplicationForm/renderCreditDataOrganization.js +4 -2
  307. package/lib/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
  308. package/lib/components/ApplicationForm/renderCreditParameters.d.ts +3 -9
  309. package/lib/components/ApplicationForm/renderCreditParameters.js +4 -17
  310. package/lib/components/ApplicationForm/renderCreditParameters.js.map +1 -1
  311. package/lib/components/ApplicationForm/renderQuestionsInterested.d.ts +3 -11
  312. package/lib/components/ApplicationForm/renderQuestionsInterested.js +4 -1
  313. package/lib/components/ApplicationForm/renderQuestionsInterested.js.map +1 -1
  314. package/lib/components/ApplicationForm/renderRegion.d.ts +6 -8
  315. package/lib/components/ApplicationForm/renderRegion.js +3 -2
  316. package/lib/components/ApplicationForm/renderRegion.js.map +1 -1
  317. package/lib/components/ApplicationForm/renderRegionDepartment.d.ts +6 -9
  318. package/lib/components/ApplicationForm/renderRegionDepartment.js +6 -2
  319. package/lib/components/ApplicationForm/renderRegionDepartment.js.map +1 -1
  320. package/lib/components/ApplicationForm/renderSlideCheckboxes.d.ts +3 -9
  321. package/lib/components/ApplicationForm/renderSlideCheckboxes.js +1 -1
  322. package/lib/components/ApplicationForm/renderSlideCheckboxes.js.map +1 -1
  323. package/lib/components/ApplicationForm/renderSubmitButton.js +2 -1
  324. package/lib/components/ApplicationForm/renderSubmitButton.js.map +1 -1
  325. package/lib/components/ApplicationForm/renderWedDataOrganization.d.ts +3 -10
  326. package/lib/components/ApplicationForm/renderWedDataOrganization.js +4 -2
  327. package/lib/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
  328. package/lib/components/ApplicationForm/validators.d.ts +4 -0
  329. package/lib/components/ApplicationForm/validators.js +9 -0
  330. package/lib/components/ApplicationForm/validators.js.map +1 -0
  331. package/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
  332. package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  333. package/lib/components/Blocks.mobile.js +5 -1
  334. package/lib/components/Blocks.mobile.js.map +1 -1
  335. package/lib/components/Bonus/Bonus.js +1 -1
  336. package/lib/components/Bonus/Bonus.js.map +1 -1
  337. package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +1 -1
  338. package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
  339. package/lib/components/BusinessBlock/BusinessBlock.js +1 -1
  340. package/lib/components/BusinessBlock/BusinessBlock.js.map +1 -1
  341. package/lib/components/Calculator/BusinessDepositCalculatorForm.js +1 -1
  342. package/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  343. package/lib/components/Calculator/CreditCalculatorForm.js +1 -1
  344. package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  345. package/lib/components/CardTransfer/CardTransfer.js +1 -1
  346. package/lib/components/CardTransfer/CardTransfer.js.map +1 -1
  347. package/lib/components/Carousel/Carousel.js +1 -1
  348. package/lib/components/Carousel/Carousel.js.map +1 -1
  349. package/lib/components/Carousel/CarouselScrollButtons.js +1 -1
  350. package/lib/components/Carousel/CarouselScrollButtons.js.map +1 -1
  351. package/lib/components/CarouselLinks/CarouselLinks.js +1 -1
  352. package/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
  353. package/lib/components/CarouselProductCard/CarouselProductCard.js +2 -2
  354. package/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
  355. package/lib/components/CarouselRichTextCard/CarouselRichTextCard.js +1 -1
  356. package/lib/components/CarouselRichTextCard/CarouselRichTextCard.js.map +1 -1
  357. package/lib/components/ContactsBlock/ContactsBlock.js +1 -1
  358. package/lib/components/ContactsBlock/ContactsBlock.js.map +1 -1
  359. package/lib/components/ContentPage/ContentPage.js +2 -1
  360. package/lib/components/ContentPage/ContentPage.js.map +1 -1
  361. package/lib/components/ExchangeRateTile/renderInput.js.map +1 -1
  362. package/lib/components/Filtration/Filtration.js +3 -2
  363. package/lib/components/Filtration/Filtration.js.map +1 -1
  364. package/lib/components/Filtration/renderFormItem.d.ts +2 -2
  365. package/lib/components/Filtration/renderFormItem.js +4 -4
  366. package/lib/components/Filtration/renderFormItem.js.map +1 -1
  367. package/lib/components/GracePeriod/GracePeriod.js +1 -1
  368. package/lib/components/GracePeriod/GracePeriod.js.map +1 -1
  369. package/lib/components/Headline/Headline.js +1 -1
  370. package/lib/components/Headline/Headline.js.map +1 -1
  371. package/lib/components/HorizontalLayout/HorizontalLayout.js +1 -1
  372. package/lib/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
  373. package/lib/components/ImgBlock/ImgBlock.fixture.mobile.d.ts +6 -0
  374. package/lib/components/LinkDocs/LinkDocs.js +1 -1
  375. package/lib/components/LinkDocs/LinkDocs.js.map +1 -1
  376. package/lib/components/LinkDocs/LinkDocs.mobile.js +1 -1
  377. package/lib/components/MobileAppTile/MobileAppTile.js +1 -1
  378. package/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
  379. package/lib/components/ProductBlock/ProductBlock.js +2 -2
  380. package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
  381. package/lib/components/ProductTile/renderBenefit.d.ts +0 -1
  382. package/lib/components/RichTextBlock/RichTextBlock.fixture.mobile.d.ts +9 -0
  383. package/lib/components/SafeDepositRental/WrapperSelect.js.map +1 -1
  384. package/lib/components/SafeDepositRental/useGetRegions.js +2 -1
  385. package/lib/components/SafeDepositRental/useGetRegions.js.map +1 -1
  386. package/lib/components/TariffsTable/TariffsTable.js +1 -1
  387. package/lib/components/TariffsTable/TariffsTable.js.map +1 -1
  388. package/lib/components/TextBlock/TextBlock.fixture.d.ts +1 -1
  389. package/lib/components/TextBlock/TextBlock.fixture.mobile.d.ts +6 -2
  390. package/lib/components/TextBlock/TextBlock.js +8 -4
  391. package/lib/components/TextBlock/TextBlock.js.map +1 -1
  392. package/lib/components/TextBlock/TextBlockContent.d.ts +1 -2
  393. package/lib/components/VerticalLayout/VerticalLayout.fixture.mobile.d.ts +8 -0
  394. package/lib/components/VerticalLayout/VerticalLayout.js +1 -1
  395. package/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
  396. package/lib/hooks/useForm.d.ts +13 -12
  397. package/lib/hooks/useForm.js +31 -8
  398. package/lib/hooks/useForm.js.map +1 -1
  399. package/lib/ui-kit/Checkbox/Checkbox.js +9 -4
  400. package/lib/ui-kit/Checkbox/Checkbox.js.map +1 -1
  401. package/lib/ui-kit/Checkbox/CheckboxProps.d.ts +2 -2
  402. package/lib/ui-kit/CookiePopup/CookiePopup.d.ts +8 -0
  403. package/lib/ui-kit/CookiePopup/CookiePopup.js +20 -0
  404. package/lib/ui-kit/CookiePopup/CookiePopup.js.map +1 -0
  405. package/lib/ui-kit/CurrencyInput/CurrencyInput.js +8 -14
  406. package/lib/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
  407. package/lib/ui-kit/Dialog/CloseButton.js +1 -1
  408. package/lib/ui-kit/Dialog/CloseButton.js.map +1 -1
  409. package/lib/ui-kit/Dialog/Dialog.js +1 -1
  410. package/lib/ui-kit/Dialog/Dialog.js.map +1 -1
  411. package/lib/ui-kit/Dialog/useDialogProps.d.ts +1 -1
  412. package/lib/ui-kit/Dialog/useDialogProps.js +2 -2
  413. package/lib/ui-kit/Dialog/useDialogProps.js.map +1 -1
  414. package/lib/ui-kit/Input/Input.js +4 -11
  415. package/lib/ui-kit/Input/Input.js.map +1 -1
  416. package/lib/ui-kit/Input/InputProps.d.ts +4 -2
  417. package/lib/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -0
  418. package/lib/ui-kit/LinkWrapper/LinkWrapper.js +2 -2
  419. package/lib/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
  420. package/lib/ui-kit/PhoneInput/PhoneInput.d.ts +2 -0
  421. package/lib/ui-kit/PhoneInput/PhoneInput.js +10 -0
  422. package/lib/ui-kit/PhoneInput/PhoneInput.js.map +1 -0
  423. package/lib/ui-kit/PhoneInput/normalizePhone.d.ts +1 -0
  424. package/lib/ui-kit/PhoneInput/normalizePhone.js +14 -0
  425. package/lib/ui-kit/PhoneInput/normalizePhone.js.map +1 -0
  426. package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js +1 -1
  427. package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
  428. package/lib/ui-kit/Select/Select.d.ts +6 -7
  429. package/lib/ui-kit/Select/Select.js +17 -26
  430. package/lib/ui-kit/Select/Select.js.map +1 -1
  431. package/lib/ui-kit/SlideCheckbox/SlideCheckbox.js +2 -1
  432. package/lib/ui-kit/SlideCheckbox/SlideCheckbox.js.map +1 -1
  433. package/lib/validation/and.d.ts +2 -0
  434. package/lib/validation/and.js +2 -0
  435. package/lib/validation/and.js.map +1 -0
  436. package/lib/validation/objectValidator.d.ts +2 -0
  437. package/lib/validation/objectValidator.js +4 -0
  438. package/lib/validation/objectValidator.js.map +1 -0
  439. package/lib/validation/pattern.d.ts +1 -0
  440. package/lib/validation/pattern.js +3 -0
  441. package/lib/validation/pattern.js.map +1 -0
  442. package/lib/validation/required.d.ts +1 -0
  443. package/lib/validation/required.js +3 -0
  444. package/lib/validation/required.js.map +1 -0
  445. package/lib/validation/validator.d.ts +10 -0
  446. package/lib/validation/validator.js +4 -0
  447. package/lib/validation/validator.js.map +1 -0
  448. package/lib/validation/withValidator.d.ts +10 -0
  449. package/lib/validation/withValidator.js +10 -0
  450. package/lib/validation/withValidator.js.map +1 -0
  451. package/mobile/bundle/bundle.umd.js +50 -18
  452. package/mobile/bundle/bundle.umd.min.js +1 -1
  453. package/mobile/bundle/components/ApplicationForm/AcquiringFormState.d.ts +11 -0
  454. package/mobile/bundle/components/ApplicationForm/ApplicationFormAcquiring.d.ts +1 -11
  455. package/mobile/bundle/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +1 -8
  456. package/mobile/bundle/components/ApplicationForm/ApplicationFormCredit.d.ts +1 -13
  457. package/mobile/bundle/components/ApplicationForm/ApplicationFormDeposit.d.ts +1 -5
  458. package/mobile/bundle/components/ApplicationForm/ApplicationFormWed.d.ts +1 -11
  459. package/mobile/bundle/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
  460. package/mobile/bundle/components/ApplicationForm/BusinessCardFormState.d.ts +8 -0
  461. package/mobile/bundle/components/ApplicationForm/CreditFormState.d.ts +13 -0
  462. package/mobile/bundle/components/ApplicationForm/CreditParameters.d.ts +3 -3
  463. package/mobile/bundle/components/ApplicationForm/DepositFormState.d.ts +4 -0
  464. package/mobile/bundle/components/ApplicationForm/InputControl.d.ts +4 -5
  465. package/mobile/bundle/components/ApplicationForm/PhoneInputControl.d.ts +2 -0
  466. package/mobile/bundle/components/ApplicationForm/ResponseNotification.d.ts +1 -1
  467. package/mobile/bundle/components/ApplicationForm/SelectControl.d.ts +2 -9
  468. package/mobile/bundle/components/ApplicationForm/WedFormState.d.ts +10 -0
  469. package/mobile/bundle/components/ApplicationForm/models.d.ts +0 -6
  470. package/mobile/bundle/components/ApplicationForm/renderAcquiringDataOrganization.d.ts +3 -10
  471. package/mobile/bundle/components/ApplicationForm/renderAcquiringRegion.d.ts +6 -9
  472. package/mobile/bundle/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +3 -10
  473. package/mobile/bundle/components/ApplicationForm/renderCreditDataOrganization.d.ts +3 -12
  474. package/mobile/bundle/components/ApplicationForm/renderCreditParameters.d.ts +3 -9
  475. package/mobile/bundle/components/ApplicationForm/renderQuestionsInterested.d.ts +3 -11
  476. package/mobile/bundle/components/ApplicationForm/renderRegion.d.ts +6 -8
  477. package/mobile/bundle/components/ApplicationForm/renderRegionDepartment.d.ts +6 -9
  478. package/mobile/bundle/components/ApplicationForm/renderSlideCheckboxes.d.ts +3 -9
  479. package/mobile/bundle/components/ApplicationForm/renderWedDataOrganization.d.ts +3 -10
  480. package/mobile/bundle/components/ApplicationForm/validators.d.ts +4 -0
  481. package/mobile/bundle/components/Filtration/renderFormItem.d.ts +2 -2
  482. package/mobile/bundle/components/TextBlock/TextBlockContent.d.ts +1 -2
  483. package/mobile/bundle/hooks/useForm.d.ts +13 -12
  484. package/mobile/bundle/ui-kit/Checkbox/CheckboxProps.d.ts +2 -2
  485. package/mobile/bundle/ui-kit/CookiePopup/CookiePopup.d.ts +8 -0
  486. package/mobile/bundle/ui-kit/Dialog/useDialogProps.d.ts +1 -1
  487. package/mobile/bundle/ui-kit/Input/InputProps.d.ts +4 -2
  488. package/mobile/bundle/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -0
  489. package/mobile/bundle/ui-kit/PhoneInput/PhoneInput.d.ts +2 -0
  490. package/mobile/bundle/ui-kit/PhoneInput/normalizePhone.d.ts +1 -0
  491. package/mobile/bundle/ui-kit/Select/Select.d.ts +6 -7
  492. package/mobile/bundle/validation/and.d.ts +2 -0
  493. package/mobile/bundle/validation/objectValidator.d.ts +2 -0
  494. package/mobile/bundle/validation/pattern.d.ts +1 -0
  495. package/mobile/bundle/validation/required.d.ts +1 -0
  496. package/mobile/bundle/validation/validator.d.ts +10 -0
  497. package/mobile/bundle/validation/withValidator.d.ts +10 -0
  498. package/mobile/dist/components/ApplicationForm/AcquiringFormState.d.ts +11 -0
  499. package/mobile/dist/components/ApplicationForm/AcquiringFormState.js +2 -0
  500. package/mobile/dist/components/ApplicationForm/AcquiringFormState.js.map +1 -0
  501. package/mobile/dist/components/ApplicationForm/ApplicationForm.js +4 -3
  502. package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  503. package/mobile/dist/components/ApplicationForm/ApplicationFormAcquiring.d.ts +1 -11
  504. package/mobile/dist/components/ApplicationForm/ApplicationFormAcquiring.js +28 -48
  505. package/mobile/dist/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
  506. package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +1 -8
  507. package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +24 -32
  508. package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
  509. package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.d.ts +1 -13
  510. package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js +28 -48
  511. package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
  512. package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.d.ts +1 -5
  513. package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.js +21 -23
  514. package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
  515. package/mobile/dist/components/ApplicationForm/ApplicationFormWed.d.ts +1 -11
  516. package/mobile/dist/components/ApplicationForm/ApplicationFormWed.js +22 -37
  517. package/mobile/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
  518. package/mobile/dist/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
  519. package/mobile/dist/components/ApplicationForm/BusinessCardFormState.d.ts +8 -0
  520. package/mobile/dist/components/ApplicationForm/BusinessCardFormState.js +2 -0
  521. package/mobile/dist/components/ApplicationForm/BusinessCardFormState.js.map +1 -0
  522. package/mobile/dist/components/ApplicationForm/CreditFormState.d.ts +13 -0
  523. package/mobile/dist/components/ApplicationForm/CreditFormState.js +2 -0
  524. package/mobile/dist/components/ApplicationForm/CreditFormState.js.map +1 -0
  525. package/mobile/dist/components/ApplicationForm/CreditParameters.d.ts +3 -3
  526. package/mobile/dist/components/ApplicationForm/CreditParameters.js +5 -5
  527. package/mobile/dist/components/ApplicationForm/CreditParameters.js.map +1 -1
  528. package/mobile/dist/components/ApplicationForm/DepositFormState.d.ts +4 -0
  529. package/mobile/dist/components/ApplicationForm/DepositFormState.js +2 -0
  530. package/mobile/dist/components/ApplicationForm/DepositFormState.js.map +1 -0
  531. package/mobile/dist/components/ApplicationForm/InputControl.d.ts +4 -5
  532. package/mobile/dist/components/ApplicationForm/InputControl.js +1 -3
  533. package/mobile/dist/components/ApplicationForm/InputControl.js.map +1 -1
  534. package/mobile/dist/components/ApplicationForm/PhoneInputControl.d.ts +2 -0
  535. package/mobile/dist/components/ApplicationForm/PhoneInputControl.js +8 -0
  536. package/mobile/dist/components/ApplicationForm/PhoneInputControl.js.map +1 -0
  537. package/mobile/dist/components/ApplicationForm/ResponseNotification.d.ts +1 -1
  538. package/mobile/dist/components/ApplicationForm/ResponseNotification.js +4 -4
  539. package/mobile/dist/components/ApplicationForm/SelectControl.d.ts +2 -9
  540. package/mobile/dist/components/ApplicationForm/SelectControl.js +1 -7
  541. package/mobile/dist/components/ApplicationForm/SelectControl.js.map +1 -1
  542. package/mobile/dist/components/ApplicationForm/WedFormState.d.ts +10 -0
  543. package/mobile/dist/components/ApplicationForm/WedFormState.js +2 -0
  544. package/mobile/dist/components/ApplicationForm/WedFormState.js.map +1 -0
  545. package/mobile/dist/components/ApplicationForm/models.d.ts +0 -6
  546. package/mobile/dist/components/ApplicationForm/renderAcquiringDataOrganization.d.ts +3 -10
  547. package/mobile/dist/components/ApplicationForm/renderAcquiringDataOrganization.js +4 -2
  548. package/mobile/dist/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -1
  549. package/mobile/dist/components/ApplicationForm/renderAcquiringRegion.d.ts +6 -9
  550. package/mobile/dist/components/ApplicationForm/renderAcquiringRegion.js +3 -2
  551. package/mobile/dist/components/ApplicationForm/renderAcquiringRegion.js.map +1 -1
  552. package/mobile/dist/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +3 -10
  553. package/mobile/dist/components/ApplicationForm/renderBusinessCardDataOrganization.js +4 -2
  554. package/mobile/dist/components/ApplicationForm/renderBusinessCardDataOrganization.js.map +1 -1
  555. package/mobile/dist/components/ApplicationForm/renderCreditDataOrganization.d.ts +3 -12
  556. package/mobile/dist/components/ApplicationForm/renderCreditDataOrganization.js +4 -2
  557. package/mobile/dist/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
  558. package/mobile/dist/components/ApplicationForm/renderCreditParameters.d.ts +3 -9
  559. package/mobile/dist/components/ApplicationForm/renderCreditParameters.js +3 -16
  560. package/mobile/dist/components/ApplicationForm/renderCreditParameters.js.map +1 -1
  561. package/mobile/dist/components/ApplicationForm/renderQuestionsInterested.d.ts +3 -11
  562. package/mobile/dist/components/ApplicationForm/renderQuestionsInterested.js +4 -1
  563. package/mobile/dist/components/ApplicationForm/renderQuestionsInterested.js.map +1 -1
  564. package/mobile/dist/components/ApplicationForm/renderRegion.d.ts +6 -8
  565. package/mobile/dist/components/ApplicationForm/renderRegion.js +3 -2
  566. package/mobile/dist/components/ApplicationForm/renderRegion.js.map +1 -1
  567. package/mobile/dist/components/ApplicationForm/renderRegionDepartment.d.ts +6 -9
  568. package/mobile/dist/components/ApplicationForm/renderRegionDepartment.js +6 -2
  569. package/mobile/dist/components/ApplicationForm/renderRegionDepartment.js.map +1 -1
  570. package/mobile/dist/components/ApplicationForm/renderSlideCheckboxes.d.ts +3 -9
  571. package/mobile/dist/components/ApplicationForm/renderSlideCheckboxes.js +1 -1
  572. package/mobile/dist/components/ApplicationForm/renderSlideCheckboxes.js.map +1 -1
  573. package/mobile/dist/components/ApplicationForm/renderSubmitButton.js +2 -1
  574. package/mobile/dist/components/ApplicationForm/renderSubmitButton.js.map +1 -1
  575. package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.d.ts +3 -10
  576. package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.js +4 -2
  577. package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
  578. package/mobile/dist/components/ApplicationForm/validators.d.ts +4 -0
  579. package/mobile/dist/components/ApplicationForm/validators.js +11 -0
  580. package/mobile/dist/components/ApplicationForm/validators.js.map +1 -0
  581. package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
  582. package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  583. package/mobile/dist/components/Blocks.js +5 -1
  584. package/mobile/dist/components/Blocks.js.map +1 -1
  585. package/mobile/dist/components/Bonus/Bonus.js +1 -1
  586. package/mobile/dist/components/Bonus/Bonus.js.map +1 -1
  587. package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +1 -1
  588. package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
  589. package/mobile/dist/components/BusinessBlock/BusinessBlock.js +1 -1
  590. package/mobile/dist/components/BusinessBlock/BusinessBlock.js.map +1 -1
  591. package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js +1 -1
  592. package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  593. package/mobile/dist/components/Calculator/CreditCalculatorForm.js +1 -1
  594. package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  595. package/mobile/dist/components/CardTransfer/CardTransfer.js +1 -1
  596. package/mobile/dist/components/CardTransfer/CardTransfer.js.map +1 -1
  597. package/mobile/dist/components/Carousel/Carousel.js +1 -1
  598. package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
  599. package/mobile/dist/components/Carousel/CarouselScrollButtons.js +1 -1
  600. package/mobile/dist/components/Carousel/CarouselScrollButtons.js.map +1 -1
  601. package/mobile/dist/components/CarouselLinks/CarouselLinks.js +1 -1
  602. package/mobile/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
  603. package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js +2 -2
  604. package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
  605. package/mobile/dist/components/CarouselRichTextCard/CarouselRichTextCard.js +1 -1
  606. package/mobile/dist/components/CarouselRichTextCard/CarouselRichTextCard.js.map +1 -1
  607. package/mobile/dist/components/ContactsBlock/ContactsBlock.js +1 -1
  608. package/mobile/dist/components/ContactsBlock/ContactsBlock.js.map +1 -1
  609. package/mobile/dist/components/ContentPage/ContentPage.js +2 -1
  610. package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
  611. package/mobile/dist/components/ExchangeRateTile/renderInput.js.map +1 -1
  612. package/mobile/dist/components/Filtration/Filtration.js +3 -2
  613. package/mobile/dist/components/Filtration/Filtration.js.map +1 -1
  614. package/mobile/dist/components/Filtration/renderFormItem.d.ts +2 -2
  615. package/mobile/dist/components/Filtration/renderFormItem.js +4 -4
  616. package/mobile/dist/components/Filtration/renderFormItem.js.map +1 -1
  617. package/mobile/dist/components/GracePeriod/GracePeriod.js +1 -1
  618. package/mobile/dist/components/GracePeriod/GracePeriod.js.map +1 -1
  619. package/mobile/dist/components/Headline/Headline.js +1 -1
  620. package/mobile/dist/components/Headline/Headline.js.map +1 -1
  621. package/mobile/dist/components/HorizontalLayout/HorizontalLayout.js +1 -1
  622. package/mobile/dist/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
  623. package/mobile/dist/components/LinkDocs/LinkDocs.js +1 -1
  624. package/mobile/dist/components/SafeDepositRental/WrapperSelect.js.map +1 -1
  625. package/mobile/dist/components/SafeDepositRental/useGetRegions.js +2 -1
  626. package/mobile/dist/components/SafeDepositRental/useGetRegions.js.map +1 -1
  627. package/mobile/dist/components/TextBlock/TextBlock.js +14 -9
  628. package/mobile/dist/components/TextBlock/TextBlock.js.map +1 -1
  629. package/mobile/dist/components/TextBlock/TextBlockContent.d.ts +1 -2
  630. package/mobile/dist/components/VerticalLayout/VerticalLayout.js +1 -1
  631. package/mobile/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
  632. package/mobile/dist/hooks/useForm.d.ts +13 -12
  633. package/mobile/dist/hooks/useForm.js +31 -8
  634. package/mobile/dist/hooks/useForm.js.map +1 -1
  635. package/mobile/dist/ui-kit/Checkbox/Checkbox.js +9 -4
  636. package/mobile/dist/ui-kit/Checkbox/Checkbox.js.map +1 -1
  637. package/mobile/dist/ui-kit/Checkbox/CheckboxProps.d.ts +2 -2
  638. package/mobile/dist/ui-kit/CookiePopup/CookiePopup.d.ts +8 -0
  639. package/mobile/dist/ui-kit/CookiePopup/CookiePopup.js +22 -0
  640. package/mobile/dist/ui-kit/CookiePopup/CookiePopup.js.map +1 -0
  641. package/mobile/dist/ui-kit/CurrencyInput/CurrencyInput.js +8 -14
  642. package/mobile/dist/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
  643. package/mobile/dist/ui-kit/Dialog/CloseButton.js +1 -1
  644. package/mobile/dist/ui-kit/Dialog/CloseButton.js.map +1 -1
  645. package/mobile/dist/ui-kit/Dialog/Dialog.js +1 -1
  646. package/mobile/dist/ui-kit/Dialog/Dialog.js.map +1 -1
  647. package/mobile/dist/ui-kit/Dialog/useDialogProps.d.ts +1 -1
  648. package/mobile/dist/ui-kit/Dialog/useDialogProps.js +2 -2
  649. package/mobile/dist/ui-kit/Dialog/useDialogProps.js.map +1 -1
  650. package/mobile/dist/ui-kit/Input/Input.js +4 -11
  651. package/mobile/dist/ui-kit/Input/Input.js.map +1 -1
  652. package/mobile/dist/ui-kit/Input/InputProps.d.ts +4 -2
  653. package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -0
  654. package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.js +2 -2
  655. package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
  656. package/mobile/dist/ui-kit/PhoneInput/PhoneInput.d.ts +2 -0
  657. package/mobile/dist/ui-kit/PhoneInput/PhoneInput.js +12 -0
  658. package/mobile/dist/ui-kit/PhoneInput/PhoneInput.js.map +1 -0
  659. package/mobile/dist/ui-kit/PhoneInput/normalizePhone.d.ts +1 -0
  660. package/mobile/dist/ui-kit/PhoneInput/normalizePhone.js +17 -0
  661. package/mobile/dist/ui-kit/PhoneInput/normalizePhone.js.map +1 -0
  662. package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js +1 -1
  663. package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
  664. package/mobile/dist/ui-kit/Select/Select.d.ts +6 -7
  665. package/mobile/dist/ui-kit/Select/Select.js +16 -25
  666. package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
  667. package/mobile/dist/ui-kit/SlideCheckbox/SlideCheckbox.js +2 -1
  668. package/mobile/dist/ui-kit/SlideCheckbox/SlideCheckbox.js.map +1 -1
  669. package/mobile/dist/validation/and.d.ts +2 -0
  670. package/mobile/dist/validation/and.js +5 -0
  671. package/mobile/dist/validation/and.js.map +1 -0
  672. package/mobile/dist/validation/objectValidator.d.ts +2 -0
  673. package/mobile/dist/validation/objectValidator.js +7 -0
  674. package/mobile/dist/validation/objectValidator.js.map +1 -0
  675. package/mobile/dist/validation/pattern.d.ts +1 -0
  676. package/mobile/dist/validation/pattern.js +6 -0
  677. package/mobile/dist/validation/pattern.js.map +1 -0
  678. package/mobile/dist/validation/required.d.ts +1 -0
  679. package/mobile/dist/validation/required.js +5 -0
  680. package/mobile/dist/validation/required.js.map +1 -0
  681. package/mobile/dist/validation/validator.d.ts +10 -0
  682. package/mobile/dist/validation/validator.js +9 -0
  683. package/mobile/dist/validation/validator.js.map +1 -0
  684. package/mobile/dist/validation/withValidator.d.ts +10 -0
  685. package/mobile/dist/validation/withValidator.js +13 -0
  686. package/mobile/dist/validation/withValidator.js.map +1 -0
  687. package/mobile/lib/common.css +1 -0
  688. package/mobile/lib/components/ApplicationForm/AcquiringFormState.d.ts +11 -0
  689. package/mobile/lib/components/ApplicationForm/AcquiringFormState.js +2 -0
  690. package/mobile/lib/components/ApplicationForm/AcquiringFormState.js.map +1 -0
  691. package/mobile/lib/components/ApplicationForm/ApplicationForm.js +4 -3
  692. package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  693. package/mobile/lib/components/ApplicationForm/ApplicationFormAcquiring.d.ts +1 -11
  694. package/mobile/lib/components/ApplicationForm/ApplicationFormAcquiring.js +28 -48
  695. package/mobile/lib/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
  696. package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +1 -8
  697. package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +24 -32
  698. package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
  699. package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.d.ts +1 -13
  700. package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js +28 -48
  701. package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
  702. package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.d.ts +1 -5
  703. package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.js +21 -23
  704. package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
  705. package/mobile/lib/components/ApplicationForm/ApplicationFormWed.d.ts +1 -11
  706. package/mobile/lib/components/ApplicationForm/ApplicationFormWed.js +22 -37
  707. package/mobile/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
  708. package/mobile/lib/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
  709. package/mobile/lib/components/ApplicationForm/BusinessCardFormState.d.ts +8 -0
  710. package/mobile/lib/components/ApplicationForm/BusinessCardFormState.js +2 -0
  711. package/mobile/lib/components/ApplicationForm/BusinessCardFormState.js.map +1 -0
  712. package/mobile/lib/components/ApplicationForm/CreditFormState.d.ts +13 -0
  713. package/mobile/lib/components/ApplicationForm/CreditFormState.js +2 -0
  714. package/mobile/lib/components/ApplicationForm/CreditFormState.js.map +1 -0
  715. package/mobile/lib/components/ApplicationForm/CreditParameters.d.ts +3 -3
  716. package/mobile/lib/components/ApplicationForm/CreditParameters.js +5 -5
  717. package/mobile/lib/components/ApplicationForm/CreditParameters.js.map +1 -1
  718. package/mobile/lib/components/ApplicationForm/DepositFormState.d.ts +4 -0
  719. package/mobile/lib/components/ApplicationForm/DepositFormState.js +2 -0
  720. package/mobile/lib/components/ApplicationForm/DepositFormState.js.map +1 -0
  721. package/mobile/lib/components/ApplicationForm/InputControl.d.ts +4 -5
  722. package/mobile/lib/components/ApplicationForm/InputControl.js +1 -3
  723. package/mobile/lib/components/ApplicationForm/InputControl.js.map +1 -1
  724. package/mobile/lib/components/ApplicationForm/PhoneInputControl.d.ts +2 -0
  725. package/mobile/lib/components/ApplicationForm/PhoneInputControl.js +6 -0
  726. package/mobile/lib/components/ApplicationForm/PhoneInputControl.js.map +1 -0
  727. package/mobile/lib/components/ApplicationForm/ResponseNotification.d.ts +1 -1
  728. package/mobile/lib/components/ApplicationForm/ResponseNotification.js +4 -4
  729. package/mobile/lib/components/ApplicationForm/SelectControl.d.ts +2 -9
  730. package/mobile/lib/components/ApplicationForm/SelectControl.js +1 -7
  731. package/mobile/lib/components/ApplicationForm/SelectControl.js.map +1 -1
  732. package/mobile/lib/components/ApplicationForm/WedFormState.d.ts +10 -0
  733. package/mobile/lib/components/ApplicationForm/WedFormState.js +2 -0
  734. package/mobile/lib/components/ApplicationForm/WedFormState.js.map +1 -0
  735. package/mobile/lib/components/ApplicationForm/models.d.ts +0 -6
  736. package/mobile/lib/components/ApplicationForm/renderAcquiringDataOrganization.d.ts +3 -10
  737. package/mobile/lib/components/ApplicationForm/renderAcquiringDataOrganization.js +4 -2
  738. package/mobile/lib/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -1
  739. package/mobile/lib/components/ApplicationForm/renderAcquiringRegion.d.ts +6 -9
  740. package/mobile/lib/components/ApplicationForm/renderAcquiringRegion.js +3 -2
  741. package/mobile/lib/components/ApplicationForm/renderAcquiringRegion.js.map +1 -1
  742. package/mobile/lib/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +3 -10
  743. package/mobile/lib/components/ApplicationForm/renderBusinessCardDataOrganization.js +4 -2
  744. package/mobile/lib/components/ApplicationForm/renderBusinessCardDataOrganization.js.map +1 -1
  745. package/mobile/lib/components/ApplicationForm/renderCreditDataOrganization.d.ts +3 -12
  746. package/mobile/lib/components/ApplicationForm/renderCreditDataOrganization.js +4 -2
  747. package/mobile/lib/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
  748. package/mobile/lib/components/ApplicationForm/renderCreditParameters.d.ts +3 -9
  749. package/mobile/lib/components/ApplicationForm/renderCreditParameters.js +4 -17
  750. package/mobile/lib/components/ApplicationForm/renderCreditParameters.js.map +1 -1
  751. package/mobile/lib/components/ApplicationForm/renderQuestionsInterested.d.ts +3 -11
  752. package/mobile/lib/components/ApplicationForm/renderQuestionsInterested.js +4 -1
  753. package/mobile/lib/components/ApplicationForm/renderQuestionsInterested.js.map +1 -1
  754. package/mobile/lib/components/ApplicationForm/renderRegion.d.ts +6 -8
  755. package/mobile/lib/components/ApplicationForm/renderRegion.js +3 -2
  756. package/mobile/lib/components/ApplicationForm/renderRegion.js.map +1 -1
  757. package/mobile/lib/components/ApplicationForm/renderRegionDepartment.d.ts +6 -9
  758. package/mobile/lib/components/ApplicationForm/renderRegionDepartment.js +6 -2
  759. package/mobile/lib/components/ApplicationForm/renderRegionDepartment.js.map +1 -1
  760. package/mobile/lib/components/ApplicationForm/renderSlideCheckboxes.d.ts +3 -9
  761. package/mobile/lib/components/ApplicationForm/renderSlideCheckboxes.js +1 -1
  762. package/mobile/lib/components/ApplicationForm/renderSlideCheckboxes.js.map +1 -1
  763. package/mobile/lib/components/ApplicationForm/renderSubmitButton.js +2 -1
  764. package/mobile/lib/components/ApplicationForm/renderSubmitButton.js.map +1 -1
  765. package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.d.ts +3 -10
  766. package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.js +4 -2
  767. package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
  768. package/mobile/lib/components/ApplicationForm/validators.d.ts +4 -0
  769. package/mobile/lib/components/ApplicationForm/validators.js +9 -0
  770. package/mobile/lib/components/ApplicationForm/validators.js.map +1 -0
  771. package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
  772. package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  773. package/mobile/lib/components/Blocks.js +5 -1
  774. package/mobile/lib/components/Blocks.js.map +1 -1
  775. package/mobile/lib/components/Bonus/Bonus.js +1 -1
  776. package/mobile/lib/components/Bonus/Bonus.js.map +1 -1
  777. package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +1 -1
  778. package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
  779. package/mobile/lib/components/BusinessBlock/BusinessBlock.js +1 -1
  780. package/mobile/lib/components/BusinessBlock/BusinessBlock.js.map +1 -1
  781. package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js +1 -1
  782. package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  783. package/mobile/lib/components/Calculator/CreditCalculatorForm.js +1 -1
  784. package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  785. package/mobile/lib/components/CardTransfer/CardTransfer.js +1 -1
  786. package/mobile/lib/components/CardTransfer/CardTransfer.js.map +1 -1
  787. package/mobile/lib/components/Carousel/Carousel.js +1 -1
  788. package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
  789. package/mobile/lib/components/Carousel/CarouselScrollButtons.js +1 -1
  790. package/mobile/lib/components/Carousel/CarouselScrollButtons.js.map +1 -1
  791. package/mobile/lib/components/CarouselLinks/CarouselLinks.js +1 -1
  792. package/mobile/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
  793. package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js +2 -2
  794. package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
  795. package/mobile/lib/components/CarouselRichTextCard/CarouselRichTextCard.js +1 -1
  796. package/mobile/lib/components/CarouselRichTextCard/CarouselRichTextCard.js.map +1 -1
  797. package/mobile/lib/components/ContactsBlock/ContactsBlock.js +1 -1
  798. package/mobile/lib/components/ContactsBlock/ContactsBlock.js.map +1 -1
  799. package/mobile/lib/components/ContentPage/ContentPage.js +2 -1
  800. package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
  801. package/mobile/lib/components/ExchangeRateTile/renderInput.js.map +1 -1
  802. package/mobile/lib/components/Filtration/Filtration.js +3 -2
  803. package/mobile/lib/components/Filtration/Filtration.js.map +1 -1
  804. package/mobile/lib/components/Filtration/renderFormItem.d.ts +2 -2
  805. package/mobile/lib/components/Filtration/renderFormItem.js +4 -4
  806. package/mobile/lib/components/Filtration/renderFormItem.js.map +1 -1
  807. package/mobile/lib/components/GracePeriod/GracePeriod.js +1 -1
  808. package/mobile/lib/components/GracePeriod/GracePeriod.js.map +1 -1
  809. package/mobile/lib/components/Headline/Headline.js +1 -1
  810. package/mobile/lib/components/Headline/Headline.js.map +1 -1
  811. package/mobile/lib/components/HorizontalLayout/HorizontalLayout.js +1 -1
  812. package/mobile/lib/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
  813. package/mobile/lib/components/LinkDocs/LinkDocs.js +1 -1
  814. package/mobile/lib/components/SafeDepositRental/WrapperSelect.js.map +1 -1
  815. package/mobile/lib/components/SafeDepositRental/useGetRegions.js +2 -1
  816. package/mobile/lib/components/SafeDepositRental/useGetRegions.js.map +1 -1
  817. package/mobile/lib/components/TextBlock/TextBlock.js +14 -9
  818. package/mobile/lib/components/TextBlock/TextBlock.js.map +1 -1
  819. package/mobile/lib/components/TextBlock/TextBlockContent.d.ts +1 -2
  820. package/mobile/lib/components/VerticalLayout/VerticalLayout.js +1 -1
  821. package/mobile/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
  822. package/mobile/lib/hooks/useForm.d.ts +13 -12
  823. package/mobile/lib/hooks/useForm.js +31 -8
  824. package/mobile/lib/hooks/useForm.js.map +1 -1
  825. package/mobile/lib/ui-kit/Checkbox/Checkbox.js +9 -4
  826. package/mobile/lib/ui-kit/Checkbox/Checkbox.js.map +1 -1
  827. package/mobile/lib/ui-kit/Checkbox/CheckboxProps.d.ts +2 -2
  828. package/mobile/lib/ui-kit/CookiePopup/CookiePopup.d.ts +8 -0
  829. package/mobile/lib/ui-kit/CookiePopup/CookiePopup.js +20 -0
  830. package/mobile/lib/ui-kit/CookiePopup/CookiePopup.js.map +1 -0
  831. package/mobile/lib/ui-kit/CurrencyInput/CurrencyInput.js +8 -14
  832. package/mobile/lib/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
  833. package/mobile/lib/ui-kit/Dialog/CloseButton.js +1 -1
  834. package/mobile/lib/ui-kit/Dialog/CloseButton.js.map +1 -1
  835. package/mobile/lib/ui-kit/Dialog/Dialog.js +1 -1
  836. package/mobile/lib/ui-kit/Dialog/Dialog.js.map +1 -1
  837. package/mobile/lib/ui-kit/Dialog/useDialogProps.d.ts +1 -1
  838. package/mobile/lib/ui-kit/Dialog/useDialogProps.js +2 -2
  839. package/mobile/lib/ui-kit/Dialog/useDialogProps.js.map +1 -1
  840. package/mobile/lib/ui-kit/Input/Input.js +4 -11
  841. package/mobile/lib/ui-kit/Input/Input.js.map +1 -1
  842. package/mobile/lib/ui-kit/Input/InputProps.d.ts +4 -2
  843. package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -0
  844. package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.js +2 -2
  845. package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
  846. package/mobile/lib/ui-kit/PhoneInput/PhoneInput.d.ts +2 -0
  847. package/mobile/lib/ui-kit/PhoneInput/PhoneInput.js +10 -0
  848. package/mobile/lib/ui-kit/PhoneInput/PhoneInput.js.map +1 -0
  849. package/mobile/lib/ui-kit/PhoneInput/normalizePhone.d.ts +1 -0
  850. package/mobile/lib/ui-kit/PhoneInput/normalizePhone.js +14 -0
  851. package/mobile/lib/ui-kit/PhoneInput/normalizePhone.js.map +1 -0
  852. package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js +1 -1
  853. package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
  854. package/mobile/lib/ui-kit/Select/Select.d.ts +6 -7
  855. package/mobile/lib/ui-kit/Select/Select.js +17 -26
  856. package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
  857. package/mobile/lib/ui-kit/SlideCheckbox/SlideCheckbox.js +2 -1
  858. package/mobile/lib/ui-kit/SlideCheckbox/SlideCheckbox.js.map +1 -1
  859. package/mobile/lib/validation/and.d.ts +2 -0
  860. package/mobile/lib/validation/and.js +2 -0
  861. package/mobile/lib/validation/and.js.map +1 -0
  862. package/mobile/lib/validation/objectValidator.d.ts +2 -0
  863. package/mobile/lib/validation/objectValidator.js +4 -0
  864. package/mobile/lib/validation/objectValidator.js.map +1 -0
  865. package/mobile/lib/validation/pattern.d.ts +1 -0
  866. package/mobile/lib/validation/pattern.js +3 -0
  867. package/mobile/lib/validation/pattern.js.map +1 -0
  868. package/mobile/lib/validation/required.d.ts +1 -0
  869. package/mobile/lib/validation/required.js +3 -0
  870. package/mobile/lib/validation/required.js.map +1 -0
  871. package/mobile/lib/validation/validator.d.ts +10 -0
  872. package/mobile/lib/validation/validator.js +4 -0
  873. package/mobile/lib/validation/validator.js.map +1 -0
  874. package/mobile/lib/validation/withValidator.d.ts +10 -0
  875. package/mobile/lib/validation/withValidator.js +10 -0
  876. package/mobile/lib/validation/withValidator.js.map +1 -0
  877. package/mobile/src/components/ApplicationForm/AcquiringFormState.ts +12 -0
  878. package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +6 -5
  879. package/mobile/src/components/ApplicationForm/ApplicationFormAcquiring.tsx +43 -71
  880. package/mobile/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +37 -51
  881. package/mobile/src/components/ApplicationForm/ApplicationFormCredit.tsx +49 -84
  882. package/mobile/src/components/ApplicationForm/ApplicationFormDeposit.tsx +41 -67
  883. package/mobile/src/components/ApplicationForm/ApplicationFormWed.tsx +40 -64
  884. package/mobile/src/components/ApplicationForm/ApplicationFormsProps.ts +2 -2
  885. package/mobile/src/components/ApplicationForm/BusinessCardFormState.ts +9 -0
  886. package/mobile/src/components/ApplicationForm/CreditFormState.ts +14 -0
  887. package/mobile/src/components/ApplicationForm/CreditParameters.ts +5 -5
  888. package/mobile/src/components/ApplicationForm/DepositFormState.ts +4 -0
  889. package/mobile/src/components/ApplicationForm/InputControl.tsx +21 -21
  890. package/mobile/src/components/ApplicationForm/PhoneInputControl.tsx +26 -0
  891. package/mobile/src/components/ApplicationForm/ResponseNotification.tsx +7 -7
  892. package/mobile/src/components/ApplicationForm/SelectControl.tsx +14 -48
  893. package/mobile/src/components/ApplicationForm/WedFormState.ts +10 -0
  894. package/mobile/src/components/ApplicationForm/models.ts +0 -8
  895. package/mobile/src/components/ApplicationForm/renderAcquiringDataOrganization.tsx +11 -36
  896. package/mobile/src/components/ApplicationForm/renderAcquiringRegion.tsx +12 -33
  897. package/mobile/src/components/ApplicationForm/renderBusinessCardDataOrganization.tsx +13 -36
  898. package/mobile/src/components/ApplicationForm/renderCreditDataOrganization.tsx +13 -44
  899. package/mobile/src/components/ApplicationForm/renderCreditParameters.tsx +27 -30
  900. package/mobile/src/components/ApplicationForm/renderQuestionsInterested.tsx +21 -40
  901. package/mobile/src/components/ApplicationForm/renderRegion.tsx +10 -22
  902. package/mobile/src/components/ApplicationForm/renderRegionDepartment.tsx +15 -32
  903. package/mobile/src/components/ApplicationForm/renderSlideCheckboxes.tsx +5 -23
  904. package/mobile/src/components/ApplicationForm/renderSubmitButton.tsx +2 -1
  905. package/mobile/src/components/ApplicationForm/renderWedDataOrganization.tsx +11 -36
  906. package/mobile/src/components/ApplicationForm/validators.ts +17 -0
  907. package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +1 -1
  908. package/mobile/src/components/Blocks.ts +5 -1
  909. package/mobile/src/components/Bonus/Bonus.tsx +1 -1
  910. package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +1 -1
  911. package/mobile/src/components/BusinessBlock/BusinessBlock.tsx +1 -1
  912. package/mobile/src/components/Calculator/BusinessDepositCalculatorForm.tsx +3 -3
  913. package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +4 -4
  914. package/mobile/src/components/CardTransfer/CardTransfer.tsx +1 -1
  915. package/mobile/src/components/Carousel/Carousel.tsx +1 -1
  916. package/mobile/src/components/Carousel/CarouselScrollButtons.tsx +7 -3
  917. package/mobile/src/components/CarouselLinks/CarouselLinks.tsx +1 -1
  918. package/mobile/src/components/CarouselProductCard/CarouselProductCard.example.json +2 -1
  919. package/mobile/src/components/CarouselProductCard/CarouselProductCard.tsx +2 -2
  920. package/mobile/src/components/CarouselRichTextCard/CarouselRichTextCard.tsx +1 -1
  921. package/mobile/src/components/ContactsBlock/ContactsBlock.tsx +1 -1
  922. package/mobile/src/components/ContentPage/ContentPage.tsx +5 -0
  923. package/mobile/src/components/ExchangeRateTile/renderInput.tsx +3 -3
  924. package/mobile/src/components/Filtration/Filtration.tsx +6 -4
  925. package/mobile/src/components/Filtration/renderFormItem.tsx +5 -5
  926. package/mobile/src/components/GracePeriod/GracePeriod.tsx +1 -1
  927. package/mobile/src/components/Headline/Headline.tsx +1 -1
  928. package/mobile/src/components/HorizontalLayout/HorizontalLayout.tsx +1 -1
  929. package/mobile/src/components/LinkDocs/LinkDocs.tsx +1 -1
  930. package/mobile/src/components/SafeDepositRental/WrapperSelect.tsx +2 -2
  931. package/mobile/src/components/SafeDepositRental/useGetRegions.ts +3 -1
  932. package/mobile/src/components/TariffsTable/TariffsTable.ui.json +3 -0
  933. package/mobile/src/components/TextBlock/TextBlock.tsx +56 -22
  934. package/mobile/src/components/TextBlock/TextBlockContent.ts +1 -3
  935. package/mobile/src/components/VerticalLayout/VerticalLayout.tsx +1 -1
  936. package/mobile/src/hooks/useForm.ts +61 -13
  937. package/mobile/src/ui-kit/Checkbox/Checkbox.tsx +39 -25
  938. package/mobile/src/ui-kit/Checkbox/CheckboxProps.ts +2 -2
  939. package/mobile/src/ui-kit/CookiePopup/CookiePopup.tsx +64 -0
  940. package/mobile/src/ui-kit/CurrencyInput/CurrencyInput.tsx +8 -16
  941. package/mobile/src/ui-kit/Dialog/CloseButton.tsx +1 -1
  942. package/mobile/src/ui-kit/Dialog/Dialog.tsx +1 -1
  943. package/mobile/src/ui-kit/Dialog/useDialogProps.ts +2 -1
  944. package/mobile/src/ui-kit/Input/Input.tsx +11 -19
  945. package/mobile/src/ui-kit/Input/InputProps.ts +4 -2
  946. package/mobile/src/ui-kit/LinkWrapper/LinkWrapper.tsx +13 -10
  947. package/mobile/src/ui-kit/PhoneInput/PhoneInput.tsx +19 -0
  948. package/mobile/src/ui-kit/PhoneInput/normalizePhone.ts +23 -0
  949. package/mobile/src/ui-kit/RadioButtonGroup/RadioButtonGroup.tsx +1 -1
  950. package/mobile/src/ui-kit/Select/Select.tsx +48 -55
  951. package/mobile/src/ui-kit/SlideCheckbox/SlideCheckbox.tsx +13 -12
  952. package/mobile/src/validation/and.ts +6 -0
  953. package/mobile/src/validation/objectValidator.ts +10 -0
  954. package/mobile/src/validation/pattern.ts +4 -0
  955. package/mobile/src/validation/required.ts +3 -0
  956. package/mobile/src/validation/validator.ts +21 -0
  957. package/mobile/src/validation/withValidator.ts +21 -0
  958. package/package.json +2 -2
  959. package/src/components/ApplicationForm/AcquiringFormState.ts +12 -0
  960. package/src/components/ApplicationForm/ApplicationForm.tsx +6 -5
  961. package/src/components/ApplicationForm/ApplicationFormAcquiring.tsx +43 -71
  962. package/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +37 -51
  963. package/src/components/ApplicationForm/ApplicationFormCredit.tsx +49 -84
  964. package/src/components/ApplicationForm/ApplicationFormDeposit.tsx +41 -67
  965. package/src/components/ApplicationForm/ApplicationFormWed.tsx +40 -64
  966. package/src/components/ApplicationForm/ApplicationFormsProps.ts +2 -2
  967. package/src/components/ApplicationForm/BusinessCardFormState.ts +9 -0
  968. package/src/components/ApplicationForm/CreditFormState.ts +14 -0
  969. package/src/components/ApplicationForm/CreditParameters.ts +5 -5
  970. package/src/components/ApplicationForm/DepositFormState.ts +4 -0
  971. package/src/components/ApplicationForm/InputControl.tsx +21 -21
  972. package/src/components/ApplicationForm/PhoneInputControl.tsx +26 -0
  973. package/src/components/ApplicationForm/ResponseNotification.tsx +7 -7
  974. package/src/components/ApplicationForm/SelectControl.tsx +14 -48
  975. package/src/components/ApplicationForm/WedFormState.ts +10 -0
  976. package/src/components/ApplicationForm/models.ts +0 -8
  977. package/src/components/ApplicationForm/renderAcquiringDataOrganization.tsx +11 -36
  978. package/src/components/ApplicationForm/renderAcquiringRegion.tsx +12 -33
  979. package/src/components/ApplicationForm/renderBusinessCardDataOrganization.tsx +13 -36
  980. package/src/components/ApplicationForm/renderCreditDataOrganization.tsx +13 -44
  981. package/src/components/ApplicationForm/renderCreditParameters.tsx +27 -30
  982. package/src/components/ApplicationForm/renderQuestionsInterested.tsx +21 -40
  983. package/src/components/ApplicationForm/renderRegion.tsx +10 -22
  984. package/src/components/ApplicationForm/renderRegionDepartment.tsx +15 -32
  985. package/src/components/ApplicationForm/renderSlideCheckboxes.tsx +5 -23
  986. package/src/components/ApplicationForm/renderSubmitButton.tsx +2 -1
  987. package/src/components/ApplicationForm/renderWedDataOrganization.tsx +11 -36
  988. package/src/components/ApplicationForm/validators.ts +17 -0
  989. package/src/components/BenefitsBlock/BenefitsBlock.tsx +1 -1
  990. package/src/components/Blocks.mobile.ts +5 -1
  991. package/src/components/Bonus/Bonus.tsx +1 -1
  992. package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +1 -1
  993. package/src/components/BusinessBlock/BusinessBlock.tsx +1 -1
  994. package/src/components/Calculator/BusinessDepositCalculatorForm.tsx +3 -3
  995. package/src/components/Calculator/CreditCalculatorForm.tsx +4 -4
  996. package/src/components/CardTransfer/CardTransfer.tsx +1 -1
  997. package/src/components/Carousel/Carousel.fixture.tsx +1 -1
  998. package/src/components/Carousel/Carousel.tsx +1 -1
  999. package/src/components/Carousel/CarouselScrollButtons.tsx +7 -3
  1000. package/src/components/CarouselLinks/CarouselLinks.tsx +1 -1
  1001. package/src/components/CarouselProductCard/CarouselProductCard.example.json +2 -1
  1002. package/src/components/CarouselProductCard/CarouselProductCard.fixture.tsx +1 -0
  1003. package/src/components/CarouselProductCard/CarouselProductCard.tsx +2 -2
  1004. package/src/components/CarouselRichTextCard/CarouselRichTextCard.tsx +1 -1
  1005. package/src/components/ContactsBlock/ContactsBlock.tsx +1 -1
  1006. package/src/components/ContentPage/ContentPage.tsx +5 -0
  1007. package/src/components/ExchangeRateTile/renderInput.tsx +3 -3
  1008. package/src/components/Filtration/Filtration.tsx +6 -4
  1009. package/src/components/Filtration/renderFormItem.tsx +5 -5
  1010. package/src/components/GracePeriod/GracePeriod.tsx +1 -1
  1011. package/src/components/Headline/Headline.tsx +1 -1
  1012. package/src/components/HorizontalLayout/HorizontalLayout.tsx +1 -1
  1013. package/src/components/ImgBlock/ImgBlock.fixture.mobile.tsx +21 -0
  1014. package/src/components/LinkDocs/LinkDocs.mobile.tsx +1 -1
  1015. package/src/components/LinkDocs/LinkDocs.tsx +1 -1
  1016. package/src/components/MobileAppTile/MobileAppTile.tsx +1 -1
  1017. package/src/components/ProductBlock/ProductBlock.tsx +5 -2
  1018. package/src/components/RichTextBlock/RichTextBlock.fixture.mobile.tsx +51 -0
  1019. package/src/components/SafeDepositRental/WrapperSelect.tsx +2 -2
  1020. package/src/components/SafeDepositRental/useGetRegions.ts +3 -1
  1021. package/src/components/TariffsTable/TariffsTable.tsx +1 -1
  1022. package/src/components/TariffsTable/TariffsTable.ui.json +3 -0
  1023. package/src/components/TextBlock/TextBlock.fixture.mobile.tsx +43 -50
  1024. package/src/components/TextBlock/TextBlock.fixture.tsx +1 -1
  1025. package/src/components/TextBlock/TextBlock.tsx +36 -12
  1026. package/src/components/TextBlock/TextBlockContent.ts +1 -3
  1027. package/src/components/VerticalLayout/VerticalLayout.fixture.mobile.tsx +90 -0
  1028. package/src/components/VerticalLayout/VerticalLayout.tsx +1 -1
  1029. package/src/hooks/useForm.ts +61 -13
  1030. package/src/ui-kit/Checkbox/Checkbox.tsx +39 -25
  1031. package/src/ui-kit/Checkbox/CheckboxProps.ts +2 -2
  1032. package/src/ui-kit/CookiePopup/CookiePopup.tsx +64 -0
  1033. package/src/ui-kit/CurrencyInput/CurrencyInput.tsx +8 -16
  1034. package/src/ui-kit/Dialog/CloseButton.tsx +1 -1
  1035. package/src/ui-kit/Dialog/Dialog.tsx +1 -1
  1036. package/src/ui-kit/Dialog/useDialogProps.ts +2 -1
  1037. package/src/ui-kit/Input/Input.tsx +11 -19
  1038. package/src/ui-kit/Input/InputProps.ts +4 -2
  1039. package/src/ui-kit/LinkWrapper/LinkWrapper.tsx +13 -10
  1040. package/src/ui-kit/List/List.fixture.tsx +4 -4
  1041. package/src/ui-kit/PhoneInput/PhoneInput.tsx +19 -0
  1042. package/src/ui-kit/PhoneInput/normalizePhone.ts +23 -0
  1043. package/src/ui-kit/RadioButtonGroup/RadioButtonGroup.tsx +1 -1
  1044. package/src/ui-kit/RichText/RichText.fixture.tsx +1 -1
  1045. package/src/ui-kit/Select/Select.tsx +48 -55
  1046. package/src/ui-kit/SlideCheckbox/SlideCheckbox.tsx +13 -12
  1047. package/src/ui-kit/Tags/Tags.fixture.tsx +1 -1
  1048. package/src/validation/and.ts +6 -0
  1049. package/src/validation/objectValidator.ts +10 -0
  1050. package/src/validation/pattern.ts +4 -0
  1051. package/src/validation/required.ts +3 -0
  1052. package/src/validation/validator.ts +21 -0
  1053. package/src/validation/withValidator.ts +21 -0
  1054. package/tailwind.config.cjs +4 -0
  1055. package/bin/migration-scripts/0.9.3.js +0 -88
  1056. package/bundle/components/ApplicationForm/renderInputRange.d.ts +0 -11
  1057. package/bundle/components/ApplicationForm/useForm.d.ts +0 -14
  1058. package/bundle/components/ApplicationForm/validate.d.ts +0 -1
  1059. package/bundle/components/TextBlock/TextBlock.mobile.d.ts +0 -5
  1060. package/dist/components/ApplicationForm/renderInputRange.d.ts +0 -11
  1061. package/dist/components/ApplicationForm/renderInputRange.js +0 -8
  1062. package/dist/components/ApplicationForm/renderInputRange.js.map +0 -1
  1063. package/dist/components/ApplicationForm/useForm.d.ts +0 -14
  1064. package/dist/components/ApplicationForm/useForm.js +0 -37
  1065. package/dist/components/ApplicationForm/useForm.js.map +0 -1
  1066. package/dist/components/ApplicationForm/validate.d.ts +0 -1
  1067. package/dist/components/ApplicationForm/validate.js +0 -22
  1068. package/dist/components/ApplicationForm/validate.js.map +0 -1
  1069. package/dist/components/TextBlock/TextBlock.mobile.d.ts +0 -5
  1070. package/dist/components/TextBlock/TextBlock.mobile.js +0 -16
  1071. package/dist/components/TextBlock/TextBlock.mobile.js.map +0 -1
  1072. package/lib/components/ApplicationForm/renderInputRange.d.ts +0 -11
  1073. package/lib/components/ApplicationForm/renderInputRange.js +0 -5
  1074. package/lib/components/ApplicationForm/renderInputRange.js.map +0 -1
  1075. package/lib/components/ApplicationForm/useForm.d.ts +0 -14
  1076. package/lib/components/ApplicationForm/useForm.js +0 -34
  1077. package/lib/components/ApplicationForm/useForm.js.map +0 -1
  1078. package/lib/components/ApplicationForm/validate.d.ts +0 -1
  1079. package/lib/components/ApplicationForm/validate.js +0 -19
  1080. package/lib/components/ApplicationForm/validate.js.map +0 -1
  1081. package/lib/components/TextBlock/TextBlock.mobile.d.ts +0 -5
  1082. package/lib/components/TextBlock/TextBlock.mobile.js +0 -14
  1083. package/lib/components/TextBlock/TextBlock.mobile.js.map +0 -1
  1084. package/mobile/bundle/components/ApplicationForm/renderInputRange.d.ts +0 -11
  1085. package/mobile/bundle/components/ApplicationForm/useForm.d.ts +0 -14
  1086. package/mobile/bundle/components/ApplicationForm/validate.d.ts +0 -1
  1087. package/mobile/dist/components/ApplicationForm/renderInputRange.d.ts +0 -11
  1088. package/mobile/dist/components/ApplicationForm/renderInputRange.js +0 -8
  1089. package/mobile/dist/components/ApplicationForm/renderInputRange.js.map +0 -1
  1090. package/mobile/dist/components/ApplicationForm/useForm.d.ts +0 -14
  1091. package/mobile/dist/components/ApplicationForm/useForm.js +0 -37
  1092. package/mobile/dist/components/ApplicationForm/useForm.js.map +0 -1
  1093. package/mobile/dist/components/ApplicationForm/validate.d.ts +0 -1
  1094. package/mobile/dist/components/ApplicationForm/validate.js +0 -22
  1095. package/mobile/dist/components/ApplicationForm/validate.js.map +0 -1
  1096. package/mobile/lib/components/ApplicationForm/renderInputRange.d.ts +0 -11
  1097. package/mobile/lib/components/ApplicationForm/renderInputRange.js +0 -5
  1098. package/mobile/lib/components/ApplicationForm/renderInputRange.js.map +0 -1
  1099. package/mobile/lib/components/ApplicationForm/useForm.d.ts +0 -14
  1100. package/mobile/lib/components/ApplicationForm/useForm.js +0 -34
  1101. package/mobile/lib/components/ApplicationForm/useForm.js.map +0 -1
  1102. package/mobile/lib/components/ApplicationForm/validate.d.ts +0 -1
  1103. package/mobile/lib/components/ApplicationForm/validate.js +0 -19
  1104. package/mobile/lib/components/ApplicationForm/validate.js.map +0 -1
  1105. package/mobile/src/components/ApplicationForm/renderInputRange.tsx +0 -20
  1106. package/mobile/src/components/ApplicationForm/useForm.ts +0 -65
  1107. package/mobile/src/components/ApplicationForm/validate.ts +0 -22
  1108. package/src/components/ApplicationForm/renderInputRange.tsx +0 -20
  1109. package/src/components/ApplicationForm/useForm.ts +0 -65
  1110. package/src/components/ApplicationForm/validate.ts +0 -22
  1111. package/src/components/TextBlock/TextBlock.mobile.tsx +0 -42
@@ -358,6 +358,53 @@
358
358
  };
359
359
  const Heading = JSX(({ className = '', headingType = 'h3', as: Tag = 'h3', title, children }) => (jsx(Tag, { className: `font-sans m-0 ${styles$4[headingType]} ${className}`, children: title || children })));
360
360
 
361
+ const useForm = (initialState, onSubmit) => {
362
+ const [formState, setFormState] = useState(initialState);
363
+ const [isDirtyForm, setDirtyForm] = useState(false);
364
+ const [dirtyFieldsMap, setDirtyFieldsMap] = useState({});
365
+ const handlersMap = useRef({});
366
+ const field = (fieldName) => {
367
+ if (!handlersMap.current) {
368
+ handlersMap.current = {};
369
+ }
370
+ handlersMap.current[fieldName] ||= (value) => {
371
+ setFormState((prev) => ({ ...prev, [fieldName]: value }));
372
+ setDirtyFieldsMap((prev) => ({ ...prev, [fieldName]: true }));
373
+ };
374
+ return {
375
+ value: formState[fieldName],
376
+ isDirty: isDirtyForm || dirtyFieldsMap[fieldName],
377
+ onChange: handlersMap.current[fieldName],
378
+ };
379
+ };
380
+ const reset = useCallback(() => {
381
+ setFormState(initialState);
382
+ setDirtyForm(false);
383
+ setDirtyFieldsMap({});
384
+ }, [initialState]);
385
+ const handleSubmit = useCallback((e) => {
386
+ e.preventDefault();
387
+ setDirtyForm(true);
388
+ onSubmit && onSubmit(formState);
389
+ }, [onSubmit, formState]);
390
+ return [
391
+ formState,
392
+ {
393
+ isDirty: isDirtyForm || Object.values(dirtyFieldsMap).some(Boolean),
394
+ field,
395
+ reset,
396
+ onSubmit: handleSubmit,
397
+ },
398
+ ];
399
+ };
400
+
401
+ const objectValidator = (validatorsMap) => (o) => (o &&
402
+ Object.entries(validatorsMap).flatMap(([key, validator]) => validator(o[key]))) ||
403
+ [];
404
+
405
+ const isValidationSuccess = (info) => !info?.length;
406
+ const validator = (predicate) => (message) => (_) => predicate(_) ? [] : [message];
407
+
361
408
  const consistentDataMap = new Map();
362
409
  function useAsyncData(key, fetcher, { fallback } = {}) {
363
410
  const args = useMemo(() => keyToArgs(key), [key]);
@@ -439,9 +486,10 @@
439
486
  }
440
487
 
441
488
  const REGIONS_URL$1 = '/api/v1/regions';
489
+ const EMPTY_VALUE$2 = [];
442
490
  function useGetRegions() {
443
491
  const { data } = useAsyncData(REGIONS_URL$1, fetchJSONUnsafe);
444
- return data || [];
492
+ return data || EMPTY_VALUE$2;
445
493
  }
446
494
 
447
495
  const useDialog = (id = '') => ({
@@ -606,49 +654,61 @@
606
654
 
607
655
  const Footnote = JSX(({ link }) => (jsxs(Paragraph, { size: "text-s-light", color: "text-secondary-text", children: [jsx(Text, { children: "\u041D\u0430\u0436\u0438\u043C\u0430\u044F \u043A\u043D\u043E\u043F\u043A\u0443, \u0432\u044B \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442\u0435 \u0441\u043E\u0433\u043B\u0430\u0441\u0438\u0435 \u0441 " }), link ? (jsx(Button, { href: link.href, ariaLabel: "\u0443\u0441\u043B\u043E\u0432\u0438\u044F \u043F\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043D\u043D\u044B\u0445", target: link.target, className: "text-primary-main", children: jsx(Text, { children: link.text }) })) : null] })));
608
656
 
609
- const Input = JSX(({ className = '', inputClassName = '', id, name, type = 'text', label, value = '', valid = true, children, onChange, onBlur, ...inputProps }) => {
657
+ const withValidator = (props, validator) => {
658
+ const { value, isDirty } = props;
659
+ const errors = isDirty ? validator(value) : [];
660
+ return {
661
+ ...props,
662
+ errors,
663
+ error: errors[0],
664
+ };
665
+ };
666
+
667
+ const Input = JSX(({ className = '', inputClassName = '', id, name, type = 'text', label, value = '', valid = true, children, onChange, ...inputProps }) => {
610
668
  const handleChange = useCallback((e) => {
611
- const validInputValue = e.target.validity.valid ? e.target.value : value;
612
- onChange(validInputValue);
669
+ onChange && onChange(e.target?.value || '');
613
670
  }, [onChange]);
614
- const handleBlur = useCallback((e) => {
615
- if (!onBlur) {
616
- return;
617
- }
618
- const validInputValue = e.target.validity.valid ? e.target.value : value;
619
- onBlur(validInputValue);
620
- }, [onBlur]);
621
671
  const paddingStyle = children ? 'pr-8' : '';
622
672
  const validStyle = valid
623
673
  ? 'border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text'
624
674
  : 'border-error';
625
- return (jsxs("div", { className: `relative ${className}`, children: [label ? jsx("label", { className: "block text-m-light mb-2", children: label }) : null, jsx("input", { className: `w-full border rounded-md text-primary-text outline-none p-4 ${paddingStyle} ${validStyle} ${inputClassName}`, id: id, name: name || id, type: type, value: value, onChange: handleChange, onBlur: handleBlur, ...inputProps }), children] }));
626
- });
675
+ return (jsxs("div", { className: style('relative', className), children: [label ? jsx("label", { className: "block text-m-light mb-2", children: label }) : null, jsx("input", { className: style('w-full border rounded-md text-primary-text outline-none p-4', paddingStyle, validStyle, inputClassName), id: id, name: name || id, type: type, value: value, onInput: handleChange, ...inputProps }), children] }));
676
+ });
677
+
678
+ const InputControl = JSX(({ className, label, value = '', error, onChange, onBlur }) => (jsxs("div", { className: className, children: [jsx(Input, { type: "text", "aria-label": label, label: label, valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur }), jsx("div", { className: "h-2", children: error ? (jsx(Text, { size: "text-xs-light", color: "text-error", children: error })) : null })] })));
679
+
680
+ const isPlaceholder = (_) => _ === '_';
681
+ const isDigit = (_) => /\d/.test(_);
682
+ const isWildcard = (_) => isPlaceholder(_) || isDigit(_);
683
+ const phonePattern = [...'+7 (___) ___-__-__'];
684
+ const firstPlaceholderIndex = phonePattern.findIndex(isPlaceholder);
685
+ const phoneWildcardIndicies = phonePattern.map((_, i) => isWildcard(_) ? phonePattern.slice(0, i).filter(isWildcard).length : -1);
686
+ function normalizePhone(phone) {
687
+ const phoneNumbers = phone.replace(/\D/g, '');
688
+ const applyPlaceholder = (_, i) => isDigit(_) ? _ : phoneNumbers.charAt(phoneWildcardIndicies[i]) || _;
689
+ const result = phonePattern.map(applyPlaceholder);
690
+ const resultLength = phoneWildcardIndicies.indexOf(phoneNumbers.length - 1) + 1;
691
+ return (resultLength ? result.slice(0, Math.max(firstPlaceholderIndex, resultLength)) : result).join('');
692
+ }
627
693
 
628
- const InputControl = JSX(({ className, label, value, error, onChange, onBlur }) => {
629
- return (jsxs("div", { className: className, children: [jsx(Input, { type: "text", "aria-label": label, label: label, valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur }), jsx("div", { className: "h-2", children: jsx(Text, { size: "text-xs-light", color: "text-error", children: error ? error : null }) })] }));
694
+ const PhoneInput = JSX(({ children, onChange, ...inputProps }) => {
695
+ const handleChange = useCallback(({ target: { value } }) => onChange && onChange(normalizePhone(value || '')), [onChange]);
696
+ return (jsx(Input, { onInput: handleChange, onFocus: handleChange, ...inputProps, children: children }));
630
697
  });
631
698
 
632
- const ERROR_EMPTY = 'Некорректно заполненное поле';
633
- const validate = (key, value) => {
634
- switch (key) {
635
- case 'name':
636
- return isName(value);
637
- case 'inn':
638
- return isTin(value);
639
- case 'mail':
640
- return isEmpty(value);
641
- case 'phone':
642
- return isEmpty(value);
643
- default:
644
- return isEmpty(value);
645
- }
646
- };
647
- const isEmpty = (value) => (value ? '' : ERROR_EMPTY);
648
- const isName = (value) => (value.length > 1 ? '' : ERROR_EMPTY);
649
- const isTin = (value) => (value.length === 10 || value.length === 12 ? '' : ERROR_EMPTY);
699
+ const PhoneInputControl = JSX(({ className, label, value, error, onChange, onBlur }) => (jsxs("div", { className: className, children: [jsx(PhoneInput, { "aria-label": label, label: label, valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur }), jsx("div", { className: "h-2", children: error ? (jsx(Text, { size: "text-xs-light", color: "text-error", children: error })) : null })] })));
650
700
 
651
- const renderAcquiringDataOrganization = ({ fullName, inn, name, phone, handleChange, errors, handleChangeErrors, }) => (jsxs("div", { className: "flex justify-between gap-5 mb-5", children: [jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", error: errors['fullName'], value: fullName, onChange: (value) => handleChange({ fullName: value }), onBlur: (value) => handleChangeErrors({ fullName: validate('fullName', value) }) }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", error: errors['name'], value: name, onChange: (value) => handleChange({ name: value }), onBlur: (value) => handleChangeErrors({ name: validate('name', value) }) })] }), jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0418\u041D\u041D", error: errors['inn'], value: inn, onChange: (value) => handleChange({ inn: value }), onBlur: (value) => handleChangeErrors({ inn: validate('inn', value) }) }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", error: errors['phone'], value: phone, onChange: (value) => handleChange({ phone: value }), onBlur: (value) => handleChangeErrors({ phone: validate('phone', value) }) })] })] }));
701
+ const pattern = (regexp) => validator((_) => typeof _ === 'string' && regexp.test(_));
702
+
703
+ const required = validator((_) => _ !== null && _ !== undefined && _ !== '');
704
+
705
+ const ERROR_MESSAGE = 'Некорректно заполненное поле';
706
+ const defaultValidator = required(ERROR_MESSAGE);
707
+ const nameValidator = validator((_) => typeof _ === 'string' && _.length > 1)(ERROR_MESSAGE);
708
+ const innValidator = validator((_) => typeof _ === 'string' && (_.length === 10 || _.length === 12))(ERROR_MESSAGE);
709
+ const phoneValidator = pattern(/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/)(ERROR_MESSAGE);
710
+
711
+ const renderAcquiringDataOrganization = (field) => (jsxs("div", { className: "flex justify-between gap-5 mb-5", children: [jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...withValidator(field('fullName'), defaultValidator) }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) })] }), jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) }), jsx(PhoneInputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] })] }));
652
712
 
653
713
  const ACQUIRING_TYPES = [
654
714
  {
@@ -668,6 +728,14 @@
668
728
  },
669
729
  ];
670
730
 
731
+ function useBool(defaultValue = false) {
732
+ const [value, setValue] = useState(defaultValue);
733
+ const setTrue = useCallback(() => setValue(true), []);
734
+ const setFalse = useCallback(() => setValue(false), []);
735
+ const toggle = useCallback(() => setValue((_) => !_), []);
736
+ return [value, { setValue, setTrue, setFalse, toggle }];
737
+ }
738
+
671
739
  function useOutsideClick(onClick) {
672
740
  const targetRef = useRef(null);
673
741
  useEffect(() => {
@@ -707,194 +775,109 @@
707
775
  const getSvgSize = (width) => (width ? '' : 'w-full h-full');
708
776
  const Background = JSX(({ className, children }) => className ? jsx("div", { className: className, children: children }) : children);
709
777
 
710
- const Select = JSX(({ className = '', isBorder = true, label, options = [], value, onChange, placeholder = '', valid = true, onValidate, }) => {
711
- const [selectedItem, setSelectedItem] = useState(options[0] || { key: '', text: '' });
712
- const [isOpen, setIsOpen] = useState(false);
713
- const handleClickOutside = useCallback(() => setIsOpen(false), []);
714
- const wrapperRef = useOutsideClick(handleClickOutside);
715
- const choiceOption = (option) => {
716
- setSelectedItem(option);
717
- setIsOpen(false);
718
- onChange(option);
719
- onValidate && onValidate(option.text);
720
- };
721
- const isSelected = (option) => Boolean(option.key === selectedItem.key);
722
- useEffect(() => {
723
- setSelectedItem(value || { key: '', text: '' });
724
- }, [value]);
725
- return (jsxs("div", { className: `${className}`, ref: wrapperRef, children: [label ? (jsx("div", { className: "mb-2", children: jsx(Text, { size: "text-m", color: "text-primary-text", font: "font-light", children: label }) })) : null, jsxs("div", { className: `relative ${isOpen ? 'z-20' : 'z-10'}`, children: [jsxs("div", { className: `text-l flex justify-between items-center mb-0.5 text-primary-text cursor-pointer
726
- ${getBorderStyle(isBorder, valid)}`, onClick: () => setIsOpen(!isOpen), children: [jsx("p", { className: "p-4 pr-8 h-14 overflow-hidden text-ellipsis whitespace-nowrap", children: selectedItem?.text || placeholder }), jsx(Icon, { name: "ArrowUpIcon", width: "16", height: "16", className: `absolute right-3 ${isOpen ? '' : 'rotate-180'}` })] }), options?.length ? (jsx("div", { className: `h-0 ${renderOptionsStyle(isOpen)}`, children: jsx("div", { className: `bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]`, children: options.map(renderOption(choiceOption, isOpen, isSelected)) }) })) : null] })] }));
778
+ const Select = JSX(({ className = '', label, options = [], value, valid = true, isBorder = true, placeholder = '', onChange, }) => {
779
+ const [isOpen, { setFalse: close, toggle }] = useBool();
780
+ const wrapperRef = useOutsideClick(close);
781
+ const handleChange = useCallback((option) => {
782
+ close();
783
+ onChange && onChange(option);
784
+ }, [onChange]);
785
+ const isSelected = (option) => option.key === value?.key;
786
+ return (jsxs("div", { className: className, ref: wrapperRef, children: [label ? (jsx("div", { className: "mb-2", children: jsx(Text, { size: "text-m", color: "text-primary-text", font: "font-light", children: label }) })) : null, jsxs("div", { className: style('relative', isOpen ? 'z-20' : 'z-10'), children: [jsxs("div", { className: style('text-l flex justify-between items-center mb-0.5 text-primary-text cursor-pointer', getBorderStyle(isBorder, valid)), onClick: toggle, children: [jsx("p", { className: "p-4 pr-8 h-14 overflow-hidden text-ellipsis whitespace-nowrap", children: formatOption(value) || placeholder }), jsx(Icon, { className: style('absolute right-3', isOpen ? '' : 'rotate-180'), name: "ArrowUpIcon", width: "16", height: "16" })] }), options?.length ? (jsx("div", { className: style('h-0', isOpen ? '' : 'overflow-hidden'), children: jsx("div", { className: "bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]", children: options.map(renderOption(handleChange, isOpen, isSelected)) }) })) : null] })] }));
727
787
  });
728
- const renderOptionsStyle = (isOpen) => (isOpen ? '' : 'overflow-hidden');
729
- const renderOption = (choiceOption, isOpen, isSelected) => (option, i) => {
730
- return (jsxs("div", { onClick: () => {
731
- choiceOption(option);
732
- }, className: "flex px-4 py-3 cursor-pointer hover:bg-main-divider pr-11 relative", children: [jsx("span", { className: "min-h-6", children: option.text }), jsx(Icon, { name: "DoneSimpleIcon", width: "16", height: "16", className: ['absolute right-4 pt-0.5', isSelected(option) && isOpen ? '' : 'hidden'].join(' ') })] }, String(i)));
733
- };
734
- const getBorderStyle = (isBorder, valid) => `
735
- ${isBorder ? 'border rounded-md hover:border-primary-hover' : ''} ${valid ? ' border-gray' : 'border-error'} `;
788
+ const renderOption = (handleChange, isOpen, isSelected) => (option, i) => (jsxs("div", { onClick: () => {
789
+ handleChange(option);
790
+ }, className: "flex px-4 py-3 cursor-pointer hover:bg-main-divider pr-11 relative", children: [jsx("span", { className: "min-h-6", children: formatOption(option) }), jsx(Icon, { name: "DoneSimpleIcon", width: "16", height: "16", className: style('absolute right-4 pt-0.5', isSelected(option) && isOpen ? '' : 'hidden') })] }, String(i)));
791
+ const formatOption = (_) => _?.text || _?.key || '';
792
+ const getBorderStyle = (isBorder, valid) => style(isBorder ? 'border rounded-md hover:border-primary-hover' : '', valid ? ' border-gray' : 'border-error');
736
793
 
737
- const SelectControl = JSX(({ data, fieldLabel, fieldValue, selected, placeholder = '', setSelected, label, error, onValidate, }) => {
738
- const dataFormat = data
739
- .filter(Boolean)
740
- .map((_) => ({ key: _?.[fieldValue || fieldLabel], text: _?.[fieldLabel] }));
741
- const selectedObj = dataFormat.find((_) => _.key === selected);
742
- return (jsxs("div", { children: [jsx(Select, { options: dataFormat, label: label, valid: Boolean(!error), placeholder: placeholder || selected, onChange: (_) => setSelected(_.key), value: selectedObj, onValidate: onValidate }), jsx("div", { className: "h-2", children: jsx(Text, { size: "text-xs-light", color: "text-error", children: error ? error : null }) })] }));
743
- });
794
+ const SelectControl = JSX((props) => (jsxs("div", { children: [jsx(Select, { ...props, valid: !props.error }), jsx("div", { className: "h-2", children: props.error ? (jsx(Text, { size: "text-xs-light", color: "text-error", children: props.error })) : null })] })));
744
795
 
745
- const renderAcquiringRegion = ({ acquiringType, regions, region, handleChange, errors, handleChangeErrors, }) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsx("div", { className: "w-1/2", children: jsx(SelectControl, { data: ACQUIRING_TYPES, fieldValue: "name", fieldLabel: "name", error: errors['acquiringType'], selected: acquiringType, setSelected: (value) => handleChange({ acquiringType: value }), onValidate: (value) => handleChangeErrors({ acquiringType: validate('acquiringType', value) }), label: "\u0412\u0438\u0434 \u044D\u043A\u0432\u0430\u0439\u0440\u0438\u043D\u0433\u0430", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u044D\u043A\u0432\u0430\u0439\u0440\u0438\u043D\u0433" }) }), jsx("div", { className: "w-1/2", children: jsx(SelectControl, { data: regions, fieldValue: "code", fieldLabel: "name", error: errors['region'], selected: region, setSelected: (value) => handleChange({ region: value }), onValidate: (value) => handleChangeErrors({ region: validate('region', value) }), label: "\u0410\u0434\u0440\u0435\u0441", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441" }) })] }));
796
+ const renderAcquiringRegion = ({ regions, field }) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsx("div", { className: "w-1/2", children: jsx(SelectControl, { label: "\u0412\u0438\u0434 \u044D\u043A\u0432\u0430\u0439\u0440\u0438\u043D\u0433\u0430", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u044D\u043A\u0432\u0430\u0439\u0440\u0438\u043D\u0433", options: ACQUIRING_TYPES.map(({ name: key = '' }) => ({ key, text: key })), ...withValidator(field('acquiringType'), defaultValidator) }) }), jsx("div", { className: "w-1/2", children: jsx(SelectControl, { label: "\u0410\u0434\u0440\u0435\u0441", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441", options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), defaultValidator) }) })] }));
746
797
 
747
- const SlideCheckbox = JSX(({ value = false, text, type = 'checkbox', onChange }) => (jsxs("div", { role: type, "aria-checked": value, className: "flex justify-start items-center w-full cursor-pointer mb-4", onClick: () => onChange && onChange(!value), children: [jsx("div", { className: `relative flex-shrink-0 duration-300 w-9 h-5 mr-3 rounded-2xl ${value ? 'bg-primary-main' : 'bg-main-divider'}`, children: jsx("div", { className: `absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full ${value ? 'left-[50%]' : 'left-[5%]'}` }) }), jsx("div", { children: jsx(Text, { size: "text-m", font: "font-light", color: "text-primary-text", children: text }) })] })));
798
+ const SlideCheckbox = JSX(({ value = false, text, type = 'checkbox', onChange }) => (jsxs("div", { role: type, "aria-checked": value, className: "flex justify-start items-center w-full cursor-pointer mb-3", onClick: () => onChange && onChange(!value), children: [jsx("div", { className: style('relative flex-shrink-0 duration-300 w-9 h-5 mr-3 rounded-2xl', value ? 'bg-primary-main' : 'bg-main-divider'), children: jsx("div", { className: style('absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full', value ? 'left-[50%]' : 'left-[5%]') }) }), jsx(Text, { size: "text-l", font: "font-light", color: "text-primary-text", children: text })] })));
748
799
 
749
- const renderSlideCheckboxes = ({ onlineСheckout, posTerminal, handleChange, }) => (jsxs("div", { className: "mb-5", children: [jsx(SlideCheckbox, { value: onlineСheckout, text: "\u0425\u043E\u0447\u0443 \u043A\u0443\u043F\u0438\u0442\u044C \u043E\u043D\u043B\u0430\u0439\u043D-\u043A\u0430\u0441\u0441\u0443", onChange: () => handleChange({ onlineСheckout: !onlineСheckout }) }), jsx(SlideCheckbox, { value: posTerminal, text: "\u0425\u043E\u0447\u0443 \u043A\u0443\u043F\u0438\u0442\u044C POS-\u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B", onChange: () => handleChange({ posTerminal: !posTerminal }) })] }));
800
+ const renderSlideCheckboxes = (field) => (jsxs("div", { className: "mb-5", children: [jsx(SlideCheckbox, { text: "\u0425\u043E\u0447\u0443 \u043A\u0443\u043F\u0438\u0442\u044C \u043E\u043D\u043B\u0430\u0439\u043D-\u043A\u0430\u0441\u0441\u0443", ...field('onlineCheckout') }), jsx(SlideCheckbox, { text: "\u0425\u043E\u0447\u0443 \u043A\u0443\u043F\u0438\u0442\u044C POS-\u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B", ...field('posTerminal') })] }));
750
801
 
751
802
  const renderSubmitButton = (button, className) => {
752
803
  const buttonStyle = getRegularButtonClasses({
753
804
  className: 'text-white',
754
805
  version: button?.version,
755
806
  });
756
- return (jsx("button", { type: "submit", className: `p-4 ${buttonStyle} ${className}`, children: button?.text ? button.text : 'Отправить заявку' }));
757
- };
758
-
759
- const useForm$1 = ({ initialFormState, errorsInitialState, handleSubmit, }) => {
760
- const [formState, setFormState] = useState(initialFormState);
761
- const [errors, setErrors] = useState(errorsInitialState || {});
762
- const handleChange = useCallback((state) => setFormState((oldState) => ({ ...oldState, ...state })), []);
763
- const handleChangeErrors = useCallback((state) => setErrors((oldState) => ({ ...oldState, ...state })), []);
764
- const sendForm = useCallback(async (sendData) => {
765
- const errorsTemp = [];
766
- const validateData = Object.keys(formState)
767
- .filter((_) => Object.keys(errors).includes(_))
768
- .reduce((obj, key) => {
769
- obj[key] = formState[key];
770
- return obj;
771
- }, {});
772
- for (const [key, value] of Object.entries(validateData)) {
773
- const error = validate(key, value);
774
- errorsTemp.push(error);
775
- handleChangeErrors({ [key]: error });
776
- }
777
- if (errorsTemp.some((_) => _.length !== 0)) {
778
- return;
779
- }
780
- handleSubmit && (await handleSubmit(sendData));
781
- }, [formState]);
782
- return {
783
- formState,
784
- handleChange,
785
- errors,
786
- handleChangeErrors,
787
- sendForm,
788
- };
807
+ return (jsx("button", { type: "submit", className: style('p-4', buttonStyle, className), children: button?.text ? button.text : 'Отправить заявку' }));
789
808
  };
790
809
 
791
810
  const initialFormState$4 = {
792
- acquiringType: 'Торговый эквайринг',
793
- region: '',
811
+ acquiringType: { key: 'Торговый эквайринг' },
794
812
  fullName: '',
795
813
  inn: '',
796
814
  name: '',
797
815
  phone: '',
798
- onlineСheckout: false,
816
+ onlineCheckout: false,
799
817
  posTerminal: false,
800
818
  };
801
- const errorsInitialState$2 = {
802
- acquiringType: '',
803
- region: '',
804
- fullName: '',
805
- inn: '',
806
- name: '',
807
- phone: '',
808
- };
819
+ const acquiringValidator = objectValidator({
820
+ acquiringType: defaultValidator,
821
+ region: defaultValidator,
822
+ fullName: defaultValidator,
823
+ inn: innValidator,
824
+ name: nameValidator,
825
+ phone: phoneValidator,
826
+ });
809
827
  const ApplicationFormAcquiring = JSX((props) => {
810
- const { button, link, handleSubmit } = props;
811
- const { formState, errors, handleChange, handleChangeErrors, sendForm } = useForm$1({
812
- initialFormState: initialFormState$4,
813
- errorsInitialState: errorsInitialState$2,
814
- handleSubmit,
815
- });
816
- const { acquiringType, region, fullName, inn, name, phone, onlineСheckout, posTerminal } = formState;
817
- const regions = useGetRegions();
818
- const onSubmit = (e) => {
819
- e.preventDefault();
820
- sendForm({
821
- typeForm: 'acqr',
822
- region: regions.find((_) => _.code === region)?.name || '',
823
- partnerComments: `Вид эквайринга=${acquiringType}/Онлайн касса=${onlineСheckout}/POS-терминал=${posTerminal}`,
824
- fullName,
825
- inn,
826
- name,
827
- phone,
828
- });
829
- };
830
- return (jsxs("form", { onSubmit: onSubmit, className: "container", children: [jsx(Heading, { headingType: "h6", title: "\u0412\u0438\u0434 \u044D\u043A\u0432\u0430\u0439\u0440\u0438\u043D\u0433\u0430 \u0438 \u0440\u0435\u0433\u0438\u043E\u043D", className: "text-center mb-4" }), renderAcquiringRegion({
831
- acquiringType,
832
- regions,
833
- region,
834
- handleChange,
835
- errors,
836
- handleChangeErrors,
837
- }), jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "text-center mb-4" }), renderAcquiringDataOrganization({
828
+ const { button, link, onSubmit } = props;
829
+ const handleSubmit = useCallback((formState) => {
830
+ const { acquiringType, region, fullName, inn, name, phone, onlineCheckout, posTerminal } = formState;
831
+ isValidationSuccess(acquiringValidator(formState)) &&
832
+ onSubmit({
833
+ typeForm: 'acqr',
834
+ region: region?.text || '',
835
+ partnerComments: `Вид эквайринга=${acquiringType?.key || ''}/Онлайн касса=${onlineCheckout}/POS-терминал=${posTerminal}`,
838
836
  fullName,
839
837
  inn,
840
838
  name,
841
839
  phone,
842
- handleChange,
843
- errors,
844
- handleChangeErrors,
845
- }), renderSlideCheckboxes({
846
- onlineСheckout,
847
- posTerminal,
848
- handleChange,
849
- }), renderSubmitButton(button, 'mb-4'), jsx(Footnote, { link: link })] }));
840
+ });
841
+ }, [onSubmit]);
842
+ const [, { field, ...formProps }] = useForm(initialFormState$4, handleSubmit);
843
+ const regions = useGetRegions();
844
+ return (jsxs("form", { className: "container", onSubmit: formProps.onSubmit, children: [jsx(Heading, { headingType: "h6", title: "\u0412\u0438\u0434 \u044D\u043A\u0432\u0430\u0439\u0440\u0438\u043D\u0433\u0430 \u0438 \u0440\u0435\u0433\u0438\u043E\u043D", className: "text-center mb-4" }), renderAcquiringRegion({ regions, field }), jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "text-center mb-4" }), renderAcquiringDataOrganization(field), renderSlideCheckboxes(field), renderSubmitButton(button, 'mb-4'), jsx(Footnote, { link: link })] }));
850
845
  });
851
846
 
852
- const renderBusinessCardDataOrganization = ({ name, phone, mail, inn, handleChange, errors, handleChangeErrors, }) => (jsxs("div", { className: "flex justify-between gap-5", children: [jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", error: errors['name'], value: name, onChange: (value) => handleChange({ name: value }), onBlur: (value) => handleChangeErrors({ name: validate('name', value) }) }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0418\u041D\u041D", error: errors['inn'], value: inn, onChange: (value) => handleChange({ inn: value }), onBlur: (value) => handleChangeErrors({ inn: validate('inn', value) }) })] }), jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", error: errors['phone'], value: phone, onChange: (value) => handleChange({ phone: value }), onBlur: (value) => handleChangeErrors({ phone: validate('phone', value) }) }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", error: errors['mail'], value: mail, onChange: (value) => handleChange({ mail: value }), onBlur: (value) => handleChangeErrors({ mail: validate('mail', value) }) })] })] }));
847
+ const renderBusinessCardDataOrganization = (field) => (jsxs("div", { className: "flex justify-between gap-5", children: [jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) })] }), jsxs("div", { className: "w-1/2", children: [jsx(PhoneInputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('mail'), defaultValidator) })] })] }));
853
848
 
854
- const renderRegion$1 = ({ regions, region, handleChange, errors, handleChangeErrors, }) => (jsx("div", { className: "flex justify-between gap-5 mb-5", children: jsx("div", { className: "w-full", children: jsx(SelectControl, { data: regions, fieldValue: "code", fieldLabel: "name", error: errors['region'], selected: region, setSelected: (value) => handleChange({ region: value }), onValidate: (value) => handleChangeErrors({ region: validate('region', value) }), label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D" }) }) }));
849
+ const renderRegion$1 = ({ regions, field }) => (jsx("div", { className: "flex justify-between gap-5 mb-5", children: jsx("div", { className: "w-full", children: jsx(SelectControl, { label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), defaultValidator) }) }) }));
855
850
 
856
851
  const initialFormState$3 = {
857
- region: '',
858
852
  name: '',
859
853
  phone: '',
860
854
  inn: '',
861
855
  mail: '',
862
856
  };
857
+ const businessCardValidator = objectValidator({
858
+ region: defaultValidator,
859
+ name: nameValidator,
860
+ phone: phoneValidator,
861
+ inn: innValidator,
862
+ mail: defaultValidator,
863
+ });
863
864
  const ApplicationFormBusinessCard = JSX((props) => {
864
- const { button, link, handleSubmit } = props;
865
- const { formState, errors, handleChange, handleChangeErrors, sendForm } = useForm$1({
866
- initialFormState: initialFormState$3,
867
- errorsInitialState: initialFormState$3,
868
- handleSubmit,
869
- });
870
- const { region, name, phone, inn, mail } = formState;
871
- const regions = useGetRegions();
872
- const onSubmit = (e) => {
873
- e.preventDefault();
874
- sendForm({
875
- typeForm: 'bcrd',
876
- region: regions.find((_) => _.code === region)?.name || '',
877
- name,
878
- phone,
879
- inn,
880
- mail,
881
- });
882
- };
883
- return (jsxs("form", { onSubmit: onSubmit, className: "container", children: [renderRegion$1({
884
- regions,
885
- region,
886
- handleChange,
887
- errors,
888
- handleChangeErrors,
889
- }), renderBusinessCardDataOrganization({
865
+ const { button, link, onSubmit } = props;
866
+ const handleSubmit = useCallback((formState) => {
867
+ const { region, name, phone, inn, mail } = formState;
868
+ isValidationSuccess(businessCardValidator(formState)) &&
869
+ onSubmit({
870
+ typeForm: 'bcrd',
871
+ region: region?.text || '',
890
872
  name,
891
873
  phone,
892
874
  inn,
893
875
  mail,
894
- handleChange,
895
- errors,
896
- handleChangeErrors,
897
- }), renderSubmitButton(button, 'mb-4'), jsx(Footnote, { link: link })] }));
876
+ });
877
+ }, [onSubmit]);
878
+ const [, { field, ...formProps }] = useForm(initialFormState$3, handleSubmit);
879
+ const regions = useGetRegions();
880
+ return (jsxs("form", { className: "container", onSubmit: formProps.onSubmit, children: [renderRegion$1({ regions, field }), renderBusinessCardDataOrganization(field), renderSubmitButton(button, 'mb-4'), jsx(Footnote, { link: link })] }));
898
881
  });
899
882
 
900
883
  const BRANCHES_URL = '/api/v1/branches';
@@ -908,14 +891,14 @@
908
891
  return result || EMPTY_VALUE$1;
909
892
  };
910
893
 
911
- const MIN_CREDIT_AMOUNT = 50000;
912
- const MAX_CREDIT_AMOUNT = 3000000;
913
- const ITEMS_CREDIT_AMOUNT = ['От 50 000 ₽', 'До 3 000 000 ₽'];
894
+ const MIN_CREDIT_AMOUNT = 1000;
895
+ const MAX_CREDIT_AMOUNT = 1000000000;
896
+ const ITEMS_CREDIT_AMOUNT = ['От 1 000 ₽', 'До 1 000 000 000 ₽'];
914
897
  const MIN_CREDIT_TERM = 1;
915
- const MAX_CREDIT_TERM = 60;
916
- const ITEMS_CREDIT_TERM = ['От 1 года', 'До 5 лет'];
898
+ const MAX_CREDIT_TERM = 180;
899
+ const ITEMS_CREDIT_TERM = ['От 1 мес', 'До 15 лет'];
917
900
 
918
- const renderCreditDataOrganization = ({ fullName, inn, name, phone, mail, annualRevenue, handleChange, errors, handleChangeErrors, }) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", value: fullName, onChange: (value) => handleChange({ fullName: value }) }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0418\u041D\u041D", error: errors['inn'], value: inn, onChange: (value) => handleChange({ inn: value }), onBlur: (value) => handleChangeErrors({ inn: validate('inn', value) }) }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", error: errors['phone'], value: phone, onChange: (value) => handleChange({ phone: value }), onBlur: (value) => handleChangeErrors({ phone: validate('phone', value) }) })] }), jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0413\u043E\u0434\u043E\u0432\u0430\u044F \u0432\u044B\u0440\u0443\u0447\u043A\u0430, \u20BD", error: errors['annualRevenue'], value: annualRevenue, onChange: (value) => handleChange({ annualRevenue: value }), onBlur: (value) => handleChangeErrors({ annualRevenue: validate('annualRevenue', value) }) }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", error: errors['name'], value: name, onChange: (value) => handleChange({ name: value }), onBlur: (value) => handleChangeErrors({ name: validate('name', value) }) }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", value: mail, onChange: (value) => handleChange({ mail: value }) })] })] }));
901
+ const renderCreditDataOrganization = (field) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...field('fullName') }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) }), jsx(PhoneInputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] }), jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0413\u043E\u0434\u043E\u0432\u0430\u044F \u0432\u044B\u0440\u0443\u0447\u043A\u0430, \u20BD", ...withValidator(field('annualRevenue'), defaultValidator) }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...field('mail') })] })] }));
919
902
 
920
903
  const addSpacesBetweenNumbers = (number) => new Intl.NumberFormat('ru-RU', {}).format(number);
921
904
 
@@ -941,25 +924,12 @@
941
924
  return (jsx("div", { className: "flex justify-between my-2", children: items.map((item, i) => (jsx("span", { className: "text-s-light text-secondary-text", children: item }, String(i)))) }));
942
925
  }
943
926
 
944
- const renderInputRange = (props) => (jsxs("div", { className: "w-1/2", children: [jsx("label", { children: jsx(Text, { size: "text-m-light", children: props.label }) }), jsx(InputRange, { ...props })] }));
945
-
946
- const renderCreditParameters = ({ amount, term, handleChange, }) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [renderInputRange({
947
- label: 'Сумма кредита, ₽',
948
- value: amount,
949
- onChange: (value) => handleChange({ amount: value }),
950
- min: MIN_CREDIT_AMOUNT,
951
- max: MAX_CREDIT_AMOUNT,
952
- items: ITEMS_CREDIT_AMOUNT,
953
- }), renderInputRange({
954
- label: 'Срок кредита, месяцев',
955
- value: term,
956
- onChange: (value) => handleChange({ term: value }),
957
- min: MIN_CREDIT_TERM,
958
- max: MAX_CREDIT_TERM,
959
- items: ITEMS_CREDIT_TERM,
960
- })] }));
961
-
962
- const renderRegionDepartment = ({ regions, region, branches, department, handleChange, errors, handleChangeErrors, }) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsx("div", { className: "w-1/2", children: jsx(SelectControl, { data: regions, fieldValue: "code", fieldLabel: "name", error: errors['region'], selected: region, setSelected: (value) => handleChange({ region: value, department: '' }), onValidate: (value) => handleChangeErrors({ region: validate('region', value) }), label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D" }) }), jsx("div", { className: "w-1/2", children: jsx(SelectControl, { data: branches, fieldValue: "branchCode", fieldLabel: "address", error: errors['department'], selected: department, setSelected: (value) => handleChange({ department: value }), onValidate: (value) => handleChangeErrors({ department: validate('department', value) }), label: "\u0410\u0434\u0440\u0435\u0441", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441" }) })] }));
927
+ const renderCreditParameters = (field) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsxs("div", { className: "w-1/2", children: [jsx("label", { children: jsx(Text, { size: "text-m-light", children: "\u0421\u0443\u043C\u043C\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u0430, \u20BD" }) }), jsx(InputRange, { items: ITEMS_CREDIT_AMOUNT, min: MIN_CREDIT_AMOUNT, max: MAX_CREDIT_AMOUNT, ...field('amount') })] }), jsxs("div", { className: "w-1/2", children: [jsx("label", { children: jsx(Text, { size: "text-m-light", children: "\u0421\u0440\u043E\u043A \u043A\u0440\u0435\u0434\u0438\u0442\u0430, \u043C\u0435\u0441\u044F\u0446\u0435\u0432" }) }), jsx(InputRange, { items: ITEMS_CREDIT_TERM, min: MIN_CREDIT_TERM, max: MAX_CREDIT_TERM, ...field('term') })] })] }));
928
+
929
+ const renderRegionDepartment = ({ regions, branches, field }) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsx("div", { className: "w-1/2", children: jsx(SelectControl, { label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), defaultValidator) }) }), jsx("div", { className: "w-1/2", children: jsx(SelectControl, { label: "\u0410\u0434\u0440\u0435\u0441", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441", options: branches.map(({ branchCode = '', address = '' }) => ({
930
+ key: branchCode,
931
+ text: address,
932
+ })), ...withValidator(field('department'), defaultValidator) }) })] }));
963
933
 
964
934
  const initialFormState$2 = {
965
935
  amount: MIN_CREDIT_AMOUNT,
@@ -969,91 +939,60 @@
969
939
  name: '',
970
940
  phone: '',
971
941
  mail: '',
972
- region: '',
973
- department: '',
974
942
  annualRevenue: '',
975
943
  };
976
- const errorsInitialState$1 = {
977
- annualRevenue: '',
978
- inn: '',
979
- name: '',
980
- phone: '',
981
- region: '',
982
- department: '',
983
- };
984
- const ApplicationFormCredit = JSX(({ button, link, handleSubmit }) => {
985
- const regions = useGetRegions();
986
- const { formState, errors, handleChange, handleChangeErrors, sendForm } = useForm$1({
987
- initialFormState: initialFormState$2,
988
- errorsInitialState: errorsInitialState$1,
989
- handleSubmit,
990
- });
991
- const { amount, term, fullName, inn, name, phone, mail, region, department, annualRevenue } = formState;
992
- const branches = useBranches(region).filter((branch) => branch.address);
993
- const onSubmit = (e) => {
994
- e.preventDefault();
995
- sendForm({
996
- typeForm: 'cred',
997
- fullName,
998
- inn,
999
- name,
1000
- phone,
1001
- mail,
1002
- region: regions.find((_) => _.code === region)?.name || '',
1003
- department: branches.find((_) => _.branchCode === department)?.address || '',
1004
- partnerComments: `Сумма=${amount}/Срок=${term}/Выручка=${annualRevenue}`,
1005
- });
1006
- };
1007
- return (jsxs("form", { onSubmit: onSubmit, className: "container", children: [jsx(Heading, { headingType: "h6", title: "\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u043A\u0440\u0435\u0434\u0438\u0442\u0430", className: "text-center mb-4" }), renderCreditParameters({ amount, term, handleChange }), jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "text-center mb-4" }), renderCreditDataOrganization({
944
+ const creditValidator = objectValidator({
945
+ annualRevenue: defaultValidator,
946
+ inn: innValidator,
947
+ name: nameValidator,
948
+ phone: phoneValidator,
949
+ region: defaultValidator,
950
+ department: defaultValidator,
951
+ });
952
+ const ApplicationFormCredit = JSX(({ button, link, onSubmit }) => {
953
+ const handleSubmit = useCallback((formState) => {
954
+ const { amount, term, fullName, inn, name, phone, mail, region, department, annualRevenue } = formState;
955
+ isValidationSuccess(creditValidator(formState)) &&
956
+ onSubmit({
957
+ typeForm: 'cred',
1008
958
  fullName,
1009
959
  inn,
1010
960
  name,
1011
961
  phone,
1012
962
  mail,
1013
- annualRevenue,
1014
- handleChange,
1015
- errors,
1016
- handleChangeErrors,
1017
- }), jsx(Heading, { headingType: "h6", title: "\u041E\u0444\u0438\u0441 \u0431\u0430\u043D\u043A\u0430", className: "text-center mb-4" }), renderRegionDepartment({
1018
- regions,
1019
- region,
1020
- branches,
1021
- department,
1022
- handleChange,
1023
- errors,
1024
- handleChangeErrors,
1025
- }), renderSubmitButton(button, 'mb-4'), jsx(Footnote, { link: link })] }));
963
+ region: region?.text || '',
964
+ department: department?.text || '',
965
+ partnerComments: `Сумма=${amount}/Срок=${term}/Выручка=${annualRevenue}`,
966
+ });
967
+ }, [onSubmit]);
968
+ const [formState, { field, ...formProps }] = useForm(initialFormState$2, handleSubmit);
969
+ const regions = useGetRegions();
970
+ const branches = useBranches(formState.region?.key).filter((branch) => branch?.address);
971
+ return (jsxs("form", { className: "container", onSubmit: formProps.onSubmit, children: [jsx(Heading, { headingType: "h6", title: "\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u043A\u0440\u0435\u0434\u0438\u0442\u0430", className: "text-center mb-4" }), renderCreditParameters(field), jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "text-center mb-4" }), renderCreditDataOrganization(field), jsx(Heading, { headingType: "h6", title: "\u041E\u0444\u0438\u0441 \u0431\u0430\u043D\u043A\u0430", className: "text-center mb-4" }), renderRegionDepartment({ regions, branches, field }), renderSubmitButton(button, 'mb-4'), jsx(Footnote, { link: link })] }));
1026
972
  });
1027
973
 
1028
974
  const initialFormState$1 = {
1029
975
  name: '',
1030
976
  phone: '',
1031
977
  };
978
+ const depositValidator = objectValidator({
979
+ name: nameValidator,
980
+ phone: phoneValidator,
981
+ });
1032
982
  const ApplicationFormDeposit = JSX((props) => {
1033
- const { button, link, handleSubmit } = props;
1034
- const { formState, errors, handleChange, handleChangeErrors, sendForm } = useForm$1({
1035
- initialFormState: initialFormState$1,
1036
- errorsInitialState: initialFormState$1,
1037
- handleSubmit,
1038
- });
1039
- const { name, phone } = formState;
1040
- const onSubmit = (e) => {
1041
- e.preventDefault();
1042
- sendForm({
1043
- typeForm: 'dpst',
1044
- name,
1045
- phone,
1046
- });
1047
- };
1048
- return (jsxs("form", { onSubmit: onSubmit, className: "container", children: [jsx(Heading, { headingType: "h6", title: "\u041E\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u0437\u0430\u044F\u0432\u043A\u0443 \u0438 \u043C\u044B \u043E\u0442\u0432\u0435\u0442\u0438\u043C \u043D\u0430 \u043B\u044E\u0431\u044B\u0435 \u0432\u043E\u043F\u0440\u043E\u0441\u044B \u043F\u043E \u0434\u0435\u043F\u043E\u0437\u0438\u0442\u0430\u043C", className: "text-center mb-4" }), renderDataOrganization({
983
+ const { button, link, onSubmit } = props;
984
+ const handleSubmit = useCallback((formState) => {
985
+ const { name, phone } = formState;
986
+ isValidationSuccess(depositValidator(formState)) &&
987
+ onSubmit({
988
+ typeForm: 'dpst',
1049
989
  name,
1050
990
  phone,
1051
- handleChange,
1052
- errors,
1053
- handleChangeErrors,
1054
- }), jsxs("div", { className: "flex justify-between items-center max-w-[560px] m-auto", children: [jsx("div", { className: "flex-1", children: jsx(Footnote, { link: link }) }), renderSubmitButton(button)] })] }));
991
+ });
992
+ }, [onSubmit]);
993
+ const [, { field, ...formProps }] = useForm(initialFormState$1, handleSubmit);
994
+ return (jsxs("form", { className: "container", onSubmit: formProps.onSubmit, children: [jsx(Heading, { headingType: "h6", title: "\u041E\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u0437\u0430\u044F\u0432\u043A\u0443 \u0438 \u043C\u044B \u043E\u0442\u0432\u0435\u0442\u0438\u043C \u043D\u0430 \u043B\u044E\u0431\u044B\u0435 \u0432\u043E\u043F\u0440\u043E\u0441\u044B \u043F\u043E \u0434\u0435\u043F\u043E\u0437\u0438\u0442\u0430\u043C", className: "text-center mb-4" }), jsxs("div", { className: "max-w-[560px] m-auto", children: [jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0418\u043C\u044F", ...withValidator(field('name'), nameValidator) }), jsx(PhoneInputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] }), jsxs("div", { className: "flex justify-between items-center max-w-[560px] m-auto", children: [jsx("div", { className: "flex-1", children: jsx(Footnote, { link: link }) }), renderSubmitButton(button)] })] }));
1055
995
  });
1056
- const renderDataOrganization = ({ name, phone, handleChange, errors, handleChangeErrors, }) => (jsxs("div", { className: "max-w-[560px] m-auto", children: [jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0418\u043C\u044F", error: errors['name'], value: name, onChange: (value) => handleChange({ name: value }), onBlur: (value) => handleChangeErrors({ name: validate('name', value) }) }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", error: errors['phone'], value: phone, onChange: (value) => handleChange({ phone: value }), onBlur: (value) => handleChangeErrors({ phone: validate('phone', value) }) })] }));
1057
996
 
1058
997
  const sourcesComparator = (a, b) => a?.media && b?.media ? a.media - b.media : 0;
1059
998
  const ImgAsPicture = JSX(({ className = '', image, imageClassName = '', isMobile = false, pathPrefix }) => {
@@ -1102,15 +1041,22 @@
1102
1041
  fill: 'white',
1103
1042
  },
1104
1043
  ];
1105
- const Checkbox = JSX(({ className, text, checked, disabled, isRadio, onChange }) => {
1106
- return (jsx("div", { className: className, children: jsxs("label", { className: "flex items-center relative cursor-pointer group/box", children: [jsx("input", { className: style('peer appearance-none w-5 h-5 border-solid cursor-pointer checked:border-primary-main m-0', isRadio
1107
- ? 'rounded-full border-2'
1108
- : 'rounded checked:bg-primary-main disabled:bg-main-disabled border', checked ? 'border-black' : 'border-gray', disabled ? '' : 'group-hover/box:border-primary-hover'), type: "checkbox", onChange: (e) => onChange && onChange(e.target.checked), checked: checked, disabled: disabled }), isRadio ? (jsx("div", { className: "left-1 w-3 h-3 rounded-full bg-primary-main hidden absolute peer-checked:block" })) : (jsx(SVG, { paths: CHECK_PATHS, className: "hidden absolute left-1 ml-px peer-checked:block", width: "11", height: "9", fill: "white", viewBox: "0 0 11 9" })), text ? jsx("span", { className: "font-sans ml-3 text-l-light", children: text }) : null] }) }));
1044
+ const Checkbox = JSX(({ className, value, text, disabled, isRadio, onChange }) => {
1045
+ const handleChange = useCallback((e) => {
1046
+ e.preventDefault();
1047
+ onChange && onChange(!value);
1048
+ }, [onChange, value]);
1049
+ const icon = isRadio ? (jsx("div", { className: "absolute left-1 w-3 h-3 rounded-full bg-primary-main" })) : (jsx(SVG, { paths: CHECK_PATHS, className: "absolute left-1 ml-px block", width: "11", height: "9", fill: "white", viewBox: "0 0 11 9" }));
1050
+ return (jsx("div", { className: className, children: jsxs("label", { className: "flex items-center relative cursor-pointer group/box", onClick: handleChange, children: [jsx("div", { className: style('appearance-none w-5 h-5 border-solid cursor-pointer m-0', isRadio ? 'rounded-full border-2' : checkboxStyle(value), value ? 'border-primary-main' : 'border-gray', disabled ? 'bg-main-disabled' : 'group-hover/box:border-primary-hover'), role: "checkbox", "aria-checked": Boolean(value), "aria-disabled": Boolean(disabled) }), value ? icon : null, text ? jsx("span", { className: "font-sans ml-3 text-l-light", children: text }) : null] }) }));
1109
1051
  });
1052
+ const checkboxStyle = (value) => style('rounded border', value ? 'bg-primary-main' : '');
1110
1053
 
1111
- const renderQuestionsInterested = ({ currencyControl, documentaryOperations, conversionOperations, text, handleChange, }) => (jsxs("div", { className: "mb-6", children: [jsxs("div", { className: "flex items-center mb-4 gap-6", children: [jsx(Checkbox, { text: "\u0412\u0430\u043B\u044E\u0442\u043D\u044B\u0439 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u044C", checked: currencyControl, onChange: (value) => handleChange({ currencyControl: value }) }), jsx(Checkbox, { text: "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0440\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", checked: documentaryOperations, onChange: (value) => handleChange({ documentaryOperations: value }) }), jsx(Checkbox, { text: "\u041A\u043E\u043D\u0432\u0435\u0440\u0441\u0438\u043E\u043D\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", checked: conversionOperations, onChange: (value) => handleChange({ conversionOperations: value }) })] }), jsx("textarea", { placeholder: "\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0438\u043D\u0442\u0435\u0440\u0435\u0441\u0443\u044E\u0449\u0438\u0439 \u0432\u0430\u0441 \u0432\u043E\u043F\u0440\u043E\u0441, \u043C\u0435\u0441\u0442\u043E \u0432\u0435\u0434\u0435\u043D\u0438\u044F \u0431\u0438\u0437\u043D\u0435\u0441\u0430 \u0438 \u0443\u0434\u043E\u0431\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F \u0434\u043B\u044F \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u043D\u043E\u0433\u043E \u0437\u0432\u043E\u043D\u043A\u0430", className: "block w-full resize-y min-h-24 p-4 outline-none border rounded-md border-main-stroke hover:border-primary-hover active:focus:border-primary-text", value: text, onChange: (e) => handleChange({ text: e.target.value }) })] }));
1054
+ const renderQuestionsInterested = (field) => {
1055
+ const textField = field('text');
1056
+ return (jsxs("div", { className: "mb-6", children: [jsxs("div", { className: "flex items-center mb-4 gap-6", children: [jsx(Checkbox, { text: "\u0412\u0430\u043B\u044E\u0442\u043D\u044B\u0439 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u044C", ...field('currencyControl') }), jsx(Checkbox, { text: "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0440\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", ...field('documentaryOperations') }), jsx(Checkbox, { text: "\u041A\u043E\u043D\u0432\u0435\u0440\u0441\u0438\u043E\u043D\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", ...field('conversionOperations') })] }), jsx("textarea", { placeholder: "\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0438\u043D\u0442\u0435\u0440\u0435\u0441\u0443\u044E\u0449\u0438\u0439 \u0432\u0430\u0441 \u0432\u043E\u043F\u0440\u043E\u0441, \u043C\u0435\u0441\u0442\u043E \u0432\u0435\u0434\u0435\u043D\u0438\u044F \u0431\u0438\u0437\u043D\u0435\u0441\u0430 \u0438 \u0443\u0434\u043E\u0431\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F \u0434\u043B\u044F \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u043D\u043E\u0433\u043E \u0437\u0432\u043E\u043D\u043A\u0430", className: "block w-full resize-y min-h-24 p-4 outline-none border rounded-md border-main-stroke hover:border-primary-hover active:focus:border-primary-text", value: textField.value, onInput: ((e) => textField.onChange && textField.onChange(e.target?.value || '')) })] }));
1057
+ };
1112
1058
 
1113
- const renderWedDataOrganization = ({ fullName, name, phone, mail, handleChange, errors, handleChangeErrors, }) => (jsxs("div", { children: [jsxs("div", { className: "flex justify-between gap-5", children: [jsx("div", { className: "w-1/2", children: jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", error: errors['fullName'], value: fullName, onChange: (value) => handleChange({ fullName: value }), onBlur: (value) => handleChangeErrors({ fullName: validate('fullName', value) }) }) }), jsx("div", { className: "w-1/2", children: jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0424\u0418\u041E", error: errors['name'], value: name, onChange: (value) => handleChange({ name: value }), onBlur: (value) => handleChangeErrors({ name: validate('name', value) }) }) })] }), jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsx("div", { className: "w-1/2", children: jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", error: errors['phone'], value: phone, onChange: (value) => handleChange({ phone: value }), onBlur: (value) => handleChangeErrors({ phone: validate('phone', value) }) }) }), jsx("div", { className: "w-1/2", children: jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", error: errors['mail'], value: mail, onChange: (value) => handleChange({ mail: value }), onBlur: (value) => handleChangeErrors({ mail: validate('mail', value) }) }) })] })] }));
1059
+ const renderWedDataOrganization = (field) => (jsxs("div", { children: [jsxs("div", { className: "flex justify-between gap-5", children: [jsx("div", { className: "w-1/2", children: jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...withValidator(field('fullName'), defaultValidator) }) }), jsx("div", { className: "w-1/2", children: jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0424\u0418\u041E", ...withValidator(field('name'), nameValidator) }) })] }), jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsx("div", { className: "w-1/2", children: jsx(PhoneInputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }) }), jsx("div", { className: "w-1/2", children: jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('mail'), defaultValidator) }) })] })] }));
1114
1060
 
1115
1061
  const initialFormState = {
1116
1062
  fullName: '',
@@ -1122,53 +1068,34 @@
1122
1068
  conversionOperations: false,
1123
1069
  text: '',
1124
1070
  };
1125
- const errorsInitialState = {
1126
- fullName: '',
1127
- name: '',
1128
- phone: '',
1129
- mail: '',
1130
- text: '',
1131
- };
1071
+ const webValidator = objectValidator({
1072
+ fullName: defaultValidator,
1073
+ name: nameValidator,
1074
+ phone: phoneValidator,
1075
+ mail: defaultValidator,
1076
+ });
1132
1077
  const ApplicationFormWed = JSX((props) => {
1133
- const { button, link, handleSubmit } = props;
1134
- const { formState, errors, handleChange, handleChangeErrors, sendForm } = useForm$1({
1135
- initialFormState,
1136
- errorsInitialState,
1137
- handleSubmit,
1138
- });
1139
- const { fullName, name, phone, mail, currencyControl, documentaryOperations, conversionOperations, text, } = formState;
1140
- const onSubmit = (e) => {
1141
- e.preventDefault();
1142
- sendForm({
1143
- typeForm: 'kved',
1144
- fullName,
1145
- name,
1146
- phone,
1147
- mail,
1148
- partnerComments: `Валютный контроль=${currencyControl}/Документарные операции=${documentaryOperations}/Конверсионные операции=${conversionOperations}/Доп инф=${text}`,
1149
- });
1150
- };
1151
- return (jsxs("form", { onSubmit: onSubmit, className: "container", children: [jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "text-center mb-4" }), renderWedDataOrganization({
1078
+ const { button, link, onSubmit } = props;
1079
+ const handleSubmit = useCallback((formState) => {
1080
+ const { fullName, name, phone, mail, currencyControl, documentaryOperations, conversionOperations, text, } = formState;
1081
+ isValidationSuccess(webValidator(formState)) &&
1082
+ onSubmit({
1083
+ typeForm: 'kved',
1152
1084
  fullName,
1153
1085
  name,
1154
1086
  phone,
1155
1087
  mail,
1156
- handleChange,
1157
- errors,
1158
- handleChangeErrors,
1159
- }), jsx(Heading, { headingType: "h6", title: "\u0418\u043D\u0442\u0435\u0440\u0435\u0441\u0443\u044E\u0449\u0438\u0439 \u0432\u043E\u043F\u0440\u043E\u0441", className: "text-center mb-4" }), renderQuestionsInterested({
1160
- currencyControl,
1161
- documentaryOperations,
1162
- conversionOperations,
1163
- text,
1164
- handleChange,
1165
- }), jsxs("div", { className: "flex items-center pb-9 mb-9 border-b border-main-divider", children: [renderSubmitButton(button, 'mr-5'), jsx(Footnote, { link: link })] }), jsx(Heading, { headingType: "h6", title: "\u0418\u043B\u0438 \u0441\u0432\u044F\u0436\u0438\u0442\u0435\u0441\u044C \u0441 \u043D\u0430\u043C\u0438 \u0443\u0434\u043E\u0431\u043D\u044B\u043C \u0441\u043F\u043E\u0441\u043E\u0431\u043E\u043C", className: "text-center mb-4" }), renderContacts()] }));
1088
+ partnerComments: `Валютный контроль=${currencyControl}/Документарные операции=${documentaryOperations}/Конверсионные операции=${conversionOperations}/Доп инф=${text}`,
1089
+ });
1090
+ }, [onSubmit]);
1091
+ const [, { field, ...formProps }] = useForm(initialFormState, handleSubmit);
1092
+ return (jsxs("form", { className: "container", onSubmit: formProps.onSubmit, children: [jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "text-center mb-4" }), renderWedDataOrganization(field), jsx(Heading, { headingType: "h6", title: "\u0418\u043D\u0442\u0435\u0440\u0435\u0441\u0443\u044E\u0449\u0438\u0439 \u0432\u043E\u043F\u0440\u043E\u0441", className: "text-center mb-4" }), renderQuestionsInterested(field), jsxs("div", { className: "flex items-center pb-9 mb-9 border-b border-main-divider", children: [renderSubmitButton(button, 'mr-5'), jsx(Footnote, { link: link })] }), jsx(Heading, { headingType: "h6", title: "\u0418\u043B\u0438 \u0441\u0432\u044F\u0436\u0438\u0442\u0435\u0441\u044C \u0441 \u043D\u0430\u043C\u0438 \u0443\u0434\u043E\u0431\u043D\u044B\u043C \u0441\u043F\u043E\u0441\u043E\u0431\u043E\u043C", className: "text-center mb-4" }), renderContacts()] }));
1166
1093
  });
1167
1094
 
1168
- const ResponseNotification = JSX(({ responceType }) => {
1169
- const responceOK = responceType === 'OK';
1170
- const backgroundColor = responceOK ? 'bg-responce-ok' : 'bg-responce-fail';
1171
- return (jsxs("div", { className: `flex items-center mt-5 p-5 rounded-md ${backgroundColor}`, children: [responceOK ? (jsx(ImgInner, { image: { icon: 'ResponceOKIcon' }, width: "42", height: "42", className: "mr-4" })) : (jsx(ImgInner, { image: { icon: 'ResponceFailIcon' }, width: "37", height: "34", className: "mr-4" })), jsxs("div", { children: [jsx(Heading, { headingType: "h6", title: responceOK ? 'Ваша заявка отправлена' : 'Не удалось отправить заявку', className: "mb-1" }), jsx(Text, { size: "text-l-light", color: "text-secondary-text", children: responceOK ? 'Совсем скоро мы с вами свяжемся' : 'Пожалуйста, повторите позднее' })] })] }));
1095
+ const ResponseNotification = JSX(({ responseType }) => {
1096
+ const responseOK = responseType === 'OK';
1097
+ const backgroundColor = responseOK ? 'bg-responce-ok' : 'bg-responce-fail';
1098
+ return (jsxs("div", { className: `flex items-center mt-5 p-5 rounded-md ${backgroundColor}`, children: [responseOK ? (jsx(ImgInner, { image: { icon: 'ResponceOKIcon' }, width: "42", height: "42", className: "mr-4" })) : (jsx(ImgInner, { image: { icon: 'ResponceFailIcon' }, width: "37", height: "34", className: "mr-4" })), jsxs("div", { children: [jsx(Heading, { headingType: "h6", title: responseOK ? 'Ваша заявка отправлена' : 'Не удалось отправить заявку', className: "mb-1" }), jsx(Text, { size: "text-l-light", color: "text-secondary-text", children: responseOK ? 'Совсем скоро мы с вами свяжемся' : 'Пожалуйста, повторите позднее' })] })] }));
1172
1099
  });
1173
1100
 
1174
1101
  const COMPONENTS_MAP = {
@@ -1180,17 +1107,17 @@
1180
1107
  };
1181
1108
  const API = CorporateLeadAPI();
1182
1109
  const ApplicationForm = JSX((props) => {
1183
- const { className = '', title, typeForm = 'credit', button, link, ...rest } = props;
1184
- const [responceType, setResponseType] = useState('');
1110
+ const { className, title, typeForm = 'credit', button, link, ...rest } = props;
1111
+ const [responseType, setResponseType] = useState('');
1185
1112
  const handleSubmit = useCallback(async (data) => {
1186
1113
  const status = (await API.send(data)) ? 'OK' : 'Fail';
1187
1114
  setResponseType(status);
1188
1115
  return status;
1189
1116
  }, []);
1190
- return (jsx(BlockWrapper, { className: `font-sans bg-white p-[50px] pb-9 ${className}`, ...rest, children: jsxs("div", { className: "container max-w-[978px]", children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "text-center mb-8" }) : null, COMPONENTS_MAP[typeForm]({ button, link, handleSubmit }), responceType ? jsx(ResponseNotification, { responceType: responceType }) : null] }) }));
1117
+ return (jsx(BlockWrapper, { className: style('font-sans bg-white p-12 pb-9', className), ...rest, children: jsxs("div", { className: "container max-w-[978px]", children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "text-center mb-8" }) : null, COMPONENTS_MAP[typeForm]({ button, link, onSubmit: handleSubmit }), responseType ? jsx(ResponseNotification, { responseType: responseType }) : null] }) }));
1191
1118
  });
1192
1119
 
1193
- const BenefitsBlock = JSX(({ className = '', title, benefitList, ...rest }) => (jsxs(BlockWrapper, { className: `p-12 flex flex-col items-center ${className}`, ...rest, children: [title ? (jsx(Heading, { headingType: "h3", as: "h2", className: "max-w-[47rem] text-center", title: title })) : null, benefitList?.length ? (jsx("div", { className: "flex flex-wrap w-full justify-center gap-x-20 mt-8", children: benefitList.map(renderStep$1) })) : null] })));
1120
+ const BenefitsBlock = JSX(({ className = '', title, benefitList, ...rest }) => (jsxs(BlockWrapper, { className: `p-default flex flex-col items-center ${className}`, ...rest, children: [title ? (jsx(Heading, { headingType: "h3", as: "h2", className: "max-w-[47rem] text-center", title: title })) : null, benefitList?.length ? (jsx("div", { className: "flex flex-wrap w-full justify-center gap-x-20 mt-8", children: benefitList.map(renderStep$1) })) : null] })));
1194
1121
  const renderStep$1 = (benefit, i) => {
1195
1122
  const description = benefit.description;
1196
1123
  return (jsxs("div", { className: "flex items-center basis-1/2 max-w-[500px] mb-14", children: [benefit?.icon?.icon ? (jsx(ImgInner, { className: "w-12 h-12 min-w-12 p-3 rounded-full bg-main-divider text-primary-main group-data-secondary:bg-white/30 group-data-secondary:text-black", image: benefit.icon })) : null, benefit?.icon?.src ? jsx(ImgInner, { image: benefit.icon }) : null, jsxs("div", { className: "ml-5 h-full", children: [benefit?.label ? jsx(Heading, { headingType: "h6", children: benefit.label }) : null, renderDescription$4(description)] })] }, String(i)));
@@ -1263,13 +1190,13 @@
1263
1190
 
1264
1191
  const Headline = JSX(({ className, title, description, headlineVersion = 'XL', align = 'text-center', as, isPadding = true, isTheme = false, version = '', ...rest }) => {
1265
1192
  const versionStyle = headlineVersionStyles[headlineVersion];
1266
- const paddingStyle = isPadding ? 'p-12' : '';
1193
+ const paddingStyle = isPadding ? 'p-default' : '';
1267
1194
  return (jsxs(BlockWrapper, { className: style('flex flex-col', paddingStyle, versionStyle.wrapper, className), version: version, isTheme: isTheme, ...rest, children: [title ? (jsx(Heading, { className: style('whitespace-pre-wrap', align), ...versionStyle?.title, as: as || versionStyle?.title.as, title: title })) : null, description ? (jsx(Paragraph, { size: versionStyle.descriptionSize, align: align, children: description })) : null] }));
1268
1195
  });
1269
1196
 
1270
1197
  const Bonus = JSX((props) => {
1271
1198
  const { className = '', title, description, bonusItems, ...rest } = props;
1272
- return (jsx(BlockWrapper, { className: `p-12 pb-9 ${className}`, ...rest, children: jsxs("div", { className: "container", children: [jsx(Headline, { className: "!p-0", title: title, description: description, headlineVersion: "M" }), jsx("div", { className: "flex flex-wrap w-full mt-9", children: bonusItems?.length
1199
+ return (jsx(BlockWrapper, { className: `p-default pb-9 ${className}`, ...rest, children: jsxs("div", { className: "container", children: [jsx(Headline, { className: "!p-0", title: title, description: description, headlineVersion: "M" }), jsx("div", { className: "flex flex-wrap w-full mt-9", children: bonusItems?.length
1273
1200
  ? bonusItems.map((_, i) => (jsxs("div", { className: "flex-grow w-[49%] border border-gray p-9 mb-3 mx-2 even:mr-0 odd:ml-0 last:odd:mx-0", children: [_?.title ? jsx(Text, { size: "text-h4", children: _.title }) : null, _?.description ? (jsx("div", { className: "mt-2", children: jsx(Paragraph, { size: "text-xl", font: "font-light", children: _.description }) })) : null, jsxs("div", { className: "flex justify-between items-end mt-3", children: [renderButtonsSection(_?.buttons), _.bonusItemContent?.bonusType
1274
1201
  ? renderBonusItemContent(_.bonusItemContent)
1275
1202
  : null] })] }, String(i))))
@@ -1287,7 +1214,7 @@
1287
1214
  right: 'text-right',
1288
1215
  };
1289
1216
 
1290
- const BonusBenefitsBlock = JSX(({ bonusBenefits, cardTextAlign = 'center', className = '', columnsCount = '4', subtitle, title, ...rest }) => (jsxs(BlockWrapper, { className: `font-sans text-primary-text bg-white p-12 flex flex-col text-center ${className}`, ...rest, children: [jsx(Headline, { className: "!p-0 mb-8", title: title, description: subtitle, headlineVersion: "M" }), bonusBenefits?.length ? (jsx("div", { className: `grid gap-1 ${AlignText[cardTextAlign]} ${getElementsColsValue(columnsCount)}`, children: bonusBenefits.map(renderBonusBenefit) })) : null] })));
1217
+ const BonusBenefitsBlock = JSX(({ bonusBenefits, cardTextAlign = 'center', className = '', columnsCount = '4', subtitle, title, ...rest }) => (jsxs(BlockWrapper, { className: `font-sans text-primary-text bg-white p-default flex flex-col text-center ${className}`, ...rest, children: [jsx(Headline, { className: "!p-0 mb-8", title: title, description: subtitle, headlineVersion: "M" }), bonusBenefits?.length ? (jsx("div", { className: `grid gap-1 ${AlignText[cardTextAlign]} ${getElementsColsValue(columnsCount)}`, children: bonusBenefits.map(renderBonusBenefit) })) : null] })));
1291
1218
  const renderBonusBenefit = ({ icon, title, description }, i) => {
1292
1219
  return (jsxs("div", { className: style('flex flex-col items-center text-h6', !description && !title ? 'justify-center' : ''), children: [title ? jsx("span", { children: title }) : null, icon ? jsx(ImgInner, { image: icon, height: "180", className: "w-auto" }) : null, description ? jsx("span", { children: description }) : null] }, String(i)));
1293
1220
  };
@@ -1313,7 +1240,7 @@
1313
1240
  return (jsxs("li", { className: "flex items-center gap-3.5 mb-3 last:mb-0", children: [icon?.icon ? (jsx(ImgInner, { image: icon, className: "w-12 h-12 min-w-12 p-3 rounded-full bg-main-divider" })) : null, icon?.src ? jsx(ImgInner, { image: icon }) : null, jsx("span", { className: "text-xl-light", children: text })] }, key));
1314
1241
  };
1315
1242
 
1316
- const BusinessBlock = JSX(({ className = '', title, cards, ...rest }) => (jsxs(BlockWrapper, { className: `p-12 pb-9 ${className}`, ...rest, children: [jsx(Heading, { headingType: "h3", title: title, className: "text-center mb-8" }), jsx("div", { className: "flex gap-5", children: cards?.length ? cards.map((_, i) => jsx(BusinessCard, { ..._ }, String(i))) : null })] })));
1243
+ const BusinessBlock = JSX(({ className = '', title, cards, ...rest }) => (jsxs(BlockWrapper, { className: `p-default pb-9 ${className}`, ...rest, children: [jsx(Heading, { headingType: "h3", title: title, className: "text-center mb-8" }), jsx("div", { className: "flex gap-5", children: cards?.length ? cards.map((_, i) => jsx(BusinessCard, { ..._ }, String(i))) : null })] })));
1317
1244
 
1318
1245
  const ButtonBlock = JSX(({ button, className, ...rest }) => (jsx(BlockWrapper, { className: style('!bg-transparent', className), ...rest, children: renderButtonsSection([button]) })));
1319
1246
 
@@ -1504,7 +1431,7 @@
1504
1431
  horizontal: 'gap-10',
1505
1432
  vertical: 'flex-col gap-3',
1506
1433
  };
1507
- const RadioButtonGroup = JSX(({ items, checkedItem, onChange: onChangeCheckedItem, orientation = 'horizontal' }) => (jsx("div", { className: `flex ${orientationStyleMap[orientation]}`, children: items?.map(({ id, text }) => (jsx(Checkbox, { isRadio: true, text: text, checked: checkedItem === id, onChange: () => onChangeCheckedItem && onChangeCheckedItem(id) }, String(id)))) })));
1434
+ const RadioButtonGroup = JSX(({ items, checkedItem, onChange: onChangeCheckedItem, orientation = 'horizontal' }) => (jsx("div", { className: `flex ${orientationStyleMap[orientation]}`, children: items?.map(({ id, text }) => (jsx(Checkbox, { isRadio: true, text: text, value: checkedItem === id, onChange: () => onChangeCheckedItem && onChangeCheckedItem(id) }, String(id)))) })));
1508
1435
 
1509
1436
  const EVERY_MONTH = 'everyMonth';
1510
1437
  const AT_END_TERM = 'atEndTerm';
@@ -1644,7 +1571,7 @@
1644
1571
  orientation: 'vertical',
1645
1572
  })] })] }), isShowUnknownRate ? (jsx(UnknownRate, {})) : (jsx(Rate, { rate: rate, depositeName: depositeName, isShowDepositeName: isShowDepositeName, rateBlockClassName: "tracking-[-25px]", unit: "%" })), jsxs("div", { className: "w-full max-w-[350px]", children: [jsx(CalculatorValueBlock, { title: "\u0414\u043E\u0445\u043E\u0434 \u043F\u043E \u0432\u043A\u043B\u0430\u0434\u0443", value: income, postfix: "\u20BD", prefix: "+" }), jsx(CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", value: finalSum, postfix: "\u20BD" }), renderButtonsSection(buttons, { className: 'mt-7', isVertical: true }), jsx("div", { className: "mt-7", children: renderFootnote(footnote) })] })] }), jsx("div", { className: "mt-5", children: renderFootnote(bottomFootnote) })] }));
1646
1573
  });
1647
- const renderBusinessDepositParamsForm = ({ isDisabledOperatingDeposit, isReplenished, isPartialWithdrawal, isSmallBusiness, handleIsReplenished, handleIsPartialWithdrawal, handleIsSmallBusiness, }) => (jsxs("div", { children: [jsx(Checkbox, { text: "\u041F\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435", disabled: isDisabledOperatingDeposit, checked: isReplenished, onChange: handleIsReplenished }), jsx(Checkbox, { className: "mt-3", disabled: isDisabledOperatingDeposit, text: "\u0427\u0430\u0441\u0442\u0438\u0447\u043D\u043E\u0435 \u0441\u043D\u044F\u0442\u0438\u0435", checked: isPartialWithdrawal, onChange: handleIsPartialWithdrawal }), jsx(Checkbox, { className: "mt-3", text: "\u042F\u0432\u043B\u044F\u044E\u0441\u044C \u043C\u0430\u043B\u044B\u043C \u043F\u0440\u0435\u0434\u043F\u0440\u0438\u044F\u0442\u0438\u0435\u043C", checked: isSmallBusiness, onChange: handleIsSmallBusiness })] }));
1574
+ const renderBusinessDepositParamsForm = ({ isDisabledOperatingDeposit, isReplenished, isPartialWithdrawal, isSmallBusiness, handleIsReplenished, handleIsPartialWithdrawal, handleIsSmallBusiness, }) => (jsxs("div", { children: [jsx(Checkbox, { text: "\u041F\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435", disabled: isDisabledOperatingDeposit, value: isReplenished, onChange: handleIsReplenished }), jsx(Checkbox, { className: "mt-3", disabled: isDisabledOperatingDeposit, text: "\u0427\u0430\u0441\u0442\u0438\u0447\u043D\u043E\u0435 \u0441\u043D\u044F\u0442\u0438\u0435", value: isPartialWithdrawal, onChange: handleIsPartialWithdrawal }), jsx(Checkbox, { className: "mt-3", text: "\u042F\u0432\u043B\u044F\u044E\u0441\u044C \u043C\u0430\u043B\u044B\u043C \u043F\u0440\u0435\u0434\u043F\u0440\u0438\u044F\u0442\u0438\u0435\u043C", value: isSmallBusiness, onChange: handleIsSmallBusiness })] }));
1648
1575
 
1649
1576
  const DISABLED_INPUT_CLASSES = 'disabled:border-gray disabled:bg-main-divider';
1650
1577
  const InputListRange = JSX(({ className, title, items = [], list = [], value = list[0], disabled = false, onChange }) => {
@@ -1817,7 +1744,7 @@
1817
1744
  }), renderButtonsSection(buttons, { className: 'mt-7', isVertical: true }), renderFootnote(footnote)] })] }));
1818
1745
  });
1819
1746
  const renderRate = (rate) => (jsx(Rate, { title: "\u0421\u0442\u0430\u0432\u043A\u0430", rate: rate, rateBlockClassName: "tracking-[-25px]", unit: "%" }));
1820
- const renderCreditParamsForm = ({ isSalaryClient, isStateEmployee, isPensionClient, isInsurance, isShowSalaryClient, isShowStateEmployee, isShowPensionClient, isShowInsurance, handleIsSalaryClient, handleIsStateEmployee, handleIsPensionClient, handleIsInsurance, }) => (jsxs("div", { children: [isShowSalaryClient ? (jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0443 \u043D\u0430 \u0441\u0447\u0451\u0442 \u0432 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0435", checked: isSalaryClient, onChange: handleIsSalaryClient })) : null, isShowStateEmployee ? (jsx(Checkbox, { className: "mt-3", text: "\u0420\u0430\u0431\u043E\u0442\u0430\u044E \u0432 \u0431\u044E\u0434\u0436\u0435\u0442\u043D\u043E\u0439 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", checked: isStateEmployee, onChange: handleIsStateEmployee })) : null, isShowPensionClient ? (jsx(Checkbox, { className: "mt-3", text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u043F\u0435\u043D\u0441\u0438\u044E \u043D\u0430 \u043A\u0430\u0440\u0442\u0443 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0430", checked: isPensionClient, onChange: handleIsPensionClient })) : null, isShowInsurance ? (jsx(Checkbox, { className: "mt-3", text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", checked: isInsurance, onChange: handleIsInsurance })) : null] }));
1747
+ const renderCreditParamsForm = ({ isSalaryClient, isStateEmployee, isPensionClient, isInsurance, isShowSalaryClient, isShowStateEmployee, isShowPensionClient, isShowInsurance, handleIsSalaryClient, handleIsStateEmployee, handleIsPensionClient, handleIsInsurance, }) => (jsxs("div", { children: [isShowSalaryClient ? (jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0443 \u043D\u0430 \u0441\u0447\u0451\u0442 \u0432 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0435", value: isSalaryClient, onChange: handleIsSalaryClient })) : null, isShowStateEmployee ? (jsx(Checkbox, { className: "mt-3", text: "\u0420\u0430\u0431\u043E\u0442\u0430\u044E \u0432 \u0431\u044E\u0434\u0436\u0435\u0442\u043D\u043E\u0439 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", value: isStateEmployee, onChange: handleIsStateEmployee })) : null, isShowPensionClient ? (jsx(Checkbox, { className: "mt-3", text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u043F\u0435\u043D\u0441\u0438\u044E \u043D\u0430 \u043A\u0430\u0440\u0442\u0443 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0430", value: isPensionClient, onChange: handleIsPensionClient })) : null, isShowInsurance ? (jsx(Checkbox, { className: "mt-3", text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", value: isInsurance, onChange: handleIsInsurance })) : null] }));
1821
1748
 
1822
1749
  const REMOTE_REGISTRATION = 'remote';
1823
1750
  const OFFICE_REGISTRATION = 'office';
@@ -2013,22 +1940,16 @@
2013
1940
  };
2014
1941
  const replaceCommaToDot = (val) => String(val.replace(',', '.').replace(/[^.\d]/g, ''));
2015
1942
 
2016
- const CurrencyInput = JSX(({ className = '', onChange, minValue = 0, maxValue = 300000, ...inputProps }) => {
1943
+ const CurrencyInput = JSX(({ className = '', value = '', onChange, minValue = 0, maxValue = 300000, ...inputProps }) => {
2017
1944
  const handleChange = useCallback((inputValue) => {
2018
- if (!onChange) {
2019
- return;
2020
- }
2021
1945
  const adjustedVal = adjustValue(inputValue);
2022
1946
  const clampVal = getClampValue(adjustedVal, clamp(Number(adjustedVal), minValue, maxValue));
2023
- onChange(String(clampVal));
1947
+ onChange && onChange(clampVal);
2024
1948
  }, [onChange]);
2025
- const handleBlur = useCallback((inputValue) => {
2026
- if (!onChange) {
2027
- return;
2028
- }
2029
- onChange(localNumberFormat(inputValue));
2030
- }, [onChange]);
2031
- return (jsx(Input, { className: className, inputClassName: "w-full", onChange: handleChange, onBlur: handleBlur, ...inputProps, children: jsx("span", { className: "text-xl-light absolute right-4 bottom-4", children: "\u20BD" }) }));
1949
+ const handleBlur = useCallback(() => {
1950
+ onChange && onChange(localNumberFormat(value));
1951
+ }, [onChange, value]);
1952
+ return (jsx(Input, { className: className, inputClassName: "w-full", value: value, onChange: handleChange, onBlur: handleBlur, ...inputProps, children: jsx("span", { className: "text-xl-light absolute right-4 bottom-4", children: "\u20BD" }) }));
2032
1953
  });
2033
1954
  const getClampValue = (val, clampVal) => Number(val) === clampVal ? val : String(clampVal);
2034
1955
 
@@ -2045,7 +1966,7 @@
2045
1966
  ? getDisabledButtonClasses({ version: button?.version })
2046
1967
  : getRegularButtonClasses({ className: 'text-white', version: button?.version });
2047
1968
  const link = useLink();
2048
- return (jsxs(BlockWrapper, { className: `p-12 flex flex-col items-center ${className}`, ...rest, children: [title ? jsx(Heading, { className: "max-w-[684px] pb-9", headingType: "h2", title: title }) : null, jsxs("form", { className: "w-[468px]", method: "POST", action: FORM_URL, children: [jsx(CurrencyInput, { name: AMOUNT_KEY, value: value, onChange: handleChange, valid: value === '' || !isDisabled, placeholder: placeholder, label: label }), button?.text ? (jsx("button", { type: "submit", className: `w-full p-4 mt-6 ${buttonStyle} `, disabled: isDisabled, ...link(button), children: button.text })) : null] })] }));
1969
+ return (jsxs(BlockWrapper, { className: `p-default flex flex-col items-center ${className}`, ...rest, children: [title ? jsx(Heading, { className: "max-w-[684px] pb-9", headingType: "h2", title: title }) : null, jsxs("form", { className: "w-[468px]", method: "POST", action: FORM_URL, children: [jsx(CurrencyInput, { name: AMOUNT_KEY, value: value, onChange: handleChange, valid: value === '' || !isDisabled, placeholder: placeholder, label: label }), button?.text ? (jsx("button", { type: "submit", className: `w-full p-4 mt-6 ${buttonStyle} `, disabled: isDisabled, ...link(button), children: button.text })) : null] })] }));
2049
1970
  });
2050
1971
 
2051
1972
  const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
@@ -2265,7 +2186,7 @@
2265
2186
  }, [scrollRight, onScrollRight, hasEdgeBlocks, canScrollLeft, activeIndex, itemCount]);
2266
2187
  return (jsxs("div", { children: [renderBlur(isBlur, scroll), canMoveLeft ? (jsx(ScrollLeftButton, { className: style(scrollButtonStyle$1, arrowsPadded ? 'left-8' : 'left-0'), onClick: handleScrollLeft })) : null, canMoveRight ? (jsx(ScrollRightButton, { className: style(scrollButtonStyle$1, arrowsPadded ? 'right-8' : 'right-0'), onClick: handleScrollRight })) : null] }));
2267
2188
  });
2268
- const renderBlur = (isBlur, scroll) => (scroll.canScrollLeft || scroll.canScrollRight) && isBlur ? (jsxs("div", { children: [jsx("div", { className: style(blurBaseStyle, 'left-0 bg-opacity-from-white') }), jsx("div", { className: style(blurBaseStyle, 'right-0 bg-opacity-to-white') })] })) : null;
2189
+ const renderBlur = (isBlur, scroll) => isBlur ? (jsxs("div", { children: [scroll.canScrollLeft ? (jsx("div", { className: style(blurBaseStyle, 'left-0 bg-opacity-from-white') })) : null, scroll.canScrollRight ? (jsx("div", { className: style(blurBaseStyle, 'right-0 bg-opacity-to-white') })) : null] })) : null;
2269
2190
 
2270
2191
  const ITEMS_GAP = 4;
2271
2192
  const Carousel = JSX(({ className = '', itemCount, visibleItemCount, isBlur = true, isCyclic = false, arrowsPadded = true, isPadding = true, showDots = false, isAlignCenter = false, ...rest }) => {
@@ -2303,7 +2224,7 @@
2303
2224
  'CarouselInvestmentCard',
2304
2225
  'CarouselEventCard',
2305
2226
  ];
2306
- const getPaddingStyle = (isPadding) => (isPadding ? 'p-12' : '');
2227
+ const getPaddingStyle = (isPadding) => (isPadding ? 'p-default' : '');
2307
2228
  const getAlignStyle = (isAlignCenter) => isAlignCenter ? 'flex justify-center' : '';
2308
2229
  const renderDots = (containerRef, dotsActiveIndex, itemCount) => (jsx(SwipeListControlDots, { containerRef: containerRef, activeIndex: dotsActiveIndex, dotCount: itemCount, listType: 'horizontal-list' }));
2309
2230
 
@@ -2362,8 +2283,8 @@
2362
2283
  const CarouselCatalogCard = JSX(({ className = '', title, description, image, price, button, colors, ...rest }) => (jsxs(BlockWrapper, { className: `border box-border border-gray p-7 min-w-[392px] h-full flex flex-col justify-left ${className}`, ...rest, children: [image?.src ? jsx(ImgInner, { className: "mb-5 flex justify-center", image: image }) : null, title ? (jsx(Heading, { headingType: "h6", as: "h4", className: "text-left mb-1.5", title: title })) : null, description ? (jsx("div", { className: "mb-4", children: jsx(Paragraph, { size: "text-m", align: "text-left", font: "font-light", children: description }) })) : null, colors?.length ? (jsxs("div", { className: "flex mb-4 text-secondary-text", children: [jsx("div", { className: "mr-1.5", children: jsx(Text, { size: "text-s", align: "text-left", font: "font-light", children: "\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u0446\u0432\u0435\u0442\u0430:" }) }), colors.map(renderColorOption)] })) : null, price ? (jsxs(Text, { size: "text-h3", align: "text-left", children: [price, "\u00A0\u20BD"] })) : null, renderButtonsSection([button], { buttonClassName: 'mt-5 w-full' })] })));
2363
2284
  const renderColorOption = (color, i) => (jsx("div", { role: "figure", className: `w-6 h-6 ml-3 border border-solid border-main-divider rounded-full ${cardStyleMap[color]}` }, String(i)));
2364
2285
 
2365
- const LinkWrapper = JSX(({ className = '', href, target, children }) => {
2366
- const link = useLink();
2286
+ const LinkWrapper = JSX(({ className = '', href, target, isRemote = false, children }) => {
2287
+ const link = useLink({ isRemote });
2367
2288
  const linkProps = link({ href, target });
2368
2289
  const Tag = href ? 'a' : 'div';
2369
2290
  return (jsx(Tag, { className: style('block', className), ...(href ? linkProps : {}), children: children }));
@@ -2407,7 +2328,7 @@
2407
2328
 
2408
2329
  const MAX_LINKS_COUNT = 10;
2409
2330
  const CarouselLinks = JSX(({ className = '', additionalDescription, description, links, title, ...rest }) => {
2410
- return (jsxs(BlockWrapper, { className: `flex w-full p-10 overflow-hidden justify-between ${className}`, ...rest, children: [jsxs("div", { className: "flex flex-col max-w-96 pr-9 text-white text-xl-light", children: [jsx(Headline, { isPadding: false, title: title, description: description, as: "h1", align: "text-left" }), additionalDescription ? (jsx(Headline, { className: "pt-6", isPadding: false, description: description, align: "text-left" })) : null] }), links?.length ? renderLinks(links) : null] }));
2331
+ return (jsxs(BlockWrapper, { className: `flex w-full p-10 overflow-hidden justify-between ${className}`, ...rest, children: [jsxs("div", { className: "flex flex-col max-w-96 pr-9 text-white text-xl-light", children: [jsx(Headline, { isPadding: false, title: title, description: description, as: "h1", align: "text-left" }), additionalDescription ? (jsx(Headline, { className: "pt-6", isPadding: false, description: additionalDescription, align: "text-left" })) : null] }), links?.length ? renderLinks(links) : null] }));
2411
2332
  });
2412
2333
  const renderLinks = (links) => {
2413
2334
  const itemCount = Math.ceil(links.length / MAX_LINKS_COUNT);
@@ -2437,8 +2358,8 @@
2437
2358
 
2438
2359
  const CarouselProductCard = JSX(({ additionalDescription, align = 'text-center', button = {}, className = '', description, headlineSmallVersion = 'H6', href, icon, isDotted = true, isFullWidth = true, items = [], target, title, version = 'primary', ...rest }) => {
2439
2360
  return (jsxs(BlockWrapper, { className: style('h-full flex flex-col justify-between min-w-[260px]', 'box-border border-solid border border-gray', align, className), version: version, ...rest, children: [jsxs(LinkWrapper, { className: "p-6", href: href, target: target, children: [renderImage$3(icon), renderCardTitle(headlineSmallVersion, title), renderDescription$3(description, title), renderItems(items, isDotted, version), renderAdditionalDescription$1(additionalDescription)] }), renderButtonsSection([button], {
2440
- className: style('p-6 pt-0', isFullWidth ? '' : 'justify-center'),
2441
- isVertical: isFullWidth ? true : false,
2361
+ className: style('p-6 pt-0', isFullWidth ? '' : 'self-center min-w-[158px]'),
2362
+ isVertical: isFullWidth,
2442
2363
  })] }));
2443
2364
  });
2444
2365
  const renderImage$3 = (image) => (jsxs("div", { className: "flex justify-center", children: [image?.src ? jsx(ImgInner, { className: "mb-5", image: image }) : null, image?.icon ? (jsx(ImgInner, { className: `w-[32px] h-[32px] min-w-[32px] mb-5 rounded-full`, image: image })) : null] }));
@@ -2448,9 +2369,9 @@
2448
2369
  const renderItems = (items, isDotted, version = 'primary') => items?.length ? (jsx(List, { className: `max-w-[308px] mt-2 text-s ${version === 'primary' ? '!text-secondary-text' : ''}`, itemClassName: "text-left", items: items.filter((item) => item?.text).map((item) => item.text), isDotted: isDotted })) : null;
2449
2370
 
2450
2371
  const CarouselProgramsCard = JSX(({ className = '', title, icon, list = [], href, target, ...rest }) => {
2451
- return (jsx(BlockWrapper, { className: style('border border-gray', className), ...rest, children: jsxs(LinkWrapper, { className: "flex", href: href, target: target, children: [jsxs("div", { className: "w-[200px] min-w-[200px] self-center", children: [icon?.icon ? jsx(ImgInner, { image: icon }) : null, icon?.src ? jsx(ImgInner, { image: icon }) : null] }), jsxs("div", { className: "p-8 pl-3 w-full", children: [title ? jsx(Heading, { className: "mb-3.5", headingType: "h5", title: title }) : null, list.length ? (jsx("div", { className: "flex flex-col gap-3", children: list?.map(renderList$1) })) : null] })] }) }));
2372
+ return (jsx(BlockWrapper, { className: style('border border-gray', className), ...rest, children: jsxs(LinkWrapper, { className: "flex", href: href, target: target, children: [jsxs("div", { className: "w-[200px] min-w-[200px] self-center", children: [icon?.icon ? jsx(ImgInner, { image: icon }) : null, icon?.src ? jsx(ImgInner, { image: icon }) : null] }), jsxs("div", { className: "p-8 pl-3 w-full", children: [title ? jsx(Heading, { className: "mb-3.5", headingType: "h5", title: title }) : null, list.length ? (jsx("div", { className: "flex flex-col gap-3", children: list?.map(renderList$2) })) : null] })] }) }));
2452
2373
  });
2453
- const renderList$1 = (_, i) => (jsxs("div", { className: "break-words", children: [_.title ? jsx("div", { className: "text-h6", children: _.title }) : null, _.description ? jsx("span", { className: "text-l-light mt-1", children: _.description }) : null] }, String(i)));
2374
+ const renderList$2 = (_, i) => (jsxs("div", { className: "break-words", children: [_.title ? jsx("div", { className: "text-h6", children: _.title }) : null, _.description ? jsx("span", { className: "text-l-light mt-1", children: _.description }) : null] }, String(i)));
2454
2375
 
2455
2376
  const ICONS_MAP = [
2456
2377
  {
@@ -2512,7 +2433,7 @@
2512
2433
  return (jsx("div", { className: style(richVersion, 'md-container'), dangerouslySetInnerHTML: { __html } }));
2513
2434
  });
2514
2435
 
2515
- const CarouselRichTextCard = JSX(({ className = '', __html, richVersion = 'striped', ...rest }) => (jsx(BlockWrapper, { className: style('p-9 border border-gray min-w-96', className), ...rest, children: jsx(RichText, { __html: __html, richVersion: richVersion }) })));
2436
+ const CarouselRichTextCard = JSX(({ className = '', __html, richVersion = 'striped', ...rest }) => (jsx(BlockWrapper, { className: style('p-9 border border-gray h-full min-w-96', className), ...rest, children: jsx(RichText, { __html: __html, richVersion: richVersion }) })));
2516
2437
 
2517
2438
  const Foldable = JSX(({ className = '', isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
2518
2439
  const [isUnfolded, setIsUnfolded] = useState(unfoldedByDefault);
@@ -2621,7 +2542,7 @@
2621
2542
  });
2622
2543
  const renderShowMoreToggleButton = ({ isShowAllRow, onClick, }) => (jsx("div", { className: "pr-12", children: jsxs("div", { className: "flex w-full", children: [jsx("div", { className: FIRST_CELL_CLASSES$1 }), jsx("button", { onClick: onClick, className: "mt-5 flex-1 border-gray border-solid border text-primary-text bg-white hover:border-primary-main hover:text-primary-main", children: jsx("div", { className: "font-sans text-xs-light font-medium py-3", children: !isShowAllRow ? 'Показать все параметры' : 'Скрыть' }) })] }) }));
2623
2544
 
2624
- const ContactsBlock = JSX(({ className = '', contacts, info, version = 'secondary', ...rest }) => (jsxs(BlockWrapper, { className: `flex p-12 ${className}`, version: version, ...rest, children: [info?.length ? renderBlocks(info) : null, contacts?.length ? renderBlocks(contacts) : null] })));
2545
+ const ContactsBlock = JSX(({ className = '', contacts, info, version = 'secondary', ...rest }) => (jsxs(BlockWrapper, { className: `flex p-default ${className}`, version: version, ...rest, children: [info?.length ? renderBlocks(info) : null, contacts?.length ? renderBlocks(contacts) : null] })));
2625
2546
  const renderBlocks = (info) => (jsx("div", { className: "flex grow basis-0", children: info.map((column, index) => renderBlocksColumn({ column, index })) }));
2626
2547
  const renderBlocksColumn = ({ column, index }) => column ? (jsx("div", { className: "flex flex-col grow basis-0 pr-11 last:pr-0", children: column.map(({ title = '', description, additionalDescription, button }, key) => (jsxs("div", { className: "mt-6 first:mt-0", children: [jsx(Headline, { className: "!p-0", title: title, description: description, headlineVersion: "XS", align: "text-left" }), additionalDescription ? (jsx("div", { className: "mt-1.5 opacity-80", children: jsx(Paragraph, { size: "text-m", font: "font-light", children: additionalDescription }) })) : null, button ? jsx(Button, { className: "mt-6", ...button }) : null] }, String(key)))) }, `col-${String(index)}`)) : null;
2627
2548
 
@@ -2854,23 +2775,6 @@
2854
2775
  return currencies?.filter((_) => _?.currency?.id === 1 || _?.currency?.id === 2) || [];
2855
2776
  };
2856
2777
 
2857
- const useForm = (initialState = {}) => {
2858
- const [formState, setFormState] = useState(initialState);
2859
- const handlersMap = useRef({});
2860
- const register = (fieldName) => {
2861
- if (!handlersMap.current) {
2862
- return {};
2863
- }
2864
- const handler = (value) => {
2865
- setFormState((prev) => ({ ...prev, [fieldName]: value }));
2866
- };
2867
- handlersMap.current[fieldName] ||= handler;
2868
- return { value: formState?.[fieldName], onChange: handlersMap.current[fieldName] };
2869
- };
2870
- const resetForm = useCallback(() => setFormState({}), []);
2871
- return { formState, register, resetForm };
2872
- };
2873
-
2874
2778
  const DefaultFoldButton = JSX(({ className = '', label, icon, dataTheme = '', disabled = false, onClick }) => {
2875
2779
  return (jsxs("button", { className: style('flex justify-center w-full px-0 py-5 border border-transparent outline-none focus:border-primary-text', disabled
2876
2780
  ? 'bg-main-divider text-main-disabled hover:bg-main-divider'
@@ -2922,25 +2826,26 @@
2922
2826
  return items.map((item) => (jsx(SlideCheckbox, { text: item.title, value: [value].flatMap((_) => _).includes(item.value), onChange: () => handleChange(item.value), type: multiple ? 'checkbox' : 'radio' }, item.value)));
2923
2827
  });
2924
2828
 
2925
- const renderFormItem = (filtrationSchema, register) => (key) => {
2829
+ const renderFormItem = (filtrationSchema, field) => (key) => {
2926
2830
  const item = filtrationSchema[key];
2927
2831
  const type = item?.type;
2928
2832
  switch (type) {
2929
2833
  case 'array':
2930
- return renderCheckboxes(key, register)(item);
2834
+ return renderCheckboxes(key, field)(item);
2931
2835
  default:
2932
2836
  return null;
2933
2837
  }
2934
2838
  };
2935
- const renderCheckboxes = (key, register) => (item) => {
2839
+ const renderCheckboxes = (key, field) => (item) => {
2936
2840
  const options = item?.items?.enum?.map((e, i) => ({ value: e, title: item?.items?.enumNames?.[i] || '' })) ||
2937
2841
  [];
2938
- return (jsxs("div", { children: [item?.title ? (jsx("div", { className: "mb-4", children: jsx(Text, { size: "text-m", font: "font-light", color: "text-secondary-text", children: item.title }) })) : null, jsx(SlideCheckboxGroup, { items: options, multiple: true, ...register(key) })] }, key));
2842
+ return (jsxs("div", { children: [item?.title ? (jsx("div", { className: "mb-4", children: jsx(Text, { size: "text-m", font: "font-light", color: "text-secondary-text", children: item.title }) })) : null, jsx(SlideCheckboxGroup, { items: options, multiple: true, ...field(key) })] }, key));
2939
2843
  };
2940
2844
 
2845
+ const initialFiltrationState = {};
2941
2846
  const Filtration = JSX(({ className, filtrationSchema = {}, resetButton, ...rest }) => {
2942
- const { formState, register, resetForm } = useForm();
2943
- return (jsxs(BlockWrapper, { className: style(className), version: "transparent", ...rest, children: [jsxs("form", { className: "flex justify-between bg-white p-9 mb-1", children: [jsx("div", { className: "flex gap-11", children: Object.keys(filtrationSchema).map(renderFormItem(filtrationSchema, register)) }), resetButton ? (jsx("div", { children: jsx(Button, { className: "w-72", onClick: resetForm, ...resetButton }) })) : null] }), jsx(FiltrationInner, { filtrationState: formState, ...rest })] }));
2847
+ const [filtrationState, { field, reset }] = useForm(initialFiltrationState);
2848
+ return (jsxs(BlockWrapper, { className: style(className), version: "transparent", ...rest, children: [jsxs("form", { className: "flex justify-between bg-white p-9 mb-1", children: [jsx("div", { className: "flex gap-11", children: Object.keys(filtrationSchema).map(renderFormItem(filtrationSchema, field)) }), resetButton ? (jsx("div", { children: jsx(Button, { className: "w-72", onClick: reset, ...resetButton }) })) : null] }), jsx(FiltrationInner, { filtrationState: filtrationState, ...rest })] }));
2944
2849
  });
2945
2850
  Filtration.childrenTypes = ['ProductTile'];
2946
2851
  Filtration.childSchema = (content) => content?.filtrationSchema || {};
@@ -2971,15 +2876,15 @@
2971
2876
  'bg-white': 'text-primary-text',
2972
2877
  transparent: 'text-white',
2973
2878
  };
2974
- const renderTitle$3 = (title, bgColor, className) => {
2879
+ const renderTitle$2 = (title, bgColor, className) => {
2975
2880
  return (jsx("span", { className: `${TEXT_COLOR[bgColor]} ml-2.5 font-medium ${className || ''}`, children: title || 'Россельхозбанк' }));
2976
2881
  };
2977
2882
 
2978
2883
  const Logo = JSX(({ className = '', href, logo, children = logo?.title, targetBlank, bgColor = 'bg-white', showTitle = true, }) => {
2979
- return (jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className}`, href: href || '/', target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title || 'Россельхозбанк', children: [renderImage$2(bgColor, logo?.image, { width: '40', height: '45' }), showTitle ? renderTitle$3(children || logo?.title, bgColor) : null] }));
2884
+ return (jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className}`, href: href || '/', target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title || 'Россельхозбанк', children: [renderImage$2(bgColor, logo?.image, { width: '40', height: '45' }), showTitle ? renderTitle$2(children || logo?.title, bgColor) : null] }));
2980
2885
  });
2981
2886
 
2982
- const CloseButton = JSX(({ className, onClick }) => (jsx("button", { className: style('visible peer-placeholder-shown:invisible w-6 h-6 p-1 bg-transparent border-none', className), onClick: onClick, title: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", children: jsx(ImgInner, { image: { icon: 'CloseIcon' }, width: "24", height: "24" }) })));
2887
+ const CloseButton = JSX(({ className, onClick }) => (jsx("button", { className: style('flex justify-center items-center w-12 h-12 p-1 bg-transparent border-none', className), onClick: onClick, title: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", children: jsx(ImgInner, { image: { icon: 'CloseIcon' }, width: "24", height: "24" }) })));
2983
2888
 
2984
2889
  function assertUnreachable(x) {
2985
2890
  throw new Error(x);
@@ -3163,19 +3068,11 @@
3163
3068
  globalThis.document?.removeEventListener('keydown', handleEscape);
3164
3069
  };
3165
3070
  }, [onClose]);
3166
- return isOpened ? (jsx("div", { className: style('fixed inset-0 bg-white text-l-light z-50 overflow-x-hidden overflow-y-scroll no-scrollbar', className), role: "dialog", children: jsxs("div", { className: "relative container pb-12 min-h-full", children: [jsxs("div", { className: "sticky bg-white pt-6 top-0", children: [jsx(CloseButton, { className: "absolute top-3 -right-6", onClick: onClose }), head] }), children] }) })) : null;
3071
+ return isOpened ? (jsx("div", { className: style('fixed inset-0 bg-white text-l-light z-50 overflow-x-hidden overflow-y-scroll no-scrollbar', className), role: "dialog", children: jsxs("div", { className: "relative container pb-12 min-h-full", children: [jsxs("div", { className: "sticky bg-white pt-6 top-0", children: [jsx(CloseButton, { className: "absolute top-10 -right-12", onClick: onClose }), head] }), children] }) })) : null;
3167
3072
  });
3168
3073
 
3169
- function useBool(defaultValue = false) {
3170
- const [value, setValue] = useState(defaultValue);
3171
- const setTrue = useCallback(() => setValue(true), []);
3172
- const setFalse = useCallback(() => setValue(false), []);
3173
- const toggle = useCallback(() => setValue((_) => !_), []);
3174
- return [value, { setValue, setTrue, setFalse, toggle }];
3175
- }
3176
-
3177
- function useDialogProps(id) {
3178
- const [isOpened, { setTrue: open, setFalse: close }] = useBool();
3074
+ function useDialogProps(id, initOpen = false) {
3075
+ const [isOpened, { setTrue: open, setFalse: close }] = useBool(initOpen);
3179
3076
  const [params, setParams] = useState({ id });
3180
3077
  const wasOpened = useRef(isOpened);
3181
3078
  wasOpened.current ||= isOpened;
@@ -3315,7 +3212,7 @@
3315
3212
  return (jsxs(BlockWrapper, { tag: "footer", className: `p-9 ${className}`, ...rest, children: [jsxs("div", { className: "flex items-stretch gap-[54px] pb-[30px] xl:gap-8", children: [jsx(Logo, { className: LEFT_COL_WIDTH_FULL_HD, logo: logo }), jsx(SearchBar$1, { className: "grow" })] }), jsxs("div", { className: "flex items-stretch gap-[54px] xl:gap-8", children: [jsxs("div", { className: `${LEFT_COL_WIDTH_FULL_HD} flex flex-col shrink-0 overflow-hidden`, children: [jsx(Contacts, { items: contacts, hasButton: true }), jsx(SocialMedia, { media: socialMedia, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsx(SocialMedia, { className: "mt-6", media: mobileApps, children: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] }), jsx(Sitemap, { className: "flex-grow", topItems: sitemap?.topItems })] }), jsx(HorizontalNavigation, { className: "mt-[98px]", links: relatedEnterprises }), jsx(TextInformation, { links: documents })] }));
3316
3213
  });
3317
3214
 
3318
- const GracePeriod = JSX(({ className = '', title, description, calendar, ...rest }) => (jsxs(BlockWrapper, { className: `p-12 ${className}`, ...rest, children: [jsx(Headline, { className: "!p-0 mb-4", title: title, description: description, headlineVersion: "M" }), calendar ? renderCalendar(calendar) : null] })));
3215
+ const GracePeriod = JSX(({ className = '', title, description, calendar, ...rest }) => (jsxs(BlockWrapper, { className: `p-default ${className}`, ...rest, children: [jsx(Headline, { className: "!p-0 mb-4", title: title, description: description, headlineVersion: "M" }), calendar ? renderCalendar(calendar) : null] })));
3319
3216
  const renderCalendar = (calendar) => {
3320
3217
  const colCount = calendar.reduce((accumulator, currentValue) => currentValue?.month?.length ? accumulator + currentValue.month.length : accumulator, 0) || 1;
3321
3218
  const colSize = 100 / colCount;
@@ -3607,7 +3504,7 @@
3607
3504
  '': '',
3608
3505
  };
3609
3506
 
3610
- const HorizontalLayout = JSX(({ className = '', gap = 'XS', isPadding = false, version = 'transparent', isTheme = false, ...rest }) => (jsx(BlockWrapper, { className: style('relative', 'grid grid-cols-12', isPadding ? 'p-12' : '', gapStyles[gap], className), version: version, isTheme: isTheme, ...rest, children: renderChildren(rest) })));
3507
+ const HorizontalLayout = JSX(({ className = '', gap = 'XS', isPadding = false, version = 'transparent', isTheme = false, ...rest }) => (jsx(BlockWrapper, { className: style('relative', 'grid grid-cols-12', isPadding ? 'p-default' : '', gapStyles[gap], className), version: version, isTheme: isTheme, ...rest, children: renderChildren(rest) })));
3611
3508
  HorizontalLayout.childrenTypes = {
3612
3509
  exclude: ['HorizontalLayout'],
3613
3510
  };
@@ -3756,7 +3653,7 @@
3756
3653
  double: 'flex-wrap',
3757
3654
  single: 'flex-col',
3758
3655
  };
3759
- const LinkDocs = JSX(({ className = '', title, description, align = 'text-center', documents, icon = { icon: 'DocIcon' }, columnsMode = 'double', ...rest }) => (jsxs(BlockWrapper, { className: style('p-12', className), ...rest, children: [jsx(Headline, { className: "!p-0", title: title, description: description, align: align, headlineVersion: "M", as: "h2" }), documents?.length ? (jsx("div", { className: style('mt-8 flex gap-6', linkColumnsModeStyleMap[columnsMode]), role: "list", children: documents.map((doc, i) => (jsx("div", { className: columnsMode === 'double' ? 'basis-[calc(50%-20px)]' : '', role: "listitem", children: jsx(LinkDocsListItem, { doc: doc, icon: icon ? (jsx(ImgInner, { className: "min-w-6 min-h-6", image: icon, width: "24", height: "24" })) : null }) }, String(i)))) })) : null] })));
3656
+ const LinkDocs = JSX(({ className = '', title, description, align = 'text-center', documents, icon = { icon: 'DocIcon' }, columnsMode = 'double', ...rest }) => (jsxs(BlockWrapper, { className: style('p-default', className), ...rest, children: [jsx(Headline, { className: "!p-0", title: title, description: description, align: align, headlineVersion: "M", as: "h2" }), documents?.length ? (jsx("div", { className: style('mt-8 flex gap-6', linkColumnsModeStyleMap[columnsMode]), role: "list", children: documents.map((doc, i) => (jsx("div", { className: columnsMode === 'double' ? 'basis-[calc(50%-20px)]' : '', role: "listitem", children: jsx(LinkDocsListItem, { doc: doc, icon: icon ? (jsx(ImgInner, { className: "min-w-6 min-h-6", image: icon, width: "24", height: "24" })) : null }) }, String(i)))) })) : null] })));
3760
3657
 
3761
3658
  const getColSpan = (className) => {
3762
3659
  const colSpanPrefix = 'col-span-';
@@ -3779,12 +3676,12 @@
3779
3676
 
3780
3677
  const MobileAppTile = JSX(({ className = '', title = 'Мобильное приложение', qr, buttons, version = 'primary', items, image, headingType = 'h4', alignTitle = 'left', description, ...rest }) => {
3781
3678
  const containerStyle = version === 'secondary' ? 'p-3.5 min-w-[120px]' : 'min-w-[92px]';
3782
- return (jsxs(BlockWrapper, { className: `flex justify-between p-12 box-border relative min-h-80 ${getTileMinHeight(className)} ${className}`, version: version, ...rest, children: [jsxs(BaseTile, { className: "z-10", title: title ? (jsx(Heading, { headingType: headingType, as: "h3", title: title, className: `whitespace-pre-wrap mb-7 w-full ${AlignText[alignTitle]}` })) : null, buttons: renderButtonsSection(buttons, {
3679
+ return (jsxs(BlockWrapper, { className: `flex justify-between p-default box-border relative min-h-80 ${getTileMinHeight(className)} ${className}`, version: version, ...rest, children: [jsxs(BaseTile, { className: "z-10", title: title ? (jsx(Heading, { headingType: headingType, as: "h3", title: title, className: `whitespace-pre-wrap mb-7 w-full ${AlignText[alignTitle]}` })) : null, buttons: renderButtonsSection(buttons, {
3783
3680
  className: 'mt-8',
3784
3681
  buttonClassName: 'min-w-[168px]',
3785
- }), children: [renderDescription$2(description), jsxs("div", { className: "flex flex-1 items-center mb-3", children: [qr?.src ? (jsx("div", { className: `flex justify-center mr-5 bg-white rounded-md ${containerStyle}`, children: jsx(ImgInner, { className: "w-fit", image: qr }) })) : null, renderList(items)] })] }), image?.src ? (jsx("div", { className: "absolute right-0 bottom-0", children: jsx(ImgInner, { image: image }) })) : null] }));
3682
+ }), children: [renderDescription$2(description), jsxs("div", { className: "flex flex-1 items-center mb-3", children: [qr?.src ? (jsx("div", { className: `flex justify-center mr-5 bg-white rounded-md ${containerStyle}`, children: jsx(ImgInner, { className: "w-fit", image: qr }) })) : null, renderList$1(items)] })] }), image?.src ? (jsx("div", { className: "absolute right-0 bottom-0", children: jsx(ImgInner, { image: image }) })) : null] }));
3786
3683
  });
3787
- const renderList = (items) => {
3684
+ const renderList$1 = (items) => {
3788
3685
  return items?.length ? (jsx(List, { items: items, itemClassName: "text-l-light mb-2 last:mb-0" })) : (jsx("span", { className: "text-m-light text-secondary-text", children: "\u041D\u0430\u0432\u0435\u0434\u0438\u0442\u0435 \u043A\u0430\u043C\u0435\u0440\u0443 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430 \u043D\u0430 QR-\u043A\u043E\u0434 \u0438 \u0441\u043A\u0430\u0447\u0430\u0439\u0442\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" }));
3789
3686
  };
3790
3687
  const renderDescription$2 = (description) => description ? jsx("p", { className: "text-xl-light mb-5 pt-0.5", children: description }) : null;
@@ -4272,7 +4169,7 @@
4272
4169
  const ProductBlock = JSX((props) => {
4273
4170
  const { className = '', breadcrumbs, backwardButton, version = 'primary', ...rest } = props;
4274
4171
  const buttonVersion = version === 'primary' ? version : 'white';
4275
- return (jsxs(BlockWrapper, { className: style('overflow-hidden p-12 flex flex-col box-border min-h-[454px]', className), version: version, ...rest, children: [backwardButton?.text ? renderBackwardButton(backwardButton, buttonVersion) : null, breadcrumbs?.length ? (jsx("div", { className: "text-xs-light mb-6", children: joinList(jsx("span", { className: style('mx-2', breadcrumbStyle), children: "/" }))(breadcrumbs.map((breadcrumb, i) => (jsx(Breadcrumb, { className: breadcrumbStyle, ...breadcrumb }, String(i))))) })) : null, jsx(ProductBlockInner, { className: "mt-10", version: version, ...rest })] }));
4172
+ return (jsxs(BlockWrapper, { className: style('overflow-hidden p-default flex flex-col box-border min-h-[454px]', className), version: version, ...rest, children: [backwardButton?.text ? renderBackwardButton(backwardButton, buttonVersion) : null, breadcrumbs?.length ? (jsx("div", { className: "text-xs-light mb-6", children: joinList(jsx("span", { className: style('mx-2', breadcrumbStyle), children: "/" }))(breadcrumbs.map((breadcrumb, i) => (jsx(Breadcrumb, { className: breadcrumbStyle, ...breadcrumb }, String(i))))) })) : null, jsx(ProductBlockInner, { className: "mt-10", version: version, ...rest })] }));
4276
4173
  });
4277
4174
 
4278
4175
  const ProductGallery = JSX(({ className = '', slides = [], ...rest }) => {
@@ -4664,9 +4561,9 @@
4664
4561
  const count = tab.ref && page?.blocks
4665
4562
  ? page.blocks.filter((block) => block?.labels?.includes(tab.ref)).length
4666
4563
  : 0;
4667
- return (jsx("div", { className: getGroupTabClassName('div', active, isScrollable), role: "tab", "aria-selected": active, onClick: () => onClick(tab), children: jsxs("div", { className: `flex flex-1 items-center justify-center ${getGroupTabClassName('text', active, isScrollable)}`, children: [renderTitle$2(tab.title, active, isScrollable), renderCount(showCounter, count, active)] }) }, `group-${String(i)}`));
4564
+ return (jsx("div", { className: getGroupTabClassName('div', active, isScrollable), role: "tab", "aria-selected": active, onClick: () => onClick(tab), children: jsxs("div", { className: `flex flex-1 items-center justify-center ${getGroupTabClassName('text', active, isScrollable)}`, children: [renderTitle$1(tab.title, active, isScrollable), renderCount(showCounter, count, active)] }) }, `group-${String(i)}`));
4668
4565
  };
4669
- const renderTitle$2 = (title, active, isScrollable) => {
4566
+ const renderTitle$1 = (title, active, isScrollable) => {
4670
4567
  const activeClassName = active ? WHITE_ACTIVE_TEXT_CLASSES : INACTIVE_TEXT_CLASSES;
4671
4568
  const titleClassName = isScrollable
4672
4569
  ? `${TEXT_CLASSES} ${activeClassName}`
@@ -4906,9 +4803,9 @@
4906
4803
  });
4907
4804
  const rows = (rowData || []).map((row, i) => (jsx(TariffsTableRow, { row: row, activeIndex: activeIndex, rowIdx: i, ...rest }, String(i))));
4908
4805
  const [visibleRows, hiddenRows] = hiddenRowsNum > 0 ? [rows.slice(0, -hiddenRowsNum), rows.slice(-hiddenRowsNum)] : [rows, []];
4909
- return (jsxs(BlockWrapper, { className: `p-12 overflow-hidden relative ${itemCount > 1 ? 'pr-0' : ''} ${className}`, ...rest, children: [renderTitle$1({ title, description }), renderDescription$1(description), hiddenRowsNum > 0 ? (jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (jsxs(Wrapper, { controls: controls, children: [visibleRows, jsx(FoldableSection, { isUnfolded: isUnfolded, children: hiddenRows })] })), renderFoldButton: renderDefaultFoldButton })) : (jsx(Wrapper, { controls: controls, children: rows }))] }));
4806
+ return (jsxs(BlockWrapper, { className: `p-default overflow-hidden relative ${itemCount > 1 ? 'pr-0' : ''} ${className}`, ...rest, children: [renderTitle({ title, description }), renderDescription$1(description), hiddenRowsNum > 0 ? (jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (jsxs(Wrapper, { controls: controls, children: [visibleRows, jsx(FoldableSection, { isUnfolded: isUnfolded, children: hiddenRows })] })), renderFoldButton: renderDefaultFoldButton })) : (jsx(Wrapper, { controls: controls, children: rows }))] }));
4910
4807
  });
4911
- function renderTitle$1({ title, description }) {
4808
+ function renderTitle({ title, description }) {
4912
4809
  return title ? (jsx(Heading, { headingType: "h3", className: `text-center ${description ? 'mb-2.5' : 'mb-8'}`, title: title })) : null;
4913
4810
  }
4914
4811
  function renderDescription$1(description) {
@@ -4923,13 +4820,16 @@
4923
4820
  })] }), isScrollAvailable ? (jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" })) : null] }));
4924
4821
  });
4925
4822
 
4926
- const TextBlock = JSX(({ className = '', title, description, iconVersion, image, __html, ...rest }) => {
4927
- return (jsxs(BlockWrapper, { className: `px-9 py-4 flex gap-3 bg-white group-data-secondary:bg-primary-main/10' ${className}`, ...rest, children: [iconVersion === 'small' ? jsx("div", { className: "mt-1", children: renderIcon() }) : null, iconVersion === 'big' ? renderImage(image) : null, jsxs("div", { children: [title ? renderTitle(title) : null, description ? jsx("div", { className: "mt-1", children: renderDescription(description) }) : null, __html ? jsx(RichText, { __html: __html }) : null] })] }));
4823
+ const TextBlock = JSX(({ className = '', title, description, iconVersion, image, __html, items = [], ...rest }) => {
4824
+ return (jsxs(BlockWrapper, { className: style('px-9 py-4 flex gap-3 bg-white group-data-secondary:bg-primary-main/10', className), ...rest, children: [iconVersion === 'small' ? jsx("div", { className: "mt-1", children: renderIcon() }) : null, iconVersion === 'big' ? renderImage(image) : null, jsxs("div", { className: "flex flex-col w-fit gap-3", children: [title ? (jsx(Text, { size: "text-l", font: "font-medium", color: "text-primary-text group-data-secondary:text-white", children: title })) : null, description ? renderDescription(description) : null, items?.length ? renderList(items, true) : null, __html ? jsx(RichText, { __html: __html }) : null] })] }));
4928
4825
  });
4929
4826
  const renderIcon = () => (jsx("div", { className: `rounded-full h-4 w-4 text-center text-xs-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main`, children: "i" }));
4930
- const renderImage = (image) => (image?.src ? jsx(ImgInner, { image: image }) : null);
4931
- const renderTitle = (title) => (jsx(Text, { size: "text-l", font: "font-medium", color: "text-primary-text group-data-secondary:text-white", children: title }));
4827
+ const renderImage = (image) => image?.src ? jsx(ImgInner, { className: "h-fit", image: image }) : null;
4932
4828
  const renderDescription = (description) => (jsx(Paragraph, { size: "text-s", color: "text-secondary-text group-data-secondary:text-white", children: description }));
4829
+ const renderList = (items, bullets) => {
4830
+ const listStyle = bullets ? 'list-disc pl-6' : '';
4831
+ return (jsx("ul", { className: style('text-secondary-text group-data-secondary:text-white/80', listStyle), children: items.map((_, i) => (jsx("li", { children: jsx(Text, { size: "text-s", font: "font-light", children: _ }) }, `listItem-${i}`))) }));
4832
+ };
4933
4833
 
4934
4834
  const Tags = JSX((props) => {
4935
4835
  const { tags, className = '' } = props;
@@ -4950,7 +4850,7 @@
4950
4850
  };
4951
4851
  const VerticalLayout = JSX(({ className = '', gap = '', align = 'stretch', isPadding = false, isInnerPadding = true, version = 'transparent', isTheme = false, ...rest }) => {
4952
4852
  const innerPaddingStyle = isInnerPadding ? '' : '!p-0';
4953
- return (jsx(BlockWrapper, { className: style('relative', 'flex flex-col [&>*]:max-w-full', isPadding ? 'p-12' : '', gapStyles[gap], align && alignStyle[align], className), version: version, isTheme: isTheme, ...rest, children: renderChildren({
4853
+ return (jsx(BlockWrapper, { className: style('relative', 'flex flex-col [&>*]:max-w-full', isPadding ? 'p-default' : '', gapStyles[gap], align && alignStyle[align], className), version: version, isTheme: isTheme, ...rest, children: renderChildren({
4954
4854
  ...rest,
4955
4855
  renderProps: (block, options) => renderBlock$1(block, options, { className: innerPaddingStyle }),
4956
4856
  }) }));
@@ -5089,6 +4989,18 @@
5089
4989
  }, [scrollTarget]);
5090
4990
  }
5091
4991
 
4992
+ const COOKIE_DIALOG_ID = 'cookie';
4993
+ const LOCAL_STORAGE_NAME = 'cookieClose';
4994
+ const CookiePopup = JSX(({ termLink, personalDataPolicyLink }) => {
4995
+ const { isOpened, onClose } = useDialogProps(COOKIE_DIALOG_ID, !globalThis.localStorage?.getItem(LOCAL_STORAGE_NAME));
4996
+ const handleClose = useCallback(() => {
4997
+ globalThis.localStorage?.setItem(LOCAL_STORAGE_NAME, 'true');
4998
+ onClose && onClose();
4999
+ }, [onClose]);
5000
+ return isOpened ? (jsx("div", { className: "container z-40 fixed bottom-0 left-0 right-0 pointer-events-none", children: jsxs("div", { className: "bg-white m-6 p-6 rounded-md flex items-center pointer-events-auto shadow-[0_4px_25px_rgba(0,0,0,0.07)]", children: [jsx("div", { className: "flex-1", children: jsxs(Paragraph, { size: "text-s-light", color: "text-primary-text", children: ["\u0410\u041E \u00AB\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u00BB \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442", jsx(LinkWrapper, { isRemote: true, className: style(getStyleLinkWrapper(termLink?.href)), ...termLink, children: "cookie" }), "(\u0444\u0430\u0439\u043B\u044B \u0441 \u0434\u0430\u043D\u043D\u044B\u043C\u0438 \u043E \u043F\u0440\u043E\u0448\u043B\u044B\u0445 \u043F\u043E\u0441\u0435\u0449\u0435\u043D\u0438\u044F\u0445 \u0441\u0430\u0439\u0442\u0430) \u0434\u043B\u044F \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043E\u0432 \u0438 \u0443\u0434\u043E\u0431\u0441\u0442\u0432\u0430 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0435\u0439. \u0412\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0437\u0430\u043F\u0440\u0435\u0442\u0438\u0442\u044C \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435 cookie \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445 \u0441\u0432\u043E\u0435\u0433\u043E \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430.", jsx(LinkWrapper, { isRemote: true, className: style(getStyleLinkWrapper(personalDataPolicyLink?.href)), ...personalDataPolicyLink, children: "\u041E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0430 \u0412\u0430\u0448\u0438\u0445 \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445" }), "\u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0438\u0442\u0441\u044F \u0432 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0442\u0440\u0435\u0431\u043E\u0432\u0430\u043D\u0438\u044F\u043C\u0438 \u0424\u0435\u0434\u0435\u0440\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u0437\u0430\u043A\u043E\u043D\u0430 \u043E\u0442 27.07.2006 \u2116 152-\u04243 \u00AB\u041E \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445\u00BB."] }) }), jsx("div", { className: "w-24 flex justify-end", children: jsx(CloseButton, { className: "bg-main-gray rounded-md", onClick: handleClose }) })] }) })) : null;
5001
+ });
5002
+ const getStyleLinkWrapper = (href) => ['inline mx-1', href ? 'text-green-dark' : ''];
5003
+
5092
5004
  const api = LikeAPI();
5093
5005
  function useLikeService(pagePath) {
5094
5006
  const [likeCount, setLikeCount] = useState(0);
@@ -5154,7 +5066,7 @@
5154
5066
  ...options,
5155
5067
  slotName: 'footer',
5156
5068
  })
5157
- : null] }), likeControl ? renderLikeControl() : null] }));
5069
+ : null] }), likeControl ? renderLikeControl() : null, jsx(CookiePopup, { termLink: { href: '/pd-policy#cookie', target: '_blank' }, personalDataPolicyLink: { href: '/pd-policy', target: '_blank' } })] }));
5158
5070
  });
5159
5071
  ContentPage.childrenTypes = [];
5160
5072
  ContentPage.slots = () => ['header', 'footer'];
@@ -5162,7 +5074,7 @@
5162
5074
  return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto" }) }));
5163
5075
  }
5164
5076
 
5165
- const packageVersion = "0.10.4";
5077
+ const packageVersion = "0.10.6";
5166
5078
 
5167
5079
  exports.Blocks = Blocks;
5168
5080
  exports.ContentPage = ContentPage;