@redneckz/wildless-cms-uni-blocks 0.10.0 → 0.10.1

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 (168) hide show
  1. package/bin/migration-scripts/0.9.10.js +30 -0
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +35 -25
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/Footer/FooterContent.d.ts +1 -1
  6. package/bundle/components/ProductBlock/ProductBlockContent.d.ts +1 -2
  7. package/bundle/components/ProductBlock/renderBackwardButton.d.ts +1 -1
  8. package/bundle/components/ProductTile/ProductTileContent.d.ts +1 -1
  9. package/bundle/components/ProductTile/renderImage.d.ts +1 -1
  10. package/bundle/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.d.ts +5 -0
  11. package/bundle/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.d.ts +18 -0
  12. package/bundle/components/Tile/TileContent.d.ts +2 -0
  13. package/dist/components/Blocks.js +2 -0
  14. package/dist/components/Blocks.js.map +1 -1
  15. package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
  16. package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
  17. package/dist/components/Footer/FooterContent.d.ts +1 -1
  18. package/dist/components/Headline/Headline.js +1 -1
  19. package/dist/components/Headline/Headline.js.map +1 -1
  20. package/dist/components/ProductBlock/ProductBlock.js +2 -3
  21. package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
  22. package/dist/components/ProductBlock/ProductBlockContent.d.ts +1 -2
  23. package/dist/components/ProductBlock/ProductBlockInner.js +2 -2
  24. package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
  25. package/dist/components/ProductBlock/renderBackwardButton.d.ts +1 -1
  26. package/dist/components/ProductBlock/renderBackwardButton.js.map +1 -1
  27. package/dist/components/ProductTile/ProductTile.js +4 -2
  28. package/dist/components/ProductTile/ProductTile.js.map +1 -1
  29. package/dist/components/ProductTile/ProductTileContent.d.ts +1 -1
  30. package/dist/components/ProductTile/renderImage.d.ts +1 -1
  31. package/dist/components/ProductTile/renderImage.js +3 -2
  32. package/dist/components/ProductTile/renderImage.js.map +1 -1
  33. package/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.d.ts +5 -0
  34. package/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js +22 -0
  35. package/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js.map +1 -0
  36. package/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.d.ts +18 -0
  37. package/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.js +2 -0
  38. package/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.js.map +1 -0
  39. package/dist/components/Tile/Tile.js +5 -4
  40. package/dist/components/Tile/Tile.js.map +1 -1
  41. package/dist/components/Tile/TileContent.d.ts +2 -0
  42. package/lib/common.css +1 -1
  43. package/lib/components/Blocks.js +2 -0
  44. package/lib/components/Blocks.js.map +1 -1
  45. package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
  46. package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
  47. package/lib/components/Footer/FooterContent.d.ts +1 -1
  48. package/lib/components/Headline/Headline.js +1 -1
  49. package/lib/components/Headline/Headline.js.map +1 -1
  50. package/lib/components/ProductBlock/ProductBlock.fixture.d.ts +0 -1
  51. package/lib/components/ProductBlock/ProductBlock.js +2 -3
  52. package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
  53. package/lib/components/ProductBlock/ProductBlockContent.d.ts +1 -2
  54. package/lib/components/ProductBlock/ProductBlockInner.js +2 -2
  55. package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
  56. package/lib/components/ProductBlock/renderBackwardButton.d.ts +1 -1
  57. package/lib/components/ProductBlock/renderBackwardButton.js.map +1 -1
  58. package/lib/components/ProductTile/ProductTile.js +4 -2
  59. package/lib/components/ProductTile/ProductTile.js.map +1 -1
  60. package/lib/components/ProductTile/ProductTileContent.d.ts +1 -1
  61. package/lib/components/ProductTile/renderImage.d.ts +1 -1
  62. package/lib/components/ProductTile/renderImage.js +3 -2
  63. package/lib/components/ProductTile/renderImage.js.map +1 -1
  64. package/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.d.ts +5 -0
  65. package/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.fixture.d.ts +6 -0
  66. package/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js +20 -0
  67. package/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js.map +1 -0
  68. package/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.d.ts +18 -0
  69. package/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.js +2 -0
  70. package/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.js.map +1 -0
  71. package/lib/components/Tile/Tile.fixture.d.ts +1 -0
  72. package/lib/components/Tile/Tile.js +5 -4
  73. package/lib/components/Tile/Tile.js.map +1 -1
  74. package/lib/components/Tile/TileContent.d.ts +2 -0
  75. package/mobile/bundle/bundle.umd.js +2 -2
  76. package/mobile/bundle/bundle.umd.min.js +1 -1
  77. package/mobile/bundle/components/Footer/FooterContent.d.ts +1 -1
  78. package/mobile/bundle/components/ProductBlock/ProductBlockContent.d.ts +1 -2
  79. package/mobile/bundle/components/ProductBlock/renderBackwardButton.d.ts +1 -1
  80. package/mobile/bundle/components/ProductTile/ProductTileContent.d.ts +1 -1
  81. package/mobile/bundle/components/ProductTile/renderImage.d.ts +1 -1
  82. package/mobile/bundle/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.d.ts +5 -0
  83. package/mobile/bundle/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.d.ts +18 -0
  84. package/mobile/bundle/components/Tile/TileContent.d.ts +2 -0
  85. package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
  86. package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
  87. package/mobile/dist/components/Footer/FooterContent.d.ts +1 -1
  88. package/mobile/dist/components/Headline/Headline.js +1 -1
  89. package/mobile/dist/components/Headline/Headline.js.map +1 -1
  90. package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +1 -2
  91. package/mobile/dist/components/ProductBlock/renderBackwardButton.d.ts +1 -1
  92. package/mobile/dist/components/ProductBlock/renderBackwardButton.js.map +1 -1
  93. package/mobile/dist/components/ProductTile/ProductTile.js +4 -2
  94. package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
  95. package/mobile/dist/components/ProductTile/ProductTileContent.d.ts +1 -1
  96. package/mobile/dist/components/ProductTile/renderImage.d.ts +1 -1
  97. package/mobile/dist/components/ProductTile/renderImage.js +3 -2
  98. package/mobile/dist/components/ProductTile/renderImage.js.map +1 -1
  99. package/mobile/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.d.ts +5 -0
  100. package/mobile/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js +22 -0
  101. package/mobile/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js.map +1 -0
  102. package/mobile/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.d.ts +18 -0
  103. package/mobile/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.js +2 -0
  104. package/mobile/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.js.map +1 -0
  105. package/mobile/dist/components/Tile/Tile.js +5 -4
  106. package/mobile/dist/components/Tile/Tile.js.map +1 -1
  107. package/mobile/dist/components/Tile/TileContent.d.ts +2 -0
  108. package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
  109. package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
  110. package/mobile/lib/components/Footer/FooterContent.d.ts +1 -1
  111. package/mobile/lib/components/Headline/Headline.js +1 -1
  112. package/mobile/lib/components/Headline/Headline.js.map +1 -1
  113. package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +1 -2
  114. package/mobile/lib/components/ProductBlock/renderBackwardButton.d.ts +1 -1
  115. package/mobile/lib/components/ProductBlock/renderBackwardButton.js.map +1 -1
  116. package/mobile/lib/components/ProductTile/ProductTile.js +4 -2
  117. package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
  118. package/mobile/lib/components/ProductTile/ProductTileContent.d.ts +1 -1
  119. package/mobile/lib/components/ProductTile/renderImage.d.ts +1 -1
  120. package/mobile/lib/components/ProductTile/renderImage.js +3 -2
  121. package/mobile/lib/components/ProductTile/renderImage.js.map +1 -1
  122. package/mobile/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.d.ts +5 -0
  123. package/mobile/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js +20 -0
  124. package/mobile/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js.map +1 -0
  125. package/mobile/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.d.ts +18 -0
  126. package/mobile/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.js +2 -0
  127. package/mobile/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.js.map +1 -0
  128. package/mobile/lib/components/Tile/Tile.js +5 -4
  129. package/mobile/lib/components/Tile/Tile.js.map +1 -1
  130. package/mobile/lib/components/Tile/TileContent.d.ts +2 -0
  131. package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +4 -2
  132. package/mobile/src/components/Footer/FooterContent.ts +1 -1
  133. package/mobile/src/components/Headline/Headline.tsx +1 -5
  134. package/mobile/src/components/ProductBlock/ProductBlockContent.ts +0 -2
  135. package/mobile/src/components/ProductBlock/renderBackwardButton.tsx +1 -1
  136. package/mobile/src/components/ProductTile/ProductTile.tsx +11 -6
  137. package/mobile/src/components/ProductTile/ProductTileContent.ts +1 -1
  138. package/mobile/src/components/ProductTile/renderImage.tsx +3 -2
  139. package/mobile/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.example.json +10 -0
  140. package/mobile/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.tsx +82 -0
  141. package/mobile/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.ui.json +20 -0
  142. package/mobile/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.ts +22 -0
  143. package/mobile/src/components/Tile/Tile.example.json +2 -1
  144. package/mobile/src/components/Tile/Tile.tsx +26 -17
  145. package/mobile/src/components/Tile/TileContent.ts +2 -0
  146. package/package.json +2 -2
  147. package/src/components/Blocks.ts +2 -0
  148. package/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +4 -2
  149. package/src/components/Footer/FooterContent.ts +1 -1
  150. package/src/components/Headline/Headline.tsx +1 -5
  151. package/src/components/ProductBlock/ProductBlock.fixture.tsx +14 -22
  152. package/src/components/ProductBlock/ProductBlock.tsx +5 -6
  153. package/src/components/ProductBlock/ProductBlockContent.ts +0 -2
  154. package/src/components/ProductBlock/ProductBlockInner.tsx +21 -25
  155. package/src/components/ProductBlock/renderBackwardButton.tsx +1 -1
  156. package/src/components/ProductTile/ProductTile.fixture.tsx +6 -2
  157. package/src/components/ProductTile/ProductTile.tsx +11 -6
  158. package/src/components/ProductTile/ProductTileContent.ts +1 -1
  159. package/src/components/ProductTile/renderImage.tsx +3 -2
  160. package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.example.json +10 -0
  161. package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.fixture.tsx +37 -0
  162. package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.tsx +82 -0
  163. package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.ui.json +20 -0
  164. package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.ts +22 -0
  165. package/src/components/Tile/Tile.example.json +2 -1
  166. package/src/components/Tile/Tile.fixture.tsx +5 -0
  167. package/src/components/Tile/Tile.tsx +26 -17
  168. package/src/components/Tile/TileContent.ts +2 -0
@@ -0,0 +1,22 @@
1
+ import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
2
+ import type { IconProps } from '../../model/Picture';
3
+ import type { RichTextProps } from '../../ui-kit/RichText/RichTextProps';
4
+ import type { TitleProps } from '../../model/HeadlineType';
5
+ import type { UniBlockContent } from '../../model/JSXBlock';
6
+
7
+ /**
8
+ * @title Блок с информацией о представительстве
9
+ */
10
+ export type RepresentativeOfficeInfoContent = UniBlockContent &
11
+ TitleProps &
12
+ RichTextProps &
13
+ IconProps & {
14
+ /** @title Адрес */
15
+ address?: string;
16
+ /** @title Телефон (факс) */
17
+ telephone?: string;
18
+ /** @title E-mail */
19
+ email?: string;
20
+ /** @title Кнопка */
21
+ button?: ButtonWithIconProps;
22
+ };
@@ -28,6 +28,7 @@
28
28
  "version": "primary"
29
29
  }
30
30
  ],
31
- "version": "primary"
31
+ "version": "primary",
32
+ "directionRight": true
32
33
  }
33
34
  }
@@ -144,4 +144,9 @@ export default {
144
144
  <Tile className="col-span-8" {...TILE} tags={tags} />
145
145
  </div>
146
146
  ),
147
+ 'direction left': (
148
+ <div className="container grid grid-cols-12">
149
+ <Tile className="col-span-8" directionRight={false} {...TILE} />
150
+ </div>
151
+ ),
147
152
  };
@@ -11,6 +11,7 @@ import { BaseTile } from '../BaseTile/BaseTile';
11
11
  import { getTileMinHeight } from '../BaseTile/getTileMinHeight';
12
12
  import { getTileRightPadding } from '../BaseTile/getTileRightPadding';
13
13
  import type { TileContent } from './TileContent';
14
+ import { style } from '../../utils/style';
14
15
 
15
16
  export interface TileProps extends TileContent, UniBlockProps {}
16
17
 
@@ -27,14 +28,21 @@ export const Tile = JSX<TileProps>(
27
28
  className = '',
28
29
  tags,
29
30
  children,
31
+ directionRight = true,
30
32
  ...rest
31
33
  }) => (
32
34
  <BlockWrapper
33
- className={`overflow-hidden p-9 pr-3 box-border ${getTileRightPadding(
35
+ className={style(
36
+ 'flex grow justify-between items-stretch h-full p-9 pr-3 box-border',
37
+ getTileRightPadding(className),
38
+ getTileMinHeight(className),
34
39
  className,
35
- )} ${getTileMinHeight(className)} ${className}`}
40
+ )}
36
41
  {...rest}
37
42
  >
43
+ {image?.src ? (
44
+ <Img className={style('mt-auto ml-7', directionRight ? 'order-2' : '')} image={image} />
45
+ ) : null}
38
46
  <BaseTile
39
47
  title={
40
48
  title ? (
@@ -50,22 +58,23 @@ export const Tile = JSX<TileProps>(
50
58
  className: 'mt-8',
51
59
  buttonClassName: 'min-w-[158px]',
52
60
  })}
53
- image={image?.src ? <Img className="mt-auto ml-7" image={image} /> : null}
54
61
  >
55
- {__html ? (
56
- <div className="max-w-[600px] mt-2.5">
57
- <RichText __html={__html} />
58
- </div>
59
- ) : null}
60
- {children}
61
- <List
62
- className="mt-2.5"
63
- itemClassName="mb-1.5"
64
- items={items}
65
- isDotted={isDotted}
66
- listItemSize={listItemSize}
67
- />
68
- {tags?.length ? <Tags tags={tags} className="mt-5" /> : null}
62
+ <div>
63
+ {__html ? (
64
+ <div className="max-w-[600px] mt-2.5">
65
+ <RichText __html={__html} />
66
+ </div>
67
+ ) : null}
68
+ {children}
69
+ <List
70
+ className="mt-2.5"
71
+ itemClassName="mb-1.5"
72
+ items={items}
73
+ isDotted={isDotted}
74
+ listItemSize={listItemSize}
75
+ />
76
+ {tags?.length ? <Tags tags={tags} className="mt-5" /> : null}
77
+ </div>
69
78
  </BaseTile>
70
79
  </BlockWrapper>
71
80
  ),
@@ -20,4 +20,6 @@ export type TileContent = UniBlockContent &
20
20
  ImageContent &
21
21
  BulletsProps & {
22
22
  listItemSize?: ListItemSize;
23
+ /** @title Картинка справа/текст слева */
24
+ directionRight?: boolean;
23
25
  };