@megafon/ui-core 5.10.0 → 5.11.0

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.
Files changed (30) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/es/components/Badges/components/NotificationBadge/NotificationBadge.css +49 -0
  3. package/dist/es/components/Badges/components/NotificationBadge/NotificationBadge.d.ts +29 -0
  4. package/dist/es/components/Badges/components/NotificationBadge/NotificationBadge.js +48 -0
  5. package/dist/es/components/Badges/components/PriceBadge/PriceBadge.css +9 -0
  6. package/dist/es/components/Badges/components/PriceBadge/PriceBadge.d.ts +1 -0
  7. package/dist/es/components/Badges/components/PriceBadge/PriceBadge.js +2 -1
  8. package/dist/es/components/Banner/Banner.js +0 -1
  9. package/dist/es/components/Selector/Selector.css +4 -5
  10. package/dist/es/components/Selector/Selector.js +2 -10
  11. package/dist/es/components/Selector/doc/Selector.example.css +3 -0
  12. package/dist/es/components/Selector/i//321/201heck.svg +1 -0
  13. package/dist/es/components/Snackbar/Snackbar.js +1 -1
  14. package/dist/es/index.d.ts +1 -0
  15. package/dist/es/index.js +1 -0
  16. package/dist/lib/components/Badges/components/NotificationBadge/NotificationBadge.css +49 -0
  17. package/dist/lib/components/Badges/components/NotificationBadge/NotificationBadge.d.ts +29 -0
  18. package/dist/lib/components/Badges/components/NotificationBadge/NotificationBadge.js +70 -0
  19. package/dist/lib/components/Badges/components/PriceBadge/PriceBadge.css +9 -0
  20. package/dist/lib/components/Badges/components/PriceBadge/PriceBadge.d.ts +1 -0
  21. package/dist/lib/components/Badges/components/PriceBadge/PriceBadge.js +2 -1
  22. package/dist/lib/components/Banner/Banner.js +0 -1
  23. package/dist/lib/components/Selector/Selector.css +4 -5
  24. package/dist/lib/components/Selector/Selector.js +5 -11
  25. package/dist/lib/components/Selector/doc/Selector.example.css +3 -0
  26. package/dist/lib/components/Selector/i//321/201heck.svg +1 -0
  27. package/dist/lib/components/Snackbar/Snackbar.js +1 -1
  28. package/dist/lib/index.d.ts +1 -0
  29. package/dist/lib/index.js +8 -0
  30. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -3,6 +3,30 @@
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
+ # [5.11.0](https://hq-gitlab.megafon.ru/site-portal/services/megafon-ui/compare/@megafon/ui-core@5.10.1...@megafon/ui-core@5.11.0) (2024-05-06)
7
+
8
+
9
+ ### Features
10
+
11
+ * **notificationbadge:** create component NotificationBadge ([6b89be0](https://hq-gitlab.megafon.ru/site-portal/services/megafon-ui/commit/6b89be0e0e568f71f3a2340f924fbb837e61a221))
12
+ * **pricebadge:** add purple color ([3943148](https://hq-gitlab.megafon.ru/site-portal/services/megafon-ui/commit/3943148c1eee233c73830fc705ff2d11dd68721a))
13
+ * **snackbar:** update snackbar component ([e7231de](https://hq-gitlab.megafon.ru/site-portal/services/megafon-ui/commit/e7231de8447b2a51335b56c5344baf703af7647b))
14
+
15
+
16
+
17
+
18
+
19
+ ## [5.10.1](https://hq-gitlab.megafon.ru/site-portal/services/megafon-ui/compare/@megafon/ui-core@5.10.0...@megafon/ui-core@5.10.1) (2024-04-24)
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * **banner:** fix children background ([a6e3d12](https://hq-gitlab.megafon.ru/site-portal/services/megafon-ui/commit/a6e3d127dd5b73dcea4d54e96e95ae8189f61824))
25
+
26
+
27
+
28
+
29
+
6
30
  # [5.10.0](https://hq-gitlab.megafon.ru/site-portal/services/megafon-ui/compare/@megafon/ui-core@5.9.2...@megafon/ui-core@5.10.0) (2024-04-22)
7
31
 
8
32
 
@@ -0,0 +1,49 @@
1
+ .mfui-notification-badge {
2
+ display: -webkit-box;
3
+ display: -ms-flexbox;
4
+ display: flex;
5
+ -webkit-box-align: center;
6
+ -ms-flex-align: center;
7
+ align-items: center;
8
+ -webkit-box-pack: center;
9
+ -ms-flex-pack: center;
10
+ justify-content: center;
11
+ width: 24px;
12
+ height: 24px;
13
+ border-radius: 50%;
14
+ overflow: hidden;
15
+ color: var(--stcWhite);
16
+ }
17
+ .mfui-notification-badge_theme_green {
18
+ background-color: var(--brandGreen);
19
+ -webkit-box-shadow: 0 2px 4px 0 rgba(0, 185, 86, 0.5);
20
+ box-shadow: 0 2px 4px 0 rgba(0, 185, 86, 0.5);
21
+ }
22
+ .mfui-notification-badge_theme_red {
23
+ background-color: var(--warmRedC);
24
+ -webkit-box-shadow: 0 2px 4px 0 rgba(235, 90, 64, 0.5);
25
+ box-shadow: 0 2px 4px 0 rgba(235, 90, 64, 0.5);
26
+ }
27
+ .mfui-notification-badge_auto-width {
28
+ width: -webkit-fit-content;
29
+ width: -moz-fit-content;
30
+ width: fit-content;
31
+ min-width: 24px;
32
+ padding: 5px 8px;
33
+ border-radius: 12px;
34
+ }
35
+ .mfui-notification-badge_size_small {
36
+ width: 8px;
37
+ height: 8px;
38
+ padding: 0;
39
+ border-radius: 50%;
40
+ }
41
+ .mfui-notification-badge_size_small .mfui-notification-badge__text {
42
+ display: none;
43
+ }
44
+ .mfui-notification-badge__text {
45
+ font-family: inherit;
46
+ font-weight: 500;
47
+ font-size: 12px;
48
+ line-height: 14px;
49
+ }
@@ -0,0 +1,29 @@
1
+ import * as React from 'react';
2
+ import './NotificationBadge.less';
3
+ export declare const NotificationBadgeTheme: {
4
+ readonly GREEN: "green";
5
+ readonly RED: "red";
6
+ };
7
+ declare type NotificationBadgeThemeType = typeof NotificationBadgeTheme[keyof typeof NotificationBadgeTheme];
8
+ export declare const NotificationBadgeSize: {
9
+ readonly SMALL: "small";
10
+ readonly MEDIUM: "medium";
11
+ };
12
+ declare type NotificationBadgeSizeType = typeof NotificationBadgeSize[keyof typeof NotificationBadgeSize];
13
+ export interface INotificationBadgeProps {
14
+ /** Цветовая тема */
15
+ theme?: NotificationBadgeThemeType;
16
+ /** Размер бейджа */
17
+ size?: NotificationBadgeSizeType;
18
+ /** Ширина по размеру содержимого */
19
+ autoWidth?: boolean;
20
+ /** Дополнительный класс корневого элемента */
21
+ className?: string;
22
+ /** Дополнительные data-атрибуты к внутренним элементам */
23
+ dataAttrs?: {
24
+ root?: Record<string, string>;
25
+ };
26
+ children?: React.ReactNode;
27
+ }
28
+ declare const NotificationBadge: React.FC<INotificationBadgeProps>;
29
+ export default NotificationBadge;
@@ -0,0 +1,48 @@
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 "./NotificationBadge.css";
7
+ export var NotificationBadgeTheme = {
8
+ GREEN: 'green',
9
+ RED: 'red'
10
+ };
11
+ export var NotificationBadgeSize = {
12
+ SMALL: 'small',
13
+ MEDIUM: 'medium'
14
+ };
15
+ var cn = cnCreate('mfui-notification-badge');
16
+
17
+ var NotificationBadge = function NotificationBadge(_ref) {
18
+ var _ref$theme = _ref.theme,
19
+ theme = _ref$theme === void 0 ? 'green' : _ref$theme,
20
+ _ref$size = _ref.size,
21
+ size = _ref$size === void 0 ? 'medium' : _ref$size,
22
+ _ref$autoWidth = _ref.autoWidth,
23
+ autoWidth = _ref$autoWidth === void 0 ? false : _ref$autoWidth,
24
+ className = _ref.className,
25
+ dataAttrs = _ref.dataAttrs,
26
+ children = _ref.children;
27
+ return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
28
+ className: cn({
29
+ theme: theme,
30
+ size: size,
31
+ 'auto-width': autoWidth
32
+ }, className)
33
+ }), /*#__PURE__*/React.createElement("span", {
34
+ className: cn('text')
35
+ }, children));
36
+ };
37
+
38
+ NotificationBadge.propTypes = {
39
+ theme: PropTypes.oneOf(Object.values(NotificationBadgeTheme)),
40
+ size: PropTypes.oneOf(Object.values(NotificationBadgeSize)),
41
+ autoWidth: PropTypes.bool,
42
+ className: PropTypes.string,
43
+ dataAttrs: PropTypes.shape({
44
+ root: PropTypes.objectOf(PropTypes.string.isRequired)
45
+ }),
46
+ children: PropTypes.node
47
+ };
48
+ export default NotificationBadge;
@@ -55,6 +55,15 @@
55
55
  .mfui-price-badge_theme_green .mfui-price-badge__icon {
56
56
  fill: var(--brandGreen);
57
57
  }
58
+ .mfui-price-badge_theme_purple {
59
+ background-color: var(--brandPurple80);
60
+ }
61
+ .mfui-price-badge_theme_purple .mfui-price-badge__text {
62
+ color: var(--stcWhite);
63
+ }
64
+ .mfui-price-badge_theme_purple .mfui-price-badge__icon {
65
+ fill: var(--stcWhite);
66
+ }
58
67
  .mfui-price-badge_theme_red {
59
68
  background-color: var(--fury20);
60
69
  }
@@ -7,6 +7,7 @@ export declare const PriceBadgeTheme: {
7
7
  readonly ORANGE: "orange";
8
8
  readonly LIGHT: "light";
9
9
  readonly DARK: "dark";
10
+ readonly PURPLE: "purple";
10
11
  };
11
12
  export declare const PriceBadgeIcon: {
12
13
  readonly TIMER: "timer";
@@ -119,7 +119,8 @@ export var PriceBadgeTheme = {
119
119
  GREEN: 'green',
120
120
  ORANGE: 'orange',
121
121
  LIGHT: 'light',
122
- DARK: 'dark'
122
+ DARK: 'dark',
123
+ PURPLE: 'purple'
123
124
  };
124
125
  export var PriceBadgeIcon = {
125
126
  TIMER: 'timer',
@@ -233,7 +233,6 @@ var Banner = function Banner(_ref) {
233
233
  className: cn('slide', [classes.slide]),
234
234
  key: i
235
235
  }), /*#__PURE__*/React.isValidElement(child) && /*#__PURE__*/React.cloneElement(child, {
236
- backgroundColor: backgroundColor,
237
236
  hasBottomOffset: !isSingleSlide
238
237
  }));
239
238
  })), !isSingleSlide && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(NavArrow, {
@@ -19,7 +19,6 @@
19
19
  cursor: pointer;
20
20
  }
21
21
  .mfui-selector__custom-input {
22
- position: absolute;
23
22
  display: -webkit-box;
24
23
  display: -ms-flexbox;
25
24
  display: flex;
@@ -31,8 +30,8 @@
31
30
  justify-content: center;
32
31
  -webkit-box-sizing: border-box;
33
32
  box-sizing: border-box;
34
- width: 20px;
35
- height: 20px;
33
+ width: 28px;
34
+ height: 28px;
36
35
  border: 2px solid;
37
36
  border-radius: 50%;
38
37
  -webkit-transition: background-color, border-color;
@@ -42,8 +41,8 @@
42
41
  }
43
42
  .mfui-selector__icon {
44
43
  display: block;
45
- width: 20px;
46
- height: 20px;
44
+ width: 14px;
45
+ height: 12px;
47
46
  opacity: 0;
48
47
  -webkit-transition: fill, opacity;
49
48
  transition: fill, opacity;
@@ -1,6 +1,6 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
1
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
3
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
- import _extends from "@babel/runtime/helpers/extends";
4
4
  import "core-js/modules/es.function.name.js";
5
5
  import "core-js/modules/es.array.includes.js";
6
6
  import "core-js/modules/es.string.includes.js";
@@ -9,16 +9,8 @@ import "core-js/modules/es.array.concat.js";
9
9
  import * as React from 'react';
10
10
  import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
11
11
  import * as PropTypes from 'prop-types';
12
+ import CheckedIcon from "./i/\u0441heck.svg";
12
13
  import "./Selector.css";
13
-
14
- var CheckedIcon = function CheckedIcon(props) {
15
- return /*#__PURE__*/React.createElement("svg", _extends({
16
- viewBox: "0 0 20 20"
17
- }, props), /*#__PURE__*/React.createElement("path", {
18
- d: "M8.832 11.547L6.619 9.335l-1.414 1.413 2.462 2.462 1.445 1.446 5.932-8.486-1.638-1.148-4.574 6.525z"
19
- }));
20
- };
21
-
22
14
  var cn = cnCreate('mfui-selector');
23
15
 
24
16
  var Selector = function Selector(_ref) {
@@ -1,14 +1,17 @@
1
1
  .top-right {
2
+ position: absolute;
2
3
  top: 10px;
3
4
  right: 10px;
4
5
  }
5
6
  .center {
7
+ position: absolute;
6
8
  top: 50%;
7
9
  left: 50%;
8
10
  -webkit-transform: translateX(-50%) translateY(-50%);
9
11
  transform: translateX(-50%) translateY(-50%);
10
12
  }
11
13
  .bottom-left {
14
+ position: absolute;
12
15
  bottom: 10px;
13
16
  left: 10px;
14
17
  }
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 14 12" xmlns="http://www.w3.org/2000/svg"><path d="M4.523 8.368L12.386 0 14 1.914 4.523 12 0 7.187l1.614-1.914 2.909 3.095z"/></svg>
@@ -214,7 +214,7 @@ var Snackbar = function Snackbar(_ref) {
214
214
  mobile: true
215
215
  }, [classes.text]),
216
216
  variant: "medium",
217
- color: "white",
217
+ color: "inherit",
218
218
  hasMargin: false,
219
219
  dataAttrs: {
220
220
  root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.text
@@ -27,6 +27,7 @@ export { default as Logo } from './components/Logo/Logo';
27
27
  export { default as Month } from './components/Calendar/components/Month/Month';
28
28
  export { default as NavArrow } from './components/NavArrow/NavArrow';
29
29
  export { default as Notification } from './components/Notification/Notification';
30
+ export { default as NotificationBadge } from './components/Badges/components/NotificationBadge/NotificationBadge';
30
31
  export { default as Pagination } from './components/Pagination/Pagination';
31
32
  export { default as PaginationButton } from './components/Pagination/components/PaginationButton/PaginationButton';
32
33
  export { default as PaginationButtons } from './components/Pagination/components/PaginationButtons/PaginationButtons';
package/dist/es/index.js CHANGED
@@ -27,6 +27,7 @@ export { default as Logo } from "./components/Logo/Logo";
27
27
  export { default as Month } from "./components/Calendar/components/Month/Month";
28
28
  export { default as NavArrow } from "./components/NavArrow/NavArrow";
29
29
  export { default as Notification } from "./components/Notification/Notification";
30
+ export { default as NotificationBadge } from "./components/Badges/components/NotificationBadge/NotificationBadge";
30
31
  export { default as Pagination } from "./components/Pagination/Pagination";
31
32
  export { default as PaginationButton } from "./components/Pagination/components/PaginationButton/PaginationButton";
32
33
  export { default as PaginationButtons } from "./components/Pagination/components/PaginationButtons/PaginationButtons";
@@ -0,0 +1,49 @@
1
+ .mfui-notification-badge {
2
+ display: -webkit-box;
3
+ display: -ms-flexbox;
4
+ display: flex;
5
+ -webkit-box-align: center;
6
+ -ms-flex-align: center;
7
+ align-items: center;
8
+ -webkit-box-pack: center;
9
+ -ms-flex-pack: center;
10
+ justify-content: center;
11
+ width: 24px;
12
+ height: 24px;
13
+ border-radius: 50%;
14
+ overflow: hidden;
15
+ color: var(--stcWhite);
16
+ }
17
+ .mfui-notification-badge_theme_green {
18
+ background-color: var(--brandGreen);
19
+ -webkit-box-shadow: 0 2px 4px 0 rgba(0, 185, 86, 0.5);
20
+ box-shadow: 0 2px 4px 0 rgba(0, 185, 86, 0.5);
21
+ }
22
+ .mfui-notification-badge_theme_red {
23
+ background-color: var(--warmRedC);
24
+ -webkit-box-shadow: 0 2px 4px 0 rgba(235, 90, 64, 0.5);
25
+ box-shadow: 0 2px 4px 0 rgba(235, 90, 64, 0.5);
26
+ }
27
+ .mfui-notification-badge_auto-width {
28
+ width: -webkit-fit-content;
29
+ width: -moz-fit-content;
30
+ width: fit-content;
31
+ min-width: 24px;
32
+ padding: 5px 8px;
33
+ border-radius: 12px;
34
+ }
35
+ .mfui-notification-badge_size_small {
36
+ width: 8px;
37
+ height: 8px;
38
+ padding: 0;
39
+ border-radius: 50%;
40
+ }
41
+ .mfui-notification-badge_size_small .mfui-notification-badge__text {
42
+ display: none;
43
+ }
44
+ .mfui-notification-badge__text {
45
+ font-family: inherit;
46
+ font-weight: 500;
47
+ font-size: 12px;
48
+ line-height: 14px;
49
+ }
@@ -0,0 +1,29 @@
1
+ import * as React from 'react';
2
+ import './NotificationBadge.less';
3
+ export declare const NotificationBadgeTheme: {
4
+ readonly GREEN: "green";
5
+ readonly RED: "red";
6
+ };
7
+ declare type NotificationBadgeThemeType = typeof NotificationBadgeTheme[keyof typeof NotificationBadgeTheme];
8
+ export declare const NotificationBadgeSize: {
9
+ readonly SMALL: "small";
10
+ readonly MEDIUM: "medium";
11
+ };
12
+ declare type NotificationBadgeSizeType = typeof NotificationBadgeSize[keyof typeof NotificationBadgeSize];
13
+ export interface INotificationBadgeProps {
14
+ /** Цветовая тема */
15
+ theme?: NotificationBadgeThemeType;
16
+ /** Размер бейджа */
17
+ size?: NotificationBadgeSizeType;
18
+ /** Ширина по размеру содержимого */
19
+ autoWidth?: boolean;
20
+ /** Дополнительный класс корневого элемента */
21
+ className?: string;
22
+ /** Дополнительные data-атрибуты к внутренним элементам */
23
+ dataAttrs?: {
24
+ root?: Record<string, string>;
25
+ };
26
+ children?: React.ReactNode;
27
+ }
28
+ declare const NotificationBadge: React.FC<INotificationBadgeProps>;
29
+ export default NotificationBadge;
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = exports.NotificationBadgeSize = exports.NotificationBadgeTheme = void 0;
9
+
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
+
12
+ require("core-js/modules/es.object.values.js");
13
+
14
+ var React = _interopRequireWildcard(require("react"));
15
+
16
+ var _uiHelpers = require("@megafon/ui-helpers");
17
+
18
+ var PropTypes = _interopRequireWildcard(require("prop-types"));
19
+
20
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
+
22
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
+
24
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
+
26
+ var NotificationBadgeTheme = {
27
+ GREEN: 'green',
28
+ RED: 'red'
29
+ };
30
+ exports.NotificationBadgeTheme = NotificationBadgeTheme;
31
+ var NotificationBadgeSize = {
32
+ SMALL: 'small',
33
+ MEDIUM: 'medium'
34
+ };
35
+ exports.NotificationBadgeSize = NotificationBadgeSize;
36
+ var cn = (0, _uiHelpers.cnCreate)('mfui-notification-badge');
37
+
38
+ var NotificationBadge = function NotificationBadge(_ref) {
39
+ var _ref$theme = _ref.theme,
40
+ theme = _ref$theme === void 0 ? 'green' : _ref$theme,
41
+ _ref$size = _ref.size,
42
+ size = _ref$size === void 0 ? 'medium' : _ref$size,
43
+ _ref$autoWidth = _ref.autoWidth,
44
+ autoWidth = _ref$autoWidth === void 0 ? false : _ref$autoWidth,
45
+ className = _ref.className,
46
+ dataAttrs = _ref.dataAttrs,
47
+ children = _ref.children;
48
+ return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
49
+ className: cn({
50
+ theme: theme,
51
+ size: size,
52
+ 'auto-width': autoWidth
53
+ }, className)
54
+ }), /*#__PURE__*/React.createElement("span", {
55
+ className: cn('text')
56
+ }, children));
57
+ };
58
+
59
+ NotificationBadge.propTypes = {
60
+ theme: PropTypes.oneOf(Object.values(NotificationBadgeTheme)),
61
+ size: PropTypes.oneOf(Object.values(NotificationBadgeSize)),
62
+ autoWidth: PropTypes.bool,
63
+ className: PropTypes.string,
64
+ dataAttrs: PropTypes.shape({
65
+ root: PropTypes.objectOf(PropTypes.string.isRequired)
66
+ }),
67
+ children: PropTypes.node
68
+ };
69
+ var _default = NotificationBadge;
70
+ exports["default"] = _default;
@@ -55,6 +55,15 @@
55
55
  .mfui-price-badge_theme_green .mfui-price-badge__icon {
56
56
  fill: var(--brandGreen);
57
57
  }
58
+ .mfui-price-badge_theme_purple {
59
+ background-color: var(--brandPurple80);
60
+ }
61
+ .mfui-price-badge_theme_purple .mfui-price-badge__text {
62
+ color: var(--stcWhite);
63
+ }
64
+ .mfui-price-badge_theme_purple .mfui-price-badge__icon {
65
+ fill: var(--stcWhite);
66
+ }
58
67
  .mfui-price-badge_theme_red {
59
68
  background-color: var(--fury20);
60
69
  }
@@ -7,6 +7,7 @@ export declare const PriceBadgeTheme: {
7
7
  readonly ORANGE: "orange";
8
8
  readonly LIGHT: "light";
9
9
  readonly DARK: "dark";
10
+ readonly PURPLE: "purple";
10
11
  };
11
12
  export declare const PriceBadgeIcon: {
12
13
  readonly TIMER: "timer";
@@ -137,7 +137,8 @@ var PriceBadgeTheme = {
137
137
  GREEN: 'green',
138
138
  ORANGE: 'orange',
139
139
  LIGHT: 'light',
140
- DARK: 'dark'
140
+ DARK: 'dark',
141
+ PURPLE: 'purple'
141
142
  };
142
143
  exports.PriceBadgeTheme = PriceBadgeTheme;
143
144
  var PriceBadgeIcon = {
@@ -263,7 +263,6 @@ var Banner = function Banner(_ref) {
263
263
  className: cn('slide', [classes.slide]),
264
264
  key: i
265
265
  }), /*#__PURE__*/React.isValidElement(child) && /*#__PURE__*/React.cloneElement(child, {
266
- backgroundColor: backgroundColor,
267
266
  hasBottomOffset: !isSingleSlide
268
267
  }));
269
268
  })), !isSingleSlide && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_NavArrow["default"], {
@@ -19,7 +19,6 @@
19
19
  cursor: pointer;
20
20
  }
21
21
  .mfui-selector__custom-input {
22
- position: absolute;
23
22
  display: -webkit-box;
24
23
  display: -ms-flexbox;
25
24
  display: flex;
@@ -31,8 +30,8 @@
31
30
  justify-content: center;
32
31
  -webkit-box-sizing: border-box;
33
32
  box-sizing: border-box;
34
- width: 20px;
35
- height: 20px;
33
+ width: 28px;
34
+ height: 28px;
36
35
  border: 2px solid;
37
36
  border-radius: 50%;
38
37
  -webkit-transition: background-color, border-color;
@@ -42,8 +41,8 @@
42
41
  }
43
42
  .mfui-selector__icon {
44
43
  display: block;
45
- width: 20px;
46
- height: 20px;
44
+ width: 14px;
45
+ height: 12px;
47
46
  opacity: 0;
48
47
  -webkit-transition: fill, opacity;
49
48
  transition: fill, opacity;
@@ -7,12 +7,12 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports["default"] = void 0;
9
9
 
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
+
10
12
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
13
 
12
14
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
13
15
 
14
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
15
-
16
16
  require("core-js/modules/es.function.name.js");
17
17
 
18
18
  require("core-js/modules/es.array.includes.js");
@@ -29,20 +29,14 @@ var _uiHelpers = require("@megafon/ui-helpers");
29
29
 
30
30
  var PropTypes = _interopRequireWildcard(require("prop-types"));
31
31
 
32
+ var _сheck = _interopRequireDefault(require("./i/\u0441heck.svg"));
33
+
32
34
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
33
35
 
34
36
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
35
37
 
36
38
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
37
39
 
38
- var CheckedIcon = function CheckedIcon(props) {
39
- return /*#__PURE__*/React.createElement("svg", (0, _extends2["default"])({
40
- viewBox: "0 0 20 20"
41
- }, props), /*#__PURE__*/React.createElement("path", {
42
- d: "M8.832 11.547L6.619 9.335l-1.414 1.413 2.462 2.462 1.445 1.446 5.932-8.486-1.638-1.148-4.574 6.525z"
43
- }));
44
- };
45
-
46
40
  var cn = (0, _uiHelpers.cnCreate)('mfui-selector');
47
41
 
48
42
  var Selector = function Selector(_ref) {
@@ -95,7 +89,7 @@ var Selector = function Selector(_ref) {
95
89
  ref: inputRef
96
90
  }, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.input))), /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({
97
91
  className: cn('custom-input', classes.customInput)
98
- }, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.customInput)), /*#__PURE__*/React.createElement(CheckedIcon, {
92
+ }, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.customInput)), /*#__PURE__*/React.createElement(_сheck["default"], {
99
93
  className: cn('icon')
100
94
  })), children));
101
95
  };
@@ -1,14 +1,17 @@
1
1
  .top-right {
2
+ position: absolute;
2
3
  top: 10px;
3
4
  right: 10px;
4
5
  }
5
6
  .center {
7
+ position: absolute;
6
8
  top: 50%;
7
9
  left: 50%;
8
10
  -webkit-transform: translateX(-50%) translateY(-50%);
9
11
  transform: translateX(-50%) translateY(-50%);
10
12
  }
11
13
  .bottom-left {
14
+ position: absolute;
12
15
  bottom: 10px;
13
16
  left: 10px;
14
17
  }
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 14 12" xmlns="http://www.w3.org/2000/svg"><path d="M4.523 8.368L12.386 0 14 1.914 4.523 12 0 7.187l1.614-1.914 2.909 3.095z"/></svg>
@@ -241,7 +241,7 @@ var Snackbar = function Snackbar(_ref) {
241
241
  mobile: true
242
242
  }, [classes.text]),
243
243
  variant: "medium",
244
- color: "white",
244
+ color: "inherit",
245
245
  hasMargin: false,
246
246
  dataAttrs: {
247
247
  root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.text
@@ -27,6 +27,7 @@ export { default as Logo } from './components/Logo/Logo';
27
27
  export { default as Month } from './components/Calendar/components/Month/Month';
28
28
  export { default as NavArrow } from './components/NavArrow/NavArrow';
29
29
  export { default as Notification } from './components/Notification/Notification';
30
+ export { default as NotificationBadge } from './components/Badges/components/NotificationBadge/NotificationBadge';
30
31
  export { default as Pagination } from './components/Pagination/Pagination';
31
32
  export { default as PaginationButton } from './components/Pagination/components/PaginationButton/PaginationButton';
32
33
  export { default as PaginationButtons } from './components/Pagination/components/PaginationButtons/PaginationButtons';
package/dist/lib/index.js CHANGED
@@ -177,6 +177,12 @@ Object.defineProperty(exports, "Notification", {
177
177
  return _Notification["default"];
178
178
  }
179
179
  });
180
+ Object.defineProperty(exports, "NotificationBadge", {
181
+ enumerable: true,
182
+ get: function get() {
183
+ return _NotificationBadge["default"];
184
+ }
185
+ });
180
186
  Object.defineProperty(exports, "Pagination", {
181
187
  enumerable: true,
182
188
  get: function get() {
@@ -422,6 +428,8 @@ var _NavArrow = _interopRequireDefault(require("./components/NavArrow/NavArrow")
422
428
 
423
429
  var _Notification = _interopRequireDefault(require("./components/Notification/Notification"));
424
430
 
431
+ var _NotificationBadge = _interopRequireDefault(require("./components/Badges/components/NotificationBadge/NotificationBadge"));
432
+
425
433
  var _Pagination = _interopRequireDefault(require("./components/Pagination/Pagination"));
426
434
 
427
435
  var _PaginationButton = _interopRequireDefault(require("./components/Pagination/components/PaginationButton/PaginationButton"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megafon/ui-core",
3
- "version": "5.10.0",
3
+ "version": "5.11.0",
4
4
  "files": [
5
5
  "dist",
6
6
  "styles"
@@ -50,7 +50,7 @@
50
50
  "@babel/preset-env": "^7.8.6",
51
51
  "@babel/preset-react": "^7.8.3",
52
52
  "@babel/preset-typescript": "^7.8.3",
53
- "@megafon/ui-icons": "^2.22.1",
53
+ "@megafon/ui-icons": "^2.23.0",
54
54
  "@svgr/core": "^2.4.1",
55
55
  "@testing-library/jest-dom": "5.16.2",
56
56
  "@testing-library/react": "12.1.2",
@@ -97,5 +97,5 @@
97
97
  "react-popper": "^2.2.3",
98
98
  "swiper": "^6.5.6"
99
99
  },
100
- "gitHead": "01efef995bd43c230a099a002906f61bfa44c730"
100
+ "gitHead": "3450c82e4358cc0decaa76da57c8fb37c774391f"
101
101
  }