@megafon/ui-core 5.9.2 → 5.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/dist/es/components/Badges/components/PriceBadge/PriceBadge.css +15 -0
- package/dist/es/components/Badges/components/PriceBadge/PriceBadge.d.ts +2 -0
- package/dist/es/components/Badges/components/PriceBadge/PriceBadge.js +3 -1
- package/dist/es/components/Banner/Banner.css +62 -32
- package/dist/es/components/Banner/Banner.d.ts +29 -1
- package/dist/es/components/Banner/Banner.js +94 -46
- package/dist/es/components/Banner/BannerDot.css +27 -21
- package/dist/es/components/Banner/BannerDot.d.ts +8 -1
- package/dist/es/components/Banner/BannerDot.js +20 -8
- package/dist/es/components/Button/Button.css +6 -0
- package/dist/es/components/Button/Button.d.ts +2 -0
- package/dist/es/components/Button/Button.js +4 -0
- package/dist/es/components/ContentView/ContentView.css +9 -4
- package/dist/es/components/ContentView/ContentView.d.ts +6 -0
- package/dist/es/components/ContentView/ContentView.js +5 -1
- package/dist/es/components/NavArrow/NavArrow.css +16 -0
- package/dist/es/components/NavArrow/NavArrow.d.ts +2 -1
- package/dist/es/components/NavArrow/NavArrow.js +3 -2
- package/dist/es/components/Sliders/Slider/Slider.css +4 -0
- package/dist/es/components/Sliders/Slider/Slider.js +3 -3
- package/dist/es/components/Sliders/SliderRange/SliderRange.css +4 -0
- package/dist/es/components/Sliders/SliderRatio/SliderRatio.css +4 -0
- package/dist/es/components/Sliders/SliderRatio/SliderRatio.js +19 -7
- package/dist/es/components/Sliders/components/SliderDisplayValue/SliderDisplayValue.css +1 -1
- package/dist/es/components/Snackbar/SnackbarTimer/SnackbarTimer.css +3 -0
- package/dist/es/components/Snackbar/SnackbarTimer/SnackbarTimer.js +1 -1
- package/dist/es/components/Tooltip/Tooltip.css +3 -0
- package/dist/lib/components/Badges/components/PriceBadge/PriceBadge.css +15 -0
- package/dist/lib/components/Badges/components/PriceBadge/PriceBadge.d.ts +2 -0
- package/dist/lib/components/Badges/components/PriceBadge/PriceBadge.js +3 -1
- package/dist/lib/components/Banner/Banner.css +62 -32
- package/dist/lib/components/Banner/Banner.d.ts +29 -1
- package/dist/lib/components/Banner/Banner.js +95 -45
- package/dist/lib/components/Banner/BannerDot.css +27 -21
- package/dist/lib/components/Banner/BannerDot.d.ts +8 -1
- package/dist/lib/components/Banner/BannerDot.js +23 -9
- package/dist/lib/components/Button/Button.css +6 -0
- package/dist/lib/components/Button/Button.d.ts +2 -0
- package/dist/lib/components/Button/Button.js +4 -0
- package/dist/lib/components/ContentView/ContentView.css +9 -4
- package/dist/lib/components/ContentView/ContentView.d.ts +6 -0
- package/dist/lib/components/ContentView/ContentView.js +5 -1
- package/dist/lib/components/NavArrow/NavArrow.css +16 -0
- package/dist/lib/components/NavArrow/NavArrow.d.ts +2 -1
- package/dist/lib/components/NavArrow/NavArrow.js +2 -1
- package/dist/lib/components/Sliders/Slider/Slider.css +4 -0
- package/dist/lib/components/Sliders/Slider/Slider.js +3 -3
- package/dist/lib/components/Sliders/SliderRange/SliderRange.css +4 -0
- package/dist/lib/components/Sliders/SliderRatio/SliderRatio.css +4 -0
- package/dist/lib/components/Sliders/SliderRatio/SliderRatio.js +19 -7
- package/dist/lib/components/Sliders/components/SliderDisplayValue/SliderDisplayValue.css +1 -1
- package/dist/lib/components/Snackbar/SnackbarTimer/SnackbarTimer.css +3 -0
- package/dist/lib/components/Snackbar/SnackbarTimer/SnackbarTimer.js +1 -1
- package/dist/lib/components/Tooltip/Tooltip.css +3 -0
- package/package.json +2 -2
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import "core-js/modules/es.object.values.js";
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
4
5
|
import * as PropTypes from 'prop-types';
|
|
5
6
|
import "./BannerDot.css";
|
|
7
|
+
export var BannerDotTheme = {
|
|
8
|
+
LIGHT: 'light',
|
|
9
|
+
DARK: 'dark'
|
|
10
|
+
};
|
|
6
11
|
var cn = cnCreate('mfui-banner-dot');
|
|
7
12
|
|
|
8
13
|
var BannerDot = function BannerDot(_ref) {
|
|
@@ -12,6 +17,8 @@ var BannerDot = function BannerDot(_ref) {
|
|
|
12
17
|
isActive = _ref.isActive,
|
|
13
18
|
showTimer = _ref.showTimer,
|
|
14
19
|
timerDelay = _ref.timerDelay,
|
|
20
|
+
_ref$theme = _ref.theme,
|
|
21
|
+
theme = _ref$theme === void 0 ? BannerDotTheme.LIGHT : _ref$theme,
|
|
15
22
|
onClick = _ref.onClick;
|
|
16
23
|
var handleDotClick = React.useCallback(function () {
|
|
17
24
|
onClick(index);
|
|
@@ -19,20 +26,24 @@ var BannerDot = function BannerDot(_ref) {
|
|
|
19
26
|
return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
20
27
|
className: cn({
|
|
21
28
|
active: isActive,
|
|
22
|
-
timer: showTimer
|
|
29
|
+
timer: showTimer,
|
|
30
|
+
theme: theme
|
|
23
31
|
}, className),
|
|
24
32
|
onClick: handleDotClick
|
|
25
33
|
}), showTimer && isActive && /*#__PURE__*/React.createElement("svg", _extends({
|
|
26
34
|
className: cn('timer'),
|
|
27
|
-
viewBox: "0 0
|
|
28
|
-
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.svg)), /*#__PURE__*/React.createElement("
|
|
29
|
-
className: cn('timer-
|
|
35
|
+
viewBox: "0 0 300 100"
|
|
36
|
+
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.svg)), /*#__PURE__*/React.createElement("rect", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.inner), {
|
|
37
|
+
className: cn('timer-inner'),
|
|
30
38
|
style: {
|
|
31
39
|
animationDuration: "".concat(timerDelay, "s")
|
|
32
40
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
41
|
+
x: "0",
|
|
42
|
+
y: "0",
|
|
43
|
+
width: "300",
|
|
44
|
+
height: "100",
|
|
45
|
+
rx: "50",
|
|
46
|
+
ry: "50"
|
|
36
47
|
}))));
|
|
37
48
|
};
|
|
38
49
|
|
|
@@ -41,12 +52,13 @@ BannerDot.propTypes = {
|
|
|
41
52
|
dataAttrs: PropTypes.shape({
|
|
42
53
|
root: PropTypes.objectOf(PropTypes.string.isRequired),
|
|
43
54
|
svg: PropTypes.objectOf(PropTypes.string.isRequired),
|
|
44
|
-
|
|
55
|
+
inner: PropTypes.objectOf(PropTypes.string.isRequired)
|
|
45
56
|
}),
|
|
46
57
|
index: PropTypes.number.isRequired,
|
|
47
58
|
isActive: PropTypes.bool.isRequired,
|
|
48
59
|
showTimer: PropTypes.bool.isRequired,
|
|
49
60
|
timerDelay: PropTypes.number.isRequired,
|
|
61
|
+
theme: PropTypes.oneOf(Object.values(BannerDotTheme)),
|
|
50
62
|
onClick: PropTypes.func.isRequired
|
|
51
63
|
};
|
|
52
64
|
export default BannerDot;
|
|
@@ -736,6 +736,12 @@
|
|
|
736
736
|
display: block;
|
|
737
737
|
width: 100%;
|
|
738
738
|
}
|
|
739
|
+
@media screen and (max-width: 767px) {
|
|
740
|
+
.mfui-button_full-width-mobile {
|
|
741
|
+
display: block;
|
|
742
|
+
width: 100%;
|
|
743
|
+
}
|
|
744
|
+
}
|
|
739
745
|
.mfui-button.mfui-button_type_primary.mfui-button_disabled,
|
|
740
746
|
.mfui-button.mfui-button_no-touch.mfui-button_type_primary.mfui-button_disabled,
|
|
741
747
|
.mfui-button.mfui-button_no-touch.mfui-button_type_primary.mfui-button_disabled:hover,
|
|
@@ -70,6 +70,8 @@ export interface IButtonProps {
|
|
|
70
70
|
sizeMobile?: ButtonSizesType;
|
|
71
71
|
/** Растянуть на полную ширину контейнера */
|
|
72
72
|
fullWidth?: boolean;
|
|
73
|
+
/** Растянуть на полную ширину контейнера на разрешении экрана 0-767 */
|
|
74
|
+
fullWidthMobile?: boolean;
|
|
73
75
|
/** Показать загрузку */
|
|
74
76
|
showLoader?: boolean;
|
|
75
77
|
/** Показать стелку */
|
|
@@ -78,6 +78,8 @@ var Button = function Button(_ref) {
|
|
|
78
78
|
sizeMobile = _ref.sizeMobile,
|
|
79
79
|
_ref$fullWidth = _ref.fullWidth,
|
|
80
80
|
fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth,
|
|
81
|
+
_ref$fullWidthMobile = _ref.fullWidthMobile,
|
|
82
|
+
fullWidthMobile = _ref$fullWidthMobile === void 0 ? false : _ref$fullWidthMobile,
|
|
81
83
|
_ref$showLoader = _ref.showLoader,
|
|
82
84
|
showLoader = _ref$showLoader === void 0 ? false : _ref$showLoader,
|
|
83
85
|
_ref$showArrow = _ref.showArrow,
|
|
@@ -203,6 +205,7 @@ var Button = function Button(_ref) {
|
|
|
203
205
|
'size-tablet': sizeTablet,
|
|
204
206
|
'size-mobile': sizeMobile,
|
|
205
207
|
'full-width': fullWidth,
|
|
208
|
+
'full-width-mobile': fullWidthMobile,
|
|
206
209
|
loading: showLoader,
|
|
207
210
|
'no-touch': !isTouch,
|
|
208
211
|
'content-type': contentType,
|
|
@@ -248,6 +251,7 @@ Button.propTypes = {
|
|
|
248
251
|
sizeTablet: PropTypes.oneOf(Object.values(ButtonSizes)),
|
|
249
252
|
sizeMobile: PropTypes.oneOf(Object.values(ButtonSizes)),
|
|
250
253
|
fullWidth: PropTypes.bool,
|
|
254
|
+
fullWidthMobile: PropTypes.bool,
|
|
251
255
|
showLoader: PropTypes.bool,
|
|
252
256
|
showArrow: PropTypes.bool,
|
|
253
257
|
icon: PropTypes.element,
|
|
@@ -48,9 +48,15 @@
|
|
|
48
48
|
}
|
|
49
49
|
.mfui-content-view__title {
|
|
50
50
|
font-weight: 500;
|
|
51
|
-
font-size:
|
|
52
|
-
line-height:
|
|
53
|
-
|
|
51
|
+
font-size: 18px;
|
|
52
|
+
line-height: 24px;
|
|
53
|
+
}
|
|
54
|
+
@media screen and (min-width: 768px) {
|
|
55
|
+
.mfui-content-view__title {
|
|
56
|
+
font-size: 20px;
|
|
57
|
+
line-height: 28px;
|
|
58
|
+
letter-spacing: 0.5px;
|
|
59
|
+
}
|
|
54
60
|
}
|
|
55
61
|
.mfui-content-view__text {
|
|
56
62
|
font-size: 15px;
|
|
@@ -93,6 +99,5 @@
|
|
|
93
99
|
}
|
|
94
100
|
.mfui-content-view_fullscreen .mfui-content-view__buttons {
|
|
95
101
|
margin-top: auto;
|
|
96
|
-
padding-top: 24px;
|
|
97
102
|
padding-bottom: 24px;
|
|
98
103
|
}
|
|
@@ -13,6 +13,12 @@ declare type ElementType = {
|
|
|
13
13
|
export interface IContentViewProps {
|
|
14
14
|
/** Дополнительный класс корневого элемента */
|
|
15
15
|
className?: string;
|
|
16
|
+
/** Дополнительные классы для внутренних элементов */
|
|
17
|
+
classes?: {
|
|
18
|
+
title?: string;
|
|
19
|
+
button?: string;
|
|
20
|
+
link?: string;
|
|
21
|
+
};
|
|
16
22
|
/** Заголовок */
|
|
17
23
|
title: string;
|
|
18
24
|
/** Тип встроенного изображения */
|
|
@@ -9,6 +9,8 @@ var cn = cnCreate('mfui-content-view');
|
|
|
9
9
|
|
|
10
10
|
var ContentView = function ContentView(_ref) {
|
|
11
11
|
var className = _ref.className,
|
|
12
|
+
_ref$classes = _ref.classes,
|
|
13
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
|
12
14
|
title = _ref.title,
|
|
13
15
|
type = _ref.type,
|
|
14
16
|
_ref$alt = _ref.alt,
|
|
@@ -35,12 +37,13 @@ var ContentView = function ContentView(_ref) {
|
|
|
35
37
|
src: src,
|
|
36
38
|
alt: alt
|
|
37
39
|
}), /*#__PURE__*/React.createElement("div", {
|
|
38
|
-
className: cn('title')
|
|
40
|
+
className: cn('title', [classes.title])
|
|
39
41
|
}, title), !!children && /*#__PURE__*/React.createElement("div", {
|
|
40
42
|
className: cn('text')
|
|
41
43
|
}, children)), showButtons && /*#__PURE__*/React.createElement("div", {
|
|
42
44
|
className: cn('buttons')
|
|
43
45
|
}, !!(buttonParams === null || buttonParams === void 0 ? void 0 : buttonParams.text) && /*#__PURE__*/React.createElement(Button, {
|
|
46
|
+
className: cn('button', [classes.button]),
|
|
44
47
|
href: buttonParams.href,
|
|
45
48
|
target: buttonParams.target,
|
|
46
49
|
onClick: buttonParams.onClick,
|
|
@@ -48,6 +51,7 @@ var ContentView = function ContentView(_ref) {
|
|
|
48
51
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.button
|
|
49
52
|
}
|
|
50
53
|
}, buttonParams.text), !!(linkParams === null || linkParams === void 0 ? void 0 : linkParams.text) && /*#__PURE__*/React.createElement(Button, {
|
|
54
|
+
className: cn('link', [classes.link]),
|
|
51
55
|
type: "text",
|
|
52
56
|
href: linkParams.href,
|
|
53
57
|
target: linkParams.target,
|
|
@@ -45,3 +45,19 @@
|
|
|
45
45
|
.mfui-nav-arrow_theme_dark:active {
|
|
46
46
|
background-color: var(--buttonDown);
|
|
47
47
|
}
|
|
48
|
+
.mfui-nav-arrow_theme_white {
|
|
49
|
+
background-color: var(--stcWhite);
|
|
50
|
+
-webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
|
51
|
+
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
|
52
|
+
}
|
|
53
|
+
.mfui-nav-arrow_theme_white:hover {
|
|
54
|
+
-webkit-box-shadow: 0 8px 28px 0 rgba(0, 0, 0, 0.1);
|
|
55
|
+
box-shadow: 0 8px 28px 0 rgba(0, 0, 0, 0.1);
|
|
56
|
+
}
|
|
57
|
+
.mfui-nav-arrow_theme_white:active {
|
|
58
|
+
-webkit-box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.16);
|
|
59
|
+
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.16);
|
|
60
|
+
}
|
|
61
|
+
.mfui-nav-arrow_theme_white .mfui-nav-arrow__icon {
|
|
62
|
+
fill: var(--stcBlack);
|
|
63
|
+
}
|
|
@@ -3,12 +3,13 @@ import './NavArrow.less';
|
|
|
3
3
|
export declare const Theme: {
|
|
4
4
|
readonly PURPLE: "purple";
|
|
5
5
|
readonly DARK: "dark";
|
|
6
|
+
readonly WHITE: "white";
|
|
6
7
|
};
|
|
7
8
|
export declare const View: {
|
|
8
9
|
readonly PREV: "prev";
|
|
9
10
|
readonly NEXT: "next";
|
|
10
11
|
};
|
|
11
|
-
declare type ThemeType = typeof Theme[keyof typeof Theme];
|
|
12
|
+
export declare type ThemeType = typeof Theme[keyof typeof Theme];
|
|
12
13
|
declare type ViewType = typeof View[keyof typeof View];
|
|
13
14
|
export interface INavArrowProps {
|
|
14
15
|
dataAttrs?: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import "core-js/modules/es.object.values.js";
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import "./NavArrow.css";
|
|
5
4
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
6
5
|
import * as PropTypes from 'prop-types';
|
|
6
|
+
import "./NavArrow.css";
|
|
7
7
|
|
|
8
8
|
var ArrowLeft = function ArrowLeft(props) {
|
|
9
9
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
@@ -23,7 +23,8 @@ var ArrowRight = function ArrowRight(props) {
|
|
|
23
23
|
|
|
24
24
|
export var Theme = {
|
|
25
25
|
PURPLE: 'purple',
|
|
26
|
-
DARK: 'dark'
|
|
26
|
+
DARK: 'dark',
|
|
27
|
+
WHITE: 'white'
|
|
27
28
|
};
|
|
28
29
|
export var View = {
|
|
29
30
|
PREV: 'prev',
|
|
@@ -104,6 +104,8 @@
|
|
|
104
104
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
|
|
105
105
|
-webkit-appearance: none;
|
|
106
106
|
background-color: var(--spbSky2);
|
|
107
|
+
-webkit-box-shadow: none;
|
|
108
|
+
box-shadow: none;
|
|
107
109
|
}
|
|
108
110
|
.mfui-slider_disabled .mfui-slider__range-input::-moz-range-thumb {
|
|
109
111
|
width: 24px;
|
|
@@ -114,6 +116,7 @@
|
|
|
114
116
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
|
|
115
117
|
-webkit-appearance: none;
|
|
116
118
|
background-color: var(--spbSky2);
|
|
119
|
+
box-shadow: none;
|
|
117
120
|
}
|
|
118
121
|
.mfui-slider_disabled .mfui-slider__range-input::-ms-thumb {
|
|
119
122
|
width: 24px;
|
|
@@ -124,4 +127,5 @@
|
|
|
124
127
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
|
|
125
128
|
-webkit-appearance: none;
|
|
126
129
|
background-color: var(--spbSky2);
|
|
130
|
+
box-shadow: none;
|
|
127
131
|
}
|
|
@@ -16,7 +16,7 @@ var Slider = function Slider(_ref) {
|
|
|
16
16
|
displayValueType = _ref.displayValueType,
|
|
17
17
|
displayValueUnit = _ref.displayValueUnit,
|
|
18
18
|
_ref$value = _ref.value,
|
|
19
|
-
|
|
19
|
+
outerValue = _ref$value === void 0 ? 0 : _ref$value,
|
|
20
20
|
minValue = _ref.minValue,
|
|
21
21
|
maxValue = _ref.maxValue,
|
|
22
22
|
_ref$isControlled = _ref.isControlled,
|
|
@@ -29,14 +29,14 @@ var Slider = function Slider(_ref) {
|
|
|
29
29
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
30
30
|
dataAttrs = _ref.dataAttrs,
|
|
31
31
|
onChange = _ref.onChange;
|
|
32
|
-
var
|
|
32
|
+
var outerRangeValue = getRangeValue(outerValue, minValue, maxValue, step);
|
|
33
33
|
|
|
34
34
|
var _React$useState = React.useState(null),
|
|
35
35
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
36
36
|
rawInputValue = _React$useState2[0],
|
|
37
37
|
setRawInputValue = _React$useState2[1];
|
|
38
38
|
|
|
39
|
-
var _React$useState3 = React.useState(
|
|
39
|
+
var _React$useState3 = React.useState(outerRangeValue),
|
|
40
40
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
41
41
|
innerRangeValue = _React$useState4[0],
|
|
42
42
|
setInnerRangeValue = _React$useState4[1];
|
|
@@ -129,6 +129,8 @@
|
|
|
129
129
|
-webkit-appearance: none;
|
|
130
130
|
pointer-events: auto;
|
|
131
131
|
background-color: var(--spbSky2);
|
|
132
|
+
-webkit-box-shadow: none;
|
|
133
|
+
box-shadow: none;
|
|
132
134
|
}
|
|
133
135
|
.mfui-slider-range_disabled .mfui-slider-range__range-input::-moz-range-thumb {
|
|
134
136
|
width: var(--thumbSize);
|
|
@@ -140,6 +142,7 @@
|
|
|
140
142
|
-webkit-appearance: none;
|
|
141
143
|
pointer-events: auto;
|
|
142
144
|
background-color: var(--spbSky2);
|
|
145
|
+
box-shadow: none;
|
|
143
146
|
}
|
|
144
147
|
.mfui-slider-range_disabled .mfui-slider-range__range-input::-ms-thumb {
|
|
145
148
|
width: var(--thumbSize);
|
|
@@ -151,4 +154,5 @@
|
|
|
151
154
|
-webkit-appearance: none;
|
|
152
155
|
pointer-events: auto;
|
|
153
156
|
background-color: var(--spbSky2);
|
|
157
|
+
box-shadow: none;
|
|
154
158
|
}
|
|
@@ -170,6 +170,8 @@
|
|
|
170
170
|
pointer-events: auto;
|
|
171
171
|
background-color: var(--spbSky2);
|
|
172
172
|
background-image: none;
|
|
173
|
+
-webkit-box-shadow: none;
|
|
174
|
+
box-shadow: none;
|
|
173
175
|
}
|
|
174
176
|
.mfui-slider-ratio_disabled .mfui-slider-ratio__range-input::-moz-range-thumb {
|
|
175
177
|
width: var(--thumbSize);
|
|
@@ -185,6 +187,7 @@
|
|
|
185
187
|
pointer-events: auto;
|
|
186
188
|
background-color: var(--spbSky2);
|
|
187
189
|
background-image: none;
|
|
190
|
+
box-shadow: none;
|
|
188
191
|
}
|
|
189
192
|
.mfui-slider-ratio_disabled .mfui-slider-ratio__range-input::-ms-thumb {
|
|
190
193
|
width: var(--thumbSize);
|
|
@@ -200,6 +203,7 @@
|
|
|
200
203
|
pointer-events: auto;
|
|
201
204
|
background-color: var(--spbSky2);
|
|
202
205
|
background-image: none;
|
|
206
|
+
box-shadow: none;
|
|
203
207
|
}
|
|
204
208
|
.mfui-slider-ratio_disabled .mfui-slider-ratio__range-track {
|
|
205
209
|
cursor: default;
|
|
@@ -45,10 +45,15 @@ var SliderRatio = function SliderRatio(_ref) {
|
|
|
45
45
|
|
|
46
46
|
var stepCount = values.length - 1;
|
|
47
47
|
|
|
48
|
-
var _React$useState = React.useState(
|
|
48
|
+
var _React$useState = React.useState(false),
|
|
49
49
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
isPointerUpped = _React$useState2[0],
|
|
51
|
+
setIsPointerUpped = _React$useState2[1];
|
|
52
|
+
|
|
53
|
+
var _React$useState3 = React.useState(outerIndex),
|
|
54
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
55
|
+
innerIndex = _React$useState4[0],
|
|
56
|
+
setInnerIndex = _React$useState4[1];
|
|
52
57
|
|
|
53
58
|
var _React$useReducer = React.useReducer(inputReducer, {
|
|
54
59
|
left: null,
|
|
@@ -58,10 +63,10 @@ var SliderRatio = function SliderRatio(_ref) {
|
|
|
58
63
|
rawInputValue = _React$useReducer2[0],
|
|
59
64
|
dispatchRawInputValue = _React$useReducer2[1];
|
|
60
65
|
|
|
61
|
-
var _React$
|
|
62
|
-
_React$
|
|
63
|
-
rawRangeValue = _React$
|
|
64
|
-
setRawRangeValue = _React$
|
|
66
|
+
var _React$useState5 = React.useState(null),
|
|
67
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
68
|
+
rawRangeValue = _React$useState6[0],
|
|
69
|
+
setRawRangeValue = _React$useState6[1];
|
|
65
70
|
|
|
66
71
|
var currentIndex = isControlled ? outerIndex : innerIndex;
|
|
67
72
|
var rangeValue = rawRangeValue !== null && rawRangeValue !== void 0 ? rawRangeValue : getRangeStepValue(stepCount, currentIndex);
|
|
@@ -86,11 +91,18 @@ var SliderRatio = function SliderRatio(_ref) {
|
|
|
86
91
|
};
|
|
87
92
|
|
|
88
93
|
var handleRangeInputChange = function handleRangeInputChange(e) {
|
|
94
|
+
// Cross browser fix: Firefox calls onChange after calling onPointerUp, but Chrome doesn't
|
|
95
|
+
if (isPointerUpped) {
|
|
96
|
+
setIsPointerUpped(false);
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
|
|
89
100
|
setRawRangeValue(Number(e.target.value));
|
|
90
101
|
};
|
|
91
102
|
|
|
92
103
|
var handleRangeInputPointerUp = function handleRangeInputPointerUp() {
|
|
93
104
|
var newIndex = getIndexByRangeValue(rangeValue, stepCount);
|
|
105
|
+
setIsPointerUpped(true);
|
|
94
106
|
setRawRangeValue(null);
|
|
95
107
|
!isControlled && setInnerIndex(newIndex);
|
|
96
108
|
newIndex !== currentIndex && (onChange === null || onChange === void 0 ? void 0 : onChange(newIndex));
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
max-width: 45%;
|
|
6
6
|
color: var(--content);
|
|
7
7
|
font-weight: 400;
|
|
8
|
-
background-color: var(--base);
|
|
9
8
|
}
|
|
10
9
|
.mfui-slider-display-value_interactive {
|
|
11
10
|
-webkit-box-align: center;
|
|
@@ -16,6 +15,7 @@
|
|
|
16
15
|
border: 1px solid var(--spbSky2);
|
|
17
16
|
border-radius: 12px;
|
|
18
17
|
overflow: hidden;
|
|
18
|
+
background-color: var(--base);
|
|
19
19
|
cursor: text;
|
|
20
20
|
}
|
|
21
21
|
.mfui-slider-display-value_interactive.mfui-slider-display-value:hover,
|
|
@@ -56,7 +56,7 @@ var SnackbarTimer = function SnackbarTimer(_ref) {
|
|
|
56
56
|
return /*#__PURE__*/React.createElement("div", {
|
|
57
57
|
className: cn()
|
|
58
58
|
}, isTimerType && /*#__PURE__*/React.createElement(Caption, {
|
|
59
|
-
color: "
|
|
59
|
+
color: "inherit",
|
|
60
60
|
variant: "medium",
|
|
61
61
|
hasMargin: false,
|
|
62
62
|
className: cn('timer')
|
|
@@ -180,6 +180,9 @@
|
|
|
180
180
|
.mfui-tooltip_small .mfui-tooltip__close-button {
|
|
181
181
|
top: auto;
|
|
182
182
|
}
|
|
183
|
+
.mfui-tooltip_theme_white .mfui-tooltip__content {
|
|
184
|
+
border: 1px solid var(--stcWhite10);
|
|
185
|
+
}
|
|
183
186
|
.mfui-tooltip_theme_red .mfui-tooltip__content,
|
|
184
187
|
.mfui-tooltip_theme_blue .mfui-tooltip__content,
|
|
185
188
|
.mfui-tooltip_theme_red .mfui-tooltip__arrow:before,
|
|
@@ -64,6 +64,21 @@
|
|
|
64
64
|
.mfui-price-badge_theme_red .mfui-price-badge__icon {
|
|
65
65
|
fill: var(--fury);
|
|
66
66
|
}
|
|
67
|
+
.mfui-price-badge_theme_light {
|
|
68
|
+
background-color: var(--stcWhite20);
|
|
69
|
+
}
|
|
70
|
+
.mfui-price-badge_theme_dark {
|
|
71
|
+
background-color: var(--stcBlack20);
|
|
72
|
+
}
|
|
73
|
+
.mfui-price-badge_theme_light .mfui-price-badge__text,
|
|
74
|
+
.mfui-price-badge_theme_dark .mfui-price-badge__text {
|
|
75
|
+
font-weight: 400;
|
|
76
|
+
color: var(--stcWhite);
|
|
77
|
+
}
|
|
78
|
+
.mfui-price-badge_theme_light .mfui-price-badge__icon,
|
|
79
|
+
.mfui-price-badge_theme_dark .mfui-price-badge__icon {
|
|
80
|
+
fill: var(--stcWhite);
|
|
81
|
+
}
|
|
67
82
|
.mfui-price-badge_size_big {
|
|
68
83
|
padding: 12px 12px 12px 4px;
|
|
69
84
|
font-size: 15px;
|
|
@@ -1,31 +1,19 @@
|
|
|
1
1
|
.mfui-banner {
|
|
2
2
|
position: relative;
|
|
3
|
-
overflow: hidden;
|
|
4
3
|
}
|
|
5
4
|
.mfui-banner .swiper-wrapper {
|
|
6
5
|
display: -webkit-box;
|
|
7
6
|
display: -ms-flexbox;
|
|
8
7
|
display: flex;
|
|
9
8
|
}
|
|
9
|
+
.mfui-banner__swiper {
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
}
|
|
10
12
|
.mfui-banner__slide {
|
|
11
13
|
-ms-flex-negative: 0;
|
|
12
14
|
flex-shrink: 0;
|
|
13
15
|
height: 500px;
|
|
14
16
|
}
|
|
15
|
-
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
|
16
|
-
.mfui-banner__slide {
|
|
17
|
-
height: 540px;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
@media screen and (min-width: 1024px) {
|
|
21
|
-
.mfui-banner__slide {
|
|
22
|
-
-webkit-backface-visibility: hidden;
|
|
23
|
-
backface-visibility: hidden;
|
|
24
|
-
opacity: 0;
|
|
25
|
-
-webkit-transition: opacity 0.2s;
|
|
26
|
-
transition: opacity 0.2s;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
17
|
@media screen and (min-width: 1024px) and (max-width: 1279px) {
|
|
30
18
|
.mfui-banner__slide {
|
|
31
19
|
height: 420px;
|
|
@@ -50,14 +38,24 @@
|
|
|
50
38
|
position: absolute;
|
|
51
39
|
top: 50%;
|
|
52
40
|
z-index: 10;
|
|
53
|
-
|
|
54
|
-
|
|
41
|
+
translate: 0 -50%;
|
|
42
|
+
-webkit-transition: scale 0.2s linear;
|
|
43
|
+
transition: scale 0.2s linear;
|
|
55
44
|
}
|
|
56
45
|
@media screen and (max-width: 767px) {
|
|
57
46
|
.mfui-banner__arrow {
|
|
58
47
|
display: none;
|
|
59
48
|
}
|
|
60
49
|
}
|
|
50
|
+
.mfui-banner__arrow_theme_white {
|
|
51
|
+
width: 64px;
|
|
52
|
+
height: 64px;
|
|
53
|
+
}
|
|
54
|
+
@media screen and (max-width: 1023px) {
|
|
55
|
+
.mfui-banner__arrow_theme_white {
|
|
56
|
+
display: none;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
61
59
|
.mfui-banner__arrow_prev {
|
|
62
60
|
left: 12px;
|
|
63
61
|
}
|
|
@@ -94,33 +92,44 @@
|
|
|
94
92
|
right: 20px;
|
|
95
93
|
}
|
|
96
94
|
}
|
|
95
|
+
.mfui-banner__arrow_prev.mfui-banner__arrow_theme_white {
|
|
96
|
+
left: 0;
|
|
97
|
+
translate: -50% -50%;
|
|
98
|
+
}
|
|
99
|
+
.mfui-banner__arrow_next.mfui-banner__arrow_theme_white {
|
|
100
|
+
right: 0;
|
|
101
|
+
translate: 50% -50%;
|
|
102
|
+
}
|
|
103
|
+
.mfui-banner_no-touch .mfui-banner__arrow_theme_white:hover {
|
|
104
|
+
scale: 1.25;
|
|
105
|
+
}
|
|
106
|
+
.mfui-banner_no-touch .mfui-banner__arrow_theme_white:active {
|
|
107
|
+
scale: 1.125;
|
|
108
|
+
}
|
|
97
109
|
.mfui-banner__pagination {
|
|
98
110
|
position: absolute;
|
|
99
|
-
bottom:
|
|
111
|
+
bottom: 24px;
|
|
100
112
|
left: 50%;
|
|
101
113
|
z-index: 10;
|
|
102
114
|
display: -webkit-box;
|
|
103
115
|
display: -ms-flexbox;
|
|
104
116
|
display: flex;
|
|
117
|
+
gap: 8px;
|
|
105
118
|
-webkit-box-align: center;
|
|
106
119
|
-ms-flex-align: center;
|
|
107
120
|
align-items: center;
|
|
108
121
|
-webkit-box-pack: center;
|
|
109
122
|
-ms-flex-pack: center;
|
|
110
123
|
justify-content: center;
|
|
111
|
-
padding: 6px;
|
|
124
|
+
padding: 6px 10px;
|
|
112
125
|
border-radius: 12px;
|
|
113
126
|
-webkit-transform: translateX(-50%);
|
|
114
127
|
transform: translateX(-50%);
|
|
115
128
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
background-color: var(--brandGreen);
|
|
121
|
-
}
|
|
122
|
-
.mfui-banner__pagination_theme_dark {
|
|
123
|
-
background-color: var(--stcBlack20);
|
|
129
|
+
@media screen and (min-width: 1024px) {
|
|
130
|
+
.mfui-banner__pagination {
|
|
131
|
+
bottom: 16px;
|
|
132
|
+
}
|
|
124
133
|
}
|
|
125
134
|
.mfui-banner__pagination_bottom-offset {
|
|
126
135
|
bottom: 60px;
|
|
@@ -145,10 +154,31 @@
|
|
|
145
154
|
bottom: 72px;
|
|
146
155
|
}
|
|
147
156
|
}
|
|
148
|
-
.mfui-
|
|
149
|
-
|
|
150
|
-
|
|
157
|
+
.mfui-banner__pagination_theme_light {
|
|
158
|
+
background-color: var(--stcWhite20);
|
|
159
|
+
}
|
|
160
|
+
.mfui-banner__pagination_theme_dark {
|
|
161
|
+
background-color: var(--stcBlack20);
|
|
162
|
+
}
|
|
163
|
+
.mfui-banner_radius_rounded {
|
|
164
|
+
border-radius: 24px;
|
|
165
|
+
}
|
|
166
|
+
.mfui-banner_radius_rounded .mfui-banner__swiper {
|
|
167
|
+
border-radius: 24px;
|
|
168
|
+
}
|
|
169
|
+
.mfui-banner_background-color_green {
|
|
170
|
+
background-color: var(--brandGreen);
|
|
171
|
+
}
|
|
172
|
+
.mfui-banner_background-color_purple {
|
|
173
|
+
background-color: var(--brandPurple);
|
|
174
|
+
}
|
|
175
|
+
.mfui-banner_background-color_gradient {
|
|
176
|
+
background: -webkit-gradient(linear, right top, left top, from(#ADA6BA), to(#F6F2F9));
|
|
177
|
+
background: linear-gradient(270deg, #ADA6BA 0%, #F6F2F9 100%);
|
|
178
|
+
}
|
|
179
|
+
.mfui-banner_background-color_light {
|
|
180
|
+
background-color: #F6F2F9;
|
|
151
181
|
}
|
|
152
|
-
.mfui-
|
|
153
|
-
|
|
182
|
+
.mfui-banner_background-color_spbSky0 {
|
|
183
|
+
background-color: var(--spbSky0);
|
|
154
184
|
}
|