@redneckz/wildless-cms-uni-blocks 0.14.112 → 0.14.114

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 (125) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +13 -12
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/dist/components/Blocks.js +0 -2
  5. package/dist/components/Blocks.js.map +1 -1
  6. package/dist/components/CarouselLinks/CarouselLinks.js +3 -1
  7. package/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
  8. package/dist/components/ComparisonTable/ComparisonTable.mobile.js +2 -2
  9. package/dist/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
  10. package/dist/hooks/useIntersectionObserver.js +1 -1
  11. package/dist/hooks/useIntersectionObserver.js.map +1 -1
  12. package/dist/ui-kit/BaseTile/BaseTile.js +2 -2
  13. package/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
  14. package/dist/ui-kit/Pagination/PaginationContainer.js +1 -1
  15. package/dist/ui-kit/Pagination/PaginationContainer.js.map +1 -1
  16. package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +3 -1
  17. package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  18. package/dist/utils/jaroWinklerDistance.js +2 -2
  19. package/dist/utils/jaroWinklerDistance.js.map +1 -1
  20. package/lib/common.css +1 -1
  21. package/lib/components/Blocks.js +0 -2
  22. package/lib/components/Blocks.js.map +1 -1
  23. package/lib/components/CarouselLinks/CarouselLinks.js +3 -1
  24. package/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
  25. package/lib/components/ComparisonTable/ComparisonTable.mobile.js +2 -2
  26. package/lib/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
  27. package/lib/hooks/useIntersectionObserver.js +1 -1
  28. package/lib/hooks/useIntersectionObserver.js.map +1 -1
  29. package/lib/ui-kit/BaseTile/BaseTile.js +2 -2
  30. package/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
  31. package/lib/ui-kit/Pagination/PaginationContainer.js +1 -1
  32. package/lib/ui-kit/Pagination/PaginationContainer.js.map +1 -1
  33. package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +3 -1
  34. package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  35. package/lib/utils/jaroWinklerDistance.js +2 -2
  36. package/lib/utils/jaroWinklerDistance.js.map +1 -1
  37. package/mobile/bundle/bundle.umd.js +11 -9
  38. package/mobile/bundle/bundle.umd.min.js +1 -1
  39. package/mobile/dist/components/ComparisonTable/ComparisonTable.js +2 -2
  40. package/mobile/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
  41. package/mobile/dist/hooks/useIntersectionObserver.js +1 -1
  42. package/mobile/dist/hooks/useIntersectionObserver.js.map +1 -1
  43. package/mobile/dist/ui-kit/BaseTile/BaseTile.js +2 -2
  44. package/mobile/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
  45. package/mobile/dist/ui-kit/Pagination/PaginationContainer.js +1 -1
  46. package/mobile/dist/ui-kit/Pagination/PaginationContainer.js.map +1 -1
  47. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +3 -1
  48. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  49. package/mobile/dist/utils/jaroWinklerDistance.js +2 -2
  50. package/mobile/dist/utils/jaroWinklerDistance.js.map +1 -1
  51. package/mobile/lib/common.css +1 -1
  52. package/mobile/lib/components/ComparisonTable/ComparisonTable.js +2 -2
  53. package/mobile/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
  54. package/mobile/lib/hooks/useIntersectionObserver.js +1 -1
  55. package/mobile/lib/hooks/useIntersectionObserver.js.map +1 -1
  56. package/mobile/lib/ui-kit/BaseTile/BaseTile.js +2 -2
  57. package/mobile/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
  58. package/mobile/lib/ui-kit/Pagination/PaginationContainer.js +1 -1
  59. package/mobile/lib/ui-kit/Pagination/PaginationContainer.js.map +1 -1
  60. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +3 -1
  61. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  62. package/mobile/lib/utils/jaroWinklerDistance.js +2 -2
  63. package/mobile/lib/utils/jaroWinklerDistance.js.map +1 -1
  64. package/mobile/src/components/ComparisonTable/ComparisonTable.tsx +2 -2
  65. package/mobile/src/hooks/useIntersectionObserver.ts +1 -1
  66. package/mobile/src/ui-kit/BaseTile/BaseTile.tsx +2 -2
  67. package/mobile/src/ui-kit/Pagination/PaginationContainer.tsx +1 -1
  68. package/mobile/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +13 -11
  69. package/mobile/src/utils/jaroWinklerDistance.ts +2 -2
  70. package/package.json +1 -1
  71. package/src/components/BenefitsBlock/BenefitsBlock.fixture.mobile.tsx +2 -2
  72. package/src/components/BenefitsBlock/BenefitsBlock.fixture.tsx +2 -2
  73. package/src/components/Blocks.ts +0 -2
  74. package/src/components/Carousel/Carousel.fixture.mobile.tsx +5 -4
  75. package/src/components/Carousel/Carousel.fixture.tsx +9 -8
  76. package/src/components/CarouselLinks/CarouselLinks.fixture.mobile.tsx +13 -13
  77. package/src/components/CarouselLinks/CarouselLinks.fixture.tsx +3 -2
  78. package/src/components/CarouselLinks/CarouselLinks.tsx +16 -14
  79. package/src/components/ComparisonTable/ComparisonTable.mobile.tsx +2 -2
  80. package/src/components/VerticalLayout/VerticalLayout.fixture.tsx +2 -1
  81. package/src/hooks/useIntersectionObserver.ts +1 -1
  82. package/src/ui-kit/BaseTile/BaseTile.tsx +2 -2
  83. package/src/ui-kit/Pagination/PaginationContainer.tsx +1 -1
  84. package/src/ui-kit/SwipeListControl/SwipeListControl.fixture.mobile.tsx +2 -1
  85. package/src/ui-kit/SwipeListControl/SwipeListControl.fixture.tsx +2 -1
  86. package/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +13 -11
  87. package/src/utils/jaroWinklerDistance.ts +2 -2
  88. package/bundle/components/ParagraphBlock/ParagraphBlock.d.ts +0 -6
  89. package/bundle/components/ParagraphBlock/ParagraphBlockContent.d.ts +0 -12
  90. package/dist/components/ParagraphBlock/ParagraphBlock.d.ts +0 -6
  91. package/dist/components/ParagraphBlock/ParagraphBlock.js +0 -8
  92. package/dist/components/ParagraphBlock/ParagraphBlock.js.map +0 -1
  93. package/dist/components/ParagraphBlock/ParagraphBlockContent.d.ts +0 -12
  94. package/dist/components/ParagraphBlock/ParagraphBlockContent.js +0 -2
  95. package/dist/components/ParagraphBlock/ParagraphBlockContent.js.map +0 -1
  96. package/lib/components/ParagraphBlock/ParagraphBlock.d.ts +0 -6
  97. package/lib/components/ParagraphBlock/ParagraphBlock.fixture.d.ts +0 -9
  98. package/lib/components/ParagraphBlock/ParagraphBlock.js +0 -6
  99. package/lib/components/ParagraphBlock/ParagraphBlock.js.map +0 -1
  100. package/lib/components/ParagraphBlock/ParagraphBlockContent.d.ts +0 -12
  101. package/lib/components/ParagraphBlock/ParagraphBlockContent.js +0 -2
  102. package/lib/components/ParagraphBlock/ParagraphBlockContent.js.map +0 -1
  103. package/mobile/bundle/components/ParagraphBlock/ParagraphBlock.d.ts +0 -6
  104. package/mobile/bundle/components/ParagraphBlock/ParagraphBlockContent.d.ts +0 -12
  105. package/mobile/dist/components/ParagraphBlock/ParagraphBlock.d.ts +0 -6
  106. package/mobile/dist/components/ParagraphBlock/ParagraphBlock.js +0 -8
  107. package/mobile/dist/components/ParagraphBlock/ParagraphBlock.js.map +0 -1
  108. package/mobile/dist/components/ParagraphBlock/ParagraphBlockContent.d.ts +0 -12
  109. package/mobile/dist/components/ParagraphBlock/ParagraphBlockContent.js +0 -2
  110. package/mobile/dist/components/ParagraphBlock/ParagraphBlockContent.js.map +0 -1
  111. package/mobile/lib/components/ParagraphBlock/ParagraphBlock.d.ts +0 -6
  112. package/mobile/lib/components/ParagraphBlock/ParagraphBlock.js +0 -6
  113. package/mobile/lib/components/ParagraphBlock/ParagraphBlock.js.map +0 -1
  114. package/mobile/lib/components/ParagraphBlock/ParagraphBlockContent.d.ts +0 -12
  115. package/mobile/lib/components/ParagraphBlock/ParagraphBlockContent.js +0 -2
  116. package/mobile/lib/components/ParagraphBlock/ParagraphBlockContent.js.map +0 -1
  117. package/mobile/src/components/ParagraphBlock/ParagraphBlock.example.json +0 -5
  118. package/mobile/src/components/ParagraphBlock/ParagraphBlock.tsx +0 -17
  119. package/mobile/src/components/ParagraphBlock/ParagraphBlock.ui.json +0 -1
  120. package/mobile/src/components/ParagraphBlock/ParagraphBlockContent.ts +0 -14
  121. package/src/components/ParagraphBlock/ParagraphBlock.example.json +0 -5
  122. package/src/components/ParagraphBlock/ParagraphBlock.fixture.tsx +0 -41
  123. package/src/components/ParagraphBlock/ParagraphBlock.tsx +0 -17
  124. package/src/components/ParagraphBlock/ParagraphBlock.ui.json +0 -1
  125. package/src/components/ParagraphBlock/ParagraphBlockContent.ts +0 -14
@@ -52,7 +52,7 @@ export const BaseTile = JSX<BaseTileProps>(
52
52
  return (
53
53
  <div className={getStyle(padding, defaultPadding, className)}>
54
54
  {backwardButton ? renderBackwardButton(version, handleClick) : null}
55
- {title ? <div className="relative">{title}</div> : null}
55
+ {title ? <div className="relative h-full">{title}</div> : null}
56
56
  <div
57
57
  className={style(
58
58
  'grow relative flex flex-col @xl:flex-row gap-3xl w-full',
@@ -109,7 +109,7 @@ const renderImageContainer = (
109
109
  image ? (
110
110
  <div
111
111
  className={style(
112
- 'shrink-1/2 justify-self-center mt-auto @xl:mt-0',
112
+ 'shrink-1/2 justify-self-center',
113
113
  imageAlign && imageAlignmentMap[imageAlign],
114
114
  className,
115
115
  )}
@@ -18,7 +18,7 @@ export const PaginationContainer = ({
18
18
  }: PaginationContainerProps) => {
19
19
  const pages = useMemo(
20
20
  () =>
21
- new Array(totalPages).fill({
21
+ Array.from<PaginationContainerProps>({ length: totalPages }).fill({
22
22
  currentPage,
23
23
  onPageChange,
24
24
  totalPages,
@@ -55,17 +55,19 @@ export const SwipeListControlDots = JSX<SwipeListControlDotsProps>(
55
55
  )}
56
56
  data-ver={version}
57
57
  >
58
- {new Array(dotCount).fill(null).map((_, idx: number) => (
59
- <div
60
- key={String(idx)}
61
- className={`${dotStyle} ${
62
- idx === activeIndex ? activeDotStyles[listType] : inactiveDotStyle
63
- }`}
64
- role="button"
65
- aria-hidden
66
- onClick={() => handleClick(idx)}
67
- />
68
- ))}
58
+ {Array.from({ length: dotCount })
59
+ .fill(null)
60
+ .map((_, idx: number) => (
61
+ <div
62
+ key={String(idx)}
63
+ className={`${dotStyle} ${
64
+ idx === activeIndex ? activeDotStyles[listType] : inactiveDotStyle
65
+ }`}
66
+ role="button"
67
+ aria-hidden
68
+ onClick={() => handleClick(idx)}
69
+ />
70
+ ))}
69
71
  </div>
70
72
  ) : null;
71
73
  },
@@ -36,8 +36,8 @@ function computeM(
36
36
  } {
37
37
  const range = Math.max(0, Math.floor(Math.max(s1.length, s2.length) / 2) - 1);
38
38
 
39
- const s1Matches = new Array<boolean>(s1.length);
40
- const s2Matches = new Array<boolean>(s2.length);
39
+ const s1Matches = Array.from<boolean>({ length: s1.length });
40
+ const s2Matches = Array.from<boolean>({ length: s2.length });
41
41
 
42
42
  let m = 0;
43
43
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.14.112",
3
+ "version": "0.14.114",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -29,7 +29,7 @@ export default {
29
29
  <BenefitsBlock
30
30
  className="col-span-12"
31
31
  title="Оформите выгодный кредит для бизнеса"
32
- benefitList={new Array(4).fill(benefitImage)}
32
+ benefitList={Array.from<BenefitBlockItemProps>({ length: 4 }).fill(benefitImage)}
33
33
  version="primary"
34
34
  />
35
35
  </div>
@@ -39,7 +39,7 @@ export default {
39
39
  <BenefitsBlock
40
40
  className="col-span-12"
41
41
  title="Преимущества кредита"
42
- benefitList={new Array(4).fill(benefitIcon)}
42
+ benefitList={Array.from<BenefitBlockItemProps>({ length: 4 }).fill(benefitIcon)}
43
43
  version="primary"
44
44
  />
45
45
  </div>
@@ -66,7 +66,7 @@ export default {
66
66
  <BenefitsBlock
67
67
  className="col-span-12"
68
68
  title="Преимущества кредита"
69
- benefitList={new Array(4).fill(benefitImage)}
69
+ benefitList={Array.from<BenefitBlockItemProps>({ length: 4 }).fill(benefitImage)}
70
70
  version="primary"
71
71
  />
72
72
  </div>
@@ -76,7 +76,7 @@ export default {
76
76
  <BenefitsBlock
77
77
  className="col-span-12"
78
78
  title="Преимущества кредита"
79
- benefitList={new Array(4).fill(benefitIcon)}
79
+ benefitList={Array.from<BenefitBlockItemProps>({ length: 4 }).fill(benefitIcon)}
80
80
  version="primary"
81
81
  />
82
82
  </div>
@@ -33,7 +33,6 @@ import { LinkDocs } from './LinkDocs/LinkDocs';
33
33
  import { MobileAppTile } from './MobileAppTile/MobileAppTile';
34
34
  import { MortgageFiltration } from './MortgageFiltration/MortgageFiltration';
35
35
  import { OfficesAtmsMap } from './OfficesAtmsMap/OfficesAtmsMap';
36
- import { ParagraphBlock } from './ParagraphBlock/ParagraphBlock';
37
36
  import { Placeholder } from './Placeholder/Placeholder';
38
37
  import { ProductBlock } from './ProductBlock/ProductBlock';
39
38
  import { ProductGallery } from './ProductGallery/ProductGallery';
@@ -84,7 +83,6 @@ export const Blocks: BlocksRegistry = {
84
83
  MobileAppTile,
85
84
  MortgageFiltration,
86
85
  OfficesAtmsMap,
87
- ParagraphBlock,
88
86
  Placeholder,
89
87
  ProductBlock,
90
88
  ProductGallery,
@@ -1,4 +1,5 @@
1
1
  import { type BlockRendererOptions } from '../../BlockRenderer/BlockRendererOptions';
2
+ import { type BlockDef } from '../../model/ContentPageDef';
2
3
  import { type Picture } from '../../model/Picture';
3
4
  import '../../setup-fixture';
4
5
  import { Blocks } from '../Blocks';
@@ -97,7 +98,7 @@ export default {
97
98
  className="col-span-12"
98
99
  block={{
99
100
  type: 'Carousel',
100
- blocks: new Array(3).fill({
101
+ blocks: Array.from<BlockDef>({ length: 3 }).fill({
101
102
  type: 'CarouselRecommendationCard',
102
103
  content: CAROUSEL_RECOMMENDATION_CARD,
103
104
  }),
@@ -112,7 +113,7 @@ export default {
112
113
  className="col-span-12"
113
114
  block={{
114
115
  type: 'Carousel',
115
- blocks: new Array(3).fill({
116
+ blocks: Array.from<BlockDef>({ length: 3 }).fill({
116
117
  type: 'CarouselRecommendationCard',
117
118
  content: { version: 'secondary', ...CAROUSEL_RECOMMENDATION_CARD },
118
119
  }),
@@ -129,7 +130,7 @@ export default {
129
130
  cardSize="big"
130
131
  block={{
131
132
  type: 'Carousel',
132
- blocks: new Array(6).fill({
133
+ blocks: Array.from<BlockDef>({ length: 6 }).fill({
133
134
  type: 'CarouselRecommendationCard',
134
135
  content: CAROUSEL_RECOMMENDATION_CARD_BENEFITS,
135
136
  }),
@@ -144,7 +145,7 @@ export default {
144
145
  className="col-span-12"
145
146
  block={{
146
147
  type: 'Carousel',
147
- blocks: new Array(3).fill({
148
+ blocks: Array.from<BlockDef>({ length: 3 }).fill({
148
149
  type: 'CarouselBankHistoryCard',
149
150
  content: BANK_HISTORY_CARD,
150
151
  }),
@@ -1,4 +1,5 @@
1
1
  import { type BlockRendererOptions } from '../../BlockRenderer/BlockRendererOptions';
2
+ import { type BlockDef } from '../../model/ContentPageDef';
2
3
  import { type Picture } from '../../model/Picture';
3
4
  import '../../setup-fixture';
4
5
  import { Blocks } from '../Blocks';
@@ -74,7 +75,7 @@ export default {
74
75
  noCardBorder={true}
75
76
  block={{
76
77
  type: 'Carousel',
77
- blocks: new Array(6).fill({
78
+ blocks: Array.from<BlockDef>({ length: 6 }).fill({
78
79
  type: 'CarouselCard',
79
80
  content: CARD_MINI,
80
81
  }),
@@ -118,7 +119,7 @@ export default {
118
119
  isGap={false}
119
120
  block={{
120
121
  type: 'Carousel',
121
- blocks: new Array(6)
122
+ blocks: Array.from<BlockDef>({ length: 6 })
122
123
  .fill({
123
124
  type: 'CarouselTariffsCard',
124
125
  content: TARIFFS_CARD,
@@ -136,7 +137,7 @@ export default {
136
137
  visibleItemCount={0}
137
138
  block={{
138
139
  type: 'Carousel',
139
- blocks: new Array(6).fill({
140
+ blocks: Array.from<BlockDef>({ length: 6 }).fill({
140
141
  type: 'ProductBlock',
141
142
  content: INVESTMENT_CARD_WITH_SINGLE_COLUMN,
142
143
  }),
@@ -153,7 +154,7 @@ export default {
153
154
  cardSize="big"
154
155
  block={{
155
156
  type: 'Carousel',
156
- blocks: new Array(6).fill({
157
+ blocks: Array.from<BlockDef>({ length: 6 }).fill({
157
158
  type: 'CarouselRecommendationCard',
158
159
  content: CAROUSEL_RECOMMENDATION_CARD_WITHOUT_LIST,
159
160
  }),
@@ -170,7 +171,7 @@ export default {
170
171
  cardSize="big"
171
172
  block={{
172
173
  type: 'Carousel',
173
- blocks: new Array(6).fill({
174
+ blocks: Array.from<BlockDef>({ length: 6 }).fill({
174
175
  type: 'CarouselRecommendationCard',
175
176
  content: CAROUSEL_RECOMMENDATION_CARD_SECONDARY,
176
177
  }),
@@ -187,7 +188,7 @@ export default {
187
188
  cardSize="big"
188
189
  block={{
189
190
  type: 'Carousel',
190
- blocks: new Array(6).fill({
191
+ blocks: Array.from<BlockDef>({ length: 6 }).fill({
191
192
  type: 'CarouselRecommendationCard',
192
193
  content: CAROUSEL_RECOMMENDATION_CARD_BENEFITS,
193
194
  }),
@@ -206,7 +207,7 @@ export default {
206
207
  noCardBorder={true}
207
208
  block={{
208
209
  type: 'Carousel',
209
- blocks: new Array(6).fill({
210
+ blocks: Array.from<BlockDef>({ length: 6 }).fill({
210
211
  type: 'CarouselBankHistoryCard',
211
212
  content: BANK_HISTORY_CARD,
212
213
  }),
@@ -222,7 +223,7 @@ export default {
222
223
  visibleItemCount={2}
223
224
  block={{
224
225
  type: 'Carousel',
225
- blocks: new Array(6).fill({
226
+ blocks: Array.from<BlockDef>({ length: 6 }).fill({
226
227
  type: 'RichTextBlock',
227
228
  content: RICH_CARD,
228
229
  }),
@@ -1,65 +1,65 @@
1
- import { type IconName } from '../../icons/IconName';
2
1
  import '../../setup-fixture';
3
2
 
4
3
  import { CarouselLinks } from './CarouselLinks';
4
+ import { type CarouselLinkProps } from './CarouselLinksContent';
5
5
 
6
6
  const links = [
7
7
  {
8
8
  text: 'Миссия и Стратегия',
9
9
  href: '#',
10
- icon: { icon: 'AchievementIcon' as IconName },
10
+ icon: { icon: 'AchievementIcon' },
11
11
  },
12
12
  {
13
13
  text: 'Контакты и реквизиты',
14
14
  href: '#',
15
- icon: { icon: 'PhoneCallingIcon' as IconName },
15
+ icon: { icon: 'PhoneCallingIcon' },
16
16
  },
17
17
  {
18
18
  text: 'Новости',
19
19
  href: '#',
20
- icon: { icon: 'BankIcon' as IconName },
20
+ icon: { icon: 'BankIcon' },
21
21
  },
22
22
  {
23
23
  text: 'Карьера в Банке',
24
24
  href: '#',
25
- icon: { icon: 'BriefcaseIcon' as IconName },
25
+ icon: { icon: 'BriefcaseIcon' },
26
26
  },
27
27
  {
28
28
  text: 'Противодействие коррупции',
29
29
  href: '#',
30
- icon: { icon: 'ShieldTickIcon' as IconName },
30
+ icon: { icon: 'ShieldTickIcon' },
31
31
  },
32
32
  {
33
33
  text: 'Награды и рейтинги',
34
34
  href: '#',
35
- icon: { icon: 'CupIcon' as IconName },
35
+ icon: { icon: 'CupIcon' },
36
36
  },
37
37
  {
38
38
  text: 'Агротех стартапы',
39
39
  href: '#',
40
- icon: { icon: 'DevIcon' as IconName },
40
+ icon: { icon: 'DevIcon' },
41
41
  },
42
42
  {
43
43
  text: 'Залоговое имущество',
44
44
  href: '#',
45
- icon: { icon: 'PercentageRoundIcon' as IconName },
45
+ icon: { icon: 'PercentageRoundIcon' },
46
46
  },
47
47
  {
48
48
  text: 'Меры безопасности',
49
49
  href: '#',
50
- icon: { icon: 'LockIcon' as IconName },
50
+ icon: { icon: 'LockIcon' },
51
51
  },
52
52
  {
53
53
  text: 'Непрофильные активы',
54
54
  href: '#',
55
- icon: { icon: 'ChartRoundIcon' as IconName },
55
+ icon: { icon: 'ChartRoundIcon' },
56
56
  },
57
57
  {
58
58
  text: 'Аудиторские заключения',
59
59
  href: '#',
60
- icon: { icon: 'CopyIcon' as IconName },
60
+ icon: { icon: 'CopyIcon' },
61
61
  },
62
- ];
62
+ ] as CarouselLinkProps[];
63
63
 
64
64
  const description = `Акционерное общество «Российский Сельскохозяйственный банк»* —
65
65
  один из крупнейших банков в России. Был основан в 2000 году в целях развития
@@ -1,12 +1,14 @@
1
1
  import '../../setup-fixture';
2
2
 
3
3
  import { CarouselLinks } from './CarouselLinks';
4
+ import { type CarouselLinkProps } from './CarouselLinksContent';
4
5
 
5
6
  const link = {
6
7
  text: 'Аудиторские заключения',
7
8
  href: '#',
8
9
  };
9
- const links = Array(10).fill(link);
10
+
11
+ const links = Array.from<CarouselLinkProps>({ length: 10 }).fill(link);
10
12
 
11
13
  const description = `Акционерное общество «Российский Сельскохозяйственный банк»* —
12
14
  один из крупнейших банков в России. Был основан в 2000 году в целях развития
@@ -27,7 +29,6 @@ export default {
27
29
  additionalDescription={additionalDescription}
28
30
  version="secondary"
29
31
  className="col-span-12"
30
- block={{ type: 'Carousel', blocks: new Array(1).fill(link).flat() }}
31
32
  />
32
33
  </div>
33
34
  ),
@@ -47,20 +47,22 @@ const renderLinks = (links: LinkProps[], className = '') => {
47
47
  arrowsPadded={false}
48
48
  padding="p-0"
49
49
  >
50
- {new Array(itemCount).fill(null).map((_, groupIndex) => (
51
- <div
52
- key={String(groupIndex)}
53
- className={style(
54
- 'flex flex-wrap gap-2xs self-start xl:justify-center @5xl:grid @5xl:grid-cols-2',
55
- )}
56
- >
57
- {links
58
- .slice(groupIndex * MAX_LINKS_COUNT, (groupIndex + 1) * MAX_LINKS_COUNT)
59
- .map((link, index) => (
60
- <CarouselLinkButton key={String(index)} {...link} />
61
- ))}
62
- </div>
63
- ))}
50
+ {Array.from({ length: itemCount })
51
+ .fill(null)
52
+ .map((_, groupIndex) => (
53
+ <div
54
+ key={String(groupIndex)}
55
+ className={style(
56
+ 'flex flex-wrap gap-2xs self-start xl:justify-center @5xl:grid @5xl:grid-cols-2',
57
+ )}
58
+ >
59
+ {links
60
+ .slice(groupIndex * MAX_LINKS_COUNT, (groupIndex + 1) * MAX_LINKS_COUNT)
61
+ .map((link, index) => (
62
+ <CarouselLinkButton key={String(index)} {...link} />
63
+ ))}
64
+ </div>
65
+ ))}
64
66
  </Carousel>
65
67
  );
66
68
  };
@@ -30,7 +30,7 @@ export const ComparisonTable = JSX<ComparisonTableProps>((props) => {
30
30
  const TableInner = JSX<ComparisonTableProps>(
31
31
  ({ columns = [], rowHeaders, isColoredFirstColumn, visibleRowLength, orientation, ...rest }) => {
32
32
  const [columnsViewState, setColumnsViewState] = useState(
33
- new Array<boolean>(columns.length).fill(!visibleRowLength),
33
+ Array.from<boolean>({ length: columns.length }).fill(!visibleRowLength),
34
34
  );
35
35
 
36
36
  const handleToggleColumn = useCallback((colIndex: number) => {
@@ -41,7 +41,7 @@ const TableInner = JSX<ComparisonTableProps>(
41
41
  }, []);
42
42
 
43
43
  const handleSlideChange = useCallback(
44
- () => setColumnsViewState((_) => new Array(_.length).fill(false)),
44
+ () => setColumnsViewState((_) => Array.from<boolean>({ length: _.length }).fill(false)),
45
45
  [],
46
46
  );
47
47
 
@@ -1,4 +1,5 @@
1
1
  import { type BlockRendererOptions } from '../../BlockRenderer/BlockRendererOptions';
2
+ import { type BlockDef } from '../../model/ContentPageDef';
2
3
  import '../../setup-fixture';
3
4
  import { Blocks } from '../Blocks';
4
5
  import { Headline } from '../Headline/Headline';
@@ -273,7 +274,7 @@ export default {
273
274
  },
274
275
  style: ['col-span-12'],
275
276
  type: 'Carousel',
276
- blocks: new Array(6).fill(carouselRecommendationCard),
277
+ blocks: Array.from<BlockDef>({ length: 6 }).fill(carouselRecommendationCard),
277
278
  },
278
279
  ],
279
280
  }}
@@ -37,7 +37,7 @@ export function useIntersectionObserver<R extends Element>(
37
37
  function sensitivityToThreshold(sensitivity = 0): number[] {
38
38
  const thresholdsCount = Math.round(sensitivity * SENSITIVITY_SCALE);
39
39
 
40
- return new Array(thresholdsCount)
40
+ return Array.from({ length: thresholdsCount })
41
41
  .fill(0)
42
42
  .map((_, thi) => Math.min(thi / thresholdsCount), 1)
43
43
  .concat(1);
@@ -52,7 +52,7 @@ export const BaseTile = JSX<BaseTileProps>(
52
52
  return (
53
53
  <div className={getStyle(padding, defaultPadding, className)}>
54
54
  {backwardButton ? renderBackwardButton(version, handleClick) : null}
55
- {title ? <div className="relative">{title}</div> : null}
55
+ {title ? <div className="relative h-full">{title}</div> : null}
56
56
  <div
57
57
  className={style(
58
58
  'grow relative flex flex-col @xl:flex-row gap-3xl w-full',
@@ -109,7 +109,7 @@ const renderImageContainer = (
109
109
  image ? (
110
110
  <div
111
111
  className={style(
112
- 'shrink-1/2 justify-self-center mt-auto @xl:mt-0',
112
+ 'shrink-1/2 justify-self-center',
113
113
  imageAlign && imageAlignmentMap[imageAlign],
114
114
  className,
115
115
  )}
@@ -18,7 +18,7 @@ export const PaginationContainer = ({
18
18
  }: PaginationContainerProps) => {
19
19
  const pages = useMemo(
20
20
  () =>
21
- new Array(totalPages).fill({
21
+ Array.from<PaginationContainerProps>({ length: totalPages }).fill({
22
22
  currentPage,
23
23
  onPageChange,
24
24
  totalPages,
@@ -9,7 +9,8 @@ const renderElement = (_: any, i: number): VNode => (
9
9
  </div>
10
10
  );
11
11
 
12
- const generateChildren = (count: number) => new Array(count).fill(0).map(renderElement);
12
+ const generateChildren = (count: number) =>
13
+ Array.from({ length: count }).fill(0).map(renderElement);
13
14
 
14
15
  export default {
15
16
  default: (
@@ -9,7 +9,8 @@ const renderElement = (_: any, i: number): VNode => (
9
9
  </div>
10
10
  );
11
11
 
12
- const generateChildren = (count: number) => new Array(count).fill(0).map(renderElement);
12
+ const generateChildren = (count: number) =>
13
+ Array.from({ length: count }).fill(0).map(renderElement);
13
14
 
14
15
  export default {
15
16
  default: (
@@ -55,17 +55,19 @@ export const SwipeListControlDots = JSX<SwipeListControlDotsProps>(
55
55
  )}
56
56
  data-ver={version}
57
57
  >
58
- {new Array(dotCount).fill(null).map((_, idx: number) => (
59
- <div
60
- key={String(idx)}
61
- className={`${dotStyle} ${
62
- idx === activeIndex ? activeDotStyles[listType] : inactiveDotStyle
63
- }`}
64
- role="button"
65
- aria-hidden
66
- onClick={() => handleClick(idx)}
67
- />
68
- ))}
58
+ {Array.from({ length: dotCount })
59
+ .fill(null)
60
+ .map((_, idx: number) => (
61
+ <div
62
+ key={String(idx)}
63
+ className={`${dotStyle} ${
64
+ idx === activeIndex ? activeDotStyles[listType] : inactiveDotStyle
65
+ }`}
66
+ role="button"
67
+ aria-hidden
68
+ onClick={() => handleClick(idx)}
69
+ />
70
+ ))}
69
71
  </div>
70
72
  ) : null;
71
73
  },
@@ -36,8 +36,8 @@ function computeM(
36
36
  } {
37
37
  const range = Math.max(0, Math.floor(Math.max(s1.length, s2.length) / 2) - 1);
38
38
 
39
- const s1Matches = new Array<boolean>(s1.length);
40
- const s2Matches = new Array<boolean>(s2.length);
39
+ const s1Matches = Array.from<boolean>({ length: s1.length });
40
+ const s2Matches = Array.from<boolean>({ length: s2.length });
41
41
 
42
42
  let m = 0;
43
43
 
@@ -1,6 +0,0 @@
1
- import { type UniBlockProps } from '../../model/JSXBlock';
2
- import { type ParagraphBlockContent } from './ParagraphBlockContent';
3
- interface ParagraphBlockProps extends ParagraphBlockContent, UniBlockProps {
4
- }
5
- export declare const ParagraphBlock: import("@redneckz/uni-jsx").UNIComponent<ParagraphBlockProps, any, any>;
6
- export {};
@@ -1,12 +0,0 @@
1
- import { type AlignProps } from '../../model/HeadlineType';
2
- import { type UniBlockContent } from '../../model/JSXBlock';
3
- import { type FontWeight, type TextSize } from '../../ui-kit/Text/TextProps';
4
- /**
5
- * @title Параграф
6
- */
7
- export declare type ParagraphBlockContent = UniBlockContent & AlignProps & {
8
- size?: TextSize;
9
- font?: FontWeight;
10
- /** @title Текст */
11
- text?: string;
12
- };
@@ -1,6 +0,0 @@
1
- import { type UniBlockProps } from '../../model/JSXBlock';
2
- import { type ParagraphBlockContent } from './ParagraphBlockContent';
3
- interface ParagraphBlockProps extends ParagraphBlockContent, UniBlockProps {
4
- }
5
- export declare const ParagraphBlock: import("@redneckz/uni-jsx").UNIComponent<ParagraphBlockProps, any, any>;
6
- export {};
@@ -1,8 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.ParagraphBlock = void 0;
3
- const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
- const uni_jsx_1 = require("@redneckz/uni-jsx");
5
- const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
6
- const Paragraph_1 = require("../../ui-kit/Paragraph/Paragraph");
7
- exports.ParagraphBlock = (0, uni_jsx_1.JSX)(({ text, size, align, font, children, ...rest }) => ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { defaultPadding: "p-0", ...rest, children: (0, jsx_runtime_1.jsx)(Paragraph_1.Paragraph, { size: size, align: align, font: font, children: text || children }) })));
8
- //# sourceMappingURL=ParagraphBlock.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ParagraphBlock.js","sourceRoot":"","sources":["../../../src/components/ParagraphBlock/ParagraphBlock.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,4DAAyD;AACzD,gEAA6D;AAKhD,QAAA,cAAc,GAAG,IAAA,aAAG,EAC/B,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,CAClD,uBAAC,2BAAY,IAAC,cAAc,EAAC,KAAK,KAAK,IAAI,YACzC,uBAAC,qBAAS,IAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,YAC5C,IAAI,IAAI,QAAQ,GACP,GACC,CAChB,CACF,CAAC"}
@@ -1,12 +0,0 @@
1
- import { type AlignProps } from '../../model/HeadlineType';
2
- import { type UniBlockContent } from '../../model/JSXBlock';
3
- import { type FontWeight, type TextSize } from '../../ui-kit/Text/TextProps';
4
- /**
5
- * @title Параграф
6
- */
7
- export declare type ParagraphBlockContent = UniBlockContent & AlignProps & {
8
- size?: TextSize;
9
- font?: FontWeight;
10
- /** @title Текст */
11
- text?: string;
12
- };
@@ -1,2 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- //# sourceMappingURL=ParagraphBlockContent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ParagraphBlockContent.js","sourceRoot":"","sources":["../../../src/components/ParagraphBlock/ParagraphBlockContent.ts"],"names":[],"mappings":""}
@@ -1,6 +0,0 @@
1
- import { type UniBlockProps } from '../../model/JSXBlock';
2
- import { type ParagraphBlockContent } from './ParagraphBlockContent';
3
- interface ParagraphBlockProps extends ParagraphBlockContent, UniBlockProps {
4
- }
5
- export declare const ParagraphBlock: import("@redneckz/uni-jsx").UNIComponent<ParagraphBlockProps, any, any>;
6
- export {};
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import '../../setup-fixture';
3
- declare const _default: {
4
- default: JSX.Element;
5
- colors: JSX.Element;
6
- alignment: JSX.Element;
7
- font: JSX.Element;
8
- };
9
- export default _default;
@@ -1,6 +0,0 @@
1
- import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
- import { JSX } from '@redneckz/uni-jsx';
3
- import { BlockWrapper } from '../../ui-kit/BlockWrapper.js';
4
- import { Paragraph } from '../../ui-kit/Paragraph/Paragraph.js';
5
- export const ParagraphBlock = JSX(({ text, size, align, font, children, ...rest }) => (_jsx(BlockWrapper, { defaultPadding: "p-0", ...rest, children: _jsx(Paragraph, { size: size, align: align, font: font, children: text || children }) })));
6
- //# sourceMappingURL=ParagraphBlock.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ParagraphBlock.js","sourceRoot":"","sources":["../../../src/components/ParagraphBlock/ParagraphBlock.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAK7D,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAC/B,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,CAClD,KAAC,YAAY,IAAC,cAAc,EAAC,KAAK,KAAK,IAAI,YACzC,KAAC,SAAS,IAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,YAC5C,IAAI,IAAI,QAAQ,GACP,GACC,CAChB,CACF,CAAC"}