@redneckz/wildless-cms-uni-blocks 0.3.44 → 0.3.47
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/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +59 -82
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/Accordion/AccordionItem.js +2 -2
- package/dist/components/Accordion/AccordionItem.js.map +1 -1
- package/dist/components/Bonus/Bonus.js +1 -1
- package/dist/components/Bonus/Bonus.js.map +1 -1
- package/dist/components/Gallery/GalleryContent.d.ts +11 -1
- package/dist/components/Gallery/GalleryInner.js +1 -1
- package/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/dist/components/GracePeriod/GracePeriodContent.d.ts +1 -0
- package/dist/components/LinkDocs/LinkDocsListItem.js +1 -1
- package/dist/components/LinkDocs/LinkDocsListItem.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlock.js +2 -2
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockContent.d.ts +3 -3
- package/dist/components/ProductBlock/renderBackwardButton.d.ts +2 -1
- package/dist/components/ProductBlock/renderBackwardButton.js +2 -10
- package/dist/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/dist/components/ProductBlock/renderBenefit.js +1 -1
- package/dist/components/ProductBlock/renderBenefit.js.map +1 -1
- package/dist/components/Recommendation/Recommendation.js +1 -1
- package/dist/components/Recommendation/Recommendation.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.js +2 -2
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/Tile/Tile.js +2 -2
- package/dist/components/Tile/Tile.js.map +1 -1
- package/dist/icons/IconName.d.ts +2 -2
- package/dist/icons/IconName.js +1 -1
- package/dist/icons/IconName.js.map +1 -1
- package/dist/ui-kit/Button/ArrowButton.js +2 -14
- package/dist/ui-kit/Button/ArrowButton.js.map +1 -1
- package/dist/ui-kit/Button/Button.js +4 -7
- package/dist/ui-kit/Button/Button.js.map +1 -1
- package/dist/ui-kit/Button/ButtonInner.js +1 -1
- package/dist/ui-kit/Button/ButtonInner.js.map +1 -1
- package/dist/ui-kit/Heading/Heading.js +4 -4
- package/dist/ui-kit/Heading/Heading.js.map +1 -1
- package/dist/ui-kit/List/ListItem.js +2 -2
- package/dist/ui-kit/List/ListItem.js.map +1 -1
- package/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js +1 -1
- package/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Accordion/AccordionItem.js +2 -2
- package/lib/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/components/Bonus/Bonus.js +1 -1
- package/lib/components/Bonus/Bonus.js.map +1 -1
- package/lib/components/Gallery/GalleryContent.d.ts +11 -1
- package/lib/components/Gallery/GalleryInner.js +1 -1
- package/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/lib/components/GracePeriod/GracePeriodContent.d.ts +1 -0
- package/lib/components/LinkDocs/LinkDocsListItem.js +1 -1
- package/lib/components/LinkDocs/LinkDocsListItem.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlock.js +2 -2
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockContent.d.ts +3 -3
- package/lib/components/ProductBlock/renderBackwardButton.d.ts +2 -1
- package/lib/components/ProductBlock/renderBackwardButton.js +2 -10
- package/lib/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/lib/components/ProductBlock/renderBenefit.js +1 -1
- package/lib/components/ProductBlock/renderBenefit.js.map +1 -1
- package/lib/components/Recommendation/Recommendation.js +1 -1
- package/lib/components/Recommendation/Recommendation.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.js +2 -2
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/Tile/Tile.js +2 -2
- package/lib/components/Tile/Tile.js.map +1 -1
- package/lib/icons/IconName.d.ts +2 -2
- package/lib/icons/IconName.js +1 -1
- package/lib/icons/IconName.js.map +1 -1
- package/lib/ui-kit/Button/ArrowButton.js +2 -14
- package/lib/ui-kit/Button/ArrowButton.js.map +1 -1
- package/lib/ui-kit/Button/Button.js +4 -7
- package/lib/ui-kit/Button/Button.js.map +1 -1
- package/lib/ui-kit/Button/ButtonInner.js +1 -1
- package/lib/ui-kit/Button/ButtonInner.js.map +1 -1
- package/lib/ui-kit/Heading/Heading.js +4 -4
- package/lib/ui-kit/Heading/Heading.js.map +1 -1
- package/lib/ui-kit/List/List.fixture.d.ts +4 -0
- package/lib/ui-kit/List/ListItem.js +2 -2
- package/lib/ui-kit/List/ListItem.js.map +1 -1
- package/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js +1 -1
- package/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +4 -4
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/Bonus/Bonus.js +1 -1
- package/mobile/dist/components/Bonus/Bonus.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryContent.d.ts +11 -1
- package/mobile/dist/components/Gallery/GalleryInner.js +1 -1
- package/mobile/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/mobile/dist/components/GracePeriod/GracePeriodContent.d.ts +1 -0
- package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +3 -3
- package/mobile/dist/components/ProductBlock/renderBackwardButton.d.ts +2 -1
- package/mobile/dist/components/ProductBlock/renderBackwardButton.js +2 -10
- package/mobile/dist/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/mobile/dist/components/Recommendation/Recommendation.js +1 -1
- package/mobile/dist/components/Recommendation/Recommendation.js.map +1 -1
- package/mobile/dist/components/Tile/Tile.js +2 -2
- package/mobile/dist/components/Tile/Tile.js.map +1 -1
- package/mobile/dist/icons/IconName.d.ts +2 -2
- package/mobile/dist/icons/IconName.js +1 -1
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/dist/ui-kit/Button/ArrowButton.js +2 -14
- package/mobile/dist/ui-kit/Button/ArrowButton.js.map +1 -1
- package/mobile/dist/ui-kit/Button/ButtonInner.js +1 -1
- package/mobile/dist/ui-kit/Button/ButtonInner.js.map +1 -1
- package/mobile/dist/ui-kit/List/ListItem.js +2 -2
- package/mobile/dist/ui-kit/List/ListItem.js.map +1 -1
- package/mobile/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js +1 -1
- package/mobile/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js.map +1 -1
- package/mobile/lib/components/Bonus/Bonus.js +1 -1
- package/mobile/lib/components/Bonus/Bonus.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryContent.d.ts +11 -1
- package/mobile/lib/components/Gallery/GalleryInner.js +1 -1
- package/mobile/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/mobile/lib/components/GracePeriod/GracePeriodContent.d.ts +1 -0
- package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +3 -3
- package/mobile/lib/components/ProductBlock/renderBackwardButton.d.ts +2 -1
- package/mobile/lib/components/ProductBlock/renderBackwardButton.js +2 -10
- package/mobile/lib/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/mobile/lib/components/Recommendation/Recommendation.js +1 -1
- package/mobile/lib/components/Recommendation/Recommendation.js.map +1 -1
- package/mobile/lib/components/Tile/Tile.js +2 -2
- package/mobile/lib/components/Tile/Tile.js.map +1 -1
- package/mobile/lib/icons/IconName.d.ts +2 -2
- package/mobile/lib/icons/IconName.js +1 -1
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/lib/ui-kit/Button/ArrowButton.js +2 -14
- package/mobile/lib/ui-kit/Button/ArrowButton.js.map +1 -1
- package/mobile/lib/ui-kit/Button/ButtonInner.js +1 -1
- package/mobile/lib/ui-kit/Button/ButtonInner.js.map +1 -1
- package/mobile/lib/ui-kit/List/ListItem.js +2 -2
- package/mobile/lib/ui-kit/List/ListItem.js.map +1 -1
- package/mobile/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js +1 -1
- package/mobile/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js.map +1 -1
- package/mobile/src/components/Bonus/Bonus.tsx +1 -1
- package/mobile/src/components/Gallery/GalleryContent.ts +11 -1
- package/mobile/src/components/Gallery/GalleryInner.tsx +2 -2
- package/mobile/src/components/GracePeriod/GracePeriodContent.ts +1 -0
- package/mobile/src/components/ProductBlock/ProductBlockContent.ts +3 -3
- package/mobile/src/components/ProductBlock/renderBackwardButton.tsx +12 -21
- package/mobile/src/components/Recommendation/Recommendation.tsx +2 -2
- package/mobile/src/components/Tile/Tile.tsx +2 -2
- package/mobile/src/icons/ArrowLeftIcon.svg +1 -1
- package/mobile/src/icons/IconName.ts +2 -2
- package/mobile/src/ui-kit/Button/ArrowButton.tsx +8 -15
- package/mobile/src/ui-kit/Button/ButtonInner.tsx +1 -1
- package/mobile/src/ui-kit/List/ListItem.tsx +2 -2
- package/mobile/src/ui-kit/TableArrowScrollControl/TableArrowScrollControl.tsx +2 -1
- package/package.json +1 -1
- package/src/components/Accordion/AccordionItem.tsx +4 -2
- package/src/components/Bonus/Bonus.tsx +1 -1
- package/src/components/Gallery/GalleryContent.ts +11 -1
- package/src/components/Gallery/GalleryInner.tsx +2 -2
- package/src/components/GracePeriod/GracePeriodContent.ts +1 -0
- package/src/components/LinkDocs/LinkDocsListItem.tsx +1 -1
- package/src/components/ProductBlock/ProductBlock.fixture.tsx +8 -7
- package/src/components/ProductBlock/ProductBlock.tsx +3 -3
- package/src/components/ProductBlock/ProductBlockContent.ts +3 -3
- package/src/components/ProductBlock/renderBackwardButton.tsx +12 -21
- package/src/components/ProductBlock/renderBenefit.tsx +4 -6
- package/src/components/Recommendation/Recommendation.tsx +2 -2
- package/src/components/StepsBlock/StepsBlock.tsx +3 -3
- package/src/components/Tile/Tile.fixture.tsx +1 -1
- package/src/components/Tile/Tile.tsx +2 -2
- package/src/icons/ArrowLeftIcon.svg +1 -1
- package/src/icons/IconName.ts +2 -2
- package/src/ui-kit/Button/ArrowButton.tsx +8 -15
- package/src/ui-kit/Button/Button.tsx +10 -9
- package/src/ui-kit/Button/ButtonInner.tsx +1 -1
- package/src/ui-kit/Heading/Heading.tsx +4 -4
- package/src/ui-kit/List/List.fixture.tsx +20 -0
- package/src/ui-kit/List/ListItem.tsx +2 -2
- package/src/ui-kit/TableArrowScrollControl/TableArrowScrollControl.tsx +2 -1
|
@@ -1,20 +1,7 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { Button } from './Button';
|
|
3
3
|
import { ButtonProps } from './ButtonProps';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const ARROW_PATHS = [
|
|
7
|
-
{
|
|
8
|
-
d: 'm9 12 4-4-4-4',
|
|
9
|
-
stroke: 'currentColor',
|
|
10
|
-
strokeWidth: '2',
|
|
11
|
-
strokeLinecap: 'round',
|
|
12
|
-
fill: 'none',
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
d: 'M2 9a1 1 0 0 1 0-2v2Zm6-2a1 1 0 0 1 0 2V7ZM2 7h6v2H2V7Z',
|
|
16
|
-
},
|
|
17
|
-
];
|
|
4
|
+
import { Img } from '../Img/Img';
|
|
18
5
|
|
|
19
6
|
export const ArrowButton = JSX<ButtonProps>(({ className, disabled, ...rest }) => (
|
|
20
7
|
<Button
|
|
@@ -27,6 +14,12 @@ export const ArrowButton = JSX<ButtonProps>(({ className, disabled, ...rest }) =
|
|
|
27
14
|
disabled={disabled}
|
|
28
15
|
{...rest}
|
|
29
16
|
>
|
|
30
|
-
<
|
|
17
|
+
<Img
|
|
18
|
+
className="w-4 h-4 min-w-4 min-h-4 rounded-full box-border"
|
|
19
|
+
image={{ icon: 'ArrowLeftIcon' }}
|
|
20
|
+
width="16"
|
|
21
|
+
height="16"
|
|
22
|
+
asSVG
|
|
23
|
+
/>
|
|
31
24
|
</Button>
|
|
32
25
|
));
|
|
@@ -21,22 +21,26 @@ const buttonStyle = 'text-center font-sans select-none';
|
|
|
21
21
|
export interface ButtonCommonProps extends ButtonProps, ButtonWithIconProps {}
|
|
22
22
|
|
|
23
23
|
export const Button = JSX<ButtonCommonProps>((props) => {
|
|
24
|
-
const { text, aboveText, appendLeft, children, disabled, rounded } = props;
|
|
24
|
+
const { text, aboveText, appendLeft, children, disabled, rounded, ...rest } = props;
|
|
25
25
|
|
|
26
26
|
const buttonInner = children ?? (
|
|
27
27
|
<ButtonInner text={text} aboveText={aboveText} appendLeft={appendLeft} rounded={rounded} />
|
|
28
28
|
);
|
|
29
29
|
|
|
30
30
|
return disabled ? (
|
|
31
|
-
<DisabledButton {
|
|
31
|
+
<DisabledButton rounded={rounded} {...rest}>
|
|
32
|
+
{buttonInner}
|
|
33
|
+
</DisabledButton>
|
|
32
34
|
) : (
|
|
33
|
-
<RegularButton {
|
|
35
|
+
<RegularButton rounded={rounded} {...rest}>
|
|
36
|
+
{buttonInner}
|
|
37
|
+
</RegularButton>
|
|
34
38
|
);
|
|
35
39
|
});
|
|
36
40
|
|
|
37
41
|
export const RegularButton = JSX<ButtonCommonProps>(
|
|
38
42
|
({
|
|
39
|
-
className,
|
|
43
|
+
className = '',
|
|
40
44
|
ariaLabel,
|
|
41
45
|
version = 'none',
|
|
42
46
|
rounded,
|
|
@@ -46,20 +50,17 @@ export const RegularButton = JSX<ButtonCommonProps>(
|
|
|
46
50
|
onClick,
|
|
47
51
|
...rest
|
|
48
52
|
}) => {
|
|
49
|
-
// Pick Button props to prevent forwarding into HTML <a> tag leading to errors being printed in console.
|
|
50
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
51
|
-
const { aboveText, appendLeft, ...linkProps } = rest;
|
|
52
53
|
return (
|
|
53
54
|
<a
|
|
54
55
|
className={`${buttonStyle} inline-block cursor-pointer no-underline ${
|
|
55
56
|
buttonStyleMap[version] || ''
|
|
56
|
-
} ${rounded ? 'rounded-full' : 'rounded-md'} ${className
|
|
57
|
+
} ${rounded ? 'rounded-full' : 'rounded-md'} ${className}`}
|
|
57
58
|
href={href}
|
|
58
59
|
target={target}
|
|
59
60
|
onClick={onClick}
|
|
60
61
|
aria-label={ariaLabel}
|
|
61
62
|
role={href ? 'link' : 'button'}
|
|
62
|
-
{...
|
|
63
|
+
{...rest}
|
|
63
64
|
>
|
|
64
65
|
{children}
|
|
65
66
|
</a>
|
|
@@ -14,7 +14,7 @@ export const ButtonInner = JSX<ButtonInnerProps>((props) => {
|
|
|
14
14
|
{isWithText(props) ? (
|
|
15
15
|
<div>
|
|
16
16
|
<div className="text-m-2xs font-light text-left">{aboveText}</div>
|
|
17
|
-
<div className="text-button text-left">{text}</div>
|
|
17
|
+
<div className="text-button-sm text-left">{text}</div>
|
|
18
18
|
</div>
|
|
19
19
|
) : null}
|
|
20
20
|
</div>
|
|
@@ -8,10 +8,10 @@ export interface HeadingProps extends HeadingContent, HeadingTypeContent {
|
|
|
8
8
|
|
|
9
9
|
const HEADING_STYLE_MAP: Record<HeadingType, string> = {
|
|
10
10
|
h1: 'text-title-xl tracking-[-0.3px]',
|
|
11
|
-
h2: 'text-title',
|
|
12
|
-
h3: 'text-title
|
|
13
|
-
h4: 'text-title-
|
|
14
|
-
h5: 'text-title-
|
|
11
|
+
h2: 'text-title-lg',
|
|
12
|
+
h3: 'text-title',
|
|
13
|
+
h4: 'text-title-sm',
|
|
14
|
+
h5: 'text-title-xs',
|
|
15
15
|
h6: 'text-title-2xs tracking-[0.2px]',
|
|
16
16
|
};
|
|
17
17
|
|
|
@@ -34,4 +34,24 @@ export default {
|
|
|
34
34
|
<List items={items} version="gray" isDotted={false} />
|
|
35
35
|
</div>
|
|
36
36
|
),
|
|
37
|
+
'tile dotted': (
|
|
38
|
+
<div className="bg-white p-12">
|
|
39
|
+
<List items={items} version="tile" />
|
|
40
|
+
</div>
|
|
41
|
+
),
|
|
42
|
+
'tile w/o dots': (
|
|
43
|
+
<div className="bg-white p-12">
|
|
44
|
+
<List items={items} version="tile" isDotted={false} />
|
|
45
|
+
</div>
|
|
46
|
+
),
|
|
47
|
+
'tile white dotted': (
|
|
48
|
+
<div className="bg-primary-main p-12">
|
|
49
|
+
<List items={items} version="tile-white" />
|
|
50
|
+
</div>
|
|
51
|
+
),
|
|
52
|
+
'tile white w/o dots': (
|
|
53
|
+
<div className="bg-primary-main p-12">
|
|
54
|
+
<List items={items} version="tile-white" isDotted={false} />
|
|
55
|
+
</div>
|
|
56
|
+
),
|
|
37
57
|
};
|
|
@@ -15,8 +15,8 @@ const LIST_STYLE_CLASSES = {
|
|
|
15
15
|
primary: 'rounded-full inline-block mr-3 mt-2',
|
|
16
16
|
secondary: 'rounded-full inline-block mr-3 mt-2',
|
|
17
17
|
gray: 'rounded-full inline-block mr-3 mt-2',
|
|
18
|
-
tile: 'rounded-full inline-block mr-4',
|
|
19
|
-
'tile-white': 'rounded-full inline-block mr-4',
|
|
18
|
+
tile: 'rounded-full inline-block mr-4 mt-3',
|
|
19
|
+
'tile-white': 'rounded-full inline-block mr-4 mt-3',
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
const LIST_DOT_STYLE_MAP: Record<ListItemVersion, string> = {
|
|
@@ -8,13 +8,14 @@ export const TableArrowScrollControl = JSX<TableArrowScrollControlProps>(
|
|
|
8
8
|
<div>
|
|
9
9
|
<div className="absolute top-7 right-7 z-10">
|
|
10
10
|
<ArrowButton
|
|
11
|
+
className="mt-4 rotate-180"
|
|
11
12
|
onClick={onNextClick}
|
|
12
13
|
disabled={!showNextButton}
|
|
13
14
|
ariaLabel="Пролистать вправо"
|
|
14
15
|
data-block-control="scroll-right"
|
|
15
16
|
/>
|
|
16
17
|
<ArrowButton
|
|
17
|
-
className="mt-4
|
|
18
|
+
className="mt-4"
|
|
18
19
|
onClick={onPrevClick}
|
|
19
20
|
disabled={!showPrevButton}
|
|
20
21
|
ariaLabel="Пролистать влево"
|