@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
|
@@ -4,9 +4,10 @@ import { EventBus } from '../../EventBus/EventBus';
|
|
|
4
4
|
import type { UniBlockProps } from '../../types';
|
|
5
5
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
6
6
|
import { renderTab } from './renderTab';
|
|
7
|
-
import type { Tab, TabsContent } from './TabsContent';
|
|
7
|
+
import type { Tab, TabsContent, TabType } from './TabsContent';
|
|
8
8
|
|
|
9
9
|
export interface TabActivationEvent {
|
|
10
|
+
type?: TabType;
|
|
10
11
|
label?: string;
|
|
11
12
|
}
|
|
12
13
|
|
|
@@ -17,10 +18,10 @@ export const Tabs = JSX<TabsProps>((props) => {
|
|
|
17
18
|
|
|
18
19
|
const [currentTab, setCurrentTab] = useState(tabs ? tabs[0] : undefined);
|
|
19
20
|
|
|
20
|
-
useEffect(() => EventBus.inst.subject('tab', { label: currentTab?.
|
|
21
|
+
useEffect(() => EventBus.inst.subject('tab', { label: currentTab?.ref }), [currentTab]);
|
|
21
22
|
|
|
22
23
|
const handleClick = (selectedTab: Tab) => {
|
|
23
|
-
EventBus.inst.fire('tab', { label: selectedTab.
|
|
24
|
+
EventBus.inst.fire('tab', { type: selectedTab.type, label: selectedTab.ref });
|
|
24
25
|
setCurrentTab(selectedTab);
|
|
25
26
|
};
|
|
26
27
|
|
|
@@ -30,7 +31,7 @@ export const Tabs = JSX<TabsProps>((props) => {
|
|
|
30
31
|
className={`mb-2 box-border flex gap-x-1 ${className}`}
|
|
31
32
|
role="tablist"
|
|
32
33
|
>
|
|
33
|
-
{tabs?.map(renderTab({ onClick: handleClick, currentTab, page, showCounter }))}
|
|
34
|
+
{tabs?.map(renderTab({ onClick: handleClick, currentTab, page, showCounter, context }))}
|
|
34
35
|
</BlockWrapper>
|
|
35
36
|
);
|
|
36
37
|
});
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
export type TabType = 'group' | 'link';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* @title Таб
|
|
3
5
|
*/
|
|
4
6
|
export interface Tab {
|
|
5
|
-
/** @title
|
|
6
|
-
|
|
7
|
+
/** @title Тег или ссылка */
|
|
8
|
+
ref?: string;
|
|
9
|
+
/**
|
|
10
|
+
* @title Тип
|
|
11
|
+
* @enumNames ['Группирующий', 'Ссылочный']
|
|
12
|
+
*/
|
|
13
|
+
type?: TabType;
|
|
7
14
|
/** @title Название */
|
|
8
15
|
title?: string;
|
|
9
16
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { RenderTabProps } from './renderTab';
|
|
2
|
+
import {
|
|
3
|
+
ACTIVE_LINK_CLASSES,
|
|
4
|
+
ACTIVE_TEXT_CLASSES,
|
|
5
|
+
INACTIVE_LINK_CLASSES,
|
|
6
|
+
INACTIVE_TEXT_CLASSES,
|
|
7
|
+
LINK_CLASSES,
|
|
8
|
+
TEXT_CLASSES,
|
|
9
|
+
} from './tabItemClasses';
|
|
10
|
+
import { Tab } from './TabsContent';
|
|
11
|
+
|
|
12
|
+
const BADGE_CLASSES = 'min-w-[22px] w-[22px] h-[22px] rounded-full text-xs ml-2';
|
|
13
|
+
const ACTIVE_BADGE_CLASSES = 'bg-white/30 text-white';
|
|
14
|
+
const INACTIVE_BADGE_CLASSES = 'bg-main-divider text-secondary-text group-hover:text-primary-main';
|
|
15
|
+
|
|
16
|
+
export const renderGroupTab =
|
|
17
|
+
({ onClick, currentTab, showCounter, page }: RenderTabProps) =>
|
|
18
|
+
(tab: Tab, i: number) => {
|
|
19
|
+
const active = currentTab === tab;
|
|
20
|
+
|
|
21
|
+
const count = tab.ref
|
|
22
|
+
? page?.blocks?.filter((block) => block?.labels?.includes(tab.ref as string)).length
|
|
23
|
+
: page?.blocks?.length;
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<div
|
|
27
|
+
key={String(i)}
|
|
28
|
+
className={`${LINK_CLASSES} ${active ? ACTIVE_LINK_CLASSES : INACTIVE_LINK_CLASSES}`}
|
|
29
|
+
role="tab"
|
|
30
|
+
aria-selected={active}
|
|
31
|
+
onClick={() => onClick(tab)}
|
|
32
|
+
>
|
|
33
|
+
<div className="flex flex-1 items-center justify-center">
|
|
34
|
+
{tab?.title ? renderTitle(tab.title, active) : null}
|
|
35
|
+
{showCounter && count ? renderCount(count, active) : null}
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const renderTitle = (title: string, active: boolean) => (
|
|
42
|
+
<h3 className={`${TEXT_CLASSES} ${active ? ACTIVE_TEXT_CLASSES : INACTIVE_TEXT_CLASSES}`}>
|
|
43
|
+
{title}
|
|
44
|
+
</h3>
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
const renderCount = (count: number, active: boolean) => (
|
|
48
|
+
<div className={`${BADGE_CLASSES} ${active ? ACTIVE_BADGE_CLASSES : INACTIVE_BADGE_CLASSES}`}>
|
|
49
|
+
{count}
|
|
50
|
+
</div>
|
|
51
|
+
);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { LinkProps } from '../../model/LinkProps';
|
|
2
|
+
import {
|
|
3
|
+
INACTIVE_LINK_CLASSES,
|
|
4
|
+
INACTIVE_TEXT_CLASSES,
|
|
5
|
+
LINK_CLASSES,
|
|
6
|
+
TEXT_CLASSES,
|
|
7
|
+
} from './tabItemClasses';
|
|
8
|
+
|
|
9
|
+
export interface RenderLinkTabProps extends LinkProps {
|
|
10
|
+
active?: boolean;
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
i: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const renderLinkTab = ({ text, onClick, href, target = '_self', i }: RenderLinkTabProps) => (
|
|
16
|
+
<a
|
|
17
|
+
key={String(i)}
|
|
18
|
+
className={`${LINK_CLASSES} ${INACTIVE_LINK_CLASSES}`}
|
|
19
|
+
target={target}
|
|
20
|
+
href={href}
|
|
21
|
+
onClick={onClick}
|
|
22
|
+
>
|
|
23
|
+
<span className={`${TEXT_CLASSES} ${INACTIVE_TEXT_CLASSES}`}>{text}</span>
|
|
24
|
+
</a>
|
|
25
|
+
);
|
|
@@ -1,51 +1,31 @@
|
|
|
1
|
+
import { useLink } from '../../hooks/useLink';
|
|
1
2
|
import type { ContentPageDef } from '../../types';
|
|
3
|
+
import { isURL } from '../../utils/url';
|
|
4
|
+
import type { ContentPageContext } from '../ContentPage/ContentPageContext';
|
|
5
|
+
import { renderGroupTab } from './renderGroupTab';
|
|
6
|
+
import { renderLinkTab } from './renderLinkTab';
|
|
2
7
|
import type { Tab } from './TabsContent';
|
|
3
8
|
|
|
4
|
-
interface RenderTabProps {
|
|
5
|
-
onClick:
|
|
9
|
+
export interface RenderTabProps {
|
|
10
|
+
onClick: (tab: Tab) => void;
|
|
6
11
|
currentTab?: Tab;
|
|
7
12
|
page?: ContentPageDef;
|
|
8
13
|
showCounter?: boolean;
|
|
14
|
+
context: ContentPageContext;
|
|
9
15
|
}
|
|
10
16
|
|
|
11
|
-
type OnTabClick = (tab: Tab) => void;
|
|
12
|
-
|
|
13
|
-
const badgeStyle = 'min-w-[22px] w-[22px] h-[22px] rounded-full text-xs-light ml-2';
|
|
14
|
-
|
|
15
17
|
export const renderTab =
|
|
16
|
-
({ onClick, currentTab, showCounter, page }: RenderTabProps) =>
|
|
18
|
+
({ onClick, currentTab, showCounter, page, context }: RenderTabProps) =>
|
|
17
19
|
(tab: Tab, i: number) => {
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
const tabBg = isActive ? 'bg-primary-main' : 'group bg-white';
|
|
21
|
-
const tabText = `text-m-light ${
|
|
22
|
-
isActive ? 'text-white' : 'text-secondary-text group-hover:text-primary-main'
|
|
23
|
-
}`;
|
|
24
|
-
const counterBlockStyle = `${badgeStyle}
|
|
25
|
-
${
|
|
26
|
-
isActive
|
|
27
|
-
? 'bg-white/30 text-white'
|
|
28
|
-
: 'bg-main-divider text-secondary-text group-hover:text-primary-main'
|
|
29
|
-
}`;
|
|
20
|
+
const { useRouter, handlerDecorator } = context;
|
|
21
|
+
const router = useRouter();
|
|
30
22
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
23
|
+
if (isURL(tab?.ref)) {
|
|
24
|
+
return renderLinkTab({
|
|
25
|
+
...useLink({ router, handlerDecorator }, { href: tab.ref, text: tab.title }),
|
|
26
|
+
i,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
34
29
|
|
|
35
|
-
return (
|
|
36
|
-
<div
|
|
37
|
-
key={String(i)}
|
|
38
|
-
className={`flex h-12 w-full flex-1 cursor-pointer mr-2 last:mr-0 box-content ${tabBg}`}
|
|
39
|
-
role="tab"
|
|
40
|
-
aria-selected={isActive}
|
|
41
|
-
onClick={() => onClick(tab)}
|
|
42
|
-
>
|
|
43
|
-
<div className="flex flex-1 items-center justify-center">
|
|
44
|
-
{tab?.title ? <h3 className={tabText}>{tab?.title}</h3> : null}
|
|
45
|
-
{showCounter ? (
|
|
46
|
-
<div className={`flex items-center justify-center ${counterBlockStyle}`}>{count}</div>
|
|
47
|
-
) : null}
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
);
|
|
30
|
+
return renderGroupTab({ onClick, currentTab, showCounter, page, context })(tab, i);
|
|
51
31
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export const LINK_CLASSES = 'h-12 flex-1 flex items-center justify-center cursor-pointer';
|
|
2
|
+
export const ACTIVE_LINK_CLASSES = 'bg-primary-main';
|
|
3
|
+
export const INACTIVE_LINK_CLASSES = 'group bg-white';
|
|
4
|
+
|
|
5
|
+
export const TEXT_CLASSES = 'font-sans text-m';
|
|
6
|
+
export const ACTIVE_TEXT_CLASSES = 'text-white';
|
|
7
|
+
export const INACTIVE_TEXT_CLASSES = 'text-secondary-text group-hover:text-primary-main';
|
|
@@ -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>
|
|
@@ -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
|
+
};
|
|
@@ -22,7 +22,12 @@ export const BlockWrapper = JSX<BlockWrapperProps>(
|
|
|
22
22
|
useEffect(
|
|
23
23
|
() =>
|
|
24
24
|
EventBus.inst.subscribe('tab', (event) => {
|
|
25
|
-
|
|
25
|
+
if (event.type === 'group') {
|
|
26
|
+
setShouldRenderBlock(!labels?.length || !event.label || labels.includes(event.label));
|
|
27
|
+
} else {
|
|
28
|
+
setShouldRenderBlock(true);
|
|
29
|
+
scrollToBlock(event.label);
|
|
30
|
+
}
|
|
26
31
|
}),
|
|
27
32
|
[labels],
|
|
28
33
|
);
|
|
@@ -46,3 +51,9 @@ export const BlockWrapper = JSX<BlockWrapperProps>(
|
|
|
46
51
|
);
|
|
47
52
|
},
|
|
48
53
|
);
|
|
54
|
+
|
|
55
|
+
function scrollToBlock(label?: string) {
|
|
56
|
+
setTimeout(() =>
|
|
57
|
+
globalThis.document.getElementById(`#${label}`)?.scrollIntoView({ behavior: 'smooth' }),
|
|
58
|
+
);
|
|
59
|
+
}
|
|
@@ -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 ? (
|
package/package.json
CHANGED
|
@@ -10,9 +10,9 @@ export const BaseTile = JSX<BaseTileProps>(
|
|
|
10
10
|
<div className={`font-sans flex flex-col grow h-full items-start ${className}`}>
|
|
11
11
|
{title}
|
|
12
12
|
<div className="flex grow w-full justify-between">
|
|
13
|
-
<div className="flex flex-col
|
|
13
|
+
<div className="flex flex-col w-full">
|
|
14
14
|
<div>{children}</div>
|
|
15
|
-
{buttons ? <div>{buttons}</div> : null}
|
|
15
|
+
{buttons ? <div className="mt-9">{buttons}</div> : null}
|
|
16
16
|
</div>
|
|
17
17
|
{image}
|
|
18
18
|
</div>
|
|
@@ -4,7 +4,7 @@ import type { UniBlockProps } from '../../types';
|
|
|
4
4
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
5
5
|
import { Img } from '../../ui-kit/Img/Img';
|
|
6
6
|
import type { BenefitItemProps, BenefitsBlockContent } from './BenefitsBlockContent';
|
|
7
|
-
import {
|
|
7
|
+
import { DescriptionDef, ListBenefitDef, TextBenefitDef } from './BenefitsBlockContent';
|
|
8
8
|
|
|
9
9
|
export interface BenefitsBlockProps extends BenefitsBlockContent, UniBlockProps {}
|
|
10
10
|
|
|
@@ -53,7 +53,7 @@ const renderStep = (benefit: BenefitItemProps, i: number) => {
|
|
|
53
53
|
);
|
|
54
54
|
};
|
|
55
55
|
|
|
56
|
-
const renderDescription = (description?:
|
|
56
|
+
const renderDescription = (description?: DescriptionDef) => {
|
|
57
57
|
const benefitType = description ? description?.benefitType : null;
|
|
58
58
|
if (!benefitType) {
|
|
59
59
|
return null;
|
|
@@ -32,7 +32,7 @@ export type ListBenefitDef = {
|
|
|
32
32
|
/**
|
|
33
33
|
* @title Вид контента
|
|
34
34
|
*/
|
|
35
|
-
export type
|
|
35
|
+
export type DescriptionDef = EmptyOption | TextBenefitDef | ListBenefitDef;
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
* @title Преимущество
|
|
@@ -41,7 +41,7 @@ export interface BenefitItemProps {
|
|
|
41
41
|
/** @title Название */
|
|
42
42
|
label?: string;
|
|
43
43
|
/** @title Описание */
|
|
44
|
-
description?:
|
|
44
|
+
description?: DescriptionDef;
|
|
45
45
|
icon?: Picture;
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -8,7 +8,6 @@ import type { GalleryContent } from './Gallery/GalleryContent';
|
|
|
8
8
|
import type { GracePeriodContent } from './GracePeriod/GracePeriodContent';
|
|
9
9
|
import type { GroupBlockContent } from './GroupBlock/GroupBlockContent';
|
|
10
10
|
import type { HeaderContent } from './Header/HeaderContent';
|
|
11
|
-
import type { InsuranceContent } from './Insurance/InsuranceContent';
|
|
12
11
|
import type { InsuranceAmountBlockContent } from './InsuranceAmountBlock/InsuranceAmountBlockContent';
|
|
13
12
|
import type { LinkDocsContent } from './LinkDocs/LinkDocsContent';
|
|
14
13
|
import type { LinkListContent } from './LinkList/LinkListContent';
|
|
@@ -57,5 +56,4 @@ export type BlockContent =
|
|
|
57
56
|
| LinkListContent
|
|
58
57
|
| GroupBlockContent
|
|
59
58
|
| BonusBenefitsBlockContent
|
|
60
|
-
| InsuranceContent
|
|
61
59
|
| SafeDepositRentalContent;
|
package/src/components/Blocks.ts
CHANGED
|
@@ -12,7 +12,6 @@ import { GracePeriod } from './GracePeriod/GracePeriod';
|
|
|
12
12
|
import { GroupBlock } from './GroupBlock/GroupBlock';
|
|
13
13
|
import { Header } from './Header/Header';
|
|
14
14
|
import { Headline } from './Headline/Headline';
|
|
15
|
-
import { Insurance } from './Insurance/Insurance';
|
|
16
15
|
import { InsuranceAmountBlock } from './InsuranceAmountBlock/InsuranceAmountBlock';
|
|
17
16
|
import { LinkDocs } from './LinkDocs/LinkDocs';
|
|
18
17
|
import { MiniGallery } from './MiniGallery/MiniGallery';
|
|
@@ -47,7 +46,6 @@ export const Blocks = {
|
|
|
47
46
|
GracePeriod,
|
|
48
47
|
Header,
|
|
49
48
|
Headline,
|
|
50
|
-
Insurance,
|
|
51
49
|
InsuranceAmountBlock,
|
|
52
50
|
LinkDocs,
|
|
53
51
|
MiniGallery,
|
|
@@ -1947,12 +1947,51 @@
|
|
|
1947
1947
|
"alt": "Варианты потребительского кредита",
|
|
1948
1948
|
"format": "webp",
|
|
1949
1949
|
"size": {
|
|
1950
|
-
"width":
|
|
1951
|
-
"height":
|
|
1950
|
+
"width": 400,
|
|
1951
|
+
"height": 300
|
|
1952
1952
|
}
|
|
1953
1953
|
}
|
|
1954
1954
|
}
|
|
1955
1955
|
},
|
|
1956
|
+
{
|
|
1957
|
+
"type": "PictureText",
|
|
1958
|
+
"style": ["col-span-12"],
|
|
1959
|
+
"content": {
|
|
1960
|
+
"title": "Страховые риски и продукты",
|
|
1961
|
+
"description": "Описание",
|
|
1962
|
+
"sum": 500000,
|
|
1963
|
+
"image": {
|
|
1964
|
+
"src": "insurance.png",
|
|
1965
|
+
"title": "страхование",
|
|
1966
|
+
"format": "webp",
|
|
1967
|
+
"alt": "Страховые риски и продукты",
|
|
1968
|
+
"size": {
|
|
1969
|
+
"width": 400,
|
|
1970
|
+
"height": 300
|
|
1971
|
+
},
|
|
1972
|
+
"sources": [
|
|
1973
|
+
{
|
|
1974
|
+
"src": "insurance.png 1x, insurance-2x.png 2x",
|
|
1975
|
+
"format": "png"
|
|
1976
|
+
}
|
|
1977
|
+
]
|
|
1978
|
+
},
|
|
1979
|
+
"benefits": [
|
|
1980
|
+
{
|
|
1981
|
+
"label": "Ликвидация организации",
|
|
1982
|
+
"icon": {
|
|
1983
|
+
"icon": "ShieldTickIcon"
|
|
1984
|
+
}
|
|
1985
|
+
},
|
|
1986
|
+
{
|
|
1987
|
+
"label": "Сокращение численности работников организации",
|
|
1988
|
+
"icon": {
|
|
1989
|
+
"icon": "ShieldTickIcon"
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1992
|
+
]
|
|
1993
|
+
}
|
|
1994
|
+
},
|
|
1956
1995
|
{
|
|
1957
1996
|
"type": "Recommendation",
|
|
1958
1997
|
"style": ["col-span-12"],
|
|
@@ -2144,45 +2183,6 @@
|
|
|
2144
2183
|
]
|
|
2145
2184
|
}
|
|
2146
2185
|
},
|
|
2147
|
-
{
|
|
2148
|
-
"type": "Insurance",
|
|
2149
|
-
"style": ["col-span-12"],
|
|
2150
|
-
"content": {
|
|
2151
|
-
"title": "Страховые риски и продукты",
|
|
2152
|
-
"description": "Описание",
|
|
2153
|
-
"sum": 500000,
|
|
2154
|
-
"image": {
|
|
2155
|
-
"src": "insurance.png",
|
|
2156
|
-
"title": "страхование",
|
|
2157
|
-
"format": "webp",
|
|
2158
|
-
"alt": "Страховые риски и продукты",
|
|
2159
|
-
"size": {
|
|
2160
|
-
"width": 400,
|
|
2161
|
-
"height": 300
|
|
2162
|
-
},
|
|
2163
|
-
"sources": [
|
|
2164
|
-
{
|
|
2165
|
-
"src": "insurance.png 1x, insurance-2x.png 2x",
|
|
2166
|
-
"format": "png"
|
|
2167
|
-
}
|
|
2168
|
-
]
|
|
2169
|
-
},
|
|
2170
|
-
"benefits": [
|
|
2171
|
-
{
|
|
2172
|
-
"label": "Ликвидация организации",
|
|
2173
|
-
"icon": {
|
|
2174
|
-
"icon": "ShieldTickIcon"
|
|
2175
|
-
}
|
|
2176
|
-
},
|
|
2177
|
-
{
|
|
2178
|
-
"label": "Сокращение численности работников организации",
|
|
2179
|
-
"icon": {
|
|
2180
|
-
"icon": "ShieldTickIcon"
|
|
2181
|
-
}
|
|
2182
|
-
}
|
|
2183
|
-
]
|
|
2184
|
-
}
|
|
2185
|
-
},
|
|
2186
2186
|
{
|
|
2187
2187
|
"type": "InsuranceAmountBlock",
|
|
2188
2188
|
"style": ["col-span-12"],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useLink } from '../../hooks/useLink';
|
|
3
|
-
import { BlockVersion } from '../../model/BlockVersion';
|
|
3
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
4
4
|
import type { LinkProps } from '../../model/LinkProps';
|
|
5
5
|
import type { UniBlockProps } from '../../types';
|
|
6
6
|
import { MediaButton } from './MediaButton';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useLink } from '../../hooks/useLink';
|
|
3
|
-
import { BlockVersion } from '../../model/BlockVersion';
|
|
3
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
4
4
|
import type { LinkProps } from '../../model/LinkProps';
|
|
5
5
|
import type { UniBlockProps } from '../../types';
|
|
6
6
|
import { MediaButton } from './MediaButton';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { BlockVersion } from '../../model/BlockVersion';
|
|
2
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
3
3
|
import type { ListOrientation } from '../../model/ListOrientation';
|
|
4
4
|
import { Button } from '../../ui-kit/Button/Button';
|
|
5
5
|
import { Heading } from '../../ui-kit/Heading/Heading';
|