@redneckz/wildless-cms-uni-blocks 0.4.1 → 0.4.3
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 +108 -85
- 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/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/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 +1 -1
- 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/Tabs/Tabs.d.ts +2 -1
- package/dist/components/Tabs/Tabs.js +3 -3
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/Tabs/TabsContent.d.ts +8 -2
- package/dist/components/Tabs/renderGroupTab.d.ts +4 -0
- package/dist/components/Tabs/renderGroupTab.js +18 -0
- package/dist/components/Tabs/renderGroupTab.js.map +1 -0
- package/dist/components/Tabs/renderLinkTab.d.ts +8 -0
- package/dist/components/Tabs/renderLinkTab.js +7 -0
- package/dist/components/Tabs/renderLinkTab.js.map +1 -0
- package/dist/components/Tabs/renderTab.d.ts +5 -5
- package/dist/components/Tabs/renderTab.js +14 -14
- package/dist/components/Tabs/renderTab.js.map +1 -1
- package/dist/components/Tabs/tabItemClasses.d.ts +6 -0
- package/dist/components/Tabs/tabItemClasses.js +9 -0
- package/dist/components/Tabs/tabItemClasses.js.map +1 -0
- 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/BlockWrapper.js +10 -1
- package/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/dist/ui-kit/Foldable/Foldable.js +1 -1
- package/dist/ui-kit/Foldable/Foldable.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/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/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 +1 -1
- 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/Tabs/Tabs.d.ts +2 -1
- package/lib/components/Tabs/Tabs.js +3 -3
- package/lib/components/Tabs/Tabs.js.map +1 -1
- package/lib/components/Tabs/TabsContent.d.ts +8 -2
- package/lib/components/Tabs/renderGroupTab.d.ts +4 -0
- package/lib/components/Tabs/renderGroupTab.js +15 -0
- package/lib/components/Tabs/renderGroupTab.js.map +1 -0
- package/lib/components/Tabs/renderLinkTab.d.ts +8 -0
- package/lib/components/Tabs/renderLinkTab.js +4 -0
- package/lib/components/Tabs/renderLinkTab.js.map +1 -0
- package/lib/components/Tabs/renderTab.d.ts +5 -5
- package/lib/components/Tabs/renderTab.js +14 -14
- package/lib/components/Tabs/renderTab.js.map +1 -1
- package/lib/components/Tabs/tabItemClasses.d.ts +6 -0
- package/lib/components/Tabs/tabItemClasses.js +7 -0
- package/lib/components/Tabs/tabItemClasses.js.map +1 -0
- 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/BlockWrapper.js +10 -1
- package/lib/ui-kit/BlockWrapper.js.map +1 -1
- 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 +30 -13
- 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/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 +1 -1
- 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/Tabs/Tabs.d.ts +2 -1
- package/mobile/dist/components/Tabs/Tabs.js +3 -3
- package/mobile/dist/components/Tabs/Tabs.js.map +1 -1
- package/mobile/dist/components/Tabs/TabsContent.d.ts +8 -2
- package/mobile/dist/components/Tabs/renderGroupTab.d.ts +4 -0
- package/mobile/dist/components/Tabs/renderGroupTab.js +18 -0
- package/mobile/dist/components/Tabs/renderGroupTab.js.map +1 -0
- package/mobile/dist/components/Tabs/renderLinkTab.d.ts +8 -0
- package/mobile/dist/components/Tabs/renderLinkTab.js +7 -0
- package/mobile/dist/components/Tabs/renderLinkTab.js.map +1 -0
- package/mobile/dist/components/Tabs/renderTab.d.ts +5 -5
- package/mobile/dist/components/Tabs/renderTab.js +14 -14
- package/mobile/dist/components/Tabs/renderTab.js.map +1 -1
- package/mobile/dist/components/Tabs/tabItemClasses.d.ts +6 -0
- package/mobile/dist/components/Tabs/tabItemClasses.js +9 -0
- package/mobile/dist/components/Tabs/tabItemClasses.js.map +1 -0
- 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/BlockWrapper.js +10 -1
- package/mobile/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/dist/ui-kit/Foldable/Foldable.js +1 -1
- package/mobile/dist/ui-kit/Foldable/Foldable.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 +1 -1
- 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/Tabs/Tabs.d.ts +2 -1
- package/mobile/lib/components/Tabs/Tabs.js +3 -3
- package/mobile/lib/components/Tabs/Tabs.js.map +1 -1
- package/mobile/lib/components/Tabs/TabsContent.d.ts +8 -2
- package/mobile/lib/components/Tabs/renderGroupTab.d.ts +4 -0
- package/mobile/lib/components/Tabs/renderGroupTab.js +15 -0
- package/mobile/lib/components/Tabs/renderGroupTab.js.map +1 -0
- package/mobile/lib/components/Tabs/renderLinkTab.d.ts +8 -0
- package/mobile/lib/components/Tabs/renderLinkTab.js +4 -0
- package/mobile/lib/components/Tabs/renderLinkTab.js.map +1 -0
- package/mobile/lib/components/Tabs/renderTab.d.ts +5 -5
- package/mobile/lib/components/Tabs/renderTab.js +14 -14
- package/mobile/lib/components/Tabs/renderTab.js.map +1 -1
- package/mobile/lib/components/Tabs/tabItemClasses.d.ts +6 -0
- package/mobile/lib/components/Tabs/tabItemClasses.js +7 -0
- package/mobile/lib/components/Tabs/tabItemClasses.js.map +1 -0
- 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/BlockWrapper.js +10 -1
- package/mobile/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/lib/ui-kit/Foldable/Foldable.js +1 -1
- package/mobile/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- 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 +1 -1
- package/mobile/src/components/PromoTile/PromoTile.tsx +1 -1
- package/mobile/src/components/Recommendation/RecommendationCard.tsx +1 -1
- package/mobile/src/components/StepsBlock/StepsBlockStyleMaps.ts +1 -1
- package/mobile/src/components/Tabs/Tabs.example.json +3 -3
- package/mobile/src/components/Tabs/Tabs.tsx +5 -4
- package/mobile/src/components/Tabs/TabsContent.ts +9 -2
- package/mobile/src/components/Tabs/renderGroupTab.tsx +51 -0
- package/mobile/src/components/Tabs/renderLinkTab.tsx +25 -0
- package/mobile/src/components/Tabs/renderTab.tsx +18 -38
- package/mobile/src/components/Tabs/tabItemClasses.ts +7 -0
- package/mobile/src/components/__snapshots__/Blocks.spec.tsx.snap +15 -30
- 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/BlockWrapper.tsx +12 -1
- package/mobile/src/ui-kit/Foldable/Foldable.tsx +1 -1
- package/package.json +1 -1
- 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/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 +1 -1
- package/src/components/PromoTile/PromoTile.tsx +1 -1
- package/src/components/Recommendation/RecommendationCard.tsx +1 -1
- package/src/components/StepsBlock/StepsBlockStyleMaps.ts +1 -1
- package/src/components/Tabs/Tabs.example.json +3 -3
- package/src/components/Tabs/Tabs.fixture.tsx +3 -3
- package/src/components/Tabs/Tabs.tsx +5 -4
- package/src/components/Tabs/TabsContent.ts +9 -2
- package/src/components/Tabs/renderGroupTab.tsx +51 -0
- package/src/components/Tabs/renderLinkTab.tsx +25 -0
- package/src/components/Tabs/renderTab.tsx +18 -38
- package/src/components/Tabs/tabItemClasses.ts +7 -0
- package/src/components/__snapshots__/Blocks.spec.tsx.snap +15 -30
- package/src/ui-kit/BenefitItem/BenefitItem.tsx +58 -0
- package/src/ui-kit/BenefitItem/BenefitItemProps.ts +27 -0
- package/src/ui-kit/BlockWrapper.tsx +12 -1
- 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
package/bundle/bundle.umd.js
CHANGED
|
@@ -261,13 +261,22 @@
|
|
|
261
261
|
const { IntersectionObserverTag } = context;
|
|
262
262
|
const [shouldRenderBlock, setShouldRenderBlock] = useState(true);
|
|
263
263
|
useEffect(() => EventBus.inst.subscribe('tab', (event) => {
|
|
264
|
-
|
|
264
|
+
if (event.type === 'group') {
|
|
265
|
+
setShouldRenderBlock(!labels?.length || !event.label || labels.includes(event.label));
|
|
266
|
+
}
|
|
267
|
+
else {
|
|
268
|
+
setShouldRenderBlock(true);
|
|
269
|
+
scrollToBlock(event.label);
|
|
270
|
+
}
|
|
265
271
|
}), [labels]);
|
|
266
272
|
if (!shouldRenderBlock) {
|
|
267
273
|
return null;
|
|
268
274
|
}
|
|
269
275
|
return anchor ? (jsx(IntersectionObserverTag, { tag: tag, className: className, observerCallback: changeHashOnObserve, observerOptions: { threshold: 1 }, anchor: anchor, children: children })) : (jsx(Tag, { className: className, children: children }));
|
|
270
276
|
});
|
|
277
|
+
function scrollToBlock(label) {
|
|
278
|
+
setTimeout(() => globalThis.document.getElementById(`#${label}`)?.scrollIntoView({ behavior: 'smooth' }));
|
|
279
|
+
}
|
|
271
280
|
|
|
272
281
|
const HEADING_STYLE_MAP = {
|
|
273
282
|
h0: 'text-h0',
|
|
@@ -618,15 +627,48 @@
|
|
|
618
627
|
return (jsxs(BlockWrapper, { className: `font-sans text-primary-text p-[50px] bg-white ${className}`, context: context, ...rest, children: [jsx(Headline, { className: "!p-0", title: title, description: description, context: context, align: align, headlineVersion: "M", as: "h2" }), jsx(LinkDocsList, { className: `mt-8 ${linkColumnsModeStyleMap[columnsMode]}`, columnsMode: columnsMode, documents: documents, icon: icon })] }));
|
|
619
628
|
});
|
|
620
629
|
|
|
630
|
+
const titleStyleMap = {
|
|
631
|
+
primary: 'text-primary-text',
|
|
632
|
+
secondary: 'text-white',
|
|
633
|
+
};
|
|
634
|
+
const descStyleMap = {
|
|
635
|
+
primary: 'text-secondary-text',
|
|
636
|
+
secondary: 'text-white',
|
|
637
|
+
};
|
|
638
|
+
const BenefitItem = JSX((props) => {
|
|
639
|
+
const { className = '', icon, label, description, version = 'primary', benefitsVersion = 'normal', } = props;
|
|
640
|
+
const isIconWhite = benefitsVersion === 'white' || version === 'secondary';
|
|
641
|
+
return (jsxs("div", { className: `flex items-center gap-5 ${className}`, children: [icon ? (jsx(Img, { className: renderBenefitIconBgStyle(version, benefitsVersion), image: { ...icon, iconVersion: isIconWhite ? 'white' : 'normal' }, asSVG: true })) : null, jsxs("div", { className: "gap-0.5", children: [label ? jsx("div", { className: `text-h6 ${titleStyleMap[version]}`, children: label }) : null, description ? (jsx("div", { className: `text-m-light ${descStyleMap[version]}`, children: description })) : null] })] }));
|
|
642
|
+
});
|
|
643
|
+
function renderBenefitIconBgStyle(version, benefitsVersion) {
|
|
644
|
+
let bgColorStyle = 'bg-primary-main text-black';
|
|
645
|
+
if (version === 'secondary') {
|
|
646
|
+
bgColorStyle = 'bg-white/30 text-black';
|
|
647
|
+
}
|
|
648
|
+
else if (benefitsVersion === 'normal') {
|
|
649
|
+
bgColorStyle = 'bg-secondary-light text-primary-main';
|
|
650
|
+
}
|
|
651
|
+
return `w-[50px] h-[50px] rounded-full p-[10px] box-border ${bgColorStyle}`;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
const addSpacesBetweenNumbers = (number) => new Intl.NumberFormat('ru-RU', { maximumSignificantDigits: 3 }).format(number);
|
|
655
|
+
|
|
621
656
|
const pictureTextStyleMap = {
|
|
622
657
|
primary: 'bg-white text-primary-text',
|
|
623
658
|
secondary: 'bg-primary-main text-white',
|
|
624
659
|
};
|
|
625
|
-
const PictureText = JSX(({ className = '', title, image, benefits, version = 'primary', directionRight = false, ...rest }) => {
|
|
626
|
-
return (jsxs(BlockWrapper, { className: `relative font-sans p-14 ${pictureTextStyleMap[version]} ${className}`, ...rest, children: [jsx(
|
|
660
|
+
const PictureText = JSX(({ className = '', context, title, description, image, benefits, version = 'primary', sum, monthLimit, directionRight = false, ...rest }) => {
|
|
661
|
+
return (jsxs(BlockWrapper, { className: `relative font-sans p-14 ${pictureTextStyleMap[version]} ${className}`, context: context, ...rest, children: [jsx(Headline, { context: context, className: "!p-0", title: title, description: description, headlineVersion: "M", bgColorHeadline: version, align: "center" }), jsxs("div", { className: 'flex justify-center gap-[122px] mt-[30px]', children: [image?.src && jsx(Img, { className: directionRight ? 'order-2 ml-6' : 'mr-6', image: image }), jsxs("div", { className: "w-[558px] m-auto", children: [benefits?.length ? (jsx("div", { className: "flex flex-col gap-4", children: benefits.map(renderBenefit$1(version)) })) : null, renderInsuranceSumMonth(sum, monthLimit)] })] })] }));
|
|
627
662
|
});
|
|
628
|
-
|
|
629
|
-
|
|
663
|
+
const renderBenefit$1 = (version) => (benefit, i) => (jsx(BenefitItem, { icon: benefit.icon, label: benefit.label, description: benefit.description, version: version }, String(i)));
|
|
664
|
+
function renderInsuranceSumMonth(sum, monthLimit) {
|
|
665
|
+
return sum || monthLimit ? (jsxs("div", { className: "bg-main-divider rounded-md flex mt-7 gap-6 px-5 py-4", children: [Number.isFinite(sum) ? renderValueBlock$1('Страховая сумма:', sum, Boolean(monthLimit)) : null, Number.isFinite(monthLimit)
|
|
666
|
+
? renderValueBlock$1('Ежемесячный лимит:', monthLimit, Boolean(sum))
|
|
667
|
+
: null] })) : null;
|
|
668
|
+
}
|
|
669
|
+
function renderValueBlock$1(title, sum = 0, isAnotherBlock = false) {
|
|
670
|
+
const widthStyle = isAnotherBlock ? 'w-fit' : 'w-full';
|
|
671
|
+
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"] })] }));
|
|
630
672
|
}
|
|
631
673
|
|
|
632
674
|
const isURL = (href) => href?.includes('//');
|
|
@@ -805,34 +847,15 @@
|
|
|
805
847
|
});
|
|
806
848
|
|
|
807
849
|
const BaseTile = JSX(({ className = '', title = '', children, buttons, image }) => {
|
|
808
|
-
return (jsxs("div", { className: `font-sans flex flex-col grow h-full items-start ${className}`, children: [title, jsxs("div", { className: "flex grow w-full justify-between", children: [jsxs("div", { className: "flex flex-col
|
|
850
|
+
return (jsxs("div", { className: `font-sans flex flex-col grow h-full items-start ${className}`, children: [title, jsxs("div", { className: "flex grow w-full justify-between", children: [jsxs("div", { className: "flex flex-col w-full", children: [jsx("div", { children: children }), buttons ? jsx("div", { className: "mt-9", children: buttons }) : null] }), image] })] }));
|
|
809
851
|
});
|
|
810
852
|
|
|
811
|
-
const
|
|
812
|
-
|
|
813
|
-
secondary: 'text-white',
|
|
814
|
-
};
|
|
815
|
-
const benefitDescStyleMap = {
|
|
816
|
-
primary: 'text-secondary-text',
|
|
817
|
-
secondary: 'text-white',
|
|
853
|
+
const renderBenefit = (version = 'primary', benefitsVersion = 'normal') => ({ icon, label, description }, i) => {
|
|
854
|
+
return (jsx(BenefitItem, { icon: icon, label: label, description: description, version: version, benefitsVersion: benefitsVersion }, String(i)));
|
|
818
855
|
};
|
|
819
|
-
function renderBenefit$1({ benefit, version = 'primary', benefitsVersion = 'normal' }, i) {
|
|
820
|
-
const isIconWhite = benefitsVersion === 'white' || version === 'secondary';
|
|
821
|
-
return (jsxs("div", { className: "flex gap-4 items-center", children: [benefit.icon ? (jsx(Img, { className: renderBenefitIconBgStyle(version, benefitsVersion), image: { ...benefit?.icon, iconVersion: isIconWhite ? 'white' : 'normal' }, width: "24", height: "24", asSVG: true })) : null, jsxs("div", { className: "flex gap-0.5 flex-col h-full max-w-[149px] min-w-[149px]", children: [jsx("div", { className: `text-h6 m-0 ${benefitTitleStyleMap[version]}`, children: benefit.label }), benefit.description ? (jsx("div", { className: `text-m-light ${benefitDescStyleMap[version]}`, children: benefit.description })) : null] })] }, String(i)));
|
|
822
|
-
}
|
|
823
|
-
function renderBenefitIconBgStyle(version, benefitsVersion) {
|
|
824
|
-
let bgColorStyle = 'bg-primary-main text-black';
|
|
825
|
-
if (version === 'secondary') {
|
|
826
|
-
bgColorStyle = 'bg-white/30 text-black';
|
|
827
|
-
}
|
|
828
|
-
else if (benefitsVersion === 'normal') {
|
|
829
|
-
bgColorStyle = 'bg-secondary-light text-primary-main';
|
|
830
|
-
}
|
|
831
|
-
return `w-[50px] h-[50px] min-w-[50px] min-h-[50px] rounded-full p-[10px] box-border ${bgColorStyle}`;
|
|
832
|
-
}
|
|
833
856
|
|
|
834
857
|
const ProductBlockInner = JSX(({ className = '', context, title, headlineVersion = 'L', description, benefits, benefitsVersion = 'normal', buttons, image, items, version = 'primary', isDotted = true, textBlockClassName = '', }) => {
|
|
835
|
-
return (jsxs("div", { className: `flex grow justify-between items-stretch h-full ${className}`, children: [jsxs("div", { className: `flex flex-col ${textBlockClassName}`, children: [jsx(Headline, { context: context, title: title, description: description, className: `!p-0 max-w-[600px]`, bgColorHeadline: version, headlineVersion: headlineVersion, align: "left" }), jsxs(BaseTile, { context: context, buttons: getButtons(context, buttons), children: [benefits?.filter((_) => _.label)?.length ? (jsx("div", { className: "flex gap-6 mt-6", children: benefits.map(
|
|
858
|
+
return (jsxs("div", { className: `flex grow justify-between items-stretch h-full ${className}`, children: [jsxs("div", { className: `flex flex-col ${textBlockClassName}`, children: [jsx(Headline, { context: context, title: title, description: description, className: `!p-0 max-w-[600px]`, bgColorHeadline: version, headlineVersion: headlineVersion, align: "left" }), jsxs(BaseTile, { context: context, buttons: getButtons(context, buttons), children: [benefits?.filter((_) => _.label)?.length ? (jsx("div", { className: "flex gap-6 mt-6", children: benefits.map(renderBenefit(version, benefitsVersion)) })) : null, items?.length ? (jsx(List, { className: "mt-5 text-h6", items: items, itemClassName: "mb-[7px]", version: version, isDotted: isDotted })) : null] })] }), image?.src && jsx(Img, { className: "mt-[-50px]", image: image })] }));
|
|
836
859
|
});
|
|
837
860
|
const getButtons = (context, buttons) => {
|
|
838
861
|
return buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex gap-4" })) : null;
|
|
@@ -949,7 +972,7 @@
|
|
|
949
972
|
: null] }), buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex self-end mt-5 gap-4 z-[1] text-l" })) : null, image?.src ? jsx(Img, { className: "absolute right-0 bottom-0", image: image }) : null] }));
|
|
950
973
|
});
|
|
951
974
|
function renderBenefits$1(benefits, version) {
|
|
952
|
-
return (jsxs("div", { className: "flex mt-
|
|
975
|
+
return (jsxs("div", { className: "flex mt-3.5", children: [benefits.length ? (jsx("div", { className: "mr-6 gap-2.5 text-h6", children: benefits.map(renderBenefitLabel) })) : null, benefits.length ? (jsx("div", { className: "pt-1 text-m", children: benefits.map((_, i) => renderBenefitDescription(_, i, version)) })) : null] }));
|
|
953
976
|
}
|
|
954
977
|
function renderBenefitLabel(benefit, i) {
|
|
955
978
|
return (jsx("div", { className: `${i ? 'mt-2.5' : ''}`, children: benefit.label }, String(i)));
|
|
@@ -1173,8 +1196,6 @@
|
|
|
1173
1196
|
return (jsxs("div", { className: "flex flex-col items-center max-w-[292px]", children: [bonusBenefit?.icon ? (jsx(Img, { className: "h-[180px] w-[160px] min-w-[160px] min-h-[160px]", image: bonusBenefit.icon, width: "160", height: "180" })) : null, jsx("div", { children: bonusBenefit?.label ? jsx("span", { className: "text-h6 m-0", children: bonusBenefit.label }) : null })] }, String(i)));
|
|
1174
1197
|
};
|
|
1175
1198
|
|
|
1176
|
-
const addSpacesBetweenNumbers = (number) => new Intl.NumberFormat('ru-RU', { maximumSignificantDigits: 3 }).format(number);
|
|
1177
|
-
|
|
1178
1199
|
const CalculatorValueBlock = JSX(({ title, value, postfix = '', prefix, className = '' }) => {
|
|
1179
1200
|
return (jsxs("div", { className: `mb-5 ${className}`, children: [title ? jsx("div", { className: "text-l-light", children: title }) : null, value ? (jsxs("div", { className: "text-h3", children: [prefix, " ", addSpacesBetweenNumbers(Math.round(value)), " ", postfix] })) : null] }));
|
|
1180
1201
|
});
|
|
@@ -1981,9 +2002,9 @@
|
|
|
1981
2002
|
transparent: 'text-white',
|
|
1982
2003
|
};
|
|
1983
2004
|
const Logo = JSX(({ className = '', href, logo, children = logo?.title, targetBlank, bgColor = 'bg-white', hideTitle, }) => {
|
|
1984
|
-
return (jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className}`, href: href || '/', target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title || 'Россельхозбанк', children: [logo?.image?.src ? (jsx(Img, { image: logo.image, className: SVG_COLOR[bgColor], width: "40", height: "45", asSVG: true })) : (jsx(Img, { image: { icon: 'Logo' }, className: `${SVG_COLOR[bgColor]} w-10`, width: "40", height: "45", asSVG: true })), hideTitle ? null : renderTitle(children, bgColor, logo?.title)] }));
|
|
2005
|
+
return (jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className}`, href: href || '/', target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title || 'Россельхозбанк', children: [logo?.image?.src ? (jsx(Img, { image: logo.image, className: SVG_COLOR[bgColor], width: "40", height: "45", asSVG: true })) : (jsx(Img, { image: { icon: 'Logo' }, className: `${SVG_COLOR[bgColor]} w-10`, width: "40", height: "45", asSVG: true })), hideTitle ? null : renderTitle$1(children, bgColor, logo?.title)] }));
|
|
1985
2006
|
});
|
|
1986
|
-
const renderTitle = (children, bgColor, title) => {
|
|
2007
|
+
const renderTitle$1 = (children, bgColor, title) => {
|
|
1987
2008
|
const text = children || title || 'Россельхозбанк';
|
|
1988
2009
|
return jsx("span", { className: `${TEXT_COLOR[bgColor]} font-medium ml-2.5`, children: text });
|
|
1989
2010
|
};
|
|
@@ -2182,12 +2203,12 @@
|
|
|
2182
2203
|
const { className = '', tabs, currentTag, isShowCounter = false, onTabClick } = props;
|
|
2183
2204
|
return (jsx("div", { className: `box-border flex gap-x-1 h-14 ${className}`, role: "tablist", children: tabs?.map(renderTab$2({ currentTag, isShowCounter, onTabClick })) }));
|
|
2184
2205
|
});
|
|
2185
|
-
const badgeStyle
|
|
2206
|
+
const badgeStyle = 'min-w-[22px] w-[22px] h-[22px] rounded-full text-xs-light ml-2';
|
|
2186
2207
|
const renderTab$2 = ({ currentTag, isShowCounter, onTabClick }) => (tab, i) => {
|
|
2187
2208
|
const isActive = currentTag === tab.tag;
|
|
2188
2209
|
const tabBg = isActive ? 'bg-primary-main' : 'group bg-white';
|
|
2189
2210
|
const tabText = `text-m-light ${isActive ? 'text-white' : 'text-secondary-text group-hover:text-primary-main'}`;
|
|
2190
|
-
const counterBlockStyle = `${badgeStyle
|
|
2211
|
+
const counterBlockStyle = `${badgeStyle}
|
|
2191
2212
|
${isActive
|
|
2192
2213
|
? 'bg-white/30 text-white'
|
|
2193
2214
|
: 'bg-main-divider text-secondary-text group-hover:text-primary-main'}`;
|
|
@@ -2218,22 +2239,22 @@
|
|
|
2218
2239
|
isHrefActive(topItem.href, router) ||
|
|
2219
2240
|
checkIsHrefSameOrigin(topItem.href, router);
|
|
2220
2241
|
|
|
2221
|
-
const TEXT_CLASSES$
|
|
2222
|
-
const LINK_CLASSES$
|
|
2242
|
+
const TEXT_CLASSES$3 = 'font-sans text-s-light';
|
|
2243
|
+
const LINK_CLASSES$2 = 'inline-block border border-solid bg-transparent text-center no-underline';
|
|
2223
2244
|
const TopItem = JSX(({ className = '', text, href, target, active, flat, onClick, children, ariaLabel, bgColor = 'bg-white', }) => (jsx("a", { className: `${getLinkClasses$1(bgColor, active, flat)} ${className}`, href: href, target: target, onClick: onClick, rel: "noopener noreferrer", "aria-label": ariaLabel, children: jsx("span", { className: getTextClasses$2(bgColor, active, flat), children: text || children }) })));
|
|
2224
2245
|
const getLinkClasses$1 = (bgColor, active = false, flat = false) => {
|
|
2225
2246
|
let classes = 'border-transparent';
|
|
2226
2247
|
if (active) {
|
|
2227
2248
|
classes = `rounded-md ${bgColor === 'bg-white' ? 'border-primary-main' : 'border-white'}`;
|
|
2228
2249
|
}
|
|
2229
|
-
return `${classes} ${LINK_CLASSES$
|
|
2250
|
+
return `${classes} ${LINK_CLASSES$2} ${flat ? '' : 'px-4 py-2'}`;
|
|
2230
2251
|
};
|
|
2231
2252
|
const getTextClasses$2 = (bgColor, active = false, flat = false) => {
|
|
2232
2253
|
if (bgColor !== 'bg-white') {
|
|
2233
|
-
return `text-white ${TEXT_CLASSES$
|
|
2254
|
+
return `text-white ${TEXT_CLASSES$3}`;
|
|
2234
2255
|
}
|
|
2235
2256
|
const nonActiveAtoms = `${flat ? 'text-primary-text' : 'text-secondary-text'} hover:text-primary-main`;
|
|
2236
|
-
return `${active ? 'text-primary-main' : nonActiveAtoms} ${TEXT_CLASSES$
|
|
2257
|
+
return `${active ? 'text-primary-main' : nonActiveAtoms} ${TEXT_CLASSES$3}`;
|
|
2237
2258
|
};
|
|
2238
2259
|
|
|
2239
2260
|
const DaData = DaDataAPI('https://10.80.4.9');
|
|
@@ -2280,7 +2301,7 @@
|
|
|
2280
2301
|
: undefined;
|
|
2281
2302
|
};
|
|
2282
2303
|
|
|
2283
|
-
const TEXT_CLASSES$
|
|
2304
|
+
const TEXT_CLASSES$2 = 'font-sans text-l-light';
|
|
2284
2305
|
const BORDER_CLASSES = 'absolute left-0 -bottom-3 w-full h-[2px]';
|
|
2285
2306
|
const HeaderItem = JSX(({ className = '', text, href, target, active, onClick, children, bgColor = 'bg-white', dataItemName, }) => (jsxs("a", { className: `relative inline-block bg-transparent text-center no-underline ${className}`, href: href, target: target, onClick: onClick, "data-item-name": dataItemName, children: [jsx("span", { className: getTextClasses$1(bgColor, active), children: text || children }), active ? jsx("div", { className: getBorderClasses(bgColor, active) }) : null] })));
|
|
2286
2307
|
const getTextClasses$1 = (bgColor, active = false) => {
|
|
@@ -2288,7 +2309,7 @@
|
|
|
2288
2309
|
if (bgColor === 'bg-white') {
|
|
2289
2310
|
classes = active ? 'text-primary-main' : 'text-primary-text hover:text-primary-main';
|
|
2290
2311
|
}
|
|
2291
|
-
return `${classes} ${TEXT_CLASSES$
|
|
2312
|
+
return `${classes} ${TEXT_CLASSES$2}`;
|
|
2292
2313
|
};
|
|
2293
2314
|
const getBorderClasses = (bgColor, active = false) => {
|
|
2294
2315
|
if (!active) {
|
|
@@ -2352,22 +2373,6 @@
|
|
|
2352
2373
|
return (jsx(BlockWrapper, { tag: "header", context: context, className: `pt-6 pb-5 px-20 ${bgColor} ${className}`, ...rest, children: jsxs("div", { className: "container", children: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-8", bgColor: bgColor, logo: logo }), topMenu, jsx(HeaderSecondaryMenu, { className: "ml-auto", defaultLocation: defaultLocation, bgColor: bgColor })] }), jsx("div", { className: `mt-6 h-[1px] ${BORDER_COLORS[bgColor]}` }), showSubMenu && activeTopItem?.items?.length ? (jsx(HeaderSubMenu, { context: context, subItems: activeTopItem.items, bgColor: bgColor })) : null] }) }));
|
|
2353
2374
|
});
|
|
2354
2375
|
|
|
2355
|
-
const Insurance = JSX(({ context, className = '', title, description, image, benefits, sum, monthLimit, ...rest }) => {
|
|
2356
|
-
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)] })] }) })] }));
|
|
2357
|
-
});
|
|
2358
|
-
function renderBenefit(benefit, i) {
|
|
2359
|
-
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)));
|
|
2360
|
-
}
|
|
2361
|
-
function renderInsuranceSumMonth(sum, monthLimit) {
|
|
2362
|
-
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$1('Страховая сумма:', sum, Boolean(monthLimit)) : null, Number.isFinite(monthLimit)
|
|
2363
|
-
? renderValueBlock$1('Ежемесячный лимит:', monthLimit, Boolean(sum))
|
|
2364
|
-
: null] })) : null;
|
|
2365
|
-
}
|
|
2366
|
-
function renderValueBlock$1(title, sum = 0, isAnotherBlock = false) {
|
|
2367
|
-
const widthStyle = isAnotherBlock ? 'w-fit' : 'w-full';
|
|
2368
|
-
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"] })] }));
|
|
2369
|
-
}
|
|
2370
|
-
|
|
2371
2376
|
const InsuranceAmountBlockInner = JSX(({ className = '', cards = [], button }) => {
|
|
2372
2377
|
const [activeSlideIndex, setActiveSlideIndex] = useState(0);
|
|
2373
2378
|
const [tabsShift, setTabsShift] = useState(0);
|
|
@@ -2473,16 +2478,16 @@
|
|
|
2473
2478
|
.map((button, i) => (jsx(NavigationItem, { className: "first:rounded-tl-md first:rounded-bl-md last:rounded-tr-md last:rounded-br-md", isActive: button === activeButton, ...useLink({ router, handlerDecorator }, button) }, String(i)))) })) : null] }));
|
|
2474
2479
|
});
|
|
2475
2480
|
|
|
2476
|
-
const TEXT_CLASSES = 'font-sans text-m';
|
|
2477
|
-
const LINK_CLASSES = 'flex-1 flex items-center justify-center cursor-pointer';
|
|
2481
|
+
const TEXT_CLASSES$1 = 'font-sans text-m';
|
|
2482
|
+
const LINK_CLASSES$1 = 'flex-1 flex items-center justify-center cursor-pointer';
|
|
2478
2483
|
const NavigatorTabItem = JSX(({ className = '', text, active, onClick, href, target = '_self', children }) => (jsx("a", { className: getLinkClasses(className, active), target: target, href: href, onClick: onClick, children: jsx("span", { className: getTextClasses(active), children: text || children }) })));
|
|
2479
2484
|
const getLinkClasses = (className, active = false) => {
|
|
2480
2485
|
const classes = active ? 'bg-primary-main' : 'group bg-white';
|
|
2481
|
-
return `${classes} ${LINK_CLASSES} ${className}`;
|
|
2486
|
+
return `${classes} ${LINK_CLASSES$1} ${className}`;
|
|
2482
2487
|
};
|
|
2483
2488
|
const getTextClasses = (active = false) => {
|
|
2484
2489
|
const classes = active ? 'text-white' : 'text-secondary-text group-hover:text-primary-main ';
|
|
2485
|
-
return `${classes} ${TEXT_CLASSES}`;
|
|
2490
|
+
return `${classes} ${TEXT_CLASSES$1}`;
|
|
2486
2491
|
};
|
|
2487
2492
|
|
|
2488
2493
|
const NavigatorTabs = JSX(({ className = '', navigatorTabs, context, ...rest }) => {
|
|
@@ -2521,7 +2526,7 @@
|
|
|
2521
2526
|
initialState: isUnfolded,
|
|
2522
2527
|
});
|
|
2523
2528
|
const buttonClassName = foldButtonClasses ||
|
|
2524
|
-
'border-none bg-primary-main px-0 py-[26px] mb-[1px] w-full font-sans text-white text-
|
|
2529
|
+
'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';
|
|
2525
2530
|
const getFoldButtonLabel = isActive ? 'Скрыть' : foldButtonLabel;
|
|
2526
2531
|
return blocks ? (jsxs("div", { children: [renderBlocks(blocks, render, { blocksToHide, isActive, containerClasses }), hiddenBlocksNum ? (jsxs("button", { className: buttonClassName, "data-theme": foldButtonDataTheme, onClick: handleToggle, children: [jsx("span", { className: "pr-3", children: getFoldButtonLabel }), icon ? jsx(Icon, { name: icon, iconVersion: "white", width: "20", height: "20", asSVG: true }) : null] })) : null] })) : null;
|
|
2527
2532
|
});
|
|
@@ -2586,7 +2591,7 @@
|
|
|
2586
2591
|
const galleryBlocks = slides.map((s) => s.productBlock);
|
|
2587
2592
|
const [activeSlideIndex, setActiveSlideIndex] = useState(0);
|
|
2588
2593
|
return (jsxs(BlockWrapper, { context: context, className: `box-border pt-[50px] overflow-hidden relative font-sans w-100 ${className}
|
|
2589
|
-
${productGalleryStyleMap[version]}`, ...rest, children: [jsx("div", { className: "flex duration-1000 pb-14", style: { transform: `translateX(-${activeSlideIndex}00%)` }, role: "list", children: galleryBlocks.map((_, i) => renderProductBlock({ ..._, version }, i, context)) }), jsx("div", { className: "flex items-center absolute bottom-6 left-0 right-0 px-[26px] box-border", children: galleryNav.map((slide, i) => renderNavButton({
|
|
2594
|
+
${productGalleryStyleMap[version]}`, ...rest, children: [jsx("div", { className: "flex duration-1000 pb-14", style: { transform: `translateX(-${activeSlideIndex}00%)` }, role: "list", children: galleryBlocks.map((_, i) => renderProductBlock({ ..._, version }, i, context)) }), jsx("div", { className: "flex items-center absolute bottom-6 left-0 right-0 px-[26px] box-border h-28", children: galleryNav.map((slide, i) => renderNavButton({
|
|
2590
2595
|
slide,
|
|
2591
2596
|
i,
|
|
2592
2597
|
activeSlideIndex,
|
|
@@ -2597,13 +2602,13 @@
|
|
|
2597
2602
|
function renderProductBlock(block, i, context) {
|
|
2598
2603
|
const { version } = block;
|
|
2599
2604
|
const additionalClass = version ? productBlockStyleMap[version].title : '';
|
|
2600
|
-
return (jsx("section", { className: "box-border relative flex grow-0 shrink-0 basis-full", role: "listitem", children: jsx("div", { className: "flex grow", children: jsx(ProductBlockInner, { className: `pl-[50px] z-[1] ${additionalClass}`, context: context, textBlockClassName: "mb-[154px]", ...block }) }) }, String(i)));
|
|
2605
|
+
return (jsx("section", { className: "box-border relative flex grow-0 shrink-0 basis-full", role: "listitem", children: jsx("div", { className: "flex grow", children: jsx(ProductBlockInner, { className: `pl-[50px] z-[1] ${additionalClass}`, context: context, textBlockClassName: "mb-[154px]", ...block, headlineVersion: "XXL" }) }) }, String(i)));
|
|
2601
2606
|
}
|
|
2602
2607
|
function renderNavButton({ slide, i, activeSlideIndex, onClick, version }) {
|
|
2603
2608
|
const isActiveBtn = i === activeSlideIndex;
|
|
2604
2609
|
const btnClassName = isActiveBtn
|
|
2605
|
-
? 'bg-white shadow-dark-blue/42
|
|
2606
|
-
: `min-w-[277px]
|
|
2610
|
+
? 'bg-white shadow-dark-blue/42 w-[354px] min-w-[354px] border-none'
|
|
2611
|
+
: `min-w-[277px] hover:py-[26px] hover:py-[26px] ease-in duration-300 bg-white/10
|
|
2607
2612
|
${productSlideStyleMap[version]}`;
|
|
2608
2613
|
const btnTitleClassName = isActiveBtn
|
|
2609
2614
|
? 'text-primary-text text-h6'
|
|
@@ -2612,7 +2617,7 @@
|
|
|
2612
2617
|
? 'text-secondary-text text-m-title-xs mt-2.5'
|
|
2613
2618
|
: `text-m mt-1.5 ${productBlockStyleMap[version].text}`;
|
|
2614
2619
|
const additionalBorder = version === 'secondary' ? 'border-white/50' : 'border-black/50';
|
|
2615
|
-
return (jsx("button", { type: "button", onClick: onClick, "aria-label": slide?.title, className: `box-border font-sans relative overflow-hidden border border-white/50 cursor-pointer text-left mx-1 grow basis-0
|
|
2620
|
+
return (jsx("button", { type: "button", onClick: onClick, "aria-label": slide?.title, className: `box-border font-sans relative overflow-hidden border border-white/50 cursor-pointer text-left mx-1 grow basis-0 pt-5 pb-[23px]
|
|
2616
2621
|
${btnClassName} ${additionalBorder}
|
|
2617
2622
|
`, children: jsxs("div", { className: "border-0 px-6", children: [jsx("div", { className: `font-medium ${btnTitleClassName}`, children: slide?.title }), jsx("div", { className: `text-secondary-text ${btnDescClassName}`, children: slide.description })] }) }, String(i)));
|
|
2618
2623
|
}
|
|
@@ -2622,7 +2627,7 @@
|
|
|
2622
2627
|
secondary: 'bg-primary-main text-white',
|
|
2623
2628
|
};
|
|
2624
2629
|
const PromoTile = JSX(({ className = '', context, title = 'Акции и спецпредложения', date, description, buttons = [], version = 'primary', ...rest }) => {
|
|
2625
|
-
return (jsx(BlockWrapper, { context: context, className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${promoTileStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, ...rest, children: jsx(BaseTile, { context: context, title: title ? (jsx("div", { children: jsx(Headline, { context: context, title: title, className: `!p-0 max-w-[600px]`, headlineVersion: getTileHeadingType(className), bgColorHeadline: version, align: "left", as: "h2" }) })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex
|
|
2630
|
+
return (jsx(BlockWrapper, { context: context, className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${promoTileStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, ...rest, children: jsx(BaseTile, { context: context, title: title ? (jsx("div", { children: jsx(Headline, { context: context, title: title, className: `!p-0 max-w-[600px]`, headlineVersion: getTileHeadingType(className), bgColorHeadline: version, align: "left", as: "h2" }) })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex gap-3" })) : null, children: jsxs("div", { className: "mt-1.5", children: [date ? jsx("div", { className: "text-s mb-2", children: formatDate(date) }) : null, jsx("div", { className: "text-l", children: description })] }) }) }));
|
|
2626
2631
|
});
|
|
2627
2632
|
function formatDate(date) {
|
|
2628
2633
|
const dateObj = new Date(date);
|
|
@@ -2880,30 +2885,49 @@
|
|
|
2880
2885
|
return (jsxs("div", { className: "flex flex-col items-center justify-between text-center relative w-[276px]\n whitespace-pre-line overflow-hidden", children: [step?.label ? jsx("div", { className: "text-xl m-0 mt-4", children: step.label }) : null, step?.description ? (jsx("div", { className: `text-l-light ${styleMap.description} ${additionalMarginClass}`, children: step.description })) : null, step.button?.text && !isMainButton ? (jsx(Button, { className: "box-border mt-8 py-3 h-12 w-full max-w-[240px]", ...useLink({ router, handlerDecorator }, step.button), version: version, children: step.button.text })) : null] }, String(i)));
|
|
2881
2886
|
};
|
|
2882
2887
|
|
|
2883
|
-
const
|
|
2884
|
-
const
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2888
|
+
const LINK_CLASSES = 'h-12 flex-1 flex items-center justify-center cursor-pointer';
|
|
2889
|
+
const ACTIVE_LINK_CLASSES = 'bg-primary-main';
|
|
2890
|
+
const INACTIVE_LINK_CLASSES = 'group bg-white';
|
|
2891
|
+
const TEXT_CLASSES = 'font-sans text-m';
|
|
2892
|
+
const ACTIVE_TEXT_CLASSES = 'text-white';
|
|
2893
|
+
const INACTIVE_TEXT_CLASSES = 'text-secondary-text group-hover:text-primary-main';
|
|
2894
|
+
|
|
2895
|
+
const BADGE_CLASSES = 'min-w-[22px] w-[22px] h-[22px] rounded-full text-xs ml-2';
|
|
2896
|
+
const ACTIVE_BADGE_CLASSES = 'bg-white/30 text-white';
|
|
2897
|
+
const INACTIVE_BADGE_CLASSES = 'bg-main-divider text-secondary-text group-hover:text-primary-main';
|
|
2898
|
+
const renderGroupTab = ({ onClick, currentTab, showCounter, page }) => (tab, i) => {
|
|
2899
|
+
const active = currentTab === tab;
|
|
2900
|
+
const count = tab.ref
|
|
2901
|
+
? page?.blocks?.filter((block) => block?.labels?.includes(tab.ref)).length
|
|
2894
2902
|
: page?.blocks?.length;
|
|
2895
|
-
return (jsx("div", { className:
|
|
2903
|
+
return (jsx("div", { className: `${LINK_CLASSES} ${active ? ACTIVE_LINK_CLASSES : INACTIVE_LINK_CLASSES}`, role: "tab", "aria-selected": active, onClick: () => onClick(tab), children: jsxs("div", { className: "flex flex-1 items-center justify-center", children: [tab?.title ? renderTitle(tab.title, active) : null, showCounter && count ? renderCount(count, active) : null] }) }, String(i)));
|
|
2904
|
+
};
|
|
2905
|
+
const renderTitle = (title, active) => (jsx("h3", { className: `${TEXT_CLASSES} ${active ? ACTIVE_TEXT_CLASSES : INACTIVE_TEXT_CLASSES}`, children: title }));
|
|
2906
|
+
const renderCount = (count, active) => (jsx("div", { className: `${BADGE_CLASSES} ${active ? ACTIVE_BADGE_CLASSES : INACTIVE_BADGE_CLASSES}`, children: count }));
|
|
2907
|
+
|
|
2908
|
+
const renderLinkTab = ({ text, onClick, href, target = '_self', i }) => (jsx("a", { className: `${LINK_CLASSES} ${INACTIVE_LINK_CLASSES}`, target: target, href: href, onClick: onClick, children: jsx("span", { className: `${TEXT_CLASSES} ${INACTIVE_TEXT_CLASSES}`, children: text }) }, String(i)));
|
|
2909
|
+
|
|
2910
|
+
const renderTab = ({ onClick, currentTab, showCounter, page, context }) => (tab, i) => {
|
|
2911
|
+
const { useRouter, handlerDecorator } = context;
|
|
2912
|
+
const router = useRouter();
|
|
2913
|
+
if (isURL(tab?.ref)) {
|
|
2914
|
+
return renderLinkTab({
|
|
2915
|
+
...useLink({ router, handlerDecorator }, { href: tab.ref, text: tab.title }),
|
|
2916
|
+
i,
|
|
2917
|
+
});
|
|
2918
|
+
}
|
|
2919
|
+
return renderGroupTab({ onClick, currentTab, showCounter, page, context })(tab, i);
|
|
2896
2920
|
};
|
|
2897
2921
|
|
|
2898
2922
|
const Tabs = JSX((props) => {
|
|
2899
2923
|
const { context, className, tabs, page, showCounter } = props;
|
|
2900
2924
|
const [currentTab, setCurrentTab] = useState(tabs ? tabs[0] : undefined);
|
|
2901
|
-
useEffect(() => EventBus.inst.subject('tab', { label: currentTab?.
|
|
2925
|
+
useEffect(() => EventBus.inst.subject('tab', { label: currentTab?.ref }), [currentTab]);
|
|
2902
2926
|
const handleClick = (selectedTab) => {
|
|
2903
|
-
EventBus.inst.fire('tab', { label: selectedTab.
|
|
2927
|
+
EventBus.inst.fire('tab', { type: selectedTab.type, label: selectedTab.ref });
|
|
2904
2928
|
setCurrentTab(selectedTab);
|
|
2905
2929
|
};
|
|
2906
|
-
return (jsx(BlockWrapper, { context: context, className: `mb-2 box-border flex gap-x-1 ${className}`, role: "tablist", children: tabs?.map(renderTab({ onClick: handleClick, currentTab, page, showCounter })) }));
|
|
2930
|
+
return (jsx(BlockWrapper, { context: context, className: `mb-2 box-border flex gap-x-1 ${className}`, role: "tablist", children: tabs?.map(renderTab({ onClick: handleClick, currentTab, page, showCounter, context })) }));
|
|
2907
2931
|
});
|
|
2908
2932
|
|
|
2909
2933
|
const DIVIDER_CLASSES = 'border-main-divider border border-t-0 border-x-0';
|
|
@@ -2961,7 +2985,6 @@
|
|
|
2961
2985
|
GracePeriod,
|
|
2962
2986
|
Header,
|
|
2963
2987
|
Headline,
|
|
2964
|
-
Insurance,
|
|
2965
2988
|
InsuranceAmountBlock,
|
|
2966
2989
|
LinkDocs,
|
|
2967
2990
|
MiniGallery,
|