@megafon/ui-shared 6.0.0-beta.4 → 6.0.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/es/components/BlogBox/BlogBox.css +1 -0
  2. package/dist/es/components/BlogBox/BlogBox.d.ts +28 -0
  3. package/dist/es/components/BlogBox/BlogBox.js +67 -0
  4. package/dist/es/components/BlogBox/components/BlogBoxTile.css +1 -0
  5. package/dist/es/components/BlogBox/components/BlogBoxTile.d.ts +9 -0
  6. package/dist/es/components/BlogBox/components/BlogBoxTile.js +60 -0
  7. package/dist/es/components/BlogBox/types.d.ts +37 -0
  8. package/dist/es/components/BlogBox/types.js +1 -0
  9. package/dist/es/components/Container/Container.css +1 -1
  10. package/dist/es/components/Instructions/Instructions.css +1 -1
  11. package/dist/es/components/Instructions/Instructions.d.ts +2 -0
  12. package/dist/es/components/Instructions/Instructions.js +25 -8
  13. package/dist/es/helpers/setRelAttribute.d.ts +3 -0
  14. package/dist/es/helpers/setRelAttribute.js +9 -0
  15. package/dist/es/hooks/useResolutions.d.ts +7 -0
  16. package/dist/es/hooks/useResolutions.js +52 -0
  17. package/dist/es/index.d.ts +2 -0
  18. package/dist/es/index.js +2 -0
  19. package/dist/lib/components/BlogBox/BlogBox.css +1 -0
  20. package/dist/lib/components/BlogBox/BlogBox.d.ts +28 -0
  21. package/dist/lib/components/BlogBox/BlogBox.js +76 -0
  22. package/dist/lib/components/BlogBox/components/BlogBoxTile.css +1 -0
  23. package/dist/lib/components/BlogBox/components/BlogBoxTile.d.ts +9 -0
  24. package/dist/lib/components/BlogBox/components/BlogBoxTile.js +69 -0
  25. package/dist/lib/components/BlogBox/types.d.ts +37 -0
  26. package/dist/lib/components/BlogBox/types.js +5 -0
  27. package/dist/lib/components/Container/Container.css +1 -1
  28. package/dist/lib/components/Instructions/Instructions.css +1 -1
  29. package/dist/lib/components/Instructions/Instructions.d.ts +2 -0
  30. package/dist/lib/components/Instructions/Instructions.js +27 -10
  31. package/dist/lib/helpers/setRelAttribute.d.ts +3 -0
  32. package/dist/lib/helpers/setRelAttribute.js +15 -0
  33. package/dist/lib/hooks/useResolutions.d.ts +7 -0
  34. package/dist/lib/hooks/useResolutions.js +59 -0
  35. package/dist/lib/index.d.ts +2 -0
  36. package/dist/lib/index.js +14 -0
  37. 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__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{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:4px 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{width:55%}}.mfui-instructions__articles-title{font-size:15px;font-weight:400;line-height:24px}.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}}
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__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{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:4px 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}.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;-webkit-box-pack:center;-ms-flex-pack:center;background-color:var(--brandGreen);border-radius:50%;color:var(--stcWhite);height:40px;justify-content:center;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}}
@@ -96,6 +96,8 @@ export interface IInstructionsProps {
96
96
  arrowsTheme?: ArrowThemeType;
97
97
  /** Вертикальный порядок элементов на мобильных устройствах и планшетах */
98
98
  elementOrder?: ElementOrderType;
99
+ /** Показать нумерацию пунктов инструкции на мобильных устройствах */
100
+ showMobileNumeration?: boolean;
99
101
  /** Ref на swiper */
100
102
  getSwiper?: (instance: SwiperCore) => void;
101
103
  }
@@ -6,8 +6,17 @@ import "core-js/modules/es.array.map.js";
6
6
  import * as React from 'react';
7
7
  import { Grid, GridColumn, Header, NavArrow, Paragraph, Tile } from '@megafon/ui-core';
8
8
  import { cnCreate, filterDataAttrs, titleConvertConfig, convert, textConvertConfig } from '@megafon/ui-helpers';
9
- import { Swiper, SwiperSlide } from 'swiper/react';
10
9
  import "./Instructions.css";
10
+ var Swiper = null;
11
+ var SwiperSlide = null;
12
+ try {
13
+ // eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
14
+ var SwiperAll = require('swiper/react');
15
+ Swiper = SwiperAll.Swiper;
16
+ SwiperSlide = SwiperAll.SwiperSlide;
17
+ } catch (e) {
18
+ // empty
19
+ }
11
20
  export var pictureAlignTypes = {
12
21
  LEFT: 'left',
13
22
  RIGHT: 'right'
@@ -76,6 +85,7 @@ var Instructions = function Instructions(_ref) {
76
85
  arrowsTheme = _ref$arrowsTheme === void 0 ? arrowTheme.DARK : _ref$arrowsTheme,
77
86
  _ref$elementOrder = _ref.elementOrder,
78
87
  elementOrder = _ref$elementOrder === void 0 ? 'default' : _ref$elementOrder,
88
+ showMobileNumeration = _ref.showMobileNumeration,
79
89
  children = _ref.children;
80
90
  var _React$useState = React.useState(),
81
91
  _React$useState2 = _slicedToArray(_React$useState, 2),
@@ -149,6 +159,9 @@ var Instructions = function Instructions(_ref) {
149
159
  }));
150
160
  }, [instructionItems, dataAttrs, slideIndex, instructionItem, mobileInstructionItem, getActiveCustomClass, handleArticleClick, isMobileReversed]);
151
161
  var renderSlider = React.useCallback(function () {
162
+ if (!Swiper || !SwiperSlide) {
163
+ return /*#__PURE__*/React.createElement(React.Fragment, null);
164
+ }
152
165
  return /*#__PURE__*/React.createElement(Swiper, {
153
166
  noSwiping: false,
154
167
  onSwiper: getSwiperInstance,
@@ -250,18 +263,22 @@ var Instructions = function Instructions(_ref) {
250
263
  "data-testid": "".concat(testIdPrefix, "-articles-list-mobile")
251
264
  }, /*#__PURE__*/React.createElement("div", {
252
265
  className: cn('articles-title-block', {
253
- reversed: isMobileReversed
266
+ reversed: isMobileReversed,
267
+ 'with-numeration': showMobileNumeration
254
268
  })
255
269
  }, instructionItems.map(function (_ref6, i) {
256
270
  var itemTitle = _ref6.title;
257
- return slideIndex === i && /*#__PURE__*/React.createElement("div", _extends({
271
+ return slideIndex === i && /*#__PURE__*/React.createElement("div", {
258
272
  key: i,
259
- "data-index": i
260
- }, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.mobileItemText, i + 1), {
261
- className: cn('articles-title', [mobileItemTitle])
262
- }), itemTitle);
273
+ "data-index": i,
274
+ className: cn('articles-title')
275
+ }, showMobileNumeration && /*#__PURE__*/React.createElement("span", {
276
+ className: cn('articles-num')
277
+ }, i + 1), /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.mobileItemText, i + 1), {
278
+ className: cn('articles-title-text', [mobileItemTitle])
279
+ }), itemTitle));
263
280
  })));
264
- }, [dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.mobileItemText, instructionItems, mobileItemTitle, slideIndex, isMobileReversed]);
281
+ }, [dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.mobileItemText, instructionItems, mobileItemTitle, slideIndex, isMobileReversed, showMobileNumeration]);
265
282
  var renderArrows = React.useCallback(function () {
266
283
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(NavArrow, {
267
284
  dataAttrs: {
@@ -0,0 +1,3 @@
1
+ type TargetType = '_self' | '_blank' | '_parent' | '_top';
2
+ export declare const setRelAttribute: (rel?: string, target?: TargetType) => string | undefined;
3
+ export {};
@@ -0,0 +1,9 @@
1
+ export var setRelAttribute = function setRelAttribute(rel, target) {
2
+ if (rel) {
3
+ return rel;
4
+ }
5
+ if (target !== '_self') {
6
+ return 'noreferrer noopener';
7
+ }
8
+ return undefined;
9
+ };
@@ -0,0 +1,7 @@
1
+ export type useResolutionsReturnType = {
2
+ isDesktop: boolean;
3
+ isMobile: boolean;
4
+ isTablet: boolean;
5
+ };
6
+ declare const useResolutions: () => useResolutionsReturnType;
7
+ export default useResolutions;
@@ -0,0 +1,52 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+ import "core-js/modules/es.array.concat.js";
3
+ import React from 'react';
4
+ import { breakpoints } from '@megafon/ui-helpers';
5
+ var MOBILE_MIDDLE_END = breakpoints.MOBILE_MIDDLE_END,
6
+ MOBILE_BIG_START = breakpoints.MOBILE_BIG_START,
7
+ MOBILE_BIG_END = breakpoints.MOBILE_BIG_END,
8
+ DESKTOP_SMALL_START = breakpoints.DESKTOP_SMALL_START;
9
+ var useResolutions = function useResolutions() {
10
+ var _React$useState = React.useState(false),
11
+ _React$useState2 = _slicedToArray(_React$useState, 2),
12
+ isMobile = _React$useState2[0],
13
+ setIsMobile = _React$useState2[1];
14
+ var _React$useState3 = React.useState(false),
15
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
16
+ isTablet = _React$useState4[0],
17
+ setIsTablet = _React$useState4[1];
18
+ var _React$useState5 = React.useState(false),
19
+ _React$useState6 = _slicedToArray(_React$useState5, 2),
20
+ isDesktop = _React$useState6[0],
21
+ setIsDesktop = _React$useState6[1];
22
+ React.useEffect(function () {
23
+ if (typeof window === 'undefined') {
24
+ return undefined;
25
+ }
26
+ var _window = window,
27
+ matchMedia = _window.matchMedia;
28
+ var mobileQuery = matchMedia("(max-width: ".concat(MOBILE_MIDDLE_END, "px)"));
29
+ var tabletQuery = matchMedia("(min-width: ".concat(MOBILE_BIG_START, "px) and (max-width: ").concat(MOBILE_BIG_END, "px)"));
30
+ var desktopQuery = matchMedia("(min-width: ".concat(DESKTOP_SMALL_START, "px)"));
31
+ var handleResize = function handleResize() {
32
+ setIsMobile(mobileQuery.matches);
33
+ setIsTablet(tabletQuery.matches);
34
+ setIsDesktop(desktopQuery.matches);
35
+ };
36
+ handleResize();
37
+ mobileQuery.addEventListener('change', handleResize);
38
+ tabletQuery.addEventListener('change', handleResize);
39
+ desktopQuery.addEventListener('change', handleResize);
40
+ return function () {
41
+ mobileQuery.removeEventListener('change', handleResize);
42
+ tabletQuery.removeEventListener('change', handleResize);
43
+ desktopQuery.removeEventListener('change', handleResize);
44
+ };
45
+ }, []);
46
+ return {
47
+ isDesktop: isDesktop,
48
+ isMobile: isMobile,
49
+ isTablet: isTablet
50
+ };
51
+ };
52
+ export default useResolutions;
@@ -7,6 +7,8 @@ export { default as BannerBox } from './components/BannerBox/BannerBox';
7
7
  export { default as BenefitsIcons } from './components/BenefitsIcons/BenefitsIcons';
8
8
  export { default as BenefitsIconsTile } from './components/BenefitsIcons/BenefitsIconsTile';
9
9
  export { default as BenefitsPictures } from './components/BenefitsPictures/BenefitsPictures';
10
+ export { default as BlogBox } from './components/BlogBox/BlogBox';
11
+ export { default as BlogBoxTile } from './components/BlogBox/components/BlogBoxTile';
10
12
  export { default as Breadcrumbs } from './components/Breadcrumbs/Breadcrumbs';
11
13
  export { default as BreadcrumbsItem } from './components/Breadcrumbs/components/BreadcrumbsItem';
12
14
  export { default as ButtonBanner } from './components/ButtonBanner/ButtonBanner';
package/dist/es/index.js CHANGED
@@ -7,6 +7,8 @@ export { default as BannerBox } from "./components/BannerBox/BannerBox";
7
7
  export { default as BenefitsIcons } from "./components/BenefitsIcons/BenefitsIcons";
8
8
  export { default as BenefitsIconsTile } from "./components/BenefitsIcons/BenefitsIconsTile";
9
9
  export { default as BenefitsPictures } from "./components/BenefitsPictures/BenefitsPictures";
10
+ export { default as BlogBox } from "./components/BlogBox/BlogBox";
11
+ export { default as BlogBoxTile } from "./components/BlogBox/components/BlogBoxTile";
10
12
  export { default as Breadcrumbs } from "./components/Breadcrumbs/Breadcrumbs";
11
13
  export { default as BreadcrumbsItem } from "./components/Breadcrumbs/components/BreadcrumbsItem";
12
14
  export { default as ButtonBanner } from "./components/ButtonBanner/ButtonBanner";
@@ -0,0 +1 @@
1
+ h1,h2,h3,h4,h5{margin:0}.mfui-blog-box{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center}@media screen and (min-width:1024px){.mfui-blog-box__list{-webkit-column-gap:20px;-moz-column-gap:20px;column-gap:20px;display:grid;grid-template-columns:1fr 1fr;row-gap:24px}}.mfui-blog-box__list_row{grid-template-columns:repeat(6,1fr)}.mfui-blog-box__list_row .mfui-blog-box__item{grid-column-end:span 2}.mfui-blog-box__list_row-size_1 .mfui-blog-box__item{grid-column-start:3}.mfui-blog-box__list_row-size_2 .mfui-blog-box__item:first-child{grid-column-start:2}.mfui-blog-box__item_view_thumbnail{margin-top:16px}@media screen and (min-width:1024px){.mfui-blog-box__item_view_thumbnail{grid-column-end:2;grid-column-start:1;margin-top:0}}.mfui-blog-box__item_view_full{margin-bottom:24px}@media screen and (min-width:768px) and (max-width:1023px){.mfui-blog-box__item_view_full{margin-bottom:32px}}@media screen and (min-width:1024px){.mfui-blog-box__item_view_full{grid-column-end:3;grid-column-start:2;grid-row-end:4;grid-row-start:1;margin-bottom:0}}.mfui-blog-box__button-wrapper{margin-top:32px}@media screen and (min-width:768px) and (max-width:1023px){.mfui-blog-box__button-wrapper{margin-top:40px}}@media screen and (min-width:1024px){.mfui-blog-box__button-wrapper{margin-top:56px}}.mfui-blog-box__button{min-width:208px}.mfui-blog-box_align-left{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.mfui-blog-box_align-left .mfui-blog-box__item:first-child{grid-column-start:1}
@@ -0,0 +1,28 @@
1
+ import * as React from 'react';
2
+ import { ButtonType, TileDataType } from './types';
3
+ import './BlogBox.scss';
4
+ export interface IBlogBox {
5
+ /** Статьи (не более 4, остальные будут проигнорированы) */
6
+ items: TileDataType[];
7
+ /** Кнопка */
8
+ button?: ButtonType;
9
+ /** Выравнивание по левому краю (при количестве статей менее трех) */
10
+ hasAlignLeft?: boolean;
11
+ /** Дополнительный класс для компонента */
12
+ className?: string;
13
+ /** Дополнительные классы для внутренних элементов */
14
+ classes?: {
15
+ root?: string;
16
+ item?: string;
17
+ button?: string;
18
+ };
19
+ /** Дополнительные data атрибуты к внутренним элементам */
20
+ dataAttrs?: {
21
+ root?: Record<string, string>;
22
+ list?: Record<string, string>;
23
+ item?: Record<string, string>;
24
+ button?: Record<string, string>;
25
+ };
26
+ }
27
+ declare const BlogBox: React.FC<IBlogBox>;
28
+ export default BlogBox;
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = void 0;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
+ require("core-js/modules/es.array.concat.js");
10
+ require("core-js/modules/es.array.map.js");
11
+ require("core-js/modules/es.array.slice.js");
12
+ var React = _interopRequireWildcard(require("react"));
13
+ var _uiCore = require("@megafon/ui-core");
14
+ var _uiHelpers = require("@megafon/ui-helpers");
15
+ var _useResolutions2 = _interopRequireDefault(require("../../hooks/useResolutions"));
16
+ var _BlogBoxTile = _interopRequireDefault(require("./components/BlogBoxTile"));
17
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
18
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
19
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
20
+ var maxItemsCount = 4;
21
+ var cn = (0, _uiHelpers.cnCreate)('mfui-blog-box');
22
+ var BlogBox = function BlogBox(_ref) {
23
+ var items = _ref.items,
24
+ button = _ref.button,
25
+ _ref$hasAlignLeft = _ref.hasAlignLeft,
26
+ hasAlignLeft = _ref$hasAlignLeft === void 0 ? false : _ref$hasAlignLeft,
27
+ className = _ref.className,
28
+ classes = _ref.classes,
29
+ dataAttrs = _ref.dataAttrs;
30
+ var _useResolutions = (0, _useResolutions2["default"])(),
31
+ isDesktop = _useResolutions.isDesktop;
32
+ var visibleItems = items.slice(0, maxItemsCount);
33
+ var itemsCount = visibleItems.length;
34
+ var isRow = isDesktop && itemsCount < maxItemsCount;
35
+ var isAlignLeft = isRow && hasAlignLeft;
36
+ var getView = function getView(isCompact, i) {
37
+ if (isCompact) {
38
+ return 'compact';
39
+ }
40
+ if (i === 0) {
41
+ return 'full';
42
+ }
43
+ return 'thumbnail';
44
+ };
45
+ return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
46
+ className: cn({
47
+ 'align-left': isAlignLeft
48
+ }, [className, classes === null || classes === void 0 ? void 0 : classes.root])
49
+ }), /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.list), {
50
+ className: cn('list', {
51
+ row: isRow,
52
+ 'row-size': isRow && "".concat(itemsCount)
53
+ })
54
+ }), visibleItems.map(function (item, i) {
55
+ var view = getView(isRow, i);
56
+ return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.item, i + 1), {
57
+ className: cn('item', {
58
+ view: view
59
+ }, [classes === null || classes === void 0 ? void 0 : classes.item]),
60
+ key: "".concat(item.title, "_").concat(i)
61
+ }), /*#__PURE__*/React.createElement(_BlogBoxTile["default"], (0, _extends2["default"])({}, item, {
62
+ view: view
63
+ })));
64
+ })), (button === null || button === void 0 ? void 0 : button.title) && /*#__PURE__*/React.createElement("div", {
65
+ className: cn('button-wrapper')
66
+ }, /*#__PURE__*/React.createElement(_uiCore.Button, {
67
+ dataAttrs: {
68
+ root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.button
69
+ },
70
+ className: cn('button', [classes === null || classes === void 0 ? void 0 : classes.button]),
71
+ href: button.href,
72
+ target: button.target,
73
+ rel: button.rel
74
+ }, button.title)));
75
+ };
76
+ var _default = exports["default"] = BlogBox;
@@ -0,0 +1 @@
1
+ h1,h2,h3,h4,h5{margin:0}.mfui-blog-box-tile{color:var(--content);display:block;position:relative}.mfui-blog-box-tile,.mfui-blog-box-tile:hover{text-decoration:none}.mfui-blog-box-tile:hover .mfui-blog-box-tile__title{color:var(--brandGreen)}.mfui-blog-box-tile__image{border-radius:24px;height:100%;-o-object-fit:cover;object-fit:cover;vertical-align:top;width:100%}.mfui-blog-box-tile__picture{display:block}.mfui-blog-box-tile__date{color:var(--spbSky3);margin-bottom:4px}.mfui-blog-box-tile__title{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:4;-webkit-transition:color .3s;transition:color .3s}.mfui-blog-box-tile_view_thumbnail{display:-webkit-box;display:-ms-flexbox;display:flex;gap:20px}.mfui-blog-box-tile_view_thumbnail b__picture{-ms-flex-negative:0;flex-shrink:0;height:102px;width:133px}@media screen and (min-width:1280px){.mfui-blog-box-tile_view_thumbnail b__picture{height:130px;width:170px}}@media screen and (min-width:1440px){.mfui-blog-box-tile_view_thumbnail b__picture{height:170px;width:233px}}.mfui-blog-box-tile_view_thumbnail .mfui-blog-box-tile__content{-ms-flex-item-align:center;align-self:center}.mfui-blog-box-tile_view_thumbnail .mfui-blog-box-tile__date{font-size:12px;line-height:18px}@media screen and (min-width:1280px){.mfui-blog-box-tile_view_thumbnail .mfui-blog-box-tile__date{font-size:15px;line-height:24px}}.mfui-blog-box-tile_view_thumbnail .mfui-blog-box-tile__title{font-size:18px;font-weight:500;letter-spacing:.5px;line-height:24px}@media screen and (min-width:1280px){.mfui-blog-box-tile_view_thumbnail .mfui-blog-box-tile__title{font-size:20px;line-height:28px}}.mfui-blog-box-tile_view_full .mfui-blog-box-tile__picture{height:358px}@media screen and (min-width:1280px){.mfui-blog-box-tile_view_full .mfui-blog-box-tile__picture{height:438px}}@media screen and (min-width:1440px){.mfui-blog-box-tile_view_full .mfui-blog-box-tile__picture{height:558px}}.mfui-blog-box-tile_view_full .mfui-blog-box-tile__content{background-color:var(--base);border-radius:24px;bottom:8px;left:8px;padding:16px;position:absolute;right:8px}@media screen and (min-width:768px) and (max-width:1023px){.mfui-blog-box-tile_view_full .mfui-blog-box-tile__content{padding:24px}}@media screen and (min-width:768px){.mfui-blog-box-tile_view_full .mfui-blog-box-tile__content{bottom:12px;left:12px;right:12px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-blog-box-tile_view_full .mfui-blog-box-tile__content{padding:16px}}@media screen and (min-width:1280px){.mfui-blog-box-tile_view_full .mfui-blog-box-tile__content{padding:24px}}.mfui-blog-box-tile_view_full .mfui-blog-box-tile__title{font-size:22px;font-weight:600;letter-spacing:.5px;line-height:28px}@media screen and (min-width:768px) and (max-width:1023px){.mfui-blog-box-tile_view_full .mfui-blog-box-tile__title{font-size:26px;line-height:32px}}@media screen and (min-width:1024px){.mfui-blog-box-tile_view_full .mfui-blog-box-tile__title{font-size:28px;line-height:36px}}@media screen and (min-width:1280px){.mfui-blog-box-tile_view_full .mfui-blog-box-tile__title{font-size:32px;line-height:40px}}.mfui-blog-box-tile_view_compact .mfui-blog-box-tile__picture{height:233px}@media screen and (min-width:1280px){.mfui-blog-box-tile_view_compact .mfui-blog-box-tile__picture{height:288px}}@media screen and (min-width:1440px){.mfui-blog-box-tile_view_compact .mfui-blog-box-tile__picture{height:367px}}.mfui-blog-box-tile_view_compact .mfui-blog-box-tile__content{background-color:var(--base);border-radius:24px;bottom:12px;left:12px;padding:16px;position:absolute;right:12px}.mfui-blog-box-tile_view_compact .mfui-blog-box-tile__title{font-size:18px;font-weight:500;letter-spacing:.5px;line-height:24px}@media screen and (min-width:1280px){.mfui-blog-box-tile_view_compact .mfui-blog-box-tile__title{font-size:20px;line-height:28px}}
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import { TileDataType, TileViewType } from '../types';
3
+ import './BlogBoxTile.scss';
4
+ type TileSettingsType = {
5
+ view: TileViewType;
6
+ };
7
+ export type BlogBoxTileType = TileDataType & TileSettingsType;
8
+ declare const BlogBoxTile: React.FC<BlogBoxTileType>;
9
+ export default BlogBoxTile;
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = void 0;
8
+ var React = _interopRequireWildcard(require("react"));
9
+ var _uiHelpers = require("@megafon/ui-helpers");
10
+ var _setRelAttribute = require("../../../helpers/setRelAttribute");
11
+ var _useResolutions2 = _interopRequireDefault(require("../../../hooks/useResolutions"));
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
14
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
15
+ var cn = (0, _uiHelpers.cnCreate)('mfui-blog-box-tile');
16
+ var BlogBoxTile = function BlogBoxTile(_ref) {
17
+ var date = _ref.date,
18
+ title = _ref.title,
19
+ href = _ref.href,
20
+ target = _ref.target,
21
+ rel = _ref.rel,
22
+ _ref$image = _ref.image,
23
+ srcMobile = _ref$image.srcMobile,
24
+ srcDesktop = _ref$image.srcDesktop,
25
+ srcThumbnail = _ref$image.srcThumbnail,
26
+ _ref$image$alt = _ref$image.alt,
27
+ alt = _ref$image$alt === void 0 ? 'image' : _ref$image$alt,
28
+ view = _ref.view;
29
+ var _useResolutions = (0, _useResolutions2["default"])(),
30
+ isMobile = _useResolutions.isMobile;
31
+ var isViewThumbnail = view === 'thumbnail';
32
+ var currentRel = (0, _setRelAttribute.setRelAttribute)(rel, target);
33
+ var renderImage = function renderImage() {
34
+ if (isViewThumbnail) {
35
+ return isMobile ? null : /*#__PURE__*/React.createElement("picture", {
36
+ className: cn('picture')
37
+ }, /*#__PURE__*/React.createElement("img", {
38
+ className: cn('image'),
39
+ src: srcThumbnail,
40
+ alt: alt
41
+ }));
42
+ }
43
+ return /*#__PURE__*/React.createElement("picture", {
44
+ className: cn('picture')
45
+ }, /*#__PURE__*/React.createElement("source", {
46
+ media: "(min-width: ".concat(_uiHelpers.breakpoints.DESKTOP_SMALL_START, "px)"),
47
+ srcSet: srcDesktop
48
+ }), /*#__PURE__*/React.createElement("img", {
49
+ className: cn('image'),
50
+ src: srcMobile,
51
+ alt: alt
52
+ }));
53
+ };
54
+ return /*#__PURE__*/React.createElement("a", {
55
+ className: cn({
56
+ view: view
57
+ }),
58
+ href: href,
59
+ target: target,
60
+ rel: currentRel
61
+ }, renderImage(), /*#__PURE__*/React.createElement("div", {
62
+ className: cn('content')
63
+ }, /*#__PURE__*/React.createElement("div", {
64
+ className: cn('date')
65
+ }, date), /*#__PURE__*/React.createElement("div", {
66
+ className: cn('title')
67
+ }, title)));
68
+ };
69
+ var _default = exports["default"] = BlogBoxTile;
@@ -0,0 +1,37 @@
1
+ type TargetType = '_self' | '_blank' | '_parent' | '_top';
2
+ export type ButtonType = {
3
+ /** Название */
4
+ title: string;
5
+ /** Ссылка */
6
+ href: string;
7
+ /** Атрибут ссылки target */
8
+ target?: TargetType;
9
+ /** Атрибут ссылки rel */
10
+ rel?: string;
11
+ };
12
+ export type ImageType = {
13
+ /** Изображение на разрешении экрана 0-1023 */
14
+ srcMobile: string;
15
+ /** Изображение на разрешении экрана 1024+ */
16
+ srcDesktop: string;
17
+ /** Миниатюра */
18
+ srcThumbnail: string;
19
+ /** Значение тега alt для изображения */
20
+ alt?: string;
21
+ };
22
+ export type TileDataType = {
23
+ /** Дата */
24
+ date: string;
25
+ /** Заголовок */
26
+ title: string;
27
+ /** Изображение */
28
+ image: ImageType;
29
+ /** Ссылка */
30
+ href: string;
31
+ /** Атрибут ссылки target */
32
+ target?: TargetType;
33
+ /** Атрибут ссылки rel */
34
+ rel?: string;
35
+ };
36
+ export type TileViewType = 'full' | 'thumbnail' | 'compact';
37
+ export {};
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });