@megafon/ui-shared 8.5.0 → 8.7.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/dist/es/components/Instructions/Instructions.css +1 -1
- package/dist/es/components/Partners/Partners.d.ts +2 -0
- package/dist/es/components/Partners/Partners.js +4 -1
- package/dist/es/components/PromoBanner/components/PromoBannerSlide/PromoBannerSlide.css +1 -1
- package/dist/es/components/PromoBanner/components/PromoBannerSlide/PromoBannerSlide.d.ts +15 -1
- package/dist/es/components/PromoBanner/components/PromoBannerSlide/PromoBannerSlide.js +44 -3
- package/dist/es/components/PromoCards/components/PromoCard/PromoCard.css +1 -1
- package/dist/es/components/PromoCards/components/PromoCard/PromoCard.d.ts +2 -0
- package/dist/es/components/PromoCards/components/PromoCard/PromoCard.js +93 -29
- package/dist/es/components/PromoCards/types.d.ts +11 -0
- package/dist/es/components/ServiceCards/ServiceCards.css +1 -1
- package/dist/es/components/Stepper/Stepper.css +1 -1
- package/dist/es/components/Stepper/Stepper.d.ts +4 -0
- package/dist/es/components/Stepper/Stepper.js +38 -23
- package/dist/es/components/Stepper/StepperItem.css +1 -1
- package/dist/es/components/Stepper/StepperItem.d.ts +7 -0
- package/dist/es/components/Stepper/StepperItem.js +15 -5
- package/dist/es/components/Stepper/img/separator-mobile.png +0 -0
- package/dist/lib/components/Instructions/Instructions.css +1 -1
- package/dist/lib/components/Partners/Partners.d.ts +2 -0
- package/dist/lib/components/Partners/Partners.js +4 -1
- package/dist/lib/components/PromoBanner/components/PromoBannerSlide/PromoBannerSlide.css +1 -1
- package/dist/lib/components/PromoBanner/components/PromoBannerSlide/PromoBannerSlide.d.ts +15 -1
- package/dist/lib/components/PromoBanner/components/PromoBannerSlide/PromoBannerSlide.js +45 -4
- package/dist/lib/components/PromoCards/components/PromoCard/PromoCard.css +1 -1
- package/dist/lib/components/PromoCards/components/PromoCard/PromoCard.d.ts +2 -0
- package/dist/lib/components/PromoCards/components/PromoCard/PromoCard.js +92 -28
- package/dist/lib/components/PromoCards/types.d.ts +11 -0
- package/dist/lib/components/ServiceCards/ServiceCards.css +1 -1
- package/dist/lib/components/Stepper/Stepper.css +1 -1
- package/dist/lib/components/Stepper/Stepper.d.ts +4 -0
- package/dist/lib/components/Stepper/Stepper.js +37 -22
- package/dist/lib/components/Stepper/StepperItem.css +1 -1
- package/dist/lib/components/Stepper/StepperItem.d.ts +7 -0
- package/dist/lib/components/Stepper/StepperItem.js +16 -6
- package/dist/lib/components/Stepper/img/separator-mobile.png +0 -0
- package/package.json +4 -4
@@ -1 +1 @@
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-instructions__title_resolution_mobile{margin-bottom:32px;text-align:center}@media screen and (min-width:768px) and (max-width:1023px){.mfui-instructions__title_resolution_mobile{margin-bottom:40px}}@media screen and (min-width:1024px){.mfui-instructions__title_resolution_mobile{display:none}}.mfui-instructions__title_resolution_desktop{margin-bottom:40px}@media screen and (max-width:1023px){.mfui-instructions__title_resolution_desktop{display:none}}.mfui-instructions .swiper-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex}@media screen and (min-width:1024px){.mfui-instructions__wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.mfui-instructions__wrapper_vertical-align_top{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.mfui-instructions__wrapper_vertical-align_unset{-webkit-box-align:unset;-ms-flex-align:unset;align-items:unset}}.mfui-instructions .mfui-instructions__text{margin-top:48px}@media screen and (max-width:1023px){.mfui-instructions .mfui-instructions__text{text-align:center}}.mfui-instructions .mfui-instructions__button{display:block;margin-top:32px;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}@media screen and (max-width:1023px){.mfui-instructions .mfui-instructions__button{margin-left:auto;margin-right:auto}}@media screen and (min-width:768px){.mfui-instructions .mfui-instructions__button{margin-top:40px}}.mfui-instructions__picture{max-height:490px;max-width:530px;overflow:hidden;position:relative}@media screen and (max-width:1023px){.mfui-instructions__picture{margin:0 auto}}@media screen and (min-width:1024px){.mfui-instructions__picture{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2;width:50%}.mfui-instructions__picture_align_left{-webkit-box-ordinal-group:1;-ms-flex-order:0;margin-right:40px;order:0}}.mfui-instructions_mask_none .mfui-instructions__slide{display:-webkit-box;display:-ms-flexbox;display:flex}.mfui-instructions__swiper-img{height:100%;width:100%}.mfui-instructions__swiper-img_video{-webkit-filter:brightness(108.5%);filter:brightness(108.5%)}.mfui-instructions__img-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;height:490px;position:relative}@media screen and (max-width:1023px){.mfui-instructions__img-wrapper:before{background:var(--spbSky2);bottom:0;content:"";display:block;height:1px;left:0;margin:0 auto;position:absolute;right:0;width:324px;z-index:2}}.mfui-instructions__device-screen{overflow:hidden;pointer-events:none}@media screen and (max-width:1023px){.mfui-instructions_mask_android .mfui-instructions__img-wrapper,.mfui-instructions_mask_black-iphone .mfui-instructions__img-wrapper,.mfui-instructions_mask_white-iphone .mfui-instructions__img-wrapper{height:421px}}.mfui-instructions_mask_android .mfui-instructions__device-screen,.mfui-instructions_mask_black-iphone .mfui-instructions__device-screen,.mfui-instructions_mask_white-iphone .mfui-instructions__device-screen{height:490px;margin:auto;width:100%}.mfui-instructions_mask_android .mfui-instructions__swiper,.mfui-instructions_mask_black-iphone .mfui-instructions__swiper,.mfui-instructions_mask_white-iphone .mfui-instructions__swiper{height:363px;left:0;margin:auto;overflow:hidden;position:absolute;right:0;top:59px;width:204px}.mfui-instructions_mask_black-iphone .mfui-instructions__device-screen{background:url(img/blackIphone.png) 50% no-repeat;background-size:contain}.mfui-instructions_mask_white-iphone .mfui-instructions__device-screen{background:url(img/whiteIphone.png) 50% no-repeat;background-size:contain}@media screen and (max-width:1023px){.mfui-instructions_mask_android .mfui-instructions__img-wrapper{height:424px}}.mfui-instructions_mask_android .mfui-instructions__device-screen{background:url(img/android.png) 50% no-repeat;background-size:contain}.mfui-instructions_mask_android .mfui-instructions__swiper{height:370px;width:206px}@media screen and (max-width:1023px){.mfui-instructions_mask_new-iphone .mfui-instructions__img-wrapper{height:460px}}.mfui-instructions_mask_new-iphone .mfui-instructions__device-screen{background:url(img/newIphone.png) 50% no-repeat;background-size:contain;height:490px;margin:auto;position:relative;width:100%;z-index:2}.mfui-instructions_mask_new-iphone .mfui-instructions__swiper{border-radius:20px;height:462px;left:0;margin:auto;overflow:hidden;position:absolute;right:0;top:14px;width:214px;z-index:1}@media screen and (max-width:1023px){.mfui-instructions_mask_iphone-12 .mfui-instructions__img-wrapper:before{display:none}}.mfui-instructions_mask_iphone-12 .mfui-instructions__device-screen{background:url(img/iphone12.png) 50% no-repeat;background-size:contain;height:490px;margin:auto;position:relative;width:100%;z-index:2}.mfui-instructions_mask_iphone-12 .mfui-instructions__swiper{border-radius:20px;height:462px;left:0;margin:auto;overflow:hidden;position:absolute;right:0;top:14px;width:214px;z-index:1}.mfui-instructions_mask_iphone-15 .mfui-instructions__img-wrapper{height:487px}@media screen and (max-width:1023px){.mfui-instructions_mask_iphone-15 .mfui-instructions__img-wrapper:before{display:none}}.mfui-instructions_mask_iphone-15 .mfui-instructions__device-screen{background:url(img/iphone15.png) 50% no-repeat;background-size:contain;height:486px;margin:auto;position:relative;width:100%;z-index:2}.mfui-instructions_mask_iphone-15 .mfui-instructions__swiper{border-radius:20px;height:468px;left:0;margin:auto;overflow:hidden;position:absolute;right:0;top:10px;width:217px;z-index:1}.mfui-instructions_mask_android-cropped .mfui-instructions__img-wrapper{height:420px;min-height:420px}@media screen and (min-width:1024px){.mfui-instructions_mask_android-cropped .mfui-instructions__img-wrapper{height:440px;min-height:440px}}.mfui-instructions_mask_android-cropped .mfui-instructions__img-wrapper:before{background:var(--spbSky2);bottom:0;content:"";display:block;height:1px;left:0;margin:0 auto;position:absolute;right:0;width:324px;z-index:2}.mfui-instructions_mask_android-cropped .mfui-instructions__device-screen{background:url(img/android-new.png) 50% no-repeat;background-size:contain;height:510px;margin-top:24px;position:relative;width:100%;z-index:1}@media screen and (min-width:1024px){.mfui-instructions_mask_android-cropped .mfui-instructions__device-screen{height:574px}}.mfui-instructions_mask_android-cropped .mfui-instructions__swiper{left:0;margin:auto;overflow:hidden;position:absolute;right:0;top:54px;width:222px}@media screen and (min-width:1024px){.mfui-instructions_mask_android-cropped .mfui-instructions__swiper{top:58px;width:250px}}.mfui-instructions_mask_iphone-cropped .mfui-instructions__img-wrapper{height:420px;min-height:420px}.mfui-instructions_mask_iphone-cropped .mfui-instructions__img-wrapper:before{background:var(--spbSky2);bottom:0;content:"";display:block;height:1px;left:0;margin:0 auto;position:absolute;right:0;width:324px;z-index:2}.mfui-instructions_mask_iphone-cropped .mfui-instructions__device-screen{background:url(img/iphone-new.png) 50% no-repeat;background-size:contain;height:469px;margin-top:24px;position:relative;width:100%;z-index:1}.mfui-instructions_mask_iphone-cropped .mfui-instructions__swiper{left:0;margin:auto;overflow:hidden;position:absolute;right:0;top:38px;width:205px}@media screen and (min-width:768px) and (max-width:1023px){.mfui-instructions_mask_laptop .mfui-instructions__img-wrapper{background:url(img/laptop.png) 50% 0 no-repeat;background-size:100%;height:0;padding-bottom:53.4%}}@media screen and (min-width:480px) and (max-width:767px){.mfui-instructions_mask_laptop .mfui-instructions__img-wrapper{height:208px}}@media screen and (max-width:479px){.mfui-instructions_mask_laptop .mfui-instructions__img-wrapper{height:115px}.mfui-instructions_mask_laptop .mfui-instructions__img-wrapper:before{width:310px}}@media screen and (min-width:480px) and (max-width:767px){.mfui-instructions_mask_laptop .mfui-instructions__img-wrapper:before{width:460px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-instructions_mask_laptop .mfui-instructions__img-wrapper:before{width:590px}}.mfui-instructions_mask_laptop .mfui-instructions__device-screen{background:url(img/laptop.png) 50% 0 no-repeat;background-size:100%;height:100%;margin:auto;position:relative;width:100%}@media screen and (min-width:768px) and (max-width:1023px){.mfui-instructions_mask_laptop .mfui-instructions__device-screen{width:530px}}@media screen and (min-width:480px) and (max-width:767px){.mfui-instructions_mask_laptop .mfui-instructions__device-screen{width:450px}}@media screen and (max-width:479px){.mfui-instructions_mask_laptop .mfui-instructions__device-screen{width:270px}}@media screen and (min-width:1024px){.mfui-instructions_mask_laptop .mfui-instructions__device-screen{background:url(img/laptop.png) 50% no-repeat;background-size:contain}}.mfui-instructions_mask_laptop .mfui-instructions__swiper{left:50%;margin:auto;overflow:hidden;position:absolute;right:0;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:78%}@media screen and (min-width:480px) and (max-width:767px){.mfui-instructions_mask_laptop .mfui-instructions__swiper{height:190px;max-width:345px}}@media screen and (max-width:479px){.mfui-instructions_mask_laptop .mfui-instructions__swiper{height:105px;max-width:210px}}@media screen and (min-width:1024px){.mfui-instructions_mask_laptop .mfui-instructions__swiper{-webkit-transform:translate(-50%,-53%);transform:translate(-50%,-53%)}}@media screen and (max-width:1023px){.mfui-instructions_mask_laptop-new .mfui-instructions__img-wrapper{background:url(img/laptop-new.png) 50% 0 no-repeat;background-size:100%;height:0;padding-bottom:58.9%}}.mfui-instructions_mask_laptop-new .mfui-instructions__img-wrapper:before{display:none}.mfui-instructions_mask_laptop-new .mfui-instructions__device-screen{background:url(img/laptop-new.png) 50% 0 no-repeat;background-size:100%;height:100%;margin:auto;position:relative;width:100%}@media screen and (min-width:768px) and (max-width:1023px){.mfui-instructions_mask_laptop-new .mfui-instructions__device-screen{width:530px}}@media screen and (min-width:480px) and (max-width:767px){.mfui-instructions_mask_laptop-new .mfui-instructions__device-screen{width:450px}}@media screen and (max-width:479px){.mfui-instructions_mask_laptop-new .mfui-instructions__device-screen{width:270px}}@media screen and (min-width:1024px){.mfui-instructions_mask_laptop-new .mfui-instructions__device-screen{background:url(img/laptop-new.png) 50% no-repeat;background-size:contain}}.mfui-instructions_mask_laptop-new .mfui-instructions__swiper{left:50%;margin:auto;overflow:hidden;position:absolute;right:0;top:4px;-webkit-transform:translate(-49.5%);transform:translate(-49.5%);width:78%}@media screen and (min-width:480px) and (max-width:767px){.mfui-instructions_mask_laptop-new .mfui-instructions__swiper{max-width:415px;top:7px}}@media screen and (max-width:479px){.mfui-instructions_mask_laptop-new .mfui-instructions__swiper{max-width:302px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-instructions_mask_laptop-new .mfui-instructions__swiper{top:12px}}@media screen and (min-width:1024px){.mfui-instructions_mask_laptop-new .mfui-instructions__swiper{top:50%;-webkit-transform:translate(-49.5%,-55%);transform:translate(-49.5%,-55%)}}.mfui-instructions__slide{-ms-flex-negative:0;flex-shrink:0;height:100%}@media screen and (max-width:767px){.mfui-instructions__articles{margin-top:24px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-instructions__articles{margin-top:32px}}@media screen and (min-width:1024px){.mfui-instructions__articles{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1;width:50%}.mfui-instructions__articles_align_right{margin-right:40px}}.mfui-instructions__articles-list{list-style-type:none;margin:0;padding:0}@media screen and (min-width:1024px){.mfui-instructions__articles-list_mobile{display:none}}@media screen and (max-width:1023px){.mfui-instructions__articles-list_desktop{display:none}}.mfui-instructions__articles-item{min-height:40px;opacity:.5;position:relative}@media screen and (min-width:1024px){.mfui-instructions__articles-item{margin-bottom:48px}}.mfui-instructions__articles-item:hover,.mfui-instructions__articles-item_active{opacity:1}.mfui-instructions__articles-item:hover .mfui-instructions__articles-item-dot,.mfui-instructions__articles-item_active .mfui-instructions__articles-item-dot{color:var(--stcWhite)}.mfui-instructions__articles-item:hover .mfui-instructions__articles-item-dot:before,.mfui-instructions__articles-item_active .mfui-instructions__articles-item-dot:before{background:var(--brandGreen);bottom:0;left:0;right:0;top:0}@media screen and (min-width:1024px){.mfui-instructions__articles-item:last-child{margin-bottom:0}}.mfui-instructions__articles-item-dot{border-radius:50%;-webkit-box-shadow:inset 0 0 0 1px var(--spbSky3);box-shadow:inset 0 0 0 1px var(--spbSky3);cursor:pointer;display:inline-block;font-size:15px;font-weight:500;height:40px;line-height:40px;position:absolute;text-align:center;width:40px}@media screen and (max-width:479px){.mfui-instructions__articles-item-dot{min-width:40px}}.mfui-instructions__articles-item-dot:before{border-radius:50%;bottom:50%;content:"";left:50%;position:absolute;right:50%;top:50%;-webkit-transition:all .3s ease;transition:all .3s ease}.mfui-instructions__articles-item-dot-number{position:relative}.mfui-instructions__articles-item-title{cursor:pointer;display:inline-block;font-size:15px;font-weight:400;line-height:24px}@media screen and (min-width:1024px){.mfui-instructions__articles-item-title{padding:8px 0 0 56px}}.mfui-instructions__articles-dots{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;list-style-type:none;margin:0;padding:0}@media screen and (max-width:767px){.mfui-instructions__articles-dots{margin-top:16px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-instructions__articles-dots{margin-top:24px}}@media screen and (min-width:1024px){.mfui-instructions__articles-dots{display:none}}.mfui-instructions__articles-dots_text-after{margin-bottom:48px}.mfui-instructions__articles-dot{background:var(--spbSky2);border-radius:4px;cursor:pointer;display:inline-block;height:8px;margin-right:12px;position:relative;width:8px}.mfui-instructions__articles-dot:hover,.mfui-instructions__articles-dot_active{background:var(--brandGreen)}.mfui-instructions__articles-dot_active{width:20px}.mfui-instructions__articles-dot:last-child{margin-right:0}.mfui-instructions__articles-title-block{margin:0 auto;text-align:center}@media screen and (max-width:767px){.mfui-instructions__articles-title-block{width:55%}}@media screen and (max-width:479px){.mfui-instructions__articles-title-block{width:100%}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-instructions__articles-title-block{max-width:530px;width:100%}}.mfui-instructions__articles-title-block_with-numeration{text-align:left}.mfui-instructions__articles-title{font-weight:400;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.mfui-instructions__articles-num,.mfui-instructions__articles-title{display:-webkit-box;display:-ms-flexbox;display:flex;font-size:15px;line-height:24px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.mfui-instructions__articles-num{font-weight:500;-ms-flex-negative:0;flex-shrink:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--brandGreen);border-radius:50%;color:var(--stcWhite);height:40px;margin-right:16px;width:40px}@media screen and (min-width:1024px){.mfui-instructions__articles-num{display:none}}.mfui-instructions__picture_background_spbSky0{background-color:var(--spbSky0);border-radius:12px}.mfui-instructions__picture_background_spbSky0 .mfui-instructions__img-wrapper:before{display:none}.mfui-instructions__arrow{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);z-index:2}@media screen and (max-width:767px){.mfui-instructions__arrow{display:none}}.mfui-instructions__arrow_prev{left:24px}.mfui-instructions__arrow_next{right:24px}.mfui-instructions__qr-code{-webkit-box-sizing:border-box;box-sizing:border-box;display:none;padding:12px;position:absolute;right:64px;top:12px;width:126px;z-index:3}@media screen and (min-width:768px){.mfui-instructions__qr-code{display:block}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-instructions__qr-code{right:44px}}.mfui-instructions__qr-code-image{display:block;height:auto;width:100%}.mfui-instructions__qr-code-text{font-size:12px;font-weight:500;line-height:12px;margin-bottom:12px;text-align:center}.mfui-instructions_reversed .mfui-instructions__title_resolution_mobile{margin-bottom:16px}@media screen and (max-width:1023px){.mfui-instructions_reversed .mfui-instructions__picture{margin-bottom:0;max-height:100%}.mfui-instructions_reversed .mfui-instructions__articles{display:none}}@media screen and (max-width:767px){.mfui-instructions_reversed .mfui-instructions__articles-title-block{margin-bottom:32px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-instructions_reversed .mfui-instructions__articles-title-block{margin-bottom:40px}}@media screen and (min-width:1024px){.mfui-instructions_items-gap_medium .mfui-instructions__articles-item:not(:last-child){margin-bottom:24px}}.mfui-instructions_items-gap_medium .mfui-instructions__text{margin-top:32px}@media screen and (min-width:768px){.mfui-instructions_items-gap_medium .mfui-instructions__text{margin-top:40px}}
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-instructions__title_resolution_mobile{margin-bottom:32px;text-align:center}@media screen and (min-width:768px) and (max-width:1023px){.mfui-instructions__title_resolution_mobile{margin-bottom:40px}}@media screen and (min-width:1024px){.mfui-instructions__title_resolution_mobile{display:none}}.mfui-instructions__title_resolution_desktop{margin-bottom:40px}@media screen and (max-width:1023px){.mfui-instructions__title_resolution_desktop{display:none}}.mfui-instructions .swiper-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex}@media screen and (min-width:1024px){.mfui-instructions__wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.mfui-instructions__wrapper_vertical-align_top{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.mfui-instructions__wrapper_vertical-align_unset{-webkit-box-align:unset;-ms-flex-align:unset;align-items:unset}}.mfui-instructions .mfui-instructions__text{margin-top:48px}@media screen and (max-width:1023px){.mfui-instructions .mfui-instructions__text{text-align:center}}.mfui-instructions .mfui-instructions__button{display:block;margin-top:32px;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}@media screen and (max-width:1023px){.mfui-instructions .mfui-instructions__button{margin-left:auto;margin-right:auto}}@media screen and (min-width:768px){.mfui-instructions .mfui-instructions__button{margin-top:40px}}.mfui-instructions__picture{max-height:490px;max-width:530px;overflow:hidden;position:relative}@media screen and (max-width:1023px){.mfui-instructions__picture{margin:0 auto}}@media screen and (min-width:1024px){.mfui-instructions__picture{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2;width:50%}.mfui-instructions__picture_align_left{-webkit-box-ordinal-group:1;-ms-flex-order:0;margin-right:40px;order:0}}.mfui-instructions_mask_none .mfui-instructions__slide{display:-webkit-box;display:-ms-flexbox;display:flex}.mfui-instructions__swiper-img{height:100%;width:100%}.mfui-instructions__swiper-img_video{-webkit-filter:brightness(108.5%);filter:brightness(108.5%)}.mfui-instructions__img-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;height:490px;position:relative}@media screen and (max-width:1023px){.mfui-instructions__img-wrapper:before{background:var(--spbSky2);bottom:0;content:"";display:block;height:1px;left:0;margin:0 auto;position:absolute;right:0;width:324px;z-index:2}}.mfui-instructions__device-screen{overflow:hidden;pointer-events:none}@media screen and (max-width:1023px){.mfui-instructions_mask_android .mfui-instructions__img-wrapper,.mfui-instructions_mask_black-iphone .mfui-instructions__img-wrapper,.mfui-instructions_mask_white-iphone .mfui-instructions__img-wrapper{height:421px}}.mfui-instructions_mask_android .mfui-instructions__device-screen,.mfui-instructions_mask_black-iphone .mfui-instructions__device-screen,.mfui-instructions_mask_white-iphone .mfui-instructions__device-screen{height:490px;margin:auto;width:100%}.mfui-instructions_mask_android .mfui-instructions__swiper,.mfui-instructions_mask_black-iphone .mfui-instructions__swiper,.mfui-instructions_mask_white-iphone .mfui-instructions__swiper{height:363px;left:0;margin:auto;overflow:hidden;position:absolute;right:0;top:59px;width:204px}.mfui-instructions_mask_black-iphone .mfui-instructions__device-screen{background:url(img/blackIphone.png) 50% no-repeat;background-size:contain}.mfui-instructions_mask_white-iphone .mfui-instructions__device-screen{background:url(img/whiteIphone.png) 50% no-repeat;background-size:contain}@media screen and (max-width:1023px){.mfui-instructions_mask_android .mfui-instructions__img-wrapper{height:424px}}.mfui-instructions_mask_android .mfui-instructions__device-screen{background:url(img/android.png) 50% no-repeat;background-size:contain}.mfui-instructions_mask_android .mfui-instructions__swiper{height:370px;width:206px}@media screen and (max-width:1023px){.mfui-instructions_mask_new-iphone .mfui-instructions__img-wrapper{height:460px}}.mfui-instructions_mask_new-iphone .mfui-instructions__device-screen{background:url(img/newIphone.png) 50% no-repeat;background-size:contain;height:490px;margin:auto;position:relative;width:100%;z-index:2}.mfui-instructions_mask_new-iphone .mfui-instructions__swiper{border-radius:20px;height:462px;left:0;margin:auto;overflow:hidden;position:absolute;right:0;top:14px;width:214px;z-index:1}@media screen and (max-width:1023px){.mfui-instructions_mask_iphone-12 .mfui-instructions__img-wrapper:before{display:none}}.mfui-instructions_mask_iphone-12 .mfui-instructions__device-screen{background:url(img/iphone12.png) 50% no-repeat;background-size:contain;height:490px;margin:auto;position:relative;width:100%;z-index:2}.mfui-instructions_mask_iphone-12 .mfui-instructions__swiper{border-radius:20px;height:462px;left:0;margin:auto;overflow:hidden;position:absolute;right:0;top:14px;width:214px;z-index:1}.mfui-instructions_mask_iphone-15 .mfui-instructions__img-wrapper{height:487px}@media screen and (max-width:1023px){.mfui-instructions_mask_iphone-15 .mfui-instructions__img-wrapper:before{display:none}}.mfui-instructions_mask_iphone-15 .mfui-instructions__device-screen{background:url(img/iphone15.png) 50% no-repeat;background-size:contain;height:486px;margin:auto;position:relative;width:100%;z-index:2}.mfui-instructions_mask_iphone-15 .mfui-instructions__swiper{border-radius:20px;height:468px;left:0;margin:auto;overflow:hidden;position:absolute;right:0;top:10px;width:217px;z-index:1}.mfui-instructions_mask_android-cropped .mfui-instructions__img-wrapper{height:420px;min-height:420px}@media screen and (min-width:1024px){.mfui-instructions_mask_android-cropped .mfui-instructions__img-wrapper{height:440px;min-height:440px}}.mfui-instructions_mask_android-cropped .mfui-instructions__img-wrapper:before{background:var(--spbSky2);bottom:0;content:"";display:block;height:1px;left:0;margin:0 auto;position:absolute;right:0;width:324px;z-index:2}.mfui-instructions_mask_android-cropped .mfui-instructions__device-screen{background:url(img/android-new.png) 50% no-repeat;background-size:contain;height:510px;margin-top:24px;position:relative;width:100%;z-index:1}@media screen and (min-width:1024px){.mfui-instructions_mask_android-cropped .mfui-instructions__device-screen{height:574px}}.mfui-instructions_mask_android-cropped .mfui-instructions__swiper{left:0;margin:auto;overflow:hidden;position:absolute;right:0;top:54px;width:222px}@media screen and (min-width:1024px){.mfui-instructions_mask_android-cropped .mfui-instructions__swiper{top:58px;width:250px}}.mfui-instructions_mask_iphone-cropped .mfui-instructions__img-wrapper{height:420px;min-height:420px}.mfui-instructions_mask_iphone-cropped .mfui-instructions__img-wrapper:before{background:var(--spbSky2);bottom:0;content:"";display:block;height:1px;left:0;margin:0 auto;position:absolute;right:0;width:324px;z-index:2}.mfui-instructions_mask_iphone-cropped .mfui-instructions__device-screen{background:url(img/iphone-new.png) 50% no-repeat;background-size:contain;height:469px;margin-top:24px;position:relative;width:100%;z-index:1}.mfui-instructions_mask_iphone-cropped .mfui-instructions__swiper{left:0;margin:auto;overflow:hidden;position:absolute;right:0;top:38px;width:205px}@media screen and (min-width:768px) and (max-width:1023px){.mfui-instructions_mask_laptop .mfui-instructions__img-wrapper{background:url(img/laptop.png) 50% 0 no-repeat;background-size:100%;height:0;padding-bottom:53.4%}}@media screen and (min-width:480px) and (max-width:767px){.mfui-instructions_mask_laptop .mfui-instructions__img-wrapper{height:208px}}@media screen and (max-width:479px){.mfui-instructions_mask_laptop .mfui-instructions__img-wrapper{height:115px}.mfui-instructions_mask_laptop .mfui-instructions__img-wrapper:before{width:310px}}@media screen and (min-width:480px) and (max-width:767px){.mfui-instructions_mask_laptop .mfui-instructions__img-wrapper:before{width:460px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-instructions_mask_laptop .mfui-instructions__img-wrapper:before{width:590px}}.mfui-instructions_mask_laptop .mfui-instructions__device-screen{background:url(img/laptop.png) 50% 0 no-repeat;background-size:100%;height:100%;margin:auto;position:relative;width:100%}@media screen and (min-width:768px) and (max-width:1023px){.mfui-instructions_mask_laptop .mfui-instructions__device-screen{width:530px}}@media screen and (min-width:480px) and (max-width:767px){.mfui-instructions_mask_laptop .mfui-instructions__device-screen{width:450px}}@media screen and (max-width:479px){.mfui-instructions_mask_laptop .mfui-instructions__device-screen{width:270px}}@media screen and (min-width:1024px){.mfui-instructions_mask_laptop .mfui-instructions__device-screen{background:url(img/laptop.png) 50% no-repeat;background-size:contain}}.mfui-instructions_mask_laptop .mfui-instructions__swiper{left:50%;margin:auto;overflow:hidden;position:absolute;right:0;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:78%}@media screen and (min-width:480px) and (max-width:767px){.mfui-instructions_mask_laptop .mfui-instructions__swiper{height:190px;max-width:345px}}@media screen and (max-width:479px){.mfui-instructions_mask_laptop .mfui-instructions__swiper{height:105px;max-width:210px}}@media screen and (min-width:1024px){.mfui-instructions_mask_laptop .mfui-instructions__swiper{-webkit-transform:translate(-50%,-53%);transform:translate(-50%,-53%)}}@media screen and (max-width:1023px){.mfui-instructions_mask_laptop-new .mfui-instructions__img-wrapper{background:url(img/laptop-new.png) 50% 0 no-repeat;background-size:100%;height:0;padding-bottom:58.9%}}.mfui-instructions_mask_laptop-new .mfui-instructions__img-wrapper:before{display:none}.mfui-instructions_mask_laptop-new .mfui-instructions__device-screen{background:url(img/laptop-new.png) 50% 0 no-repeat;background-size:100%;height:100%;margin:auto;position:relative;width:100%}@media screen and (min-width:768px) and (max-width:1023px){.mfui-instructions_mask_laptop-new .mfui-instructions__device-screen{width:530px}}@media screen and (min-width:480px) and (max-width:767px){.mfui-instructions_mask_laptop-new .mfui-instructions__device-screen{width:450px}}@media screen and (max-width:479px){.mfui-instructions_mask_laptop-new .mfui-instructions__device-screen{width:270px}}@media screen and (min-width:1024px){.mfui-instructions_mask_laptop-new .mfui-instructions__device-screen{background:url(img/laptop-new.png) 50% no-repeat;background-size:contain}}.mfui-instructions_mask_laptop-new .mfui-instructions__swiper{left:50%;margin:auto;overflow:hidden;position:absolute;right:0;top:4px;-webkit-transform:translate(-49.5%);transform:translate(-49.5%);width:78%}@media screen and (min-width:480px) and (max-width:767px){.mfui-instructions_mask_laptop-new .mfui-instructions__swiper{max-width:415px;top:7px}}@media screen and (max-width:479px){.mfui-instructions_mask_laptop-new .mfui-instructions__swiper{max-width:302px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-instructions_mask_laptop-new .mfui-instructions__swiper{top:12px}}@media screen and (min-width:1024px){.mfui-instructions_mask_laptop-new .mfui-instructions__swiper{top:50%;-webkit-transform:translate(-49.5%,-55%);transform:translate(-49.5%,-55%)}}.mfui-instructions__slide{-ms-flex-negative:0;flex-shrink:0;height:100%}@media screen and (max-width:767px){.mfui-instructions__articles{margin-top:24px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-instructions__articles{margin-top:32px}}@media screen and (min-width:1024px){.mfui-instructions__articles{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1;width:50%}.mfui-instructions__articles_align_right{margin-right:40px}}.mfui-instructions__articles-list{list-style-type:none;margin:0;padding:0}@media screen and (min-width:1024px){.mfui-instructions__articles-list_mobile{display:none}}@media screen and (max-width:1023px){.mfui-instructions__articles-list_desktop{display:none}}.mfui-instructions__articles-item{min-height:40px;opacity:.5;position:relative}@media screen and (min-width:1024px){.mfui-instructions__articles-item{margin-bottom:48px}}.mfui-instructions__articles-item:hover,.mfui-instructions__articles-item_active{opacity:1}.mfui-instructions__articles-item:hover .mfui-instructions__articles-item-dot,.mfui-instructions__articles-item_active .mfui-instructions__articles-item-dot{color:var(--stcWhite)}.mfui-instructions__articles-item:hover .mfui-instructions__articles-item-dot:before,.mfui-instructions__articles-item_active .mfui-instructions__articles-item-dot:before{background:var(--brandGreen);bottom:0;left:0;right:0;top:0}@media screen and (min-width:1024px){.mfui-instructions__articles-item:last-child{margin-bottom:0}}.mfui-instructions__articles-item-dot{border-radius:12px;-webkit-box-shadow:inset 0 0 0 1px var(--spbSky3);box-shadow:inset 0 0 0 1px var(--spbSky3);cursor:pointer;display:inline-block;font-size:15px;font-weight:500;height:40px;line-height:40px;position:absolute;text-align:center;width:40px}@media screen and (max-width:479px){.mfui-instructions__articles-item-dot{min-width:40px}}.mfui-instructions__articles-item-dot:before{border-radius:12px;bottom:50%;content:"";left:50%;position:absolute;right:50%;top:50%;-webkit-transition:all .3s ease;transition:all .3s ease}.mfui-instructions__articles-item-dot-number{position:relative}.mfui-instructions__articles-item-title{cursor:pointer;display:inline-block;font-size:15px;font-weight:400;line-height:24px}@media screen and (min-width:1024px){.mfui-instructions__articles-item-title{padding:8px 0 0 56px}}.mfui-instructions__articles-dots{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;list-style-type:none;margin:0;padding:0}@media screen and (max-width:767px){.mfui-instructions__articles-dots{margin-top:16px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-instructions__articles-dots{margin-top:24px}}@media screen and (min-width:1024px){.mfui-instructions__articles-dots{display:none}}.mfui-instructions__articles-dots_text-after{margin-bottom:48px}.mfui-instructions__articles-dot{background:var(--spbSky2);border-radius:4px;cursor:pointer;display:inline-block;height:8px;margin-right:12px;position:relative;width:8px}.mfui-instructions__articles-dot:hover,.mfui-instructions__articles-dot_active{background:var(--brandGreen)}.mfui-instructions__articles-dot_active{width:20px}.mfui-instructions__articles-dot:last-child{margin-right:0}.mfui-instructions__articles-title-block{margin:0 auto;text-align:center}@media screen and (max-width:767px){.mfui-instructions__articles-title-block{width:55%}}@media screen and (max-width:479px){.mfui-instructions__articles-title-block{width:100%}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-instructions__articles-title-block{max-width:530px;width:100%}}.mfui-instructions__articles-title-block_with-numeration{text-align:left}.mfui-instructions__articles-title{font-weight:400;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.mfui-instructions__articles-num,.mfui-instructions__articles-title{display:-webkit-box;display:-ms-flexbox;display:flex;font-size:15px;line-height:24px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.mfui-instructions__articles-num{font-weight:500;-ms-flex-negative:0;flex-shrink:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--brandGreen);border-radius:50%;color:var(--stcWhite);height:40px;margin-right:16px;width:40px}@media screen and (min-width:1024px){.mfui-instructions__articles-num{display:none}}.mfui-instructions__picture_background_spbSky0{background-color:var(--spbSky0);border-radius:12px}.mfui-instructions__picture_background_spbSky0 .mfui-instructions__img-wrapper:before{display:none}.mfui-instructions__arrow{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);z-index:2}@media screen and (max-width:767px){.mfui-instructions__arrow{display:none}}.mfui-instructions__arrow_prev{left:24px}.mfui-instructions__arrow_next{right:24px}.mfui-instructions__qr-code{-webkit-box-sizing:border-box;box-sizing:border-box;display:none;padding:12px;position:absolute;right:64px;top:12px;width:126px;z-index:3}@media screen and (min-width:768px){.mfui-instructions__qr-code{display:block}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-instructions__qr-code{right:44px}}.mfui-instructions__qr-code-image{display:block;height:auto;width:100%}.mfui-instructions__qr-code-text{font-size:12px;font-weight:500;line-height:12px;margin-bottom:12px;text-align:center}.mfui-instructions_reversed .mfui-instructions__title_resolution_mobile{margin-bottom:16px}@media screen and (max-width:1023px){.mfui-instructions_reversed .mfui-instructions__picture{margin-bottom:0;max-height:100%}.mfui-instructions_reversed .mfui-instructions__articles{display:none}}@media screen and (max-width:767px){.mfui-instructions_reversed .mfui-instructions__articles-title-block{margin-bottom:32px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-instructions_reversed .mfui-instructions__articles-title-block{margin-bottom:40px}}@media screen and (min-width:1024px){.mfui-instructions_items-gap_medium .mfui-instructions__articles-item:not(:last-child){margin-bottom:24px}}.mfui-instructions_items-gap_medium .mfui-instructions__text{margin-top:32px}@media screen and (min-width:768px){.mfui-instructions_items-gap_medium .mfui-instructions__text{margin-top:40px}}
|
@@ -24,6 +24,8 @@ export interface IPartnersProps {
|
|
24
24
|
className?: string;
|
25
25
|
/** Список логотипов */
|
26
26
|
items: ItemType[];
|
27
|
+
/** Радиус границы логотипов */
|
28
|
+
radius?: 'default' | 'rounded';
|
27
29
|
/** Обработчик клика по стрелке вперед (должен быть обернут в useCallback) */
|
28
30
|
onNextClick?: (index: number) => void;
|
29
31
|
/** Обработчик клика по стрелке назад (должен быть обернут в useCallback) */
|
@@ -29,6 +29,8 @@ var Partners = function Partners(_ref) {
|
|
29
29
|
dataAttrs = _ref.dataAttrs,
|
30
30
|
className = _ref.className,
|
31
31
|
items = _ref.items,
|
32
|
+
_ref$radius = _ref.radius,
|
33
|
+
radius = _ref$radius === void 0 ? 'default' : _ref$radius,
|
32
34
|
onChange = _ref.onChange,
|
33
35
|
onNextClick = _ref.onNextClick,
|
34
36
|
onPrevClick = _ref.onPrevClick;
|
@@ -45,6 +47,7 @@ var Partners = function Partners(_ref) {
|
|
45
47
|
href: href,
|
46
48
|
rel: rel,
|
47
49
|
shadowLevel: "default",
|
50
|
+
radius: radius,
|
48
51
|
isInteractive: !!href,
|
49
52
|
className: cn('tile'),
|
50
53
|
dataAttrs: {
|
@@ -60,7 +63,7 @@ var Partners = function Partners(_ref) {
|
|
60
63
|
alt: alt,
|
61
64
|
className: cn('tile-img')
|
62
65
|
}))));
|
63
|
-
}, [
|
66
|
+
}, [radius, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.item, itemClass]);
|
64
67
|
var renderGrid = React.useCallback(function () {
|
65
68
|
return /*#__PURE__*/React.createElement(Grid, {
|
66
69
|
guttersLeft: "medium",
|
@@ -1 +1 @@
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-promo-banner-slide{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;-webkit-box-orient:vertical;-webkit-box-direction:normal;border-radius:24px;-ms-flex-direction:column;flex-direction:column;min-height:100%;overflow:hidden}.mfui-promo-banner-slide_background_dark-violet{background-image:-webkit-gradient(linear,right top,left top,from(#ada6ba),color-stop(108%,#f6f2f9));background-image:linear-gradient(270deg,#ada6ba,#f6f2f9 108%)}.mfui-promo-banner-slide_background_light-violet{background:#f6f2f9}.mfui-promo-banner-slide__container{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;z-index:1;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-promo-banner-slide{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;-webkit-box-orient:vertical;-webkit-box-direction:normal;border-radius:24px;-ms-flex-direction:column;flex-direction:column;min-height:100%;overflow:hidden}.mfui-promo-banner-slide_background_dark-violet{background-image:-webkit-gradient(linear,right top,left top,from(#ada6ba),color-stop(108%,#f6f2f9));background-image:linear-gradient(270deg,#ada6ba,#f6f2f9 108%)}.mfui-promo-banner-slide_background_light-violet{background:#f6f2f9}.mfui-promo-banner-slide_background_green-20{background:var(--brandGreen20)}.mfui-promo-banner-slide_background_purple-20{background:var(--brandPurple20)}.mfui-promo-banner-slide_background_night-20{background:var(--night20)}.mfui-promo-banner-slide_background_sky-20{background:var(--sky20)}.mfui-promo-banner-slide_background_flamingo-20{background:var(--flamingo20)}.mfui-promo-banner-slide_background_berry-20{background:var(--berry20)}.mfui-promo-banner-slide_background_gradient-purple-1{background:linear-gradient(92deg,#731982 12.66%,#aa5aff 78.46%)}.mfui-promo-banner-slide_background_gradient-purple-2{background:linear-gradient(93deg,#731982 33.39%,#e64de6 83.5%)}.mfui-promo-banner-slide_background_gradient-purple-3{background:linear-gradient(92deg,#731982 6.47%,#00d2ff 100.69%)}.mfui-promo-banner-slide_background_gradient-purple-4{background:linear-gradient(92deg,#731982 -.82%,#1b61ac 90.9%)}.mfui-promo-banner-slide__container{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;z-index:1;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;padding:32px 20px 0}@media screen and (min-width:768px) and (max-width:1023px){.mfui-promo-banner-slide__container{padding:38px 40px}}@media screen and (min-width:768px){.mfui-promo-banner-slide__container{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;min-height:308px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-promo-banner-slide__container{padding:34px 64px}}@media screen and (min-width:1280px){.mfui-promo-banner-slide__container{padding:42px 80px}}.mfui-promo-banner-slide__content{color:var(--stcBlack)}@media screen and (min-width:768px) and (max-width:1023px){.mfui-promo-banner-slide__content{max-width:350px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-promo-banner-slide__content{max-width:450px}}@media screen and (min-width:1280px){.mfui-promo-banner-slide__content{max-width:645px}}.mfui-promo-banner-slide__title{margin-bottom:12px}@media screen and (min-width:1280px){.mfui-promo-banner-slide__description{margin-right:82px}}.mfui-promo-banner-slide__buttons-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;z-index:1;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:16px;margin-top:24px}@media screen and (min-width:768px){.mfui-promo-banner-slide__buttons-wrapper{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;margin-top:32px}}.mfui-promo-banner-slide__picture{display:block;position:relative;z-index:0}@media screen and (max-width:767px){.mfui-promo-banner-slide__picture{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-top:12px}}@media screen and (min-width:768px){.mfui-promo-banner-slide__picture{height:100%;position:absolute;top:0}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-promo-banner-slide__picture{left:404px;width:523px}}@media screen and (min-width:1024px){.mfui-promo-banner-slide__picture{width:696px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-promo-banner-slide__picture{left:534px}}@media screen and (min-width:1280px){.mfui-promo-banner-slide__picture{left:744px}}.mfui-promo-banner-slide__image{height:100%;-o-object-fit:cover;object-fit:cover;vertical-align:top;width:100%}@media screen and (max-width:767px){.mfui-promo-banner-slide__image{max-height:180px;min-height:150px;width:auto}}@media screen and (min-width:768px){.mfui-promo-banner-slide__image{-o-object-fit:contain;object-fit:contain}}
|
@@ -1,5 +1,19 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import './PromoBannerSlide.scss';
|
3
|
+
export declare const BackgroundColor: {
|
4
|
+
readonly DARK_VIOLET: "dark-violet";
|
5
|
+
readonly LIGHT_VIOLET: "light-violet";
|
6
|
+
readonly GREEN_20: "green-20";
|
7
|
+
readonly PURPLE_20: "purple-20";
|
8
|
+
readonly NIGHT_20: "night-20";
|
9
|
+
readonly FLAMINGO_20: "flamingo-20";
|
10
|
+
readonly BERRY_20: "berry-20";
|
11
|
+
readonly GRADIENT_PURPLE_1: "gradient-purple-1";
|
12
|
+
readonly GRADIENT_PURPLE_2: "gradient-purple-2";
|
13
|
+
readonly GRADIENT_PURPLE_3: "gradient-purple-3";
|
14
|
+
readonly GRADIENT_PURPLE_4: "gradient-purple-4";
|
15
|
+
};
|
16
|
+
export type BackgroundColorType = (typeof BackgroundColor)[keyof typeof BackgroundColor];
|
3
17
|
type ButtonType = {
|
4
18
|
/** Заголовок */
|
5
19
|
title?: string;
|
@@ -42,7 +56,7 @@ export interface IPromoBannerSlideProps {
|
|
42
56
|
/** Изображение */
|
43
57
|
image: ImageType;
|
44
58
|
/** Фон */
|
45
|
-
background?:
|
59
|
+
background?: BackgroundColorType;
|
46
60
|
/** Дополнительные классы для корневого и внутренних элементов */
|
47
61
|
classes?: {
|
48
62
|
root?: string;
|
@@ -6,6 +6,42 @@ import * as React from 'react';
|
|
6
6
|
import { Button, Header, Paragraph } from '@megafon/ui-core';
|
7
7
|
import { cnCreate, convert, filterDataAttrs, breakpoints, titleConvertConfig, textConvertConfig } from '@megafon/ui-helpers';
|
8
8
|
import "./PromoBannerSlide.css";
|
9
|
+
export var BackgroundColor = {
|
10
|
+
DARK_VIOLET: 'dark-violet',
|
11
|
+
LIGHT_VIOLET: 'light-violet',
|
12
|
+
GREEN_20: 'green-20',
|
13
|
+
PURPLE_20: 'purple-20',
|
14
|
+
NIGHT_20: 'night-20',
|
15
|
+
FLAMINGO_20: 'flamingo-20',
|
16
|
+
BERRY_20: 'berry-20',
|
17
|
+
GRADIENT_PURPLE_1: 'gradient-purple-1',
|
18
|
+
GRADIENT_PURPLE_2: 'gradient-purple-2',
|
19
|
+
GRADIENT_PURPLE_3: 'gradient-purple-3',
|
20
|
+
GRADIENT_PURPLE_4: 'gradient-purple-4'
|
21
|
+
};
|
22
|
+
var getThemeSettings = function getThemeSettings(bgColor) {
|
23
|
+
switch (bgColor) {
|
24
|
+
case BackgroundColor.DARK_VIOLET:
|
25
|
+
case BackgroundColor.LIGHT_VIOLET:
|
26
|
+
return {
|
27
|
+
buttonColor: 'green',
|
28
|
+
textColor: 'inherit'
|
29
|
+
};
|
30
|
+
case BackgroundColor.GRADIENT_PURPLE_1:
|
31
|
+
case BackgroundColor.GRADIENT_PURPLE_2:
|
32
|
+
case BackgroundColor.GRADIENT_PURPLE_3:
|
33
|
+
case BackgroundColor.GRADIENT_PURPLE_4:
|
34
|
+
return {
|
35
|
+
buttonColor: 'white',
|
36
|
+
textColor: 'white'
|
37
|
+
};
|
38
|
+
default:
|
39
|
+
return {
|
40
|
+
buttonColor: 'green',
|
41
|
+
textColor: 'default'
|
42
|
+
};
|
43
|
+
}
|
44
|
+
};
|
9
45
|
var cn = cnCreate('mfui-promo-banner-slide');
|
10
46
|
var PromoBannerSlide = function PromoBannerSlide(_ref) {
|
11
47
|
var className = _ref.className,
|
@@ -19,6 +55,9 @@ var PromoBannerSlide = function PromoBannerSlide(_ref) {
|
|
19
55
|
classes = _ref.classes,
|
20
56
|
dataAttrs = _ref.dataAttrs,
|
21
57
|
rootRef = _ref.rootRef;
|
58
|
+
var _getThemeSettings = getThemeSettings(background),
|
59
|
+
buttonColor = _getThemeSettings.buttonColor,
|
60
|
+
textColor = _getThemeSettings.textColor;
|
22
61
|
var renderButtons = function renderButtons() {
|
23
62
|
if (!button && !extraButton) {
|
24
63
|
return null;
|
@@ -26,6 +65,7 @@ var PromoBannerSlide = function PromoBannerSlide(_ref) {
|
|
26
65
|
return /*#__PURE__*/React.createElement("div", _extends({
|
27
66
|
className: cn('buttons-wrapper')
|
28
67
|
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.buttonsWrapper)), !!button && /*#__PURE__*/React.createElement(Button, {
|
68
|
+
theme: buttonColor,
|
29
69
|
href: button.href,
|
30
70
|
target: button.target,
|
31
71
|
rel: button.rel,
|
@@ -37,6 +77,7 @@ var PromoBannerSlide = function PromoBannerSlide(_ref) {
|
|
37
77
|
},
|
38
78
|
onClick: button.onClick
|
39
79
|
}, button.title), !!extraButton && /*#__PURE__*/React.createElement(Button, {
|
80
|
+
theme: buttonColor,
|
40
81
|
href: extraButton.href,
|
41
82
|
target: extraButton.target,
|
42
83
|
rel: extraButton.rel,
|
@@ -89,11 +130,11 @@ var PromoBannerSlide = function PromoBannerSlide(_ref) {
|
|
89
130
|
}, /*#__PURE__*/React.createElement(Header, {
|
90
131
|
className: cn('title'),
|
91
132
|
as: "h2",
|
92
|
-
color:
|
133
|
+
color: textColor
|
93
134
|
}, typeof title === 'string' ? convert(title, titleConvertConfig) : title), /*#__PURE__*/React.createElement(Paragraph, {
|
94
135
|
className: cn('description'),
|
95
136
|
hasMargin: false,
|
96
|
-
color:
|
97
|
-
}, typeof description === 'string' ? convert(description, textConvertConfig) : description)), renderButtons()
|
137
|
+
color: textColor
|
138
|
+
}, typeof description === 'string' ? convert(description, textConvertConfig) : description)), renderButtons(), renderImage()));
|
98
139
|
};
|
99
140
|
export default PromoBannerSlide;
|
@@ -1 +1 @@
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-promo-card{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;background-color:var(--base);border-radius:24px;color:var(--content);cursor:pointer;-ms-flex-direction:column;flex-direction:column;min-height:100%;text-decoration:none;-webkit-transition:background-color,.3s,.3s,-webkit-box-shadow;transition:background-color,.3s,.3s,-webkit-box-shadow;transition:background-color,.3s,box-shadow,.3s;transition:background-color,.3s,box-shadow,.3s,-webkit-box-shadow}.mfui-promo-card_background_shadow{-webkit-box-shadow:0 2px 12px 0 rgba(0,0,0,.1);box-shadow:0 2px 12px 0 rgba(0,0,0,.1)}.mfui-promo-card_background_shadow:hover,.mfui-promo-card_background_white:hover{-webkit-box-shadow:0 8px 28px 0 rgba(0,0,0,.1);box-shadow:0 8px 28px 0 rgba(0,0,0,.1);text-decoration:none}.mfui-promo-card_background_gray{background-color:var(--spbSky0)}.mfui-promo-card_background_gray:hover{background-color:var(--spbSky1);text-decoration:none}.mfui-promo-card__image{border-radius:inherit;vertical-align:top;width:100%}.mfui-promo-card__content{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;padding:32px 24px}@media screen and (min-width:1280px){.mfui-promo-card__content{padding:32px}}.mfui-promo-card__badge{left:24px;position:absolute;top:0;translate:0 -50%}@media screen and (min-width:1280px){.mfui-promo-card__badge{left:32px}}.mfui-promo-card__logo{background-color:var(--base);border:4px solid var(--base);border-radius:50%;position:absolute;right:44px;top:0;-webkit-transition:border-color,.3s;transition:border-color,.3s;translate:0 -50%}@media screen and (min-width:1280px){.mfui-promo-card__logo{right:52px}}.mfui-promo-card__logo:after,.mfui-promo-card__logo:before{content:"";height:10px;position:absolute;top:50%;translate:0 -100%;width:10px}.mfui-promo-card__logo:before{background-image:radial-gradient(circle at 0 0,transparent 9px,var(--base) 10px);left:-12px}.mfui-promo-card__logo:after{background-image:radial-gradient(circle at 100% 0,transparent 9px,var(--base) 10px);right:-12px}.mfui-promo-card_background_gray .mfui-promo-card__logo{background-color:var(--spbSky0);border-color:var(--spbSky0)}.mfui-promo-card_background_gray .mfui-promo-card__logo:before{background-image:radial-gradient(circle at 0 0,transparent 9px,var(--spbSky0) 10px)}.mfui-promo-card_background_gray .mfui-promo-card__logo:after{background-image:radial-gradient(circle at 100% 0,transparent 9px,var(--spbSky0) 10px)}.mfui-promo-card_background_gray:hover .mfui-promo-card__logo{background-color:var(--spbSky1);border-color:var(--spbSky1)}.mfui-promo-card_background_gray:hover .mfui-promo-card__logo:before{background-image:radial-gradient(circle at 0 0,transparent 9px,var(--spbSky1) 10px)}.mfui-promo-card_background_gray:hover .mfui-promo-card__logo:after{background-image:radial-gradient(circle at 100% 0,transparent 9px,var(--spbSky1) 10px)}.mfui-promo-card__logo-img{border:1px solid var(--spbSky1);border-radius:inherit;height:56px;vertical-align:top;width:56px}@media screen and (min-width:768px){.mfui-promo-card__logo-img{height:64px;width:64px}}@media screen and (min-width:1280px){.mfui-promo-card__logo-img{height:72px;width:72px}}.mfui-promo-card__subtitle{margin-top:8px}.mfui-promo-card__footer{margin-top:auto;padding-top:16px}
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-promo-card{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;-webkit-box-orient:vertical;-webkit-box-direction:normal;background-color:var(--base);border-radius:24px;color:var(--content);cursor:pointer;-ms-flex-direction:column;flex-direction:column;min-height:100%;text-decoration:none;-webkit-transition:background-color,.3s,.3s,-webkit-box-shadow;transition:background-color,.3s,.3s,-webkit-box-shadow;transition:background-color,.3s,box-shadow,.3s;transition:background-color,.3s,box-shadow,.3s,-webkit-box-shadow}.mfui-promo-card_background_shadow{-webkit-box-shadow:0 2px 12px 0 rgba(0,0,0,.1);box-shadow:0 2px 12px 0 rgba(0,0,0,.1)}.mfui-promo-card_background_shadow:hover,.mfui-promo-card_background_white:hover{-webkit-box-shadow:0 8px 28px 0 rgba(0,0,0,.1);box-shadow:0 8px 28px 0 rgba(0,0,0,.1);text-decoration:none}.mfui-promo-card_background_gray{background-color:var(--spbSky0)}.mfui-promo-card_background_gray:hover{background-color:var(--spbSky1);text-decoration:none}.mfui-promo-card__ad-title{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--stcBlack20);border:none;border-radius:8px;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--stcWhite);cursor:pointer;font-family:inherit;font-size:12px;line-height:18px;margin:0;outline:none;padding:1px 8px 3px;position:absolute;right:16px;text-decoration:none;top:16px;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mfui-promo-card__ad-tooltip{max-width:232px}.mfui-promo-card__ad-tooltip-content{font-size:12px;line-height:18px}.mfui-promo-card__image{border-radius:inherit;vertical-align:top;width:100%}.mfui-promo-card__content{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;padding:32px 24px}@media screen and (min-width:1280px){.mfui-promo-card__content{padding:32px}}.mfui-promo-card__badge{left:24px;position:absolute;top:0;translate:0 -50%}@media screen and (min-width:1280px){.mfui-promo-card__badge{left:32px}}.mfui-promo-card__logo{background-color:var(--base);border:4px solid var(--base);border-radius:50%;position:absolute;right:44px;top:0;-webkit-transition:border-color,.3s;transition:border-color,.3s;translate:0 -50%}@media screen and (min-width:1280px){.mfui-promo-card__logo{right:52px}}.mfui-promo-card__logo:after,.mfui-promo-card__logo:before{content:"";height:10px;position:absolute;top:50%;translate:0 -100%;width:10px}.mfui-promo-card__logo:before{background-image:radial-gradient(circle at 0 0,transparent 9px,var(--base) 10px);left:-12px}.mfui-promo-card__logo:after{background-image:radial-gradient(circle at 100% 0,transparent 9px,var(--base) 10px);right:-12px}.mfui-promo-card_background_gray .mfui-promo-card__logo{background-color:var(--spbSky0);border-color:var(--spbSky0)}.mfui-promo-card_background_gray .mfui-promo-card__logo:before{background-image:radial-gradient(circle at 0 0,transparent 9px,var(--spbSky0) 10px)}.mfui-promo-card_background_gray .mfui-promo-card__logo:after{background-image:radial-gradient(circle at 100% 0,transparent 9px,var(--spbSky0) 10px)}.mfui-promo-card_background_gray:hover .mfui-promo-card__logo{background-color:var(--spbSky1);border-color:var(--spbSky1)}.mfui-promo-card_background_gray:hover .mfui-promo-card__logo:before{background-image:radial-gradient(circle at 0 0,transparent 9px,var(--spbSky1) 10px)}.mfui-promo-card_background_gray:hover .mfui-promo-card__logo:after{background-image:radial-gradient(circle at 100% 0,transparent 9px,var(--spbSky1) 10px)}.mfui-promo-card__logo-img{border:1px solid var(--spbSky1);border-radius:inherit;height:56px;vertical-align:top;width:56px}@media screen and (min-width:768px){.mfui-promo-card__logo-img{height:64px;width:64px}}@media screen and (min-width:1280px){.mfui-promo-card__logo-img{height:72px;width:72px}}.mfui-promo-card__subtitle{margin-top:8px}.mfui-promo-card__list{font-size:15px;font-weight:400;line-height:24px;list-style:none;margin:8px 0 0;padding:0}.mfui-promo-card__list-item{margin:0;padding:0 0 0 20px;position:relative}.mfui-promo-card__list-item:before{background-color:var(--spbSky2);border-radius:50%;content:"";height:6px;left:1px;position:absolute;top:9px;width:6px}.mfui-promo-card__list-item:not(:last-child){margin-bottom:12px}.mfui-promo-card__list-item b{font-weight:500}.mfui-promo-card__footer{margin-top:auto;padding-top:16px}
|
@@ -15,6 +15,8 @@ export interface IPromoCard extends IPromoCardData, IPromoCardSettings {
|
|
15
15
|
badge?: Record<string, string>;
|
16
16
|
logo?: Record<string, string>;
|
17
17
|
subtitle?: Record<string, string>;
|
18
|
+
list?: Record<string, string>;
|
19
|
+
adTitle?: Record<string, string>;
|
18
20
|
};
|
19
21
|
}
|
20
22
|
declare const PromoCard: React.FC<IPromoCard>;
|
@@ -1,29 +1,53 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
|
+
import "core-js/modules/es.symbol.js";
|
2
3
|
import "core-js/modules/es.array.concat.js";
|
4
|
+
import "core-js/modules/es.array.index-of.js";
|
5
|
+
import "core-js/modules/es.array.map.js";
|
3
6
|
import "core-js/modules/es.string.link.js";
|
7
|
+
var __rest = this && this.__rest || function (s, e) {
|
8
|
+
var t = {};
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
10
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
11
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
12
|
+
}
|
13
|
+
return t;
|
14
|
+
};
|
4
15
|
import * as React from 'react';
|
5
|
-
import { Button, Header, Paragraph, PriceBadge, PromoBadge } from '@megafon/ui-core';
|
16
|
+
import { Button, Header, Paragraph, PriceBadge, PromoBadge, Tooltip } from '@megafon/ui-core';
|
6
17
|
import { cnCreate, convert, filterDataAttrs } from '@megafon/ui-helpers';
|
7
18
|
import { setRelAttribute } from "../../../../helpers/setRelAttribute";
|
8
19
|
import "./PromoCard.css";
|
20
|
+
var listItemConvertConfig = {
|
21
|
+
b: {
|
22
|
+
component: function component(_ref) {
|
23
|
+
var children = _ref.children;
|
24
|
+
return /*#__PURE__*/React.createElement("b", null, children);
|
25
|
+
}
|
26
|
+
}
|
27
|
+
};
|
9
28
|
var cn = cnCreate('mfui-promo-card');
|
10
|
-
var PromoCard = function PromoCard(
|
11
|
-
var title =
|
12
|
-
subtitle =
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
29
|
+
var PromoCard = function PromoCard(_ref2) {
|
30
|
+
var title = _ref2.title,
|
31
|
+
subtitle = _ref2.subtitle,
|
32
|
+
_ref2$list = _ref2.list,
|
33
|
+
list = _ref2$list === void 0 ? [] : _ref2$list,
|
34
|
+
link = _ref2.link,
|
35
|
+
_ref2$background = _ref2.background,
|
36
|
+
background = _ref2$background === void 0 ? 'shadow' : _ref2$background,
|
37
|
+
image = _ref2.image,
|
38
|
+
logo = _ref2.logo,
|
39
|
+
badge = _ref2.badge,
|
40
|
+
_ref2$promoBadge = _ref2.promoBadge,
|
41
|
+
promoBadge = _ref2$promoBadge === void 0 ? null : _ref2$promoBadge,
|
42
|
+
_ref2$priceBadge = _ref2.priceBadge,
|
43
|
+
priceBadge = _ref2$priceBadge === void 0 ? null : _ref2$priceBadge,
|
44
|
+
_ref2$adMark = _ref2.adMark,
|
45
|
+
adMark = _ref2$adMark === void 0 ? null : _ref2$adMark,
|
46
|
+
className = _ref2.className,
|
47
|
+
classes = _ref2.classes,
|
48
|
+
dataAttrs = _ref2.dataAttrs,
|
49
|
+
onClick = _ref2.onClick;
|
50
|
+
var adTriggerRef = React.useRef(null);
|
27
51
|
var imageSrc = image.src,
|
28
52
|
imageSrc2x = image.src2x,
|
29
53
|
imageAlt = image.alt;
|
@@ -32,15 +56,19 @@ var PromoCard = function PromoCard(_ref) {
|
|
32
56
|
linkTarget = _link$target === void 0 ? '_self' : _link$target,
|
33
57
|
linkRel = link.rel,
|
34
58
|
linkTitle = link.title;
|
35
|
-
var
|
36
|
-
promoBadgeText =
|
37
|
-
promoBadgeColor =
|
38
|
-
var
|
39
|
-
priceBadgeText =
|
40
|
-
priceBadgeIcon =
|
41
|
-
priceBadgeTheme =
|
59
|
+
var _ref3 = promoBadge || {},
|
60
|
+
promoBadgeText = _ref3.text,
|
61
|
+
promoBadgeColor = _ref3.color;
|
62
|
+
var _ref4 = priceBadge || {},
|
63
|
+
priceBadgeText = _ref4.text,
|
64
|
+
priceBadgeIcon = _ref4.iconType,
|
65
|
+
priceBadgeTheme = _ref4.theme;
|
42
66
|
var imageSrcSet = imageSrc2x ? "".concat(imageSrc, ", ").concat(imageSrc2x, " 2x") : undefined;
|
43
67
|
var hasBadge = !!promoBadgeText || !!priceBadgeText || !!badge;
|
68
|
+
var handleAdTitleClick = React.useCallback(function (e) {
|
69
|
+
e.preventDefault();
|
70
|
+
e.stopPropagation();
|
71
|
+
}, []);
|
44
72
|
var renderBadge = React.useMemo(function () {
|
45
73
|
switch (true) {
|
46
74
|
case !!promoBadgeText:
|
@@ -66,6 +94,34 @@ var PromoCard = function PromoCard(_ref) {
|
|
66
94
|
}), badge);
|
67
95
|
}
|
68
96
|
}, [dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.badge, promoBadgeText, promoBadgeColor, priceBadgeText, priceBadgeIcon, priceBadgeTheme, badge]);
|
97
|
+
var renderAdMark = function renderAdMark() {
|
98
|
+
var _ref5 = adMark || {},
|
99
|
+
adTitle = _ref5.title,
|
100
|
+
adTooltip = _ref5.tooltip;
|
101
|
+
var _a = adTooltip || {},
|
102
|
+
placement = _a.placement,
|
103
|
+
offset = _a.offset,
|
104
|
+
triggerEvent = _a.triggerEvent,
|
105
|
+
colorTheme = _a.colorTheme,
|
106
|
+
children = _a.children,
|
107
|
+
restAdTooltip = __rest(_a, ["placement", "offset", "triggerEvent", "colorTheme", "children"]);
|
108
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !!adTitle && /*#__PURE__*/React.createElement("button", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.adTitle), {
|
109
|
+
className: cn('ad-title'),
|
110
|
+
ref: adTriggerRef,
|
111
|
+
onClick: handleAdTitleClick,
|
112
|
+
type: "button"
|
113
|
+
}), adTitle), !!adTooltip && /*#__PURE__*/React.createElement(Tooltip, _extends({
|
114
|
+
className: cn('ad-tooltip')
|
115
|
+
}, restAdTooltip, {
|
116
|
+
placement: placement || 'bottom',
|
117
|
+
offset: offset || 'small',
|
118
|
+
triggerEvent: triggerEvent || 'hover',
|
119
|
+
colorTheme: colorTheme || 'blue',
|
120
|
+
triggerElement: adTriggerRef
|
121
|
+
}), !!children && /*#__PURE__*/React.createElement("div", {
|
122
|
+
className: cn('ad-tooltip-content')
|
123
|
+
}, typeof children === 'string' ? convert(children, {}) : children)));
|
124
|
+
};
|
69
125
|
return /*#__PURE__*/React.createElement("a", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
70
126
|
className: cn({
|
71
127
|
background: background
|
@@ -74,7 +130,7 @@ var PromoCard = function PromoCard(_ref) {
|
|
74
130
|
target: linkTarget,
|
75
131
|
rel: setRelAttribute(linkRel, linkTarget),
|
76
132
|
onClick: onClick
|
77
|
-
}), /*#__PURE__*/React.createElement("img", _extends({
|
133
|
+
}), !!adMark && renderAdMark(), /*#__PURE__*/React.createElement("img", _extends({
|
78
134
|
className: cn('image')
|
79
135
|
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.image), {
|
80
136
|
srcSet: imageSrcSet,
|
@@ -90,13 +146,21 @@ var PromoCard = function PromoCard(_ref) {
|
|
90
146
|
alt: logo.alt || ''
|
91
147
|
})), /*#__PURE__*/React.createElement(Header, {
|
92
148
|
as: "h3"
|
93
|
-
}, convert(title, {})), !!subtitle && /*#__PURE__*/React.createElement(
|
94
|
-
className: cn('subtitle')
|
149
|
+
}, convert(title, {})), !!subtitle && /*#__PURE__*/React.createElement("div", {
|
150
|
+
className: cn('subtitle')
|
151
|
+
}, /*#__PURE__*/React.createElement(Paragraph, {
|
95
152
|
hasMargin: false,
|
96
153
|
dataAttrs: {
|
97
154
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.subtitle
|
98
155
|
}
|
99
|
-
}, convert(subtitle, {})), /*#__PURE__*/React.createElement("
|
156
|
+
}, convert(subtitle, {}))), !!list.length && /*#__PURE__*/React.createElement("ul", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.list), {
|
157
|
+
className: cn('list')
|
158
|
+
}), list.map(function (item, i) {
|
159
|
+
return /*#__PURE__*/React.createElement("li", {
|
160
|
+
className: cn('list-item'),
|
161
|
+
key: i
|
162
|
+
}, convert(item, listItemConvertConfig));
|
163
|
+
})), /*#__PURE__*/React.createElement("div", {
|
100
164
|
className: cn('footer')
|
101
165
|
}, /*#__PURE__*/React.createElement(Button, {
|
102
166
|
sizeAll: "small",
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import type { IPriceBadgeProps } from '@megafon/ui-core/dist/lib/components/Badges/PriceBadge/PriceBadge';
|
2
2
|
import type { IPromoBadgeProps } from '@megafon/ui-core/dist/lib/components/Badges/PromoBadge/PromoBadge';
|
3
|
+
import type { ITooltipProps } from '@megafon/ui-core/dist/lib/components/Tooltip/Tooltip';
|
3
4
|
type ImageType = {
|
4
5
|
src: string;
|
5
6
|
src2x?: string;
|
@@ -24,6 +25,12 @@ type PriceBadgeType = {
|
|
24
25
|
iconType?: IPriceBadgeProps['iconType'];
|
25
26
|
theme?: IPriceBadgeProps['theme'];
|
26
27
|
};
|
28
|
+
type AdMarkType = {
|
29
|
+
/** Заголовок */
|
30
|
+
title: string;
|
31
|
+
/** Параметры тултипа (пропсы компонента Tooltip из ui-core) */
|
32
|
+
tooltip: Omit<ITooltipProps, 'triggerElement'>;
|
33
|
+
};
|
27
34
|
export interface IPromoCardSettings {
|
28
35
|
/** Фон карточки */
|
29
36
|
background?: 'gray' | 'white' | 'shadow';
|
@@ -33,6 +40,8 @@ export interface IPromoCardData {
|
|
33
40
|
title: string;
|
34
41
|
/** Подзаголовок карточки */
|
35
42
|
subtitle?: string;
|
43
|
+
/** Список карточки (может принимать тег b в пунктах) */
|
44
|
+
list?: string[];
|
36
45
|
/** Параметры для ссылки в карточке */
|
37
46
|
link: LinkType;
|
38
47
|
/** Параметры для изображения в карточке */
|
@@ -45,6 +54,8 @@ export interface IPromoCardData {
|
|
45
54
|
promoBadge?: PromoBadgeType | null;
|
46
55
|
/** Параметры для отображения компонента PriceBadge в карточке */
|
47
56
|
priceBadge?: PriceBadgeType | null;
|
57
|
+
/** Рекламная метка */
|
58
|
+
adMark?: AdMarkType | null;
|
48
59
|
/** Обработчик клика по карточке */
|
49
60
|
onClick?: (e: React.SyntheticEvent<EventTarget>) => void;
|
50
61
|
}
|
@@ -1 +1 @@
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-service-cards__items{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:20px}@media screen and (min-width:768px){.mfui-service-cards__items{display:grid;grid-auto-rows:290px;grid-template-columns:
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-service-cards__items{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:20px}@media screen and (min-width:768px){.mfui-service-cards__items{display:grid;grid-auto-rows:290px;grid-template-columns:repeat(2,1fr)}}@media screen and (min-width:1280px){.mfui-service-cards__items{grid-template-columns:repeat(3,1fr)}}@media screen and (min-width:768px){.mfui-service-cards__item_size_big{grid-row-end:span 2;grid-row-start:1}}
|
@@ -1 +1 @@
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-stepper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-stepper{gap:16px}.mfui-stepper,.mfui-stepper__items-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.mfui-stepper__items-wrap{gap:12px;overflow-x:auto}.mfui-stepper::-webkit-scrollbar{height:8px}.mfui-stepper::-webkit-scrollbar-thumb{background-color:var(--spbSky2);border-radius:8px}.mfui-stepper_is-horizontal .mfui-stepper__items-wrap{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}
|
@@ -8,6 +8,7 @@ export interface IStepperProps {
|
|
8
8
|
/** Дополнительные классы элементов */
|
9
9
|
classes?: {
|
10
10
|
root?: string;
|
11
|
+
itemsWrap?: string;
|
11
12
|
item?: string;
|
12
13
|
itemIconButton?: string;
|
13
14
|
itemTitle?: string;
|
@@ -30,11 +31,14 @@ export interface IStepperProps {
|
|
30
31
|
isDisabled?: boolean;
|
31
32
|
/** Все шаги пройдены */
|
32
33
|
isAllChecked?: boolean;
|
34
|
+
/** Отображение контента только активного шага */
|
35
|
+
showActiveStepContent?: boolean;
|
33
36
|
/** Выравнивание */
|
34
37
|
align?: 'center' | 'left';
|
35
38
|
/** Дополнительные data атрибуты к внутренним элементам */
|
36
39
|
dataAttrs?: {
|
37
40
|
root?: Record<string, string>;
|
41
|
+
itemsWrap?: Record<string, string>;
|
38
42
|
item?: Record<string, string>;
|
39
43
|
itemIconButton?: Record<string, string>;
|
40
44
|
itemTitle?: Record<string, string>;
|
@@ -5,7 +5,7 @@ import "core-js/modules/es.array.map.js";
|
|
5
5
|
import "core-js/modules/es.string.iterator.js";
|
6
6
|
import * as React from 'react';
|
7
7
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
8
|
-
import StepperItem, { STEPPER_ITEM_THEME_ENUM } from "./StepperItem";
|
8
|
+
import StepperItem, { STEPPER_ITEM_THEME_ENUM, STEPPER_ITEM_VIEW_ENUM } from "./StepperItem";
|
9
9
|
import "./Stepper.css";
|
10
10
|
var CheckedIcon = function CheckedIcon(props) {
|
11
11
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
@@ -20,6 +20,7 @@ var Stepper = function Stepper(_ref) {
|
|
20
20
|
_ref$classes = _ref.classes,
|
21
21
|
_ref$classes2 = _ref$classes === void 0 ? {} : _ref$classes,
|
22
22
|
rootClassName = _ref$classes2.root,
|
23
|
+
itemsWrapClassName = _ref$classes2.itemsWrap,
|
23
24
|
itemClassName = _ref$classes2.item,
|
24
25
|
itemIconButtonClassName = _ref$classes2.itemIconButton,
|
25
26
|
itemTitleClassName = _ref$classes2.itemTitle,
|
@@ -37,11 +38,14 @@ var Stepper = function Stepper(_ref) {
|
|
37
38
|
isNumeric = _ref.isNumeric,
|
38
39
|
isDisabled = _ref.isDisabled,
|
39
40
|
isAllChecked = _ref.isAllChecked,
|
41
|
+
_ref$showActiveStepCo = _ref.showActiveStepContent,
|
42
|
+
showActiveStepContent = _ref$showActiveStepCo === void 0 ? false : _ref$showActiveStepCo,
|
40
43
|
_ref$align = _ref.align,
|
41
44
|
align = _ref$align === void 0 ? 'center' : _ref$align,
|
42
45
|
_ref$dataAttrs = _ref.dataAttrs,
|
43
46
|
_ref$dataAttrs2 = _ref$dataAttrs === void 0 ? {} : _ref$dataAttrs,
|
44
47
|
rootAttrs = _ref$dataAttrs2.root,
|
48
|
+
itemsWrapAttrs = _ref$dataAttrs2.itemsWrap,
|
45
49
|
itemAttrs = _ref$dataAttrs2.item,
|
46
50
|
itemIconButtonAttrs = _ref$dataAttrs2.itemIconButton,
|
47
51
|
itemTitleAttrs = _ref$dataAttrs2.itemTitle,
|
@@ -56,6 +60,7 @@ var Stepper = function Stepper(_ref) {
|
|
56
60
|
currentIndex = _React$useState2[0],
|
57
61
|
setCurrentIndex = _React$useState2[1];
|
58
62
|
var hasCustomItems = !!items.length;
|
63
|
+
var isHorizontalContent = isHorizontal || showActiveStepContent;
|
59
64
|
var currentItems = hasCustomItems ? items : Array.from({
|
60
65
|
length: stepCount
|
61
66
|
});
|
@@ -98,43 +103,53 @@ var Stepper = function Stepper(_ref) {
|
|
98
103
|
}
|
99
104
|
return /*#__PURE__*/React.createElement(CheckedIcon, null);
|
100
105
|
}, [isNumeric]);
|
106
|
+
var renderItem = React.useCallback(function (props) {
|
107
|
+
return /*#__PURE__*/React.createElement(StepperItem, _extends({}, props, {
|
108
|
+
className: itemClassName,
|
109
|
+
classes: {
|
110
|
+
iconButton: itemIconButtonClassName,
|
111
|
+
title: itemTitleClassName,
|
112
|
+
text: itemTextClassname,
|
113
|
+
link: itemLinkClassName
|
114
|
+
},
|
115
|
+
dataAttrs: {
|
116
|
+
root: itemAttrs,
|
117
|
+
iconButton: itemIconButtonAttrs,
|
118
|
+
title: itemTitleAttrs,
|
119
|
+
text: itemTextAttrs,
|
120
|
+
link: itemLinkAttrs
|
121
|
+
}
|
122
|
+
}));
|
123
|
+
}, [itemAttrs, itemIconButtonAttrs, itemIconButtonClassName, itemClassName, itemLinkAttrs, itemLinkClassName, itemTextAttrs, itemTextClassname, itemTitleAttrs, itemTitleClassName]);
|
101
124
|
var renderItems = React.useMemo(function () {
|
102
125
|
return currentItems.map(function (elem, i) {
|
103
126
|
var item = elem || {};
|
104
127
|
var itemTheme = defineItemTheme(i);
|
105
128
|
var itemIcon = item.icon || renderIcon(i, itemTheme);
|
106
|
-
|
107
|
-
return /*#__PURE__*/React.createElement(StepperItem, _extends({}, item, {
|
108
|
-
className: itemClassName,
|
109
|
-
classes: {
|
110
|
-
iconButton: itemIconButtonClassName,
|
111
|
-
title: itemTitleClassName,
|
112
|
-
text: itemTextClassname,
|
113
|
-
link: itemLinkClassName
|
114
|
-
},
|
115
|
-
dataAttrs: {
|
116
|
-
root: itemAttrs,
|
117
|
-
iconButton: itemIconButtonAttrs,
|
118
|
-
title: itemTitleAttrs,
|
119
|
-
text: itemTextAttrs,
|
120
|
-
link: itemLinkAttrs
|
121
|
-
},
|
122
|
-
key: i,
|
129
|
+
return renderItem(_extends(_extends({}, item), {
|
123
130
|
icon: itemIcon,
|
124
|
-
hasSeparator:
|
125
|
-
isHorizontal:
|
131
|
+
hasSeparator: i < currentItems.length - 1,
|
132
|
+
isHorizontal: isHorizontalContent,
|
126
133
|
isDisabled: isDisabled,
|
127
134
|
align: align,
|
128
135
|
theme: itemTheme,
|
136
|
+
view: showActiveStepContent ? STEPPER_ITEM_VIEW_ENUM.ICON : STEPPER_ITEM_VIEW_ENUM.DEFAULT,
|
129
137
|
onClick: handleClickItem(i)
|
130
138
|
}));
|
131
139
|
});
|
132
|
-
}, [align, currentItems, isDisabled,
|
140
|
+
}, [align, currentItems, isDisabled, showActiveStepContent, isHorizontalContent, defineItemTheme, handleClickItem, renderIcon, renderItem]);
|
141
|
+
var renderSingleItem = renderItem(_extends(_extends({}, currentItems[currentIndex]), {
|
142
|
+
isDisabled: isDisabled,
|
143
|
+
align: align,
|
144
|
+
view: STEPPER_ITEM_VIEW_ENUM.CONTENT
|
145
|
+
}));
|
133
146
|
return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(rootAttrs), {
|
134
147
|
className: cn([className, rootClassName], {
|
135
|
-
'is-horizontal':
|
148
|
+
'is-horizontal': isHorizontalContent
|
136
149
|
}),
|
137
150
|
ref: rootRef
|
138
|
-
}),
|
151
|
+
}), /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(itemsWrapAttrs), {
|
152
|
+
className: cn('items-wrap', [itemsWrapClassName])
|
153
|
+
}), renderItems), showActiveStepContent && renderSingleItem);
|
139
154
|
};
|
140
155
|
export default Stepper;
|