@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
@@ -1,6 +1,6 @@
1
1
  import { clamp } from '../../utils/clamp';
2
2
  import { DEFAULT_MAX_SUM, DEFAULT_MIN_SUM, MONTHS_IN_YEAR } from './constants';
3
- import { CalculatorParams } from './CreditCalculatorContent';
3
+ import type { CalculatorParams } from './CreditCalculatorContent';
4
4
 
5
5
  type PaymentType = 'annuity' | 'differentiated';
6
6
 
@@ -0,0 +1,13 @@
1
+ export function renderButton(number: number, i: number, handleClick: (number: number) => void) {
2
+ return (
3
+ <button
4
+ key={String(i)}
5
+ className="bg-secondary-light rounded-3xl h-10 w-[75px] box-border mr-2 flex items-center justify-center cursor-pointer border-none"
6
+ onClick={() => handleClick(number)}
7
+ >
8
+ <span className="font-semibold text-sm">
9
+ {number} {number === 1 ? 'год' : number > 4 ? 'лет' : 'года'}
10
+ </span>
11
+ </button>
12
+ );
13
+ }
@@ -0,0 +1,29 @@
1
+ import { InputRange } from '../../ui-kit/InputRange/InputRange';
2
+ import type { InputRangeProps } from '../../ui-kit/InputRange/InputRangeProps';
3
+
4
+ const STEP_MONTHS = 1;
5
+
6
+ interface RenderMonthsInputProps {
7
+ minMonths: number;
8
+ maxMonths: number;
9
+ monthsValue: number | undefined;
10
+ defaultMonths: number;
11
+ setMonthsValue: InputRangeProps['onChange'];
12
+ }
13
+
14
+ export function renderMonthsInput(props: RenderMonthsInputProps) {
15
+ const { minMonths, maxMonths, monthsValue, defaultMonths, setMonthsValue } = props;
16
+
17
+ return (
18
+ <InputRange
19
+ className="mt-[23px]"
20
+ title="Срок кредита, месяцев"
21
+ items={['Или выберите из предложенных вариантов ниже']}
22
+ min={minMonths}
23
+ max={maxMonths}
24
+ step={STEP_MONTHS}
25
+ value={monthsValue || defaultMonths}
26
+ onChange={setMonthsValue}
27
+ />
28
+ );
29
+ }
@@ -0,0 +1,13 @@
1
+ import { addSpacesBetweenNumbers } from '../../utils/addSpacesBetweenNumbers';
2
+
3
+ export function renderProposal(monthlyPayment: number, rate: number) {
4
+ return (
5
+ <div className="box-border h-fit p-9 bg-primary-main rounded-md text-white">
6
+ <div className="text-base mb-[18px]">Наше предложение</div>
7
+ <div className="text-sm opacity-60">Ежемесячный платёж</div>
8
+ <div className="text-lg mb-3">{addSpacesBetweenNumbers(Math.round(monthlyPayment))} ₽</div>
9
+ <div className="text-sm opacity-60">Ставка</div>
10
+ <div className="text-lg">{rate} %</div>
11
+ </div>
12
+ );
13
+ }
@@ -0,0 +1,16 @@
1
+ import { Button } from '../../ui-kit/Button/Button';
2
+
3
+ export function renderTermsButton() {
4
+ return (
5
+ <div className="flex items-center">
6
+ <Button className="mr-3" text="Отправить заявку" version="primary" href="#" />
7
+ <div
8
+ className="w-80 text-2xs leading-4 text-secondary-text"
9
+ aria-label="Соглашение на обработку персональных данных"
10
+ >
11
+ Отправляя заявку, вы соглашаетесь на обработку персональных данных соответственно
12
+ требованиям ФЗ «О персональных данных»
13
+ </div>
14
+ </div>
15
+ );
16
+ }
@@ -0,0 +1,36 @@
1
+ import { InputRange } from '../../ui-kit/InputRange/InputRange';
2
+ import type { InputRangeProps } from '../../ui-kit/InputRange/InputRangeProps';
3
+ import { addSpacesBetweenNumbers } from '../../utils/addSpacesBetweenNumbers';
4
+ import { DEFAULT_MAX_SUM, DEFAULT_MIN_SUM } from './constants';
5
+ import type { CalculatorParams } from './CreditCalculatorContent';
6
+
7
+ const STEP_MONEY = 1000;
8
+
9
+ interface RenderWantedSumInputProps {
10
+ calculatorParams: CalculatorParams;
11
+ moneyValue: number | undefined;
12
+ defaultSum: number;
13
+ setMoneyValue: InputRangeProps['onChange'];
14
+ }
15
+
16
+ export function renderWantedSumInput(props: RenderWantedSumInputProps) {
17
+ const { calculatorParams, moneyValue, defaultSum, setMoneyValue } = props;
18
+
19
+ const minSum = calculatorParams?.minSum || DEFAULT_MIN_SUM;
20
+ const maxSum = calculatorParams?.maxSum || DEFAULT_MAX_SUM;
21
+
22
+ return (
23
+ <InputRange
24
+ title="Желаемая сумма кредита, ₽"
25
+ items={[
26
+ `От ${addSpacesBetweenNumbers(minSum)} рублей`,
27
+ `До ${addSpacesBetweenNumbers(maxSum)} рублей`,
28
+ ]}
29
+ min={minSum}
30
+ max={maxSum}
31
+ step={STEP_MONEY}
32
+ value={moneyValue || defaultSum}
33
+ onChange={setMoneyValue}
34
+ />
35
+ );
36
+ }
@@ -0,0 +1,47 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { Icon } from '../../ui-kit/Icon/Icon';
3
+ import type { ExchangeCurrencyItem } from './ExchangeRateTileContent';
4
+ import { formatCurrency } from './formatCurrency';
5
+
6
+ const TABLE_HEAD_STYLE = 'text-left font-normal text-sm text-secondary-text';
7
+
8
+ const CURRENCY_ICONS_MAP = {
9
+ USD: 'DollarIcon',
10
+ EUR: 'EuroIcon',
11
+ };
12
+
13
+ interface CurrencyTableProps {
14
+ className?: string;
15
+ exchangeCurrencyItems: ExchangeCurrencyItem[];
16
+ }
17
+
18
+ export const CurrencyTable = JSX<CurrencyTableProps>(({ className, exchangeCurrencyItems }) => {
19
+ return (
20
+ <table className={`h-fit w-fit ${className}`}>
21
+ <thead>
22
+ <tr>
23
+ <th className={TABLE_HEAD_STYLE}>Валюта</th>
24
+ <th className={`${TABLE_HEAD_STYLE} pl-11`}>Купить</th>
25
+ <th className={`${TABLE_HEAD_STYLE} pl-11`}>Продать</th>
26
+ </tr>
27
+ </thead>
28
+ <tbody>{exchangeCurrencyItems.map((item) => renderCurrencyRow(item))}</tbody>
29
+ </table>
30
+ );
31
+ });
32
+
33
+ const renderCurrencyRow = (exchangeCurrencyItem: ExchangeCurrencyItem) => {
34
+ const code = exchangeCurrencyItem?.currency?.currency;
35
+ return (
36
+ <tr key={code}>
37
+ <td className="pt-4">
38
+ <div className="flex items-center">
39
+ {code ? <Icon name={CURRENCY_ICONS_MAP[code]} width="24" height="24" /> : null}
40
+ <span className="ml-2">{code}</span>
41
+ </div>
42
+ </td>
43
+ <td className="pt-4 pl-11">{formatCurrency(exchangeCurrencyItem.buyExchangeRate)}</td>
44
+ <td className="pt-4 pl-11">{formatCurrency(exchangeCurrencyItem.saleExchangeRate)}</td>
45
+ </tr>
46
+ );
47
+ };
@@ -0,0 +1,22 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { Icon } from '../../ui-kit/Icon/Icon';
3
+
4
+ interface CurrentLocationProps {
5
+ className?: string;
6
+ address?: string;
7
+ distance?: string;
8
+ }
9
+
10
+ export const CurrentLocation = JSX<CurrentLocationProps>(
11
+ ({ className = '', address, distance }) => (
12
+ <div className={`flex text-sm ${className}`}>
13
+ <Icon className="min-w-fit" name="GpsIcon" width="24" height="24" asSVG />
14
+ <div className="ml-1.5">
15
+ {address ? <p className="m-0">{address}</p> : null}
16
+ {distance ? (
17
+ <p className="text-secondary-text m-0">Курс указан для ближайшего офиса - {distance}</p>
18
+ ) : null}
19
+ </div>
20
+ </div>
21
+ ),
22
+ );
@@ -0,0 +1,47 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { Button } from '../../ui-kit/Button/Button';
3
+ import { Input } from '../../ui-kit/Input/Input';
4
+ import { Select } from '../../ui-kit/Select/Select';
5
+ import { SelectOption } from '../../ui-kit/Select/SelectOption';
6
+ import type { ExchangeCurrencyItem } from './ExchangeRateTileContent';
7
+
8
+ export interface ExchangeCurrencyCalculatorProps {
9
+ exchangeCurrencyItems: ExchangeCurrencyItem[];
10
+ codes: string[];
11
+ className?: string;
12
+ }
13
+
14
+ export const ExchangeCurrencyCalculator = JSX<ExchangeCurrencyCalculatorProps>(
15
+ ({ codes, className = '' }) => {
16
+ return (
17
+ <div className={`grid gap-3.5 ${className}`}>
18
+ {renderInput('Хочу продать', codes)}
19
+ {renderInput('Получу', codes)}
20
+ <Button className="box-border mt-3.5 py-3 h-12 w-44" version="primary" href="#">
21
+ Купить валюту
22
+ </Button>
23
+ </div>
24
+ );
25
+ },
26
+ );
27
+
28
+ function renderInput(placeholder: string, codes: string[]) {
29
+ return (
30
+ <div className="flex items-center">
31
+ <Input
32
+ className="h-10 border pl-2.5 rounded-md text-m-sm w-full appearance-none"
33
+ type="number"
34
+ placeholder={`${placeholder}`}
35
+ />
36
+ {codes.length ? (
37
+ <Select className="h-9 -translate-x-16">
38
+ {codes.map((code, i) => (
39
+ <SelectOption key={String(i)} value={code}>
40
+ {code}
41
+ </SelectOption>
42
+ ))}
43
+ </Select>
44
+ ) : null}
45
+ </div>
46
+ );
47
+ }
@@ -1,104 +1,73 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import { useExchangeRates } from '../../hooks/useExchangeRates';
2
3
  import type { UniBlockProps } from '../../types';
3
- import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
4
- import { ButtonSection } from '../../ui-kit/Button/ButtonSection';
5
4
  import { Heading } from '../../ui-kit/Heading/Heading';
6
- import { Icon } from '../../ui-kit/Icon/Icon';
7
5
  import { BaseTile } from '../BaseTile/BaseTile';
8
6
  import { getTileHeadingType } from '../BaseTile/getTileHeadingType';
9
- import { getTileMinHeight } from '../BaseTile/getTileMinHeight';
10
- import { getTileRightPadding } from '../BaseTile/getTileRightPadding';
7
+ import { CurrencyTable } from './CurrencyTable';
8
+ import { CurrentLocation } from './CurrentLocation';
9
+ import { ExchangeCurrencyCalculator } from './ExchangeCurrencyCalculator';
11
10
  import type { ExchangeRateTileContent } from './ExchangeRateTileContent';
12
11
 
13
- export interface ExchangeRateTileProps extends ExchangeRateTileContent, UniBlockProps {}
14
-
15
- const CBR_EXCHANGE_RATE_URL = 'https://www.cbr-xml-daily.ru/daily_json.js';
16
-
17
12
  const CURRENCY_CODES = ['USD', 'EUR'];
18
- const CURRENCY_ICONS_MAP = {
19
- USD: 'DollarIcon',
20
- EUR: 'EuroIcon',
21
- };
22
-
23
- const buttons: ButtonProps[] = [
13
+ const EXCHANGE_CODES = ['RUB', 'USD', 'EUR'];
14
+ const DEFAULT_CURRENCY_ITEMS = [
24
15
  {
25
- text: 'Все показатели',
26
- href: 'https://cbr.ru/currency_base/daily/',
27
- version: 'secondary',
16
+ buyExchangeRate: 90.6,
17
+ saleExchangeRate: 92.8,
18
+ currency: { id: 2, code: '978', currency: 'EUR', name: 'Евро' },
19
+ },
20
+ {
21
+ buyExchangeRate: 73.75,
22
+ saleExchangeRate: 75.95,
23
+ currency: { id: 1, code: '840', currency: 'USD', name: 'Американский доллар' },
28
24
  },
29
25
  ];
30
26
 
27
+ const DEFAULT_LOCATION = {
28
+ address: 'Москва, ул.Ленина д.28',
29
+ distance: '6км',
30
+ };
31
+
32
+ export interface ExchangeRateTileProps extends ExchangeRateTileContent, UniBlockProps {}
33
+
31
34
  export const ExchangeRateTile = JSX<ExchangeRateTileProps>(
32
35
  ({ className = '', context, title = 'Курсы обмена валют' }) => {
33
- const { data } = context.useAsyncData(CBR_EXCHANGE_RATE_URL, fetchExchangeRate);
36
+ const data = useExchangeRates(context.useAsyncData);
37
+ const exchangeCurrencyItems =
38
+ data?.exchangeRate?.currencies?.filter((item) => {
39
+ return CURRENCY_CODES.indexOf(item?.currency?.currency || '') !== -1;
40
+ }) || DEFAULT_CURRENCY_ITEMS;
41
+
34
42
  return (
35
- <section
36
- className={`bg-white text-primary-text font-sans p-9 box-border ${className} ${getTileRightPadding(
37
- className,
38
- )} ${getTileMinHeight(className)} `}
39
- >
43
+ <section className={`bg-white text-primary-text font-sans p-9 box-border ${className}`}>
40
44
  <BaseTile
41
45
  context={context}
42
46
  title={
43
- title && (
44
- <Heading
45
- headingType={getTileHeadingType(className)}
46
- title={title}
47
- className={`whitespace-pre-wrap max-w-[600px] ${title ? 'mb-3' : ''}`}
48
- />
49
- )
50
- }
51
- buttons={
52
- buttons?.length ? (
53
- <ButtonSection context={context} buttons={buttons} className="flex mt-9 gap-3" />
54
- ) : null
47
+ <Heading
48
+ headingType={getTileHeadingType(className)}
49
+ title={title}
50
+ className="whitespace-pre-wrap mb-3"
51
+ />
55
52
  }
56
53
  >
57
- <table>
58
- <thead>
59
- <tr>
60
- <CurrencyTH>Валюта</CurrencyTH>
61
- <CurrencyTH className="pl-11">Курс</CurrencyTH>
62
- </tr>
63
- </thead>
64
- <tbody>{CURRENCY_CODES.map(renderCurrencyRow(data))}</tbody>
65
- </table>
54
+ <div className="flex">
55
+ <div className="mr-20 pt-3">
56
+ {exchangeCurrencyItems ? (
57
+ <CurrencyTable className="mb-7" exchangeCurrencyItems={exchangeCurrencyItems} />
58
+ ) : null}
59
+ <CurrentLocation {...DEFAULT_LOCATION} />
60
+ </div>
61
+ {exchangeCurrencyItems?.length ? (
62
+ <ExchangeCurrencyCalculator
63
+ className="grow"
64
+ exchangeCurrencyItems={exchangeCurrencyItems}
65
+ codes={EXCHANGE_CODES}
66
+ />
67
+ ) : null}
68
+ </div>
66
69
  </BaseTile>
67
70
  </section>
68
71
  );
69
72
  },
70
73
  );
71
-
72
- const CurrencyTH = JSX<{ className?: string }>(({ className = '', children }) => (
73
- <th className={`text-left font-normal text-sm text-secondary-text ${className}`}>{children}</th>
74
- ));
75
-
76
- const CurrencyTD = JSX<{ className?: string }>(({ className = '', children }) => (
77
- <td className={`text-left font-normal text-base text-primary-text ${className}`}>{children}</td>
78
- ));
79
-
80
- async function fetchExchangeRate(): Promise<{
81
- Valute?: Record<string, { CharCode: string; Name?: string; Value: number; Previous?: number }>;
82
- }> {
83
- const response = await fetch(CBR_EXCHANGE_RATE_URL);
84
- return await response.json();
85
- }
86
-
87
- const currencyNumberFormat = new Intl.NumberFormat('ru', { style: 'currency', currency: 'RUB' });
88
-
89
- const formatCurrency = (value?: number) => (value ? currencyNumberFormat.format(value) : '');
90
-
91
- const renderCurrencyRow = (data) => (code: string) => {
92
- const value = (data?.Valute || {})[code]?.Value;
93
- return (
94
- <tr key={code}>
95
- <CurrencyTD className="pt-4">
96
- <div className="flex items-center">
97
- <Icon name={CURRENCY_ICONS_MAP[code]} width="24" height="24" />
98
- <span className="ml-2">{code}</span>
99
- </div>
100
- </CurrencyTD>
101
- <CurrencyTD className="pt-4 pl-11">{formatCurrency(value)}</CurrencyTD>
102
- </tr>
103
- );
104
- };
@@ -4,3 +4,14 @@ import type { HeadingContent } from '../../ui-kit/Heading/HeadingContent';
4
4
  * @title Курсы валют
5
5
  */
6
6
  export type ExchangeRateTileContent = HeadingContent;
7
+
8
+ export interface ExchangeCurrencyItem {
9
+ buyExchangeRate?: number;
10
+ saleExchangeRate?: number;
11
+ currency?: {
12
+ id?: number;
13
+ code?: string;
14
+ currency?: string;
15
+ name?: string;
16
+ };
17
+ }
@@ -0,0 +1,3 @@
1
+ const currencyNumberFormat = new Intl.NumberFormat('ru', { style: 'currency', currency: 'RUB' });
2
+
3
+ export const formatCurrency = (value?: number) => (value ? currencyNumberFormat.format(value) : '');
@@ -2,12 +2,12 @@ import { JSX } from '@redneckz/uni-jsx';
2
2
  import { BlockVersion } from '../../model/BlockVersion';
3
3
  import { Button } from '../../ui-kit/Button/Button';
4
4
  import { Heading } from '../../ui-kit/Heading/Heading';
5
+ import { Icon } from '../../ui-kit/Icon/Icon';
5
6
  import { Img } from '../../ui-kit/Img/Img';
6
7
  import { SwipeListControl } from '../../ui-kit/SwipeListControl/SwipeListControl';
7
8
  import type { GalleryCard } from './GalleryContent';
8
9
  import { GalleryItem } from './GalleryContent';
9
10
  import type { GalleryProps } from './GalleryProps';
10
- import { Icon } from '../../ui-kit/Icon/Icon';
11
11
 
12
12
  const blockStyle: Record<BlockVersion, string> = {
13
13
  primary: 'bg-white',
@@ -57,7 +57,7 @@ function renderCard(card: GalleryCard, key: number) {
57
57
  {card.description ? renderDescription(card) : null}
58
58
  {card.items?.length ? renderItems(card.items) : null}
59
59
  </div>
60
- {card?.button?.href ? renderButton(card.button) : null}
60
+ {card?.button?.text ? renderButton(card.button) : null}
61
61
  </div>
62
62
  );
63
63
  }
@@ -35,7 +35,7 @@ export const Header = JSX<HeaderProps>(
35
35
  <div className="container px-4 py-0 box-border">
36
36
  <HeaderTop onClick={toggleBurgerMenu} bgColor={bgColor} />
37
37
  <nav className="flex items-center m-0 p-0 overflow-y-hidden w-full h-[50px]">
38
- <div className="flex">
38
+ <div className="flex no-scrollbar horizontal-list h-full items-center">
39
39
  {subItems?.map((_, i) =>
40
40
  renderSubItem(
41
41
  {
@@ -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
  }
@@ -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)}
@@ -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]);
@@ -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
+ }