@redneckz/wildless-cms-uni-blocks 0.9.9 → 0.9.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/migration-scripts/0.9.9.js +0 -1
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +16 -14
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
- package/bundle/components/Footer/SocialMedia.d.ts +1 -1
- package/bundle/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
- package/dist/components/ApplicationForm/ApplicationFormCredit.js +1 -1
- package/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
- package/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
- package/dist/components/CarouselEventCard/CarouselEventCard.js +1 -1
- package/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/dist/components/CarouselProductCard/CarouselProductCard.js +5 -2
- package/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
- package/dist/components/Footer/MediaButton.js +6 -7
- package/dist/components/Footer/MediaButton.js.map +1 -1
- package/dist/components/Footer/SocialMedia.d.ts +1 -1
- package/dist/components/Footer/SocialMedia.js +2 -2
- package/dist/components/Footer/SocialMedia.js.map +1 -1
- package/dist/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/ApplicationFormCredit.js +1 -1
- package/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.fixture.d.ts +2 -10
- package/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
- package/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
- package/lib/components/CarouselEventCard/CarouselEventCard.js +1 -1
- package/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/lib/components/CarouselProductCard/CarouselProductCard.fixture.d.ts +2 -0
- package/lib/components/CarouselProductCard/CarouselProductCard.js +5 -2
- package/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
- package/lib/components/Footer/MediaButton.js +6 -7
- package/lib/components/Footer/MediaButton.js.map +1 -1
- package/lib/components/Footer/SocialMedia.d.ts +1 -1
- package/lib/components/Footer/SocialMedia.js +2 -2
- package/lib/components/Footer/SocialMedia.js.map +1 -1
- package/lib/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
- package/mobile/bundle/bundle.umd.js +7 -8
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
- package/mobile/bundle/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
- package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js +1 -1
- package/mobile/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
- package/mobile/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
- package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js +1 -1
- package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js +5 -2
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/mobile/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
- package/mobile/dist/components/Footer/MediaButton.js +6 -7
- package/mobile/dist/components/Footer/MediaButton.js.map +1 -1
- package/mobile/dist/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
- package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js +1 -1
- package/mobile/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
- package/mobile/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
- package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js +1 -1
- package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js +5 -2
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/mobile/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
- package/mobile/lib/components/Footer/MediaButton.js +6 -7
- package/mobile/lib/components/Footer/MediaButton.js.map +1 -1
- package/mobile/lib/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
- package/mobile/src/components/ApplicationForm/ApplicationFormCredit.tsx +1 -1
- package/mobile/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.tsx +2 -4
- package/mobile/src/components/CarouselEventCard/CarouselEventCard.tsx +2 -2
- package/mobile/src/components/CarouselInvestmentCard/CarouselInvestmentCard.example.json +3 -1
- package/mobile/src/components/CarouselProductCard/CarouselProductCard.example.json +3 -1
- package/mobile/src/components/CarouselProductCard/CarouselProductCard.tsx +5 -1
- package/mobile/src/components/CarouselProductCard/CarouselProductCardContent.ts +4 -0
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +4 -2
- package/mobile/src/components/ErrorBlock/ErrorBlock.example.json +3 -1
- package/mobile/src/components/Footer/MediaButton.tsx +7 -10
- package/mobile/src/components/MobileAppTile/MobileAppTile.example.json +3 -1
- package/mobile/src/components/PictureText/PictureText.example.json +3 -1
- package/mobile/src/components/ProductBlock/ProductBlock.example.json +3 -1
- package/mobile/src/components/ProductTile/ProductTile.example.json +3 -1
- package/mobile/src/components/Tile/Tile.example.json +3 -1
- package/mobile/src/components/VerticalLayout/VerticalLayoutContent.ts +0 -2
- package/package.json +1 -1
- package/src/components/ApplicationForm/ApplicationFormCredit.tsx +1 -1
- package/src/components/Carousel/Carousel.fixture.tsx +18 -5
- package/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.fixture.tsx +2 -9
- package/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.tsx +2 -4
- package/src/components/CarouselEventCard/CarouselEventCard.tsx +2 -2
- package/src/components/CarouselInvestmentCard/CarouselInvestmentCard.example.json +3 -1
- package/src/components/CarouselProductCard/CarouselProductCard.example.json +3 -1
- package/src/components/CarouselProductCard/CarouselProductCard.fixture.tsx +10 -0
- package/src/components/CarouselProductCard/CarouselProductCard.tsx +5 -1
- package/src/components/CarouselProductCard/CarouselProductCardContent.ts +4 -0
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +4 -2
- package/src/components/ErrorBlock/ErrorBlock.example.json +3 -1
- package/src/components/Footer/MediaButton.tsx +7 -10
- package/src/components/Footer/SocialMedia.tsx +3 -11
- package/src/components/MobileAppTile/MobileAppTile.example.json +3 -1
- package/src/components/PictureText/PictureText.example.json +3 -1
- package/src/components/ProductBlock/ProductBlock.example.json +3 -1
- package/src/components/ProductTile/ProductTile.example.json +3 -1
- package/src/components/Tile/Tile.example.json +3 -1
- package/src/components/VerticalLayout/VerticalLayoutContent.ts +0 -2
|
@@ -62,17 +62,15 @@ const buttonStylesWithText = (text: string, buttonSize: string) =>
|
|
|
62
62
|
: `group/media flex items-center justify-center box-border ${buttonSizeStyles[buttonSize]}`;
|
|
63
63
|
|
|
64
64
|
export const MediaButton = JSX<MediaButtonProps>(
|
|
65
|
-
({
|
|
66
|
-
const { href, version, text
|
|
65
|
+
({ buttonSize = 'default', rounded = false, icon, ...rest }) => {
|
|
66
|
+
const { href, version, text = '' } = rest;
|
|
67
67
|
|
|
68
68
|
const { iconMapped, label } =
|
|
69
69
|
ICONS_MAP.find(({ origins }) => origins.some((_) => href?.includes(_))) || {};
|
|
70
70
|
|
|
71
|
-
const iconCustom = icon ?? iconMapped;
|
|
71
|
+
const iconCustom = getFilteredIcon(icon) ?? iconMapped;
|
|
72
72
|
|
|
73
|
-
const iconWithVersion = iconCustom
|
|
74
|
-
? { ...getIconWithVersion(iconCustom), iconVersion }
|
|
75
|
-
: undefined;
|
|
73
|
+
const iconWithVersion = iconCustom ? getIconWithVersion(iconCustom) : undefined;
|
|
76
74
|
|
|
77
75
|
return (
|
|
78
76
|
<Button
|
|
@@ -83,11 +81,8 @@ export const MediaButton = JSX<MediaButtonProps>(
|
|
|
83
81
|
'hover:bg-primary-main hover:text-black',
|
|
84
82
|
'group-data-secondary:bg-white border-main-divider group-data-secondary:hover:bg-secondary-hover',
|
|
85
83
|
'group-data-gray:border-green',
|
|
86
|
-
buttonStylesWithText(text
|
|
84
|
+
buttonStylesWithText(text, buttonSize),
|
|
87
85
|
)}
|
|
88
|
-
aboveText={aboveText}
|
|
89
|
-
appendLeft={appendLeft}
|
|
90
|
-
appendRight={appendRight}
|
|
91
86
|
aria-label={label}
|
|
92
87
|
rel="noopener noreferrer"
|
|
93
88
|
target="_blank"
|
|
@@ -108,3 +103,5 @@ export const MediaButton = JSX<MediaButtonProps>(
|
|
|
108
103
|
);
|
|
109
104
|
},
|
|
110
105
|
);
|
|
106
|
+
|
|
107
|
+
const getFilteredIcon = (icon: Picture | undefined) => (icon?.src || icon?.icon ? icon : undefined);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
3
|
-
import { MediaButton, type ButtonSize } from './MediaButton';
|
|
4
3
|
import { Text } from '../../ui-kit/Text/Text';
|
|
4
|
+
import type { ButtonSize } from './MediaButton';
|
|
5
|
+
import { MediaButton } from './MediaButton';
|
|
5
6
|
|
|
6
7
|
export interface SocialMediaProps {
|
|
7
8
|
className?: string;
|
|
@@ -14,16 +15,7 @@ export const SocialMedia = JSX<SocialMediaProps>(
|
|
|
14
15
|
<div className="font-sans">
|
|
15
16
|
<div className={`flex gap-1 ${className}`}>
|
|
16
17
|
{media?.map((_, index) => (
|
|
17
|
-
<MediaButton
|
|
18
|
-
key={String(index)}
|
|
19
|
-
aboveText={_.aboveText}
|
|
20
|
-
appendLeft={_.appendLeft}
|
|
21
|
-
appendRight={_.appendRight}
|
|
22
|
-
buttonSize={buttonSize}
|
|
23
|
-
text={_.text}
|
|
24
|
-
version={_.version}
|
|
25
|
-
{..._}
|
|
26
|
-
/>
|
|
18
|
+
<MediaButton key={String(index)} buttonSize={buttonSize} {..._} />
|
|
27
19
|
))}
|
|
28
20
|
</div>
|
|
29
21
|
<Text size="text-s-light" color="text-secondary-text">
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { AlignTypeWithStretch } from '../../model/AlignType';
|
|
2
|
-
import type { ColorPalette } from '../../model/ContentPageDef';
|
|
3
2
|
import type { UniBlockContent } from '../../model/JSXBlock';
|
|
4
3
|
import type { GapVersion } from '../HorizontalLayout/HorizontalLayoutContent';
|
|
5
4
|
|
|
@@ -7,7 +6,6 @@ import type { GapVersion } from '../HorizontalLayout/HorizontalLayoutContent';
|
|
|
7
6
|
* @title Вертикальный компоновщик
|
|
8
7
|
*/
|
|
9
8
|
export type VerticalLayoutContent = UniBlockContent & {
|
|
10
|
-
colorPalette?: ColorPalette;
|
|
11
9
|
align?: AlignTypeWithStretch;
|
|
12
10
|
gap?: GapVersion;
|
|
13
11
|
/** @title Внутренний отступ компоновщика */
|