@redneckz/wildless-cms-uni-blocks 0.6.23 → 0.6.24
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 +125 -137
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/BenefitsBlock/BenefitsBlockContent.d.ts +1 -1
- package/bundle/components/Header/DropdownMenu.d.ts +5 -7
- package/bundle/components/Header/HeaderSubMenuItem.d.ts +12 -0
- package/bundle/hooks/useIntersectionObserver.d.ts +3 -0
- package/bundle/hooks/useOutsideClick.d.ts +3 -5
- package/bundle/model/IconVersion.d.ts +4 -2
- package/bundle/ui-kit/TopItem/TopItem.d.ts +1 -1
- package/bundle/utils/getIconWithVersion.d.ts +3 -0
- package/dist/components/AccordionItem/AccordionItem.mobile.js +2 -1
- package/dist/components/AccordionItem/AccordionItem.mobile.js.map +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.js +7 -20
- package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlockContent.d.ts +1 -1
- package/dist/components/Calculator/Calculator.js +6 -1
- package/dist/components/Calculator/Calculator.js.map +1 -1
- package/dist/components/ComparisonTable/HeaderCell.js +2 -1
- package/dist/components/ComparisonTable/HeaderCell.js.map +1 -1
- package/dist/components/Footer/Footer.mobile.js +3 -2
- package/dist/components/Footer/Footer.mobile.js.map +1 -1
- package/dist/components/Footer/MediaButton.js +2 -1
- package/dist/components/Footer/MediaButton.js.map +1 -1
- package/dist/components/Gallery/GalleryCardInner.js +3 -2
- package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/dist/components/Header/DropdownMenu.d.ts +5 -7
- package/dist/components/Header/DropdownMenu.js +8 -7
- package/dist/components/Header/DropdownMenu.js.map +1 -1
- package/dist/components/Header/HeaderSubMenu.js +8 -21
- package/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/dist/components/Header/HeaderSubMenuItem.d.ts +12 -0
- package/dist/components/Header/HeaderSubMenuItem.js +23 -0
- package/dist/components/Header/HeaderSubMenuItem.js.map +1 -0
- package/dist/components/LinkDocs/LinkDocsListItemBase.js +2 -1
- package/dist/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.mobile.js +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.mobile.js.map +1 -1
- package/dist/components/OfficeServicesBlock/OfficeServicesBlock.js +2 -1
- package/dist/components/OfficeServicesBlock/OfficeServicesBlock.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/renderBenefit.js +1 -3
- package/dist/components/ProductBlock/renderBenefit.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.js +4 -3
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.mobile.js +2 -1
- package/dist/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/dist/components/TariffsTable/EmbeddableCellData.mobile.js +1 -0
- package/dist/components/TariffsTable/EmbeddableCellData.mobile.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableRow.js +2 -1
- package/dist/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/dist/hooks/useIntersectionObserver.d.ts +3 -0
- package/dist/hooks/useIntersectionObserver.js +19 -0
- package/dist/hooks/useIntersectionObserver.js.map +1 -0
- package/dist/hooks/useOutsideClick.d.ts +3 -5
- package/dist/hooks/useOutsideClick.js +11 -9
- package/dist/hooks/useOutsideClick.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/model/IconVersion.d.ts +4 -2
- package/dist/model/IconVersion.js +10 -0
- package/dist/model/IconVersion.js.map +1 -1
- package/dist/ui-kit/BenefitItem/BenefitItem.js +3 -4
- package/dist/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/dist/ui-kit/BlockWrapper.js +18 -26
- package/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/dist/ui-kit/Button/ButtonSection.js +5 -5
- package/dist/ui-kit/Button/ButtonSection.js.map +1 -1
- package/dist/ui-kit/HeaderItem/HeaderItem.js +1 -1
- package/dist/ui-kit/HeaderItem/HeaderItem.js.map +1 -1
- package/dist/ui-kit/Icon/Icon.js +4 -3
- package/dist/ui-kit/Icon/Icon.js.map +1 -1
- package/dist/ui-kit/Logo/Logo.js +1 -1
- package/dist/ui-kit/Logo/Logo.js.map +1 -1
- package/dist/ui-kit/Logo/Logo.mobile.js +5 -1
- package/dist/ui-kit/Logo/Logo.mobile.js.map +1 -1
- package/dist/ui-kit/Select/Select.js +2 -2
- package/dist/ui-kit/Select/Select.js.map +1 -1
- package/dist/ui-kit/TopItem/TopItem.d.ts +1 -1
- package/dist/utils/getIconWithVersion.d.ts +3 -0
- package/dist/utils/getIconWithVersion.js +8 -0
- package/dist/utils/getIconWithVersion.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/AccordionItem/AccordionItem.mobile.js +2 -1
- package/lib/components/AccordionItem/AccordionItem.mobile.js.map +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js +7 -20
- package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlockContent.d.ts +1 -1
- package/lib/components/Calculator/Calculator.js +6 -1
- package/lib/components/Calculator/Calculator.js.map +1 -1
- package/lib/components/ComparisonTable/HeaderCell.js +2 -1
- package/lib/components/ComparisonTable/HeaderCell.js.map +1 -1
- package/lib/components/Footer/Footer.mobile.js +3 -2
- package/lib/components/Footer/Footer.mobile.js.map +1 -1
- package/lib/components/Footer/MediaButton.js +2 -1
- package/lib/components/Footer/MediaButton.js.map +1 -1
- package/lib/components/Gallery/GalleryCardInner.js +3 -2
- package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/lib/components/Header/DropdownMenu.d.ts +5 -7
- package/lib/components/Header/DropdownMenu.js +8 -7
- package/lib/components/Header/DropdownMenu.js.map +1 -1
- package/lib/components/Header/HeaderSubMenu.js +8 -21
- package/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/lib/components/Header/HeaderSubMenuItem.d.ts +12 -0
- package/lib/components/Header/HeaderSubMenuItem.js +21 -0
- package/lib/components/Header/HeaderSubMenuItem.js.map +1 -0
- package/lib/components/LinkDocs/LinkDocsListItemBase.js +2 -1
- package/lib/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.mobile.js +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.mobile.js.map +1 -1
- package/lib/components/OfficeServicesBlock/OfficeServicesBlock.js +2 -1
- package/lib/components/OfficeServicesBlock/OfficeServicesBlock.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/renderBenefit.js +1 -3
- package/lib/components/ProductBlock/renderBenefit.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.js +4 -3
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.mobile.js +2 -1
- package/lib/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/lib/components/TariffsTable/EmbeddableCellData.mobile.js +1 -0
- package/lib/components/TariffsTable/EmbeddableCellData.mobile.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableRow.js +2 -1
- package/lib/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/lib/hooks/useIntersectionObserver.d.ts +3 -0
- package/lib/hooks/useIntersectionObserver.js +16 -0
- package/lib/hooks/useIntersectionObserver.js.map +1 -0
- package/lib/hooks/useOutsideClick.d.ts +3 -5
- package/lib/hooks/useOutsideClick.js +12 -10
- package/lib/hooks/useOutsideClick.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/model/IconVersion.d.ts +4 -2
- package/lib/model/IconVersion.js +10 -0
- package/lib/model/IconVersion.js.map +1 -1
- package/lib/ui-kit/BenefitItem/BenefitItem.js +3 -4
- package/lib/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/lib/ui-kit/BlockWrapper.js +18 -26
- package/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/lib/ui-kit/Button/ButtonSection.js +5 -5
- package/lib/ui-kit/Button/ButtonSection.js.map +1 -1
- package/lib/ui-kit/HeaderItem/HeaderItem.js +1 -1
- package/lib/ui-kit/HeaderItem/HeaderItem.js.map +1 -1
- package/lib/ui-kit/Icon/Icon.js +4 -3
- package/lib/ui-kit/Icon/Icon.js.map +1 -1
- package/lib/ui-kit/Logo/Logo.js +1 -1
- package/lib/ui-kit/Logo/Logo.js.map +1 -1
- package/lib/ui-kit/Logo/Logo.mobile.js +5 -1
- package/lib/ui-kit/Logo/Logo.mobile.js.map +1 -1
- package/lib/ui-kit/Select/Select.js +3 -3
- package/lib/ui-kit/Select/Select.js.map +1 -1
- package/lib/ui-kit/TopItem/TopItem.d.ts +1 -1
- package/lib/utils/getIconWithVersion.d.ts +3 -0
- package/lib/utils/getIconWithVersion.js +5 -0
- package/lib/utils/getIconWithVersion.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +64 -71
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/BenefitsBlock/BenefitsBlockContent.d.ts +1 -1
- package/mobile/bundle/components/Header/DropdownMenu.d.ts +5 -7
- package/mobile/bundle/components/Header/HeaderSubMenuItem.d.ts +12 -0
- package/mobile/bundle/hooks/useIntersectionObserver.d.ts +3 -0
- package/mobile/bundle/hooks/useOutsideClick.d.ts +3 -5
- package/mobile/bundle/model/IconVersion.d.ts +4 -2
- package/mobile/bundle/ui-kit/TopItem/TopItem.d.ts +1 -1
- package/mobile/bundle/utils/getIconWithVersion.d.ts +3 -0
- package/mobile/dist/components/AccordionItem/AccordionItem.js +2 -1
- package/mobile/dist/components/AccordionItem/AccordionItem.js.map +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +7 -20
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlockContent.d.ts +1 -1
- package/mobile/dist/components/Calculator/Calculator.js +6 -1
- package/mobile/dist/components/Calculator/Calculator.js.map +1 -1
- package/mobile/dist/components/Footer/Footer.js +3 -2
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/dist/components/Footer/MediaButton.js +2 -1
- package/mobile/dist/components/Footer/MediaButton.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryCardInner.js +3 -2
- package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/dist/components/Header/DropdownMenu.d.ts +5 -7
- package/mobile/dist/components/Header/DropdownMenu.js +8 -7
- package/mobile/dist/components/Header/DropdownMenu.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSubMenu.js +8 -21
- package/mobile/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSubMenuItem.d.ts +12 -0
- package/mobile/dist/components/Header/HeaderSubMenuItem.js +23 -0
- package/mobile/dist/components/Header/HeaderSubMenuItem.js.map +1 -0
- package/mobile/dist/components/LinkDocs/LinkDocsListItemBase.js +2 -1
- package/mobile/dist/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
- package/mobile/dist/components/MobileAppTile/MobileAppTile.js +1 -1
- package/mobile/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/mobile/dist/components/OfficeServicesBlock/OfficeServicesBlock.js +2 -1
- package/mobile/dist/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -1
- package/mobile/dist/components/ProductBlock/renderBenefit.js +1 -3
- package/mobile/dist/components/ProductBlock/renderBenefit.js.map +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlock.js +2 -1
- package/mobile/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/dist/components/TariffsTable/EmbeddableCellData.js +1 -0
- package/mobile/dist/components/TariffsTable/EmbeddableCellData.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableRow.js +2 -1
- package/mobile/dist/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/mobile/dist/hooks/useIntersectionObserver.d.ts +3 -0
- package/mobile/dist/hooks/useIntersectionObserver.js +19 -0
- package/mobile/dist/hooks/useIntersectionObserver.js.map +1 -0
- package/mobile/dist/hooks/useOutsideClick.d.ts +3 -5
- package/mobile/dist/hooks/useOutsideClick.js +11 -9
- package/mobile/dist/hooks/useOutsideClick.js.map +1 -1
- package/mobile/dist/index.js +1 -1
- package/mobile/dist/index.js.map +1 -1
- package/mobile/dist/model/IconVersion.d.ts +4 -2
- package/mobile/dist/model/IconVersion.js +10 -0
- package/mobile/dist/model/IconVersion.js.map +1 -1
- package/mobile/dist/ui-kit/BenefitItem/BenefitItem.js +3 -4
- package/mobile/dist/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/mobile/dist/ui-kit/BlockWrapper.js +18 -26
- package/mobile/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/dist/ui-kit/Button/ButtonSection.js +5 -5
- package/mobile/dist/ui-kit/Button/ButtonSection.js.map +1 -1
- package/mobile/dist/ui-kit/Icon/Icon.js +4 -3
- package/mobile/dist/ui-kit/Icon/Icon.js.map +1 -1
- package/mobile/dist/ui-kit/Logo/Logo.js +5 -1
- package/mobile/dist/ui-kit/Logo/Logo.js.map +1 -1
- package/mobile/dist/ui-kit/Select/Select.js +2 -2
- package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
- package/mobile/dist/ui-kit/TopItem/TopItem.d.ts +1 -1
- package/mobile/dist/utils/getIconWithVersion.d.ts +3 -0
- package/mobile/dist/utils/getIconWithVersion.js +8 -0
- package/mobile/dist/utils/getIconWithVersion.js.map +1 -0
- package/mobile/lib/components/AccordionItem/AccordionItem.js +2 -1
- package/mobile/lib/components/AccordionItem/AccordionItem.js.map +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +7 -20
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlockContent.d.ts +1 -1
- package/mobile/lib/components/Calculator/Calculator.js +6 -1
- package/mobile/lib/components/Calculator/Calculator.js.map +1 -1
- package/mobile/lib/components/Footer/Footer.js +3 -2
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/components/Footer/MediaButton.js +2 -1
- package/mobile/lib/components/Footer/MediaButton.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryCardInner.js +3 -2
- package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/lib/components/Header/DropdownMenu.d.ts +5 -7
- package/mobile/lib/components/Header/DropdownMenu.js +8 -7
- package/mobile/lib/components/Header/DropdownMenu.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSubMenu.js +8 -21
- package/mobile/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSubMenuItem.d.ts +12 -0
- package/mobile/lib/components/Header/HeaderSubMenuItem.js +21 -0
- package/mobile/lib/components/Header/HeaderSubMenuItem.js.map +1 -0
- package/mobile/lib/components/LinkDocs/LinkDocsListItemBase.js +2 -1
- package/mobile/lib/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
- package/mobile/lib/components/MobileAppTile/MobileAppTile.js +1 -1
- package/mobile/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/mobile/lib/components/OfficeServicesBlock/OfficeServicesBlock.js +2 -1
- package/mobile/lib/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -1
- package/mobile/lib/components/ProductBlock/renderBenefit.js +1 -3
- package/mobile/lib/components/ProductBlock/renderBenefit.js.map +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlock.js +2 -1
- package/mobile/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/lib/components/TariffsTable/EmbeddableCellData.js +1 -0
- package/mobile/lib/components/TariffsTable/EmbeddableCellData.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableRow.js +2 -1
- package/mobile/lib/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/mobile/lib/hooks/useIntersectionObserver.d.ts +3 -0
- package/mobile/lib/hooks/useIntersectionObserver.js +16 -0
- package/mobile/lib/hooks/useIntersectionObserver.js.map +1 -0
- package/mobile/lib/hooks/useOutsideClick.d.ts +3 -5
- package/mobile/lib/hooks/useOutsideClick.js +12 -10
- package/mobile/lib/hooks/useOutsideClick.js.map +1 -1
- package/mobile/lib/index.js +1 -1
- package/mobile/lib/index.js.map +1 -1
- package/mobile/lib/model/IconVersion.d.ts +4 -2
- package/mobile/lib/model/IconVersion.js +10 -0
- package/mobile/lib/model/IconVersion.js.map +1 -1
- package/mobile/lib/ui-kit/BenefitItem/BenefitItem.js +3 -4
- package/mobile/lib/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/mobile/lib/ui-kit/BlockWrapper.js +18 -26
- package/mobile/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/lib/ui-kit/Button/ButtonSection.js +5 -5
- package/mobile/lib/ui-kit/Button/ButtonSection.js.map +1 -1
- package/mobile/lib/ui-kit/Icon/Icon.js +4 -3
- package/mobile/lib/ui-kit/Icon/Icon.js.map +1 -1
- package/mobile/lib/ui-kit/Logo/Logo.js +5 -1
- package/mobile/lib/ui-kit/Logo/Logo.js.map +1 -1
- package/mobile/lib/ui-kit/Select/Select.js +3 -3
- package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
- package/mobile/lib/ui-kit/TopItem/TopItem.d.ts +1 -1
- package/mobile/lib/utils/getIconWithVersion.d.ts +3 -0
- package/mobile/lib/utils/getIconWithVersion.js +5 -0
- package/mobile/lib/utils/getIconWithVersion.js.map +1 -0
- package/mobile/src/components/AccordionItem/AccordionItem.tsx +15 -2
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +44 -66
- package/mobile/src/components/BenefitsBlock/BenefitsBlockContent.ts +1 -1
- package/mobile/src/components/Calculator/Calculator.tsx +6 -1
- package/mobile/src/components/Footer/Footer.tsx +15 -5
- package/mobile/src/components/Footer/MediaButton.tsx +8 -1
- package/mobile/src/components/Gallery/Gallery.tsx +1 -1
- package/mobile/src/components/Gallery/GalleryCardInner.tsx +8 -3
- package/mobile/src/components/Header/DropdownMenu.tsx +46 -63
- package/mobile/src/components/Header/HeaderSubMenu.tsx +21 -40
- package/mobile/src/components/Header/HeaderSubMenuItem.tsx +61 -0
- package/mobile/src/components/LinkDocs/LinkDocsListItemBase.tsx +8 -1
- package/mobile/src/components/MobileAppTile/MobileAppTile.tsx +1 -1
- package/mobile/src/components/OfficeServicesBlock/OfficeServicesBlock.tsx +2 -1
- package/mobile/src/components/ProductBlock/renderBenefit.tsx +2 -3
- package/mobile/src/components/StepsBlock/StepsBlock.tsx +2 -1
- package/mobile/src/components/TariffsTable/EmbeddableCellData.tsx +1 -1
- package/mobile/src/components/TariffsTable/TariffsTableRow.tsx +2 -1
- package/mobile/src/hooks/useIntersectionObserver.ts +23 -0
- package/mobile/src/hooks/useOutsideClick.ts +13 -13
- package/mobile/src/index.ts +1 -1
- package/mobile/src/model/IconVersion.ts +5 -2
- package/mobile/src/ui-kit/BenefitItem/BenefitItem.tsx +3 -8
- package/mobile/src/ui-kit/BlockWrapper.tsx +27 -42
- package/mobile/src/ui-kit/Button/ButtonSection.tsx +5 -12
- package/mobile/src/ui-kit/Icon/Icon.tsx +4 -3
- package/mobile/src/ui-kit/Logo/Logo.tsx +10 -2
- package/mobile/src/ui-kit/Select/Select.tsx +3 -4
- package/mobile/src/ui-kit/TopItem/TopItem.tsx +1 -1
- package/mobile/src/utils/getIconWithVersion.ts +7 -0
- package/package.json +1 -1
- package/src/components/AccordionItem/AccordionItem.mobile.tsx +15 -2
- package/src/components/BenefitsBlock/BenefitsBlock.fixture.tsx +6 -6
- package/src/components/BenefitsBlock/BenefitsBlock.tsx +44 -66
- package/src/components/BenefitsBlock/BenefitsBlockContent.ts +1 -1
- package/src/components/Calculator/Calculator.tsx +6 -1
- package/src/components/ComparisonTable/HeaderCell.tsx +3 -1
- package/src/components/Footer/Footer.mobile.tsx +15 -5
- package/src/components/Footer/MediaButton.tsx +8 -1
- package/src/components/Gallery/Gallery.fixture.tsx +1 -0
- package/src/components/Gallery/Gallery.mobile.tsx +1 -1
- package/src/components/Gallery/GalleryCardInner.tsx +8 -3
- package/src/components/Header/DropdownMenu.tsx +46 -63
- package/src/components/Header/HeaderSubMenu.tsx +21 -40
- package/src/components/Header/HeaderSubMenuItem.tsx +61 -0
- package/src/components/LinkDocs/LinkDocsListItemBase.tsx +8 -1
- package/src/components/MobileAppTile/MobileAppTile.mobile.tsx +1 -1
- package/src/components/OfficeServicesBlock/OfficeServicesBlock.tsx +2 -1
- package/src/components/ProductBlock/ProductBlock.fixture.tsx +3 -1
- package/src/components/ProductBlock/ProductBlockInner.tsx +1 -1
- package/src/components/ProductBlock/renderBenefit.tsx +2 -3
- package/src/components/StepsBlock/StepsBlock.fixture.mobile.tsx +4 -4
- package/src/components/StepsBlock/StepsBlock.fixture.tsx +4 -3
- package/src/components/StepsBlock/StepsBlock.mobile.tsx +2 -1
- package/src/components/StepsBlock/StepsBlock.tsx +5 -3
- package/src/components/TariffsTable/EmbeddableCellData.mobile.tsx +1 -1
- package/src/components/TariffsTable/TariffsTableRow.tsx +2 -1
- package/src/hooks/useIntersectionObserver.ts +23 -0
- package/src/hooks/useOutsideClick.ts +13 -13
- package/src/index.ts +1 -1
- package/src/model/IconVersion.ts +5 -2
- package/src/ui-kit/BenefitItem/BenefitItem.tsx +3 -8
- package/src/ui-kit/BlockWrapper.tsx +27 -42
- package/src/ui-kit/Button/ButtonSection.tsx +5 -12
- package/src/ui-kit/HeaderItem/HeaderItem.tsx +3 -3
- package/src/ui-kit/Icon/Icon.tsx +4 -3
- package/src/ui-kit/Logo/Logo.mobile.tsx +10 -2
- package/src/ui-kit/Logo/Logo.tsx +1 -1
- package/src/ui-kit/Select/Select.tsx +3 -4
- package/src/ui-kit/TopItem/TopItem.tsx +1 -1
- package/src/utils/getIconWithVersion.ts +7 -0
- package/bundle/ui-kit/IntersectionObserverTag.d.ts +0 -12
- package/dist/ui-kit/IntersectionObserverTag.d.ts +0 -12
- package/dist/ui-kit/IntersectionObserverTag.js +0 -22
- package/dist/ui-kit/IntersectionObserverTag.js.map +0 -1
- package/lib/ui-kit/IntersectionObserverTag.d.ts +0 -12
- package/lib/ui-kit/IntersectionObserverTag.js +0 -20
- package/lib/ui-kit/IntersectionObserverTag.js.map +0 -1
- package/mobile/bundle/ui-kit/IntersectionObserverTag.d.ts +0 -12
- package/mobile/dist/ui-kit/IntersectionObserverTag.d.ts +0 -12
- package/mobile/dist/ui-kit/IntersectionObserverTag.js +0 -22
- package/mobile/dist/ui-kit/IntersectionObserverTag.js.map +0 -1
- package/mobile/lib/ui-kit/IntersectionObserverTag.d.ts +0 -12
- package/mobile/lib/ui-kit/IntersectionObserverTag.js +0 -20
- package/mobile/lib/ui-kit/IntersectionObserverTag.js.map +0 -1
- package/mobile/src/ui-kit/IntersectionObserverTag.tsx +0 -47
- package/src/ui-kit/IntersectionObserverTag.tsx +0 -47
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
+
import { useIntersectionObserver } from '../../hooks/useIntersectionObserver';
|
|
4
|
+
import { useLink } from '../../hooks/useLink';
|
|
5
|
+
import type { BgColorVersion } from '../../model/BgColorVersion';
|
|
6
|
+
import type { LinkProps } from '../../model/LinkProps';
|
|
7
|
+
import { HeaderItem } from '../../ui-kit/HeaderItem/HeaderItem';
|
|
8
|
+
import type { ContentPageContext } from '../ContentPage/ContentPageContext';
|
|
9
|
+
|
|
10
|
+
export interface HeaderSubMenuItemProps extends LinkProps {
|
|
11
|
+
context: ContentPageContext;
|
|
12
|
+
className?: string;
|
|
13
|
+
active?: boolean;
|
|
14
|
+
bgColor?: BgColorVersion;
|
|
15
|
+
observerOptions?: IntersectionObserverInit;
|
|
16
|
+
onVisibilityChange?: (isIntersecting: boolean) => void;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const HeaderSubMenuItem = JSX<HeaderSubMenuItemProps>(
|
|
20
|
+
({
|
|
21
|
+
context,
|
|
22
|
+
className,
|
|
23
|
+
active,
|
|
24
|
+
bgColor,
|
|
25
|
+
observerOptions,
|
|
26
|
+
onVisibilityChange,
|
|
27
|
+
children,
|
|
28
|
+
...linkProps
|
|
29
|
+
}) => {
|
|
30
|
+
const { handlerDecorator } = context;
|
|
31
|
+
const router = context.useRouter();
|
|
32
|
+
|
|
33
|
+
const observerCallback = useCallback(
|
|
34
|
+
(entries: IntersectionObserverEntry[]) => {
|
|
35
|
+
if (!entries.length || !onVisibilityChange) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Assumption about entries order (by time)
|
|
40
|
+
const entry = entries[entries.length - 1];
|
|
41
|
+
|
|
42
|
+
onVisibilityChange(entry.isIntersecting);
|
|
43
|
+
},
|
|
44
|
+
[onVisibilityChange],
|
|
45
|
+
);
|
|
46
|
+
const ref = useIntersectionObserver<HTMLSpanElement>(observerCallback, observerOptions);
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<span ref={ref}>
|
|
50
|
+
<HeaderItem
|
|
51
|
+
className={className}
|
|
52
|
+
active={active}
|
|
53
|
+
bgColor={bgColor}
|
|
54
|
+
{...useLink({ router, handlerDecorator }, linkProps)}
|
|
55
|
+
>
|
|
56
|
+
{children}
|
|
57
|
+
</HeaderItem>
|
|
58
|
+
</span>
|
|
59
|
+
);
|
|
60
|
+
},
|
|
61
|
+
);
|
|
@@ -2,6 +2,7 @@ import { JSX } from '@redneckz/uni-jsx';
|
|
|
2
2
|
import { Img } from '../../ui-kit/Img/Img';
|
|
3
3
|
import type { LinkDocsItem } from './LinkDocsContent';
|
|
4
4
|
import type { Picture } from '../../model/Picture';
|
|
5
|
+
import { getIconWithVersion } from '../../utils/getIconWithVersion';
|
|
5
6
|
|
|
6
7
|
export interface LinkDocsListItemProps {
|
|
7
8
|
className?: string;
|
|
@@ -22,7 +23,13 @@ export const LinkDocsListItemBase = JSX<LinkDocsListItemBaseProps>(
|
|
|
22
23
|
return (
|
|
23
24
|
<a className={className} role="link" {...linkProps}>
|
|
24
25
|
{icon ? (
|
|
25
|
-
<Img
|
|
26
|
+
<Img
|
|
27
|
+
className={iconClassName}
|
|
28
|
+
image={getIconWithVersion(icon)}
|
|
29
|
+
width="24px"
|
|
30
|
+
height="24px"
|
|
31
|
+
asSVG
|
|
32
|
+
/>
|
|
26
33
|
) : null}
|
|
27
34
|
{text ? (
|
|
28
35
|
<span className={textClassName}>
|
|
@@ -15,7 +15,7 @@ export const MobileAppTile = JSX<MobileAppTileProps>(
|
|
|
15
15
|
{href ? (
|
|
16
16
|
<div className="flex">
|
|
17
17
|
<div className="flex justify-center align-middle rounded-md bg-primary-main w-[50px] h-[50px]">
|
|
18
|
-
<Logo className="w-
|
|
18
|
+
<Logo className="w-8" bgColor="transparent" showTitle />
|
|
19
19
|
</div>
|
|
20
20
|
<a href={href} target="_blank" className="flex flex-col justify-center pl-3">
|
|
21
21
|
<div className="text-s font-medium mb-[3px]">{title}</div>
|
|
@@ -7,6 +7,7 @@ import type {
|
|
|
7
7
|
OfficeServicesBlockContent,
|
|
8
8
|
OfficeServicesBlockList,
|
|
9
9
|
} from './OfficeServicesBlockContent';
|
|
10
|
+
import { getIconWithVersion } from '../../utils/getIconWithVersion';
|
|
10
11
|
|
|
11
12
|
export interface OfficeServicesBlockProps extends OfficeServicesBlockContent, UniBlockProps {}
|
|
12
13
|
|
|
@@ -36,7 +37,7 @@ const renderListItems = (itemList: OfficeServicesBlockList, i: number) => (
|
|
|
36
37
|
width="24"
|
|
37
38
|
height="24"
|
|
38
39
|
asSVG
|
|
39
|
-
image={itemList.icon}
|
|
40
|
+
image={getIconWithVersion(itemList.icon)}
|
|
40
41
|
/>
|
|
41
42
|
) : null}
|
|
42
43
|
{itemList.label ? <span className="text-l-light">{itemList.label}</span> : null}
|
|
@@ -5,8 +5,8 @@ import { BenefitItem } from '../../ui-kit/BenefitItem/BenefitItem';
|
|
|
5
5
|
|
|
6
6
|
export const renderBenefit =
|
|
7
7
|
(version: BlockVersion = 'primary', benefitsVersion: IconVersion = 'normal') =>
|
|
8
|
-
({ icon, label, description }: BenefitItemProps, i: number) =>
|
|
9
|
-
|
|
8
|
+
({ icon, label, description }: BenefitItemProps, i: number) =>
|
|
9
|
+
(
|
|
10
10
|
<BenefitItem
|
|
11
11
|
key={String(i)}
|
|
12
12
|
icon={icon}
|
|
@@ -16,4 +16,3 @@ export const renderBenefit =
|
|
|
16
16
|
benefitsVersion={benefitsVersion}
|
|
17
17
|
/>
|
|
18
18
|
);
|
|
19
|
-
};
|
|
@@ -8,6 +8,7 @@ import { Img } from '../../ui-kit/Img/Img';
|
|
|
8
8
|
import { checkIsIconRenderable } from '../../utils/checkIsIconRenderable';
|
|
9
9
|
import type { Step, StepsBlockContent } from './StepsBlockContent';
|
|
10
10
|
import { STEPS_BLOCK_STYLE_MAPS } from './StepsBlockStyleMaps';
|
|
11
|
+
import { getIconWithVersion } from '../../utils/getIconWithVersion';
|
|
11
12
|
|
|
12
13
|
export interface StepsBlockProps extends StepsBlockContent, UniBlockProps {}
|
|
13
14
|
|
|
@@ -112,7 +113,7 @@ const renderIconArea = (size: SizeVersion, version: BlockVersion) => (step: Step
|
|
|
112
113
|
<span className={`font-medium flex self-center ${styleMap.title} ${iconTextSize}`}>
|
|
113
114
|
{checkIsIconRenderable(step?.icon) ? (
|
|
114
115
|
<Img
|
|
115
|
-
image={{ ...step.icon,
|
|
116
|
+
image={getIconWithVersion({ ...step.icon }, version)}
|
|
116
117
|
width={iconSize}
|
|
117
118
|
height={iconSize}
|
|
118
119
|
asSVG
|
|
@@ -19,11 +19,11 @@ const renderButtonsCellData = ({ buttons }: ButtonContent) =>
|
|
|
19
19
|
renderButton({
|
|
20
20
|
button: { rounded, icon, ...buttonProps },
|
|
21
21
|
buttonClassName: `mt-3 ${idx > 0 && rounded ? 'ml-2.5' : ''} ${icon ? 'w-12 h-12' : ''}`,
|
|
22
|
+
index: idx,
|
|
22
23
|
}),
|
|
23
24
|
)}
|
|
24
25
|
</div>
|
|
25
26
|
) : null;
|
|
26
|
-
|
|
27
27
|
const renderLabelDescriptionCellData = ({ label, description }: LabelDescriptionCell) => {
|
|
28
28
|
const labelClassName = `text-xl font-medium m-0 ${description ? 'mb-1' : ''}`;
|
|
29
29
|
|
|
@@ -8,6 +8,7 @@ import { COLUMN_WIDTH, DIVIDER_CLASSES, FIRST_CELL_CLASSES } from './constants';
|
|
|
8
8
|
import { TariffsTableCell } from './TariffsTableCell';
|
|
9
9
|
import type { Data } from './TariffsTableContent';
|
|
10
10
|
import { TariffsTableRowContainer } from './TariffsTableRowContainer';
|
|
11
|
+
import { getIconWithVersion } from '../../utils/getIconWithVersion';
|
|
11
12
|
|
|
12
13
|
export interface TariffsTableRowProps extends UniBlockProps {
|
|
13
14
|
row: Data;
|
|
@@ -33,7 +34,7 @@ export const TariffsTableRow = JSX<TariffsTableRowProps>(
|
|
|
33
34
|
{header?.icon ? (
|
|
34
35
|
<Img
|
|
35
36
|
className="mr-[14px] max-w-6 max-h-6"
|
|
36
|
-
image={header.icon}
|
|
37
|
+
image={getIconWithVersion(header.icon)}
|
|
37
38
|
width="24px"
|
|
38
39
|
height="24px"
|
|
39
40
|
asSVG
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useEffect, useRef } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
|
+
|
|
3
|
+
export function useIntersectionObserver<R extends Element>(
|
|
4
|
+
observerCallback: IntersectionObserverCallback,
|
|
5
|
+
observerOptions?: IntersectionObserverInit,
|
|
6
|
+
) {
|
|
7
|
+
const ref = useRef<R | null>(null);
|
|
8
|
+
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
if (!ref.current) {
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const intersectionObserver = new IntersectionObserver(observerCallback, observerOptions);
|
|
15
|
+
intersectionObserver.observe(ref.current);
|
|
16
|
+
|
|
17
|
+
return () => {
|
|
18
|
+
intersectionObserver.disconnect();
|
|
19
|
+
};
|
|
20
|
+
}, [observerCallback, observerOptions]);
|
|
21
|
+
|
|
22
|
+
return ref;
|
|
23
|
+
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { useEffect } from '@redneckz/uni-jsx/lib/hooks';
|
|
1
|
+
import { useEffect, useRef } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
3
|
+
export function useOutsideClick<R extends Node>(onClick: () => void) {
|
|
4
|
+
const targetRef = useRef<R | null>(null);
|
|
6
5
|
|
|
7
|
-
export function useOutsideClick(wrapperRef: Ref, setIsOpen: (_: boolean) => void) {
|
|
8
6
|
useEffect(() => {
|
|
9
|
-
|
|
7
|
+
const handleClickOutside = (event: { target?: any }) => {
|
|
10
8
|
if (
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
event.target instanceof
|
|
14
|
-
!
|
|
9
|
+
targetRef &&
|
|
10
|
+
targetRef.current &&
|
|
11
|
+
event.target instanceof Node &&
|
|
12
|
+
!targetRef.current.contains(event.target)
|
|
15
13
|
) {
|
|
16
|
-
|
|
14
|
+
onClick();
|
|
17
15
|
}
|
|
18
|
-
}
|
|
16
|
+
};
|
|
19
17
|
document.addEventListener('click', handleClickOutside);
|
|
20
18
|
|
|
21
19
|
return () => {
|
|
22
20
|
document.removeEventListener('click', handleClickOutside);
|
|
23
21
|
};
|
|
24
|
-
}, []);
|
|
22
|
+
}, [onClick]);
|
|
23
|
+
|
|
24
|
+
return targetRef;
|
|
25
25
|
}
|
package/mobile/src/index.ts
CHANGED
|
@@ -7,4 +7,4 @@ export { ContentPage } from './components/ContentPage/ContentPage';
|
|
|
7
7
|
export { projectSettings } from './ProjectSettings';
|
|
8
8
|
export { joinList } from './utils/joinList';
|
|
9
9
|
export * as url from './utils/url';
|
|
10
|
-
export const packageVersion = process?.env?.UNI_BLOCKS_VERSION;
|
|
10
|
+
export const packageVersion = globalThis.process?.env?.UNI_BLOCKS_VERSION;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @title Цвет иконки
|
|
3
|
+
* @default normal
|
|
3
4
|
* @enumNames [
|
|
4
|
-
* "
|
|
5
|
+
* "по умолчанию",
|
|
6
|
+
* "Цветной",
|
|
5
7
|
* "Белый",
|
|
6
8
|
* "Чёрный"
|
|
7
9
|
* ]
|
|
8
10
|
*/
|
|
9
|
-
|
|
11
|
+
|
|
12
|
+
export type IconVersion = 'normal' | 'color' | 'white' | 'black';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
3
3
|
import type { IconVersion } from '../../model/IconVersion';
|
|
4
|
-
import type { Picture } from '../../model/Picture';
|
|
5
4
|
import { Img } from '../Img/Img';
|
|
6
5
|
import type { BenefitItemCommonProps, BenefitItemProps } from './BenefitItemProps';
|
|
6
|
+
import { getIconWithVersion } from '../../utils/getIconWithVersion';
|
|
7
7
|
|
|
8
8
|
export interface BenefitGeneralProps extends BenefitItemProps, BenefitItemCommonProps {}
|
|
9
9
|
|
|
@@ -25,16 +25,14 @@ export const BenefitItem = JSX<BenefitGeneralProps>((props) => {
|
|
|
25
25
|
version = 'primary',
|
|
26
26
|
benefitsVersion = 'normal',
|
|
27
27
|
} = props;
|
|
28
|
-
|
|
29
|
-
const isIconWhite = benefitsVersion === 'white' || version === 'secondary';
|
|
30
28
|
const listItemAlign = description ? 'items-start' : 'items-center';
|
|
31
|
-
const
|
|
29
|
+
const calcVersion = benefitsVersion === 'white' ? 'secondary' : 'primary';
|
|
32
30
|
|
|
33
31
|
return (
|
|
34
32
|
<div className={`flex gap-5 ${listItemAlign} ${className}`}>
|
|
35
33
|
{icon ? (
|
|
36
34
|
<div className={renderBenefitIconBgStyle(version, benefitsVersion)}>
|
|
37
|
-
<Img className="w-6 h-6" image={
|
|
35
|
+
<Img className="w-6 h-6" image={getIconWithVersion(icon, calcVersion)} asSVG />
|
|
38
36
|
</div>
|
|
39
37
|
) : null}
|
|
40
38
|
<div className="gap-0.5">
|
|
@@ -58,6 +56,3 @@ function renderBenefitIconBgStyle(version: BlockVersion, benefitsVersion: IconVe
|
|
|
58
56
|
|
|
59
57
|
return `w-[50px] h-[50px] min-w-[50px] rounded-full p-2.5 box-border flex items-center justify-center ${bgColorStyle}`;
|
|
60
58
|
}
|
|
61
|
-
|
|
62
|
-
const getIconVersion = (isIconWhite: boolean, icon?: Picture) =>
|
|
63
|
-
icon?.iconVersion || isIconWhite ? 'white' : 'normal';
|
|
@@ -2,9 +2,9 @@ import { JSX } from '@redneckz/uni-jsx';
|
|
|
2
2
|
import { useEffect, useMemo, useRef, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import type { AnchorClickScrollingEvent } from '../components/Tabs/Tabs';
|
|
4
4
|
import { EventBus } from '../EventBus/EventBus';
|
|
5
|
+
import { useIntersectionObserver } from '../hooks/useIntersectionObserver';
|
|
5
6
|
import type { UniBlockProps } from '../model/JSXBlock';
|
|
6
7
|
import { changeHashOnObserve } from '../utils/changeHashOnObserve';
|
|
7
|
-
import { IntersectionObserverTag } from './IntersectionObserverTag';
|
|
8
8
|
|
|
9
9
|
interface BlockWrapperProps extends UniBlockProps, Record<string, any> {
|
|
10
10
|
anchor?: string;
|
|
@@ -24,57 +24,42 @@ export const BlockWrapper = JSX<BlockWrapperProps>(
|
|
|
24
24
|
({ anchor, className, children, tag = 'section', labels, role }) => {
|
|
25
25
|
const Tag: any = tag;
|
|
26
26
|
|
|
27
|
-
const [
|
|
27
|
+
const [isVisible, setVisible] = useState(true);
|
|
28
28
|
const anchorClickRef = useRef<AnchorClickScrollingEvent>({});
|
|
29
29
|
|
|
30
30
|
const observerCallback = useMemo(
|
|
31
31
|
() => changeHashOnObserve({ anchor, anchorClickRef }),
|
|
32
32
|
[anchor],
|
|
33
33
|
);
|
|
34
|
+
const ref = useIntersectionObserver(observerCallback, OBSERVER_OPTIONS);
|
|
34
35
|
|
|
35
|
-
useEffect(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}, []);
|
|
57
|
-
|
|
58
|
-
if (!shouldRenderBlock) {
|
|
59
|
-
return null;
|
|
60
|
-
}
|
|
36
|
+
useEffect(
|
|
37
|
+
() =>
|
|
38
|
+
EventBus.inst.subscribe('anchorClick', (e) => {
|
|
39
|
+
setVisible(true);
|
|
40
|
+
anchorClickRef.current = e;
|
|
41
|
+
}),
|
|
42
|
+
[],
|
|
43
|
+
);
|
|
44
|
+
useEffect(
|
|
45
|
+
() =>
|
|
46
|
+
EventBus.inst.subscribe('tab', (event) => {
|
|
47
|
+
if (event.type === 'group') {
|
|
48
|
+
const hasSettings = labels?.length || anchor;
|
|
49
|
+
setVisible(event.label ? !hasSettings || Boolean(labels?.includes(event.label)) : true);
|
|
50
|
+
} else {
|
|
51
|
+
changeHash(event.label);
|
|
52
|
+
setVisible(true);
|
|
53
|
+
}
|
|
54
|
+
}),
|
|
55
|
+
[],
|
|
56
|
+
);
|
|
61
57
|
|
|
62
|
-
return
|
|
63
|
-
<
|
|
64
|
-
tag={tag}
|
|
65
|
-
className={className}
|
|
66
|
-
observerCallback={observerCallback}
|
|
67
|
-
observerOptions={OBSERVER_OPTIONS}
|
|
68
|
-
anchor={anchor}
|
|
69
|
-
role={role}
|
|
70
|
-
>
|
|
71
|
-
{children}
|
|
72
|
-
</IntersectionObserverTag>
|
|
73
|
-
) : (
|
|
74
|
-
<Tag className={className} role={role}>
|
|
58
|
+
return isVisible ? (
|
|
59
|
+
<Tag className={className} role={role} {...(anchor ? { id: anchor, ref } : {})}>
|
|
75
60
|
{children}
|
|
76
61
|
</Tag>
|
|
77
|
-
);
|
|
62
|
+
) : null;
|
|
78
63
|
},
|
|
79
64
|
);
|
|
80
65
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useLink } from '../../hooks/useLink';
|
|
3
|
-
import type { IconVersion } from '../../model/IconVersion';
|
|
4
3
|
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
5
4
|
import type { Picture } from '../../model/Picture';
|
|
6
5
|
import { Img } from '../Img/Img';
|
|
@@ -14,12 +13,6 @@ interface RenderButtonProps {
|
|
|
14
13
|
buttonClassName?: string;
|
|
15
14
|
index?: number;
|
|
16
15
|
}
|
|
17
|
-
|
|
18
|
-
interface RenderButtonIconProps {
|
|
19
|
-
icon?: Picture;
|
|
20
|
-
iconVersion?: IconVersion;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
16
|
export const ButtonSection = JSX<ButtonSectionProps>(({ context, className = '', buttons }) => {
|
|
24
17
|
const { handlerDecorator } = context;
|
|
25
18
|
const router = context.useRouter();
|
|
@@ -36,10 +29,10 @@ export const ButtonSection = JSX<ButtonSectionProps>(({ context, className = '',
|
|
|
36
29
|
export function renderButton({ button, buttonClassName, index }: RenderButtonProps) {
|
|
37
30
|
const { icon, iconRight, version, ...rest } = button;
|
|
38
31
|
|
|
39
|
-
const iconVersion = version === 'secondary' ? '
|
|
32
|
+
const iconVersion = version === 'secondary' ? 'color' : 'white';
|
|
40
33
|
|
|
41
|
-
const leftIcon = renderButtonIcon({ icon, iconVersion });
|
|
42
|
-
const rightIcon = renderButtonIcon({
|
|
34
|
+
const leftIcon = renderButtonIcon({ ...icon, iconVersion: iconVersion } as Picture);
|
|
35
|
+
const rightIcon = renderButtonIcon({ ...iconRight, iconVersion: iconVersion } as Picture);
|
|
43
36
|
|
|
44
37
|
return (
|
|
45
38
|
<Button
|
|
@@ -53,11 +46,11 @@ export function renderButton({ button, buttonClassName, index }: RenderButtonPro
|
|
|
53
46
|
);
|
|
54
47
|
}
|
|
55
48
|
|
|
56
|
-
const renderButtonIcon = (
|
|
49
|
+
const renderButtonIcon = (icon: Picture) => {
|
|
57
50
|
if (!icon?.icon && !icon?.src) {
|
|
58
51
|
return null;
|
|
59
52
|
}
|
|
60
53
|
const iconWidth = icon?.size?.width ? `${icon.size.width}` : '24';
|
|
61
54
|
|
|
62
|
-
return <Img image={{ ...icon
|
|
55
|
+
return <Img image={{ ...icon }} width={iconWidth} height="24" asSVG />;
|
|
63
56
|
};
|
|
@@ -4,7 +4,8 @@ import { projectSettings } from '../../ProjectSettings';
|
|
|
4
4
|
import type { IconProps } from './IconProps';
|
|
5
5
|
|
|
6
6
|
const svgUseStyleMap: Record<IconVersion, string> = {
|
|
7
|
-
normal: '
|
|
7
|
+
normal: '',
|
|
8
|
+
color: 'text-primary-main',
|
|
8
9
|
black: 'text-black',
|
|
9
10
|
white: 'text-black',
|
|
10
11
|
};
|
|
@@ -16,13 +17,13 @@ export const Icon = JSX<IconProps>(
|
|
|
16
17
|
name = '',
|
|
17
18
|
alt = `Иконка ${name}`,
|
|
18
19
|
title = alt,
|
|
19
|
-
iconVersion = '
|
|
20
|
+
iconVersion = 'color',
|
|
20
21
|
asSVG,
|
|
21
22
|
...imgProps
|
|
22
23
|
}) => {
|
|
23
24
|
const href = `${projectSettings.CDN || ''}icons/${name}.svg`;
|
|
24
25
|
|
|
25
|
-
if (asSVG) {
|
|
26
|
+
if (asSVG && iconVersion !== 'normal') {
|
|
26
27
|
return (
|
|
27
28
|
<Background className={className}>
|
|
28
29
|
<svg
|
|
@@ -10,10 +10,16 @@ export interface LogoProps {
|
|
|
10
10
|
showTitle?: boolean;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
const ICON_VERSION_MAP: Record<BgColorVersion, string> = {
|
|
14
|
+
'bg-white': 'color',
|
|
15
|
+
transparent: 'white',
|
|
16
|
+
};
|
|
17
|
+
|
|
13
18
|
const SVG_COLOR: Record<BgColorVersion, string> = {
|
|
14
19
|
'bg-white': 'text-primary-main',
|
|
15
20
|
transparent: 'text-white',
|
|
16
21
|
};
|
|
22
|
+
|
|
17
23
|
const TEXT_COLOR: Record<BgColorVersion, string> = {
|
|
18
24
|
'bg-white': 'text-black',
|
|
19
25
|
transparent: 'text-white',
|
|
@@ -29,8 +35,10 @@ export const Logo = JSX<Partial<LogoProps>>(
|
|
|
29
35
|
aria-label="Россельхозбанк"
|
|
30
36
|
>
|
|
31
37
|
<Img
|
|
32
|
-
image={{ icon: 'LogoIcon', iconVersion:
|
|
33
|
-
className={`${SVG_COLOR[bgColor]}
|
|
38
|
+
image={{ icon: 'LogoIcon', iconVersion: ICON_VERSION_MAP[bgColor] }}
|
|
39
|
+
className={`${SVG_COLOR[bgColor]}`}
|
|
40
|
+
width="34"
|
|
41
|
+
height="34"
|
|
34
42
|
asSVG
|
|
35
43
|
/>
|
|
36
44
|
{showTitle ? (
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import {
|
|
2
|
+
import { useCallback, useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { useOutsideClick } from '../../hooks/useOutsideClick';
|
|
4
4
|
import { Icon } from '../Icon/Icon';
|
|
5
5
|
|
|
@@ -23,9 +23,8 @@ export const Select = JSX<SelectProps>(
|
|
|
23
23
|
const [selectedItem, setSelectedItem] = useState(options[0] || { key: '', text: '' });
|
|
24
24
|
const [isOpen, setIsOpen] = useState(false);
|
|
25
25
|
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
useOutsideClick(wrapperRef, setIsOpen);
|
|
26
|
+
const handleClickOutside = useCallback(() => setIsOpen(false), []);
|
|
27
|
+
const wrapperRef = useOutsideClick<HTMLDivElement>(handleClickOutside);
|
|
29
28
|
|
|
30
29
|
const choiceOption = (option: OptionProps) => {
|
|
31
30
|
setSelectedItem(option);
|
|
@@ -10,9 +10,9 @@ export interface TopItemProps extends TopItemContent {
|
|
|
10
10
|
className?: string;
|
|
11
11
|
flat?: boolean;
|
|
12
12
|
ariaLabel?: string;
|
|
13
|
-
onClick?: () => void;
|
|
14
13
|
bgColor?: BgColorVersion;
|
|
15
14
|
dataItemName?: string;
|
|
15
|
+
onClick?: () => void;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
const TEXT_CLASSES = 'font-sans text-s-light';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Picture } from '../model/Picture';
|
|
2
|
+
import type { BlockVersion } from '../model/BlockVersion';
|
|
3
|
+
|
|
4
|
+
export const getIconWithVersion = (icon: Picture, version: BlockVersion = 'primary'): Picture => ({
|
|
5
|
+
...icon,
|
|
6
|
+
iconVersion: icon?.iconVersion ?? (version === 'secondary' ? 'white' : 'color'),
|
|
7
|
+
});
|
package/package.json
CHANGED
|
@@ -8,6 +8,7 @@ import type { IconName } from '../../ui-kit/Icon/IconProps';
|
|
|
8
8
|
import { Img } from '../../ui-kit/Img/Img';
|
|
9
9
|
import type { AccordionContent } from '../Accordion/AccordionContent';
|
|
10
10
|
import type { AccordionItemProps } from './AccordionItemProps';
|
|
11
|
+
import { getIconWithVersion } from '../../utils/getIconWithVersion';
|
|
11
12
|
|
|
12
13
|
const icons: IconName[] = ['PlusIcon', 'MinusIcon'];
|
|
13
14
|
|
|
@@ -64,10 +65,22 @@ const FoldButton = JSX<FoldButtonProps>(({ className, icon, label, primaryIcon,
|
|
|
64
65
|
>
|
|
65
66
|
<span className="text-m-title-xs font-medium pr-2.5 flex group-hover:text-primary-main">
|
|
66
67
|
{primaryIcon ? (
|
|
67
|
-
<Img
|
|
68
|
+
<Img
|
|
69
|
+
image={getIconWithVersion(primaryIcon)}
|
|
70
|
+
className="mr-3 flex-shrink-0"
|
|
71
|
+
width="24"
|
|
72
|
+
height="24"
|
|
73
|
+
asSVG
|
|
74
|
+
/>
|
|
68
75
|
) : null}
|
|
69
76
|
{label}
|
|
70
77
|
</span>
|
|
71
|
-
<Img
|
|
78
|
+
<Img
|
|
79
|
+
className="flex-shrink-0"
|
|
80
|
+
image={getIconWithVersion({ icon: icon })}
|
|
81
|
+
width="24"
|
|
82
|
+
height="24"
|
|
83
|
+
asSVG
|
|
84
|
+
/>
|
|
72
85
|
</button>
|
|
73
86
|
));
|
|
@@ -61,7 +61,7 @@ export default {
|
|
|
61
61
|
icon: image,
|
|
62
62
|
},
|
|
63
63
|
]}
|
|
64
|
-
|
|
64
|
+
version="primary"
|
|
65
65
|
/>
|
|
66
66
|
</div>
|
|
67
67
|
),
|
|
@@ -105,7 +105,7 @@ export default {
|
|
|
105
105
|
icon: { icon: 'GlobalIcon' },
|
|
106
106
|
},
|
|
107
107
|
]}
|
|
108
|
-
|
|
108
|
+
version="primary"
|
|
109
109
|
/>
|
|
110
110
|
</div>
|
|
111
111
|
),
|
|
@@ -150,7 +150,7 @@ export default {
|
|
|
150
150
|
items: itemsList,
|
|
151
151
|
benefitType: 'list',
|
|
152
152
|
},
|
|
153
|
-
icon: { icon: 'ActualBalanceIcon' },
|
|
153
|
+
icon: { icon: 'ActualBalanceIcon', iconVersion: 'normal' },
|
|
154
154
|
},
|
|
155
155
|
]}
|
|
156
156
|
/>
|
|
@@ -197,10 +197,10 @@ export default {
|
|
|
197
197
|
items: itemsList,
|
|
198
198
|
benefitType: 'list',
|
|
199
199
|
},
|
|
200
|
-
icon: { icon: 'ActualBalanceIcon' },
|
|
200
|
+
icon: { icon: 'ActualBalanceIcon', iconVersion: 'normal' },
|
|
201
201
|
},
|
|
202
202
|
]}
|
|
203
|
-
|
|
203
|
+
version="secondary"
|
|
204
204
|
/>
|
|
205
205
|
</div>
|
|
206
206
|
),
|
|
@@ -244,7 +244,7 @@ export default {
|
|
|
244
244
|
icon: { icon: 'GlobalIcon', iconVersion: 'black' },
|
|
245
245
|
},
|
|
246
246
|
]}
|
|
247
|
-
|
|
247
|
+
version="secondary"
|
|
248
248
|
/>
|
|
249
249
|
</div>
|
|
250
250
|
),
|