@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.
Files changed (101) hide show
  1. package/bin/migration-scripts/0.9.9.js +0 -1
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +16 -14
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
  6. package/bundle/components/Footer/SocialMedia.d.ts +1 -1
  7. package/bundle/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
  8. package/dist/components/ApplicationForm/ApplicationFormCredit.js +1 -1
  9. package/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
  10. package/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
  11. package/dist/components/CarouselEventCard/CarouselEventCard.js +1 -1
  12. package/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  13. package/dist/components/CarouselProductCard/CarouselProductCard.js +5 -2
  14. package/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
  15. package/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
  16. package/dist/components/Footer/MediaButton.js +6 -7
  17. package/dist/components/Footer/MediaButton.js.map +1 -1
  18. package/dist/components/Footer/SocialMedia.d.ts +1 -1
  19. package/dist/components/Footer/SocialMedia.js +2 -2
  20. package/dist/components/Footer/SocialMedia.js.map +1 -1
  21. package/dist/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
  22. package/lib/common.css +1 -1
  23. package/lib/components/ApplicationForm/ApplicationFormCredit.js +1 -1
  24. package/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.fixture.d.ts +2 -10
  25. package/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
  26. package/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
  27. package/lib/components/CarouselEventCard/CarouselEventCard.js +1 -1
  28. package/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  29. package/lib/components/CarouselProductCard/CarouselProductCard.fixture.d.ts +2 -0
  30. package/lib/components/CarouselProductCard/CarouselProductCard.js +5 -2
  31. package/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
  32. package/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
  33. package/lib/components/Footer/MediaButton.js +6 -7
  34. package/lib/components/Footer/MediaButton.js.map +1 -1
  35. package/lib/components/Footer/SocialMedia.d.ts +1 -1
  36. package/lib/components/Footer/SocialMedia.js +2 -2
  37. package/lib/components/Footer/SocialMedia.js.map +1 -1
  38. package/lib/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
  39. package/mobile/bundle/bundle.umd.js +7 -8
  40. package/mobile/bundle/bundle.umd.min.js +1 -1
  41. package/mobile/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
  42. package/mobile/bundle/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
  43. package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js +1 -1
  44. package/mobile/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
  45. package/mobile/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
  46. package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js +1 -1
  47. package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  48. package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js +5 -2
  49. package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
  50. package/mobile/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
  51. package/mobile/dist/components/Footer/MediaButton.js +6 -7
  52. package/mobile/dist/components/Footer/MediaButton.js.map +1 -1
  53. package/mobile/dist/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
  54. package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js +1 -1
  55. package/mobile/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
  56. package/mobile/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
  57. package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js +1 -1
  58. package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  59. package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js +5 -2
  60. package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
  61. package/mobile/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
  62. package/mobile/lib/components/Footer/MediaButton.js +6 -7
  63. package/mobile/lib/components/Footer/MediaButton.js.map +1 -1
  64. package/mobile/lib/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
  65. package/mobile/src/components/ApplicationForm/ApplicationFormCredit.tsx +1 -1
  66. package/mobile/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.tsx +2 -4
  67. package/mobile/src/components/CarouselEventCard/CarouselEventCard.tsx +2 -2
  68. package/mobile/src/components/CarouselInvestmentCard/CarouselInvestmentCard.example.json +3 -1
  69. package/mobile/src/components/CarouselProductCard/CarouselProductCard.example.json +3 -1
  70. package/mobile/src/components/CarouselProductCard/CarouselProductCard.tsx +5 -1
  71. package/mobile/src/components/CarouselProductCard/CarouselProductCardContent.ts +4 -0
  72. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +4 -2
  73. package/mobile/src/components/ErrorBlock/ErrorBlock.example.json +3 -1
  74. package/mobile/src/components/Footer/MediaButton.tsx +7 -10
  75. package/mobile/src/components/MobileAppTile/MobileAppTile.example.json +3 -1
  76. package/mobile/src/components/PictureText/PictureText.example.json +3 -1
  77. package/mobile/src/components/ProductBlock/ProductBlock.example.json +3 -1
  78. package/mobile/src/components/ProductTile/ProductTile.example.json +3 -1
  79. package/mobile/src/components/Tile/Tile.example.json +3 -1
  80. package/mobile/src/components/VerticalLayout/VerticalLayoutContent.ts +0 -2
  81. package/package.json +1 -1
  82. package/src/components/ApplicationForm/ApplicationFormCredit.tsx +1 -1
  83. package/src/components/Carousel/Carousel.fixture.tsx +18 -5
  84. package/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.fixture.tsx +2 -9
  85. package/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.tsx +2 -4
  86. package/src/components/CarouselEventCard/CarouselEventCard.tsx +2 -2
  87. package/src/components/CarouselInvestmentCard/CarouselInvestmentCard.example.json +3 -1
  88. package/src/components/CarouselProductCard/CarouselProductCard.example.json +3 -1
  89. package/src/components/CarouselProductCard/CarouselProductCard.fixture.tsx +10 -0
  90. package/src/components/CarouselProductCard/CarouselProductCard.tsx +5 -1
  91. package/src/components/CarouselProductCard/CarouselProductCardContent.ts +4 -0
  92. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +4 -2
  93. package/src/components/ErrorBlock/ErrorBlock.example.json +3 -1
  94. package/src/components/Footer/MediaButton.tsx +7 -10
  95. package/src/components/Footer/SocialMedia.tsx +3 -11
  96. package/src/components/MobileAppTile/MobileAppTile.example.json +3 -1
  97. package/src/components/PictureText/PictureText.example.json +3 -1
  98. package/src/components/ProductBlock/ProductBlock.example.json +3 -1
  99. package/src/components/ProductTile/ProductTile.example.json +3 -1
  100. package/src/components/Tile/Tile.example.json +3 -1
  101. package/src/components/VerticalLayout/VerticalLayoutContent.ts +0 -2
@@ -9,8 +9,10 @@
9
9
  "sources": [
10
10
  {
11
11
  "media": 1279,
12
- "width": 174,
13
- "height": 174,
12
+ "size": {
13
+ "width": 174,
14
+ "height": 174
15
+ },
14
16
  "format": "webp",
15
17
  "alignment": "southeast"
16
18
  }
@@ -13,7 +13,9 @@
13
13
  "sources": [
14
14
  {
15
15
  "media": 1279,
16
- "width": 276,
16
+ "size": {
17
+ "width": 276
18
+ },
17
19
  "format": "webp",
18
20
  "alignment": "center"
19
21
  }
@@ -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
- ({ iconVersion = 'color', buttonSize = 'default', rounded = false, icon, ...rest }) => {
66
- const { href, version, text, appendLeft, appendRight, aboveText } = rest;
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 as string, buttonSize),
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">
@@ -10,7 +10,9 @@
10
10
  "sources": [
11
11
  {
12
12
  "media": 1279,
13
- "width": 360,
13
+ "size": {
14
+ "width": 360
15
+ },
14
16
  "format": "webp",
15
17
  "alignment": "center"
16
18
  }
@@ -11,7 +11,9 @@
11
11
  "sources": [
12
12
  {
13
13
  "media": 1279,
14
- "width": 240,
14
+ "size": {
15
+ "width": 240
16
+ },
15
17
  "format": "webp",
16
18
  "alignment": "center"
17
19
  }
@@ -16,7 +16,9 @@
16
16
  "sources": [
17
17
  {
18
18
  "media": 1279,
19
- "width": 164,
19
+ "size": {
20
+ "width": 164
21
+ },
20
22
  "format": "webp",
21
23
  "alignment": "northeast"
22
24
  }
@@ -11,7 +11,9 @@
11
11
  "sources": [
12
12
  {
13
13
  "media": 1279,
14
- "width": 145,
14
+ "size": {
15
+ "width": 145
16
+ },
15
17
  "format": "webp",
16
18
  "alignment": "southeast"
17
19
  }
@@ -11,7 +11,9 @@
11
11
  "sources": [
12
12
  {
13
13
  "media": 1279,
14
- "width": 276,
14
+ "size": {
15
+ "width": 276
16
+ },
15
17
  "format": "webp",
16
18
  "alignment": "southeast"
17
19
  }
@@ -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 Внутренний отступ компоновщика */