@redneckz/wildless-cms-uni-blocks 0.14.43 → 0.14.45

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 (138) hide show
  1. package/bundle/bundle.umd.js +29 -26
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/dist/components/ApplicationForm/renderWedTextarea.js +1 -1
  4. package/dist/components/ApplicationForm/renderWedTextarea.js.map +1 -1
  5. package/dist/components/Blocks.mobile.js +3 -1
  6. package/dist/components/Blocks.mobile.js.map +1 -1
  7. package/dist/components/CardTransfer/CardTransfer.js +8 -4
  8. package/dist/components/CardTransfer/CardTransfer.js.map +1 -1
  9. package/dist/components/CarouselLinks/CarouselLinkButton.js +3 -3
  10. package/dist/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
  11. package/dist/components/Header/DropdownMenu.js +2 -1
  12. package/dist/components/Header/DropdownMenu.js.map +1 -1
  13. package/dist/components/LinkDocs/LinkDocItem.js +2 -2
  14. package/dist/components/LinkDocs/LinkDocItem.js.map +1 -1
  15. package/dist/components/OfficesAtmsMap/renderOfficeCard.js +1 -1
  16. package/dist/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
  17. package/dist/components/ProductGallery/ProductGallery.mobile.js +1 -1
  18. package/dist/components/ProductGallery/ProductGallery.mobile.js.map +1 -1
  19. package/dist/ui-kit/Button/LikeButton.js +5 -9
  20. package/dist/ui-kit/Button/LikeButton.js.map +1 -1
  21. package/dist/ui-kit/Img/ImgAsPicture.js +2 -2
  22. package/dist/ui-kit/Img/ImgAsPicture.js.map +1 -1
  23. package/dist/ui-kit/SVG.js +4 -1
  24. package/dist/ui-kit/SVG.js.map +1 -1
  25. package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
  26. package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  27. package/lib/components/ApplicationForm/renderWedTextarea.js +1 -1
  28. package/lib/components/ApplicationForm/renderWedTextarea.js.map +1 -1
  29. package/lib/components/Blocks.mobile.js +3 -1
  30. package/lib/components/Blocks.mobile.js.map +1 -1
  31. package/lib/components/CardTransfer/CardTransfer.js +8 -4
  32. package/lib/components/CardTransfer/CardTransfer.js.map +1 -1
  33. package/lib/components/CarouselLinks/CarouselLinkButton.js +3 -3
  34. package/lib/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
  35. package/lib/components/Header/DropdownMenu.js +2 -1
  36. package/lib/components/Header/DropdownMenu.js.map +1 -1
  37. package/lib/components/LinkDocs/LinkDocItem.js +2 -2
  38. package/lib/components/LinkDocs/LinkDocItem.js.map +1 -1
  39. package/lib/components/OfficesAtmsMap/OfficesAtmsMap.fixture.d.ts +1 -0
  40. package/lib/components/OfficesAtmsMap/OfficesAtmsMap.fixture.mobile.d.ts +7 -0
  41. package/lib/components/OfficesAtmsMap/getScheduleDescription.d.ts +0 -1
  42. package/lib/components/OfficesAtmsMap/renderAtmCard.d.ts +0 -1
  43. package/lib/components/OfficesAtmsMap/renderBusinessSchedule.d.ts +0 -1
  44. package/lib/components/OfficesAtmsMap/renderFiltrationForm.d.ts +0 -1
  45. package/lib/components/OfficesAtmsMap/renderOfficeCard.d.ts +0 -1
  46. package/lib/components/OfficesAtmsMap/renderOfficeCard.js +1 -1
  47. package/lib/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
  48. package/lib/components/ProductGallery/ProductGallery.mobile.js +1 -1
  49. package/lib/components/ProductGallery/ProductGallery.mobile.js.map +1 -1
  50. package/lib/ui-kit/Button/LikeButton.js +5 -9
  51. package/lib/ui-kit/Button/LikeButton.js.map +1 -1
  52. package/lib/ui-kit/Img/ImgAsPicture.js +2 -2
  53. package/lib/ui-kit/Img/ImgAsPicture.js.map +1 -1
  54. package/lib/ui-kit/SVG.js +4 -1
  55. package/lib/ui-kit/SVG.js.map +1 -1
  56. package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
  57. package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  58. package/mobile/bundle/bundle.umd.js +383 -128
  59. package/mobile/bundle/bundle.umd.min.js +1 -1
  60. package/mobile/dist/components/ApplicationForm/renderWedTextarea.js +1 -1
  61. package/mobile/dist/components/ApplicationForm/renderWedTextarea.js.map +1 -1
  62. package/mobile/dist/components/Blocks.js +3 -1
  63. package/mobile/dist/components/Blocks.js.map +1 -1
  64. package/mobile/dist/components/CardTransfer/CardTransfer.js +8 -4
  65. package/mobile/dist/components/CardTransfer/CardTransfer.js.map +1 -1
  66. package/mobile/dist/components/CarouselLinks/CarouselLinkButton.js +3 -3
  67. package/mobile/dist/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
  68. package/mobile/dist/components/Header/DropdownMenu.js +2 -1
  69. package/mobile/dist/components/Header/DropdownMenu.js.map +1 -1
  70. package/mobile/dist/components/LinkDocs/LinkDocItem.js +2 -2
  71. package/mobile/dist/components/LinkDocs/LinkDocItem.js.map +1 -1
  72. package/mobile/dist/components/OfficesAtmsMap/renderOfficeCard.js +1 -1
  73. package/mobile/dist/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
  74. package/mobile/dist/components/ProductGallery/ProductGallery.js +1 -1
  75. package/mobile/dist/components/ProductGallery/ProductGallery.js.map +1 -1
  76. package/mobile/dist/ui-kit/Button/LikeButton.js +5 -9
  77. package/mobile/dist/ui-kit/Button/LikeButton.js.map +1 -1
  78. package/mobile/dist/ui-kit/Img/ImgAsPicture.js +2 -2
  79. package/mobile/dist/ui-kit/Img/ImgAsPicture.js.map +1 -1
  80. package/mobile/dist/ui-kit/SVG.js +4 -1
  81. package/mobile/dist/ui-kit/SVG.js.map +1 -1
  82. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
  83. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  84. package/mobile/lib/components/ApplicationForm/renderWedTextarea.js +1 -1
  85. package/mobile/lib/components/ApplicationForm/renderWedTextarea.js.map +1 -1
  86. package/mobile/lib/components/Blocks.js +3 -1
  87. package/mobile/lib/components/Blocks.js.map +1 -1
  88. package/mobile/lib/components/CardTransfer/CardTransfer.js +8 -4
  89. package/mobile/lib/components/CardTransfer/CardTransfer.js.map +1 -1
  90. package/mobile/lib/components/CarouselLinks/CarouselLinkButton.js +3 -3
  91. package/mobile/lib/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
  92. package/mobile/lib/components/Header/DropdownMenu.js +2 -1
  93. package/mobile/lib/components/Header/DropdownMenu.js.map +1 -1
  94. package/mobile/lib/components/LinkDocs/LinkDocItem.js +2 -2
  95. package/mobile/lib/components/LinkDocs/LinkDocItem.js.map +1 -1
  96. package/mobile/lib/components/OfficesAtmsMap/renderOfficeCard.js +1 -1
  97. package/mobile/lib/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
  98. package/mobile/lib/components/ProductGallery/ProductGallery.js +1 -1
  99. package/mobile/lib/components/ProductGallery/ProductGallery.js.map +1 -1
  100. package/mobile/lib/ui-kit/Button/LikeButton.js +5 -9
  101. package/mobile/lib/ui-kit/Button/LikeButton.js.map +1 -1
  102. package/mobile/lib/ui-kit/Img/ImgAsPicture.js +2 -2
  103. package/mobile/lib/ui-kit/Img/ImgAsPicture.js.map +1 -1
  104. package/mobile/lib/ui-kit/SVG.js +4 -1
  105. package/mobile/lib/ui-kit/SVG.js.map +1 -1
  106. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
  107. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  108. package/mobile/src/components/ApplicationForm/renderWedTextarea.tsx +2 -1
  109. package/mobile/src/components/BenefitsBlock/BenefitsBlock.example.json +1 -1
  110. package/mobile/src/components/Blocks.ts +3 -1
  111. package/mobile/src/components/CardTransfer/CardTransfer.tsx +10 -7
  112. package/mobile/src/components/CarouselLinks/CarouselLinkButton.tsx +5 -3
  113. package/mobile/src/components/Header/DropdownMenu.tsx +5 -2
  114. package/mobile/src/components/LinkDocs/LinkDocItem.tsx +4 -5
  115. package/mobile/src/components/OfficesAtmsMap/renderOfficeCard.tsx +3 -1
  116. package/mobile/src/components/ProductBlock/ProductBlock.example.json +1 -1
  117. package/mobile/src/components/ProductGallery/ProductGallery.tsx +1 -1
  118. package/mobile/src/ui-kit/Button/LikeButton.tsx +18 -17
  119. package/mobile/src/ui-kit/Img/ImgAsPicture.tsx +4 -2
  120. package/mobile/src/ui-kit/SVG.tsx +16 -3
  121. package/mobile/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +1 -1
  122. package/package.json +1 -1
  123. package/src/components/ApplicationForm/renderWedTextarea.tsx +2 -1
  124. package/src/components/BenefitsBlock/BenefitsBlock.example.json +1 -1
  125. package/src/components/Blocks.mobile.ts +3 -1
  126. package/src/components/CardTransfer/CardTransfer.tsx +10 -7
  127. package/src/components/CarouselLinks/CarouselLinkButton.tsx +5 -3
  128. package/src/components/Header/DropdownMenu.tsx +5 -2
  129. package/src/components/LinkDocs/LinkDocItem.tsx +4 -5
  130. package/src/components/OfficesAtmsMap/OfficesAtmsMap.fixture.mobile.tsx +43 -0
  131. package/src/components/OfficesAtmsMap/OfficesAtmsMap.fixture.tsx +2 -0
  132. package/src/components/OfficesAtmsMap/renderOfficeCard.tsx +3 -1
  133. package/src/components/ProductBlock/ProductBlock.example.json +1 -1
  134. package/src/components/ProductGallery/ProductGallery.mobile.tsx +1 -1
  135. package/src/ui-kit/Button/LikeButton.tsx +18 -17
  136. package/src/ui-kit/Img/ImgAsPicture.tsx +4 -2
  137. package/src/ui-kit/SVG.tsx +16 -3
  138. package/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +1 -1
@@ -48,15 +48,18 @@ export const DropdownMenu = JSX<DropdownMenuProps>(({ className = '', items, act
48
48
  >
49
49
  {items?.map((item, i) => {
50
50
  const { text, ...linkProps } = item;
51
+ const { href, target, onClick } = link(linkProps);
51
52
 
52
53
  return (
53
54
  <a
54
- key={item.href || String(i)}
55
+ key={href || String(i)}
55
56
  className={style(
56
57
  'text-l font-light pb-m hover:text-primary-main',
57
58
  item === activeItem ? 'text-primary-main' : '',
58
59
  )}
59
- {...link(linkProps)}
60
+ href={href}
61
+ target={target}
62
+ onClick={onClick}
60
63
  >
61
64
  {text}
62
65
  </a>
@@ -8,7 +8,7 @@ export interface LinkDocItemProps extends LinkDoc {
8
8
  }
9
9
 
10
10
  export const LinkDocItem = JSX<LinkDocItemProps>(
11
- ({ icon, text, fileFormat, fileSize, ...linkProps }) => {
11
+ ({ icon, text, href, target, fileFormat, fileSize }) => {
12
12
  const prefix = fileFormat || fileSize ? ',' : '';
13
13
  const size = fileSize ?? '';
14
14
  const format = fileFormat ? String(fileFormat) : '';
@@ -17,15 +17,14 @@ export const LinkDocItem = JSX<LinkDocItemProps>(
17
17
  <a
18
18
  className="flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main"
19
19
  role="link"
20
- {...linkProps}
20
+ href={href}
21
+ target={target}
21
22
  >
22
23
  {icon}
23
24
  {text ? (
24
25
  <Text size="text-l" font="font-light">
25
26
  {text}
26
- <Text color="text-secondary-text">
27
- {linkProps?.href && `${size} ${prefix} ${format}`}
28
- </Text>
27
+ <Text color="text-secondary-text">{href && `${size} ${prefix} ${format}`}</Text>
29
28
  </Text>
30
29
  ) : null}
31
30
  </a>
@@ -0,0 +1,43 @@
1
+ import '../../setup-fixture';
2
+
3
+ import { OfficesAtmsMap } from './OfficesAtmsMap';
4
+ import { type OfficesAtmsMapContent } from './OfficesAtmsMapContent';
5
+
6
+ const OFFICE_MAP: OfficesAtmsMapContent = {
7
+ data: {
8
+ dataType: 'offices',
9
+ },
10
+ };
11
+
12
+ const ATM_MAP: OfficesAtmsMapContent = {
13
+ data: {
14
+ dataType: 'atms',
15
+ description:
16
+ 'Держатели платежных карт Visa, MasterCard и МИР АО «Россельхозбанк» могут снимать без дополнительных комиссий наличные денежные средства в банкоматах банков-партнеров:',
17
+ list: [
18
+ {
19
+ text: 'ПАО «Промсвязьбанк»',
20
+ image: { src: 'psbbank.svg', size: { width: 24, height: 24 } },
21
+ },
22
+ { text: 'АО «Альфа-Банк»', image: { src: 'alphabank.svg', size: { width: 24, height: 24 } } },
23
+ { text: 'ПАО «РОСБАНК»', image: { src: 'rosbank.svg', size: { width: 24, height: 24 } } },
24
+ {
25
+ text: 'АО «Райффайзенбанк»',
26
+ image: { src: 'rayfbank.svg', size: { width: 24, height: 24 } },
27
+ },
28
+ ],
29
+ },
30
+ };
31
+
32
+ export default {
33
+ offices: (
34
+ <div className="container grid grid-cols-12">
35
+ <OfficesAtmsMap className="col-span-12" {...OFFICE_MAP} />
36
+ </div>
37
+ ),
38
+ atms: (
39
+ <div className="container grid grid-cols-12">
40
+ <OfficesAtmsMap className="col-span-12" {...ATM_MAP} />
41
+ </div>
42
+ ),
43
+ };
@@ -1,3 +1,5 @@
1
+ import '../../setup-fixture';
2
+
1
3
  import { OfficesAtmsMap } from './OfficesAtmsMap';
2
4
  import { type OfficesAtmsMapContent } from './OfficesAtmsMapContent';
3
5
 
@@ -57,7 +57,9 @@ export const renderOfficeCard = (
57
57
  {workSchedule.isMatchesPattern ? (
58
58
  <CardRow>
59
59
  <CardCell label={labelSchedule} labelSize="text-l" className="w-full max-w-none">
60
- <div className="flex justify-between pt-xs">{workScheduleWeek?.map(renderDay)}</div>
60
+ <div className="flex flex-wrap gap-xs sm:justify-between pt-xs">
61
+ {workScheduleWeek?.map(renderDay)}
62
+ </div>
61
63
  </CardCell>
62
64
  </CardRow>
63
65
  ) : (
@@ -25,7 +25,7 @@
25
25
  {
26
26
  "label": "Преимущество №1",
27
27
  "icon": {
28
- "icon": "ClockIcon"
28
+ "icon": "SmallClockIcon"
29
29
  }
30
30
  },
31
31
  {
@@ -19,7 +19,7 @@ export const ProductGallery = JSX<ProductGalleryProps>(
19
19
  {slides
20
20
  .map((s) => s.productBlock)
21
21
  .map((_, i) => (
22
- <div key={String(i)} className="box-border h-full" role="listitem">
22
+ <div key={String(i)} className="box-border h-full">
23
23
  <BaseProductTile className="px-5 h-full" headlineVersion="L" {..._} {...rest} />
24
24
  </div>
25
25
  ))}
@@ -1,5 +1,4 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { type SVGPathOptions } from '../SVG';
3
2
 
4
3
  export interface LikeButtonProps {
5
4
  className?: string;
@@ -19,25 +18,27 @@ export const LikeButton = JSX<LikeButtonProps>(({ className, onClick, ariaLabel
19
18
  ));
20
19
 
21
20
  const renderLikeIcon = () => {
22
- const params = {
23
- stroke: '#292D32',
24
- strokeLinecap: 'round',
25
- strokeLinejoin: 'round',
26
- strokeWidth: '1.5',
27
- } as SVGPathOptions;
21
+ const handPath =
22
+ 'M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1' +
23
+ ' 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77';
24
+ const cuffPath =
25
+ 'M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z';
28
26
 
29
27
  return (
30
28
  <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
31
- <path
32
- {...params}
33
- strokeMiterlimit="10"
34
- /* eslint-disable max-len */
35
- d="M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"
36
- />
37
- <path
38
- {...params}
39
- d="M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z"
40
- />
29
+ {renderLinkIconPath(handPath)}
30
+ {renderLinkIconPath(cuffPath)}
41
31
  </svg>
42
32
  );
43
33
  };
34
+
35
+ const renderLinkIconPath = (d: string) => (
36
+ <path
37
+ stroke="#292D32"
38
+ strokeLinecap="round"
39
+ strokeLinejoin="round"
40
+ strokeWidth="1.5"
41
+ strokeMiterlimit="10"
42
+ d={d}
43
+ />
44
+ );
@@ -25,7 +25,8 @@ export const ImgAsPicture = JSX<ImageProps>(
25
25
  srcSet={adjustSrc(router, pathPrefix)(src)}
26
26
  type={formatToMimeType(format)}
27
27
  media={media ? `(max-width: ${media}px)` : ''}
28
- {...image.size}
28
+ width={image.size?.width}
29
+ height={image.size?.height}
29
30
  />
30
31
  ))
31
32
  : null}
@@ -47,7 +48,8 @@ const renderImg = (image: Picture, imageClassName = '') => (
47
48
  width: image.size?.width ? `${image.size?.width}px` : '100%',
48
49
  height: image.size?.height ? `${image.size?.height}px` : 'auto',
49
50
  }}
50
- {...image.size}
51
+ width={image.size?.width}
52
+ height={image.size?.height}
51
53
  />
52
54
  );
53
55
 
@@ -32,9 +32,22 @@ export const SVG = JSX<SVGProps>(
32
32
  width={width}
33
33
  height={height}
34
34
  >
35
- {paths.map(({ d, fill: pathFill, ...options }, i) => (
36
- <path key={i} d={d} fill={pathFill || 'currentColor'} {...commonOptions} {...options} />
37
- ))}
35
+ {paths.map(({ d, fill: pathFill, ...options }, i) => {
36
+ const resultOptions = { ...commonOptions, ...options };
37
+
38
+ return (
39
+ <path
40
+ key={i}
41
+ d={d}
42
+ fill={pathFill || 'currentColor'}
43
+ stroke={resultOptions.stroke}
44
+ strokeLinecap={resultOptions.strokeLinecap}
45
+ strokeLinejoin={resultOptions.strokeLinejoin}
46
+ strokeWidth={resultOptions.strokeWidth}
47
+ strokeMiterlimit={resultOptions.strokeMiterlimit}
48
+ />
49
+ );
50
+ })}
38
51
  </svg>
39
52
  );
40
53
  },
@@ -53,7 +53,7 @@ export const SwipeListControlDots = JSX<SwipeListControlDotsProps>(
53
53
  version ? 'group' : '',
54
54
  className,
55
55
  )}
56
- {...(version ? { 'data-ver': version } : {})}
56
+ data-ver={version}
57
57
  >
58
58
  {new Array(dotCount).fill(null).map((_, idx: number) => (
59
59
  <div