@redneckz/wildless-cms-uni-blocks 0.3.9 → 0.3.12

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 (480) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +154 -76
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/cosmos-static/icons/GpsIcon.svg +1 -0
  5. package/dist/components/BaseTile/BaseTile.js +1 -1
  6. package/dist/components/BaseTile/BaseTile.js.map +1 -1
  7. package/dist/components/Blocks.d.ts +1 -0
  8. package/dist/components/Blocks.js +2 -0
  9. package/dist/components/Blocks.js.map +1 -1
  10. package/dist/components/ComparisonTable/ComparisonTable.mobile.d.ts +5 -0
  11. package/dist/components/ComparisonTable/ComparisonTable.mobile.js +46 -0
  12. package/dist/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -0
  13. package/dist/components/ComparisonTable/ComparisonTableContent.d.ts +4 -0
  14. package/dist/components/ComparisonTable/HeaderCell.mobile.d.ts +12 -0
  15. package/dist/components/ComparisonTable/HeaderCell.mobile.js +9 -0
  16. package/dist/components/ComparisonTable/HeaderCell.mobile.js.map +1 -0
  17. package/dist/components/ComparisonTable/TableCell.d.ts +3 -2
  18. package/dist/components/ComparisonTable/TableCell.js.map +1 -1
  19. package/dist/components/ComparisonTable/TableCell.mobile.d.ts +9 -0
  20. package/dist/components/ComparisonTable/TableCell.mobile.js +12 -0
  21. package/dist/components/ComparisonTable/TableCell.mobile.js.map +1 -0
  22. package/dist/components/ComparisonTable/TableColumn.d.ts +10 -0
  23. package/dist/components/ComparisonTable/TableColumn.js +19 -0
  24. package/dist/components/ComparisonTable/TableColumn.js.map +1 -0
  25. package/dist/components/ContentPage/ContentPageContext.d.ts +1 -1
  26. package/dist/components/CreditCalculator/CreditCalculator.d.ts +2 -2
  27. package/dist/components/CreditCalculator/CreditCalculator.js +18 -22
  28. package/dist/components/CreditCalculator/CreditCalculator.js.map +1 -1
  29. package/dist/components/CreditCalculator/getCalculatorParams.d.ts +1 -1
  30. package/dist/components/CreditCalculator/getCreditRate.d.ts +1 -1
  31. package/dist/components/CreditCalculator/getDefaultMonths.d.ts +2 -0
  32. package/dist/components/CreditCalculator/getDefaultMonths.js +8 -0
  33. package/dist/components/CreditCalculator/getDefaultMonths.js.map +1 -0
  34. package/dist/components/CreditCalculator/getDefaultSum.d.ts +2 -0
  35. package/dist/components/CreditCalculator/getDefaultSum.js +8 -0
  36. package/dist/components/CreditCalculator/getDefaultSum.js.map +1 -0
  37. package/dist/components/CreditCalculator/getMonthlyPayment.d.ts +1 -1
  38. package/dist/components/CreditCalculator/renderButton.d.ts +1 -0
  39. package/dist/components/CreditCalculator/renderButton.js +8 -0
  40. package/dist/components/CreditCalculator/renderButton.js.map +1 -0
  41. package/dist/components/CreditCalculator/renderMonthsInput.d.ts +10 -0
  42. package/dist/components/CreditCalculator/renderMonthsInput.js +11 -0
  43. package/dist/components/CreditCalculator/renderMonthsInput.js.map +1 -0
  44. package/dist/components/CreditCalculator/renderProposal.d.ts +1 -0
  45. package/dist/components/CreditCalculator/renderProposal.js +9 -0
  46. package/dist/components/CreditCalculator/renderProposal.js.map +1 -0
  47. package/dist/components/CreditCalculator/renderTermsButton.d.ts +1 -0
  48. package/dist/components/CreditCalculator/renderTermsButton.js +9 -0
  49. package/dist/components/CreditCalculator/renderTermsButton.js.map +1 -0
  50. package/dist/components/CreditCalculator/renderWantedSumInput.d.ts +10 -0
  51. package/dist/components/CreditCalculator/renderWantedSumInput.js +18 -0
  52. package/dist/components/CreditCalculator/renderWantedSumInput.js.map +1 -0
  53. package/dist/components/ExchangeRateTile/CurrencyTable.d.ts +7 -0
  54. package/dist/components/ExchangeRateTile/CurrencyTable.js +19 -0
  55. package/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -0
  56. package/dist/components/ExchangeRateTile/CurrentLocation.d.ts +7 -0
  57. package/dist/components/ExchangeRateTile/CurrentLocation.js +7 -0
  58. package/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -0
  59. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -0
  60. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +15 -0
  61. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -0
  62. package/dist/components/ExchangeRateTile/ExchangeRateTile.js +23 -27
  63. package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  64. package/dist/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +10 -0
  65. package/dist/components/ExchangeRateTile/formatCurrency.d.ts +1 -0
  66. package/dist/components/ExchangeRateTile/formatCurrency.js +6 -0
  67. package/dist/components/ExchangeRateTile/formatCurrency.js.map +1 -0
  68. package/dist/components/Gallery/Gallery.mobile.js +2 -2
  69. package/dist/components/Gallery/Gallery.mobile.js.map +1 -1
  70. package/dist/components/Header/Header.mobile.js +1 -1
  71. package/dist/components/Header/Header.mobile.js.map +1 -1
  72. package/dist/components/ProductBlock/ProductBlockInner.js +1 -1
  73. package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
  74. package/dist/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
  75. package/dist/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
  76. package/dist/hooks/useCreditCalculatorData.js +3 -3
  77. package/dist/hooks/useCreditCalculatorData.js.map +1 -1
  78. package/dist/hooks/useExchangeRates.d.ts +9 -0
  79. package/dist/hooks/useExchangeRates.js +18 -0
  80. package/dist/hooks/useExchangeRates.js.map +1 -0
  81. package/dist/icons/IconName.d.ts +3 -2
  82. package/dist/icons/IconName.js +1 -0
  83. package/dist/icons/IconName.js.map +1 -1
  84. package/dist/model/InputTypes.d.ts +1 -0
  85. package/dist/model/InputTypes.js +2 -0
  86. package/dist/model/InputTypes.js.map +1 -0
  87. package/dist/setup-fixture.js +1 -1
  88. package/dist/setup-fixture.js.map +1 -1
  89. package/dist/ui-kit/Input/Input.d.ts +2 -0
  90. package/dist/ui-kit/Input/Input.js +8 -0
  91. package/dist/ui-kit/Input/Input.js.map +1 -0
  92. package/dist/ui-kit/Input/InputProps.d.ts +8 -0
  93. package/dist/ui-kit/Input/InputProps.js +2 -0
  94. package/dist/ui-kit/Input/InputProps.js.map +1 -0
  95. package/dist/ui-kit/Select/Select.d.ts +6 -0
  96. package/dist/ui-kit/Select/Select.js +8 -0
  97. package/dist/ui-kit/Select/Select.js.map +1 -0
  98. package/dist/ui-kit/Select/SelectOption.d.ts +5 -0
  99. package/dist/ui-kit/Select/SelectOption.js +8 -0
  100. package/dist/ui-kit/Select/SelectOption.js.map +1 -0
  101. package/dist/ui-kit/SwipeListControl/SwipeListControl.js +11 -6
  102. package/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  103. package/dist/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +1 -0
  104. package/lib/common.css +1 -1
  105. package/lib/components/BaseTile/BaseTile.js +1 -1
  106. package/lib/components/BaseTile/BaseTile.js.map +1 -1
  107. package/lib/components/Blocks.d.ts +1 -0
  108. package/lib/components/Blocks.js +2 -0
  109. package/lib/components/Blocks.js.map +1 -1
  110. package/lib/components/ComparisonTable/ComparisonTable.fixture.mobile.d.ts +5 -0
  111. package/lib/components/ComparisonTable/ComparisonTable.mobile.d.ts +5 -0
  112. package/lib/components/ComparisonTable/ComparisonTable.mobile.js +44 -0
  113. package/lib/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -0
  114. package/lib/components/ComparisonTable/ComparisonTableContent.d.ts +4 -0
  115. package/lib/components/ComparisonTable/HeaderCell.mobile.d.ts +12 -0
  116. package/lib/components/ComparisonTable/HeaderCell.mobile.js +7 -0
  117. package/lib/components/ComparisonTable/HeaderCell.mobile.js.map +1 -0
  118. package/lib/components/ComparisonTable/TableCell.d.ts +3 -2
  119. package/lib/components/ComparisonTable/TableCell.js.map +1 -1
  120. package/lib/components/ComparisonTable/TableCell.mobile.d.ts +9 -0
  121. package/lib/components/ComparisonTable/TableCell.mobile.js +10 -0
  122. package/lib/components/ComparisonTable/TableCell.mobile.js.map +1 -0
  123. package/lib/components/ComparisonTable/TableColumn.d.ts +10 -0
  124. package/lib/components/ComparisonTable/TableColumn.js +17 -0
  125. package/lib/components/ComparisonTable/TableColumn.js.map +1 -0
  126. package/lib/components/ContentPage/ContentPageContext.d.ts +1 -1
  127. package/lib/components/CreditCalculator/CreditCalculator.d.ts +2 -2
  128. package/lib/components/CreditCalculator/CreditCalculator.js +19 -23
  129. package/lib/components/CreditCalculator/CreditCalculator.js.map +1 -1
  130. package/lib/components/CreditCalculator/getCalculatorParams.d.ts +1 -1
  131. package/lib/components/CreditCalculator/getCreditRate.d.ts +1 -1
  132. package/lib/components/CreditCalculator/getDefaultMonths.d.ts +2 -0
  133. package/lib/components/CreditCalculator/getDefaultMonths.js +5 -0
  134. package/lib/components/CreditCalculator/getDefaultMonths.js.map +1 -0
  135. package/lib/components/CreditCalculator/getDefaultSum.d.ts +2 -0
  136. package/lib/components/CreditCalculator/getDefaultSum.js +5 -0
  137. package/lib/components/CreditCalculator/getDefaultSum.js.map +1 -0
  138. package/lib/components/CreditCalculator/getMonthlyPayment.d.ts +1 -1
  139. package/lib/components/CreditCalculator/renderButton.d.ts +1 -0
  140. package/lib/components/CreditCalculator/renderButton.js +5 -0
  141. package/lib/components/CreditCalculator/renderButton.js.map +1 -0
  142. package/lib/components/CreditCalculator/renderMonthsInput.d.ts +10 -0
  143. package/lib/components/CreditCalculator/renderMonthsInput.js +8 -0
  144. package/lib/components/CreditCalculator/renderMonthsInput.js.map +1 -0
  145. package/lib/components/CreditCalculator/renderProposal.d.ts +1 -0
  146. package/lib/components/CreditCalculator/renderProposal.js +6 -0
  147. package/lib/components/CreditCalculator/renderProposal.js.map +1 -0
  148. package/lib/components/CreditCalculator/renderTermsButton.d.ts +1 -0
  149. package/lib/components/CreditCalculator/renderTermsButton.js +6 -0
  150. package/lib/components/CreditCalculator/renderTermsButton.js.map +1 -0
  151. package/lib/components/CreditCalculator/renderWantedSumInput.d.ts +10 -0
  152. package/lib/components/CreditCalculator/renderWantedSumInput.js +15 -0
  153. package/lib/components/CreditCalculator/renderWantedSumInput.js.map +1 -0
  154. package/lib/components/ExchangeRateTile/CurrencyTable.d.ts +7 -0
  155. package/lib/components/ExchangeRateTile/CurrencyTable.js +17 -0
  156. package/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -0
  157. package/lib/components/ExchangeRateTile/CurrentLocation.d.ts +7 -0
  158. package/lib/components/ExchangeRateTile/CurrentLocation.js +5 -0
  159. package/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -0
  160. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -0
  161. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +13 -0
  162. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -0
  163. package/lib/components/ExchangeRateTile/ExchangeRateTile.js +23 -27
  164. package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  165. package/lib/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +10 -0
  166. package/lib/components/ExchangeRateTile/formatCurrency.d.ts +1 -0
  167. package/lib/components/ExchangeRateTile/formatCurrency.js +3 -0
  168. package/lib/components/ExchangeRateTile/formatCurrency.js.map +1 -0
  169. package/lib/components/Gallery/Gallery.mobile.js +2 -2
  170. package/lib/components/Gallery/Gallery.mobile.js.map +1 -1
  171. package/lib/components/Header/Header.mobile.js +1 -1
  172. package/lib/components/Header/Header.mobile.js.map +1 -1
  173. package/lib/components/ProductBlock/ProductBlock.fixture.mobile.d.ts +2 -1
  174. package/lib/components/ProductBlock/ProductBlockInner.js +1 -1
  175. package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
  176. package/lib/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
  177. package/lib/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
  178. package/lib/hooks/useCreditCalculatorData.js +3 -3
  179. package/lib/hooks/useCreditCalculatorData.js.map +1 -1
  180. package/lib/hooks/useExchangeRates.d.ts +9 -0
  181. package/lib/hooks/useExchangeRates.js +15 -0
  182. package/lib/hooks/useExchangeRates.js.map +1 -0
  183. package/lib/icons/IconName.d.ts +3 -2
  184. package/lib/icons/IconName.js +1 -0
  185. package/lib/icons/IconName.js.map +1 -1
  186. package/lib/model/InputTypes.d.ts +1 -0
  187. package/lib/model/InputTypes.js +2 -0
  188. package/lib/model/InputTypes.js.map +1 -0
  189. package/lib/setup-fixture.js +1 -1
  190. package/lib/setup-fixture.js.map +1 -1
  191. package/lib/ui-kit/Input/Input.d.ts +2 -0
  192. package/lib/ui-kit/Input/Input.js +6 -0
  193. package/lib/ui-kit/Input/Input.js.map +1 -0
  194. package/lib/ui-kit/Input/InputProps.d.ts +8 -0
  195. package/lib/ui-kit/Input/InputProps.js +2 -0
  196. package/lib/ui-kit/Input/InputProps.js.map +1 -0
  197. package/lib/ui-kit/Select/Select.d.ts +6 -0
  198. package/lib/ui-kit/Select/Select.js +6 -0
  199. package/lib/ui-kit/Select/Select.js.map +1 -0
  200. package/lib/ui-kit/Select/SelectOption.d.ts +5 -0
  201. package/lib/ui-kit/Select/SelectOption.js +6 -0
  202. package/lib/ui-kit/Select/SelectOption.js.map +1 -0
  203. package/lib/ui-kit/SwipeListControl/SwipeListControl.js +12 -7
  204. package/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  205. package/lib/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +1 -0
  206. package/mobile/bundle/bundle.umd.js +136 -83
  207. package/mobile/bundle/bundle.umd.min.js +1 -1
  208. package/mobile/dist/components/BaseTile/BaseTile.js +1 -1
  209. package/mobile/dist/components/BaseTile/BaseTile.js.map +1 -1
  210. package/mobile/dist/components/ComparisonTable/ComparisonTable.js +38 -28
  211. package/mobile/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
  212. package/mobile/dist/components/ComparisonTable/ComparisonTableContent.d.ts +4 -0
  213. package/mobile/dist/components/ComparisonTable/HeaderCell.d.ts +2 -0
  214. package/mobile/dist/components/ComparisonTable/HeaderCell.js +1 -3
  215. package/mobile/dist/components/ComparisonTable/HeaderCell.js.map +1 -1
  216. package/mobile/dist/components/ComparisonTable/TableCell.d.ts +4 -3
  217. package/mobile/dist/components/ComparisonTable/TableCell.js +5 -5
  218. package/mobile/dist/components/ComparisonTable/TableCell.js.map +1 -1
  219. package/mobile/dist/components/ComparisonTable/TableColumn.d.ts +10 -0
  220. package/mobile/dist/components/ComparisonTable/TableColumn.js +19 -0
  221. package/mobile/dist/components/ComparisonTable/TableColumn.js.map +1 -0
  222. package/mobile/dist/components/ContentPage/ContentPageContext.d.ts +1 -1
  223. package/mobile/dist/components/CreditCalculator/CreditCalculator.d.ts +2 -2
  224. package/mobile/dist/components/CreditCalculator/CreditCalculator.js +18 -22
  225. package/mobile/dist/components/CreditCalculator/CreditCalculator.js.map +1 -1
  226. package/mobile/dist/components/CreditCalculator/getCalculatorParams.d.ts +1 -1
  227. package/mobile/dist/components/CreditCalculator/getCreditRate.d.ts +1 -1
  228. package/mobile/dist/components/CreditCalculator/getDefaultMonths.d.ts +2 -0
  229. package/mobile/dist/components/CreditCalculator/getDefaultMonths.js +8 -0
  230. package/mobile/dist/components/CreditCalculator/getDefaultMonths.js.map +1 -0
  231. package/mobile/dist/components/CreditCalculator/getDefaultSum.d.ts +2 -0
  232. package/mobile/dist/components/CreditCalculator/getDefaultSum.js +8 -0
  233. package/mobile/dist/components/CreditCalculator/getDefaultSum.js.map +1 -0
  234. package/mobile/dist/components/CreditCalculator/getMonthlyPayment.d.ts +1 -1
  235. package/mobile/dist/components/CreditCalculator/renderButton.d.ts +1 -0
  236. package/mobile/dist/components/CreditCalculator/renderButton.js +8 -0
  237. package/mobile/dist/components/CreditCalculator/renderButton.js.map +1 -0
  238. package/mobile/dist/components/CreditCalculator/renderMonthsInput.d.ts +10 -0
  239. package/mobile/dist/components/CreditCalculator/renderMonthsInput.js +11 -0
  240. package/mobile/dist/components/CreditCalculator/renderMonthsInput.js.map +1 -0
  241. package/mobile/dist/components/CreditCalculator/renderProposal.d.ts +1 -0
  242. package/mobile/dist/components/CreditCalculator/renderProposal.js +9 -0
  243. package/mobile/dist/components/CreditCalculator/renderProposal.js.map +1 -0
  244. package/mobile/dist/components/CreditCalculator/renderTermsButton.d.ts +1 -0
  245. package/mobile/dist/components/CreditCalculator/renderTermsButton.js +9 -0
  246. package/mobile/dist/components/CreditCalculator/renderTermsButton.js.map +1 -0
  247. package/mobile/dist/components/CreditCalculator/renderWantedSumInput.d.ts +10 -0
  248. package/mobile/dist/components/CreditCalculator/renderWantedSumInput.js +18 -0
  249. package/mobile/dist/components/CreditCalculator/renderWantedSumInput.js.map +1 -0
  250. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.d.ts +7 -0
  251. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js +19 -0
  252. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -0
  253. package/mobile/dist/components/ExchangeRateTile/CurrentLocation.d.ts +7 -0
  254. package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js +7 -0
  255. package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -0
  256. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -0
  257. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +15 -0
  258. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -0
  259. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +23 -27
  260. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  261. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +10 -0
  262. package/mobile/dist/components/ExchangeRateTile/formatCurrency.d.ts +1 -0
  263. package/mobile/dist/components/ExchangeRateTile/formatCurrency.js +6 -0
  264. package/mobile/dist/components/ExchangeRateTile/formatCurrency.js.map +1 -0
  265. package/mobile/dist/components/Gallery/Gallery.js +2 -2
  266. package/mobile/dist/components/Gallery/Gallery.js.map +1 -1
  267. package/mobile/dist/components/Header/Header.js +1 -1
  268. package/mobile/dist/components/Header/Header.js.map +1 -1
  269. package/mobile/dist/components/ProductBlock/ProductBlockInner.js +1 -1
  270. package/mobile/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
  271. package/mobile/dist/hooks/useCreditCalculatorData.js +3 -3
  272. package/mobile/dist/hooks/useCreditCalculatorData.js.map +1 -1
  273. package/mobile/dist/hooks/useExchangeRates.d.ts +9 -0
  274. package/mobile/dist/hooks/useExchangeRates.js +18 -0
  275. package/mobile/dist/hooks/useExchangeRates.js.map +1 -0
  276. package/mobile/dist/icons/IconName.d.ts +3 -2
  277. package/mobile/dist/icons/IconName.js +1 -0
  278. package/mobile/dist/icons/IconName.js.map +1 -1
  279. package/mobile/dist/model/InputTypes.d.ts +1 -0
  280. package/mobile/dist/model/InputTypes.js +2 -0
  281. package/mobile/dist/model/InputTypes.js.map +1 -0
  282. package/mobile/dist/setup-fixture.js +1 -1
  283. package/mobile/dist/setup-fixture.js.map +1 -1
  284. package/mobile/dist/ui-kit/Input/Input.d.ts +2 -0
  285. package/mobile/dist/ui-kit/Input/Input.js +8 -0
  286. package/mobile/dist/ui-kit/Input/Input.js.map +1 -0
  287. package/mobile/dist/ui-kit/Input/InputProps.d.ts +8 -0
  288. package/mobile/dist/ui-kit/Input/InputProps.js +2 -0
  289. package/mobile/dist/ui-kit/Input/InputProps.js.map +1 -0
  290. package/mobile/dist/ui-kit/Select/Select.d.ts +6 -0
  291. package/mobile/dist/ui-kit/Select/Select.js +8 -0
  292. package/mobile/dist/ui-kit/Select/Select.js.map +1 -0
  293. package/mobile/dist/ui-kit/Select/SelectOption.d.ts +5 -0
  294. package/mobile/dist/ui-kit/Select/SelectOption.js +8 -0
  295. package/mobile/dist/ui-kit/Select/SelectOption.js.map +1 -0
  296. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js +11 -6
  297. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  298. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +1 -0
  299. package/mobile/lib/components/BaseTile/BaseTile.js +1 -1
  300. package/mobile/lib/components/BaseTile/BaseTile.js.map +1 -1
  301. package/mobile/lib/components/ComparisonTable/ComparisonTable.js +38 -28
  302. package/mobile/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
  303. package/mobile/lib/components/ComparisonTable/ComparisonTableContent.d.ts +4 -0
  304. package/mobile/lib/components/ComparisonTable/HeaderCell.d.ts +2 -0
  305. package/mobile/lib/components/ComparisonTable/HeaderCell.js +1 -3
  306. package/mobile/lib/components/ComparisonTable/HeaderCell.js.map +1 -1
  307. package/mobile/lib/components/ComparisonTable/TableCell.d.ts +4 -3
  308. package/mobile/lib/components/ComparisonTable/TableCell.js +6 -6
  309. package/mobile/lib/components/ComparisonTable/TableCell.js.map +1 -1
  310. package/mobile/lib/components/ComparisonTable/TableColumn.d.ts +10 -0
  311. package/mobile/lib/components/ComparisonTable/TableColumn.js +17 -0
  312. package/mobile/lib/components/ComparisonTable/TableColumn.js.map +1 -0
  313. package/mobile/lib/components/ContentPage/ContentPageContext.d.ts +1 -1
  314. package/mobile/lib/components/CreditCalculator/CreditCalculator.d.ts +2 -2
  315. package/mobile/lib/components/CreditCalculator/CreditCalculator.js +19 -23
  316. package/mobile/lib/components/CreditCalculator/CreditCalculator.js.map +1 -1
  317. package/mobile/lib/components/CreditCalculator/getCalculatorParams.d.ts +1 -1
  318. package/mobile/lib/components/CreditCalculator/getCreditRate.d.ts +1 -1
  319. package/mobile/lib/components/CreditCalculator/getDefaultMonths.d.ts +2 -0
  320. package/mobile/lib/components/CreditCalculator/getDefaultMonths.js +5 -0
  321. package/mobile/lib/components/CreditCalculator/getDefaultMonths.js.map +1 -0
  322. package/mobile/lib/components/CreditCalculator/getDefaultSum.d.ts +2 -0
  323. package/mobile/lib/components/CreditCalculator/getDefaultSum.js +5 -0
  324. package/mobile/lib/components/CreditCalculator/getDefaultSum.js.map +1 -0
  325. package/mobile/lib/components/CreditCalculator/getMonthlyPayment.d.ts +1 -1
  326. package/mobile/lib/components/CreditCalculator/renderButton.d.ts +1 -0
  327. package/mobile/lib/components/CreditCalculator/renderButton.js +5 -0
  328. package/mobile/lib/components/CreditCalculator/renderButton.js.map +1 -0
  329. package/mobile/lib/components/CreditCalculator/renderMonthsInput.d.ts +10 -0
  330. package/mobile/lib/components/CreditCalculator/renderMonthsInput.js +8 -0
  331. package/mobile/lib/components/CreditCalculator/renderMonthsInput.js.map +1 -0
  332. package/mobile/lib/components/CreditCalculator/renderProposal.d.ts +1 -0
  333. package/mobile/lib/components/CreditCalculator/renderProposal.js +6 -0
  334. package/mobile/lib/components/CreditCalculator/renderProposal.js.map +1 -0
  335. package/mobile/lib/components/CreditCalculator/renderTermsButton.d.ts +1 -0
  336. package/mobile/lib/components/CreditCalculator/renderTermsButton.js +6 -0
  337. package/mobile/lib/components/CreditCalculator/renderTermsButton.js.map +1 -0
  338. package/mobile/lib/components/CreditCalculator/renderWantedSumInput.d.ts +10 -0
  339. package/mobile/lib/components/CreditCalculator/renderWantedSumInput.js +15 -0
  340. package/mobile/lib/components/CreditCalculator/renderWantedSumInput.js.map +1 -0
  341. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.d.ts +7 -0
  342. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js +17 -0
  343. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -0
  344. package/mobile/lib/components/ExchangeRateTile/CurrentLocation.d.ts +7 -0
  345. package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js +5 -0
  346. package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -0
  347. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -0
  348. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +13 -0
  349. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -0
  350. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +23 -27
  351. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  352. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +10 -0
  353. package/mobile/lib/components/ExchangeRateTile/formatCurrency.d.ts +1 -0
  354. package/mobile/lib/components/ExchangeRateTile/formatCurrency.js +3 -0
  355. package/mobile/lib/components/ExchangeRateTile/formatCurrency.js.map +1 -0
  356. package/mobile/lib/components/Gallery/Gallery.js +2 -2
  357. package/mobile/lib/components/Gallery/Gallery.js.map +1 -1
  358. package/mobile/lib/components/Header/Header.js +1 -1
  359. package/mobile/lib/components/Header/Header.js.map +1 -1
  360. package/mobile/lib/components/ProductBlock/ProductBlockInner.js +1 -1
  361. package/mobile/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
  362. package/mobile/lib/hooks/useCreditCalculatorData.js +3 -3
  363. package/mobile/lib/hooks/useCreditCalculatorData.js.map +1 -1
  364. package/mobile/lib/hooks/useExchangeRates.d.ts +9 -0
  365. package/mobile/lib/hooks/useExchangeRates.js +15 -0
  366. package/mobile/lib/hooks/useExchangeRates.js.map +1 -0
  367. package/mobile/lib/icons/IconName.d.ts +3 -2
  368. package/mobile/lib/icons/IconName.js +1 -0
  369. package/mobile/lib/icons/IconName.js.map +1 -1
  370. package/mobile/lib/model/InputTypes.d.ts +1 -0
  371. package/mobile/lib/model/InputTypes.js +2 -0
  372. package/mobile/lib/model/InputTypes.js.map +1 -0
  373. package/mobile/lib/setup-fixture.js +1 -1
  374. package/mobile/lib/setup-fixture.js.map +1 -1
  375. package/mobile/lib/ui-kit/Input/Input.d.ts +2 -0
  376. package/mobile/lib/ui-kit/Input/Input.js +6 -0
  377. package/mobile/lib/ui-kit/Input/Input.js.map +1 -0
  378. package/mobile/lib/ui-kit/Input/InputProps.d.ts +8 -0
  379. package/mobile/lib/ui-kit/Input/InputProps.js +2 -0
  380. package/mobile/lib/ui-kit/Input/InputProps.js.map +1 -0
  381. package/mobile/lib/ui-kit/Select/Select.d.ts +6 -0
  382. package/mobile/lib/ui-kit/Select/Select.js +6 -0
  383. package/mobile/lib/ui-kit/Select/Select.js.map +1 -0
  384. package/mobile/lib/ui-kit/Select/SelectOption.d.ts +5 -0
  385. package/mobile/lib/ui-kit/Select/SelectOption.js +6 -0
  386. package/mobile/lib/ui-kit/Select/SelectOption.js.map +1 -0
  387. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js +12 -7
  388. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  389. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +1 -0
  390. package/mobile/src/common.css +12 -2
  391. package/mobile/src/components/BaseTile/BaseTile.tsx +1 -1
  392. package/mobile/src/components/ComparisonTable/ComparisonTable.tsx +90 -102
  393. package/mobile/src/components/ComparisonTable/ComparisonTableContent.ts +4 -0
  394. package/mobile/src/components/ComparisonTable/HeaderCell.tsx +34 -30
  395. package/mobile/src/components/ComparisonTable/TableCell.tsx +30 -27
  396. package/mobile/src/components/ComparisonTable/TableColumn.tsx +66 -0
  397. package/mobile/src/components/ContentPage/ContentPageContext.tsx +1 -1
  398. package/mobile/src/components/CreditCalculator/CreditCalculator.tsx +26 -87
  399. package/mobile/src/components/CreditCalculator/getCalculatorParams.ts +1 -1
  400. package/mobile/src/components/CreditCalculator/getCreditRate.ts +1 -1
  401. package/mobile/src/components/CreditCalculator/getDefaultMonths.ts +7 -0
  402. package/mobile/src/components/CreditCalculator/getDefaultSum.ts +7 -0
  403. package/mobile/src/components/CreditCalculator/getMonthlyPayment.ts +1 -1
  404. package/mobile/src/components/CreditCalculator/renderButton.tsx +13 -0
  405. package/mobile/src/components/CreditCalculator/renderMonthsInput.tsx +29 -0
  406. package/mobile/src/components/CreditCalculator/renderProposal.tsx +13 -0
  407. package/mobile/src/components/CreditCalculator/renderTermsButton.tsx +16 -0
  408. package/mobile/src/components/CreditCalculator/renderWantedSumInput.tsx +36 -0
  409. package/mobile/src/components/ExchangeRateTile/CurrencyTable.tsx +47 -0
  410. package/mobile/src/components/ExchangeRateTile/CurrentLocation.tsx +22 -0
  411. package/mobile/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +47 -0
  412. package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +48 -79
  413. package/mobile/src/components/ExchangeRateTile/ExchangeRateTileContent.ts +11 -0
  414. package/mobile/src/components/ExchangeRateTile/formatCurrency.ts +3 -0
  415. package/mobile/src/components/Gallery/Gallery.tsx +2 -2
  416. package/mobile/src/components/Header/Header.tsx +1 -1
  417. package/mobile/src/components/ProductBlock/ProductBlock.example.json +11 -1
  418. package/mobile/src/components/ProductBlock/ProductBlockInner.tsx +5 -5
  419. package/mobile/src/hooks/useCreditCalculatorData.ts +3 -7
  420. package/mobile/src/hooks/useExchangeRates.ts +25 -0
  421. package/mobile/src/icons/GpsIcon.svg +8 -0
  422. package/mobile/src/icons/IconName.ts +3 -3
  423. package/mobile/src/model/InputTypes.ts +1 -0
  424. package/mobile/src/setup-fixture.ts +1 -1
  425. package/mobile/src/ui-kit/Input/Input.tsx +8 -0
  426. package/mobile/src/ui-kit/Input/InputProps.ts +9 -0
  427. package/mobile/src/ui-kit/Select/Select.tsx +15 -0
  428. package/mobile/src/ui-kit/Select/SelectOption.tsx +14 -0
  429. package/mobile/src/ui-kit/SwipeListControl/SwipeListControl.tsx +27 -19
  430. package/mobile/src/ui-kit/SwipeListControl/SwipeListControlProps.ts +1 -0
  431. package/package.json +1 -1
  432. package/src/common.css +12 -2
  433. package/src/components/BaseTile/BaseTile.tsx +1 -1
  434. package/src/components/Blocks.ts +2 -0
  435. package/src/components/ComparisonTable/ComparisonTable.fixture.mobile.tsx +152 -0
  436. package/src/components/ComparisonTable/ComparisonTable.mobile.tsx +121 -0
  437. package/src/components/ComparisonTable/ComparisonTableContent.ts +4 -0
  438. package/src/components/ComparisonTable/HeaderCell.mobile.tsx +50 -0
  439. package/src/components/ComparisonTable/TableCell.mobile.tsx +46 -0
  440. package/src/components/ComparisonTable/TableCell.tsx +3 -2
  441. package/src/components/ComparisonTable/TableColumn.tsx +66 -0
  442. package/src/components/ContentPage/ContentPageContext.tsx +1 -1
  443. package/src/components/CreditCalculator/CreditCalculator.tsx +26 -87
  444. package/src/components/CreditCalculator/getCalculatorParams.ts +1 -1
  445. package/src/components/CreditCalculator/getCreditRate.ts +1 -1
  446. package/src/components/CreditCalculator/getDefaultMonths.ts +7 -0
  447. package/src/components/CreditCalculator/getDefaultSum.ts +7 -0
  448. package/src/components/CreditCalculator/getMonthlyPayment.ts +1 -1
  449. package/src/components/CreditCalculator/renderButton.tsx +13 -0
  450. package/src/components/CreditCalculator/renderMonthsInput.tsx +29 -0
  451. package/src/components/CreditCalculator/renderProposal.tsx +13 -0
  452. package/src/components/CreditCalculator/renderTermsButton.tsx +16 -0
  453. package/src/components/CreditCalculator/renderWantedSumInput.tsx +36 -0
  454. package/src/components/ExchangeRateTile/CurrencyTable.tsx +47 -0
  455. package/src/components/ExchangeRateTile/CurrentLocation.tsx +22 -0
  456. package/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +47 -0
  457. package/src/components/ExchangeRateTile/ExchangeRateTile.fixture.tsx +1 -1
  458. package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +48 -79
  459. package/src/components/ExchangeRateTile/ExchangeRateTileContent.ts +11 -0
  460. package/src/components/ExchangeRateTile/formatCurrency.ts +3 -0
  461. package/src/components/Gallery/Gallery.mobile.tsx +2 -2
  462. package/src/components/Header/Header.mobile.tsx +1 -1
  463. package/src/components/ProductBlock/ProductBlock.example.json +11 -1
  464. package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +57 -32
  465. package/src/components/ProductBlock/ProductBlock.fixture.tsx +57 -104
  466. package/src/components/ProductBlock/ProductBlockInner.mobile.tsx +5 -5
  467. package/src/components/ProductBlock/ProductBlockInner.tsx +4 -4
  468. package/src/hooks/useCreditCalculatorData.ts +3 -7
  469. package/src/hooks/useExchangeRates.ts +25 -0
  470. package/src/icons/GpsIcon.svg +8 -0
  471. package/src/icons/IconName.ts +3 -3
  472. package/src/model/InputTypes.ts +1 -0
  473. package/src/setup-fixture.ts +1 -1
  474. package/src/ui-kit/Button/Button.fixture.tsx +2 -6
  475. package/src/ui-kit/Input/Input.tsx +8 -0
  476. package/src/ui-kit/Input/InputProps.ts +9 -0
  477. package/src/ui-kit/Select/Select.tsx +15 -0
  478. package/src/ui-kit/Select/SelectOption.tsx +14 -0
  479. package/src/ui-kit/SwipeListControl/SwipeListControl.tsx +27 -19
  480. package/src/ui-kit/SwipeListControl/SwipeListControlProps.ts +1 -0
@@ -14,5 +14,15 @@
14
14
  "version": "secondary"
15
15
  }
16
16
  ],
17
- "version": "primary"
17
+ "version": "primary",
18
+ "benefits": [
19
+ {
20
+ "label": "Преимущество №1",
21
+ "icon": "ClockIcon"
22
+ },
23
+ {
24
+ "label": "Преимущество №2",
25
+ "icon": "SignDocsIcon"
26
+ }
27
+ ]
18
28
  }
@@ -1,6 +1,8 @@
1
1
  import type { Picture } from '../../model/Picture';
2
2
  import { context } from '../../setup-fixture';
3
3
  import { ProductBlock } from './ProductBlock';
4
+ import { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
5
+ import { Benefit } from '../BenefitsBlock/BenefitsBlockContent';
4
6
 
5
7
  const image: Picture = {
6
8
  src: 'money-1.png',
@@ -18,45 +20,68 @@ const image: Picture = {
18
20
  ],
19
21
  };
20
22
 
23
+ const benefits = [
24
+ {
25
+ label: 'До 5 млн ₽',
26
+ description: 'Кредитный лимит',
27
+ icon: 'EmptyWalletIcon',
28
+ },
29
+ {
30
+ label: 'От 16,9%',
31
+ description: 'Ставка по кредиту',
32
+ icon: 'PercentageSquareIcon',
33
+ },
34
+ {
35
+ label: 'До 5 лет',
36
+ description: 'Срок кредитования',
37
+ icon: 'CalendarIcon',
38
+ },
39
+ ];
40
+
41
+ const buttons = [
42
+ {
43
+ href: 'https://rshb.ru',
44
+ text: 'Оформить карту',
45
+ target: '_blank',
46
+ version: 'primary',
47
+ },
48
+ {
49
+ href: 'https://rshb.ru',
50
+ text: 'Подробнее',
51
+ target: '_blank',
52
+ version: 'secondary',
53
+ },
54
+ ] as ButtonWithIconProps;
55
+
56
+ const items = [
57
+ 'Совершайте любые личные покупки',
58
+ 'Используйте корпоративную карту как обычную дебетовую, если вы ИП',
59
+ 'Расходы для бизнеса на УСН 15% позволят снизить налоговую базу',
60
+ ];
61
+
21
62
  export default {
22
- primary: (
63
+ default: (
64
+ <div className="container grid grid-cols-12">
65
+ <ProductBlock
66
+ className="col-span-12"
67
+ context={context}
68
+ title={'Кредит до 5 000 000 Р\nбез залога и поручителей'}
69
+ description="Кредит наличными без залога и поручительства. Потребительский кредит на любые цели. Нужен только паспорт."
70
+ benefits={benefits as Benefit[]}
71
+ buttons={buttons as ButtonWithIconProps[]}
72
+ image={image}
73
+ />
74
+ </div>
75
+ ),
76
+ items: (
23
77
  <div className="container grid grid-cols-12">
24
78
  <ProductBlock
25
79
  className="col-span-12"
26
80
  context={context}
27
81
  title={'Кредит до 5 000 000 Р\nбез залога и поручителей'}
28
82
  description="Кредит наличными без залога и поручительства. Потребительский кредит на любые цели. Нужен только паспорт."
29
- benefits={[
30
- {
31
- label: 'До 5 млн ₽',
32
- description: 'Кредитный лимит',
33
- icon: 'EmptyWalletIcon',
34
- },
35
- {
36
- label: 'От 16,9%',
37
- description: 'Ставка по кредиту',
38
- icon: 'PercentageSquareIcon',
39
- },
40
- {
41
- label: 'До 5 лет',
42
- description: 'Срок кредитования',
43
- icon: 'CalendarIcon',
44
- },
45
- ]}
46
- buttons={[
47
- {
48
- href: 'https://rshb.ru',
49
- text: 'Оформить карту',
50
- target: '_blank',
51
- version: 'primary',
52
- },
53
- {
54
- href: 'https://rshb.ru',
55
- text: 'Подробнее',
56
- target: '_blank',
57
- version: 'secondary',
58
- },
59
- ]}
83
+ items={items}
84
+ buttons={buttons as ButtonWithIconProps[]}
60
85
  image={image}
61
86
  />
62
87
  </div>
@@ -1,6 +1,8 @@
1
1
  import type { Picture } from '../../model/Picture';
2
2
  import { context } from '../../setup-fixture';
3
3
  import { ProductBlock } from './ProductBlock';
4
+ import type { Benefit } from '../BenefitsBlock/BenefitsBlockContent';
5
+ import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
4
6
 
5
7
  const image: Picture = {
6
8
  src: 'money-1.png',
@@ -12,6 +14,53 @@ const image: Picture = {
12
14
  },
13
15
  };
14
16
 
17
+ const breadcrumbs = [
18
+ {
19
+ text: 'Главная',
20
+ href: '/',
21
+ },
22
+ {
23
+ text: 'Кредитные карты',
24
+ href: '/credit',
25
+ },
26
+ {
27
+ text: 'Кредитная карта Своя Union Pay',
28
+ },
29
+ ];
30
+
31
+ const benefits = [
32
+ {
33
+ label: 'До 5 млн ₽',
34
+ description: 'Кредитный лимит',
35
+ icon: 'EmptyWalletIcon',
36
+ },
37
+ {
38
+ label: 'От 16,9%',
39
+ description: 'Ставка по кредиту',
40
+ icon: 'PercentageSquareIcon',
41
+ },
42
+ {
43
+ label: 'До 5 лет',
44
+ description: 'Срок кредитования',
45
+ icon: 'CalendarIcon',
46
+ },
47
+ ];
48
+
49
+ const buttons = [
50
+ {
51
+ href: 'https://rshb.ru',
52
+ text: 'Оформить карту',
53
+ target: '_blank',
54
+ version: 'primary',
55
+ },
56
+ {
57
+ href: 'https://rshb.ru',
58
+ text: 'Подробнее',
59
+ target: '_blank',
60
+ version: 'secondary',
61
+ },
62
+ ];
63
+
15
64
  export default {
16
65
  default: (
17
66
  <div className="container grid grid-cols-12">
@@ -21,50 +70,9 @@ export default {
21
70
  title={'Потребительский кредит наличными'}
22
71
  headingType="h2"
23
72
  description="Кредит наличными без залога и поручительства. Потребительский кредит на любые цели. Нужен только паспорт."
24
- breadcrumbs={[
25
- {
26
- text: 'Главная',
27
- href: '/',
28
- },
29
- {
30
- text: 'Кредитные карты',
31
- href: '/credit',
32
- },
33
- {
34
- text: 'Кредитная карта Своя Union Pay',
35
- },
36
- ]}
37
- benefits={[
38
- {
39
- label: 'До 5 млн ₽',
40
- description: 'Кредитный лимит',
41
- icon: 'EmptyWalletIcon',
42
- },
43
- {
44
- label: 'От 16,9%',
45
- description: 'Ставка по кредиту',
46
- icon: 'PercentageSquareIcon',
47
- },
48
- {
49
- label: 'До 5 лет',
50
- description: 'Срок кредитования',
51
- icon: 'CalendarIcon',
52
- },
53
- ]}
54
- buttons={[
55
- {
56
- href: 'https://rshb.ru',
57
- text: 'Оформить карту',
58
- target: '_blank',
59
- version: 'primary',
60
- },
61
- {
62
- href: 'https://rshb.ru',
63
- text: 'Подробнее',
64
- target: '_blank',
65
- version: 'secondary',
66
- },
67
- ]}
73
+ breadcrumbs={breadcrumbs}
74
+ benefits={benefits as Benefit[]}
75
+ buttons={buttons as ButtonWithIconProps[]}
68
76
  image={image}
69
77
  />
70
78
  </div>
@@ -78,51 +86,9 @@ export default {
78
86
  headingType="h2"
79
87
  version={'secondary'}
80
88
  description="Кредит наличными без залога и поручительства. Потребительский кредит на любые цели. Нужен только паспорт."
81
- breadcrumbs={[
82
- {
83
- text: 'Главная',
84
- href: '/',
85
- },
86
- {
87
- text: 'Кредитные карты',
88
- href: '/credit',
89
- },
90
- {
91
- text: 'Кредитная карта Своя Union Pay',
92
- href: '#',
93
- },
94
- ]}
95
- benefits={[
96
- {
97
- label: 'До 5 млн ₽',
98
- description: 'Кредитный лимит',
99
- icon: 'EmptyWalletWhiteIcon',
100
- },
101
- {
102
- label: 'От 16,9%',
103
- description: 'Ставка по кредиту',
104
- icon: 'PercentageSquareWhiteIcon',
105
- },
106
- {
107
- label: 'До 5 лет',
108
- description: 'Срок кредитования',
109
- icon: 'CalendarWhiteIcon',
110
- },
111
- ]}
112
- buttons={[
113
- {
114
- href: 'https://rshb.ru',
115
- text: 'Оформить карту',
116
- target: '_blank',
117
- version: 'secondary',
118
- },
119
- {
120
- href: 'https://rshb.ru',
121
- text: 'Подробнее',
122
- target: '_blank',
123
- version: 'primary',
124
- },
125
- ]}
89
+ breadcrumbs={breadcrumbs}
90
+ benefits={benefits as Benefit[]}
91
+ buttons={buttons as ButtonWithIconProps[]}
126
92
  image={image}
127
93
  />
128
94
  </div>
@@ -134,27 +100,14 @@ export default {
134
100
  context={context}
135
101
  title={'Оплата проходит \nв 180 странах мира'}
136
102
  headingType="h2"
137
- breadcrumbs={[]}
103
+ breadcrumbs={breadcrumbs}
138
104
  description="Кредит наличными без залога и поручительства. Потребительский кредит на любые цели. Нужен только паспорт."
139
105
  items={[
140
106
  'Совершайте любые личные покупки',
141
107
  'Используйте корпоративную карту как обычную дебетовую, если вы ИП',
142
108
  'Расходы для бизнеса на УСН 15% позволят снизить налоговую базу',
143
109
  ]}
144
- buttons={[
145
- {
146
- href: 'https://rshb.ru',
147
- text: 'Оформить карту',
148
- target: '_blank',
149
- version: 'primary',
150
- },
151
- {
152
- href: 'https://rshb.ru',
153
- text: 'Подробнее',
154
- target: '_blank',
155
- version: 'secondary',
156
- },
157
- ]}
110
+ buttons={buttons as ButtonWithIconProps[]}
158
111
  image={image}
159
112
  />
160
113
  </div>
@@ -34,7 +34,7 @@ export const ProductBlockInner = JSX<ProductBlockInnerProps>(
34
34
  <Heading
35
35
  headingType={headingType}
36
36
  title={title}
37
- className={`whitespace-pre-wrap max-w-[600px] ${title ? 'mb-3' : ''}`}
37
+ className="whitespace-pre-wrap max-w-[600px]"
38
38
  />
39
39
  )
40
40
  }
@@ -48,11 +48,11 @@ export const ProductBlockInner = JSX<ProductBlockInnerProps>(
48
48
  ) : null
49
49
  }
50
50
  >
51
- {description ? <Description className="mb-5" description={description} /> : null}
52
- {benefits?.length ? (
53
- <div className="mt-5">{benefits.map((_, i) => renderBenefit(_, i, version))}</div>
51
+ {description ? <Description className="mt-3" description={description} /> : null}
52
+ {benefits?.filter((items) => items.label)?.length ? (
53
+ <div className="mt-3">{benefits.map((_, i) => renderBenefit(_, i, version))}</div>
54
54
  ) : null}
55
- {items?.length ? <List items={items} /> : null}
55
+ {items?.length ? <List className="mt-3" items={items} /> : null}
56
56
  </BaseTile>
57
57
  </div>
58
58
  {renderImage(image)}
@@ -34,7 +34,7 @@ export const ProductBlockInner = JSX<ProductBlockInnerProps>(
34
34
  <Heading
35
35
  headingType={headingType}
36
36
  title={title}
37
- className={`whitespace-pre-wrap mb-4 max-w-[600px]`}
37
+ className="whitespace-pre-wrap max-w-[600px]"
38
38
  />
39
39
  )
40
40
  }
@@ -45,10 +45,10 @@ export const ProductBlockInner = JSX<ProductBlockInnerProps>(
45
45
  }
46
46
  >
47
47
  {description && (
48
- <Description className="text-m-base max-w-[600px]" description={description} />
48
+ <Description className="text-m-base mt-4 max-w-[600px]" description={description} />
49
49
  )}
50
- {benefits?.length ? (
51
- <div className="flex gap-6 mt-6 mb-3.5">
50
+ {benefits?.filter((items) => items.label)?.length ? (
51
+ <div className="flex gap-6 mt-6">
52
52
  {benefits.map((_, i) => renderBenefit(_, i, version))}
53
53
  </div>
54
54
  ) : null}
@@ -5,16 +5,12 @@ export function useCreditCalculatorData(
5
5
  useAsyncData: AsyncDataHook,
6
6
  directoryName: string | undefined,
7
7
  ): CreditCalculatorData {
8
- const { data } = useAsyncData(creditCalculatorUrl(directoryName), () =>
9
- fetchCreditCalculatorData(directoryName),
10
- );
8
+ const { data } = useAsyncData(creditCalculatorUrl(directoryName), fetchCreditCalculatorData);
11
9
  return data || {};
12
10
  }
13
11
 
14
- async function fetchCreditCalculatorData(
15
- directoryName: string | undefined,
16
- ): Promise<CreditCalculatorData> {
17
- const response = await fetch(creditCalculatorUrl(directoryName));
12
+ async function fetchCreditCalculatorData(url: string): Promise<CreditCalculatorData> {
13
+ const response = await fetch(url);
18
14
  return await response.json();
19
15
  }
20
16
 
@@ -0,0 +1,25 @@
1
+ import type { AsyncDataHook } from '../components/ContentPage/ContentPageContext';
2
+ import { ExchangeCurrencyItem } from '../components/ExchangeRateTile/ExchangeRateTileContent';
3
+
4
+ interface ExchangeRatesData {
5
+ exchangeRate?: {
6
+ currencies?: ExchangeCurrencyItem[];
7
+ };
8
+ }
9
+
10
+ export function useExchangeRates(useAsyncData: AsyncDataHook): ExchangeRatesData {
11
+ const { data } = useAsyncData(EXCHANGE_RATES_URL, fetchExchangeRates);
12
+
13
+ return data || {};
14
+ }
15
+
16
+ async function fetchExchangeRates(): Promise<ExchangeRatesData | undefined> {
17
+ try {
18
+ const response = await fetch(EXCHANGE_RATES_URL);
19
+ return await response.json();
20
+ } catch (err) {
21
+ console.error(err);
22
+ }
23
+ }
24
+
25
+ const EXCHANGE_RATES_URL = '/api/v1/exchangerates.json';
@@ -0,0 +1,8 @@
1
+ <svg title="Gps" width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M9.35107 5.45074C10.3959 4.89842 11.587 4.58569 12.8511 4.58569C16.9932 4.58569 20.3511 7.94356 20.3511 12.0857C20.3511 16.2278 16.9932 19.5857 12.8511 19.5857C8.70894 19.5857 5.35107 16.2278 5.35107 12.0857C5.35107 10.8216 5.66381 9.63055 6.21612 8.58569" stroke="#1C1C1C" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
3
+ <path d="M12.8511 15.0857C14.5079 15.0857 15.8511 13.7425 15.8511 12.0857C15.8511 10.4288 14.5079 9.08569 12.8511 9.08569C11.1942 9.08569 9.85107 10.4288 9.85107 12.0857C9.85107 13.7425 11.1942 15.0857 12.8511 15.0857Z" stroke="#1C1C1C" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <path d="M12.8511 4.08569V2.08569" stroke="#1C1C1C" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
5
+ <path d="M4.85107 12.0857H2.85107" stroke="#1C1C1C" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
6
+ <path d="M12.8511 20.0857V22.0857" stroke="#1C1C1C" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
7
+ <path d="M20.8511 12.0857H22.8511" stroke="#1C1C1C" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
8
+ </svg>
@@ -2,7 +2,7 @@
2
2
  // Generated. Do not touch
3
3
 
4
4
  export enum IconMap {
5
- ActualBalanceIcon = "ActualBalanceIcon", AppleIcon = "AppleIcon", AtmIcon = "AtmIcon", BankIcon = "BankIcon", BurgerIcon = "BurgerIcon", BurgerIconWhite = "BurgerIconWhite", Calendar2Icon = "Calendar2Icon", CalendarCircleIcon = "CalendarCircleIcon", CalendarIcon = "CalendarIcon", CalendarTickIcon = "CalendarTickIcon", CalendarWhiteIcon = "CalendarWhiteIcon", CardIcon = "CardIcon", CardPosIcon = "CardPosIcon", CardTickIcon = "CardTickIcon", CardWithGemIcon = "CardWithGemIcon", ChartSquareIcon = "ChartSquareIcon", ClockIcon = "ClockIcon", CloseIcon = "CloseIcon", ComfortableCompIcon = "ComfortableCompIcon", CreditCardsIcon = "CreditCardsIcon", DiscountShapeIcon = "DiscountShapeIcon", DocIcon = "DocIcon", DocIconMonoColor = "DocIconMonoColor", DocumentTextIcon = "DocumentTextIcon", DollarIcon = "DollarIcon", EarthIcon = "EarthIcon", EmptyWalletChangeIcon = "EmptyWalletChangeIcon", EmptyWalletIcon = "EmptyWalletIcon", EmptyWalletWhiteIcon = "EmptyWalletWhiteIcon", EuroIcon = "EuroIcon", GeolocationIcon = "GeolocationIcon", GlassIcon = "GlassIcon", GlobalIcon = "GlobalIcon", GridIcon = "GridIcon", GridIconWhite = "GridIconWhite", InterestGrowthIcon = "InterestGrowthIcon", InterestIcon = "InterestIcon", JCBIcon = "JCBIcon", LoupeIcon = "LoupeIcon", MasterCardIcon = "MasterCardIcon", MinusIcon = "MinusIcon", MirIcon = "MirIcon", MoneyIcon = "MoneyIcon", MoneyInsuranceIcon = "MoneyInsuranceIcon", MonitorMobileIcon = "MonitorMobileIcon", NewDocIcon = "NewDocIcon", OfficeIcon = "OfficeIcon", OkIcon = "OkIcon", PassSendIcon = "PassSendIcon", PercentageRoundIcon = "PercentageRoundIcon", PercentageSquareIcon = "PercentageSquareIcon", PercentageSquareWhiteIcon = "PercentageSquareWhiteIcon", PersonalCardIcon = "PersonalCardIcon", PlayMarketIcon = "PlayMarketIcon", PlusIcon = "PlusIcon", Profile2UserIcon = "Profile2UserIcon", ProfileIcon = "ProfileIcon", RoundRubleIcon = "RoundRubleIcon", SafeIcon = "SafeIcon", ShieldTickIcon = "ShieldTickIcon", SignDocsIcon = "SignDocsIcon", SmallClockIcon = "SmallClockIcon", TelegramIcon = "TelegramIcon", UnionPayIcon = "UnionPayIcon", UserTickIcon = "UserTickIcon", VisaIcon = "VisaIcon", VKIcon = "VKIcon", WalletAdd2Icon = "WalletAdd2Icon", WalletAddIcon = "WalletAddIcon", WalletIcon = "WalletIcon", WalletWithMoneyIcon = "WalletWithMoneyIcon"
5
+ ActualBalanceIcon = "ActualBalanceIcon", AppleIcon = "AppleIcon", AtmIcon = "AtmIcon", BankIcon = "BankIcon", BurgerIcon = "BurgerIcon", BurgerIconWhite = "BurgerIconWhite", Calendar2Icon = "Calendar2Icon", CalendarCircleIcon = "CalendarCircleIcon", CalendarIcon = "CalendarIcon", CalendarTickIcon = "CalendarTickIcon", CalendarWhiteIcon = "CalendarWhiteIcon", CardIcon = "CardIcon", CardPosIcon = "CardPosIcon", CardTickIcon = "CardTickIcon", CardWithGemIcon = "CardWithGemIcon", ChartSquareIcon = "ChartSquareIcon", ClockIcon = "ClockIcon", CloseIcon = "CloseIcon", ComfortableCompIcon = "ComfortableCompIcon", CreditCardsIcon = "CreditCardsIcon", DiscountShapeIcon = "DiscountShapeIcon", DocIcon = "DocIcon", DocIconMonoColor = "DocIconMonoColor", DocumentTextIcon = "DocumentTextIcon", DollarIcon = "DollarIcon", EarthIcon = "EarthIcon", EmptyWalletChangeIcon = "EmptyWalletChangeIcon", EmptyWalletIcon = "EmptyWalletIcon", EmptyWalletWhiteIcon = "EmptyWalletWhiteIcon", EuroIcon = "EuroIcon", GeolocationIcon = "GeolocationIcon", GlassIcon = "GlassIcon", GlobalIcon = "GlobalIcon", GpsIcon = "GpsIcon", GridIcon = "GridIcon", GridIconWhite = "GridIconWhite", InterestGrowthIcon = "InterestGrowthIcon", InterestIcon = "InterestIcon", JCBIcon = "JCBIcon", LoupeIcon = "LoupeIcon", MasterCardIcon = "MasterCardIcon", MinusIcon = "MinusIcon", MirIcon = "MirIcon", MoneyIcon = "MoneyIcon", MoneyInsuranceIcon = "MoneyInsuranceIcon", MonitorMobileIcon = "MonitorMobileIcon", NewDocIcon = "NewDocIcon", OfficeIcon = "OfficeIcon", OkIcon = "OkIcon", PassSendIcon = "PassSendIcon", PercentageRoundIcon = "PercentageRoundIcon", PercentageSquareIcon = "PercentageSquareIcon", PercentageSquareWhiteIcon = "PercentageSquareWhiteIcon", PersonalCardIcon = "PersonalCardIcon", PlayMarketIcon = "PlayMarketIcon", PlusIcon = "PlusIcon", Profile2UserIcon = "Profile2UserIcon", ProfileIcon = "ProfileIcon", RoundRubleIcon = "RoundRubleIcon", SafeIcon = "SafeIcon", ShieldTickIcon = "ShieldTickIcon", SignDocsIcon = "SignDocsIcon", SmallClockIcon = "SmallClockIcon", TelegramIcon = "TelegramIcon", UnionPayIcon = "UnionPayIcon", UserTickIcon = "UserTickIcon", VisaIcon = "VisaIcon", VKIcon = "VKIcon", WalletAdd2Icon = "WalletAdd2Icon", WalletAddIcon = "WalletAddIcon", WalletIcon = "WalletIcon", WalletWithMoneyIcon = "WalletWithMoneyIcon"
6
6
  }
7
7
 
8
8
  /**
@@ -10,7 +10,7 @@ export enum IconMap {
10
10
  * @title Иконка
11
11
  * @enumNames [
12
12
  * "",
13
- * "Деньги", "Лого «Apple»", "Банкомат", "Банк", "Бургер", "Бургер (белый)", "Календарь 2", "Скруглённый календарь", "Календарь", "Календарь с галочкой", "Календарь белый", "Кред. карта", "Кред. карта под наклоном", "Кред. карта с галочкой", "Карта с драгоценностями", "Деньги внутри кошелька", "Часы", "Крестик", "Кресло", "Кредитные карты", "Скидка", "Документ", "Документ (одноцветный)", "Документ с текстом", "Доллар", "Земля", "Пустой кошелёк с возвратом", "Пустой кошелёк", "Пустой кошелёк (белый)", "Евро", "Геолокация", "Зеркало", "Глобус", "Сетка", "Сетка (белая)", "Диаграмма роста", "Скидка", "JCB", "Лупа", "MasterCard", "Минус", "МИР", "Деньги", "Денежное страхование", "Монитор и мобильный", "Новый документ", "Офис", "Лого «Одноклассники»", "Бизнес", "Проценты (круг.)", "Проценты", "Проценты белые", "Персональная карта", "Лого «PlayMarket»", "Плюс", "Профиль, 2 персоны", "Профиль", "Рубль (круг.)", "Сейф", "Безопасность", "Подписанные документы", "Маленькие часы", "Лого «Telegram»", "UnionPay", "Пользователь", "Visa", "Лого «VK»", "Пополнение карты", "Кошелёк с плюсом", "Кошелёк", "Кошелёк с деньгами"
13
+ * "Деньги", "Лого «Apple»", "Банкомат", "Банк", "Бургер", "Бургер (белый)", "Календарь 2", "Скруглённый календарь", "Календарь", "Календарь с галочкой", "Календарь белый", "Кред. карта", "Кред. карта под наклоном", "Кред. карта с галочкой", "Карта с драгоценностями", "Деньги внутри кошелька", "Часы", "Крестик", "Кресло", "Кредитные карты", "Скидка", "Документ", "Документ (одноцветный)", "Документ с текстом", "Доллар", "Земля", "Пустой кошелёк с возвратом", "Пустой кошелёк", "Пустой кошелёк (белый)", "Евро", "Геолокация", "Зеркало", "Глобус", "Gps", "Сетка", "Сетка (белая)", "Диаграмма роста", "Скидка", "JCB", "Лупа", "MasterCard", "Минус", "МИР", "Деньги", "Денежное страхование", "Монитор и мобильный", "Новый документ", "Офис", "Лого «Одноклассники»", "Бизнес", "Проценты (круг.)", "Проценты", "Проценты белые", "Персональная карта", "Лого «PlayMarket»", "Плюс", "Профиль, 2 персоны", "Профиль", "Рубль (круг.)", "Сейф", "Безопасность", "Подписанные документы", "Маленькие часы", "Лого «Telegram»", "UnionPay", "Пользователь", "Visa", "Лого «VK»", "Пополнение карты", "Кошелёк с плюсом", "Кошелёк", "Кошелёк с деньгами"
14
14
  * ]
15
15
  */
16
- export type IconName = "" | "ActualBalanceIcon" | "AppleIcon" | "AtmIcon" | "BankIcon" | "BurgerIcon" | "BurgerIconWhite" | "Calendar2Icon" | "CalendarCircleIcon" | "CalendarIcon" | "CalendarTickIcon" | "CalendarWhiteIcon" | "CardIcon" | "CardPosIcon" | "CardTickIcon" | "CardWithGemIcon" | "ChartSquareIcon" | "ClockIcon" | "CloseIcon" | "ComfortableCompIcon" | "CreditCardsIcon" | "DiscountShapeIcon" | "DocIcon" | "DocIconMonoColor" | "DocumentTextIcon" | "DollarIcon" | "EarthIcon" | "EmptyWalletChangeIcon" | "EmptyWalletIcon" | "EmptyWalletWhiteIcon" | "EuroIcon" | "GeolocationIcon" | "GlassIcon" | "GlobalIcon" | "GridIcon" | "GridIconWhite" | "InterestGrowthIcon" | "InterestIcon" | "JCBIcon" | "LoupeIcon" | "MasterCardIcon" | "MinusIcon" | "MirIcon" | "MoneyIcon" | "MoneyInsuranceIcon" | "MonitorMobileIcon" | "NewDocIcon" | "OfficeIcon" | "OkIcon" | "PassSendIcon" | "PercentageRoundIcon" | "PercentageSquareIcon" | "PercentageSquareWhiteIcon" | "PersonalCardIcon" | "PlayMarketIcon" | "PlusIcon" | "Profile2UserIcon" | "ProfileIcon" | "RoundRubleIcon" | "SafeIcon" | "ShieldTickIcon" | "SignDocsIcon" | "SmallClockIcon" | "TelegramIcon" | "UnionPayIcon" | "UserTickIcon" | "VisaIcon" | "VKIcon" | "WalletAdd2Icon" | "WalletAddIcon" | "WalletIcon" | "WalletWithMoneyIcon";
16
+ export type IconName = "" | "ActualBalanceIcon" | "AppleIcon" | "AtmIcon" | "BankIcon" | "BurgerIcon" | "BurgerIconWhite" | "Calendar2Icon" | "CalendarCircleIcon" | "CalendarIcon" | "CalendarTickIcon" | "CalendarWhiteIcon" | "CardIcon" | "CardPosIcon" | "CardTickIcon" | "CardWithGemIcon" | "ChartSquareIcon" | "ClockIcon" | "CloseIcon" | "ComfortableCompIcon" | "CreditCardsIcon" | "DiscountShapeIcon" | "DocIcon" | "DocIconMonoColor" | "DocumentTextIcon" | "DollarIcon" | "EarthIcon" | "EmptyWalletChangeIcon" | "EmptyWalletIcon" | "EmptyWalletWhiteIcon" | "EuroIcon" | "GeolocationIcon" | "GlassIcon" | "GlobalIcon" | "GpsIcon" | "GridIcon" | "GridIconWhite" | "InterestGrowthIcon" | "InterestIcon" | "JCBIcon" | "LoupeIcon" | "MasterCardIcon" | "MinusIcon" | "MirIcon" | "MoneyIcon" | "MoneyInsuranceIcon" | "MonitorMobileIcon" | "NewDocIcon" | "OfficeIcon" | "OkIcon" | "PassSendIcon" | "PercentageRoundIcon" | "PercentageSquareIcon" | "PercentageSquareWhiteIcon" | "PersonalCardIcon" | "PlayMarketIcon" | "PlusIcon" | "Profile2UserIcon" | "ProfileIcon" | "RoundRubleIcon" | "SafeIcon" | "ShieldTickIcon" | "SignDocsIcon" | "SmallClockIcon" | "TelegramIcon" | "UnionPayIcon" | "UserTickIcon" | "VisaIcon" | "VKIcon" | "WalletAdd2Icon" | "WalletAddIcon" | "WalletIcon" | "WalletWithMoneyIcon";
@@ -0,0 +1 @@
1
+ export type InputTypes = 'text' | 'number';
@@ -24,7 +24,7 @@ export const context: ContentPageContext = {
24
24
  useAsyncData: (key, fetcher) => {
25
25
  const [data, setData] = useState();
26
26
  useEffect(() => {
27
- fetcher().then((_) => {
27
+ fetcher(key).then((_) => {
28
28
  setData(_);
29
29
  });
30
30
  }, [key, fetcher]);
@@ -9,12 +9,8 @@ export default {
9
9
  <p>Private clients</p>
10
10
  <div className="flex gap-6" data-theme="pc">
11
11
  <Button href="https://www.rshb.ru/" target="_blank" text="Primary" version="primary" />
12
- <Button
13
- href="https://www.rshb.ru/"
14
- target="_blank"
15
- text="Secondary"
16
- version="secondary"
17
- />
12
+ <Button href="https://www.rshb.ru/" target="_blank" text="Link" version="secondary" />
13
+ <Button href="https://www.rshb.ru/" target="_blank" text="Secondary" version="link" />
18
14
  </div>
19
15
  </div>
20
16
  <div>
@@ -0,0 +1,8 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { InputProps } from './InputProps';
3
+
4
+ export const Input = JSX<InputProps>(({ className = '', id, name, type = 'text', placeholder }) => {
5
+ return (
6
+ <input className={className} id={id} name={name || id} type={type} placeholder={placeholder} />
7
+ );
8
+ });
@@ -0,0 +1,9 @@
1
+ import type { InputTypes } from '../../model/InputTypes';
2
+
3
+ export interface InputProps {
4
+ className?: string;
5
+ id?: string;
6
+ name?: string;
7
+ type?: InputTypes;
8
+ placeholder?: string;
9
+ }
@@ -0,0 +1,15 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+
3
+ export interface SelectProps {
4
+ className?: string;
5
+ id?: string;
6
+ name?: string;
7
+ }
8
+
9
+ export const Select = JSX<SelectProps>(({ className = '', id, name, children }) => {
10
+ return (
11
+ <select className={className} id={id} name={name || id}>
12
+ {children}
13
+ </select>
14
+ );
15
+ });
@@ -0,0 +1,14 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+
3
+ export interface SelectOptionProps {
4
+ className?: string;
5
+ value?: string;
6
+ }
7
+
8
+ export const SelectOption = JSX<SelectOptionProps>(({ className = '', value, children }) => {
9
+ return (
10
+ <option className={className} value={`${value}`}>
11
+ {children}
12
+ </option>
13
+ );
14
+ });
@@ -1,10 +1,10 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import { DEFAULT_GAP, DEFAULT_PADDING } from './constants';
3
+ import { SwipeListControlDots } from './SwipeListControlDots';
4
+ import { SwipeListControlList } from './SwipeListControlList';
2
5
  import type { SwipeListControlProps } from './SwipeListControlProps';
3
- import { getScrollPoints } from './utils/getScrollPoints';
4
6
  import { getIndexParts } from './utils/getIndexParts';
5
- import { SwipeListControlList } from './SwipeListControlList';
6
- import { SwipeListControlDots } from './SwipeListControlDots';
7
- import { DEFAULT_GAP, DEFAULT_PADDING } from './constants';
7
+ import { getScrollPoints } from './utils/getScrollPoints';
8
8
 
9
9
  export const SwipeListControl = JSX<SwipeListControlProps>(
10
10
  ({
@@ -14,6 +14,7 @@ export const SwipeListControl = JSX<SwipeListControlProps>(
14
14
  gap = DEFAULT_GAP,
15
15
  padding = DEFAULT_PADDING,
16
16
  showDots = true,
17
+ onSlideChange,
17
18
  }) => {
18
19
  const [activeIndex, setActiveIndex] = context.useState<number>(0);
19
20
  const [indexFraction, setIndexFraction] = context.useState<number>(0);
@@ -35,28 +36,35 @@ export const SwipeListControl = JSX<SwipeListControlProps>(
35
36
  });
36
37
 
37
38
  const { index, fraction } = getIndexParts(scrollLeft, scrollPoints);
39
+ if (index !== activeIndex && onSlideChange) {
40
+ onSlideChange();
41
+ }
38
42
  setActiveIndex(index);
39
43
  setIndexFraction(fraction);
40
44
  };
41
45
 
42
46
  return (
43
47
  <div className={className}>
44
- <SwipeListControlList
45
- gap={gap}
46
- padding={padding}
47
- activeIndex={activeIndex}
48
- onScroll={handleScroll}
49
- >
50
- {children}
51
- </SwipeListControlList>
52
- <SwipeListControlDots
53
- activeIndex={activeIndex}
54
- indexFraction={indexFraction}
55
- showDots={showDots}
56
- >
57
- {children}
58
- </SwipeListControlDots>
48
+ {renderSwipeList({ gap, padding, activeIndex, handleScroll, children })}
49
+ {renderSwipelistDots({ activeIndex, indexFraction, showDots, children })}
59
50
  </div>
60
51
  );
61
52
  },
62
53
  );
54
+
55
+ const renderSwipeList = ({ gap, padding, activeIndex, handleScroll, children }) => (
56
+ <SwipeListControlList
57
+ gap={gap}
58
+ padding={padding}
59
+ activeIndex={activeIndex}
60
+ onScroll={handleScroll}
61
+ >
62
+ {children}
63
+ </SwipeListControlList>
64
+ );
65
+
66
+ const renderSwipelistDots = ({ activeIndex, indexFraction, showDots, children }) => (
67
+ <SwipeListControlDots activeIndex={activeIndex} indexFraction={indexFraction} showDots={showDots}>
68
+ {children}
69
+ </SwipeListControlDots>
70
+ );
@@ -16,4 +16,5 @@ export interface SwipeContainer {
16
16
  export interface SwipeListControlProps extends SwipeContainer, UniBlockProps {
17
17
  /** @title Точки-индикаторы */
18
18
  showDots?: boolean;
19
+ onSlideChange?: () => void;
19
20
  }