@megafon/ui-shared 6.11.0 → 6.11.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/dist/es/components/Container/Container.css +7 -1
- package/dist/es/components/Container/Container.d.ts +9 -0
- package/dist/es/components/Container/Container.js +14 -3
- package/dist/lib/components/Container/Container.css +7 -1
- package/dist/lib/components/Container/Container.d.ts +9 -0
- package/dist/lib/components/Container/Container.js +14 -3
- package/package.json +3 -3
- package/CHANGELOG.md +0 -2483
@@ -11,7 +11,6 @@ h5 {
|
|
11
11
|
}
|
12
12
|
.mfui-v6-container .mfui-v6-container__inner {
|
13
13
|
padding-bottom: 96px;
|
14
|
-
border-radius: 24px;
|
15
14
|
}
|
16
15
|
@media screen and (max-width: 767px) {
|
17
16
|
.mfui-v6-container .mfui-v6-container__inner {
|
@@ -23,13 +22,20 @@ h5 {
|
|
23
22
|
padding-bottom: 72px;
|
24
23
|
}
|
25
24
|
}
|
25
|
+
@media screen and (min-width: 768px) {
|
26
|
+
.mfui-v6-container .mfui-v6-container__inner {
|
27
|
+
border-radius: 40px;
|
28
|
+
}
|
29
|
+
}
|
26
30
|
.mfui-v6-container .mfui-v6-container__inner_prevent {
|
27
31
|
padding-top: 0.1px;
|
28
32
|
}
|
33
|
+
.mfui-v6-container_disable-radius-top .mfui-v6-container__inner,
|
29
34
|
.mfui-v6-container:first-child .mfui-v6-container__inner {
|
30
35
|
border-top-left-radius: 0;
|
31
36
|
border-top-right-radius: 0;
|
32
37
|
}
|
38
|
+
.mfui-v6-container_disable-radius-bottom .mfui-v6-container__inner,
|
33
39
|
.mfui-v6-container:last-child .mfui-v6-container__inner {
|
34
40
|
border-bottom-right-radius: 0;
|
35
41
|
border-bottom-left-radius: 0;
|
@@ -15,12 +15,21 @@ declare type Props = {
|
|
15
15
|
rootRef?: Ref<HTMLDivElement>;
|
16
16
|
/** Дополнительный класс корневого элемента */
|
17
17
|
className?: string;
|
18
|
+
/** Дополнительные классы для корневого и внутренних элементов */
|
19
|
+
classes?: {
|
20
|
+
root?: string;
|
21
|
+
inner?: string;
|
22
|
+
};
|
18
23
|
/** Цвет фона */
|
19
24
|
backgroundColor?: BackgroundColorType;
|
20
25
|
/** Отключить отступ сверху */
|
21
26
|
disablePaddingTop?: boolean;
|
22
27
|
/** Отключить отступ снизу */
|
23
28
|
disablePaddingBottom?: boolean;
|
29
|
+
/** Отключить скругление сверху */
|
30
|
+
disableRadiusTop?: boolean;
|
31
|
+
/** Отключить скругление снизу */
|
32
|
+
disableRadiusBottom?: boolean;
|
24
33
|
/** Включить тень в нижней части компонента */
|
25
34
|
bottomShadow?: boolean;
|
26
35
|
/** Предотвратить прохождение верхнего отступа дочернего компонента через верхнюю границу контейнера */
|
@@ -19,9 +19,12 @@ var Container = function Container(_ref) {
|
|
19
19
|
rootRef = _ref.rootRef,
|
20
20
|
id = _ref.id,
|
21
21
|
className = _ref.className,
|
22
|
+
classes = _ref.classes,
|
22
23
|
children = _ref.children,
|
23
24
|
disablePaddingTop = _ref.disablePaddingTop,
|
24
25
|
disablePaddingBottom = _ref.disablePaddingBottom,
|
26
|
+
disableRadiusTop = _ref.disableRadiusTop,
|
27
|
+
disableRadiusBottom = _ref.disableRadiusBottom,
|
25
28
|
_ref$bottomShadow = _ref.bottomShadow,
|
26
29
|
bottomShadow = _ref$bottomShadow === void 0 ? false : _ref$bottomShadow,
|
27
30
|
_ref$preventMarginTop = _ref.preventMarginTopCollapse,
|
@@ -31,26 +34,34 @@ var Container = function Container(_ref) {
|
|
31
34
|
'bg-color': backgroundColor,
|
32
35
|
'bottom-shadow': bottomShadow,
|
33
36
|
'disable-padding-top': disablePaddingTop,
|
34
|
-
'disable-padding-bottom': disablePaddingBottom
|
35
|
-
|
37
|
+
'disable-padding-bottom': disablePaddingBottom,
|
38
|
+
'disable-radius-top': disableRadiusTop,
|
39
|
+
'disable-radius-bottom': disableRadiusBottom
|
40
|
+
}, [className, classes === null || classes === void 0 ? void 0 : classes.root]),
|
36
41
|
ref: rootRef,
|
37
42
|
id: id
|
38
43
|
}, /*#__PURE__*/React.createElement("div", {
|
39
44
|
className: cn('inner', {
|
40
45
|
prevent: preventMarginTopCollapse
|
41
|
-
})
|
46
|
+
}, [classes === null || classes === void 0 ? void 0 : classes.inner])
|
42
47
|
}, /*#__PURE__*/React.createElement(ContentArea, null, children)));
|
43
48
|
};
|
44
49
|
|
45
50
|
Container.propTypes = {
|
46
51
|
id: PropTypes.string,
|
47
52
|
className: PropTypes.string,
|
53
|
+
classes: PropTypes.shape({
|
54
|
+
root: PropTypes.string,
|
55
|
+
inner: PropTypes.string
|
56
|
+
}),
|
48
57
|
backgroundColor: PropTypes.oneOf(Object.values(BackgroundColors)),
|
49
58
|
rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
|
50
59
|
current: PropTypes.elementType
|
51
60
|
}), PropTypes.any])]),
|
52
61
|
disablePaddingTop: PropTypes.bool,
|
53
62
|
disablePaddingBottom: PropTypes.bool,
|
63
|
+
disableRadiusTop: PropTypes.bool,
|
64
|
+
disableRadiusBottom: PropTypes.bool,
|
54
65
|
bottomShadow: PropTypes.bool,
|
55
66
|
preventMarginTopCollapse: PropTypes.bool
|
56
67
|
};
|
@@ -11,7 +11,6 @@ h5 {
|
|
11
11
|
}
|
12
12
|
.mfui-v6-container .mfui-v6-container__inner {
|
13
13
|
padding-bottom: 96px;
|
14
|
-
border-radius: 24px;
|
15
14
|
}
|
16
15
|
@media screen and (max-width: 767px) {
|
17
16
|
.mfui-v6-container .mfui-v6-container__inner {
|
@@ -23,13 +22,20 @@ h5 {
|
|
23
22
|
padding-bottom: 72px;
|
24
23
|
}
|
25
24
|
}
|
25
|
+
@media screen and (min-width: 768px) {
|
26
|
+
.mfui-v6-container .mfui-v6-container__inner {
|
27
|
+
border-radius: 40px;
|
28
|
+
}
|
29
|
+
}
|
26
30
|
.mfui-v6-container .mfui-v6-container__inner_prevent {
|
27
31
|
padding-top: 0.1px;
|
28
32
|
}
|
33
|
+
.mfui-v6-container_disable-radius-top .mfui-v6-container__inner,
|
29
34
|
.mfui-v6-container:first-child .mfui-v6-container__inner {
|
30
35
|
border-top-left-radius: 0;
|
31
36
|
border-top-right-radius: 0;
|
32
37
|
}
|
38
|
+
.mfui-v6-container_disable-radius-bottom .mfui-v6-container__inner,
|
33
39
|
.mfui-v6-container:last-child .mfui-v6-container__inner {
|
34
40
|
border-bottom-right-radius: 0;
|
35
41
|
border-bottom-left-radius: 0;
|
@@ -15,12 +15,21 @@ declare type Props = {
|
|
15
15
|
rootRef?: Ref<HTMLDivElement>;
|
16
16
|
/** Дополнительный класс корневого элемента */
|
17
17
|
className?: string;
|
18
|
+
/** Дополнительные классы для корневого и внутренних элементов */
|
19
|
+
classes?: {
|
20
|
+
root?: string;
|
21
|
+
inner?: string;
|
22
|
+
};
|
18
23
|
/** Цвет фона */
|
19
24
|
backgroundColor?: BackgroundColorType;
|
20
25
|
/** Отключить отступ сверху */
|
21
26
|
disablePaddingTop?: boolean;
|
22
27
|
/** Отключить отступ снизу */
|
23
28
|
disablePaddingBottom?: boolean;
|
29
|
+
/** Отключить скругление сверху */
|
30
|
+
disableRadiusTop?: boolean;
|
31
|
+
/** Отключить скругление снизу */
|
32
|
+
disableRadiusBottom?: boolean;
|
24
33
|
/** Включить тень в нижней части компонента */
|
25
34
|
bottomShadow?: boolean;
|
26
35
|
/** Предотвратить прохождение верхнего отступа дочернего компонента через верхнюю границу контейнера */
|
@@ -33,9 +33,12 @@ var Container = function Container(_ref) {
|
|
33
33
|
rootRef = _ref.rootRef,
|
34
34
|
id = _ref.id,
|
35
35
|
className = _ref.className,
|
36
|
+
classes = _ref.classes,
|
36
37
|
children = _ref.children,
|
37
38
|
disablePaddingTop = _ref.disablePaddingTop,
|
38
39
|
disablePaddingBottom = _ref.disablePaddingBottom,
|
40
|
+
disableRadiusTop = _ref.disableRadiusTop,
|
41
|
+
disableRadiusBottom = _ref.disableRadiusBottom,
|
39
42
|
_ref$bottomShadow = _ref.bottomShadow,
|
40
43
|
bottomShadow = _ref$bottomShadow === void 0 ? false : _ref$bottomShadow,
|
41
44
|
_ref$preventMarginTop = _ref.preventMarginTopCollapse,
|
@@ -45,26 +48,34 @@ var Container = function Container(_ref) {
|
|
45
48
|
'bg-color': backgroundColor,
|
46
49
|
'bottom-shadow': bottomShadow,
|
47
50
|
'disable-padding-top': disablePaddingTop,
|
48
|
-
'disable-padding-bottom': disablePaddingBottom
|
49
|
-
|
51
|
+
'disable-padding-bottom': disablePaddingBottom,
|
52
|
+
'disable-radius-top': disableRadiusTop,
|
53
|
+
'disable-radius-bottom': disableRadiusBottom
|
54
|
+
}, [className, classes === null || classes === void 0 ? void 0 : classes.root]),
|
50
55
|
ref: rootRef,
|
51
56
|
id: id
|
52
57
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
53
58
|
className: cn('inner', {
|
54
59
|
prevent: preventMarginTopCollapse
|
55
|
-
})
|
60
|
+
}, [classes === null || classes === void 0 ? void 0 : classes.inner])
|
56
61
|
}, /*#__PURE__*/_react["default"].createElement(_uiCore.ContentArea, null, children)));
|
57
62
|
};
|
58
63
|
|
59
64
|
Container.propTypes = {
|
60
65
|
id: _propTypes["default"].string,
|
61
66
|
className: _propTypes["default"].string,
|
67
|
+
classes: _propTypes["default"].shape({
|
68
|
+
root: _propTypes["default"].string,
|
69
|
+
inner: _propTypes["default"].string
|
70
|
+
}),
|
62
71
|
backgroundColor: _propTypes["default"].oneOf(Object.values(BackgroundColors)),
|
63
72
|
rootRef: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
64
73
|
current: _propTypes["default"].elementType
|
65
74
|
}), _propTypes["default"].any])]),
|
66
75
|
disablePaddingTop: _propTypes["default"].bool,
|
67
76
|
disablePaddingBottom: _propTypes["default"].bool,
|
77
|
+
disableRadiusTop: _propTypes["default"].bool,
|
78
|
+
disableRadiusBottom: _propTypes["default"].bool,
|
68
79
|
bottomShadow: _propTypes["default"].bool,
|
69
80
|
preventMarginTopCollapse: _propTypes["default"].bool
|
70
81
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@megafon/ui-shared",
|
3
|
-
"version": "6.11.
|
3
|
+
"version": "6.11.1",
|
4
4
|
"files": [
|
5
5
|
"dist"
|
6
6
|
],
|
@@ -82,7 +82,7 @@
|
|
82
82
|
},
|
83
83
|
"dependencies": {
|
84
84
|
"@babel/runtime": "^7.8.4",
|
85
|
-
"@megafon/ui-core": "^6.6.
|
85
|
+
"@megafon/ui-core": "^6.6.1",
|
86
86
|
"@megafon/ui-helpers": "^2.6.0",
|
87
87
|
"core-js": "^3.6.4",
|
88
88
|
"htmr": "^0.9.2",
|
@@ -90,5 +90,5 @@
|
|
90
90
|
"prop-types": "^15.7.2",
|
91
91
|
"swiper": "^6.5.6"
|
92
92
|
},
|
93
|
-
"gitHead": "
|
93
|
+
"gitHead": "c119b673112829f75ebb828789f183e7c061b715"
|
94
94
|
}
|