@redneckz/wildless-cms-uni-blocks 0.6.41 → 0.6.43
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/bin/migration-scripts/0.6.34.js +2 -0
- package/bin/migration-scripts/0.6.43.js +29 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +213 -101
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +5 -0
- package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +44 -0
- package/bundle/components/Header/HeaderSecondaryMenu.d.ts +2 -0
- package/bundle/components/ProductTile/ProductTileContent.d.ts +24 -2
- package/bundle/components/ProductTile/renderAdditionalDescription.d.ts +4 -0
- package/bundle/components/ProductTile/renderBenefit.d.ts +4 -0
- package/bundle/components/ProductTile/renderImage.d.ts +3 -0
- package/bundle/content-page-repository/transformImg.d.ts +1 -1
- package/bundle/hooks/useCachedAsyncData.d.ts +2 -0
- package/bundle/hooks/useLocation.d.ts +6 -0
- package/bundle/hooks/useRegions.d.ts +6 -0
- package/bundle/services/sitemap/SitemapProps.d.ts +8 -0
- package/bundle/ui-kit/Location/Location.d.ts +19 -0
- package/bundle/ui-kit/Location/SearchBar.d.ts +6 -0
- package/bundle/ui-kit/MarkdownText/MarkdownText.d.ts +2 -0
- package/bundle/ui-kit/MarkdownText/MarkdownTextProps.d.ts +6 -0
- package/bundle/utils/groupBy.d.ts +1 -0
- package/dist/components/Blocks.js +4 -2
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +5 -0
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +22 -0
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -0
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +44 -0
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js +2 -0
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js.map +1 -0
- package/dist/components/Header/Header.js +2 -2
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Header/HeaderBurger.js +4 -3
- package/dist/components/Header/HeaderBurger.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenu.d.ts +2 -0
- package/dist/components/Header/HeaderSecondaryMenu.js +13 -4
- package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/dist/components/ProductTile/ProductTile.js +9 -22
- package/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/dist/components/ProductTile/ProductTileContent.d.ts +24 -2
- package/dist/components/ProductTile/renderAdditionalDescription.d.ts +4 -0
- package/dist/components/ProductTile/renderAdditionalDescription.js +18 -0
- package/dist/components/ProductTile/renderAdditionalDescription.js.map +1 -0
- package/dist/components/ProductTile/renderBenefit.d.ts +4 -0
- package/dist/components/ProductTile/renderBenefit.js +32 -0
- package/dist/components/ProductTile/renderBenefit.js.map +1 -0
- package/dist/components/ProductTile/renderImage.d.ts +3 -0
- package/dist/components/ProductTile/renderImage.js +12 -0
- package/dist/components/ProductTile/renderImage.js.map +1 -0
- package/dist/components/Recommendation/RecommendationCard.js +1 -1
- package/dist/components/Recommendation/RecommendationCard.js.map +1 -1
- package/dist/components/TextBlock/TextBlock.js +13 -28
- package/dist/components/TextBlock/TextBlock.js.map +1 -1
- package/dist/content-page-repository/transformImg.d.ts +1 -1
- package/dist/content-page-repository/transformImg.js +4 -10
- package/dist/content-page-repository/transformImg.js.map +1 -1
- package/dist/content-page-repository/transformMarkdown.js +3 -3
- package/dist/content-page-repository/transformMarkdown.js.map +1 -1
- package/dist/hooks/useCachedAsyncData.d.ts +2 -0
- package/dist/hooks/useCachedAsyncData.js +25 -0
- package/dist/hooks/useCachedAsyncData.js.map +1 -0
- package/dist/hooks/useLocation.d.ts +6 -0
- package/dist/hooks/useLocation.js +26 -0
- package/dist/hooks/useLocation.js.map +1 -0
- package/dist/hooks/useRegions.d.ts +6 -0
- package/dist/hooks/useRegions.js +11 -0
- package/dist/hooks/useRegions.js.map +1 -0
- package/dist/services/sitemap/SitemapProps.d.ts +8 -0
- package/dist/ui-kit/Location/Location.d.ts +19 -0
- package/dist/ui-kit/Location/Location.js +44 -0
- package/dist/ui-kit/Location/Location.js.map +1 -0
- package/dist/ui-kit/Location/SearchBar.d.ts +6 -0
- package/dist/ui-kit/Location/SearchBar.js +9 -0
- package/dist/ui-kit/Location/SearchBar.js.map +1 -0
- package/dist/ui-kit/MarkdownText/MarkdownText.d.ts +2 -0
- package/dist/ui-kit/MarkdownText/MarkdownText.js +9 -0
- package/dist/ui-kit/MarkdownText/MarkdownText.js.map +1 -0
- package/dist/ui-kit/MarkdownText/MarkdownTextProps.d.ts +6 -0
- package/dist/ui-kit/MarkdownText/MarkdownTextProps.js +2 -0
- package/dist/ui-kit/MarkdownText/MarkdownTextProps.js.map +1 -0
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.js +8 -4
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/dist/ui-kit/Text/Text.js +1 -5
- package/dist/ui-kit/Text/Text.js.map +1 -1
- package/dist/utils/groupBy.d.ts +1 -0
- package/dist/utils/groupBy.js +13 -0
- package/dist/utils/groupBy.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/Blocks.js +4 -2
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Carousel/Carousel.fixture.d.ts +1 -0
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +5 -0
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.d.ts +9 -0
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +20 -0
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -0
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +44 -0
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js +2 -0
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js.map +1 -0
- package/lib/components/Header/Header.js +2 -2
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/HeaderBurger.js +4 -3
- package/lib/components/Header/HeaderBurger.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenu.d.ts +2 -0
- package/lib/components/Header/HeaderSecondaryMenu.js +13 -4
- package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/lib/components/ProductTile/ProductTile.js +10 -23
- package/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/lib/components/ProductTile/ProductTileContent.d.ts +24 -2
- package/lib/components/ProductTile/renderAdditionalDescription.d.ts +4 -0
- package/lib/components/ProductTile/renderAdditionalDescription.js +15 -0
- package/lib/components/ProductTile/renderAdditionalDescription.js.map +1 -0
- package/lib/components/ProductTile/renderBenefit.d.ts +4 -0
- package/lib/components/ProductTile/renderBenefit.js +29 -0
- package/lib/components/ProductTile/renderBenefit.js.map +1 -0
- package/lib/components/ProductTile/renderImage.d.ts +3 -0
- package/lib/components/ProductTile/renderImage.js +9 -0
- package/lib/components/ProductTile/renderImage.js.map +1 -0
- package/lib/components/Recommendation/Recommendation.fixture.d.ts +1 -1
- package/lib/components/Recommendation/RecommendationCard.js +1 -1
- package/lib/components/Recommendation/RecommendationCard.js.map +1 -1
- package/lib/components/TextBlock/TextBlock.js +13 -28
- package/lib/components/TextBlock/TextBlock.js.map +1 -1
- package/lib/content-page-repository/transformImg.d.ts +1 -1
- package/lib/content-page-repository/transformImg.js +4 -10
- package/lib/content-page-repository/transformImg.js.map +1 -1
- package/lib/content-page-repository/transformMarkdown.js +3 -3
- package/lib/content-page-repository/transformMarkdown.js.map +1 -1
- package/lib/hooks/useCachedAsyncData.d.ts +2 -0
- package/lib/hooks/useCachedAsyncData.js +22 -0
- package/lib/hooks/useCachedAsyncData.js.map +1 -0
- package/lib/hooks/useLocation.d.ts +6 -0
- package/lib/hooks/useLocation.js +23 -0
- package/lib/hooks/useLocation.js.map +1 -0
- package/lib/hooks/useRegions.d.ts +6 -0
- package/lib/hooks/useRegions.js +8 -0
- package/lib/hooks/useRegions.js.map +1 -0
- package/lib/services/sitemap/SitemapProps.d.ts +8 -0
- package/lib/ui-kit/Location/Location.d.ts +19 -0
- package/lib/ui-kit/Location/Location.fixture.d.ts +6 -0
- package/lib/ui-kit/Location/Location.js +42 -0
- package/lib/ui-kit/Location/Location.js.map +1 -0
- package/lib/ui-kit/Location/SearchBar.d.ts +6 -0
- package/lib/ui-kit/Location/SearchBar.js +7 -0
- package/lib/ui-kit/Location/SearchBar.js.map +1 -0
- package/lib/ui-kit/MarkdownText/MarkdownText.d.ts +2 -0
- package/lib/ui-kit/MarkdownText/MarkdownText.js +7 -0
- package/lib/ui-kit/MarkdownText/MarkdownText.js.map +1 -0
- package/lib/ui-kit/MarkdownText/MarkdownTextProps.d.ts +6 -0
- package/lib/ui-kit/MarkdownText/MarkdownTextProps.js +2 -0
- package/lib/ui-kit/MarkdownText/MarkdownTextProps.js.map +1 -0
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.js +8 -4
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/lib/ui-kit/Text/Text.js +1 -5
- package/lib/ui-kit/Text/Text.js.map +1 -1
- package/lib/utils/groupBy.d.ts +1 -0
- package/lib/utils/groupBy.js +10 -0
- package/lib/utils/groupBy.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +49 -25
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +5 -0
- package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +44 -0
- package/mobile/bundle/components/Header/HeaderSecondaryMenu.d.ts +2 -0
- package/mobile/bundle/components/ProductTile/ProductTileContent.d.ts +24 -2
- package/mobile/bundle/components/ProductTile/renderAdditionalDescription.d.ts +4 -0
- package/mobile/bundle/components/ProductTile/renderBenefit.d.ts +4 -0
- package/mobile/bundle/components/ProductTile/renderImage.d.ts +3 -0
- package/mobile/bundle/content-page-repository/transformImg.d.ts +1 -1
- package/mobile/bundle/hooks/useCachedAsyncData.d.ts +2 -0
- package/mobile/bundle/hooks/useLocation.d.ts +6 -0
- package/mobile/bundle/hooks/useRegions.d.ts +6 -0
- package/mobile/bundle/services/sitemap/SitemapProps.d.ts +8 -0
- package/mobile/bundle/ui-kit/Location/Location.d.ts +19 -0
- package/mobile/bundle/ui-kit/Location/SearchBar.d.ts +6 -0
- package/mobile/bundle/ui-kit/MarkdownText/MarkdownText.d.ts +2 -0
- package/mobile/bundle/ui-kit/MarkdownText/MarkdownTextProps.d.ts +6 -0
- package/mobile/bundle/utils/groupBy.d.ts +1 -0
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +5 -0
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +22 -0
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -0
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +44 -0
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js +2 -0
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js.map +1 -0
- package/mobile/dist/components/Header/HeaderBurger.js +4 -3
- package/mobile/dist/components/Header/HeaderBurger.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.d.ts +2 -0
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js +13 -4
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/dist/components/ProductTile/ProductTile.js +9 -22
- package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/dist/components/ProductTile/ProductTileContent.d.ts +24 -2
- package/mobile/dist/components/ProductTile/renderAdditionalDescription.d.ts +4 -0
- package/mobile/dist/components/ProductTile/renderAdditionalDescription.js +18 -0
- package/mobile/dist/components/ProductTile/renderAdditionalDescription.js.map +1 -0
- package/mobile/dist/components/ProductTile/renderBenefit.d.ts +4 -0
- package/mobile/dist/components/ProductTile/renderBenefit.js +32 -0
- package/mobile/dist/components/ProductTile/renderBenefit.js.map +1 -0
- package/mobile/dist/components/ProductTile/renderImage.d.ts +3 -0
- package/mobile/dist/components/ProductTile/renderImage.js +12 -0
- package/mobile/dist/components/ProductTile/renderImage.js.map +1 -0
- package/mobile/dist/components/Recommendation/RecommendationCard.js +1 -1
- package/mobile/dist/components/Recommendation/RecommendationCard.js.map +1 -1
- package/mobile/dist/content-page-repository/transformImg.d.ts +1 -1
- package/mobile/dist/content-page-repository/transformImg.js +4 -10
- package/mobile/dist/content-page-repository/transformImg.js.map +1 -1
- package/mobile/dist/content-page-repository/transformMarkdown.js +3 -3
- package/mobile/dist/content-page-repository/transformMarkdown.js.map +1 -1
- package/mobile/dist/hooks/useCachedAsyncData.d.ts +2 -0
- package/mobile/dist/hooks/useCachedAsyncData.js +25 -0
- package/mobile/dist/hooks/useCachedAsyncData.js.map +1 -0
- package/mobile/dist/hooks/useLocation.d.ts +6 -0
- package/mobile/dist/hooks/useLocation.js +26 -0
- package/mobile/dist/hooks/useLocation.js.map +1 -0
- package/mobile/dist/hooks/useRegions.d.ts +6 -0
- package/mobile/dist/hooks/useRegions.js +11 -0
- package/mobile/dist/hooks/useRegions.js.map +1 -0
- package/mobile/dist/services/sitemap/SitemapProps.d.ts +8 -0
- package/mobile/dist/ui-kit/Location/Location.d.ts +19 -0
- package/mobile/dist/ui-kit/Location/Location.js +44 -0
- package/mobile/dist/ui-kit/Location/Location.js.map +1 -0
- package/mobile/dist/ui-kit/Location/SearchBar.d.ts +6 -0
- package/mobile/dist/ui-kit/Location/SearchBar.js +9 -0
- package/mobile/dist/ui-kit/Location/SearchBar.js.map +1 -0
- package/mobile/dist/ui-kit/MarkdownText/MarkdownText.d.ts +2 -0
- package/mobile/dist/ui-kit/MarkdownText/MarkdownText.js +9 -0
- package/mobile/dist/ui-kit/MarkdownText/MarkdownText.js.map +1 -0
- package/mobile/dist/ui-kit/MarkdownText/MarkdownTextProps.d.ts +6 -0
- package/mobile/dist/ui-kit/MarkdownText/MarkdownTextProps.js +2 -0
- package/mobile/dist/ui-kit/MarkdownText/MarkdownTextProps.js.map +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js +8 -4
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/mobile/dist/ui-kit/Text/Text.js +1 -5
- package/mobile/dist/ui-kit/Text/Text.js.map +1 -1
- package/mobile/dist/utils/groupBy.d.ts +1 -0
- package/mobile/dist/utils/groupBy.js +13 -0
- package/mobile/dist/utils/groupBy.js.map +1 -0
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +5 -0
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +20 -0
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -0
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +44 -0
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js +2 -0
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js.map +1 -0
- package/mobile/lib/components/Header/HeaderBurger.js +4 -3
- package/mobile/lib/components/Header/HeaderBurger.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.d.ts +2 -0
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js +13 -4
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/lib/components/ProductTile/ProductTile.js +10 -23
- package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/lib/components/ProductTile/ProductTileContent.d.ts +24 -2
- package/mobile/lib/components/ProductTile/renderAdditionalDescription.d.ts +4 -0
- package/mobile/lib/components/ProductTile/renderAdditionalDescription.js +15 -0
- package/mobile/lib/components/ProductTile/renderAdditionalDescription.js.map +1 -0
- package/mobile/lib/components/ProductTile/renderBenefit.d.ts +4 -0
- package/mobile/lib/components/ProductTile/renderBenefit.js +29 -0
- package/mobile/lib/components/ProductTile/renderBenefit.js.map +1 -0
- package/mobile/lib/components/ProductTile/renderImage.d.ts +3 -0
- package/mobile/lib/components/ProductTile/renderImage.js +9 -0
- package/mobile/lib/components/ProductTile/renderImage.js.map +1 -0
- package/mobile/lib/components/Recommendation/RecommendationCard.js +1 -1
- package/mobile/lib/components/Recommendation/RecommendationCard.js.map +1 -1
- package/mobile/lib/content-page-repository/transformImg.d.ts +1 -1
- package/mobile/lib/content-page-repository/transformImg.js +4 -10
- package/mobile/lib/content-page-repository/transformImg.js.map +1 -1
- package/mobile/lib/content-page-repository/transformMarkdown.js +3 -3
- package/mobile/lib/content-page-repository/transformMarkdown.js.map +1 -1
- package/mobile/lib/hooks/useCachedAsyncData.d.ts +2 -0
- package/mobile/lib/hooks/useCachedAsyncData.js +22 -0
- package/mobile/lib/hooks/useCachedAsyncData.js.map +1 -0
- package/mobile/lib/hooks/useLocation.d.ts +6 -0
- package/mobile/lib/hooks/useLocation.js +23 -0
- package/mobile/lib/hooks/useLocation.js.map +1 -0
- package/mobile/lib/hooks/useRegions.d.ts +6 -0
- package/mobile/lib/hooks/useRegions.js +8 -0
- package/mobile/lib/hooks/useRegions.js.map +1 -0
- package/mobile/lib/services/sitemap/SitemapProps.d.ts +8 -0
- package/mobile/lib/ui-kit/Location/Location.d.ts +19 -0
- package/mobile/lib/ui-kit/Location/Location.js +42 -0
- package/mobile/lib/ui-kit/Location/Location.js.map +1 -0
- package/mobile/lib/ui-kit/Location/SearchBar.d.ts +6 -0
- package/mobile/lib/ui-kit/Location/SearchBar.js +7 -0
- package/mobile/lib/ui-kit/Location/SearchBar.js.map +1 -0
- package/mobile/lib/ui-kit/MarkdownText/MarkdownText.d.ts +2 -0
- package/mobile/lib/ui-kit/MarkdownText/MarkdownText.js +7 -0
- package/mobile/lib/ui-kit/MarkdownText/MarkdownText.js.map +1 -0
- package/mobile/lib/ui-kit/MarkdownText/MarkdownTextProps.d.ts +6 -0
- package/mobile/lib/ui-kit/MarkdownText/MarkdownTextProps.js +2 -0
- package/mobile/lib/ui-kit/MarkdownText/MarkdownTextProps.js.map +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js +8 -4
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/mobile/lib/ui-kit/Text/Text.js +1 -5
- package/mobile/lib/ui-kit/Text/Text.js.map +1 -1
- package/mobile/lib/utils/groupBy.d.ts +1 -0
- package/mobile/lib/utils/groupBy.js +10 -0
- package/mobile/lib/utils/groupBy.js.map +1 -0
- package/mobile/src/common.css +50 -0
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +19 -0
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +62 -0
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.ui.json +9 -0
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +45 -0
- package/mobile/src/components/Header/HeaderBurger.tsx +5 -7
- package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +32 -5
- package/mobile/src/components/MiniGallery/MiniGallery.ui.json +1 -1
- package/mobile/src/components/ProductTile/ProductTile.example.json +3 -0
- package/mobile/src/components/ProductTile/ProductTile.tsx +13 -44
- package/mobile/src/components/ProductTile/ProductTile.ui.json +14 -1
- package/mobile/src/components/ProductTile/ProductTileContent.ts +26 -2
- package/mobile/src/components/ProductTile/renderAdditionalDescription.tsx +30 -0
- package/mobile/src/components/ProductTile/renderBenefit.tsx +39 -0
- package/mobile/src/components/ProductTile/renderImage.tsx +15 -0
- package/mobile/src/components/Recommendation/Recommendation.example.json +6 -5
- package/mobile/src/components/Recommendation/Recommendation.ui.json +8 -0
- package/mobile/src/components/Recommendation/RecommendationCard.tsx +1 -1
- package/mobile/src/content-page-repository/transformImg.ts +6 -14
- package/mobile/src/content-page-repository/transformMarkdown.ts +3 -3
- package/mobile/src/hooks/useCachedAsyncData.ts +37 -0
- package/mobile/src/hooks/useLocation.ts +48 -0
- package/mobile/src/hooks/useRegions.ts +16 -0
- package/mobile/src/services/sitemap/SitemapProps.ts +9 -0
- package/mobile/src/ui-kit/Location/Location.tsx +168 -0
- package/mobile/src/ui-kit/Location/SearchBar.tsx +30 -0
- package/mobile/src/ui-kit/MarkdownText/MarkdownText.tsx +8 -0
- package/mobile/src/ui-kit/MarkdownText/MarkdownTextProps.ts +6 -0
- package/mobile/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +8 -4
- package/mobile/src/ui-kit/Text/Text.tsx +5 -7
- package/mobile/src/utils/groupBy.ts +10 -0
- package/package.json +2 -2
- package/src/common.css +50 -0
- package/src/components/Blocks.ts +4 -2
- package/src/components/Carousel/Carousel.fixture.tsx +22 -4
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +19 -0
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.tsx +47 -0
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +62 -0
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.ui.json +9 -0
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +45 -0
- package/src/components/Header/Header.tsx +6 -4
- package/src/components/Header/HeaderBurger.tsx +5 -7
- package/src/components/Header/HeaderSecondaryMenu.tsx +32 -5
- package/src/components/MiniGallery/MiniGallery.ui.json +1 -1
- package/src/components/ProductTile/ProductTile.example.json +3 -0
- package/src/components/ProductTile/ProductTile.fixture.tsx +11 -4
- package/src/components/ProductTile/ProductTile.tsx +13 -44
- package/src/components/ProductTile/ProductTile.ui.json +14 -1
- package/src/components/ProductTile/ProductTileContent.ts +26 -2
- package/src/components/ProductTile/renderAdditionalDescription.tsx +30 -0
- package/src/components/ProductTile/renderBenefit.tsx +39 -0
- package/src/components/ProductTile/renderImage.tsx +15 -0
- package/src/components/Recommendation/Recommendation.example.json +6 -5
- package/src/components/Recommendation/Recommendation.fixture.tsx +11 -10
- package/src/components/Recommendation/Recommendation.ui.json +8 -0
- package/src/components/Recommendation/RecommendationCard.tsx +1 -1
- package/src/components/TextBlock/TextBlock.tsx +49 -41
- package/src/content-page-repository/transformImg.ts +6 -14
- package/src/content-page-repository/transformMarkdown.ts +3 -3
- package/src/hooks/useCachedAsyncData.ts +37 -0
- package/src/hooks/useLocation.ts +48 -0
- package/src/hooks/useRegions.ts +16 -0
- package/src/services/sitemap/SitemapProps.ts +9 -0
- package/src/ui-kit/Location/Location.fixture.tsx +81 -0
- package/src/ui-kit/Location/Location.tsx +168 -0
- package/src/ui-kit/Location/SearchBar.tsx +30 -0
- package/src/ui-kit/MarkdownText/MarkdownText.tsx +8 -0
- package/src/ui-kit/MarkdownText/MarkdownTextProps.ts +6 -0
- package/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +8 -4
- package/src/ui-kit/Text/Text.tsx +5 -7
- package/src/utils/groupBy.ts +10 -0
- package/bundle/hooks/useGeolocation.d.ts +0 -1
- package/dist/hooks/useGeolocation.d.ts +0 -1
- package/dist/hooks/useGeolocation.js +0 -21
- package/dist/hooks/useGeolocation.js.map +0 -1
- package/lib/hooks/useGeolocation.d.ts +0 -1
- package/lib/hooks/useGeolocation.js +0 -18
- package/lib/hooks/useGeolocation.js.map +0 -1
- package/mobile/bundle/hooks/useGeolocation.d.ts +0 -1
- package/mobile/dist/hooks/useGeolocation.d.ts +0 -1
- package/mobile/dist/hooks/useGeolocation.js +0 -21
- package/mobile/dist/hooks/useGeolocation.js.map +0 -1
- package/mobile/lib/hooks/useGeolocation.d.ts +0 -1
- package/mobile/lib/hooks/useGeolocation.js +0 -18
- package/mobile/lib/hooks/useGeolocation.js.map +0 -1
- package/mobile/src/hooks/useGeolocation.ts +0 -22
- package/src/hooks/useGeolocation.ts +0 -22
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { CarouselRecommendationCardContent } from './CarouselRecommendationCardContent';
|
|
2
|
+
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
3
|
+
export interface RecommendationCardProps extends CarouselRecommendationCardContent, UniBlockProps {
|
|
4
|
+
}
|
|
5
|
+
export declare const CarouselRecommendationCard: import("@redneckz/uni-jsx").UNIComponent<RecommendationCardProps, any, any>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
|
+
import type { HeadlineCommonProps } from '../../model/HeadlineType';
|
|
3
|
+
import type { LinkCommonProps } from '../../model/LinkProps';
|
|
4
|
+
import type { Picture } from '../../model/Picture';
|
|
5
|
+
import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
|
|
6
|
+
import type { ListContent } from '../../ui-kit/List/ListContent';
|
|
7
|
+
/**
|
|
8
|
+
* @title Карточка рекомендаций
|
|
9
|
+
*/
|
|
10
|
+
export interface CarouselRecommendationCardContent extends HeadlineCommonProps, ListContent {
|
|
11
|
+
/**
|
|
12
|
+
* @title Соц сети
|
|
13
|
+
* @minItems 3
|
|
14
|
+
* @default [
|
|
15
|
+
* { "href": "https://t.me" },
|
|
16
|
+
* { "href": "https://vk.com" },
|
|
17
|
+
* { "href": "https://ok.ru" },
|
|
18
|
+
* ]
|
|
19
|
+
*/
|
|
20
|
+
socialMedia?: LinkCommonProps[];
|
|
21
|
+
/**
|
|
22
|
+
* @default {
|
|
23
|
+
* "format": "webp",
|
|
24
|
+
* "size": {
|
|
25
|
+
* "width": 290
|
|
26
|
+
* },
|
|
27
|
+
* "sources": [{
|
|
28
|
+
* "media": 1279,
|
|
29
|
+
* "width": 174,
|
|
30
|
+
* "format": "webp",
|
|
31
|
+
* "alignment": "southeast"
|
|
32
|
+
* }]
|
|
33
|
+
* }
|
|
34
|
+
*/
|
|
35
|
+
image?: Picture;
|
|
36
|
+
/**
|
|
37
|
+
* @default {
|
|
38
|
+
* "text": "",
|
|
39
|
+
* "version": "secondary"
|
|
40
|
+
* }
|
|
41
|
+
*/
|
|
42
|
+
button?: ButtonProps;
|
|
43
|
+
version?: BlockVersion;
|
|
44
|
+
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { BgColorVersion } from '../../model/BgColorVersion';
|
|
2
|
+
import type { ForeignOffice } from '../../services/sitemap/SitemapProps';
|
|
2
3
|
interface HeaderSecondaryMenuContent {
|
|
3
4
|
defaultLocation?: string;
|
|
4
5
|
officesLink?: string;
|
|
5
6
|
bgColor?: BgColorVersion;
|
|
7
|
+
foreignOffices?: ForeignOffice[];
|
|
6
8
|
}
|
|
7
9
|
export interface HeaderSecondaryMenuProps extends HeaderSecondaryMenuContent {
|
|
8
10
|
className?: string;
|
|
@@ -2,7 +2,28 @@ import type { BlockVersion } from '../../model/BlockVersion';
|
|
|
2
2
|
import type { DescriptionProps, HeadlineProps, LabelProps } from '../../model/HeadlineType';
|
|
3
3
|
import type { Picture } from '../../model/Picture';
|
|
4
4
|
import type { ButtonContent } from '../../ui-kit/Button/ButtonProps';
|
|
5
|
-
|
|
5
|
+
import type { MarkdownTextProps } from '../../ui-kit/MarkdownText/MarkdownTextProps';
|
|
6
|
+
/**
|
|
7
|
+
* @title Стандартный
|
|
8
|
+
*/
|
|
9
|
+
declare type TextBenefit = DescriptionProps & LabelProps & {
|
|
10
|
+
/** @default default */
|
|
11
|
+
type: 'default';
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* @title Форматированный текст
|
|
15
|
+
*/
|
|
16
|
+
declare type MarkdownTextContent = MarkdownTextProps & {
|
|
17
|
+
/** @default md */
|
|
18
|
+
type: 'md';
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* @title Преимущество
|
|
22
|
+
* @default{
|
|
23
|
+
* "type": "default"
|
|
24
|
+
* }
|
|
25
|
+
*/
|
|
26
|
+
export declare type Benefit = TextBenefit | MarkdownTextContent;
|
|
6
27
|
/**
|
|
7
28
|
* @title Продуктовая плитка
|
|
8
29
|
*/
|
|
@@ -27,9 +48,10 @@ export declare type ProductTileContent = HeadlineProps & ButtonContent & {
|
|
|
27
48
|
* @title Преимущества
|
|
28
49
|
* @maxItems 7
|
|
29
50
|
*/
|
|
30
|
-
benefits?:
|
|
51
|
+
benefits?: Benefit[];
|
|
31
52
|
/** @title Дополнительное описание */
|
|
32
53
|
additionalDescription?: string;
|
|
33
54
|
/** @title Картинка справа/текст слева */
|
|
34
55
|
isImageOnRightSide?: boolean;
|
|
35
56
|
};
|
|
57
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
3
|
+
import type { Picture } from '../../model/Picture';
|
|
4
|
+
export declare function renderAdditionalDescription(additionalDescription?: string, image?: Picture, version?: BlockVersion): JSX.Element | null;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
3
|
+
import type { Benefit } from './ProductTileContent';
|
|
4
|
+
export declare const renderBenefit: (version?: BlockVersion) => (benefit: Benefit, i: number) => JSX.Element | JSX.Element[] | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ImageSize } from '../model/ImageSize';
|
|
2
|
-
import type { TransformationOptions } from './TransformationOptions';
|
|
3
2
|
import type { ImgSource } from '../model/Picture';
|
|
3
|
+
import type { TransformationOptions } from './TransformationOptions';
|
|
4
4
|
declare type TransformImgParams = {
|
|
5
5
|
pagePath: string;
|
|
6
6
|
src: string;
|
|
@@ -17,10 +17,18 @@ export interface DispositionItem extends LinkProps {
|
|
|
17
17
|
/** @hidden */
|
|
18
18
|
icon?: Picture;
|
|
19
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* @title Представительства за рубежом
|
|
22
|
+
* @required ["text", "href"]
|
|
23
|
+
*/
|
|
24
|
+
export interface ForeignOffice extends LinkProps {
|
|
25
|
+
icon?: Picture;
|
|
26
|
+
}
|
|
20
27
|
export interface SitemapDataProps {
|
|
21
28
|
topItems?: TopMenuItem[];
|
|
22
29
|
dispositions?: DispositionItem[];
|
|
23
30
|
logo?: LogoType;
|
|
31
|
+
foreignOffices?: ForeignOffice[];
|
|
24
32
|
defaultLocation?: string;
|
|
25
33
|
officesLink?: string;
|
|
26
34
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Region } from '../../hooks/useRegions';
|
|
2
|
+
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
3
|
+
import type { ForeignOffice } from '../../services/sitemap/SitemapProps';
|
|
4
|
+
interface RegionLinkProps {
|
|
5
|
+
onChangeLocation?: (region: Region) => void;
|
|
6
|
+
}
|
|
7
|
+
interface CloseButtonProps {
|
|
8
|
+
close?: () => void;
|
|
9
|
+
}
|
|
10
|
+
interface CurrentLocationProps {
|
|
11
|
+
currentLocation?: Region;
|
|
12
|
+
}
|
|
13
|
+
interface ForeignOfficeProps {
|
|
14
|
+
foreignOffices?: ForeignOffice[];
|
|
15
|
+
}
|
|
16
|
+
export declare type LocationProps = ForeignOfficeProps & CloseButtonProps & RegionLinkProps & CurrentLocationProps & UniBlockProps;
|
|
17
|
+
export declare const Location: import("@redneckz/uni-jsx").UNIComponent<LocationProps, any, any>;
|
|
18
|
+
declare const ForeignOffice: import("@redneckz/uni-jsx").UNIComponent<ForeignOffice, any, any>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const groupBy: <K, V>(list: V[], keyGetter: (input: V) => K) => Map<K, V[]>;
|
|
@@ -44,6 +44,7 @@ const ProductBlock_1 = require("./ProductBlock/ProductBlock");
|
|
|
44
44
|
const ProductGallery_1 = require("./ProductGallery/ProductGallery");
|
|
45
45
|
const ProductTile_1 = require("./ProductTile/ProductTile");
|
|
46
46
|
const PromoTile_1 = require("./PromoTile/PromoTile");
|
|
47
|
+
const CarouselRecommendationCard_1 = require("./CarouselRecommendationCard/CarouselRecommendationCard");
|
|
47
48
|
const Recommendation_1 = require("./Recommendation/Recommendation");
|
|
48
49
|
const RollupItem_1 = require("./RollupItem/RollupItem");
|
|
49
50
|
const SafeDepositRental_1 = require("./SafeDepositRental/SafeDepositRental");
|
|
@@ -95,11 +96,10 @@ exports.Blocks = {
|
|
|
95
96
|
ProductGallery: ProductGallery_1.ProductGallery,
|
|
96
97
|
ProductTile: ProductTile_1.ProductTile,
|
|
97
98
|
PromoTile: PromoTile_1.PromoTile,
|
|
98
|
-
OfficeMap: OfficeMap_1.OfficeMap,
|
|
99
99
|
OfficeServicesBlock: OfficeServicesBlock_1.OfficeServicesBlock,
|
|
100
100
|
OtherProducts: OtherProducts_1.OtherProducts,
|
|
101
101
|
OtherProductsItem: OtherProductsItem_1.OtherProductsItem,
|
|
102
|
-
|
|
102
|
+
CarouselRecommendationCard: CarouselRecommendationCard_1.CarouselRecommendationCard,
|
|
103
103
|
RollupItem: RollupItem_1.RollupItem,
|
|
104
104
|
SafeDepositRental: SafeDepositRental_1.SafeDepositRental,
|
|
105
105
|
StepsBlock: StepsBlock_1.StepsBlock,
|
|
@@ -109,5 +109,7 @@ exports.Blocks = {
|
|
|
109
109
|
Tile: Tile_1.Tile,
|
|
110
110
|
VerticalLayout: VerticalLayout_1.VerticalLayout,
|
|
111
111
|
Video: Video_1.Video,
|
|
112
|
+
Recommendation: Recommendation_1.Recommendation,
|
|
113
|
+
OfficeMap: OfficeMap_1.OfficeMap,
|
|
112
114
|
};
|
|
113
115
|
//# sourceMappingURL=Blocks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Blocks.js","sourceRoot":"","sources":["../../src/components/Blocks.ts"],"names":[],"mappings":";;AACA,qDAAkD;AAClD,iEAA8D;AAC9D,iEAA8D;AAC9D,yCAAsC;AACtC,gFAA6E;AAC7E,iEAA8D;AAC9D,2DAAwD;AACxD,wDAAqD;AACrD,8DAA2D;AAC3D,kDAA+C;AAC/C,8DAA2D;AAC3D,mFAAgF;AAChF,4FAAyF;AACzF,iEAA8D;AAC9D,mFAAgF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C1B,UAAU,EAAV,uBAAU;IACV,iBAAiB,EAAjB,qCAAiB;IACjB,UAAU,EAAV,uBAAU;IACV,IAAI,EAAJ,WAAI;IACJ,YAAY,EAAZ,2BAAY;IACZ,SAAS,EAAT,qBAAS;IACT,IAAI,EAAJ,WAAI;IACJ,cAAc,EAAd,+BAAc;IACd,KAAK,EAAL,aAAK;IACL,cAAc,EAAd,+BAAc;IACd,SAAS,EAAT,qBAAS;CACV,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { CarouselRecommendationCardContent } from './CarouselRecommendationCardContent';
|
|
2
|
+
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
3
|
+
export interface RecommendationCardProps extends CarouselRecommendationCardContent, UniBlockProps {
|
|
4
|
+
}
|
|
5
|
+
export declare const CarouselRecommendationCard: import("@redneckz/uni-jsx").UNIComponent<RecommendationCardProps, any, any>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.CarouselRecommendationCard = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const BaseTile_1 = require("../BaseTile/BaseTile");
|
|
5
|
+
const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
|
|
6
|
+
const BorderVersion_1 = require("../../model/BorderVersion");
|
|
7
|
+
const Heading_1 = require("../../ui-kit/Heading/Heading");
|
|
8
|
+
const Img_1 = require("../../ui-kit/Img/Img");
|
|
9
|
+
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
10
|
+
const List_1 = require("../../ui-kit/List/List");
|
|
11
|
+
const ButtonSection_1 = require("../../ui-kit/Button/ButtonSection");
|
|
12
|
+
const SocialMedia_1 = require("../Footer/SocialMedia");
|
|
13
|
+
const BlockVersion_1 = require("../../model/BlockVersion");
|
|
14
|
+
exports.CarouselRecommendationCard = (0, uni_jsx_1.JSX)(({ button, className = '', description, image, items = [], socialMedia = [], title, version = 'primary', ...rest }) => {
|
|
15
|
+
const tileTitle = title ? ((0, jsx_runtime_1.jsx)(Heading_1.Heading, { headingType: "h5", as: "h3", className: "mb-3.5 z-10", title: title })) : null;
|
|
16
|
+
const tileImage = image?.src ? ((0, jsx_runtime_1.jsx)(Img_1.Img, { className: "absolute bottom-0 right-0 m-0", image: image })) : null;
|
|
17
|
+
return ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: `relative text-left border border-solid box-border p-7 min-w-[524px]
|
|
18
|
+
${BorderVersion_1.BorderVersionStyleMap[version]}
|
|
19
|
+
${BlockVersion_1.VersionStyleMap[version]}
|
|
20
|
+
${className}`, ...rest, children: (0, jsx_runtime_1.jsx)(BaseTile_1.BaseTile, { className: "flex justify-between", title: tileTitle, image: tileImage, children: (0, jsx_runtime_1.jsxs)("div", { className: "h-full flex flex-col justify-between", children: [description ? (0, jsx_runtime_1.jsx)("span", { className: "mb-2", children: description }) : null, items.length ? ((0, jsx_runtime_1.jsx)(List_1.List, { className: "text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]", items: items, version: version })) : null, socialMedia.length ? ((0, jsx_runtime_1.jsx)(SocialMedia_1.SocialMedia, { className: "pt-10 pb-0", media: socialMedia, version: version })) : null, button?.text ? (0, jsx_runtime_1.jsx)("div", { className: "pt-2 mt-16", children: (0, ButtonSection_1.renderButton)({ button }) }) : null] }) }) }));
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=CarouselRecommendationCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CarouselRecommendationCard.js","sourceRoot":"","sources":["../../../src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx"],"names":[],"mappings":";;;AAAA,mDAAgD;AAChD,4DAAyD;AACzD,6DAAkE;AAClE,0DAAuD;AACvD,8CAA2C;AAC3C,+CAAwC;AACxC,iDAA8C;AAC9C,qEAAiE;AACjE,uDAAoD;AACpD,2DAA2D;AAM9C,QAAA,0BA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EAAE,OAAO,EAAE,OAAO,GAAI,CAC7E,CAAC,CAAC,CAAC,IAAI,EACP,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,gCAAK,SAAS,EAAC,YAAY,YAAE,IAAA,4BAAY,EAAC,EAAE,MAAM,EAAE,CAAC,GAAO,CAAC,CAAC,CAAC,IAAI,IAC/E,GACG,GACE,CAChB,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
|
+
import type { HeadlineCommonProps } from '../../model/HeadlineType';
|
|
3
|
+
import type { LinkCommonProps } from '../../model/LinkProps';
|
|
4
|
+
import type { Picture } from '../../model/Picture';
|
|
5
|
+
import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
|
|
6
|
+
import type { ListContent } from '../../ui-kit/List/ListContent';
|
|
7
|
+
/**
|
|
8
|
+
* @title Карточка рекомендаций
|
|
9
|
+
*/
|
|
10
|
+
export interface CarouselRecommendationCardContent extends HeadlineCommonProps, ListContent {
|
|
11
|
+
/**
|
|
12
|
+
* @title Соц сети
|
|
13
|
+
* @minItems 3
|
|
14
|
+
* @default [
|
|
15
|
+
* { "href": "https://t.me" },
|
|
16
|
+
* { "href": "https://vk.com" },
|
|
17
|
+
* { "href": "https://ok.ru" },
|
|
18
|
+
* ]
|
|
19
|
+
*/
|
|
20
|
+
socialMedia?: LinkCommonProps[];
|
|
21
|
+
/**
|
|
22
|
+
* @default {
|
|
23
|
+
* "format": "webp",
|
|
24
|
+
* "size": {
|
|
25
|
+
* "width": 290
|
|
26
|
+
* },
|
|
27
|
+
* "sources": [{
|
|
28
|
+
* "media": 1279,
|
|
29
|
+
* "width": 174,
|
|
30
|
+
* "format": "webp",
|
|
31
|
+
* "alignment": "southeast"
|
|
32
|
+
* }]
|
|
33
|
+
* }
|
|
34
|
+
*/
|
|
35
|
+
image?: Picture;
|
|
36
|
+
/**
|
|
37
|
+
* @default {
|
|
38
|
+
* "text": "",
|
|
39
|
+
* "version": "secondary"
|
|
40
|
+
* }
|
|
41
|
+
*/
|
|
42
|
+
button?: ButtonProps;
|
|
43
|
+
version?: BlockVersion;
|
|
44
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CarouselRecommendationCardContent.js","sourceRoot":"","sources":["../../../src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts"],"names":[],"mappings":""}
|
|
@@ -17,10 +17,10 @@ const BORDER_COLORS = {
|
|
|
17
17
|
};
|
|
18
18
|
exports.Header = (0, uni_jsx_1.JSX)(({ bgColor = 'bg-white', className = '', showSubMenu = true, ...rest }) => {
|
|
19
19
|
const router = (0, useRouter_1.useRouter)();
|
|
20
|
-
const { topItems, logo, defaultLocation, officesLink } = (0, useSWRResource_1.useSWRResource)(ProjectSettings_1.projectSettings.SITEMAP || 'sitemap', rest.options?.page?.fallback);
|
|
20
|
+
const { topItems, logo, defaultLocation, foreignOffices, officesLink } = (0, useSWRResource_1.useSWRResource)(ProjectSettings_1.projectSettings.SITEMAP || 'sitemap', rest.options?.page?.fallback);
|
|
21
21
|
const activeTopItem = showSubMenu ? getActiveItem(topItems, router) : null;
|
|
22
22
|
const topMenu = topItems?.map((_, i) => ((0, jsx_runtime_1.jsx)(TopItem_1.TopItem, { active: _ === activeTopItem, "aria-label": _.text, bgColor: bgColor, ..._ }, String(i))));
|
|
23
|
-
return ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { tag: "header", className: `pt-6 px-20 ${bgColor} ${className} ${showSubMenu && activeTopItem?.items?.length ? 'pb-4' : 'pb-5'}`, ...rest, children: (0, jsx_runtime_1.jsxs)("div", { className: "container", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center", children: [(0, jsx_runtime_1.jsx)(Logo_1.Logo, { className: "mr-8", bgColor: bgColor, logo: logo }), topMenu, (0, jsx_runtime_1.jsx)(HeaderSecondaryMenu_1.HeaderSecondaryMenu, { className: "ml-auto", defaultLocation: defaultLocation, officesLink: officesLink, bgColor: bgColor })] }), (0, jsx_runtime_1.jsx)("div", { className: `mt-6 h-px ${BORDER_COLORS[bgColor]}` }), showSubMenu && activeTopItem?.items?.length ? ((0, jsx_runtime_1.jsx)(HeaderSubMenu_1.HeaderSubMenu, { subItems: activeTopItem.items, bgColor: bgColor })) : null] }) }));
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { tag: "header", className: `pt-6 px-20 ${bgColor} ${className} ${showSubMenu && activeTopItem?.items?.length ? 'pb-4' : 'pb-5'}`, ...rest, children: (0, jsx_runtime_1.jsxs)("div", { className: "container", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center", children: [(0, jsx_runtime_1.jsx)(Logo_1.Logo, { className: "mr-8", bgColor: bgColor, logo: logo }), topMenu, (0, jsx_runtime_1.jsx)(HeaderSecondaryMenu_1.HeaderSecondaryMenu, { className: "ml-auto", foreignOffices: foreignOffices, defaultLocation: defaultLocation, officesLink: officesLink, bgColor: bgColor })] }), (0, jsx_runtime_1.jsx)("div", { className: `mt-6 h-px ${BORDER_COLORS[bgColor]}` }), showSubMenu && activeTopItem?.items?.length ? ((0, jsx_runtime_1.jsx)(HeaderSubMenu_1.HeaderSubMenu, { subItems: activeTopItem.items, bgColor: bgColor })) : null] }) }));
|
|
24
24
|
});
|
|
25
25
|
const getActiveItem = (topItems, router) => {
|
|
26
26
|
const [firstPortal] = topItems || [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../src/components/Header/Header.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,qDAA0D;AAI1D,2DAAwD;AACxD,4EAAyE;AAEzE,0EAAuE;AACvE,4DAAyD;AACzD,iDAA8C;AAC9C,0DAAuD;AAEvD,+DAA4D;AAC5D,mDAAgD;AAEhD,MAAM,aAAa,GAAmC;IACpD,UAAU,EAAE,iBAAiB;IAC7B,WAAW,E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AAI,WAAW,CAAC;AAChE,CAAC,CAAC"}
|
|
@@ -2,12 +2,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
2
2
|
exports.HeaderBurger = void 0;
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const
|
|
5
|
+
const useLocation_1 = require("../../hooks/useLocation");
|
|
6
6
|
const Img_1 = require("../../ui-kit/Img/Img");
|
|
7
7
|
const SearchBar_1 = require("../../ui-kit/SearchBar/SearchBar");
|
|
8
|
+
const Text_1 = require("../../ui-kit/Text/Text");
|
|
8
9
|
exports.HeaderBurger = (0, uni_jsx_1.JSX)(({ burgerSubMenu, onClick, defaultLocation = '', children }) => {
|
|
9
|
-
const [
|
|
10
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: "absolute top-0 left-0 w-full h-full bg-white p-4 box-border z-20", children: [(0, jsx_runtime_1.jsx)("button", { className: "absolute top-4 right-4 border-none bg-transparent cursor-pointer", onClick: onClick, children: (0, jsx_runtime_1.jsx)(Img_1.Img, { image: "CloseIcon", width: "24", height: "24", asSVG: true }) }), (0, jsx_runtime_1.jsxs)("button", {
|
|
10
|
+
const [location] = (0, useLocation_1.useLocation)(defaultLocation);
|
|
11
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "absolute top-0 left-0 w-full h-full bg-white p-4 box-border z-20", children: [(0, jsx_runtime_1.jsx)("button", { className: "absolute top-4 right-4 border-none bg-transparent cursor-pointer", onClick: onClick, children: (0, jsx_runtime_1.jsx)(Img_1.Img, { image: "CloseIcon", width: "24", height: "24", asSVG: true }) }), (0, jsx_runtime_1.jsxs)("button", { className: "flex items-center text-s p-0 mb-4 bg-transparent cursor-pointer", children: [(0, jsx_runtime_1.jsx)(Img_1.Img, { image: "GeolocationIcon", width: "20", height: "20", className: "text-primary-main box-border mr-2", asSVG: true }), (0, jsx_runtime_1.jsx)(Text_1.Text, { color: "text-secondary-text", children: location.name })] }), children, (0, jsx_runtime_1.jsx)("div", { className: "mb-7", children: burgerSubMenu?.map(renderBurgerSubMenuItem) }), (0, jsx_runtime_1.jsx)(SearchBar_1.SearchBar, { className: "grow" })] }));
|
|
11
12
|
});
|
|
12
13
|
const renderBurgerSubMenuItem = (menu, i) => {
|
|
13
14
|
const { icon, href, text } = menu;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderBurger.js","sourceRoot":"","sources":["../../../src/components/Header/HeaderBurger.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC
|
|
1
|
+
{"version":3,"file":"HeaderBurger.js","sourceRoot":"","sources":["../../../src/components/Header/HeaderBurger.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,yDAAsD;AAEtD,8CAA2C;AAC3C,gEAA6D;AAC7D,iDAA8C;AAUjC,QAAA,YAAY,GAAG,IAAA,aAAG,EAC7B,CAAC,EAAE,aAAa,EAAE,OAAO,EAAE,eAAe,GAAG,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC7D,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAA,yBAAW,EAAC,eAAe,CAAC,CAAC;IAEhD,OAAO,CACL,iCAAK,SAAS,EAAC,kEAAkE,aAC/E,mCACE,SAAS,EAAC,kEAAkE,EAC5E,OAAO,EAAE,OAAO,YAEhB,uBAAC,SAAG,IAAC,KAAK,EAAC,WAAW,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,KAAK,SAAG,GAC/C,EACT,oCAAQ,SAAS,EAAC,iEAAiE,aACjF,uBAAC,SAAG,IACF,KAAK,EAAC,iBAAiB,EACvB,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,SAAS,EAAC,mCAAmC,EAC7C,KAAK,SACL,EACF,uBAAC,WAAI,IAAC,KAAK,EAAC,qBAAqB,YAAE,QAAQ,CAAC,IAAI,GAAQ,IACjD,EACR,QAAQ,EACT,gCAAK,SAAS,EAAC,MAAM,YAAE,aAAa,EAAE,GAAG,CAAC,uBAAuB,CAAC,GAAO,EACzE,uBAAC,qBAAS,IAAC,SAAS,EAAC,MAAM,GAAG,IAC1B,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,uBAAuB,GAAG,CAAC,IAAqB,EAAE,CAAS,EAAE,EAAE;IACnE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IAElC,OAAO,CACL,+BAA8B,IAAI,EAAE,IAAI,EAAE,SAAS,EAAC,0CAA0C,aAC3F,IAAI,CAAC,CAAC,CAAC,CACN,uBAAC,SAAG,IAAC,SAAS,EAAC,wBAAwB,EAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,KAAK,SAAG,CACrF,CAAC,CAAC,CAAC,IAAI,EACR,iCAAM,SAAS,EAAC,oBAAoB,YAAE,IAAI,GAAQ,KAJ5C,iBAAiB,CAAC,EAAE,CAKxB,CACL,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { BgColorVersion } from '../../model/BgColorVersion';
|
|
2
|
+
import type { ForeignOffice } from '../../services/sitemap/SitemapProps';
|
|
2
3
|
interface HeaderSecondaryMenuContent {
|
|
3
4
|
defaultLocation?: string;
|
|
4
5
|
officesLink?: string;
|
|
5
6
|
bgColor?: BgColorVersion;
|
|
7
|
+
foreignOffices?: ForeignOffice[];
|
|
6
8
|
}
|
|
7
9
|
export interface HeaderSecondaryMenuProps extends HeaderSecondaryMenuContent {
|
|
8
10
|
className?: string;
|
|
@@ -2,8 +2,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
2
2
|
exports.HeaderSecondaryMenu = void 0;
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const
|
|
5
|
+
const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
|
|
6
|
+
const useLocation_1 = require("../../hooks/useLocation");
|
|
6
7
|
const Img_1 = require("../../ui-kit/Img/Img");
|
|
8
|
+
const Location_1 = require("../../ui-kit/Location/Location");
|
|
7
9
|
const TopItem_1 = require("../../ui-kit/TopItem/TopItem");
|
|
8
10
|
const HeaderSecondaryMenuButton_1 = require("./HeaderSecondaryMenuButton");
|
|
9
11
|
const COLORS_MAP = {
|
|
@@ -18,8 +20,15 @@ const LINKS_ICON_VERSION_MAP = {
|
|
|
18
20
|
'bg-white': 'black',
|
|
19
21
|
transparent: 'white',
|
|
20
22
|
};
|
|
21
|
-
exports.HeaderSecondaryMenu = (0, uni_jsx_1.JSX)(({ className, officesLink, defaultLocation = 'Москва', bgColor = 'bg-white' }) => {
|
|
22
|
-
const [
|
|
23
|
-
|
|
23
|
+
exports.HeaderSecondaryMenu = (0, uni_jsx_1.JSX)(({ className, officesLink, defaultLocation = 'Москва', foreignOffices, bgColor = 'bg-white', }) => {
|
|
24
|
+
const [isShowLocationModal, setShowLocationModal] = (0, hooks_1.useState)(false);
|
|
25
|
+
const [location, onChangeLocation] = (0, useLocation_1.useLocation)(defaultLocation);
|
|
26
|
+
const showLocationModal = () => {
|
|
27
|
+
setShowLocationModal(true);
|
|
28
|
+
};
|
|
29
|
+
const hideLocationModal = () => {
|
|
30
|
+
setShowLocationModal(false);
|
|
31
|
+
};
|
|
32
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: `flex items-center ${className || ''}`, children: [(0, jsx_runtime_1.jsx)(TopItem_1.TopItem, { className: "mr-5", flat: true, href: "#", text: location.name, ariaLabel: "\u041C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", onClick: showLocationModal, bgColor: bgColor }), officesLink ? ((0, jsx_runtime_1.jsx)(TopItem_1.TopItem, { className: "mr-7", flat: true, href: officesLink, text: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B", ariaLabel: "\u0421\u043F\u0438\u0441\u043E\u043A \u0432\u0441\u0435\u0445 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043E\u0444\u0438\u0441\u043E\u0432 \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u043E\u0432", bgColor: bgColor })) : null, (0, jsx_runtime_1.jsx)(HeaderSecondaryMenuButton_1.HeaderSecondaryMenuButton, { className: `mr-5 group ${COLORS_MAP[bgColor]}`, ariaLabel: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443", children: (0, jsx_runtime_1.jsx)(Img_1.Img, { image: { icon: 'LoupeIcon', iconVersion: LINKS_ICON_VERSION_MAP[bgColor] }, className: "h-full pointer-events-none", imageClassName: "group-hover:text-primary-hover group-hover:invert-0 pointer-events-none", asSVG: true }) }), (0, jsx_runtime_1.jsx)(HeaderSecondaryMenuButton_1.HeaderSecondaryMenuButton, { className: `${LINKS_COLORS_MAP[bgColor]} group min-w-8 min-h-8`, ariaLabel: "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0441\u0441\u044B\u043B\u043A\u0438", children: (0, jsx_runtime_1.jsx)(Img_1.Img, { image: { icon: 'GridIcon', iconVersion: LINKS_ICON_VERSION_MAP[bgColor] }, className: "h-full bg-main-divider/20 rounded-full pointer-events-none", imageClassName: "group-hover:text-primary-hover group-hover:invert-0", asSVG: true }) }), isShowLocationModal ? ((0, jsx_runtime_1.jsx)(Location_1.Location, { currentLocation: location, foreignOffices: foreignOffices, onChangeLocation: onChangeLocation, close: hideLocationModal })) : null] }));
|
|
24
33
|
});
|
|
25
34
|
//# sourceMappingURL=HeaderSecondaryMenu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderSecondaryMenu.js","sourceRoot":"","sources":["../../../src/components/Header/HeaderSecondaryMenu.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC
|
|
1
|
+
{"version":3,"file":"HeaderSecondaryMenu.js","sourceRoot":"","sources":["../../../src/components/Header/HeaderSecondaryMenu.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAuD;AACvD,yDAAsD;AAItD,8CAA2C;AAC3C,6DAA0D;AAC1D,0DAAuD;AACvD,2EAAwE;AAaxE,MAAM,UAAU,GAAmC;IACjD,UAAU,EAAE,2CAA2C;IACvD,WAAW,EAAE,YAAY;CAC1B,CAAC;AACF,MAAM,gBAAgB,GAAmC;IACvD,UAAU,EAAE,iDAAiD;IAC7D,WAAW,EAAE,YAAY;CAC1B,CAAC;AACF,MAAM,sBAAsB,GAAwC;IAClE,UAAU,EAAE,OAAO;IACnB,WAAW,EAAE,OAAO;CACrB,CAAC;AAEW,QAAA,mBAAmB,GAAG,IAAA,aAAG,EACpC,CAAC,EACC,SAAS,EACT,WAAW,EACX,eAAe,GAAG,QAAQ,EAC1B,cAAc,EACd,OAAO,GAAG,UAAU,GACrB,EAAE,EAAE;IACH,MAAM,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,GAAG,IAAA,gBAAQ,EAAU,KAAK,CAAC,CAAC;IAE7E,MAAM,CAAC,QAAQ,EAAE,gBAAgB,CAAC,GAAG,IAAA,yBAAW,EAAC,eAAe,CAAC,CAAC;IAElE,MAAM,iBAAiB,GAAG,GAAG,EAAE;QAC7B,oBAAoB,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC,CAAC;IACF,MAAM,iBAAiB,GAAG,GAAG,EAAE;QAC7B,oBAAoB,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC,CAAC;IAEF,OAAO,CACL,iCAAK,SAAS,EAAE,qBAAqB,SAAS,IAAI,EAAE,EAAE,aACpD,uBAAC,iBAAO,IACN,SAAS,EAAC,MAAM,EAChB,IAAI,EAAE,IAAI,EACV,I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("@redneckz/uni-jsx");
|
|
|
5
5
|
const BlockVersion_1 = require("../../model/BlockVersion");
|
|
6
6
|
const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
|
|
7
7
|
const ButtonSection_1 = require("../../ui-kit/Button/ButtonSection");
|
|
8
|
-
const Img_1 = require("../../ui-kit/Img/Img");
|
|
9
8
|
const getTileRightPadding_1 = require("../BaseTile/getTileRightPadding");
|
|
10
9
|
const Headline_1 = require("../Headline/Headline");
|
|
10
|
+
const renderAdditionalDescription_1 = require("./renderAdditionalDescription");
|
|
11
|
+
const renderBenefit_1 = require("./renderBenefit");
|
|
12
|
+
const renderImage_1 = require("./renderImage");
|
|
11
13
|
exports.ProductTile = (0, uni_jsx_1.JSX)(({ className = '', title, headlineVersion = 'S', description, additionalDescription, benefits = [], buttons, image, isImageOnRightSide = true, version = 'primary', ...rest }) => ((0, jsx_runtime_1.jsxs)(BlockWrapper_1.BlockWrapper, { className: `overflow-hidden font-sans p-9 box-border relative min-h-[364px]
|
|
12
|
-
${BlockVersion_1.VersionStyleMap[version]} ${(0, getTileRightPadding_1.getTileRightPadding)(className)} ${className}`, ...rest, children: [(0, jsx_runtime_1.jsxs)("div", { className: `flex flex-col ${isImageOnRightSide ? '' : 'items-end'}`, children: [(0, jsx_runtime_1.jsx)(Headline_1.Headline, { className: `!p-0 !bg-transparent z-10 ${title || description ? 'mb-3.5' : ''}`, as: "h2", title: title, description: description, headlineVersion: headlineVersion, bgColorHeadline: version, align: "left", ...rest }), renderBenefits(benefits, version, image),
|
|
14
|
+
${BlockVersion_1.VersionStyleMap[version]} ${(0, getTileRightPadding_1.getTileRightPadding)(className)} ${className}`, ...rest, children: [(0, jsx_runtime_1.jsxs)("div", { className: `flex flex-col ${isImageOnRightSide ? '' : 'items-end'}`, children: [(0, jsx_runtime_1.jsx)(Headline_1.Headline, { className: `!p-0 !bg-transparent z-10 ${title || description ? 'mb-3.5' : ''}`, as: "h2", title: title, description: description, headlineVersion: headlineVersion, bgColorHeadline: version, align: "left", ...rest }), renderBenefits(benefits, version, image), (0, renderAdditionalDescription_1.renderAdditionalDescription)(additionalDescription, image), buttons?.length ? ((0, jsx_runtime_1.jsx)(ButtonSection_1.ButtonSection, { buttons: buttons, className: "mt-5 gap-4 z-10 text-l" })) : null] }), (0, renderImage_1.renderImage)(image, isImageOnRightSide)] })));
|
|
13
15
|
function renderBenefits(benefits, version, image) {
|
|
14
|
-
|
|
15
|
-
const BENEFITS_WIDTH = image?.src ? 'max-w-[calc(100%-186px)]' : '100%';
|
|
16
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: `z-10 grid grid-cols-[max-content_1fr] auto-rows-auto gap-x-6 gap-y-2.5 items-baseline
|
|
17
|
-
${BENEFITS_WIDTH}`, children: benefits.length ? benefits.map(renderBenefit(version)) : null }));
|
|
18
|
-
}
|
|
19
|
-
const renderBenefit = (version = 'primary') => (benefit, i) => {
|
|
20
|
-
const { label = '', description = '' } = benefit;
|
|
21
|
-
return [
|
|
22
|
-
(0, jsx_runtime_1.jsx)("div", { className: "text-h6", children: label }, `label-${i}`),
|
|
23
|
-
(0, jsx_runtime_1.jsx)("div", { className: `text-m-light ${BlockVersion_1.VersionAdditionalStyleMap[version]}`, children: description }, `desc-${i}`),
|
|
24
|
-
];
|
|
25
|
-
};
|
|
26
|
-
function renderAdditionalDescription(additionalDescription, image) {
|
|
27
|
-
// picture width = 242px. Text can overlay picture 20px deep. Outer paddings_x = 36px. 242-36-20 = 186px
|
|
28
|
-
const DESCRIPTION_WIDTH = image?.src ? 'max-w-[calc(100%-186px)]' : '100%';
|
|
29
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: `text-m-light mt-2.5 z-10 ${DESCRIPTION_WIDTH}`, children: additionalDescription }));
|
|
30
|
-
}
|
|
31
|
-
function renderImage(image, isImageOnRightSide) {
|
|
32
|
-
if (!image?.src) {
|
|
16
|
+
if (!benefits.length) {
|
|
33
17
|
return null;
|
|
34
18
|
}
|
|
35
|
-
|
|
19
|
+
// picture width = 242px. Text can overlay picture 20px deep. Outer paddings_x = 36px. 242-36-20 = 186px
|
|
20
|
+
const benefitsWidth = image?.src ? 'max-w-[calc(100%-186px)]' : '100%';
|
|
21
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: `z-10 grid grid-cols-[max-content_1fr] auto-rows-auto gap-x-6 gap-y-2.5 items-baseline
|
|
22
|
+
${benefitsWidth}`, children: benefits.length ? benefits.map((0, renderBenefit_1.renderBenefit)(version)) : null }));
|
|
36
23
|
}
|
|
37
24
|
//# sourceMappingURL=ProductTile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductTile.js","sourceRoot":"","sources":["../../../src/components/ProductTile/ProductTile.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,
|
|
1
|
+
{"version":3,"file":"ProductTile.js","sourceRoot":"","sources":["../../../src/components/ProductTile/ProductTile.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,2DAA2D;AAG3D,4DAAyD;AACzD,qEAAkE;AAClE,yEAAsE;AACtE,mDAAgD;AAEhD,+EAA4E;AAC5E,mDAAgD;AAChD,+CAA4C;AAI/B,QAAA,WAAW,GAAG,IAAA,aAAG,EAC5B,CAAC,EACC,SAAS,GAAG,EAAE,EACd,KAAK,EACL,eAAe,GAAG,GAAG,EACrB,WAAW,EACX,qBAAqB,EACrB,QAAQ,GAAG,EAAE,EACb,OAAO,EACP,KAAK,EACL,kBAAkB,GAAG,IAAI,EACzB,OAAO,GAAG,SAAS,EACnB,GAAG,IAAI,EACR,EAAE,EAAE,CAAC,CACJ,wBAAC,2BAAY,IACX,SAAS,EAAE;YACL,8BAAe,CAAC,OAAO,CAAC,IAAI,IAAA,yCAAmB,EAAC,SAAS,CAAC,IAAI,SAAS,EAAE,KAC3E,IAAI,aAER,iCAAK,SAAS,EAAE,iBAAiB,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,aACtE,uBAAC,mBAAQ,IACP,SAAS,EAAE,6BAA6B,KAAK,IAAI,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,EAC9E,EAAE,EAAC,IAAI,EACP,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,eAAe,EAChC,eAAe,EAAE,OAAO,EACxB,KAAK,EAAC,MAAM,KACR,IAAI,GACR,EACD,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,CAAC,EACxC,IAAA,yDAA2B,EAAC,qBAAqB,EAAE,KAAK,CAAC,EACzD,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CACjB,uBAAC,6BAAa,IAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAC,wBAAwB,GAAG,CACvE,CAAC,CAAC,CAAC,IAAI,IACJ,EACL,IAAA,yBAAW,EAAC,KAAK,EAAE,kBAAkB,CAAC,IAC1B,CAChB,CACF,CAAC;AAEF,SAAS,cAAc,CAAC,QAAmB,EAAE,OAAqB,EAAE,KAAe;IACjF,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;QACpB,OAAO,IAAI,CAAC;KACb;IAED,wGAAwG;IACxG,MAAM,aAAa,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,MAAM,CAAC;IAEvE,OAAO,CACL,gCACE,SAAS,EAAE;UACP,aAAa,EAAE,YAElB,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAA,6BAAa,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAC1D,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -2,7 +2,28 @@ import type { BlockVersion } from '../../model/BlockVersion';
|
|
|
2
2
|
import type { DescriptionProps, HeadlineProps, LabelProps } from '../../model/HeadlineType';
|
|
3
3
|
import type { Picture } from '../../model/Picture';
|
|
4
4
|
import type { ButtonContent } from '../../ui-kit/Button/ButtonProps';
|
|
5
|
-
|
|
5
|
+
import type { MarkdownTextProps } from '../../ui-kit/MarkdownText/MarkdownTextProps';
|
|
6
|
+
/**
|
|
7
|
+
* @title Стандартный
|
|
8
|
+
*/
|
|
9
|
+
declare type TextBenefit = DescriptionProps & LabelProps & {
|
|
10
|
+
/** @default default */
|
|
11
|
+
type: 'default';
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* @title Форматированный текст
|
|
15
|
+
*/
|
|
16
|
+
declare type MarkdownTextContent = MarkdownTextProps & {
|
|
17
|
+
/** @default md */
|
|
18
|
+
type: 'md';
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* @title Преимущество
|
|
22
|
+
* @default{
|
|
23
|
+
* "type": "default"
|
|
24
|
+
* }
|
|
25
|
+
*/
|
|
26
|
+
export declare type Benefit = TextBenefit | MarkdownTextContent;
|
|
6
27
|
/**
|
|
7
28
|
* @title Продуктовая плитка
|
|
8
29
|
*/
|
|
@@ -27,9 +48,10 @@ export declare type ProductTileContent = HeadlineProps & ButtonContent & {
|
|
|
27
48
|
* @title Преимущества
|
|
28
49
|
* @maxItems 7
|
|
29
50
|
*/
|
|
30
|
-
benefits?:
|
|
51
|
+
benefits?: Benefit[];
|
|
31
52
|
/** @title Дополнительное описание */
|
|
32
53
|
additionalDescription?: string;
|
|
33
54
|
/** @title Картинка справа/текст слева */
|
|
34
55
|
isImageOnRightSide?: boolean;
|
|
35
56
|
};
|
|
57
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
3
|
+
import type { Picture } from '../../model/Picture';
|
|
4
|
+
export declare function renderAdditionalDescription(additionalDescription?: string, image?: Picture, version?: BlockVersion): JSX.Element | null;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.renderAdditionalDescription = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const Paragraph_1 = require("../../ui-kit/Paragraph/Paragraph");
|
|
5
|
+
const DESCRIPTION_STYLE_MAP = {
|
|
6
|
+
primary: 'text-secondary-text',
|
|
7
|
+
secondary: 'text-white',
|
|
8
|
+
};
|
|
9
|
+
function renderAdditionalDescription(additionalDescription, image, version = 'primary') {
|
|
10
|
+
if (!additionalDescription) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
// picture width = 242px. Text can overlay picture 20px deep. Outer paddings_x = 36px. 242-36-20 = 186px
|
|
14
|
+
const descriptionWidth = image?.src ? 'max-w-[calc(100%-186px)]' : '100%';
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: `mt-2.5 z-10 ${descriptionWidth}`, children: (0, jsx_runtime_1.jsx)(Paragraph_1.Paragraph, { size: "text-m", font: "font-light", color: DESCRIPTION_STYLE_MAP[version], children: additionalDescription }) }));
|
|
16
|
+
}
|
|
17
|
+
exports.renderAdditionalDescription = renderAdditionalDescription;
|
|
18
|
+
//# sourceMappingURL=renderAdditionalDescription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderAdditionalDescription.js","sourceRoot":"","sources":["../../../src/components/ProductTile/renderAdditionalDescription.tsx"],"names":[],"mappings":";;;AAEA,gEAA6D;AAG7D,MAAM,qBAAqB,GAAoC;IAC7D,OAAO,EAAE,qBAAqB;IAC9B,SAAS,EAAE,YAAY;CACxB,CAAC;AAEF,SAAgB,2BAA2B,CACzC,qBAA8B,EAC9B,KAAe,EACf,UAAwB,SAAS;IAEjC,IAAI,CAAC,qBAAqB,EAAE;QAC1B,OAAO,IAAI,CAAC;KACb;IAED,wGAAwG;IACxG,MAAM,gBAAgB,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,MAAM,CAAC;IAE1E,OAAO,CACL,gCAAK,SAAS,EAAE,eAAe,gBAAgB,EAAE,YAC/C,uBAAC,qBAAS,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,YAAY,EAAC,KAAK,EAAE,qBAAqB,CAAC,OAAO,CAAC,YAC7E,qBAAqB,GACZ,GACR,CACP,CAAC;AACJ,CAAC;AAnBD,kEAmBC"}
|