@redneckz/wildless-cms-uni-blocks 0.4.0 → 0.4.2
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 +90 -97
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/ProjectSettings.d.ts +2 -3
- package/dist/ProjectSettings.js +2 -2
- package/dist/ProjectSettings.js.map +1 -1
- package/dist/api/LikeAPI.d.ts +1 -1
- package/dist/api/LikeAPI.js +6 -5
- package/dist/api/LikeAPI.js.map +1 -1
- package/dist/components/Accordion/Accordion.js +1 -1
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/BaseTile/BaseTile.js +1 -1
- package/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlockContent.d.ts +2 -2
- package/dist/components/BlockContent.d.ts +1 -2
- package/dist/components/Blocks.d.ts +0 -1
- package/dist/components/Blocks.js +0 -2
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Footer/MediaButton.d.ts +1 -1
- package/dist/components/Footer/SocialMedia.d.ts +1 -1
- package/dist/components/Footer/SocialMedia.mobile.d.ts +1 -1
- package/dist/components/Gallery/GalleryContainer.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocs.js +1 -1
- package/dist/components/LinkDocs/LinkDocs.js.map +1 -1
- package/dist/components/PictureText/PictureText.js +14 -5
- package/dist/components/PictureText/PictureText.js.map +1 -1
- package/dist/components/PictureText/PictureTextContent.d.ts +8 -16
- package/dist/components/ProductBlock/ProductBlockContent.d.ts +3 -15
- package/dist/components/ProductBlock/ProductBlockInner.js +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
- package/dist/components/ProductBlock/renderBenefit.d.ts +4 -2
- package/dist/components/ProductBlock/renderBenefit.js +3 -22
- package/dist/components/ProductBlock/renderBenefit.js.map +1 -1
- package/dist/components/ProductGallery/ProductGallery.js +5 -5
- package/dist/components/ProductGallery/ProductGallery.js.map +1 -1
- package/dist/components/ProductTile/ProductTile.js +2 -2
- package/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/dist/components/PromoTile/PromoTile.js +1 -1
- package/dist/components/PromoTile/PromoTile.js.map +1 -1
- package/dist/components/Recommendation/RecommendationCard.d.ts +1 -1
- package/dist/components/StepsBlock/StepsBlockStyleMaps.d.ts +1 -1
- package/dist/components/Tile/Tile.js +1 -1
- package/dist/components/Tile/Tile.js.map +1 -1
- package/dist/hooks/useLikeService.js +1 -3
- package/dist/hooks/useLikeService.js.map +1 -1
- package/dist/ui-kit/BenefitItem/BenefitItem.d.ts +4 -0
- package/dist/ui-kit/BenefitItem/BenefitItem.js +29 -0
- package/dist/ui-kit/BenefitItem/BenefitItem.js.map +1 -0
- package/dist/ui-kit/BenefitItem/BenefitItemProps.d.ts +24 -0
- package/dist/{components/Insurance/InsuranceContent.js → ui-kit/BenefitItem/BenefitItemProps.js} +1 -1
- package/dist/ui-kit/BenefitItem/BenefitItemProps.js.map +1 -0
- package/dist/ui-kit/Foldable/Foldable.js +1 -1
- package/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/lib/ProjectSettings.d.ts +2 -3
- package/lib/ProjectSettings.js +2 -2
- package/lib/ProjectSettings.js.map +1 -1
- package/lib/api/LikeAPI.d.ts +1 -1
- package/lib/api/LikeAPI.js +6 -5
- package/lib/api/LikeAPI.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Accordion/Accordion.js +1 -1
- package/lib/components/Accordion/Accordion.js.map +1 -1
- package/lib/components/BaseTile/BaseTile.js +1 -1
- package/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlockContent.d.ts +2 -2
- package/lib/components/BlockContent.d.ts +1 -2
- package/lib/components/Blocks.d.ts +0 -1
- package/lib/components/Blocks.js +0 -2
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Footer/MediaButton.d.ts +1 -1
- package/lib/components/Footer/SocialMedia.d.ts +1 -1
- package/lib/components/Footer/SocialMedia.mobile.d.ts +1 -1
- package/lib/components/Gallery/GalleryContainer.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocs.js +1 -1
- package/lib/components/LinkDocs/LinkDocs.js.map +1 -1
- package/lib/components/PictureText/PictureText.fixture.d.ts +4 -0
- package/lib/components/PictureText/PictureText.js +14 -5
- package/lib/components/PictureText/PictureText.js.map +1 -1
- package/lib/components/PictureText/PictureTextContent.d.ts +8 -16
- package/lib/components/ProductBlock/ProductBlockContent.d.ts +3 -15
- package/lib/components/ProductBlock/ProductBlockInner.js +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
- package/lib/components/ProductBlock/renderBenefit.d.ts +4 -3
- package/lib/components/ProductBlock/renderBenefit.js +4 -23
- package/lib/components/ProductBlock/renderBenefit.js.map +1 -1
- package/lib/components/ProductGallery/ProductGallery.js +5 -5
- package/lib/components/ProductGallery/ProductGallery.js.map +1 -1
- package/lib/components/ProductTile/ProductTile.js +2 -2
- package/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/lib/components/PromoTile/PromoTile.js +1 -1
- package/lib/components/PromoTile/PromoTile.js.map +1 -1
- package/lib/components/Recommendation/RecommendationCard.d.ts +1 -1
- package/lib/components/StepsBlock/StepsBlockStyleMaps.d.ts +1 -1
- package/lib/components/Tile/Tile.js +1 -1
- package/lib/components/Tile/Tile.js.map +1 -1
- package/lib/hooks/useLikeService.js +1 -3
- package/lib/hooks/useLikeService.js.map +1 -1
- package/lib/ui-kit/BenefitItem/BenefitItem.d.ts +4 -0
- package/lib/ui-kit/BenefitItem/BenefitItem.js +27 -0
- package/lib/ui-kit/BenefitItem/BenefitItem.js.map +1 -0
- package/lib/ui-kit/BenefitItem/BenefitItemProps.d.ts +24 -0
- package/lib/ui-kit/BenefitItem/BenefitItemProps.js +2 -0
- package/lib/ui-kit/BenefitItem/BenefitItemProps.js.map +1 -0
- package/lib/ui-kit/Foldable/Foldable.js +1 -1
- package/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +57 -51
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/ProjectSettings.d.ts +2 -3
- package/mobile/dist/ProjectSettings.js +2 -2
- package/mobile/dist/ProjectSettings.js.map +1 -1
- package/mobile/dist/api/LikeAPI.d.ts +1 -1
- package/mobile/dist/api/LikeAPI.js +6 -5
- package/mobile/dist/api/LikeAPI.js.map +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/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlockContent.d.ts +2 -2
- package/mobile/dist/components/BlockContent.d.ts +1 -2
- package/mobile/dist/components/Footer/MediaButton.d.ts +1 -1
- package/mobile/dist/components/Footer/SocialMedia.d.ts +1 -1
- package/mobile/dist/components/Gallery/GalleryContainer.js.map +1 -1
- package/mobile/dist/components/PictureText/PictureText.js +14 -5
- package/mobile/dist/components/PictureText/PictureText.js.map +1 -1
- package/mobile/dist/components/PictureText/PictureTextContent.d.ts +8 -16
- package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +3 -15
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/mobile/dist/components/ProductBlock/renderBenefit.d.ts +4 -2
- package/mobile/dist/components/ProductBlock/renderBenefit.js +3 -19
- package/mobile/dist/components/ProductBlock/renderBenefit.js.map +1 -1
- package/mobile/dist/components/ProductTile/ProductTile.js +2 -2
- package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/dist/components/PromoTile/PromoTile.js +1 -1
- package/mobile/dist/components/PromoTile/PromoTile.js.map +1 -1
- package/mobile/dist/components/Recommendation/RecommendationCard.d.ts +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.d.ts +1 -1
- package/mobile/dist/components/Tile/Tile.js +1 -1
- package/mobile/dist/components/Tile/Tile.js.map +1 -1
- package/mobile/dist/hooks/useLikeService.js +1 -3
- package/mobile/dist/hooks/useLikeService.js.map +1 -1
- package/mobile/dist/ui-kit/BenefitItem/BenefitItem.d.ts +4 -0
- package/mobile/dist/ui-kit/BenefitItem/BenefitItem.js +29 -0
- package/mobile/dist/ui-kit/BenefitItem/BenefitItem.js.map +1 -0
- package/mobile/dist/ui-kit/BenefitItem/BenefitItemProps.d.ts +24 -0
- package/mobile/dist/{components/Insurance/InsuranceContent.js → ui-kit/BenefitItem/BenefitItemProps.js} +1 -1
- package/mobile/dist/ui-kit/BenefitItem/BenefitItemProps.js.map +1 -0
- package/mobile/dist/ui-kit/Foldable/Foldable.js +1 -1
- package/mobile/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/lib/ProjectSettings.d.ts +2 -3
- package/mobile/lib/ProjectSettings.js +2 -2
- package/mobile/lib/ProjectSettings.js.map +1 -1
- package/mobile/lib/api/LikeAPI.d.ts +1 -1
- package/mobile/lib/api/LikeAPI.js +6 -5
- package/mobile/lib/api/LikeAPI.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/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlockContent.d.ts +2 -2
- package/mobile/lib/components/BlockContent.d.ts +1 -2
- package/mobile/lib/components/Footer/MediaButton.d.ts +1 -1
- package/mobile/lib/components/Footer/SocialMedia.d.ts +1 -1
- package/mobile/lib/components/Gallery/GalleryContainer.js.map +1 -1
- package/mobile/lib/components/PictureText/PictureText.js +14 -5
- package/mobile/lib/components/PictureText/PictureText.js.map +1 -1
- package/mobile/lib/components/PictureText/PictureTextContent.d.ts +8 -16
- package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +3 -15
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/mobile/lib/components/ProductBlock/renderBenefit.d.ts +4 -2
- package/mobile/lib/components/ProductBlock/renderBenefit.js +4 -20
- package/mobile/lib/components/ProductBlock/renderBenefit.js.map +1 -1
- package/mobile/lib/components/ProductTile/ProductTile.js +2 -2
- package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/lib/components/PromoTile/PromoTile.js +1 -1
- package/mobile/lib/components/PromoTile/PromoTile.js.map +1 -1
- package/mobile/lib/components/Recommendation/RecommendationCard.d.ts +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.d.ts +1 -1
- package/mobile/lib/components/Tile/Tile.js +1 -1
- package/mobile/lib/components/Tile/Tile.js.map +1 -1
- package/mobile/lib/hooks/useLikeService.js +1 -3
- package/mobile/lib/hooks/useLikeService.js.map +1 -1
- package/mobile/lib/ui-kit/BenefitItem/BenefitItem.d.ts +4 -0
- package/mobile/lib/ui-kit/BenefitItem/BenefitItem.js +27 -0
- package/mobile/lib/ui-kit/BenefitItem/BenefitItem.js.map +1 -0
- package/mobile/lib/ui-kit/BenefitItem/BenefitItemProps.d.ts +24 -0
- package/mobile/lib/ui-kit/BenefitItem/BenefitItemProps.js +2 -0
- package/mobile/lib/ui-kit/BenefitItem/BenefitItemProps.js.map +1 -0
- package/mobile/lib/ui-kit/Foldable/Foldable.js +1 -1
- package/mobile/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/src/ProjectSettings.ts +3 -4
- package/mobile/src/api/LikeAPI.ts +21 -16
- package/mobile/src/components/BaseTile/BaseTile.tsx +2 -2
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +2 -2
- package/mobile/src/components/BenefitsBlock/BenefitsBlockContent.ts +2 -2
- package/mobile/src/components/BlockContent.ts +0 -2
- package/mobile/src/components/ContentPage/ContentPage.page.json +41 -41
- package/mobile/src/components/Footer/MediaButton.tsx +1 -1
- package/mobile/src/components/Footer/SocialMedia.tsx +1 -1
- package/mobile/src/components/Gallery/Gallery.tsx +1 -1
- package/mobile/src/components/Gallery/GalleryContainer.tsx +0 -1
- package/mobile/src/components/PictureText/PictureText.example.json +7 -4
- package/mobile/src/components/PictureText/PictureText.tsx +55 -34
- package/mobile/src/components/PictureText/PictureTextContent.ts +8 -17
- package/mobile/src/components/ProductBlock/ProductBlockContent.ts +3 -17
- package/mobile/src/components/ProductBlock/ProductBlockInner.tsx +1 -5
- package/mobile/src/components/ProductBlock/renderBenefit.tsx +17 -42
- package/mobile/src/components/ProductTile/ProductTile.tsx +3 -2
- package/mobile/src/components/PromoTile/PromoTile.tsx +4 -3
- package/mobile/src/components/Recommendation/RecommendationCard.tsx +1 -1
- package/mobile/src/components/StepsBlock/StepsBlockStyleMaps.ts +1 -1
- package/mobile/src/components/Tile/Tile.tsx +2 -2
- package/mobile/src/components/__snapshots__/Blocks.spec.tsx.snap +15 -30
- package/mobile/src/hooks/useLikeService.ts +1 -4
- package/mobile/src/ui-kit/BenefitItem/BenefitItem.tsx +58 -0
- package/mobile/src/ui-kit/BenefitItem/BenefitItemProps.ts +27 -0
- package/mobile/src/ui-kit/Foldable/Foldable.tsx +1 -1
- package/package.json +1 -1
- package/src/ProjectSettings.ts +3 -4
- package/src/api/LikeAPI.ts +21 -16
- package/src/components/Accordion/Accordion.tsx +1 -0
- package/src/components/BaseTile/BaseTile.tsx +2 -2
- package/src/components/BenefitsBlock/BenefitsBlock.tsx +2 -2
- package/src/components/BenefitsBlock/BenefitsBlockContent.ts +2 -2
- package/src/components/BlockContent.ts +0 -2
- package/src/components/Blocks.ts +0 -2
- package/src/components/ContentPage/ContentPage.page.json +41 -41
- package/src/components/Footer/MediaButton.tsx +1 -1
- package/src/components/Footer/SocialMedia.mobile.tsx +1 -1
- package/src/components/Footer/SocialMedia.tsx +1 -1
- package/src/components/Gallery/Gallery.mobile.tsx +1 -1
- package/src/components/Gallery/GalleryContainer.tsx +0 -1
- package/src/components/LinkDocs/LinkDocs.tsx +1 -0
- package/src/components/PictureText/PictureText.example.json +7 -4
- package/src/components/PictureText/PictureText.fixture.tsx +74 -5
- package/src/components/PictureText/PictureText.tsx +55 -34
- package/src/components/PictureText/PictureTextContent.ts +8 -17
- package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +3 -3
- package/src/components/ProductBlock/ProductBlock.fixture.tsx +28 -6
- package/src/components/ProductBlock/ProductBlockContent.ts +3 -17
- package/src/components/ProductBlock/ProductBlockInner.mobile.tsx +1 -5
- package/src/components/ProductBlock/ProductBlockInner.tsx +1 -3
- package/src/components/ProductBlock/renderBenefit.tsx +17 -51
- package/src/components/ProductGallery/ProductGallery.tsx +5 -4
- package/src/components/ProductTile/ProductTile.tsx +3 -2
- package/src/components/PromoTile/PromoTile.tsx +4 -3
- package/src/components/Recommendation/RecommendationCard.tsx +1 -1
- package/src/components/StepsBlock/StepsBlockStyleMaps.ts +1 -1
- package/src/components/Tile/Tile.tsx +2 -2
- package/src/components/__snapshots__/Blocks.spec.tsx.snap +15 -30
- package/src/hooks/useLikeService.ts +1 -4
- package/src/ui-kit/BenefitItem/BenefitItem.tsx +58 -0
- package/src/ui-kit/BenefitItem/BenefitItemProps.ts +27 -0
- package/src/ui-kit/Foldable/Foldable.tsx +1 -1
- package/dist/components/Insurance/Insurance.d.ts +0 -5
- package/dist/components/Insurance/Insurance.js +0 -24
- package/dist/components/Insurance/Insurance.js.map +0 -1
- package/dist/components/Insurance/InsuranceContent.d.ts +0 -27
- package/dist/components/Insurance/InsuranceContent.js.map +0 -1
- package/dist/components/ProductBlock/renderBenefit.mobile.d.ts +0 -3
- package/dist/components/ProductBlock/renderBenefit.mobile.js +0 -25
- package/dist/components/ProductBlock/renderBenefit.mobile.js.map +0 -1
- package/lib/components/Insurance/Insurance.d.ts +0 -5
- package/lib/components/Insurance/Insurance.fixture.d.ts +0 -6
- package/lib/components/Insurance/Insurance.js +0 -22
- package/lib/components/Insurance/Insurance.js.map +0 -1
- package/lib/components/Insurance/InsuranceContent.d.ts +0 -27
- package/lib/components/Insurance/InsuranceContent.js +0 -2
- package/lib/components/Insurance/InsuranceContent.js.map +0 -1
- package/lib/components/ProductBlock/renderBenefit.mobile.d.ts +0 -3
- package/lib/components/ProductBlock/renderBenefit.mobile.js +0 -22
- package/lib/components/ProductBlock/renderBenefit.mobile.js.map +0 -1
- package/mobile/dist/components/Insurance/Insurance.d.ts +0 -5
- package/mobile/dist/components/Insurance/Insurance.js +0 -24
- package/mobile/dist/components/Insurance/Insurance.js.map +0 -1
- package/mobile/dist/components/Insurance/InsuranceContent.d.ts +0 -27
- package/mobile/dist/components/Insurance/InsuranceContent.js.map +0 -1
- package/mobile/lib/components/Insurance/Insurance.d.ts +0 -5
- package/mobile/lib/components/Insurance/Insurance.js +0 -22
- package/mobile/lib/components/Insurance/Insurance.js.map +0 -1
- package/mobile/lib/components/Insurance/InsuranceContent.d.ts +0 -27
- package/mobile/lib/components/Insurance/InsuranceContent.js +0 -2
- package/mobile/lib/components/Insurance/InsuranceContent.js.map +0 -1
- package/mobile/src/components/Insurance/Insurance.example.json +0 -29
- package/mobile/src/components/Insurance/Insurance.tsx +0 -83
- package/mobile/src/components/Insurance/InsuranceContent.ts +0 -29
- package/src/components/Insurance/Insurance.example.json +0 -29
- package/src/components/Insurance/Insurance.fixture.tsx +0 -70
- package/src/components/Insurance/Insurance.tsx +0 -83
- package/src/components/Insurance/InsuranceContent.ts +0 -29
- package/src/components/ProductBlock/renderBenefit.mobile.tsx +0 -44
|
@@ -109,7 +109,7 @@ exports[`Blocks ExchangeRateTile should render block "ExchangeRateTile" without
|
|
|
109
109
|
class="flex grow w-full justify-between"
|
|
110
110
|
>
|
|
111
111
|
<div
|
|
112
|
-
class="flex flex-col
|
|
112
|
+
class="flex flex-col w-full"
|
|
113
113
|
>
|
|
114
114
|
<div>
|
|
115
115
|
<div
|
|
@@ -522,25 +522,6 @@ exports[`Blocks Headline should render block "Headline" without content 1`] = `
|
|
|
522
522
|
/>
|
|
523
523
|
`;
|
|
524
524
|
|
|
525
|
-
exports[`Blocks Insurance should render block "Insurance" without content 1`] = `
|
|
526
|
-
<section
|
|
527
|
-
class="px-[100px] py-[50px] bg-white text-primary-text font-sans "
|
|
528
|
-
>
|
|
529
|
-
<section
|
|
530
|
-
class="font-sans flex flex-col p-[50px] gap-3 bg-transparent !p-0"
|
|
531
|
-
/>
|
|
532
|
-
<div>
|
|
533
|
-
<div
|
|
534
|
-
class="mx-auto flex justify-center gap-[122px] mt-[30px]"
|
|
535
|
-
>
|
|
536
|
-
<div
|
|
537
|
-
class="w-[558px] m-auto"
|
|
538
|
-
/>
|
|
539
|
-
</div>
|
|
540
|
-
</div>
|
|
541
|
-
</section>
|
|
542
|
-
`;
|
|
543
|
-
|
|
544
525
|
exports[`Blocks InsuranceAmountBlock should render block "InsuranceAmountBlock" without content 1`] = `
|
|
545
526
|
<section
|
|
546
527
|
class="box-border py-[50px] overflow-hidden relative font-sans w-100 bg-white "
|
|
@@ -610,7 +591,7 @@ exports[`Blocks MobileAppTile should render block "MobileAppTile" without conten
|
|
|
610
591
|
class="flex grow w-full justify-between"
|
|
611
592
|
>
|
|
612
593
|
<div
|
|
613
|
-
class="flex flex-col
|
|
594
|
+
class="flex flex-col w-full"
|
|
614
595
|
>
|
|
615
596
|
<div>
|
|
616
597
|
<div
|
|
@@ -655,12 +636,16 @@ exports[`Blocks PictureText should render block "PictureText" without content 1`
|
|
|
655
636
|
<section
|
|
656
637
|
class="relative font-sans p-14 bg-white text-primary-text "
|
|
657
638
|
>
|
|
658
|
-
<
|
|
659
|
-
class="font-sans
|
|
639
|
+
<section
|
|
640
|
+
class="font-sans flex flex-col p-[50px] gap-3 bg-white !p-0"
|
|
660
641
|
/>
|
|
661
642
|
<div
|
|
662
|
-
class="flex justify-center mt-
|
|
663
|
-
|
|
643
|
+
class="flex justify-center gap-[122px] mt-[30px]"
|
|
644
|
+
>
|
|
645
|
+
<div
|
|
646
|
+
class="w-[558px] m-auto"
|
|
647
|
+
/>
|
|
648
|
+
</div>
|
|
664
649
|
</section>
|
|
665
650
|
`;
|
|
666
651
|
|
|
@@ -721,7 +706,7 @@ exports[`Blocks ProductBlock should render block "ProductBlock" without content
|
|
|
721
706
|
class="flex grow w-full justify-between"
|
|
722
707
|
>
|
|
723
708
|
<div
|
|
724
|
-
class="flex flex-col
|
|
709
|
+
class="flex flex-col w-full"
|
|
725
710
|
>
|
|
726
711
|
<div />
|
|
727
712
|
</div>
|
|
@@ -743,7 +728,7 @@ exports[`Blocks ProductGallery should render block "ProductGallery" without cont
|
|
|
743
728
|
style="transform: translateX(-000%);"
|
|
744
729
|
/>
|
|
745
730
|
<div
|
|
746
|
-
class="flex items-center absolute bottom-6 left-0 right-0 px-[26px] box-border"
|
|
731
|
+
class="flex items-center absolute bottom-6 left-0 right-0 px-[26px] box-border h-28"
|
|
747
732
|
/>
|
|
748
733
|
</section>
|
|
749
734
|
`;
|
|
@@ -759,7 +744,7 @@ exports[`Blocks ProductTile should render block "ProductTile" without content 1`
|
|
|
759
744
|
class="font-sans flex flex-col p-[50px] gap-2 bg-white !p-0"
|
|
760
745
|
/>
|
|
761
746
|
<div
|
|
762
|
-
class="flex mt-
|
|
747
|
+
class="flex mt-3.5"
|
|
763
748
|
/>
|
|
764
749
|
</div>
|
|
765
750
|
</section>
|
|
@@ -787,7 +772,7 @@ exports[`Blocks PromoTile should render block "PromoTile" without content 1`] =
|
|
|
787
772
|
class="flex grow w-full justify-between"
|
|
788
773
|
>
|
|
789
774
|
<div
|
|
790
|
-
class="flex flex-col
|
|
775
|
+
class="flex flex-col w-full"
|
|
791
776
|
>
|
|
792
777
|
<div>
|
|
793
778
|
<div
|
|
@@ -1203,7 +1188,7 @@ exports[`Blocks Tile should render block "Tile" without content 1`] = `
|
|
|
1203
1188
|
class="flex grow w-full justify-between"
|
|
1204
1189
|
>
|
|
1205
1190
|
<div
|
|
1206
|
-
class="flex flex-col
|
|
1191
|
+
class="flex flex-col w-full"
|
|
1207
1192
|
>
|
|
1208
1193
|
<div />
|
|
1209
1194
|
</div>
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { useCallback, useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
2
|
import { LikeAPI } from '../api/LikeAPI';
|
|
3
3
|
|
|
4
|
-
const
|
|
5
|
-
const PROJECT_ID = process.env.NEXT_PUBLIC_PROJECT_ID || '';
|
|
6
|
-
|
|
7
|
-
const api = LikeAPI(PROJECT_ID, ASSIST_BASE_URL);
|
|
4
|
+
const api = LikeAPI();
|
|
8
5
|
|
|
9
6
|
export function useLikeService(pagePath: string) {
|
|
10
7
|
const [likeCount, setLikeCount] = useState(0);
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import type { BenefitItemProps, BenefitItemCommonProps } from './BenefitItemProps';
|
|
3
|
+
import { Img } from '../Img/Img';
|
|
4
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
5
|
+
|
|
6
|
+
export interface BenefitGeneralProps extends BenefitItemProps, BenefitItemCommonProps {}
|
|
7
|
+
|
|
8
|
+
const titleStyleMap: Record<BlockVersion, string> = {
|
|
9
|
+
primary: 'text-primary-text',
|
|
10
|
+
secondary: 'text-white',
|
|
11
|
+
};
|
|
12
|
+
const descStyleMap: Record<BlockVersion, string> = {
|
|
13
|
+
primary: 'text-secondary-text',
|
|
14
|
+
secondary: 'text-white',
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const BenefitItem = JSX<BenefitGeneralProps>((props) => {
|
|
18
|
+
const {
|
|
19
|
+
className = '',
|
|
20
|
+
icon,
|
|
21
|
+
label,
|
|
22
|
+
description,
|
|
23
|
+
version = 'primary',
|
|
24
|
+
benefitsVersion = 'normal',
|
|
25
|
+
} = props;
|
|
26
|
+
|
|
27
|
+
const isIconWhite = benefitsVersion === 'white' || version === 'secondary';
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<div className={`flex items-center gap-5 ${className}`}>
|
|
31
|
+
{icon ? (
|
|
32
|
+
<Img
|
|
33
|
+
className={renderBenefitIconBgStyle(version, benefitsVersion)}
|
|
34
|
+
image={{ ...icon, iconVersion: isIconWhite ? 'white' : 'normal' }}
|
|
35
|
+
asSVG
|
|
36
|
+
/>
|
|
37
|
+
) : null}
|
|
38
|
+
<div className="gap-0.5">
|
|
39
|
+
{label ? <div className={`text-h6 ${titleStyleMap[version]}`}>{label}</div> : null}
|
|
40
|
+
{description ? (
|
|
41
|
+
<div className={`text-m-light ${descStyleMap[version]}`}>{description}</div>
|
|
42
|
+
) : null}
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
function renderBenefitIconBgStyle(version, benefitsVersion) {
|
|
49
|
+
let bgColorStyle = 'bg-primary-main text-black';
|
|
50
|
+
|
|
51
|
+
if (version === 'secondary') {
|
|
52
|
+
bgColorStyle = 'bg-white/30 text-black';
|
|
53
|
+
} else if (benefitsVersion === 'normal') {
|
|
54
|
+
bgColorStyle = 'bg-secondary-light text-primary-main';
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return `w-[50px] h-[50px] rounded-full p-[10px] box-border ${bgColorStyle}`;
|
|
58
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Picture } from '../../model/Picture';
|
|
2
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
3
|
+
import type { IconVersion } from '../../model/IconVersion';
|
|
4
|
+
|
|
5
|
+
export interface BenefitItemCommonProps {
|
|
6
|
+
benefitsVersion?: IconVersion;
|
|
7
|
+
/** @hidden */
|
|
8
|
+
version?: BlockVersion;
|
|
9
|
+
/** @hidden */
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type BenefitItemProps = {
|
|
14
|
+
icon?: Picture;
|
|
15
|
+
/** @title Название */
|
|
16
|
+
label?: string;
|
|
17
|
+
/** @title Описание */
|
|
18
|
+
description?: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @title Преимущество
|
|
23
|
+
*/
|
|
24
|
+
export type BenefitsProps = BenefitItemCommonProps & {
|
|
25
|
+
/** @title Список преимуществ */
|
|
26
|
+
benefits?: BenefitItemProps[];
|
|
27
|
+
};
|
|
@@ -46,7 +46,7 @@ export const Foldable = JSX<FoldableProps>(
|
|
|
46
46
|
|
|
47
47
|
const buttonClassName =
|
|
48
48
|
foldButtonClasses ||
|
|
49
|
-
'border-none bg-primary-main px-0 py-[26px] mb-[1px] w-full font-sans text-white text-
|
|
49
|
+
'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';
|
|
50
50
|
const getFoldButtonLabel = isActive ? 'Скрыть' : foldButtonLabel;
|
|
51
51
|
|
|
52
52
|
return blocks ? (
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { UniBlockProps } from '../../types';
|
|
2
|
-
import type { InsuranceContent } from './InsuranceContent';
|
|
3
|
-
export interface InsuranceProps extends InsuranceContent, UniBlockProps {
|
|
4
|
-
}
|
|
5
|
-
export declare const Insurance: import("@redneckz/uni-jsx").UNIComponent<InsuranceProps, any, any>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.Insurance = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
|
|
6
|
-
const Img_1 = require("../../ui-kit/Img/Img");
|
|
7
|
-
const addSpacesBetweenNumbers_1 = require("../../utils/addSpacesBetweenNumbers");
|
|
8
|
-
const Headline_1 = require("../Headline/Headline");
|
|
9
|
-
exports.Insurance = (0, uni_jsx_1.JSX)(({ context, className = '', title, description, image, benefits, sum, monthLimit, ...rest }) => {
|
|
10
|
-
return ((0, jsx_runtime_1.jsxs)(BlockWrapper_1.BlockWrapper, { className: `px-[100px] py-[50px] bg-white text-primary-text font-sans ${className}`, context: context, ...rest, children: [(0, jsx_runtime_1.jsx)(Headline_1.Headline, { context: context, className: "!p-0", title: title, description: description, headlineVersion: "M", align: "center" }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)("div", { className: "mx-auto flex justify-center gap-[122px] mt-[30px]", children: [image?.src ? (0, jsx_runtime_1.jsx)(Img_1.Img, { image: image }) : null, (0, jsx_runtime_1.jsxs)("div", { className: "w-[558px] m-auto", children: [benefits ? ((0, jsx_runtime_1.jsx)("div", { className: "flex flex-col gap-4", children: benefits.map(renderBenefit) })) : null, renderInsuranceSumMonth(sum, monthLimit)] })] }) })] }));
|
|
11
|
-
});
|
|
12
|
-
function renderBenefit(benefit, i) {
|
|
13
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-4", children: [benefit?.icon ? ((0, jsx_runtime_1.jsx)(Img_1.Img, { className: "w-12 h-12 min-w-12 p-3 rounded-full bg-secondary-light", image: benefit.icon, asSVG: true })) : null, (0, jsx_runtime_1.jsxs)("div", { children: [benefit?.label ? (0, jsx_runtime_1.jsx)("div", { className: "text-h6", children: benefit.label }) : null, benefit?.description ? ((0, jsx_runtime_1.jsx)("div", { className: "mt-0.5 text-secondary-text text-m", children: benefit.description })) : null] })] }, String(i)));
|
|
14
|
-
}
|
|
15
|
-
function renderInsuranceSumMonth(sum, monthLimit) {
|
|
16
|
-
return sum || monthLimit ? ((0, jsx_runtime_1.jsxs)("div", { className: "bg-secondary-light h-15 flex mt-7 gap-6 px-5 py-4", children: [Number.isFinite(sum) ? renderValueBlock('Страховая сумма:', sum, Boolean(monthLimit)) : null, Number.isFinite(monthLimit)
|
|
17
|
-
? renderValueBlock('Ежемесячный лимит:', monthLimit, Boolean(sum))
|
|
18
|
-
: null] })) : null;
|
|
19
|
-
}
|
|
20
|
-
function renderValueBlock(title, sum = 0, isAnotherBlock = false) {
|
|
21
|
-
const widthStyle = isAnotherBlock ? 'w-fit' : 'w-full';
|
|
22
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: `flex justify-between items-center gap-2 w-full ${widthStyle}`, children: [(0, jsx_runtime_1.jsx)("span", { className: "text-secondary-text text-l-light", children: title }), (0, jsx_runtime_1.jsxs)("span", { className: "text-primary-main text-h6", children: [(0, addSpacesBetweenNumbers_1.addSpacesBetweenNumbers)(sum), " \u20BD"] })] }));
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=Insurance.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Insurance.js","sourceRoot":"","sources":["../../../src/components/Insurance/Insurance.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,4DAAyD;AACzD,8CAA2C;AAC3C,iFAA8E;AAC9E,mDAAgD;AAKnC,QAAA,SAAS,GAAG,IAAA,aAAG,EAC1B,CAAC,EAAE,OAAO,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IAC7F,OAAO,CACL,wBAAC,2BAAY,IACX,SAAS,EAAE,6DAA6D,SAAS,EAAE,EACnF,OAAO,EAAE,OAAO,KACZ,IAAI,aAER,uBAAC,mBAAQ,IACP,OAAO,EAAE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CAAC,CACzB,iCAAK,SAAS,EAAC,mDAAmD,aAC/D,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,GAAG,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAC5F,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC;gBAC1B,CAAC,CAAC,gBAAgB,CAAC,oBAAoB,EAAE,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;gBAClE,CAAC,CAAC,IAAI,IACJ,CACP,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa,EAAE,GAAG,GAAG,CAAC,EAAE,cAAc,GAAG,KAAK;IACtE,MAAM,UAAU,GAAG,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC;IAEvD,OAAO,CACL,iCAAK,SAAS,EAAE,kDAAkD,UAAU,EAAE,aAC5E,iCAAM,SAAS,EAAC,kCAAkC,YAAE,KAAK,GAAQ,EACjE,kCAAM,SAAS,EAAC,2BAA2B,aAAE,IAAA,iDAAuB,EAAC,GAAG,CAAC,eAAU,IAC/E,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { Picture } from '../../model/Picture';
|
|
2
|
-
import type { HeadlineCommonProps } from '../../model/HeadlineType';
|
|
3
|
-
/**
|
|
4
|
-
* @title Преимущество
|
|
5
|
-
*/
|
|
6
|
-
export interface InsuranceBenefit {
|
|
7
|
-
/** @title Название */
|
|
8
|
-
label?: string;
|
|
9
|
-
/** @title Описание */
|
|
10
|
-
description?: string;
|
|
11
|
-
icon?: Picture;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* @title Страховка
|
|
15
|
-
*/
|
|
16
|
-
export declare type InsuranceContent = HeadlineCommonProps & {
|
|
17
|
-
image?: Picture;
|
|
18
|
-
/** @title Ежемесячный лимит */
|
|
19
|
-
monthLimit?: number;
|
|
20
|
-
/** @title Страховая сумма */
|
|
21
|
-
sum?: number;
|
|
22
|
-
/**
|
|
23
|
-
* @title Список преимуществ
|
|
24
|
-
* @maxItems 6
|
|
25
|
-
*/
|
|
26
|
-
benefits?: InsuranceBenefit[];
|
|
27
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InsuranceContent.js","sourceRoot":"","sources":["../../../src/components/Insurance/InsuranceContent.ts"],"names":[],"mappings":""}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.renderBenefit = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const Img_1 = require("../../ui-kit/Img/Img");
|
|
5
|
-
const benefitTitleStyleMap = {
|
|
6
|
-
primary: 'text-primary-text',
|
|
7
|
-
secondary: 'text-white',
|
|
8
|
-
};
|
|
9
|
-
const benefitDescStyleMap = {
|
|
10
|
-
primary: 'text-secondary-text',
|
|
11
|
-
secondary: 'text-white',
|
|
12
|
-
};
|
|
13
|
-
function renderBenefit({ benefit, version = 'primary' }, i) {
|
|
14
|
-
const isIconWhite = version === 'secondary';
|
|
15
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex gap-3 items-center mb-2.5 last:mb-0", children: [benefit.icon ? ((0, jsx_runtime_1.jsx)(Img_1.Img, { className: renderBenefitIconBgStyle(version), image: { ...benefit?.icon, iconVersion: isIconWhite ? 'white' : 'normal' }, width: "24", height: "24", asSVG: true })) : null, (0, jsx_runtime_1.jsx)("div", { className: `text-l m-0 ${benefitTitleStyleMap[version]}`, children: benefit.label }), benefit.description && ((0, jsx_runtime_1.jsx)("div", { className: `text-s ${benefitDescStyleMap[version]}`, children: benefit.description }))] }, String(i)));
|
|
16
|
-
}
|
|
17
|
-
exports.renderBenefit = renderBenefit;
|
|
18
|
-
function renderBenefitIconBgStyle(version) {
|
|
19
|
-
let bgColorStyle = 'text-primary-main';
|
|
20
|
-
if (version === 'secondary') {
|
|
21
|
-
bgColorStyle = 'text-black';
|
|
22
|
-
}
|
|
23
|
-
return `w-6 h-6 rounded-full box-border ${bgColorStyle}`;
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=renderBenefit.mobile.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"renderBenefit.mobile.js","sourceRoot":"","sources":["../../../src/components/ProductBlock/renderBenefit.mobile.tsx"],"names":[],"mappings":";;;AACA,8CAA2C;AAG3C,MAAM,oBAAoB,GAAiC;IACzD,OAAO,EAAE,mBAAmB;IAC5B,SAAS,EAAE,YAAY;CACxB,CAAC;AACF,MAAM,mBAAmB,GAAiC;IACxD,OAAO,EAAE,qBAAqB;IAC9B,SAAS,EAAE,YAAY;CACxB,CAAC;AAEF,SAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAoB,EAAE,CAAS;IACzF,MAAM,WAAW,GAAG,OAAO,KAAK,WAAW,CAAC;IAE5C,OAAO,CACL,iCAAqB,SAAS,EAAC,0CAA0C,aACtE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CACd,uBAAC,SAAG,IACF,SAAS,EAAE,wBAAwB,CAAC,OAAO,CAAC,EAC5C,KAAK,EAAE,EAAE,GAAG,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,EAC1E,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,KAAK,SACL,CACH,CAAC,CAAC,CAAC,IAAI,EACR,gCAAK,SAAS,EAAE,cAAc,oBAAoB,CAAC,OAAO,CAAC,EAAE,YAAG,OAAO,CAAC,KAAK,GAAO,EACnF,OAAO,CAAC,WAAW,IAAI,CACtB,gCAAK,SAAS,EAAE,UAAU,mBAAmB,CAAC,OAAO,CAAC,EAAE,YAAG,OAAO,CAAC,WAAW,GAAO,CACtF,KAbO,MAAM,CAAC,CAAC,CAAC,CAcb,CACP,CAAC;AACJ,CAAC;AApBD,sCAoBC;AAED,SAAS,wBAAwB,CAAC,OAAO;IACvC,IAAI,YAAY,GAAG,mBAAmB,CAAC;IAEvC,IAAI,OAAO,KAAK,WAAW,EAAE;QAC3B,YAAY,GAAG,YAAY,CAAC;KAC7B;IAED,OAAO,mCAAmC,YAAY,EAAE,CAAC;AAC3D,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { UniBlockProps } from '../../types';
|
|
2
|
-
import type { InsuranceContent } from './InsuranceContent';
|
|
3
|
-
export interface InsuranceProps extends InsuranceContent, UniBlockProps {
|
|
4
|
-
}
|
|
5
|
-
export declare const Insurance: import("@redneckz/uni-jsx").UNIComponent<InsuranceProps, any, any>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
import { BlockWrapper } from '../../ui-kit/BlockWrapper.js';
|
|
4
|
-
import { Img } from '../../ui-kit/Img/Img.js';
|
|
5
|
-
import { addSpacesBetweenNumbers } from '../../utils/addSpacesBetweenNumbers.js';
|
|
6
|
-
import { Headline } from '../Headline/Headline.js';
|
|
7
|
-
export const Insurance = JSX(({ context, className = '', title, description, image, benefits, sum, monthLimit, ...rest }) => {
|
|
8
|
-
return (_jsxs(BlockWrapper, { className: `px-[100px] py-[50px] bg-white text-primary-text font-sans ${className}`, context: context, ...rest, children: [_jsx(Headline, { context: context, className: "!p-0", title: title, description: description, headlineVersion: "M", align: "center" }), _jsx("div", { children: _jsxs("div", { className: "mx-auto flex justify-center gap-[122px] mt-[30px]", children: [image?.src ? _jsx(Img, { image: image }) : null, _jsxs("div", { className: "w-[558px] m-auto", children: [benefits ? (_jsx("div", { className: "flex flex-col gap-4", children: benefits.map(renderBenefit) })) : null, renderInsuranceSumMonth(sum, monthLimit)] })] }) })] }));
|
|
9
|
-
});
|
|
10
|
-
function renderBenefit(benefit, i) {
|
|
11
|
-
return (_jsxs("div", { className: "flex items-center gap-4", children: [benefit?.icon ? (_jsx(Img, { className: "w-12 h-12 min-w-12 p-3 rounded-full bg-secondary-light", image: benefit.icon, asSVG: true })) : null, _jsxs("div", { children: [benefit?.label ? _jsx("div", { className: "text-h6", children: benefit.label }) : null, benefit?.description ? (_jsx("div", { className: "mt-0.5 text-secondary-text text-m", children: benefit.description })) : null] })] }, String(i)));
|
|
12
|
-
}
|
|
13
|
-
function renderInsuranceSumMonth(sum, monthLimit) {
|
|
14
|
-
return sum || monthLimit ? (_jsxs("div", { className: "bg-secondary-light h-15 flex mt-7 gap-6 px-5 py-4", children: [Number.isFinite(sum) ? renderValueBlock('Страховая сумма:', sum, Boolean(monthLimit)) : null, Number.isFinite(monthLimit)
|
|
15
|
-
? renderValueBlock('Ежемесячный лимит:', monthLimit, Boolean(sum))
|
|
16
|
-
: null] })) : null;
|
|
17
|
-
}
|
|
18
|
-
function renderValueBlock(title, sum = 0, isAnotherBlock = false) {
|
|
19
|
-
const widthStyle = isAnotherBlock ? 'w-fit' : 'w-full';
|
|
20
|
-
return (_jsxs("div", { className: `flex justify-between items-center gap-2 w-full ${widthStyle}`, children: [_jsx("span", { className: "text-secondary-text text-l-light", children: title }), _jsxs("span", { className: "text-primary-main text-h6", children: [addSpacesBetweenNumbers(sum), " \u20BD"] })] }));
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=Insurance.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Insurance.js","sourceRoot":"","sources":["../../../src/components/Insurance/Insurance.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,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AC/E,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { Picture } from '../../model/Picture';
|
|
2
|
-
import type { HeadlineCommonProps } from '../../model/HeadlineType';
|
|
3
|
-
/**
|
|
4
|
-
* @title Преимущество
|
|
5
|
-
*/
|
|
6
|
-
export interface InsuranceBenefit {
|
|
7
|
-
/** @title Название */
|
|
8
|
-
label?: string;
|
|
9
|
-
/** @title Описание */
|
|
10
|
-
description?: string;
|
|
11
|
-
icon?: Picture;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* @title Страховка
|
|
15
|
-
*/
|
|
16
|
-
export declare type InsuranceContent = HeadlineCommonProps & {
|
|
17
|
-
image?: Picture;
|
|
18
|
-
/** @title Ежемесячный лимит */
|
|
19
|
-
monthLimit?: number;
|
|
20
|
-
/** @title Страховая сумма */
|
|
21
|
-
sum?: number;
|
|
22
|
-
/**
|
|
23
|
-
* @title Список преимуществ
|
|
24
|
-
* @maxItems 6
|
|
25
|
-
*/
|
|
26
|
-
benefits?: InsuranceBenefit[];
|
|
27
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InsuranceContent.js","sourceRoot":"","sources":["../../../src/components/Insurance/InsuranceContent.ts"],"names":[],"mappings":""}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
-
import { Img } from '../../ui-kit/Img/Img.js';
|
|
3
|
-
const benefitTitleStyleMap = {
|
|
4
|
-
primary: 'text-primary-text',
|
|
5
|
-
secondary: 'text-white',
|
|
6
|
-
};
|
|
7
|
-
const benefitDescStyleMap = {
|
|
8
|
-
primary: 'text-secondary-text',
|
|
9
|
-
secondary: 'text-white',
|
|
10
|
-
};
|
|
11
|
-
export function renderBenefit({ benefit, version = 'primary' }, i) {
|
|
12
|
-
const isIconWhite = version === 'secondary';
|
|
13
|
-
return (_jsxs("div", { className: "flex gap-3 items-center mb-2.5 last:mb-0", children: [benefit.icon ? (_jsx(Img, { className: renderBenefitIconBgStyle(version), image: { ...benefit?.icon, iconVersion: isIconWhite ? 'white' : 'normal' }, width: "24", height: "24", asSVG: true })) : null, _jsx("div", { className: `text-l m-0 ${benefitTitleStyleMap[version]}`, children: benefit.label }), benefit.description && (_jsx("div", { className: `text-s ${benefitDescStyleMap[version]}`, children: benefit.description }))] }, String(i)));
|
|
14
|
-
}
|
|
15
|
-
function renderBenefitIconBgStyle(version) {
|
|
16
|
-
let bgColorStyle = 'text-primary-main';
|
|
17
|
-
if (version === 'secondary') {
|
|
18
|
-
bgColorStyle = 'text-black';
|
|
19
|
-
}
|
|
20
|
-
return `w-6 h-6 rounded-full box-border ${bgColorStyle}`;
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=renderBenefit.mobile.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"renderBenefit.mobile.js","sourceRoot":"","sources":["../../../src/components/ProductBlock/renderBenefit.mobile.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAG3C,MAAM,oBAAoB,GAAiC;IACzD,OAAO,EAAE,mBAAmB;IAC5B,SAAS,EAAE,YAAY;CACxB,CAAC;AACF,MAAM,mBAAmB,GAAiC;IACxD,OAAO,EAAE,qBAAqB;IAC9B,SAAS,EAAE,YAAY;CACxB,CAAC;AAEF,MAAM,UAAU,aAAa,CAAC,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAoB,EAAE,CAAS;IACzF,MAAM,WAAW,GAAG,OAAO,KAAK,WAAW,CAAC;IAE5C,OAAO,CACL,eAAqB,SAAS,EAAC,0CAA0C,aACtE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CACd,KAAC,GAAG,IACF,SAAS,EAAE,wBAAwB,CAAC,OAAO,CAAC,EAC5C,KAAK,EAAE,EAAE,GAAG,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,EAC1E,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,KAAK,SACL,CACH,CAAC,CAAC,CAAC,IAAI,EACR,cAAK,SAAS,EAAE,cAAc,oBAAoB,CAAC,OAAO,CAAC,EAAE,YAAG,OAAO,CAAC,KAAK,GAAO,EACnF,OAAO,CAAC,WAAW,IAAI,CACtB,cAAK,SAAS,EAAE,UAAU,mBAAmB,CAAC,OAAO,CAAC,EAAE,YAAG,OAAO,CAAC,WAAW,GAAO,CACtF,KAbO,MAAM,CAAC,CAAC,CAAC,CAcb,CACP,CAAC;AACJ,CAAC;AAED,SAAS,wBAAwB,CAAC,OAAO;IACvC,IAAI,YAAY,GAAG,mBAAmB,CAAC;IAEvC,IAAI,OAAO,KAAK,WAAW,EAAE;QAC3B,YAAY,GAAG,YAAY,CAAC;KAC7B;IAED,OAAO,mCAAmC,YAAY,EAAE,CAAC;AAC3D,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { UniBlockProps } from '../../types';
|
|
2
|
-
import type { InsuranceContent } from './InsuranceContent';
|
|
3
|
-
export interface InsuranceProps extends InsuranceContent, UniBlockProps {
|
|
4
|
-
}
|
|
5
|
-
export declare const Insurance: import("@redneckz/uni-jsx").UNIComponent<InsuranceProps, any, any>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.Insurance = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
|
|
6
|
-
const Img_1 = require("../../ui-kit/Img/Img");
|
|
7
|
-
const addSpacesBetweenNumbers_1 = require("../../utils/addSpacesBetweenNumbers");
|
|
8
|
-
const Headline_1 = require("../Headline/Headline");
|
|
9
|
-
exports.Insurance = (0, uni_jsx_1.JSX)(({ context, className = '', title, description, image, benefits, sum, monthLimit, ...rest }) => {
|
|
10
|
-
return ((0, jsx_runtime_1.jsxs)(BlockWrapper_1.BlockWrapper, { className: `px-[100px] py-[50px] bg-white text-primary-text font-sans ${className}`, context: context, ...rest, children: [(0, jsx_runtime_1.jsx)(Headline_1.Headline, { context: context, className: "!p-0", title: title, description: description, headlineVersion: "M", align: "center" }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)("div", { className: "mx-auto flex justify-center gap-[122px] mt-[30px]", children: [image?.src ? (0, jsx_runtime_1.jsx)(Img_1.Img, { image: image }) : null, (0, jsx_runtime_1.jsxs)("div", { className: "w-[558px] m-auto", children: [benefits ? ((0, jsx_runtime_1.jsx)("div", { className: "flex flex-col gap-4", children: benefits.map(renderBenefit) })) : null, renderInsuranceSumMonth(sum, monthLimit)] })] }) })] }));
|
|
11
|
-
});
|
|
12
|
-
function renderBenefit(benefit, i) {
|
|
13
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-4", children: [benefit?.icon ? ((0, jsx_runtime_1.jsx)(Img_1.Img, { className: "w-12 h-12 min-w-12 p-3 rounded-full bg-secondary-light", image: benefit.icon, asSVG: true })) : null, (0, jsx_runtime_1.jsxs)("div", { children: [benefit?.label ? (0, jsx_runtime_1.jsx)("div", { className: "text-h6", children: benefit.label }) : null, benefit?.description ? ((0, jsx_runtime_1.jsx)("div", { className: "mt-0.5 text-secondary-text text-m", children: benefit.description })) : null] })] }, String(i)));
|
|
14
|
-
}
|
|
15
|
-
function renderInsuranceSumMonth(sum, monthLimit) {
|
|
16
|
-
return sum || monthLimit ? ((0, jsx_runtime_1.jsxs)("div", { className: "bg-secondary-light h-15 flex mt-7 gap-6 px-5 py-4", children: [Number.isFinite(sum) ? renderValueBlock('Страховая сумма:', sum, Boolean(monthLimit)) : null, Number.isFinite(monthLimit)
|
|
17
|
-
? renderValueBlock('Ежемесячный лимит:', monthLimit, Boolean(sum))
|
|
18
|
-
: null] })) : null;
|
|
19
|
-
}
|
|
20
|
-
function renderValueBlock(title, sum = 0, isAnotherBlock = false) {
|
|
21
|
-
const widthStyle = isAnotherBlock ? 'w-fit' : 'w-full';
|
|
22
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: `flex justify-between items-center gap-2 w-full ${widthStyle}`, children: [(0, jsx_runtime_1.jsx)("span", { className: "text-secondary-text text-l-light", children: title }), (0, jsx_runtime_1.jsxs)("span", { className: "text-primary-main text-h6", children: [(0, addSpacesBetweenNumbers_1.addSpacesBetweenNumbers)(sum), " \u20BD"] })] }));
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=Insurance.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Insurance.js","sourceRoot":"","sources":["../../../src/components/Insurance/Insurance.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,4DAAyD;AACzD,8CAA2C;AAC3C,iFAA8E;AAC9E,mDAAgD;AAKnC,QAAA,SAAS,GAAG,IAAA,aAAG,EAC1B,CAAC,EAAE,OAAO,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IAC7F,OAAO,CACL,wBAAC,2BAAY,IACX,SAAS,EAAE,6DAA6D,SAAS,EAAE,EACnF,OAAO,EAAE,OAAO,KACZ,IAAI,aAER,uBAAC,mBAAQ,IACP,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,MAAM,EAChB,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,eAAe,EAAC,GAAG,EACnB,KAAK,EAAC,QAAQ,GACd,EACF,0CACE,iCAAK,SAAS,EAAC,mDAAmD,aAC/D,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,uBAA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Q,CAAC,UAAU,CAAC;gBAC1B,CAAC,CAAC,gBAAgB,CAAC,oBAAoB,EAAE,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;gBAClE,CAAC,CAAC,IAAI,IACJ,CACP,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa,EAAE,GAAG,GAAG,CAAC,EAAE,cAAc,GAAG,KAAK;IACtE,MAAM,UAAU,GAAG,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC;IAEvD,OAAO,CACL,iCAAK,SAAS,EAAE,kDAAkD,UAAU,EAAE,aAC5E,iCAAM,SAAS,EAAC,kCAAkC,YAAE,KAAK,GAAQ,EACjE,kCAAM,SAAS,EAAC,2BAA2B,aAAE,IAAA,iDAAuB,EAAC,GAAG,CAAC,eAAU,IAC/E,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { Picture } from '../../model/Picture';
|
|
2
|
-
import type { HeadlineCommonProps } from '../../model/HeadlineType';
|
|
3
|
-
/**
|
|
4
|
-
* @title Преимущество
|
|
5
|
-
*/
|
|
6
|
-
export interface InsuranceBenefit {
|
|
7
|
-
/** @title Название */
|
|
8
|
-
label?: string;
|
|
9
|
-
/** @title Описание */
|
|
10
|
-
description?: string;
|
|
11
|
-
icon?: Picture;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* @title Страховка
|
|
15
|
-
*/
|
|
16
|
-
export declare type InsuranceContent = HeadlineCommonProps & {
|
|
17
|
-
image?: Picture;
|
|
18
|
-
/** @title Ежемесячный лимит */
|
|
19
|
-
monthLimit?: number;
|
|
20
|
-
/** @title Страховая сумма */
|
|
21
|
-
sum?: number;
|
|
22
|
-
/**
|
|
23
|
-
* @title Список преимуществ
|
|
24
|
-
* @maxItems 6
|
|
25
|
-
*/
|
|
26
|
-
benefits?: InsuranceBenefit[];
|
|
27
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InsuranceContent.js","sourceRoot":"","sources":["../../../src/components/Insurance/InsuranceContent.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { UniBlockProps } from '../../types';
|
|
2
|
-
import type { InsuranceContent } from './InsuranceContent';
|
|
3
|
-
export interface InsuranceProps extends InsuranceContent, UniBlockProps {
|
|
4
|
-
}
|
|
5
|
-
export declare const Insurance: import("@redneckz/uni-jsx").UNIComponent<InsuranceProps, any, any>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
import { BlockWrapper } from '../../ui-kit/BlockWrapper.js';
|
|
4
|
-
import { Img } from '../../ui-kit/Img/Img.js';
|
|
5
|
-
import { addSpacesBetweenNumbers } from '../../utils/addSpacesBetweenNumbers.js';
|
|
6
|
-
import { Headline } from '../Headline/Headline.js';
|
|
7
|
-
export const Insurance = JSX(({ context, className = '', title, description, image, benefits, sum, monthLimit, ...rest }) => {
|
|
8
|
-
return (_jsxs(BlockWrapper, { className: `px-[100px] py-[50px] bg-white text-primary-text font-sans ${className}`, context: context, ...rest, children: [_jsx(Headline, { context: context, className: "!p-0", title: title, description: description, headlineVersion: "M", align: "center" }), _jsx("div", { children: _jsxs("div", { className: "mx-auto flex justify-center gap-[122px] mt-[30px]", children: [image?.src ? _jsx(Img, { image: image }) : null, _jsxs("div", { className: "w-[558px] m-auto", children: [benefits ? (_jsx("div", { className: "flex flex-col gap-4", children: benefits.map(renderBenefit) })) : null, renderInsuranceSumMonth(sum, monthLimit)] })] }) })] }));
|
|
9
|
-
});
|
|
10
|
-
function renderBenefit(benefit, i) {
|
|
11
|
-
return (_jsxs("div", { className: "flex items-center gap-4", children: [benefit?.icon ? (_jsx(Img, { className: "w-12 h-12 min-w-12 p-3 rounded-full bg-secondary-light", image: benefit.icon, asSVG: true })) : null, _jsxs("div", { children: [benefit?.label ? _jsx("div", { className: "text-h6", children: benefit.label }) : null, benefit?.description ? (_jsx("div", { className: "mt-0.5 text-secondary-text text-m", children: benefit.description })) : null] })] }, String(i)));
|
|
12
|
-
}
|
|
13
|
-
function renderInsuranceSumMonth(sum, monthLimit) {
|
|
14
|
-
return sum || monthLimit ? (_jsxs("div", { className: "bg-secondary-light h-15 flex mt-7 gap-6 px-5 py-4", children: [Number.isFinite(sum) ? renderValueBlock('Страховая сумма:', sum, Boolean(monthLimit)) : null, Number.isFinite(monthLimit)
|
|
15
|
-
? renderValueBlock('Ежемесячный лимит:', monthLimit, Boolean(sum))
|
|
16
|
-
: null] })) : null;
|
|
17
|
-
}
|
|
18
|
-
function renderValueBlock(title, sum = 0, isAnotherBlock = false) {
|
|
19
|
-
const widthStyle = isAnotherBlock ? 'w-fit' : 'w-full';
|
|
20
|
-
return (_jsxs("div", { className: `flex justify-between items-center gap-2 w-full ${widthStyle}`, children: [_jsx("span", { className: "text-secondary-text text-l-light", children: title }), _jsxs("span", { className: "text-primary-main text-h6", children: [addSpacesBetweenNumbers(sum), " \u20BD"] })] }));
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=Insurance.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Insurance.js","sourceRoot":"","sources":["../../../src/components/Insurance/Insurance.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAKhD,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAC1B,CAAC,EAAE,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AW,CAAC,CAAC,CAAC,CACtB,cAAK,SAAS,EAAC,mCAAmC,YAAE,OAAO,CAAC,WAAW,GAAO,CAC/E,CAAC,CAAC,CAAC,IAAI,IACJ,KAbE,MAAM,CAAC,CAAC,CAAC,CAcb,CACP,CAAC;AACJ,CAAC;AAED,SAAS,uBAAuB,CAAC,GAAY,EAAE,UAAmB;IAChE,OAAO,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,CACzB,eAAK,SAAS,EAAC,mDAAmD,aAC/D,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,GAAG,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAC5F,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC;gBAC1B,CAAC,CAAC,gBAAgB,CAAC,oBAAoB,EAAE,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;gBAClE,CAAC,CAAC,IAAI,IACJ,CACP,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa,EAAE,GAAG,GAAG,CAAC,EAAE,cAAc,GAAG,KAAK;IACtE,MAAM,UAAU,GAAG,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC;IAEvD,OAAO,CACL,eAAK,SAAS,EAAE,kDAAkD,UAAU,EAAE,aAC5E,eAAM,SAAS,EAAC,kCAAkC,YAAE,KAAK,GAAQ,EACjE,gBAAM,SAAS,EAAC,2BAA2B,aAAE,uBAAuB,CAAC,GAAG,CAAC,eAAU,IAC/E,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { Picture } from '../../model/Picture';
|
|
2
|
-
import type { HeadlineCommonProps } from '../../model/HeadlineType';
|
|
3
|
-
/**
|
|
4
|
-
* @title Преимущество
|
|
5
|
-
*/
|
|
6
|
-
export interface InsuranceBenefit {
|
|
7
|
-
/** @title Название */
|
|
8
|
-
label?: string;
|
|
9
|
-
/** @title Описание */
|
|
10
|
-
description?: string;
|
|
11
|
-
icon?: Picture;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* @title Страховка
|
|
15
|
-
*/
|
|
16
|
-
export declare type InsuranceContent = HeadlineCommonProps & {
|
|
17
|
-
image?: Picture;
|
|
18
|
-
/** @title Ежемесячный лимит */
|
|
19
|
-
monthLimit?: number;
|
|
20
|
-
/** @title Страховая сумма */
|
|
21
|
-
sum?: number;
|
|
22
|
-
/**
|
|
23
|
-
* @title Список преимуществ
|
|
24
|
-
* @maxItems 6
|
|
25
|
-
*/
|
|
26
|
-
benefits?: InsuranceBenefit[];
|
|
27
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InsuranceContent.js","sourceRoot":"","sources":["../../../src/components/Insurance/InsuranceContent.ts"],"names":[],"mappings":""}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Заголовок",
|
|
3
|
-
"description": "Описание",
|
|
4
|
-
"insurance": 500000,
|
|
5
|
-
"benefits": [
|
|
6
|
-
{
|
|
7
|
-
"label": "Заголовок 1",
|
|
8
|
-
"description": "Описание 1",
|
|
9
|
-
"icon": {
|
|
10
|
-
"icon": "ShieldTickIcon"
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"label": "Заголовок 2",
|
|
15
|
-
"description": "Описание 2",
|
|
16
|
-
"icon": {
|
|
17
|
-
"icon": "ShieldTickIcon"
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
"image": {
|
|
22
|
-
"format": "webp",
|
|
23
|
-
"size": {
|
|
24
|
-
"width": 400,
|
|
25
|
-
"height": 300
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
"sum": 500000
|
|
29
|
-
}
|