@redneckz/wildless-cms-uni-blocks 0.9.13 → 0.9.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 +52 -42
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Carousel/Carousel.d.ts +1 -0
- package/bundle/components/Carousel/CarouselContent.d.ts +3 -3
- package/bundle/components/CarouselRichTextCard/CarouselRichTextCard.d.ts +5 -0
- package/bundle/components/CarouselRichTextCard/CarouselRichTextCardContent.d.ts +6 -0
- package/bundle/ui-kit/LocationDialog/LocationDialogProps.d.ts +1 -0
- package/bundle/ui-kit/RichText/RichTextProps.d.ts +5 -0
- package/dist/components/ApplicationForm/Footnote.js +1 -1
- package/dist/components/ApplicationForm/Footnote.js.map +1 -1
- package/dist/components/ApplicationForm/renderQuestionsInterested.js +1 -1
- package/dist/components/Blocks.js +2 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Carousel/Carousel.d.ts +1 -0
- package/dist/components/Carousel/Carousel.js +8 -4
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/Carousel/CarouselContent.d.ts +3 -3
- package/dist/components/Carousel/CarouselScrollButtons.js +2 -2
- package/dist/components/CarouselLinks/CarouselLinks.js +2 -3
- package/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/dist/components/CarouselRichTextCard/CarouselRichTextCard.d.ts +5 -0
- package/dist/components/CarouselRichTextCard/CarouselRichTextCard.js +11 -0
- package/dist/components/CarouselRichTextCard/CarouselRichTextCard.js.map +1 -0
- package/dist/components/CarouselRichTextCard/CarouselRichTextCardContent.d.ts +6 -0
- package/dist/components/CarouselRichTextCard/CarouselRichTextCardContent.js +2 -0
- package/dist/components/CarouselRichTextCard/CarouselRichTextCardContent.js.map +1 -0
- package/dist/components/Tabs/ScrollableTabs.js +1 -1
- package/dist/ui-kit/Button/renderArrows.js +1 -1
- package/dist/ui-kit/LocationDialog/LocationDialog.js +4 -2
- package/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/dist/ui-kit/LocationDialog/LocationDialogProps.d.ts +1 -0
- package/dist/ui-kit/RichText/RichTextProps.d.ts +5 -0
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/Footnote.js +1 -1
- package/lib/components/ApplicationForm/Footnote.js.map +1 -1
- package/lib/components/ApplicationForm/renderQuestionsInterested.js +1 -1
- package/lib/components/Blocks.js +2 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Carousel/Carousel.d.ts +1 -0
- package/lib/components/Carousel/Carousel.fixture.d.ts +1 -0
- package/lib/components/Carousel/Carousel.js +8 -4
- package/lib/components/Carousel/Carousel.js.map +1 -1
- package/lib/components/Carousel/CarouselContent.d.ts +3 -3
- package/lib/components/Carousel/CarouselScrollButtons.js +2 -2
- package/lib/components/CarouselLinks/CarouselLinks.js +2 -3
- package/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/lib/components/CarouselRichTextCard/CarouselRichTextCard.d.ts +5 -0
- package/lib/components/CarouselRichTextCard/CarouselRichTextCard.fixture.d.ts +7 -0
- package/lib/components/CarouselRichTextCard/CarouselRichTextCard.js +9 -0
- package/lib/components/CarouselRichTextCard/CarouselRichTextCard.js.map +1 -0
- package/lib/components/CarouselRichTextCard/CarouselRichTextCardContent.d.ts +6 -0
- package/lib/components/CarouselRichTextCard/CarouselRichTextCardContent.js +2 -0
- package/lib/components/CarouselRichTextCard/CarouselRichTextCardContent.js.map +1 -0
- package/lib/components/Tabs/ScrollableTabs.js +1 -1
- package/lib/ui-kit/Button/renderArrows.js +1 -1
- package/lib/ui-kit/LocationDialog/LocationDialog.js +4 -2
- package/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/lib/ui-kit/LocationDialog/LocationDialogProps.d.ts +1 -0
- package/lib/ui-kit/RichText/RichTextProps.d.ts +5 -0
- package/mobile/bundle/bundle.umd.js +1 -1
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Carousel/Carousel.d.ts +1 -0
- package/mobile/bundle/components/Carousel/CarouselContent.d.ts +3 -3
- package/mobile/bundle/components/CarouselRichTextCard/CarouselRichTextCard.d.ts +5 -0
- package/mobile/bundle/components/CarouselRichTextCard/CarouselRichTextCardContent.d.ts +6 -0
- package/mobile/bundle/ui-kit/LocationDialog/LocationDialogProps.d.ts +1 -0
- package/mobile/bundle/ui-kit/RichText/RichTextProps.d.ts +5 -0
- package/mobile/dist/components/ApplicationForm/Footnote.js +1 -1
- package/mobile/dist/components/ApplicationForm/Footnote.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderQuestionsInterested.js +1 -1
- package/mobile/dist/components/Carousel/Carousel.d.ts +1 -0
- package/mobile/dist/components/Carousel/Carousel.js +8 -4
- package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
- package/mobile/dist/components/Carousel/CarouselContent.d.ts +3 -3
- package/mobile/dist/components/Carousel/CarouselScrollButtons.js +2 -2
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js +2 -3
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/dist/components/CarouselRichTextCard/CarouselRichTextCard.d.ts +5 -0
- package/mobile/dist/components/CarouselRichTextCard/CarouselRichTextCard.js +11 -0
- package/mobile/dist/components/CarouselRichTextCard/CarouselRichTextCard.js.map +1 -0
- package/mobile/dist/components/CarouselRichTextCard/CarouselRichTextCardContent.d.ts +6 -0
- package/mobile/dist/components/CarouselRichTextCard/CarouselRichTextCardContent.js +2 -0
- package/mobile/dist/components/CarouselRichTextCard/CarouselRichTextCardContent.js.map +1 -0
- package/mobile/dist/components/Tabs/ScrollableTabs.js +1 -1
- package/mobile/dist/ui-kit/Button/renderArrows.js +1 -1
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js +4 -2
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/dist/ui-kit/LocationDialog/LocationDialogProps.d.ts +1 -0
- package/mobile/dist/ui-kit/RichText/RichTextProps.d.ts +5 -0
- package/mobile/lib/components/ApplicationForm/Footnote.js +1 -1
- package/mobile/lib/components/ApplicationForm/Footnote.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderQuestionsInterested.js +1 -1
- package/mobile/lib/components/Carousel/Carousel.d.ts +1 -0
- package/mobile/lib/components/Carousel/Carousel.js +8 -4
- package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
- package/mobile/lib/components/Carousel/CarouselContent.d.ts +3 -3
- package/mobile/lib/components/Carousel/CarouselScrollButtons.js +2 -2
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js +2 -3
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/lib/components/CarouselRichTextCard/CarouselRichTextCard.d.ts +5 -0
- package/mobile/lib/components/CarouselRichTextCard/CarouselRichTextCard.js +9 -0
- package/mobile/lib/components/CarouselRichTextCard/CarouselRichTextCard.js.map +1 -0
- package/mobile/lib/components/CarouselRichTextCard/CarouselRichTextCardContent.d.ts +6 -0
- package/mobile/lib/components/CarouselRichTextCard/CarouselRichTextCardContent.js +2 -0
- package/mobile/lib/components/CarouselRichTextCard/CarouselRichTextCardContent.js.map +1 -0
- package/mobile/lib/components/Tabs/ScrollableTabs.js +1 -1
- package/mobile/lib/ui-kit/Button/renderArrows.js +1 -1
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js +4 -2
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/lib/ui-kit/LocationDialog/LocationDialogProps.d.ts +1 -0
- package/mobile/lib/ui-kit/RichText/RichTextProps.d.ts +5 -0
- package/mobile/src/common.css +20 -0
- package/mobile/src/components/ApplicationForm/Footnote.tsx +1 -1
- package/mobile/src/components/ApplicationForm/renderQuestionsInterested.tsx +1 -1
- package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.example.json +16 -16
- package/mobile/src/components/Carousel/Carousel.tsx +21 -4
- package/mobile/src/components/Carousel/CarouselContent.ts +3 -3
- package/mobile/src/components/Carousel/CarouselScrollButtons.tsx +2 -2
- package/mobile/src/components/CarouselLinks/CarouselLinks.tsx +9 -5
- package/mobile/src/components/CarouselRichTextCard/CarouselRichTextCard.example.json +6 -0
- package/mobile/src/components/CarouselRichTextCard/CarouselRichTextCard.tsx +21 -0
- package/mobile/src/components/CarouselRichTextCard/CarouselRichTextCard.ui.json +7 -0
- package/mobile/src/components/CarouselRichTextCard/CarouselRichTextCardContent.ts +7 -0
- package/mobile/src/components/Tabs/ScrollableTabs.tsx +1 -1
- package/mobile/src/components/VerticalLayout/VerticalLayout.example.json +0 -9
- package/mobile/src/ui-kit/Button/renderArrows.tsx +2 -2
- package/mobile/src/ui-kit/LocationDialog/LocationDialog.tsx +11 -3
- package/mobile/src/ui-kit/LocationDialog/LocationDialogProps.ts +1 -0
- package/mobile/src/ui-kit/RichText/RichTextProps.ts +5 -0
- package/package.json +1 -1
- package/src/common.css +20 -0
- package/src/components/ApplicationForm/Footnote.tsx +1 -1
- package/src/components/ApplicationForm/renderQuestionsInterested.tsx +1 -1
- package/src/components/Blocks.ts +2 -0
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.example.json +16 -16
- package/src/components/Carousel/Carousel.fixture.tsx +17 -0
- package/src/components/Carousel/Carousel.tsx +21 -4
- package/src/components/Carousel/CarouselContent.ts +3 -3
- package/src/components/Carousel/CarouselScrollButtons.tsx +2 -2
- package/src/components/CarouselLinks/CarouselLinks.tsx +9 -5
- package/src/components/CarouselRichTextCard/CarouselRichTextCard.example.json +6 -0
- package/src/components/CarouselRichTextCard/CarouselRichTextCard.fixture.tsx +24 -0
- package/src/components/CarouselRichTextCard/CarouselRichTextCard.tsx +21 -0
- package/src/components/CarouselRichTextCard/CarouselRichTextCard.ui.json +7 -0
- package/src/components/CarouselRichTextCard/CarouselRichTextCardContent.ts +7 -0
- package/src/components/Tabs/ScrollableTabs.tsx +1 -1
- package/src/components/VerticalLayout/VerticalLayout.example.json +0 -9
- package/src/icons/IconName.ts +359 -5
- package/src/ui-kit/Button/renderArrows.tsx +2 -2
- package/src/ui-kit/LocationDialog/LocationDialog.tsx +11 -3
- package/src/ui-kit/LocationDialog/LocationDialogProps.ts +1 -0
- package/src/ui-kit/RichText/RichTextProps.ts +5 -0
package/bundle/bundle.umd.js
CHANGED
|
@@ -639,7 +639,7 @@
|
|
|
639
639
|
|
|
640
640
|
const Text = JSX(({ children, ...style }) => (jsx("span", { className: ['font-sans', ...Object.values(style)].join(' '), children: children })));
|
|
641
641
|
|
|
642
|
-
const Footnote = JSX(({ link }) => (jsxs(Paragraph, { size: "text-s-light", color: "text-secondary-text", children: [jsx(Text, { children: "\u041D\u0430\u0436\u0438\u043C\u0430\u044F \u043A\u043D\u043E\u043F\u043A\u0443 \u0432\u044B \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442\u0435 \u0441\u043E\u0433\u043B\u0430\u0441\u0438\u0435 \u0441 " }), link ? (jsx(Button, { href: link.href, ariaLabel: "\u0443\u0441\u043B\u043E\u0432\u0438\u044F \u043F\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043D\u043D\u044B\u0445", target: link.target, className: "text-primary-main", children: jsx(Text, { children: link.text }) })) : null] })));
|
|
642
|
+
const Footnote = JSX(({ link }) => (jsxs(Paragraph, { size: "text-s-light", color: "text-secondary-text", children: [jsx(Text, { children: "\u041D\u0430\u0436\u0438\u043C\u0430\u044F \u043A\u043D\u043E\u043F\u043A\u0443, \u0432\u044B \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442\u0435 \u0441\u043E\u0433\u043B\u0430\u0441\u0438\u0435 \u0441 " }), link ? (jsx(Button, { href: link.href, ariaLabel: "\u0443\u0441\u043B\u043E\u0432\u0438\u044F \u043F\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043D\u043D\u044B\u0445", target: link.target, className: "text-primary-main", children: jsx(Text, { children: link.text }) })) : null] })));
|
|
643
643
|
|
|
644
644
|
const normalizeSelectedRegion$1 = (selectedRegion, regions) => !selectedRegion && regions?.length && regions[0]?.code ? regions[0].code : selectedRegion;
|
|
645
645
|
|
|
@@ -1014,7 +1014,7 @@
|
|
|
1014
1014
|
: 'rounded checked:bg-primary-main disabled:bg-main-disabled border', checked ? 'border-black' : 'border-gray', disabled ? '' : 'group-hover/box:border-primary-hover'), type: "checkbox", onChange: (e) => onChange && onChange(e.target.checked), checked: checked, disabled: disabled }), isRadio ? (jsx("div", { className: "left-1 w-3 h-3 rounded-full bg-primary-main hidden absolute peer-checked:block" })) : (jsx(SVG, { paths: CHECK_PATHS, className: "hidden absolute left-1 ml-px peer-checked:block", width: "11", height: "9", fill: "white", viewBox: "0 0 11 9" })), text ? jsx("span", { className: "font-sans ml-3 text-l-light", children: text }) : null] }) }));
|
|
1015
1015
|
});
|
|
1016
1016
|
|
|
1017
|
-
const renderQuestionsInterested = ({ currencyControl, documentaryOperations, conversionOperations, text, handleChange, }) => (jsxs("div", { className: "mb-6", children: [jsxs("div", { className: "flex items-center mb-4 gap-6", children: [jsx(Checkbox, { text: "\u0412\u0430\u043B\u044E\u0442\u043D\u044B\u0439 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u044C", checked: currencyControl, onChange: (value) => handleChange({ currencyControl: value }) }), jsx(Checkbox, { text: "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0440\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", checked: documentaryOperations, onChange: (value) => handleChange({ documentaryOperations: value }) }), jsx(Checkbox, { text: "\u041A\u043E\u043D\u0432\u0435\u0440\u0441\u0438\u043E\u043D\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", checked: conversionOperations, onChange: (value) => handleChange({ conversionOperations: value }) })] }), jsx("textarea", { placeholder: "\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0438\u043D\u0442\u0435\u0440\u0435\u0441\u0443\u044E\u0449\u0438\u0439 \
|
|
1017
|
+
const renderQuestionsInterested = ({ currencyControl, documentaryOperations, conversionOperations, text, handleChange, }) => (jsxs("div", { className: "mb-6", children: [jsxs("div", { className: "flex items-center mb-4 gap-6", children: [jsx(Checkbox, { text: "\u0412\u0430\u043B\u044E\u0442\u043D\u044B\u0439 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u044C", checked: currencyControl, onChange: (value) => handleChange({ currencyControl: value }) }), jsx(Checkbox, { text: "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0440\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", checked: documentaryOperations, onChange: (value) => handleChange({ documentaryOperations: value }) }), jsx(Checkbox, { text: "\u041A\u043E\u043D\u0432\u0435\u0440\u0441\u0438\u043E\u043D\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", checked: conversionOperations, onChange: (value) => handleChange({ conversionOperations: value }) })] }), jsx("textarea", { placeholder: "\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0438\u043D\u0442\u0435\u0440\u0435\u0441\u0443\u044E\u0449\u0438\u0439 \u0432\u0430\u0441 \u0432\u043E\u043F\u0440\u043E\u0441, \u043C\u0435\u0441\u0442\u043E \u0432\u0435\u0434\u0435\u043D\u0438\u044F \u0431\u0438\u0437\u043D\u0435\u0441\u0430 \u0438 \u0443\u0434\u043E\u0431\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F \u0434\u043B\u044F \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u043D\u043E\u0433\u043E \u0437\u0432\u043E\u043D\u043A\u0430", className: "block w-full resize-y min-h-24 p-4 outline-none border rounded-md border-main-stroke hover:border-primary-hover active:focus:border-primary-text", value: text, onChange: (e) => handleChange({ text: e.target.value }) })] }));
|
|
1018
1018
|
|
|
1019
1019
|
const ApplicationFormWed = JSX((props) => {
|
|
1020
1020
|
const { button, link, handleSubmit } = props;
|
|
@@ -1237,7 +1237,7 @@
|
|
|
1237
1237
|
|
|
1238
1238
|
function renderArrows({ dec, inc, canDec, canInc, btnClass, className = '', }) {
|
|
1239
1239
|
const isVisible = canDec || canInc;
|
|
1240
|
-
return isVisible ? (jsxs("div", { children: [canDec ? (jsx(ArrowButton, { className: `absolute z-
|
|
1240
|
+
return isVisible ? (jsxs("div", { children: [canDec ? (jsx(ArrowButton, { className: `absolute z-40 ${btnClass[0]} ${className}`, onClick: dec, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left", disabled: !canDec })) : null, canInc ? (jsx(ArrowButton, { className: `absolute z-40 rotate-180 ${btnClass[1]} ${className}`, onClick: inc, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right", disabled: !canInc })) : null] })) : null;
|
|
1241
1241
|
}
|
|
1242
1242
|
|
|
1243
1243
|
const CalculatorValueBlock = JSX(({ title, value, postfix = '', prefix, className = '' }) => (jsxs("div", { className: style('mb-7', className), children: [title ? (jsx(Text, { size: "text-l-light", color: "text-secondary-text", children: title })) : null, value ? (jsx("div", { children: jsxs(Text, { size: "text-h3", children: [prefix, " ", addSpacesBetweenNumbers(Math.round(value)), " ", postfix] }) })) : (jsx("div", { children: jsx(Text, { size: "text-h3", children: "-" }) }))] })));
|
|
@@ -2082,8 +2082,8 @@
|
|
|
2082
2082
|
];
|
|
2083
2083
|
};
|
|
2084
2084
|
|
|
2085
|
-
const scrollButtonStyle$1 = 'absolute top-[calc(50%-24px)] z-
|
|
2086
|
-
const blurBaseStyle = 'absolute top-0 bottom-0 z-
|
|
2085
|
+
const scrollButtonStyle$1 = 'absolute top-[calc(50%-24px)] z-40';
|
|
2086
|
+
const blurBaseStyle = 'absolute top-0 bottom-0 z-40 w-[84px] pointer-events-none';
|
|
2087
2087
|
const CarouselScrollButtons = JSX(({ scroll, arrowsPadded, isBlur, onScrollLeft, onScrollRight, hasEdgeBlocks, activeIndex, itemCount, }) => {
|
|
2088
2088
|
const { canScrollLeft, canScrollRight, scrollLeft, scrollRight } = scroll;
|
|
2089
2089
|
const canMoveLeft = hasEdgeBlocks ? activeIndex > 0 : canScrollLeft;
|
|
@@ -2110,10 +2110,32 @@
|
|
|
2110
2110
|
});
|
|
2111
2111
|
const renderBlur = (isBlur, scroll) => (scroll.canScrollLeft || scroll.canScrollRight) && isBlur ? (jsxs("div", { children: [jsx("div", { className: style(blurBaseStyle, 'left-0 bg-opacity-from-white') }), jsx("div", { className: style(blurBaseStyle, 'right-0 bg-opacity-to-white') })] })) : null;
|
|
2112
2112
|
|
|
2113
|
+
const containerStyles = {
|
|
2114
|
+
'horizontal-list': 'mx-auto mt-5 w-fit',
|
|
2115
|
+
'vertical-list': 'absolute flex-col justify-center h-full top-0 left-4',
|
|
2116
|
+
};
|
|
2117
|
+
const activeDotStyles = {
|
|
2118
|
+
'horizontal-list': 'w-6',
|
|
2119
|
+
'vertical-list': 'h-6',
|
|
2120
|
+
};
|
|
2121
|
+
const dotStyle = 'cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white';
|
|
2122
|
+
const inactiveDotStyle = 'w-2 h-2 opacity-30';
|
|
2123
|
+
const SwipeListControlDots = JSX(({ containerRef, activeIndex, dotCount = 0, listType = 'horizontal-list', version }) => {
|
|
2124
|
+
const handleClick = (idx) => {
|
|
2125
|
+
if (idx !== activeIndex && containerRef?.current) {
|
|
2126
|
+
containerRef.current.children[idx]?.scrollIntoView({
|
|
2127
|
+
behavior: 'smooth',
|
|
2128
|
+
block: 'nearest',
|
|
2129
|
+
});
|
|
2130
|
+
}
|
|
2131
|
+
};
|
|
2132
|
+
return dotCount ? (jsx("div", { className: style('flex gap-2', containerStyles[listType], version ? 'group' : ''), ...(version ? { 'data-ver': version } : {}), children: new Array(dotCount).fill(null).map((_, idx) => (jsx("div", { className: `${dotStyle} ${idx === activeIndex ? activeDotStyles[listType] : inactiveDotStyle}`, role: "button", "aria-hidden": true, onClick: () => handleClick(idx) }, String(idx)))) })) : null;
|
|
2133
|
+
});
|
|
2134
|
+
|
|
2113
2135
|
const ITEMS_GAP = 4;
|
|
2114
|
-
const Carousel = JSX(({ className = '', itemCount, visibleItemCount, isBlur = true, isCyclic = false, arrowsPadded = true, isPadding = true, ...rest }) => {
|
|
2115
|
-
const { blocks: childBlocks } = rest.block || {};
|
|
2116
|
-
const count = itemCount || childBlocks?.length
|
|
2136
|
+
const Carousel = JSX(({ className = '', itemCount, visibleItemCount, isBlur = true, isCyclic = false, arrowsPadded = true, isPadding = true, showDots = false, ...rest }) => {
|
|
2137
|
+
const { blocks: childBlocks = [] } = rest.block || {};
|
|
2138
|
+
const count = itemCount || childBlocks?.length;
|
|
2117
2139
|
const [activeIndex, setActiveIndex] = useState(Math.floor((visibleItemCount || 0) / 2));
|
|
2118
2140
|
const increaseActiveIndex = useCallback(() => setActiveIndex((_) => _ + 1), []);
|
|
2119
2141
|
const decreaseActiveIndex = useCallback(() => setActiveIndex((_) => _ - 1), []);
|
|
@@ -2121,6 +2143,7 @@
|
|
|
2121
2143
|
itemCount: count,
|
|
2122
2144
|
isCyclic,
|
|
2123
2145
|
});
|
|
2146
|
+
const [dotsActiveIndex] = scroll.visibleIndicesRange;
|
|
2124
2147
|
const isBankHistoryCarousel = childBlocks && childBlocks[0]?.type === 'CarouselBankHistoryCard';
|
|
2125
2148
|
return (jsx(BlockWrapper, { className: style(getPaddingStyle(isPadding), 'group-data-secondary:bg-primary-main group-data-secondary:text-white', className), ...rest, children: jsxs("div", { className: "relative max-w-full", children: [jsx(SwipeListContainer, { containerRef: containerRef, visibleItemCount: visibleItemCount, snapAlign: "snap-start", gap: ITEMS_GAP, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: renderChildren({
|
|
2126
2149
|
...rest,
|
|
@@ -2130,7 +2153,7 @@
|
|
|
2130
2153
|
activeIndex: activeIndex,
|
|
2131
2154
|
})
|
|
2132
2155
|
: renderBlock,
|
|
2133
|
-
}) }), jsx(CarouselScrollButtons, { scroll: scroll, isBlur: isBlur, arrowsPadded: arrowsPadded, onScrollLeft: decreaseActiveIndex, onScrollRight: increaseActiveIndex, hasEdgeBlocks: isBankHistoryCarousel, activeIndex: activeIndex, itemCount: count })] }) }));
|
|
2156
|
+
}) }), jsx(CarouselScrollButtons, { scroll: scroll, isBlur: isBlur, arrowsPadded: arrowsPadded, onScrollLeft: decreaseActiveIndex, onScrollRight: increaseActiveIndex, hasEdgeBlocks: isBankHistoryCarousel, activeIndex: activeIndex, itemCount: count }), showDots ? renderDots(containerRef, dotsActiveIndex, itemCount) : null] }) }));
|
|
2134
2157
|
});
|
|
2135
2158
|
Carousel.childrenTypes = [
|
|
2136
2159
|
'CarouselCard',
|
|
@@ -2141,10 +2164,12 @@
|
|
|
2141
2164
|
'CarouselProgramsCard',
|
|
2142
2165
|
'CarouselRecommendationCard',
|
|
2143
2166
|
'CarouselTariffsCard',
|
|
2167
|
+
'CarouselRichTextCard',
|
|
2144
2168
|
'CarouselInvestmentCard',
|
|
2145
2169
|
'CarouselEventCard',
|
|
2146
2170
|
];
|
|
2147
2171
|
const getPaddingStyle = (isPadding) => (isPadding ? 'p-12' : '');
|
|
2172
|
+
const renderDots = (containerRef, dotsActiveIndex, itemCount) => (jsx(SwipeListControlDots, { containerRef: containerRef, activeIndex: dotsActiveIndex, dotCount: itemCount, listType: 'horizontal-list' }));
|
|
2148
2173
|
|
|
2149
2174
|
const CarouselBankHistoryCard = JSX(({ title, description, blocksLength = 0, activeIndex, options }) => {
|
|
2150
2175
|
const orderNumber = Number(options?.key?.split('-').slice(-1)[0]) || 0;
|
|
@@ -2251,11 +2276,11 @@
|
|
|
2251
2276
|
|
|
2252
2277
|
const MAX_LINKS_COUNT = 10;
|
|
2253
2278
|
const CarouselLinks = JSX(({ className = '', additionalDescription, description, links, title, ...rest }) => {
|
|
2254
|
-
return (jsxs(BlockWrapper, { className: `flex w-full p-10 overflow-hidden justify-between ${className}`, ...rest, children: [jsxs("div", { className: "flex flex-col max-w-96 pr-9 text-white text-xl-light", children: [jsx(Headline, { isPadding: false, title: title, description: description, as: "h1", align: "text-left" }), additionalDescription ? (jsx(
|
|
2279
|
+
return (jsxs(BlockWrapper, { className: `flex w-full p-10 overflow-hidden justify-between ${className}`, ...rest, children: [jsxs("div", { className: "flex flex-col max-w-96 pr-9 text-white text-xl-light", children: [jsx(Headline, { isPadding: false, title: title, description: description, as: "h1", align: "text-left" }), additionalDescription ? (jsx(Headline, { className: "pt-6", isPadding: false, description: description, align: "text-left" })) : null] }), links?.length ? renderLinks(links) : null] }));
|
|
2255
2280
|
});
|
|
2256
2281
|
const renderLinks = (links) => {
|
|
2257
2282
|
const itemCount = Math.ceil(links.length / MAX_LINKS_COUNT);
|
|
2258
|
-
return (jsx(Carousel, { className: "min-w-[832px] w-[832px]", isBlur: false, isCyclic: true, itemCount: itemCount, children: new Array(itemCount).fill(null).map((_, groupIndex) => (jsx("div", { className: "w-[672px] min-w-[672px] ml-
|
|
2283
|
+
return (jsx(Carousel, { className: "min-w-[832px] w-[832px]", isBlur: false, isCyclic: true, itemCount: itemCount, arrowsPadded: false, showDots: true, children: new Array(itemCount).fill(null).map((_, groupIndex) => (jsx("div", { className: "w-[672px] min-w-[672px] ml-10 mr-10 flex flex-wrap self-start", children: links
|
|
2259
2284
|
.slice(groupIndex * MAX_LINKS_COUNT, (groupIndex + 1) * MAX_LINKS_COUNT)
|
|
2260
2285
|
.map((link, index) => (jsx(LinkButton, { className: "m-1", ...link }, String(index)))) }, String(groupIndex)))) }));
|
|
2261
2286
|
};
|
|
@@ -2352,6 +2377,15 @@
|
|
|
2352
2377
|
});
|
|
2353
2378
|
const renderIconBlock$1 = (icon) => (jsxs("div", { className: "absolute bottom-0 right-0", children: [icon?.icon ? jsx(ImgInner, { image: getIconWithVersion(icon), asSVG: true }) : null, icon?.src ? jsx(ImgInner, { image: icon }) : null] }));
|
|
2354
2379
|
|
|
2380
|
+
const RichText = JSX((props) => {
|
|
2381
|
+
const { __html = '' } = props;
|
|
2382
|
+
return jsx("div", { className: "md-container", dangerouslySetInnerHTML: { __html } });
|
|
2383
|
+
});
|
|
2384
|
+
|
|
2385
|
+
const CarouselRichTextCard = JSX(({ className = '', __html, richVersion = 'striped', ...rest }) => {
|
|
2386
|
+
return (jsx(BlockWrapper, { className: style('p-9 border border-gray min-w-96', richVersion, className), ...rest, children: jsx(RichText, { __html: __html }) }));
|
|
2387
|
+
});
|
|
2388
|
+
|
|
2355
2389
|
const Foldable = JSX(({ className = '', isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
|
|
2356
2390
|
const [isUnfolded, setIsUnfolded] = useState(unfoldedByDefault);
|
|
2357
2391
|
const onToggle = useCallback(() => {
|
|
@@ -3205,7 +3239,7 @@
|
|
|
3205
3239
|
dialogProps.onClose && dialogProps.onClose();
|
|
3206
3240
|
onChangeLocation && onChangeLocation(region);
|
|
3207
3241
|
}, [dialogProps.onClose, onChangeLocation]);
|
|
3208
|
-
return (jsxs(Dialog, { ...dialogProps, head: jsxs("div", { children: [jsx(CurrentLocation, { currentLocation: currentLocation }), jsx(SearchBar, { onSearch: setQuery, searchTerm: query, className: "mb-7" })] }), children: [query && query.length >= SEARCH_TERM_MIN_LENGTH ? (jsx("div", { children: regions
|
|
3242
|
+
return (jsxs(Dialog, { ...dialogProps, head: jsxs("div", { children: [jsx(CurrentLocation, { currentLocation: currentLocation, onChangeLocation: handleChangeLocation }), jsx(SearchBar, { onSearch: setQuery, searchTerm: query, className: "mb-7" })] }), children: [query && query.length >= SEARCH_TERM_MIN_LENGTH ? (jsx("div", { children: regions
|
|
3209
3243
|
.filter(({ name }) => name && jaroWinklerDistance(name.toLowerCase())(query.toLowerCase()) >= 0.8)
|
|
3210
3244
|
.map(renderRegion(handleChangeLocation)) })) : (jsx("div", { className: "columns-5", children: Array.from(regionsGroupByLetter.entries()).map(renderRegionGroup(handleChangeLocation)) })), jsx(ForeignOffices, { foreignOffices: foreignOffices })] }));
|
|
3211
3245
|
});
|
|
@@ -3214,7 +3248,9 @@
|
|
|
3214
3248
|
...region,
|
|
3215
3249
|
name: region.name?.replace(/республика|область|край'/gi, '').trim() || '',
|
|
3216
3250
|
}));
|
|
3217
|
-
const CurrentLocation = JSX(({ currentLocation }) => currentLocation ? (jsxs("div", { className: "mb-4", children: [jsx(Text, { size: "text-l", font: "font-light", children: "\u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044B\u0431\u0440\u0430\u043D:\u00A0" }), jsx("button", { className: "cursor-pointer", onClick:
|
|
3251
|
+
const CurrentLocation = JSX(({ currentLocation, onChangeLocation }) => currentLocation ? (jsxs("div", { className: "mb-4", children: [jsx(Text, { size: "text-l", font: "font-light", children: "\u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044B\u0431\u0440\u0430\u043D:\u00A0" }), jsx("button", { className: "cursor-pointer", onClick: () => {
|
|
3252
|
+
onChangeLocation && onChangeLocation(currentLocation);
|
|
3253
|
+
}, children: jsx(Text, { color: "text-primary-main", children: currentLocation.name }) })] })) : null);
|
|
3218
3254
|
const renderRegionGroup = (onChangeLocation) => ([letter, regions]) => (jsxs("div", { className: "break-inside-avoid mb-7 w-[224px]", children: [jsx("div", { className: "mb-2.5", children: jsx(Text, { size: "text-h6", children: letter }) }), regions.map(renderRegion(onChangeLocation))] }, letter));
|
|
3219
3255
|
const renderRegion = (onChangeLocation) => (region) => (jsx("div", { className: "mb-1", children: jsx("button", { className: "cursor-pointer hover:text-primary-hover", onClick: () => {
|
|
3220
3256
|
onChangeLocation && onChangeLocation(region);
|
|
@@ -3964,11 +4000,6 @@
|
|
|
3964
4000
|
return `w-12 h-12 min-w-12 rounded-full p-2.5 box-border flex items-center justify-center ${bgColorStyle}`;
|
|
3965
4001
|
}
|
|
3966
4002
|
|
|
3967
|
-
const RichText = JSX((props) => {
|
|
3968
|
-
const { __html = '' } = props;
|
|
3969
|
-
return jsx("div", { className: "md-container", dangerouslySetInnerHTML: { __html } });
|
|
3970
|
-
});
|
|
3971
|
-
|
|
3972
4003
|
// TODO: Create universal function for this case
|
|
3973
4004
|
const renderBenefit$2 =
|
|
3974
4005
|
// Linter doesn't understand that switch processes all cases
|
|
@@ -4347,28 +4378,6 @@
|
|
|
4347
4378
|
return (jsx(BlockWrapper, { className: `${styleStepIconSize} flex justify-center items-center text-center rounded-full p-[26px] box-border z-10`, version: stepVersion, children: checkCanRenderIcon(icon) ? (jsx(ImgInner, { image: getIconWithVersion(icon || {}, stepVersion), width: "48", height: "48", asSVG: true })) : (jsx("span", { className: style('text-h4', stepVersion === 'transparent' ? styleMap.iconText : stepVersionIconTextStyles), children: i + 1 })) }, String(i)));
|
|
4348
4379
|
};
|
|
4349
4380
|
|
|
4350
|
-
const containerStyles = {
|
|
4351
|
-
'horizontal-list': 'mx-auto mt-5 w-fit',
|
|
4352
|
-
'vertical-list': 'absolute flex-col justify-center h-full top-0 left-4',
|
|
4353
|
-
};
|
|
4354
|
-
const activeDotStyles = {
|
|
4355
|
-
'horizontal-list': 'w-6',
|
|
4356
|
-
'vertical-list': 'h-6',
|
|
4357
|
-
};
|
|
4358
|
-
const dotStyle = 'cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white';
|
|
4359
|
-
const inactiveDotStyle = 'w-2 h-2 opacity-30';
|
|
4360
|
-
const SwipeListControlDots = JSX(({ containerRef, activeIndex, dotCount = 0, listType = 'horizontal-list', version }) => {
|
|
4361
|
-
const handleClick = (idx) => {
|
|
4362
|
-
if (idx !== activeIndex && containerRef?.current) {
|
|
4363
|
-
containerRef.current.children[idx]?.scrollIntoView({
|
|
4364
|
-
behavior: 'smooth',
|
|
4365
|
-
block: 'nearest',
|
|
4366
|
-
});
|
|
4367
|
-
}
|
|
4368
|
-
};
|
|
4369
|
-
return dotCount ? (jsx("div", { className: style('flex gap-2', containerStyles[listType], version ? 'group' : ''), ...(version ? { 'data-ver': version } : {}), children: new Array(dotCount).fill(null).map((_, idx) => (jsx("div", { className: `${dotStyle} ${idx === activeIndex ? activeDotStyles[listType] : inactiveDotStyle}`, role: "button", "aria-hidden": true, onClick: () => handleClick(idx) }, String(idx)))) })) : null;
|
|
4370
|
-
});
|
|
4371
|
-
|
|
4372
4381
|
const DEFAULT_GAP = 14;
|
|
4373
4382
|
/*
|
|
4374
4383
|
Horizontal padding used on a container above SwipeListControl.
|
|
@@ -4506,7 +4515,7 @@
|
|
|
4506
4515
|
return null;
|
|
4507
4516
|
};
|
|
4508
4517
|
|
|
4509
|
-
const scrollButtonStyle = 'absolute z-
|
|
4518
|
+
const scrollButtonStyle = 'absolute z-40 top-0';
|
|
4510
4519
|
const ScrollableTabs = JSX((props) => {
|
|
4511
4520
|
const { tabs, onClick, currentTab, page, showCounter } = props;
|
|
4512
4521
|
const [containerRef, scroll] = useSwipeListScroll({
|
|
@@ -4798,6 +4807,7 @@
|
|
|
4798
4807
|
CarouselProductCard,
|
|
4799
4808
|
CarouselProgramsCard,
|
|
4800
4809
|
CarouselRecommendationCard,
|
|
4810
|
+
CarouselRichTextCard,
|
|
4801
4811
|
CarouselTariffsCard,
|
|
4802
4812
|
ComparisonTable,
|
|
4803
4813
|
ContactsBlock,
|
|
@@ -4964,7 +4974,7 @@
|
|
|
4964
4974
|
return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto" }) }));
|
|
4965
4975
|
}
|
|
4966
4976
|
|
|
4967
|
-
const packageVersion = "0.9.
|
|
4977
|
+
const packageVersion = "0.9.14";
|
|
4968
4978
|
|
|
4969
4979
|
exports.Blocks = Blocks;
|
|
4970
4980
|
exports.ContentPage = ContentPage;
|