@megafon/ui-core 4.15.6 → 4.16.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 +28 -0
- package/dist/es/colors/Colors.js +5 -5
- package/dist/es/components/Badges/components/CounterBadge/CounterBadge.css +54 -0
- package/dist/es/components/Badges/components/CounterBadge/CounterBadge.d.ts +29 -0
- package/dist/es/components/Badges/components/CounterBadge/CounterBadge.js +61 -0
- package/dist/es/components/Badges/components/PriceBadge/PriceBadge.d.ts +1 -0
- package/dist/es/components/Badges/components/PriceBadge/PriceBadge.js +25 -2
- package/dist/es/components/Badges/components/PromoBadge/PromoBadge.js +1 -1
- package/dist/es/components/Badges/components/TimerBadge/Timer/Timer.js +3 -3
- package/dist/es/components/Badges/components/TimerBadge/TimerBadge.js +3 -3
- package/dist/es/components/Banner/Banner.js +2 -2
- package/dist/es/components/Button/Button.js +3 -3
- package/dist/es/components/Calendar/Calendar.js +5 -5
- package/dist/es/components/Calendar/components/Day/Day.js +3 -3
- package/dist/es/components/Calendar/components/Month/Month.js +2 -2
- package/dist/es/components/Caption/Caption.js +1 -1
- package/dist/es/components/Carousel/Carousel.js +4 -4
- package/dist/es/components/Carousel/checkBreakpointsPropTypes.js +2 -2
- package/dist/es/components/Checkbox/Checkbox.js +1 -1
- package/dist/es/components/ContentArea/ContentArea.css +6 -0
- package/dist/es/components/ContentArea/ContentArea.d.ts +6 -0
- package/dist/es/components/ContentArea/ContentArea.js +8 -2
- package/dist/es/components/Counter/Counter.js +1 -1
- package/dist/es/components/Grid/Grid.js +2 -2
- package/dist/es/components/Logo/Logo.js +1 -1
- package/dist/es/components/NavArrow/NavArrow.js +1 -1
- package/dist/es/components/Notification/Notification.js +3 -3
- package/dist/es/components/Pagination/components/PaginationButtons/PaginationButtons.js +1 -1
- package/dist/es/components/Pagination/usePagination.js +1 -1
- package/dist/es/components/Paragraph/Paragraph.js +1 -1
- package/dist/es/components/Preloader/Preloader.js +2 -2
- package/dist/es/components/RadioButton/RadioButton.js +3 -3
- package/dist/es/components/Search/Search.js +7 -7
- package/dist/es/components/Select/Select.js +14 -14
- package/dist/es/components/Select/reducer/selectReducer.js +1 -1
- package/dist/es/components/Tabs/Tabs.css +0 -4
- package/dist/es/components/Tabs/Tabs.js +7 -7
- package/dist/es/components/TextField/TextField.js +6 -6
- package/dist/es/components/TextField/utils/countGraphemes.js +7 -7
- package/dist/es/components/Tile/Tile.js +1 -1
- package/dist/es/components/Tooltip/Tooltip.js +3 -3
- package/dist/es/index.d.ts +1 -0
- package/dist/es/index.js +1 -0
- package/dist/lib/colors/ColorItem/ColorItem.js +2 -2
- package/dist/lib/colors/Colors.js +9 -9
- package/dist/lib/components/Accordion/Accordion.js +2 -2
- package/dist/lib/components/Badges/components/CounterBadge/CounterBadge.css +54 -0
- package/dist/lib/components/Badges/components/CounterBadge/CounterBadge.d.ts +29 -0
- package/dist/lib/components/Badges/components/CounterBadge/CounterBadge.js +81 -0
- package/dist/lib/components/Badges/components/PriceBadge/PriceBadge.d.ts +1 -0
- package/dist/lib/components/Badges/components/PriceBadge/PriceBadge.js +28 -5
- package/dist/lib/components/Badges/components/PromoBadge/PromoBadge.js +4 -4
- package/dist/lib/components/Badges/components/TimerBadge/Timer/Timer.js +6 -6
- package/dist/lib/components/Badges/components/TimerBadge/TimerBadge.js +7 -7
- package/dist/lib/components/Banner/Banner.js +6 -6
- package/dist/lib/components/Banner/BannerDot.js +2 -2
- package/dist/lib/components/Button/Button.js +8 -8
- package/dist/lib/components/Calendar/Calendar.js +10 -10
- package/dist/lib/components/Calendar/components/Day/Day.js +4 -4
- package/dist/lib/components/Calendar/components/Month/Month.js +3 -3
- package/dist/lib/components/Caption/Caption.js +4 -4
- package/dist/lib/components/Carousel/Carousel.js +10 -10
- package/dist/lib/components/Carousel/checkBreakpointsPropTypes.js +5 -5
- package/dist/lib/components/Checkbox/Checkbox.js +4 -4
- package/dist/lib/components/Collapse/Collapse.js +2 -2
- package/dist/lib/components/ContentArea/ContentArea.css +6 -0
- package/dist/lib/components/ContentArea/ContentArea.d.ts +6 -0
- package/dist/lib/components/ContentArea/ContentArea.js +11 -5
- package/dist/lib/components/Counter/Counter.js +4 -4
- package/dist/lib/components/Grid/Grid.js +5 -5
- package/dist/lib/components/Grid/GridColumn.js +2 -2
- package/dist/lib/components/Header/Header.js +2 -2
- package/dist/lib/components/List/List.js +2 -2
- package/dist/lib/components/List/ListItem.js +2 -2
- package/dist/lib/components/Logo/Logo.js +4 -4
- package/dist/lib/components/NavArrow/NavArrow.js +4 -4
- package/dist/lib/components/Notification/Notification.js +7 -7
- package/dist/lib/components/Pagination/Pagination.js +2 -2
- package/dist/lib/components/Pagination/components/PaginationButtons/PaginationButtons.js +2 -2
- package/dist/lib/components/Pagination/usePagination.js +2 -2
- package/dist/lib/components/Paragraph/Paragraph.js +4 -4
- package/dist/lib/components/Preloader/Preloader.js +6 -6
- package/dist/lib/components/RadioButton/RadioButton.js +7 -7
- package/dist/lib/components/Search/Search.js +11 -11
- package/dist/lib/components/Select/Select.js +18 -18
- package/dist/lib/components/Select/reducer/selectReducer.js +2 -2
- package/dist/lib/components/Switcher/Switcher.js +2 -2
- package/dist/lib/components/Tabs/Tab.js +2 -2
- package/dist/lib/components/Tabs/Tabs.css +0 -4
- package/dist/lib/components/Tabs/Tabs.js +12 -12
- package/dist/lib/components/TextField/TextField.js +10 -10
- package/dist/lib/components/TextField/utils/countGraphemes.js +7 -7
- package/dist/lib/components/TextLink/TextLink.js +2 -2
- package/dist/lib/components/Tile/Tile.js +2 -2
- package/dist/lib/components/Tooltip/Tooltip.js +7 -7
- package/dist/lib/hooks/usePrevious.js +2 -2
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.js +8 -0
- package/package.json +4 -4
- package/styles/base.less +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,34 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [4.16.1](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.16.0...@megafon/ui-core@4.16.1) (2023-05-23)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **counterbadge:** fix required props ([6824153](https://github.com/MegafonWebLab/megafon-ui/commit/6824153b4f2543eb3961cd408c447c8bcb9cd83d))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [4.16.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.15.6...@megafon/ui-core@4.16.0) (2023-05-17)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **contentarea:** new prop indents ([4e161ed](https://github.com/MegafonWebLab/megafon-ui/commit/4e161ed9fb7705709410e482d2a237f5d527e7fe))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* **badges:** add counter badge ([de83e09](https://github.com/MegafonWebLab/megafon-ui/commit/de83e093928c1b6c3947ba06d5035dbf017e6356))
|
|
28
|
+
* **badges:** add new PriceBadge icon type - info ([49dfcbb](https://github.com/MegafonWebLab/megafon-ui/commit/49dfcbbb0f299522d75c044282b9625bbc130af2))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
6
34
|
## [4.15.6](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.15.5...@megafon/ui-core@4.15.6) (2023-05-02)
|
|
7
35
|
|
|
8
36
|
|
package/dist/es/colors/Colors.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "core-js/modules/es.symbol";
|
|
2
|
-
import "core-js/modules/es.symbol.description";
|
|
3
|
-
import "core-js/modules/es.array.includes";
|
|
4
|
-
import "core-js/modules/es.array.map";
|
|
5
|
-
import "core-js/modules/es.function.name";
|
|
6
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
7
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "core-js/modules/es.array.includes.js";
|
|
4
|
+
import "core-js/modules/es.array.map.js";
|
|
5
|
+
import "core-js/modules/es.symbol.js";
|
|
6
|
+
import "core-js/modules/es.symbol.description.js";
|
|
7
|
+
import "core-js/modules/es.function.name.js";
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import { cnCreate } from '@megafon/ui-helpers';
|
|
10
10
|
import Grid from "../components/Grid/Grid";
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
.mfui-counter-badge {
|
|
2
|
+
padding: 5px 6px;
|
|
3
|
+
width: -webkit-fit-content;
|
|
4
|
+
width: -moz-fit-content;
|
|
5
|
+
width: fit-content;
|
|
6
|
+
min-width: 24px;
|
|
7
|
+
display: -webkit-box;
|
|
8
|
+
display: -ms-flexbox;
|
|
9
|
+
display: flex;
|
|
10
|
+
-webkit-box-align: center;
|
|
11
|
+
-ms-flex-align: center;
|
|
12
|
+
align-items: center;
|
|
13
|
+
-webkit-box-pack: center;
|
|
14
|
+
-ms-flex-pack: center;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
font-weight: 500;
|
|
17
|
+
font-size: 12px;
|
|
18
|
+
line-height: 14px;
|
|
19
|
+
border-radius: 12px;
|
|
20
|
+
}
|
|
21
|
+
.mfui-counter-badge_limited {
|
|
22
|
+
padding: 5px 12px;
|
|
23
|
+
}
|
|
24
|
+
@media screen and (min-width: 1024px) {
|
|
25
|
+
.mfui-counter-badge_adaptive {
|
|
26
|
+
min-width: 28px;
|
|
27
|
+
font-size: 15px;
|
|
28
|
+
line-height: 18px;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
.mfui-counter-badge_icon {
|
|
32
|
+
padding: 2px 4px 2px 12px;
|
|
33
|
+
}
|
|
34
|
+
.mfui-counter-badge_adaptive.mfui-counter-badge_icon {
|
|
35
|
+
padding: 4px 4px 4px 12px;
|
|
36
|
+
}
|
|
37
|
+
.mfui-counter-badge__icon {
|
|
38
|
+
margin-left: 4px;
|
|
39
|
+
width: 20px;
|
|
40
|
+
min-width: 20px;
|
|
41
|
+
height: 20px;
|
|
42
|
+
}
|
|
43
|
+
.mfui-counter-badge_theme_light-blue {
|
|
44
|
+
background-color: var(--311C20);
|
|
45
|
+
}
|
|
46
|
+
.mfui-counter-badge_theme_light-blue .mfui-counter-badge__icon {
|
|
47
|
+
fill: var(--311C);
|
|
48
|
+
}
|
|
49
|
+
.mfui-counter-badge_theme_purple {
|
|
50
|
+
background-color: var(--brandPurple20);
|
|
51
|
+
}
|
|
52
|
+
.mfui-counter-badge_theme_purple .mfui-counter-badge__icon {
|
|
53
|
+
fill: var(--brandPurple);
|
|
54
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import './CounterBadge.less';
|
|
3
|
+
export declare const CounterBadgeColorTheme: {
|
|
4
|
+
readonly LIGHT_BLUE: "light-blue";
|
|
5
|
+
readonly PURPLE: "purple";
|
|
6
|
+
};
|
|
7
|
+
declare type CounterBadgeColorThemeType = typeof CounterBadgeColorTheme[keyof typeof CounterBadgeColorTheme];
|
|
8
|
+
export interface ICounterBadgeProps {
|
|
9
|
+
/** Текущее значение */
|
|
10
|
+
currentValue: number;
|
|
11
|
+
/** Максимальное значение */
|
|
12
|
+
totalCount?: number;
|
|
13
|
+
/** Наличие иконки */
|
|
14
|
+
hasIcon?: boolean;
|
|
15
|
+
/** Кастомная иконка */
|
|
16
|
+
customIcon?: JSX.Element;
|
|
17
|
+
/** Цветовая тема */
|
|
18
|
+
colorTheme?: CounterBadgeColorThemeType;
|
|
19
|
+
/** Адаптивный режим */
|
|
20
|
+
isAdaptive?: boolean;
|
|
21
|
+
/** Дополнительный класс корневого элемента */
|
|
22
|
+
className?: string;
|
|
23
|
+
/** Дополнительные data-атрибуты к внутренним элементам */
|
|
24
|
+
dataAttrs?: {
|
|
25
|
+
root?: Record<string, string>;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
declare const CounterBadge: React.FC<ICounterBadgeProps>;
|
|
29
|
+
export default CounterBadge;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import "core-js/modules/es.object.values.js";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
5
|
+
import * as PropTypes from 'prop-types';
|
|
6
|
+
import "./CounterBadge.css";
|
|
7
|
+
|
|
8
|
+
var DefaultIcon = function DefaultIcon(props) {
|
|
9
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
10
|
+
viewBox: "0 0 20 20"
|
|
11
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
12
|
+
d: "M11.39 9H16v1l-7.5 8H7l1.61-7H4v-1l7.5-8H13z",
|
|
13
|
+
fillRule: "evenodd"
|
|
14
|
+
}));
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export var CounterBadgeColorTheme = {
|
|
18
|
+
LIGHT_BLUE: 'light-blue',
|
|
19
|
+
PURPLE: 'purple'
|
|
20
|
+
};
|
|
21
|
+
var cn = cnCreate('mfui-counter-badge');
|
|
22
|
+
|
|
23
|
+
var CounterBadge = function CounterBadge(_ref) {
|
|
24
|
+
var totalCount = _ref.totalCount,
|
|
25
|
+
currentValue = _ref.currentValue,
|
|
26
|
+
_ref$hasIcon = _ref.hasIcon,
|
|
27
|
+
hasIcon = _ref$hasIcon === void 0 ? false : _ref$hasIcon,
|
|
28
|
+
customIcon = _ref.customIcon,
|
|
29
|
+
_ref$colorTheme = _ref.colorTheme,
|
|
30
|
+
colorTheme = _ref$colorTheme === void 0 ? 'light-blue' : _ref$colorTheme,
|
|
31
|
+
_ref$isAdaptive = _ref.isAdaptive,
|
|
32
|
+
isAdaptive = _ref$isAdaptive === void 0 ? false : _ref$isAdaptive,
|
|
33
|
+
className = _ref.className,
|
|
34
|
+
dataAttrs = _ref.dataAttrs;
|
|
35
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
36
|
+
className: cn({
|
|
37
|
+
limited: !!totalCount,
|
|
38
|
+
adaptive: isAdaptive,
|
|
39
|
+
theme: colorTheme,
|
|
40
|
+
icon: hasIcon
|
|
41
|
+
}, className)
|
|
42
|
+
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), /*#__PURE__*/React.createElement("span", {
|
|
43
|
+
className: cn('value')
|
|
44
|
+
}, currentValue, !!totalCount && "/".concat(totalCount)), hasIcon && /*#__PURE__*/React.createElement("div", {
|
|
45
|
+
className: cn('icon')
|
|
46
|
+
}, customIcon || /*#__PURE__*/React.createElement(DefaultIcon, null)));
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
CounterBadge.propTypes = {
|
|
50
|
+
totalCount: PropTypes.number,
|
|
51
|
+
currentValue: PropTypes.number.isRequired,
|
|
52
|
+
customIcon: PropTypes.element,
|
|
53
|
+
colorTheme: PropTypes.oneOf(Object.values(CounterBadgeColorTheme)),
|
|
54
|
+
hasIcon: PropTypes.bool,
|
|
55
|
+
isAdaptive: PropTypes.bool,
|
|
56
|
+
className: PropTypes.string,
|
|
57
|
+
dataAttrs: PropTypes.shape({
|
|
58
|
+
root: PropTypes.objectOf(PropTypes.string.isRequired).isRequired
|
|
59
|
+
})
|
|
60
|
+
};
|
|
61
|
+
export default CounterBadge;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "core-js/modules/es.object.values";
|
|
2
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import "core-js/modules/es.object.values.js";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
5
5
|
import * as PropTypes from 'prop-types';
|
|
@@ -23,6 +23,14 @@ var CheckIcon = function CheckIcon(props) {
|
|
|
23
23
|
}));
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
+
var InfoIcon = function InfoIcon(props) {
|
|
27
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
28
|
+
viewBox: "0 0 20 20"
|
|
29
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
30
|
+
d: "M10 2c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8zm0 5c.6 0 1-.4 1-1s-.4-1-1-1-1 .4-1 1 .4 1 1 1zm1 8V9H9v6h2z"
|
|
31
|
+
}));
|
|
32
|
+
};
|
|
33
|
+
|
|
26
34
|
var PriceIcon = function PriceIcon(props) {
|
|
27
35
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
28
36
|
viewBox: "0 0 20 20"
|
|
@@ -61,6 +69,14 @@ var CheckIconBig = function CheckIconBig(props) {
|
|
|
61
69
|
}));
|
|
62
70
|
};
|
|
63
71
|
|
|
72
|
+
var InfoIconBig = function InfoIconBig(props) {
|
|
73
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
74
|
+
viewBox: "0 0 32 32"
|
|
75
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
76
|
+
d: "M16 4C9.4 4 4 9.4 4 16s5.4 12 12 12 12-5.4 12-12S22.6 4 16 4zm1 18h-2v-8h2v8zm0-10h-2v-2h2v2z"
|
|
77
|
+
}));
|
|
78
|
+
};
|
|
79
|
+
|
|
64
80
|
var PriceIconBig = function PriceIconBig(props) {
|
|
65
81
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
66
82
|
viewBox: "0 0 32 32"
|
|
@@ -91,7 +107,8 @@ export var PriceBadgeIcon = {
|
|
|
91
107
|
TIMER: 'timer',
|
|
92
108
|
PRICE: 'price',
|
|
93
109
|
CHECK: 'check',
|
|
94
|
-
ATTENTION: 'attention'
|
|
110
|
+
ATTENTION: 'attention',
|
|
111
|
+
INFO: 'info'
|
|
95
112
|
};
|
|
96
113
|
export var PriseBadgeSize = {
|
|
97
114
|
SMALL: 'small',
|
|
@@ -114,6 +131,9 @@ var getPriceBadgeIcon = function getPriceBadgeIcon(iconType, size) {
|
|
|
114
131
|
case iconType === PriceBadgeIcon.ATTENTION && isBigIcon:
|
|
115
132
|
return AttentionIconBig;
|
|
116
133
|
|
|
134
|
+
case iconType === PriceBadgeIcon.INFO && isBigIcon:
|
|
135
|
+
return InfoIconBig;
|
|
136
|
+
|
|
117
137
|
case iconType === PriceBadgeIcon.PRICE:
|
|
118
138
|
return PriceIcon;
|
|
119
139
|
|
|
@@ -123,6 +143,9 @@ var getPriceBadgeIcon = function getPriceBadgeIcon(iconType, size) {
|
|
|
123
143
|
case iconType === PriceBadgeIcon.ATTENTION:
|
|
124
144
|
return AttentionIcon;
|
|
125
145
|
|
|
146
|
+
case iconType === PriceBadgeIcon.INFO:
|
|
147
|
+
return InfoIcon;
|
|
148
|
+
|
|
126
149
|
default:
|
|
127
150
|
return TimerIcon;
|
|
128
151
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "core-js/modules/es.object.values";
|
|
2
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import "core-js/modules/es.object.values.js";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
5
5
|
import * as PropTypes from 'prop-types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "core-js/modules/es.array.concat";
|
|
2
|
-
import "core-js/modules/es.date.to-string";
|
|
3
|
-
import "core-js/modules/es.math.trunc";
|
|
4
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import "core-js/modules/es.math.trunc.js";
|
|
3
|
+
import "core-js/modules/es.array.concat.js";
|
|
4
|
+
import "core-js/modules/es.date.to-string.js";
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
7
7
|
import format from 'date-fns/format';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "core-js/modules/es.date.now";
|
|
2
|
-
import "core-js/modules/es.date.to-string";
|
|
3
|
-
import "core-js/modules/web.timers";
|
|
4
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
5
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "core-js/modules/es.date.now.js";
|
|
4
|
+
import "core-js/modules/es.date.to-string.js";
|
|
5
|
+
import "core-js/modules/web.timers.js";
|
|
6
6
|
import React, { useEffect, useState } from 'react';
|
|
7
7
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
8
8
|
import * as PropTypes from 'prop-types';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "core-js/modules/es.array.map";
|
|
2
|
-
import "core-js/modules/es.object.values";
|
|
3
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
4
2
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
5
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
|
+
import "core-js/modules/es.array.map.js";
|
|
5
|
+
import "core-js/modules/es.object.values.js";
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
8
8
|
import * as PropTypes from 'prop-types';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "core-js/modules/es.array.concat";
|
|
2
|
-
import "core-js/modules/es.array.is-array";
|
|
3
|
-
import "core-js/modules/es.object.values";
|
|
4
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
5
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
6
3
|
import _extends from "@babel/runtime/helpers/extends";
|
|
4
|
+
import "core-js/modules/es.array.is-array.js";
|
|
5
|
+
import "core-js/modules/es.array.concat.js";
|
|
6
|
+
import "core-js/modules/es.object.values.js";
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { cnCreate, detectTouch, filterDataAttrs } from '@megafon/ui-helpers';
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "core-js/modules/es.symbol";
|
|
2
|
-
import "core-js/modules/es.array.concat";
|
|
3
|
-
import "core-js/modules/es.array.index-of";
|
|
4
|
-
import "core-js/modules/es.array.map";
|
|
5
|
-
import "core-js/modules/es.date.to-string";
|
|
6
1
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
7
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
8
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
|
+
import "core-js/modules/es.array.index-of.js";
|
|
5
|
+
import "core-js/modules/es.symbol.js";
|
|
6
|
+
import "core-js/modules/es.array.map.js";
|
|
7
|
+
import "core-js/modules/es.date.to-string.js";
|
|
8
|
+
import "core-js/modules/es.array.concat.js";
|
|
9
9
|
|
|
10
10
|
var __rest = this && this.__rest || function (s, e) {
|
|
11
11
|
var t = {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "core-js/modules/es.symbol";
|
|
2
|
-
import "core-js/modules/es.array.index-of";
|
|
3
|
-
import "core-js/modules/es.date.to-string";
|
|
4
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import "core-js/modules/es.array.index-of.js";
|
|
3
|
+
import "core-js/modules/es.symbol.js";
|
|
4
|
+
import "core-js/modules/es.date.to-string.js";
|
|
5
5
|
|
|
6
6
|
var __rest = this && this.__rest || function (s, e) {
|
|
7
7
|
var t = {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "core-js/modules/es.array.concat";
|
|
2
|
-
import "core-js/modules/es.array.map";
|
|
3
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
4
|
import React from 'react';
|
|
5
5
|
import { checkEventIsClickOrEnterPress, cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
6
6
|
import "./Month.css";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "core-js/modules/es.object.values";
|
|
2
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import "core-js/modules/es.object.values.js";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
5
5
|
import * as PropTypes from 'prop-types';
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import "core-js/modules/es.array.index-of";
|
|
2
|
-
import "core-js/modules/es.array.is-array";
|
|
3
|
-
import "core-js/modules/es.array.map";
|
|
4
|
-
import "core-js/modules/es.object.values";
|
|
5
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
6
2
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
7
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
@@ -9,6 +5,10 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
9
5
|
|
|
10
6
|
var _defaultSlidesSetting;
|
|
11
7
|
|
|
8
|
+
import "core-js/modules/es.array.is-array.js";
|
|
9
|
+
import "core-js/modules/es.array.index-of.js";
|
|
10
|
+
import "core-js/modules/es.array.map.js";
|
|
11
|
+
import "core-js/modules/es.object.values.js";
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import { breakpoints, cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
14
14
|
import throttle from 'lodash.throttle';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "core-js/modules/es.array.concat";
|
|
2
|
-
import "core-js/modules/es.number.constructor";
|
|
3
1
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
|
+
import "core-js/modules/es.number.constructor.js";
|
|
3
|
+
import "core-js/modules/es.array.concat.js";
|
|
4
4
|
import * as PropTypes from 'prop-types';
|
|
5
5
|
|
|
6
6
|
var checkBreakpointsPropTypes = function checkBreakpointsPropTypes(settingsPropTypes) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "core-js/modules/es.function.name";
|
|
2
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "core-js/modules/es.function.name.js";
|
|
4
4
|
import React, { useState, useEffect } from 'react';
|
|
5
5
|
import { checkEventIsClickOrEnterPress, cnCreate, detectTouch, filterDataAttrs } from '@megafon/ui-helpers';
|
|
6
6
|
import * as PropTypes from 'prop-types';
|
|
@@ -77,6 +77,12 @@ h5 {
|
|
|
77
77
|
padding-right: 0;
|
|
78
78
|
padding-left: 0;
|
|
79
79
|
}
|
|
80
|
+
@media screen and (max-width: 359px) {
|
|
81
|
+
.mfui-content-area__inner_indents_small-mobile {
|
|
82
|
+
padding-right: 8px;
|
|
83
|
+
padding-left: 8px;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
80
86
|
.mfui-content-area__inner_background-color_transparent {
|
|
81
87
|
background-color: transparent;
|
|
82
88
|
}
|
|
@@ -17,7 +17,11 @@ declare const DisableIndents: {
|
|
|
17
17
|
readonly TABLET_DESKTOP: "tablet-desktop";
|
|
18
18
|
readonly ALL: "all";
|
|
19
19
|
};
|
|
20
|
+
declare const Indents: {
|
|
21
|
+
readonly SMALL_MOBILE: "small-mobile";
|
|
22
|
+
};
|
|
20
23
|
declare type DisableIndentsType = typeof DisableIndents[keyof typeof DisableIndents];
|
|
24
|
+
declare type IndentsType = typeof Indents[keyof typeof Indents];
|
|
21
25
|
export interface IConrentAreaProps {
|
|
22
26
|
/** Фоновый цвет внешнего контейнера */
|
|
23
27
|
outerBackgroundColor?: BackgroundColorType;
|
|
@@ -25,6 +29,8 @@ export interface IConrentAreaProps {
|
|
|
25
29
|
innerBackgroundColor?: BackgroundColorType;
|
|
26
30
|
/** Отключение отступов на различных разрешениях */
|
|
27
31
|
disableIndents?: DisableIndentsType;
|
|
32
|
+
/** Изменение отступов на различных разрешениях */
|
|
33
|
+
indents?: IndentsType;
|
|
28
34
|
/** Дополнительные классы для корневого элемента */
|
|
29
35
|
className?: string;
|
|
30
36
|
/** Дополнительные классы для корневого и внутренних элементов */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "core-js/modules/es.object.values";
|
|
2
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import "core-js/modules/es.object.values.js";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
5
5
|
import * as PropTypes from 'prop-types';
|
|
@@ -20,6 +20,9 @@ var DisableIndents = {
|
|
|
20
20
|
TABLET_DESKTOP: 'tablet-desktop',
|
|
21
21
|
ALL: 'all'
|
|
22
22
|
};
|
|
23
|
+
var Indents = {
|
|
24
|
+
SMALL_MOBILE: 'small-mobile'
|
|
25
|
+
};
|
|
23
26
|
var cn = cnCreate('mfui-content-area');
|
|
24
27
|
|
|
25
28
|
var ContentArea = function ContentArea(_ref) {
|
|
@@ -28,6 +31,7 @@ var ContentArea = function ContentArea(_ref) {
|
|
|
28
31
|
_ref$innerBackgroundC = _ref.innerBackgroundColor,
|
|
29
32
|
innerBackgroundColor = _ref$innerBackgroundC === void 0 ? 'transparent' : _ref$innerBackgroundC,
|
|
30
33
|
disableIndents = _ref.disableIndents,
|
|
34
|
+
indents = _ref.indents,
|
|
31
35
|
children = _ref.children,
|
|
32
36
|
className = _ref.className,
|
|
33
37
|
classes = _ref.classes,
|
|
@@ -39,13 +43,15 @@ var ContentArea = function ContentArea(_ref) {
|
|
|
39
43
|
}), /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.inner), {
|
|
40
44
|
className: cn('inner', {
|
|
41
45
|
'disable-indents': disableIndents,
|
|
42
|
-
'background-color': innerBackgroundColor
|
|
46
|
+
'background-color': innerBackgroundColor,
|
|
47
|
+
indents: indents
|
|
43
48
|
}, classes === null || classes === void 0 ? void 0 : classes.inner)
|
|
44
49
|
}), children));
|
|
45
50
|
};
|
|
46
51
|
|
|
47
52
|
ContentArea.propTypes = {
|
|
48
53
|
disableIndents: PropTypes.oneOf(Object.values(DisableIndents)),
|
|
54
|
+
indents: PropTypes.oneOf(Object.values(Indents)),
|
|
49
55
|
className: PropTypes.string,
|
|
50
56
|
classes: PropTypes.shape({
|
|
51
57
|
root: PropTypes.string,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "core-js/modules/es.number.constructor";
|
|
2
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "core-js/modules/es.number.constructor.js";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
6
6
|
import * as PropTypes from 'prop-types';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "core-js/modules/es.array.map";
|
|
2
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import "core-js/modules/es.array.map.js";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
5
5
|
import * as PropTypes from 'prop-types';
|
|
@@ -27,7 +27,7 @@ var Grid = function Grid(_ref) {
|
|
|
27
27
|
'gutters-bottom': guttersBottom
|
|
28
28
|
})
|
|
29
29
|
}), React.Children.map(children, function (child) {
|
|
30
|
-
return React.cloneElement(child, {
|
|
30
|
+
return /*#__PURE__*/React.cloneElement(child, {
|
|
31
31
|
className: cn('column', {
|
|
32
32
|
'gutter-left': guttersLeft,
|
|
33
33
|
'gutter-bottom': guttersBottom
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "core-js/modules/es.array.concat";
|
|
2
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import "core-js/modules/es.array.concat.js";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { cnCreate } from '@megafon/ui-helpers';
|
|
5
5
|
import * as PropTypes from 'prop-types';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "core-js/modules/es.object.values";
|
|
2
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import "core-js/modules/es.object.values.js";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import "./NavArrow.css";
|
|
5
5
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "core-js/modules/es.object.values";
|
|
2
|
-
import "core-js/modules/es.string.link";
|
|
3
|
-
import "core-js/modules/web.timers";
|
|
4
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
5
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "core-js/modules/web.timers.js";
|
|
4
|
+
import "core-js/modules/es.string.link.js";
|
|
5
|
+
import "core-js/modules/es.object.values.js";
|
|
6
6
|
import React, { useEffect, useRef, useState } from 'react';
|
|
7
7
|
import { cnCreate, filterDataAttrs, convert, titleConvertConfig, textConvertConfig } from '@megafon/ui-helpers';
|
|
8
8
|
import * as PropTypes from 'prop-types';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "core-js/modules/es.array.map";
|
|
2
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import "core-js/modules/es.array.map.js";
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "core-js/modules/es.array.concat";
|
|
2
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
|
+
import "core-js/modules/es.array.concat.js";
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import throttle from 'lodash.throttle';
|
|
6
6
|
import throttleTime from "../../constants/throttleTime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "core-js/modules/es.object.values";
|
|
2
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import "core-js/modules/es.object.values.js";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
5
5
|
import * as PropTypes from 'prop-types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "core-js/modules/es.object.values";
|
|
2
|
-
import "core-js/modules/web.timers";
|
|
3
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
4
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import "core-js/modules/web.timers.js";
|
|
4
|
+
import "core-js/modules/es.object.values.js";
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
7
7
|
import * as PropTypes from 'prop-types';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "core-js/modules/es.array.concat";
|
|
2
|
-
import "core-js/modules/es.array.is-array";
|
|
3
|
-
import "core-js/modules/es.function.name";
|
|
4
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
5
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
|
+
import "core-js/modules/es.function.name.js";
|
|
4
|
+
import "core-js/modules/es.array.is-array.js";
|
|
5
|
+
import "core-js/modules/es.array.concat.js";
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
8
8
|
import * as PropTypes from 'prop-types';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import "core-js/modules/es.array.map";
|
|
2
|
-
import "core-js/modules/es.object.values";
|
|
3
|
-
import "core-js/modules/es.regexp.constructor";
|
|
4
|
-
import "core-js/modules/es.regexp.exec";
|
|
5
|
-
import "core-js/modules/es.regexp.to-string";
|
|
6
|
-
import "core-js/modules/es.string.replace";
|
|
7
|
-
import "core-js/modules/es.string.split";
|
|
8
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
9
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "core-js/modules/es.regexp.exec.js";
|
|
4
|
+
import "core-js/modules/es.string.replace.js";
|
|
5
|
+
import "core-js/modules/es.string.split.js";
|
|
6
|
+
import "core-js/modules/es.regexp.constructor.js";
|
|
7
|
+
import "core-js/modules/es.regexp.to-string.js";
|
|
8
|
+
import "core-js/modules/es.array.map.js";
|
|
9
|
+
import "core-js/modules/es.object.values.js";
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
12
12
|
import debounce from 'lodash.debounce';
|