@redneckz/wildless-cms-uni-blocks 0.4.7 → 0.5.0

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 (174) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +14 -14
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/dist/components/BaseTile/BaseTile.js +1 -1
  5. package/dist/components/BaseTile/BaseTile.js.map +1 -1
  6. package/dist/components/Calculator/Calculator.js +1 -1
  7. package/dist/components/Calculator/Calculator.js.map +1 -1
  8. package/dist/components/ContentPage/filterBlocks.d.ts +11 -0
  9. package/dist/components/ContentPage/filterBlocks.js +7 -0
  10. package/dist/components/ContentPage/filterBlocks.js.map +1 -0
  11. package/dist/components/ContentPage/filterBlocks.mobile.d.ts +11 -0
  12. package/dist/components/ContentPage/filterBlocks.mobile.js +10 -0
  13. package/dist/components/ContentPage/filterBlocks.mobile.js.map +1 -0
  14. package/dist/components/ContentPage/isBlockInRegistry.d.ts +2 -1
  15. package/dist/components/ContentPage/isBlockInRegistry.js.map +1 -1
  16. package/dist/components/ContentPage/normalizePage.d.ts +28 -1
  17. package/dist/components/ContentPage/normalizePage.js +6 -11
  18. package/dist/components/ContentPage/normalizePage.js.map +1 -1
  19. package/dist/components/ErrorBlock/ErrorBlockContent.d.ts +2 -2
  20. package/dist/components/Footer/HorizontalNavigation.js +1 -1
  21. package/dist/components/OfficeServicesBlock/OfficeServicesBlock.js +2 -2
  22. package/dist/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -1
  23. package/dist/components/OfficeServicesBlock/OfficeServicesBlockContent.d.ts +2 -2
  24. package/dist/components/Recommendation/RecommendationCard.js +1 -1
  25. package/dist/components/Recommendation/RecommendationCard.js.map +1 -1
  26. package/dist/ui-kit/CurrencyInput/CurrencyInput.js +1 -1
  27. package/dist/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
  28. package/dist/ui-kit/Foldable/Foldable.js +2 -2
  29. package/dist/ui-kit/Foldable/Foldable.js.map +1 -1
  30. package/dist/ui-kit/Input/Input.js +1 -1
  31. package/dist/ui-kit/Input/Input.js.map +1 -1
  32. package/dist/ui-kit/Logo/Logo.js +2 -2
  33. package/dist/ui-kit/Logo/Logo.js.map +1 -1
  34. package/dist/ui-kit/SearchBar/SearchBarInner.js +1 -1
  35. package/dist/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
  36. package/dist/ui-kit/Select/Select.js +1 -1
  37. package/dist/ui-kit/Select/Select.js.map +1 -1
  38. package/lib/common.css +1 -1
  39. package/lib/components/BaseTile/BaseTile.js +1 -1
  40. package/lib/components/BaseTile/BaseTile.js.map +1 -1
  41. package/lib/components/Calculator/Calculator.js +1 -1
  42. package/lib/components/Calculator/Calculator.js.map +1 -1
  43. package/lib/components/ContentPage/filterBlocks.d.ts +11 -0
  44. package/lib/components/ContentPage/filterBlocks.js +4 -0
  45. package/lib/components/ContentPage/filterBlocks.js.map +1 -0
  46. package/lib/components/ContentPage/filterBlocks.mobile.d.ts +11 -0
  47. package/lib/components/ContentPage/filterBlocks.mobile.js +7 -0
  48. package/lib/components/ContentPage/filterBlocks.mobile.js.map +1 -0
  49. package/lib/components/ContentPage/isBlockInRegistry.d.ts +2 -1
  50. package/lib/components/ContentPage/isBlockInRegistry.js.map +1 -1
  51. package/lib/components/ContentPage/normalizePage.d.ts +28 -1
  52. package/lib/components/ContentPage/normalizePage.js +6 -11
  53. package/lib/components/ContentPage/normalizePage.js.map +1 -1
  54. package/lib/components/ErrorBlock/ErrorBlockContent.d.ts +2 -2
  55. package/lib/components/Footer/HorizontalNavigation.js +1 -1
  56. package/lib/components/OfficeServicesBlock/OfficeServicesBlock.js +2 -2
  57. package/lib/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -1
  58. package/lib/components/OfficeServicesBlock/OfficeServicesBlockContent.d.ts +2 -2
  59. package/lib/components/Recommendation/RecommendationCard.js +1 -1
  60. package/lib/components/Recommendation/RecommendationCard.js.map +1 -1
  61. package/lib/ui-kit/CurrencyInput/CurrencyInput.js +1 -1
  62. package/lib/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
  63. package/lib/ui-kit/Foldable/Foldable.js +2 -2
  64. package/lib/ui-kit/Foldable/Foldable.js.map +1 -1
  65. package/lib/ui-kit/Input/Input.js +1 -1
  66. package/lib/ui-kit/Input/Input.js.map +1 -1
  67. package/lib/ui-kit/Logo/Logo.js +2 -2
  68. package/lib/ui-kit/Logo/Logo.js.map +1 -1
  69. package/lib/ui-kit/SearchBar/SearchBarInner.js +1 -1
  70. package/lib/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
  71. package/lib/ui-kit/Select/Select.js +1 -1
  72. package/lib/ui-kit/Select/Select.js.map +1 -1
  73. package/mobile/bundle/bundle.umd.js +4 -4
  74. package/mobile/bundle/bundle.umd.min.js +1 -1
  75. package/mobile/dist/components/BaseTile/BaseTile.js +1 -1
  76. package/mobile/dist/components/BaseTile/BaseTile.js.map +1 -1
  77. package/mobile/dist/components/Calculator/Calculator.js +1 -1
  78. package/mobile/dist/components/Calculator/Calculator.js.map +1 -1
  79. package/mobile/dist/components/ContentPage/filterBlocks.d.ts +3 -0
  80. package/mobile/dist/components/ContentPage/filterBlocks.js +10 -0
  81. package/mobile/dist/components/ContentPage/filterBlocks.js.map +1 -0
  82. package/mobile/dist/components/ContentPage/isBlockInRegistry.d.ts +2 -1
  83. package/mobile/dist/components/ContentPage/isBlockInRegistry.js.map +1 -1
  84. package/mobile/dist/components/ContentPage/normalizePage.d.ts +20 -1
  85. package/mobile/dist/components/ContentPage/normalizePage.js +6 -13
  86. package/mobile/dist/components/ContentPage/normalizePage.js.map +1 -1
  87. package/mobile/dist/components/ErrorBlock/ErrorBlockContent.d.ts +2 -2
  88. package/mobile/dist/components/OfficeServicesBlock/OfficeServicesBlock.js +2 -2
  89. package/mobile/dist/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -1
  90. package/mobile/dist/components/OfficeServicesBlock/OfficeServicesBlockContent.d.ts +2 -2
  91. package/mobile/dist/components/Recommendation/RecommendationCard.js +1 -1
  92. package/mobile/dist/components/Recommendation/RecommendationCard.js.map +1 -1
  93. package/mobile/dist/ui-kit/CurrencyInput/CurrencyInput.js +1 -1
  94. package/mobile/dist/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
  95. package/mobile/dist/ui-kit/Foldable/Foldable.js +2 -2
  96. package/mobile/dist/ui-kit/Foldable/Foldable.js.map +1 -1
  97. package/mobile/dist/ui-kit/Input/Input.js +1 -1
  98. package/mobile/dist/ui-kit/Input/Input.js.map +1 -1
  99. package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js +1 -1
  100. package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
  101. package/mobile/dist/ui-kit/Select/Select.js +1 -1
  102. package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
  103. package/mobile/lib/components/BaseTile/BaseTile.js +1 -1
  104. package/mobile/lib/components/BaseTile/BaseTile.js.map +1 -1
  105. package/mobile/lib/components/Calculator/Calculator.js +1 -1
  106. package/mobile/lib/components/Calculator/Calculator.js.map +1 -1
  107. package/mobile/lib/components/ContentPage/filterBlocks.d.ts +3 -0
  108. package/mobile/lib/components/ContentPage/filterBlocks.js +7 -0
  109. package/mobile/lib/components/ContentPage/filterBlocks.js.map +1 -0
  110. package/mobile/lib/components/ContentPage/isBlockInRegistry.d.ts +2 -1
  111. package/mobile/lib/components/ContentPage/isBlockInRegistry.js.map +1 -1
  112. package/mobile/lib/components/ContentPage/normalizePage.d.ts +20 -1
  113. package/mobile/lib/components/ContentPage/normalizePage.js +6 -13
  114. package/mobile/lib/components/ContentPage/normalizePage.js.map +1 -1
  115. package/mobile/lib/components/ErrorBlock/ErrorBlockContent.d.ts +2 -2
  116. package/mobile/lib/components/OfficeServicesBlock/OfficeServicesBlock.js +2 -2
  117. package/mobile/lib/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -1
  118. package/mobile/lib/components/OfficeServicesBlock/OfficeServicesBlockContent.d.ts +2 -2
  119. package/mobile/lib/components/Recommendation/RecommendationCard.js +1 -1
  120. package/mobile/lib/components/Recommendation/RecommendationCard.js.map +1 -1
  121. package/mobile/lib/ui-kit/CurrencyInput/CurrencyInput.js +1 -1
  122. package/mobile/lib/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
  123. package/mobile/lib/ui-kit/Foldable/Foldable.js +2 -2
  124. package/mobile/lib/ui-kit/Foldable/Foldable.js.map +1 -1
  125. package/mobile/lib/ui-kit/Input/Input.js +1 -1
  126. package/mobile/lib/ui-kit/Input/Input.js.map +1 -1
  127. package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js +1 -1
  128. package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
  129. package/mobile/lib/ui-kit/Select/Select.js +1 -1
  130. package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
  131. package/mobile/src/components/BaseTile/BaseTile.tsx +2 -2
  132. package/mobile/src/components/Calculator/Calculator.tsx +1 -1
  133. package/mobile/src/components/ContentPage/filterBlocks.ts +13 -0
  134. package/mobile/src/components/ContentPage/isBlockInRegistry.ts +3 -1
  135. package/mobile/src/components/ContentPage/normalizePage.ts +25 -36
  136. package/mobile/src/components/ErrorBlock/ErrorBlockContent.ts +2 -2
  137. package/mobile/src/components/OfficeServicesBlock/OfficeServicesBlock.tsx +2 -2
  138. package/mobile/src/components/OfficeServicesBlock/OfficeServicesBlockContent.ts +2 -2
  139. package/mobile/src/components/Recommendation/RecommendationCard.tsx +18 -16
  140. package/mobile/src/components/__snapshots__/Blocks.spec.tsx.snap +24 -14
  141. package/mobile/src/ui-kit/CurrencyInput/CurrencyInput.tsx +1 -1
  142. package/mobile/src/ui-kit/Foldable/Foldable.tsx +11 -2
  143. package/mobile/src/ui-kit/Input/Input.tsx +1 -1
  144. package/mobile/src/ui-kit/SearchBar/SearchBarInner.tsx +1 -1
  145. package/mobile/src/ui-kit/Select/Select.tsx +1 -1
  146. package/package.json +1 -1
  147. package/src/components/BaseTile/BaseTile.tsx +2 -2
  148. package/src/components/Calculator/Calculator.tsx +1 -1
  149. package/src/components/ContentPage/ContentPage.fixture.mobile.tsx +1 -1
  150. package/src/components/ContentPage/ContentPage.fixture.tsx +2 -2
  151. package/src/components/ContentPage/filterBlocks.mobile.ts +13 -0
  152. package/src/components/ContentPage/filterBlocks.ts +7 -0
  153. package/src/components/ContentPage/isBlockInRegistry.ts +3 -1
  154. package/src/components/ContentPage/normalizePage.ts +25 -31
  155. package/src/components/ErrorBlock/ErrorBlockContent.ts +2 -2
  156. package/src/components/Footer/HorizontalNavigation.tsx +1 -1
  157. package/src/components/OfficeServicesBlock/OfficeServicesBlock.fixture.tsx +1 -1
  158. package/src/components/OfficeServicesBlock/OfficeServicesBlock.tsx +2 -2
  159. package/src/components/OfficeServicesBlock/OfficeServicesBlockContent.ts +2 -2
  160. package/src/components/Recommendation/RecommendationCard.tsx +18 -16
  161. package/src/components/__snapshots__/Blocks.spec.tsx.snap +24 -14
  162. package/src/ui-kit/CurrencyInput/CurrencyInput.tsx +1 -1
  163. package/src/ui-kit/Foldable/Foldable.tsx +11 -2
  164. package/src/ui-kit/Input/Input.tsx +1 -1
  165. package/src/ui-kit/Logo/Logo.tsx +2 -2
  166. package/src/ui-kit/SearchBar/SearchBarInner.tsx +1 -1
  167. package/src/ui-kit/Select/Select.tsx +1 -1
  168. package/dist/components/ContentPage/normalizePage.mobile.d.ts +0 -2
  169. package/dist/components/ContentPage/normalizePage.mobile.js +0 -30
  170. package/dist/components/ContentPage/normalizePage.mobile.js.map +0 -1
  171. package/lib/components/ContentPage/normalizePage.mobile.d.ts +0 -2
  172. package/lib/components/ContentPage/normalizePage.mobile.js +0 -27
  173. package/lib/components/ContentPage/normalizePage.mobile.js.map +0 -1
  174. package/src/components/ContentPage/normalizePage.mobile.ts +0 -40
@@ -33,22 +33,24 @@ export const RecommendationCard = JSX<RecommendationCardProps>(
33
33
  title={tileTitle}
34
34
  image={tileImage}
35
35
  >
36
- {description ? <Description className="mb-2" description={description} /> : null}
37
- {items?.length ? (
38
- <List
39
- className="text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]"
40
- items={items}
41
- version={version}
42
- />
43
- ) : null}
44
- {socialMedia ? (
45
- <SocialMedia
46
- className="pt-[42px] pb-0"
47
- media={socialMedia}
48
- version={version}
49
- context={context}
50
- />
51
- ) : null}
36
+ <div className="h-full flex flex-col justify-between">
37
+ {description ? <Description className="mb-2" description={description} /> : null}
38
+ {items?.length ? (
39
+ <List
40
+ className="text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]"
41
+ items={items}
42
+ version={version}
43
+ />
44
+ ) : null}
45
+ {socialMedia ? (
46
+ <SocialMedia
47
+ className="pt-10 pb-0"
48
+ media={socialMedia}
49
+ version={version}
50
+ context={context}
51
+ />
52
+ ) : null}
53
+ </div>
52
54
  </BaseTile>
53
55
  </section>
54
56
  );
@@ -41,7 +41,7 @@ exports[`Blocks BonusBenefitsBlock should render block "BonusBenefitsBlock" with
41
41
 
42
42
  exports[`Blocks Calculator should render block "Calculator" without content 1`] = `
43
43
  <section
44
- class="box-border overflow-hidden relative font-sans w-100 text-primary-text "
44
+ class="box-border overflow-hidden relative font-sans w-100 text-primary-text bg-white "
45
45
  >
46
46
  <div
47
47
  class="bg-white"
@@ -82,7 +82,7 @@ exports[`Blocks CardTransfer should render block "CardTransfer" without content
82
82
  class="h-[56px] relative flex items-center"
83
83
  >
84
84
  <input
85
- class="text-l pl-4 pr-8 w-full h-full rounded-md border border-solid border-main-stroke"
85
+ class="text-l pl-4 pr-8 w-full h-full rounded-md border border-solid border-main-stroke hover:border-primary-hover active:border-primary-text focus:border-primary-text"
86
86
  max="300000"
87
87
  min="0"
88
88
  name="amount"
@@ -174,7 +174,9 @@ exports[`Blocks ExchangeRateTile should render block "ExchangeRateTile" without
174
174
  <div
175
175
  class="flex flex-col justify-between w-full"
176
176
  >
177
- <div>
177
+ <div
178
+ class="h-full"
179
+ >
178
180
  <div
179
181
  class="flex"
180
182
  >
@@ -283,7 +285,7 @@ exports[`Blocks Footer should render block "Footer" without content 1`] = `
283
285
  />
284
286
  </svg>
285
287
  <span
286
- class="text-black font-light ml-2.5"
288
+ class="text-primary-text font-medium ml-2.5"
287
289
  >
288
290
  Россельхозбанк
289
291
  </span>
@@ -316,7 +318,7 @@ exports[`Blocks Footer should render block "Footer" without content 1`] = `
316
318
  </div>
317
319
  <input
318
320
  class="h-12 pl-12 w-full peer text-l text-black border border-solid rounded-md box-border
319
- outline-none pr-[6%] border-main-divider focus:border-primary-text h-full"
321
+ outline-none pr-[6%] border-main-stroke hover:border-primary-hover active:border-primary-text focus:border-primary-text h-full"
320
322
  id="search-bar-input"
321
323
  name="search-bar-input"
322
324
  type="text"
@@ -486,7 +488,7 @@ exports[`Blocks Header should render block "Header" without content 1`] = `
486
488
  />
487
489
  </svg>
488
490
  <span
489
- class="text-black font-light ml-2.5"
491
+ class="text-primary-text font-medium ml-2.5"
490
492
  >
491
493
  Россельхозбанк
492
494
  </span>
@@ -650,7 +652,9 @@ exports[`Blocks MobileAppTile should render block "MobileAppTile" without conten
650
652
  <div
651
653
  class="flex flex-col justify-between w-full"
652
654
  >
653
- <div>
655
+ <div
656
+ class="h-full"
657
+ >
654
658
  <div
655
659
  class="flex flex-1 items-center"
656
660
  >
@@ -765,7 +769,9 @@ exports[`Blocks ProductBlock should render block "ProductBlock" without content
765
769
  <div
766
770
  class="flex flex-col justify-between w-full"
767
771
  >
768
- <div />
772
+ <div
773
+ class="h-full"
774
+ />
769
775
  </div>
770
776
  </div>
771
777
  </div>
@@ -825,7 +831,9 @@ exports[`Blocks PromoTile should render block "PromoTile" without content 1`] =
825
831
  <div
826
832
  class="flex flex-col justify-between w-full"
827
833
  >
828
- <div>
834
+ <div
835
+ class="h-full"
836
+ >
829
837
  <div
830
838
  class="mt-1.5"
831
839
  >
@@ -887,7 +895,7 @@ exports[`Blocks SafeDepositRental should render block "SafeDepositRental" withou
887
895
  </span>
888
896
  <select
889
897
  class="appearance-none h-14 border border-gray p-4 rounded-md text-s w-full cursor-pointer text-secondary-text"
890
- placeholder="12321321312"
898
+ placeholder=""
891
899
  style="background: url(/icons/ArrowDownIcon.svg) no-repeat 50%;"
892
900
  >
893
901
  <option
@@ -910,7 +918,7 @@ exports[`Blocks SafeDepositRental should render block "SafeDepositRental" withou
910
918
  </span>
911
919
  <select
912
920
  class="appearance-none h-14 border border-gray p-4 rounded-md text-s w-full cursor-pointer text-secondary-text"
913
- placeholder="12321321312"
921
+ placeholder=""
914
922
  style="background: url(/icons/ArrowDownIcon.svg) no-repeat 50%;"
915
923
  >
916
924
  <option
@@ -984,7 +992,7 @@ exports[`Blocks SafeDepositRental should render block "SafeDepositRental" withou
984
992
  </span>
985
993
  <select
986
994
  class="appearance-none h-14 border border-gray p-4 rounded-md text-s w-full cursor-pointer text-secondary-text"
987
- placeholder="12321321312"
995
+ placeholder=""
988
996
  style="background: url(/icons/ArrowDownIcon.svg) no-repeat 50%;"
989
997
  >
990
998
  <option
@@ -1007,7 +1015,7 @@ exports[`Blocks SafeDepositRental should render block "SafeDepositRental" withou
1007
1015
  </span>
1008
1016
  <select
1009
1017
  class="appearance-none h-14 border border-gray p-4 rounded-md text-s w-full cursor-pointer text-secondary-text"
1010
- placeholder="12321321312"
1018
+ placeholder=""
1011
1019
  style="background: url(/icons/ArrowDownIcon.svg) no-repeat 50%;"
1012
1020
  >
1013
1021
  <option
@@ -1203,7 +1211,9 @@ exports[`Blocks Tile should render block "Tile" without content 1`] = `
1203
1211
  <div
1204
1212
  class="flex flex-col justify-between w-full"
1205
1213
  >
1206
- <div />
1214
+ <div
1215
+ class="h-full"
1216
+ />
1207
1217
  </div>
1208
1218
  </div>
1209
1219
  </div>
@@ -55,7 +55,7 @@ export const CurrencyInput = JSX<CurrencyInputProps>(
55
55
  <div className="h-[56px] relative flex items-center">
56
56
  <input
57
57
  type="number"
58
- className="text-l pl-4 pr-8 w-full h-full rounded-md border border-solid border-main-stroke"
58
+ className="text-l pl-4 pr-8 w-full h-full rounded-md border border-solid border-main-stroke hover:border-primary-hover active:border-primary-text focus:border-primary-text"
59
59
  onChange={handleChange}
60
60
  value={value}
61
61
  min={minValue}
@@ -45,7 +45,7 @@ export const Foldable = JSX<FoldableProps>(
45
45
 
46
46
  const buttonClassName =
47
47
  foldButtonClasses ||
48
- 'border-none bg-primary-main hover:bg-primary-hover px-0 py-[26px] mb-[1px] w-full font-sans text-white text-h4 flex justify-center cursor-pointer';
48
+ 'border-none bg-primary-main hover:bg-primary-hover px-0 py-5 mb-[1px] w-full font-sans text-white text-h4 flex justify-center cursor-pointer';
49
49
  const getFoldButtonLabel = isActive ? 'Скрыть' : foldButtonLabel;
50
50
 
51
51
  return blocks ? (
@@ -58,7 +58,16 @@ export const Foldable = JSX<FoldableProps>(
58
58
  onClick={handleToggle}
59
59
  >
60
60
  <span className="pr-3">{getFoldButtonLabel}</span>
61
- {icon ? <Icon name={icon} iconVersion="white" width="20" height="20" asSVG /> : null}
61
+ {icon ? (
62
+ <Icon
63
+ className="my-auto"
64
+ name={icon}
65
+ iconVersion="white"
66
+ width="20"
67
+ height="20"
68
+ asSVG
69
+ />
70
+ ) : null}
62
71
  </button>
63
72
  ) : null}
64
73
  </div>
@@ -10,7 +10,7 @@ export const Input = JSX<InputProps>(
10
10
 
11
11
  return (
12
12
  <input
13
- className={className}
13
+ className={`border-main-stroke hover:border-primary-hover active:border-primary-text focus:border-primary-text ${className}`}
14
14
  id={id}
15
15
  name={name || id}
16
16
  type={type}
@@ -34,7 +34,7 @@ export const SearchBarInner = JSX<SearchBarInnerProps>(({ className, isMobile =
34
34
  <input
35
35
  id="search-bar-input"
36
36
  className={`h-12 pl-12 w-full peer text-l text-black border border-solid rounded-md box-border
37
- outline-none pr-[6%] border-main-divider focus:border-primary-text ${SearchBarInputClassName}`}
37
+ outline-none pr-[6%] border-main-stroke hover:border-primary-hover active:border-primary-text focus:border-primary-text ${SearchBarInputClassName}`}
38
38
  value={term}
39
39
  onChange={(e) => setTerm(e.target.value as string)}
40
40
  type="text"
@@ -22,7 +22,7 @@ export const Select = JSX<SelectProps>(
22
22
  name={name || id}
23
23
  value={value}
24
24
  onChange={(e) => onChange(e.target.value as string)}
25
- placeholder="12321321312"
25
+ placeholder=""
26
26
  >
27
27
  {children}
28
28
  </select>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.4.7",
3
+ "version": "0.5.0",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -11,8 +11,8 @@ export const BaseTile = JSX<BaseTileProps>(
11
11
  {title}
12
12
  <div className="flex grow w-full justify-between">
13
13
  <div className="flex flex-col justify-between w-full">
14
- <div>{children}</div>
15
- {buttons ? <div className="mt-auto">{buttons}</div> : null}
14
+ <div className="h-full">{children}</div>
15
+ {buttons ? <div className="mt-auto pt-8">{buttons}</div> : null}
16
16
  </div>
17
17
  {image}
18
18
  </div>
@@ -42,7 +42,7 @@ export const Calculator = JSX<CalculatorProps>(
42
42
  return (
43
43
  <BlockWrapper
44
44
  context={context}
45
- className={`box-border overflow-hidden relative font-sans w-100 text-primary-text ${className}`}
45
+ className={`box-border overflow-hidden relative font-sans w-100 text-primary-text bg-white ${className}`}
46
46
  {...rest}
47
47
  >
48
48
  <div className="bg-white">
@@ -13,7 +13,7 @@ export default {
13
13
  className="bg-secondary-text"
14
14
  context={mobileContext}
15
15
  blocksRegistry={Blocks}
16
- data={normalizePage(data as ContentPageDef)}
16
+ data={normalizePage(Blocks)(data as ContentPageDef)}
17
17
  />
18
18
  ),
19
19
  };
@@ -32,7 +32,7 @@ export default {
32
32
  className="bg-main"
33
33
  context={context}
34
34
  blocksRegistry={Blocks}
35
- data={normalizePage(data as ContentPageDef) as ContentPageDef}
35
+ data={normalizePage(Blocks)(data as ContentPageDef)}
36
36
  />
37
37
  ),
38
38
  editor: (
@@ -41,7 +41,7 @@ export default {
41
41
  className="bg-transparent"
42
42
  context={context}
43
43
  blocksRegistry={Blocks}
44
- data={normalizePage(data as ContentPageDef)}
44
+ data={normalizePage(Blocks)(data as ContentPageDef)}
45
45
  blockDecorator={blockDecorator}
46
46
  />
47
47
  </div>
@@ -0,0 +1,13 @@
1
+ import { BlockDef } from '../../types';
2
+ import { BlocksRegistry } from './ContentPage';
3
+ import { isBlockInRegistry } from './isBlockInRegistry';
4
+ import { normalizeBlock } from './normalizeBlock';
5
+
6
+ export const filterBlocks = (blocks: BlockDef[], blocksRegistry: BlocksRegistry) =>
7
+ blocks
8
+ ?.filter(
9
+ (block) =>
10
+ isBlockInRegistry(block?.type || block?.mobile?.type, blocksRegistry) &&
11
+ !block.mobile?.hidden,
12
+ )
13
+ .map(normalizeBlock);
@@ -0,0 +1,7 @@
1
+ import { BlockDef } from '../../types';
2
+ import { BlocksRegistry } from './ContentPage';
3
+ import { isBlockInRegistry } from './isBlockInRegistry';
4
+ import { normalizeBlock } from './normalizeBlock';
5
+
6
+ export const filterBlocks = (blocks: BlockDef[], blocksRegistry: BlocksRegistry) =>
7
+ blocks?.filter((block) => isBlockInRegistry(block?.type, blocksRegistry)).map(normalizeBlock);
@@ -1,3 +1,5 @@
1
- export function isBlockInRegistry<T>(blockType: string | undefined, registry: Record<string, T>) {
1
+ import { BlocksRegistry } from './ContentPage';
2
+
3
+ export function isBlockInRegistry(blockType: string | undefined, registry: BlocksRegistry) {
2
4
  return (blockType || '') in registry;
3
5
  }
@@ -1,35 +1,29 @@
1
- import type { BlockDef, ContentPageDef, Slot } from '../../types';
2
- import { Blocks } from '../Blocks';
3
- import { isBlockInRegistry } from './isBlockInRegistry';
4
- import { normalizeBlock } from './normalizeBlock';
1
+ import type { ContentPageDef, Slot } from '../../types';
2
+ import { BlocksRegistry } from './ContentPage';
3
+ import { filterBlocks } from './filterBlocks';
5
4
 
6
- export function normalizePage<T extends ContentPageDef | undefined | null>(
7
- contentPage: T,
8
- ): ContentPageDef | undefined {
9
- if (!contentPage) {
10
- return undefined;
11
- }
5
+ export const normalizePage =
6
+ (blocksRegistry: BlocksRegistry) => (contentPage: ContentPageDef | undefined | null) => {
7
+ if (!contentPage) {
8
+ return undefined;
9
+ }
12
10
 
13
- const { blocks, slots } = contentPage;
11
+ const { blocks = [], slots } = contentPage;
14
12
 
15
- return {
16
- ...contentPage,
17
- blocks: getDesktopBlocks(blocks),
18
- slots:
19
- slots &&
20
- Object.keys(slots).reduce(
21
- (res, key) => ({
22
- ...res,
23
- [key]: {
24
- ...slots[key],
25
- blocks: getDesktopBlocks((slots[key] as Slot).blocks),
26
- },
27
- }),
28
- {},
29
- ),
13
+ return {
14
+ ...contentPage,
15
+ blocks: filterBlocks(blocks, blocksRegistry),
16
+ slots:
17
+ slots &&
18
+ Object.keys(slots).reduce(
19
+ (res, key) => ({
20
+ ...res,
21
+ [key]: {
22
+ ...slots[key],
23
+ blocks: filterBlocks((slots[key] as Slot).blocks || [], blocksRegistry),
24
+ },
25
+ }),
26
+ {},
27
+ ),
28
+ };
30
29
  };
31
- }
32
-
33
- function getDesktopBlocks(blocks?: BlockDef[]) {
34
- return blocks?.filter((block) => isBlockInRegistry(block?.type, Blocks)).map(normalizeBlock);
35
- }
@@ -1,6 +1,6 @@
1
+ import type { EmptyOption } from '../../model/EmptyOptionType';
1
2
  import type { Picture } from '../../model/Picture';
2
3
  import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
3
- import type { EmptyOption } from '../../model/EmptyOptionType';
4
4
 
5
5
  /**
6
6
  * @title Изображение
@@ -24,7 +24,7 @@ export type ErrorCodeDef = {
24
24
  export type ErrorContentDef = EmptyOption | ErrorImageDef | ErrorCodeDef;
25
25
 
26
26
  /**
27
- * @title Блок Ошибка
27
+ * @title Блок ошибки
28
28
  */
29
29
  export interface ErrorBlockContent {
30
30
  /** @title Заголовок */
@@ -21,7 +21,7 @@ export const HorizontalNavigation = JSX<HorizontalNavigationProps>(
21
21
  <HorizontalNavigationLink
22
22
  key={String(i)}
23
23
  index={i}
24
- className="font-l-light max-w-[292px]"
24
+ className="text-l-light max-w-[292px]"
25
25
  {...useLink({ router, handlerDecorator }, _)}
26
26
  />
27
27
  ))}
@@ -8,7 +8,7 @@ export default {
8
8
  className="col-span-4"
9
9
  context={context}
10
10
  title="Услуги"
11
- officesList={[
11
+ servicesList={[
12
12
  {
13
13
  text: 'Обслуживание физических лиц',
14
14
  icon: { icon: 'CardTickIcon' },
@@ -11,7 +11,7 @@ import type {
11
11
  export interface OfficeServicesBlockProps extends OfficeServicesBlockContent, UniBlockProps {}
12
12
 
13
13
  export const OfficeServicesBlock = JSX<OfficeServicesBlockProps>(
14
- ({ className = '', context, title, officesList, anchor = '' }) => {
14
+ ({ className = '', context, title, servicesList, anchor = '' }) => {
15
15
  return (
16
16
  <BlockWrapper
17
17
  context={context}
@@ -19,7 +19,7 @@ export const OfficeServicesBlock = JSX<OfficeServicesBlockProps>(
19
19
  className={`font-sans bg-white p-12 flex flex-col ${className}`}
20
20
  >
21
21
  {title ? <Heading headingType="h5" className="mb-2.5" title={title} /> : null}
22
- {officesList?.length ? officesList.map(renderListItems) : null}
22
+ {servicesList?.length ? servicesList.map(renderListItems) : null}
23
23
  </BlockWrapper>
24
24
  );
25
25
  },
@@ -21,6 +21,6 @@ export interface OfficeServicesBlockList {
21
21
  export interface OfficeServicesBlockContent {
22
22
  /** @title Заголовок */
23
23
  title?: string;
24
- /** @title Список */
25
- officesList?: OfficeServicesBlockList[];
24
+ /** @title Список услуг */
25
+ servicesList?: OfficeServicesBlockList[];
26
26
  }
@@ -33,22 +33,24 @@ export const RecommendationCard = JSX<RecommendationCardProps>(
33
33
  title={tileTitle}
34
34
  image={tileImage}
35
35
  >
36
- {description ? <Description className="mb-2" description={description} /> : null}
37
- {items?.length ? (
38
- <List
39
- className="text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]"
40
- items={items}
41
- version={version}
42
- />
43
- ) : null}
44
- {socialMedia ? (
45
- <SocialMedia
46
- className="pt-[42px] pb-0"
47
- media={socialMedia}
48
- version={version}
49
- context={context}
50
- />
51
- ) : null}
36
+ <div className="h-full flex flex-col justify-between">
37
+ {description ? <Description className="mb-2" description={description} /> : null}
38
+ {items?.length ? (
39
+ <List
40
+ className="text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]"
41
+ items={items}
42
+ version={version}
43
+ />
44
+ ) : null}
45
+ {socialMedia ? (
46
+ <SocialMedia
47
+ className="pt-10 pb-0"
48
+ media={socialMedia}
49
+ version={version}
50
+ context={context}
51
+ />
52
+ ) : null}
53
+ </div>
52
54
  </BaseTile>
53
55
  </section>
54
56
  );
@@ -41,7 +41,7 @@ exports[`Blocks BonusBenefitsBlock should render block "BonusBenefitsBlock" with
41
41
 
42
42
  exports[`Blocks Calculator should render block "Calculator" without content 1`] = `
43
43
  <section
44
- class="box-border overflow-hidden relative font-sans w-100 text-primary-text "
44
+ class="box-border overflow-hidden relative font-sans w-100 text-primary-text bg-white "
45
45
  >
46
46
  <div
47
47
  class="bg-white"
@@ -82,7 +82,7 @@ exports[`Blocks CardTransfer should render block "CardTransfer" without content
82
82
  class="h-[56px] relative flex items-center"
83
83
  >
84
84
  <input
85
- class="text-l pl-4 pr-8 w-full h-full rounded-md border border-solid border-main-stroke"
85
+ class="text-l pl-4 pr-8 w-full h-full rounded-md border border-solid border-main-stroke hover:border-primary-hover active:border-primary-text focus:border-primary-text"
86
86
  max="300000"
87
87
  min="0"
88
88
  name="amount"
@@ -174,7 +174,9 @@ exports[`Blocks ExchangeRateTile should render block "ExchangeRateTile" without
174
174
  <div
175
175
  class="flex flex-col justify-between w-full"
176
176
  >
177
- <div>
177
+ <div
178
+ class="h-full"
179
+ >
178
180
  <div
179
181
  class="flex"
180
182
  >
@@ -283,7 +285,7 @@ exports[`Blocks Footer should render block "Footer" without content 1`] = `
283
285
  />
284
286
  </svg>
285
287
  <span
286
- class="text-black font-light ml-2.5"
288
+ class="text-primary-text font-medium ml-2.5"
287
289
  >
288
290
  Россельхозбанк
289
291
  </span>
@@ -316,7 +318,7 @@ exports[`Blocks Footer should render block "Footer" without content 1`] = `
316
318
  </div>
317
319
  <input
318
320
  class="h-12 pl-12 w-full peer text-l text-black border border-solid rounded-md box-border
319
- outline-none pr-[6%] border-main-divider focus:border-primary-text h-full"
321
+ outline-none pr-[6%] border-main-stroke hover:border-primary-hover active:border-primary-text focus:border-primary-text h-full"
320
322
  id="search-bar-input"
321
323
  name="search-bar-input"
322
324
  type="text"
@@ -486,7 +488,7 @@ exports[`Blocks Header should render block "Header" without content 1`] = `
486
488
  />
487
489
  </svg>
488
490
  <span
489
- class="text-black font-light ml-2.5"
491
+ class="text-primary-text font-medium ml-2.5"
490
492
  >
491
493
  Россельхозбанк
492
494
  </span>
@@ -650,7 +652,9 @@ exports[`Blocks MobileAppTile should render block "MobileAppTile" without conten
650
652
  <div
651
653
  class="flex flex-col justify-between w-full"
652
654
  >
653
- <div>
655
+ <div
656
+ class="h-full"
657
+ >
654
658
  <div
655
659
  class="flex flex-1 items-center"
656
660
  >
@@ -765,7 +769,9 @@ exports[`Blocks ProductBlock should render block "ProductBlock" without content
765
769
  <div
766
770
  class="flex flex-col justify-between w-full"
767
771
  >
768
- <div />
772
+ <div
773
+ class="h-full"
774
+ />
769
775
  </div>
770
776
  </div>
771
777
  </div>
@@ -825,7 +831,9 @@ exports[`Blocks PromoTile should render block "PromoTile" without content 1`] =
825
831
  <div
826
832
  class="flex flex-col justify-between w-full"
827
833
  >
828
- <div>
834
+ <div
835
+ class="h-full"
836
+ >
829
837
  <div
830
838
  class="mt-1.5"
831
839
  >
@@ -887,7 +895,7 @@ exports[`Blocks SafeDepositRental should render block "SafeDepositRental" withou
887
895
  </span>
888
896
  <select
889
897
  class="appearance-none h-14 border border-gray p-4 rounded-md text-s w-full cursor-pointer text-secondary-text"
890
- placeholder="12321321312"
898
+ placeholder=""
891
899
  style="background: url(/icons/ArrowDownIcon.svg) no-repeat 50%;"
892
900
  >
893
901
  <option
@@ -910,7 +918,7 @@ exports[`Blocks SafeDepositRental should render block "SafeDepositRental" withou
910
918
  </span>
911
919
  <select
912
920
  class="appearance-none h-14 border border-gray p-4 rounded-md text-s w-full cursor-pointer text-secondary-text"
913
- placeholder="12321321312"
921
+ placeholder=""
914
922
  style="background: url(/icons/ArrowDownIcon.svg) no-repeat 50%;"
915
923
  >
916
924
  <option
@@ -984,7 +992,7 @@ exports[`Blocks SafeDepositRental should render block "SafeDepositRental" withou
984
992
  </span>
985
993
  <select
986
994
  class="appearance-none h-14 border border-gray p-4 rounded-md text-s w-full cursor-pointer text-secondary-text"
987
- placeholder="12321321312"
995
+ placeholder=""
988
996
  style="background: url(/icons/ArrowDownIcon.svg) no-repeat 50%;"
989
997
  >
990
998
  <option
@@ -1007,7 +1015,7 @@ exports[`Blocks SafeDepositRental should render block "SafeDepositRental" withou
1007
1015
  </span>
1008
1016
  <select
1009
1017
  class="appearance-none h-14 border border-gray p-4 rounded-md text-s w-full cursor-pointer text-secondary-text"
1010
- placeholder="12321321312"
1018
+ placeholder=""
1011
1019
  style="background: url(/icons/ArrowDownIcon.svg) no-repeat 50%;"
1012
1020
  >
1013
1021
  <option
@@ -1203,7 +1211,9 @@ exports[`Blocks Tile should render block "Tile" without content 1`] = `
1203
1211
  <div
1204
1212
  class="flex flex-col justify-between w-full"
1205
1213
  >
1206
- <div />
1214
+ <div
1215
+ class="h-full"
1216
+ />
1207
1217
  </div>
1208
1218
  </div>
1209
1219
  </div>
@@ -55,7 +55,7 @@ export const CurrencyInput = JSX<CurrencyInputProps>(
55
55
  <div className="h-[56px] relative flex items-center">
56
56
  <input
57
57
  type="number"
58
- className="text-l pl-4 pr-8 w-full h-full rounded-md border border-solid border-main-stroke"
58
+ className="text-l pl-4 pr-8 w-full h-full rounded-md border border-solid border-main-stroke hover:border-primary-hover active:border-primary-text focus:border-primary-text"
59
59
  onChange={handleChange}
60
60
  value={value}
61
61
  min={minValue}