@megafon/ui-core 9.0.0-alpha.4 → 9.0.0-alpha.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.
- package/dist/es/components/Accordion/Accordion.d.ts +3 -1
- package/dist/es/components/Accordion/Accordion.js +2 -0
- package/dist/es/components/Badges/PromoBadge/PromoBadge.d.ts +0 -11
- package/dist/es/components/Badges/PromoBadge/PromoBadge.js +4 -15
- package/dist/es/components/Carousel/Carousel.css +1 -1
- package/dist/es/components/Chips/ChipsSuggest/ChipSuggest.css +1 -1
- package/dist/es/components/Modal/Modal.css +1 -1
- package/dist/es/components/Modal/Modal.d.ts +12 -7
- package/dist/es/components/Modal/Modal.js +21 -23
- package/dist/es/components/Modal/_ModalContent/ModalContent.css +1 -1
- package/dist/es/components/Modal/_ModalContent/ModalContent.js +16 -39
- package/dist/es/components/Modal/_ModalDesktop/ModalDesktop.css +1 -1
- package/dist/es/components/Modal/_ModalMobile/ModalMobile.css +1 -0
- package/dist/es/components/Modal/{_ModalMobileBottom/ModalMobileBottom.d.ts → _ModalMobile/ModalMobile.d.ts} +6 -5
- package/dist/es/components/Modal/{_ModalMobileBottom/ModalMobileBottom.js → _ModalMobile/ModalMobile.js} +33 -8
- package/dist/es/components/Modal/mocks.js +0 -1
- package/dist/es/components/Modal/types.d.ts +1 -2
- package/dist/es/components/Pagination/Pagination.css +1 -1
- package/dist/es/components/Pagination/Pagination.d.ts +1 -3
- package/dist/es/components/Pagination/Pagination.js +4 -13
- package/dist/es/components/Pagination/components/PaginationButton/PaginationButton.css +1 -1
- package/dist/es/components/Pagination/components/PaginationButton/PaginationButton.d.ts +1 -2
- package/dist/es/components/Pagination/components/PaginationButton/PaginationButton.js +0 -2
- package/dist/es/components/Pagination/components/PaginationButtons/PaginationButtons.css +1 -1
- package/dist/es/components/Pagination/components/PaginationButtons/PaginationButtons.d.ts +1 -3
- package/dist/es/components/Pagination/components/PaginationButtons/PaginationButtons.js +5 -16
- package/dist/es/components/Pagination/components/PaginationNavigation/PaginationNavigation.d.ts +1 -2
- package/dist/es/components/Pagination/components/PaginationNavigation/PaginationNavigation.js +0 -2
- package/dist/es/components/Pagination/types.d.ts +1 -11
- package/dist/es/components/Pagination/types.js +1 -4
- package/dist/es/components/Pagination/usePagination.d.ts +2 -2
- package/dist/es/components/Pagination/usePagination.js +11 -29
- package/dist/es/components/Parameter/Parameter.d.ts +0 -3
- package/dist/es/components/Parameter/Parameter.js +0 -3
- package/dist/es/components/Search/Search.css +1 -1
- package/dist/es/components/Search/Search.d.ts +0 -2
- package/dist/es/components/Search/Search.js +58 -61
- package/dist/es/components/Sliders/Slider/Slider.css +1 -1
- package/dist/es/components/Sliders/Slider/Slider.d.ts +12 -0
- package/dist/es/components/Sliders/Slider/Slider.js +26 -7
- package/dist/es/components/Sliders/SliderRange/SliderRange.d.ts +3 -0
- package/dist/es/components/Sliders/SliderRange/SliderRange.js +4 -1
- package/dist/es/components/Sliders/components/SliderScale/SliderScale.css +1 -1
- package/dist/es/components/Sliders/components/SliderScale/SliderScale.d.ts +6 -0
- package/dist/es/components/Sliders/components/SliderScale/SliderScale.js +8 -1
- package/dist/es/components/Sliders/helpers.d.ts +1 -0
- package/dist/es/components/Sliders/helpers.js +7 -0
- package/dist/es/components/Snackbar/Snackbar.css +1 -1
- package/dist/es/components/TextField/TextField.css +1 -1
- package/dist/es/components/UploadForm/UploadField/UploadField.d.ts +1 -1
- package/dist/es/components/UploadForm/UploadField/components/_UploadFieldDropArea/UploadFieldDropArea.css +1 -1
- package/dist/es/components/UploadForm/UploadField/components/_UploadFieldDropArea/UploadFieldDropArea.d.ts +1 -1
- package/dist/es/components/UploadForm/UploadField/components/_UploadFieldDropArea/UploadFieldDropArea.js +21 -3
- package/dist/es/components/UploadForm/UploadFileItem/UploadFileItem.css +1 -1
- package/dist/es/components/UploadForm/UploadFileItem/UploadFileItem.d.ts +3 -1
- package/dist/es/components/UploadForm/UploadFileItem/UploadFileItem.js +6 -2
- package/dist/es/index.d.ts +1 -2
- package/dist/es/index.js +1 -2
- package/dist/lib/components/Accordion/Accordion.d.ts +3 -1
- package/dist/lib/components/Accordion/Accordion.js +2 -0
- package/dist/lib/components/Badges/PromoBadge/PromoBadge.d.ts +0 -11
- package/dist/lib/components/Badges/PromoBadge/PromoBadge.js +5 -16
- package/dist/lib/components/Carousel/Carousel.css +1 -1
- package/dist/lib/components/Chips/ChipsSuggest/ChipSuggest.css +1 -1
- package/dist/lib/components/Modal/Modal.css +1 -1
- package/dist/lib/components/Modal/Modal.d.ts +12 -7
- package/dist/lib/components/Modal/Modal.js +22 -24
- package/dist/lib/components/Modal/_ModalContent/ModalContent.css +1 -1
- package/dist/lib/components/Modal/_ModalContent/ModalContent.js +16 -39
- package/dist/lib/components/Modal/_ModalDesktop/ModalDesktop.css +1 -1
- package/dist/lib/components/Modal/_ModalMobile/ModalMobile.css +1 -0
- package/dist/lib/components/Modal/{_ModalMobileBottom/ModalMobileBottom.d.ts → _ModalMobile/ModalMobile.d.ts} +6 -5
- package/dist/lib/components/Modal/{_ModalMobileBottom/ModalMobileBottom.js → _ModalMobile/ModalMobile.js} +32 -7
- package/dist/lib/components/Modal/mocks.js +0 -1
- package/dist/lib/components/Modal/types.d.ts +1 -2
- package/dist/lib/components/Pagination/Pagination.css +1 -1
- package/dist/lib/components/Pagination/Pagination.d.ts +1 -3
- package/dist/lib/components/Pagination/Pagination.js +4 -13
- package/dist/lib/components/Pagination/components/PaginationButton/PaginationButton.css +1 -1
- package/dist/lib/components/Pagination/components/PaginationButton/PaginationButton.d.ts +1 -2
- package/dist/lib/components/Pagination/components/PaginationButton/PaginationButton.js +0 -2
- package/dist/lib/components/Pagination/components/PaginationButtons/PaginationButtons.css +1 -1
- package/dist/lib/components/Pagination/components/PaginationButtons/PaginationButtons.d.ts +1 -3
- package/dist/lib/components/Pagination/components/PaginationButtons/PaginationButtons.js +5 -16
- package/dist/lib/components/Pagination/components/PaginationNavigation/PaginationNavigation.d.ts +1 -2
- package/dist/lib/components/Pagination/components/PaginationNavigation/PaginationNavigation.js +0 -2
- package/dist/lib/components/Pagination/types.d.ts +1 -11
- package/dist/lib/components/Pagination/types.js +1 -6
- package/dist/lib/components/Pagination/usePagination.d.ts +2 -2
- package/dist/lib/components/Pagination/usePagination.js +11 -29
- package/dist/lib/components/Parameter/Parameter.d.ts +0 -3
- package/dist/lib/components/Parameter/Parameter.js +0 -3
- package/dist/lib/components/Search/Search.css +1 -1
- package/dist/lib/components/Search/Search.d.ts +0 -2
- package/dist/lib/components/Search/Search.js +58 -61
- package/dist/lib/components/Sliders/Slider/Slider.css +1 -1
- package/dist/lib/components/Sliders/Slider/Slider.d.ts +12 -0
- package/dist/lib/components/Sliders/Slider/Slider.js +25 -6
- package/dist/lib/components/Sliders/SliderRange/SliderRange.d.ts +3 -0
- package/dist/lib/components/Sliders/SliderRange/SliderRange.js +4 -1
- package/dist/lib/components/Sliders/components/SliderScale/SliderScale.css +1 -1
- package/dist/lib/components/Sliders/components/SliderScale/SliderScale.d.ts +6 -0
- package/dist/lib/components/Sliders/components/SliderScale/SliderScale.js +9 -2
- package/dist/lib/components/Sliders/helpers.d.ts +1 -0
- package/dist/lib/components/Sliders/helpers.js +8 -1
- package/dist/lib/components/Snackbar/Snackbar.css +1 -1
- package/dist/lib/components/TextField/TextField.css +1 -1
- package/dist/lib/components/UploadForm/UploadField/UploadField.d.ts +1 -1
- package/dist/lib/components/UploadForm/UploadField/components/_UploadFieldDropArea/UploadFieldDropArea.css +1 -1
- package/dist/lib/components/UploadForm/UploadField/components/_UploadFieldDropArea/UploadFieldDropArea.d.ts +1 -1
- package/dist/lib/components/UploadForm/UploadField/components/_UploadFieldDropArea/UploadFieldDropArea.js +21 -3
- package/dist/lib/components/UploadForm/UploadFileItem/UploadFileItem.css +1 -1
- package/dist/lib/components/UploadForm/UploadFileItem/UploadFileItem.d.ts +3 -1
- package/dist/lib/components/UploadForm/UploadFileItem/UploadFileItem.js +6 -2
- package/dist/lib/index.d.ts +1 -2
- package/dist/lib/index.js +3 -10
- package/package.json +2 -2
- package/styles/colors.css +14 -0
- package/dist/es/components/Modal/_ModalMobileBottom/ModalMobileBottom.css +0 -1
- package/dist/es/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.css +0 -1
- package/dist/es/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.d.ts +0 -8
- package/dist/es/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.js +0 -56
- package/dist/lib/components/Modal/_ModalMobileBottom/ModalMobileBottom.css +0 -1
- package/dist/lib/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.css +0 -1
- package/dist/lib/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.d.ts +0 -8
- package/dist/lib/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.js +0 -65
|
@@ -6,8 +6,10 @@ export interface IAccordionProps {
|
|
|
6
6
|
rootRef?: React.Ref<HTMLDivElement>;
|
|
7
7
|
/** Заголовок */
|
|
8
8
|
title: string | React.ReactNode | React.ReactNode[];
|
|
9
|
-
/**
|
|
9
|
+
/** Тег заголовка (определяет базовый тег и стили) */
|
|
10
10
|
titleTag?: IHeaderProps['as'];
|
|
11
|
+
/** Тег заголовка для семантической разметки (переопределение тега без изменения стилей) */
|
|
12
|
+
titleTagName?: IHeaderProps['tag'];
|
|
11
13
|
/** Состояние открытости */
|
|
12
14
|
isOpened?: boolean;
|
|
13
15
|
/** Включить микроразметку */
|
|
@@ -20,6 +20,7 @@ var Accordion = function Accordion(_ref) {
|
|
|
20
20
|
title = _ref.title,
|
|
21
21
|
_ref$titleTag = _ref.titleTag,
|
|
22
22
|
titleTag = _ref$titleTag === void 0 ? 'h5' : _ref$titleTag,
|
|
23
|
+
titleTagName = _ref.titleTagName,
|
|
23
24
|
_ref$isOpened = _ref.isOpened,
|
|
24
25
|
isOpened = _ref$isOpened === void 0 ? false : _ref$isOpened,
|
|
25
26
|
_ref$hasMicrodata = _ref.hasMicrodata,
|
|
@@ -81,6 +82,7 @@ var Accordion = function Accordion(_ref) {
|
|
|
81
82
|
itemProp: 'name'
|
|
82
83
|
}), /*#__PURE__*/React.createElement(Header, {
|
|
83
84
|
as: titleTag,
|
|
85
|
+
tag: titleTagName,
|
|
84
86
|
dataAttrs: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.header,
|
|
85
87
|
className: titlePropsClasses
|
|
86
88
|
}, title), /*#__PURE__*/React.createElement("div", {
|
|
@@ -15,22 +15,11 @@ export declare const PromoBadgeSize: {
|
|
|
15
15
|
readonly MEDIUM: "medium";
|
|
16
16
|
};
|
|
17
17
|
type PromoBadgeSizeType = (typeof PromoBadgeSize)[keyof typeof PromoBadgeSize];
|
|
18
|
-
export declare const PromoBadgeTypes: {
|
|
19
|
-
readonly HIT: "hit";
|
|
20
|
-
readonly NEW: "new";
|
|
21
|
-
readonly VIP: "vip";
|
|
22
|
-
readonly POPULAR: "popular";
|
|
23
|
-
readonly USER_CHOICE: "user-choice";
|
|
24
|
-
readonly INTERESTS: "interests";
|
|
25
|
-
};
|
|
26
|
-
type PromoBadgeTypesType = (typeof PromoBadgeTypes)[keyof typeof PromoBadgeTypes];
|
|
27
18
|
export interface IPromoBadgeProps {
|
|
28
19
|
/** Цвет промо-бэйджа */
|
|
29
20
|
color?: PromoBadgeColorsType;
|
|
30
21
|
/** Размер промо-бэйджа */
|
|
31
22
|
size?: PromoBadgeSizeType;
|
|
32
|
-
/** DEPRECATED Тип промо-бэйджа (Используйте проп `color`) */
|
|
33
|
-
type?: PromoBadgeTypesType;
|
|
34
23
|
/** Дополнительный класс корневого элемента */
|
|
35
24
|
className?: string;
|
|
36
25
|
/** Дополнительные data-атрибуты к внутренним элементам */
|
|
@@ -15,30 +15,19 @@ export var PromoBadgeSize = {
|
|
|
15
15
|
SMALL: 'small',
|
|
16
16
|
MEDIUM: 'medium'
|
|
17
17
|
};
|
|
18
|
-
// DEPRECATED
|
|
19
|
-
export var PromoBadgeTypes = {
|
|
20
|
-
HIT: 'hit',
|
|
21
|
-
NEW: 'new',
|
|
22
|
-
VIP: 'vip',
|
|
23
|
-
POPULAR: 'popular',
|
|
24
|
-
USER_CHOICE: 'user-choice',
|
|
25
|
-
INTERESTS: 'interests'
|
|
26
|
-
};
|
|
27
18
|
var cn = cnCreate('mfui-9-promo-badge');
|
|
28
19
|
var PromoBadge = function PromoBadge(_ref) {
|
|
29
|
-
var color = _ref.color,
|
|
20
|
+
var _ref$color = _ref.color,
|
|
21
|
+
color = _ref$color === void 0 ? PromoBadgeColors.SKY : _ref$color,
|
|
30
22
|
_ref$size = _ref.size,
|
|
31
|
-
size = _ref$size === void 0 ?
|
|
32
|
-
_ref$type = _ref.type,
|
|
33
|
-
type = _ref$type === void 0 ? PromoBadgeTypes.HIT : _ref$type,
|
|
23
|
+
size = _ref$size === void 0 ? PromoBadgeSize.MEDIUM : _ref$size,
|
|
34
24
|
className = _ref.className,
|
|
35
25
|
children = _ref.children,
|
|
36
26
|
dataAttrs = _ref.dataAttrs;
|
|
37
27
|
return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
38
28
|
className: cn({
|
|
39
29
|
color: color,
|
|
40
|
-
size: size
|
|
41
|
-
type: color ? undefined : type
|
|
30
|
+
size: size
|
|
42
31
|
}, className)
|
|
43
32
|
}), /*#__PURE__*/React.createElement("span", {
|
|
44
33
|
className: cn('text')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-9-carousel,.mfui-9-carousel__swiper{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative}.mfui-9-carousel__swiper{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1;-ms-flex-wrap:wrap;flex-wrap:wrap;margin:-20px 0 -25px;overflow:hidden;padding:20px 0 25px}@media screen and (min-width:1024px){.mfui-9-carousel__swiper{margin-left:-20px!important;margin-right:-20px!important;padding-left:20px!important;padding-right:20px!important}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-9-carousel__swiper_default-inner-indents{margin-left:-48px;margin-right:-48px;padding-left:48px;padding-right:48px}}@media screen and (max-width:767px){.mfui-9-carousel__swiper_default-inner-indents{margin-left:-16px;margin-right:-16px;padding-left:16px;padding-right:32px}}.mfui-9-carousel__swiper_gradient:after,.mfui-9-carousel__swiper_gradient:before{bottom:0;content:"";position:absolute;top:0;width:var(--gap);z-index:5}.mfui-9-carousel__swiper_gradient:before{background:-webkit-gradient(linear,right top,left top,from(
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-carousel,.mfui-9-carousel__swiper{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative}.mfui-9-carousel__swiper{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1;-ms-flex-wrap:wrap;flex-wrap:wrap;margin:-20px 0 -25px;overflow:hidden;padding:20px 0 25px}@media screen and (min-width:1024px){.mfui-9-carousel__swiper{margin-left:-20px!important;margin-right:-20px!important;padding-left:20px!important;padding-right:20px!important}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-9-carousel__swiper_default-inner-indents{margin-left:-48px;margin-right:-48px;padding-left:48px;padding-right:48px}}@media screen and (max-width:767px){.mfui-9-carousel__swiper_default-inner-indents{margin-left:-16px;margin-right:-16px;padding-left:16px;padding-right:32px}}.mfui-9-carousel__swiper_gradient:after,.mfui-9-carousel__swiper_gradient:before{bottom:0;content:"";position:absolute;top:0;width:var(--gap);z-index:5}.mfui-9-carousel__swiper_gradient:before{background:-webkit-gradient(linear,right top,left top,from(rgba(var(--gradientColorRGB),0)),to(var(--gradientColor)));background:linear-gradient(270deg,rgba(var(--gradientColorRGB),0) 0,var(--gradientColor) 100%);left:0}.mfui-9-carousel__swiper_gradient:after{background:-webkit-gradient(linear,right top,left top,from(var(--gradientColor)),to(rgba(var(--gradientColorRGB),0)));background:linear-gradient(270deg,var(--gradientColor) 0,rgba(var(--gradientColorRGB),0) 100%);right:0}.mfui-9-carousel__swiper_gradient-color_default{--gradientColor:var(--background);--gradientColorRGB:var(--background-rgb)}.mfui-9-carousel__swiper_gradient-color_green{--gradientColor:var(--brandGreen);--gradientColorRGB:var(--brandGreen-rgb)}.mfui-9-carousel__swiper_gradient-color_black{--gradientColor:var(--stcBlack);--gradientColorRGB:var(--stcBlack-rgb)}.mfui-9-carousel__swiper_gradient-color_spbSky0{--gradientColor:var(--spbSky0);--gradientColorRGB:var(--spbSky0-rgb)}.mfui-9-carousel__swiper_gradient-color_spbSky1{--gradientColor:var(--spbSky1);--gradientColorRGB:var(--spbSky1-rgb)}.mfui-9-carousel__swiper_gradient-color_spbSky2{--gradientColor:var(--spbSky2);--gradientColorRGB:var(--spbSky2-rgb)}.mfui-9-carousel .swiper-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;z-index:1}.mfui-9-carousel__slide{-ms-flex-negative:0;flex-shrink:0}@media screen and (min-width:1024px){.mfui-9-carousel__slide{-webkit-backface-visibility:hidden;backface-visibility:hidden;opacity:0;-webkit-transition:opacity .2s;transition:opacity .2s}.mfui-9-carousel .swiper-slide-visible{opacity:1;-webkit-transition:opacity .4s;transition:opacity .4s}}.mfui-9-carousel__arrow{position:absolute;top:50%;-webkit-transform:translateY(calc(-50% - 20px));transform:translateY(calc(-50% - 20px));z-index:6}@media screen and (max-width:1023px){.mfui-9-carousel__arrow{display:none}}.mfui-9-carousel__arrow_prev{right:calc(100% + 12px)}@media screen and (min-width:1280px){.mfui-9-carousel__arrow_prev{right:calc(100% + 20px)}}.mfui-9-carousel__arrow_next{left:calc(100% + 12px)}@media screen and (min-width:1280px){.mfui-9-carousel__arrow_next{left:calc(100% + 20px)}}.mfui-9-carousel__arrow_locked{display:none}.mfui-9-carousel .swiper-pagination{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;justify-self:center;-webkit-box-ordinal-group:3;-ms-flex-order:2;border-radius:12px;order:2;padding-top:32px;width:100%}.mfui-9-carousel .swiper-pagination.swiper-pagination-lock{display:none}.mfui-9-carousel .swiper-pagination-bullet{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;border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;height:8px;justify-content:center;-webkit-transition:all .5s,background-color .3s;transition:all .5s,background-color .3s;width:8px}.mfui-9-carousel .swiper-pagination-bullet:before{border-radius:50%;content:"";display:block;height:100%;-webkit-transition:border-radius .5s;transition:border-radius .5s;width:100%}.mfui-9-carousel_nav-theme_green .swiper-pagination-bullet:before{background-color:var(--stcWhite50)}.mfui-9-carousel_nav-theme_light .swiper-pagination-bullet:before{background-color:var(--spbSky2)}.mfui-9-carousel .swiper-pagination-bullet-active{cursor:default;-webkit-transform:scaleX(2.3);transform:scaleX(2.3)}.mfui-9-carousel .swiper-pagination-bullet-active:before{border-radius:40%}.mfui-9-carousel_nav-theme_green .swiper-pagination-bullet-active:before{background-color:var(--base)}.mfui-9-carousel_nav-theme_light .swiper-pagination-bullet-active:before{background-color:var(--brandGreen)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-9-chip-suggest{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-family:inherit;font-size:15px;font-weight:500;line-height:24px;-ms-flex-negative:0;flex-shrink:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;border-radius:8px;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--content);cursor:pointer;outline:none;overflow:hidden;padding:11px 20px;text-align:center;text-decoration:none;-webkit-transition:background-color .3s,color .3s;transition:background-color .3s,color .3s;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mfui-9-chip-suggest svg{-webkit-transition:fill .3s;transition:fill .3s;fill:var(--content)}@media screen and (max-width:767px){.mfui-9-chip-suggest{padding:7px 12px}}.mfui-9-chip-suggest:hover{background-color:var(--spbSky1)}.mfui-9-chip-suggest:active{background-color:var(--spbSky2)}.mfui-9-chip-suggest__inner{overflow:hidden;white-space:nowrap}.mfui-9-chip-suggest__icon{display:block;margin-right:6px;max-height:20px;min-width:20px;width:20px}.mfui-9-chip-suggest__icon svg{display:block;height:100%;width:100%}@media screen and (max-width:767px){.mfui-9-chip-suggest__icon{margin-right:4px}}.mfui-9-chip-suggest_theme_white{background-color:var(--base)}.mfui-9-chip-suggest_theme_gray{background-color:var(--spbSky0)}.mfui-9-chip-suggest_with-icon{padding-left:12px}@media screen and (max-width:767px){.mfui-9-chip-suggest_with-icon{padding-left:8px}}
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-chip-suggest{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-family:inherit;font-size:15px;font-weight:500;line-height:24px;-ms-flex-negative:0;flex-shrink:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;border-radius:8px;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--content);cursor:pointer;outline:none;overflow:hidden;padding:11px 20px;text-align:center;text-decoration:none;-webkit-transition:background-color .3s,color .3s;transition:background-color .3s,color .3s;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mfui-9-chip-suggest svg{-webkit-transition:fill .3s;transition:fill .3s;fill:var(--content)}@media screen and (max-width:767px){.mfui-9-chip-suggest{font-size:12px;line-height:18px;padding:7px 12px}}.mfui-9-chip-suggest:hover{background-color:var(--spbSky1)}.mfui-9-chip-suggest:active{background-color:var(--spbSky2)}.mfui-9-chip-suggest__inner{overflow:hidden;white-space:nowrap}.mfui-9-chip-suggest__icon{display:block;margin-right:6px;max-height:20px;min-width:20px;width:20px}.mfui-9-chip-suggest__icon svg{display:block;height:100%;width:100%}@media screen and (max-width:767px){.mfui-9-chip-suggest__icon{margin-right:4px}}.mfui-9-chip-suggest_theme_white{background-color:var(--base)}.mfui-9-chip-suggest_theme_gray{background-color:var(--spbSky0)}.mfui-9-chip-suggest_with-icon{padding-left:12px}@media screen and (max-width:767px){.mfui-9-chip-suggest_with-icon{padding-left:8px}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-9-modal-open-body{height:100%;overflow:hidden}.mfui-9-modal__overlay{display:-webkit-box;display:-ms-flexbox;display:flex;left:0;position:fixed;top:0;z-index:1000;-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;-webkit-box-pack:start;-ms-flex-pack:start;-webkit-animation:show-popup-overlay .3s ease-out forwards;animation:show-popup-overlay .3s ease-out forwards;-webkit-box-sizing:border-box;box-sizing:border-box;height:100%;justify-content:flex-start;opacity:0;padding:72px 0;width:100%}.mfui-9-modal__modal-content{margin:auto;position:relative}.mfui-9-modal_full-view .mfui-9-modal__overlay{display:block;padding:0}.mfui-9-modal_full-view .mfui-9-modal__modal-content{display:-webkit-box;display:-ms-flexbox;display:flex;min-height:100%;width:100%}.mfui-9-modal_bottom-view .mfui-9-modal__overlay{bottom:0;display:block;height:auto;overflow:hidden;padding-bottom:0}.mfui-9-modal_bottom-view .mfui-9-modal__modal-content{height:100%;margin:0;outline:none;overflow:hidden}.mfui-9-modal_native-scroll .mfui-9-modal__overlay{overflow-x:hidden;overflow-y:scroll}@media screen and (hover:hover){.mfui-9-modal_native-scroll .mfui-9-modal__overlay{width:calc(100% + 15px)}}.mfui-9-modal_transition-end .mfui-9-modal__overlay{-webkit-animation:hide-popup-overlay .2s ease-in;animation:hide-popup-overlay .2s ease-in}@-webkit-keyframes show-popup-overlay{0%{opacity:0}to{opacity:1}}@keyframes show-popup-overlay{0%{opacity:0}to{opacity:1}}@-webkit-keyframes hide-popup-overlay{0%{opacity:1}to{opacity:0}}@keyframes hide-popup-overlay{0%{opacity:1}to{opacity:0}}
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-modal-open-body{height:100%;overflow:hidden}.mfui-9-modal__overlay{display:-webkit-box;display:-ms-flexbox;display:flex;left:0;position:fixed;top:0;z-index:1000;-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;-webkit-box-pack:start;-ms-flex-pack:start;-webkit-animation:show-popup-overlay .3s ease-out forwards;animation:show-popup-overlay .3s ease-out forwards;-webkit-box-sizing:border-box;box-sizing:border-box;height:100%;justify-content:flex-start;opacity:0;padding:72px 0;width:100%}.mfui-9-modal__modal-content{margin:auto;position:relative}.mfui-9-modal_full-view .mfui-9-modal__overlay{display:block;padding:32px 0 0;top:32px}.mfui-9-modal_full-view .mfui-9-modal__modal-content{display:-webkit-box;display:-ms-flexbox;display:flex;min-height:100%;width:100%}.mfui-9-modal_bottom-view .mfui-9-modal__overlay{bottom:0;display:block;height:auto;overflow:hidden;padding-bottom:0}.mfui-9-modal_bottom-view .mfui-9-modal__modal-content{height:100%;margin:0;outline:none;overflow:hidden}.mfui-9-modal_native-scroll .mfui-9-modal__overlay{overflow-x:hidden;overflow-y:scroll}@media screen and (hover:hover){.mfui-9-modal_native-scroll .mfui-9-modal__overlay{width:calc(100% + 15px)}}.mfui-9-modal_transition-end .mfui-9-modal__overlay{-webkit-animation:hide-popup-overlay .2s ease-in;animation:hide-popup-overlay .2s ease-in}@-webkit-keyframes show-popup-overlay{0%{opacity:0}to{opacity:1}}@keyframes show-popup-overlay{0%{opacity:0}to{opacity:1}}@-webkit-keyframes hide-popup-overlay{0%{opacity:1}to{opacity:0}}@keyframes hide-popup-overlay{0%{opacity:1}to{opacity:0}}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { IScrollBarProps } from '../ScrollBar/ScrollBar';
|
|
3
3
|
import './Modal.scss';
|
|
4
|
-
|
|
5
|
-
FULL_SCREEN
|
|
6
|
-
BOTTOM
|
|
7
|
-
}
|
|
4
|
+
declare const ModalMobileViews: {
|
|
5
|
+
readonly FULL_SCREEN: "fullScreen";
|
|
6
|
+
readonly BOTTOM: "bottom";
|
|
7
|
+
};
|
|
8
|
+
type ModalMobileViewsType = (typeof ModalMobileViews)[keyof typeof ModalMobileViews];
|
|
8
9
|
export declare enum MODAL_TRANSITIONS_STEPS_ENUM {
|
|
9
10
|
INITIAL_STEP = "initial-step",
|
|
10
11
|
MOVE_STEP = "move-step",
|
|
@@ -47,12 +48,12 @@ export type ModalHeaderPropsType = {
|
|
|
47
48
|
headerAdditionalContent?: JSX.Element | JSX.Element[] | string | null;
|
|
48
49
|
/** Отобразить тень у шапки */
|
|
49
50
|
hasHeaderShadow?: boolean;
|
|
50
|
-
/** Отобразить кнопки с подложкой */
|
|
51
|
-
hasHeaderButtonsShadow?: boolean;
|
|
52
51
|
/** Закрепленная шапка */
|
|
53
52
|
isStickyHeader?: boolean;
|
|
54
53
|
/** Кнопки находятся вне основной шапке */
|
|
55
54
|
isOutSideHeaderButtons?: boolean;
|
|
55
|
+
/** Использовать серый фон в шапке */
|
|
56
|
+
isGrayColorHeader?: boolean;
|
|
56
57
|
/** Обработчик для стрелки назад */
|
|
57
58
|
onBackButtonClick?: () => void;
|
|
58
59
|
};
|
|
@@ -63,6 +64,8 @@ export type ModalFooterPropsType = {
|
|
|
63
64
|
isStickyFooter?: boolean;
|
|
64
65
|
/** Отобразить тень у футера */
|
|
65
66
|
hasFooterShadow?: boolean;
|
|
67
|
+
/** Использовать серый фон в футере */
|
|
68
|
+
isGrayColorFooter?: boolean;
|
|
66
69
|
};
|
|
67
70
|
export interface IModalProps {
|
|
68
71
|
/** Дополнительные классы для корневого элемента */
|
|
@@ -80,11 +83,13 @@ export interface IModalProps {
|
|
|
80
83
|
/** Настройки для футера модального окна */
|
|
81
84
|
footerProps?: ModalFooterPropsType;
|
|
82
85
|
/** Вид модального окна на разрешении 767- */
|
|
83
|
-
mobileView?:
|
|
86
|
+
mobileView?: ModalMobileViewsType;
|
|
84
87
|
/** Включить дефолтный скролл (отключает кастомный компонент скролла) */
|
|
85
88
|
isEnabledNativeScroll?: boolean;
|
|
86
89
|
/** Отключить закрытие шторки свайпом */
|
|
87
90
|
isSwipeDisabled?: boolean;
|
|
91
|
+
/** Использовать серый фон для основного контента модального окна */
|
|
92
|
+
isGrayColorModal?: boolean;
|
|
88
93
|
/** Отключить закрытие модального окна при клике на фон */
|
|
89
94
|
isDisabledBackgroundClick?: boolean;
|
|
90
95
|
/** Восстанавливает фокус на элементе, который был сфокусирован до открытия модального окна */
|
|
@@ -8,17 +8,16 @@ import THROTTLE_TIME from "../../constants/throttleTime";
|
|
|
8
8
|
import usePrevious from "../../hooks/usePrevious";
|
|
9
9
|
import useResolution from "../../hooks/useResolution";
|
|
10
10
|
import ModalDesktop from "./_ModalDesktop/ModalDesktop";
|
|
11
|
-
import
|
|
12
|
-
import ModalMobileFullScreen from "./_ModalMobileFullScreen/ModalMobileFullScreen";
|
|
11
|
+
import ModalMobile from "./_ModalMobile/ModalMobile";
|
|
13
12
|
import { changeBodyPadding, getCorrectMaxHeight } from "./utils/utils";
|
|
14
13
|
import "./Modal.css";
|
|
15
14
|
var MOBILE_BIG_START = breakpoints.MOBILE_BIG_START;
|
|
16
15
|
var HEIGHT_TRANSITION_PROPERTY = 'height';
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
16
|
+
var ModalMobileViews = {
|
|
17
|
+
FULL_SCREEN: 'fullScreen',
|
|
18
|
+
// use camelCase for simple using in props from backend
|
|
19
|
+
BOTTOM: 'bottom'
|
|
20
|
+
};
|
|
22
21
|
export var MODAL_TRANSITIONS_STEPS_ENUM;
|
|
23
22
|
(function (MODAL_TRANSITIONS_STEPS_ENUM) {
|
|
24
23
|
MODAL_TRANSITIONS_STEPS_ENUM["INITIAL_STEP"] = "initial-step";
|
|
@@ -37,9 +36,11 @@ var Modal = function Modal(_ref) {
|
|
|
37
36
|
headerProps = _ref.headerProps,
|
|
38
37
|
footerProps = _ref.footerProps,
|
|
39
38
|
_ref$mobileView = _ref.mobileView,
|
|
40
|
-
mobileView = _ref$mobileView === void 0 ?
|
|
39
|
+
mobileView = _ref$mobileView === void 0 ? ModalMobileViews.FULL_SCREEN : _ref$mobileView,
|
|
41
40
|
isEnabledNativeScroll = _ref.isEnabledNativeScroll,
|
|
42
41
|
isSwipeDisabled = _ref.isSwipeDisabled,
|
|
42
|
+
_ref$isGrayColorModal = _ref.isGrayColorModal,
|
|
43
|
+
isGrayColorModal = _ref$isGrayColorModal === void 0 ? false : _ref$isGrayColorModal,
|
|
43
44
|
isDisabledBackgroundClick = _ref.isDisabledBackgroundClick,
|
|
44
45
|
isRecalculateHeight = _ref.isRecalculateHeight,
|
|
45
46
|
_ref$hideAriaApp = _ref.hideAriaApp,
|
|
@@ -91,8 +92,8 @@ var Modal = function Modal(_ref) {
|
|
|
91
92
|
var resizeObserver = React.useRef(null);
|
|
92
93
|
var _useResolution = useResolution(),
|
|
93
94
|
isMobile = _useResolution.isMobile;
|
|
94
|
-
var isFullScreenView = mobileView ===
|
|
95
|
-
var isBottomView = mobileView ===
|
|
95
|
+
var isFullScreenView = mobileView === 'fullScreen' && isMobile;
|
|
96
|
+
var isBottomView = mobileView === 'bottom' && isMobile;
|
|
96
97
|
var isBottomTransitionIn = transitionStep !== MODAL_TRANSITIONS_STEPS_ENUM.END_STEP && transitionStep !== MODAL_TRANSITIONS_STEPS_ENUM.MOVE_END_STEP;
|
|
97
98
|
var isTransitionMoveStep = transitionStep === MODAL_TRANSITIONS_STEPS_ENUM.MOVE_STEP;
|
|
98
99
|
var isTransitionEndStep = transitionStep === MODAL_TRANSITIONS_STEPS_ENUM.END_STEP;
|
|
@@ -165,7 +166,7 @@ var Modal = function Modal(_ref) {
|
|
|
165
166
|
};
|
|
166
167
|
var handleTransitionExited = function handleTransitionExited() {
|
|
167
168
|
setTransitionStep(MODAL_TRANSITIONS_STEPS_ENUM.INITIAL_STEP);
|
|
168
|
-
isBottomView && setContainerWrapTransform('none');
|
|
169
|
+
(isBottomView || isFullScreenView) && setContainerWrapTransform('none');
|
|
169
170
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
170
171
|
};
|
|
171
172
|
var handleTransitionEnd = function handleTransitionEnd(e) {
|
|
@@ -254,8 +255,8 @@ var Modal = function Modal(_ref) {
|
|
|
254
255
|
scrollBarScrollableRef: scrollBarScrollableRef
|
|
255
256
|
},
|
|
256
257
|
isEnabledNativeScroll: isEnabledNativeScroll,
|
|
258
|
+
isGrayColorModal: isGrayColorModal,
|
|
257
259
|
isDisabledBackgroundClick: isDisabledBackgroundClick,
|
|
258
|
-
isMobile: isMobile,
|
|
259
260
|
isTransitionMoveStep: isTransitionMoveStep,
|
|
260
261
|
isTransitionEndStep: isTransitionEndStep,
|
|
261
262
|
containerWrapTransform: containerWrapTransform,
|
|
@@ -268,18 +269,15 @@ var Modal = function Modal(_ref) {
|
|
|
268
269
|
onTransitionEnd: handleTransitionEnd
|
|
269
270
|
};
|
|
270
271
|
var renderContent = function renderContent() {
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
return /*#__PURE__*/React.createElement(ModalMobileFullScreen, contextProps, children);
|
|
274
|
-
case isBottomView:
|
|
275
|
-
return /*#__PURE__*/React.createElement(ModalMobileBottom, _extends({}, contextProps, {
|
|
276
|
-
isSwipeDisabled: isSwipeDisabled,
|
|
277
|
-
onChangeTransitionStep: handleChangeTransitionStep,
|
|
278
|
-
onChangeContainerWrapTransform: handleChangeContainerWrapTransform
|
|
279
|
-
}), children);
|
|
280
|
-
default:
|
|
281
|
-
return /*#__PURE__*/React.createElement(ModalDesktop, contextProps, children);
|
|
272
|
+
if (!isMobile) {
|
|
273
|
+
return /*#__PURE__*/React.createElement(ModalDesktop, contextProps, children);
|
|
282
274
|
}
|
|
275
|
+
return /*#__PURE__*/React.createElement(ModalMobile, _extends({}, contextProps, {
|
|
276
|
+
isSwipeDisabled: isSwipeDisabled,
|
|
277
|
+
isFullView: isFullScreenView,
|
|
278
|
+
onChangeTransitionStep: handleChangeTransitionStep,
|
|
279
|
+
onChangeContainerWrapTransform: handleChangeContainerWrapTransform
|
|
280
|
+
}), children);
|
|
283
281
|
};
|
|
284
282
|
return /*#__PURE__*/React.createElement(ReactModal, {
|
|
285
283
|
className: cn('modal-content', classes === null || classes === void 0 ? void 0 : classes.modalContent),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-9-modal-content__background{background-color:rgba(0,0,0,.8);bottom:0;left:0;position:fixed;right:0;top:0}.mfui-9-modal-content__container-wrap{-webkit-animation:show-popup .3s ease-out;animation:show-popup .3s ease-out;position:relative;width:100%}@media screen and (min-width:768px){.mfui-9-modal-content__container-wrap{-webkit-transition:height .1s;transition:height .1s;width:740px}}.mfui-9-modal-content__container-inner{background-color:var(--background);font-family:inherit;width:100%}.mfui-9-modal-content__container-inner_native-scroll{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}@media screen and (min-width:768px){.mfui-9-modal-content__container-inner_native-scroll{max-height:80vh}}.mfui-9-modal-content__header{position:relative}.mfui-9-modal-content__header_shadow{-webkit-box-shadow:0 2px 12px rgba(0,0,0,.1);box-shadow:0 2px 12px rgba(0,0,0,.1)}.mfui-9-modal-content__header_native-scroll{background-color:var(--background);border-radius:12px;position:sticky;top:0}.mfui-9-modal-content__header-main{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;min-height:
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-modal-content__background{background-color:rgba(0,0,0,.8);bottom:0;left:0;position:fixed;right:0;top:0}.mfui-9-modal-content__container-wrap{-webkit-animation:show-popup .3s ease-out;animation:show-popup .3s ease-out;position:relative;width:100%}@media screen and (min-width:768px){.mfui-9-modal-content__container-wrap{-webkit-transition:height .1s;transition:height .1s;width:740px}}.mfui-9-modal-content__container-inner{background-color:var(--background);font-family:inherit;width:100%}.mfui-9-modal-content__container-inner_native-scroll{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}@media screen and (min-width:768px){.mfui-9-modal-content__container-inner_native-scroll{max-height:80vh}}.mfui-9-modal-content__header{position:relative}.mfui-9-modal-content__header_shadow{-webkit-box-shadow:0 2px 12px rgba(0,0,0,.1);box-shadow:0 2px 12px rgba(0,0,0,.1)}.mfui-9-modal-content__header_gray{background-color:var(--backgroundGray);border-top-left-radius:32px;border-top-right-radius:32px}.mfui-9-modal-content__header_native-scroll{background-color:var(--background);border-radius:12px;position:sticky;top:0}.mfui-9-modal-content__header-main{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;min-height:64px}@media screen and (min-width:768px){.mfui-9-modal-content__header-main{min-height:64px}}.mfui-9-modal-content__header-button{display:-webkit-box;display:-ms-flexbox;display:flex;position:absolute;top:12px;z-index:2;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;background:transparent;border:none;cursor:pointer;height:44px;justify-content:center;outline:none;width:44px}.mfui-9-modal-content__header-button_back{left:14px}.mfui-9-modal-content__header-button_close{right:18px}.mfui-9-modal-content__header-inner{background-color:var(--spbSky0);border-radius:12px;height:32px;position:relative;width:32px}.mfui-9-modal-content__header-inner:hover{background-color:var(--spbSky1)}.mfui-9-modal-content__header-inner:active{background-color:var(--spbSky2)}.mfui-9-modal-content__header-icon{height:32px;min-width:32px;width:32px;fill:var(--spbSky3)}.mfui-9-modal-content__title-area{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 48px;padding:12px}@media screen and (min-width:768px){.mfui-9-modal-content__title-area{margin:0 56px;padding:16px}}.mfui-9-modal-content__title{font-size:18px;font-weight:500;letter-spacing:.5px;line-height:24px;text-align:center}@media screen and (min-width:1280px){.mfui-9-modal-content__title{font-size:20px;line-height:28px}}@media screen and (min-width:768px){.mfui-9-modal-content__title{font-size:20px;font-weight:500;letter-spacing:.5px;line-height:28px}}.mfui-9-modal-content__header-additional{-webkit-box-sizing:border-box;box-sizing:border-box;padding:8px 16px;text-align:center}@media screen and (min-width:768px){.mfui-9-modal-content__header-additional{padding-left:32px;padding-right:32px}}.mfui-9-modal-content__container-body{-webkit-box-sizing:border-box;box-sizing:border-box;padding-bottom:24px;padding-right:6px}@media screen and (min-width:768px){.mfui-9-modal-content__container-body{padding-bottom:32px;padding-right:12px}}.mfui-9-modal-content__container-body_native-scroll{-webkit-box-flex:1;-ms-flex-positive:1;background-color:var(--base);border-bottom-left-radius:32px;border-top-left-radius:32px;flex-grow:1;overflow-x:hidden;overflow-y:auto}.mfui-9-modal-content__container-body_gray{background-color:var(--backgroundGray)}.mfui-9-modal-content__container-body_gray-with-footer{background-color:var(--backgroundGray);border-bottom-left-radius:32px;border-bottom-right-radius:32px}.mfui-9-modal-content__children{-webkit-box-sizing:border-box;box-sizing:border-box;padding-left:16px;padding-right:4px;padding-top:24px}@media screen and (min-width:768px){.mfui-9-modal-content__children{padding-left:32px;padding-right:14px}}.mfui-9-modal-content__container-wrap_static-header .mfui-9-modal-content__container-body{padding-top:24px}.mfui-9-modal-content__container-wrap_static-header .mfui-9-modal-content__children{overflow-x:hidden;padding-top:0}.mfui-9-modal-content__container-wrap_static-header .mfui-9-modal-content__header{margin-bottom:24px;margin-left:-16px;margin-right:-16px}@media screen and (min-width:768px){.mfui-9-modal-content__container-wrap_static-header .mfui-9-modal-content__header{margin-left:-32px;margin-right:-32px}}.mfui-9-modal-content__container-wrap_static-header .mfui-9-modal-content__header-main{min-height:40px}.mfui-9-modal-content__container-wrap_static-header .mfui-9-modal-content__header-button{top:0}.mfui-9-modal-content__container-wrap_static-header .mfui-9-modal-content__title-area{padding-bottom:4px;padding-top:4px}.mfui-9-modal-content__container-wrap_hide-header .mfui-9-modal-content__container-body{padding-top:24px}.mfui-9-modal-content__container-wrap_hide-header .mfui-9-modal-content__children{padding-top:0}.mfui-9-modal-content__container-wrap_sticky-footer .mfui-9-modal-content__container-body{padding-bottom:0}.mfui-9-modal-content__container-wrap_sticky-footer .mfui-9-modal-content__footer{padding-left:16px;padding-right:16px}@media screen and (min-width:768px){.mfui-9-modal-content__container-wrap_sticky-footer .mfui-9-modal-content__footer{padding-left:32px;padding-right:32px}}.mfui-9-modal-content__container-wrap_sticky-footer .mfui-9-modal-content__footer_native-scroll{background-color:var(--background);border-radius:12px;bottom:0;position:sticky}.mfui-9-modal-content__container-wrap_sticky-footer .mfui-9-modal-content__footer_shadow{-webkit-box-shadow:0 2px 12px rgba(0,0,0,.1);box-shadow:0 2px 12px rgba(0,0,0,.1)}.mfui-9-modal-content__container-wrap_sticky-footer .mfui-9-modal-content__footer_gray{background-color:var(--backgroundGray);border-bottom-left-radius:32px;border-bottom-right-radius:32px}.mfui-9-modal-content__container-wrap_out-side-buttons .mfui-9-modal-content__container-body{padding-top:24px}.mfui-9-modal-content__container-wrap_native-scroll .mfui-9-modal-content__children,.mfui-9-modal-content__container-wrap_native-scroll .mfui-9-modal-content__container-body{padding:0}.mfui-9-modal-content__container-wrap_transition-end{-webkit-animation:hide-popup .2s ease-in;animation:hide-popup .2s ease-in}@-webkit-keyframes show-popup{0%{-webkit-transform:scale(95%);transform:scale(95%);-webkit-transform-origin:top;transform-origin:top}to{-webkit-transform:scale(100%);transform:scale(100%)}}@keyframes show-popup{0%{-webkit-transform:scale(95%);transform:scale(95%);-webkit-transform-origin:top;transform-origin:top}to{-webkit-transform:scale(100%);transform:scale(100%)}}@-webkit-keyframes hide-popup{0%{-webkit-transform:scale(100%);transform:scale(100%)}to{-webkit-transform:scale(95%);transform:scale(95%)}}@keyframes hide-popup{0%{-webkit-transform:scale(100%);transform:scale(100%)}to{-webkit-transform:scale(95%);transform:scale(95%)}}
|
|
@@ -3,6 +3,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
5
5
|
import { CSSTransition } from 'react-transition-group';
|
|
6
|
+
import ButtonClose from "../../Buttons/ButtonClose/ButtonClose";
|
|
6
7
|
import ScrollBar from "../../ScrollBar/ScrollBar";
|
|
7
8
|
import "./ModalContent.css";
|
|
8
9
|
var ArrowLeft24 = function ArrowLeft24(props) {
|
|
@@ -12,28 +13,6 @@ var ArrowLeft24 = function ArrowLeft24(props) {
|
|
|
12
13
|
d: "M19.5 20.8L14.7 16l4.8-4.8-1.6-1.7-6.4 6.5 6.4 6.5z"
|
|
13
14
|
}));
|
|
14
15
|
};
|
|
15
|
-
var Cancel24 = function Cancel24(props) {
|
|
16
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
17
|
-
viewBox: "0 0 32 32"
|
|
18
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
19
|
-
className: "Cancel24__st0",
|
|
20
|
-
d: "M16 14.5L11.5 10 10 11.5l4.5 4.5-4.5 4.5 1.5 1.5 4.5-4.5 4.5 4.5 1.5-1.5-4.5-4.5 4.5-4.5-1.5-1.5-4.5 4.5z"
|
|
21
|
-
}));
|
|
22
|
-
};
|
|
23
|
-
var ArrowLeft32 = function ArrowLeft32(props) {
|
|
24
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
25
|
-
viewBox: "0 0 40 40"
|
|
26
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
27
|
-
d: "M24 26l-6-6 6-6-2-2-8 8 8 8z"
|
|
28
|
-
}));
|
|
29
|
-
};
|
|
30
|
-
var Cancel32 = function Cancel32(props) {
|
|
31
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
32
|
-
viewBox: "0 0 40 40"
|
|
33
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
34
|
-
d: "M20 18.586l6.364-6.364 1.414 1.414L21.414 20l6.364 6.364-1.414 1.414L20 21.414l-6.364 6.364-1.414-1.414L18.586 20l-6.364-6.364 1.414-1.414L20 18.586z"
|
|
35
|
-
}));
|
|
36
|
-
};
|
|
37
16
|
var cn = cnCreate('mfui-9-modal-content');
|
|
38
17
|
var ModalContent = function ModalContent(_ref) {
|
|
39
18
|
var classes = _ref.classes,
|
|
@@ -46,24 +25,25 @@ var ModalContent = function ModalContent(_ref) {
|
|
|
46
25
|
hideCloseButton = _ref$headerProps2.hideCloseButton,
|
|
47
26
|
headerAdditionalContent = _ref$headerProps2.headerAdditionalContent,
|
|
48
27
|
hasHeaderShadow = _ref$headerProps2.hasHeaderShadow,
|
|
49
|
-
hasHeaderButtonsShadow = _ref$headerProps2.hasHeaderButtonsShadow,
|
|
50
28
|
_ref$headerProps2$isS = _ref$headerProps2.isStickyHeader,
|
|
51
29
|
isStickyHeaderProps = _ref$headerProps2$isS === void 0 ? true : _ref$headerProps2$isS,
|
|
52
30
|
isOutSideHeaderButtons = _ref$headerProps2.isOutSideHeaderButtons,
|
|
31
|
+
isGrayColorHeader = _ref$headerProps2.isGrayColorHeader,
|
|
53
32
|
onBackButtonClick = _ref$headerProps2.onBackButtonClick,
|
|
54
33
|
_ref$footerProps = _ref.footerProps,
|
|
55
34
|
_ref$footerProps2 = _ref$footerProps === void 0 ? {} : _ref$footerProps,
|
|
56
35
|
footer = _ref$footerProps2.footer,
|
|
57
36
|
isStickyFooterProps = _ref$footerProps2.isStickyFooter,
|
|
58
37
|
hasFooterShadow = _ref$footerProps2.hasFooterShadow,
|
|
38
|
+
isGrayColorFooter = _ref$footerProps2.isGrayColorFooter,
|
|
59
39
|
_ref$refs = _ref.refs,
|
|
60
40
|
headerRef = _ref$refs.headerRef,
|
|
61
41
|
footerRef = _ref$refs.footerRef,
|
|
62
42
|
containerInnerRef = _ref$refs.containerInnerRef,
|
|
63
43
|
containerBodyRef = _ref$refs.containerBodyRef,
|
|
64
44
|
isEnabledNativeScroll = _ref.isEnabledNativeScroll,
|
|
45
|
+
isGrayColorModal = _ref.isGrayColorModal,
|
|
65
46
|
isDisabledBackgroundClick = _ref.isDisabledBackgroundClick,
|
|
66
|
-
isMobile = _ref.isMobile,
|
|
67
47
|
isTransitionMoveStep = _ref.isTransitionMoveStep,
|
|
68
48
|
isTransitionEndStep = _ref.isTransitionEndStep,
|
|
69
49
|
containerWrapTransform = _ref.containerWrapTransform,
|
|
@@ -85,38 +65,32 @@ var ModalContent = function ModalContent(_ref) {
|
|
|
85
65
|
var isStaticHeader = showHeader && !isStickyHeaderProps;
|
|
86
66
|
var isStickyFooter = !!footer && !!isStickyFooterProps;
|
|
87
67
|
var isStaticFooter = !!footer && !isStickyFooterProps;
|
|
88
|
-
var isSmallIcon = isMobile || !!hasHeaderButtonsShadow;
|
|
89
68
|
var handleChangeShadowState = React.useCallback(function (e) {
|
|
90
69
|
var scrollTop = e.nativeEvent.target.scrollTop;
|
|
91
70
|
setShowHeaderShadow(scrollTop > 0);
|
|
92
71
|
}, []);
|
|
93
72
|
var renderBackButton = /*#__PURE__*/React.createElement("button", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.headerBackButton), {
|
|
94
73
|
className: cn('header-button', {
|
|
95
|
-
back: true
|
|
96
|
-
shadow: hasHeaderButtonsShadow
|
|
74
|
+
back: true
|
|
97
75
|
}, classes === null || classes === void 0 ? void 0 : classes.headerBackButton),
|
|
98
76
|
type: "button",
|
|
99
77
|
onClick: onBackButtonClick
|
|
100
|
-
}),
|
|
101
|
-
className: cn('header-
|
|
102
|
-
}
|
|
78
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
79
|
+
className: cn('header-inner')
|
|
80
|
+
}, /*#__PURE__*/React.createElement(ArrowLeft24, {
|
|
103
81
|
className: cn('header-icon')
|
|
104
|
-
}));
|
|
105
|
-
var renderCloseButton = /*#__PURE__*/React.createElement(
|
|
82
|
+
})));
|
|
83
|
+
var renderCloseButton = /*#__PURE__*/React.createElement(ButtonClose, _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.headerCloseButton), {
|
|
106
84
|
className: cn('header-button', {
|
|
107
|
-
close: true
|
|
108
|
-
shadow: hasHeaderButtonsShadow
|
|
85
|
+
close: true
|
|
109
86
|
}, classes === null || classes === void 0 ? void 0 : classes.headerCloseButton),
|
|
110
|
-
|
|
87
|
+
size: "medium",
|
|
111
88
|
onClick: onPopupClose
|
|
112
|
-
}), isSmallIcon ? /*#__PURE__*/React.createElement(Cancel24, {
|
|
113
|
-
className: cn('header-icon')
|
|
114
|
-
}) : /*#__PURE__*/React.createElement(Cancel32, {
|
|
115
|
-
className: cn('header-icon')
|
|
116
89
|
}));
|
|
117
90
|
var renderHeader = /*#__PURE__*/React.createElement("div", {
|
|
118
91
|
className: cn('header', {
|
|
119
92
|
shadow: showHeaderShadow,
|
|
93
|
+
gray: isGrayColorHeader,
|
|
120
94
|
'native-scroll': isEnabledNativeScroll && isStickyHeader
|
|
121
95
|
}, classes === null || classes === void 0 ? void 0 : classes.header),
|
|
122
96
|
ref: headerRef
|
|
@@ -132,6 +106,7 @@ var ModalContent = function ModalContent(_ref) {
|
|
|
132
106
|
var renderFooter = /*#__PURE__*/React.createElement("div", {
|
|
133
107
|
className: cn('footer', {
|
|
134
108
|
shadow: hasFooterShadow,
|
|
109
|
+
gray: isGrayColorFooter,
|
|
135
110
|
'native-scroll': isEnabledNativeScroll && isStickyFooter
|
|
136
111
|
}, classes === null || classes === void 0 ? void 0 : classes.footer),
|
|
137
112
|
ref: footerRef
|
|
@@ -164,6 +139,8 @@ var ModalContent = function ModalContent(_ref) {
|
|
|
164
139
|
ref: containerInnerRef
|
|
165
140
|
}), isStickyHeader && renderHeader, /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.containerBody), {
|
|
166
141
|
className: cn('container-body', {
|
|
142
|
+
gray: isGrayColorModal,
|
|
143
|
+
'gray-with-footer': isGrayColorModal && !isStickyFooter,
|
|
167
144
|
'native-scroll': isEnabledNativeScroll
|
|
168
145
|
}, classes === null || classes === void 0 ? void 0 : classes.containerBody),
|
|
169
146
|
ref: containerBodyRef,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-9-modal-desktop__container-inner{border-radius:
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-modal-desktop__container-inner{border-radius:32px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-modal-mobile{width:100%}.mfui-9-modal-mobile_full-view .mfui-9-modal-mobile__container-wrap{display:block;height:calc(var(--vh) - 72px);width:100%}.mfui-9-modal-mobile_full-view .mfui-9-modal-mobile__container-inner{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%}.mfui-9-modal-mobile_full-view .mfui-9-modal-mobile__container-body{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;overflow-y:auto}.mfui-9-modal-mobile_full-view .mfui-9-modal-mobile__children{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%}.mfui-9-modal-mobile_full-view .mfui-9-modal-mobile__children-content{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.mfui-9-modal-mobile_full-view .mfui-9-modal-mobile__scroll-content,.mfui-9-modal-mobile_full-view .mfui-9-modal-mobile__scroll-init,.mfui-9-modal-mobile_full-view .mfui-9-modal-mobile__scroll-root{height:100%}.mfui-9-modal-mobile__container-wrap{bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;position:fixed;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:end;-ms-flex-pack:end;-webkit-animation:show-popup-from-bottom .3s linear;animation:show-popup-from-bottom .3s linear;height:auto;justify-content:flex-end;max-height:100%;overflow:hidden;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}.mfui-9-modal-mobile__container-wrap:before{content:"";display:block;-ms-flex-item-align:end;align-self:flex-end;background-color:var(--spbSky2);border-radius:10px;height:6px;margin:0 auto 8px;width:40px}.mfui-9-modal-mobile__container-wrap_move{-webkit-transition:none;transition:none}.mfui-9-modal-mobile__container-wrap_transition-end{-webkit-animation:hide-popup-to-bottom .2s linear forwards;animation:hide-popup-to-bottom .2s linear forwards}.mfui-9-modal-mobile__container-inner{-webkit-box-flex:0;-ms-flex-positive:0;border-top-left-radius:32px;border-top-right-radius:32px;flex-grow:0;height:auto}@-webkit-keyframes show-popup-from-bottom{0%{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes show-popup-from-bottom{0%{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes hide-popup-to-bottom{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes hide-popup-to-bottom{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { MODAL_TRANSITIONS_STEPS_ENUM } from '../Modal';
|
|
3
3
|
import type ModalContextPropsType from '../types';
|
|
4
|
-
import './
|
|
5
|
-
export interface
|
|
4
|
+
import './ModalMobile.scss';
|
|
5
|
+
export interface IModalMobileProps extends ModalContextPropsType {
|
|
6
6
|
isSwipeDisabled?: boolean;
|
|
7
|
+
isFullView?: boolean;
|
|
8
|
+
children?: React.ReactNode;
|
|
7
9
|
onChangeTransitionStep: (value: MODAL_TRANSITIONS_STEPS_ENUM) => void;
|
|
8
10
|
onChangeContainerWrapTransform: (value: string) => void;
|
|
9
|
-
children?: React.ReactNode;
|
|
10
11
|
}
|
|
11
|
-
declare const
|
|
12
|
-
export default
|
|
12
|
+
declare const ModalMobile: React.FC<IModalMobileProps>;
|
|
13
|
+
export default ModalMobile;
|
|
@@ -14,20 +14,33 @@ import * as React from 'react';
|
|
|
14
14
|
import { cnCreate } from '@megafon/ui-helpers';
|
|
15
15
|
import ModalContent from "../_ModalContent/ModalContent";
|
|
16
16
|
import { MODAL_TRANSITIONS_STEPS_ENUM } from "../Modal";
|
|
17
|
-
import "./
|
|
17
|
+
import "./ModalMobile.css";
|
|
18
18
|
var HALF_DIVIDER = 2;
|
|
19
|
-
var cn = cnCreate('mfui-9-modal-mobile
|
|
20
|
-
var
|
|
19
|
+
var cn = cnCreate('mfui-9-modal-mobile');
|
|
20
|
+
var ModalMobile = function ModalMobile(_a) {
|
|
21
21
|
var _b = _a.classes,
|
|
22
22
|
_c = _b === void 0 ? {} : _b,
|
|
23
23
|
containerWrap = _c.containerWrap,
|
|
24
24
|
containerInner = _c.containerInner,
|
|
25
|
-
|
|
25
|
+
containerBody = _c.containerBody,
|
|
26
|
+
childrenClass = _c.children,
|
|
27
|
+
childrenContent = _c.childrenContent,
|
|
28
|
+
restClasses = __rest(_c, ["containerWrap", "containerInner", "containerBody", "children", "childrenContent"]),
|
|
29
|
+
_d = _a.scrollBarParams,
|
|
30
|
+
_e = _d.classes,
|
|
31
|
+
_f = _e === void 0 ? {} : _e,
|
|
32
|
+
root = _f.root,
|
|
33
|
+
init = _f.init,
|
|
34
|
+
scrollContent = _f.scrollContent,
|
|
35
|
+
restClassesScrollBar = __rest(_f, ["root", "init", "scrollContent"]),
|
|
36
|
+
restScrollBarParams = __rest(_d, ["classes"]),
|
|
26
37
|
isSwipeDisabled = _a.isSwipeDisabled,
|
|
38
|
+
_a$isFullView = _a.isFullView,
|
|
39
|
+
isFullView = _a$isFullView === void 0 ? true : _a$isFullView,
|
|
27
40
|
children = _a.children,
|
|
28
41
|
onChangeTransitionStep = _a.onChangeTransitionStep,
|
|
29
42
|
onChangeContainerWrapTransform = _a.onChangeContainerWrapTransform,
|
|
30
|
-
restProps = __rest(_a, ["classes", "isSwipeDisabled", "children", "onChangeTransitionStep", "onChangeContainerWrapTransform"]);
|
|
43
|
+
restProps = __rest(_a, ["classes", "scrollBarParams", "isSwipeDisabled", "isFullView", "children", "onChangeTransitionStep", "onChangeContainerWrapTransform"]);
|
|
31
44
|
var _restProps$refs = restProps.refs,
|
|
32
45
|
containerWrapRef = _restProps$refs.containerWrapRef,
|
|
33
46
|
containerInnerRef = _restProps$refs.containerInnerRef,
|
|
@@ -105,15 +118,27 @@ var ModalMobileBottom = function ModalMobileBottom(_a) {
|
|
|
105
118
|
};
|
|
106
119
|
}, [handleWindowTouchEnd, handleWindowTouchMove, isSwipeDisabled]);
|
|
107
120
|
return /*#__PURE__*/React.createElement("div", {
|
|
108
|
-
className: cn(
|
|
121
|
+
className: cn({
|
|
122
|
+
'full-view': isFullView
|
|
123
|
+
})
|
|
109
124
|
}, /*#__PURE__*/React.createElement(ModalContent, _extends({}, restProps, {
|
|
110
125
|
classes: _extends(_extends({}, restClasses), {
|
|
111
126
|
containerWrap: cn('container-wrap', {
|
|
112
127
|
move: isTransitionMoveStep,
|
|
113
128
|
'transition-end': isTransitionEndStep
|
|
114
129
|
}, containerWrap),
|
|
115
|
-
containerInner: cn('container-inner', containerInner)
|
|
130
|
+
containerInner: cn('container-inner', containerInner),
|
|
131
|
+
containerBody: cn('container-body', containerBody),
|
|
132
|
+
children: cn('children', childrenClass),
|
|
133
|
+
childrenContent: cn('children-content', childrenContent)
|
|
134
|
+
}),
|
|
135
|
+
scrollBarParams: _extends(_extends({}, restScrollBarParams), {
|
|
136
|
+
classes: _extends(_extends({}, restClassesScrollBar), {
|
|
137
|
+
root: cn('scroll-root', root),
|
|
138
|
+
init: cn('scroll-init', init),
|
|
139
|
+
scrollContent: cn('scroll-content', scrollContent)
|
|
140
|
+
})
|
|
116
141
|
})
|
|
117
142
|
}), children));
|
|
118
143
|
};
|
|
119
|
-
export default
|
|
144
|
+
export default ModalMobile;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IScrollBarProps } from '../ScrollBar/ScrollBar';
|
|
2
2
|
import type { IModalProps } from './Modal';
|
|
3
|
-
type ModalComponentPropsType = Pick<IModalProps, 'classes' | 'dataAttrs' | 'headerProps' | 'footerProps' | 'isEnabledNativeScroll' | 'isDisabledBackgroundClick'>;
|
|
3
|
+
type ModalComponentPropsType = Pick<IModalProps, 'classes' | 'dataAttrs' | 'headerProps' | 'footerProps' | 'isEnabledNativeScroll' | 'isDisabledBackgroundClick' | 'isGrayColorModal'>;
|
|
4
4
|
type RefType = React.MutableRefObject<HTMLDivElement | null>;
|
|
5
5
|
type ModalContextPropsType = ModalComponentPropsType & {
|
|
6
6
|
scrollBarParams: IScrollBarProps;
|
|
@@ -13,7 +13,6 @@ type ModalContextPropsType = ModalComponentPropsType & {
|
|
|
13
13
|
containerBodyRef: RefType;
|
|
14
14
|
scrollBarScrollableRef: React.MutableRefObject<HTMLElement | null>;
|
|
15
15
|
};
|
|
16
|
-
isMobile: boolean;
|
|
17
16
|
isTransitionMoveStep: boolean;
|
|
18
17
|
isTransitionEndStep: boolean;
|
|
19
18
|
containerWrapTransform: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-9-pagination{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:12px;-webkit-box-align:center;-ms-flex-align:center;align-items:center}@media screen and (max-width:767px){.mfui-9-pagination{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:16px}}.mfui-9-pagination__input,.mfui-9-pagination__wrapper{display:-webkit-box;display:-ms-flexbox;display:flex}.mfui-9-pagination__input{gap:8px;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mfui-9-pagination__input-caption{min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.mfui-9-pagination__input-field{width:90px}
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-pagination{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:12px;position:relative;-webkit-box-align:center;-ms-flex-align:center;align-items:center}@media screen and (max-width:767px){.mfui-9-pagination{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:16px}}.mfui-9-pagination__input,.mfui-9-pagination__wrapper{display:-webkit-box;display:-ms-flexbox;display:flex}.mfui-9-pagination__input{gap:8px;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mfui-9-pagination__input-caption{min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.mfui-9-pagination__input-field{width:90px}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ThemeType, ValueType } from './types';
|
|
3
3
|
import './Pagination.scss';
|
|
4
4
|
interface IPaginationProps {
|
|
5
5
|
/** Общее количество страниц */
|
|
6
6
|
totalPages: number;
|
|
7
7
|
/** Номер текущей страницы */
|
|
8
8
|
activePage: number;
|
|
9
|
-
/** Тип компонента. DEPRECATED: 'classic' */
|
|
10
|
-
type?: PaginationTypesType;
|
|
11
9
|
/** Цветовая тема компонента */
|
|
12
10
|
theme?: ThemeType;
|
|
13
11
|
/** Отобразить поле ввода номера страницы */
|