@redneckz/wildless-cms-uni-blocks 0.2.52 → 0.2.55

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 (114) hide show
  1. package/dist/BaseTile.d.ts +13 -0
  2. package/dist/BaseTile.js +35 -0
  3. package/dist/BaseTile.js.map +1 -0
  4. package/dist/Blocks.d.ts +2 -2
  5. package/dist/Blocks.js.map +1 -1
  6. package/dist/ContentPageContext.d.ts +2 -0
  7. package/dist/ExchangeRateTile.js +7 -5
  8. package/dist/ExchangeRateTile.js.map +1 -1
  9. package/dist/Header/Header.js +2 -2
  10. package/dist/Header/Header.js.map +1 -1
  11. package/dist/Header/HeaderContent.d.ts +1 -1
  12. package/dist/Header/HeaderSecondaryMenu.d.ts +5 -2
  13. package/dist/Header/HeaderSecondaryMenu.js +3 -2
  14. package/dist/Header/HeaderSecondaryMenu.js.map +1 -1
  15. package/dist/MobileAppTile.js +1 -1
  16. package/dist/MobileAppTile.js.map +1 -1
  17. package/dist/ProductBlock.d.ts +2 -0
  18. package/dist/ProductBlock.js +7 -2
  19. package/dist/ProductBlock.js.map +1 -1
  20. package/dist/ProductBlockInner.d.ts +3 -10
  21. package/dist/ProductBlockInner.js +3 -15
  22. package/dist/ProductBlockInner.js.map +1 -1
  23. package/dist/ProductTile.d.ts +4 -13
  24. package/dist/ProductTile.js +4 -11
  25. package/dist/ProductTile.js.map +1 -1
  26. package/dist/Tile.d.ts +3 -11
  27. package/dist/Tile.js +4 -26
  28. package/dist/Tile.js.map +1 -1
  29. package/dist/api/DaDataAPI.d.ts +3 -0
  30. package/dist/api/DaDataAPI.js +33 -0
  31. package/dist/api/DaDataAPI.js.map +1 -0
  32. package/dist/api/LikeAPI.d.ts +1 -1
  33. package/dist/api/LikeAPI.js +2 -2
  34. package/dist/api/LikeAPI.js.map +1 -1
  35. package/dist/content-page-repository/ContentPageRepository.d.ts +1 -0
  36. package/dist/content-page-repository/ContentPageRepository.js +6 -0
  37. package/dist/content-page-repository/ContentPageRepository.js.map +1 -1
  38. package/dist/content-page-repository/toMobilePage.d.ts +2 -0
  39. package/dist/content-page-repository/toMobilePage.js +23 -0
  40. package/dist/content-page-repository/toMobilePage.js.map +1 -0
  41. package/dist/types.d.ts +14 -0
  42. package/dist/utils/getCurrentPosition.d.ts +1 -0
  43. package/dist/utils/getCurrentPosition.js +5 -0
  44. package/dist/utils/getCurrentPosition.js.map +1 -0
  45. package/lib/BaseTile.d.ts +13 -0
  46. package/lib/BaseTile.js +33 -0
  47. package/lib/BaseTile.js.map +1 -0
  48. package/lib/Blocks.d.ts +2 -2
  49. package/lib/Blocks.js.map +1 -1
  50. package/lib/ContentPageContext.d.ts +2 -0
  51. package/lib/ExchangeRateTile.js +7 -5
  52. package/lib/ExchangeRateTile.js.map +1 -1
  53. package/lib/Header/Header.js +2 -2
  54. package/lib/Header/Header.js.map +1 -1
  55. package/lib/Header/HeaderContent.d.ts +1 -1
  56. package/lib/Header/HeaderSecondaryMenu.d.ts +5 -2
  57. package/lib/Header/HeaderSecondaryMenu.js +3 -2
  58. package/lib/Header/HeaderSecondaryMenu.js.map +1 -1
  59. package/lib/MobileAppTile.js +1 -1
  60. package/lib/MobileAppTile.js.map +1 -1
  61. package/lib/ProductBlock.d.ts +2 -0
  62. package/lib/ProductBlock.js +8 -3
  63. package/lib/ProductBlock.js.map +1 -1
  64. package/lib/ProductBlockInner.d.ts +3 -10
  65. package/lib/ProductBlockInner.js +3 -15
  66. package/lib/ProductBlockInner.js.map +1 -1
  67. package/lib/ProductTile.d.ts +4 -13
  68. package/lib/ProductTile.js +4 -11
  69. package/lib/ProductTile.js.map +1 -1
  70. package/lib/Tile.d.ts +3 -11
  71. package/lib/Tile.js +5 -27
  72. package/lib/Tile.js.map +1 -1
  73. package/lib/api/DaDataAPI.d.ts +3 -0
  74. package/lib/api/DaDataAPI.js +30 -0
  75. package/lib/api/DaDataAPI.js.map +1 -0
  76. package/lib/api/LikeAPI.d.ts +1 -1
  77. package/lib/api/LikeAPI.js +2 -2
  78. package/lib/api/LikeAPI.js.map +1 -1
  79. package/lib/common.css +1 -1
  80. package/lib/content-page-repository/ContentPageRepository.d.ts +1 -0
  81. package/lib/content-page-repository/ContentPageRepository.js +6 -0
  82. package/lib/content-page-repository/ContentPageRepository.js.map +1 -1
  83. package/lib/content-page-repository/toMobilePage.d.ts +2 -0
  84. package/lib/content-page-repository/toMobilePage.js +20 -0
  85. package/lib/content-page-repository/toMobilePage.js.map +1 -0
  86. package/lib/types.d.ts +14 -0
  87. package/lib/utils/getCurrentPosition.d.ts +1 -0
  88. package/lib/utils/getCurrentPosition.js +2 -0
  89. package/lib/utils/getCurrentPosition.js.map +1 -0
  90. package/package.json +9 -3
  91. package/src/BaseTile.tsx +87 -0
  92. package/src/Blocks.ts +3 -2
  93. package/src/ContentPage.page.json +212 -76
  94. package/src/ContentPageContext.tsx +3 -0
  95. package/src/ExchangeRateTile.tsx +7 -5
  96. package/src/Header/Header.fixture.tsx +1 -1
  97. package/src/Header/Header.tsx +6 -2
  98. package/src/Header/HeaderContent.ts +1 -1
  99. package/src/Header/HeaderSecondaryMenu.tsx +48 -34
  100. package/src/MobileAppTile.tsx +1 -1
  101. package/src/ProductBlock.fixture.tsx +3 -2
  102. package/src/ProductBlock.tsx +25 -3
  103. package/src/ProductBlockInner.tsx +13 -70
  104. package/src/ProductTile.fixture.tsx +31 -23
  105. package/src/ProductTile.tsx +21 -70
  106. package/src/Tile.fixture.tsx +39 -29
  107. package/src/Tile.tsx +10 -79
  108. package/src/api/DaDataAPI.ts +34 -0
  109. package/src/api/LikeAPI.ts +12 -9
  110. package/src/content-page-repository/ContentPageRepository.ts +7 -0
  111. package/src/content-page-repository/toMobilePage.ts +21 -0
  112. package/src/setup-fixture.ts +15 -0
  113. package/src/types.ts +17 -0
  114. package/src/utils/getCurrentPosition.ts +4 -0
@@ -42,7 +42,6 @@
42
42
  },
43
43
  "productBlock": {
44
44
  "title": "Ставка от 12,5% годовых на срок до 5 лет!»",
45
- "description": "Кредит наличными без залога и поручительства. Потребительский кредит на любые цели. Нужен только паспорт.",
46
45
  "items": [
47
46
  "Потребительский кредит по специальной процентной ставке",
48
47
  "Получите деньги без залога и поручительства",
@@ -62,8 +61,8 @@
62
61
  "format": "webp",
63
62
  "alt": "Кредит наличными",
64
63
  "size": {
65
- "width": 220,
66
- "height": 220
64
+ "width": 280,
65
+ "height": 280
67
66
  }
68
67
  }
69
68
  }
@@ -94,8 +93,8 @@
94
93
  "title": "Рабочий",
95
94
  "format": "webp",
96
95
  "size": {
97
- "width": 220,
98
- "height": 220
96
+ "width": 280,
97
+ "height": 280
99
98
  }
100
99
  }
101
100
  }
@@ -126,8 +125,8 @@
126
125
  "title": "Кредитка",
127
126
  "format": "webp",
128
127
  "size": {
129
- "width": 220,
130
- "height": 220
128
+ "width": 280,
129
+ "height": 280
131
130
  }
132
131
  }
133
132
  }
@@ -158,8 +157,8 @@
158
157
  "title": "Кредитка",
159
158
  "format": "webp",
160
159
  "size": {
161
- "width": 220,
162
- "height": 220
160
+ "width": 280,
161
+ "height": 280
163
162
  }
164
163
  }
165
164
  }
@@ -177,11 +176,13 @@
177
176
  "Кредиты наличными на любые цели",
178
177
  "Получите деньги без залога и поручителей"
179
178
  ],
180
- "button": {
181
- "text": "Подробнее",
182
- "href": "/credit-cards",
183
- "version": "secondary"
184
- },
179
+ "buttons": [
180
+ {
181
+ "text": "Подробнее",
182
+ "href": "/credit-cards",
183
+ "version": "secondary"
184
+ }
185
+ ],
185
186
  "image": {
186
187
  "src": "money-1.png",
187
188
  "title": "деньги",
@@ -200,11 +201,13 @@
200
201
  "content": {
201
202
  "title": "Ипотека",
202
203
  "description": "Широкий выбор ипотечных программ с государственной поддержкой. Специальный предложения от 12,2 %",
203
- "button": {
204
- "text": "Подробнее",
205
- "href": "/credits",
206
- "version": "secondary"
207
- },
204
+ "buttons": [
205
+ {
206
+ "text": "Подробнее",
207
+ "href": "/credits",
208
+ "version": "secondary"
209
+ }
210
+ ],
208
211
  "promo": true
209
212
  }
210
213
  },
@@ -214,11 +217,13 @@
214
217
  "content": {
215
218
  "title": "Банковские пластиковые карты",
216
219
  "items": ["Счета в разных валютах", "Бесплатное обслуживание", "Кэшбэк до 15% от покупок"],
217
- "button": {
218
- "text": "Подробнее",
219
- "href": "/credits",
220
- "version": "secondary"
221
- },
220
+ "buttons": [
221
+ {
222
+ "text": "Подробнее",
223
+ "href": "/credits",
224
+ "version": "secondary"
225
+ }
226
+ ],
222
227
  "image": {
223
228
  "src": "credit-card-1.png",
224
229
  "title": "Кредитка",
@@ -236,11 +241,13 @@
236
241
  "content": {
237
242
  "title": "Премиальные продукты",
238
243
  "description": "Выделенные зоны обслуживания и персональный финансовый консультант. Полный спектр премиальных продуктов, подчеркивающих ваш статус",
239
- "button": {
240
- "text": "Подробнее",
241
- "href": "/credits",
242
- "version": "secondary"
243
- },
244
+ "buttons": [
245
+ {
246
+ "text": "Подробнее",
247
+ "href": "/credits",
248
+ "version": "secondary"
249
+ }
250
+ ],
244
251
  "image": {
245
252
  "src": "column-1.png",
246
253
  "alt": "Column",
@@ -263,11 +270,13 @@
263
270
  "Площадки для создания комфортной жизни за городом",
264
271
  "Подробная база вакансий для жителей сельской местности"
265
272
  ],
266
- "button": {
267
- "text": "Подробнее",
268
- "href": "/credits",
269
- "version": "secondary"
270
- },
273
+ "buttons": [
274
+ {
275
+ "text": "Подробнее",
276
+ "href": "/credits",
277
+ "version": "secondary"
278
+ }
279
+ ],
271
280
  "image": {
272
281
  "src": "globe-1.png",
273
282
  "title": "Глобус",
@@ -285,11 +294,13 @@
285
294
  "content": {
286
295
  "title": "Драгоценные металлы",
287
296
  "items": ["Счета в драгоценных металлах", "Слитки и монеты из драгоценных металлов"],
288
- "button": {
289
- "text": "Подробнее",
290
- "href": "/credits",
291
- "version": "secondary"
292
- }
297
+ "buttons": [
298
+ {
299
+ "text": "Подробнее",
300
+ "href": "/credits",
301
+ "version": "secondary"
302
+ }
303
+ ]
293
304
  }
294
305
  },
295
306
  {
@@ -298,11 +309,13 @@
298
309
  "content": {
299
310
  "title": "Банковские ячейки",
300
311
  "items": ["Полная конфиденциальность", "Разный размер ячеек", "Оформление доверенностей"],
301
- "button": {
302
- "text": "Подробнее",
303
- "href": "/credits",
304
- "version": "secondary"
305
- }
312
+ "buttons": [
313
+ {
314
+ "text": "Подробнее",
315
+ "href": "/credits",
316
+ "version": "secondary"
317
+ }
318
+ ]
306
319
  }
307
320
  },
308
321
  {
@@ -315,11 +328,13 @@
315
328
  "Минимальная сумма вклада от 3000 Р",
316
329
  "Минимальный срок вклада от 1 месяца"
317
330
  ],
318
- "button": {
319
- "text": "Подробнее",
320
- "href": "/credits",
321
- "version": "secondary"
322
- }
331
+ "buttons": [
332
+ {
333
+ "text": "Подробнее",
334
+ "href": "/credits",
335
+ "version": "secondary"
336
+ }
337
+ ]
323
338
  }
324
339
  },
325
340
  {
@@ -329,11 +344,13 @@
329
344
  "title": "Акции и спецпредложения",
330
345
  "version": "secondary",
331
346
  "description": "Пенсионный кредит по специальной процентной ставке",
332
- "button": {
333
- "text": "Все акции",
334
- "href": "/credits",
335
- "version": "secondary"
336
- }
347
+ "buttons": [
348
+ {
349
+ "text": "Все акции",
350
+ "href": "/credits",
351
+ "version": "secondary"
352
+ }
353
+ ]
337
354
  }
338
355
  },
339
356
  {
@@ -357,6 +374,67 @@
357
374
  "title": "Неизвестный блок"
358
375
  }
359
376
  },
377
+ {
378
+ "type": "ProductBlock",
379
+ "style": ["col-span-12"],
380
+ "content": {
381
+ "title": "Потребительский кредит наличными",
382
+ "description": "Кредит наличными без залога и поручительства. Потребительский кредит на любые цели. Нужен только паспорт.",
383
+ "breadcrumbs": [
384
+ {
385
+ "text": "Главная",
386
+ "href": "/"
387
+ },
388
+ {
389
+ "text": "Кредитные карты",
390
+ "href": "/credit"
391
+ },
392
+ {
393
+ "text": "Кредитная карта Своя Union Pay"
394
+ }
395
+ ],
396
+ "benefits": [
397
+ {
398
+ "label": "До 5 млн ₽",
399
+ "description": "Кредитный лимит",
400
+ "icon": "EmptyWalletIcon"
401
+ },
402
+ {
403
+ "label": "От 16,9%",
404
+ "description": "Ставка по кредиту",
405
+ "icon": "PercentageSquareIcon"
406
+ },
407
+ {
408
+ "label": "До 5 лет",
409
+ "description": "Срок кредитования",
410
+ "icon": "CalendarIcon"
411
+ }
412
+ ],
413
+ "buttons": [
414
+ {
415
+ "href": "https://rshb.ru",
416
+ "text": "Оформить карту",
417
+ "target": "_blank",
418
+ "version": "primary"
419
+ },
420
+ {
421
+ "href": "https://rshb.ru",
422
+ "text": "Подробнее",
423
+ "target": "_blank",
424
+ "version": "secondary"
425
+ }
426
+ ],
427
+ "image": {
428
+ "src": "money-1.png",
429
+ "alt": "Кредиты в РСХБ",
430
+ "format": "webp",
431
+ "size": {
432
+ "width": 280,
433
+ "height": 280
434
+ }
435
+ }
436
+ }
437
+ },
360
438
  {
361
439
  "type": "ProductTile",
362
440
  "style": ["col-span-6"],
@@ -377,11 +455,13 @@
377
455
  "description": "до 5 лет"
378
456
  }
379
457
  ],
380
- "button": {
381
- "text": "Подробнее",
382
- "href": "/credit-cards",
383
- "version": "secondary"
384
- },
458
+ "buttons": [
459
+ {
460
+ "text": "Подробнее",
461
+ "href": "/credit-cards",
462
+ "version": "secondary"
463
+ }
464
+ ],
385
465
  "image": {
386
466
  "src": "card-with-diamond.png",
387
467
  "alt": "Кредиты в РСХБ",
@@ -413,12 +493,14 @@
413
493
  "description": "до 3 лет"
414
494
  }
415
495
  ],
416
- "button": {
417
- "text": "Подробнее",
418
- "href": "/credit-cards",
419
- "target": "_blank",
420
- "version": "secondary"
421
- },
496
+ "buttons": [
497
+ {
498
+ "text": "Подробнее",
499
+ "href": "/credit-cards",
500
+ "target": "_blank",
501
+ "version": "secondary"
502
+ }
503
+ ],
422
504
  "image": {
423
505
  "src": "letter-with-money.png",
424
506
  "alt": "Пенсионный кредит в РСХБ",
@@ -450,12 +532,14 @@
450
532
  "description": "до 10 лет"
451
533
  }
452
534
  ],
453
- "button": {
454
- "text": "Подробнее",
455
- "href": "/credit-cards",
456
- "target": "_blank",
457
- "version": "secondary"
458
- },
535
+ "buttons": [
536
+ {
537
+ "text": "Подробнее",
538
+ "href": "/credit-cards",
539
+ "target": "_blank",
540
+ "version": "secondary"
541
+ }
542
+ ],
459
543
  "image": {
460
544
  "src": "building.png",
461
545
  "alt": "Кредит под залог недвижимости в РСХБ",
@@ -488,14 +572,66 @@
488
572
  "description": "до 150 лет"
489
573
  }
490
574
  ],
491
- "button": {
492
- "text": "Подробнее",
493
- "href": "/credit-cards",
494
- "target": "_blank",
495
- "version": "secondary"
575
+ "buttons": [
576
+ {
577
+ "text": "Подробнее",
578
+ "href": "/credit-cards",
579
+ "target": "_blank",
580
+ "version": "secondary"
581
+ }
582
+ ]
583
+ }
584
+ },
585
+ {
586
+ "type": "Tile",
587
+ "style": ["col-span-12"],
588
+ "content": {
589
+ "title": "Рефинансирование кредитов",
590
+ "items": [
591
+ "Без справок и документов из других банков",
592
+ "Погашение ранее взятых кредитов в любых банках",
593
+ "Рефинансировать можно кредит физического лица, кредитную карту, микрозайм или ипотеку"
594
+ ],
595
+ "buttons": [
596
+ {
597
+ "text": "Подробнее",
598
+ "href": "/credit-cards",
599
+ "target": "_blank",
600
+ "version": "secondary"
601
+ }
602
+ ],
603
+ "image": {
604
+ "src": "money-2.png",
605
+ "title": "Деньги",
606
+ "format": "webp",
607
+ "size": {
608
+ "width": 200,
609
+ "height": 200
610
+ }
496
611
  }
497
612
  }
498
613
  },
614
+ {
615
+ "type": "StepsBlock",
616
+ "style": ["col-span-12"],
617
+ "content": {
618
+ "title": "Рассчитайте условия на онлайн-калькуляторе и оставьте заявку на потребительский кредит",
619
+ "steps": [
620
+ {
621
+ "label": "Заявка на кредит",
622
+ "description": "Оставьте онлайн-заявку на потребительский кредит"
623
+ },
624
+ {
625
+ "label": "В случае одобрения",
626
+ "description": "Менеджер свяжется с вами и согласует встречу"
627
+ },
628
+ {
629
+ "label": "Получение наличных",
630
+ "description": "Получите наличные в отделении банка"
631
+ }
632
+ ]
633
+ }
634
+ },
499
635
  {
500
636
  "type": "Footer",
501
637
  "style": ["col-span-12"],
@@ -24,10 +24,13 @@ export type AsyncDataHook = <Data, Error = any>(
24
24
  fetcher: () => Promise<Data>,
25
25
  ) => { data?: Data; error?: Error };
26
26
 
27
+ export type GeolocationHook = (defaultLocation: string) => [string, () => void];
28
+
27
29
  export interface ContentPageContext {
28
30
  useRouter: () => Router;
29
31
  useState: <State>(initialState: State) => [State, (_: State) => void];
30
32
  useAsyncData: AsyncDataHook;
33
+ useGeolocation: GeolocationHook;
31
34
  useLikeService: () => LikeService;
32
35
  useSearch: () => Search;
33
36
  handlerDecorator?: HandlerDecorator;
@@ -18,10 +18,12 @@ const CURRENCY_ICONS_MAP = {
18
18
  EUR: EuroIcon,
19
19
  };
20
20
 
21
- const button: ButtonProps = {
22
- text: 'Все показатели',
23
- href: 'https://cbr.ru/currency_base/daily/',
24
- };
21
+ const buttons: ButtonProps[] = [
22
+ {
23
+ text: 'Все показатели',
24
+ href: 'https://cbr.ru/currency_base/daily/',
25
+ },
26
+ ];
25
27
 
26
28
  export const ExchangeRateTile = JSX<ExchangeRateTileProps>(({ className, context, title }) => {
27
29
  const { data } = context.useAsyncData(CBR_EXCHANGE_RATE_URL, fetchExchangeRate);
@@ -30,7 +32,7 @@ export const ExchangeRateTile = JSX<ExchangeRateTileProps>(({ className, context
30
32
  className={className}
31
33
  context={context}
32
34
  title={title || 'Курсы обмена валют'}
33
- button={button}
35
+ buttons={buttons}
34
36
  >
35
37
  <table>
36
38
  <thead>
@@ -4,7 +4,7 @@ import { Header } from './Header';
4
4
  export default (
5
5
  <Header
6
6
  context={context}
7
- location="Москва"
7
+ defaultLocation="Москва"
8
8
  topItems={[
9
9
  {
10
10
  href: 'https://rshb.ru/',
@@ -13,7 +13,7 @@ import { isTopItemActive } from './isTopItemActive';
13
13
 
14
14
  export interface HeaderProps extends HeaderContent, UniBlockProps {}
15
15
 
16
- export const Header = JSX<HeaderProps>(({ className, location, context, topItems }) => {
16
+ export const Header = JSX<HeaderProps>(({ className, defaultLocation, context, topItems }) => {
17
17
  const router = context.useRouter();
18
18
  const sitemap = useSitemap(context.useAsyncData);
19
19
  const { handlerDecorator } = context;
@@ -46,7 +46,11 @@ export const Header = JSX<HeaderProps>(({ className, location, context, topItems
46
46
  <div className="flex items-center">
47
47
  <Logo className="mr-8" />
48
48
  {topMenu}
49
- <HeaderSecondaryMenu location={location} className="ml-auto" />
49
+ <HeaderSecondaryMenu
50
+ context={context}
51
+ className="ml-auto"
52
+ defaultLocation={defaultLocation}
53
+ />
50
54
  </div>
51
55
  <div className="mt-5 h-[1px] bg-main-divider" />
52
56
  <nav className="mt-5">{subMenu}</nav>
@@ -1,6 +1,6 @@
1
1
  import type { TopMenuItem } from '../types';
2
2
 
3
3
  export interface HeaderContent {
4
- location?: string;
4
+ defaultLocation?: string;
5
5
  topItems?: TopMenuItem[];
6
6
  }
@@ -2,41 +2,55 @@ import { JSX } from '@redneckz/uni-jsx';
2
2
  import { GridIcon, LoupeIcon, ProfileIcon } from '../Icons/index';
3
3
  import { TopItem } from '../ui-kit/TopItem';
4
4
  import { HeaderSecondaryMenuButton } from './HeaderSecondaryMenuButton';
5
+ import type { UniBlockProps } from '../types';
5
6
 
6
- interface HeaderSecondaryMenuProps {
7
- location?: string;
7
+ interface HeaderSecondaryMenuContent {
8
+ defaultLocation?: string;
8
9
  className?: string;
9
10
  }
10
11
 
11
- export const HeaderSecondaryMenu = JSX<HeaderSecondaryMenuProps>(({ location, className }) => {
12
- return (
13
- <div className={`flex items-center ${className || ''}`}>
14
- <TopItem className="mr-5" flat={true} href="#" text={location} ariaLabel="Местоположение" />
15
- <TopItem
16
- className="mr-7"
17
- flat={true}
18
- href="#"
19
- text="Офисы и банкоматы"
20
- ariaLabel="Список всех доступных офисов и банкоматов"
21
- />
22
- <HeaderSecondaryMenuButton
23
- className="mr-5 text-primary-text hover:text-primary-main"
24
- ariaLabel="Поиск по сайту"
25
- >
26
- {LoupeIcon({ 'aria-hidden': true })}
27
- </HeaderSecondaryMenuButton>
28
- <HeaderSecondaryMenuButton
29
- className="mr-5 text-primary-text hover:text-primary-main"
30
- ariaLabel="Профиль"
31
- >
32
- {ProfileIcon({ 'aria-hidden': true })}
33
- </HeaderSecondaryMenuButton>
34
- <HeaderSecondaryMenuButton
35
- className="mr-5 text-secondary-light hover:text-secondary-active min-w-[32px] min-h-[32px]"
36
- ariaLabel="Дополнительные ссылки"
37
- >
38
- {GridIcon({ 'aria-hidden': true })}
39
- </HeaderSecondaryMenuButton>
40
- </div>
41
- );
42
- });
12
+ export interface HeaderSecondaryMenuProps extends HeaderSecondaryMenuContent, UniBlockProps {}
13
+
14
+ export const HeaderSecondaryMenu = JSX<HeaderSecondaryMenuProps>(
15
+ ({ context, className, defaultLocation = '' }) => {
16
+ const [city, getCity] = context.useGeolocation(defaultLocation);
17
+
18
+ return (
19
+ <div className={`flex items-center ${className || ''}`}>
20
+ <TopItem
21
+ className="mr-5"
22
+ flat={true}
23
+ href="#"
24
+ text={city}
25
+ ariaLabel="Местоположение"
26
+ onClick={getCity}
27
+ />
28
+ <TopItem
29
+ className="mr-7"
30
+ flat={true}
31
+ href="#"
32
+ text="Офисы и банкоматы"
33
+ ariaLabel="Список всех доступных офисов и банкоматов"
34
+ />
35
+ <HeaderSecondaryMenuButton
36
+ className="mr-5 text-primary-text hover:text-primary-main"
37
+ ariaLabel="Поиск по сайту"
38
+ >
39
+ {LoupeIcon({ 'aria-hidden': true })}
40
+ </HeaderSecondaryMenuButton>
41
+ <HeaderSecondaryMenuButton
42
+ className="mr-5 text-primary-text hover:text-primary-main"
43
+ ariaLabel="Профиль"
44
+ >
45
+ {ProfileIcon({ 'aria-hidden': true })}
46
+ </HeaderSecondaryMenuButton>
47
+ <HeaderSecondaryMenuButton
48
+ className="mr-5 text-secondary-light hover:text-secondary-active min-w-[32px] min-h-[32px]"
49
+ ariaLabel="Дополнительные ссылки"
50
+ >
51
+ {GridIcon({ 'aria-hidden': true })}
52
+ </HeaderSecondaryMenuButton>
53
+ </div>
54
+ );
55
+ },
56
+ );
@@ -27,7 +27,7 @@ export const MobileAppTile = JSX<MobileAppTileProps>(
27
27
  title={title}
28
28
  width="164"
29
29
  height="164"
30
- className="w-[90px] h-[90px] bg-secondary-light"
30
+ className="w-[90px] h-[90px] min-w-[90px] min-h-[90px] bg-secondary-light"
31
31
  />
32
32
  </a>
33
33
  )}
@@ -7,8 +7,8 @@ const image: Picture = {
7
7
  src: 'money-1.png',
8
8
  format: 'webp',
9
9
  size: {
10
- width: 300,
11
- height: 300,
10
+ width: 280,
11
+ height: 280,
12
12
  },
13
13
  };
14
14
 
@@ -70,6 +70,7 @@ export default {
70
70
  context={context}
71
71
  title={'Оплата проходит \nв 180 странах мира'}
72
72
  breadcrumbs={[]}
73
+ description="Кредит наличными без залога и поручительства. Потребительский кредит на любые цели. Нужен только паспорт."
73
74
  items={[
74
75
  'Совершайте любые личные покупки',
75
76
  'Используйте корпоративную карту как обычную дебетовую, если вы ИП',
@@ -2,13 +2,35 @@ import { JSX } from '@redneckz/uni-jsx';
2
2
  import { ProductBlockInner } from './ProductBlockInner';
3
3
  import type { ProductBlockInnerContent } from './ProductBlockInner';
4
4
  import type { UniBlockProps } from './types';
5
+ import { Breadcrumb, BreadcrumbProps } from './ui-kit/Breadcrumb';
6
+ import { useLink } from './useLink';
7
+ import { joinList } from './utils/joinList';
5
8
 
6
- export interface ProductBlockProps extends ProductBlockInnerContent, UniBlockProps {}
9
+ export interface ProductBlockProps extends ProductBlockInnerContent, UniBlockProps {
10
+ breadcrumbs?: BreadcrumbProps[];
11
+ }
7
12
 
8
13
  export const ProductBlock = JSX<ProductBlockProps>((props) => {
9
- const className = props.className;
14
+ const { context, className, breadcrumbs } = props;
15
+ const router = context.useRouter();
16
+ const { handlerDecorator } = context;
10
17
  return (
11
- <section className={`bg-white p-11 pr-[7.5rem] ${className || ''}`}>
18
+ <section className={`font-sans bg-white pl-12 pr-[7.5rem] py-10 ${className || ''}`}>
19
+ {breadcrumbs?.length ? (
20
+ <div className="text-xs mb-6">
21
+ {joinList(<span className="text-secondary-text mx-2">/</span>)(
22
+ breadcrumbs.map((breadcrumb, i) => (
23
+ <Breadcrumb
24
+ key={String(i)}
25
+ {...useLink(
26
+ { router, handlerDecorator },
27
+ { className: 'text-secondary-text', ...breadcrumb },
28
+ )}
29
+ />
30
+ )),
31
+ )}
32
+ </div>
33
+ ) : null}
12
34
  <ProductBlockInner {...props} />
13
35
  </section>
14
36
  );