@redneckz/wildless-cms-uni-blocks 0.2.107 → 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 (152) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +52 -77
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/dist/components/BaseTile/BaseTile.js +7 -4
  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/CreditCalculator/CreditCalculator.js +1 -1
  11. package/dist/components/Gallery/Gallery.d.ts +1 -4
  12. package/dist/components/Gallery/Gallery.js.map +1 -1
  13. package/dist/components/Gallery/Gallery.mobile.d.ts +1 -1
  14. package/dist/components/Gallery/Gallery.mobile.js.map +1 -1
  15. package/dist/components/Gallery/GalleryCardInner.js +1 -1
  16. package/dist/components/Gallery/GalleryContent.d.ts +6 -6
  17. package/dist/components/Gallery/GalleryProps.d.ts +4 -0
  18. package/dist/components/Gallery/GalleryProps.js +2 -0
  19. package/dist/components/Gallery/GalleryProps.js.map +1 -0
  20. package/dist/components/ProductBlock/ProductBlock.mobile.d.ts +2 -2
  21. package/dist/components/ProductTile/ProductTile.d.ts +1 -1
  22. package/dist/components/ProductTile/ProductTile.js +6 -6
  23. package/dist/components/ProductTile/ProductTile.js.map +1 -1
  24. package/dist/components/ProductTile/ProductTileContent.d.ts +4 -1
  25. package/dist/components/StepsBlock/StepsBlock.mobile.d.ts +5 -0
  26. package/dist/components/StepsBlock/StepsBlock.mobile.js +20 -0
  27. package/dist/components/StepsBlock/StepsBlock.mobile.js.map +1 -0
  28. package/dist/components/StepsBlock/StepsBlockContent.d.ts +3 -0
  29. package/dist/components/TariffsTable/TariffsTableCell.js +1 -1
  30. package/dist/components/TariffsTable/TariffsTableCell.js.map +1 -1
  31. package/dist/components/Tile/Tile.js +2 -2
  32. package/dist/components/Tile/Tile.js.map +1 -1
  33. package/dist/index.d.ts +0 -1
  34. package/dist/index.js +1 -3
  35. package/dist/index.js.map +1 -1
  36. package/dist/model/SizeVersion.d.ts +8 -0
  37. package/dist/model/SizeVersion.js +2 -0
  38. package/dist/model/SizeVersion.js.map +1 -0
  39. package/dist/ui-kit/BlockItem/BlockItem.js +16 -8
  40. package/dist/ui-kit/BlockItem/BlockItem.js.map +1 -1
  41. package/dist/ui-kit/BlockItem/BlockItemProps.d.ts +1 -0
  42. package/dist/ui-kit/Button/Button.js +1 -1
  43. package/dist/ui-kit/Icon/IconProps.d.ts +2 -2
  44. package/dist/ui-kit/Icon/IconProps.js +2 -2
  45. package/dist/ui-kit/Icon/IconProps.js.map +1 -1
  46. package/dist/ui-kit/Img.d.ts +2 -2
  47. package/dist/ui-kit/Img.js.map +1 -1
  48. package/dist/ui-kit/Title/Title.d.ts +2 -1
  49. package/dist/ui-kit/Title/Title.js +10 -3
  50. package/dist/ui-kit/Title/Title.js.map +1 -1
  51. package/dist/ui-kit/Title/Title.mobile.d.ts +3 -0
  52. package/dist/ui-kit/Title/Title.mobile.js +18 -0
  53. package/dist/ui-kit/Title/Title.mobile.js.map +1 -0
  54. package/dist/ui-kit/Title/TitleProps.d.ts +1 -7
  55. package/dist/ui-kit/Title/TitleProps.js +0 -8
  56. package/dist/ui-kit/Title/TitleProps.js.map +1 -1
  57. package/lib/common.css +1 -1
  58. package/lib/components/BaseTile/BaseTile.js +7 -4
  59. package/lib/components/BaseTile/BaseTile.js.map +1 -1
  60. package/lib/components/Blocks.d.ts +1 -1
  61. package/lib/components/{MobileBlocks.d.ts → Blocks.mobile.d.ts} +5 -4
  62. package/lib/components/{MobileBlocks.js → Blocks.mobile.js} +7 -5
  63. package/lib/components/Blocks.mobile.js.map +1 -0
  64. package/lib/components/ContentPage/ContentPage.fixture.d.ts +0 -1
  65. package/lib/components/ContentPage/ContentPage.fixture.mobile.d.ts +4 -0
  66. package/lib/components/CreditCalculator/CreditCalculator.js +1 -1
  67. package/lib/components/Gallery/Gallery.d.ts +1 -4
  68. package/lib/components/Gallery/Gallery.fixture.d.ts +0 -1
  69. package/lib/components/Gallery/Gallery.js.map +1 -1
  70. package/lib/components/Gallery/Gallery.mobile.d.ts +1 -1
  71. package/lib/components/Gallery/Gallery.mobile.js.map +1 -1
  72. package/lib/components/Gallery/GalleryCardInner.js +1 -1
  73. package/lib/components/Gallery/GalleryContent.d.ts +6 -6
  74. package/lib/components/Gallery/GalleryProps.d.ts +4 -0
  75. package/lib/components/Gallery/GalleryProps.js +2 -0
  76. package/lib/components/Gallery/GalleryProps.js.map +1 -0
  77. package/lib/components/ProductBlock/ProductBlock.mobile.d.ts +2 -2
  78. package/lib/components/ProductTile/ProductTile.d.ts +1 -1
  79. package/lib/components/ProductTile/ProductTile.js +6 -6
  80. package/lib/components/ProductTile/ProductTile.js.map +1 -1
  81. package/lib/components/ProductTile/ProductTileContent.d.ts +4 -1
  82. package/lib/components/StepsBlock/StepsBlock.fixture.d.ts +3 -1
  83. package/lib/components/StepsBlock/StepsBlock.fixture.mobile.d.ts +8 -0
  84. package/lib/components/StepsBlock/StepsBlock.mobile.d.ts +5 -0
  85. package/lib/components/StepsBlock/StepsBlock.mobile.js +18 -0
  86. package/lib/components/StepsBlock/StepsBlock.mobile.js.map +1 -0
  87. package/lib/components/StepsBlock/StepsBlockContent.d.ts +3 -0
  88. package/lib/components/TariffsTable/TariffsTableCell.js +1 -1
  89. package/lib/components/TariffsTable/TariffsTableCell.js.map +1 -1
  90. package/lib/components/Tile/Tile.js +2 -2
  91. package/lib/components/Tile/Tile.js.map +1 -1
  92. package/lib/index.d.ts +0 -1
  93. package/lib/index.js +0 -1
  94. package/lib/index.js.map +1 -1
  95. package/lib/model/SizeVersion.d.ts +8 -0
  96. package/lib/model/SizeVersion.js +2 -0
  97. package/lib/model/SizeVersion.js.map +1 -0
  98. package/lib/ui-kit/BlockItem/BlockItem.js +16 -8
  99. package/lib/ui-kit/BlockItem/BlockItem.js.map +1 -1
  100. package/lib/ui-kit/BlockItem/BlockItemProps.d.ts +1 -0
  101. package/lib/ui-kit/Button/Button.js +1 -1
  102. package/lib/ui-kit/Icon/IconProps.d.ts +2 -2
  103. package/lib/ui-kit/Icon/IconProps.js +2 -2
  104. package/lib/ui-kit/Icon/IconProps.js.map +1 -1
  105. package/lib/ui-kit/Img.d.ts +2 -2
  106. package/lib/ui-kit/Img.js.map +1 -1
  107. package/lib/ui-kit/Title/Title.d.ts +2 -1
  108. package/lib/ui-kit/Title/Title.js +8 -1
  109. package/lib/ui-kit/Title/Title.js.map +1 -1
  110. package/lib/ui-kit/Title/Title.mobile.d.ts +3 -0
  111. package/lib/ui-kit/Title/Title.mobile.js +16 -0
  112. package/lib/ui-kit/Title/Title.mobile.js.map +1 -0
  113. package/lib/ui-kit/Title/TitleProps.d.ts +1 -7
  114. package/lib/ui-kit/Title/TitleProps.js +1 -7
  115. package/lib/ui-kit/Title/TitleProps.js.map +1 -1
  116. package/package.json +32 -7
  117. package/src/components/BaseTile/BaseTile.tsx +17 -8
  118. package/src/components/{MobileBlocks.ts → Blocks.mobile.ts} +6 -4
  119. package/src/components/ContentPage/ContentPage.fixture.mobile.tsx +19 -0
  120. package/src/components/ContentPage/ContentPage.fixture.tsx +1 -11
  121. package/src/components/CreditCalculator/CreditCalculator.tsx +1 -1
  122. package/src/components/Gallery/Gallery.example.json +0 -13
  123. package/src/components/Gallery/Gallery.fixture.tsx +2 -7
  124. package/src/components/Gallery/Gallery.mobile.tsx +2 -2
  125. package/src/components/Gallery/Gallery.tsx +1 -4
  126. package/src/components/Gallery/GalleryCardInner.tsx +1 -1
  127. package/src/components/Gallery/GalleryContent.ts +6 -6
  128. package/src/components/Gallery/GalleryProps.ts +4 -0
  129. package/src/components/MiniGallery/MiniGallery.example.json +0 -11
  130. package/src/components/ProductBlock/ProductBlock.mobile.tsx +2 -2
  131. package/src/components/ProductTile/ProductTile.fixture.tsx +25 -25
  132. package/src/components/ProductTile/ProductTile.tsx +16 -15
  133. package/src/components/ProductTile/ProductTileContent.ts +4 -1
  134. package/src/components/StepsBlock/StepsBlock.fixture.mobile.tsx +96 -0
  135. package/src/components/StepsBlock/StepsBlock.fixture.tsx +27 -23
  136. package/src/components/StepsBlock/StepsBlock.mobile.tsx +72 -0
  137. package/src/components/StepsBlock/StepsBlockContent.ts +4 -0
  138. package/src/components/TariffsTable/TariffsTable.fixture.tsx +0 -1
  139. package/src/components/TariffsTable/TariffsTableCell.tsx +1 -1
  140. package/src/components/Tile/Tile.tsx +2 -2
  141. package/src/index.ts +0 -1
  142. package/src/model/SizeVersion.ts +8 -0
  143. package/src/ui-kit/BlockItem/BlockItem.tsx +23 -12
  144. package/src/ui-kit/BlockItem/BlockItemProps.ts +1 -0
  145. package/src/ui-kit/Button/Button.tsx +1 -1
  146. package/src/ui-kit/Icon/IconProps.ts +2 -2
  147. package/src/ui-kit/Img.tsx +2 -2
  148. package/src/ui-kit/Title/Title.mobile.tsx +22 -0
  149. package/src/ui-kit/Title/Title.tsx +10 -1
  150. package/src/ui-kit/Title/TitleProps.ts +1 -8
  151. package/dist/components/MobileBlocks.js.map +0 -1
  152. package/lib/components/MobileBlocks.js.map +0 -1
@@ -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,26 +1,30 @@
1
1
  import { context } from '../../setup-fixture';
2
2
  import { StepsBlock } from './StepsBlock';
3
3
 
4
- export default (
5
- <div className="container grid grid-cols-12">
6
- <StepsBlock
7
- className="col-span-12"
8
- context={context}
9
- title="Рассчитайте условия на онлайн-калькуляторе и оставьте заявку на потребительский кредит"
10
- steps={[
11
- {
12
- label: 'Заявка на кредит',
13
- description: 'Оставьте онлайн-заявку на потребительский кредит',
14
- },
15
- {
16
- label: 'В случае одобрения',
17
- description: 'Менеджер свяжется с вами и согласует встречу',
18
- },
19
- {
20
- label: 'Получение наличных',
21
- description: 'Получите наличные в отделении банка',
22
- },
23
- ]}
24
- />
25
- </div>
26
- );
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
+ <div className="container grid grid-cols-12">
22
+ <StepsBlock
23
+ className="col-span-12"
24
+ context={context}
25
+ title="Рассчитайте условия на онлайн-калькуляторе и оставьте заявку на потребительский кредит"
26
+ steps={steps}
27
+ />
28
+ </div>
29
+ ),
30
+ };
@@ -0,0 +1,72 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import type { UniBlockProps } from '../../types';
3
+ import { Icon } from '../../ui-kit/Icon/Icon';
4
+ import { Title } from '../../ui-kit/Title/Title';
5
+ import type { Step, StepsBlockContent } from './StepsBlockContent';
6
+
7
+ export interface StepsBlockProps extends StepsBlockContent, UniBlockProps {}
8
+
9
+ export const StepsBlock = JSX<StepsBlockProps>(
10
+ ({ className, title, description, steps, size = 'normal' }) => {
11
+ return (
12
+ <section
13
+ className={`box-border font-sans text-primary-text bg-white px-20 py-[50px] flex flex-col ${
14
+ className || ''
15
+ }`}
16
+ >
17
+ {title && (
18
+ <Title size="M" className="font-medium m-0 text-center">
19
+ {title}
20
+ </Title>
21
+ )}
22
+ {description && <p className={`text-m-md text-center ${title && 'mt-2'}`}>{description}</p>}
23
+ {steps?.length ? (
24
+ <div className={`box-border py-0.5 mb-0.5 mt-5`}>
25
+ <div className="flex flex-col justify-between gap-x-[101px]">
26
+ {steps.map((step, i, array) => renderStepTitle({ step, size }, i, array))}
27
+ </div>
28
+ </div>
29
+ ) : null}
30
+ </section>
31
+ );
32
+ },
33
+ );
34
+
35
+ const renderStepTitle = ({ step, size }, i: number, array: Step[]) => {
36
+ const isLastStep = array.length - 1 === i;
37
+ const iconAreaSize =
38
+ size === 'normal'
39
+ ? 'h-[70px] w-[70px] min-w-[70px] min-h-[70px]'
40
+ : 'h-[50px] w-[50px] min-w-[50px] min-h-[50px]';
41
+ const iconSize = size === 'normal' ? '38' : '27';
42
+ const margin = size === 'normal' ? 'ml-[34px]' : 'ml-[24px]';
43
+ const iconTextSize = size === 'normal' ? 'text-m-title' : 'text-m-title-xs';
44
+ return (
45
+ <div>
46
+ <div key={String(i)} className="flex flex-row text-center relative">
47
+ <div
48
+ className={`${iconAreaSize} bg-secondary-light rounded-full z-10 mr-3 flex justify-center content-center`}
49
+ >
50
+ <span className={`font-medium text-secondary-text self-center ${iconTextSize}`}>
51
+ {(step.icon && <Icon name={step.icon} width={iconSize} height={iconSize} />) || i + 1}
52
+ </span>
53
+ </div>
54
+ <div className="flex flex-col justify-center relative">
55
+ {step.label && (
56
+ <div className="font-medium text-m-title-xs m-0 text-left">{step.label}</div>
57
+ )}
58
+ {step.description && (
59
+ <div
60
+ className={`font-normal text-sm text-secondary-text text-left ${
61
+ step.label ? 'mt-1' : ''
62
+ }`}
63
+ >
64
+ {step.description}
65
+ </div>
66
+ )}
67
+ </div>
68
+ </div>
69
+ {!isLastStep && <div className={`h-8 w-[2px] bg-secondary-light ${margin}`} />}
70
+ </div>
71
+ );
72
+ };
@@ -1,5 +1,7 @@
1
1
  import type { IconName } from '../../ui-kit/Icon/IconProps';
2
2
 
3
+ import type { SizeVersion } from '../../model/SizeVersion';
4
+
3
5
  /**
4
6
  * @title Шаг
5
7
  */
@@ -17,6 +19,7 @@ export interface Step {
17
19
  export interface StepsBlockContent {
18
20
  /** @title Заголовок */
19
21
  title?: string;
22
+ description?: string; // TODO: mobile content
20
23
  /** @title Линии */
21
24
  showLines?: boolean;
22
25
  /**
@@ -25,4 +28,5 @@ export interface StepsBlockContent {
25
28
  * @maxItems 3
26
29
  */
27
30
  steps?: Step[];
31
+ size?: SizeVersion; // TODO: mobile content
28
32
  }
@@ -106,7 +106,6 @@ const columns: TariffsTableColumn[] = [
106
106
  { label: '69 рублей в месяц' },
107
107
  {
108
108
  list: {
109
- version: 'primary',
110
109
  items: ['item 1', 'item 2', 'item 3'],
111
110
  },
112
111
  },
@@ -39,7 +39,7 @@ const renderCellInner = (
39
39
  <BlockItem
40
40
  key={String(idx)}
41
41
  text={text}
42
- version={list.version ?? 'primary'}
42
+ version={list.version ?? 'secondary'}
43
43
  isDotted={list.isDotted ?? true}
44
44
  />
45
45
  ))}
@@ -15,11 +15,11 @@ const tileStyleMap: Record<BlockVersion, string> = {
15
15
  };
16
16
 
17
17
  export const Tile = JSX<TileProps>((props) => {
18
- const { children, className, version = 'primary', role } = props;
18
+ const { children, className = '', version = 'primary', role } = props;
19
19
 
20
20
  return (
21
21
  <section
22
- className={`font-sans p-9 box-border ${className || ''} ${
22
+ className={`font-sans p-9 box-border ${className} ${
23
23
  tileStyleMap[version]
24
24
  } ${getContainerPaddingRight(className)} ${getContainerMinHeight(className)} `}
25
25
  role={role}
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';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @title Размер
3
+ * @enumNames [
4
+ * "Обычный",
5
+ * "Уменьшенный"
6
+ * ]
7
+ */
8
+ export type SizeVersion = 'normal' | 'small';
@@ -1,25 +1,36 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import type { BlockVersion } from '../../model/BlockVersion';
2
3
  import { BlockItemProps, BlockItemVersion } from './BlockItemProps';
3
4
 
4
- const listStyleMap: Record<BlockItemVersion, string> = {
5
- primary: 'bg-secondary-text w-[6px] h-[6px] min-w-[6px] min-h-[6px] mt-2.5 rounded-full',
6
- secondary: 'bg-white w-[6px] h-[6px] min-w-[6px] min-h-[6px] mt-2.5 rounded-full',
5
+ const LIST_STYLE_CLASSES = 'rounded-full inline-block mr-3';
6
+
7
+ const TEXT_STYLE_MAP: Record<BlockItemVersion, string> = {
8
+ primary: 'text-primary-text',
9
+ secondary: 'text-secondary-text',
7
10
  };
8
11
 
9
- const textStyleMap: Record<BlockItemVersion, string> = {
10
- primary: 'text-secondary-text',
11
- secondary: '',
12
+ const LIST_STYLE_MAP: Record<BlockItemVersion, string> = {
13
+ primary: 'bg-primary-main',
14
+ secondary: 'bg-secondary-text',
12
15
  };
13
16
 
14
17
  export const BlockItem = JSX<BlockItemProps>(
15
- ({ className, isDotted = true, text, children, version = 'primary' }) => {
18
+ ({ className = '', isDotted = true, text, children, version = 'primary', white }) => {
16
19
  return (
17
- <div className={`inline-block flex ${className || ''}`} role="listitem">
18
- {isDotted && <div className={`inline-block mr-3 ${listStyleMap[version]}`} />}
19
- <span className={`text-base font-normal font-sans mr-3 ${textStyleMap[version]}`}>
20
- {text || children}
21
- </span>
20
+ <div className={`font-sans inline-block flex items-baseline ${className}`} role="listitem">
21
+ {isDotted && <div className={getListStyle(version, white)} />}
22
+ <span className={white ? 'text-white' : TEXT_STYLE_MAP[version]}>{text || children}</span>
22
23
  </div>
23
24
  );
24
25
  },
25
26
  );
27
+
28
+ const getListStyle = (version: BlockVersion, white?: boolean) => {
29
+ const color = white ? 'bg-white' : LIST_STYLE_MAP[version];
30
+ const size =
31
+ version === 'primary'
32
+ ? 'w-[8px] h-[8px] min-w-[8px] min-h-[8px] mt-2'
33
+ : 'w-[6px] h-[6px] min-w-[6px] min-h-[6px] mt-2.5';
34
+
35
+ return `${LIST_STYLE_CLASSES} ${color} ${size}`;
36
+ };
@@ -17,6 +17,7 @@ export interface BlockItemContent {
17
17
  export interface BlockItemProps extends BlockItemContent {
18
18
  className?: string;
19
19
  version?: BlockItemVersion;
20
+ white?: boolean;
20
21
  /** @title Маркер */
21
22
  isDotted?: boolean;
22
23
  }
@@ -85,7 +85,7 @@ export const ButtonInner = JSX<ButtonInner>(({ text, aboveText, appendLeft, roun
85
85
  {appendLeft ? appendLeft : null}
86
86
  {!withoutText ? (
87
87
  <div>
88
- <div className="text-xxs text-left">{aboveText}</div>
88
+ <div className="text-2xs text-left">{aboveText}</div>
89
89
  <div className="text-sm font-medium text-left">{text}</div>
90
90
  </div>
91
91
  ) : null}
@@ -61,8 +61,8 @@ export enum IconMap {
61
61
  'UserTickIcon',
62
62
  'VisaIcon',
63
63
  'VKIcon',
64
- 'WalletAdd',
65
- 'WalletAdd2',
64
+ 'WalletAddIcon',
65
+ 'WalletAdd2Icon',
66
66
  'WalletIcon',
67
67
  'WalletWithMoneyIcon',
68
68
  }
@@ -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,11 +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
- }
7
-
8
- export type TitleSize = keyof typeof SizeTableClass;
1
+ export type TitleSize = 'XL' | 'L' | 'M' | 'S' | '2XS' | '3XS';
9
2
 
10
3
  export interface TitleProps extends Partial<HTMLHeadingElement> {
11
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"}