@redneckz/wildless-cms-uni-blocks 0.3.2 → 0.3.5

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 (256) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +9 -9
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/cosmos-static/icons/ActualBalanceIcon.svg +1 -0
  5. package/cosmos-static/icons/AppleIcon.svg +1 -0
  6. package/cosmos-static/icons/AtmIcon.svg +1 -0
  7. package/cosmos-static/icons/BankIcon.svg +1 -0
  8. package/cosmos-static/icons/BurgerIcon.svg +1 -0
  9. package/cosmos-static/icons/BurgerIconWhite.svg +1 -0
  10. package/cosmos-static/icons/Calendar2Icon.svg +1 -0
  11. package/cosmos-static/icons/CalendarCircleIcon.svg +1 -0
  12. package/cosmos-static/icons/CalendarIcon.svg +1 -0
  13. package/cosmos-static/icons/CalendarTickIcon.svg +1 -0
  14. package/cosmos-static/icons/CalendarWhiteIcon.svg +1 -0
  15. package/cosmos-static/icons/CardIcon.svg +1 -0
  16. package/cosmos-static/icons/CardPosIcon.svg +1 -0
  17. package/cosmos-static/icons/CardTickIcon.svg +1 -0
  18. package/cosmos-static/icons/CardWithGemIcon.svg +1 -0
  19. package/cosmos-static/icons/ChartSquareIcon.svg +1 -0
  20. package/cosmos-static/icons/ClockIcon.svg +1 -0
  21. package/cosmos-static/icons/CloseIcon.svg +1 -0
  22. package/cosmos-static/icons/ComfortableCompIcon.svg +1 -0
  23. package/cosmos-static/icons/CreditCardsIcon.svg +1 -0
  24. package/cosmos-static/icons/DiscountShapeIcon.svg +1 -0
  25. package/cosmos-static/icons/DocIcon.svg +1 -0
  26. package/cosmos-static/icons/DocIconMonoColor.svg +1 -0
  27. package/cosmos-static/icons/DocumentTextIcon.svg +1 -0
  28. package/cosmos-static/icons/DollarIcon.svg +1 -0
  29. package/cosmos-static/icons/EarthIcon.svg +1 -0
  30. package/cosmos-static/icons/EmptyWalletChangeIcon.svg +1 -0
  31. package/cosmos-static/icons/EmptyWalletIcon.svg +1 -0
  32. package/cosmos-static/icons/EmptyWalletWhiteIcon.svg +1 -0
  33. package/cosmos-static/icons/EuroIcon.svg +1 -0
  34. package/cosmos-static/icons/GeolocationIcon.svg +1 -0
  35. package/cosmos-static/icons/GlassIcon.svg +1 -0
  36. package/cosmos-static/icons/GlobalIcon.svg +1 -0
  37. package/cosmos-static/icons/GridIcon.svg +1 -0
  38. package/cosmos-static/icons/GridIconWhite.svg +1 -0
  39. package/cosmos-static/icons/InterestGrowthIcon.svg +1 -0
  40. package/cosmos-static/icons/InterestIcon.svg +1 -0
  41. package/cosmos-static/icons/JCBIcon.svg +1 -0
  42. package/cosmos-static/icons/LoupeIcon.svg +1 -0
  43. package/cosmos-static/icons/MasterCardIcon.svg +1 -0
  44. package/cosmos-static/icons/MinusIcon.svg +1 -0
  45. package/cosmos-static/icons/MirIcon.svg +1 -0
  46. package/cosmos-static/icons/MoneyIcon.svg +1 -0
  47. package/cosmos-static/icons/MoneyInsuranceIcon.svg +1 -0
  48. package/cosmos-static/icons/MonitorMobileIcon.svg +1 -0
  49. package/cosmos-static/icons/NewDocIcon.svg +1 -0
  50. package/cosmos-static/icons/OfficeIcon.svg +1 -0
  51. package/cosmos-static/icons/OkIcon.svg +1 -0
  52. package/cosmos-static/icons/PassSendIcon.svg +1 -0
  53. package/cosmos-static/icons/PercentageRoundIcon.svg +1 -0
  54. package/cosmos-static/icons/PercentageSquareIcon.svg +1 -0
  55. package/cosmos-static/icons/PercentageSquareWhiteIcon.svg +1 -0
  56. package/cosmos-static/icons/PersonalCardIcon.svg +1 -0
  57. package/cosmos-static/icons/PlayMarketIcon.svg +1 -0
  58. package/cosmos-static/icons/PlusIcon.svg +1 -0
  59. package/cosmos-static/icons/Profile2UserIcon.svg +1 -0
  60. package/cosmos-static/icons/ProfileIcon.svg +1 -0
  61. package/cosmos-static/icons/RoundRubleIcon.svg +1 -0
  62. package/cosmos-static/icons/SafeIcon.svg +1 -0
  63. package/cosmos-static/icons/ShieldTickIcon.svg +1 -0
  64. package/cosmos-static/icons/SignDocsIcon.svg +1 -0
  65. package/cosmos-static/icons/SmallClockIcon.svg +1 -0
  66. package/cosmos-static/icons/TelegramIcon.svg +1 -0
  67. package/cosmos-static/icons/UnionPayIcon.svg +1 -0
  68. package/cosmos-static/icons/UserTickIcon.svg +1 -0
  69. package/cosmos-static/icons/VKIcon.svg +1 -0
  70. package/cosmos-static/icons/VisaIcon.svg +1 -0
  71. package/cosmos-static/icons/WalletAdd2Icon.svg +1 -0
  72. package/cosmos-static/icons/WalletAddIcon.svg +1 -0
  73. package/cosmos-static/icons/WalletIcon.svg +1 -0
  74. package/cosmos-static/icons/WalletWithMoneyIcon.svg +1 -0
  75. package/dist/components/Accordion/utils/isActiveHandler.js +1 -1
  76. package/dist/components/Accordion/utils/isActiveHandler.js.map +1 -1
  77. package/dist/components/Blocks.mobile.d.ts +3 -1
  78. package/dist/components/Blocks.mobile.js +5 -1
  79. package/dist/components/Blocks.mobile.js.map +1 -1
  80. package/dist/components/ContentPage/ContentPage.js +2 -2
  81. package/dist/components/ContentPage/ContentPage.js.map +1 -1
  82. package/dist/components/ContentPage/isBlockInRegistry.d.ts +1 -2
  83. package/dist/components/ContentPage/isBlockInRegistry.js +2 -2
  84. package/dist/components/ContentPage/isBlockInRegistry.js.map +1 -1
  85. package/dist/components/ContentPage/normalizeBlock.d.ts +1 -1
  86. package/dist/components/ContentPage/normalizePage.js +1 -1
  87. package/dist/components/ContentPage/normalizePage.js.map +1 -1
  88. package/dist/components/ContentPage/normalizePage.mobile.js +1 -1
  89. package/dist/components/ContentPage/normalizePage.mobile.js.map +1 -1
  90. package/dist/components/Gallery/GalleryCardInner.js +1 -1
  91. package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
  92. package/dist/components/Headline/HeadlineContent.d.ts +1 -1
  93. package/dist/components/MobileAppTile/MobileAppTileContent.d.ts +1 -1
  94. package/dist/components/Placeholder/Placeholder.js +8 -3
  95. package/dist/components/Placeholder/Placeholder.js.map +1 -1
  96. package/dist/components/Placeholder/PlaceholderContent.d.ts +2 -1
  97. package/dist/components/ProductBlock/ProductBlockContent.d.ts +1 -1
  98. package/dist/components/ProductTile/ProductTileContent.d.ts +1 -1
  99. package/dist/components/PromoTile/PromoTileContent.d.ts +1 -1
  100. package/dist/components/Tile/TileContent.d.ts +1 -1
  101. package/dist/types.d.ts +1 -1
  102. package/dist/ui-kit/Description/Description.d.ts +4 -1
  103. package/dist/ui-kit/Description/Description.js.map +1 -1
  104. package/{lib/ui-kit/Description/DescriptionProps.d.ts → dist/ui-kit/Description/DescriptionContent.d.ts} +0 -3
  105. package/dist/ui-kit/Description/{DescriptionProps.js → DescriptionContent.js} +1 -1
  106. package/dist/ui-kit/Description/DescriptionContent.js.map +1 -0
  107. package/lib/common.css +1 -1
  108. package/lib/components/Accordion/utils/isActiveHandler.js +1 -1
  109. package/lib/components/Accordion/utils/isActiveHandler.js.map +1 -1
  110. package/lib/components/Blocks.mobile.d.ts +3 -1
  111. package/lib/components/Blocks.mobile.js +5 -1
  112. package/lib/components/Blocks.mobile.js.map +1 -1
  113. package/lib/components/ContentPage/ContentPage.js +2 -2
  114. package/lib/components/ContentPage/ContentPage.js.map +1 -1
  115. package/lib/components/ContentPage/isBlockInRegistry.d.ts +1 -2
  116. package/lib/components/ContentPage/isBlockInRegistry.js +2 -2
  117. package/lib/components/ContentPage/isBlockInRegistry.js.map +1 -1
  118. package/lib/components/ContentPage/normalizeBlock.d.ts +1 -1
  119. package/lib/components/ContentPage/normalizePage.js +1 -1
  120. package/lib/components/ContentPage/normalizePage.js.map +1 -1
  121. package/lib/components/ContentPage/normalizePage.mobile.js +1 -1
  122. package/lib/components/ContentPage/normalizePage.mobile.js.map +1 -1
  123. package/lib/components/Gallery/GalleryCardInner.js +1 -1
  124. package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
  125. package/lib/components/Headline/HeadlineContent.d.ts +1 -1
  126. package/lib/components/MobileAppTile/MobileAppTileContent.d.ts +1 -1
  127. package/lib/components/Placeholder/Placeholder.fixture.mobile.d.ts +2 -0
  128. package/lib/components/Placeholder/Placeholder.js +9 -4
  129. package/lib/components/Placeholder/Placeholder.js.map +1 -1
  130. package/lib/components/Placeholder/PlaceholderContent.d.ts +2 -1
  131. package/lib/components/ProductBlock/ProductBlockContent.d.ts +1 -1
  132. package/lib/components/ProductTile/ProductTileContent.d.ts +1 -1
  133. package/lib/components/PromoTile/PromoTileContent.d.ts +1 -1
  134. package/lib/components/Tile/TileContent.d.ts +1 -1
  135. package/lib/types.d.ts +1 -1
  136. package/lib/ui-kit/Description/Description.d.ts +4 -1
  137. package/lib/ui-kit/Description/Description.js.map +1 -1
  138. package/{mobile/dist/ui-kit/Description/DescriptionProps.d.ts → lib/ui-kit/Description/DescriptionContent.d.ts} +0 -3
  139. package/lib/ui-kit/Description/DescriptionContent.js +2 -0
  140. package/lib/ui-kit/Description/DescriptionContent.js.map +1 -0
  141. package/mobile/bundle/bundle.umd.js +204 -202
  142. package/mobile/bundle/bundle.umd.min.js +1 -1
  143. package/mobile/dist/components/Accordion/utils/isActiveHandler.js +1 -1
  144. package/mobile/dist/components/Accordion/utils/isActiveHandler.js.map +1 -1
  145. package/mobile/dist/components/Blocks.d.ts +3 -1
  146. package/mobile/dist/components/Blocks.js +5 -1
  147. package/mobile/dist/components/Blocks.js.map +1 -1
  148. package/mobile/dist/components/ContentPage/ContentPage.js +2 -2
  149. package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
  150. package/mobile/dist/components/ContentPage/isBlockInRegistry.d.ts +1 -2
  151. package/mobile/dist/components/ContentPage/isBlockInRegistry.js +2 -2
  152. package/mobile/dist/components/ContentPage/isBlockInRegistry.js.map +1 -1
  153. package/mobile/dist/components/ContentPage/normalizePage.js +1 -1
  154. package/mobile/dist/components/ContentPage/normalizePage.js.map +1 -1
  155. package/mobile/dist/components/Gallery/GalleryCardInner.js +1 -1
  156. package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
  157. package/mobile/dist/components/Headline/HeadlineContent.d.ts +1 -1
  158. package/mobile/dist/components/MobileAppTile/MobileAppTileContent.d.ts +1 -1
  159. package/mobile/dist/components/Placeholder/Placeholder.d.ts +1 -1
  160. package/mobile/dist/components/Placeholder/Placeholder.js +8 -3
  161. package/mobile/dist/components/Placeholder/Placeholder.js.map +1 -1
  162. package/mobile/dist/components/Placeholder/PlaceholderContent.d.ts +2 -1
  163. package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +1 -1
  164. package/mobile/dist/components/ProductTile/ProductTileContent.d.ts +1 -1
  165. package/mobile/dist/components/PromoTile/PromoTileContent.d.ts +1 -1
  166. package/mobile/dist/components/Tile/TileContent.d.ts +1 -1
  167. package/mobile/dist/types.d.ts +1 -1
  168. package/mobile/dist/ui-kit/Description/Description.d.ts +4 -1
  169. package/mobile/dist/ui-kit/Description/Description.js.map +1 -1
  170. package/mobile/{lib/ui-kit/Description/DescriptionProps.d.ts → dist/ui-kit/Description/DescriptionContent.d.ts} +0 -3
  171. package/mobile/dist/ui-kit/Description/{DescriptionProps.js → DescriptionContent.js} +1 -1
  172. package/mobile/dist/ui-kit/Description/DescriptionContent.js.map +1 -0
  173. package/mobile/lib/components/Accordion/utils/isActiveHandler.js +1 -1
  174. package/mobile/lib/components/Accordion/utils/isActiveHandler.js.map +1 -1
  175. package/mobile/lib/components/Blocks.d.ts +3 -1
  176. package/mobile/lib/components/Blocks.js +5 -1
  177. package/mobile/lib/components/Blocks.js.map +1 -1
  178. package/mobile/lib/components/ContentPage/ContentPage.js +2 -2
  179. package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
  180. package/mobile/lib/components/ContentPage/isBlockInRegistry.d.ts +1 -2
  181. package/mobile/lib/components/ContentPage/isBlockInRegistry.js +2 -2
  182. package/mobile/lib/components/ContentPage/isBlockInRegistry.js.map +1 -1
  183. package/mobile/lib/components/ContentPage/normalizePage.js +1 -1
  184. package/mobile/lib/components/ContentPage/normalizePage.js.map +1 -1
  185. package/mobile/lib/components/Gallery/GalleryCardInner.js +1 -1
  186. package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
  187. package/mobile/lib/components/Headline/HeadlineContent.d.ts +1 -1
  188. package/mobile/lib/components/MobileAppTile/MobileAppTileContent.d.ts +1 -1
  189. package/mobile/lib/components/Placeholder/Placeholder.d.ts +1 -1
  190. package/mobile/lib/components/Placeholder/Placeholder.js +9 -4
  191. package/mobile/lib/components/Placeholder/Placeholder.js.map +1 -1
  192. package/mobile/lib/components/Placeholder/PlaceholderContent.d.ts +2 -1
  193. package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +1 -1
  194. package/mobile/lib/components/ProductTile/ProductTileContent.d.ts +1 -1
  195. package/mobile/lib/components/PromoTile/PromoTileContent.d.ts +1 -1
  196. package/mobile/lib/components/Tile/TileContent.d.ts +1 -1
  197. package/mobile/lib/types.d.ts +1 -1
  198. package/mobile/lib/ui-kit/Description/Description.d.ts +4 -1
  199. package/mobile/lib/ui-kit/Description/Description.js.map +1 -1
  200. package/{dist/ui-kit/Description/DescriptionProps.d.ts → mobile/lib/ui-kit/Description/DescriptionContent.d.ts} +0 -3
  201. package/mobile/lib/ui-kit/Description/DescriptionContent.js +2 -0
  202. package/mobile/lib/ui-kit/Description/DescriptionContent.js.map +1 -0
  203. package/mobile/src/components/Accordion/utils/isActiveHandler.ts +1 -2
  204. package/mobile/src/components/Blocks.ts +5 -1
  205. package/mobile/src/components/ContentPage/ContentPage.page.json +37 -43
  206. package/mobile/src/components/ContentPage/ContentPage.tsx +2 -2
  207. package/mobile/src/components/ContentPage/isBlockInRegistry.ts +2 -4
  208. package/mobile/src/components/ContentPage/normalizePage.ts +4 -1
  209. package/mobile/src/components/Gallery/GalleryCardInner.tsx +1 -1
  210. package/mobile/src/components/Headline/HeadlineContent.ts +1 -1
  211. package/mobile/src/components/MobileAppTile/MobileAppTileContent.ts +1 -1
  212. package/mobile/src/components/Placeholder/Placeholder.tsx +36 -14
  213. package/mobile/src/components/Placeholder/PlaceholderContent.ts +2 -1
  214. package/mobile/src/components/ProductBlock/ProductBlockContent.ts +1 -1
  215. package/mobile/src/components/ProductTile/ProductTileContent.ts +1 -1
  216. package/mobile/src/components/PromoTile/PromoTileContent.ts +1 -1
  217. package/mobile/src/components/Tile/TileContent.ts +1 -1
  218. package/mobile/src/types.ts +1 -1
  219. package/mobile/src/ui-kit/Description/Description.tsx +5 -1
  220. package/mobile/src/ui-kit/Description/{DescriptionProps.ts → DescriptionContent.ts} +0 -4
  221. package/package.json +4 -5
  222. package/src/components/Accordion/utils/isActiveHandler.ts +1 -2
  223. package/src/components/Blocks.mobile.ts +5 -1
  224. package/src/components/ContentPage/ContentPage.page.json +37 -43
  225. package/src/components/ContentPage/ContentPage.tsx +2 -2
  226. package/src/components/ContentPage/isBlockInRegistry.ts +2 -4
  227. package/src/components/ContentPage/normalizePage.mobile.ts +4 -1
  228. package/src/components/ContentPage/normalizePage.ts +1 -1
  229. package/src/components/Gallery/GalleryCardInner.tsx +1 -1
  230. package/src/components/Headline/HeadlineContent.ts +1 -1
  231. package/src/components/MobileAppTile/MobileAppTileContent.ts +1 -1
  232. package/src/components/Placeholder/Placeholder.fixture.mobile.tsx +9 -0
  233. package/src/components/Placeholder/Placeholder.tsx +35 -8
  234. package/src/components/Placeholder/PlaceholderContent.ts +2 -1
  235. package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +6 -0
  236. package/src/components/ProductBlock/ProductBlockContent.ts +1 -1
  237. package/src/components/ProductGallery/ProductGallery.fixture.mobile.tsx +8 -0
  238. package/src/components/ProductTile/ProductTileContent.ts +1 -1
  239. package/src/components/PromoTile/PromoTileContent.ts +1 -1
  240. package/src/components/Tile/TileContent.ts +1 -1
  241. package/src/types.ts +1 -1
  242. package/src/ui-kit/Description/Description.tsx +5 -1
  243. package/src/ui-kit/Description/{DescriptionProps.ts → DescriptionContent.ts} +0 -4
  244. package/dist/components/Placeholder/Placeholder.mobile.d.ts +0 -6
  245. package/dist/components/Placeholder/Placeholder.mobile.js +0 -15
  246. package/dist/components/Placeholder/Placeholder.mobile.js.map +0 -1
  247. package/dist/ui-kit/Description/DescriptionProps.js.map +0 -1
  248. package/lib/components/Placeholder/Placeholder.mobile.d.ts +0 -6
  249. package/lib/components/Placeholder/Placeholder.mobile.js +0 -13
  250. package/lib/components/Placeholder/Placeholder.mobile.js.map +0 -1
  251. package/lib/ui-kit/Description/DescriptionProps.js +0 -2
  252. package/lib/ui-kit/Description/DescriptionProps.js.map +0 -1
  253. package/mobile/dist/ui-kit/Description/DescriptionProps.js.map +0 -1
  254. package/mobile/lib/ui-kit/Description/DescriptionProps.js +0 -2
  255. package/mobile/lib/ui-kit/Description/DescriptionProps.js.map +0 -1
  256. package/src/components/Placeholder/Placeholder.mobile.tsx +0 -35
@@ -1,5 +1,6 @@
1
+ import type { DescriptionContent } from '../../ui-kit/Description/DescriptionContent';
1
2
  import type { HeadingContent } from '../../ui-kit/Heading/HeadingContent';
2
3
  /**
3
4
  * @hidden
4
5
  */
5
- export declare type PlaceholderContent = HeadingContent;
6
+ export declare type PlaceholderContent = HeadingContent & DescriptionContent;
@@ -1,7 +1,7 @@
1
1
  import type { BlockVersion } from '../../model/BlockVersion';
2
2
  import type { LinkProps } from '../../model/LinkProps';
3
3
  import type { ButtonContent } from '../../ui-kit/Button/ButtonProps';
4
- import type { DescriptionContent } from '../../ui-kit/Description/DescriptionProps';
4
+ import type { DescriptionContent } from '../../ui-kit/Description/DescriptionContent';
5
5
  import type { HeadingContent, HeadingTypeContent } from '../../ui-kit/Heading/HeadingContent';
6
6
  import type { ImageContent } from '../../ui-kit/Img/ImgProps';
7
7
  import type { ListContent } from '../../ui-kit/List/ListContent';
@@ -1,6 +1,6 @@
1
1
  import type { BlockVersion } from '../../model/BlockVersion';
2
2
  import type { ButtonContent } from '../../ui-kit/Button/ButtonProps';
3
- import type { DescriptionContent } from '../../ui-kit/Description/DescriptionProps';
3
+ import type { DescriptionContent } from '../../ui-kit/Description/DescriptionContent';
4
4
  import type { HeadingContent } from '../../ui-kit/Heading/HeadingContent';
5
5
  import type { ImageContent } from '../../ui-kit/Img/ImgProps';
6
6
  import type { TextBenefit } from '../BenefitsBlock/BenefitsBlockContent';
@@ -1,6 +1,6 @@
1
1
  import type { BlockVersion } from '../../model/BlockVersion';
2
2
  import type { ButtonContent } from '../../ui-kit/Button/ButtonProps';
3
- import type { DescriptionContent } from '../../ui-kit/Description/DescriptionProps';
3
+ import type { DescriptionContent } from '../../ui-kit/Description/DescriptionContent';
4
4
  import type { HeadingContent } from '../../ui-kit/Heading/HeadingContent';
5
5
  /**
6
6
  * @title Акции
@@ -1,6 +1,6 @@
1
1
  import type { BlockVersion } from '../../model/BlockVersion';
2
2
  import type { ButtonContent } from '../../ui-kit/Button/ButtonProps';
3
- import type { DescriptionContent } from '../../ui-kit/Description/DescriptionProps';
3
+ import type { DescriptionContent } from '../../ui-kit/Description/DescriptionContent';
4
4
  import type { HeadingContent } from '../../ui-kit/Heading/HeadingContent';
5
5
  import type { ImageContent } from '../../ui-kit/Img/ImgProps';
6
6
  import type { ListContent } from '../../ui-kit/List/ListContent';
package/lib/types.d.ts CHANGED
@@ -3,7 +3,7 @@ import type { ContentPageContext } from './components/ContentPage/ContentPageCon
3
3
  import type { BlockVersion } from './model/BlockVersion';
4
4
  export declare type ColorPalette = 'pc' | 'bc' | 'eo' | 'eo2' | 'eo3' | 'eo4';
5
5
  export interface BaseBlockDef {
6
- type: string;
6
+ type?: string;
7
7
  style?: string[];
8
8
  content?: BlockContent;
9
9
  version?: BlockVersion;
@@ -1,2 +1,5 @@
1
- import { DescriptionProps } from './DescriptionProps';
1
+ import { DescriptionContent } from './DescriptionContent';
2
+ export interface DescriptionProps extends DescriptionContent {
3
+ className?: string;
4
+ }
2
5
  export declare const Description: (props: import("@redneckz/uni-jsx").PropsWithChildren<DescriptionProps, any>, context?: any) => any;
@@ -1 +1 @@
1
- {"version":3,"file":"Description.js","sourceRoot":"","sources":["../../../src/ui-kit/Description/Description.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGxC,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAmB,CAAC,KAAK,EAAE,EAAE;IACzD,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAEzC,OAAO,cAAK,SAAS,EAAE,yBAAyB,SAAS,IAAI,EAAE,EAAE,YAAG,WAAW,GAAO,CAAC;AACzF,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"Description.js","sourceRoot":"","sources":["../../../src/ui-kit/Description/Description.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAOxC,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAmB,CAAC,KAAK,EAAE,EAAE;IACzD,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAEzC,OAAO,cAAK,SAAS,EAAE,yBAAyB,SAAS,IAAI,EAAE,EAAE,YAAG,WAAW,GAAO,CAAC;AACzF,CAAC,CAAC,CAAC"}
@@ -2,6 +2,3 @@ export interface DescriptionContent {
2
2
  /** @title Описание */
3
3
  description?: string;
4
4
  }
5
- export interface DescriptionProps extends DescriptionContent {
6
- className?: string;
7
- }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DescriptionContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DescriptionContent.js","sourceRoot":"","sources":["../../../src/ui-kit/Description/DescriptionContent.ts"],"names":[],"mappings":""}
@@ -186,62 +186,22 @@
186
186
  };
187
187
  }
188
188
 
189
- const isURL = (href) => href?.includes('//');
190
- const withoutQuery = (href) => (href || '').replace(/\/?\?.*/, '');
191
- const getOrigin = (href) => {
192
- if (!href || !isURL(href)) {
193
- return undefined;
194
- }
195
- const url = href;
196
- const protoSeparator = '//';
197
- const endOfProto = url.indexOf(protoSeparator);
198
- const endOfOrigin = url.indexOf('/', endOfProto + protoSeparator.length);
199
- return endOfOrigin !== -1 ? url.substring(0, endOfOrigin) : url;
200
- };
201
-
202
- var url = /*#__PURE__*/Object.freeze({
203
- __proto__: null,
204
- isURL: isURL,
205
- withoutQuery: withoutQuery,
206
- getOrigin: getOrigin
207
- });
208
-
209
- const MOBILE_URL_PATH = '/mobile';
210
- const withoutMobilePath = (href) => (href || '').replace(MOBILE_URL_PATH, '');
211
-
212
- const adjustHref = (href, router) => {
213
- if (!href) {
214
- return href;
215
- }
216
- const relativeHref = toRelativeHref(href, router) || '';
217
- const isMobilePage = router?.pathname.startsWith(MOBILE_URL_PATH);
218
- return isMobilePage && !isURL(relativeHref) ? `${MOBILE_URL_PATH}${relativeHref}` : relativeHref;
189
+ const HeadingClass = {
190
+ h1: 'text-m-title',
191
+ h2: 'text-m-title',
192
+ h3: 'text-m-title-md',
193
+ h4: 'text-m-title-xs',
194
+ h5: 'text-m-title-xs',
195
+ h6: 'text-m-title-xs',
219
196
  };
220
- const toRelativeHref = (href, router) => {
221
- if (!href) {
222
- return href;
197
+ const Heading = JSX((props) => {
198
+ const { className, headingType, title } = props;
199
+ if (!headingType) {
200
+ return;
223
201
  }
224
- const origin = getOrigin(router?.href);
225
- return origin ? href.replace(origin, '') || '/' : href;
226
- };
227
-
228
- const defaultHandlerDecorator = (handler) => handler;
229
- function useLink({ router, handlerDecorator = defaultHandlerDecorator, }, link) {
230
- const href = adjustHref(link.href, router);
231
- return {
232
- ...link,
233
- href,
234
- ariaLabel: link.text,
235
- onClick: handlerDecorator((ev) => {
236
- const isLocalHref = href && !isURL(href);
237
- const isLocalTarget = !link.target || link.target === '_self';
238
- if (isLocalHref && isLocalTarget) {
239
- ev.preventDefault();
240
- router.push(href);
241
- }
242
- }, link),
243
- };
244
- }
202
+ const Tag = headingType;
203
+ return (jsx(Tag, { className: `font-sans font-medium ${HeadingClass[headingType]} ${className || ''}`, children: title }));
204
+ });
245
205
 
246
206
  const projectSettings = new (class {
247
207
  _ = {
@@ -286,144 +246,6 @@
286
246
  return (jsx("img", { className: className, src: href, alt: alt, title: title, ...imgProps, "aria-hidden": "true" }));
287
247
  });
288
248
 
289
- const ButtonInner = JSX(({ text, aboveText, appendLeft, rounded, version }) => {
290
- const withoutText = !text && !aboveText && Boolean(appendLeft);
291
- const buttonInnerClasses = version !== 'link'
292
- ? `flex items-center justify-center
293
- ${withoutText ? 'h-12 w-12' : `px-8 gap-2 ${aboveText ? 'py-2' : 'py-3.5'}`} ${rounded ? 'rounded-full' : ''}`
294
- : null;
295
- return renderButtonInner({ buttonInnerClasses, appendLeft, withoutText, aboveText, text });
296
- });
297
- function renderButtonInner({ buttonInnerClasses, appendLeft, withoutText, aboveText, text }) {
298
- return (jsxs("div", { className: buttonInnerClasses, children: [appendLeft ? appendLeft : null, withoutText ? null : (jsxs("div", { children: [jsx("div", { className: "text-m-2xs text-left", children: aboveText }), jsx("div", { className: "text-m-button font-medium text-left", children: text })] }))] }));
299
- }
300
-
301
- const buttonStyleMap = {
302
- primary: 'text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active',
303
- secondary: 'text-primary-main bg-secondary-light hover:bg-secondary-hover active:bg-secondary-active',
304
- link: 'text-primary-main',
305
- };
306
- const buttonDisabledStyleMap = {
307
- primary: 'bg-secondary-dark text-secondary-text',
308
- secondary: 'bg-secondary-light text-secondary-text',
309
- link: '',
310
- };
311
- const styleButton = 'w-full text-center font-sans select-none';
312
- const Button = JSX(({ className, text, aboveText, appendLeft, href, target, onClick, children, disabled, rounded, version = 'primary', ariaLabel, ...rest }) => {
313
- const buttonInner = children ?? (jsx(ButtonInner, { text: text, aboveText: aboveText, appendLeft: appendLeft, rounded: rounded, version: version }));
314
- if (disabled) {
315
- return (jsx("div", { role: "button", "aria-disabled": "true", "aria-label": ariaLabel, tabIndex: "-1", className: `inline-block ${styleButton} ${buttonDisabledStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, children: buttonInner }));
316
- }
317
- return (jsx("a", { className: `${styleButton} inline-block cursor-pointer no-underline ${buttonStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, href: href, target: target, onClick: onClick, "aria-label": ariaLabel, role: !href ? 'button' : 'link', ...rest, children: buttonInner }));
318
- });
319
-
320
- const ButtonSection = JSX(({ context, className = '', buttons }) => {
321
- const { handlerDecorator } = context;
322
- const router = context.useRouter();
323
- return buttons?.length ? (jsx("div", { className: `${className}`, children: buttons.map((button, index) => renderButton(useLink({ router, handlerDecorator }, button), index)) })) : null;
324
- });
325
- function renderButton({ icon, ...button }, i) {
326
- if (!button?.text)
327
- return;
328
- return icon ? (jsx(Button, { appendLeft: jsx(Icon, { name: icon, width: "24", height: "24", asSVG: true }), ...button }, String(i))) : (jsx(Button, { ...button }, String(i)));
329
- }
330
-
331
- const HeadingClass = {
332
- h1: 'text-m-title',
333
- h2: 'text-m-title',
334
- h3: 'text-m-title-md',
335
- h4: 'text-m-title-xs',
336
- h5: 'text-m-title-xs',
337
- h6: 'text-m-title-xs',
338
- };
339
- const Heading = JSX((props) => {
340
- const { className, headingType, title } = props;
341
- if (!headingType) {
342
- return;
343
- }
344
- const Tag = headingType;
345
- return (jsx(Tag, { className: `font-sans font-medium ${HeadingClass[headingType]} ${className || ''}`, children: title }));
346
- });
347
-
348
- const BaseTile = JSX(({ className = '', title, children, buttons, image }) => {
349
- return (jsxs("div", { className: `font-sans flex flex-col grow h-full items-start ${className}`, children: [title, jsxs("div", { className: `flex grow w-full justify-between`, children: [jsxs("div", { className: `flex flex-col justify-between`, children: [jsx("div", { children: children }), jsx("div", { children: buttons })] }), image] })] }));
350
- });
351
-
352
- const getColSpan = (className) => {
353
- const colSpanPrefix = 'col-span-';
354
- const colSpanStr = className.split(/\s+/).find((_) => _.startsWith(colSpanPrefix));
355
- return colSpanStr ? parseInt(colSpanStr.substring(colSpanPrefix.length), 10) : 12;
356
- };
357
-
358
- function getTileHeadingType(className = '') {
359
- const colSpan = getColSpan(className);
360
- if (colSpan <= 4) {
361
- return 'h4';
362
- }
363
- else if (colSpan <= 8) {
364
- return 'h3';
365
- }
366
- else {
367
- return 'h2';
368
- }
369
- }
370
-
371
- function getTileMinHeight(className = '') {
372
- const colSpan = getColSpan(className);
373
- if (colSpan <= 6) {
374
- return 'min-h-[300px]';
375
- }
376
- else if (colSpan <= 8) {
377
- return 'min-h-[320px]';
378
- }
379
- else {
380
- return 'min-h-[360px]';
381
- }
382
- }
383
-
384
- function getTileRightPadding(className = '') {
385
- const colSpan = getColSpan(className);
386
- if (colSpan <= 6) {
387
- return 'pr-9';
388
- }
389
- else if (colSpan <= 8) {
390
- return 'pr-[4.75rem]';
391
- }
392
- else {
393
- return 'pr-[9.4rem]';
394
- }
395
- }
396
-
397
- const CBR_EXCHANGE_RATE_URL = 'https://www.cbr-xml-daily.ru/daily_json.js';
398
- const CURRENCY_CODES = ['USD', 'EUR'];
399
- const CURRENCY_ICONS_MAP = {
400
- USD: 'DollarIcon',
401
- EUR: 'EuroIcon',
402
- };
403
- const buttons = [
404
- {
405
- text: 'Все показатели',
406
- href: 'https://cbr.ru/currency_base/daily/',
407
- version: 'secondary',
408
- },
409
- ];
410
- const ExchangeRateTile = JSX(({ className = '', context, title = 'Курсы обмена валют' }) => {
411
- const { data } = context.useAsyncData(CBR_EXCHANGE_RATE_URL, fetchExchangeRate);
412
- return (jsx("section", { className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, children: jsx(BaseTile, { context: context, title: title && (jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: `whitespace-pre-wrap max-w-[600px]` })), buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-9 gap-3" })) : null, children: jsxs("table", { children: [jsx("thead", { children: jsxs("tr", { children: [jsx(CurrencyTH, { children: "\u0412\u0430\u043B\u044E\u0442\u0430" }), jsx(CurrencyTH, { className: "pl-11", children: "\u041A\u0443\u0440\u0441" })] }) }), jsx("tbody", { children: CURRENCY_CODES.map(renderCurrencyRow(data)) })] }) }) }));
413
- });
414
- const CurrencyTH = JSX(({ className = '', children }) => (jsx("th", { className: `text-left font-normal text-sm text-secondary-text ${className}`, children: children })));
415
- const CurrencyTD = JSX(({ className = '', children }) => (jsx("td", { className: `text-left font-normal text-base text-primary-text ${className}`, children: children })));
416
- async function fetchExchangeRate() {
417
- const response = await fetch(CBR_EXCHANGE_RATE_URL);
418
- return await response.json();
419
- }
420
- const currencyNumberFormat = new Intl.NumberFormat('ru', { style: 'currency', currency: 'RUB' });
421
- const formatCurrency = (value) => (value ? currencyNumberFormat.format(value) : '');
422
- const renderCurrencyRow = (data) => (code) => {
423
- const value = (data?.Valute || {})[code]?.Value;
424
- return (jsxs("tr", { children: [jsx(CurrencyTD, { className: "pt-4", children: jsxs("div", { className: "flex items-center", children: [jsx(Icon, { name: CURRENCY_ICONS_MAP[code], width: "24", height: "24" }), jsx("span", { className: "ml-2", children: code })] }) }), jsx(CurrencyTD, { className: "pt-4 pl-11", children: formatCurrency(value) })] }, code));
425
- };
426
-
427
249
  const Img = JSX(({ className = '', image }) => {
428
250
  if (!image) {
429
251
  return null;
@@ -657,11 +479,159 @@
657
479
  return image?.src ? jsx(Img, { className: "pb-3 mr-auto", image: image }) : null;
658
480
  }
659
481
 
482
+ const isURL = (href) => href?.includes('//');
483
+ const withoutQuery = (href) => (href || '').replace(/\/?\?.*/, '');
484
+ const getOrigin = (href) => {
485
+ if (!href || !isURL(href)) {
486
+ return undefined;
487
+ }
488
+ const url = href;
489
+ const protoSeparator = '//';
490
+ const endOfProto = url.indexOf(protoSeparator);
491
+ const endOfOrigin = url.indexOf('/', endOfProto + protoSeparator.length);
492
+ return endOfOrigin !== -1 ? url.substring(0, endOfOrigin) : url;
493
+ };
494
+
495
+ var url = /*#__PURE__*/Object.freeze({
496
+ __proto__: null,
497
+ isURL: isURL,
498
+ withoutQuery: withoutQuery,
499
+ getOrigin: getOrigin
500
+ });
501
+
502
+ const MOBILE_URL_PATH = '/mobile';
503
+ const withoutMobilePath = (href) => (href || '').replace(MOBILE_URL_PATH, '');
504
+
505
+ const adjustHref = (href, router) => {
506
+ if (!href) {
507
+ return href;
508
+ }
509
+ const relativeHref = toRelativeHref(href, router) || '';
510
+ const isMobilePage = router?.pathname.startsWith(MOBILE_URL_PATH);
511
+ return isMobilePage && !isURL(relativeHref) ? `${MOBILE_URL_PATH}${relativeHref}` : relativeHref;
512
+ };
513
+ const toRelativeHref = (href, router) => {
514
+ if (!href) {
515
+ return href;
516
+ }
517
+ const origin = getOrigin(router?.href);
518
+ return origin ? href.replace(origin, '') || '/' : href;
519
+ };
520
+
521
+ const defaultHandlerDecorator = (handler) => handler;
522
+ function useLink({ router, handlerDecorator = defaultHandlerDecorator, }, link) {
523
+ const href = adjustHref(link.href, router);
524
+ return {
525
+ ...link,
526
+ href,
527
+ ariaLabel: link.text,
528
+ onClick: handlerDecorator((ev) => {
529
+ const isLocalHref = href && !isURL(href);
530
+ const isLocalTarget = !link.target || link.target === '_self';
531
+ if (isLocalHref && isLocalTarget) {
532
+ ev.preventDefault();
533
+ router.push(href);
534
+ }
535
+ }, link),
536
+ };
537
+ }
538
+
539
+ const ButtonInner = JSX(({ text, aboveText, appendLeft, rounded, version }) => {
540
+ const withoutText = !text && !aboveText && Boolean(appendLeft);
541
+ const buttonInnerClasses = version !== 'link'
542
+ ? `flex items-center justify-center
543
+ ${withoutText ? 'h-12 w-12' : `px-8 gap-2 ${aboveText ? 'py-2' : 'py-3.5'}`} ${rounded ? 'rounded-full' : ''}`
544
+ : null;
545
+ return renderButtonInner({ buttonInnerClasses, appendLeft, withoutText, aboveText, text });
546
+ });
547
+ function renderButtonInner({ buttonInnerClasses, appendLeft, withoutText, aboveText, text }) {
548
+ return (jsxs("div", { className: buttonInnerClasses, children: [appendLeft ? appendLeft : null, withoutText ? null : (jsxs("div", { children: [jsx("div", { className: "text-m-2xs text-left", children: aboveText }), jsx("div", { className: "text-m-button font-medium text-left", children: text })] }))] }));
549
+ }
550
+
551
+ const buttonStyleMap = {
552
+ primary: 'text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active',
553
+ secondary: 'text-primary-main bg-secondary-light hover:bg-secondary-hover active:bg-secondary-active',
554
+ link: 'text-primary-main',
555
+ };
556
+ const buttonDisabledStyleMap = {
557
+ primary: 'bg-secondary-dark text-secondary-text',
558
+ secondary: 'bg-secondary-light text-secondary-text',
559
+ link: '',
560
+ };
561
+ const styleButton = 'w-full text-center font-sans select-none';
562
+ const Button = JSX(({ className, text, aboveText, appendLeft, href, target, onClick, children, disabled, rounded, version = 'primary', ariaLabel, ...rest }) => {
563
+ const buttonInner = children ?? (jsx(ButtonInner, { text: text, aboveText: aboveText, appendLeft: appendLeft, rounded: rounded, version: version }));
564
+ if (disabled) {
565
+ return (jsx("div", { role: "button", "aria-disabled": "true", "aria-label": ariaLabel, tabIndex: "-1", className: `inline-block ${styleButton} ${buttonDisabledStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, children: buttonInner }));
566
+ }
567
+ return (jsx("a", { className: `${styleButton} inline-block cursor-pointer no-underline ${buttonStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, href: href, target: target, onClick: onClick, "aria-label": ariaLabel, role: !href ? 'button' : 'link', ...rest, children: buttonInner }));
568
+ });
569
+
570
+ const ButtonSection = JSX(({ context, className = '', buttons }) => {
571
+ const { handlerDecorator } = context;
572
+ const router = context.useRouter();
573
+ return buttons?.length ? (jsx("div", { className: `${className}`, children: buttons.map((button, index) => renderButton(useLink({ router, handlerDecorator }, button), index)) })) : null;
574
+ });
575
+ function renderButton({ icon, ...button }, i) {
576
+ if (!button?.text)
577
+ return;
578
+ return icon ? (jsx(Button, { appendLeft: jsx(Icon, { name: icon, width: "24", height: "24", asSVG: true }), ...button }, String(i))) : (jsx(Button, { ...button }, String(i)));
579
+ }
580
+
660
581
  const Description = JSX((props) => {
661
582
  const { className, description } = props;
662
583
  return jsx("div", { className: `font-normal text-base ${className || ''}`, children: description });
663
584
  });
664
585
 
586
+ const BaseTile = JSX(({ className = '', title, children, buttons, image }) => {
587
+ return (jsxs("div", { className: `font-sans flex flex-col grow h-full items-start ${className}`, children: [title, jsxs("div", { className: `flex grow w-full justify-between`, children: [jsxs("div", { className: `flex flex-col justify-between`, children: [jsx("div", { children: children }), jsx("div", { children: buttons })] }), image] })] }));
588
+ });
589
+
590
+ const getColSpan = (className) => {
591
+ const colSpanPrefix = 'col-span-';
592
+ const colSpanStr = className.split(/\s+/).find((_) => _.startsWith(colSpanPrefix));
593
+ return colSpanStr ? parseInt(colSpanStr.substring(colSpanPrefix.length), 10) : 12;
594
+ };
595
+
596
+ function getTileHeadingType(className = '') {
597
+ const colSpan = getColSpan(className);
598
+ if (colSpan <= 4) {
599
+ return 'h4';
600
+ }
601
+ else if (colSpan <= 8) {
602
+ return 'h3';
603
+ }
604
+ else {
605
+ return 'h2';
606
+ }
607
+ }
608
+
609
+ function getTileMinHeight(className = '') {
610
+ const colSpan = getColSpan(className);
611
+ if (colSpan <= 6) {
612
+ return 'min-h-[300px]';
613
+ }
614
+ else if (colSpan <= 8) {
615
+ return 'min-h-[320px]';
616
+ }
617
+ else {
618
+ return 'min-h-[360px]';
619
+ }
620
+ }
621
+
622
+ function getTileRightPadding(className = '') {
623
+ const colSpan = getColSpan(className);
624
+ if (colSpan <= 6) {
625
+ return 'pr-9';
626
+ }
627
+ else if (colSpan <= 8) {
628
+ return 'pr-[4.75rem]';
629
+ }
630
+ else {
631
+ return 'pr-[9.4rem]';
632
+ }
633
+ }
634
+
665
635
  const tileStyleMap = {
666
636
  primary: 'bg-white text-primary-text',
667
637
  secondary: 'bg-primary-main text-white',
@@ -768,7 +738,7 @@
768
738
 
769
739
  const GalleryCardInner = JSX(({ title, description, image, items, button, version }) => {
770
740
  return (jsxs("div", { children: [jsxs("div", { children: [image?.src ? (jsx("div", { className: "flex justify-center", children: jsx(Img, { className: "mb-6", image: image }) })) : null, title && renderCardTitle(title, description, items), description ? jsx("div", { className: `font-normal text-sm mt-2`, children: description }) : null, items?.length ? (jsx("section", { className: `max-w-[308px] mt-2`, role: "list", children: items
771
- .filter((item) => item.text)
741
+ .filter((item) => item?.text)
772
742
  .map((item, i) => renderItem(item.text, i, version)) })) : null] }), button?.text && jsx(Button, { className: "mt-6", ...button })] }));
773
743
  });
774
744
  function renderCardTitle(title, description, items) {
@@ -826,7 +796,7 @@
826
796
  const [isActive, setIsActive] = context.useState(false);
827
797
  const hasContent = blocks?.length;
828
798
  const icon = isActive ? 'MinusIcon' : 'PlusIcon';
829
- const getContentBlock = ({ target }) => target.tagName === 'BUTTON' ? target.nextSibling : target.parentNode.nextSibling;
799
+ const getContentBlock = ({ currentTarget }) => currentTarget.nextSibling;
830
800
  const handleToggle = (e) => {
831
801
  if (!hasContent) {
832
802
  return;
@@ -853,6 +823,36 @@
853
823
  return (jsxs("section", { className: `py-6 font-sans bg-white text-primary-text ${bordered ? 'px-4' : ''} ${className}`, children: [title ? jsx(Heading, { headingType: "h3", className: "mb-2 text-center", title: title }) : null, description ? jsx("div", { className: "mb-5 text-m-md text-center", children: description }) : null, accordionItems?.length ? (jsx("ul", { className: "list-none m-0 p-0", children: accordionItems.map((item, i) => (jsx(AccordionItem, { ...item, context: context, bordered: bordered }, `AccordionItem${i}`))) })) : null] }));
854
824
  });
855
825
 
826
+ const CBR_EXCHANGE_RATE_URL = 'https://www.cbr-xml-daily.ru/daily_json.js';
827
+ const CURRENCY_CODES = ['USD', 'EUR'];
828
+ const CURRENCY_ICONS_MAP = {
829
+ USD: 'DollarIcon',
830
+ EUR: 'EuroIcon',
831
+ };
832
+ const buttons = [
833
+ {
834
+ text: 'Все показатели',
835
+ href: 'https://cbr.ru/currency_base/daily/',
836
+ version: 'secondary',
837
+ },
838
+ ];
839
+ const ExchangeRateTile = JSX(({ className = '', context, title = 'Курсы обмена валют' }) => {
840
+ const { data } = context.useAsyncData(CBR_EXCHANGE_RATE_URL, fetchExchangeRate);
841
+ return (jsx("section", { className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, children: jsx(BaseTile, { context: context, title: title && (jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: `whitespace-pre-wrap max-w-[600px]` })), buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-9 gap-3" })) : null, children: jsxs("table", { children: [jsx("thead", { children: jsxs("tr", { children: [jsx(CurrencyTH, { children: "\u0412\u0430\u043B\u044E\u0442\u0430" }), jsx(CurrencyTH, { className: "pl-11", children: "\u041A\u0443\u0440\u0441" })] }) }), jsx("tbody", { children: CURRENCY_CODES.map(renderCurrencyRow(data)) })] }) }) }));
842
+ });
843
+ const CurrencyTH = JSX(({ className = '', children }) => (jsx("th", { className: `text-left font-normal text-sm text-secondary-text ${className}`, children: children })));
844
+ const CurrencyTD = JSX(({ className = '', children }) => (jsx("td", { className: `text-left font-normal text-base text-primary-text ${className}`, children: children })));
845
+ async function fetchExchangeRate() {
846
+ const response = await fetch(CBR_EXCHANGE_RATE_URL);
847
+ return await response.json();
848
+ }
849
+ const currencyNumberFormat = new Intl.NumberFormat('ru', { style: 'currency', currency: 'RUB' });
850
+ const formatCurrency = (value) => (value ? currencyNumberFormat.format(value) : '');
851
+ const renderCurrencyRow = (data) => (code) => {
852
+ const value = (data?.Valute || {})[code]?.Value;
853
+ return (jsxs("tr", { children: [jsx(CurrencyTD, { className: "pt-4", children: jsxs("div", { className: "flex items-center", children: [jsx(Icon, { name: CURRENCY_ICONS_MAP[code], width: "24", height: "24" }), jsx("span", { className: "ml-2", children: code })] }) }), jsx(CurrencyTD, { className: "pt-4 pl-11", children: formatCurrency(value) })] }, code));
854
+ };
855
+
856
856
  const LOGO_PATHS = [
857
857
  'm13.72 25.51 4.42-4.33v-2.95l-4.42 4.32v2.96Zm0-10.98 4.42-4.35V7.41l-4.42 4.31v2.8Zm0 3.63 4.42-4.33v-2.78l-4.42 4.32v2.8ZM12.46 7.44l-.6-.56V0h-.66v6.22l-.58-.57V0h-.67v5l-.59-.58V0H8.7v6.56l4.44 4.33V0h-.67v7.44Zm1.26 14.35 4.42-4.33v-2.78L13.72 19v2.8Zm-5.03-.61 4.44 4.33v-2.96l-4.44-4.32v2.95Zm8.79-16.76-.59.58V0h-.66v5.66l-.6.56V0h-.66v6.87l-.58.57V0h-.67v10.9l4.42-4.34V0h-.66v4.42Zm-8.79 5.76 4.44 4.35v-2.8L8.69 7.4v2.77Zm0 3.65 4.44 4.33v-2.8l-4.44-4.3v2.77Zm0 3.63 4.44 4.33V19l-4.44-4.31v2.78Zm26.37 2.29H24.3a2.25 2.25 0 0 0 .36-1.22 2.32 2.32 0 0 0-2.33-2.31 2.32 2.32 0 0 0-2.31 2.31c0 .5.16.96.43 1.34a.74.74 0 0 0-.33.61c0 .26.14.49.33.62a2.32 2.32 0 0 0-.43 1.34 2.31 2.31 0 0 0 2.31 2.31 2.32 2.32 0 0 0 2.33-2.31c0-.45-.13-.87-.36-1.22h8.01v.49h-.8v.68h.8v.7h-.8v1.3h.8v-.58h1.17v.58h.79v-1.3h-.79v-.7h.79v-.68h-.79v-.5h1.58a.56.56 0 0 0 .56-.56v-.34a.57.57 0 0 0-.56-.56Zm-11.53 2.7a1.2 1.2 0 0 1-2.4 0c0-.24.08-.47.2-.66l.34-.56a.97.97 0 0 1-.34-.75c0-.3.13-.56.33-.74l-.32-.56a1.13 1.13 0 0 1-.2-.66 1.2 1.2 0 0 1 2.4 0c0 .49-.56 1.65-.56 1.65v.62c-.01.01.55 1.17.55 1.66ZM4.67 18.34v2.89c0 2.75 1.2 4.53 1.9 5.21l4.58 4.5c1.28 1.25 1.5 1.66 1.79 2.37v-3.2c0-2.84-1.44-3.94-2.19-4.67-1.73-1.68-2.89-2.8-3.82-3.73a8.98 8.98 0 0 1-2.26-3.37Zm6.08 14.24c-1.73-1.7-2.89-2.8-3.82-3.73a10 10 0 0 1-2.25-2.98v2.49a7.87 7.87 0 0 0 1.89 5.24l4.58 4.47c1.28 1.25 1.5 1.85 1.79 2.55v-3.37c0-2.85-1.45-3.95-2.19-4.67Z',
858
858
  'M19.88 5.34c-.32 0-.64 0-.96.02V6.7a18.5 18.5 0 1 1 .95 36.94A18.5 18.5 0 0 1 1.35 25.17c0-5.67 2.55-10.73 6.58-14.13V9.32A19.78 19.78 0 0 0 0 25.17C0 36.12 8.9 45 19.88 45a19.85 19.85 0 0 0 19.86-19.83c0-10.95-8.9-19.83-19.87-19.83Z',
@@ -1057,8 +1057,8 @@
1057
1057
  const renderSubItem = (item, i) => (jsx(HeaderItem, { className: "mr-8 whitespace-nowrap text-sm", ...item }, String(i)));
1058
1058
 
1059
1059
  const GOLDEN_RATIO = 1.618;
1060
- const Placeholder = JSX(({ className = '', context, title }) => {
1061
- return (jsx(Tile, { className: `pr-0 min-h-0 ${className}`, context: context, title: title, description: "\u0411\u043B\u043E\u043A \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043E\u0442\u043A\u0435...", children: jsx("figure", { className: "m-0", children: renderShimmer() }) }));
1060
+ const Placeholder = JSX(({ className, context, title, description = 'Блок в разработке...' }) => {
1061
+ return (jsx("section", { className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, children: jsxs(BaseTile, { context: context, title: title ? (jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: `whitespace-pre-wrap max-w-[600px]` })) : null, children: [description ? (jsx(Description, { className: "mt-4 max-w-[600px]", description: description })) : null, jsx("figure", { className: "m-0 min-w-[600px]", children: renderShimmer() })] }) }));
1062
1062
  });
1063
1063
  const renderShimmer = (size = 3) => goldenSequence(100, size)
1064
1064
  .map((_) => Math.floor(_))
@@ -1129,16 +1129,18 @@
1129
1129
  };
1130
1130
 
1131
1131
  const Blocks = {
1132
+ Accordion,
1132
1133
  ExchangeRateTile,
1133
1134
  Footer,
1134
1135
  Header,
1135
1136
  Headline,
1136
1137
  LinkDocs,
1138
+ MobileAppTile,
1137
1139
  Placeholder,
1138
1140
  ProductBlock,
1139
1141
  ProductGallery,
1140
- TextBlock,
1141
1142
  StepsBlock,
1143
+ TextBlock,
1142
1144
  };
1143
1145
 
1144
1146
  const LikeButton = JSX(({ className, onClick, ariaLabel }) => (jsx("button", { type: "button", className: `border-0 w-[36px] bg-inherit cursor-pointer ${className || ''}`, onClick: onClick, "aria-label": ariaLabel, children: renderLikeIcon() })));
@@ -1164,10 +1166,10 @@
1164
1166
  });
1165
1167
  function renderBlock({ block, blockDecorator, blocksRegistry, context }, i) {
1166
1168
  const { type } = block;
1167
- if (!(type in blocksRegistry)) {
1169
+ if (!(type && type in blocksRegistry)) {
1168
1170
  console.warn(`No block with "${type}" is registered`);
1169
1171
  }
1170
- const BlockComponent = blocksRegistry[type] || Placeholder;
1172
+ const BlockComponent = blocksRegistry[type || 'Placeholder'] || Placeholder;
1171
1173
  return blockDecorator({
1172
1174
  blockClassName: style2className(block.style),
1173
1175
  block,
@@ -1188,8 +1190,8 @@
1188
1190
  : null, children] }));
1189
1191
  });
1190
1192
 
1191
- function isBlockInRegistry(block, registry) {
1192
- return block.type in registry;
1193
+ function isBlockInRegistry(blockType, registry) {
1194
+ return (blockType || '') in registry;
1193
1195
  }
1194
1196
 
1195
1197
  function normalizeBlock(block) {
@@ -1217,7 +1219,7 @@
1217
1219
  }
1218
1220
  function getMobileBlocks(blocks) {
1219
1221
  return blocks
1220
- ?.filter((block) => isBlockInRegistry(block, Blocks) && !block.mobile?.hidden)
1222
+ ?.filter((block) => isBlockInRegistry(block?.type || block?.mobile?.type, Blocks) && !block.mobile?.hidden)
1221
1223
  .map(normalizeBlock);
1222
1224
  }
1223
1225