@redneckz/wildless-cms-uni-blocks 0.3.13 → 0.3.14
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 +44 -7
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/Blocks.d.ts +1 -0
- package/dist/components/Blocks.js +2 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/ContentPage/ContentPageHead.js +1 -1
- package/dist/components/ContentPage/ContentPageHead.js.map +1 -1
- package/dist/components/Headline/Headline.js +3 -8
- package/dist/components/Headline/Headline.js.map +1 -1
- package/dist/components/Headline/Headline.mobile.js +3 -2
- package/dist/components/Headline/Headline.mobile.js.map +1 -1
- package/dist/components/Headline/HeadlineContent.d.ts +2 -2
- package/dist/components/Headline/constants.d.ts +4 -0
- package/dist/components/Headline/constants.js +13 -0
- package/dist/components/Headline/constants.js.map +1 -0
- package/dist/components/ProductBlock/ProductBlockInner.js +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
- package/dist/components/Recommendation/Recommendation.d.ts +5 -0
- package/dist/components/Recommendation/Recommendation.js +34 -0
- package/dist/components/Recommendation/Recommendation.js.map +1 -0
- package/dist/components/Recommendation/RecommendationCard.d.ts +7 -0
- package/dist/components/Recommendation/RecommendationCard.js +13 -0
- package/dist/components/Recommendation/RecommendationCard.js.map +1 -0
- package/dist/components/Recommendation/RecommendationContent.d.ts +14 -0
- package/dist/components/Recommendation/RecommendationContent.js +2 -0
- package/dist/components/Recommendation/RecommendationContent.js.map +1 -0
- package/dist/model/BlockVersion.d.ts +6 -1
- package/dist/ui-kit/Description/Description.js +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Blocks.d.ts +1 -0
- package/lib/components/Blocks.js +2 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/ContentPage/ContentPageHead.js +1 -1
- package/lib/components/ContentPage/ContentPageHead.js.map +1 -1
- package/lib/components/Headline/Headline.fixture.d.ts +4 -2
- package/lib/components/Headline/Headline.fixture.mobile.d.ts +2 -3
- package/lib/components/Headline/Headline.js +3 -8
- package/lib/components/Headline/Headline.js.map +1 -1
- package/lib/components/Headline/Headline.mobile.js +3 -2
- package/lib/components/Headline/Headline.mobile.js.map +1 -1
- package/lib/components/Headline/HeadlineContent.d.ts +2 -2
- package/lib/components/Headline/constants.d.ts +4 -0
- package/lib/components/Headline/constants.js +11 -0
- package/lib/components/Headline/constants.js.map +1 -0
- package/lib/components/ProductBlock/ProductBlockInner.js +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
- package/lib/components/Recommendation/Recommendation.d.ts +5 -0
- package/lib/components/Recommendation/Recommendation.fixture.d.ts +6 -0
- package/lib/components/Recommendation/Recommendation.js +32 -0
- package/lib/components/Recommendation/Recommendation.js.map +1 -0
- package/lib/components/Recommendation/RecommendationCard.d.ts +7 -0
- package/lib/components/Recommendation/RecommendationCard.js +11 -0
- package/lib/components/Recommendation/RecommendationCard.js.map +1 -0
- package/lib/components/Recommendation/RecommendationContent.d.ts +14 -0
- package/lib/components/Recommendation/RecommendationContent.js +2 -0
- package/lib/components/Recommendation/RecommendationContent.js.map +1 -0
- package/lib/model/BlockVersion.d.ts +6 -1
- package/lib/ui-kit/Description/Description.js +1 -1
- package/mobile/bundle/bundle.umd.js +16 -5
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/ContentPage/ContentPageHead.js +1 -1
- package/mobile/dist/components/ContentPage/ContentPageHead.js.map +1 -1
- package/mobile/dist/components/Headline/Headline.js +3 -2
- package/mobile/dist/components/Headline/Headline.js.map +1 -1
- package/mobile/dist/components/Headline/HeadlineContent.d.ts +2 -2
- package/mobile/dist/components/Headline/constants.d.ts +4 -0
- package/mobile/dist/components/Headline/constants.js +13 -0
- package/mobile/dist/components/Headline/constants.js.map +1 -0
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/mobile/dist/components/Recommendation/Recommendation.d.ts +5 -0
- package/mobile/dist/components/Recommendation/Recommendation.js +34 -0
- package/mobile/dist/components/Recommendation/Recommendation.js.map +1 -0
- package/mobile/dist/components/Recommendation/RecommendationCard.d.ts +7 -0
- package/mobile/dist/components/Recommendation/RecommendationCard.js +13 -0
- package/mobile/dist/components/Recommendation/RecommendationCard.js.map +1 -0
- package/mobile/dist/components/Recommendation/RecommendationContent.d.ts +14 -0
- package/mobile/dist/components/Recommendation/RecommendationContent.js +2 -0
- package/mobile/dist/components/Recommendation/RecommendationContent.js.map +1 -0
- package/mobile/dist/model/BlockVersion.d.ts +6 -1
- package/mobile/dist/ui-kit/Description/Description.js +1 -1
- package/mobile/lib/components/ContentPage/ContentPageHead.js +1 -1
- package/mobile/lib/components/ContentPage/ContentPageHead.js.map +1 -1
- package/mobile/lib/components/Headline/Headline.js +3 -2
- package/mobile/lib/components/Headline/Headline.js.map +1 -1
- package/mobile/lib/components/Headline/HeadlineContent.d.ts +2 -2
- package/mobile/lib/components/Headline/constants.d.ts +4 -0
- package/mobile/lib/components/Headline/constants.js +11 -0
- package/mobile/lib/components/Headline/constants.js.map +1 -0
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/mobile/lib/components/Recommendation/Recommendation.d.ts +5 -0
- package/mobile/lib/components/Recommendation/Recommendation.js +32 -0
- package/mobile/lib/components/Recommendation/Recommendation.js.map +1 -0
- package/mobile/lib/components/Recommendation/RecommendationCard.d.ts +7 -0
- package/mobile/lib/components/Recommendation/RecommendationCard.js +11 -0
- package/mobile/lib/components/Recommendation/RecommendationCard.js.map +1 -0
- package/mobile/lib/components/Recommendation/RecommendationContent.d.ts +14 -0
- package/mobile/lib/components/Recommendation/RecommendationContent.js +2 -0
- package/mobile/lib/components/Recommendation/RecommendationContent.js.map +1 -0
- package/mobile/lib/model/BlockVersion.d.ts +6 -1
- package/mobile/lib/ui-kit/Description/Description.js +1 -1
- package/mobile/src/components/ContentPage/ContentPage.page.json +74 -0
- package/mobile/src/components/ContentPage/ContentPageHead.tsx +1 -1
- package/mobile/src/components/Headline/Headline.example.json +1 -1
- package/mobile/src/components/Headline/Headline.tsx +20 -4
- package/mobile/src/components/Headline/HeadlineContent.ts +2 -3
- package/mobile/src/components/Headline/constants.ts +14 -0
- package/mobile/src/components/ProductBlock/ProductBlockInner.tsx +3 -1
- package/mobile/src/components/Recommendation/Recommendation.example.json +38 -0
- package/mobile/src/components/Recommendation/Recommendation.tsx +105 -0
- package/mobile/src/components/Recommendation/RecommendationCard.tsx +33 -0
- package/mobile/src/components/Recommendation/RecommendationContent.ts +19 -0
- package/mobile/src/model/BlockVersion.ts +7 -1
- package/mobile/src/ui-kit/Description/Description.tsx +1 -1
- package/package.json +1 -1
- package/src/components/Blocks.ts +2 -0
- package/src/components/ContentPage/ContentPage.page.json +74 -0
- package/src/components/ContentPage/ContentPageHead.tsx +1 -1
- package/src/components/Headline/Headline.example.json +1 -1
- package/src/components/Headline/Headline.fixture.mobile.tsx +39 -15
- package/src/components/Headline/Headline.fixture.tsx +20 -17
- package/src/components/Headline/Headline.mobile.tsx +20 -4
- package/src/components/Headline/Headline.tsx +9 -12
- package/src/components/Headline/HeadlineContent.ts +2 -3
- package/src/components/Headline/constants.ts +14 -0
- package/src/components/ProductBlock/ProductBlockInner.mobile.tsx +3 -1
- package/src/components/ProductBlock/ProductBlockInner.tsx +1 -1
- package/src/components/Recommendation/Recommendation.example.json +38 -0
- package/src/components/Recommendation/Recommendation.fixture.tsx +73 -0
- package/src/components/Recommendation/Recommendation.tsx +105 -0
- package/src/components/Recommendation/RecommendationCard.tsx +33 -0
- package/src/components/Recommendation/RecommendationContent.ts +19 -0
- package/src/model/BlockVersion.ts +7 -1
- package/src/ui-kit/Description/Description.tsx +1 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
3
|
+
import type { UniBlockProps } from '../../types';
|
|
4
|
+
import { Description } from '../../ui-kit/Description/Description';
|
|
5
|
+
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
6
|
+
import { Img } from '../../ui-kit/Img/Img';
|
|
7
|
+
import { List } from '../../ui-kit/List/List';
|
|
8
|
+
import { BaseTile } from '../BaseTile/BaseTile';
|
|
9
|
+
import type { RecommendationCardContent } from './RecommendationContent';
|
|
10
|
+
|
|
11
|
+
export interface RecommendationCardProps extends RecommendationCardContent, UniBlockProps {
|
|
12
|
+
version?: BlockVersion;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const RecommendationCard = JSX<RecommendationCardProps>(
|
|
16
|
+
({ context, className = '', title, description, items, image, version }) => {
|
|
17
|
+
return (
|
|
18
|
+
<section
|
|
19
|
+
className={`border border-solid box-border rounded-md p-7 min-w-[515px] max-w-[515px] ${className}`}
|
|
20
|
+
role="listitem"
|
|
21
|
+
>
|
|
22
|
+
<BaseTile
|
|
23
|
+
context={context}
|
|
24
|
+
title={title && <Heading headingType="h4" title={title} className="mb-4" />}
|
|
25
|
+
image={image?.src && <Img className="mt-auto ml-7" image={image} />}
|
|
26
|
+
>
|
|
27
|
+
{description ? <Description description={description} /> : null}
|
|
28
|
+
{items?.length ? <List items={items} version={version} /> : null}
|
|
29
|
+
</BaseTile>
|
|
30
|
+
</section>
|
|
31
|
+
);
|
|
32
|
+
},
|
|
33
|
+
);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
|
+
import type { DescriptionContent } from '../../ui-kit/Description/DescriptionContent';
|
|
3
|
+
import type { HeadingContent } from '../../ui-kit/Heading/HeadingContent';
|
|
4
|
+
import type { ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
5
|
+
import type { ListContent } from '../../ui-kit/List/ListContent';
|
|
6
|
+
|
|
7
|
+
export type RecommendationCardContent = HeadingContent &
|
|
8
|
+
DescriptionContent &
|
|
9
|
+
ListContent &
|
|
10
|
+
ImageContent;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @title Рекомендации
|
|
14
|
+
*/
|
|
15
|
+
export interface RecommendationContent extends HeadingContent {
|
|
16
|
+
/** @title Карточки */
|
|
17
|
+
recommendations?: RecommendationCardContent[];
|
|
18
|
+
version?: BlockVersion;
|
|
19
|
+
}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @title Цвет
|
|
2
|
+
* @title Цвет блока
|
|
3
3
|
* @enumNames ["Основная", "Второстепенная"]
|
|
4
4
|
*/
|
|
5
5
|
export type BlockVersion = 'primary' | 'secondary';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @title Цвет блока
|
|
9
|
+
* @enumNames ["Прозрачная", Основная", "Второстепенная"]
|
|
10
|
+
*/
|
|
11
|
+
export type BlockVersionWithTransparent = 'transparent' | 'primary' | 'secondary';
|
|
@@ -8,5 +8,5 @@ export interface DescriptionProps extends DescriptionContent {
|
|
|
8
8
|
export const Description = JSX<DescriptionProps>((props) => {
|
|
9
9
|
const { className = '', description } = props;
|
|
10
10
|
|
|
11
|
-
return <div className={`font-normal text-
|
|
11
|
+
return <div className={`font-normal text-base ${className}`}>{description}</div>;
|
|
12
12
|
});
|