@redneckz/wildless-cms-uni-blocks 0.2.91 → 0.2.94

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 (284) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +156 -80
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/dist/api/LikeAPI.js +1 -0
  5. package/dist/api/LikeAPI.js.map +1 -1
  6. package/dist/components/Accordion/AccordionContent.d.ts +38 -14
  7. package/dist/components/Accordion/AccordionItem.js +8 -6
  8. package/dist/components/Accordion/AccordionItem.js.map +1 -1
  9. package/dist/components/BaseTile/BaseTile.js +1 -1
  10. package/dist/components/BaseTile/BaseTile.js.map +1 -1
  11. package/dist/components/BlockContent.d.ts +2 -1
  12. package/dist/components/Blocks.d.ts +1 -0
  13. package/dist/components/Blocks.js +2 -0
  14. package/dist/components/Blocks.js.map +1 -1
  15. package/dist/components/ComparisonTable/ComparisonTable.js +12 -10
  16. package/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
  17. package/dist/components/ComparisonTable/ComparisonTableContent.d.ts +0 -18
  18. package/dist/components/ComparisonTable/HeaderCell.js +1 -1
  19. package/dist/components/ComparisonTable/HeaderCell.js.map +1 -1
  20. package/dist/components/ComparisonTable/TableCarouselContainer.d.ts +3 -0
  21. package/dist/components/ComparisonTable/TableCarouselContainer.js +5 -2
  22. package/dist/components/ComparisonTable/TableCarouselContainer.js.map +1 -1
  23. package/dist/components/ComparisonTable/TableRow.js +1 -1
  24. package/dist/components/ComparisonTable/TableRow.js.map +1 -1
  25. package/dist/components/ContentPage/ContentPage.d.ts +9 -1
  26. package/dist/components/ContentPage/ContentPage.js +20 -17
  27. package/dist/components/ContentPage/ContentPage.js.map +1 -1
  28. package/dist/components/ContentPage/ContentPageHead.d.ts +1 -1
  29. package/dist/components/ContentPage/toMobilePage.js +13 -2
  30. package/dist/components/ContentPage/toMobilePage.js.map +1 -1
  31. package/dist/components/CreditCalculator/CreditCalculator.js +1 -1
  32. package/dist/components/CreditCalculator/CreditCalculator.js.map +1 -1
  33. package/dist/components/Footer/Contacts.js +1 -1
  34. package/dist/components/Footer/Contacts.js.map +1 -1
  35. package/dist/components/Footer/FooterContent.d.ts +1 -2
  36. package/dist/components/Footer/HorizontalNavigation.js +1 -1
  37. package/dist/components/Footer/SocialMedia.js +1 -2
  38. package/dist/components/Footer/SocialMedia.js.map +1 -1
  39. package/dist/components/Gallery/GalleryInner.js +2 -2
  40. package/dist/components/Gallery/GalleryInner.js.map +1 -1
  41. package/dist/components/Header/Header.js +3 -3
  42. package/dist/components/Header/Header.js.map +1 -1
  43. package/dist/components/LinkDocs/LinkDocs.js +5 -5
  44. package/dist/components/LinkDocs/LinkDocs.js.map +1 -1
  45. package/dist/components/MiniGallery/MiniGalleryContent.d.ts +1 -2
  46. package/dist/components/MobileBlocks.js +0 -3
  47. package/dist/components/MobileBlocks.js.map +1 -1
  48. package/dist/components/PictureText/PictureTextContent.d.ts +1 -3
  49. package/dist/components/Placeholder/Placeholder.js.map +1 -1
  50. package/dist/components/ProductBlock/ProductBlock.js +1 -1
  51. package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
  52. package/dist/components/ProductBlock/ProductBlock.mobile.js +3 -1
  53. package/dist/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
  54. package/dist/components/ProductBlock/ProductBlockInner.js +2 -5
  55. package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
  56. package/dist/components/ProductGallery/ProductGallery.js +2 -2
  57. package/dist/components/ProductGallery/ProductGallery.js.map +1 -1
  58. package/dist/components/PromoTile/PromoTile.d.ts +1 -1
  59. package/dist/components/PromoTile/PromoTile.js +1 -1
  60. package/dist/components/PromoTile/PromoTile.js.map +1 -1
  61. package/dist/components/TariffsTable/TariffsTable.d.ts +5 -0
  62. package/dist/components/TariffsTable/TariffsTable.js +25 -0
  63. package/dist/components/TariffsTable/TariffsTable.js.map +1 -0
  64. package/dist/components/TariffsTable/TariffsTableCell.d.ts +6 -0
  65. package/dist/components/TariffsTable/TariffsTableCell.js +18 -0
  66. package/dist/components/TariffsTable/TariffsTableCell.js.map +1 -0
  67. package/dist/components/TariffsTable/TariffsTableContent.d.ts +55 -0
  68. package/dist/components/TariffsTable/TariffsTableContent.js +2 -0
  69. package/dist/components/TariffsTable/TariffsTableContent.js.map +1 -0
  70. package/dist/components/TariffsTable/TariffsTableRow.d.ts +8 -0
  71. package/dist/components/TariffsTable/TariffsTableRow.js +13 -0
  72. package/dist/components/TariffsTable/TariffsTableRow.js.map +1 -0
  73. package/dist/components/TariffsTable/constants.d.ts +4 -0
  74. package/dist/components/TariffsTable/constants.js +7 -0
  75. package/dist/components/TariffsTable/constants.js.map +1 -0
  76. package/dist/components/TextBlock/TextBlock.d.ts +1 -1
  77. package/dist/components/TextBlock/TextBlock.js +1 -1
  78. package/dist/components/TextBlock/TextBlock.js.map +1 -1
  79. package/dist/components/TextBlock/TextBlockContent.d.ts +1 -2
  80. package/dist/components/Tile/Tile.d.ts +1 -1
  81. package/dist/components/Tile/Tile.js +14 -2
  82. package/dist/components/Tile/Tile.js.map +1 -1
  83. package/dist/content-page-repository/ContentPageRepository.js +1 -0
  84. package/dist/content-page-repository/ContentPageRepository.js.map +1 -1
  85. package/dist/hooks/useComparisonTableScroll.d.ts +12 -0
  86. package/dist/hooks/useComparisonTableScroll.js +12 -0
  87. package/dist/hooks/useComparisonTableScroll.js.map +1 -0
  88. package/dist/hooks/useLink.js +1 -1
  89. package/dist/hooks/useLink.js.map +1 -1
  90. package/dist/model/TableVersion.d.ts +1 -0
  91. package/dist/model/TableVersion.js +2 -0
  92. package/dist/model/TableVersion.js.map +1 -0
  93. package/dist/types.d.ts +8 -0
  94. package/dist/ui-kit/BlockItem/BlockItem.d.ts +1 -9
  95. package/dist/ui-kit/BlockItem/BlockItem.js +5 -5
  96. package/dist/ui-kit/BlockItem/BlockItem.js.map +1 -1
  97. package/dist/ui-kit/BlockItem/BlockItemProps.d.ts +20 -0
  98. package/dist/ui-kit/BlockItem/BlockItemProps.js +2 -0
  99. package/dist/ui-kit/BlockItem/BlockItemProps.js.map +1 -0
  100. package/dist/ui-kit/Icon/IconProps.d.ts +57 -25
  101. package/dist/ui-kit/Icon/IconProps.js +39 -23
  102. package/dist/ui-kit/Icon/IconProps.js.map +1 -1
  103. package/dist/ui-kit/InputRange/InputRange.js +1 -1
  104. package/dist/ui-kit/InputRange/InputRange.js.map +1 -1
  105. package/dist/ui-kit/SearchBar.js +2 -1
  106. package/dist/ui-kit/SearchBar.js.map +1 -1
  107. package/lib/api/LikeAPI.js +1 -0
  108. package/lib/api/LikeAPI.js.map +1 -1
  109. package/lib/common.css +1 -1
  110. package/lib/components/Accordion/Accordion.fixture.d.ts +1 -4
  111. package/lib/components/Accordion/AccordionContent.d.ts +38 -14
  112. package/lib/components/Accordion/AccordionItem.js +8 -6
  113. package/lib/components/Accordion/AccordionItem.js.map +1 -1
  114. package/lib/components/BaseTile/BaseTile.js +1 -1
  115. package/lib/components/BaseTile/BaseTile.js.map +1 -1
  116. package/lib/components/BlockContent.d.ts +2 -1
  117. package/lib/components/Blocks.d.ts +1 -0
  118. package/lib/components/Blocks.js +2 -0
  119. package/lib/components/Blocks.js.map +1 -1
  120. package/lib/components/ComparisonTable/ComparisonTable.js +12 -10
  121. package/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
  122. package/lib/components/ComparisonTable/ComparisonTableContent.d.ts +0 -18
  123. package/lib/components/ComparisonTable/HeaderCell.js +1 -1
  124. package/lib/components/ComparisonTable/HeaderCell.js.map +1 -1
  125. package/lib/components/ComparisonTable/TableCarouselContainer.d.ts +3 -0
  126. package/lib/components/ComparisonTable/TableCarouselContainer.js +5 -2
  127. package/lib/components/ComparisonTable/TableCarouselContainer.js.map +1 -1
  128. package/lib/components/ComparisonTable/TableRow.js +2 -2
  129. package/lib/components/ComparisonTable/TableRow.js.map +1 -1
  130. package/lib/components/ContentPage/ContentPage.d.ts +9 -1
  131. package/lib/components/ContentPage/ContentPage.js +20 -17
  132. package/lib/components/ContentPage/ContentPage.js.map +1 -1
  133. package/lib/components/ContentPage/ContentPageHead.d.ts +1 -1
  134. package/lib/components/ContentPage/toMobilePage.js +13 -2
  135. package/lib/components/ContentPage/toMobilePage.js.map +1 -1
  136. package/lib/components/CreditCalculator/CreditCalculator.js +1 -1
  137. package/lib/components/CreditCalculator/CreditCalculator.js.map +1 -1
  138. package/lib/components/Footer/Contacts.js +1 -1
  139. package/lib/components/Footer/Contacts.js.map +1 -1
  140. package/lib/components/Footer/FooterContent.d.ts +1 -2
  141. package/lib/components/Footer/HorizontalNavigation.js +1 -1
  142. package/lib/components/Footer/SocialMedia.js +1 -2
  143. package/lib/components/Footer/SocialMedia.js.map +1 -1
  144. package/lib/components/Gallery/GalleryInner.js +2 -2
  145. package/lib/components/Gallery/GalleryInner.js.map +1 -1
  146. package/lib/components/Header/Header.js +3 -3
  147. package/lib/components/Header/Header.js.map +1 -1
  148. package/lib/components/Headline/Headline.fixture.d.ts +3 -2
  149. package/lib/components/LinkDocs/LinkDocs.fixture.d.ts +7 -7
  150. package/lib/components/LinkDocs/LinkDocs.js +5 -5
  151. package/lib/components/LinkDocs/LinkDocs.js.map +1 -1
  152. package/lib/components/MiniGallery/MiniGalleryContent.d.ts +1 -2
  153. package/lib/components/MobileBlocks.js +0 -3
  154. package/lib/components/MobileBlocks.js.map +1 -1
  155. package/lib/components/PictureText/PictureText.fixture.d.ts +2 -0
  156. package/lib/components/PictureText/PictureTextContent.d.ts +1 -3
  157. package/lib/components/Placeholder/Placeholder.js.map +1 -1
  158. package/lib/components/ProductBlock/ProductBlock.js +1 -1
  159. package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
  160. package/lib/components/ProductBlock/ProductBlock.mobile.js +3 -1
  161. package/lib/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
  162. package/lib/components/ProductBlock/ProductBlockInner.js +2 -5
  163. package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
  164. package/lib/components/ProductGallery/ProductGallery.js +2 -2
  165. package/lib/components/ProductGallery/ProductGallery.js.map +1 -1
  166. package/lib/components/PromoTile/PromoTile.d.ts +1 -1
  167. package/lib/components/PromoTile/PromoTile.js +1 -1
  168. package/lib/components/PromoTile/PromoTile.js.map +1 -1
  169. package/lib/components/TariffsTable/TariffsTable.d.ts +5 -0
  170. package/lib/components/TariffsTable/TariffsTable.fixture.d.ts +7 -0
  171. package/lib/components/TariffsTable/TariffsTable.js +23 -0
  172. package/lib/components/TariffsTable/TariffsTable.js.map +1 -0
  173. package/lib/components/TariffsTable/TariffsTableCell.d.ts +6 -0
  174. package/lib/components/TariffsTable/TariffsTableCell.js +16 -0
  175. package/lib/components/TariffsTable/TariffsTableCell.js.map +1 -0
  176. package/lib/components/TariffsTable/TariffsTableContent.d.ts +55 -0
  177. package/lib/components/TariffsTable/TariffsTableContent.js +2 -0
  178. package/lib/components/TariffsTable/TariffsTableContent.js.map +1 -0
  179. package/lib/components/TariffsTable/TariffsTableRow.d.ts +8 -0
  180. package/lib/components/TariffsTable/TariffsTableRow.js +11 -0
  181. package/lib/components/TariffsTable/TariffsTableRow.js.map +1 -0
  182. package/lib/components/TariffsTable/constants.d.ts +4 -0
  183. package/lib/components/TariffsTable/constants.js +5 -0
  184. package/lib/components/TariffsTable/constants.js.map +1 -0
  185. package/lib/components/TextBlock/TextBlock.d.ts +1 -1
  186. package/lib/components/TextBlock/TextBlock.fixture.d.ts +2 -0
  187. package/lib/components/TextBlock/TextBlock.js +1 -1
  188. package/lib/components/TextBlock/TextBlock.js.map +1 -1
  189. package/lib/components/TextBlock/TextBlockContent.d.ts +1 -2
  190. package/lib/components/Tile/Tile.d.ts +1 -1
  191. package/lib/components/Tile/Tile.js +14 -2
  192. package/lib/components/Tile/Tile.js.map +1 -1
  193. package/lib/content-page-repository/ContentPageRepository.js +1 -0
  194. package/lib/content-page-repository/ContentPageRepository.js.map +1 -1
  195. package/lib/hooks/useComparisonTableScroll.d.ts +12 -0
  196. package/lib/hooks/useComparisonTableScroll.js +9 -0
  197. package/lib/hooks/useComparisonTableScroll.js.map +1 -0
  198. package/lib/hooks/useLink.js +1 -1
  199. package/lib/hooks/useLink.js.map +1 -1
  200. package/lib/model/TableVersion.d.ts +1 -0
  201. package/lib/model/TableVersion.js +2 -0
  202. package/lib/model/TableVersion.js.map +1 -0
  203. package/lib/types.d.ts +8 -0
  204. package/lib/ui-kit/BlockItem/BlockItem.d.ts +1 -9
  205. package/lib/ui-kit/BlockItem/BlockItem.fixture.d.ts +6 -1
  206. package/lib/ui-kit/BlockItem/BlockItem.js +5 -5
  207. package/lib/ui-kit/BlockItem/BlockItem.js.map +1 -1
  208. package/lib/ui-kit/BlockItem/BlockItemProps.d.ts +20 -0
  209. package/lib/ui-kit/BlockItem/BlockItemProps.js +2 -0
  210. package/lib/ui-kit/BlockItem/BlockItemProps.js.map +1 -0
  211. package/lib/ui-kit/Icon/IconProps.d.ts +57 -25
  212. package/lib/ui-kit/Icon/IconProps.js +39 -23
  213. package/lib/ui-kit/Icon/IconProps.js.map +1 -1
  214. package/lib/ui-kit/InputRange/InputRange.js +1 -1
  215. package/lib/ui-kit/InputRange/InputRange.js.map +1 -1
  216. package/lib/ui-kit/SearchBar.js +2 -1
  217. package/lib/ui-kit/SearchBar.js.map +1 -1
  218. package/package.json +19 -9
  219. package/src/api/LikeAPI.ts +1 -0
  220. package/src/components/Accordion/Accordion.example.json +18 -42
  221. package/src/components/Accordion/Accordion.fixture.tsx +29 -119
  222. package/src/components/Accordion/AccordionContent.ts +47 -18
  223. package/src/components/Accordion/AccordionItem.tsx +13 -9
  224. package/src/components/BaseTile/BaseTile.tsx +6 -3
  225. package/src/components/BlockContent.ts +2 -0
  226. package/src/components/Blocks.ts +2 -0
  227. package/src/components/ComparisonTable/ComparisonTable.tsx +17 -14
  228. package/src/components/ComparisonTable/ComparisonTableContent.ts +0 -19
  229. package/src/components/ComparisonTable/HeaderCell.tsx +3 -3
  230. package/src/components/ComparisonTable/TableCarouselContainer.tsx +11 -4
  231. package/src/components/ComparisonTable/TableRow.tsx +2 -2
  232. package/src/components/ContentPage/ContentPage.fixture.tsx +3 -3
  233. package/src/components/ContentPage/ContentPage.page.json +426 -22
  234. package/src/components/ContentPage/ContentPage.tsx +71 -36
  235. package/src/components/ContentPage/ContentPageHead.tsx +1 -1
  236. package/src/components/ContentPage/toMobilePage.ts +19 -2
  237. package/src/components/CreditCalculator/CreditCalculator.tsx +1 -1
  238. package/src/components/Footer/Contacts.tsx +1 -1
  239. package/src/components/Footer/FooterContent.ts +1 -1
  240. package/src/components/Footer/HorizontalNavigation.tsx +1 -1
  241. package/src/components/Footer/SocialMedia.tsx +5 -6
  242. package/src/components/Gallery/GalleryInner.tsx +2 -1
  243. package/src/components/Header/Header.tsx +14 -12
  244. package/src/components/Headline/Headline.fixture.tsx +11 -34
  245. package/src/components/LinkDocs/LinkDocs.example.json +26 -0
  246. package/src/components/LinkDocs/LinkDocs.fixture.tsx +13 -13
  247. package/src/components/LinkDocs/LinkDocs.tsx +9 -8
  248. package/src/components/MiniGallery/MiniGalleryContent.ts +1 -1
  249. package/src/components/MobileBlocks.ts +0 -3
  250. package/src/components/PictureText/PictureText.fixture.tsx +20 -20
  251. package/src/components/PictureText/PictureTextContent.ts +1 -3
  252. package/src/components/Placeholder/Placeholder.tsx +2 -2
  253. package/src/components/ProductBlock/ProductBlock.fixture.tsx +1 -0
  254. package/src/components/ProductBlock/ProductBlock.mobile.tsx +1 -0
  255. package/src/components/ProductBlock/ProductBlock.tsx +3 -1
  256. package/src/components/ProductBlock/ProductBlockInner.tsx +9 -12
  257. package/src/components/ProductGallery/ProductGallery.example.json +1 -1
  258. package/src/components/ProductGallery/ProductGallery.fixture.tsx +7 -13
  259. package/src/components/ProductGallery/ProductGallery.tsx +7 -5
  260. package/src/components/PromoTile/PromoTile.tsx +3 -3
  261. package/src/components/TariffsTable/TariffsTable.example.json +87 -0
  262. package/src/components/TariffsTable/TariffsTable.fixture.tsx +195 -0
  263. package/src/components/TariffsTable/TariffsTable.tsx +74 -0
  264. package/src/components/TariffsTable/TariffsTableCell.tsx +64 -0
  265. package/src/components/TariffsTable/TariffsTableContent.ts +61 -0
  266. package/src/components/TariffsTable/TariffsTableRow.tsx +46 -0
  267. package/src/components/TariffsTable/constants.ts +4 -0
  268. package/src/components/TextBlock/TextBlock.example.json +9 -2
  269. package/src/components/TextBlock/TextBlock.fixture.tsx +20 -64
  270. package/src/components/TextBlock/TextBlock.tsx +2 -2
  271. package/src/components/TextBlock/TextBlockContent.ts +1 -2
  272. package/src/components/Tile/Tile.example.json +5 -2
  273. package/src/components/Tile/Tile.tsx +16 -5
  274. package/src/content-page-repository/ContentPageRepository.ts +1 -0
  275. package/src/hooks/useComparisonTableScroll.ts +21 -0
  276. package/src/hooks/useLink.ts +1 -1
  277. package/src/model/TableVersion.ts +1 -0
  278. package/src/types.ts +11 -1
  279. package/src/ui-kit/BlockItem/BlockItem.fixture.tsx +8 -1
  280. package/src/ui-kit/BlockItem/BlockItem.tsx +7 -18
  281. package/src/ui-kit/BlockItem/BlockItemProps.ts +22 -0
  282. package/src/ui-kit/Icon/IconProps.ts +34 -2
  283. package/src/ui-kit/InputRange/InputRange.tsx +2 -2
  284. package/src/ui-kit/SearchBar.tsx +16 -6
@@ -1,8 +1,8 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import type { Picture } from '../../model/Picture';
3
- import type { TextBlockContent, TextBlockVersion } from './TextBlockContent';
4
3
  import type { UniBlockProps } from '../../types';
5
4
  import { Img } from '../../ui-kit/Img';
5
+ import type { TextBlockContent, TextBlockVersion } from './TextBlockContent';
6
6
 
7
7
  export interface TextBlockProps extends TextBlockContent, UniBlockProps {}
8
8
 
@@ -54,7 +54,7 @@ export const TextBlock = JSX<TextBlockProps>(
54
54
 
55
55
  function renderIcon(className: string) {
56
56
  return (
57
- <div className={`pt-1.5 pr-4`}>
57
+ <div className={`pt-1.5 pl-1 pr-4`}>
58
58
  <div className={`rounded-full h-4 w-4 text-center text-xs ${className}`}>i</div>
59
59
  </div>
60
60
  );
@@ -18,9 +18,8 @@ export type TextBlockIconVersion = 'none' | 'small' | 'big';
18
18
  export interface TextBlockContent {
19
19
  /** @title Заголовок */
20
20
  title?: string;
21
- /** @title Описание */
22
21
  description?: string;
23
- blockVersion?: TextBlockVersion;
24
22
  iconVersion?: TextBlockIconVersion;
25
23
  image?: Picture;
24
+ blockVersion?: TextBlockVersion;
26
25
  }
@@ -6,7 +6,9 @@
6
6
  "format": "webp",
7
7
  "size": {
8
8
  "width": 300
9
- }
9
+ },
10
+ "alt": "Описание картинки",
11
+ "title": "Подсказка"
10
12
  },
11
13
  "items": ["Пункт 1", "Пункт 2", "Пункт 3"],
12
14
  "buttons": [
@@ -14,5 +16,6 @@
14
16
  "text": "Подробнее",
15
17
  "version": "primary"
16
18
  }
17
- ]
19
+ ],
20
+ "version": "primary"
18
21
  }
@@ -1,9 +1,9 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { BaseTile } from '../BaseTile/BaseTile';
3
2
  import type { BlockVersion } from '../../model/BlockVersion';
4
- import type { TileContent } from '../Tile/TileContent';
5
3
  import type { UniBlockProps } from '../../types';
6
4
  import { getColSpan } from '../../utils/getColSpan';
5
+ import { BaseTile } from '../BaseTile/BaseTile';
6
+ import type { TileContent } from '../Tile/TileContent';
7
7
 
8
8
  export interface TileProps extends TileContent, UniBlockProps {}
9
9
 
@@ -17,16 +17,16 @@ export const Tile = JSX<TileProps>((props) => {
17
17
 
18
18
  return (
19
19
  <section
20
- className={`font-sans p-9 min-h-[320px] box-border ${className || ''} ${
20
+ className={`font-sans p-9 box-border ${className || ''} ${
21
21
  tileStyleMap[version]
22
- } ${getContainerPaddingRight(className)} `}
22
+ } ${getContainerPaddingRight(className)} ${getContainerMinHeight(className)} `}
23
23
  >
24
24
  <BaseTile {...props}>{children}</BaseTile>
25
25
  </section>
26
26
  );
27
27
  });
28
28
 
29
- function getContainerPaddingRight(className: string = '') {
29
+ function getContainerPaddingRight(className = '') {
30
30
  const colSpan = getColSpan(className);
31
31
  if (colSpan <= 6) {
32
32
  return 'pr-9';
@@ -36,3 +36,14 @@ function getContainerPaddingRight(className: string = '') {
36
36
  return 'pr-[9.4rem]';
37
37
  }
38
38
  }
39
+
40
+ function getContainerMinHeight(className = '') {
41
+ const colSpan = getColSpan(className);
42
+ if (colSpan <= 6) {
43
+ return 'min-h-[300px]';
44
+ } else if (colSpan <= 8) {
45
+ return 'min-h-[320px]';
46
+ } else {
47
+ return 'min-h-[360px]';
48
+ }
49
+ }
@@ -8,6 +8,7 @@ import { transformContentPage } from './transformContentPage';
8
8
  const INDEX_PAGE_SLUG = 'index';
9
9
  const find = util.promisify(glob);
10
10
 
11
+ // eslint-disable-next-line max-lines-per-function
11
12
  export function ContentPageRepository({
12
13
  contentDir = 'content',
13
14
  publicDir = 'public',
@@ -0,0 +1,21 @@
1
+ export const useComparisonTableScroll = <ColData>({
2
+ colData,
3
+ colsLengthForScroll,
4
+ activeCardIndex,
5
+ setActiveCardIndex,
6
+ }: {
7
+ colData: ColData[];
8
+ colsLengthForScroll: number;
9
+ activeCardIndex: number;
10
+ setActiveCardIndex: (_: number) => void;
11
+ }) => {
12
+ const nextClick = () => setActiveCardIndex(activeCardIndex + 1);
13
+ const prevClick = () => setActiveCardIndex(activeCardIndex - 1);
14
+
15
+ const isScrollAvailable = colData?.length && colData.length > colsLengthForScroll;
16
+ const showNextButton =
17
+ isScrollAvailable && colData?.length - activeCardIndex > colsLengthForScroll;
18
+ const showPrevButton = isScrollAvailable && activeCardIndex > 0;
19
+
20
+ return { nextClick, prevClick, isScrollAvailable, showNextButton, showPrevButton };
21
+ };
@@ -2,7 +2,7 @@ import { HandlerDecorator, Router } from '../components/ContentPage/ContentPageC
2
2
  import type { LinkProps } from '../model/LinkProps';
3
3
  import { adjustHref, isURL } from '../utils/url';
4
4
 
5
- const defaultHandlerDecorator: HandlerDecorator = (handler, targetContent) => handler;
5
+ const defaultHandlerDecorator: HandlerDecorator = (handler) => handler;
6
6
 
7
7
  export function useLink(
8
8
  {
@@ -0,0 +1 @@
1
+ export type TableVersion = 'comparison' | 'tariff';
package/src/types.ts CHANGED
@@ -15,6 +15,15 @@ export interface BlockDef {
15
15
  };
16
16
  }
17
17
 
18
+ export interface Slot {
19
+ style?: string[];
20
+ blocks?: BlockDef[];
21
+ }
22
+
23
+ export interface SlotsMap {
24
+ header?: Slot;
25
+ }
26
+
18
27
  export interface ContentPageMeta {
19
28
  title: string;
20
29
  slug: string;
@@ -26,7 +35,8 @@ export interface ContentPageMeta {
26
35
 
27
36
  export interface ContentPageDef extends ContentPageMeta {
28
37
  style?: string[];
29
- blocks?: BlockDef[];
38
+ blocks?: BlockDef[]; //! for compatibility
39
+ slots?: SlotsMap;
30
40
  likeControl?: boolean;
31
41
  colorPalette?: ColorPalette;
32
42
  }
@@ -2,4 +2,11 @@ import '../../setup-fixture';
2
2
 
3
3
  import { BlockItem } from './BlockItem';
4
4
 
5
- export default <BlockItem text="Совершайте любые личные покупки" />;
5
+ export default {
6
+ primary: <BlockItem text="Совершайте любые личные покупки" />,
7
+ 'primary without dot': <BlockItem text="Совершайте любые личные покупки" isDotted={false} />,
8
+ secondary: <BlockItem text="Совершайте любые личные покупки" version="secondary" />,
9
+ 'secondary without dot': (
10
+ <BlockItem text="Совершайте любые личные покупки" isDotted={false} version="secondary" />
11
+ ),
12
+ };
@@ -1,33 +1,22 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
-
3
- type BlockItemVersion = 'primary' | 'secondary';
4
- export interface BlockItemContent {
5
- text?: string;
6
- }
7
-
8
- export interface BlockItemProps extends BlockItemContent {
9
- className?: string;
10
- version?: BlockItemVersion;
11
- }
2
+ import { BlockItemProps, BlockItemVersion } from './BlockItemProps';
12
3
 
13
4
  const listStyleMap: Record<BlockItemVersion, string> = {
14
- primary: 'bg-primary-main',
15
- secondary: 'bg-white',
5
+ primary: 'bg-primary-main w-[8px] h-[8px] min-w-[8px] min-h-[8px] mt-2 rounded-full',
6
+ secondary: 'bg-secondary-text w-[6px] h-[6px] min-w-[6px] min-h-[6px] mt-2.5 rounded-full',
16
7
  };
17
8
 
18
9
  const textStyleMap: Record<BlockItemVersion, string> = {
19
10
  primary: 'text-primary-text',
20
- secondary: 'text-white',
11
+ secondary: 'text-secondary-text',
21
12
  };
22
13
 
23
14
  export const BlockItem = JSX<BlockItemProps>(
24
- ({ className, text, children, version = 'primary' }) => {
15
+ ({ className, isDotted = true, text, children, version = 'primary' }) => {
25
16
  return (
26
17
  <div className={`inline-block flex ${className || ''}`} role="listitem">
27
- <div
28
- className={`inline-block w-[8px] h-[8px] min-w-[8px] min-h-[8px] rounded-full mt-2 ${listStyleMap[version]}`}
29
- ></div>
30
- <span className={`text-base font-normal font-sans mx-3 ${textStyleMap[version]}`}>
18
+ {isDotted && <div className={`inline-block mr-3 ${listStyleMap[version]}`} />}
19
+ <span className={`text-base font-normal font-sans mr-3 ${textStyleMap[version]}`}>
31
20
  {text || children}
32
21
  </span>
33
22
  </div>
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @title Версия списка
3
+ */
4
+ export type BlockItemVersion = 'primary' | 'secondary';
5
+
6
+ /**
7
+ * @title Содержимое элемента блока
8
+ */
9
+ export interface BlockItemContent {
10
+ /** @title Текст */
11
+ text?: string;
12
+ }
13
+
14
+ /**
15
+ * @title Параметры элемента блока
16
+ */
17
+ export interface BlockItemProps extends BlockItemContent {
18
+ className?: string;
19
+ version?: BlockItemVersion;
20
+ /** @title Маркер */
21
+ isDotted?: boolean;
22
+ }
@@ -4,29 +4,45 @@
4
4
  export enum IconMap {
5
5
  'ActualBalanceIcon',
6
6
  'AppleIcon',
7
+ 'CalendarCircleIcon',
7
8
  'CalendarIcon',
9
+ 'CardIcon',
10
+ 'CardPosIcon',
11
+ 'CardTickIcon',
8
12
  'ClockIcon',
9
13
  'ComfortableCompIcon',
10
14
  'DiscountShape',
11
15
  'DocIcon',
12
16
  'DocumentText',
13
17
  'DollarIcon',
18
+ 'EmptyWalletChangeIcon',
14
19
  'EmptyWalletIcon',
15
20
  'EuroIcon',
16
21
  'GlassIcon',
17
22
  'GridIcon',
23
+ 'JCBIcon',
18
24
  'LoupeIcon',
25
+ 'MasterCardIcon',
19
26
  'MinusIcon',
27
+ 'MirIcon',
28
+ 'MoneyIcon',
29
+ 'MonitorMobileIcon',
20
30
  'NewDocIcon',
21
31
  'OkIcon',
22
32
  'PassSendIcon',
23
33
  'PercentageSquareIcon',
24
34
  'PlayMarketIcon',
25
35
  'PlusIcon',
36
+ 'Profile2UserIcon',
26
37
  'ProfileIcon',
38
+ 'ShieldTickIcon',
27
39
  'SignDocsIcon',
28
40
  'TelegramIcon',
41
+ 'UnionPayIcon',
42
+ 'UserIcon',
43
+ 'VisaIcon',
29
44
  'VKIcon',
45
+ 'WalletIcon',
30
46
  }
31
47
 
32
48
  /**
@@ -34,29 +50,45 @@ export enum IconMap {
34
50
  * @enumNames [
35
51
  * "Деньги",
36
52
  * "Лого «Apple»",
53
+ * "Скруглённый календарь",
37
54
  * "Календарь",
55
+ * "Кред. карта",
56
+ * "Кред. карта под наклоном",
57
+ * "Кред. карта с галочкой",
38
58
  * "Часы",
39
59
  * "Кресло",
40
60
  * "Скидка",
41
61
  * "Документ",
42
62
  * "Документ с текстом",
43
63
  * "Доллар",
44
- * "Кошелек",
64
+ * "Пустой кошелёк с возвратом",
65
+ * "Пустой кошелёк",
45
66
  * "Евро",
46
67
  * "Зеркало",
47
68
  * "Сетка",
69
+ * "JCB",
48
70
  * "Лупа",
71
+ * "MasterCard",
49
72
  * "Минус",
73
+ * "МИР",
74
+ * "Деньги",
75
+ * "Монитор и мобильный",
50
76
  * "Новый документ",
51
77
  * "Лого «Одноклассники»",
52
78
  * "Бизнес",
53
79
  * "Проценты",
54
80
  * "Лого «PlayMarket»",
55
81
  * "Плюс",
82
+ * "Профиль, 2 персоны",
56
83
  * "Профиль",
84
+ * "Безопасность",
57
85
  * "Подписанные документы",
58
86
  * "Лого «Telegram»",
59
- * "Лого «VK»"
87
+ * "UnionPay",
88
+ * "Пользователь",
89
+ * "Visa",
90
+ * "Лого «VK»",
91
+ * "Кошелёк",
60
92
  * ]
61
93
  */
62
94
  export type IconName = keyof typeof IconMap;
@@ -24,7 +24,7 @@ export const InputRange = JSX<InputRangeProps>(
24
24
 
25
25
  return (
26
26
  <div className={className}>
27
- <div className="relative">
27
+ <label className="block relative">
28
28
  {title ? (
29
29
  <span className="absolute text-xs text-secondary-text top-1 mt-0.5 pl-4 ml-0.5">
30
30
  {title}
@@ -50,7 +50,7 @@ export const InputRange = JSX<InputRangeProps>(
50
50
  style={inputStyle}
51
51
  />
52
52
  </div>
53
- </div>
53
+ </label>
54
54
  <div className="flex justify-between mt-3 mb-4">
55
55
  {items.map((item, i) => (
56
56
  <span key={String(i)} className="text-xs text-secondary-text pl-4">
@@ -4,6 +4,7 @@ import { Icon } from './Icon/Icon';
4
4
 
5
5
  export const SearchBar = JSX<UniBlockProps>(({ className, context }) => {
6
6
  const { term, setTerm } = context.useSearch();
7
+ const [inputHasFocus, setInputHasFocus] = context.useState<boolean>(false);
7
8
  return (
8
9
  <form className={`relative ${className || ''}`}>
9
10
  <div className="absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none">
@@ -11,22 +12,31 @@ export const SearchBar = JSX<UniBlockProps>(({ className, context }) => {
11
12
  <Icon name="LoupeIcon" width="24" height="24" />
12
13
  </div>
13
14
  {!term && (
14
- <span className="font-sans font-normal text-base text-secondary-text">
15
+ <label
16
+ htmlFor="search-bar-input"
17
+ className="font-sans font-normal text-base text-secondary-text"
18
+ >
15
19
  Поиск по сайту
16
- </span>
20
+ </label>
17
21
  )}
18
22
  </div>
19
23
  <input
20
- className="pl-12 w-full font-sans font-normal text-base text-black border border-solid border-main-divider rounded h-full box-border outline-none pr-[6%]"
24
+ id="search-bar-input"
25
+ className={`${
26
+ inputHasFocus ? 'border-primary-text' : ''
27
+ } pr-32 h-12 pl-12 w-full font-sans font-normal text-base text-black border border-solid border-main-divider rounded h-full box-border outline-none pr-[6%]`}
21
28
  value={term}
22
29
  onChange={(e) => setTerm(e.target.value)}
30
+ onFocus={(e) => setInputHasFocus(true)}
31
+ onBlur={(e) => setInputHasFocus(false)}
23
32
  type="text"
24
- name="s"
33
+ name="search-bar-input"
25
34
  />
26
- {term && (
35
+ {inputHasFocus && (
27
36
  <button
28
37
  type="submit"
29
- className="absolute font-sans font-normal text-sm cursor-pointer bg-transparent hover:bg-primary-hover active:bg-primary-active text-primary-main hover:text-white border-none px-5 py-2 rounded top-1 right-1 outline-none"
38
+ version="primary"
39
+ className="absolute font-sans font-normal cursor-pointer text-sm hover:bg-primary-hover active:bg-primary-active border-none px-9 py-[9px] rounded top-1 right-1 outline-none text-secondary-text text-white bg-primary-main"
30
40
  onClick={(e) => {
31
41
  e.preventDefault();
32
42
  console.log('click');