@redneckz/wildless-cms-uni-blocks 0.5.1 → 0.5.3
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/migrate.js +2 -0
- package/bin/migrateContentUnit.js +26 -0
- package/bin/migration-scripts/0.4.0.js +3 -0
- package/bin/migration-scripts/0.4.1.js +3 -0
- package/bin/migration-scripts/0.4.5.js +109 -0
- package/bin/migration-scripts/0.4.5.spec.ts +352 -0
- package/bin/migration-scripts/index.js +21 -0
- package/bin/utils.js +24 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +27 -25
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/CardTransfer/CardTransfer.js +7 -7
- package/dist/components/CardTransfer/CardTransfer.js.map +1 -1
- package/dist/components/CardTransfer/CardTransferContent.d.ts +7 -4
- package/dist/components/PictureText/PictureText.js +1 -1
- package/dist/components/PictureText/PictureText.js.map +1 -1
- package/dist/components/ProductTile/ProductTile.js +2 -2
- package/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/dist/components/SafeDepositRental/RenderRadioButtons.js +1 -1
- package/dist/components/Tabs/TabsContent.d.ts +8 -3
- package/dist/components/Tabs/renderGroupTab.js +1 -1
- package/dist/components/Tabs/renderGroupTab.js.map +1 -1
- package/dist/model/ButtonVersion.d.ts +2 -2
- package/dist/ui-kit/Button/Button.js +4 -1
- package/dist/ui-kit/Button/Button.js.map +1 -1
- package/dist/ui-kit/Button/Button.mobile.js +2 -0
- package/dist/ui-kit/Button/Button.mobile.js.map +1 -1
- package/dist/ui-kit/Button/ButtonInner.js +3 -2
- package/dist/ui-kit/Button/ButtonInner.js.map +1 -1
- package/dist/ui-kit/Button/ButtonSection.js +3 -2
- package/dist/ui-kit/Button/ButtonSection.js.map +1 -1
- package/dist/ui-kit/Button/buttonClassNameConstants.js +2 -0
- package/dist/ui-kit/Button/buttonClassNameConstants.js.map +1 -1
- package/dist/ui-kit/CurrencyInput/CurrencyInput.d.ts +1 -18
- package/dist/ui-kit/CurrencyInput/CurrencyInput.js +2 -7
- package/dist/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
- package/dist/ui-kit/CurrencyInput/CurrencyInputProps.d.ts +10 -0
- package/dist/ui-kit/{Tabs/TabsProps.js → CurrencyInput/CurrencyInputProps.js} +1 -1
- package/dist/ui-kit/CurrencyInput/CurrencyInputProps.js.map +1 -0
- package/dist/ui-kit/Select/Select.js +1 -1
- package/dist/ui-kit/Select/Select.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/CardTransfer/CardTransfer.js +7 -7
- package/lib/components/CardTransfer/CardTransfer.js.map +1 -1
- package/lib/components/CardTransfer/CardTransferContent.d.ts +7 -4
- package/lib/components/PictureText/PictureText.js +1 -1
- package/lib/components/PictureText/PictureText.js.map +1 -1
- package/lib/components/ProductTile/ProductTile.js +2 -2
- package/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/lib/components/SafeDepositRental/RenderRadioButtons.js +1 -1
- package/lib/components/Tabs/TabsContent.d.ts +8 -3
- package/lib/components/Tabs/renderGroupTab.js +1 -1
- package/lib/components/Tabs/renderGroupTab.js.map +1 -1
- package/lib/model/ButtonVersion.d.ts +2 -2
- package/lib/ui-kit/Button/Button.js +4 -1
- package/lib/ui-kit/Button/Button.js.map +1 -1
- package/lib/ui-kit/Button/Button.mobile.js +2 -0
- package/lib/ui-kit/Button/Button.mobile.js.map +1 -1
- package/lib/ui-kit/Button/ButtonInner.js +3 -2
- package/lib/ui-kit/Button/ButtonInner.js.map +1 -1
- package/lib/ui-kit/Button/ButtonSection.js +3 -2
- package/lib/ui-kit/Button/ButtonSection.js.map +1 -1
- package/lib/ui-kit/Button/buttonClassNameConstants.js +2 -0
- package/lib/ui-kit/Button/buttonClassNameConstants.js.map +1 -1
- package/lib/ui-kit/CurrencyInput/CurrencyInput.d.ts +1 -18
- package/lib/ui-kit/CurrencyInput/CurrencyInput.js +2 -7
- package/lib/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
- package/lib/ui-kit/CurrencyInput/CurrencyInputProps.d.ts +10 -0
- package/lib/ui-kit/CurrencyInput/CurrencyInputProps.js +2 -0
- package/lib/ui-kit/CurrencyInput/CurrencyInputProps.js.map +1 -0
- package/lib/ui-kit/Select/Select.js +1 -1
- package/lib/ui-kit/Select/Select.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +9 -5
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/CardTransfer/CardTransfer.js +7 -7
- package/mobile/dist/components/CardTransfer/CardTransfer.js.map +1 -1
- package/mobile/dist/components/CardTransfer/CardTransferContent.d.ts +7 -4
- package/mobile/dist/components/PictureText/PictureText.js +1 -1
- package/mobile/dist/components/PictureText/PictureText.js.map +1 -1
- package/mobile/dist/components/ProductTile/ProductTile.js +2 -2
- package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/RenderRadioButtons.js +1 -1
- package/mobile/dist/components/Tabs/TabsContent.d.ts +8 -3
- package/mobile/dist/components/Tabs/renderGroupTab.js +1 -1
- package/mobile/dist/components/Tabs/renderGroupTab.js.map +1 -1
- package/mobile/dist/model/ButtonVersion.d.ts +2 -2
- package/mobile/dist/ui-kit/Button/Button.js +2 -0
- package/mobile/dist/ui-kit/Button/Button.js.map +1 -1
- package/mobile/dist/ui-kit/Button/ButtonInner.js +3 -2
- package/mobile/dist/ui-kit/Button/ButtonInner.js.map +1 -1
- package/mobile/dist/ui-kit/Button/ButtonSection.js +3 -2
- package/mobile/dist/ui-kit/Button/ButtonSection.js.map +1 -1
- package/mobile/dist/ui-kit/Button/buttonClassNameConstants.js +2 -0
- package/mobile/dist/ui-kit/Button/buttonClassNameConstants.js.map +1 -1
- package/mobile/dist/ui-kit/CurrencyInput/CurrencyInput.d.ts +1 -18
- package/mobile/dist/ui-kit/CurrencyInput/CurrencyInput.js +2 -7
- package/mobile/dist/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
- package/mobile/dist/ui-kit/CurrencyInput/CurrencyInputProps.d.ts +10 -0
- package/mobile/dist/ui-kit/{Tabs/TabsProps.js → CurrencyInput/CurrencyInputProps.js} +1 -1
- package/mobile/dist/ui-kit/CurrencyInput/CurrencyInputProps.js.map +1 -0
- package/mobile/dist/ui-kit/Select/Select.js +1 -1
- package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
- package/mobile/lib/components/CardTransfer/CardTransfer.js +7 -7
- package/mobile/lib/components/CardTransfer/CardTransfer.js.map +1 -1
- package/mobile/lib/components/CardTransfer/CardTransferContent.d.ts +7 -4
- package/mobile/lib/components/PictureText/PictureText.js +1 -1
- package/mobile/lib/components/PictureText/PictureText.js.map +1 -1
- package/mobile/lib/components/ProductTile/ProductTile.js +2 -2
- package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/RenderRadioButtons.js +1 -1
- package/mobile/lib/components/Tabs/TabsContent.d.ts +8 -3
- package/mobile/lib/components/Tabs/renderGroupTab.js +1 -1
- package/mobile/lib/components/Tabs/renderGroupTab.js.map +1 -1
- package/mobile/lib/model/ButtonVersion.d.ts +2 -2
- package/mobile/lib/ui-kit/Button/Button.js +2 -0
- package/mobile/lib/ui-kit/Button/Button.js.map +1 -1
- package/mobile/lib/ui-kit/Button/ButtonInner.js +3 -2
- package/mobile/lib/ui-kit/Button/ButtonInner.js.map +1 -1
- package/mobile/lib/ui-kit/Button/ButtonSection.js +3 -2
- package/mobile/lib/ui-kit/Button/ButtonSection.js.map +1 -1
- package/mobile/lib/ui-kit/Button/buttonClassNameConstants.js +2 -0
- package/mobile/lib/ui-kit/Button/buttonClassNameConstants.js.map +1 -1
- package/mobile/lib/ui-kit/CurrencyInput/CurrencyInput.d.ts +1 -18
- package/mobile/lib/ui-kit/CurrencyInput/CurrencyInput.js +2 -7
- package/mobile/lib/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
- package/mobile/lib/ui-kit/CurrencyInput/CurrencyInputProps.d.ts +10 -0
- package/mobile/lib/ui-kit/CurrencyInput/CurrencyInputProps.js +2 -0
- package/mobile/lib/ui-kit/CurrencyInput/CurrencyInputProps.js.map +1 -0
- package/mobile/lib/ui-kit/Select/Select.js +1 -1
- package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
- package/mobile/src/components/CardTransfer/CardTransfer.example.json +6 -0
- package/mobile/src/components/CardTransfer/CardTransfer.tsx +46 -37
- package/mobile/src/components/CardTransfer/CardTransferContent.ts +7 -4
- package/mobile/src/components/ContentPage/ContentPage.page.json +7 -1
- package/mobile/src/components/PictureText/PictureText.tsx +1 -1
- package/mobile/src/components/ProductTile/ProductTile.tsx +4 -2
- package/mobile/src/components/SafeDepositRental/RenderRadioButtons.tsx +1 -1
- package/mobile/src/components/Tabs/TabsContent.ts +8 -3
- package/mobile/src/components/Tabs/renderGroupTab.tsx +2 -1
- package/mobile/src/components/__snapshots__/Blocks.spec.tsx.snap +9 -9
- package/mobile/src/model/ButtonVersion.ts +2 -2
- package/mobile/src/ui-kit/Button/Button.tsx +2 -0
- package/mobile/src/ui-kit/Button/ButtonInner.tsx +3 -2
- package/mobile/src/ui-kit/Button/ButtonSection.tsx +9 -4
- package/mobile/src/ui-kit/Button/buttonClassNameConstants.ts +2 -0
- package/mobile/src/ui-kit/CurrencyInput/CurrencyInput.tsx +5 -29
- package/mobile/src/ui-kit/CurrencyInput/CurrencyInputProps.ts +10 -0
- package/mobile/src/ui-kit/Select/Select.tsx +1 -1
- package/package.json +5 -1
- package/src/components/CardTransfer/CardTransfer.example.json +6 -0
- package/src/components/CardTransfer/CardTransfer.tsx +46 -37
- package/src/components/CardTransfer/CardTransferContent.ts +7 -4
- package/src/components/ContentPage/ContentPage.page.json +7 -1
- package/src/components/PictureText/PictureText.tsx +1 -1
- package/src/components/ProductGallery/ProductGallery.fixture.tsx +1 -1
- package/src/components/ProductTile/ProductTile.tsx +4 -2
- package/src/components/SafeDepositRental/RenderRadioButtons.tsx +1 -1
- package/src/components/StepsBlock/StepsBlock.fixture.tsx +2 -0
- package/src/components/Tabs/TabsContent.ts +8 -3
- package/src/components/Tabs/renderGroupTab.tsx +2 -1
- package/src/components/__snapshots__/Blocks.spec.tsx.snap +9 -9
- package/src/model/ButtonVersion.ts +2 -2
- package/src/ui-kit/Button/Button.mobile.tsx +2 -0
- package/src/ui-kit/Button/Button.tsx +5 -3
- package/src/ui-kit/Button/ButtonInner.tsx +3 -2
- package/src/ui-kit/Button/ButtonSection.tsx +9 -4
- package/src/ui-kit/Button/buttonClassNameConstants.ts +2 -0
- package/src/ui-kit/CurrencyInput/CurrencyInput.tsx +5 -29
- package/src/ui-kit/CurrencyInput/CurrencyInputProps.ts +10 -0
- package/src/ui-kit/Select/Select.tsx +1 -1
- package/dist/ui-kit/Tabs/Tabs.d.ts +0 -2
- package/dist/ui-kit/Tabs/Tabs.js +0 -17
- package/dist/ui-kit/Tabs/Tabs.js.map +0 -1
- package/dist/ui-kit/Tabs/TabsProps.d.ts +0 -17
- package/dist/ui-kit/Tabs/TabsProps.js.map +0 -1
- package/lib/ui-kit/Tabs/Tabs.d.ts +0 -2
- package/lib/ui-kit/Tabs/Tabs.js +0 -15
- package/lib/ui-kit/Tabs/Tabs.js.map +0 -1
- package/lib/ui-kit/Tabs/TabsProps.d.ts +0 -17
- package/lib/ui-kit/Tabs/TabsProps.js +0 -2
- package/lib/ui-kit/Tabs/TabsProps.js.map +0 -1
- package/mobile/dist/ui-kit/Tabs/Tabs.d.ts +0 -2
- package/mobile/dist/ui-kit/Tabs/Tabs.js +0 -17
- package/mobile/dist/ui-kit/Tabs/Tabs.js.map +0 -1
- package/mobile/dist/ui-kit/Tabs/TabsProps.d.ts +0 -17
- package/mobile/dist/ui-kit/Tabs/TabsProps.js.map +0 -1
- package/mobile/lib/ui-kit/Tabs/Tabs.d.ts +0 -2
- package/mobile/lib/ui-kit/Tabs/Tabs.js +0 -15
- package/mobile/lib/ui-kit/Tabs/Tabs.js.map +0 -1
- package/mobile/lib/ui-kit/Tabs/TabsProps.d.ts +0 -17
- package/mobile/lib/ui-kit/Tabs/TabsProps.js +0 -2
- package/mobile/lib/ui-kit/Tabs/TabsProps.js.map +0 -1
- package/mobile/src/ui-kit/Tabs/Tabs.tsx +0 -52
- package/mobile/src/ui-kit/Tabs/TabsProps.ts +0 -20
- package/src/ui-kit/Tabs/Tabs.tsx +0 -52
- package/src/ui-kit/Tabs/TabsProps.ts +0 -20
package/bundle/bundle.umd.js
CHANGED
|
@@ -666,7 +666,7 @@
|
|
|
666
666
|
const addSpacesBetweenNumbers = (number) => new Intl.NumberFormat('ru-RU', { maximumSignificantDigits: 3 }).format(number);
|
|
667
667
|
|
|
668
668
|
const PictureText = JSX(({ className = '', context, title, description, image, benefits, version = 'primary', sum, monthLimit, directionRight = false, ...rest }) => {
|
|
669
|
-
return (jsxs(BlockWrapper, { className: `relative font-sans
|
|
669
|
+
return (jsxs(BlockWrapper, { className: `relative font-sans py-12 px-28 ${VersionStyleMap[version]} ${className}`, context: context, ...rest, children: [jsx(Headline, { context: context, className: "!p-0", title: title, description: description, headlineVersion: "M", bgColorHeadline: version, align: "center" }), jsxs("div", { className: 'flex justify-center gap-[122px] mt-[30px]', children: [image?.src ? jsx(Img, { className: directionRight ? 'order-2' : '', image: image }) : null, jsxs("div", { className: "w-[558px] m-auto", children: [benefits?.length ? (jsx("div", { className: "flex flex-col gap-4", children: benefits.map(renderBenefit$2(version)) })) : null, renderInsuranceSumMonth(sum, monthLimit)] })] })] }));
|
|
670
670
|
});
|
|
671
671
|
const renderBenefit$2 = (version) => (benefit, i) => (jsx(BenefitItem, { icon: benefit.icon, label: benefit.label, description: benefit.description, version: version }, String(i)));
|
|
672
672
|
function renderInsuranceSumMonth(sum, monthLimit) {
|
|
@@ -764,15 +764,16 @@
|
|
|
764
764
|
return (jsxs("div", { className: getButtonStyle(props), children: [appendLeft ? appendLeft : null, isWithText(props) ? (jsxs("div", { children: [jsx("div", { className: "text-xs-light text-left", children: aboveText }), jsx("div", { className: `text-left ${aboveText ? 'text-s -mt-0.5' : 'text-l'}`, children: text })] })) : null, appendRight ? appendRight : null] }));
|
|
765
765
|
});
|
|
766
766
|
const getButtonStyle = (props) => {
|
|
767
|
-
const { version, aboveText, rounded } = props;
|
|
767
|
+
const { className = '', version, aboveText, rounded } = props;
|
|
768
768
|
if (version === 'link') {
|
|
769
769
|
return '';
|
|
770
770
|
}
|
|
771
771
|
const withTextStyle = `gap-2 ${aboveText ? 'py-2.5 px-7' : 'py-4 px-9'}`;
|
|
772
772
|
return [
|
|
773
|
-
'flex items-center justify-center',
|
|
773
|
+
'group flex items-center justify-center',
|
|
774
774
|
isWithText(props) ? withTextStyle : 'h-12 w-12',
|
|
775
775
|
rounded ? 'rounded-full' : '',
|
|
776
|
+
className,
|
|
776
777
|
].join(' ');
|
|
777
778
|
};
|
|
778
779
|
const isWithText = ({ text, aboveText, appendLeft }) => Boolean(text || aboveText || !appendLeft);
|
|
@@ -780,11 +781,13 @@
|
|
|
780
781
|
const buttonStyleMap = {
|
|
781
782
|
primary: 'text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active',
|
|
782
783
|
secondary: 'text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active',
|
|
784
|
+
white: 'text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white',
|
|
783
785
|
link: '',
|
|
784
786
|
};
|
|
785
787
|
const buttonDisabledStyleMap = {
|
|
786
788
|
primary: 'bg-secondary-dark text-secondary-text',
|
|
787
789
|
secondary: 'bg-secondary-light text-secondary-text',
|
|
790
|
+
white: 'bg-white text-primary-text',
|
|
788
791
|
link: '',
|
|
789
792
|
};
|
|
790
793
|
const buttonStyle = 'text-center font-sans select-none';
|
|
@@ -807,8 +810,11 @@
|
|
|
807
810
|
|
|
808
811
|
const Button = JSX((props) => {
|
|
809
812
|
const { text, aboveText, appendLeft, appendRight, children, disabled, rounded, ...rest } = props;
|
|
813
|
+
// its non valid HTML attribute. Must be excluded from "rest"
|
|
814
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
815
|
+
const { asSVG, iconRight, icon, ...usedProps } = rest;
|
|
810
816
|
const buttonInner = children ?? (jsx(ButtonInner, { text: text, aboveText: aboveText, appendLeft: appendLeft, appendRight: appendRight, rounded: rounded }));
|
|
811
|
-
return disabled ? (jsx(DisabledButton, { rounded: rounded, ...
|
|
817
|
+
return disabled ? (jsx(DisabledButton, { rounded: rounded, ...usedProps, children: buttonInner })) : (jsx(RegularButton, { rounded: rounded, ...usedProps, children: buttonInner }));
|
|
812
818
|
});
|
|
813
819
|
const RegularButton = JSX(({ className = '', ariaLabel, version, rounded, href, target, children, onClick, ...rest }) => {
|
|
814
820
|
return (jsx("a", { className: getRegularButtonClasses({ className, version, rounded }), href: href, target: target, onClick: onClick, "aria-label": ariaLabel, role: href ? 'link' : 'button', ...rest, children: children }));
|
|
@@ -822,11 +828,12 @@
|
|
|
822
828
|
const router = context.useRouter();
|
|
823
829
|
return buttons && buttons?.length ? (jsx("div", { className: className, children: buttons.map((button, index) => renderButton$2(useLink({ router, handlerDecorator }, button), index)) })) : null;
|
|
824
830
|
});
|
|
825
|
-
function renderButton$2({ icon, iconRight, ...button }, i) {
|
|
831
|
+
function renderButton$2({ icon, iconRight, version = 'primary', ...button }, i) {
|
|
826
832
|
if (!button?.text) {
|
|
827
833
|
return null;
|
|
828
834
|
}
|
|
829
|
-
|
|
835
|
+
const imgStyle = version === 'primary' ? 'group-hover:text-black' : 'group-hover:text-white';
|
|
836
|
+
return icon ? (jsx(Button, { appendLeft: jsx(Img, { imageClassName: imgStyle, image: icon, width: "24", height: "24", asSVG: true }), appendRight: jsx(Img, { imageClassName: imgStyle, image: iconRight, width: "24", height: "24", asSVG: true }), version: version, ...button }, String(i))) : (jsx(Button, { version: version, ...button }, String(i)));
|
|
830
837
|
}
|
|
831
838
|
|
|
832
839
|
const LIST_STYLE_CLASSES = {
|
|
@@ -984,7 +991,7 @@
|
|
|
984
991
|
}
|
|
985
992
|
|
|
986
993
|
const ProductTile = JSX(({ context, className = '', title, headlineVersion = 'S', description, additionalDescription, benefits = [], buttons, image, version = 'primary', ...rest }) => {
|
|
987
|
-
return (jsxs(BlockWrapper, { context: context, className: `overflow-hidden font-sans p-9 box-border relative justify-between grid ${className} ${VersionStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)}`, ...rest, children: [jsx(Headline, { context: context, className: `!p-0 z-10 ${title || description ? 'mb-3.5' : ''}`, as: "h2", title: title, description: description, headlineVersion: headlineVersion, bgColorHeadline: version, align: "left" }), renderBenefits$1(benefits, version), additionalDescription ? renderAdditionalDescription(additionalDescription, version) : null, buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex self-end mt-5 gap-4 z-10 text-l" })) : null, image?.src ? jsx(Img, { className: "absolute right-0 bottom-0", image: image }) : null] }));
|
|
994
|
+
return (jsxs(BlockWrapper, { context: context, className: `overflow-hidden font-sans p-9 box-border relative justify-between grid ${className} ${VersionStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)}`, ...rest, children: [jsx(Headline, { context: context, className: `!p-0 !bg-transparent z-10 ${title || description ? 'mb-3.5' : ''}`, as: "h2", title: title, description: description, headlineVersion: headlineVersion, bgColorHeadline: version, align: "left" }), renderBenefits$1(benefits, version), additionalDescription ? renderAdditionalDescription(additionalDescription, version) : null, buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex self-end mt-5 gap-4 z-10 text-l" })) : null, image?.src ? jsx(Img, { className: "absolute right-0 bottom-0", image: image }) : null] }));
|
|
988
995
|
});
|
|
989
996
|
// picture width = 242px. Text can overlay picture 20px deep. Outer paddings_x = 36px. 242-36-20 = 186px
|
|
990
997
|
const BENEFITS_WIDTH = 'max-w-[calc(100%-186px)]';
|
|
@@ -1009,7 +1016,7 @@
|
|
|
1009
1016
|
primary: 'text-secondary-text',
|
|
1010
1017
|
secondary: 'text-white',
|
|
1011
1018
|
};
|
|
1012
|
-
return (jsx("div", { className: `text-m-light mt-2.5 ${descStyleMap[version]}`, children: additionalDescription }));
|
|
1019
|
+
return (jsx("div", { className: `text-m-light mt-2.5 z-10 ${descStyleMap[version]}`, children: additionalDescription }));
|
|
1013
1020
|
}
|
|
1014
1021
|
|
|
1015
1022
|
const ArrowButton = JSX(({ className, disabled, ...rest }) => (jsx(Button, { rounded: true, className: `group shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${disabled
|
|
@@ -1685,12 +1692,7 @@
|
|
|
1685
1692
|
})) }) }), jsx("div", { className: "w-full h-2 bg-primary-main" })] }));
|
|
1686
1693
|
}
|
|
1687
1694
|
|
|
1688
|
-
const
|
|
1689
|
-
RUB: '₽',
|
|
1690
|
-
USD: '$',
|
|
1691
|
-
EUR: '€',
|
|
1692
|
-
};
|
|
1693
|
-
const CurrencyInput = JSX(({ className = '', label, currency = 'RUB', onChange, value = '', minValue = 0, maxValue = 300000, ...inputProps }) => {
|
|
1695
|
+
const CurrencyInput = JSX(({ className = '', label, onChange, value = '', minValue = 0, maxValue = 300000, ...inputProps }) => {
|
|
1694
1696
|
const handleChange = (e) => {
|
|
1695
1697
|
if (!onChange) {
|
|
1696
1698
|
return;
|
|
@@ -1698,25 +1700,25 @@
|
|
|
1698
1700
|
const newValue = e.target.value === '' ? '' : String(clamp(e.target.value, minValue, maxValue));
|
|
1699
1701
|
onChange(newValue);
|
|
1700
1702
|
};
|
|
1701
|
-
return (jsxs("div", { className: className, children: [label ? jsx("label", { className: "block text-m-light mb-2", children: label }) : null, jsxs("div", { className: "h-[56px] relative flex items-center", children: [jsx("input", { type: "number", className:
|
|
1703
|
+
return (jsxs("div", { className: className, children: [label ? jsx("label", { className: "block text-m-light mb-2", children: label }) : null, jsxs("div", { className: "h-[56px] relative flex items-center", children: [jsx("input", { type: "number", className: 'text-l pl-4 pr-8 w-full h-full rounded-md border border-solid border-main-stroke hover:border-primary-hover active:border-primary-text focus:border-primary-text', onChange: handleChange, value: value, min: minValue, max: maxValue, ...inputProps }), jsx("span", { className: "text-xl-light absolute right-4", children: "\u20BD" })] })] }));
|
|
1702
1704
|
});
|
|
1703
1705
|
|
|
1704
1706
|
const AMOUNT_KEY = 'amount';
|
|
1705
|
-
const INPUT_LABEL = 'Сумма перевода';
|
|
1706
|
-
const BUTTON_TEXT = 'Далее';
|
|
1707
|
-
const PLACEHOLDER = '1500';
|
|
1708
|
-
const TITLE = 'Укажите сумму перевода';
|
|
1709
1707
|
const FORM_URL = 'https://www.rshb.ru/p2p/';
|
|
1708
|
+
const DEFAULT_TITLE = 'Укажите сумму перевода';
|
|
1709
|
+
const DEFAULT_LABEL = 'Сумма перевода';
|
|
1710
|
+
const DEFAULT_PLACEHOLDER = '1500';
|
|
1711
|
+
const DEFAULT_BUTTON_TEXT = 'Далее';
|
|
1710
1712
|
const BUTTON_CLASS_PARAMS = {
|
|
1711
1713
|
version: 'primary',
|
|
1712
1714
|
className: 'w-full h-[56px] px-9 mt-6',
|
|
1713
1715
|
};
|
|
1714
|
-
const CardTransfer = JSX(({ className = '', title =
|
|
1716
|
+
const CardTransfer = JSX(({ className = '', title = DEFAULT_TITLE, label = DEFAULT_LABEL, placeholder = DEFAULT_PLACEHOLDER, buttonText = DEFAULT_BUTTON_TEXT, ...rest }) => {
|
|
1715
1717
|
const [value, setValue] = useState('');
|
|
1716
1718
|
const isDisabled = !Number(value);
|
|
1717
|
-
return (jsxs(BlockWrapper, { className: `p-[50px] flex flex-col items-center font-sans bg-white ${className}`, ...rest, children: [title ? jsx(Heading, { className: "max-w-[684px] pb-9", headingType: "h2", title: title }) : null, jsxs("form", { className: "w-[468px]", method: "POST", action: FORM_URL, children: [jsx(CurrencyInput, { name: AMOUNT_KEY, value: value, onChange: setValue, placeholder:
|
|
1719
|
+
return (jsxs(BlockWrapper, { className: `p-[50px] flex flex-col items-center font-sans bg-white ${className}`, ...rest, children: [title ? jsx(Heading, { className: "max-w-[684px] pb-9", headingType: "h2", title: title }) : null, jsxs("form", { className: "w-[468px]", method: "POST", action: FORM_URL, children: [jsx(CurrencyInput, { name: AMOUNT_KEY, value: value, onChange: setValue, placeholder: placeholder, label: label }), jsx("button", { type: "submit", className: isDisabled
|
|
1718
1720
|
? getDisabledButtonClasses(BUTTON_CLASS_PARAMS)
|
|
1719
|
-
: getRegularButtonClasses(BUTTON_CLASS_PARAMS), disabled: isDisabled, children:
|
|
1721
|
+
: getRegularButtonClasses(BUTTON_CLASS_PARAMS), disabled: isDisabled, children: buttonText })] })] }));
|
|
1720
1722
|
});
|
|
1721
1723
|
|
|
1722
1724
|
const iconVersionMap = {
|
|
@@ -1986,7 +1988,7 @@
|
|
|
1986
1988
|
background: `url('/icons/ArrowDownIcon.svg') no-repeat right 16px top 50%`,
|
|
1987
1989
|
};
|
|
1988
1990
|
const Select = JSX(({ className = '', id, name, children, value, onChange }) => {
|
|
1989
|
-
return (jsx("select", { className: `appearance-none ${className}`, style: selectStyle, id: id, name: name || id, value: value, onChange: (e) => onChange(e.target.value), placeholder: "", children: children }));
|
|
1991
|
+
return (jsx("select", { className: `appearance-none pl-0.5 ${className}`, style: selectStyle, id: id, name: name || id, value: value, onChange: (e) => onChange(e.target.value), placeholder: "", children: children }));
|
|
1990
1992
|
});
|
|
1991
1993
|
|
|
1992
1994
|
const SelectOption = JSX(({ className = '', value, selected, disabled = false, children }) => {
|
|
@@ -2706,7 +2708,7 @@
|
|
|
2706
2708
|
const Radio = JSX(({ name, text, value, checked, onChange, className }) => (jsx("div", { className: className, children: jsxs("label", { className: "flex items-center relative cursor-pointer", children: [jsx("input", { className: "appearance-none flex justify-center items-center shrink-0 w-5 h-5 border-2 border-primary-main rounded-full cursor-pointer after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main", type: "radio", value: value, name: name, checked: checked, onChange: onChange }), text ? jsx("span", { className: "font-sans ml-3 cursor-pointer", children: text }) : null] }) })));
|
|
2707
2709
|
|
|
2708
2710
|
const RenderRadioButtons = JSX(() => {
|
|
2709
|
-
const [selectedOption, setSelectedOption] = useState('
|
|
2711
|
+
const [selectedOption, setSelectedOption] = useState('option2');
|
|
2710
2712
|
const onChange = (_) => setSelectedOption(_.target.value);
|
|
2711
2713
|
return (jsxs("div", { children: [jsx(Radio, { className: "mb-2", name: "contractType", text: "\u041F\u0440\u043E\u0441\u0442\u043E\u0435 \u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435", value: "option1", checked: selectedOption === 'option1', onChange: onChange }), jsx(Radio, { name: "contractType", text: "\u0421\u0434\u0435\u043B\u043A\u0430 \u0441 \u043D\u0435\u0434\u0432\u0438\u0436\u0438\u043C\u043E\u0441\u0442\u044C\u044E", value: "option2", checked: selectedOption === 'option2', onChange: onChange })] }));
|
|
2712
2714
|
});
|
|
@@ -2869,7 +2871,7 @@
|
|
|
2869
2871
|
const ACTIVE_TEXT_CLASSES = 'text-white';
|
|
2870
2872
|
const INACTIVE_TEXT_CLASSES = 'text-secondary-text group-hover:text-primary-main';
|
|
2871
2873
|
|
|
2872
|
-
const BADGE_CLASSES = 'min-w-[22px] w-[22px] h-[22px] rounded-full text-xs ml-2';
|
|
2874
|
+
const BADGE_CLASSES = 'min-w-[22px] w-[22px] h-[22px] rounded-full text-xs ml-2 flex justify-center items-center';
|
|
2873
2875
|
const ACTIVE_BADGE_CLASSES = 'bg-white/30 text-white';
|
|
2874
2876
|
const INACTIVE_BADGE_CLASSES = 'bg-main-divider text-secondary-text group-hover:text-primary-main';
|
|
2875
2877
|
const renderGroupTab = ({ onClick, currentTab, showCounter, page }) => (tab, i) => {
|