@redneckz/wildless-cms-uni-blocks 0.14.69 → 0.14.71

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 (80) hide show
  1. package/bin/migration-scripts/0.14.62.js +3 -1
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +11 -12
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/StepsBlock/StepsBlockContent.d.ts +2 -2
  6. package/bundle/ui-kit/List/ListContent.d.ts +2 -0
  7. package/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
  8. package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  9. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -3
  10. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  11. package/dist/components/StepsBlock/StepsBlock.js +2 -2
  12. package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
  13. package/dist/components/StepsBlock/StepsBlockContent.d.ts +2 -2
  14. package/dist/ui-kit/BaseTile/BaseTile.js +3 -2
  15. package/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
  16. package/dist/ui-kit/List/List.js +2 -2
  17. package/dist/ui-kit/List/List.js.map +1 -1
  18. package/dist/ui-kit/List/ListContent.d.ts +2 -0
  19. package/dist/ui-kit/List/ListItem.js +1 -1
  20. package/dist/ui-kit/List/ListItem.js.map +1 -1
  21. package/lib/common.css +1 -1
  22. package/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
  23. package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  24. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -3
  25. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  26. package/lib/components/StepsBlock/StepsBlock.js +2 -2
  27. package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
  28. package/lib/components/StepsBlock/StepsBlockContent.d.ts +2 -2
  29. package/lib/ui-kit/BaseTile/BaseTile.js +3 -2
  30. package/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
  31. package/lib/ui-kit/List/List.js +2 -2
  32. package/lib/ui-kit/List/List.js.map +1 -1
  33. package/lib/ui-kit/List/ListContent.d.ts +2 -0
  34. package/lib/ui-kit/List/ListItem.js +1 -1
  35. package/lib/ui-kit/List/ListItem.js.map +1 -1
  36. package/mobile/bundle/bundle.umd.js +9 -10
  37. package/mobile/bundle/bundle.umd.min.js +1 -1
  38. package/mobile/bundle/components/StepsBlock/StepsBlockContent.d.ts +2 -2
  39. package/mobile/bundle/ui-kit/List/ListContent.d.ts +2 -0
  40. package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
  41. package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  42. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -3
  43. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  44. package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +2 -2
  45. package/mobile/dist/ui-kit/BaseTile/BaseTile.js +3 -2
  46. package/mobile/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
  47. package/mobile/dist/ui-kit/List/List.js +2 -2
  48. package/mobile/dist/ui-kit/List/List.js.map +1 -1
  49. package/mobile/dist/ui-kit/List/ListContent.d.ts +2 -0
  50. package/mobile/dist/ui-kit/List/ListItem.js +1 -1
  51. package/mobile/dist/ui-kit/List/ListItem.js.map +1 -1
  52. package/mobile/lib/common.css +1 -1
  53. package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
  54. package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  55. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -3
  56. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  57. package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +2 -2
  58. package/mobile/lib/ui-kit/BaseTile/BaseTile.js +3 -2
  59. package/mobile/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
  60. package/mobile/lib/ui-kit/List/List.js +2 -2
  61. package/mobile/lib/ui-kit/List/List.js.map +1 -1
  62. package/mobile/lib/ui-kit/List/ListContent.d.ts +2 -0
  63. package/mobile/lib/ui-kit/List/ListItem.js +1 -1
  64. package/mobile/lib/ui-kit/List/ListItem.js.map +1 -1
  65. package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +1 -1
  66. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +37 -39
  67. package/mobile/src/components/StepsBlock/StepsBlockContent.ts +3 -6
  68. package/mobile/src/ui-kit/BaseTile/BaseTile.tsx +3 -1
  69. package/mobile/src/ui-kit/List/List.tsx +6 -2
  70. package/mobile/src/ui-kit/List/ListContent.ts +2 -0
  71. package/mobile/src/ui-kit/List/ListItem.tsx +1 -1
  72. package/package.json +1 -1
  73. package/src/components/BenefitsBlock/BenefitsBlock.tsx +1 -1
  74. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +37 -39
  75. package/src/components/StepsBlock/StepsBlock.tsx +1 -2
  76. package/src/components/StepsBlock/StepsBlockContent.ts +3 -6
  77. package/src/ui-kit/BaseTile/BaseTile.tsx +3 -1
  78. package/src/ui-kit/List/List.tsx +6 -2
  79. package/src/ui-kit/List/ListContent.ts +2 -0
  80. package/src/ui-kit/List/ListItem.tsx +1 -1
@@ -40,45 +40,43 @@ export const CarouselRecommendationCard = JSX<RecommendationCardProps>(
40
40
  isImageSecondary = false,
41
41
  } = {},
42
42
  ...rest
43
- }) => {
44
- return (
45
- <BlockWrapper
46
- className={style('relative min-h-28 group-data-gray:bg-main-divider/50', className)}
47
- defaultPadding="p-0"
48
- {...rest}
49
- >
50
- <LinkWrapper href={href} target={target} className="h-full">
51
- <BaseTile
52
- className="h-full"
53
- defaultPadding="p-2xl"
54
- padding={padding}
55
- insetTitle={
56
- <Headline
57
- title={title}
58
- description={description}
59
- headlineVersion="XS"
60
- isEmbedded={true}
61
- align={align}
62
- />
63
- }
64
- {...leftOrRightImage(isIcon(icon) ? <Img image={icon} /> : null, directionRight)}
65
- buttons={
66
- socialMedia.length ? (
67
- <SocialMedia media={socialMedia} showButtonText={true} version={rest?.version} />
68
- ) : null
69
- }
70
- isImageAlwaysOnRight={isImageAlwaysOnRight}
71
- isImageSecondary={isImageSecondary}
72
- imageAlign="center"
73
- >
74
- <BenefitsList benefits={benefits} />
75
- <List items={items} isDotted={isDotted} listItemSize="S" />
76
- {renderAdditionalDescription(additionalDescription, align)}
77
- </BaseTile>
78
- </LinkWrapper>
79
- </BlockWrapper>
80
- );
81
- },
43
+ }) => (
44
+ <BlockWrapper
45
+ className={style('relative min-h-28 group-data-gray:bg-main-divider/50', className)}
46
+ defaultPadding="p-0"
47
+ {...rest}
48
+ >
49
+ <LinkWrapper href={href} target={target} className="h-full">
50
+ <BaseTile
51
+ className="h-full"
52
+ defaultPadding="p-2xl"
53
+ padding={padding}
54
+ insetTitle={
55
+ <Headline
56
+ title={title}
57
+ description={description}
58
+ headlineVersion="XS"
59
+ isEmbedded={true}
60
+ align={align}
61
+ />
62
+ }
63
+ {...leftOrRightImage(isIcon(icon) ? <Img image={icon} /> : null, directionRight)}
64
+ buttons={
65
+ socialMedia.length ? (
66
+ <SocialMedia media={socialMedia} showButtonText={true} version={rest?.version} />
67
+ ) : null
68
+ }
69
+ isImageAlwaysOnRight={isImageAlwaysOnRight}
70
+ isImageSecondary={isImageSecondary}
71
+ imageAlign="center"
72
+ >
73
+ <BenefitsList benefits={benefits} />
74
+ <List items={items} isDotted={isDotted} listItemSize="S" />
75
+ {renderAdditionalDescription(additionalDescription, align)}
76
+ </BaseTile>
77
+ </LinkWrapper>
78
+ </BlockWrapper>
79
+ ),
82
80
  );
83
81
 
84
82
  const renderAdditionalDescription = (additionalDescription?: string, align?: TextAlign) =>
@@ -1,11 +1,7 @@
1
1
  import { type BlockVersion } from '../../model/BlockVersion';
2
2
  import { type BulletsProps } from '../../model/Bullets';
3
3
  import { type DefaultListItemType } from '../../model/DefaultListItemType';
4
- import {
5
- type DescriptionProps,
6
- type HeadlineCommonProps,
7
- type LabelProps,
8
- } from '../../model/HeadlineType';
4
+ import { type DescriptionProps, type LabelProps, type TitleProps } from '../../model/HeadlineType';
9
5
  import { type UniBlockContent } from '../../model/JSXBlock';
10
6
  import { type IconProps } from '../../model/Picture';
11
7
  import { type RichTextItem } from '../../model/RichTextItem';
@@ -42,7 +38,8 @@ export type Step = DefaultStep | RichTextStep;
42
38
  * @title Блок шаги
43
39
  */
44
40
  export type StepsBlockContent = UniBlockContent &
45
- HeadlineCommonProps &
41
+ TitleProps &
42
+ DescriptionProps &
46
43
  ButtonsSectionContent & {
47
44
  /** @title Линии */
48
45
  showLines?: boolean;
@@ -65,6 +65,8 @@ export const BaseTile = JSX<BaseTileProps>(
65
65
  'grid gap-3xl',
66
66
  rightImage ? '@xl:grid-cols-2' : '',
67
67
  leftImage ? '' : 'grow',
68
+ 'h-full', //? fix issue https://github.com/redneckz/temp_wcms/issues/1254
69
+ 'auto-rows-[max-content_1fr]', //? fix issue https://github.com/redneckz/temp_wcms/issues/1324
68
70
  )}
69
71
  >
70
72
  <div className="grow space-y-lg min-w-fit">
@@ -107,7 +109,7 @@ const renderImageContainer = (
107
109
  image ? (
108
110
  <div
109
111
  className={style(
110
- 'shrink-1/2 justify-self-center',
112
+ 'shrink-1/2 justify-self-center mt-auto @xl:mt-0',
111
113
  imageAlign && imageAlignmentMap[imageAlign],
112
114
  className,
113
115
  )}
@@ -29,7 +29,7 @@ export const LIST_VERSION_STYLE: Record<
29
29
  };
30
30
 
31
31
  export const List = JSX<ListProps>(
32
- ({ className, isDotted = true, items = [], listItemSize = 'M' }) => {
32
+ ({ className, isDotted = true, items = [], listItemSize = 'M', dotClassName = '' }) => {
33
33
  const versionStyle = LIST_VERSION_STYLE[listItemSize];
34
34
 
35
35
  return items?.length ? (
@@ -42,7 +42,11 @@ export const List = JSX<ListProps>(
42
42
  role="list"
43
43
  >
44
44
  {items.map((item, i) => (
45
- <ListItem key={String(i)} isDotted={isDotted} dotClassName={versionStyle.dotStyle}>
45
+ <ListItem
46
+ key={String(i)}
47
+ isDotted={isDotted}
48
+ dotClassName={style(dotClassName || 'bg-primary-text', versionStyle.dotStyle)}
49
+ >
46
50
  {item}
47
51
  </ListItem>
48
52
  ))}
@@ -20,4 +20,6 @@ export type ListProps = ListContent &
20
20
  BulletsProps & {
21
21
  /** @hidden */
22
22
  className?: string;
23
+ /** @hidden */
24
+ dotClassName?: string;
23
25
  };
@@ -17,7 +17,7 @@ export const ListItem = JSX<ListItemProps>(({ className, isDotted, dotClassName,
17
17
  <div className="shrink-0">
18
18
  <div
19
19
  className={style(
20
- 'align-middle inline-block rounded-full bg-primary-text group-data-secondary:bg-white',
20
+ 'align-middle inline-block rounded-full group-data-secondary:bg-white',
21
21
  dotClassName,
22
22
  )}
23
23
  />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.14.69",
3
+ "version": "0.14.71",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -56,7 +56,7 @@ const renderBenefit = (
56
56
  >
57
57
  {description}
58
58
  </Text>
59
- <List className="text-secondary-text" listItemSize="S" items={items} isDotted={isDotted} />
59
+ <List dotClassName="bg-secondary-text" listItemSize="S" items={items} isDotted={isDotted} />
60
60
  </div>
61
61
  ) : null}
62
62
  </div>
@@ -40,45 +40,43 @@ export const CarouselRecommendationCard = JSX<RecommendationCardProps>(
40
40
  isImageSecondary = false,
41
41
  } = {},
42
42
  ...rest
43
- }) => {
44
- return (
45
- <BlockWrapper
46
- className={style('relative min-h-28 group-data-gray:bg-main-divider/50', className)}
47
- defaultPadding="p-0"
48
- {...rest}
49
- >
50
- <LinkWrapper href={href} target={target} className="h-full">
51
- <BaseTile
52
- className="h-full"
53
- defaultPadding="p-2xl"
54
- padding={padding}
55
- insetTitle={
56
- <Headline
57
- title={title}
58
- description={description}
59
- headlineVersion="XS"
60
- isEmbedded={true}
61
- align={align}
62
- />
63
- }
64
- {...leftOrRightImage(isIcon(icon) ? <Img image={icon} /> : null, directionRight)}
65
- buttons={
66
- socialMedia.length ? (
67
- <SocialMedia media={socialMedia} showButtonText={true} version={rest?.version} />
68
- ) : null
69
- }
70
- isImageAlwaysOnRight={isImageAlwaysOnRight}
71
- isImageSecondary={isImageSecondary}
72
- imageAlign="center"
73
- >
74
- <BenefitsList benefits={benefits} />
75
- <List items={items} isDotted={isDotted} listItemSize="S" />
76
- {renderAdditionalDescription(additionalDescription, align)}
77
- </BaseTile>
78
- </LinkWrapper>
79
- </BlockWrapper>
80
- );
81
- },
43
+ }) => (
44
+ <BlockWrapper
45
+ className={style('relative min-h-28 group-data-gray:bg-main-divider/50', className)}
46
+ defaultPadding="p-0"
47
+ {...rest}
48
+ >
49
+ <LinkWrapper href={href} target={target} className="h-full">
50
+ <BaseTile
51
+ className="h-full"
52
+ defaultPadding="p-2xl"
53
+ padding={padding}
54
+ insetTitle={
55
+ <Headline
56
+ title={title}
57
+ description={description}
58
+ headlineVersion="XS"
59
+ isEmbedded={true}
60
+ align={align}
61
+ />
62
+ }
63
+ {...leftOrRightImage(isIcon(icon) ? <Img image={icon} /> : null, directionRight)}
64
+ buttons={
65
+ socialMedia.length ? (
66
+ <SocialMedia media={socialMedia} showButtonText={true} version={rest?.version} />
67
+ ) : null
68
+ }
69
+ isImageAlwaysOnRight={isImageAlwaysOnRight}
70
+ isImageSecondary={isImageSecondary}
71
+ imageAlign="center"
72
+ >
73
+ <BenefitsList benefits={benefits} />
74
+ <List items={items} isDotted={isDotted} listItemSize="S" />
75
+ {renderAdditionalDescription(additionalDescription, align)}
76
+ </BaseTile>
77
+ </LinkWrapper>
78
+ </BlockWrapper>
79
+ ),
82
80
  );
83
81
 
84
82
  const renderAdditionalDescription = (additionalDescription?: string, align?: TextAlign) =>
@@ -21,7 +21,6 @@ const getPaddingX = (steps: number) => (steps < 5 ? 'px-24' : 'px-16');
21
21
 
22
22
  export const StepsBlock = JSX<StepsBlockProps>(
23
23
  ({
24
- align = AlignStyles,
25
24
  buttons,
26
25
  className = '',
27
26
  description,
@@ -58,7 +57,7 @@ export const StepsBlock = JSX<StepsBlockProps>(
58
57
  description={description}
59
58
  isEmbedded={true}
60
59
  className="w-full"
61
- align={align}
60
+ align={AlignStyles}
62
61
  />
63
62
  {steps?.length ? (
64
63
  <div className="box-border space-y-lg">
@@ -1,11 +1,7 @@
1
1
  import { type BlockVersion } from '../../model/BlockVersion';
2
2
  import { type BulletsProps } from '../../model/Bullets';
3
3
  import { type DefaultListItemType } from '../../model/DefaultListItemType';
4
- import {
5
- type DescriptionProps,
6
- type HeadlineCommonProps,
7
- type LabelProps,
8
- } from '../../model/HeadlineType';
4
+ import { type DescriptionProps, type LabelProps, type TitleProps } from '../../model/HeadlineType';
9
5
  import { type UniBlockContent } from '../../model/JSXBlock';
10
6
  import { type IconProps } from '../../model/Picture';
11
7
  import { type RichTextItem } from '../../model/RichTextItem';
@@ -42,7 +38,8 @@ export type Step = DefaultStep | RichTextStep;
42
38
  * @title Блок шаги
43
39
  */
44
40
  export type StepsBlockContent = UniBlockContent &
45
- HeadlineCommonProps &
41
+ TitleProps &
42
+ DescriptionProps &
46
43
  ButtonsSectionContent & {
47
44
  /** @title Линии */
48
45
  showLines?: boolean;
@@ -65,6 +65,8 @@ export const BaseTile = JSX<BaseTileProps>(
65
65
  'grid gap-3xl',
66
66
  rightImage ? '@xl:grid-cols-2' : '',
67
67
  leftImage ? '' : 'grow',
68
+ 'h-full', //? fix issue https://github.com/redneckz/temp_wcms/issues/1254
69
+ 'auto-rows-[max-content_1fr]', //? fix issue https://github.com/redneckz/temp_wcms/issues/1324
68
70
  )}
69
71
  >
70
72
  <div className="grow space-y-lg min-w-fit">
@@ -107,7 +109,7 @@ const renderImageContainer = (
107
109
  image ? (
108
110
  <div
109
111
  className={style(
110
- 'shrink-1/2 justify-self-center',
112
+ 'shrink-1/2 justify-self-center mt-auto @xl:mt-0',
111
113
  imageAlign && imageAlignmentMap[imageAlign],
112
114
  className,
113
115
  )}
@@ -29,7 +29,7 @@ export const LIST_VERSION_STYLE: Record<
29
29
  };
30
30
 
31
31
  export const List = JSX<ListProps>(
32
- ({ className, isDotted = true, items = [], listItemSize = 'M' }) => {
32
+ ({ className, isDotted = true, items = [], listItemSize = 'M', dotClassName = '' }) => {
33
33
  const versionStyle = LIST_VERSION_STYLE[listItemSize];
34
34
 
35
35
  return items?.length ? (
@@ -42,7 +42,11 @@ export const List = JSX<ListProps>(
42
42
  role="list"
43
43
  >
44
44
  {items.map((item, i) => (
45
- <ListItem key={String(i)} isDotted={isDotted} dotClassName={versionStyle.dotStyle}>
45
+ <ListItem
46
+ key={String(i)}
47
+ isDotted={isDotted}
48
+ dotClassName={style(dotClassName || 'bg-primary-text', versionStyle.dotStyle)}
49
+ >
46
50
  {item}
47
51
  </ListItem>
48
52
  ))}
@@ -20,4 +20,6 @@ export type ListProps = ListContent &
20
20
  BulletsProps & {
21
21
  /** @hidden */
22
22
  className?: string;
23
+ /** @hidden */
24
+ dotClassName?: string;
23
25
  };
@@ -17,7 +17,7 @@ export const ListItem = JSX<ListItemProps>(({ className, isDotted, dotClassName,
17
17
  <div className="shrink-0">
18
18
  <div
19
19
  className={style(
20
- 'align-middle inline-block rounded-full bg-primary-text group-data-secondary:bg-white',
20
+ 'align-middle inline-block rounded-full group-data-secondary:bg-white',
21
21
  dotClassName,
22
22
  )}
23
23
  />