@redneckz/wildless-cms-uni-blocks 0.3.52 → 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 (61) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +4 -4
  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/ProductBlock/ProductBlockContent.d.ts +1 -1
  10. package/dist/components/ProductBlock/ProductBlockInner.js +1 -1
  11. package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
  12. package/dist/ui-kit/List/ListItem.d.ts +1 -0
  13. package/dist/ui-kit/List/ListItem.js +3 -2
  14. package/dist/ui-kit/List/ListItem.js.map +1 -1
  15. package/lib/components/Gallery/Gallery.mobile.js +4 -3
  16. package/lib/components/Gallery/Gallery.mobile.js.map +1 -1
  17. package/lib/components/Gallery/GalleryCardInner.js +4 -4
  18. package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
  19. package/lib/components/Gallery/GalleryContent.d.ts +5 -0
  20. package/lib/components/ProductBlock/ProductBlockContent.d.ts +1 -1
  21. package/lib/components/ProductBlock/ProductBlockInner.js +1 -1
  22. package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
  23. package/lib/ui-kit/List/ListItem.d.ts +1 -0
  24. package/lib/ui-kit/List/ListItem.js +1 -1
  25. package/lib/ui-kit/List/ListItem.js.map +1 -1
  26. package/mobile/bundle/bundle.umd.js +3 -3
  27. package/mobile/bundle/bundle.umd.min.js +1 -1
  28. package/mobile/dist/components/Gallery/Gallery.js +4 -3
  29. package/mobile/dist/components/Gallery/Gallery.js.map +1 -1
  30. package/mobile/dist/components/Gallery/GalleryCardInner.js +4 -4
  31. package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
  32. package/mobile/dist/components/Gallery/GalleryContent.d.ts +5 -0
  33. package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +1 -1
  34. package/mobile/dist/ui-kit/List/ListItem.d.ts +1 -0
  35. package/mobile/dist/ui-kit/List/ListItem.js +3 -2
  36. package/mobile/dist/ui-kit/List/ListItem.js.map +1 -1
  37. package/mobile/lib/components/Gallery/Gallery.js +4 -3
  38. package/mobile/lib/components/Gallery/Gallery.js.map +1 -1
  39. package/mobile/lib/components/Gallery/GalleryCardInner.js +4 -4
  40. package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
  41. package/mobile/lib/components/Gallery/GalleryContent.d.ts +5 -0
  42. package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +1 -1
  43. package/mobile/lib/ui-kit/List/ListItem.d.ts +1 -0
  44. package/mobile/lib/ui-kit/List/ListItem.js +1 -1
  45. package/mobile/lib/ui-kit/List/ListItem.js.map +1 -1
  46. package/mobile/src/components/Gallery/Gallery.example.json +12 -9
  47. package/mobile/src/components/Gallery/Gallery.tsx +4 -2
  48. package/mobile/src/components/Gallery/GalleryCardInner.tsx +4 -3
  49. package/mobile/src/components/Gallery/GalleryContent.ts +5 -0
  50. package/mobile/src/components/ProductBlock/ProductBlockContent.ts +1 -1
  51. package/mobile/src/ui-kit/List/ListItem.tsx +1 -1
  52. package/package.json +1 -1
  53. package/src/components/Gallery/Gallery.example.json +12 -9
  54. package/src/components/Gallery/Gallery.fixture.mobile.tsx +5 -1
  55. package/src/components/Gallery/Gallery.fixture.tsx +10 -0
  56. package/src/components/Gallery/Gallery.mobile.tsx +4 -2
  57. package/src/components/Gallery/GalleryCardInner.tsx +4 -3
  58. package/src/components/Gallery/GalleryContent.ts +5 -0
  59. package/src/components/ProductBlock/ProductBlockContent.ts +1 -1
  60. package/src/components/ProductBlock/ProductBlockInner.tsx +1 -1
  61. package/src/ui-kit/List/ListItem.tsx +1 -1
@@ -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;
@@ -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';
@@ -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',