@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.
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +14 -14
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/BaseTile/BaseTile.js +1 -1
- package/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/dist/components/Calculator/Calculator.js +1 -1
- package/dist/components/Calculator/Calculator.js.map +1 -1
- package/dist/components/ContentPage/filterBlocks.d.ts +11 -0
- package/dist/components/ContentPage/filterBlocks.js +7 -0
- package/dist/components/ContentPage/filterBlocks.js.map +1 -0
- package/dist/components/ContentPage/filterBlocks.mobile.d.ts +11 -0
- package/dist/components/ContentPage/filterBlocks.mobile.js +10 -0
- package/dist/components/ContentPage/filterBlocks.mobile.js.map +1 -0
- package/dist/components/ContentPage/isBlockInRegistry.d.ts +2 -1
- package/dist/components/ContentPage/isBlockInRegistry.js.map +1 -1
- package/dist/components/ContentPage/normalizePage.d.ts +28 -1
- package/dist/components/ContentPage/normalizePage.js +6 -11
- package/dist/components/ContentPage/normalizePage.js.map +1 -1
- package/dist/components/ErrorBlock/ErrorBlockContent.d.ts +2 -2
- package/dist/components/Footer/HorizontalNavigation.js +1 -1
- package/dist/components/OfficeServicesBlock/OfficeServicesBlock.js +2 -2
- package/dist/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -1
- package/dist/components/OfficeServicesBlock/OfficeServicesBlockContent.d.ts +2 -2
- package/dist/components/Recommendation/RecommendationCard.js +1 -1
- package/dist/components/Recommendation/RecommendationCard.js.map +1 -1
- package/dist/ui-kit/CurrencyInput/CurrencyInput.js +1 -1
- package/dist/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
- package/dist/ui-kit/Foldable/Foldable.js +2 -2
- package/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/dist/ui-kit/Input/Input.js +1 -1
- package/dist/ui-kit/Input/Input.js.map +1 -1
- package/dist/ui-kit/Logo/Logo.js +2 -2
- package/dist/ui-kit/Logo/Logo.js.map +1 -1
- package/dist/ui-kit/SearchBar/SearchBarInner.js +1 -1
- package/dist/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
- package/dist/ui-kit/Select/Select.js +1 -1
- package/dist/ui-kit/Select/Select.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/BaseTile/BaseTile.js +1 -1
- package/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/lib/components/Calculator/Calculator.js +1 -1
- package/lib/components/Calculator/Calculator.js.map +1 -1
- package/lib/components/ContentPage/filterBlocks.d.ts +11 -0
- package/lib/components/ContentPage/filterBlocks.js +4 -0
- package/lib/components/ContentPage/filterBlocks.js.map +1 -0
- package/lib/components/ContentPage/filterBlocks.mobile.d.ts +11 -0
- package/lib/components/ContentPage/filterBlocks.mobile.js +7 -0
- package/lib/components/ContentPage/filterBlocks.mobile.js.map +1 -0
- package/lib/components/ContentPage/isBlockInRegistry.d.ts +2 -1
- package/lib/components/ContentPage/isBlockInRegistry.js.map +1 -1
- package/lib/components/ContentPage/normalizePage.d.ts +28 -1
- package/lib/components/ContentPage/normalizePage.js +6 -11
- package/lib/components/ContentPage/normalizePage.js.map +1 -1
- package/lib/components/ErrorBlock/ErrorBlockContent.d.ts +2 -2
- package/lib/components/Footer/HorizontalNavigation.js +1 -1
- package/lib/components/OfficeServicesBlock/OfficeServicesBlock.js +2 -2
- package/lib/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -1
- package/lib/components/OfficeServicesBlock/OfficeServicesBlockContent.d.ts +2 -2
- package/lib/components/Recommendation/RecommendationCard.js +1 -1
- package/lib/components/Recommendation/RecommendationCard.js.map +1 -1
- package/lib/ui-kit/CurrencyInput/CurrencyInput.js +1 -1
- package/lib/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
- package/lib/ui-kit/Foldable/Foldable.js +2 -2
- package/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/lib/ui-kit/Input/Input.js +1 -1
- package/lib/ui-kit/Input/Input.js.map +1 -1
- package/lib/ui-kit/Logo/Logo.js +2 -2
- package/lib/ui-kit/Logo/Logo.js.map +1 -1
- package/lib/ui-kit/SearchBar/SearchBarInner.js +1 -1
- package/lib/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
- package/lib/ui-kit/Select/Select.js +1 -1
- package/lib/ui-kit/Select/Select.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +4 -4
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/BaseTile/BaseTile.js +1 -1
- package/mobile/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/mobile/dist/components/Calculator/Calculator.js +1 -1
- package/mobile/dist/components/Calculator/Calculator.js.map +1 -1
- package/mobile/dist/components/ContentPage/filterBlocks.d.ts +3 -0
- package/mobile/dist/components/ContentPage/filterBlocks.js +10 -0
- package/mobile/dist/components/ContentPage/filterBlocks.js.map +1 -0
- package/mobile/dist/components/ContentPage/isBlockInRegistry.d.ts +2 -1
- package/mobile/dist/components/ContentPage/isBlockInRegistry.js.map +1 -1
- package/mobile/dist/components/ContentPage/normalizePage.d.ts +20 -1
- package/mobile/dist/components/ContentPage/normalizePage.js +6 -13
- package/mobile/dist/components/ContentPage/normalizePage.js.map +1 -1
- package/mobile/dist/components/ErrorBlock/ErrorBlockContent.d.ts +2 -2
- package/mobile/dist/components/OfficeServicesBlock/OfficeServicesBlock.js +2 -2
- package/mobile/dist/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -1
- package/mobile/dist/components/OfficeServicesBlock/OfficeServicesBlockContent.d.ts +2 -2
- package/mobile/dist/components/Recommendation/RecommendationCard.js +1 -1
- package/mobile/dist/components/Recommendation/RecommendationCard.js.map +1 -1
- package/mobile/dist/ui-kit/CurrencyInput/CurrencyInput.js +1 -1
- package/mobile/dist/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
- package/mobile/dist/ui-kit/Foldable/Foldable.js +2 -2
- package/mobile/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/dist/ui-kit/Input/Input.js +1 -1
- package/mobile/dist/ui-kit/Input/Input.js.map +1 -1
- package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js +1 -1
- package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
- package/mobile/dist/ui-kit/Select/Select.js +1 -1
- package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
- package/mobile/lib/components/BaseTile/BaseTile.js +1 -1
- package/mobile/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/mobile/lib/components/Calculator/Calculator.js +1 -1
- package/mobile/lib/components/Calculator/Calculator.js.map +1 -1
- package/mobile/lib/components/ContentPage/filterBlocks.d.ts +3 -0
- package/mobile/lib/components/ContentPage/filterBlocks.js +7 -0
- package/mobile/lib/components/ContentPage/filterBlocks.js.map +1 -0
- package/mobile/lib/components/ContentPage/isBlockInRegistry.d.ts +2 -1
- package/mobile/lib/components/ContentPage/isBlockInRegistry.js.map +1 -1
- package/mobile/lib/components/ContentPage/normalizePage.d.ts +20 -1
- package/mobile/lib/components/ContentPage/normalizePage.js +6 -13
- package/mobile/lib/components/ContentPage/normalizePage.js.map +1 -1
- package/mobile/lib/components/ErrorBlock/ErrorBlockContent.d.ts +2 -2
- package/mobile/lib/components/OfficeServicesBlock/OfficeServicesBlock.js +2 -2
- package/mobile/lib/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -1
- package/mobile/lib/components/OfficeServicesBlock/OfficeServicesBlockContent.d.ts +2 -2
- package/mobile/lib/components/Recommendation/RecommendationCard.js +1 -1
- package/mobile/lib/components/Recommendation/RecommendationCard.js.map +1 -1
- package/mobile/lib/ui-kit/CurrencyInput/CurrencyInput.js +1 -1
- package/mobile/lib/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
- package/mobile/lib/ui-kit/Foldable/Foldable.js +2 -2
- package/mobile/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/lib/ui-kit/Input/Input.js +1 -1
- package/mobile/lib/ui-kit/Input/Input.js.map +1 -1
- package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js +1 -1
- package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
- package/mobile/lib/ui-kit/Select/Select.js +1 -1
- package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
- package/mobile/src/components/BaseTile/BaseTile.tsx +2 -2
- package/mobile/src/components/Calculator/Calculator.tsx +1 -1
- package/mobile/src/components/ContentPage/filterBlocks.ts +13 -0
- package/mobile/src/components/ContentPage/isBlockInRegistry.ts +3 -1
- package/mobile/src/components/ContentPage/normalizePage.ts +25 -36
- package/mobile/src/components/ErrorBlock/ErrorBlockContent.ts +2 -2
- package/mobile/src/components/OfficeServicesBlock/OfficeServicesBlock.tsx +2 -2
- package/mobile/src/components/OfficeServicesBlock/OfficeServicesBlockContent.ts +2 -2
- package/mobile/src/components/Recommendation/RecommendationCard.tsx +18 -16
- package/mobile/src/components/__snapshots__/Blocks.spec.tsx.snap +24 -14
- package/mobile/src/ui-kit/CurrencyInput/CurrencyInput.tsx +1 -1
- package/mobile/src/ui-kit/Foldable/Foldable.tsx +11 -2
- package/mobile/src/ui-kit/Input/Input.tsx +1 -1
- package/mobile/src/ui-kit/SearchBar/SearchBarInner.tsx +1 -1
- package/mobile/src/ui-kit/Select/Select.tsx +1 -1
- package/package.json +1 -1
- package/src/components/BaseTile/BaseTile.tsx +2 -2
- package/src/components/Calculator/Calculator.tsx +1 -1
- package/src/components/ContentPage/ContentPage.fixture.mobile.tsx +1 -1
- package/src/components/ContentPage/ContentPage.fixture.tsx +2 -2
- package/src/components/ContentPage/filterBlocks.mobile.ts +13 -0
- package/src/components/ContentPage/filterBlocks.ts +7 -0
- package/src/components/ContentPage/isBlockInRegistry.ts +3 -1
- package/src/components/ContentPage/normalizePage.ts +25 -31
- package/src/components/ErrorBlock/ErrorBlockContent.ts +2 -2
- package/src/components/Footer/HorizontalNavigation.tsx +1 -1
- package/src/components/OfficeServicesBlock/OfficeServicesBlock.fixture.tsx +1 -1
- package/src/components/OfficeServicesBlock/OfficeServicesBlock.tsx +2 -2
- package/src/components/OfficeServicesBlock/OfficeServicesBlockContent.ts +2 -2
- package/src/components/Recommendation/RecommendationCard.tsx +18 -16
- package/src/components/__snapshots__/Blocks.spec.tsx.snap +24 -14
- package/src/ui-kit/CurrencyInput/CurrencyInput.tsx +1 -1
- package/src/ui-kit/Foldable/Foldable.tsx +11 -2
- package/src/ui-kit/Input/Input.tsx +1 -1
- package/src/ui-kit/Logo/Logo.tsx +2 -2
- package/src/ui-kit/SearchBar/SearchBarInner.tsx +1 -1
- package/src/ui-kit/Select/Select.tsx +1 -1
- package/dist/components/ContentPage/normalizePage.mobile.d.ts +0 -2
- package/dist/components/ContentPage/normalizePage.mobile.js +0 -30
- package/dist/components/ContentPage/normalizePage.mobile.js.map +0 -1
- package/lib/components/ContentPage/normalizePage.mobile.d.ts +0 -2
- package/lib/components/ContentPage/normalizePage.mobile.js +0 -27
- package/lib/components/ContentPage/normalizePage.mobile.js.map +0 -1
- 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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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-
|
|
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-
|
|
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-
|
|
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="
|
|
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="
|
|
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="
|
|
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="
|
|
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-
|
|
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 ?
|
|
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-
|
|
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"
|
package/package.json
CHANGED
|
@@ -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">
|
|
@@ -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)
|
|
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
|
-
|
|
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 {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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
|
|
7
|
-
contentPage:
|
|
8
|
-
)
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
5
|
+
export const normalizePage =
|
|
6
|
+
(blocksRegistry: BlocksRegistry) => (contentPage: ContentPageDef | undefined | null) => {
|
|
7
|
+
if (!contentPage) {
|
|
8
|
+
return undefined;
|
|
9
|
+
}
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
const { blocks = [], slots } = contentPage;
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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="
|
|
24
|
+
className="text-l-light max-w-[292px]"
|
|
25
25
|
{...useLink({ router, handlerDecorator }, _)}
|
|
26
26
|
/>
|
|
27
27
|
))}
|
|
@@ -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,
|
|
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
|
-
{
|
|
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
|
-
|
|
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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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-
|
|
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-
|
|
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-
|
|
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="
|
|
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="
|
|
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="
|
|
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="
|
|
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}
|