@redneckz/wildless-cms-uni-blocks 0.2.109 → 0.2.111

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 (113) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +31 -67
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/dist/components/BaseTile/BaseTile.js +6 -3
  5. package/dist/components/BaseTile/BaseTile.js.map +1 -1
  6. package/dist/components/Blocks.d.ts +1 -1
  7. package/dist/components/{MobileBlocks.d.ts → Blocks.mobile.d.ts} +5 -4
  8. package/dist/components/{MobileBlocks.js → Blocks.mobile.js} +11 -9
  9. package/dist/components/Blocks.mobile.js.map +1 -0
  10. package/dist/components/Gallery/Gallery.d.ts +1 -4
  11. package/dist/components/Gallery/Gallery.js.map +1 -1
  12. package/dist/components/Gallery/Gallery.mobile.d.ts +1 -1
  13. package/dist/components/Gallery/Gallery.mobile.js.map +1 -1
  14. package/dist/components/Gallery/GalleryCardInner.js +1 -1
  15. package/dist/components/Gallery/GalleryContent.d.ts +6 -6
  16. package/dist/components/Gallery/GalleryProps.d.ts +4 -0
  17. package/dist/components/Gallery/GalleryProps.js +2 -0
  18. package/dist/components/Gallery/GalleryProps.js.map +1 -0
  19. package/dist/components/ProductBlock/ProductBlock.mobile.d.ts +2 -2
  20. package/dist/components/ProductTile/ProductTile.d.ts +1 -1
  21. package/dist/components/ProductTile/ProductTile.js +6 -6
  22. package/dist/components/ProductTile/ProductTile.js.map +1 -1
  23. package/dist/components/ProductTile/ProductTileContent.d.ts +4 -1
  24. package/dist/components/StepsBlock/StepsBlock.mobile.js +5 -4
  25. package/dist/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
  26. package/dist/index.d.ts +0 -1
  27. package/dist/index.js +1 -3
  28. package/dist/index.js.map +1 -1
  29. package/dist/ui-kit/BlockItem/BlockItem.js +1 -1
  30. package/dist/ui-kit/BlockItem/BlockItem.js.map +1 -1
  31. package/dist/ui-kit/Img.d.ts +2 -2
  32. package/dist/ui-kit/Img.js.map +1 -1
  33. package/dist/ui-kit/Title/Title.d.ts +2 -1
  34. package/dist/ui-kit/Title/Title.js +10 -3
  35. package/dist/ui-kit/Title/Title.js.map +1 -1
  36. package/dist/ui-kit/Title/Title.mobile.d.ts +3 -0
  37. package/dist/ui-kit/Title/Title.mobile.js +18 -0
  38. package/dist/ui-kit/Title/Title.mobile.js.map +1 -0
  39. package/dist/ui-kit/Title/TitleProps.d.ts +1 -10
  40. package/dist/ui-kit/Title/TitleProps.js +0 -11
  41. package/dist/ui-kit/Title/TitleProps.js.map +1 -1
  42. package/lib/common.css +1 -1
  43. package/lib/components/BaseTile/BaseTile.js +6 -3
  44. package/lib/components/BaseTile/BaseTile.js.map +1 -1
  45. package/lib/components/Blocks.d.ts +1 -1
  46. package/lib/components/{MobileBlocks.d.ts → Blocks.mobile.d.ts} +5 -4
  47. package/lib/components/{MobileBlocks.js → Blocks.mobile.js} +7 -5
  48. package/lib/components/Blocks.mobile.js.map +1 -0
  49. package/lib/components/ContentPage/ContentPage.fixture.d.ts +0 -1
  50. package/lib/components/ContentPage/ContentPage.fixture.mobile.d.ts +4 -0
  51. package/lib/components/Gallery/Gallery.d.ts +1 -4
  52. package/lib/components/Gallery/Gallery.fixture.d.ts +0 -1
  53. package/lib/components/Gallery/Gallery.js.map +1 -1
  54. package/lib/components/Gallery/Gallery.mobile.d.ts +1 -1
  55. package/lib/components/Gallery/Gallery.mobile.js.map +1 -1
  56. package/lib/components/Gallery/GalleryCardInner.js +1 -1
  57. package/lib/components/Gallery/GalleryContent.d.ts +6 -6
  58. package/lib/components/Gallery/GalleryProps.d.ts +4 -0
  59. package/lib/components/Gallery/GalleryProps.js +2 -0
  60. package/lib/components/Gallery/GalleryProps.js.map +1 -0
  61. package/lib/components/ProductBlock/ProductBlock.mobile.d.ts +2 -2
  62. package/lib/components/ProductTile/ProductTile.d.ts +1 -1
  63. package/lib/components/ProductTile/ProductTile.js +6 -6
  64. package/lib/components/ProductTile/ProductTile.js.map +1 -1
  65. package/lib/components/ProductTile/ProductTileContent.d.ts +4 -1
  66. package/lib/components/StepsBlock/StepsBlock.fixture.d.ts +0 -5
  67. package/lib/components/StepsBlock/StepsBlock.fixture.mobile.d.ts +8 -0
  68. package/lib/components/StepsBlock/StepsBlock.mobile.js +5 -4
  69. package/lib/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
  70. package/lib/index.d.ts +0 -1
  71. package/lib/index.js +0 -1
  72. package/lib/index.js.map +1 -1
  73. package/lib/ui-kit/BlockItem/BlockItem.js +1 -1
  74. package/lib/ui-kit/BlockItem/BlockItem.js.map +1 -1
  75. package/lib/ui-kit/Img.d.ts +2 -2
  76. package/lib/ui-kit/Img.js.map +1 -1
  77. package/lib/ui-kit/Title/Title.d.ts +2 -1
  78. package/lib/ui-kit/Title/Title.js +8 -1
  79. package/lib/ui-kit/Title/Title.js.map +1 -1
  80. package/lib/ui-kit/Title/Title.mobile.d.ts +3 -0
  81. package/lib/ui-kit/Title/Title.mobile.js +16 -0
  82. package/lib/ui-kit/Title/Title.mobile.js.map +1 -0
  83. package/lib/ui-kit/Title/TitleProps.d.ts +1 -10
  84. package/lib/ui-kit/Title/TitleProps.js +1 -10
  85. package/lib/ui-kit/Title/TitleProps.js.map +1 -1
  86. package/package.json +31 -6
  87. package/src/components/BaseTile/BaseTile.tsx +7 -3
  88. package/src/components/{MobileBlocks.ts → Blocks.mobile.ts} +6 -4
  89. package/src/components/ContentPage/ContentPage.fixture.mobile.tsx +19 -0
  90. package/src/components/ContentPage/ContentPage.fixture.tsx +1 -11
  91. package/src/components/Gallery/Gallery.example.json +0 -13
  92. package/src/components/Gallery/Gallery.fixture.tsx +2 -7
  93. package/src/components/Gallery/Gallery.mobile.tsx +2 -2
  94. package/src/components/Gallery/Gallery.tsx +1 -4
  95. package/src/components/Gallery/GalleryCardInner.tsx +1 -1
  96. package/src/components/Gallery/GalleryContent.ts +6 -6
  97. package/src/components/Gallery/GalleryProps.ts +4 -0
  98. package/src/components/MiniGallery/MiniGallery.example.json +0 -11
  99. package/src/components/ProductBlock/ProductBlock.mobile.tsx +2 -2
  100. package/src/components/ProductTile/ProductTile.fixture.tsx +25 -25
  101. package/src/components/ProductTile/ProductTile.tsx +16 -15
  102. package/src/components/ProductTile/ProductTileContent.ts +4 -1
  103. package/src/components/StepsBlock/StepsBlock.fixture.mobile.tsx +96 -0
  104. package/src/components/StepsBlock/StepsBlock.fixture.tsx +0 -77
  105. package/src/components/StepsBlock/StepsBlock.mobile.tsx +7 -6
  106. package/src/index.ts +0 -1
  107. package/src/ui-kit/BlockItem/BlockItem.tsx +1 -1
  108. package/src/ui-kit/Img.tsx +2 -2
  109. package/src/ui-kit/Title/Title.mobile.tsx +22 -0
  110. package/src/ui-kit/Title/Title.tsx +10 -1
  111. package/src/ui-kit/Title/TitleProps.ts +1 -11
  112. package/dist/components/MobileBlocks.js.map +0 -1
  113. package/lib/components/MobileBlocks.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import { context } from '../../setup-fixture';
2
2
 
3
- import { ProductTile } from './ProductTile';
4
3
  import type { Picture } from '../../model/Picture';
4
+ import { ProductTile } from './ProductTile';
5
5
 
6
6
  const cardWithMoney: Picture = {
7
7
  src: 'card-with-diamond.png',
@@ -31,16 +31,16 @@ export default {
31
31
  description="Потребительский кредит на любые цели, без залога и поручительства"
32
32
  benefits={[
33
33
  {
34
- label: 'Кредитный лимит',
35
- description: 'до 5 млн Р',
34
+ label: 'до 5 млн Р',
35
+ description: 'Кредитный лимит',
36
36
  },
37
37
  {
38
- label: 'Процентная ставка',
39
- description: 'от 12,5%',
38
+ label: 'от 12,5%',
39
+ description: 'Процентная ставка',
40
40
  },
41
41
  {
42
- label: 'Срок кредитования',
43
- description: 'до 5 лет',
42
+ label: 'до 5 лет',
43
+ description: 'Срок кредитования',
44
44
  },
45
45
  ]}
46
46
  buttons={[
@@ -63,16 +63,16 @@ export default {
63
63
  description={'Потребительский кредит на любые цели, без залога и поручительства'}
64
64
  benefits={[
65
65
  {
66
- label: 'Кредитный лимит',
67
- description: 'до 3 млн Р',
66
+ label: 'до 3 млн Р',
67
+ description: 'Кредитный лимит',
68
68
  },
69
69
  {
70
- label: 'Процентная ставка',
71
- description: 'от 12,5%',
70
+ label: 'от 12,5%',
71
+ description: 'Процентная ставка',
72
72
  },
73
73
  {
74
- label: 'Срок кредитования',
75
- description: 'до 3 лет',
74
+ label: 'до 3 лет',
75
+ description: 'Срок кредитования',
76
76
  },
77
77
  ]}
78
78
  buttons={[
@@ -96,16 +96,16 @@ export default {
96
96
  description={'Без переоформления залогой недвижимости на банк'}
97
97
  benefits={[
98
98
  {
99
- label: 'Кредитный лимит',
100
- description: 'до 10 млн Р',
99
+ label: 'до 10 млн Р',
100
+ description: 'Кредитный лимит',
101
101
  },
102
102
  {
103
- label: 'Процентная ставка',
104
- description: 'от 21,5%',
103
+ label: 'от 21,5%',
104
+ description: 'Процентная ставка',
105
105
  },
106
106
  {
107
- label: 'Срок кредитования',
108
- description: 'до 10 лет',
107
+ label: 'до 10 лет',
108
+ description: 'Срок кредитования',
109
109
  },
110
110
  ]}
111
111
  buttons={[
@@ -129,16 +129,16 @@ export default {
129
129
  description={'Для людей в возрасте до 75 лет'}
130
130
  benefits={[
131
131
  {
132
- label: 'Кредитный лимит',
133
- description: 'до 3 млн Р',
132
+ label: 'до 3 млн Р',
133
+ description: 'Кредитный лимит',
134
134
  },
135
135
  {
136
- label: 'Процентная ставка',
137
- description: 'от 16,8%',
136
+ label: 'от 16,8%',
137
+ description: 'Процентная ставка',
138
138
  },
139
139
  {
140
- label: 'Срок кредитования',
141
- description: 'до 5 лет',
140
+ label: 'до 5 лет',
141
+ description: 'Срок кредитования',
142
142
  },
143
143
  ]}
144
144
  buttons={[
@@ -1,9 +1,9 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import type { Benefit } from '../BenefitsBlock/BenefitsBlockContent';
3
2
  import type { BlockVersion } from '../../model/BlockVersion';
4
- import type { ProductTileContent } from './ProductTileContent';
5
- import { Tile } from '../Tile/Tile';
6
3
  import type { UniBlockProps } from '../../types';
4
+ import type { Benefit } from '../BenefitsBlock/BenefitsBlockContent';
5
+ import { Tile } from '../Tile/Tile';
6
+ import type { ProductTileContent } from './ProductTileContent';
7
7
 
8
8
  export interface ProductTileProps extends ProductTileContent, UniBlockProps {}
9
9
 
@@ -12,31 +12,32 @@ export const ProductTile = JSX<ProductTileProps>((props) => {
12
12
  return (
13
13
  <Tile {...props}>
14
14
  <div className="flex mt-5 mb-1">
15
+ {benefits?.length ? <div className="mr-8">{benefits.map(renderBenefitLabel)}</div> : null}
15
16
  {benefits?.length ? (
16
- <div className="mr-8">{benefits.map(renderBenefitDescription)}</div>
17
- ) : null}
18
- {benefits?.length ? (
19
- <div className="pt-1">{benefits.map((_, i) => renderBenefitLabel(_, i, version))}</div>
17
+ <div className="pt-1">
18
+ {benefits.map((_, i) => renderBenefitDescription(_, i, version))}
19
+ </div>
20
20
  ) : null}
21
21
  </div>
22
22
  </Tile>
23
23
  );
24
24
  });
25
25
 
26
- function renderBenefitLabel(benefit: Benefit, i: number, version = 'primary') {
27
- const labelStyleMap: Record<BlockVersion, string> = {
28
- primary: 'text-secondary-text',
29
- secondary: 'text-white',
30
- };
26
+ function renderBenefitLabel(benefit: Benefit, i: number) {
31
27
  return (
32
- <div key={String(i)} className={`text-sm ${i ? 'mt-4' : ''} ${labelStyleMap[version]}`}>
28
+ <div key={String(i)} className={`text-xl font-medium ${i ? 'mt-2.5' : ''}`}>
33
29
  {benefit.label}
34
30
  </div>
35
31
  );
36
32
  }
37
- function renderBenefitDescription(benefit: Benefit, i: number) {
33
+
34
+ function renderBenefitDescription(benefit: Benefit, i: number, version = 'primary') {
35
+ const labelStyleMap: Record<BlockVersion, string> = {
36
+ primary: 'text-secondary-text',
37
+ secondary: 'text-white',
38
+ };
38
39
  return (
39
- <div key={String(i)} className={`text-xl font-medium ${i ? 'mt-2.5' : ''}`}>
40
+ <div key={String(i)} className={`text-sm ${i ? 'mt-4' : ''} ${labelStyleMap[version]}`}>
40
41
  {benefit.description}
41
42
  </div>
42
43
  );
@@ -5,6 +5,9 @@ import type { Benefit } from '../BenefitsBlock/BenefitsBlockContent';
5
5
  * @title Продуктовая плитка
6
6
  */
7
7
  export interface ProductTileContent extends Omit<BaseTileCommonProps, 'align'> {
8
- /** @title Преимущества */
8
+ /**
9
+ * @title Преимущества
10
+ * @maxItems 7
11
+ */
9
12
  benefits?: Omit<Benefit, 'icon'>[];
10
13
  }
@@ -0,0 +1,96 @@
1
+ import { context } from '../../setup-fixture';
2
+ import { StepsBlock } from './StepsBlock';
3
+
4
+ const steps = [
5
+ {
6
+ label: 'Заявка на кредит',
7
+ description: 'Оставьте онлайн-заявку на потребительский кредит',
8
+ },
9
+ {
10
+ label: 'В случае одобрения',
11
+ description: 'Менеджер свяжется с вами и согласует встречу',
12
+ },
13
+ {
14
+ label: 'Получение наличных',
15
+ description: 'Получите наличные в отделении банка',
16
+ },
17
+ ];
18
+
19
+ export default {
20
+ default: (
21
+ <StepsBlock
22
+ context={context}
23
+ title="Рассчитайте условия на онлайн-калькуляторе и оставьте заявку на потребительский кредит"
24
+ description="Откройте мультивалютный вклад, чтобы распределить свои вложения"
25
+ size="normal"
26
+ steps={steps}
27
+ />
28
+ ),
29
+ 'only desc': (
30
+ <StepsBlock
31
+ context={context}
32
+ description="Откройте мультивалютный вклад, чтобы распределить свои вложения"
33
+ size="normal"
34
+ steps={steps}
35
+ />
36
+ ),
37
+
38
+ small: (
39
+ <StepsBlock
40
+ context={context}
41
+ title="Рассчитайте условия на онлайн-калькуляторе и оставьте заявку на потребительский кредит"
42
+ size="small"
43
+ steps={steps}
44
+ />
45
+ ),
46
+
47
+ 'small multi-options': (
48
+ <StepsBlock
49
+ context={context}
50
+ title="Рассчитайте условия на онлайн-калькуляторе и оставьте заявку на потребительский кредит"
51
+ description="Откройте мультивалютный вклад, чтобы распределить свои вложения"
52
+ size="small"
53
+ steps={[
54
+ {
55
+ description: 'Оставьте онлайн-заявку на потребительский кредит',
56
+ icon: 'ClockIcon',
57
+ },
58
+ {
59
+ label: 'В случае одобрения',
60
+ icon: 'SignDocsIcon',
61
+ },
62
+ {
63
+ label: 'Заявка на кредит',
64
+ description: 'Оставьте онлайн-заявку на потребительский кредит',
65
+ icon: 'ComfortableCompIcon',
66
+ },
67
+ {
68
+ label: 'Получение наличных',
69
+ icon: 'ClockIcon',
70
+ },
71
+ ]}
72
+ />
73
+ ),
74
+
75
+ 'small icons': (
76
+ <StepsBlock
77
+ context={context}
78
+ title="Рассчитайте условия на онлайн-калькуляторе и оставьте заявку на потребительский кредит"
79
+ size="small"
80
+ steps={[
81
+ {
82
+ label: 'Заявка на кредит',
83
+ icon: 'EmptyWalletIcon',
84
+ },
85
+ {
86
+ label: 'В случае одобрения',
87
+ icon: 'PercentageSquareIcon',
88
+ },
89
+ {
90
+ label: 'Получение наличных',
91
+ icon: 'CalendarIcon',
92
+ },
93
+ ]}
94
+ />
95
+ ),
96
+ };
@@ -1,6 +1,5 @@
1
1
  import { context } from '../../setup-fixture';
2
2
  import { StepsBlock } from './StepsBlock';
3
- import { StepsBlock as StepsBlockMobile } from './StepsBlock.mobile';
4
3
 
5
4
  const steps = [
6
5
  {
@@ -28,80 +27,4 @@ export default {
28
27
  />
29
28
  </div>
30
29
  ),
31
- mobile: (
32
- <StepsBlockMobile
33
- context={context}
34
- title="Рассчитайте условия на онлайн-калькуляторе и оставьте заявку на потребительский кредит"
35
- description="Откройте мультивалютный вклад, чтобы распределить свои вложения"
36
- size="normal"
37
- steps={steps}
38
- />
39
- ),
40
- 'mobile only desc': (
41
- <StepsBlockMobile
42
- context={context}
43
- description="Откройте мультивалютный вклад, чтобы распределить свои вложения"
44
- size="normal"
45
- steps={steps}
46
- />
47
- ),
48
-
49
- 'mobile small': (
50
- <StepsBlockMobile
51
- context={context}
52
- title="Рассчитайте условия на онлайн-калькуляторе и оставьте заявку на потребительский кредит"
53
- size="small"
54
- steps={steps}
55
- />
56
- ),
57
-
58
- 'mobile small multi-options': (
59
- <StepsBlockMobile
60
- context={context}
61
- title="Рассчитайте условия на онлайн-калькуляторе и оставьте заявку на потребительский кредит"
62
- description="Откройте мультивалютный вклад, чтобы распределить свои вложения"
63
- size="small"
64
- steps={[
65
- {
66
- description: 'Оставьте онлайн-заявку на потребительский кредит',
67
- icon: 'ClockIcon',
68
- },
69
- {
70
- label: 'В случае одобрения',
71
- icon: 'SignDocsIcon',
72
- },
73
- {
74
- label: 'Заявка на кредит',
75
- description: 'Оставьте онлайн-заявку на потребительский кредит',
76
- icon: 'ComfortableCompIcon',
77
- },
78
- {
79
- label: 'Получение наличных',
80
- icon: 'ClockIcon',
81
- },
82
- ]}
83
- />
84
- ),
85
-
86
- 'mobile small icons': (
87
- <StepsBlockMobile
88
- context={context}
89
- title="Рассчитайте условия на онлайн-калькуляторе и оставьте заявку на потребительский кредит"
90
- size="small"
91
- steps={[
92
- {
93
- label: 'Заявка на кредит',
94
- icon: 'EmptyWalletIcon',
95
- },
96
- {
97
- label: 'В случае одобрения',
98
- icon: 'PercentageSquareIcon',
99
- },
100
- {
101
- label: 'Получение наличных',
102
- icon: 'CalendarIcon',
103
- },
104
- ]}
105
- />
106
- ),
107
30
  };
@@ -7,7 +7,7 @@ import type { Step, StepsBlockContent } from './StepsBlockContent';
7
7
  export interface StepsBlockProps extends StepsBlockContent, UniBlockProps {}
8
8
 
9
9
  export const StepsBlock = JSX<StepsBlockProps>(
10
- ({ className, title, description, showLines = true, steps, size = 'normal' }) => {
10
+ ({ className, title, description, steps, size = 'normal' }) => {
11
11
  return (
12
12
  <section
13
13
  className={`box-border font-sans text-primary-text bg-white px-20 py-[50px] flex flex-col ${
@@ -15,11 +15,11 @@ export const StepsBlock = JSX<StepsBlockProps>(
15
15
  }`}
16
16
  >
17
17
  {title && (
18
- <Title size="3XS" className="font-medium m-0 text-center">
18
+ <Title size="M" className="font-medium m-0 text-center">
19
19
  {title}
20
20
  </Title>
21
21
  )}
22
- {description && <p className={`text-md text-center ${title && 'mt-2'}`}>{description}</p>}
22
+ {description && <p className={`text-m-md text-center ${title && 'mt-2'}`}>{description}</p>}
23
23
  {steps?.length ? (
24
24
  <div className={`box-border py-0.5 mb-0.5 mt-5`}>
25
25
  <div className="flex flex-col justify-between gap-x-[101px]">
@@ -32,7 +32,7 @@ export const StepsBlock = JSX<StepsBlockProps>(
32
32
  },
33
33
  );
34
34
 
35
- const renderStepTitle = ({ step: step, size: size }, i: number, array: Step[]) => {
35
+ const renderStepTitle = ({ step, size }, i: number, array: Step[]) => {
36
36
  const isLastStep = array.length - 1 === i;
37
37
  const iconAreaSize =
38
38
  size === 'normal'
@@ -40,19 +40,20 @@ const renderStepTitle = ({ step: step, size: size }, i: number, array: Step[]) =
40
40
  : 'h-[50px] w-[50px] min-w-[50px] min-h-[50px]';
41
41
  const iconSize = size === 'normal' ? '38' : '27';
42
42
  const margin = size === 'normal' ? 'ml-[34px]' : 'ml-[24px]';
43
+ const iconTextSize = size === 'normal' ? 'text-m-title' : 'text-m-title-xs';
43
44
  return (
44
45
  <div>
45
46
  <div key={String(i)} className="flex flex-row text-center relative">
46
47
  <div
47
48
  className={`${iconAreaSize} bg-secondary-light rounded-full z-10 mr-3 flex justify-center content-center`}
48
49
  >
49
- <span className="font-medium text-title-xs text-secondary-text self-center">
50
+ <span className={`font-medium text-secondary-text self-center ${iconTextSize}`}>
50
51
  {(step.icon && <Icon name={step.icon} width={iconSize} height={iconSize} />) || i + 1}
51
52
  </span>
52
53
  </div>
53
54
  <div className="flex flex-col justify-center relative">
54
55
  {step.label && (
55
- <div className="font-medium text-mobile-md m-0 text-left">{step.label}</div>
56
+ <div className="font-medium text-m-title-xs m-0 text-left">{step.label}</div>
56
57
  )}
57
58
  {step.description && (
58
59
  <div
package/src/index.ts CHANGED
@@ -17,7 +17,6 @@ export type {
17
17
  export { ContentPageHead } from './components/ContentPage/ContentPageHead';
18
18
  export { toMobilePage } from './components/ContentPage/toMobilePage';
19
19
  export { Header } from './components/Header/Header';
20
- export { MobileBlocks } from './components/MobileBlocks';
21
20
  export type { Img, ImgSource, Picture } from './model/Picture';
22
21
  export { projectSettings } from './ProjectSettings';
23
22
  export type { ProjectSettings } from './ProjectSettings';
@@ -17,7 +17,7 @@ const LIST_STYLE_MAP: Record<BlockItemVersion, string> = {
17
17
  export const BlockItem = JSX<BlockItemProps>(
18
18
  ({ className = '', isDotted = true, text, children, version = 'primary', white }) => {
19
19
  return (
20
- <div className={`font-sans inline-block flex ${className}`} role="listitem">
20
+ <div className={`font-sans inline-block flex items-baseline ${className}`} role="listitem">
21
21
  {isDotted && <div className={getListStyle(version, white)} />}
22
22
  <span className={white ? 'text-white' : TEXT_STYLE_MAP[version]}>{text || children}</span>
23
23
  </div>
@@ -1,12 +1,12 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import type { ImgSource, Picture } from '../model/Picture';
3
3
 
4
- export interface TextWithImageProps {
4
+ export interface ImageProps {
5
5
  className?: string;
6
6
  image: Picture;
7
7
  }
8
8
 
9
- export const Img = JSX<TextWithImageProps>(({ className, image: { size, ...image } }) => {
9
+ export const Img = JSX<ImageProps>(({ className, image: { size, ...image } }) => {
10
10
  const style = {
11
11
  width: size?.width ? `${size?.width}px` : '100%',
12
12
  height: size?.height ? `${size?.height}px` : '100%',
@@ -0,0 +1,22 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { TitleSize, TitleProps } from './TitleProps';
3
+
4
+ export const SizeTableClass: Record<TitleSize, string> = {
5
+ XL: 'text-m-title',
6
+ L: 'text-m-title',
7
+ M: 'text-m-title-md',
8
+ S: 'text-m-title-xs',
9
+ '2XS': 'text-m-title-xs',
10
+ '3XS': 'text-m-title-xs',
11
+ };
12
+
13
+ export const Title = JSX<TitleProps>(({ size = 'L', className, children, ...rest }) => {
14
+ const Tag = size === 'XL' || size === 'L' ? 'h1' : 'h2';
15
+ return (
16
+ <Tag className={getClasses(SizeTableClass[size], className)} {...rest}>
17
+ {children}
18
+ </Tag>
19
+ );
20
+ });
21
+
22
+ const getClasses = (...classes: (string | undefined)[]) => classes.filter(Boolean).join(' ');
@@ -1,5 +1,14 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { SizeTableClass, TitleProps } from './TitleProps';
2
+ import { TitleSize, TitleProps } from './TitleProps';
3
+
4
+ export const SizeTableClass: Record<TitleSize, string> = {
5
+ XL: 'text-title-lg',
6
+ L: 'text-title',
7
+ M: 'text-title-sm',
8
+ S: 'text-title-xs',
9
+ '2XS': 'text-title-2xs',
10
+ '3XS': 'text-title-2xs',
11
+ };
3
12
 
4
13
  export const Title = JSX<TitleProps>(({ size = 'L', className, children, ...rest }) => {
5
14
  const Tag = size === 'XL' ? 'h1' : 'h2';
@@ -1,14 +1,4 @@
1
- export enum SizeTableClass {
2
- 'XL' = 'text-title-lg',
3
- 'L' = 'text-title',
4
- 'M' = 'text-title-sm',
5
- 'S' = 'text-title-xs',
6
- 'XS' = 'text-title-xs',
7
- '2XS' = 'text-title-2xs',
8
- '3XS' = 'text-title-3xs',
9
- }
10
-
11
- export type TitleSize = keyof typeof SizeTableClass;
1
+ export type TitleSize = 'XL' | 'L' | 'M' | 'S' | '2XS' | '3XS';
12
2
 
13
3
  export interface TitleProps extends Partial<HTMLHeadingElement> {
14
4
  size?: TitleSize;
@@ -1 +0,0 @@
1
- {"version":3,"file":"MobileBlocks.js","sourceRoot":"","sources":["../../src/components/MobileBlocks.ts"],"names":[],"mappings":";;AAAA,0EAAuE;AACvE,0DAAgD;AAChD,6DAAmD;AACnD,4CAAyC;AACzC,kDAA+C;AAC/C,iEAA8D;AAC9D,wDAAqD;AACrD,2DAAwD;AACxD,2DAAwD;AACxD,4EAAkE;AAClE,2DAAwD;AACxD,qDAAkD;AAClD,sCAAmC;AAEtB,QAAA,YAAY,GAAG;IAC1B,gBAAgB,EAAhB,mCAAgB;IAChB,MAAM,EAAN,sBAAM;IACN,OAAO,EAAP,wBAAO;IACP,MAAM,EAAN,eAAM;IACN,QAAQ,EAAR,mBAAQ;IACR,aAAa,EAAb,6BAAa;IACb,WAAW,EAAX,yBAAW;IACX,WAAW,EAAX,yBAAW;IACX,YAAY,EAAZ,kCAAY;IACZ,WAAW,EAAX,yBAAW;IACX,SAAS,EAAT,qBAAS;IACT,IAAI,EAAJ,WAAI;IACJ,UAAU,EAAV,uBAAU;CACX,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"MobileBlocks.js","sourceRoot":"","sources":["../../src/components/MobileBlocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,gBAAgB;IAChB,MAAM;IACN,OAAO;IACP,MAAM;IACN,QAAQ;IACR,aAAa;IACb,WAAW;IACX,WAAW;IACX,YAAY;IACZ,WAAW;IACX,SAAS;IACT,IAAI;IACJ,UAAU;CACX,CAAC"}