@redneckz/wildless-cms-uni-blocks 0.14.208 → 0.14.210
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 +18 -19
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/CarouselLinks/ArrowIconStyles.d.ts +2 -0
- package/bundle/components/CarouselLinks/ArrowIconStyles.mobile.d.ts +2 -0
- package/bundle/components/CarouselLinks/CarouselLinkButton.d.ts +2 -2
- package/bundle/icons/IconName.d.ts +2 -2
- package/cosmos-static/icons/HuaweiIcon.svg +1 -1
- package/cosmos-static/icons/sprites.svg +1 -1
- package/dist/components/Carousel/CarouselScrollButtons.js +1 -1
- package/dist/components/Carousel/CarouselScrollButtons.js.map +1 -1
- package/dist/components/CarouselLinks/ArrowIconStyles.d.ts +2 -0
- package/dist/components/CarouselLinks/ArrowIconStyles.js +5 -0
- package/dist/components/CarouselLinks/ArrowIconStyles.js.map +1 -0
- package/dist/components/CarouselLinks/ArrowIconStyles.mobile.d.ts +2 -0
- package/dist/components/CarouselLinks/ArrowIconStyles.mobile.js +5 -0
- package/dist/components/CarouselLinks/ArrowIconStyles.mobile.js.map +1 -0
- package/dist/components/CarouselLinks/CarouselLinkButton.d.ts +2 -2
- package/dist/components/CarouselLinks/CarouselLinkButton.js +5 -4
- package/dist/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
- package/dist/components/CarouselLinks/CarouselLinks.js +4 -7
- package/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/dist/components/ExchangeRateTile/CurrentLocation.js +1 -1
- package/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +1 -1
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/dist/icons/IconName.d.ts +2 -2
- package/dist/icons/IconName.js +2 -2
- package/dist/icons/IconName.js.map +1 -1
- package/dist/ui-kit/Select/Select.js +2 -2
- package/dist/ui-kit/Select/Select.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Carousel/CarouselScrollButtons.js +1 -1
- package/lib/components/Carousel/CarouselScrollButtons.js.map +1 -1
- package/lib/components/CarouselLinks/ArrowIconStyles.d.ts +2 -0
- package/lib/components/CarouselLinks/ArrowIconStyles.js +3 -0
- package/lib/components/CarouselLinks/ArrowIconStyles.js.map +1 -0
- package/lib/components/CarouselLinks/ArrowIconStyles.mobile.d.ts +2 -0
- package/lib/components/CarouselLinks/ArrowIconStyles.mobile.js +3 -0
- package/lib/components/CarouselLinks/ArrowIconStyles.mobile.js.map +1 -0
- package/lib/components/CarouselLinks/CarouselLinkButton.d.ts +2 -2
- package/lib/components/CarouselLinks/CarouselLinkButton.js +5 -4
- package/lib/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
- package/lib/components/CarouselLinks/CarouselLinks.js +4 -7
- package/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/lib/components/ExchangeRateTile/CurrentLocation.js +1 -1
- package/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +1 -1
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/lib/icons/IconName.d.ts +2 -2
- package/lib/icons/IconName.js +2 -2
- package/lib/icons/IconName.js.map +1 -1
- package/lib/ui-kit/Select/Select.js +2 -2
- package/lib/ui-kit/Select/Select.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +38 -34
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/CarouselLinks/ArrowIconStyles.d.ts +2 -0
- package/mobile/bundle/icons/IconName.d.ts +2 -2
- package/mobile/dist/components/Carousel/CarouselScrollButtons.js +1 -1
- package/mobile/dist/components/Carousel/CarouselScrollButtons.js.map +1 -1
- package/mobile/dist/components/CarouselLinks/ArrowIconStyles.d.ts +2 -0
- package/mobile/dist/components/CarouselLinks/ArrowIconStyles.js +5 -0
- package/mobile/dist/components/CarouselLinks/ArrowIconStyles.js.map +1 -0
- package/mobile/dist/components/CarouselLinks/CarouselLinkButton.js +5 -2
- package/mobile/dist/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js +8 -11
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js +1 -1
- package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/dist/icons/IconName.d.ts +2 -2
- package/mobile/dist/icons/IconName.js +2 -2
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/dist/ui-kit/Select/Select.js +2 -2
- package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/Carousel/CarouselScrollButtons.js +1 -1
- package/mobile/lib/components/Carousel/CarouselScrollButtons.js.map +1 -1
- package/mobile/lib/components/CarouselLinks/ArrowIconStyles.d.ts +2 -0
- package/mobile/lib/components/CarouselLinks/ArrowIconStyles.js +3 -0
- package/mobile/lib/components/CarouselLinks/ArrowIconStyles.js.map +1 -0
- package/mobile/lib/components/CarouselLinks/CarouselLinkButton.js +5 -2
- package/mobile/lib/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js +8 -11
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js +1 -1
- package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/lib/icons/IconName.d.ts +2 -2
- package/mobile/lib/icons/IconName.js +2 -2
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/lib/ui-kit/Select/Select.js +2 -2
- package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
- package/mobile/src/components/Carousel/CarouselScrollButtons.tsx +3 -3
- package/mobile/src/components/CarouselLinks/ArrowIconStyles.ts +2 -0
- package/mobile/src/components/CarouselLinks/CarouselLinkButton.tsx +47 -19
- package/mobile/src/components/CarouselLinks/CarouselLinks.tsx +45 -55
- package/mobile/src/components/ExchangeRateTile/CurrentLocation.tsx +2 -2
- package/mobile/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +1 -1
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +3 -3
- package/mobile/src/icons/HuaweiIcon.svg +1 -3
- package/mobile/src/icons/IconName.ts +3 -3
- package/mobile/src/ui-kit/Select/Select.tsx +3 -5
- package/package.json +1 -1
- package/src/components/Carousel/CarouselScrollButtons.tsx +3 -3
- package/src/components/CarouselLinks/ArrowIconStyles.mobile.ts +2 -0
- package/src/components/CarouselLinks/ArrowIconStyles.ts +2 -0
- package/src/components/CarouselLinks/CarouselLinkButton.tsx +34 -18
- package/src/components/CarouselLinks/CarouselLinks.fixture.mobile.tsx +2 -2
- package/src/components/CarouselLinks/CarouselLinks.tsx +11 -14
- package/src/components/ExchangeRateTile/CurrentLocation.tsx +2 -2
- package/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +1 -1
- package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +3 -3
- package/src/components/MobileAppTile/MobileAppTile.fixture.tsx +3 -3
- package/src/icons/HuaweiIcon.svg +1 -3
- package/src/icons/IconName.ts +3 -2
- package/src/ui-kit/Select/Select.tsx +3 -5
- package/bundle/components/CarouselLinks/CarouselLinkButton.mobile.d.ts +0 -5
- package/bundle/components/CarouselLinks/CarouselLinks.mobile.d.ts +0 -5
- package/dist/components/CarouselLinks/CarouselLinkButton.mobile.d.ts +0 -5
- package/dist/components/CarouselLinks/CarouselLinkButton.mobile.js +0 -15
- package/dist/components/CarouselLinks/CarouselLinkButton.mobile.js.map +0 -1
- package/dist/components/CarouselLinks/CarouselLinks.mobile.d.ts +0 -5
- package/dist/components/CarouselLinks/CarouselLinks.mobile.js +0 -20
- package/dist/components/CarouselLinks/CarouselLinks.mobile.js.map +0 -1
- package/lib/components/CarouselLinks/CarouselLinkButton.mobile.d.ts +0 -5
- package/lib/components/CarouselLinks/CarouselLinkButton.mobile.js +0 -13
- package/lib/components/CarouselLinks/CarouselLinkButton.mobile.js.map +0 -1
- package/lib/components/CarouselLinks/CarouselLinks.mobile.d.ts +0 -5
- package/lib/components/CarouselLinks/CarouselLinks.mobile.js +0 -18
- package/lib/components/CarouselLinks/CarouselLinks.mobile.js.map +0 -1
- package/src/components/CarouselLinks/CarouselLinkButton.mobile.tsx +0 -40
- package/src/components/CarouselLinks/CarouselLinks.mobile.tsx +0 -75
|
@@ -1111,9 +1111,9 @@
|
|
|
1111
1111
|
onClose: handleClose,
|
|
1112
1112
|
iconVersion,
|
|
1113
1113
|
});
|
|
1114
|
-
return (jsxs("div", { className: style('space-y-xs', className), children: [renderLabel(label), jsxs("div", { className: style('relative', hasOpen ? 'z-20' : 'z-10'), ref: inputRef, children: [jsxs("div", { className: style('h-14 text-l flex justify-between
|
|
1114
|
+
return (jsxs("div", { className: style('space-y-xs', className), children: [renderLabel(label), jsxs("div", { className: style('relative', hasOpen ? 'z-20' : 'z-10'), ref: inputRef, children: [jsxs("div", { className: style('h-14 [&>*]:p-m pr-8 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden', getStyle(isBorder, valid, isDisabled)), onClick: hasOpen ? handleClose : open, children: [jsx("p", { className: "line-clamp-2 text-ellipsis", children: formatOption(value) || placeholder }), renderIcon$1(hasOpen, iconVersion)] }), isSearch && hasOpen ? (jsx("div", { className: style('absolute top-0 w-full z-20'), children: jsx(Input, { type: "text", autoFocus: true, value: query, onChange: setQuery }) })) : null] })] }));
|
|
1115
1115
|
});
|
|
1116
|
-
const renderIcon$1 = (isOpen, iconVersion) => (jsx(Icon, { className: style('absolute right-3', isOpen ? '' : 'rotate-180'), iconVersion: iconVersion, name: "ArrowUpIcon", width: "16", height: "16" }));
|
|
1116
|
+
const renderIcon$1 = (isOpen, iconVersion) => (jsx(Icon, { className: style('absolute right-3 flex self-center', isOpen ? '' : 'rotate-180'), iconVersion: iconVersion, name: "ArrowUpIcon", width: "16", height: "16" }));
|
|
1117
1117
|
const getStyle = (isBorder, valid, disabled) => style(isBorder ? 'border rounded-md ' : '', isBorder && !disabled ? 'hover:border-primary-hover' : '', disabled ? 'bg-main-divider' : 'cursor-pointer ', valid ? 'border-gray' : 'border-error');
|
|
1118
1118
|
|
|
1119
1119
|
const SelectControl = JSX(({ className = '', label, error, ...rest }) => (jsxs("div", { className: className, children: [jsx(Select, { ...rest, valid: !error, label: rest?.errors ? `${label}*` : label }), renderErrorText(error)] })));
|
|
@@ -2974,9 +2974,9 @@
|
|
|
2974
2974
|
if (isSingleTab) {
|
|
2975
2975
|
return renderCalculator(tabs[0]);
|
|
2976
2976
|
}
|
|
2977
|
-
return tabs.map((tab, index) => (jsx(Foldable, { isFoldButtonOnTop: true, unfoldedByDefault: index === 0, renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { isUnfolded: isUnfolded, children: renderCalculator(tab) })), renderFoldButton: renderFoldButton$
|
|
2977
|
+
return tabs.map((tab, index) => (jsx(Foldable, { isFoldButtonOnTop: true, unfoldedByDefault: index === 0, renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { isUnfolded: isUnfolded, children: renderCalculator(tab) })), renderFoldButton: renderFoldButton$3(tab) }, index.toString())));
|
|
2978
2978
|
};
|
|
2979
|
-
const renderFoldButton$
|
|
2979
|
+
const renderFoldButton$3 = (tab) => ({ isUnfolded, onToggle }) => {
|
|
2980
2980
|
const align = tab.nav?.align || 'text-left';
|
|
2981
2981
|
return (jsxs("button", { type: "button", onClick: onToggle, className: "w-full p-xl bg-primary-main flex items-center border-b border-white", children: [jsx("div", { className: "w-11 h-11 bg-white rounded-md flex justify-center items-center", children: jsx(Icon, { name: tab.nav?.icon?.icon, iconVersion: "color", width: "24", height: "24" }) }), jsxs("div", { className: "flex-1 flex flex-col pl-s", children: [jsx(Text, { align: align, color: "text-white", children: tab.nav?.title }), jsx(Text, { align: align, size: "text-s", color: "text-white", font: "font-light", children: tab.nav?.description })] }), jsx(Icon, { name: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', iconVersion: "white", width: "24", height: "24" })] }));
|
|
2982
2982
|
};
|
|
@@ -3070,7 +3070,7 @@
|
|
|
3070
3070
|
onScrollRight();
|
|
3071
3071
|
}
|
|
3072
3072
|
}, [scrollRight, onScrollRight, hasEdgeBlocks, canScrollLeft, activeIndex, itemCount]);
|
|
3073
|
-
return (jsxs("div", { className: "hidden
|
|
3073
|
+
return (jsxs("div", { className: "m:hidden block", children: [renderBlur(scroll), canMoveLeft ? (jsx(ScrollLeftButton, { className: style(scrollButtonStyle$1, arrowsPadded ? 'left-1 m:left-8' : 'left-0'), onClick: handleScrollLeft })) : null, canMoveRight ? (jsx(ScrollRightButton, { className: style(scrollButtonStyle$1, arrowsPadded ? 'right-1 m:right-8' : 'right-0'), onClick: handleScrollRight })) : null] }));
|
|
3074
3074
|
});
|
|
3075
3075
|
const renderBlur = (scroll) => (jsxs("div", { children: [scroll.canScrollLeft ? (jsx("div", { className: style(blurBaseStyle, 'left-0 bg-opacity-from-white group-data-secondary:bg-none') })) : null, scroll.canScrollRight ? (jsx("div", { className: style(blurBaseStyle, 'right-0 bg-opacity-to-white group-data-secondary:bg-none') })) : null] }));
|
|
3076
3076
|
|
|
@@ -3161,38 +3161,25 @@
|
|
|
3161
3161
|
const CarouselCatalogCard = JSX(({ className = '', title, description, image, price, button, colors = [], align = 'text-left', padding, ...rest }) => (jsx(BlockWrapper, { className: style('flex flex-col justify-left', className), defaultPadding: "p-2xl", ...rest, children: jsxs(BaseTile, { className: "h-full", padding: padding, title: jsx(Headline, { title: title, description: description, headlineVersion: "XS", isEmbedded: true, align: align }), rightImage: image?.src ? (jsx(Img, { className: "flex justify-center align-center mb-xl", image: image })) : null, buttons: renderButtonsSection([button], { buttonClassName: 'w-full self-end' }), children: [colors?.length ? (jsxs("div", { className: "flex text-secondary-text mb-m", children: [jsx("div", { className: "mr-xs", children: jsx(Text, { size: "text-s", align: "text-left", font: "font-light", children: "\u0426\u0432\u0435\u0442\u0430:" }) }), colors.map(renderColorOption)] })) : null, price ? (jsxs(Text, { size: "text-h3", align: "text-left", children: [price, "\u00A0\u20BD"] })) : null] }) })));
|
|
3162
3162
|
const renderColorOption = (color, i) => (jsx("figure", { className: `w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${cardStyleMap[color]}` }, String(i)));
|
|
3163
3163
|
|
|
3164
|
-
const
|
|
3165
|
-
|
|
3166
|
-
return (jsxs(Tag, { tag: tag, className: style('flex items-center w-full gap-1', justifyContent === 'between' ? 'justify-between' : 'justify-center', className), onClick: onClick, role: role, ...rest, children: [textNode ? jsx("div", { children: textNode }) : null, iconNode ? jsx("div", { children: iconNode }) : null] }));
|
|
3167
|
-
});
|
|
3168
|
-
|
|
3169
|
-
const DefaultFoldButton = JSX(({ className = '', label, icon, dataTheme = '', disabled = false, onClick }) => (jsx(TextWithIcon, { tag: "button", onClick: onClick, disabled: disabled, "data-theme": dataTheme, justifyContent: "center", role: "button", className: style('py-4 border border-transparent outline-none focus:border-primary-text space-x-s', disabled
|
|
3170
|
-
? 'bg-main-divider text-main-disabled hover:bg-main-divider'
|
|
3171
|
-
: 'bg-primary-main text-white hover:bg-primary-hove', className), textNode: jsx(Text, { size: "text-h4", children: label }), iconNode: icon ? (jsx(Img, { image: {
|
|
3172
|
-
icon,
|
|
3173
|
-
iconVersion: 'white',
|
|
3174
|
-
}, className: "my-auto", width: "20", height: "20" })) : null })));
|
|
3175
|
-
const renderDefaultFoldButton = ({ isUnfolded, onToggle }) => {
|
|
3176
|
-
const labels = ['Развернуть', 'Скрыть'];
|
|
3177
|
-
const icons = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
3178
|
-
return (jsx(DefaultFoldButton, { icon: icons[Number(isUnfolded)], label: labels[Number(isUnfolded)], onClick: onToggle }));
|
|
3179
|
-
};
|
|
3164
|
+
const IconSize = '20';
|
|
3165
|
+
const IconVersion = 'color';
|
|
3180
3166
|
|
|
3167
|
+
const LINK_CLASS_NAME = `absolute border
|
|
3168
|
+
bg-white flex items-center justify-between group-hover/link:text-primary-main`;
|
|
3169
|
+
const LINK_BORDER_CLASS_NAME = 'absolute w-full h-full border border-white';
|
|
3181
3170
|
const CarouselLinkButton = JSX(({ className = '', icon, ...linkProps }) => {
|
|
3182
3171
|
const link = useLink();
|
|
3183
3172
|
const { text, href, target, onClick } = link(linkProps);
|
|
3184
|
-
return text ? (jsx("div", { className: style('
|
|
3173
|
+
return text ? (jsx("div", { className: style('flex relative group/link pl-s pb-s sm:pr-2xs min-w-64 sm:min-w-72', className), children: jsxs("div", { className: "relative min-h-16 w-full pb-lg sm:pb-0", children: [jsxs("a", { className: style(LINK_CLASS_NAME, 'flex rounded-md lg:rounded-none w-full w-full p-lg whitespace-nowrap z-10'), role: "link", href: href, target: target, onClick: onClick, children: [jsxs("div", { className: "flex items-center space-x-lg", children: [icon ? (jsx(Img, { imageClassName: "text-green-dark", image: icon, width: IconSize, height: IconSize })) : null, jsx(Text, { size: "text-l", font: "font-light", color: "text-primary-text", children: text })] }), jsx(Img, { className: "group-hover/link:brightness-100 sm:ml-2xs", image: { icon: 'ArrowRightIcon', iconVersion: IconVersion }, imageClassName: "group-hover/link:text-primary-main", width: IconSize, height: IconSize })] }), jsx("div", { className: style(LINK_BORDER_CLASS_NAME, '-bottom-1 -left-1') }), jsx("div", { className: style(LINK_BORDER_CLASS_NAME, '-bottom-2 -left-2') })] }) })) : null;
|
|
3185
3174
|
});
|
|
3186
3175
|
|
|
3187
|
-
const CarouselLinks = JSX(({ className, additionalDescription, description, links
|
|
3188
|
-
const renderLinks = (links,
|
|
3189
|
-
const
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
return (jsx("div", { className: "mt-4xl", children: hiddenLinks.length > 0 ? (jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (jsxs("div", { children: [jsx("div", { className: "mb-1", children: visibleLinks }), jsx(FoldableSection, { isUnfolded: isUnfolded, children: hiddenLinks })] })), renderFoldButton: renderFoldButton$3 })) : (jsx("div", { children: visibleLinks })) }));
|
|
3176
|
+
const CarouselLinks = JSX(({ className, additionalDescription, description, links, title, ...rest }) => (jsx(BlockWrapper, { defaultPadding: "p-5xl", className: style('overflow-hidden', className), ...rest, children: jsxs("div", { className: "flex flex-col m:flex-row gap-s justify-between", children: [jsxs("div", { className: "w-full m:w-1/3", children: [jsx(Headline, { isEmbedded: true, title: title, description: description, as: "h1", align: "text-left" }), jsx(Headline, { className: "pt-m", description: additionalDescription, align: "text-left", isEmbedded: true })] }), links?.length ? renderLinks(links, 'm:justify-self-end m:pt-s w-full m:w-2/3') : null] }) })));
|
|
3177
|
+
const renderLinks = (links, className = '') => {
|
|
3178
|
+
const itemCount = Math.ceil(links.length / 3);
|
|
3179
|
+
return (jsx(Carousel, { className: className, version: "secondary", itemCount: itemCount, arrowsPadded: false, padding: "p-0", visibleItemCount: 0, children: Array.from({ length: itemCount })
|
|
3180
|
+
.fill(null)
|
|
3181
|
+
.map((_, groupIndex) => (jsx("div", { className: style('flex flex-wrap gap-2xs m:justify-center'), children: links.slice(groupIndex * 3, (groupIndex + 1) * 3).map((link, index) => (jsx(CarouselLinkButton, { ...link }, String(index)))) }, String(groupIndex)))) }));
|
|
3194
3182
|
};
|
|
3195
|
-
const renderFoldButton$3 = ({ isUnfolded, onToggle }) => isUnfolded ? null : (jsx(DefaultFoldButton, { className: "border-t-main-divider/50", icon: "PlusIcon", label: "\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0435\u0449\u0435", onClick: onToggle }));
|
|
3196
3183
|
|
|
3197
3184
|
const LinkWrapper = JSX(({ className = '', href, target, isRemote = false, children }) => {
|
|
3198
3185
|
const link = useLink({ isRemote });
|
|
@@ -3323,6 +3310,23 @@
|
|
|
3323
3310
|
|
|
3324
3311
|
const isOdd = (n) => n % 2 !== 0;
|
|
3325
3312
|
|
|
3313
|
+
const TextWithIcon = JSX(({ textNode, iconNode, tag, onClick, justifyContent = 'between', className, role, ...rest }) => {
|
|
3314
|
+
const Tag = tag;
|
|
3315
|
+
return (jsxs(Tag, { tag: tag, className: style('flex items-center w-full gap-1', justifyContent === 'between' ? 'justify-between' : 'justify-center', className), onClick: onClick, role: role, ...rest, children: [textNode ? jsx("div", { children: textNode }) : null, iconNode ? jsx("div", { children: iconNode }) : null] }));
|
|
3316
|
+
});
|
|
3317
|
+
|
|
3318
|
+
const DefaultFoldButton = JSX(({ className = '', label, icon, dataTheme = '', disabled = false, onClick }) => (jsx(TextWithIcon, { tag: "button", onClick: onClick, disabled: disabled, "data-theme": dataTheme, justifyContent: "center", role: "button", className: style('py-4 border border-transparent outline-none focus:border-primary-text space-x-s', disabled
|
|
3319
|
+
? 'bg-main-divider text-main-disabled hover:bg-main-divider'
|
|
3320
|
+
: 'bg-primary-main text-white hover:bg-primary-hove', className), textNode: jsx(Text, { size: "text-h4", children: label }), iconNode: icon ? (jsx(Img, { image: {
|
|
3321
|
+
icon,
|
|
3322
|
+
iconVersion: 'white',
|
|
3323
|
+
}, className: "my-auto", width: "20", height: "20" })) : null })));
|
|
3324
|
+
const renderDefaultFoldButton = ({ isUnfolded, onToggle }) => {
|
|
3325
|
+
const labels = ['Развернуть', 'Скрыть'];
|
|
3326
|
+
const icons = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
3327
|
+
return (jsx(DefaultFoldButton, { icon: icons[Number(isUnfolded)], label: labels[Number(isUnfolded)], onClick: onToggle }));
|
|
3328
|
+
};
|
|
3329
|
+
|
|
3326
3330
|
const NotFound = JSX(({ title, description }) => (jsxs("div", { className: "bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center", children: [jsx(Img, { image: { icon: 'MagnifierIcon', iconVersion: 'normal' }, width: "120", height: "120" }), jsx(Headline, { title: title, description: description, headlineVersion: "S", isEmbedded: true, align: AlignStyles })] })));
|
|
3327
3331
|
|
|
3328
3332
|
const ICONS$1 = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
@@ -3552,7 +3556,7 @@
|
|
|
3552
3556
|
};
|
|
3553
3557
|
|
|
3554
3558
|
const icon = { icon: 'GpsIcon' };
|
|
3555
|
-
const CurrentLocation = JSX(({ className = '', address }) => (jsxs("div", { className: `flex gap-s ${className}`, children: [jsx(RoundedIcon, { ...icon, iconBgVersion: "primary" }), jsxs("div", { className: "space-y-2xs", children: [address ? (jsx(Paragraph, { size: "text-l", color: "text-primary-main", children: address })) : null, jsx(Paragraph, { size: "text-m", color: "text-secondary-text", children: "\u041A\u0443\u0440\u0441 \u0443\u043A\u0430\u0437\u0430\u043D \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u043D\u043D\u043E\u0433\u043E \u043E\u0444\u0438\u0441\u0430" })] })] })));
|
|
3559
|
+
const CurrentLocation = JSX(({ className = '', address }) => (jsxs("div", { className: `flex gap-s ${className}`, children: [jsx(RoundedIcon, { ...icon, iconBgVersion: "primary", className: "shrink-0" }), jsxs("div", { className: "space-y-2xs whitespace-pre-wrap", children: [address ? (jsx(Paragraph, { size: "text-l", color: "text-primary-main", children: address })) : null, jsx(Paragraph, { size: "text-m", color: "text-secondary-text", children: "\u041A\u0443\u0440\u0441 \u0443\u043A\u0430\u0437\u0430\u043D \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u043D\u043D\u043E\u0433\u043E \u043E\u0444\u0438\u0441\u0430" })] })] })));
|
|
3556
3560
|
|
|
3557
3561
|
const roundTo = (value, precision = 2) => {
|
|
3558
3562
|
const factor = 10 ** precision;
|
|
@@ -3604,7 +3608,7 @@
|
|
|
3604
3608
|
selectBuy: currencyRatesSell?.[0]?.currency?.currency || Currency.USD,
|
|
3605
3609
|
});
|
|
3606
3610
|
const handleSetCalcState = useCallback((newState) => setCalcState((oldState) => ({ ...oldState, ...newState })), []);
|
|
3607
|
-
return (jsxs("div", { className: `
|
|
3611
|
+
return (jsxs("div", { className: `flex flex-col gap-m pt-2xl ${className}`, children: [renderInput({
|
|
3608
3612
|
placeholder: 'Хочу продать',
|
|
3609
3613
|
rates: currencyRatesSell,
|
|
3610
3614
|
selected: calcState.selectSell,
|
|
@@ -3674,7 +3678,7 @@
|
|
|
3674
3678
|
currencyRatesBuy.unshift({ currency: { currency: Currency.RUB } });
|
|
3675
3679
|
const currencyRatesSell = currencyRates.filter((_) => _.saleExchangeRate);
|
|
3676
3680
|
currencyRatesSell.push({ currency: { currency: Currency.RUB } });
|
|
3677
|
-
return (jsx(BlockWrapper, { className: style('box-border min-h-80', className), ...rest, children: jsx(BaseTile, { className: "h-full", title: jsx(Heading, { headingType: "h4", title: title, className: "whitespace-pre-wrap" }), children: jsxs("div", { className: "flex gap-6xl flex-wrap", children: [jsxs("div", { children: [currencyRates ? (jsx(CurrencyTable, { className: "mb-xl", exchangeCurrencyItems: currencyRates })) : null, jsx(CurrentLocation, { address: exchangeRates?.address })] }), currencyRates.length && currencyRatesBuy.length && currencyRatesSell.length ? (jsx(ExchangeCurrencyCalculator, { className: "grow", currencyRatesBuy: currencyRatesBuy, currencyRatesSell: currencyRatesSell, button: button })) : null] }) }) }));
|
|
3681
|
+
return (jsx(BlockWrapper, { className: style('box-border min-h-80', className), ...rest, children: jsx(BaseTile, { className: "h-full", title: jsx(Heading, { headingType: "h4", title: title, className: "whitespace-pre-wrap" }), children: jsxs("div", { className: "flex w-full gap-6xl flex-wrap sm:flex-nowrap", children: [jsxs("div", { className: "max-w-1/2", children: [currencyRates ? (jsx(CurrencyTable, { className: "mb-xl", exchangeCurrencyItems: currencyRates })) : null, jsx(CurrentLocation, { address: exchangeRates?.address })] }), currencyRates.length && currencyRatesBuy.length && currencyRatesSell.length ? (jsx(ExchangeCurrencyCalculator, { className: "grow w-1/2", currencyRatesBuy: currencyRatesBuy, currencyRatesSell: currencyRatesSell, button: button })) : null] }) }) }));
|
|
3678
3682
|
});
|
|
3679
3683
|
const getCurrencyRates = (currencies) => {
|
|
3680
3684
|
return currencies?.filter((_) => [1, 2, 3].includes(_?.currency?.id)) || [];
|
|
@@ -5676,7 +5680,7 @@
|
|
|
5676
5680
|
|
|
5677
5681
|
const joinList = (sep) => (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: `sep-${i}` }, el) : [el]), []);
|
|
5678
5682
|
|
|
5679
|
-
const packageVersion = "0.14.
|
|
5683
|
+
const packageVersion = "0.14.209";
|
|
5680
5684
|
|
|
5681
5685
|
exports.Blocks = Blocks;
|
|
5682
5686
|
exports.ContentPage = ContentPage;
|