@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.
- package/bundle/bundle.umd.js +29 -26
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/ApplicationForm/renderWedTextarea.js +1 -1
- package/dist/components/ApplicationForm/renderWedTextarea.js.map +1 -1
- package/dist/components/Blocks.mobile.js +3 -1
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/CardTransfer/CardTransfer.js +8 -4
- package/dist/components/CardTransfer/CardTransfer.js.map +1 -1
- package/dist/components/CarouselLinks/CarouselLinkButton.js +3 -3
- package/dist/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
- package/dist/components/Header/DropdownMenu.js +2 -1
- package/dist/components/Header/DropdownMenu.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocItem.js +2 -2
- package/dist/components/LinkDocs/LinkDocItem.js.map +1 -1
- package/dist/components/OfficesAtmsMap/renderOfficeCard.js +1 -1
- package/dist/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
- package/dist/components/ProductGallery/ProductGallery.mobile.js +1 -1
- package/dist/components/ProductGallery/ProductGallery.mobile.js.map +1 -1
- package/dist/ui-kit/Button/LikeButton.js +5 -9
- package/dist/ui-kit/Button/LikeButton.js.map +1 -1
- package/dist/ui-kit/Img/ImgAsPicture.js +2 -2
- package/dist/ui-kit/Img/ImgAsPicture.js.map +1 -1
- package/dist/ui-kit/SVG.js +4 -1
- package/dist/ui-kit/SVG.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/lib/components/ApplicationForm/renderWedTextarea.js +1 -1
- package/lib/components/ApplicationForm/renderWedTextarea.js.map +1 -1
- package/lib/components/Blocks.mobile.js +3 -1
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/CardTransfer/CardTransfer.js +8 -4
- package/lib/components/CardTransfer/CardTransfer.js.map +1 -1
- package/lib/components/CarouselLinks/CarouselLinkButton.js +3 -3
- package/lib/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
- package/lib/components/Header/DropdownMenu.js +2 -1
- package/lib/components/Header/DropdownMenu.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocItem.js +2 -2
- package/lib/components/LinkDocs/LinkDocItem.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMap.fixture.d.ts +1 -0
- package/lib/components/OfficesAtmsMap/OfficesAtmsMap.fixture.mobile.d.ts +7 -0
- package/lib/components/OfficesAtmsMap/getScheduleDescription.d.ts +0 -1
- package/lib/components/OfficesAtmsMap/renderAtmCard.d.ts +0 -1
- package/lib/components/OfficesAtmsMap/renderBusinessSchedule.d.ts +0 -1
- package/lib/components/OfficesAtmsMap/renderFiltrationForm.d.ts +0 -1
- package/lib/components/OfficesAtmsMap/renderOfficeCard.d.ts +0 -1
- package/lib/components/OfficesAtmsMap/renderOfficeCard.js +1 -1
- package/lib/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
- package/lib/components/ProductGallery/ProductGallery.mobile.js +1 -1
- package/lib/components/ProductGallery/ProductGallery.mobile.js.map +1 -1
- package/lib/ui-kit/Button/LikeButton.js +5 -9
- package/lib/ui-kit/Button/LikeButton.js.map +1 -1
- package/lib/ui-kit/Img/ImgAsPicture.js +2 -2
- package/lib/ui-kit/Img/ImgAsPicture.js.map +1 -1
- package/lib/ui-kit/SVG.js +4 -1
- package/lib/ui-kit/SVG.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +383 -128
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderWedTextarea.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderWedTextarea.js.map +1 -1
- package/mobile/dist/components/Blocks.js +3 -1
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/CardTransfer/CardTransfer.js +8 -4
- package/mobile/dist/components/CardTransfer/CardTransfer.js.map +1 -1
- package/mobile/dist/components/CarouselLinks/CarouselLinkButton.js +3 -3
- package/mobile/dist/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
- package/mobile/dist/components/Header/DropdownMenu.js +2 -1
- package/mobile/dist/components/Header/DropdownMenu.js.map +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocItem.js +2 -2
- package/mobile/dist/components/LinkDocs/LinkDocItem.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/renderOfficeCard.js +1 -1
- package/mobile/dist/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
- package/mobile/dist/components/ProductGallery/ProductGallery.js +1 -1
- package/mobile/dist/components/ProductGallery/ProductGallery.js.map +1 -1
- package/mobile/dist/ui-kit/Button/LikeButton.js +5 -9
- package/mobile/dist/ui-kit/Button/LikeButton.js.map +1 -1
- package/mobile/dist/ui-kit/Img/ImgAsPicture.js +2 -2
- package/mobile/dist/ui-kit/Img/ImgAsPicture.js.map +1 -1
- package/mobile/dist/ui-kit/SVG.js +4 -1
- package/mobile/dist/ui-kit/SVG.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderWedTextarea.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderWedTextarea.js.map +1 -1
- package/mobile/lib/components/Blocks.js +3 -1
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/CardTransfer/CardTransfer.js +8 -4
- package/mobile/lib/components/CardTransfer/CardTransfer.js.map +1 -1
- package/mobile/lib/components/CarouselLinks/CarouselLinkButton.js +3 -3
- package/mobile/lib/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
- package/mobile/lib/components/Header/DropdownMenu.js +2 -1
- package/mobile/lib/components/Header/DropdownMenu.js.map +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocItem.js +2 -2
- package/mobile/lib/components/LinkDocs/LinkDocItem.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/renderOfficeCard.js +1 -1
- package/mobile/lib/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
- package/mobile/lib/components/ProductGallery/ProductGallery.js +1 -1
- package/mobile/lib/components/ProductGallery/ProductGallery.js.map +1 -1
- package/mobile/lib/ui-kit/Button/LikeButton.js +5 -9
- package/mobile/lib/ui-kit/Button/LikeButton.js.map +1 -1
- package/mobile/lib/ui-kit/Img/ImgAsPicture.js +2 -2
- package/mobile/lib/ui-kit/Img/ImgAsPicture.js.map +1 -1
- package/mobile/lib/ui-kit/SVG.js +4 -1
- package/mobile/lib/ui-kit/SVG.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/mobile/src/components/ApplicationForm/renderWedTextarea.tsx +2 -1
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.example.json +1 -1
- package/mobile/src/components/Blocks.ts +3 -1
- package/mobile/src/components/CardTransfer/CardTransfer.tsx +10 -7
- package/mobile/src/components/CarouselLinks/CarouselLinkButton.tsx +5 -3
- package/mobile/src/components/Header/DropdownMenu.tsx +5 -2
- package/mobile/src/components/LinkDocs/LinkDocItem.tsx +4 -5
- package/mobile/src/components/OfficesAtmsMap/renderOfficeCard.tsx +3 -1
- package/mobile/src/components/ProductBlock/ProductBlock.example.json +1 -1
- package/mobile/src/components/ProductGallery/ProductGallery.tsx +1 -1
- package/mobile/src/ui-kit/Button/LikeButton.tsx +18 -17
- package/mobile/src/ui-kit/Img/ImgAsPicture.tsx +4 -2
- package/mobile/src/ui-kit/SVG.tsx +16 -3
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +1 -1
- package/package.json +1 -1
- package/src/components/ApplicationForm/renderWedTextarea.tsx +2 -1
- package/src/components/BenefitsBlock/BenefitsBlock.example.json +1 -1
- package/src/components/Blocks.mobile.ts +3 -1
- package/src/components/CardTransfer/CardTransfer.tsx +10 -7
- package/src/components/CarouselLinks/CarouselLinkButton.tsx +5 -3
- package/src/components/Header/DropdownMenu.tsx +5 -2
- package/src/components/LinkDocs/LinkDocItem.tsx +4 -5
- package/src/components/OfficesAtmsMap/OfficesAtmsMap.fixture.mobile.tsx +43 -0
- package/src/components/OfficesAtmsMap/OfficesAtmsMap.fixture.tsx +2 -0
- package/src/components/OfficesAtmsMap/renderOfficeCard.tsx +3 -1
- package/src/components/ProductBlock/ProductBlock.example.json +1 -1
- package/src/components/ProductGallery/ProductGallery.mobile.tsx +1 -1
- package/src/ui-kit/Button/LikeButton.tsx +18 -17
- package/src/ui-kit/Img/ImgAsPicture.tsx +4 -2
- package/src/ui-kit/SVG.tsx +16 -3
- 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={
|
|
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
|
-
{
|
|
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
|
|
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
|
-
{
|
|
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
|
+
};
|
|
@@ -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">
|
|
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
|
) : (
|
|
@@ -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"
|
|
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
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
|
|
32
|
-
|
|
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
|
-
{
|
|
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
|
-
{
|
|
51
|
+
width={image.size?.width}
|
|
52
|
+
height={image.size?.height}
|
|
51
53
|
/>
|
|
52
54
|
);
|
|
53
55
|
|
package/src/ui-kit/SVG.tsx
CHANGED
|
@@ -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
|
-
|
|
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
|
},
|