@redneckz/wildless-cms-uni-blocks 0.3.26 → 0.3.29
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 +119 -83
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/Accordion/Accordion.js +2 -2
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/BaseTile/BaseTile.js +2 -2
- package/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.js +2 -2
- package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/dist/components/BlockContent.d.ts +3 -2
- package/dist/components/Blocks.d.ts +1 -0
- package/dist/components/Blocks.js +2 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTable.js +3 -3
- package/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTable.mobile.js +9 -9
- package/dist/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
- package/dist/components/ContentPage/ContentPage.js +3 -3
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/ContentPage/ContentPageContext.d.ts +2 -1
- package/dist/components/ContentPage/normalizeBlock.d.ts +1 -0
- package/dist/components/CreditCalculator/CreditCalculator.js +2 -2
- package/dist/components/CreditCalculator/CreditCalculator.js.map +1 -1
- package/dist/components/ExchangeRateTile/CurrencyTable.js +2 -2
- package/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/dist/components/ExchangeRateTile/CurrentLocation.js +1 -1
- package/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +2 -2
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js +2 -2
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/dist/components/Footer/Footer.js +2 -2
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/Gallery/GalleryInner.js +2 -2
- package/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/dist/components/Header/Header.js +2 -2
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Headline/Headline.js +2 -2
- package/dist/components/Headline/Headline.js.map +1 -1
- package/dist/components/LikeControl/LikeControl.js +2 -2
- package/dist/components/LikeControl/LikeControl.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocs.js +2 -2
- package/dist/components/LinkDocs/LinkDocs.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocs.mobile.js +2 -2
- package/dist/components/LinkDocs/LinkDocs.mobile.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocsContent.d.ts +1 -1
- package/dist/components/LinkList/LinkList.js +2 -2
- package/dist/components/LinkList/LinkList.js.map +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.js +2 -2
- package/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/dist/components/Navigation/Navigation.js +2 -2
- package/dist/components/Navigation/Navigation.js.map +1 -1
- package/dist/components/NavigatorTabs/NavigatorTabItem.d.ts +7 -0
- package/dist/components/NavigatorTabs/NavigatorTabItem.js +16 -0
- package/dist/components/NavigatorTabs/NavigatorTabItem.js.map +1 -0
- package/dist/components/NavigatorTabs/NavigatorTabs.d.ts +5 -0
- package/dist/components/NavigatorTabs/NavigatorTabs.js +17 -0
- package/dist/components/NavigatorTabs/NavigatorTabs.js.map +1 -0
- package/dist/components/NavigatorTabs/NavigatorTabsContent.d.ts +19 -0
- package/dist/components/NavigatorTabs/NavigatorTabsContent.js +2 -0
- package/dist/components/NavigatorTabs/NavigatorTabsContent.js.map +1 -0
- package/dist/components/PictureText/PictureText.js +2 -2
- package/dist/components/PictureText/PictureText.js.map +1 -1
- package/dist/components/Placeholder/Placeholder.js +2 -2
- package/dist/components/Placeholder/Placeholder.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlock.js +2 -2
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- 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/ProductGallery/ProductGallery.js +2 -2
- package/dist/components/ProductGallery/ProductGallery.js.map +1 -1
- package/dist/components/ProductGalleryGreen/ProductGalleryGreen.js +10 -6
- package/dist/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -1
- package/dist/components/ProductTile/ProductTile.js +2 -2
- package/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/dist/components/PromoTile/PromoTile.js +2 -2
- package/dist/components/PromoTile/PromoTile.js.map +1 -1
- package/dist/components/Recommendation/Recommendation.js +2 -2
- package/dist/components/Recommendation/Recommendation.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.js +2 -2
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTable.js +2 -2
- package/dist/components/TariffsTable/TariffsTable.js.map +1 -1
- package/dist/components/TextBlock/TextBlock.js +2 -2
- package/dist/components/TextBlock/TextBlock.js.map +1 -1
- package/dist/components/Tile/Tile.js +2 -2
- package/dist/components/Tile/Tile.js.map +1 -1
- package/dist/setup-fixture.js +22 -6
- package/dist/setup-fixture.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/utils/url.d.ts +1 -0
- package/dist/utils/url.js +9 -1
- package/dist/utils/url.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Accordion/Accordion.js +2 -2
- package/lib/components/Accordion/Accordion.js.map +1 -1
- package/lib/components/BaseTile/BaseTile.js +2 -2
- package/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js +2 -2
- package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/lib/components/BlockContent.d.ts +3 -2
- package/lib/components/Blocks.d.ts +1 -0
- package/lib/components/Blocks.js +2 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTable.js +3 -3
- package/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTable.mobile.js +9 -9
- package/lib/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
- package/lib/components/ContentPage/ContentPage.js +3 -3
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/ContentPage/ContentPageContext.d.ts +2 -1
- package/lib/components/ContentPage/normalizeBlock.d.ts +1 -0
- package/lib/components/CreditCalculator/CreditCalculator.js +2 -2
- package/lib/components/CreditCalculator/CreditCalculator.js.map +1 -1
- package/lib/components/ExchangeRateTile/CurrencyTable.js +2 -2
- package/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/lib/components/ExchangeRateTile/CurrentLocation.js +1 -1
- package/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +2 -2
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js +2 -2
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/lib/components/Footer/Footer.js +2 -2
- package/lib/components/Footer/Footer.js.map +1 -1
- package/lib/components/Gallery/GalleryInner.js +2 -2
- package/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/lib/components/Header/Header.js +2 -2
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Headline/Headline.js +2 -2
- package/lib/components/Headline/Headline.js.map +1 -1
- package/lib/components/LikeControl/LikeControl.js +2 -2
- package/lib/components/LikeControl/LikeControl.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocs.js +2 -2
- package/lib/components/LinkDocs/LinkDocs.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocs.mobile.js +2 -2
- package/lib/components/LinkDocs/LinkDocs.mobile.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocsContent.d.ts +1 -1
- package/lib/components/LinkList/LinkList.js +2 -2
- package/lib/components/LinkList/LinkList.js.map +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.js +2 -2
- package/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/lib/components/Navigation/Navigation.js +2 -2
- package/lib/components/Navigation/Navigation.js.map +1 -1
- package/lib/components/NavigatorTabs/NavigatorTabItem.d.ts +7 -0
- package/lib/components/NavigatorTabs/NavigatorTabItem.js +14 -0
- package/lib/components/NavigatorTabs/NavigatorTabItem.js.map +1 -0
- package/lib/components/NavigatorTabs/NavigatorTabs.d.ts +5 -0
- package/lib/components/NavigatorTabs/NavigatorTabs.fixture.d.ts +4 -0
- package/lib/components/NavigatorTabs/NavigatorTabs.js +15 -0
- package/lib/components/NavigatorTabs/NavigatorTabs.js.map +1 -0
- package/lib/components/NavigatorTabs/NavigatorTabsContent.d.ts +19 -0
- package/lib/components/NavigatorTabs/NavigatorTabsContent.js +2 -0
- package/lib/components/NavigatorTabs/NavigatorTabsContent.js.map +1 -0
- package/lib/components/PictureText/PictureText.js +2 -2
- package/lib/components/PictureText/PictureText.js.map +1 -1
- package/lib/components/Placeholder/Placeholder.js +2 -2
- package/lib/components/Placeholder/Placeholder.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlock.js +2 -2
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- 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/ProductGallery/ProductGallery.js +2 -2
- package/lib/components/ProductGallery/ProductGallery.js.map +1 -1
- package/lib/components/ProductGalleryGreen/ProductGalleryGreen.js +10 -6
- package/lib/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -1
- package/lib/components/ProductTile/ProductTile.js +2 -2
- package/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/lib/components/PromoTile/PromoTile.js +2 -2
- package/lib/components/PromoTile/PromoTile.js.map +1 -1
- package/lib/components/Recommendation/Recommendation.js +2 -2
- package/lib/components/Recommendation/Recommendation.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.js +2 -2
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTable.js +2 -2
- package/lib/components/TariffsTable/TariffsTable.js.map +1 -1
- package/lib/components/TextBlock/TextBlock.js +2 -2
- package/lib/components/TextBlock/TextBlock.js.map +1 -1
- package/lib/components/Tile/Tile.js +2 -2
- package/lib/components/Tile/Tile.js.map +1 -1
- package/lib/setup-fixture.js +22 -6
- package/lib/setup-fixture.js.map +1 -1
- package/lib/types.d.ts +2 -0
- package/lib/utils/url.d.ts +1 -0
- package/lib/utils/url.js +7 -0
- package/lib/utils/url.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +47 -39
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/BaseTile/BaseTile.js +2 -2
- package/mobile/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +2 -2
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/dist/components/BlockContent.d.ts +3 -2
- package/mobile/dist/components/ComparisonTable/ComparisonTable.js +9 -9
- package/mobile/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js +3 -3
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPageContext.d.ts +2 -1
- package/mobile/dist/components/CreditCalculator/CreditCalculator.js +2 -2
- package/mobile/dist/components/CreditCalculator/CreditCalculator.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js +2 -2
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js +1 -1
- package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +2 -2
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +2 -2
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryInner.js +2 -2
- package/mobile/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/mobile/dist/components/LikeControl/LikeControl.js +2 -2
- package/mobile/dist/components/LikeControl/LikeControl.js.map +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocs.js +2 -2
- package/mobile/dist/components/LinkDocs/LinkDocs.js.map +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsContent.d.ts +1 -1
- package/mobile/dist/components/LinkList/LinkList.js +2 -2
- package/mobile/dist/components/LinkList/LinkList.js.map +1 -1
- package/mobile/dist/components/Navigation/Navigation.js +2 -2
- package/mobile/dist/components/Navigation/Navigation.js.map +1 -1
- package/mobile/dist/components/NavigatorTabs/NavigatorTabItem.d.ts +7 -0
- package/mobile/dist/components/NavigatorTabs/NavigatorTabItem.js +16 -0
- package/mobile/dist/components/NavigatorTabs/NavigatorTabItem.js.map +1 -0
- package/mobile/dist/components/NavigatorTabs/NavigatorTabs.d.ts +5 -0
- package/mobile/dist/components/NavigatorTabs/NavigatorTabs.js +17 -0
- package/mobile/dist/components/NavigatorTabs/NavigatorTabs.js.map +1 -0
- package/mobile/dist/components/NavigatorTabs/NavigatorTabsContent.d.ts +19 -0
- package/mobile/dist/components/NavigatorTabs/NavigatorTabsContent.js +2 -0
- package/mobile/dist/components/NavigatorTabs/NavigatorTabsContent.js.map +1 -0
- package/mobile/dist/components/PictureText/PictureText.js +2 -2
- package/mobile/dist/components/PictureText/PictureText.js.map +1 -1
- package/mobile/dist/components/Placeholder/Placeholder.js +2 -2
- package/mobile/dist/components/Placeholder/Placeholder.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/mobile/dist/components/ProductGalleryGreen/ProductGalleryGreen.js +10 -6
- package/mobile/dist/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -1
- package/mobile/dist/components/ProductTile/ProductTile.js +2 -2
- package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/dist/components/PromoTile/PromoTile.js +2 -2
- package/mobile/dist/components/PromoTile/PromoTile.js.map +1 -1
- package/mobile/dist/components/Recommendation/Recommendation.js +2 -2
- package/mobile/dist/components/Recommendation/Recommendation.js.map +1 -1
- package/mobile/dist/components/Tile/Tile.js +2 -2
- package/mobile/dist/components/Tile/Tile.js.map +1 -1
- package/mobile/dist/setup-fixture.js +22 -6
- package/mobile/dist/setup-fixture.js.map +1 -1
- package/mobile/dist/types.d.ts +2 -0
- package/mobile/dist/utils/url.d.ts +1 -0
- package/mobile/dist/utils/url.js +9 -1
- package/mobile/dist/utils/url.js.map +1 -1
- package/mobile/lib/components/BaseTile/BaseTile.js +2 -2
- package/mobile/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +2 -2
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/lib/components/BlockContent.d.ts +3 -2
- package/mobile/lib/components/ComparisonTable/ComparisonTable.js +9 -9
- package/mobile/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js +3 -3
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPageContext.d.ts +2 -1
- package/mobile/lib/components/CreditCalculator/CreditCalculator.js +2 -2
- package/mobile/lib/components/CreditCalculator/CreditCalculator.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js +2 -2
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js +1 -1
- package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +2 -2
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +2 -2
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryInner.js +2 -2
- package/mobile/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/mobile/lib/components/LikeControl/LikeControl.js +2 -2
- package/mobile/lib/components/LikeControl/LikeControl.js.map +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocs.js +2 -2
- package/mobile/lib/components/LinkDocs/LinkDocs.js.map +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsContent.d.ts +1 -1
- package/mobile/lib/components/LinkList/LinkList.js +2 -2
- package/mobile/lib/components/LinkList/LinkList.js.map +1 -1
- package/mobile/lib/components/Navigation/Navigation.js +2 -2
- package/mobile/lib/components/Navigation/Navigation.js.map +1 -1
- package/mobile/lib/components/NavigatorTabs/NavigatorTabItem.d.ts +7 -0
- package/mobile/lib/components/NavigatorTabs/NavigatorTabItem.js +14 -0
- package/mobile/lib/components/NavigatorTabs/NavigatorTabItem.js.map +1 -0
- package/mobile/lib/components/NavigatorTabs/NavigatorTabs.d.ts +5 -0
- package/mobile/lib/components/NavigatorTabs/NavigatorTabs.js +15 -0
- package/mobile/lib/components/NavigatorTabs/NavigatorTabs.js.map +1 -0
- package/mobile/lib/components/NavigatorTabs/NavigatorTabsContent.d.ts +19 -0
- package/mobile/lib/components/NavigatorTabs/NavigatorTabsContent.js +2 -0
- package/mobile/lib/components/NavigatorTabs/NavigatorTabsContent.js.map +1 -0
- package/mobile/lib/components/PictureText/PictureText.js +2 -2
- package/mobile/lib/components/PictureText/PictureText.js.map +1 -1
- package/mobile/lib/components/Placeholder/Placeholder.js +2 -2
- package/mobile/lib/components/Placeholder/Placeholder.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/mobile/lib/components/ProductGalleryGreen/ProductGalleryGreen.js +10 -6
- package/mobile/lib/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -1
- package/mobile/lib/components/ProductTile/ProductTile.js +2 -2
- package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/lib/components/PromoTile/PromoTile.js +2 -2
- package/mobile/lib/components/PromoTile/PromoTile.js.map +1 -1
- package/mobile/lib/components/Recommendation/Recommendation.js +2 -2
- package/mobile/lib/components/Recommendation/Recommendation.js.map +1 -1
- package/mobile/lib/components/Tile/Tile.js +2 -2
- package/mobile/lib/components/Tile/Tile.js.map +1 -1
- package/mobile/lib/setup-fixture.js +22 -6
- package/mobile/lib/setup-fixture.js.map +1 -1
- package/mobile/lib/types.d.ts +2 -0
- package/mobile/lib/utils/url.d.ts +1 -0
- package/mobile/lib/utils/url.js +7 -0
- package/mobile/lib/utils/url.js.map +1 -1
- package/mobile/src/common.css +4 -0
- package/mobile/src/components/BaseTile/BaseTile.tsx +2 -2
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +19 -16
- package/mobile/src/components/BlockContent.ts +3 -1
- package/mobile/src/components/ComparisonTable/ComparisonTable.tsx +11 -11
- package/mobile/src/components/ComparisonTable/ComparisonTableContent.ts +1 -1
- package/mobile/src/components/ContentPage/ContentPage.page.json +30 -0
- package/mobile/src/components/ContentPage/ContentPage.tsx +3 -3
- package/mobile/src/components/ContentPage/ContentPageContext.tsx +2 -1
- package/mobile/src/components/CreditCalculator/CreditCalculator.tsx +2 -2
- package/mobile/src/components/ExchangeRateTile/CurrencyTable.tsx +9 -5
- package/mobile/src/components/ExchangeRateTile/CurrentLocation.tsx +2 -2
- package/mobile/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +4 -4
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +11 -5
- package/mobile/src/components/Gallery/GalleryInner.tsx +2 -1
- package/mobile/src/components/LikeControl/LikeControl.tsx +3 -2
- package/mobile/src/components/LinkDocs/LinkDocs.example.json +1 -1
- package/mobile/src/components/LinkDocs/LinkDocs.tsx +2 -2
- package/mobile/src/components/LinkDocs/LinkDocsContent.ts +1 -1
- package/mobile/src/components/LinkList/LinkList.tsx +2 -2
- package/mobile/src/components/Navigation/Navigation.tsx +31 -28
- package/mobile/src/components/NavigatorTabs/NavigatorTabItem.tsx +29 -0
- package/mobile/src/components/NavigatorTabs/NavigatorTabs.example.json +7 -0
- package/mobile/src/components/NavigatorTabs/NavigatorTabs.tsx +36 -0
- package/mobile/src/components/NavigatorTabs/NavigatorTabsContent.ts +20 -0
- package/mobile/src/components/PictureText/PictureText.tsx +18 -13
- package/mobile/src/components/Placeholder/Placeholder.tsx +2 -1
- package/mobile/src/components/ProductBlock/ProductBlockInner.tsx +3 -1
- package/mobile/src/components/ProductGalleryGreen/ProductGalleryGreen.tsx +11 -6
- package/mobile/src/components/ProductTile/ProductTile.tsx +2 -0
- package/mobile/src/components/PromoTile/PromoTile.tsx +2 -0
- package/mobile/src/components/Recommendation/Recommendation.tsx +2 -1
- package/mobile/src/components/Tile/Tile.tsx +2 -0
- package/mobile/src/services/sitemap/isTopItemActive.spec.ts +1 -0
- package/mobile/src/setup-fixture.ts +23 -8
- package/mobile/src/types.ts +2 -0
- package/mobile/src/utils/url.ts +9 -0
- package/package.json +1 -1
- package/src/common.css +4 -0
- package/src/components/Accordion/Accordion.tsx +5 -2
- package/src/components/BaseTile/BaseTile.tsx +2 -2
- package/src/components/BenefitsBlock/BenefitsBlock.tsx +19 -16
- package/src/components/BlockContent.ts +3 -1
- package/src/components/Blocks.ts +2 -0
- package/src/components/ComparisonTable/ComparisonTable.fixture.mobile.tsx +2 -1
- package/src/components/ComparisonTable/ComparisonTable.mobile.tsx +11 -11
- package/src/components/ComparisonTable/ComparisonTable.tsx +4 -2
- package/src/components/ComparisonTable/ComparisonTableContent.ts +1 -1
- package/src/components/ContentPage/ContentPage.page.json +30 -0
- package/src/components/ContentPage/ContentPage.tsx +3 -3
- package/src/components/ContentPage/ContentPageContext.tsx +2 -1
- package/src/components/CreditCalculator/CreditCalculator.tsx +2 -2
- package/src/components/ExchangeRateTile/CurrencyTable.tsx +9 -5
- package/src/components/ExchangeRateTile/CurrentLocation.tsx +2 -2
- package/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +4 -4
- package/src/components/ExchangeRateTile/ExchangeRateTile.fixture.tsx +1 -1
- package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +11 -5
- package/src/components/Footer/Footer.tsx +11 -2
- package/src/components/Gallery/Gallery.fixture.mobile.tsx +1 -1
- package/src/components/Gallery/GalleryInner.tsx +2 -1
- package/src/components/Header/Header.tsx +2 -2
- package/src/components/Headline/Headline.tsx +9 -2
- package/src/components/LikeControl/LikeControl.tsx +3 -2
- package/src/components/LinkDocs/LinkDocs.example.json +1 -1
- package/src/components/LinkDocs/LinkDocs.fixture.mobile.tsx +1 -1
- package/src/components/LinkDocs/LinkDocs.mobile.tsx +2 -2
- package/src/components/LinkDocs/LinkDocs.tsx +2 -1
- package/src/components/LinkDocs/LinkDocsContent.ts +1 -1
- package/src/components/LinkList/LinkList.tsx +2 -2
- package/src/components/MobileAppTile/MobileAppTile.tsx +9 -1
- package/src/components/Navigation/Navigation.tsx +31 -28
- package/src/components/NavigatorTabs/NavigatorTabItem.tsx +29 -0
- package/src/components/NavigatorTabs/NavigatorTabs.example.json +7 -0
- package/src/components/NavigatorTabs/NavigatorTabs.fixture.tsx +11 -0
- package/src/components/NavigatorTabs/NavigatorTabs.tsx +36 -0
- package/src/components/NavigatorTabs/NavigatorTabsContent.ts +20 -0
- package/src/components/PictureText/PictureText.tsx +18 -13
- package/src/components/Placeholder/Placeholder.tsx +2 -1
- package/src/components/ProductBlock/ProductBlock.tsx +11 -2
- package/src/components/ProductBlock/ProductBlockInner.mobile.tsx +3 -1
- package/src/components/ProductBlock/ProductBlockInner.tsx +1 -1
- package/src/components/ProductGallery/ProductGallery.tsx +5 -2
- package/src/components/ProductGalleryGreen/ProductGalleryGreen.tsx +11 -6
- package/src/components/ProductTile/ProductTile.tsx +2 -0
- package/src/components/PromoTile/PromoTile.tsx +2 -0
- package/src/components/Recommendation/Recommendation.tsx +2 -1
- package/src/components/StepsBlock/StepsBlock.tsx +25 -22
- package/src/components/TariffsTable/TariffsTable.tsx +2 -1
- package/src/components/TextBlock/TextBlock.tsx +10 -1
- package/src/components/Tile/Tile.tsx +2 -0
- package/src/services/sitemap/isTopItemActive.spec.ts +1 -0
- package/src/setup-fixture.ts +23 -8
- package/src/types.ts +2 -0
- package/src/utils/url.ts +9 -0
|
@@ -11,12 +11,20 @@ import type { MobileAppTileContent } from './MobileAppTileContent';
|
|
|
11
11
|
export interface MobileAppTileProps extends MobileAppTileContent, UniBlockProps {}
|
|
12
12
|
|
|
13
13
|
export const MobileAppTile = JSX<MobileAppTileProps>(
|
|
14
|
-
({
|
|
14
|
+
({
|
|
15
|
+
className = '',
|
|
16
|
+
context,
|
|
17
|
+
title = 'Мобильное приложение',
|
|
18
|
+
qr,
|
|
19
|
+
buttons = [],
|
|
20
|
+
anchor = null,
|
|
21
|
+
}) => {
|
|
15
22
|
return (
|
|
16
23
|
<section
|
|
17
24
|
className={`bg-white text-primary-text font-sans p-9 box-border ${className} ${getTileRightPadding(
|
|
18
25
|
className,
|
|
19
26
|
)} ${getTileMinHeight(className)} `}
|
|
27
|
+
id={anchor}
|
|
20
28
|
>
|
|
21
29
|
<BaseTile
|
|
22
30
|
context={context}
|
|
@@ -7,33 +7,36 @@ import { NavigationItem } from './NavigationItem';
|
|
|
7
7
|
|
|
8
8
|
export interface NavigationProps extends NavigationContent, UniBlockProps {}
|
|
9
9
|
|
|
10
|
-
export const Navigation = JSX<NavigationProps>(
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
export const Navigation = JSX<NavigationProps>(
|
|
11
|
+
({ className, context, title, buttons, anchor = null }) => {
|
|
12
|
+
const router = context.useRouter();
|
|
13
|
+
const { handlerDecorator } = context;
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
const activeButton = findActiveSubItem(router)(buttons);
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
17
|
+
return (
|
|
18
|
+
<section
|
|
19
|
+
className={`font-sans text-primary-text rounded-[40px] flex items-center justify-between ${
|
|
20
|
+
className || ''
|
|
21
|
+
}`}
|
|
22
|
+
id={anchor}
|
|
23
|
+
>
|
|
24
|
+
<h2 className="font-medium text-xl m-0">{title}</h2>
|
|
25
|
+
{buttons?.length ? (
|
|
26
|
+
<div className="flex rounded-md overflow-hidden bg-white">
|
|
27
|
+
{buttons
|
|
28
|
+
.filter(({ text }) => text)
|
|
29
|
+
.map((button, i) => (
|
|
30
|
+
<NavigationItem
|
|
31
|
+
key={String(i)}
|
|
32
|
+
className="first:rounded-tl-md first:rounded-bl-md last:rounded-tr-md last:rounded-br-md"
|
|
33
|
+
isActive={button === activeButton}
|
|
34
|
+
{...useLink({ router, handlerDecorator }, button)}
|
|
35
|
+
/>
|
|
36
|
+
))}
|
|
37
|
+
</div>
|
|
38
|
+
) : null}
|
|
39
|
+
</section>
|
|
40
|
+
);
|
|
41
|
+
},
|
|
42
|
+
);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import type { NavigatorTab } from './NavigatorTabsContent';
|
|
3
|
+
|
|
4
|
+
export interface NavigatorTabItemProps extends NavigatorTab {
|
|
5
|
+
active?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
onClick?: (ev: MouseEvent) => void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const TEXT_CLASSES = 'font-sans font-normal text-sm';
|
|
11
|
+
const LINK_CLASSES = 'flex-1 flex items-center justify-center';
|
|
12
|
+
|
|
13
|
+
export const NavigatorTabItem = JSX<NavigatorTabItemProps>(
|
|
14
|
+
({ className = '', label, active, children, onClick, anchor }) => (
|
|
15
|
+
<a className={getLinkClasses(className, active)} href={`#${anchor}`} onClick={onClick}>
|
|
16
|
+
<span className={getTextClasses(active)}>{label || children}</span>
|
|
17
|
+
</a>
|
|
18
|
+
),
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
const getLinkClasses = (className: string, active?: boolean) => {
|
|
22
|
+
const classes = active ? 'bg-primary-main' : 'bg-white';
|
|
23
|
+
return `${classes} ${LINK_CLASSES} ${className}`;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const getTextClasses = (active?: boolean) => {
|
|
27
|
+
const classes = active ? 'text-white' : 'text-secondary-text hover:text-primary-main';
|
|
28
|
+
return `${classes} ${TEXT_CLASSES}`;
|
|
29
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { context } from '../../setup-fixture';
|
|
2
|
+
import { NavigatorTabs } from './NavigatorTabs';
|
|
3
|
+
import tabsExample from './NavigatorTabs.example.json';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
default: (
|
|
7
|
+
<div className="container grid grid-cols-12">
|
|
8
|
+
<NavigatorTabs context={context} className="col-span-12" {...tabsExample} />
|
|
9
|
+
</div>
|
|
10
|
+
),
|
|
11
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import type { UniBlockProps } from '../../types';
|
|
3
|
+
import { getHash } from '../../utils/url';
|
|
4
|
+
import type { Router } from '../ContentPage/ContentPageContext';
|
|
5
|
+
import { NavigatorTabItem } from './NavigatorTabItem';
|
|
6
|
+
import type { NavigatorTab, NavigatorTabsContent } from './NavigatorTabsContent';
|
|
7
|
+
|
|
8
|
+
export interface TabsBlockProps extends NavigatorTabsContent, UniBlockProps {}
|
|
9
|
+
|
|
10
|
+
export const NavigatorTabs = JSX<TabsBlockProps>(
|
|
11
|
+
({ className = '', navigatorTabs, context, anchor = null }) => {
|
|
12
|
+
const router = context.useRouter();
|
|
13
|
+
const hash = getHash(router.href);
|
|
14
|
+
return (
|
|
15
|
+
<section
|
|
16
|
+
className={`sticky top-0 z-20 box-border flex gap-x-1 h-12 ${className}`}
|
|
17
|
+
id={anchor}
|
|
18
|
+
>
|
|
19
|
+
{navigatorTabs ? navigatorTabs.map(renderTab(hash, router)) : null}
|
|
20
|
+
</section>
|
|
21
|
+
);
|
|
22
|
+
},
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
const renderTab = (hash?: string, router?: Router) => (tab: NavigatorTab, i: number) => {
|
|
26
|
+
const anchorHash = `#${tab.anchor}`;
|
|
27
|
+
const active = hash ? anchorHash === hash : i === 0;
|
|
28
|
+
return (
|
|
29
|
+
<NavigatorTabItem
|
|
30
|
+
key={tab.anchor}
|
|
31
|
+
active={active}
|
|
32
|
+
onClick={() => router?.replace(anchorHash)}
|
|
33
|
+
{...tab}
|
|
34
|
+
/>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @title Таб
|
|
3
|
+
*/
|
|
4
|
+
export interface NavigatorTab {
|
|
5
|
+
/** @title Название */
|
|
6
|
+
label?: string;
|
|
7
|
+
/** @title Якорь */
|
|
8
|
+
anchor?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @title Блок табов
|
|
13
|
+
*/
|
|
14
|
+
export interface NavigatorTabsContent {
|
|
15
|
+
/**
|
|
16
|
+
* @title Список табов
|
|
17
|
+
* @minItems 3
|
|
18
|
+
*/
|
|
19
|
+
navigatorTabs?: NavigatorTab[];
|
|
20
|
+
}
|
|
@@ -9,19 +9,24 @@ import { Benefit } from '../BenefitsBlock/BenefitsBlockContent';
|
|
|
9
9
|
|
|
10
10
|
export interface PictureTextProps extends PictureTextContent, UniBlockProps {}
|
|
11
11
|
|
|
12
|
-
export const PictureText = JSX<PictureTextProps>(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
12
|
+
export const PictureText = JSX<PictureTextProps>(
|
|
13
|
+
({ className = '', title, image, benefits, anchor = null }) => {
|
|
14
|
+
return (
|
|
15
|
+
<section
|
|
16
|
+
className={`relative font-sans text-primary-text bg-white p-14 ${className}`}
|
|
17
|
+
id={anchor}
|
|
18
|
+
>
|
|
19
|
+
<Heading headingType="h2" className="text-center" title={title} />
|
|
20
|
+
<div className={'flex justify-center mt-9'}>
|
|
21
|
+
{image?.src && <Img className="mr-6" image={image} />}
|
|
22
|
+
{benefits?.length ? (
|
|
23
|
+
<div className="flex flex-col">{benefits.map(renderBenefit)}</div>
|
|
24
|
+
) : null}
|
|
25
|
+
</div>
|
|
26
|
+
</section>
|
|
27
|
+
);
|
|
28
|
+
},
|
|
29
|
+
);
|
|
25
30
|
|
|
26
31
|
function renderBenefit(benefit: Benefit, i: number) {
|
|
27
32
|
return (
|
|
@@ -15,12 +15,13 @@ export interface PlaceholderProps extends PlaceholderContent, UniBlockProps {
|
|
|
15
15
|
const GOLDEN_RATIO = 1.618;
|
|
16
16
|
|
|
17
17
|
export const Placeholder = JSX<PlaceholderProps>(
|
|
18
|
-
({ className, context, title, description = 'Блок в разработке...' }) => {
|
|
18
|
+
({ className, context, title, description = 'Блок в разработке...', anchor = null }) => {
|
|
19
19
|
return (
|
|
20
20
|
<section
|
|
21
21
|
className={`bg-white text-primary-text font-sans p-9 box-border ${className} ${getTileRightPadding(
|
|
22
22
|
className,
|
|
23
23
|
)} ${getTileMinHeight(className)} `}
|
|
24
|
+
id={anchor}
|
|
24
25
|
>
|
|
25
26
|
<BaseTile
|
|
26
27
|
context={context}
|
|
@@ -20,14 +20,23 @@ const breadcrumbsStyleMap: Record<BlockVersion, string> = {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
export const ProductBlock = JSX<ProductBlockProps>((props) => {
|
|
23
|
-
const {
|
|
23
|
+
const {
|
|
24
|
+
context,
|
|
25
|
+
className,
|
|
26
|
+
breadcrumbs,
|
|
27
|
+
version = 'primary',
|
|
28
|
+
anchor = null,
|
|
29
|
+
...otherProps
|
|
30
|
+
} = props;
|
|
24
31
|
const router = context.useRouter();
|
|
25
32
|
const { handlerDecorator } = context;
|
|
33
|
+
|
|
26
34
|
return (
|
|
27
35
|
<section
|
|
28
36
|
className={`font-sans pt-10 pl-[50px] pb-[50px] pr-[7.5rem] box-border min-h-[420px] ${
|
|
29
37
|
className || ''
|
|
30
38
|
} ${productBlockStyleMap[version]}`}
|
|
39
|
+
id={anchor}
|
|
31
40
|
>
|
|
32
41
|
{breadcrumbs?.length ? (
|
|
33
42
|
<div className="text-xs mb-6">
|
|
@@ -44,7 +53,7 @@ export const ProductBlock = JSX<ProductBlockProps>((props) => {
|
|
|
44
53
|
)}
|
|
45
54
|
</div>
|
|
46
55
|
) : null}
|
|
47
|
-
<ProductBlockInner {...
|
|
56
|
+
<ProductBlockInner context={context} version={version} {...otherProps} />
|
|
48
57
|
</section>
|
|
49
58
|
);
|
|
50
59
|
});
|
|
@@ -86,7 +86,9 @@ const labelStyleMap: Record<BlockVersion, string> = {
|
|
|
86
86
|
};
|
|
87
87
|
|
|
88
88
|
const renderLabel = (label: string, version: BlockVersion) => (
|
|
89
|
-
<div
|
|
89
|
+
<div
|
|
90
|
+
className={`m-xs px-2.5 py-1.5 mb-5 rounded-md border-2 border-solid w-fit ${labelStyleMap[version]}`}
|
|
91
|
+
>
|
|
90
92
|
{label}
|
|
91
93
|
</div>
|
|
92
94
|
);
|
|
@@ -7,13 +7,16 @@ import type { ProductGalleryContent } from './ProductGalleryContent';
|
|
|
7
7
|
export interface ProductGalleryProps extends ProductGalleryContent, UniBlockProps {}
|
|
8
8
|
|
|
9
9
|
export const ProductGallery = JSX<ProductGalleryProps>(
|
|
10
|
-
({ className, context, duration = 0, slides = [] }) => {
|
|
10
|
+
({ className, context, duration = 0, slides = [], anchor = null }) => {
|
|
11
11
|
const galleryNav = slides.map((s) => s.nav);
|
|
12
12
|
const galleryBlocks = slides.map((s) => s.productBlock);
|
|
13
13
|
const [activeSlideIndex, setActiveSlideIndex] = context.useState(0);
|
|
14
14
|
|
|
15
15
|
return (
|
|
16
|
-
<section
|
|
16
|
+
<section
|
|
17
|
+
className={`font-sans bg-white overflow-hidden w-100 ${className || ''}`}
|
|
18
|
+
id={anchor}
|
|
19
|
+
>
|
|
17
20
|
<div
|
|
18
21
|
className={`flex duration-1000`}
|
|
19
22
|
style={{ transform: `translateX(-${activeSlideIndex}00%)` }}
|
|
@@ -8,7 +8,7 @@ import type { ProductGalleryGreenContent } from './ProductGalleryGreenContent';
|
|
|
8
8
|
export interface ProductGalleryProps extends ProductGalleryGreenContent, UniBlockProps {}
|
|
9
9
|
|
|
10
10
|
export const ProductGalleryGreen = JSX<ProductGalleryProps>(
|
|
11
|
-
({ className = '', context, slides = [] }) => {
|
|
11
|
+
({ className = '', context, slides = [], anchor = null }) => {
|
|
12
12
|
const galleryNav = slides.map((s) => s.nav);
|
|
13
13
|
const galleryBlocks = slides.map((s) => s.productBlock);
|
|
14
14
|
const [activeSlideIndex, setActiveSlideIndex] = context.useState(0);
|
|
@@ -16,6 +16,7 @@ export const ProductGalleryGreen = JSX<ProductGalleryProps>(
|
|
|
16
16
|
return (
|
|
17
17
|
<section
|
|
18
18
|
className={`box-border pt-[70px] relative font-sans overflow-hidden bg-primary-main w-100 ${className}`}
|
|
19
|
+
id={anchor}
|
|
19
20
|
>
|
|
20
21
|
<div
|
|
21
22
|
className="flex duration-1000 pb-14"
|
|
@@ -75,9 +76,13 @@ function renderNavButton({ slide, i, activeSlideIndex, onClick }) {
|
|
|
75
76
|
const isActiveBtn = i === activeSlideIndex;
|
|
76
77
|
const btnClassName = isActiveBtn
|
|
77
78
|
? 'bg-white shadow-dark-blue/42 h-[102px] w-[354px] min-w-[354px] max-w-[354px] p-0'
|
|
78
|
-
: 'bg-white/10 min-w-[277px] px-0 pt-4 pb-[23px] hover:
|
|
79
|
-
const btnTitleClassName = isActiveBtn
|
|
80
|
-
|
|
79
|
+
: 'bg-white/10 min-w-[277px] px-0 pt-4 pb-[23px] hover:pt-[21px] hover:pb-7 ease-in duration-300';
|
|
80
|
+
const btnTitleClassName = isActiveBtn
|
|
81
|
+
? 'text-[18px] text-primary-text pb-[10px]'
|
|
82
|
+
: 'text-m-base text-white pb-[3px]';
|
|
83
|
+
const btnDescClassName = isActiveBtn
|
|
84
|
+
? 'text-[18px] text-secondary-text'
|
|
85
|
+
: 'text-m-base text-white';
|
|
81
86
|
|
|
82
87
|
return (
|
|
83
88
|
<button
|
|
@@ -90,8 +95,8 @@ function renderNavButton({ slide, i, activeSlideIndex, onClick }) {
|
|
|
90
95
|
`}
|
|
91
96
|
>
|
|
92
97
|
<div className="border-0 px-6">
|
|
93
|
-
<div className={`
|
|
94
|
-
<div className={`text-
|
|
98
|
+
<div className={`font-medium ${btnTitleClassName}`}>{slide?.title}</div>
|
|
99
|
+
<div className={`text-secondary-text ${btnDescClassName}`}>{slide.description}</div>
|
|
95
100
|
</div>
|
|
96
101
|
</button>
|
|
97
102
|
);
|
|
@@ -29,12 +29,14 @@ export const ProductTile = JSX<ProductTileProps>(
|
|
|
29
29
|
buttons,
|
|
30
30
|
image,
|
|
31
31
|
version = 'primary',
|
|
32
|
+
anchor = null,
|
|
32
33
|
}) => {
|
|
33
34
|
return (
|
|
34
35
|
<section
|
|
35
36
|
className={`bg-white text-primary-text font-sans p-9 box-border ${className} ${
|
|
36
37
|
productTileStyleMap[version]
|
|
37
38
|
} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `}
|
|
39
|
+
id={anchor}
|
|
38
40
|
>
|
|
39
41
|
<BaseTile
|
|
40
42
|
context={context}
|
|
@@ -25,12 +25,14 @@ export const PromoTile = JSX<PromoTileProps>(
|
|
|
25
25
|
description,
|
|
26
26
|
buttons = [],
|
|
27
27
|
version = 'primary',
|
|
28
|
+
anchor = null,
|
|
28
29
|
}) => {
|
|
29
30
|
return (
|
|
30
31
|
<section
|
|
31
32
|
className={`bg-white text-primary-text font-sans p-9 box-border ${className} ${
|
|
32
33
|
promoTileStyleMap[version]
|
|
33
34
|
} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `}
|
|
35
|
+
id={anchor}
|
|
34
36
|
>
|
|
35
37
|
<BaseTile
|
|
36
38
|
context={context}
|
|
@@ -12,7 +12,7 @@ const CARD_SHIFT = 525;
|
|
|
12
12
|
export interface RecommendationProps extends RecommendationContent, UniBlockProps {}
|
|
13
13
|
|
|
14
14
|
export const Recommendation = JSX<RecommendationProps>(
|
|
15
|
-
({ context, recommendations = [], className = '', title, version }) => {
|
|
15
|
+
({ context, recommendations = [], className = '', title, version, anchor = null }) => {
|
|
16
16
|
const [activeCardIndex, setActiveCardIndex] = context.useState(0);
|
|
17
17
|
|
|
18
18
|
const blockClassName =
|
|
@@ -22,6 +22,7 @@ export const Recommendation = JSX<RecommendationProps>(
|
|
|
22
22
|
return (
|
|
23
23
|
<section
|
|
24
24
|
className={`relative font-sans p-[50px] overflow-hidden ${blockClassName} ${className}`}
|
|
25
|
+
id={anchor}
|
|
25
26
|
>
|
|
26
27
|
{title ? <Heading headingType="h3" className="mb-8" title={title} /> : null}
|
|
27
28
|
<div
|
|
@@ -7,29 +7,32 @@ import type { Step, StepsBlockContent } from './StepsBlockContent';
|
|
|
7
7
|
|
|
8
8
|
export interface StepsBlockProps extends StepsBlockContent, UniBlockProps {}
|
|
9
9
|
|
|
10
|
-
export const StepsBlock = JSX<StepsBlockProps>(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
className
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
10
|
+
export const StepsBlock = JSX<StepsBlockProps>(
|
|
11
|
+
({ className, title, showLines = true, steps, anchor = null }) => {
|
|
12
|
+
return (
|
|
13
|
+
<section
|
|
14
|
+
className={`box-border font-sans text-primary-text bg-white px-20 py-[50px] flex flex-col items-center ${
|
|
15
|
+
className || ''
|
|
16
|
+
}`}
|
|
17
|
+
id={anchor}
|
|
18
|
+
>
|
|
19
|
+
<Heading headingType="h2" className="max-w-[47rem] text-center" title={title} />
|
|
20
|
+
{steps?.length ? (
|
|
21
|
+
<div className={`box-border py-0.5 mb-0.5 ${title ? 'mt-9' : ''}`}>
|
|
22
|
+
<div className="flex items-center px-[88px]">
|
|
23
|
+
{joinList(
|
|
24
|
+
<div
|
|
25
|
+
className={`h-0.5 w-full bg-secondary-light ${!showLines ? 'opacity-0' : ''}`}
|
|
26
|
+
/>,
|
|
27
|
+
)(steps.map((step, i) => renderStepIcon(step, i)))}
|
|
28
|
+
</div>
|
|
29
|
+
<div className="flex justify-between gap-x-[101px]">{steps.map(renderStepTitle)}</div>
|
|
26
30
|
</div>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
});
|
|
31
|
+
) : null}
|
|
32
|
+
</section>
|
|
33
|
+
);
|
|
34
|
+
},
|
|
35
|
+
);
|
|
33
36
|
|
|
34
37
|
const renderStepIcon = (step: Step, i: number) => {
|
|
35
38
|
return (
|
|
@@ -15,7 +15,7 @@ import { TariffsTableRow } from './TariffsTableRow';
|
|
|
15
15
|
export interface TariffsTableProps extends TariffsTableContent, UniBlockProps {}
|
|
16
16
|
|
|
17
17
|
export const TariffsTable = JSX<TariffsTableProps>(
|
|
18
|
-
({ className, context, title, description, rowHeaders, columns }) => {
|
|
18
|
+
({ className, context, title, description, rowHeaders, columns, anchor = null }) => {
|
|
19
19
|
const [activeCardIndex, setActiveCardIndex] = context.useState(0);
|
|
20
20
|
|
|
21
21
|
const colData = getColData(columns);
|
|
@@ -34,6 +34,7 @@ export const TariffsTable = JSX<TariffsTableProps>(
|
|
|
34
34
|
className={`bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${
|
|
35
35
|
className || ''
|
|
36
36
|
}`}
|
|
37
|
+
id={anchor}
|
|
37
38
|
>
|
|
38
39
|
{title ? (
|
|
39
40
|
<Heading
|
|
@@ -31,11 +31,20 @@ const textBlockStyleMaps: Record<
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
export const TextBlock = JSX<TextBlockProps>(
|
|
34
|
-
({
|
|
34
|
+
({
|
|
35
|
+
title,
|
|
36
|
+
description,
|
|
37
|
+
blockVersion = 'primary',
|
|
38
|
+
iconVersion,
|
|
39
|
+
image,
|
|
40
|
+
className,
|
|
41
|
+
anchor = null,
|
|
42
|
+
}) => {
|
|
35
43
|
const textBlockStyleMap = textBlockStyleMaps[blockVersion];
|
|
36
44
|
return (
|
|
37
45
|
<section
|
|
38
46
|
className={`font-sans px-9 py-4 flex ${textBlockStyleMap.background} ${className || ''}`}
|
|
47
|
+
id={anchor}
|
|
39
48
|
>
|
|
40
49
|
{iconVersion === 'small' ? renderIcon(textBlockStyleMap.icon) : null}
|
|
41
50
|
{iconVersion === 'big' ? renderImage(image) : null}
|
|
@@ -33,6 +33,7 @@ export const Tile = JSX<TileProps>((props) => {
|
|
|
33
33
|
className = '',
|
|
34
34
|
version = 'primary',
|
|
35
35
|
role,
|
|
36
|
+
anchor = null,
|
|
36
37
|
} = props;
|
|
37
38
|
|
|
38
39
|
return (
|
|
@@ -41,6 +42,7 @@ export const Tile = JSX<TileProps>((props) => {
|
|
|
41
42
|
tileStyleMap[version]
|
|
42
43
|
} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `}
|
|
43
44
|
role={role}
|
|
45
|
+
id={anchor}
|
|
44
46
|
>
|
|
45
47
|
<BaseTile
|
|
46
48
|
context={context}
|
package/src/setup-fixture.ts
CHANGED
|
@@ -11,16 +11,28 @@ const TEST_ORIGIN = 'http://localhost:5001';
|
|
|
11
11
|
|
|
12
12
|
const DaData = DaDataAPI('https://10.80.4.9');
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
useState
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
const Router = () => {
|
|
15
|
+
const [href, setHref] = useState<string>(globalThis.location.href);
|
|
16
|
+
|
|
17
|
+
return {
|
|
18
|
+
href: href,
|
|
18
19
|
pathname: '/credits',
|
|
19
20
|
query: {},
|
|
20
|
-
push: (url
|
|
21
|
-
|
|
21
|
+
push: (url?: string) => {
|
|
22
|
+
if (!url) return;
|
|
23
|
+
globalThis.history.pushState(null, '', url);
|
|
24
|
+
setHref(globalThis.location.href);
|
|
22
25
|
},
|
|
23
|
-
|
|
26
|
+
replace: (url?: string) => {
|
|
27
|
+
if (!url) return;
|
|
28
|
+
globalThis.history.replaceState(null, '', url);
|
|
29
|
+
setHref(globalThis.location.href);
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export const context: ContentPageContext = {
|
|
34
|
+
useState,
|
|
35
|
+
useRouter: Router,
|
|
24
36
|
useAsyncData: (key, fetcher) => {
|
|
25
37
|
const [data, setData] = useState();
|
|
26
38
|
useEffect(() => {
|
|
@@ -76,7 +88,10 @@ export const mobileContext: ContentPageContext = {
|
|
|
76
88
|
href: `${TEST_ORIGIN}/mobile/credits`,
|
|
77
89
|
pathname: '/mobile/credits',
|
|
78
90
|
query: {},
|
|
79
|
-
push: (url
|
|
91
|
+
push: (url?: string) => {
|
|
92
|
+
console.log(url);
|
|
93
|
+
},
|
|
94
|
+
replace: (url?: string) => {
|
|
80
95
|
console.log(url);
|
|
81
96
|
},
|
|
82
97
|
}),
|
package/src/types.ts
CHANGED
|
@@ -10,6 +10,7 @@ export interface BaseBlockDef {
|
|
|
10
10
|
content?: BlockContent;
|
|
11
11
|
version?: BlockVersion;
|
|
12
12
|
hidden?: boolean;
|
|
13
|
+
anchor?: string;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
export interface BlockDef extends BaseBlockDef {
|
|
@@ -50,6 +51,7 @@ export interface ContentPageDef extends ContentPageMeta {
|
|
|
50
51
|
export interface UniBlockProps {
|
|
51
52
|
className?: string;
|
|
52
53
|
context: ContentPageContext;
|
|
54
|
+
anchor?: string;
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
export interface DaDataResult {
|
package/src/utils/url.ts
CHANGED
|
@@ -13,3 +13,12 @@ export const getOrigin = (href?: string) => {
|
|
|
13
13
|
const endOfOrigin = url.indexOf('/', endOfProto + protoSeparator.length);
|
|
14
14
|
return endOfOrigin !== -1 ? url.substring(0, endOfOrigin) : url;
|
|
15
15
|
};
|
|
16
|
+
|
|
17
|
+
export const getHash = (href?: string) => {
|
|
18
|
+
if (!href || !isURL(href)) {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const hashIndex = href.indexOf('#');
|
|
23
|
+
return hashIndex !== -1 ? href.substring(hashIndex, href.length) : undefined;
|
|
24
|
+
};
|