@redneckz/wildless-cms-uni-blocks 0.8.23 → 0.8.25
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.8.17.js +27 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +216 -204
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +6 -2
- package/bundle/components/Headline/HeadlineContent.d.ts +2 -0
- package/bundle/components/RollupItem/RollupItem.mobile.d.ts +5 -0
- package/bundle/components/Tabs/LinkTab.d.ts +1 -0
- package/bundle/hooks/useBranches.d.ts +20 -0
- package/bundle/ui-kit/TopItem/TopItem.d.ts +2 -1
- package/dist/components/Accordion/Accordion.js +2 -3
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/Accordion/Accordion.mobile.js +2 -3
- package/dist/components/Accordion/Accordion.mobile.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormAcquiring.js +1 -1
- package/dist/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +2 -2
- package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormCredit.js +5 -5
- package/dist/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/dist/components/ApplicationForm/renderBankOffices.js.map +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/dist/components/Blocks.js +0 -4
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Blocks.mobile.js +4 -2
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +3 -2
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +6 -2
- package/dist/components/Calculator/getMonthlyPayment.js +4 -1
- package/dist/components/Calculator/getMonthlyPayment.js.map +1 -1
- package/dist/components/CarouselLinks/CarouselLinks.js +1 -1
- package/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/dist/components/Footer/Footer.mobile.js +3 -3
- package/dist/components/Footer/Footer.mobile.js.map +1 -1
- package/dist/components/Header/Header.mobile.js +2 -3
- package/dist/components/Header/Header.mobile.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenu.js +7 -2
- package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/dist/components/Headline/Headline.js +3 -2
- package/dist/components/Headline/Headline.js.map +1 -1
- package/dist/components/Headline/HeadlineContent.d.ts +2 -0
- package/dist/components/RollupItem/RollupItem.js +9 -4
- package/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/dist/components/RollupItem/RollupItem.mobile.d.ts +5 -0
- package/dist/components/RollupItem/RollupItem.mobile.js +33 -0
- package/dist/components/RollupItem/RollupItem.mobile.js.map +1 -0
- package/dist/components/Tabs/LinkTab.d.ts +1 -0
- package/dist/components/Tabs/LinkTab.js +6 -2
- package/dist/components/Tabs/LinkTab.js.map +1 -1
- package/dist/components/Tabs/Tabs.js +15 -3
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/Tabs/renderTab.js +1 -1
- package/dist/components/Tabs/renderTab.js.map +1 -1
- package/dist/hooks/useBranches.d.ts +20 -0
- package/dist/hooks/useBranches.js +16 -0
- package/dist/hooks/useBranches.js.map +1 -0
- package/dist/ui-kit/BlockWrapper.js +1 -4
- package/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/dist/ui-kit/Icon/Icon.js +4 -1
- package/dist/ui-kit/Icon/Icon.js.map +1 -1
- package/dist/ui-kit/List/List.js +1 -1
- package/dist/ui-kit/List/List.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListItem.js +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -1
- package/dist/ui-kit/TopItem/TopItem.d.ts +2 -1
- package/dist/ui-kit/TopItem/TopItem.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Accordion/Accordion.fixture.d.ts +0 -2
- package/lib/components/Accordion/Accordion.fixture.mobile.d.ts +1 -1
- package/lib/components/Accordion/Accordion.js +2 -3
- package/lib/components/Accordion/Accordion.js.map +1 -1
- package/lib/components/Accordion/Accordion.mobile.js +2 -3
- package/lib/components/Accordion/Accordion.mobile.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormAcquiring.js +1 -1
- package/lib/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +2 -2
- package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormCredit.js +5 -5
- package/lib/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/lib/components/ApplicationForm/renderBankOffices.js.map +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/lib/components/Blocks.js +0 -4
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Blocks.mobile.js +4 -2
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +3 -2
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +6 -2
- package/lib/components/Calculator/getMonthlyPayment.js +4 -1
- package/lib/components/Calculator/getMonthlyPayment.js.map +1 -1
- package/lib/components/CarouselLinks/CarouselLinks.js +1 -1
- package/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/lib/components/Footer/Footer.mobile.js +3 -3
- package/lib/components/Footer/Footer.mobile.js.map +1 -1
- package/lib/components/Header/Header.mobile.js +2 -3
- package/lib/components/Header/Header.mobile.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenu.js +7 -2
- package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/lib/components/Headline/Headline.js +3 -2
- package/lib/components/Headline/Headline.js.map +1 -1
- package/lib/components/Headline/HeadlineContent.d.ts +2 -0
- package/lib/components/{AccordionItem/AccordionItem.fixture.d.ts → RollupItem/RollupItem.fixture.mobile.d.ts} +2 -0
- package/lib/components/RollupItem/RollupItem.js +9 -4
- package/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/lib/components/RollupItem/RollupItem.mobile.d.ts +5 -0
- package/lib/components/RollupItem/RollupItem.mobile.js +31 -0
- package/lib/components/RollupItem/RollupItem.mobile.js.map +1 -0
- package/lib/components/Tabs/LinkTab.d.ts +1 -0
- package/lib/components/Tabs/LinkTab.js +6 -2
- package/lib/components/Tabs/LinkTab.js.map +1 -1
- package/lib/components/Tabs/Tabs.js +15 -3
- package/lib/components/Tabs/Tabs.js.map +1 -1
- package/lib/components/Tabs/renderTab.js +1 -1
- package/lib/components/Tabs/renderTab.js.map +1 -1
- package/lib/hooks/useBranches.d.ts +20 -0
- package/lib/hooks/useBranches.js +13 -0
- package/lib/hooks/useBranches.js.map +1 -0
- package/lib/ui-kit/BlockWrapper.js +1 -4
- package/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/lib/ui-kit/Foldable/DefaultFoldButton.d.ts +0 -1
- package/lib/ui-kit/Icon/Icon.js +4 -1
- package/lib/ui-kit/Icon/Icon.js.map +1 -1
- package/lib/ui-kit/List/List.js +1 -1
- package/lib/ui-kit/List/List.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListItem.js +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -1
- package/lib/ui-kit/TopItem/TopItem.d.ts +2 -1
- package/lib/ui-kit/TopItem/TopItem.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +205 -158
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +6 -2
- package/mobile/bundle/components/Headline/HeadlineContent.d.ts +2 -0
- package/mobile/bundle/components/Tabs/LinkTab.d.ts +1 -0
- package/mobile/bundle/hooks/useBranches.d.ts +20 -0
- package/mobile/bundle/ui-kit/TopItem/TopItem.d.ts +2 -1
- package/mobile/dist/components/Accordion/Accordion.js +2 -3
- package/mobile/dist/components/Accordion/Accordion.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormAcquiring.js +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +2 -2
- package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js +5 -5
- package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderBankOffices.js.map +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/dist/components/Blocks.js +4 -2
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +3 -2
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +6 -2
- package/mobile/dist/components/Calculator/getMonthlyPayment.js +4 -1
- package/mobile/dist/components/Calculator/getMonthlyPayment.js.map +1 -1
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js +1 -1
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/dist/components/Footer/Footer.js +3 -3
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/dist/components/Header/Header.js +2 -3
- package/mobile/dist/components/Header/Header.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js +7 -2
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/dist/components/Headline/Headline.js +3 -2
- package/mobile/dist/components/Headline/Headline.js.map +1 -1
- package/mobile/dist/components/Headline/HeadlineContent.d.ts +2 -0
- package/mobile/dist/components/RollupItem/RollupItem.js +17 -5
- package/mobile/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/dist/components/Tabs/LinkTab.d.ts +1 -0
- package/mobile/dist/components/Tabs/LinkTab.js +6 -2
- package/mobile/dist/components/Tabs/LinkTab.js.map +1 -1
- package/mobile/dist/components/Tabs/Tabs.js +15 -3
- package/mobile/dist/components/Tabs/Tabs.js.map +1 -1
- package/mobile/dist/components/Tabs/renderTab.js +1 -1
- package/mobile/dist/components/Tabs/renderTab.js.map +1 -1
- package/mobile/dist/hooks/useBranches.d.ts +20 -0
- package/mobile/dist/hooks/useBranches.js +16 -0
- package/mobile/dist/hooks/useBranches.js.map +1 -0
- package/mobile/dist/ui-kit/BlockWrapper.js +1 -4
- package/mobile/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/dist/ui-kit/Icon/Icon.js +4 -1
- package/mobile/dist/ui-kit/Icon/Icon.js.map +1 -1
- package/mobile/dist/ui-kit/List/List.js +1 -1
- package/mobile/dist/ui-kit/List/List.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListItem.js +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -1
- package/mobile/dist/ui-kit/TopItem/TopItem.d.ts +2 -1
- package/mobile/dist/ui-kit/TopItem/TopItem.js.map +1 -1
- package/mobile/lib/components/Accordion/Accordion.js +2 -3
- package/mobile/lib/components/Accordion/Accordion.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormAcquiring.js +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +2 -2
- package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js +5 -5
- package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderBankOffices.js.map +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/lib/components/Blocks.js +4 -2
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +3 -2
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +6 -2
- package/mobile/lib/components/Calculator/getMonthlyPayment.js +4 -1
- package/mobile/lib/components/Calculator/getMonthlyPayment.js.map +1 -1
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js +1 -1
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/lib/components/Footer/Footer.js +3 -3
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/components/Header/Header.js +2 -3
- package/mobile/lib/components/Header/Header.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js +7 -2
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/lib/components/Headline/Headline.js +3 -2
- package/mobile/lib/components/Headline/Headline.js.map +1 -1
- package/mobile/lib/components/Headline/HeadlineContent.d.ts +2 -0
- package/mobile/lib/components/RollupItem/RollupItem.js +17 -5
- package/mobile/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/lib/components/Tabs/LinkTab.d.ts +1 -0
- package/mobile/lib/components/Tabs/LinkTab.js +6 -2
- package/mobile/lib/components/Tabs/LinkTab.js.map +1 -1
- package/mobile/lib/components/Tabs/Tabs.js +15 -3
- package/mobile/lib/components/Tabs/Tabs.js.map +1 -1
- package/mobile/lib/components/Tabs/renderTab.js +1 -1
- package/mobile/lib/components/Tabs/renderTab.js.map +1 -1
- package/mobile/lib/hooks/useBranches.d.ts +20 -0
- package/mobile/lib/hooks/useBranches.js +13 -0
- package/mobile/lib/hooks/useBranches.js.map +1 -0
- package/mobile/lib/ui-kit/BlockWrapper.js +1 -4
- package/mobile/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/lib/ui-kit/Icon/Icon.js +4 -1
- package/mobile/lib/ui-kit/Icon/Icon.js.map +1 -1
- package/mobile/lib/ui-kit/List/List.js +1 -1
- package/mobile/lib/ui-kit/List/List.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListItem.js +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -1
- package/mobile/lib/ui-kit/TopItem/TopItem.d.ts +2 -1
- package/mobile/lib/ui-kit/TopItem/TopItem.js.map +1 -1
- package/mobile/src/components/Accordion/Accordion.example.json +3 -3
- package/mobile/src/components/Accordion/Accordion.tsx +2 -3
- package/mobile/src/components/ApplicationForm/ApplicationFormAcquiring.tsx +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +2 -2
- package/mobile/src/components/ApplicationForm/ApplicationFormCredit.tsx +5 -5
- package/mobile/src/components/ApplicationForm/renderBankOffices.tsx +1 -1
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +1 -1
- package/mobile/src/components/Blocks.ts +4 -2
- package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.example.json +16 -8
- package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +11 -4
- package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlockContent.ts +6 -2
- package/mobile/src/components/Calculator/getMonthlyPayment.ts +3 -1
- package/mobile/src/components/CarouselLinks/CarouselLinks.tsx +1 -1
- package/mobile/src/components/Footer/Footer.tsx +9 -9
- package/mobile/src/components/Header/Header.tsx +5 -6
- package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +9 -2
- package/mobile/src/components/Headline/Headline.tsx +4 -1
- package/mobile/src/components/Headline/HeadlineContent.ts +2 -0
- package/mobile/src/components/RollupItem/RollupItem.tsx +77 -28
- package/mobile/src/components/Tabs/LinkTab.tsx +8 -2
- package/mobile/src/components/Tabs/Tabs.tsx +18 -3
- package/mobile/src/components/Tabs/renderTab.tsx +7 -1
- package/mobile/src/hooks/useBranches.ts +43 -0
- package/mobile/src/ui-kit/BlockWrapper.tsx +1 -6
- package/mobile/src/ui-kit/Icon/Icon.tsx +4 -1
- package/mobile/src/ui-kit/List/List.tsx +1 -1
- package/mobile/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +0 -1
- package/mobile/src/ui-kit/SwipeListControl/SwipeListItem.tsx +1 -2
- package/mobile/src/ui-kit/TopItem/TopItem.tsx +2 -1
- package/package.json +1 -1
- package/src/components/Accordion/Accordion.example.json +3 -3
- package/src/components/Accordion/Accordion.fixture.mobile.tsx +20 -11
- package/src/components/Accordion/Accordion.fixture.tsx +42 -27
- package/src/components/Accordion/Accordion.mobile.tsx +2 -3
- package/src/components/Accordion/Accordion.tsx +2 -3
- package/src/components/ApplicationForm/ApplicationFormAcquiring.tsx +1 -1
- package/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +2 -2
- package/src/components/ApplicationForm/ApplicationFormCredit.tsx +5 -5
- package/src/components/ApplicationForm/renderBankOffices.tsx +1 -1
- package/src/components/BenefitsBlock/BenefitsBlock.tsx +1 -1
- package/src/components/Blocks.mobile.ts +4 -2
- package/src/components/Blocks.ts +0 -4
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.example.json +16 -8
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.fixture.tsx +8 -8
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +11 -4
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlockContent.ts +6 -2
- package/src/components/Calculator/getMonthlyPayment.ts +3 -1
- package/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.fixture.tsx +2 -2
- package/src/components/CarouselLinks/CarouselLinks.tsx +1 -1
- package/src/components/Footer/Footer.mobile.tsx +9 -9
- package/src/components/Header/Header.mobile.tsx +5 -6
- package/src/components/Header/HeaderSecondaryMenu.tsx +9 -2
- package/src/components/Headline/Headline.tsx +4 -1
- package/src/components/Headline/HeadlineContent.ts +2 -0
- package/src/components/OtherProducts/OtherProducts.fixture.tsx +15 -14
- package/src/components/RollupItem/RollupItem.fixture.mobile.tsx +33 -0
- package/src/components/RollupItem/RollupItem.mobile.tsx +143 -0
- package/src/components/RollupItem/RollupItem.tsx +17 -13
- package/src/components/Tabs/LinkTab.tsx +8 -2
- package/src/components/Tabs/Tabs.tsx +18 -3
- package/src/components/Tabs/renderTab.tsx +7 -1
- package/src/components/VerticalLayout/VerticalLayout.fixture.tsx +1 -0
- package/src/hooks/useBranches.ts +43 -0
- package/src/ui-kit/BlockWrapper.tsx +1 -6
- package/src/ui-kit/Icon/Icon.tsx +4 -1
- package/src/ui-kit/List/List.tsx +1 -1
- package/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +0 -1
- package/src/ui-kit/SwipeListControl/SwipeListItem.tsx +1 -2
- package/src/ui-kit/TopItem/TopItem.tsx +2 -1
- package/bundle/components/Accordion/AccordionItemsList.d.ts +0 -1
- package/bundle/components/AccordionItem/AccordionItem.d.ts +0 -3
- package/bundle/components/AccordionItem/AccordionItem.mobile.d.ts +0 -3
- package/bundle/components/AccordionItem/AccordionItemContent.d.ts +0 -14
- package/bundle/components/AccordionItem/AccordionItemProps.d.ts +0 -4
- package/bundle/components/OtherProductsItem/OtherProductsItem.d.ts +0 -5
- package/bundle/components/OtherProductsItem/OtherProductsItemContent.d.ts +0 -12
- package/dist/components/Accordion/AccordionItemsList.d.ts +0 -1
- package/dist/components/Accordion/AccordionItemsList.js +0 -6
- package/dist/components/Accordion/AccordionItemsList.js.map +0 -1
- package/dist/components/AccordionItem/AccordionItem.d.ts +0 -3
- package/dist/components/AccordionItem/AccordionItem.js +0 -14
- package/dist/components/AccordionItem/AccordionItem.js.map +0 -1
- package/dist/components/AccordionItem/AccordionItem.mobile.d.ts +0 -3
- package/dist/components/AccordionItem/AccordionItem.mobile.js +0 -19
- package/dist/components/AccordionItem/AccordionItem.mobile.js.map +0 -1
- package/dist/components/AccordionItem/AccordionItemContent.d.ts +0 -14
- package/dist/components/AccordionItem/AccordionItemContent.js +0 -2
- package/dist/components/AccordionItem/AccordionItemContent.js.map +0 -1
- package/dist/components/AccordionItem/AccordionItemProps.d.ts +0 -4
- package/dist/components/AccordionItem/AccordionItemProps.js +0 -2
- package/dist/components/AccordionItem/AccordionItemProps.js.map +0 -1
- package/dist/components/OtherProductsItem/OtherProductsItem.d.ts +0 -5
- package/dist/components/OtherProductsItem/OtherProductsItem.js +0 -18
- package/dist/components/OtherProductsItem/OtherProductsItem.js.map +0 -1
- package/dist/components/OtherProductsItem/OtherProductsItemContent.d.ts +0 -12
- package/dist/components/OtherProductsItem/OtherProductsItemContent.js +0 -2
- package/dist/components/OtherProductsItem/OtherProductsItemContent.js.map +0 -1
- package/lib/components/Accordion/AccordionItemsList.d.ts +0 -1
- package/lib/components/Accordion/AccordionItemsList.js +0 -4
- package/lib/components/Accordion/AccordionItemsList.js.map +0 -1
- package/lib/components/AccordionItem/AccordionItem.d.ts +0 -3
- package/lib/components/AccordionItem/AccordionItem.fixture.mobile.d.ts +0 -5
- package/lib/components/AccordionItem/AccordionItem.js +0 -12
- package/lib/components/AccordionItem/AccordionItem.js.map +0 -1
- package/lib/components/AccordionItem/AccordionItem.mobile.d.ts +0 -3
- package/lib/components/AccordionItem/AccordionItem.mobile.js +0 -17
- package/lib/components/AccordionItem/AccordionItem.mobile.js.map +0 -1
- package/lib/components/AccordionItem/AccordionItemContent.d.ts +0 -14
- package/lib/components/AccordionItem/AccordionItemContent.js +0 -2
- package/lib/components/AccordionItem/AccordionItemContent.js.map +0 -1
- package/lib/components/AccordionItem/AccordionItemProps.d.ts +0 -4
- package/lib/components/AccordionItem/AccordionItemProps.js +0 -2
- package/lib/components/AccordionItem/AccordionItemProps.js.map +0 -1
- package/lib/components/OtherProductsItem/OtherProductsItem.d.ts +0 -5
- package/lib/components/OtherProductsItem/OtherProductsItem.fixture.d.ts +0 -5
- package/lib/components/OtherProductsItem/OtherProductsItem.js +0 -16
- package/lib/components/OtherProductsItem/OtherProductsItem.js.map +0 -1
- package/lib/components/OtherProductsItem/OtherProductsItemContent.d.ts +0 -12
- package/lib/components/OtherProductsItem/OtherProductsItemContent.js +0 -2
- package/lib/components/OtherProductsItem/OtherProductsItemContent.js.map +0 -1
- package/mobile/bundle/components/Accordion/AccordionItemsList.d.ts +0 -1
- package/mobile/bundle/components/AccordionItem/AccordionItem.d.ts +0 -3
- package/mobile/bundle/components/AccordionItem/AccordionItemContent.d.ts +0 -14
- package/mobile/bundle/components/AccordionItem/AccordionItemProps.d.ts +0 -4
- package/mobile/bundle/components/OtherProductsItem/OtherProductsItem.d.ts +0 -5
- package/mobile/bundle/components/OtherProductsItem/OtherProductsItemContent.d.ts +0 -12
- package/mobile/dist/components/Accordion/AccordionItemsList.d.ts +0 -1
- package/mobile/dist/components/Accordion/AccordionItemsList.js +0 -6
- package/mobile/dist/components/Accordion/AccordionItemsList.js.map +0 -1
- package/mobile/dist/components/AccordionItem/AccordionItem.d.ts +0 -3
- package/mobile/dist/components/AccordionItem/AccordionItem.js +0 -19
- package/mobile/dist/components/AccordionItem/AccordionItem.js.map +0 -1
- package/mobile/dist/components/AccordionItem/AccordionItemContent.d.ts +0 -14
- package/mobile/dist/components/AccordionItem/AccordionItemContent.js +0 -2
- package/mobile/dist/components/AccordionItem/AccordionItemContent.js.map +0 -1
- package/mobile/dist/components/AccordionItem/AccordionItemProps.d.ts +0 -4
- package/mobile/dist/components/AccordionItem/AccordionItemProps.js +0 -2
- package/mobile/dist/components/AccordionItem/AccordionItemProps.js.map +0 -1
- package/mobile/dist/components/OtherProductsItem/OtherProductsItem.d.ts +0 -5
- package/mobile/dist/components/OtherProductsItem/OtherProductsItem.js +0 -18
- package/mobile/dist/components/OtherProductsItem/OtherProductsItem.js.map +0 -1
- package/mobile/dist/components/OtherProductsItem/OtherProductsItemContent.d.ts +0 -12
- package/mobile/dist/components/OtherProductsItem/OtherProductsItemContent.js +0 -2
- package/mobile/dist/components/OtherProductsItem/OtherProductsItemContent.js.map +0 -1
- package/mobile/lib/components/Accordion/AccordionItemsList.d.ts +0 -1
- package/mobile/lib/components/Accordion/AccordionItemsList.js +0 -4
- package/mobile/lib/components/Accordion/AccordionItemsList.js.map +0 -1
- package/mobile/lib/components/AccordionItem/AccordionItem.d.ts +0 -3
- package/mobile/lib/components/AccordionItem/AccordionItem.js +0 -17
- package/mobile/lib/components/AccordionItem/AccordionItem.js.map +0 -1
- package/mobile/lib/components/AccordionItem/AccordionItemContent.d.ts +0 -14
- package/mobile/lib/components/AccordionItem/AccordionItemContent.js +0 -2
- package/mobile/lib/components/AccordionItem/AccordionItemContent.js.map +0 -1
- package/mobile/lib/components/AccordionItem/AccordionItemProps.d.ts +0 -4
- package/mobile/lib/components/AccordionItem/AccordionItemProps.js +0 -2
- package/mobile/lib/components/AccordionItem/AccordionItemProps.js.map +0 -1
- package/mobile/lib/components/OtherProductsItem/OtherProductsItem.d.ts +0 -5
- package/mobile/lib/components/OtherProductsItem/OtherProductsItem.js +0 -16
- package/mobile/lib/components/OtherProductsItem/OtherProductsItem.js.map +0 -1
- package/mobile/lib/components/OtherProductsItem/OtherProductsItemContent.d.ts +0 -12
- package/mobile/lib/components/OtherProductsItem/OtherProductsItemContent.js +0 -2
- package/mobile/lib/components/OtherProductsItem/OtherProductsItemContent.js.map +0 -1
- package/mobile/src/components/Accordion/AccordionItemsList.tsx +0 -5
- package/mobile/src/components/AccordionItem/AccordionItem.example.json +0 -25
- package/mobile/src/components/AccordionItem/AccordionItem.tsx +0 -90
- package/mobile/src/components/AccordionItem/AccordionItem.ui.json +0 -7
- package/mobile/src/components/AccordionItem/AccordionItemContent.ts +0 -15
- package/mobile/src/components/AccordionItem/AccordionItemProps.ts +0 -4
- package/mobile/src/components/OtherProductsItem/OtherProductsItem.example.json +0 -22
- package/mobile/src/components/OtherProductsItem/OtherProductsItem.tsx +0 -50
- package/mobile/src/components/OtherProductsItem/OtherProductsItem.ui.json +0 -1
- package/mobile/src/components/OtherProductsItem/OtherProductsItemContent.ts +0 -13
- package/src/components/Accordion/AccordionItemsList.tsx +0 -5
- package/src/components/AccordionItem/AccordionItem.example.json +0 -25
- package/src/components/AccordionItem/AccordionItem.fixture.mobile.tsx +0 -17
- package/src/components/AccordionItem/AccordionItem.fixture.tsx +0 -17
- package/src/components/AccordionItem/AccordionItem.mobile.tsx +0 -90
- package/src/components/AccordionItem/AccordionItem.tsx +0 -58
- package/src/components/AccordionItem/AccordionItem.ui.json +0 -7
- package/src/components/AccordionItem/AccordionItemContent.ts +0 -15
- package/src/components/AccordionItem/AccordionItemProps.ts +0 -4
- package/src/components/OtherProductsItem/OtherProductsItem.example.json +0 -22
- package/src/components/OtherProductsItem/OtherProductsItem.fixture.tsx +0 -20
- package/src/components/OtherProductsItem/OtherProductsItem.tsx +0 -50
- package/src/components/OtherProductsItem/OtherProductsItem.ui.json +0 -1
- package/src/components/OtherProductsItem/OtherProductsItemContent.ts +0 -13
|
@@ -18,14 +18,17 @@ export const Headline = JSX<HeadlineProps>(
|
|
|
18
18
|
headlineVersion = 'XL',
|
|
19
19
|
align = 'text-center',
|
|
20
20
|
as,
|
|
21
|
+
isPadding = true,
|
|
21
22
|
...rest
|
|
22
23
|
}) => {
|
|
23
24
|
const versionStyle = headlineVersionStyles[headlineVersion];
|
|
25
|
+
const paddingStyle = isPadding ? 'p-12' : '';
|
|
24
26
|
|
|
25
27
|
return (
|
|
26
28
|
<BlockWrapper
|
|
27
29
|
className={style(
|
|
28
|
-
'flex flex-col
|
|
30
|
+
'flex flex-col group-data-secondary:bg-primary-main group-data-secondary:text-white',
|
|
31
|
+
paddingStyle,
|
|
29
32
|
versionStyle.wrapper,
|
|
30
33
|
className,
|
|
31
34
|
)}
|
|
@@ -16,8 +16,8 @@ const options = {
|
|
|
16
16
|
} as BlockRendererOptions;
|
|
17
17
|
|
|
18
18
|
export const OTHER_PRODUCTS_ITEM: BlockDef = {
|
|
19
|
-
type: '
|
|
20
|
-
content: { label: 'OtherProducts №1 Tiles' },
|
|
19
|
+
type: 'RollupItem',
|
|
20
|
+
content: { label: 'OtherProducts №1 Tiles', version: 'secondary' },
|
|
21
21
|
blocks: [
|
|
22
22
|
{ type: 'Tile', content: TILE_PREMIUM, style: ['col-span-6'] },
|
|
23
23
|
{ type: 'Tile', content: TILE_PREMIUM, style: ['col-span-6'] },
|
|
@@ -36,8 +36,9 @@ export default {
|
|
|
36
36
|
blocks: [
|
|
37
37
|
OTHER_PRODUCTS_ITEM,
|
|
38
38
|
{
|
|
39
|
-
type: '
|
|
40
|
-
|
|
39
|
+
type: 'RollupItem',
|
|
40
|
+
|
|
41
|
+
content: { label: 'OtherProducts №2 Product_Tiles', version: 'secondary' },
|
|
41
42
|
blocks: [
|
|
42
43
|
{ type: 'ProductTile', content: PRODUCT_TILE, style: ['col-span-6'] },
|
|
43
44
|
{ type: 'ProductTile', content: PRODUCT_TILE, style: ['col-span-6'] },
|
|
@@ -46,16 +47,16 @@ export default {
|
|
|
46
47
|
],
|
|
47
48
|
},
|
|
48
49
|
{
|
|
49
|
-
type: '
|
|
50
|
-
content: { label: 'OtherProducts №3 Product_Block' },
|
|
50
|
+
type: 'RollupItem',
|
|
51
|
+
content: { label: 'OtherProducts №3 Product_Block', version: 'secondary' },
|
|
51
52
|
blocks: [
|
|
52
53
|
{ type: 'ProductBlock', content: PRODUCT_BLOCK, style: ['col-span-6'] },
|
|
53
54
|
{ type: 'ProductBlock', content: PRODUCT_BLOCK, style: ['col-span-6'] },
|
|
54
55
|
],
|
|
55
56
|
},
|
|
56
57
|
{
|
|
57
|
-
type: '
|
|
58
|
-
content: { label: 'OtherProducts №4 Text_Block' },
|
|
58
|
+
type: 'RollupItem',
|
|
59
|
+
content: { label: 'OtherProducts №4 Text_Block', version: 'secondary' },
|
|
59
60
|
blocks: [
|
|
60
61
|
{ type: 'TextBlock', content: TEXT_BLOCK },
|
|
61
62
|
{ type: 'TextBlock', content: TEXT_BLOCK },
|
|
@@ -64,18 +65,18 @@ export default {
|
|
|
64
65
|
],
|
|
65
66
|
},
|
|
66
67
|
{
|
|
67
|
-
type: '
|
|
68
|
-
content: { label: 'OtherProducts №5 Picture_Text' },
|
|
68
|
+
type: 'RollupItem',
|
|
69
|
+
content: { label: 'OtherProducts №5 Picture_Text', version: 'secondary' },
|
|
69
70
|
blocks: [{ type: 'PictureText', content: PICTURE_TEXT }],
|
|
70
71
|
},
|
|
71
72
|
{
|
|
72
|
-
type: '
|
|
73
|
-
content: { label: 'OtherProducts №6 Headline' },
|
|
73
|
+
type: 'RollupItem',
|
|
74
|
+
content: { label: 'OtherProducts №6 Headline', version: 'secondary' },
|
|
74
75
|
blocks: [{ type: 'Headline', content: HEADLINE }],
|
|
75
76
|
},
|
|
76
77
|
{
|
|
77
|
-
type: '
|
|
78
|
-
content: { label: 'OtherProducts №7 Link_Docs' },
|
|
78
|
+
type: 'RollupItem',
|
|
79
|
+
content: { label: 'OtherProducts №7 Link_Docs', version: 'secondary' },
|
|
79
80
|
blocks: [{ type: 'LinkDocs', content: linkDocsContentExample }],
|
|
80
81
|
},
|
|
81
82
|
],
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { BlockRendererOptions } from '../../BlockRenderer/BlockRendererOptions';
|
|
2
|
+
import { BlockDef } from '../../model/ContentPageDef';
|
|
3
|
+
import { Blocks } from '../Blocks.mobile';
|
|
4
|
+
|
|
5
|
+
import { TEXT_BLOCK } from '../TextBlock/TextBlock.fixture.mobile';
|
|
6
|
+
import { RollupItem } from './RollupItem.mobile';
|
|
7
|
+
|
|
8
|
+
const options = {
|
|
9
|
+
blocksRegistry: Blocks,
|
|
10
|
+
} as BlockRendererOptions;
|
|
11
|
+
|
|
12
|
+
export const ROLLUP_ITEM: BlockDef = {
|
|
13
|
+
type: 'RollupItem',
|
|
14
|
+
content: {
|
|
15
|
+
label: 'RollupItem label 1',
|
|
16
|
+
labelIcon: { icon: 'CardIcon' },
|
|
17
|
+
isExpanded: true,
|
|
18
|
+
},
|
|
19
|
+
blocks: [
|
|
20
|
+
{ type: 'TextBlock', content: TEXT_BLOCK },
|
|
21
|
+
{ type: 'TextBlock', content: TEXT_BLOCK },
|
|
22
|
+
],
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default {
|
|
26
|
+
default: (
|
|
27
|
+
<div>
|
|
28
|
+
<div className="list-none m-0 p-0">
|
|
29
|
+
<RollupItem {...ROLLUP_ITEM.content} block={ROLLUP_ITEM} options={options} />
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
),
|
|
33
|
+
};
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { getParentBlockContent } from '../../BlockRenderer/getParentBlockContent';
|
|
3
|
+
import { renderChildren } from '../../BlockRenderer/renderChildren';
|
|
4
|
+
import type { IconName } from '../../icons/IconName';
|
|
5
|
+
import { BlockVersion } from '../../model/BlockVersion';
|
|
6
|
+
import type { JSXBlock, UniBlockProps } from '../../model/JSXBlock';
|
|
7
|
+
import { Picture } from '../../model/Picture';
|
|
8
|
+
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
9
|
+
import { DefaultFoldButton } from '../../ui-kit/Foldable/DefaultFoldButton';
|
|
10
|
+
import { Foldable } from '../../ui-kit/Foldable/Foldable';
|
|
11
|
+
import type { FoldablePartProps } from '../../ui-kit/Foldable/FoldablePartProps';
|
|
12
|
+
import { FoldableSection } from '../../ui-kit/Foldable/FoldableSection';
|
|
13
|
+
import { Img } from '../../ui-kit/Img/Img';
|
|
14
|
+
import { Text } from '../../ui-kit/Text/Text';
|
|
15
|
+
import { getIconWithVersion } from '../../utils/getIconWithVersion';
|
|
16
|
+
import { style } from '../../utils/style';
|
|
17
|
+
import { AccordionContent } from '../Accordion/AccordionContent';
|
|
18
|
+
import type { RollupItemContent } from './RollupItemContent';
|
|
19
|
+
|
|
20
|
+
export interface RollupItemProps extends RollupItemContent, UniBlockProps {}
|
|
21
|
+
|
|
22
|
+
export const RollupItem: JSXBlock<RollupItemProps> = JSX<RollupItemProps>(
|
|
23
|
+
({
|
|
24
|
+
className = '',
|
|
25
|
+
label = 'Развернуть',
|
|
26
|
+
isExpanded,
|
|
27
|
+
isFoldButtonOnTop = true,
|
|
28
|
+
version = 'primary',
|
|
29
|
+
...rest
|
|
30
|
+
}) => {
|
|
31
|
+
const { bordered } = getParentBlockContent(rest.options, {} as AccordionContent);
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<BlockWrapper
|
|
35
|
+
className={style(
|
|
36
|
+
'border-b border-solid border-main-divider w-full',
|
|
37
|
+
bordered ? 'border p-4 rounded mb-4' : 'border-0 border-b last:border-b-0',
|
|
38
|
+
className,
|
|
39
|
+
)}
|
|
40
|
+
tag="div"
|
|
41
|
+
version="transparent"
|
|
42
|
+
{...rest}
|
|
43
|
+
>
|
|
44
|
+
<Foldable
|
|
45
|
+
isFoldButtonOnTop={isFoldButtonOnTop}
|
|
46
|
+
unfoldedByDefault={isExpanded}
|
|
47
|
+
renderFoldableSection={({ isUnfolded }) => (
|
|
48
|
+
<FoldableSection
|
|
49
|
+
className="flex flex-wrap group-last:last:pb-0 gap-5 [&>*]:p-0"
|
|
50
|
+
isUnfolded={isUnfolded}
|
|
51
|
+
>
|
|
52
|
+
{renderChildren(rest)}
|
|
53
|
+
</FoldableSection>
|
|
54
|
+
)}
|
|
55
|
+
renderFoldButton={({ isUnfolded, onToggle }) =>
|
|
56
|
+
renderFoldButton({ version, label, isUnfolded, onToggle })
|
|
57
|
+
}
|
|
58
|
+
/>
|
|
59
|
+
</BlockWrapper>
|
|
60
|
+
);
|
|
61
|
+
},
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
RollupItem.childrenTypes = {
|
|
65
|
+
exclude: ['RollupItem', 'Accordion', 'OtherProducts'],
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
interface FoldButtonProps extends FoldablePartProps {
|
|
69
|
+
version?: BlockVersion;
|
|
70
|
+
label?: string;
|
|
71
|
+
className?: string;
|
|
72
|
+
primaryIcon?: Picture;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const renderFoldButton = ({
|
|
76
|
+
version,
|
|
77
|
+
label: defaultLabel,
|
|
78
|
+
isUnfolded,
|
|
79
|
+
onToggle,
|
|
80
|
+
className = '',
|
|
81
|
+
primaryIcon,
|
|
82
|
+
}: FoldButtonProps) => {
|
|
83
|
+
const label = defaultLabel || (isUnfolded ? 'Скрыть' : 'Развернуть');
|
|
84
|
+
|
|
85
|
+
return version === 'primary' ? (
|
|
86
|
+
renderPrimaryFoldButton({
|
|
87
|
+
label,
|
|
88
|
+
icon: isUnfolded ? 'MinusIcon' : 'PlusIcon',
|
|
89
|
+
onToggle,
|
|
90
|
+
className,
|
|
91
|
+
primaryIcon,
|
|
92
|
+
})
|
|
93
|
+
) : (
|
|
94
|
+
<DefaultFoldButton
|
|
95
|
+
label={label}
|
|
96
|
+
icon={isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon'}
|
|
97
|
+
onClick={onToggle}
|
|
98
|
+
/>
|
|
99
|
+
);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
interface PrimaryFoldButtonProps {
|
|
103
|
+
label?: string;
|
|
104
|
+
icon?: IconName;
|
|
105
|
+
primaryIcon?: Picture;
|
|
106
|
+
onToggle?: () => void;
|
|
107
|
+
onClick?: () => void;
|
|
108
|
+
className?: string;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const renderPrimaryFoldButton = ({
|
|
112
|
+
label,
|
|
113
|
+
icon,
|
|
114
|
+
primaryIcon,
|
|
115
|
+
onToggle,
|
|
116
|
+
}: PrimaryFoldButtonProps) => (
|
|
117
|
+
<button
|
|
118
|
+
className={`border-none bg-transparent flex justify-between text-left w-full text-primary-text group cursor-pointer py-3.5 px-0`}
|
|
119
|
+
onClick={onToggle}
|
|
120
|
+
>
|
|
121
|
+
<div className="flex group-hover:text-primary-main">
|
|
122
|
+
{primaryIcon ? (
|
|
123
|
+
<Img
|
|
124
|
+
image={{ ...getIconWithVersion({ ...primaryIcon } as Picture) }}
|
|
125
|
+
className="mr-3 flex-shrink-0"
|
|
126
|
+
width="24"
|
|
127
|
+
height="24"
|
|
128
|
+
asSVG
|
|
129
|
+
/>
|
|
130
|
+
) : null}
|
|
131
|
+
<Text size="text-m-title-xs" font="font-medium">
|
|
132
|
+
{label}
|
|
133
|
+
</Text>
|
|
134
|
+
</div>
|
|
135
|
+
<Img
|
|
136
|
+
className="flex-shrink-0"
|
|
137
|
+
image={{ ...getIconWithVersion({ icon: icon }) }}
|
|
138
|
+
width="24"
|
|
139
|
+
height="24"
|
|
140
|
+
asSVG
|
|
141
|
+
/>
|
|
142
|
+
</button>
|
|
143
|
+
);
|
|
@@ -9,6 +9,7 @@ import type { FoldablePartProps } from '../../ui-kit/Foldable/FoldablePartProps'
|
|
|
9
9
|
import { FoldableSection } from '../../ui-kit/Foldable/FoldableSection';
|
|
10
10
|
import type { IconName } from '../../ui-kit/Icon/IconProps';
|
|
11
11
|
import { Img } from '../../ui-kit/Img/Img';
|
|
12
|
+
import { Text } from '../../ui-kit/Text/Text';
|
|
12
13
|
import { getIconWithVersion } from '../../utils/getIconWithVersion';
|
|
13
14
|
import type { RollupItemContent } from './RollupItemContent';
|
|
14
15
|
|
|
@@ -24,22 +25,18 @@ export const RollupItem: JSXBlock<RollupItemProps> = JSX<RollupItemProps>(
|
|
|
24
25
|
...rest
|
|
25
26
|
}) => (
|
|
26
27
|
<BlockWrapper
|
|
27
|
-
className={`border-b border-solid border-main-divider
|
|
28
|
+
className={`w-full border-0 border-b border-solid border-main-divider last:border-b-0 ${className}`}
|
|
28
29
|
tag="div"
|
|
30
|
+
version="transparent"
|
|
29
31
|
{...rest}
|
|
30
32
|
>
|
|
31
33
|
<Foldable
|
|
32
34
|
isFoldButtonOnTop={isFoldButtonOnTop}
|
|
33
35
|
unfoldedByDefault={isExpanded}
|
|
34
36
|
renderFoldableSection={({ isUnfolded }) => (
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
isUnfolded={isUnfolded}
|
|
39
|
-
>
|
|
40
|
-
{renderChildren(rest)}
|
|
41
|
-
</FoldableSection>
|
|
42
|
-
</div>
|
|
37
|
+
<FoldableSection className={`grid grid-cols-12 gap-5 [&>*]:p-0`} isUnfolded={isUnfolded}>
|
|
38
|
+
{renderChildren(rest)}
|
|
39
|
+
</FoldableSection>
|
|
43
40
|
)}
|
|
44
41
|
renderFoldButton={({ isUnfolded, onToggle }) =>
|
|
45
42
|
renderFoldButton({ version, label, isUnfolded, onToggle })
|
|
@@ -50,12 +47,13 @@ export const RollupItem: JSXBlock<RollupItemProps> = JSX<RollupItemProps>(
|
|
|
50
47
|
);
|
|
51
48
|
|
|
52
49
|
RollupItem.childrenTypes = {
|
|
53
|
-
exclude: ['RollupItem', 'Accordion', '
|
|
50
|
+
exclude: ['RollupItem', 'Accordion', 'OtherProducts'],
|
|
54
51
|
};
|
|
55
52
|
|
|
56
53
|
interface FoldButtonProps extends FoldablePartProps {
|
|
57
54
|
version?: BlockVersion;
|
|
58
55
|
label?: string;
|
|
56
|
+
isPadding?: boolean;
|
|
59
57
|
}
|
|
60
58
|
|
|
61
59
|
const renderFoldButton = ({
|
|
@@ -67,7 +65,11 @@ const renderFoldButton = ({
|
|
|
67
65
|
const label = defaultLabel || (isUnfolded ? 'Скрыть' : 'Развернуть');
|
|
68
66
|
|
|
69
67
|
return version === 'primary' ? (
|
|
70
|
-
renderPrimaryFoldButton({
|
|
68
|
+
renderPrimaryFoldButton({
|
|
69
|
+
label,
|
|
70
|
+
icon: isUnfolded ? 'MinusIcon' : 'PlusIcon',
|
|
71
|
+
onToggle,
|
|
72
|
+
})
|
|
71
73
|
) : (
|
|
72
74
|
<DefaultFoldButton
|
|
73
75
|
label={label}
|
|
@@ -85,10 +87,12 @@ interface PrimaryFoldButtonProps {
|
|
|
85
87
|
|
|
86
88
|
const renderPrimaryFoldButton = ({ label, icon, onToggle }: PrimaryFoldButtonProps) => (
|
|
87
89
|
<button
|
|
88
|
-
className=
|
|
90
|
+
className={`border-none bg-transparent px-0 pt-5 pb-3.5 flex justify-between text-left w-full font-sans text-h6 cursor-pointer`}
|
|
89
91
|
onClick={onToggle}
|
|
90
92
|
>
|
|
91
|
-
<
|
|
93
|
+
<Text size="text-xl" font="font-medium">
|
|
94
|
+
{label}
|
|
95
|
+
</Text>
|
|
92
96
|
{icon ? <Img image={getIconWithVersion({ icon })} width="24" height="24" asSVG /> : null}
|
|
93
97
|
</button>
|
|
94
98
|
);
|
|
@@ -7,22 +7,28 @@ interface LinkTabProps {
|
|
|
7
7
|
tab: LinkTabData;
|
|
8
8
|
currentTab?: TabData;
|
|
9
9
|
isScrollable?: boolean;
|
|
10
|
+
onClick: (tab: TabData) => void;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
export const LinkTab = JSX<LinkTabProps>((props) => {
|
|
13
|
-
const { tab, currentTab, isScrollable = false } = props;
|
|
14
|
+
const { tab, currentTab, onClick, isScrollable = false } = props;
|
|
14
15
|
const active = currentTab?.type === 'link' && currentTab.href === tab.href;
|
|
15
16
|
|
|
16
17
|
const link = useLink();
|
|
17
18
|
const adjustedProps = link(tab);
|
|
18
19
|
|
|
20
|
+
const handleClick = (ev?: { preventDefault: () => void }) => {
|
|
21
|
+
adjustedProps.onClick(ev);
|
|
22
|
+
onClick(tab);
|
|
23
|
+
};
|
|
24
|
+
|
|
19
25
|
return (
|
|
20
26
|
<a
|
|
21
27
|
role="tab"
|
|
22
28
|
className={getLinkTabClassName('link', active, isScrollable)}
|
|
23
29
|
target={tab.target}
|
|
24
30
|
href={adjustedProps.href}
|
|
25
|
-
onClick={
|
|
31
|
+
onClick={handleClick}
|
|
26
32
|
>
|
|
27
33
|
<span className={getLinkTabClassName('text', active, isScrollable)}>{tab.text}</span>
|
|
28
34
|
</a>
|
|
@@ -19,6 +19,14 @@ export const Tabs = JSX<TabsBlockProps>((props) => {
|
|
|
19
19
|
|
|
20
20
|
const [currentTab, setCurrentTab] = useState(tabs ? tabs[0] : undefined);
|
|
21
21
|
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
if (!tabs || !tabs[0]) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
fireTabEvent(tabs[0]);
|
|
28
|
+
}, []);
|
|
29
|
+
|
|
22
30
|
useEffect(() => {
|
|
23
31
|
if (currentTab?.type === 'group') {
|
|
24
32
|
defaultEventBus.subject('tab', { type: currentTab.type, label: currentTab.ref });
|
|
@@ -26,9 +34,7 @@ export const Tabs = JSX<TabsBlockProps>((props) => {
|
|
|
26
34
|
}, [currentTab]);
|
|
27
35
|
|
|
28
36
|
const handleClick = useCallback((selectedTab: TabData) => {
|
|
29
|
-
|
|
30
|
-
defaultEventBus.fire('tab', { type: selectedTab.type, label: selectedTab.ref });
|
|
31
|
-
}
|
|
37
|
+
fireTabEvent(selectedTab);
|
|
32
38
|
setCurrentTab(selectedTab);
|
|
33
39
|
}, []);
|
|
34
40
|
|
|
@@ -61,3 +67,12 @@ export const Tabs = JSX<TabsBlockProps>((props) => {
|
|
|
61
67
|
</BlockWrapper>
|
|
62
68
|
);
|
|
63
69
|
});
|
|
70
|
+
|
|
71
|
+
const fireTabEvent = (tab: TabData) => {
|
|
72
|
+
if (tab.type === 'group') {
|
|
73
|
+
defaultEventBus.fire('tab', { type: tab.type, label: tab.ref });
|
|
74
|
+
}
|
|
75
|
+
if (tab.type === 'link') {
|
|
76
|
+
defaultEventBus.fire('tab', { type: tab.type, label: tab.href });
|
|
77
|
+
}
|
|
78
|
+
};
|
|
@@ -26,7 +26,13 @@ export const renderTab =
|
|
|
26
26
|
return renderGroupTab({ page, currentTab, showCounter, onClick, isScrollable })(tab, i);
|
|
27
27
|
case 'link': {
|
|
28
28
|
return (
|
|
29
|
-
<LinkTab
|
|
29
|
+
<LinkTab
|
|
30
|
+
key={String(i)}
|
|
31
|
+
tab={tab}
|
|
32
|
+
currentTab={currentTab}
|
|
33
|
+
isScrollable={isScrollable}
|
|
34
|
+
onClick={onClick}
|
|
35
|
+
/>
|
|
30
36
|
);
|
|
31
37
|
}
|
|
32
38
|
default:
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { useAsyncData } from '@redneckz/uni-jsx/lib/hooks/useAsyncData';
|
|
2
|
+
import { fetchJSON } from '../utils/fetchJSON';
|
|
3
|
+
|
|
4
|
+
export interface Tariff {
|
|
5
|
+
tariffType?: string;
|
|
6
|
+
tariffValue?: number;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface SafeBoxCase {
|
|
10
|
+
safeBoxCasesSize?: string;
|
|
11
|
+
tariffs?: Tariff[];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface SafeBoxCaseVolume {
|
|
15
|
+
volume?: string;
|
|
16
|
+
safeBoxCases?: SafeBoxCase[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface Branch {
|
|
20
|
+
branchCode?: string;
|
|
21
|
+
address?: string;
|
|
22
|
+
gpsLatitude?: number;
|
|
23
|
+
gpsLongitude?: number;
|
|
24
|
+
safeBoxCaseVolumes?: SafeBoxCaseVolume[];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const BRANCHES_URL = '/api/v1/branches';
|
|
28
|
+
const EMPTY_VALUE = [];
|
|
29
|
+
|
|
30
|
+
export function useBranches(regionCode?: string): Branch[] {
|
|
31
|
+
const { data } = useAsyncData<Branch[], any, string | null>(
|
|
32
|
+
regionCode ? `${BRANCHES_URL}?regionCode=${regionCode}` : null,
|
|
33
|
+
fetchSafeBoxes,
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
return data || EMPTY_VALUE;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const fetchSafeBoxes = async (url: string): Promise<Branch[]> => {
|
|
40
|
+
const result = await fetchJSON<Branch[]>(url, { method: 'GET' });
|
|
41
|
+
|
|
42
|
+
return result || EMPTY_VALUE;
|
|
43
|
+
};
|
|
@@ -38,12 +38,7 @@ export const BlockWrapper = JSX<BlockWrapperProps>(
|
|
|
38
38
|
() =>
|
|
39
39
|
defaultEventBus.subscribe('tab', (event) => {
|
|
40
40
|
setHidden(
|
|
41
|
-
Boolean(
|
|
42
|
-
event.type === 'group' &&
|
|
43
|
-
event.label &&
|
|
44
|
-
block?.labels?.length &&
|
|
45
|
-
!block.labels.includes(event.label),
|
|
46
|
-
),
|
|
41
|
+
Boolean(event.label && block?.labels?.length && !block.labels.includes(event.label)),
|
|
47
42
|
);
|
|
48
43
|
}),
|
|
49
44
|
[block],
|
package/src/ui-kit/Icon/Icon.tsx
CHANGED
|
@@ -48,6 +48,9 @@ export const Icon = JSX<IconProps>(
|
|
|
48
48
|
</Background>
|
|
49
49
|
);
|
|
50
50
|
}
|
|
51
|
+
if (!className.includes('h-')) {
|
|
52
|
+
imgProps['style'] = { height: `${imgProps.height}px` };
|
|
53
|
+
}
|
|
51
54
|
|
|
52
55
|
return (
|
|
53
56
|
<img
|
|
@@ -55,8 +58,8 @@ export const Icon = JSX<IconProps>(
|
|
|
55
58
|
src={href}
|
|
56
59
|
alt={alt}
|
|
57
60
|
title={title}
|
|
58
|
-
{...imgProps}
|
|
59
61
|
aria-hidden="true"
|
|
62
|
+
{...imgProps}
|
|
60
63
|
/>
|
|
61
64
|
);
|
|
62
65
|
},
|
package/src/ui-kit/List/List.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import {
|
|
4
|
-
useIntersectionObserver,
|
|
5
4
|
type IntersectionObserverOptions,
|
|
5
|
+
useIntersectionObserver,
|
|
6
6
|
} from '../../hooks/useIntersectionObserver';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -33,7 +33,6 @@ export const SwipeListItem = JSX<SwipeListControlItemProps>(
|
|
|
33
33
|
<div
|
|
34
34
|
className={`inline-block snap-always box-border ${className}`}
|
|
35
35
|
style={style}
|
|
36
|
-
role="listitem"
|
|
37
36
|
aria-current={Boolean(idx === activeIndex)}
|
|
38
37
|
ref={ref}
|
|
39
38
|
>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useLink } from '../../hooks/useLink';
|
|
3
3
|
import type { LinkProps } from '../../model/LinkProps';
|
|
4
|
+
import type { PreventableEvent } from '../../model/PreventableEvent';
|
|
4
5
|
import { style } from '../../utils/style';
|
|
5
6
|
|
|
6
7
|
export interface TopItemContent extends LinkProps {
|
|
@@ -11,7 +12,7 @@ export interface TopItemProps extends TopItemContent {
|
|
|
11
12
|
className?: string;
|
|
12
13
|
flat?: boolean;
|
|
13
14
|
dataItemName?: string;
|
|
14
|
-
onClick?: () => void;
|
|
15
|
+
onClick?: (ev?: PreventableEvent) => void;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
export const TopItem = JSX<TopItemProps>(({ className = '', active, flat, children, ...rest }) => {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const AccordionItemsList: import("@redneckz/uni-jsx").UNIComponent<{}, any, any>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Picture } from '../../model/Picture';
|
|
2
|
-
/**
|
|
3
|
-
* @title Элемент аккордиона
|
|
4
|
-
*/
|
|
5
|
-
export interface AccordionItemContent {
|
|
6
|
-
/**
|
|
7
|
-
* @title Название
|
|
8
|
-
* @default Список
|
|
9
|
-
*/
|
|
10
|
-
label?: string;
|
|
11
|
-
/** @title Отображать в раскрытом виде */
|
|
12
|
-
isExpanded?: boolean;
|
|
13
|
-
labelIcon?: Picture;
|
|
14
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { JSXBlock, UniBlockProps } from '../../model/JSXBlock';
|
|
2
|
-
import type { OtherProductsItemContent } from './OtherProductsItemContent';
|
|
3
|
-
export interface OtherProductsItemProps extends OtherProductsItemContent, UniBlockProps {
|
|
4
|
-
}
|
|
5
|
-
export declare const OtherProductsItem: JSXBlock<OtherProductsItemProps>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const AccordionItemsList: import("@redneckz/uni-jsx").UNIComponent<{}, any, any>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.AccordionItemsList = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
exports.AccordionItemsList = (0, uni_jsx_1.JSX)(({ children }) => ((0, jsx_runtime_1.jsx)("ul", { className: "list-none m-0 p-0", children: children })));
|
|
6
|
-
//# sourceMappingURL=AccordionItemsList.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionItemsList.js","sourceRoot":"","sources":["../../../src/components/Accordion/AccordionItemsList.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAE3B,QAAA,kBAAkB,GAAG,IAAA,aAAG,EAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CACtD,+BAAI,SAAS,EAAC,mBAAmB,YAAE,QAAQ,GAAM,CAClD,CAAC,CAAC"}
|