@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.
Files changed (140) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +44 -7
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/dist/components/Blocks.d.ts +1 -0
  5. package/dist/components/Blocks.js +2 -0
  6. package/dist/components/Blocks.js.map +1 -1
  7. package/dist/components/ContentPage/ContentPageHead.js +1 -1
  8. package/dist/components/ContentPage/ContentPageHead.js.map +1 -1
  9. package/dist/components/Headline/Headline.js +3 -8
  10. package/dist/components/Headline/Headline.js.map +1 -1
  11. package/dist/components/Headline/Headline.mobile.js +3 -2
  12. package/dist/components/Headline/Headline.mobile.js.map +1 -1
  13. package/dist/components/Headline/HeadlineContent.d.ts +2 -2
  14. package/dist/components/Headline/constants.d.ts +4 -0
  15. package/dist/components/Headline/constants.js +13 -0
  16. package/dist/components/Headline/constants.js.map +1 -0
  17. package/dist/components/ProductBlock/ProductBlockInner.js +1 -1
  18. package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
  19. package/dist/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
  20. package/dist/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
  21. package/dist/components/Recommendation/Recommendation.d.ts +5 -0
  22. package/dist/components/Recommendation/Recommendation.js +34 -0
  23. package/dist/components/Recommendation/Recommendation.js.map +1 -0
  24. package/dist/components/Recommendation/RecommendationCard.d.ts +7 -0
  25. package/dist/components/Recommendation/RecommendationCard.js +13 -0
  26. package/dist/components/Recommendation/RecommendationCard.js.map +1 -0
  27. package/dist/components/Recommendation/RecommendationContent.d.ts +14 -0
  28. package/dist/components/Recommendation/RecommendationContent.js +2 -0
  29. package/dist/components/Recommendation/RecommendationContent.js.map +1 -0
  30. package/dist/model/BlockVersion.d.ts +6 -1
  31. package/dist/ui-kit/Description/Description.js +1 -1
  32. package/lib/common.css +1 -1
  33. package/lib/components/Blocks.d.ts +1 -0
  34. package/lib/components/Blocks.js +2 -0
  35. package/lib/components/Blocks.js.map +1 -1
  36. package/lib/components/ContentPage/ContentPageHead.js +1 -1
  37. package/lib/components/ContentPage/ContentPageHead.js.map +1 -1
  38. package/lib/components/Headline/Headline.fixture.d.ts +4 -2
  39. package/lib/components/Headline/Headline.fixture.mobile.d.ts +2 -3
  40. package/lib/components/Headline/Headline.js +3 -8
  41. package/lib/components/Headline/Headline.js.map +1 -1
  42. package/lib/components/Headline/Headline.mobile.js +3 -2
  43. package/lib/components/Headline/Headline.mobile.js.map +1 -1
  44. package/lib/components/Headline/HeadlineContent.d.ts +2 -2
  45. package/lib/components/Headline/constants.d.ts +4 -0
  46. package/lib/components/Headline/constants.js +11 -0
  47. package/lib/components/Headline/constants.js.map +1 -0
  48. package/lib/components/ProductBlock/ProductBlockInner.js +1 -1
  49. package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
  50. package/lib/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
  51. package/lib/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
  52. package/lib/components/Recommendation/Recommendation.d.ts +5 -0
  53. package/lib/components/Recommendation/Recommendation.fixture.d.ts +6 -0
  54. package/lib/components/Recommendation/Recommendation.js +32 -0
  55. package/lib/components/Recommendation/Recommendation.js.map +1 -0
  56. package/lib/components/Recommendation/RecommendationCard.d.ts +7 -0
  57. package/lib/components/Recommendation/RecommendationCard.js +11 -0
  58. package/lib/components/Recommendation/RecommendationCard.js.map +1 -0
  59. package/lib/components/Recommendation/RecommendationContent.d.ts +14 -0
  60. package/lib/components/Recommendation/RecommendationContent.js +2 -0
  61. package/lib/components/Recommendation/RecommendationContent.js.map +1 -0
  62. package/lib/model/BlockVersion.d.ts +6 -1
  63. package/lib/ui-kit/Description/Description.js +1 -1
  64. package/mobile/bundle/bundle.umd.js +16 -5
  65. package/mobile/bundle/bundle.umd.min.js +1 -1
  66. package/mobile/dist/components/ContentPage/ContentPageHead.js +1 -1
  67. package/mobile/dist/components/ContentPage/ContentPageHead.js.map +1 -1
  68. package/mobile/dist/components/Headline/Headline.js +3 -2
  69. package/mobile/dist/components/Headline/Headline.js.map +1 -1
  70. package/mobile/dist/components/Headline/HeadlineContent.d.ts +2 -2
  71. package/mobile/dist/components/Headline/constants.d.ts +4 -0
  72. package/mobile/dist/components/Headline/constants.js +13 -0
  73. package/mobile/dist/components/Headline/constants.js.map +1 -0
  74. package/mobile/dist/components/ProductBlock/ProductBlockInner.js +1 -1
  75. package/mobile/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
  76. package/mobile/dist/components/Recommendation/Recommendation.d.ts +5 -0
  77. package/mobile/dist/components/Recommendation/Recommendation.js +34 -0
  78. package/mobile/dist/components/Recommendation/Recommendation.js.map +1 -0
  79. package/mobile/dist/components/Recommendation/RecommendationCard.d.ts +7 -0
  80. package/mobile/dist/components/Recommendation/RecommendationCard.js +13 -0
  81. package/mobile/dist/components/Recommendation/RecommendationCard.js.map +1 -0
  82. package/mobile/dist/components/Recommendation/RecommendationContent.d.ts +14 -0
  83. package/mobile/dist/components/Recommendation/RecommendationContent.js +2 -0
  84. package/mobile/dist/components/Recommendation/RecommendationContent.js.map +1 -0
  85. package/mobile/dist/model/BlockVersion.d.ts +6 -1
  86. package/mobile/dist/ui-kit/Description/Description.js +1 -1
  87. package/mobile/lib/components/ContentPage/ContentPageHead.js +1 -1
  88. package/mobile/lib/components/ContentPage/ContentPageHead.js.map +1 -1
  89. package/mobile/lib/components/Headline/Headline.js +3 -2
  90. package/mobile/lib/components/Headline/Headline.js.map +1 -1
  91. package/mobile/lib/components/Headline/HeadlineContent.d.ts +2 -2
  92. package/mobile/lib/components/Headline/constants.d.ts +4 -0
  93. package/mobile/lib/components/Headline/constants.js +11 -0
  94. package/mobile/lib/components/Headline/constants.js.map +1 -0
  95. package/mobile/lib/components/ProductBlock/ProductBlockInner.js +1 -1
  96. package/mobile/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
  97. package/mobile/lib/components/Recommendation/Recommendation.d.ts +5 -0
  98. package/mobile/lib/components/Recommendation/Recommendation.js +32 -0
  99. package/mobile/lib/components/Recommendation/Recommendation.js.map +1 -0
  100. package/mobile/lib/components/Recommendation/RecommendationCard.d.ts +7 -0
  101. package/mobile/lib/components/Recommendation/RecommendationCard.js +11 -0
  102. package/mobile/lib/components/Recommendation/RecommendationCard.js.map +1 -0
  103. package/mobile/lib/components/Recommendation/RecommendationContent.d.ts +14 -0
  104. package/mobile/lib/components/Recommendation/RecommendationContent.js +2 -0
  105. package/mobile/lib/components/Recommendation/RecommendationContent.js.map +1 -0
  106. package/mobile/lib/model/BlockVersion.d.ts +6 -1
  107. package/mobile/lib/ui-kit/Description/Description.js +1 -1
  108. package/mobile/src/components/ContentPage/ContentPage.page.json +74 -0
  109. package/mobile/src/components/ContentPage/ContentPageHead.tsx +1 -1
  110. package/mobile/src/components/Headline/Headline.example.json +1 -1
  111. package/mobile/src/components/Headline/Headline.tsx +20 -4
  112. package/mobile/src/components/Headline/HeadlineContent.ts +2 -3
  113. package/mobile/src/components/Headline/constants.ts +14 -0
  114. package/mobile/src/components/ProductBlock/ProductBlockInner.tsx +3 -1
  115. package/mobile/src/components/Recommendation/Recommendation.example.json +38 -0
  116. package/mobile/src/components/Recommendation/Recommendation.tsx +105 -0
  117. package/mobile/src/components/Recommendation/RecommendationCard.tsx +33 -0
  118. package/mobile/src/components/Recommendation/RecommendationContent.ts +19 -0
  119. package/mobile/src/model/BlockVersion.ts +7 -1
  120. package/mobile/src/ui-kit/Description/Description.tsx +1 -1
  121. package/package.json +1 -1
  122. package/src/components/Blocks.ts +2 -0
  123. package/src/components/ContentPage/ContentPage.page.json +74 -0
  124. package/src/components/ContentPage/ContentPageHead.tsx +1 -1
  125. package/src/components/Headline/Headline.example.json +1 -1
  126. package/src/components/Headline/Headline.fixture.mobile.tsx +39 -15
  127. package/src/components/Headline/Headline.fixture.tsx +20 -17
  128. package/src/components/Headline/Headline.mobile.tsx +20 -4
  129. package/src/components/Headline/Headline.tsx +9 -12
  130. package/src/components/Headline/HeadlineContent.ts +2 -3
  131. package/src/components/Headline/constants.ts +14 -0
  132. package/src/components/ProductBlock/ProductBlockInner.mobile.tsx +3 -1
  133. package/src/components/ProductBlock/ProductBlockInner.tsx +1 -1
  134. package/src/components/Recommendation/Recommendation.example.json +38 -0
  135. package/src/components/Recommendation/Recommendation.fixture.tsx +73 -0
  136. package/src/components/Recommendation/Recommendation.tsx +105 -0
  137. package/src/components/Recommendation/RecommendationCard.tsx +33 -0
  138. package/src/components/Recommendation/RecommendationContent.ts +19 -0
  139. package/src/model/BlockVersion.ts +7 -1
  140. 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-m-md ${className}`}>{description}</div>;
11
+ return <div className={`font-normal text-base ${className}`}>{description}</div>;
12
12
  });