@redneckz/wildless-cms-uni-blocks 0.14.44 → 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 +27 -24
- package/bundle/bundle.umd.min.js +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/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/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/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 +25 -23
- package/mobile/bundle/bundle.umd.min.js +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/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/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/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/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/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/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/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
|
@@ -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>
|
|
@@ -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
|
|
|
@@ -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
|
},
|
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
3
|
import { useForm } from '../../hooks/useForm';
|
|
3
4
|
import { useLink } from '../../hooks/useLink';
|
|
4
5
|
import { type UniBlockProps } from '../../model/JSXBlock';
|
|
@@ -21,7 +22,6 @@ const FORM_URL_MAP = {
|
|
|
21
22
|
|
|
22
23
|
const INITIAL_FORM_STATE = {
|
|
23
24
|
amount: 1500,
|
|
24
|
-
_amount: 1500,
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
export interface CardTransferProps extends CardTransferContent, UniBlockProps {}
|
|
@@ -36,15 +36,19 @@ export const CardTransfer = JSX<CardTransferProps>(
|
|
|
36
36
|
formType = 'private',
|
|
37
37
|
...rest
|
|
38
38
|
}) => {
|
|
39
|
-
const [{ amount
|
|
39
|
+
const [{ amount }, { field }] = useForm(INITIAL_FORM_STATE);
|
|
40
|
+
const [isDisabled, setDisabled] = useState(false);
|
|
40
41
|
|
|
41
|
-
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
setDisabled(amount <= 0);
|
|
44
|
+
}, [amount]);
|
|
42
45
|
|
|
43
46
|
const buttonStyle = isDisabled
|
|
44
47
|
? getDisabledButtonClasses({ version: button?.version })
|
|
45
48
|
: getRegularButtonClasses({ className: 'text-white', version: button?.version });
|
|
46
49
|
|
|
47
50
|
const link = useLink();
|
|
51
|
+
const { onClick } = link(button || {});
|
|
48
52
|
|
|
49
53
|
return (
|
|
50
54
|
<BlockWrapper
|
|
@@ -61,19 +65,18 @@ export const CardTransfer = JSX<CardTransferProps>(
|
|
|
61
65
|
) : null}
|
|
62
66
|
<form className="w-full xl:max-w-[468px]" method="POST" action={FORM_URL_MAP[formType]}>
|
|
63
67
|
<CurrencyInput
|
|
64
|
-
name="_amount"
|
|
65
68
|
valid={!isDisabled}
|
|
66
69
|
placeholder={placeholder}
|
|
67
70
|
label={label}
|
|
68
|
-
{...field('
|
|
71
|
+
{...field('amount', { parse: Number, format: String })}
|
|
69
72
|
/>
|
|
70
|
-
<input type="hidden" name="amount" value={
|
|
73
|
+
<input type="hidden" name="amount" value={amount} />
|
|
71
74
|
{button?.text ? (
|
|
72
75
|
<button
|
|
73
76
|
type="submit"
|
|
74
77
|
className={style('w-full p-m mt-lg', buttonStyle)}
|
|
75
78
|
disabled={isDisabled}
|
|
76
|
-
{
|
|
79
|
+
onClick={onClick}
|
|
77
80
|
>
|
|
78
81
|
{button.text}
|
|
79
82
|
</button>
|
|
@@ -15,9 +15,9 @@ export type CarouselLinkButtonProps = LinkProps & {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export const CarouselLinkButton = JSX<CarouselLinkButtonProps>(
|
|
18
|
-
({
|
|
18
|
+
({ className = '', ...linkProps }) => {
|
|
19
19
|
const link = useLink();
|
|
20
|
-
const
|
|
20
|
+
const { text, href, target, onClick } = link(linkProps);
|
|
21
21
|
|
|
22
22
|
return text ? (
|
|
23
23
|
<div
|
|
@@ -33,7 +33,9 @@ export const CarouselLinkButton = JSX<CarouselLinkButtonProps>(
|
|
|
33
33
|
'sm:rounded-md rounded-none w-full px-xl py-lg whitespace-nowrap z-10',
|
|
34
34
|
)}
|
|
35
35
|
role="link"
|
|
36
|
-
{
|
|
36
|
+
href={href}
|
|
37
|
+
target={target}
|
|
38
|
+
onClick={onClick}
|
|
37
39
|
>
|
|
38
40
|
<Text size="text-l" font="font-light" color="text-primary-text">
|
|
39
41
|
{text}
|
|
@@ -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>
|
|
@@ -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
|
},
|