@redneckz/wildless-cms-uni-blocks 0.3.50 → 0.3.53

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 (95) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +9 -61
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/dist/components/Gallery/Gallery.mobile.js +4 -3
  5. package/dist/components/Gallery/Gallery.mobile.js.map +1 -1
  6. package/dist/components/Gallery/GalleryCardInner.js +4 -4
  7. package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
  8. package/dist/components/Gallery/GalleryContent.d.ts +5 -0
  9. package/dist/components/OtherProducts/OtherProductsContent.d.ts +2 -2
  10. package/dist/components/OtherProducts/OtherProductsItem.d.ts +2 -2
  11. package/dist/components/OtherProducts/OtherProductsItem.js +1 -1
  12. package/dist/components/OtherProducts/OtherProductsItem.js.map +1 -1
  13. package/dist/components/ProductBlock/ProductBlockContent.d.ts +1 -1
  14. package/dist/components/ProductBlock/ProductBlockInner.js +1 -1
  15. package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
  16. package/dist/index.d.ts +0 -11
  17. package/dist/index.js +1 -9
  18. package/dist/index.js.map +1 -1
  19. package/dist/ui-kit/List/ListItem.d.ts +1 -0
  20. package/dist/ui-kit/List/ListItem.js +3 -2
  21. package/dist/ui-kit/List/ListItem.js.map +1 -1
  22. package/lib/components/Gallery/Gallery.mobile.js +4 -3
  23. package/lib/components/Gallery/Gallery.mobile.js.map +1 -1
  24. package/lib/components/Gallery/GalleryCardInner.js +4 -4
  25. package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
  26. package/lib/components/Gallery/GalleryContent.d.ts +5 -0
  27. package/lib/components/OtherProducts/OtherProductsContent.d.ts +2 -2
  28. package/lib/components/OtherProducts/OtherProductsItem.d.ts +2 -2
  29. package/lib/components/OtherProducts/OtherProductsItem.js +1 -1
  30. package/lib/components/OtherProducts/OtherProductsItem.js.map +1 -1
  31. package/lib/components/ProductBlock/ProductBlockContent.d.ts +1 -1
  32. package/lib/components/ProductBlock/ProductBlockInner.js +1 -1
  33. package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
  34. package/lib/index.d.ts +0 -11
  35. package/lib/index.js +0 -4
  36. package/lib/index.js.map +1 -1
  37. package/lib/ui-kit/List/ListItem.d.ts +1 -0
  38. package/lib/ui-kit/List/ListItem.js +1 -1
  39. package/lib/ui-kit/List/ListItem.js.map +1 -1
  40. package/mobile/bundle/bundle.umd.js +3 -56
  41. package/mobile/bundle/bundle.umd.min.js +1 -1
  42. package/mobile/dist/components/Gallery/Gallery.js +4 -3
  43. package/mobile/dist/components/Gallery/Gallery.js.map +1 -1
  44. package/mobile/dist/components/Gallery/GalleryCardInner.js +4 -4
  45. package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
  46. package/mobile/dist/components/Gallery/GalleryContent.d.ts +5 -0
  47. package/mobile/dist/components/OtherProducts/OtherProductsContent.d.ts +2 -2
  48. package/mobile/dist/components/OtherProducts/OtherProductsItem.d.ts +2 -2
  49. package/mobile/dist/components/OtherProducts/OtherProductsItem.js +1 -1
  50. package/mobile/dist/components/OtherProducts/OtherProductsItem.js.map +1 -1
  51. package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +1 -1
  52. package/mobile/dist/index.d.ts +0 -11
  53. package/mobile/dist/index.js +1 -9
  54. package/mobile/dist/index.js.map +1 -1
  55. package/mobile/dist/ui-kit/List/ListItem.d.ts +1 -0
  56. package/mobile/dist/ui-kit/List/ListItem.js +3 -2
  57. package/mobile/dist/ui-kit/List/ListItem.js.map +1 -1
  58. package/mobile/lib/components/Gallery/Gallery.js +4 -3
  59. package/mobile/lib/components/Gallery/Gallery.js.map +1 -1
  60. package/mobile/lib/components/Gallery/GalleryCardInner.js +4 -4
  61. package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
  62. package/mobile/lib/components/Gallery/GalleryContent.d.ts +5 -0
  63. package/mobile/lib/components/OtherProducts/OtherProductsContent.d.ts +2 -2
  64. package/mobile/lib/components/OtherProducts/OtherProductsItem.d.ts +2 -2
  65. package/mobile/lib/components/OtherProducts/OtherProductsItem.js +1 -1
  66. package/mobile/lib/components/OtherProducts/OtherProductsItem.js.map +1 -1
  67. package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +1 -1
  68. package/mobile/lib/index.d.ts +0 -11
  69. package/mobile/lib/index.js +0 -4
  70. package/mobile/lib/index.js.map +1 -1
  71. package/mobile/lib/ui-kit/List/ListItem.d.ts +1 -0
  72. package/mobile/lib/ui-kit/List/ListItem.js +1 -1
  73. package/mobile/lib/ui-kit/List/ListItem.js.map +1 -1
  74. package/mobile/src/components/Gallery/Gallery.example.json +12 -9
  75. package/mobile/src/components/Gallery/Gallery.tsx +4 -2
  76. package/mobile/src/components/Gallery/GalleryCardInner.tsx +4 -3
  77. package/mobile/src/components/Gallery/GalleryContent.ts +5 -0
  78. package/mobile/src/components/OtherProducts/OtherProductsContent.ts +2 -2
  79. package/mobile/src/components/OtherProducts/OtherProductsItem.tsx +3 -3
  80. package/mobile/src/components/ProductBlock/ProductBlockContent.ts +1 -1
  81. package/mobile/src/index.ts +0 -26
  82. package/mobile/src/ui-kit/List/ListItem.tsx +1 -1
  83. package/package.json +4 -9
  84. package/src/components/Gallery/Gallery.example.json +12 -9
  85. package/src/components/Gallery/Gallery.fixture.mobile.tsx +5 -1
  86. package/src/components/Gallery/Gallery.fixture.tsx +10 -0
  87. package/src/components/Gallery/Gallery.mobile.tsx +4 -2
  88. package/src/components/Gallery/GalleryCardInner.tsx +4 -3
  89. package/src/components/Gallery/GalleryContent.ts +5 -0
  90. package/src/components/OtherProducts/OtherProductsContent.ts +2 -2
  91. package/src/components/OtherProducts/OtherProductsItem.tsx +3 -3
  92. package/src/components/ProductBlock/ProductBlockContent.ts +1 -1
  93. package/src/components/ProductBlock/ProductBlockInner.tsx +1 -1
  94. package/src/index.ts +0 -26
  95. package/src/ui-kit/List/ListItem.tsx +1 -1
@@ -4,6 +4,8 @@ import type { ButtonCommonProps } from '../../ui-kit/Button/Button';
4
4
  import { Gallery } from './Gallery';
5
5
  import type { GalleryProps } from './GalleryProps';
6
6
 
7
+ const isDotted = true;
8
+
7
9
  const image: Picture = {
8
10
  src: 'money-1.png',
9
11
  format: 'webp',
@@ -46,6 +48,7 @@ export const defaultProps: GalleryProps = {
46
48
  'Время копить: ставка растет в зависимости от срока нахождения средств на Счете!',
47
49
  image,
48
50
  button: buttonPrimary,
51
+ isDotted,
49
52
  items: defaultItems,
50
53
  version: 'secondary',
51
54
  },
@@ -54,6 +57,7 @@ export const defaultProps: GalleryProps = {
54
57
  description: 'Порядок и условия предоставления в соответствии с 106 ФЗ',
55
58
  image,
56
59
  button: buttonPrimaryIcon,
60
+ isDotted,
57
61
  items: defaultItems,
58
62
  },
59
63
  {
@@ -61,6 +65,7 @@ export const defaultProps: GalleryProps = {
61
65
  description: 'Высокий процент даже при небольшой сумме денежных средств',
62
66
  image,
63
67
  button: buttonPrimary,
68
+ isDotted,
64
69
  items: defaultItems,
65
70
  },
66
71
  {
@@ -69,6 +74,7 @@ export const defaultProps: GalleryProps = {
69
74
  'Время копить: ставка растет в зависимости от срока нахождения средств на Счете!',
70
75
  image,
71
76
  button: buttonPrimary,
77
+ isDotted,
72
78
  items: defaultItems,
73
79
  },
74
80
  ],
@@ -117,24 +123,28 @@ const listAndButtonProps: GalleryProps = {
117
123
  title: 'Более 5000 товаров',
118
124
  image,
119
125
  button: buttonPrimary,
126
+ isDotted,
120
127
  items: defaultItems,
121
128
  },
122
129
  {
123
130
  title: 'Более 1000 развлечений',
124
131
  image,
125
132
  button: buttonPrimary,
133
+ isDotted,
126
134
  items: defaultItems,
127
135
  },
128
136
  {
129
137
  title: 'Фермерские продукты',
130
138
  image,
131
139
  button: buttonPrimary,
140
+ isDotted,
132
141
  items: defaultItems,
133
142
  },
134
143
  {
135
144
  title: '«Моя выгода»',
136
145
  image,
137
146
  button: buttonPrimary,
147
+ isDotted,
138
148
  items: defaultItems,
139
149
  },
140
150
  ],
@@ -4,6 +4,7 @@ import type { ListOrientation } from '../../model/ListOrientation';
4
4
  import { Button } from '../../ui-kit/Button/Button';
5
5
  import { Heading } from '../../ui-kit/Heading/Heading';
6
6
  import { Img } from '../../ui-kit/Img/Img';
7
+ import { getListStyle } from '../../ui-kit/List/ListItem';
7
8
  import { SwipeListControl } from '../../ui-kit/SwipeListControl/SwipeListControl';
8
9
  import type { GalleryCard } from './GalleryContent';
9
10
  import { GalleryItem } from './GalleryContent';
@@ -63,7 +64,7 @@ function renderCard(card: GalleryCard, key: number) {
63
64
  ) : null}
64
65
  {card.title ? <h3 className={`font-medium text-m-title-xs m-0`}>{card.title}</h3> : null}
65
66
  {card.description ? renderDescription(card) : null}
66
- {card.items?.length ? renderItems(card.items, card.version) : null}
67
+ {card.items?.length ? renderItems(card.items, card.version, card.isDotted) : null}
67
68
  </div>
68
69
  {card?.button?.text ? renderButton(card.button) : null}
69
70
  </div>
@@ -92,11 +93,12 @@ function renderDescription(card: GalleryCard) {
92
93
  );
93
94
  }
94
95
 
95
- function renderItems(items: GalleryItem[], version: BlockVersion = 'primary') {
96
+ function renderItems(items: GalleryItem[], version: BlockVersion = 'primary', isDotted) {
96
97
  return (
97
98
  <section className="mt-3">
98
99
  {items.map((item, i) => (
99
100
  <div key={String(i)}>
101
+ {isDotted && <div className={getListStyle(version)} />}
100
102
  <span className="text-m-md font-medium">{item.title}</span>
101
103
  <span className={`text-m-sm pl-2 ${version === 'primary' ? 'text-secondary-text' : ''}`}>
102
104
  {item.text}
@@ -6,7 +6,7 @@ import { List } from '../../ui-kit/List/List';
6
6
  import type { GalleryCard, GalleryItem } from './GalleryContent';
7
7
 
8
8
  export const GalleryCardInner = JSX<GalleryCard>(
9
- ({ title, description, image, items, button, version }) => {
9
+ ({ title, description, image, items, button, version, isDotted = true }) => {
10
10
  const titleStyleClasses = getTitleStyle(version);
11
11
  return (
12
12
  <div className="h-full flex flex-col justify-between text-center">
@@ -20,7 +20,7 @@ export const GalleryCardInner = JSX<GalleryCard>(
20
20
  {description ? (
21
21
  <div className={`font-light text-m-md-new ${title ? 'mt-2' : ''}`}>{description}</div>
22
22
  ) : null}
23
- {items?.length ? renderItems(items, version) : null}
23
+ {items?.length ? renderItems(items, version, isDotted) : null}
24
24
  </div>
25
25
  {button?.text ? renderButton(button) : null}
26
26
  </div>
@@ -42,7 +42,7 @@ function renderCardTitle(title: string, className: string) {
42
42
  return <div className={`text-xl m-0 ${className}`}>{title}</div>;
43
43
  }
44
44
 
45
- function renderItems(items: GalleryItem[], version: BlockVersion = 'primary') {
45
+ function renderItems(items: GalleryItem[], version: BlockVersion = 'primary', isDotted: boolean) {
46
46
  return (
47
47
  <List
48
48
  className={`max-w-[308px] mt-2 text-sm ${
@@ -50,6 +50,7 @@ function renderItems(items: GalleryItem[], version: BlockVersion = 'primary') {
50
50
  }`}
51
51
  itemClassName="mt-1 first:mt-0"
52
52
  items={items.filter((item) => item?.text).map((item) => item.text as string)}
53
+ isDotted={isDotted}
53
54
  version={version}
54
55
  />
55
56
  );
@@ -34,6 +34,11 @@ export interface GalleryCard {
34
34
  image?: Picture;
35
35
  /** @title Кнопка */
36
36
  button?: ButtonWithIconProps;
37
+ /**
38
+ * @title Буллиты
39
+ * @default true
40
+ */
41
+ isDotted?: boolean;
37
42
  /** @title Список */
38
43
  items?: GalleryItem[];
39
44
  version?: BlockVersion;
@@ -4,7 +4,7 @@ import type { BlockDef, ColumnsCount } from '../../ui-kit/BlocksList/BlocksListP
4
4
  /**
5
5
  * @title Элемент списка
6
6
  */
7
- export interface blockItemCommonProps {
7
+ export interface BlockItemCommonProps {
8
8
  /**
9
9
  * @title Название
10
10
  * @default Список
@@ -29,6 +29,6 @@ export interface OtherProductsContent {
29
29
  * @title Список
30
30
  * @maxItems 10
31
31
  */
32
- blockItems?: blockItemCommonProps[];
32
+ blockItems?: BlockItemCommonProps[];
33
33
  colorPalette?: ColorPalette;
34
34
  }
@@ -1,11 +1,11 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { useActiveHandler } from './useActiveHandler';
3
2
  import type { UniBlockProps } from '../../types';
4
- import type { blockItemCommonProps } from './OtherProductsContent';
5
3
  import { Icon } from '../../ui-kit/Icon/Icon';
4
+ import type { BlockItemCommonProps } from './OtherProductsContent';
6
5
  import { OtherProductsItemInner } from './OtherProductsItemInner';
6
+ import { useActiveHandler } from './useActiveHandler';
7
7
 
8
- export interface BlockItemProps extends blockItemCommonProps, UniBlockProps {}
8
+ export interface BlockItemProps extends BlockItemCommonProps, UniBlockProps {}
9
9
 
10
10
  export const OtherProductsItem = JSX<BlockItemProps>(
11
11
  ({ label, isExpanded, blocks, columns, context }) => {
@@ -1,11 +1,11 @@
1
1
  import type { BlockVersion } from '../../model/BlockVersion';
2
+ import type { IconVersion } from '../../model/IconVersion';
2
3
  import type { LinkProps } from '../../model/LinkProps';
3
4
  import type { ButtonContent, ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
4
5
  import type { DescriptionContent } from '../../ui-kit/Description/DescriptionContent';
5
6
  import type { HeadingContent, HeadingTypeContent } from '../../ui-kit/Heading/HeadingContent';
6
7
  import type { ImageContent } from '../../ui-kit/Img/ImgProps';
7
8
  import type { ListContent } from '../../ui-kit/List/ListContent';
8
- import type { IconVersion } from '../../model/IconVersion';
9
9
  import type { Benefit } from '../BenefitsBlock/BenefitsBlockContent';
10
10
 
11
11
  export type BenefitItemProps = {
@@ -2,9 +2,9 @@ import { JSX } from '@redneckz/uni-jsx';
2
2
  import type { UniBlockProps } from '../../types';
3
3
  import { ButtonSection } from '../../ui-kit/Button/ButtonSection';
4
4
  import { Description } from '../../ui-kit/Description/Description';
5
+ import { Heading } from '../../ui-kit/Heading/Heading';
5
6
  import { Img } from '../../ui-kit/Img/Img';
6
7
  import { List } from '../../ui-kit/List/List';
7
- import { Heading } from '../../ui-kit/Heading/Heading';
8
8
  import { BaseTile } from '../BaseTile/BaseTile';
9
9
  import type { ProductBlockInnerContent } from './ProductBlockContent';
10
10
  import { renderBenefit } from './renderBenefit';
package/src/index.ts CHANGED
@@ -1,34 +1,8 @@
1
1
  export { setup } from '@redneckz/uni-jsx';
2
2
  export { DaDataAPI } from './api/DaDataAPI';
3
3
  export { LikeAPI } from './api/LikeAPI';
4
- export type { BlockContent } from './components/BlockContent';
5
4
  export { Blocks } from './components/Blocks';
6
5
  export { ContentPage } from './components/ContentPage/ContentPage';
7
- export type { BlockDecorator } from './components/ContentPage/ContentPage';
8
- export type {
9
- AsyncDataHook,
10
- ContentPageContext,
11
- GeolocationHook,
12
- HandlerDecorator,
13
- LikeService,
14
- Router,
15
- Search,
16
- } from './components/ContentPage/ContentPageContext';
17
- export { ContentPageHead } from './components/ContentPage/ContentPageHead';
18
- export { normalizePage } from './components/ContentPage/normalizePage';
19
- export { Header } from './components/Header/Header';
20
- export type { Img, ImgSource, Picture } from './model/Picture';
21
6
  export { projectSettings } from './ProjectSettings';
22
- export type { ProjectSettings } from './ProjectSettings';
23
- export type { SitemapProps as SitemapContent } from './services/sitemap/SitemapProps';
24
- export type {
25
- BlockDef,
26
- ContentPageDef,
27
- ContentPageMeta,
28
- Slot,
29
- SlotsMap,
30
- UniBlockProps,
31
- } from './types';
32
- export { Icon } from './ui-kit/Icon/Icon';
33
7
  export { joinList } from './utils/joinList';
34
8
  export * as url from './utils/url';
@@ -38,7 +38,7 @@ export const ListItem = JSX<ListItemProps>(
38
38
  },
39
39
  );
40
40
 
41
- const getListStyle = (version: ListItemVersion) => {
41
+ export const getListStyle = (version: ListItemVersion) => {
42
42
  const size = {
43
43
  primary: 'w-2 h-2 min-w-2 min-h-2',
44
44
  secondary: 'w-2 h-2 min-w-2 min-h-2',