@redneckz/wildless-cms-uni-blocks 0.5.12 → 0.5.14
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 +136 -84
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Accordion/AccordionContent.d.ts +9 -7
- package/bundle/components/Accordion/AccordionItem.d.ts +1 -4
- package/bundle/components/Accordion/AccordionItem.mobile.d.ts +1 -4
- package/bundle/components/Accordion/AccordionItemProps.d.ts +5 -0
- package/bundle/components/Accordion/AccordionItemsList.d.ts +1 -0
- package/bundle/components/Blocks.d.ts +3 -1
- package/bundle/components/InvestmentInfo/InvestmentInfo.d.ts +5 -0
- package/bundle/components/InvestmentInfo/InvestmentInfoContent.d.ts +49 -0
- package/bundle/components/OtherProducts/OtherProducts.d.ts +2 -1
- package/bundle/components/OtherProducts/OtherProductsContent.d.ts +1 -21
- package/bundle/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
- package/bundle/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
- package/bundle/components/StepsBlock/renderItems.d.ts +7 -2
- package/bundle/components/StepsBlock/renderStepContent.d.ts +14 -0
- package/bundle/model/BlockDecorator.d.ts +1 -0
- package/bundle/model/BlocksRegistry.d.ts +4 -1
- package/bundle/ui-kit/Foldable/DefaultFoldButton.d.ts +14 -0
- package/bundle/ui-kit/Foldable/Foldable.d.ts +3 -10
- package/bundle/ui-kit/Foldable/FoldablePartProps.d.ts +4 -0
- package/bundle/ui-kit/Foldable/FoldableSection.d.ts +5 -0
- package/dist/components/Accordion/Accordion.js +3 -1
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/Accordion/Accordion.mobile.js +5 -2
- package/dist/components/Accordion/Accordion.mobile.js.map +1 -1
- package/dist/components/Accordion/AccordionContent.d.ts +9 -7
- package/dist/components/Accordion/AccordionItem.d.ts +1 -4
- package/dist/components/Accordion/AccordionItem.js +3 -8
- package/dist/components/Accordion/AccordionItem.js.map +1 -1
- package/dist/components/Accordion/AccordionItem.mobile.d.ts +1 -4
- package/dist/components/Accordion/AccordionItem.mobile.js +2 -5
- package/dist/components/Accordion/AccordionItem.mobile.js.map +1 -1
- package/dist/components/Accordion/AccordionItemProps.d.ts +5 -0
- package/dist/components/Accordion/AccordionItemProps.js +2 -0
- package/dist/components/Accordion/AccordionItemProps.js.map +1 -0
- package/dist/components/Accordion/AccordionItemsList.d.ts +1 -0
- package/dist/components/Accordion/AccordionItemsList.js +6 -0
- package/dist/components/Accordion/AccordionItemsList.js.map +1 -0
- package/dist/components/Blocks.d.ts +3 -1
- package/dist/components/Blocks.js +4 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/ContentPage/filterBlocks.js +1 -2
- package/dist/components/ContentPage/filterBlocks.js.map +1 -1
- package/dist/components/ContentPage/filterBlocks.mobile.js +1 -3
- package/dist/components/ContentPage/filterBlocks.mobile.js.map +1 -1
- package/dist/components/ContentPage/renderBlock.js +8 -7
- package/dist/components/ContentPage/renderBlock.js.map +1 -1
- package/dist/components/Footer/Footer.mobile.js +8 -7
- package/dist/components/Footer/Footer.mobile.js.map +1 -1
- package/dist/components/Header/Header.mobile.js +5 -5
- package/dist/components/Header/Header.mobile.js.map +1 -1
- package/dist/components/InvestmentInfo/InvestmentInfo.d.ts +5 -0
- package/dist/components/InvestmentInfo/InvestmentInfo.js +49 -0
- package/dist/components/InvestmentInfo/InvestmentInfo.js.map +1 -0
- package/dist/components/InvestmentInfo/InvestmentInfoContent.d.ts +49 -0
- package/dist/components/InvestmentInfo/InvestmentInfoContent.js +2 -0
- package/dist/components/InvestmentInfo/InvestmentInfoContent.js.map +1 -0
- package/dist/components/OtherProducts/OtherProducts.d.ts +2 -1
- package/dist/components/OtherProducts/OtherProducts.js +2 -4
- package/dist/components/OtherProducts/OtherProducts.js.map +1 -1
- package/dist/components/OtherProducts/OtherProductsContent.d.ts +1 -21
- package/dist/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
- package/dist/components/OtherProductsItem/OtherProductsItem.js +11 -0
- package/dist/components/OtherProductsItem/OtherProductsItem.js.map +1 -0
- package/dist/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
- package/dist/components/OtherProductsItem/OtherProductsItemContent.js +2 -0
- package/dist/components/OtherProductsItem/OtherProductsItemContent.js.map +1 -0
- package/dist/components/StepsBlock/StepsBlock.js +2 -8
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
- package/dist/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
- package/dist/components/StepsBlock/renderItems.d.ts +7 -2
- package/dist/components/StepsBlock/renderItems.js +5 -1
- package/dist/components/StepsBlock/renderItems.js.map +1 -1
- package/dist/components/StepsBlock/renderStepContent.d.ts +14 -0
- package/dist/components/StepsBlock/renderStepContent.js +20 -0
- package/dist/components/StepsBlock/renderStepContent.js.map +1 -0
- package/dist/components/TariffsTable/TariffsTable.js +11 -2
- package/dist/components/TariffsTable/TariffsTable.js.map +1 -1
- package/dist/model/BlockDecorator.d.ts +1 -0
- package/dist/model/BlockDecorator.js +2 -1
- package/dist/model/BlockDecorator.js.map +1 -1
- package/dist/model/BlocksRegistry.d.ts +4 -1
- package/dist/ui-kit/Foldable/DefaultFoldButton.d.ts +14 -0
- package/dist/ui-kit/Foldable/DefaultFoldButton.js +16 -0
- package/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -0
- package/dist/ui-kit/Foldable/Foldable.d.ts +3 -10
- package/dist/ui-kit/Foldable/Foldable.js +7 -23
- package/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/dist/ui-kit/Foldable/FoldablePartProps.d.ts +4 -0
- package/dist/ui-kit/Foldable/{FoldButtonProps.js → FoldablePartProps.js} +1 -1
- package/dist/ui-kit/Foldable/FoldablePartProps.js.map +1 -0
- package/dist/ui-kit/Foldable/FoldableSection.d.ts +5 -0
- package/dist/ui-kit/Foldable/FoldableSection.js +17 -0
- package/dist/ui-kit/Foldable/FoldableSection.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/Accordion/Accordion.js +3 -1
- package/lib/components/Accordion/Accordion.js.map +1 -1
- package/lib/components/Accordion/Accordion.mobile.js +5 -2
- package/lib/components/Accordion/Accordion.mobile.js.map +1 -1
- package/lib/components/Accordion/AccordionContent.d.ts +9 -7
- package/lib/components/Accordion/AccordionItem.d.ts +1 -4
- package/lib/components/Accordion/AccordionItem.js +3 -8
- package/lib/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/components/Accordion/AccordionItem.mobile.d.ts +1 -4
- package/lib/components/Accordion/AccordionItem.mobile.js +2 -5
- package/lib/components/Accordion/AccordionItem.mobile.js.map +1 -1
- package/lib/components/Accordion/AccordionItemProps.d.ts +5 -0
- package/lib/components/Accordion/AccordionItemProps.js +2 -0
- package/lib/components/Accordion/AccordionItemProps.js.map +1 -0
- package/lib/components/Accordion/AccordionItemsList.d.ts +1 -0
- package/lib/components/Accordion/AccordionItemsList.js +4 -0
- package/lib/components/Accordion/AccordionItemsList.js.map +1 -0
- package/lib/components/Blocks.d.ts +3 -1
- package/lib/components/Blocks.js +4 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/ContentPage/filterBlocks.js +1 -2
- package/lib/components/ContentPage/filterBlocks.js.map +1 -1
- package/lib/components/ContentPage/filterBlocks.mobile.js +1 -3
- package/lib/components/ContentPage/filterBlocks.mobile.js.map +1 -1
- package/lib/components/ContentPage/renderBlock.js +9 -8
- package/lib/components/ContentPage/renderBlock.js.map +1 -1
- package/lib/components/Footer/Footer.mobile.js +8 -7
- package/lib/components/Footer/Footer.mobile.js.map +1 -1
- package/lib/components/Header/Header.mobile.js +5 -5
- package/lib/components/Header/Header.mobile.js.map +1 -1
- package/lib/components/InvestmentInfo/InvestmentInfo.d.ts +5 -0
- package/lib/components/InvestmentInfo/InvestmentInfo.fixture.d.ts +7 -0
- package/lib/components/InvestmentInfo/InvestmentInfo.js +47 -0
- package/lib/components/InvestmentInfo/InvestmentInfo.js.map +1 -0
- package/lib/components/InvestmentInfo/InvestmentInfoContent.d.ts +49 -0
- package/lib/components/InvestmentInfo/InvestmentInfoContent.js +2 -0
- package/lib/components/InvestmentInfo/InvestmentInfoContent.js.map +1 -0
- package/lib/components/OtherProducts/OtherProducts.d.ts +2 -1
- package/lib/components/OtherProducts/OtherProducts.fixture.d.ts +1 -0
- package/lib/components/OtherProducts/OtherProducts.js +2 -4
- package/lib/components/OtherProducts/OtherProducts.js.map +1 -1
- package/lib/components/OtherProducts/OtherProductsContent.d.ts +1 -21
- package/lib/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
- package/lib/components/OtherProductsItem/OtherProductsItem.fixture.d.ts +5 -0
- package/lib/components/OtherProductsItem/OtherProductsItem.js +9 -0
- package/lib/components/OtherProductsItem/OtherProductsItem.js.map +1 -0
- package/lib/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
- package/lib/components/OtherProductsItem/OtherProductsItemContent.js +2 -0
- package/lib/components/OtherProductsItem/OtherProductsItemContent.js.map +1 -0
- package/lib/components/StepsBlock/StepsBlock.fixture.d.ts +2 -1
- package/lib/components/StepsBlock/StepsBlock.js +2 -8
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
- package/lib/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
- package/lib/components/StepsBlock/renderItems.d.ts +7 -2
- package/lib/components/StepsBlock/renderItems.js +6 -2
- package/lib/components/StepsBlock/renderItems.js.map +1 -1
- package/lib/components/StepsBlock/renderStepContent.d.ts +14 -0
- package/lib/components/StepsBlock/renderStepContent.js +17 -0
- package/lib/components/StepsBlock/renderStepContent.js.map +1 -0
- package/lib/components/TariffsTable/TariffsTable.js +11 -2
- package/lib/components/TariffsTable/TariffsTable.js.map +1 -1
- package/lib/model/BlockDecorator.d.ts +1 -0
- package/lib/model/BlockDecorator.js +1 -0
- package/lib/model/BlockDecorator.js.map +1 -1
- package/lib/model/BlocksRegistry.d.ts +4 -1
- package/lib/ui-kit/Foldable/DefaultFoldButton.d.ts +14 -0
- package/lib/ui-kit/Foldable/DefaultFoldButton.js +13 -0
- package/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -0
- package/lib/ui-kit/Foldable/Foldable.d.ts +3 -10
- package/lib/ui-kit/Foldable/Foldable.js +9 -25
- package/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/lib/ui-kit/Foldable/FoldablePartProps.d.ts +4 -0
- package/lib/ui-kit/Foldable/FoldablePartProps.js +2 -0
- package/lib/ui-kit/Foldable/FoldablePartProps.js.map +1 -0
- package/lib/ui-kit/Foldable/FoldableSection.d.ts +5 -0
- package/lib/ui-kit/Foldable/FoldableSection.js +15 -0
- package/lib/ui-kit/Foldable/FoldableSection.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +138 -159
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Accordion/AccordionContent.d.ts +9 -7
- package/mobile/bundle/components/Accordion/AccordionItem.d.ts +1 -4
- package/mobile/bundle/components/Accordion/AccordionItemProps.d.ts +5 -0
- package/mobile/bundle/components/Accordion/AccordionItemsList.d.ts +1 -0
- package/mobile/bundle/components/InvestmentInfo/InvestmentInfo.d.ts +5 -0
- package/mobile/bundle/components/InvestmentInfo/InvestmentInfoContent.d.ts +49 -0
- package/mobile/bundle/components/OtherProducts/OtherProducts.d.ts +2 -1
- package/mobile/bundle/components/OtherProducts/OtherProductsContent.d.ts +1 -21
- package/mobile/bundle/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
- package/mobile/bundle/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
- package/mobile/bundle/components/StepsBlock/renderItems.d.ts +7 -2
- package/mobile/bundle/components/StepsBlock/renderStepContent.d.ts +14 -0
- package/mobile/bundle/model/BlockDecorator.d.ts +1 -0
- package/mobile/bundle/model/BlocksRegistry.d.ts +4 -1
- package/mobile/bundle/ui-kit/Foldable/DefaultFoldButton.d.ts +14 -0
- package/mobile/bundle/ui-kit/Foldable/Foldable.d.ts +3 -10
- package/mobile/bundle/ui-kit/Foldable/FoldablePartProps.d.ts +4 -0
- package/mobile/bundle/ui-kit/Foldable/FoldableSection.d.ts +5 -0
- package/mobile/dist/components/Accordion/Accordion.js +5 -2
- package/mobile/dist/components/Accordion/Accordion.js.map +1 -1
- package/mobile/dist/components/Accordion/AccordionContent.d.ts +9 -7
- package/mobile/dist/components/Accordion/AccordionItem.d.ts +1 -4
- package/mobile/dist/components/Accordion/AccordionItem.js +2 -5
- package/mobile/dist/components/Accordion/AccordionItem.js.map +1 -1
- package/mobile/dist/components/Accordion/AccordionItemProps.d.ts +5 -0
- package/mobile/dist/components/Accordion/AccordionItemProps.js +2 -0
- package/mobile/dist/components/Accordion/AccordionItemProps.js.map +1 -0
- package/mobile/dist/components/Accordion/AccordionItemsList.d.ts +1 -0
- package/mobile/dist/components/Accordion/AccordionItemsList.js +6 -0
- package/mobile/dist/components/Accordion/AccordionItemsList.js.map +1 -0
- package/mobile/dist/components/ContentPage/filterBlocks.js +1 -3
- package/mobile/dist/components/ContentPage/filterBlocks.js.map +1 -1
- package/mobile/dist/components/ContentPage/renderBlock.js +8 -7
- package/mobile/dist/components/ContentPage/renderBlock.js.map +1 -1
- package/mobile/dist/components/Footer/Footer.js +8 -7
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/dist/components/Header/Header.js +5 -5
- package/mobile/dist/components/Header/Header.js.map +1 -1
- package/mobile/dist/components/InvestmentInfo/InvestmentInfo.d.ts +5 -0
- package/mobile/dist/components/InvestmentInfo/InvestmentInfo.js +49 -0
- package/mobile/dist/components/InvestmentInfo/InvestmentInfo.js.map +1 -0
- package/mobile/dist/components/InvestmentInfo/InvestmentInfoContent.d.ts +49 -0
- package/mobile/dist/components/InvestmentInfo/InvestmentInfoContent.js +2 -0
- package/mobile/dist/components/InvestmentInfo/InvestmentInfoContent.js.map +1 -0
- package/mobile/dist/components/OtherProducts/OtherProducts.d.ts +2 -1
- package/mobile/dist/components/OtherProducts/OtherProducts.js +2 -4
- package/mobile/dist/components/OtherProducts/OtherProducts.js.map +1 -1
- package/mobile/dist/components/OtherProducts/OtherProductsContent.d.ts +1 -21
- package/mobile/dist/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
- package/mobile/dist/components/OtherProductsItem/OtherProductsItem.js +11 -0
- package/mobile/dist/components/OtherProductsItem/OtherProductsItem.js.map +1 -0
- package/mobile/dist/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
- package/mobile/dist/components/OtherProductsItem/OtherProductsItemContent.js +2 -0
- package/mobile/dist/components/OtherProductsItem/OtherProductsItemContent.js.map +1 -0
- package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
- package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
- package/mobile/dist/components/StepsBlock/renderItems.d.ts +7 -2
- package/mobile/dist/components/StepsBlock/renderItems.js +5 -1
- package/mobile/dist/components/StepsBlock/renderItems.js.map +1 -1
- package/mobile/dist/components/StepsBlock/renderStepContent.d.ts +14 -0
- package/mobile/dist/components/StepsBlock/renderStepContent.js +20 -0
- package/mobile/dist/components/StepsBlock/renderStepContent.js.map +1 -0
- package/mobile/dist/model/BlockDecorator.d.ts +1 -0
- package/mobile/dist/model/BlockDecorator.js +2 -1
- package/mobile/dist/model/BlockDecorator.js.map +1 -1
- package/mobile/dist/model/BlocksRegistry.d.ts +4 -1
- package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.d.ts +14 -0
- package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js +16 -0
- package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -0
- package/mobile/dist/ui-kit/Foldable/Foldable.d.ts +3 -10
- package/mobile/dist/ui-kit/Foldable/Foldable.js +7 -23
- package/mobile/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/dist/ui-kit/Foldable/FoldablePartProps.d.ts +4 -0
- package/mobile/dist/ui-kit/Foldable/{FoldButtonProps.js → FoldablePartProps.js} +1 -1
- package/mobile/dist/ui-kit/Foldable/FoldablePartProps.js.map +1 -0
- package/mobile/dist/ui-kit/Foldable/FoldableSection.d.ts +5 -0
- package/mobile/dist/ui-kit/Foldable/FoldableSection.js +17 -0
- package/mobile/dist/ui-kit/Foldable/FoldableSection.js.map +1 -0
- package/mobile/lib/components/Accordion/Accordion.js +5 -2
- package/mobile/lib/components/Accordion/Accordion.js.map +1 -1
- package/mobile/lib/components/Accordion/AccordionContent.d.ts +9 -7
- package/mobile/lib/components/Accordion/AccordionItem.d.ts +1 -4
- package/mobile/lib/components/Accordion/AccordionItem.js +2 -5
- package/mobile/lib/components/Accordion/AccordionItem.js.map +1 -1
- package/mobile/lib/components/Accordion/AccordionItemProps.d.ts +5 -0
- package/mobile/lib/components/Accordion/AccordionItemProps.js +2 -0
- package/mobile/lib/components/Accordion/AccordionItemProps.js.map +1 -0
- package/mobile/lib/components/Accordion/AccordionItemsList.d.ts +1 -0
- package/mobile/lib/components/Accordion/AccordionItemsList.js +4 -0
- package/mobile/lib/components/Accordion/AccordionItemsList.js.map +1 -0
- package/mobile/lib/components/ContentPage/filterBlocks.js +1 -3
- package/mobile/lib/components/ContentPage/filterBlocks.js.map +1 -1
- package/mobile/lib/components/ContentPage/renderBlock.js +9 -8
- package/mobile/lib/components/ContentPage/renderBlock.js.map +1 -1
- package/mobile/lib/components/Footer/Footer.js +8 -7
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/components/Header/Header.js +5 -5
- package/mobile/lib/components/Header/Header.js.map +1 -1
- package/mobile/lib/components/InvestmentInfo/InvestmentInfo.d.ts +5 -0
- package/mobile/lib/components/InvestmentInfo/InvestmentInfo.js +47 -0
- package/mobile/lib/components/InvestmentInfo/InvestmentInfo.js.map +1 -0
- package/mobile/lib/components/InvestmentInfo/InvestmentInfoContent.d.ts +49 -0
- package/mobile/lib/components/InvestmentInfo/InvestmentInfoContent.js +2 -0
- package/mobile/lib/components/InvestmentInfo/InvestmentInfoContent.js.map +1 -0
- package/mobile/lib/components/OtherProducts/OtherProducts.d.ts +2 -1
- package/mobile/lib/components/OtherProducts/OtherProducts.js +2 -4
- package/mobile/lib/components/OtherProducts/OtherProducts.js.map +1 -1
- package/mobile/lib/components/OtherProducts/OtherProductsContent.d.ts +1 -21
- package/mobile/lib/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
- package/mobile/lib/components/OtherProductsItem/OtherProductsItem.js +9 -0
- package/mobile/lib/components/OtherProductsItem/OtherProductsItem.js.map +1 -0
- package/mobile/lib/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
- package/mobile/lib/components/OtherProductsItem/OtherProductsItemContent.js +2 -0
- package/mobile/lib/components/OtherProductsItem/OtherProductsItemContent.js.map +1 -0
- package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
- package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
- package/mobile/lib/components/StepsBlock/renderItems.d.ts +7 -2
- package/mobile/lib/components/StepsBlock/renderItems.js +6 -2
- package/mobile/lib/components/StepsBlock/renderItems.js.map +1 -1
- package/mobile/lib/components/StepsBlock/renderStepContent.d.ts +14 -0
- package/mobile/lib/components/StepsBlock/renderStepContent.js +17 -0
- package/mobile/lib/components/StepsBlock/renderStepContent.js.map +1 -0
- package/mobile/lib/model/BlockDecorator.d.ts +1 -0
- package/mobile/lib/model/BlockDecorator.js +1 -0
- package/mobile/lib/model/BlockDecorator.js.map +1 -1
- package/mobile/lib/model/BlocksRegistry.d.ts +4 -1
- package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.d.ts +14 -0
- package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js +13 -0
- package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -0
- package/mobile/lib/ui-kit/Foldable/Foldable.d.ts +3 -10
- package/mobile/lib/ui-kit/Foldable/Foldable.js +9 -25
- package/mobile/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/lib/ui-kit/Foldable/FoldablePartProps.d.ts +4 -0
- package/mobile/lib/ui-kit/Foldable/FoldablePartProps.js +2 -0
- package/mobile/lib/ui-kit/Foldable/FoldablePartProps.js.map +1 -0
- package/mobile/lib/ui-kit/Foldable/FoldableSection.d.ts +5 -0
- package/mobile/lib/ui-kit/Foldable/FoldableSection.js +15 -0
- package/mobile/lib/ui-kit/Foldable/FoldableSection.js.map +1 -0
- package/mobile/src/common.css +11 -3
- package/mobile/src/components/Accordion/Accordion.tsx +17 -7
- package/mobile/src/components/Accordion/AccordionContent.ts +10 -7
- package/mobile/src/components/Accordion/AccordionItem.tsx +34 -30
- package/mobile/src/components/Accordion/AccordionItemProps.ts +6 -0
- package/mobile/src/components/Accordion/AccordionItemsList.tsx +5 -0
- package/mobile/src/components/ContentPage/filterBlocks.ts +1 -3
- package/mobile/src/components/ContentPage/renderBlock.tsx +16 -11
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.ui.json +8 -1
- package/mobile/src/components/Footer/Footer.tsx +15 -13
- package/mobile/src/components/GracePeriod/GracePeriod.ui.json +5 -0
- package/mobile/src/components/Header/Header.tsx +16 -11
- package/mobile/src/components/InvestmentInfo/InvestmentInfo.example.json +48 -0
- package/mobile/src/components/InvestmentInfo/InvestmentInfo.tsx +149 -0
- package/mobile/src/components/InvestmentInfo/InvestmentInfo.ui.json +16 -0
- package/mobile/src/components/InvestmentInfo/InvestmentInfoContent.ts +55 -0
- package/mobile/src/components/OtherProducts/OtherProducts.example.json +1 -54
- package/mobile/src/components/OtherProducts/OtherProducts.tsx +13 -24
- package/mobile/src/components/OtherProducts/OtherProducts.ui.json +1 -76
- package/mobile/src/components/OtherProducts/OtherProductsContent.ts +1 -22
- package/mobile/src/components/OtherProductsItem/OtherProductsItem.example.json +3 -0
- package/mobile/src/components/OtherProductsItem/OtherProductsItem.tsx +39 -0
- package/mobile/src/components/OtherProductsItem/OtherProductsItem.ui.json +1 -0
- package/mobile/src/components/OtherProductsItem/OtherProductsItemContent.ts +17 -0
- package/mobile/src/components/SafeDepositRental/SafeDepositRental.ui.json +8 -1
- package/mobile/src/components/StepsBlock/StepsBlockStyleMaps.ts +2 -2
- package/mobile/src/components/StepsBlock/renderItems.tsx +24 -15
- package/mobile/src/components/StepsBlock/renderStepContent.tsx +63 -0
- package/mobile/src/model/BlockDecorator.ts +2 -0
- package/mobile/src/model/BlocksRegistry.ts +4 -1
- package/mobile/src/ui-kit/Foldable/DefaultFoldButton.tsx +52 -0
- package/mobile/src/ui-kit/Foldable/Foldable.tsx +19 -67
- package/mobile/src/ui-kit/Foldable/FoldablePartProps.ts +4 -0
- package/mobile/src/ui-kit/Foldable/FoldableSection.tsx +30 -0
- package/package.json +2 -2
- package/src/common.css +11 -3
- package/src/components/Accordion/Accordion.mobile.tsx +17 -7
- package/src/components/Accordion/Accordion.tsx +12 -3
- package/src/components/Accordion/AccordionContent.ts +10 -7
- package/src/components/Accordion/AccordionItem.mobile.tsx +34 -30
- package/src/components/Accordion/AccordionItem.tsx +24 -23
- package/src/components/Accordion/AccordionItemProps.ts +6 -0
- package/src/components/Accordion/AccordionItemsList.tsx +5 -0
- package/src/components/Blocks.ts +4 -0
- package/src/components/ContentPage/filterBlocks.mobile.ts +1 -3
- package/src/components/ContentPage/filterBlocks.ts +1 -2
- package/src/components/ContentPage/renderBlock.tsx +16 -11
- package/src/components/ExchangeRateTile/ExchangeRateTile.ui.json +8 -1
- package/src/components/Footer/Footer.mobile.tsx +15 -13
- package/src/components/GracePeriod/GracePeriod.ui.json +5 -0
- package/src/components/Header/Header.mobile.tsx +16 -11
- package/src/components/InvestmentInfo/InvestmentInfo.example.json +48 -0
- package/src/components/InvestmentInfo/InvestmentInfo.fixture.tsx +107 -0
- package/src/components/InvestmentInfo/InvestmentInfo.tsx +149 -0
- package/src/components/InvestmentInfo/InvestmentInfo.ui.json +16 -0
- package/src/components/InvestmentInfo/InvestmentInfoContent.ts +55 -0
- package/src/components/OtherProducts/OtherProducts.example.json +1 -54
- package/src/components/OtherProducts/OtherProducts.fixture.tsx +77 -126
- package/src/components/OtherProducts/OtherProducts.tsx +13 -24
- package/src/components/OtherProducts/OtherProducts.ui.json +1 -76
- package/src/components/OtherProducts/OtherProductsContent.ts +1 -22
- package/src/components/OtherProductsItem/OtherProductsItem.example.json +3 -0
- package/src/components/OtherProductsItem/OtherProductsItem.fixture.tsx +5 -0
- package/src/components/OtherProductsItem/OtherProductsItem.tsx +39 -0
- package/src/components/OtherProductsItem/OtherProductsItem.ui.json +1 -0
- package/src/components/OtherProductsItem/OtherProductsItemContent.ts +17 -0
- package/src/components/SafeDepositRental/SafeDepositRental.ui.json +8 -1
- package/src/components/StepsBlock/StepsBlock.fixture.tsx +39 -25
- package/src/components/StepsBlock/StepsBlock.tsx +3 -49
- package/src/components/StepsBlock/StepsBlockStyleMaps.ts +2 -2
- package/src/components/StepsBlock/renderItems.tsx +24 -15
- package/src/components/StepsBlock/renderStepContent.tsx +63 -0
- package/src/components/TariffsTable/TariffsTable.tsx +32 -23
- package/src/model/BlockDecorator.ts +2 -0
- package/src/model/BlocksRegistry.ts +4 -1
- package/src/ui-kit/Foldable/DefaultFoldButton.tsx +52 -0
- package/src/ui-kit/Foldable/Foldable.tsx +19 -67
- package/src/ui-kit/Foldable/FoldablePartProps.ts +4 -0
- package/src/ui-kit/Foldable/FoldableSection.tsx +30 -0
- package/tailwind.config.cjs +5 -0
- package/bundle/components/ContentPage/isBlockInRegistry.d.ts +0 -2
- package/bundle/components/OtherProducts/OtherProductsItem.d.ts +0 -6
- package/bundle/ui-kit/Foldable/DefaultButton.d.ts +0 -2
- package/bundle/ui-kit/Foldable/FoldButtonProps.d.ts +0 -12
- package/bundle/utils/getAccordionItems.d.ts +0 -1
- package/dist/components/ContentPage/isBlockInRegistry.d.ts +0 -2
- package/dist/components/ContentPage/isBlockInRegistry.js +0 -7
- package/dist/components/ContentPage/isBlockInRegistry.js.map +0 -1
- package/dist/components/OtherProducts/OtherProductsItem.d.ts +0 -6
- package/dist/components/OtherProducts/OtherProductsItem.js +0 -19
- package/dist/components/OtherProducts/OtherProductsItem.js.map +0 -1
- package/dist/ui-kit/Foldable/DefaultButton.d.ts +0 -2
- package/dist/ui-kit/Foldable/DefaultButton.js +0 -12
- package/dist/ui-kit/Foldable/DefaultButton.js.map +0 -1
- package/dist/ui-kit/Foldable/FoldButtonProps.d.ts +0 -12
- package/dist/ui-kit/Foldable/FoldButtonProps.js.map +0 -1
- package/dist/utils/getAccordionItems.d.ts +0 -1
- package/dist/utils/getAccordionItems.js +0 -13
- package/dist/utils/getAccordionItems.js.map +0 -1
- package/lib/components/ContentPage/isBlockInRegistry.d.ts +0 -2
- package/lib/components/ContentPage/isBlockInRegistry.js +0 -4
- package/lib/components/ContentPage/isBlockInRegistry.js.map +0 -1
- package/lib/components/OtherProducts/OtherProductsItem.d.ts +0 -6
- package/lib/components/OtherProducts/OtherProductsItem.js +0 -17
- package/lib/components/OtherProducts/OtherProductsItem.js.map +0 -1
- package/lib/ui-kit/Foldable/DefaultButton.d.ts +0 -2
- package/lib/ui-kit/Foldable/DefaultButton.js +0 -10
- package/lib/ui-kit/Foldable/DefaultButton.js.map +0 -1
- package/lib/ui-kit/Foldable/FoldButtonProps.d.ts +0 -12
- package/lib/ui-kit/Foldable/FoldButtonProps.js +0 -2
- package/lib/ui-kit/Foldable/FoldButtonProps.js.map +0 -1
- package/lib/utils/getAccordionItems.d.ts +0 -1
- package/lib/utils/getAccordionItems.js +0 -10
- package/lib/utils/getAccordionItems.js.map +0 -1
- package/mobile/bundle/components/ContentPage/isBlockInRegistry.d.ts +0 -2
- package/mobile/bundle/components/OtherProducts/OtherProductsItem.d.ts +0 -6
- package/mobile/bundle/ui-kit/Foldable/DefaultButton.d.ts +0 -2
- package/mobile/bundle/ui-kit/Foldable/FoldButtonProps.d.ts +0 -12
- package/mobile/bundle/utils/getAccordionItems.d.ts +0 -1
- package/mobile/dist/components/ContentPage/isBlockInRegistry.d.ts +0 -2
- package/mobile/dist/components/ContentPage/isBlockInRegistry.js +0 -7
- package/mobile/dist/components/ContentPage/isBlockInRegistry.js.map +0 -1
- package/mobile/dist/components/OtherProducts/OtherProductsItem.d.ts +0 -6
- package/mobile/dist/components/OtherProducts/OtherProductsItem.js +0 -19
- package/mobile/dist/components/OtherProducts/OtherProductsItem.js.map +0 -1
- package/mobile/dist/ui-kit/Foldable/DefaultButton.d.ts +0 -2
- package/mobile/dist/ui-kit/Foldable/DefaultButton.js +0 -12
- package/mobile/dist/ui-kit/Foldable/DefaultButton.js.map +0 -1
- package/mobile/dist/ui-kit/Foldable/FoldButtonProps.d.ts +0 -12
- package/mobile/dist/ui-kit/Foldable/FoldButtonProps.js.map +0 -1
- package/mobile/dist/utils/getAccordionItems.d.ts +0 -1
- package/mobile/dist/utils/getAccordionItems.js +0 -13
- package/mobile/dist/utils/getAccordionItems.js.map +0 -1
- package/mobile/lib/components/ContentPage/isBlockInRegistry.d.ts +0 -2
- package/mobile/lib/components/ContentPage/isBlockInRegistry.js +0 -4
- package/mobile/lib/components/ContentPage/isBlockInRegistry.js.map +0 -1
- package/mobile/lib/components/OtherProducts/OtherProductsItem.d.ts +0 -6
- package/mobile/lib/components/OtherProducts/OtherProductsItem.js +0 -17
- package/mobile/lib/components/OtherProducts/OtherProductsItem.js.map +0 -1
- package/mobile/lib/ui-kit/Foldable/DefaultButton.d.ts +0 -2
- package/mobile/lib/ui-kit/Foldable/DefaultButton.js +0 -10
- package/mobile/lib/ui-kit/Foldable/DefaultButton.js.map +0 -1
- package/mobile/lib/ui-kit/Foldable/FoldButtonProps.d.ts +0 -12
- package/mobile/lib/ui-kit/Foldable/FoldButtonProps.js +0 -2
- package/mobile/lib/ui-kit/Foldable/FoldButtonProps.js.map +0 -1
- package/mobile/lib/utils/getAccordionItems.d.ts +0 -1
- package/mobile/lib/utils/getAccordionItems.js +0 -10
- package/mobile/lib/utils/getAccordionItems.js.map +0 -1
- package/mobile/src/components/ContentPage/isBlockInRegistry.ts +0 -5
- package/mobile/src/components/OtherProducts/OtherProductsItem.tsx +0 -49
- package/mobile/src/ui-kit/Foldable/DefaultButton.tsx +0 -27
- package/mobile/src/ui-kit/Foldable/FoldButtonProps.ts +0 -13
- package/mobile/src/utils/getAccordionItems.ts +0 -10
- package/src/components/ContentPage/isBlockInRegistry.ts +0 -5
- package/src/components/OtherProducts/OtherProductsItem.tsx +0 -49
- package/src/ui-kit/Foldable/DefaultButton.tsx +0 -27
- package/src/ui-kit/Foldable/FoldButtonProps.ts +0 -13
- package/src/utils/getAccordionItems.ts +0 -10
|
@@ -1,32 +1,21 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import type { JSXBlock } from '../../model/BlocksRegistry';
|
|
2
3
|
import type { UniBlockProps } from '../../model/ContentPageDef';
|
|
3
4
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
4
5
|
import type { OtherProductsContent } from './OtherProductsContent';
|
|
5
|
-
import { OtherProductsItem } from './OtherProductsItem';
|
|
6
6
|
|
|
7
7
|
export interface OtherProductsProps extends OtherProductsContent, UniBlockProps {}
|
|
8
8
|
|
|
9
9
|
export const OtherProducts = JSX<OtherProductsProps>(
|
|
10
|
-
({
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
>
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
{...item}
|
|
23
|
-
dataTheme={colorPalette}
|
|
24
|
-
context={context}
|
|
25
|
-
/>
|
|
26
|
-
))}
|
|
27
|
-
</div>
|
|
28
|
-
) : null}
|
|
29
|
-
</BlockWrapper>
|
|
30
|
-
);
|
|
31
|
-
},
|
|
32
|
-
);
|
|
10
|
+
({ context, className = '', children, ...rest }) => (
|
|
11
|
+
<BlockWrapper
|
|
12
|
+
context={context}
|
|
13
|
+
className={`font-sans text-primary-text ${className}`}
|
|
14
|
+
{...rest}
|
|
15
|
+
>
|
|
16
|
+
{children ? <div className="box-border1">{children}</div> : null}
|
|
17
|
+
</BlockWrapper>
|
|
18
|
+
),
|
|
19
|
+
) as JSXBlock<OtherProductsProps>;
|
|
20
|
+
|
|
21
|
+
OtherProducts.childrenTypes = ['OtherProductsItem'];
|
|
@@ -1,76 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"content": {
|
|
3
|
-
"blockItems": {
|
|
4
|
-
"items": {
|
|
5
|
-
"blocks": {
|
|
6
|
-
"items": {
|
|
7
|
-
"blockListType": {
|
|
8
|
-
"ui:widget": "hidden"
|
|
9
|
-
},
|
|
10
|
-
"image": {
|
|
11
|
-
"ui:field": "picture"
|
|
12
|
-
},
|
|
13
|
-
"benefitList": {
|
|
14
|
-
"items": {
|
|
15
|
-
"description": {
|
|
16
|
-
"benefitType": {
|
|
17
|
-
"ui:widget": "hidden"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"icon": {
|
|
21
|
-
"ui:field": "icon"
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
"style": {
|
|
26
|
-
"ui:field": "style"
|
|
27
|
-
},
|
|
28
|
-
"benefits": {
|
|
29
|
-
"items": {
|
|
30
|
-
"icon": {
|
|
31
|
-
"ui:field": "icon"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"buttons": {
|
|
36
|
-
"items": {
|
|
37
|
-
"icon": {
|
|
38
|
-
"ui:field": "icon"
|
|
39
|
-
},
|
|
40
|
-
"iconRight": {
|
|
41
|
-
"ui:field": "icon"
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
"icon": {
|
|
46
|
-
"ui:field": "icon"
|
|
47
|
-
},
|
|
48
|
-
"backwardButton": {
|
|
49
|
-
"icon": {
|
|
50
|
-
"ui:field": "icon"
|
|
51
|
-
},
|
|
52
|
-
"iconRight": {
|
|
53
|
-
"ui:field": "icon"
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
"cards": {
|
|
57
|
-
"items": {
|
|
58
|
-
"image": {
|
|
59
|
-
"ui:field": "picture"
|
|
60
|
-
},
|
|
61
|
-
"button": {
|
|
62
|
-
"icon": {
|
|
63
|
-
"ui:field": "icon"
|
|
64
|
-
},
|
|
65
|
-
"iconRight": {
|
|
66
|
-
"ui:field": "icon"
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
1
|
+
{}
|
|
@@ -1,27 +1,6 @@
|
|
|
1
|
-
import type { ColorPalette } from '../../model/ContentPageDef';
|
|
2
1
|
import type { TitleProps } from '../../model/HeadlineType';
|
|
3
|
-
import type { BlockDef } from '../../ui-kit/BlocksList/BlocksListProps';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @title Элемент списка
|
|
7
|
-
*/
|
|
8
|
-
export interface BlockItemCommonProps {
|
|
9
|
-
/**
|
|
10
|
-
* @title Название
|
|
11
|
-
* @default Список
|
|
12
|
-
*/
|
|
13
|
-
label?: string;
|
|
14
|
-
/** @title Отображать в раскрытом виде */
|
|
15
|
-
isUnfolded?: boolean;
|
|
16
|
-
/** @title Блоки */
|
|
17
|
-
blocks?: BlockDef[];
|
|
18
|
-
}
|
|
19
2
|
|
|
20
3
|
/**
|
|
21
4
|
* @title Другие продукты
|
|
22
5
|
*/
|
|
23
|
-
export type OtherProductsContent = TitleProps
|
|
24
|
-
/** @title Список */
|
|
25
|
-
blockItems?: BlockItemCommonProps[];
|
|
26
|
-
colorPalette?: ColorPalette;
|
|
27
|
-
};
|
|
6
|
+
export type OtherProductsContent = TitleProps;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { JSXBlock } from '../../model/BlocksRegistry';
|
|
3
|
+
import type { UniBlockProps } from '../../model/ContentPageDef';
|
|
4
|
+
import { DefaultFoldButton } from '../../ui-kit/Foldable/DefaultFoldButton';
|
|
5
|
+
import { Foldable } from '../../ui-kit/Foldable/Foldable';
|
|
6
|
+
import { FoldableSection } from '../../ui-kit/Foldable/FoldableSection';
|
|
7
|
+
import type { IconName } from '../../ui-kit/Icon/IconProps';
|
|
8
|
+
import type { OtherProductsItemContent } from './OtherProductsItemContent';
|
|
9
|
+
|
|
10
|
+
export interface OtherProductsItemProps extends OtherProductsItemContent, UniBlockProps {}
|
|
11
|
+
|
|
12
|
+
const icons: IconName[] = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
13
|
+
|
|
14
|
+
export const OtherProductsItem = JSX<OtherProductsItemProps>(
|
|
15
|
+
({ className, label = '', colorPalette, isUnfolded: unfoldedByDefault, children }) => (
|
|
16
|
+
<div className={`border-0 border-b border-solid border-main-divider ${className}`}>
|
|
17
|
+
<Foldable
|
|
18
|
+
unfoldedByDefault={unfoldedByDefault}
|
|
19
|
+
renderFoldableSection={({ isUnfolded }) => (
|
|
20
|
+
<div className="box-border">
|
|
21
|
+
<FoldableSection className="grid grid-cols-12 gap-1 border-box" isUnfolded={isUnfolded}>
|
|
22
|
+
{children}
|
|
23
|
+
</FoldableSection>
|
|
24
|
+
</div>
|
|
25
|
+
)}
|
|
26
|
+
renderFoldButton={({ isUnfolded, onToggle }) => (
|
|
27
|
+
<DefaultFoldButton
|
|
28
|
+
label={label}
|
|
29
|
+
icon={icons[Number(isUnfolded)]}
|
|
30
|
+
dataTheme={colorPalette}
|
|
31
|
+
onClick={onToggle}
|
|
32
|
+
/>
|
|
33
|
+
)}
|
|
34
|
+
/>
|
|
35
|
+
</div>
|
|
36
|
+
),
|
|
37
|
+
) as JSXBlock<OtherProductsItemProps>;
|
|
38
|
+
|
|
39
|
+
OtherProductsItem.childrenTypes = []; // All types of blocks are suitable
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ColorPalette } from '../../model/ContentPageDef';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @title Элемент списка
|
|
5
|
+
*/
|
|
6
|
+
export interface OtherProductsItemContent {
|
|
7
|
+
/**
|
|
8
|
+
* @title Название
|
|
9
|
+
* @default Список
|
|
10
|
+
*/
|
|
11
|
+
label?: string;
|
|
12
|
+
|
|
13
|
+
/** @title Отображать в раскрытом виде */
|
|
14
|
+
isUnfolded?: boolean;
|
|
15
|
+
|
|
16
|
+
colorPalette?: ColorPalette;
|
|
17
|
+
}
|
|
@@ -14,7 +14,7 @@ export const STEPS_BLOCK_STYLE_MAPS: Record<BlockVersion, StyleType> = {
|
|
|
14
14
|
primary: {
|
|
15
15
|
background: 'bg-white',
|
|
16
16
|
title: 'text-primary-text',
|
|
17
|
-
description: 'text-secondary-text',
|
|
17
|
+
description: '!text-secondary-text text-l-light',
|
|
18
18
|
iconText: 'text-secondary-text',
|
|
19
19
|
iconBackground: 'bg-main-divider',
|
|
20
20
|
iconConnector: 'bg-secondary-light',
|
|
@@ -23,7 +23,7 @@ export const STEPS_BLOCK_STYLE_MAPS: Record<BlockVersion, StyleType> = {
|
|
|
23
23
|
secondary: {
|
|
24
24
|
background: 'bg-primary-main',
|
|
25
25
|
title: 'text-white',
|
|
26
|
-
description: 'text-white/80',
|
|
26
|
+
description: '!text-white/80 text-l-light',
|
|
27
27
|
iconText: 'text-white',
|
|
28
28
|
iconBackground: 'bg-white/30',
|
|
29
29
|
iconConnector: 'bg-white',
|
|
@@ -1,17 +1,26 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { List } from '../../ui-kit/List/List';
|
|
2
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
3
|
|
|
3
|
-
export const renderItems = (
|
|
4
|
-
items
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
4
|
+
export const renderItems = ({
|
|
5
|
+
items,
|
|
6
|
+
isDotted = true,
|
|
7
|
+
version = 'primary',
|
|
8
|
+
className = '',
|
|
9
|
+
}: {
|
|
10
|
+
items?: string[];
|
|
11
|
+
isDotted?: boolean;
|
|
12
|
+
version?: BlockVersion;
|
|
13
|
+
className?: string;
|
|
14
|
+
}) => {
|
|
15
|
+
const listVersion = version === 'primary' ? 'gray' : version;
|
|
16
|
+
|
|
17
|
+
return items ? (
|
|
18
|
+
<List
|
|
19
|
+
className={`mt-4 ${className}`}
|
|
20
|
+
version={listVersion}
|
|
21
|
+
items={items}
|
|
22
|
+
listItemSize="S"
|
|
23
|
+
isDotted={isDotted}
|
|
24
|
+
/>
|
|
17
25
|
) : null;
|
|
26
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Button } from '../../ui-kit/Button/Button';
|
|
2
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
3
|
+
import type { HandlerDecorator, Router } from '../ContentPage/ContentPageContext';
|
|
4
|
+
import type { Step } from './StepsBlockContent';
|
|
5
|
+
import type { StyleType } from './StepsBlockStyleMaps';
|
|
6
|
+
import { renderItems } from './renderItems';
|
|
7
|
+
import { useLink } from '../../hooks/useLink';
|
|
8
|
+
|
|
9
|
+
export const renderStepContent =
|
|
10
|
+
({
|
|
11
|
+
styleMap,
|
|
12
|
+
isMainButton,
|
|
13
|
+
version,
|
|
14
|
+
router,
|
|
15
|
+
handlerDecorator,
|
|
16
|
+
}: {
|
|
17
|
+
styleMap: StyleType;
|
|
18
|
+
isMainButton: boolean;
|
|
19
|
+
version: BlockVersion;
|
|
20
|
+
router: Router;
|
|
21
|
+
handlerDecorator?: HandlerDecorator;
|
|
22
|
+
}) =>
|
|
23
|
+
(step: Step, i: number, { length }: { length: number }) => {
|
|
24
|
+
const { label, description, button, items, isDotted } = step;
|
|
25
|
+
|
|
26
|
+
const additionalMarginClass = `${button?.text ? 'mb-8' : ''} ${step?.label ? 'mt-2' : 'mt-4'}`;
|
|
27
|
+
const widthContainer = length < 5 ? 'w-[276px]' : 'w-[210px]';
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<div
|
|
31
|
+
key={String(i)}
|
|
32
|
+
className={`flex flex-col items-center text-center relative
|
|
33
|
+
whitespace-pre-line overflow-hidden ${widthContainer}`}
|
|
34
|
+
>
|
|
35
|
+
{renderStepLabel(label)}
|
|
36
|
+
{renderStepDescription({
|
|
37
|
+
description,
|
|
38
|
+
className: `${styleMap.description} ${additionalMarginClass}`,
|
|
39
|
+
})}
|
|
40
|
+
{renderItems({ items, isDotted, version, className: styleMap.description })}
|
|
41
|
+
{button?.text && !isMainButton ? (
|
|
42
|
+
<Button
|
|
43
|
+
className="box-border py-3 h-12 w-full max-w-[240px] mt-auto"
|
|
44
|
+
{...useLink({ router, handlerDecorator }, button)}
|
|
45
|
+
version={version}
|
|
46
|
+
>
|
|
47
|
+
{button.text}
|
|
48
|
+
</Button>
|
|
49
|
+
) : null}
|
|
50
|
+
</div>
|
|
51
|
+
);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const renderStepLabel = (label?: string) =>
|
|
55
|
+
label ? <div className="text-x6 m-0 mt-4">{label}</div> : null;
|
|
56
|
+
|
|
57
|
+
const renderStepDescription = ({
|
|
58
|
+
description,
|
|
59
|
+
className = '',
|
|
60
|
+
}: {
|
|
61
|
+
description?: string;
|
|
62
|
+
className?: string;
|
|
63
|
+
}) => (description ? <div className={className}>{description}</div> : null);
|
|
@@ -4,6 +4,8 @@ export const DEFAULT_SLOT_NAME = null;
|
|
|
4
4
|
|
|
5
5
|
export type BlockAncestors = [keyof SlotsMap | typeof DEFAULT_SLOT_NAME, ...Slot[]];
|
|
6
6
|
|
|
7
|
+
export const DEFAULT_ANCESTORS: BlockAncestors = [DEFAULT_SLOT_NAME];
|
|
8
|
+
|
|
7
9
|
interface BlockDecoratorProps<VNode> {
|
|
8
10
|
blockClassName: string;
|
|
9
11
|
block: BlockDef;
|
|
@@ -6,6 +6,9 @@ export type JSXBlock<BlockProps = Record<string, any>> = UNIComponent<
|
|
|
6
6
|
BlockProps & UniBlockProps,
|
|
7
7
|
any,
|
|
8
8
|
VNode | VNode[]
|
|
9
|
-
|
|
9
|
+
> & {
|
|
10
|
+
childrenTypes?: string[];
|
|
11
|
+
renderChild?: (child: VNode, i: number) => VNode;
|
|
12
|
+
};
|
|
10
13
|
|
|
11
14
|
export type BlocksRegistry<BlockProps = Record<string, any>> = Record<string, JSXBlock<BlockProps>>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import type { ColorPalette } from '../../model/ContentPageDef';
|
|
3
|
+
import type { IconName } from '../Icon/IconProps';
|
|
4
|
+
import { Img } from '../Img/Img';
|
|
5
|
+
import type { FoldablePartProps } from './FoldablePartProps';
|
|
6
|
+
|
|
7
|
+
interface DefaultFoldButtonProps {
|
|
8
|
+
className?: string;
|
|
9
|
+
label: string;
|
|
10
|
+
icon: IconName;
|
|
11
|
+
dataTheme?: ColorPalette;
|
|
12
|
+
onClick?: () => void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const DefaultFoldButton = JSX<DefaultFoldButtonProps>(
|
|
16
|
+
({ className, label, icon, dataTheme = '', onClick }) => (
|
|
17
|
+
<button
|
|
18
|
+
className={`border-none bg-primary-main hover:bg-primary-hover px-0 py-5 mb-[1px] w-full font-sans text-white flex justify-center cursor-pointer ${
|
|
19
|
+
className || ''
|
|
20
|
+
}`}
|
|
21
|
+
data-theme={dataTheme}
|
|
22
|
+
onClick={onClick}
|
|
23
|
+
>
|
|
24
|
+
<span className="text-h4 pr-3">{label}</span>
|
|
25
|
+
{icon ? (
|
|
26
|
+
<Img
|
|
27
|
+
image={{
|
|
28
|
+
icon,
|
|
29
|
+
iconVersion: 'white',
|
|
30
|
+
}}
|
|
31
|
+
className="flex-shrink-0 my-auto"
|
|
32
|
+
width="20"
|
|
33
|
+
height="20"
|
|
34
|
+
asSVG
|
|
35
|
+
/>
|
|
36
|
+
) : null}
|
|
37
|
+
</button>
|
|
38
|
+
),
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
export const renderDefaultFoldButton = ({ isUnfolded, onToggle }: FoldablePartProps) => {
|
|
42
|
+
const labels = ['Развернуть', 'Скрыть'];
|
|
43
|
+
const icons: IconName[] = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<DefaultFoldButton
|
|
47
|
+
icon={icons[Number(isUnfolded)]}
|
|
48
|
+
label={labels[Number(isUnfolded)]}
|
|
49
|
+
onClick={onToggle}
|
|
50
|
+
/>
|
|
51
|
+
);
|
|
52
|
+
};
|
|
@@ -1,89 +1,41 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import {
|
|
2
|
+
import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import type { VNode } from '../../model/VNode';
|
|
4
|
-
import {
|
|
5
|
-
import type { IconName } from '../Icon/IconProps';
|
|
6
|
-
import { DefaultButton } from './DefaultButton';
|
|
4
|
+
import type { FoldablePartProps } from './FoldablePartProps';
|
|
7
5
|
|
|
8
|
-
interface RenderFoldButtonProps {
|
|
9
|
-
isUnfolded: boolean;
|
|
10
|
-
onToggle: () => void;
|
|
11
|
-
}
|
|
12
6
|
export interface FoldableProps {
|
|
13
|
-
blocks?: VNode[];
|
|
14
|
-
hiddenBlocksNum?: number;
|
|
15
7
|
unfoldedByDefault?: boolean;
|
|
16
8
|
isFoldButtonOnTop?: boolean;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
renderFoldButton?: (props: RenderFoldButtonProps) => VNode;
|
|
9
|
+
renderFoldableSection: (props: FoldablePartProps) => VNode;
|
|
10
|
+
renderFoldButton?: (props: FoldablePartProps) => VNode;
|
|
20
11
|
}
|
|
21
12
|
|
|
22
13
|
export const Foldable = JSX<FoldableProps>(
|
|
23
14
|
({
|
|
24
|
-
blocks = [],
|
|
25
|
-
hiddenBlocksNum = 0,
|
|
26
15
|
isFoldButtonOnTop = false,
|
|
27
16
|
unfoldedByDefault = false,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
renderFoldButton = renderDefaultFoldButton,
|
|
17
|
+
renderFoldableSection,
|
|
18
|
+
renderFoldButton,
|
|
31
19
|
}) => {
|
|
32
20
|
const [isUnfolded, setIsUnfolded] = useState(unfoldedByDefault);
|
|
33
|
-
const blocksToHide = clamp(hiddenBlocksNum, 0, blocks?.length);
|
|
34
|
-
const visibleBlocks = blocks.slice(0, blocks.length - blocksToHide);
|
|
35
|
-
const hiddenBlocks = blocksToHide > 0 ? blocks.slice(-blocksToHide) : [];
|
|
36
|
-
const containerRef = useRef<HTMLDivElement | null>(null);
|
|
37
21
|
|
|
38
|
-
const onToggle = () => {
|
|
39
|
-
setIsUnfolded(!
|
|
40
|
-
|
|
41
|
-
containerRef.current.style.maxHeight = isUnfolded
|
|
42
|
-
? ''
|
|
43
|
-
: `${containerRef.current.scrollHeight}px`;
|
|
44
|
-
}
|
|
45
|
-
};
|
|
22
|
+
const onToggle = useCallback(() => {
|
|
23
|
+
setIsUnfolded((_) => !_);
|
|
24
|
+
}, []);
|
|
46
25
|
|
|
47
|
-
const
|
|
48
|
-
const
|
|
49
|
-
<div>
|
|
50
|
-
{visibleBlocks}
|
|
51
|
-
<div
|
|
52
|
-
ref={containerRef}
|
|
53
|
-
className={`transition-max-h duration-300 overflow-hidden max-h-0 ${containerClassName}`}
|
|
54
|
-
>
|
|
55
|
-
{hiddenBlocks}
|
|
56
|
-
</div>
|
|
57
|
-
</div>,
|
|
58
|
-
);
|
|
26
|
+
const sectionNode = renderFoldableSection({ isUnfolded, onToggle });
|
|
27
|
+
const buttonNode = renderFoldButton ? renderFoldButton({ isUnfolded, onToggle }) : null;
|
|
59
28
|
|
|
60
|
-
return (
|
|
29
|
+
return isFoldButtonOnTop ? (
|
|
61
30
|
<div>
|
|
62
|
-
{
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
{blocksNode}
|
|
70
|
-
{buttonNode}
|
|
71
|
-
</div>
|
|
72
|
-
)}
|
|
31
|
+
{buttonNode}
|
|
32
|
+
{sectionNode}
|
|
33
|
+
</div>
|
|
34
|
+
) : (
|
|
35
|
+
<div>
|
|
36
|
+
{sectionNode}
|
|
37
|
+
{buttonNode}
|
|
73
38
|
</div>
|
|
74
39
|
);
|
|
75
40
|
},
|
|
76
41
|
);
|
|
77
|
-
|
|
78
|
-
const renderDefaultFoldButton = (props: RenderFoldButtonProps) => {
|
|
79
|
-
const labels = ['Развернуть', 'Скрыть'];
|
|
80
|
-
const icons: IconName[] = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
81
|
-
|
|
82
|
-
return (
|
|
83
|
-
<DefaultButton
|
|
84
|
-
icon={icons[Number(props.isUnfolded)]}
|
|
85
|
-
label={labels[Number(props.isUnfolded)]}
|
|
86
|
-
onClick={props.onToggle}
|
|
87
|
-
/>
|
|
88
|
-
);
|
|
89
|
-
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useEffect, useRef } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
+
|
|
4
|
+
export interface FoldableSectionProps {
|
|
5
|
+
className?: string;
|
|
6
|
+
isUnfolded?: boolean;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const FoldableSection = JSX<FoldableSectionProps>(
|
|
10
|
+
({ className = '', isUnfolded, children }) => {
|
|
11
|
+
const containerRef = useRef<HTMLDivElement | null>(null);
|
|
12
|
+
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
if (containerRef.current) {
|
|
15
|
+
containerRef.current.style.maxHeight = isUnfolded
|
|
16
|
+
? `${containerRef.current.scrollHeight}px`
|
|
17
|
+
: '';
|
|
18
|
+
}
|
|
19
|
+
}, [isUnfolded, children?.length]);
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<div
|
|
23
|
+
ref={containerRef}
|
|
24
|
+
className={`transition-max-h duration-300 overflow-hidden max-h-0 ${className}`}
|
|
25
|
+
>
|
|
26
|
+
{children}
|
|
27
|
+
</div>
|
|
28
|
+
);
|
|
29
|
+
},
|
|
30
|
+
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redneckz/wildless-cms-uni-blocks",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.14",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ЦК",
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
"path": "lib/common.css"
|
|
183
183
|
},
|
|
184
184
|
{
|
|
185
|
-
"limit": "
|
|
185
|
+
"limit": "37 kB",
|
|
186
186
|
"path": "bundle/bundle.umd.min.js"
|
|
187
187
|
}
|
|
188
188
|
],
|
package/src/common.css
CHANGED
|
@@ -5,9 +5,17 @@ html {
|
|
|
5
5
|
scroll-behavior: smooth;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
* {
|
|
9
|
+
--color-green: 78, 190, 81;
|
|
10
|
+
--color-green-light: 131, 184, 62;
|
|
11
|
+
--color-green-dark: 66, 171, 68;
|
|
12
|
+
--color-green-more-dark: 39, 148, 41;
|
|
13
|
+
--color-yellow: 221, 182, 61;
|
|
14
|
+
}
|
|
15
|
+
|
|
8
16
|
/* Private clients | Green */
|
|
9
17
|
[data-theme='pc'] {
|
|
10
|
-
--color-primary-main:
|
|
18
|
+
--color-primary-main: var(--color-green-dark);
|
|
11
19
|
--color-primary-hover: 36, 131, 65;
|
|
12
20
|
--color-primary-active: 36, 95, 52;
|
|
13
21
|
--color-secondary-hover: 36, 131, 65;
|
|
@@ -17,7 +25,7 @@ html {
|
|
|
17
25
|
}
|
|
18
26
|
/* Business clients | Light-Green */
|
|
19
27
|
[data-theme='bc'] {
|
|
20
|
-
--color-primary-main:
|
|
28
|
+
--color-primary-main: var(--color-green-light);
|
|
21
29
|
--color-primary-hover: 92, 146, 29;
|
|
22
30
|
--color-primary-active: 60, 94, 16;
|
|
23
31
|
--color-secondary-hover: 92, 146, 29;
|
|
@@ -27,7 +35,7 @@ html {
|
|
|
27
35
|
}
|
|
28
36
|
/* Ecosystem own | Yellow */
|
|
29
37
|
[data-theme='eo'] {
|
|
30
|
-
--color-primary-main:
|
|
38
|
+
--color-primary-main: var(--color-yellow);
|
|
31
39
|
--color-primary-hover: 187, 151, 39;
|
|
32
40
|
--color-primary-active: 126, 99, 12;
|
|
33
41
|
--color-secondary-hover: 187, 151, 39;
|