@megafon/ui-shared 5.10.2 → 5.12.0
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.
- package/CHANGELOG.md +30 -0
- package/dist/es/components/BenefitsIcons/BenefitsIcons.d.ts +4 -0
- package/dist/es/components/BenefitsIcons/BenefitsIcons.js +25 -6
- package/dist/es/components/BenefitsIcons/BenefitsIconsTile.js +24 -10
- package/dist/es/components/BenefitsIcons/types.d.ts +12 -0
- package/dist/es/components/ImageBanner/ImageBanner.css +3 -0
- package/dist/es/components/ImageBanner/ImageBanner.d.ts +7 -0
- package/dist/es/components/ImageBanner/ImageBanner.js +15 -7
- package/dist/es/components/Instructions/Instructions.css +176 -39
- package/dist/es/components/Instructions/Instructions.d.ts +9 -0
- package/dist/es/components/Instructions/Instructions.js +35 -21
- package/dist/es/components/Instructions/img/iphone15.png +0 -0
- package/dist/es/components/Instructions/img/laptop-new.png +0 -0
- package/dist/es/components/StoreBanner/StoreBanner.css +13 -9
- package/dist/es/components/StoreBanner/StoreBanner.d.ts +6 -5
- package/dist/es/components/StoreBanner/StoreBanner.js +5 -3
- package/dist/es/components/StoreBanner/doc/img/android-screen.png +0 -0
- package/dist/es/components/StoreBanner/doc/img/screen.png +0 -0
- package/dist/es/components/StoreBanner/img/android.png +0 -0
- package/dist/es/components/StoreBanner/img/new-iphone.png +0 -0
- package/dist/es/helpers/getColumnConfig.d.ts +1 -1
- package/dist/lib/components/BenefitsIcons/BenefitsIcons.d.ts +4 -0
- package/dist/lib/components/BenefitsIcons/BenefitsIcons.js +24 -5
- package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.js +26 -11
- package/dist/lib/components/BenefitsIcons/types.d.ts +12 -0
- package/dist/lib/components/ImageBanner/ImageBanner.css +3 -0
- package/dist/lib/components/ImageBanner/ImageBanner.d.ts +7 -0
- package/dist/lib/components/ImageBanner/ImageBanner.js +15 -7
- package/dist/lib/components/Instructions/Instructions.css +176 -39
- package/dist/lib/components/Instructions/Instructions.d.ts +9 -0
- package/dist/lib/components/Instructions/Instructions.js +39 -22
- package/dist/lib/components/Instructions/img/iphone15.png +0 -0
- package/dist/lib/components/Instructions/img/laptop-new.png +0 -0
- package/dist/lib/components/StoreBanner/StoreBanner.css +13 -9
- package/dist/lib/components/StoreBanner/StoreBanner.d.ts +6 -5
- package/dist/lib/components/StoreBanner/StoreBanner.js +5 -3
- package/dist/lib/components/StoreBanner/doc/img/android-screen.png +0 -0
- package/dist/lib/components/StoreBanner/doc/img/screen.png +0 -0
- package/dist/lib/components/StoreBanner/img/android.png +0 -0
- package/dist/lib/components/StoreBanner/img/new-iphone.png +0 -0
- package/dist/lib/helpers/getColumnConfig.d.ts +1 -1
- package/package.json +3 -3
- package/dist/es/components/StoreBanner/doc/img/iphone-12-screen.png +0 -0
- package/dist/es/components/StoreBanner/doc/img/new-iphone-screen.png +0 -0
- package/dist/lib/components/StoreBanner/doc/img/iphone-12-screen.png +0 -0
- package/dist/lib/components/StoreBanner/doc/img/new-iphone-screen.png +0 -0
@@ -11,7 +11,7 @@ h5 {
|
|
11
11
|
}
|
12
12
|
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
13
13
|
.mfui-instructions__title_resolution_mobile {
|
14
|
-
margin-bottom:
|
14
|
+
margin-bottom: 40px;
|
15
15
|
}
|
16
16
|
}
|
17
17
|
@media screen and (min-width: 1024px) {
|
@@ -59,6 +59,9 @@ h5 {
|
|
59
59
|
align-items: unset;
|
60
60
|
}
|
61
61
|
}
|
62
|
+
.mfui-instructions__text {
|
63
|
+
margin-top: 48px;
|
64
|
+
}
|
62
65
|
@media screen and (max-width: 1023px) {
|
63
66
|
.mfui-instructions__text {
|
64
67
|
text-align: center;
|
@@ -72,12 +75,7 @@ h5 {
|
|
72
75
|
}
|
73
76
|
@media screen and (max-width: 1023px) {
|
74
77
|
.mfui-instructions__picture {
|
75
|
-
margin: 0 auto
|
76
|
-
}
|
77
|
-
}
|
78
|
-
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
79
|
-
.mfui-instructions__picture {
|
80
|
-
margin: 0 auto 48px;
|
78
|
+
margin: 0 auto;
|
81
79
|
}
|
82
80
|
}
|
83
81
|
@media screen and (min-width: 1024px) {
|
@@ -235,6 +233,35 @@ h5 {
|
|
235
233
|
border-radius: 20px;
|
236
234
|
overflow: hidden;
|
237
235
|
}
|
236
|
+
.mfui-instructions_mask_iphone-15 .mfui-instructions__img-wrapper {
|
237
|
+
height: 487px;
|
238
|
+
}
|
239
|
+
@media screen and (max-width: 1023px) {
|
240
|
+
.mfui-instructions_mask_iphone-15 .mfui-instructions__img-wrapper:before {
|
241
|
+
display: none;
|
242
|
+
}
|
243
|
+
}
|
244
|
+
.mfui-instructions_mask_iphone-15 .mfui-instructions__device-screen {
|
245
|
+
position: relative;
|
246
|
+
z-index: 2;
|
247
|
+
width: 100%;
|
248
|
+
height: 486px;
|
249
|
+
margin: auto;
|
250
|
+
background: url('./img/iphone15.png') 50% no-repeat;
|
251
|
+
background-size: contain;
|
252
|
+
}
|
253
|
+
.mfui-instructions_mask_iphone-15 .mfui-instructions__swiper {
|
254
|
+
position: absolute;
|
255
|
+
top: 10px;
|
256
|
+
right: 0;
|
257
|
+
left: 0;
|
258
|
+
z-index: 1;
|
259
|
+
width: 217px;
|
260
|
+
height: 468px;
|
261
|
+
margin: auto;
|
262
|
+
border-radius: 20px;
|
263
|
+
overflow: hidden;
|
264
|
+
}
|
238
265
|
.mfui-instructions_mask_android-cropped .mfui-instructions__img-wrapper {
|
239
266
|
height: 420px;
|
240
267
|
min-height: 420px;
|
@@ -324,7 +351,10 @@ h5 {
|
|
324
351
|
}
|
325
352
|
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
326
353
|
.mfui-instructions_mask_laptop .mfui-instructions__img-wrapper {
|
327
|
-
height:
|
354
|
+
height: 0;
|
355
|
+
padding-bottom: 53.4%;
|
356
|
+
background: url('./img/laptop.png') 50% 0% no-repeat;
|
357
|
+
background-size: 100%;
|
328
358
|
}
|
329
359
|
}
|
330
360
|
@media screen and (min-width: 480px) and (max-width: 767px) {
|
@@ -410,11 +440,95 @@ h5 {
|
|
410
440
|
transform: translate(-50%, -53%);
|
411
441
|
}
|
412
442
|
}
|
443
|
+
@media screen and (max-width: 1023px) {
|
444
|
+
.mfui-instructions_mask_laptop-new .mfui-instructions__img-wrapper {
|
445
|
+
height: 0;
|
446
|
+
padding-bottom: 58.9%;
|
447
|
+
background: url('./img/laptop-new.png') 50% 0% no-repeat;
|
448
|
+
background-size: 100%;
|
449
|
+
}
|
450
|
+
}
|
451
|
+
.mfui-instructions_mask_laptop-new .mfui-instructions__img-wrapper:before {
|
452
|
+
display: none;
|
453
|
+
}
|
454
|
+
.mfui-instructions_mask_laptop-new .mfui-instructions__device-screen {
|
455
|
+
position: relative;
|
456
|
+
width: 100%;
|
457
|
+
height: 100%;
|
458
|
+
margin: auto;
|
459
|
+
background: url('./img/laptop-new.png') 50% 0% no-repeat;
|
460
|
+
background-size: 100%;
|
461
|
+
}
|
462
|
+
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
463
|
+
.mfui-instructions_mask_laptop-new .mfui-instructions__device-screen {
|
464
|
+
width: 530px;
|
465
|
+
}
|
466
|
+
}
|
467
|
+
@media screen and (min-width: 480px) and (max-width: 767px) {
|
468
|
+
.mfui-instructions_mask_laptop-new .mfui-instructions__device-screen {
|
469
|
+
width: 450px;
|
470
|
+
}
|
471
|
+
}
|
472
|
+
@media screen and (max-width: 479px) {
|
473
|
+
.mfui-instructions_mask_laptop-new .mfui-instructions__device-screen {
|
474
|
+
width: 270px;
|
475
|
+
}
|
476
|
+
}
|
477
|
+
@media screen and (min-width: 1024px) {
|
478
|
+
.mfui-instructions_mask_laptop-new .mfui-instructions__device-screen {
|
479
|
+
background: url('./img/laptop-new.png') 50% no-repeat;
|
480
|
+
background-size: contain;
|
481
|
+
}
|
482
|
+
}
|
483
|
+
.mfui-instructions_mask_laptop-new .mfui-instructions__swiper {
|
484
|
+
position: absolute;
|
485
|
+
top: 4px;
|
486
|
+
right: 0;
|
487
|
+
left: 50%;
|
488
|
+
width: 78%;
|
489
|
+
margin: auto;
|
490
|
+
overflow: hidden;
|
491
|
+
-webkit-transform: translate(-49.5%, 0);
|
492
|
+
transform: translate(-49.5%, 0);
|
493
|
+
}
|
494
|
+
@media screen and (min-width: 480px) and (max-width: 767px) {
|
495
|
+
.mfui-instructions_mask_laptop-new .mfui-instructions__swiper {
|
496
|
+
top: 7px;
|
497
|
+
max-width: 415px;
|
498
|
+
}
|
499
|
+
}
|
500
|
+
@media screen and (max-width: 479px) {
|
501
|
+
.mfui-instructions_mask_laptop-new .mfui-instructions__swiper {
|
502
|
+
max-width: 302px;
|
503
|
+
}
|
504
|
+
}
|
505
|
+
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
506
|
+
.mfui-instructions_mask_laptop-new .mfui-instructions__swiper {
|
507
|
+
top: 12px;
|
508
|
+
}
|
509
|
+
}
|
510
|
+
@media screen and (min-width: 1024px) {
|
511
|
+
.mfui-instructions_mask_laptop-new .mfui-instructions__swiper {
|
512
|
+
top: 50%;
|
513
|
+
-webkit-transform: translate(-49.5%, -55%);
|
514
|
+
transform: translate(-49.5%, -55%);
|
515
|
+
}
|
516
|
+
}
|
413
517
|
.mfui-instructions__slide {
|
414
518
|
-ms-flex-negative: 0;
|
415
519
|
flex-shrink: 0;
|
416
520
|
height: 100%;
|
417
521
|
}
|
522
|
+
@media screen and (max-width: 767px) {
|
523
|
+
.mfui-instructions__articles {
|
524
|
+
margin-top: 24px;
|
525
|
+
}
|
526
|
+
}
|
527
|
+
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
528
|
+
.mfui-instructions__articles {
|
529
|
+
margin-top: 32px;
|
530
|
+
}
|
531
|
+
}
|
418
532
|
@media screen and (min-width: 1024px) {
|
419
533
|
.mfui-instructions__articles {
|
420
534
|
-webkit-box-ordinal-group: 2;
|
@@ -433,9 +547,6 @@ h5 {
|
|
433
547
|
padding: 0;
|
434
548
|
list-style-type: none;
|
435
549
|
}
|
436
|
-
.mfui-instructions__articles-list_text-after {
|
437
|
-
margin-bottom: 48px;
|
438
|
-
}
|
439
550
|
@media screen and (min-width: 1024px) {
|
440
551
|
.mfui-instructions__articles-list_mobile {
|
441
552
|
display: none;
|
@@ -476,8 +587,7 @@ h5 {
|
|
476
587
|
margin-bottom: 0;
|
477
588
|
}
|
478
589
|
}
|
479
|
-
.mfui-instructions__articles-item-dot
|
480
|
-
.mfui-instructions__articles-dot {
|
590
|
+
.mfui-instructions__articles-item-dot {
|
481
591
|
position: absolute;
|
482
592
|
display: inline-block;
|
483
593
|
width: 40px;
|
@@ -492,13 +602,11 @@ h5 {
|
|
492
602
|
cursor: pointer;
|
493
603
|
}
|
494
604
|
@media screen and (max-width: 479px) {
|
495
|
-
.mfui-instructions__articles-item-dot
|
496
|
-
.mfui-instructions__articles-dot {
|
605
|
+
.mfui-instructions__articles-item-dot {
|
497
606
|
min-width: 40px;
|
498
607
|
}
|
499
608
|
}
|
500
|
-
.mfui-instructions__articles-item-dot:before
|
501
|
-
.mfui-instructions__articles-dot:before {
|
609
|
+
.mfui-instructions__articles-item-dot:before {
|
502
610
|
content: '';
|
503
611
|
position: absolute;
|
504
612
|
top: 50%;
|
@@ -509,8 +617,7 @@ h5 {
|
|
509
617
|
-webkit-transition: all 0.3s ease;
|
510
618
|
transition: all 0.3s ease;
|
511
619
|
}
|
512
|
-
.mfui-instructions__articles-item-dot-number
|
513
|
-
.mfui-instructions__articles-dot-number {
|
620
|
+
.mfui-instructions__articles-item-dot-number {
|
514
621
|
position: relative;
|
515
622
|
}
|
516
623
|
.mfui-instructions__articles-item-title {
|
@@ -537,44 +644,51 @@ h5 {
|
|
537
644
|
padding: 0;
|
538
645
|
list-style-type: none;
|
539
646
|
}
|
540
|
-
.mfui-instructions__articles-dots_text-after {
|
541
|
-
margin-bottom: 48px;
|
542
|
-
}
|
543
|
-
.mfui-instructions__articles-dot {
|
544
|
-
position: relative;
|
545
|
-
}
|
546
647
|
@media screen and (max-width: 767px) {
|
547
|
-
.mfui-instructions__articles-
|
548
|
-
margin-
|
648
|
+
.mfui-instructions__articles-dots {
|
649
|
+
margin-top: 16px;
|
549
650
|
}
|
550
651
|
}
|
551
652
|
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
552
|
-
.mfui-instructions__articles-
|
553
|
-
margin-
|
653
|
+
.mfui-instructions__articles-dots {
|
654
|
+
margin-top: 24px;
|
655
|
+
}
|
656
|
+
}
|
657
|
+
@media screen and (min-width: 1024px) {
|
658
|
+
.mfui-instructions__articles-dots {
|
659
|
+
display: none;
|
554
660
|
}
|
555
661
|
}
|
662
|
+
.mfui-instructions__articles-dots_text-after {
|
663
|
+
margin-bottom: 48px;
|
664
|
+
}
|
665
|
+
.mfui-instructions__articles-dot {
|
666
|
+
position: relative;
|
667
|
+
display: inline-block;
|
668
|
+
width: 8px;
|
669
|
+
height: 8px;
|
670
|
+
margin-right: 12px;
|
671
|
+
border-radius: 4px;
|
672
|
+
background: var(--spbSky2);
|
673
|
+
cursor: pointer;
|
674
|
+
}
|
556
675
|
.mfui-instructions__articles-dot:hover,
|
557
676
|
.mfui-instructions__articles-dot_active {
|
558
|
-
color: var(--stcWhite);
|
559
|
-
}
|
560
|
-
.mfui-instructions__articles-dot:hover:before,
|
561
|
-
.mfui-instructions__articles-dot_active:before {
|
562
|
-
top: 0;
|
563
|
-
right: 0;
|
564
|
-
bottom: 0;
|
565
|
-
left: 0;
|
566
677
|
background: var(--brandGreen);
|
567
678
|
}
|
679
|
+
.mfui-instructions__articles-dot_active {
|
680
|
+
width: 20px;
|
681
|
+
}
|
568
682
|
.mfui-instructions__articles-dot:last-child {
|
569
683
|
margin-right: 0;
|
570
684
|
}
|
571
685
|
.mfui-instructions__articles-title-block {
|
686
|
+
margin: 0 auto;
|
572
687
|
text-align: center;
|
573
688
|
}
|
574
689
|
@media screen and (max-width: 767px) {
|
575
690
|
.mfui-instructions__articles-title-block {
|
576
691
|
width: 55%;
|
577
|
-
margin: 0 auto 24px;
|
578
692
|
}
|
579
693
|
}
|
580
694
|
@media screen and (max-width: 479px) {
|
@@ -585,7 +699,6 @@ h5 {
|
|
585
699
|
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
586
700
|
.mfui-instructions__articles-title-block {
|
587
701
|
width: 55%;
|
588
|
-
margin: 0 auto 32px;
|
589
702
|
}
|
590
703
|
}
|
591
704
|
.mfui-instructions__articles-title {
|
@@ -651,3 +764,27 @@ h5 {
|
|
651
764
|
line-height: 12px;
|
652
765
|
text-align: center;
|
653
766
|
}
|
767
|
+
.mfui-instructions_reversed .mfui-instructions__title_resolution_mobile {
|
768
|
+
margin-bottom: 16px;
|
769
|
+
}
|
770
|
+
@media screen and (max-width: 1023px) {
|
771
|
+
.mfui-instructions_reversed .mfui-instructions__picture {
|
772
|
+
max-height: 100%;
|
773
|
+
margin-bottom: 0;
|
774
|
+
}
|
775
|
+
}
|
776
|
+
@media screen and (max-width: 1023px) {
|
777
|
+
.mfui-instructions_reversed .mfui-instructions__articles {
|
778
|
+
display: none;
|
779
|
+
}
|
780
|
+
}
|
781
|
+
@media screen and (max-width: 767px) {
|
782
|
+
.mfui-instructions_reversed .mfui-instructions__articles-title-block {
|
783
|
+
margin-bottom: 32px;
|
784
|
+
}
|
785
|
+
}
|
786
|
+
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
787
|
+
.mfui-instructions_reversed .mfui-instructions__articles-title-block {
|
788
|
+
margin-bottom: 40px;
|
789
|
+
}
|
790
|
+
}
|
@@ -17,7 +17,9 @@ export declare const pictureMaskTypes: {
|
|
17
17
|
readonly BLACK_IPHONE: "black-iphone";
|
18
18
|
readonly WHITE_IPHONE: "white-iphone";
|
19
19
|
readonly LAPTOP: "laptop";
|
20
|
+
readonly LAPTOP_NEW: "laptop-new";
|
20
21
|
readonly IPHONE_12: "iphone-12";
|
22
|
+
readonly IPHONE_15: "iphone-15";
|
21
23
|
readonly IPHONE_CROPPED: "iphone-cropped";
|
22
24
|
readonly NONE: "none";
|
23
25
|
};
|
@@ -28,11 +30,16 @@ export declare const arrowTheme: {
|
|
28
30
|
readonly PURPLE: "purple";
|
29
31
|
readonly DARK: "dark";
|
30
32
|
};
|
33
|
+
export declare const elementOrderTypes: {
|
34
|
+
readonly DEFAULT: "default";
|
35
|
+
readonly REVERSED: "reversed";
|
36
|
+
};
|
31
37
|
declare type PictureAlignTypesType = typeof pictureAlignTypes[keyof typeof pictureAlignTypes];
|
32
38
|
declare type PictureVerticalAlignTypesType = typeof pictureVerticalAlignTypes[keyof typeof pictureVerticalAlignTypes];
|
33
39
|
declare type PictureMaskTypesType = typeof pictureMaskTypes[keyof typeof pictureMaskTypes];
|
34
40
|
declare type PictureBackgroundColorsType = typeof pictureBackgroundColorTypes[keyof typeof pictureBackgroundColorTypes];
|
35
41
|
declare type ArrowThemeType = typeof arrowTheme[keyof typeof arrowTheme];
|
42
|
+
declare type ElementOrderType = typeof elementOrderTypes[keyof typeof elementOrderTypes];
|
36
43
|
export declare type InstructionItemType = {
|
37
44
|
title: string | React.ReactNode | React.ReactNode[];
|
38
45
|
mediaUrl: string;
|
@@ -87,6 +94,8 @@ export interface IInstructionsProps {
|
|
87
94
|
showArrows?: boolean;
|
88
95
|
/** Цветовая тема стрелок навигации */
|
89
96
|
arrowsTheme?: ArrowThemeType;
|
97
|
+
/** Вертикальный порядок элементов на мобильных устройствах и планшетах */
|
98
|
+
elementOrder?: ElementOrderType;
|
90
99
|
/** Ref на swiper */
|
91
100
|
getSwiper?: (instance: SwiperCore) => void;
|
92
101
|
}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports["default"] = exports.arrowTheme = exports.pictureBackgroundColorTypes = exports.pictureMaskTypes = exports.pictureVerticalAlignTypes = exports.pictureAlignTypes = void 0;
|
6
|
+
exports["default"] = exports.elementOrderTypes = exports.arrowTheme = exports.pictureBackgroundColorTypes = exports.pictureMaskTypes = exports.pictureVerticalAlignTypes = exports.pictureAlignTypes = void 0;
|
7
7
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
9
9
|
|
@@ -44,7 +44,9 @@ var pictureMaskTypes = {
|
|
44
44
|
BLACK_IPHONE: 'black-iphone',
|
45
45
|
WHITE_IPHONE: 'white-iphone',
|
46
46
|
LAPTOP: 'laptop',
|
47
|
+
LAPTOP_NEW: 'laptop-new',
|
47
48
|
IPHONE_12: 'iphone-12',
|
49
|
+
IPHONE_15: 'iphone-15',
|
48
50
|
IPHONE_CROPPED: 'iphone-cropped',
|
49
51
|
NONE: 'none'
|
50
52
|
};
|
@@ -58,6 +60,11 @@ var arrowTheme = {
|
|
58
60
|
DARK: 'dark'
|
59
61
|
};
|
60
62
|
exports.arrowTheme = arrowTheme;
|
63
|
+
var elementOrderTypes = {
|
64
|
+
DEFAULT: 'default',
|
65
|
+
REVERSED: 'reversed'
|
66
|
+
};
|
67
|
+
exports.elementOrderTypes = elementOrderTypes;
|
61
68
|
var testIdPrefix = 'Instructions';
|
62
69
|
var cn = (0, _uiHelpers.cnCreate)('mfui-instructions');
|
63
70
|
var swiperSlideCn = cn('slide');
|
@@ -92,6 +99,8 @@ var Instructions = function Instructions(_ref) {
|
|
92
99
|
showArrows = _ref.showArrows,
|
93
100
|
_ref$arrowsTheme = _ref.arrowsTheme,
|
94
101
|
arrowsTheme = _ref$arrowsTheme === void 0 ? arrowTheme.DARK : _ref$arrowsTheme,
|
102
|
+
_ref$elementOrder = _ref.elementOrder,
|
103
|
+
elementOrder = _ref$elementOrder === void 0 ? 'default' : _ref$elementOrder,
|
95
104
|
children = _ref.children;
|
96
105
|
|
97
106
|
var _React$useState = _react["default"].useState(),
|
@@ -104,6 +113,8 @@ var Instructions = function Instructions(_ref) {
|
|
104
113
|
slideIndex = _React$useState4[0],
|
105
114
|
setSlideIndex = _React$useState4[1];
|
106
115
|
|
116
|
+
var isMobileReversed = elementOrder === 'reversed';
|
117
|
+
|
107
118
|
var getSwiperInstance = _react["default"].useCallback(function (swiper) {
|
108
119
|
setSwiperInstance(swiper);
|
109
120
|
getSwiper && getSwiper(swiper);
|
@@ -160,6 +171,23 @@ var Instructions = function Instructions(_ref) {
|
|
160
171
|
}));
|
161
172
|
}, [dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.image]);
|
162
173
|
|
174
|
+
var renderMobileDots = _react["default"].useCallback(function () {
|
175
|
+
return /*#__PURE__*/_react["default"].createElement("ul", {
|
176
|
+
className: cn('articles-dots', {
|
177
|
+
reversed: isMobileReversed
|
178
|
+
}),
|
179
|
+
"data-testid": "".concat(testIdPrefix, "-articles-dots-mobile")
|
180
|
+
}, instructionItems.map(function (_item, i) {
|
181
|
+
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.item, i + 1), {
|
182
|
+
key: i,
|
183
|
+
className: cn('articles-dot', {
|
184
|
+
active: slideIndex === i
|
185
|
+
}, [getActiveCustomClass(i, slideIndex), instructionItem, mobileInstructionItem]),
|
186
|
+
onClick: handleArticleClick(i)
|
187
|
+
}));
|
188
|
+
}));
|
189
|
+
}, [instructionItems, dataAttrs, slideIndex, instructionItem, mobileInstructionItem, getActiveCustomClass, handleArticleClick, isMobileReversed]);
|
190
|
+
|
163
191
|
var renderSlider = _react["default"].useCallback(function () {
|
164
192
|
return /*#__PURE__*/_react["default"].createElement(_react2.Swiper, {
|
165
193
|
noSwiping: false,
|
@@ -268,7 +296,9 @@ var Instructions = function Instructions(_ref) {
|
|
268
296
|
}),
|
269
297
|
"data-testid": "".concat(testIdPrefix, "-articles-list-mobile")
|
270
298
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
271
|
-
className: cn('articles-title-block'
|
299
|
+
className: cn('articles-title-block', {
|
300
|
+
reversed: isMobileReversed
|
301
|
+
})
|
272
302
|
}, instructionItems.map(function (_ref6, i) {
|
273
303
|
var itemTitle = _ref6.title;
|
274
304
|
return slideIndex === i && /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
|
@@ -277,23 +307,8 @@ var Instructions = function Instructions(_ref) {
|
|
277
307
|
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.mobileItemText, i + 1), {
|
278
308
|
className: cn('articles-title', [mobileItemTitle])
|
279
309
|
}), itemTitle);
|
280
|
-
})), /*#__PURE__*/_react["default"].createElement("ul", {
|
281
|
-
className: cn('articles-dots', {
|
282
|
-
'text-after': !!text
|
283
|
-
}),
|
284
|
-
"data-testid": "".concat(testIdPrefix, "-articles-dots-mobile")
|
285
|
-
}, instructionItems.map(function (_item, i) {
|
286
|
-
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.item, i + 1), {
|
287
|
-
key: i,
|
288
|
-
className: cn('articles-dot', {
|
289
|
-
active: slideIndex === i
|
290
|
-
}, [getActiveCustomClass(i, slideIndex), instructionItem, mobileInstructionItem]),
|
291
|
-
onClick: handleArticleClick(i)
|
292
|
-
}), /*#__PURE__*/_react["default"].createElement("span", {
|
293
|
-
className: cn('articles-dot-number')
|
294
|
-
}, i + 1));
|
295
310
|
})));
|
296
|
-
}, [dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.mobileItemText,
|
311
|
+
}, [dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.mobileItemText, instructionItems, mobileItemTitle, slideIndex, isMobileReversed]);
|
297
312
|
|
298
313
|
var renderArrows = _react["default"].useCallback(function () {
|
299
314
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_uiCore.NavArrow, {
|
@@ -322,7 +337,8 @@ var Instructions = function Instructions(_ref) {
|
|
322
337
|
|
323
338
|
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
324
339
|
className: cn({
|
325
|
-
mask: pictureMask
|
340
|
+
mask: pictureMask,
|
341
|
+
reversed: isMobileReversed
|
326
342
|
}),
|
327
343
|
ref: rootRef
|
328
344
|
}), /*#__PURE__*/_react["default"].createElement(_uiCore.Grid, {
|
@@ -339,11 +355,11 @@ var Instructions = function Instructions(_ref) {
|
|
339
355
|
background: pictureBackgroundColor
|
340
356
|
}),
|
341
357
|
"data-testid": "".concat(testIdPrefix, "-picture")
|
342
|
-
}, renderPicture(), !!showArrows && renderArrows(), renderQrCode()), /*#__PURE__*/_react["default"].createElement("div", {
|
358
|
+
}, isMobileReversed && renderMobileArticles(), renderPicture(), !!showArrows && renderArrows(), renderQrCode()), renderMobileDots(), /*#__PURE__*/_react["default"].createElement("div", {
|
343
359
|
className: cn('articles', {
|
344
360
|
align: pictureAlign
|
345
361
|
})
|
346
|
-
}, !!title && renderTitle('desktop'), renderMobileArticles(), renderDesktopArticles(), text && renderText(), children)))));
|
362
|
+
}, !!title && renderTitle('desktop'), !isMobileReversed && renderMobileArticles(), renderDesktopArticles(), text && renderText(), children)))));
|
347
363
|
};
|
348
364
|
|
349
365
|
Instructions.propTypes = {
|
@@ -380,10 +396,11 @@ Instructions.propTypes = {
|
|
380
396
|
}).isRequired).isRequired,
|
381
397
|
pictureAlign: _propTypes["default"].oneOf([pictureAlignTypes.LEFT, pictureAlignTypes.RIGHT]),
|
382
398
|
pictureVerticalAlign: _propTypes["default"].oneOf([pictureVerticalAlignTypes.CENTER, pictureVerticalAlignTypes.TOP, pictureVerticalAlignTypes.UNSET]),
|
383
|
-
pictureMask: _propTypes["default"].oneOf([pictureMaskTypes.ANDROID, pictureMaskTypes.ANDROID_CROPPED, pictureMaskTypes.NEW_IPHONE, pictureMaskTypes.WHITE_IPHONE, pictureMaskTypes.BLACK_IPHONE, pictureMaskTypes.LAPTOP, pictureMaskTypes.IPHONE_12, pictureMaskTypes.IPHONE_CROPPED, pictureMaskTypes.NONE]),
|
399
|
+
pictureMask: _propTypes["default"].oneOf([pictureMaskTypes.ANDROID, pictureMaskTypes.ANDROID_CROPPED, pictureMaskTypes.NEW_IPHONE, pictureMaskTypes.WHITE_IPHONE, pictureMaskTypes.BLACK_IPHONE, pictureMaskTypes.LAPTOP, pictureMaskTypes.LAPTOP_NEW, pictureMaskTypes.IPHONE_12, pictureMaskTypes.IPHONE_15, pictureMaskTypes.IPHONE_CROPPED, pictureMaskTypes.NONE]),
|
384
400
|
pictureBackgroundColor: _propTypes["default"].oneOf([pictureBackgroundColorTypes.SPB_SKY_0]),
|
385
401
|
showArrows: _propTypes["default"].bool,
|
386
402
|
arrowsTheme: _propTypes["default"].oneOf([arrowTheme.DARK, arrowTheme.PURPLE]),
|
403
|
+
elementOrder: _propTypes["default"].oneOf([elementOrderTypes.DEFAULT, elementOrderTypes.REVERSED]),
|
387
404
|
getSwiper: _propTypes["default"].func
|
388
405
|
};
|
389
406
|
var _default = Instructions;
|
Binary file
|
Binary file
|
@@ -38,35 +38,39 @@ h5 {
|
|
38
38
|
background-image: url('./img/new-iphone.png');
|
39
39
|
}
|
40
40
|
.mfui-store-banner_mask_new-iphone .mfui-store-banner__screen {
|
41
|
-
top:
|
41
|
+
top: 9px;
|
42
42
|
z-index: 1;
|
43
|
-
width:
|
43
|
+
width: 90%;
|
44
|
+
border-radius: 14px;
|
44
45
|
}
|
45
46
|
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
46
47
|
.mfui-store-banner_mask_new-iphone .mfui-store-banner__screen {
|
47
|
-
top:
|
48
|
+
top: 8px;
|
48
49
|
}
|
49
50
|
}
|
50
51
|
@media screen and (max-width: 767px) {
|
51
52
|
.mfui-store-banner_mask_new-iphone .mfui-store-banner__screen {
|
52
|
-
top:
|
53
|
+
top: 30px;
|
53
54
|
}
|
54
55
|
}
|
55
56
|
.mfui-store-banner_mask_android .mfui-store-banner__device-mask {
|
57
|
+
position: relative;
|
58
|
+
z-index: 2;
|
56
59
|
background-image: url('./img/android.png');
|
57
60
|
}
|
58
61
|
.mfui-store-banner_mask_android .mfui-store-banner__screen {
|
59
|
-
top:
|
60
|
-
width:
|
62
|
+
top: 9px;
|
63
|
+
width: 92%;
|
64
|
+
border-radius: 14px;
|
61
65
|
}
|
62
66
|
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
63
67
|
.mfui-store-banner_mask_android .mfui-store-banner__screen {
|
64
|
-
top:
|
68
|
+
top: 8px;
|
65
69
|
}
|
66
70
|
}
|
67
71
|
@media screen and (max-width: 767px) {
|
68
72
|
.mfui-store-banner_mask_android .mfui-store-banner__screen {
|
69
|
-
top:
|
73
|
+
top: 30px;
|
70
74
|
}
|
71
75
|
}
|
72
76
|
.mfui-store-banner_mask_white-iphone .mfui-store-banner__device-mask {
|
@@ -144,7 +148,7 @@ h5 {
|
|
144
148
|
padding-top: 32px;
|
145
149
|
padding-bottom: 32px;
|
146
150
|
border: 1px solid var(--spbSky2);
|
147
|
-
border-radius:
|
151
|
+
border-radius: 24px;
|
148
152
|
}
|
149
153
|
@media screen and (max-width: 767px) {
|
150
154
|
.mfui-store-banner__grid {
|
@@ -10,10 +10,11 @@ export declare const Theme: {
|
|
10
10
|
declare type ThemeType = typeof Theme[keyof typeof Theme];
|
11
11
|
export declare const DeviceMask: {
|
12
12
|
readonly ANDROID: "android";
|
13
|
-
readonly BLACK_IPHONE: "black-iphone";
|
14
|
-
readonly IPHONE_12: "iphone-12";
|
15
13
|
readonly NEW_IPHONE: "new-iphone";
|
14
|
+
/** DEPRECATED: 'black-iphone', 'white-iphone', 'iphone-12' */
|
15
|
+
readonly BLACK_IPHONE: "black-iphone";
|
16
16
|
readonly WHITE_IPHONE: "white-iphone";
|
17
|
+
readonly IPHONE_12: "iphone-12";
|
17
18
|
};
|
18
19
|
declare type DeviceMaskType = typeof DeviceMask[keyof typeof DeviceMask];
|
19
20
|
declare type LinkHrefType = StoreButtonPropsType['href'];
|
@@ -23,7 +24,7 @@ export interface IStoreBannerProps {
|
|
23
24
|
title: string;
|
24
25
|
/** Текст */
|
25
26
|
text: string;
|
26
|
-
/** Ссылка на скачивание приложения в
|
27
|
+
/** Ссылка на скачивание приложения в App Store */
|
27
28
|
linkApple?: LinkHrefType;
|
28
29
|
/** Обработчик клика по ссылке в App Store */
|
29
30
|
onClickApple?: LinkOnClickType;
|
@@ -53,7 +54,7 @@ export interface IStoreBannerProps {
|
|
53
54
|
onClickVAppstore?: LinkOnClickType;
|
54
55
|
/** Текст кнопки */
|
55
56
|
textButton?: string;
|
56
|
-
/** Ссылка для
|
57
|
+
/** Ссылка для кнопки */
|
57
58
|
linkButton?: string;
|
58
59
|
/** Rel - атрибут тега <a> для всех кнопок баннера */
|
59
60
|
rel?: string;
|
@@ -61,7 +62,7 @@ export interface IStoreBannerProps {
|
|
61
62
|
qrCode?: string;
|
62
63
|
/** Цветовая тема компонента */
|
63
64
|
theme?: ThemeType;
|
64
|
-
/** Изображение
|
65
|
+
/** Изображение телефона. DEPRECATED: 'black-iphone', 'white-iphone', 'iphone-12' */
|
65
66
|
deviceMask: DeviceMaskType;
|
66
67
|
/** Изображение на дисплее телефона */
|
67
68
|
imageSrc: string;
|
@@ -36,10 +36,12 @@ var Theme = {
|
|
36
36
|
exports.Theme = Theme;
|
37
37
|
var DeviceMask = {
|
38
38
|
ANDROID: 'android',
|
39
|
-
BLACK_IPHONE: 'black-iphone',
|
40
|
-
IPHONE_12: 'iphone-12',
|
41
39
|
NEW_IPHONE: 'new-iphone',
|
42
|
-
|
40
|
+
|
41
|
+
/** DEPRECATED: 'black-iphone', 'white-iphone', 'iphone-12' */
|
42
|
+
BLACK_IPHONE: 'black-iphone',
|
43
|
+
WHITE_IPHONE: 'white-iphone',
|
44
|
+
IPHONE_12: 'iphone-12'
|
43
45
|
};
|
44
46
|
exports.DeviceMask = DeviceMask;
|
45
47
|
var testIdPrefix = 'StoreBanner';
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
export declare const getColumnConfig: (isFullWidth: boolean) => Pick<React.PropsWithChildren<import("
|
2
|
+
export declare const getColumnConfig: (isFullWidth: boolean) => Pick<React.PropsWithChildren<import("@megafon/ui-core/dist/lib/components/Grid/GridColumn").IGridColumn>, "all" | "wide" | "mobile" | "desktop" | "tablet">;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@megafon/ui-shared",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.12.0",
|
4
4
|
"files": [
|
5
5
|
"dist"
|
6
6
|
],
|
@@ -82,7 +82,7 @@
|
|
82
82
|
},
|
83
83
|
"dependencies": {
|
84
84
|
"@babel/runtime": "^7.8.4",
|
85
|
-
"@megafon/ui-core": "^5.
|
85
|
+
"@megafon/ui-core": "^5.14.1",
|
86
86
|
"@megafon/ui-helpers": "^2.5.5",
|
87
87
|
"core-js": "^3.6.4",
|
88
88
|
"htmr": "^0.9.2",
|
@@ -90,5 +90,5 @@
|
|
90
90
|
"prop-types": "^15.7.2",
|
91
91
|
"swiper": "^6.5.6"
|
92
92
|
},
|
93
|
-
"gitHead": "
|
93
|
+
"gitHead": "13dc2b2721607f600ddb332e78fc49b0698c9fe2"
|
94
94
|
}
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|