@megafon/ui-shared 9.0.0-alpha.2 → 9.0.0-alpha.20
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/AccordionBox/AccordionBox.d.ts +3 -1
- package/dist/es/components/BenefitCards/BenefitCard/BenefitCard.css +1 -0
- package/dist/es/components/BenefitCards/BenefitCard/BenefitCard.d.ts +13 -0
- package/dist/es/components/BenefitCards/BenefitCard/BenefitCard.js +59 -0
- package/dist/es/components/BenefitCards/BenefitCards.css +1 -0
- package/dist/es/components/BenefitCards/BenefitCards.d.ts +27 -0
- package/dist/es/components/BenefitCards/BenefitCards.js +35 -0
- package/dist/es/components/BenefitCards/helpers.d.ts +1 -0
- package/dist/es/components/BenefitCards/helpers.js +19 -0
- package/dist/es/components/BenefitCards/types.d.ts +24 -0
- package/dist/es/components/BenefitCards/types.js +1 -0
- package/dist/es/components/BlogBox/BlogBox.d.ts +3 -0
- package/dist/es/components/BlogBox/BlogBox.js +8 -3
- package/dist/es/components/BlogBox/components/BlogBoxTile.css +1 -1
- package/dist/es/components/BlogBox/components/BlogBoxTile.d.ts +5 -1
- package/dist/es/components/BlogBox/components/BlogBoxTile.js +3 -2
- package/dist/es/components/Breadcrumbs/Breadcrumbs.d.ts +2 -0
- package/dist/es/components/Breadcrumbs/Breadcrumbs.js +3 -0
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.d.ts +1 -0
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.js +18 -13
- package/dist/es/components/Card/Card.css +1 -1
- package/dist/es/components/Card/Card.d.ts +2 -1
- package/dist/es/components/Card/Card.js +23 -16
- package/dist/es/components/Card/types.d.ts +3 -5
- package/dist/es/components/CardsOnBackground/CardsOnBackground.css +1 -0
- package/dist/es/components/CardsOnBackground/CardsOnBackground.d.ts +34 -0
- package/dist/es/components/CardsOnBackground/CardsOnBackground.js +99 -0
- package/dist/es/components/CardsOnBackground/components/CardOnBackground.css +1 -0
- package/dist/es/components/CardsOnBackground/components/CardOnBackground.d.ts +22 -0
- package/dist/es/components/CardsOnBackground/components/CardOnBackground.js +94 -0
- package/dist/es/components/CardsOnBackground/types.d.ts +42 -0
- package/dist/es/components/CardsOnBackground/types.js +6 -0
- package/dist/es/components/CardsOnBackground/useUniformHeights.d.ts +9 -0
- package/dist/es/components/CardsOnBackground/useUniformHeights.js +88 -0
- package/dist/es/components/Container/Container.css +1 -1
- package/dist/es/components/Container/Container.d.ts +4 -0
- package/dist/es/components/Container/Container.js +4 -1
- package/dist/es/components/DarkGradientCards/DarkGradientCards.d.ts +5 -0
- package/dist/es/components/DarkGradientCards/DarkGradientCards.js +9 -4
- package/dist/es/components/DarkGradientCards/components/DarkGradientCard.css +1 -1
- package/dist/es/components/DarkGradientCards/components/DarkGradientCard.d.ts +1 -0
- package/dist/es/components/DarkGradientCards/components/DarkGradientCard.js +1 -1
- package/dist/es/components/DownloadLinks/DownloadLink.css +1 -1
- package/dist/es/components/DownloadLinks/DownloadLink.js +3 -1
- package/dist/es/components/InfoCards/components/InfoCard/InfoCard.css +1 -1
- package/dist/es/components/InfoCards/components/InfoCard/InfoCard.js +4 -2
- package/dist/es/components/Instructions/Instructions.css +1 -1
- package/dist/es/components/Instructions/Instructions.d.ts +0 -2
- package/dist/es/components/Instructions/Instructions.js +19 -22
- package/dist/es/components/NotificationBox/NotificationBox.d.ts +1 -1
- package/dist/es/components/NotificationBox/NotificationBox.js +1 -4
- package/dist/es/components/Partners/Partners.css +1 -1
- package/dist/es/components/Partners/Partners.d.ts +3 -8
- package/dist/es/components/Partners/Partners.js +20 -31
- package/dist/es/components/Partners/components/PartnersItem/PartnersItem.css +1 -0
- package/dist/es/components/Partners/components/PartnersItem/PartnersItem.d.ts +12 -0
- package/dist/es/components/Partners/components/PartnersItem/PartnersItem.js +33 -0
- package/dist/es/components/Partners/types.d.ts +7 -0
- package/dist/es/components/Partners/types.js +1 -0
- package/dist/es/components/PictureBox/PictureBox.d.ts +1 -0
- package/dist/es/components/PictureBox/PictureBox.js +2 -0
- package/dist/es/components/PromoBanner/components/PromoBannerSlide/PromoBannerSlide.d.ts +2 -0
- package/dist/es/components/PromoBanner/components/PromoBannerSlide/PromoBannerSlide.js +2 -0
- package/dist/es/components/PromoCards/PromoCards.d.ts +3 -0
- package/dist/es/components/PromoCards/PromoCards.js +6 -1
- 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 +17 -9
- package/dist/es/components/ServiceCards/components/ServiceCard/ServiceCard.css +1 -1
- package/dist/es/components/ServiceCards/components/ServiceCard/ServiceCard.js +1 -1
- package/dist/es/components/SidePictureCards/SidePictureCards.d.ts +5 -0
- package/dist/es/components/SidePictureCards/SidePictureCards.js +5 -2
- package/dist/es/components/SidePictureCards/components/SidePictureCard.d.ts +2 -0
- package/dist/es/components/SidePictureCards/components/SidePictureCard.js +8 -3
- package/dist/es/components/SidePictureCards/types.d.ts +3 -1
- package/dist/es/components/StepperBox/StepperBox.d.ts +11 -0
- package/dist/es/components/StepperBox/StepperBox.js +36 -0
- package/dist/es/components/Steps/Steps.css +1 -1
- package/dist/es/components/Steps/Steps.d.ts +2 -2
- package/dist/es/components/Steps/Steps.js +1 -1
- package/dist/es/components/StoreBanner/StoreBanner.css +1 -1
- package/dist/es/components/StoreBanner/StoreBanner.d.ts +1 -5
- package/dist/es/components/StoreBanner/StoreBanner.js +1 -5
- package/dist/es/components/StoreButton/StoreButton.css +1 -1
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.css +1 -1
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +27 -1
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.js +31 -24
- package/dist/es/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
- package/dist/es/hooks/useIsomorphicLayoutEffect.js +6 -0
- package/dist/es/index.d.ts +7 -2
- package/dist/es/index.js +7 -2
- package/dist/lib/components/AccordionBox/AccordionBox.d.ts +3 -1
- package/dist/lib/components/BenefitCards/BenefitCard/BenefitCard.css +1 -0
- package/dist/lib/components/BenefitCards/BenefitCard/BenefitCard.d.ts +13 -0
- package/dist/lib/components/BenefitCards/BenefitCard/BenefitCard.js +68 -0
- package/dist/lib/components/BenefitCards/BenefitCards.css +1 -0
- package/dist/lib/components/BenefitCards/BenefitCards.d.ts +27 -0
- package/dist/lib/components/BenefitCards/BenefitCards.js +44 -0
- package/dist/lib/components/BenefitCards/helpers.d.ts +1 -0
- package/dist/lib/components/BenefitCards/helpers.js +26 -0
- package/dist/lib/components/BenefitCards/types.d.ts +24 -0
- package/dist/lib/components/BenefitCards/types.js +5 -0
- package/dist/lib/components/BlogBox/BlogBox.d.ts +3 -0
- package/dist/lib/components/BlogBox/BlogBox.js +8 -3
- package/dist/lib/components/BlogBox/components/BlogBoxTile.css +1 -1
- package/dist/lib/components/BlogBox/components/BlogBoxTile.d.ts +5 -1
- package/dist/lib/components/BlogBox/components/BlogBoxTile.js +3 -2
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.d.ts +2 -0
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.js +3 -0
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.d.ts +1 -0
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.js +18 -13
- package/dist/lib/components/Card/Card.css +1 -1
- package/dist/lib/components/Card/Card.d.ts +2 -1
- package/dist/lib/components/Card/Card.js +22 -15
- package/dist/lib/components/Card/types.d.ts +3 -5
- package/dist/lib/components/CardsOnBackground/CardsOnBackground.css +1 -0
- package/dist/lib/components/CardsOnBackground/CardsOnBackground.d.ts +34 -0
- package/dist/lib/components/CardsOnBackground/CardsOnBackground.js +108 -0
- package/dist/lib/components/CardsOnBackground/components/CardOnBackground.css +1 -0
- package/dist/lib/components/CardsOnBackground/components/CardOnBackground.d.ts +22 -0
- package/dist/lib/components/CardsOnBackground/components/CardOnBackground.js +100 -0
- package/dist/lib/components/CardsOnBackground/types.d.ts +42 -0
- package/dist/lib/components/CardsOnBackground/types.js +12 -0
- package/dist/lib/components/CardsOnBackground/useUniformHeights.d.ts +9 -0
- package/dist/lib/components/CardsOnBackground/useUniformHeights.js +95 -0
- package/dist/lib/components/Container/Container.css +1 -1
- package/dist/lib/components/Container/Container.d.ts +4 -0
- package/dist/lib/components/Container/Container.js +4 -1
- package/dist/lib/components/DarkGradientCards/DarkGradientCards.d.ts +5 -0
- package/dist/lib/components/DarkGradientCards/DarkGradientCards.js +9 -4
- package/dist/lib/components/DarkGradientCards/components/DarkGradientCard.css +1 -1
- package/dist/lib/components/DarkGradientCards/components/DarkGradientCard.d.ts +1 -0
- package/dist/lib/components/DarkGradientCards/components/DarkGradientCard.js +1 -1
- package/dist/lib/components/DownloadLinks/DownloadLink.css +1 -1
- package/dist/lib/components/DownloadLinks/DownloadLink.js +3 -1
- package/dist/lib/components/InfoCards/components/InfoCard/InfoCard.css +1 -1
- package/dist/lib/components/InfoCards/components/InfoCard/InfoCard.js +4 -2
- package/dist/lib/components/Instructions/Instructions.css +1 -1
- package/dist/lib/components/Instructions/Instructions.d.ts +0 -2
- package/dist/lib/components/Instructions/Instructions.js +19 -21
- package/dist/lib/components/NotificationBox/NotificationBox.d.ts +1 -1
- package/dist/lib/components/NotificationBox/NotificationBox.js +1 -5
- package/dist/lib/components/Partners/Partners.css +1 -1
- package/dist/lib/components/Partners/Partners.d.ts +3 -8
- package/dist/lib/components/Partners/Partners.js +19 -30
- package/dist/lib/components/Partners/components/PartnersItem/PartnersItem.css +1 -0
- package/dist/lib/components/Partners/components/PartnersItem/PartnersItem.d.ts +12 -0
- package/dist/lib/components/Partners/components/PartnersItem/PartnersItem.js +42 -0
- package/dist/lib/components/Partners/types.d.ts +7 -0
- package/dist/lib/components/Partners/types.js +5 -0
- package/dist/lib/components/PictureBox/PictureBox.d.ts +1 -0
- package/dist/lib/components/PictureBox/PictureBox.js +2 -0
- package/dist/lib/components/PromoBanner/components/PromoBannerSlide/PromoBannerSlide.d.ts +2 -0
- package/dist/lib/components/PromoBanner/components/PromoBannerSlide/PromoBannerSlide.js +2 -0
- package/dist/lib/components/PromoCards/PromoCards.d.ts +3 -0
- package/dist/lib/components/PromoCards/PromoCards.js +6 -1
- 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 +16 -9
- package/dist/lib/components/ServiceCards/components/ServiceCard/ServiceCard.css +1 -1
- package/dist/lib/components/ServiceCards/components/ServiceCard/ServiceCard.js +1 -1
- package/dist/lib/components/SidePictureCards/SidePictureCards.d.ts +5 -0
- package/dist/lib/components/SidePictureCards/SidePictureCards.js +5 -2
- package/dist/lib/components/SidePictureCards/components/SidePictureCard.d.ts +2 -0
- package/dist/lib/components/SidePictureCards/components/SidePictureCard.js +8 -3
- package/dist/lib/components/SidePictureCards/types.d.ts +3 -1
- package/dist/lib/components/StepperBox/StepperBox.d.ts +11 -0
- package/dist/lib/components/StepperBox/StepperBox.js +46 -0
- package/dist/lib/components/Steps/Steps.css +1 -1
- package/dist/lib/components/Steps/Steps.d.ts +2 -2
- package/dist/lib/components/Steps/Steps.js +1 -1
- package/dist/lib/components/StoreBanner/StoreBanner.css +1 -1
- package/dist/lib/components/StoreBanner/StoreBanner.d.ts +1 -5
- package/dist/lib/components/StoreBanner/StoreBanner.js +1 -5
- package/dist/lib/components/StoreButton/StoreButton.css +1 -1
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.css +1 -1
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +27 -1
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.js +30 -23
- package/dist/lib/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
- package/dist/lib/hooks/useIsomorphicLayoutEffect.js +13 -0
- package/dist/lib/index.d.ts +7 -2
- package/dist/lib/index.js +45 -10
- package/package.json +6 -6
- package/dist/es/components/Stepper/Stepper.css +0 -1
- package/dist/es/components/Stepper/Stepper.d.ts +0 -52
- package/dist/es/components/Stepper/Stepper.js +0 -159
- package/dist/es/components/Stepper/StepperItem.css +0 -1
- package/dist/es/components/Stepper/StepperItem.d.ts +0 -57
- package/dist/es/components/Stepper/StepperItem.js +0 -99
- package/dist/es/components/Stepper/img/separator-mobile.png +0 -0
- package/dist/es/components/Stepper/img/separator-vertical.png +0 -0
- package/dist/es/components/Stepper/img/separator.png +0 -0
- package/dist/es/components/StoreBanner/img/black-iphone.png +0 -0
- package/dist/es/components/StoreBanner/img/iphone12.png +0 -0
- package/dist/es/components/StoreBanner/img/white-iphone.png +0 -0
- package/dist/lib/components/Stepper/Stepper.css +0 -1
- package/dist/lib/components/Stepper/Stepper.d.ts +0 -52
- package/dist/lib/components/Stepper/Stepper.js +0 -168
- package/dist/lib/components/Stepper/StepperItem.css +0 -1
- package/dist/lib/components/Stepper/StepperItem.d.ts +0 -57
- package/dist/lib/components/Stepper/StepperItem.js +0 -108
- package/dist/lib/components/Stepper/img/separator-mobile.png +0 -0
- package/dist/lib/components/Stepper/img/separator-vertical.png +0 -0
- package/dist/lib/components/Stepper/img/separator.png +0 -0
- package/dist/lib/components/StoreBanner/img/black-iphone.png +0 -0
- package/dist/lib/components/StoreBanner/img/iphone12.png +0 -0
- package/dist/lib/components/StoreBanner/img/white-iphone.png +0 -0
|
@@ -20,8 +20,10 @@ export interface IAccordionBox {
|
|
|
20
20
|
rootRef?: React.Ref<HTMLDivElement>;
|
|
21
21
|
/** Заголовок аккордеона */
|
|
22
22
|
title: string;
|
|
23
|
-
/**
|
|
23
|
+
/** Тег заголовка (определяет базовый тег и стили) */
|
|
24
24
|
titleTag?: IHeaderProps['as'];
|
|
25
|
+
/** Тег заголовка для семантической разметки (переопределение тега без изменения стилей) */
|
|
26
|
+
titleTagName?: IHeaderProps['tag'];
|
|
25
27
|
/** Состояние аккордеона, заданное извне */
|
|
26
28
|
isOpened?: boolean;
|
|
27
29
|
/** Включить микроразметку */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-benefit-card{border:none;border-radius:24px;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--content);display:-webkit-box;display:-ms-flexbox;display:flex;font-size:15px;line-height:24px;min-height:100%;overflow:hidden;padding:16px;position:relative;-webkit-transition:.3s;transition:.3s;width:100%}.mfui-9-benefit-card:focus-visible{-webkit-animation:focus-outline-shrink .3s linear forwards;animation:focus-outline-shrink .3s linear forwards;outline-offset:2px}@-webkit-keyframes focus-outline-shrink{0%{outline:0 solid var(--137C)}to{outline:4px solid var(--137C)}}@keyframes focus-outline-shrink{0%{outline:0 solid var(--137C)}to{outline:4px solid var(--137C)}}.mfui-9-benefit-card:focus{outline:none}@media screen and (min-width:1280px){.mfui-9-benefit-card{padding:24px}}.mfui-9-benefit-card:after{background:var(--stcWhite5);border-radius:24px;content:"";inset:0;opacity:0;pointer-events:none;position:absolute;-webkit-transition:opacity .3s;transition:opacity .3s}.mfui-9-benefit-card:hover{text-decoration:none}.mfui-9-benefit-card_interactive:hover:after{opacity:1}.mfui-9-benefit-card_background_gray{background-color:var(--spbSky0)}.mfui-9-benefit-card_background_white{background-color:var(--base)}.mfui-9-benefit-card_background_outline{background-color:var(--base);border:1px solid var(--spbSky2)}.mfui-9-benefit-card_background_soft-purple{background-color:var(--brandPurple20);border:none}.mfui-9-benefit-card_background_soft-green{background-color:var(--brandGreen20);border:none}.mfui-9-benefit-card_background_soft-night{background-color:var(--night20);border:none}.mfui-9-benefit-card_background_soft-sky{background-color:var(--sky20);border:none}.mfui-9-benefit-card_background_soft-flamingo{background-color:var(--flamingo20);border:none}.mfui-9-benefit-card_background_soft-berry{background-color:var(--berry20);border:none}.mfui-9-benefit-card_background_gradient-berry1{background:var(--gradientBerry1);border:none}.mfui-9-benefit-card_background_gradient-berry2{background:var(--gradientBerry2);border:none}.mfui-9-benefit-card_background_gradient-purple1{background:var(--gradientPurple1);border:none}.mfui-9-benefit-card_background_gradient-purple2{background:var(--gradientPurple2);border:none}.mfui-9-benefit-card_background_gradient-purple3{background:var(--gradientPurple3);border:none}.mfui-9-benefit-card_background_gray.mfui-9-benefit-card_interactive:hover,.mfui-9-benefit-card_background_outline.mfui-9-benefit-card_interactive:hover,.mfui-9-benefit-card_background_white.mfui-9-benefit-card_interactive:hover{-webkit-box-shadow:0 0 0 1px var(--spbSky3);box-shadow:0 0 0 1px var(--spbSky3)}.mfui-9-benefit-card_background_soft-green.mfui-9-benefit-card_interactive:hover{-webkit-box-shadow:0 0 0 1px var(--brandGreen80);box-shadow:0 0 0 1px var(--brandGreen80)}.mfui-9-benefit-card_background_soft-purple.mfui-9-benefit-card_interactive:hover{-webkit-box-shadow:0 0 0 1px var(--brandPurple80);box-shadow:0 0 0 1px var(--brandPurple80)}.mfui-9-benefit-card_background_soft-night.mfui-9-benefit-card_interactive:hover{-webkit-box-shadow:0 0 0 1px var(--night80);box-shadow:0 0 0 1px var(--night80)}.mfui-9-benefit-card_background_soft-berry.mfui-9-benefit-card_interactive:hover{-webkit-box-shadow:0 0 0 1px var(--berry80);box-shadow:0 0 0 1px var(--berry80)}.mfui-9-benefit-card_background_soft-flamingo.mfui-9-benefit-card_interactive:hover{-webkit-box-shadow:0 0 0 1px var(--flamingo80);box-shadow:0 0 0 1px var(--flamingo80)}.mfui-9-benefit-card_background_soft-sky.mfui-9-benefit-card_interactive:hover{-webkit-box-shadow:0 0 0 1px var(--sky80);box-shadow:0 0 0 1px var(--sky80)}.mfui-9-benefit-card_background_gradient-berry1.mfui-9-benefit-card_interactive:hover,.mfui-9-benefit-card_background_gradient-berry2.mfui-9-benefit-card_interactive:hover,.mfui-9-benefit-card_background_gradient-purple1.mfui-9-benefit-card_interactive:hover,.mfui-9-benefit-card_background_gradient-purple2.mfui-9-benefit-card_interactive:hover,.mfui-9-benefit-card_background_gradient-purple3.mfui-9-benefit-card_interactive:hover{-webkit-box-shadow:0 0 0 1px var(--berry);box-shadow:0 0 0 1px var(--berry)}.mfui-9-benefit-card_background_outline.mfui-9-benefit-card_interactive:hover:after,.mfui-9-benefit-card_background_white.mfui-9-benefit-card_interactive:hover:after{opacity:0}.mfui-9-benefit-card_gradient{color:var(--stcWhite)}.mfui-9-benefit-card__content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:24px;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-right:86px}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-9-benefit-card__content{margin-right:64px}}@media screen and (min-width:1280px){.mfui-9-benefit-card__content{margin-right:136px}}.mfui-9-benefit-card__content b{font-weight:500}.mfui-9-benefit-card__image{bottom:0;height:85px;-o-object-fit:contain;object-fit:contain;-o-object-position:right bottom;object-position:right bottom;position:absolute;right:0;width:110px}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-9-benefit-card__image{height:68px;width:88px}}@media screen and (min-width:1280px){.mfui-9-benefit-card__image{height:124px;width:160px}}.mfui-9-benefit-card__pseudo-link{color:var(--systemBlue);text-decoration:none}.mfui-9-benefit-card_gradient .mfui-9-benefit-card__pseudo-link{color:var(--stcWhite);font-weight:500}.mfui-9-benefit-card_interactive:hover .mfui-9-benefit-card__pseudo-link{text-decoration:underline}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ExtraBackgroundType, IBenefitCardData, MainBackgroundType } from '../types';
|
|
3
|
+
import './BenefitCard.scss';
|
|
4
|
+
export interface IBenefitCard extends IBenefitCardData {
|
|
5
|
+
className?: string;
|
|
6
|
+
background?: MainBackgroundType | ExtraBackgroundType;
|
|
7
|
+
dataAttrs?: {
|
|
8
|
+
root?: Record<string, string>;
|
|
9
|
+
pseudoLink?: Record<string, string>;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
declare const BenefitCard: React.FC<IBenefitCard>;
|
|
13
|
+
export default BenefitCard;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import "core-js/modules/es.symbol.js";
|
|
3
|
+
import "core-js/modules/es.symbol.description.js";
|
|
4
|
+
import "core-js/modules/es.array.includes.js";
|
|
5
|
+
import "core-js/modules/es.string.includes.js";
|
|
6
|
+
import "core-js/modules/es.string.link.js";
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import { Header, Paragraph } from '@megafon/ui-core';
|
|
9
|
+
import { cnCreate, convert, filterDataAttrs } from '@megafon/ui-helpers';
|
|
10
|
+
import { setRelAttribute } from "../../../helpers/setRelAttribute";
|
|
11
|
+
import "./BenefitCard.css";
|
|
12
|
+
var typographyConfig = {
|
|
13
|
+
b: {
|
|
14
|
+
component: function component(_ref) {
|
|
15
|
+
var children = _ref.children;
|
|
16
|
+
return /*#__PURE__*/React.createElement("b", null, children);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
var cn = cnCreate('mfui-9-benefit-card');
|
|
21
|
+
var BenefitCard = function BenefitCard(_ref2) {
|
|
22
|
+
var title = _ref2.title,
|
|
23
|
+
description = _ref2.description,
|
|
24
|
+
imageSrc = _ref2.imageSrc,
|
|
25
|
+
link = _ref2.link,
|
|
26
|
+
_ref2$background = _ref2.background,
|
|
27
|
+
background = _ref2$background === void 0 ? 'gray' : _ref2$background,
|
|
28
|
+
dataAttrs = _ref2.dataAttrs,
|
|
29
|
+
className = _ref2.className;
|
|
30
|
+
var isLink = !!link;
|
|
31
|
+
var Element = isLink ? 'a' : 'div';
|
|
32
|
+
var isGradientBackground = !!background && background.includes('gradient');
|
|
33
|
+
return /*#__PURE__*/React.createElement(Element, _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
34
|
+
href: link === null || link === void 0 ? void 0 : link.href,
|
|
35
|
+
target: link === null || link === void 0 ? void 0 : link.target,
|
|
36
|
+
rel: isLink ? setRelAttribute(link.rel, link.target) : undefined,
|
|
37
|
+
className: cn({
|
|
38
|
+
background: background,
|
|
39
|
+
interactive: isLink,
|
|
40
|
+
gradient: isGradientBackground
|
|
41
|
+
}, [className]),
|
|
42
|
+
tabIndex: isLink ? 0 : -1
|
|
43
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
className: cn('content')
|
|
45
|
+
}, /*#__PURE__*/React.createElement(Header, {
|
|
46
|
+
as: "h3",
|
|
47
|
+
color: "inherit"
|
|
48
|
+
}, convert(title, {})), /*#__PURE__*/React.createElement(Paragraph, {
|
|
49
|
+
hasMargin: false,
|
|
50
|
+
color: "inherit"
|
|
51
|
+
}, convert(description, typographyConfig), !!(link === null || link === void 0 ? void 0 : link.pseudoLinkText) && /*#__PURE__*/React.createElement(React.Fragment, null, ' ', /*#__PURE__*/React.createElement("span", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.pseudoLink), {
|
|
52
|
+
className: cn('pseudo-link')
|
|
53
|
+
}), link.pseudoLinkText)))), /*#__PURE__*/React.createElement("img", {
|
|
54
|
+
src: imageSrc,
|
|
55
|
+
alt: title,
|
|
56
|
+
className: cn('image')
|
|
57
|
+
}));
|
|
58
|
+
};
|
|
59
|
+
export default BenefitCard;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-benefit-cards{display:grid;gap:20px;grid-template-columns:repeat(6,1fr)}@media screen and (min-width:768px) and (max-width:1023px){.mfui-9-benefit-cards:has(.mfui-9-benefit-cards__item:nth-child(3)) .mfui-9-benefit-cards__item:nth-child(-n+3){grid-column:span 3}.mfui-9-benefit-cards:has(.mfui-9-benefit-cards__item:nth-child(3)) .mfui-9-benefit-cards__item:first-child{grid-column:span 6}}@media screen and (min-width:1024px){.mfui-9-benefit-cards:has(.mfui-9-benefit-cards__item:nth-child(3)) .mfui-9-benefit-cards__item:nth-child(-n+3){grid-column:span 2}}.mfui-9-benefit-cards:has(.mfui-9-benefit-cards__item:nth-child(3)) .mfui-9-benefit-cards__item{grid-column:span 6}@media screen and (min-width:768px){.mfui-9-benefit-cards:has(.mfui-9-benefit-cards__item:nth-child(4)) .mfui-9-benefit-cards__item:nth-child(-n+4){grid-column:span 3}}.mfui-9-benefit-cards:has(.mfui-9-benefit-cards__item:nth-child(4)) .mfui-9-benefit-cards__item{grid-column:span 6}@media screen and (min-width:768px) and (max-width:1023px){.mfui-9-benefit-cards:has(.mfui-9-benefit-cards__item:nth-child(5)) .mfui-9-benefit-cards__item:first-child{grid-column:span 6}.mfui-9-benefit-cards:has(.mfui-9-benefit-cards__item:nth-child(5)) .mfui-9-benefit-cards__item:nth-child(n+2){grid-column:span 3}}@media screen and (min-width:1024px){.mfui-9-benefit-cards:has(.mfui-9-benefit-cards__item:nth-child(5)) .mfui-9-benefit-cards__item:nth-child(-n+2){grid-column:span 3}.mfui-9-benefit-cards:has(.mfui-9-benefit-cards__item:nth-child(5)) .mfui-9-benefit-cards__item:nth-child(n+3){grid-column:span 2}}.mfui-9-benefit-cards:has(.mfui-9-benefit-cards__item:nth-child(5)) .mfui-9-benefit-cards__item{grid-column:span 6}@media screen and (min-width:768px) and (max-width:1023px){.mfui-9-benefit-cards:has(.mfui-9-benefit-cards__item:nth-child(6)) .mfui-9-benefit-cards__item:nth-child(-n+6){grid-column:span 3}}@media screen and (min-width:1024px){.mfui-9-benefit-cards:has(.mfui-9-benefit-cards__item:nth-child(6)) .mfui-9-benefit-cards__item:nth-child(-n+6){grid-column:span 2}}.mfui-9-benefit-cards:has(.mfui-9-benefit-cards__item:nth-child(6)) .mfui-9-benefit-cards__item{grid-column:span 6}@media screen and (min-width:768px) and (max-width:1023px){.mfui-9-benefit-cards:has(.mfui-9-benefit-cards__item:nth-child(7)) .mfui-9-benefit-cards__item:first-child{grid-column:span 6}.mfui-9-benefit-cards:has(.mfui-9-benefit-cards__item:nth-child(7)) .mfui-9-benefit-cards__item:nth-child(n+2){grid-column:span 3}}@media screen and (min-width:1024px){.mfui-9-benefit-cards:has(.mfui-9-benefit-cards__item:nth-child(7)) .mfui-9-benefit-cards__item:nth-child(-n+2){grid-column:span 3}.mfui-9-benefit-cards:has(.mfui-9-benefit-cards__item:nth-child(7)) .mfui-9-benefit-cards__item:nth-child(n+3){grid-column:span 2}.mfui-9-benefit-cards:has(.mfui-9-benefit-cards__item:nth-child(7)) .mfui-9-benefit-cards__item:nth-child(n+6){grid-column:span 3}}.mfui-9-benefit-cards:has(.mfui-9-benefit-cards__item:nth-child(7)) .mfui-9-benefit-cards__item{grid-column:span 6}@media screen and (min-width:768px) and (max-width:1023px){.mfui-9-benefit-cards:has(.mfui-9-benefit-cards__item:nth-child(8)) .mfui-9-benefit-cards__item:nth-child(-n+8){grid-column:span 3}}@media screen and (min-width:1024px){.mfui-9-benefit-cards:has(.mfui-9-benefit-cards__item:nth-child(8)) .mfui-9-benefit-cards__item:nth-child(-n+2){grid-column:span 3}.mfui-9-benefit-cards:has(.mfui-9-benefit-cards__item:nth-child(8)) .mfui-9-benefit-cards__item:nth-child(n+3){grid-column:span 2}}.mfui-9-benefit-cards:has(.mfui-9-benefit-cards__item:nth-child(8)) .mfui-9-benefit-cards__item{grid-column:span 6}@media screen and (min-width:768px) and (max-width:1023px){.mfui-9-benefit-cards:has(.mfui-9-benefit-cards__item:nth-child(9)) .mfui-9-benefit-cards__item:first-child{grid-column:span 6}.mfui-9-benefit-cards:has(.mfui-9-benefit-cards__item:nth-child(9)) .mfui-9-benefit-cards__item:nth-child(n+2){grid-column:span 3}}@media screen and (min-width:1024px){.mfui-9-benefit-cards:has(.mfui-9-benefit-cards__item:nth-child(9)) .mfui-9-benefit-cards__item:nth-child(-n+9){grid-column:span 2}}.mfui-9-benefit-cards:has(.mfui-9-benefit-cards__item:nth-child(9)) .mfui-9-benefit-cards__item{grid-column:span 6}.mfui-9-benefit-cards__item{grid-column:span 3}@media screen and (max-width:767px){.mfui-9-benefit-cards__item{grid-column:span 6}}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ExtraBackgroundType, IBenefitCardData, MainBackgroundType } from './types';
|
|
3
|
+
import './BenefitCards.scss';
|
|
4
|
+
export interface IBenefitCards {
|
|
5
|
+
/** Список карточек */
|
|
6
|
+
items: IBenefitCardData[];
|
|
7
|
+
/** Основной фон карточек */
|
|
8
|
+
mainBackground?: MainBackgroundType;
|
|
9
|
+
/** Дополнительный фон карточек */
|
|
10
|
+
extraBackground?: ExtraBackgroundType;
|
|
11
|
+
/** Дополнительный класс для компонента */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** Дополнительные классы для внутренних элементов */
|
|
14
|
+
classes?: {
|
|
15
|
+
root?: string;
|
|
16
|
+
card?: string;
|
|
17
|
+
};
|
|
18
|
+
/** Дополнительные data атрибуты к внутренним элементам */
|
|
19
|
+
dataAttrs?: {
|
|
20
|
+
root?: Record<string, string>;
|
|
21
|
+
card?: Record<string, string>;
|
|
22
|
+
};
|
|
23
|
+
/** Ссылка на корневой элемент */
|
|
24
|
+
rootRef?: React.Ref<HTMLDivElement>;
|
|
25
|
+
}
|
|
26
|
+
declare const BenefitCards: React.FC<IBenefitCards>;
|
|
27
|
+
export default BenefitCards;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import "core-js/modules/es.array.concat.js";
|
|
3
|
+
import "core-js/modules/es.array.map.js";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
6
|
+
import BenefitCard from "./BenefitCard/BenefitCard";
|
|
7
|
+
import { checkIsExtraColoredCard } from "./helpers";
|
|
8
|
+
import "./BenefitCards.css";
|
|
9
|
+
var cn = cnCreate('mfui-9-benefit-cards');
|
|
10
|
+
var BenefitCards = function BenefitCards(_ref) {
|
|
11
|
+
var className = _ref.className,
|
|
12
|
+
items = _ref.items,
|
|
13
|
+
mainBackground = _ref.mainBackground,
|
|
14
|
+
extraBackground = _ref.extraBackground,
|
|
15
|
+
classes = _ref.classes,
|
|
16
|
+
dataAttrs = _ref.dataAttrs,
|
|
17
|
+
rootRef = _ref.rootRef;
|
|
18
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
19
|
+
className: cn([className, classes === null || classes === void 0 ? void 0 : classes.root]),
|
|
20
|
+
ref: rootRef
|
|
21
|
+
}), items.map(function (item, i) {
|
|
22
|
+
var isExtraColored = !!extraBackground && checkIsExtraColoredCard(i, items.length);
|
|
23
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
24
|
+
className: cn('item'),
|
|
25
|
+
key: "".concat(item.title, "_").concat(i)
|
|
26
|
+
}, /*#__PURE__*/React.createElement(BenefitCard, _extends({}, item, {
|
|
27
|
+
background: isExtraColored ? extraBackground : mainBackground,
|
|
28
|
+
dataAttrs: {
|
|
29
|
+
root: filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.card, i + 1)
|
|
30
|
+
},
|
|
31
|
+
className: classes === null || classes === void 0 ? void 0 : classes.card
|
|
32
|
+
})));
|
|
33
|
+
}));
|
|
34
|
+
};
|
|
35
|
+
export default BenefitCards;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const checkIsExtraColoredCard: (index: number, total: number) => boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import "core-js/modules/es.array.includes.js";
|
|
3
|
+
import "core-js/modules/es.string.includes.js";
|
|
4
|
+
var ONE_CARDS = '1';
|
|
5
|
+
var TWO_CARDS = '2';
|
|
6
|
+
var THREE_CARDS = '3';
|
|
7
|
+
var FOUR_CARDS = '4';
|
|
8
|
+
var FIVE_CARDS = '5';
|
|
9
|
+
var SIX_CARDS = '6';
|
|
10
|
+
var FIRST_CARD_INDEX = 0;
|
|
11
|
+
var THIRD_CARD_INDEX = 2;
|
|
12
|
+
var FOURTH_CARD_INDEX = 3;
|
|
13
|
+
var FIFTH_CARD_INDEX = 4;
|
|
14
|
+
var INDEXES_MAP = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ONE_CARDS, [FIRST_CARD_INDEX]), TWO_CARDS, [FIRST_CARD_INDEX]), THREE_CARDS, [FIRST_CARD_INDEX]), FOUR_CARDS, [FIRST_CARD_INDEX, FOURTH_CARD_INDEX]), FIVE_CARDS, [FIRST_CARD_INDEX, FIFTH_CARD_INDEX]), SIX_CARDS, [FIRST_CARD_INDEX, THIRD_CARD_INDEX, FIFTH_CARD_INDEX]);
|
|
15
|
+
export var checkIsExtraColoredCard = function checkIsExtraColoredCard(index, total) {
|
|
16
|
+
var _a;
|
|
17
|
+
var indexes = (_a = INDEXES_MAP[String(total)]) !== null && _a !== void 0 ? _a : INDEXES_MAP[SIX_CARDS];
|
|
18
|
+
return indexes.includes(index);
|
|
19
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type SoftBackgroundType = 'soft-purple' | 'soft-green' | 'soft-night' | 'soft-sky' | 'soft-flamingo' | 'soft-berry';
|
|
2
|
+
export type MainBackgroundType = SoftBackgroundType | 'outline' | 'white' | 'gray';
|
|
3
|
+
export type ExtraBackgroundType = SoftBackgroundType | 'gradient-berry1' | 'gradient-berry2' | 'gradient-purple1' | 'gradient-purple2' | 'gradient-purple3';
|
|
4
|
+
export type LinkType = {
|
|
5
|
+
/** Атрибут ссылки href */
|
|
6
|
+
href: string;
|
|
7
|
+
/** Атрибут ссылки target */
|
|
8
|
+
target: '_self' | '_blank';
|
|
9
|
+
/** Атрибут ссылки rel */
|
|
10
|
+
rel?: string;
|
|
11
|
+
/** Текст псевдоссылки внутри карточки */
|
|
12
|
+
pseudoLinkText: string;
|
|
13
|
+
};
|
|
14
|
+
export interface IBenefitCardData {
|
|
15
|
+
/** Заголовок */
|
|
16
|
+
title: string;
|
|
17
|
+
/** Описание */
|
|
18
|
+
description: string;
|
|
19
|
+
/** Изображение */
|
|
20
|
+
imageSrc: string;
|
|
21
|
+
/** Ссылка */
|
|
22
|
+
link?: LinkType;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -14,6 +14,7 @@ export interface IBlogBox {
|
|
|
14
14
|
classes?: {
|
|
15
15
|
root?: string;
|
|
16
16
|
item?: string;
|
|
17
|
+
itemTitle?: string;
|
|
17
18
|
button?: string;
|
|
18
19
|
};
|
|
19
20
|
/** Дополнительные data атрибуты к внутренним элементам */
|
|
@@ -23,6 +24,8 @@ export interface IBlogBox {
|
|
|
23
24
|
item?: Record<string, string>;
|
|
24
25
|
button?: Record<string, string>;
|
|
25
26
|
};
|
|
27
|
+
/** Ссылка на корневой элемент */
|
|
28
|
+
rootRef?: React.Ref<HTMLDivElement>;
|
|
26
29
|
}
|
|
27
30
|
declare const BlogBox: React.FC<IBlogBox>;
|
|
28
31
|
export default BlogBox;
|
|
@@ -17,7 +17,8 @@ var BlogBox = function BlogBox(_ref) {
|
|
|
17
17
|
hasAlignLeft = _ref$hasAlignLeft === void 0 ? false : _ref$hasAlignLeft,
|
|
18
18
|
className = _ref.className,
|
|
19
19
|
classes = _ref.classes,
|
|
20
|
-
dataAttrs = _ref.dataAttrs
|
|
20
|
+
dataAttrs = _ref.dataAttrs,
|
|
21
|
+
rootRef = _ref.rootRef;
|
|
21
22
|
var _useResolutions = useResolutions(),
|
|
22
23
|
isDesktop = _useResolutions.isDesktop;
|
|
23
24
|
var visibleItems = items.slice(0, maxItemsCount);
|
|
@@ -36,7 +37,8 @@ var BlogBox = function BlogBox(_ref) {
|
|
|
36
37
|
return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
37
38
|
className: cn({
|
|
38
39
|
'align-left': isAlignLeft
|
|
39
|
-
}, [className, classes === null || classes === void 0 ? void 0 : classes.root])
|
|
40
|
+
}, [className, classes === null || classes === void 0 ? void 0 : classes.root]),
|
|
41
|
+
ref: rootRef
|
|
40
42
|
}), /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.list), {
|
|
41
43
|
className: cn('list', {
|
|
42
44
|
row: isRow,
|
|
@@ -50,7 +52,10 @@ var BlogBox = function BlogBox(_ref) {
|
|
|
50
52
|
}, [classes === null || classes === void 0 ? void 0 : classes.item]),
|
|
51
53
|
key: "".concat(item.title, "_").concat(i)
|
|
52
54
|
}), /*#__PURE__*/React.createElement(BlogBoxTile, _extends({}, item, {
|
|
53
|
-
view: view
|
|
55
|
+
view: view,
|
|
56
|
+
classes: {
|
|
57
|
+
title: classes === null || classes === void 0 ? void 0 : classes.itemTitle
|
|
58
|
+
}
|
|
54
59
|
})));
|
|
55
60
|
})), (button === null || button === void 0 ? void 0 : button.title) && /*#__PURE__*/React.createElement("div", {
|
|
56
61
|
className: cn('button-wrapper')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-9-blog-box-tile{color:var(--content);display:block;position:relative;text-decoration:none}.mfui-9-blog-box-tile:hover{text-decoration:none}.mfui-9-blog-box-tile:hover .mfui-9-blog-box-tile__title{color:var(--brandGreen)}.mfui-9-blog-box-tile__image{border-radius:24px;height:100%;-o-object-fit:cover;object-fit:cover;vertical-align:top;width:100%}.mfui-9-blog-box-tile__picture{display:block}.mfui-9-blog-box-tile__date{color:var(--spbSky3);margin-bottom:4px}.mfui-9-blog-box-tile__title{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:4
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-blog-box-tile{border-radius:24px;color:var(--content);display:block;position:relative;text-decoration:none}.mfui-9-blog-box-tile:focus-visible{-webkit-animation:focus-outline-shrink .3s linear forwards;animation:focus-outline-shrink .3s linear forwards;outline-offset:2px}@-webkit-keyframes focus-outline-shrink{0%{outline:0 solid var(--137C)}to{outline:4px solid var(--137C)}}@keyframes focus-outline-shrink{0%{outline:0 solid var(--137C)}to{outline:4px solid var(--137C)}}.mfui-9-blog-box-tile:focus{outline:none}.mfui-9-blog-box-tile:hover{text-decoration:none}.mfui-9-blog-box-tile:hover .mfui-9-blog-box-tile__title{color:var(--brandGreen)}.mfui-9-blog-box-tile__image{border-radius:24px;height:100%;-o-object-fit:cover;object-fit:cover;vertical-align:top;width:100%}.mfui-9-blog-box-tile__picture{display:block}.mfui-9-blog-box-tile__date{color:var(--spbSky3);margin-bottom:4px}.mfui-9-blog-box-tile__title{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-transition:color .3s;transition:color .3s;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:4}.mfui-9-blog-box-tile_view_thumbnail{display:-webkit-box;display:-ms-flexbox;display:flex;gap:20px}.mfui-9-blog-box-tile_view_thumbnail .mfui-9-blog-box-tile__picture{-ms-flex-negative:0;flex-shrink:0;height:102px;width:133px}@media screen and (min-width:1280px){.mfui-9-blog-box-tile_view_thumbnail .mfui-9-blog-box-tile__picture{height:130px;width:170px}}@media screen and (min-width:1440px){.mfui-9-blog-box-tile_view_thumbnail .mfui-9-blog-box-tile__picture{height:170px;width:233px}}.mfui-9-blog-box-tile_view_thumbnail .mfui-9-blog-box-tile__content{-ms-flex-item-align:center;align-self:center}.mfui-9-blog-box-tile_view_thumbnail .mfui-9-blog-box-tile__date{font-size:12px;line-height:18px}@media screen and (min-width:1280px){.mfui-9-blog-box-tile_view_thumbnail .mfui-9-blog-box-tile__date{font-size:15px;line-height:24px}}.mfui-9-blog-box-tile_view_thumbnail .mfui-9-blog-box-tile__title{font-size:18px;font-weight:500;letter-spacing:.5px;line-height:24px}@media screen and (min-width:1280px){.mfui-9-blog-box-tile_view_thumbnail .mfui-9-blog-box-tile__title{font-size:20px;line-height:28px}}.mfui-9-blog-box-tile_view_full .mfui-9-blog-box-tile__picture{height:358px}@media screen and (min-width:1280px){.mfui-9-blog-box-tile_view_full .mfui-9-blog-box-tile__picture{height:438px}}@media screen and (min-width:1440px){.mfui-9-blog-box-tile_view_full .mfui-9-blog-box-tile__picture{height:558px}}.mfui-9-blog-box-tile_view_full .mfui-9-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-9-blog-box-tile_view_full .mfui-9-blog-box-tile__content{padding:24px}}@media screen and (min-width:768px){.mfui-9-blog-box-tile_view_full .mfui-9-blog-box-tile__content{bottom:12px;left:12px;right:12px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-9-blog-box-tile_view_full .mfui-9-blog-box-tile__content{padding:16px}}@media screen and (min-width:1280px){.mfui-9-blog-box-tile_view_full .mfui-9-blog-box-tile__content{padding:24px}}.mfui-9-blog-box-tile_view_full .mfui-9-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-9-blog-box-tile_view_full .mfui-9-blog-box-tile__title{font-size:26px;line-height:32px}}@media screen and (min-width:1024px){.mfui-9-blog-box-tile_view_full .mfui-9-blog-box-tile__title{font-size:28px;line-height:36px}}@media screen and (min-width:1280px){.mfui-9-blog-box-tile_view_full .mfui-9-blog-box-tile__title{font-size:32px;line-height:40px}}.mfui-9-blog-box-tile_view_compact .mfui-9-blog-box-tile__picture{height:233px}@media screen and (min-width:1280px){.mfui-9-blog-box-tile_view_compact .mfui-9-blog-box-tile__picture{height:288px}}@media screen and (min-width:1440px){.mfui-9-blog-box-tile_view_compact .mfui-9-blog-box-tile__picture{height:367px}}.mfui-9-blog-box-tile_view_compact .mfui-9-blog-box-tile__content{background-color:var(--base);border-radius:24px;bottom:12px;left:12px;padding:16px;position:absolute;right:12px}.mfui-9-blog-box-tile_view_compact .mfui-9-blog-box-tile__title{font-size:18px;font-weight:500;letter-spacing:.5px;line-height:24px}@media screen and (min-width:1280px){.mfui-9-blog-box-tile_view_compact .mfui-9-blog-box-tile__title{font-size:20px;line-height:28px}}
|
|
@@ -4,6 +4,10 @@ import './BlogBoxTile.scss';
|
|
|
4
4
|
type TileSettingsType = {
|
|
5
5
|
view: TileViewType;
|
|
6
6
|
};
|
|
7
|
-
export type BlogBoxTileType = TileDataType & TileSettingsType
|
|
7
|
+
export type BlogBoxTileType = TileDataType & TileSettingsType & {
|
|
8
|
+
classes?: {
|
|
9
|
+
title?: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
8
12
|
declare const BlogBoxTile: React.FC<BlogBoxTileType>;
|
|
9
13
|
export default BlogBoxTile;
|
|
@@ -16,7 +16,8 @@ var BlogBoxTile = function BlogBoxTile(_ref) {
|
|
|
16
16
|
srcThumbnail = _ref$image.srcThumbnail,
|
|
17
17
|
_ref$image$alt = _ref$image.alt,
|
|
18
18
|
alt = _ref$image$alt === void 0 ? 'image' : _ref$image$alt,
|
|
19
|
-
view = _ref.view
|
|
19
|
+
view = _ref.view,
|
|
20
|
+
classes = _ref.classes;
|
|
20
21
|
var _useResolutions = useResolutions(),
|
|
21
22
|
isMobile = _useResolutions.isMobile;
|
|
22
23
|
var isViewThumbnail = view === 'thumbnail';
|
|
@@ -54,7 +55,7 @@ var BlogBoxTile = function BlogBoxTile(_ref) {
|
|
|
54
55
|
}, /*#__PURE__*/React.createElement("div", {
|
|
55
56
|
className: cn('date')
|
|
56
57
|
}, date), /*#__PURE__*/React.createElement("div", {
|
|
57
|
-
className: cn('title')
|
|
58
|
+
className: cn('title', [classes === null || classes === void 0 ? void 0 : classes.title])
|
|
58
59
|
}, title)));
|
|
59
60
|
};
|
|
60
61
|
export default BlogBoxTile;
|
|
@@ -16,6 +16,8 @@ export type Props = {
|
|
|
16
16
|
color?: TextColorType;
|
|
17
17
|
/** Включить микроразметку */
|
|
18
18
|
hasMicrodata?: boolean;
|
|
19
|
+
/** Включить микроразметку для последнего элемента */
|
|
20
|
+
hasMicrodataForLastItem?: boolean;
|
|
19
21
|
/** Отключить на разрешении < 768 px */
|
|
20
22
|
disabledOnMobile?: boolean;
|
|
21
23
|
/** Отступ сверху */
|
|
@@ -20,6 +20,8 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
|
20
20
|
dataAttrs = _ref.dataAttrs,
|
|
21
21
|
_ref$hasMicrodata = _ref.hasMicrodata,
|
|
22
22
|
hasMicrodata = _ref$hasMicrodata === void 0 ? false : _ref$hasMicrodata,
|
|
23
|
+
_ref$hasMicrodataForL = _ref.hasMicrodataForLastItem,
|
|
24
|
+
hasMicrodataForLastItem = _ref$hasMicrodataForL === void 0 ? false : _ref$hasMicrodataForL,
|
|
23
25
|
_ref$disabledOnMobile = _ref.disabledOnMobile,
|
|
24
26
|
disabledOnMobile = _ref$disabledOnMobile === void 0 ? false : _ref$disabledOnMobile,
|
|
25
27
|
_ref$hasMarginTop = _ref.hasMarginTop,
|
|
@@ -49,6 +51,7 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
|
49
51
|
index: i,
|
|
50
52
|
isLastItem: i === items.length - 1,
|
|
51
53
|
hasMicrodata: hasMicrodata,
|
|
54
|
+
hasMicrodataForLastItem: hasMicrodataForLastItem,
|
|
52
55
|
dataAttrs: {
|
|
53
56
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.itemInner,
|
|
54
57
|
link: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.link,
|
|
@@ -9,6 +9,14 @@ export var TextColor = {
|
|
|
9
9
|
BLACK: 'black',
|
|
10
10
|
WHITE: 'white'
|
|
11
11
|
};
|
|
12
|
+
var MICRODATA = {
|
|
13
|
+
itemScope: true,
|
|
14
|
+
itemProp: 'itemListElement',
|
|
15
|
+
itemType: 'https://schema.org/ListItem'
|
|
16
|
+
};
|
|
17
|
+
var MICRODATA_ITEM_PROP = {
|
|
18
|
+
itemProp: 'name'
|
|
19
|
+
};
|
|
12
20
|
var cn = cnCreate('mfui-9-breadcrumbs-item');
|
|
13
21
|
var BreadcrumbsItem = function BreadcrumbsItem(_ref) {
|
|
14
22
|
var title = _ref.title,
|
|
@@ -20,24 +28,26 @@ var BreadcrumbsItem = function BreadcrumbsItem(_ref) {
|
|
|
20
28
|
isLastItem = _ref$isLastItem === void 0 ? false : _ref$isLastItem,
|
|
21
29
|
_ref$hasMicrodata = _ref.hasMicrodata,
|
|
22
30
|
hasMicrodata = _ref$hasMicrodata === void 0 ? false : _ref$hasMicrodata,
|
|
31
|
+
_ref$hasMicrodataForL = _ref.hasMicrodataForLastItem,
|
|
32
|
+
hasMicrodataForLastItem = _ref$hasMicrodataForL === void 0 ? false : _ref$hasMicrodataForL,
|
|
23
33
|
classes = _ref.classes,
|
|
24
34
|
dataAttrs = _ref.dataAttrs;
|
|
35
|
+
var renderMeta = /*#__PURE__*/React.createElement("meta", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.meta, index + 1), {
|
|
36
|
+
itemProp: "position",
|
|
37
|
+
content: String(index + 1)
|
|
38
|
+
}));
|
|
25
39
|
if (isLastItem) {
|
|
26
40
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
27
41
|
className: cn({
|
|
28
42
|
color: color
|
|
29
43
|
})
|
|
30
|
-
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root, index + 1)), /*#__PURE__*/React.createElement("span", _extends({
|
|
44
|
+
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root, index + 1), hasMicrodataForLastItem && MICRODATA), /*#__PURE__*/React.createElement("span", _extends({
|
|
31
45
|
className: classes === null || classes === void 0 ? void 0 : classes.lastItemTitle
|
|
32
|
-
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.itemTitle, index + 1)), title));
|
|
46
|
+
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.itemTitle, index + 1), hasMicrodataForLastItem && MICRODATA_ITEM_PROP), title), hasMicrodataForLastItem && renderMeta);
|
|
33
47
|
}
|
|
34
48
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
35
49
|
className: cn()
|
|
36
|
-
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root, index + 1), hasMicrodata && {
|
|
37
|
-
itemScope: true,
|
|
38
|
-
itemProp: 'itemListElement',
|
|
39
|
-
itemType: 'https://schema.org/ListItem'
|
|
40
|
-
}), /*#__PURE__*/React.createElement(TextLink, {
|
|
50
|
+
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root, index + 1), hasMicrodata && MICRODATA), /*#__PURE__*/React.createElement(TextLink, {
|
|
41
51
|
className: classes === null || classes === void 0 ? void 0 : classes.link,
|
|
42
52
|
href: href,
|
|
43
53
|
color: color,
|
|
@@ -47,11 +57,6 @@ var BreadcrumbsItem = function BreadcrumbsItem(_ref) {
|
|
|
47
57
|
itemProp: hasMicrodata ? 'item' : undefined
|
|
48
58
|
}, /*#__PURE__*/React.createElement("span", _extends({
|
|
49
59
|
className: classes === null || classes === void 0 ? void 0 : classes.itemTitle
|
|
50
|
-
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.itemTitle, index + 1), hasMicrodata &&
|
|
51
|
-
itemProp: 'name'
|
|
52
|
-
}), title)), hasMicrodata && /*#__PURE__*/React.createElement("meta", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.meta, index + 1), {
|
|
53
|
-
itemProp: "position",
|
|
54
|
-
content: String(index + 1)
|
|
55
|
-
})));
|
|
60
|
+
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.itemTitle, index + 1), hasMicrodata && MICRODATA_ITEM_PROP), title)), hasMicrodata && renderMeta);
|
|
56
61
|
};
|
|
57
62
|
export default BreadcrumbsItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-9-card{display:-webkit-box;display:-ms-flexbox;display:flex;font-family:inherit;font-size:15px;font-weight:400;line-height:24px;-webkit-box-orient:vertical;-webkit-box-direction:normal;background-color:var(--base);border-radius:24px;color:var(--content);-ms-flex-direction:column;flex-direction:column;padding:16px 16px 24px;text-decoration:none!important;-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}@media screen and (min-width:1280px){.mfui-9-card{padding:24px 24px 32px}}.mfui-9-card_full-height{height:100%}.mfui-9-card_link{cursor:pointer}.mfui-9-card_view_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-9-card_link.mfui-9-card_view_hover-shadow:hover,.mfui-9-card_link.mfui-9-card_view_shadow:hover{-webkit-box-shadow:0 8px 28px 0 rgba(0,0,0,.1);box-shadow:0 8px 28px 0 rgba(0,0,0,.1)}.mfui-9-card_view_background{background-color:var(--spbSky0)}.mfui-9-card_link.mfui-9-card_view_background:hover{background-color:var(--spbSky1)}.mfui-9-card_only-title{padding:24px}@media screen and (min-width:1280px){.mfui-9-card_only-title{padding:32px}}.mfui-9-card__header{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.mfui-9-card__icon{height:40px;margin-bottom:32px;width:40px}.mfui-9-card__img-box{border-radius:24px;overflow:hidden;padding-bottom:56.25%;position:relative}.mfui-9-card__img-box_position_top{margin:-6px -6px 24px}@media screen and (min-width:1280px){.mfui-9-card__img-box_position_top{margin:-12px -12px 32px}}.mfui-9-card__img-box_position_bottom{margin:24px -6px 0}@media screen and (min-width:1280px){.mfui-9-card__img-box_position_bottom{margin:32px -12px 0}}.mfui-9-card__img{height:100%;-o-object-fit:cover;object-fit:cover;position:absolute;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s;width:100%}.mfui-9-card_link:hover .mfui-9-card__img{-webkit-transform:scale(1.2);transform:scale(1.2)}.mfui-9-card__marker-list{list-style-type:none;margin:16px 0 0;padding:0}.mfui-9-card__marker-item{padding-left:20px;position:relative}.mfui-9-card__marker-item:not(:last-child){margin-bottom:12px}.mfui-9-card__marker-item:before{background-color:var(--spbSky2);border-radius:50%;content:"";height:6px;left:0;opacity:.8;position:absolute;top:7px;width:6px}.mfui-9-card__marker-note{display:block;font-weight:500;margin:4px 0 0;padding:0}.mfui-9-card__texts{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px;margin-top:16px}.mfui-9-card__texts ol,.mfui-9-card__texts ul{margin:0;padding-left:24px}.mfui-9-card__texts ol{list-style-type:decimal}.mfui-9-card__texts ul{list-style-type:disc}.mfui-9-card__texts-title{font-weight:500}.mfui-9-card__features{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px;margin-top:16px;overflow:hidden}.mfui-9-card__features-list{list-style:none;margin:0;padding:0}.mfui-9-card__features-item{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.mfui-9-card__features-item:before{background-image:radial-gradient(circle,var(--spbSky3) 1px,transparent 1px);background-size:6px 2px;bottom:.4em;content:"";height:2px;position:absolute;width:100%}.mfui-9-card__features-item-value{-ms-flex-negative:0;flex-shrink:0;text-align:end}.mfui-9-card__features-item-text{background-color:var(--base);position:relative;-webkit-transition:background-color .3s;transition:background-color .3s;z-index:1}.mfui-9-card_view_background .mfui-9-card__features-item-text{background-color:var(--spbSky0)}.mfui-9-card_link.mfui-9-card_view_background:hover .mfui-9-card__features-item-text{background-color:var(--spbSky1)}.mfui-9-card__features-item-title .mfui-9-card__features-item-text{padding-right:4px}.mfui-9-card__features-item-value .mfui-9-card__features-item-text{padding-left:4px}.mfui-9-card__icons{margin-top:16px}.mfui-9-card__icons-desc{margin-bottom:12px}.mfui-9-card__icons-list{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px}.mfui-9-card__icons-item,.mfui-9-card__icons-list{display:-webkit-box;display:-ms-flexbox;display:flex}.mfui-9-card__icons-item-icon{-ms-flex-negative:0;flex-shrink:0;height:32px;margin-right:8px;width:32px}.mfui-9-card__icons-item-text{margin-top:4px}.mfui-9-card__price{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline;-webkit-box-pack:center;-ms-flex-pack:center;border-top:1px solid var(--spbSky1);justify-content:center;margin-top:24px;padding-top:24px}@media screen and (min-width:1280px){.mfui-9-card__price{margin-top:32px}}.mfui-9-card__img-box+.mfui-9-card__price{border:none;padding-top:0}.mfui-9-card__price-old-value{color:var(--spbSky3);position:relative}.mfui-9-card__price-old-value:before{background-color:var(--fury);content:"";height:1px;left:-1px;position:absolute;right:-1px;top:50%}.mfui-9-card__price-value{font-size:22px;font-weight:600;letter-spacing:.5px;line-height:28px}@media screen and (min-width:768px) and (max-width:1023px){.mfui-9-card__price-value{font-size:26px;line-height:32px}}@media screen and (min-width:1024px){.mfui-9-card__price-value{font-size:28px;line-height:36px}}@media screen and (min-width:1280px){.mfui-9-card__price-value{font-size:32px;line-height:40px}}.mfui-9-card__buttons{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:16px;margin-top:32px}.mfui-9-card__price+.mfui-9-card__buttons{margin-top:24px}.mfui-9-
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-card{display:-webkit-box;display:-ms-flexbox;display:flex;font-family:inherit;font-size:15px;font-weight:400;line-height:24px;-webkit-box-orient:vertical;-webkit-box-direction:normal;background-color:var(--base);border-radius:24px;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--content);-ms-flex-direction:column;flex-direction:column;padding:16px 16px 24px;text-decoration:none!important;-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-9-card:focus-visible{-webkit-animation:focus-outline-shrink .3s linear forwards;animation:focus-outline-shrink .3s linear forwards;outline-offset:2px}@-webkit-keyframes focus-outline-shrink{0%{outline:0 solid var(--137C)}to{outline:4px solid var(--137C)}}@keyframes focus-outline-shrink{0%{outline:0 solid var(--137C)}to{outline:4px solid var(--137C)}}.mfui-9-card:focus{outline:none}@media screen and (min-width:1280px){.mfui-9-card{padding:24px 24px 32px}}.mfui-9-card_full-height{height:100%}.mfui-9-card_link{cursor:pointer}.mfui-9-card_view_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-9-card_link.mfui-9-card_view_hover-shadow:hover,.mfui-9-card_link.mfui-9-card_view_shadow:hover{-webkit-box-shadow:0 8px 28px 0 rgba(0,0,0,.1);box-shadow:0 8px 28px 0 rgba(0,0,0,.1)}.mfui-9-card_view_stroke{background-color:inherit;border:1px solid var(--spbSky2)}.mfui-9-card_link.mfui-9-card_view_stroke:hover{border:1px solid var(--brandGreen)}.mfui-9-card_view_background{background-color:var(--spbSky0)}.mfui-9-card_link.mfui-9-card_view_background:hover{background-color:var(--spbSky1)}.mfui-9-card_only-title{padding:24px}@media screen and (min-width:1280px){.mfui-9-card_only-title{padding:32px}}.mfui-9-card__header{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.mfui-9-card__icon{height:40px;margin-bottom:32px;width:40px}.mfui-9-card__img-box{border-radius:24px;overflow:hidden;padding-bottom:56.25%;position:relative}.mfui-9-card__img-box_position_top{margin:-6px -6px 24px}@media screen and (min-width:1280px){.mfui-9-card__img-box_position_top{margin:-12px -12px 32px}}.mfui-9-card__img-box_position_bottom{margin:24px -6px 0}@media screen and (min-width:1280px){.mfui-9-card__img-box_position_bottom{margin:32px -12px 0}}.mfui-9-card__img{height:100%;-o-object-fit:cover;object-fit:cover;position:absolute;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s;width:100%}.mfui-9-card_link:hover .mfui-9-card__img{-webkit-transform:scale(1.2);transform:scale(1.2)}.mfui-9-card__marker-list{list-style-type:none;margin:16px 0 0;padding:0}.mfui-9-card__marker-item{padding-left:20px;position:relative}.mfui-9-card__marker-item:not(:last-child){margin-bottom:12px}.mfui-9-card__marker-item:before{background-color:var(--spbSky2);border-radius:50%;content:"";height:6px;left:0;opacity:.8;position:absolute;top:7px;width:6px}.mfui-9-card__marker-note{display:block;font-weight:500;margin:4px 0 0;padding:0}.mfui-9-card__texts{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px;margin-top:16px}.mfui-9-card__texts ol,.mfui-9-card__texts ul{margin:0;padding-left:24px}.mfui-9-card__texts ol{list-style-type:decimal}.mfui-9-card__texts ul{list-style-type:disc}.mfui-9-card__texts-item_center .mfui-9-card__texts-desc,.mfui-9-card__texts-item_center .mfui-9-card__texts-title{text-align:center}.mfui-9-card__texts-title{font-weight:500}.mfui-9-card__features{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px;margin-top:16px;overflow:hidden}.mfui-9-card__features-list{list-style:none;margin:0;padding:0}.mfui-9-card__features-item{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.mfui-9-card__features-item:before{background-image:radial-gradient(circle,var(--spbSky3) 1px,transparent 1px);background-size:6px 2px;bottom:.4em;content:"";height:2px;position:absolute;width:100%}.mfui-9-card__features-item-value{-ms-flex-negative:0;flex-shrink:0;text-align:end}.mfui-9-card__features-item-text{background-color:var(--base);position:relative;-webkit-transition:background-color .3s;transition:background-color .3s;z-index:1}.mfui-9-card_view_background .mfui-9-card__features-item-text{background-color:var(--spbSky0)}.mfui-9-card_link.mfui-9-card_view_background:hover .mfui-9-card__features-item-text{background-color:var(--spbSky1)}.mfui-9-card__features-item-title .mfui-9-card__features-item-text{padding-right:4px}.mfui-9-card__features-item-value .mfui-9-card__features-item-text{padding-left:4px}.mfui-9-card__icons{margin-top:16px}.mfui-9-card__icons-desc{margin-bottom:12px}.mfui-9-card__icons-list{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px}.mfui-9-card__icons-item,.mfui-9-card__icons-list{display:-webkit-box;display:-ms-flexbox;display:flex}.mfui-9-card__icons-item-icon{-ms-flex-negative:0;flex-shrink:0;height:32px;margin-right:8px;width:32px}.mfui-9-card__icons-item-text{margin-top:4px}.mfui-9-card__price{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline;-webkit-box-pack:center;-ms-flex-pack:center;border-top:1px solid var(--spbSky1);justify-content:center;margin-top:24px;padding-top:24px}@media screen and (min-width:1280px){.mfui-9-card__price{margin-top:32px}}.mfui-9-card__img-box+.mfui-9-card__price{border:none;padding-top:0}.mfui-9-card__price-old-value{color:var(--spbSky3);position:relative}.mfui-9-card__price-old-value:before{background-color:var(--fury);content:"";height:1px;left:-1px;position:absolute;right:-1px;top:50%}.mfui-9-card__price-value{font-size:22px;font-weight:600;letter-spacing:.5px;line-height:28px}@media screen and (min-width:768px) and (max-width:1023px){.mfui-9-card__price-value{font-size:26px;line-height:32px}}@media screen and (min-width:1024px){.mfui-9-card__price-value{font-size:28px;line-height:36px}}@media screen and (min-width:1280px){.mfui-9-card__price-value{font-size:32px;line-height:40px}}.mfui-9-card__buttons{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:16px;margin-top:32px}.mfui-9-card__price+.mfui-9-card__buttons{margin-top:24px}.mfui-9-card__button{-ms-flex-preferred-size:190px;flex-basis:190px;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1}.mfui-9-card__footer{margin-top:auto}
|
|
@@ -21,8 +21,9 @@ export interface ICard {
|
|
|
21
21
|
/** Ссылка на корневой элемент */
|
|
22
22
|
rootRef?: React.Ref<HTMLDivElement | HTMLAnchorElement>;
|
|
23
23
|
isFullHeight?: boolean;
|
|
24
|
+
isCenteredText?: boolean;
|
|
24
25
|
/** Вид */
|
|
25
|
-
view?: 'shadow' | 'hover-shadow' | 'background';
|
|
26
|
+
view?: 'shadow' | 'hover-shadow' | 'background' | 'stroke';
|
|
26
27
|
/** Ссылка для карточки */
|
|
27
28
|
link?: Link;
|
|
28
29
|
/** Изображение */
|
|
@@ -3,34 +3,34 @@ import "core-js/modules/es.array.map.js";
|
|
|
3
3
|
import "core-js/modules/es.string.link.js";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { Button, Header } from '@megafon/ui-core';
|
|
6
|
-
import { cnCreate, convert, filterDataAttrs } from '@megafon/ui-helpers';
|
|
6
|
+
import { cnCreate, convert, filterDataAttrs, textConvertConfig } from '@megafon/ui-helpers';
|
|
7
7
|
import "./Card.css";
|
|
8
|
-
var textsConvertConfig = {
|
|
9
|
-
|
|
8
|
+
var textsConvertConfig = _extends(_extends({}, textConvertConfig), {
|
|
9
|
+
ul: {
|
|
10
10
|
component: function component(_ref) {
|
|
11
11
|
var children = _ref.children;
|
|
12
|
-
return /*#__PURE__*/React.createElement("
|
|
12
|
+
return /*#__PURE__*/React.createElement("ul", null, children);
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
|
-
|
|
15
|
+
ol: {
|
|
16
16
|
component: function component(_ref2) {
|
|
17
17
|
var children = _ref2.children;
|
|
18
|
-
return /*#__PURE__*/React.createElement("
|
|
18
|
+
return /*#__PURE__*/React.createElement("ol", null, children);
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
|
-
|
|
21
|
+
li: {
|
|
22
22
|
component: function component(_ref3) {
|
|
23
23
|
var children = _ref3.children;
|
|
24
|
-
return /*#__PURE__*/React.createElement("
|
|
24
|
+
return /*#__PURE__*/React.createElement("li", null, children);
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
|
-
|
|
27
|
+
p: {
|
|
28
28
|
component: function component(_ref4) {
|
|
29
29
|
var children = _ref4.children;
|
|
30
|
-
return /*#__PURE__*/React.createElement("
|
|
30
|
+
return /*#__PURE__*/React.createElement("p", null, children);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
};
|
|
33
|
+
});
|
|
34
34
|
var cn = cnCreate('mfui-9-card');
|
|
35
35
|
var Card = function Card(_ref5) {
|
|
36
36
|
var dataAttrs = _ref5.dataAttrs,
|
|
@@ -39,6 +39,8 @@ var Card = function Card(_ref5) {
|
|
|
39
39
|
rootRef = _ref5.rootRef,
|
|
40
40
|
_ref5$isFullHeight = _ref5.isFullHeight,
|
|
41
41
|
isFullHeight = _ref5$isFullHeight === void 0 ? false : _ref5$isFullHeight,
|
|
42
|
+
_ref5$isCenteredText = _ref5.isCenteredText,
|
|
43
|
+
isCenteredText = _ref5$isCenteredText === void 0 ? false : _ref5$isCenteredText,
|
|
42
44
|
link = _ref5.link,
|
|
43
45
|
_ref5$view = _ref5.view,
|
|
44
46
|
view = _ref5$view === void 0 ? 'shadow' : _ref5$view,
|
|
@@ -102,7 +104,9 @@ var Card = function Card(_ref5) {
|
|
|
102
104
|
className: cn('texts')
|
|
103
105
|
}, textsList.map(function (item, i) {
|
|
104
106
|
return /*#__PURE__*/React.createElement("div", {
|
|
105
|
-
className: cn('texts-item'
|
|
107
|
+
className: cn('texts-item', {
|
|
108
|
+
center: isCenteredText
|
|
109
|
+
}),
|
|
106
110
|
key: i
|
|
107
111
|
}, !!item.title && /*#__PURE__*/React.createElement("div", {
|
|
108
112
|
className: cn('texts-title')
|
|
@@ -170,10 +174,10 @@ var Card = function Card(_ref5) {
|
|
|
170
174
|
return null;
|
|
171
175
|
}
|
|
172
176
|
var extraButtonType = (button === null || button === void 0 ? void 0 : button.type) === 'outline' ? 'text' : extraButton === null || extraButton === void 0 ? void 0 : extraButton.type;
|
|
177
|
+
var extraButtonDefaultTheme = view === 'background' ? 'white' : 'gray';
|
|
178
|
+
var extraButtonTheme = (extraButton === null || extraButton === void 0 ? void 0 : extraButton.theme) || extraButtonDefaultTheme;
|
|
173
179
|
return /*#__PURE__*/React.createElement("div", {
|
|
174
|
-
className: cn('buttons'
|
|
175
|
-
centered: (button === null || button === void 0 ? void 0 : button.isCentered) || (extraButton === null || extraButton === void 0 ? void 0 : extraButton.isCentered)
|
|
176
|
-
})
|
|
180
|
+
className: cn('buttons')
|
|
177
181
|
}, !!button && /*#__PURE__*/React.createElement(Button, {
|
|
178
182
|
dataAttrs: {
|
|
179
183
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.button
|
|
@@ -191,7 +195,8 @@ var Card = function Card(_ref5) {
|
|
|
191
195
|
className: cn('button', [classes === null || classes === void 0 ? void 0 : classes.extraButton]),
|
|
192
196
|
href: extraButton.href,
|
|
193
197
|
target: extraButton.target,
|
|
194
|
-
type: extraButtonType
|
|
198
|
+
type: extraButtonType,
|
|
199
|
+
theme: extraButtonTheme,
|
|
195
200
|
onClick: extraButton === null || extraButton === void 0 ? void 0 : extraButton.onClick
|
|
196
201
|
}, extraButton.title));
|
|
197
202
|
};
|
|
@@ -214,6 +219,8 @@ var Card = function Card(_ref5) {
|
|
|
214
219
|
target: isLink ? link === null || link === void 0 ? void 0 : link.target : undefined,
|
|
215
220
|
onClick: isLink ? onClick : undefined,
|
|
216
221
|
ref: rootRef
|
|
222
|
+
}, !!onClick && {
|
|
223
|
+
tabIndex: 0
|
|
217
224
|
}), renderIcon(), !isBottomImage && renderImage(), /*#__PURE__*/React.createElement("div", {
|
|
218
225
|
className: cn('header')
|
|
219
226
|
}, /*#__PURE__*/React.createElement(Header, {
|
|
@@ -68,19 +68,17 @@ export type ButtonType = {
|
|
|
68
68
|
href?: string;
|
|
69
69
|
/** Target свойство кнопки */
|
|
70
70
|
target?: Target;
|
|
71
|
-
/**
|
|
72
|
-
|
|
71
|
+
/** Тема кнопки */
|
|
72
|
+
theme?: 'green' | 'gray' | 'white';
|
|
73
73
|
/** Обработчик клика по кнопке */
|
|
74
74
|
onClick?: () => void;
|
|
75
75
|
};
|
|
76
76
|
export type MainButtonType = ButtonType & {
|
|
77
77
|
/** Тип кнопки */
|
|
78
78
|
type?: 'primary' | 'outline';
|
|
79
|
-
/** Тема кнопки */
|
|
80
|
-
theme?: 'green' | 'green-soft';
|
|
81
79
|
};
|
|
82
80
|
export type ExtraButtonType = ButtonType & {
|
|
83
81
|
/** Тип кнопки */
|
|
84
|
-
type?: '
|
|
82
|
+
type?: 'primary' | 'text';
|
|
85
83
|
};
|
|
86
84
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-cards-on-background{border-radius:24px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;padding:16px;position:relative;width:100%}@media screen and (min-width:768px) and (max-width:1023px){.mfui-9-cards-on-background{padding:32px}}@media screen and (min-width:1024px){.mfui-9-cards-on-background{padding:56px}}.mfui-9-cards-on-background_background_gray{background-color:var(--spbSky0)}.mfui-9-cards-on-background_background_green{background-color:var(--brandGreen20)}.mfui-9-cards-on-background_background_blue{background-color:var(--night20)}.mfui-9-cards-on-background_background_violet{background-color:#e1dcea}@media screen and (max-width:767px){.mfui-9-cards-on-background_carousel{padding-bottom:32px}}@media screen and (max-width:1023px){.mfui-9-cards-on-background_carousel:before{background:-webkit-gradient(linear,left top,right top,from(rgba(242,244,247,.3)),to(hsla(0,0%,100%,0)));background:linear-gradient(90deg,rgba(242,244,247,.3),hsla(0,0%,100%,0));content:"";height:100%;left:0;position:absolute;top:0;width:16px;z-index:1}.mfui-9-cards-on-background_carousel:after{background:-webkit-gradient(linear,right top,left top,from(rgba(242,244,247,.3)),to(hsla(0,0%,100%,0)));background:linear-gradient(270deg,rgba(242,244,247,.3),hsla(0,0%,100%,0));content:"";height:100%;position:absolute;right:0;top:0;width:16px;z-index:1}}.mfui-9-cards-on-background__grid{display:grid;gap:20px;grid-template-columns:1fr;width:100%}@media screen and (min-width:768px){.mfui-9-cards-on-background__grid{grid-template-columns:repeat(12,1fr)}}.mfui-9-cards-on-background__grid-item{grid-column:span 1}@media screen and (min-width:768px){.mfui-9-cards-on-background__grid-item{grid-column:span 6}}@media screen and (min-width:1024px) and (max-width:1279px),screen and (min-width:768px) and (max-width:1023px){.mfui-9-cards-on-background__grid_count_3 .mfui-9-cards-on-background__grid-item:first-child{grid-column:span 12}.mfui-9-cards-on-background__grid_count_3 .mfui-9-cards-on-background__grid-item:nth-child(n+2){grid-column:span 6}}@media screen and (min-width:1280px){.mfui-9-cards-on-background__grid_count_3 .mfui-9-cards-on-background__grid-item{grid-column:span 4}}@media screen and (min-width:1024px) and (max-width:1279px),screen and (min-width:768px) and (max-width:1023px){.mfui-9-cards-on-background__grid_count_5 .mfui-9-cards-on-background__grid-item:first-child{grid-column:span 12}.mfui-9-cards-on-background__grid_count_5 .mfui-9-cards-on-background__grid-item:nth-child(n+2){grid-column:span 6}}@media screen and (min-width:1280px){.mfui-9-cards-on-background__grid_count_5 .mfui-9-cards-on-background__grid-item:nth-child(-n+2){grid-column:span 6}.mfui-9-cards-on-background__grid_count_5 .mfui-9-cards-on-background__grid-item:nth-child(n+3){grid-column:span 4}}
|