@megafon/ui-core 8.1.1 → 8.2.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.
@@ -0,0 +1 @@
1
+ h1,h2,h3,h4,h5{margin:0}.mfui-status-badge__container{display:-webkit-box;display:-ms-flexbox;display:flex;font-size:12px;line-height:18px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--content);font-weight:400;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.mfui-status-badge__text{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mfui-status-badge__arrow,.mfui-status-badge__icon{height:20px;width:20px}.mfui-status-badge__icon{margin-right:2px}@media screen and (min-width:1024px){.mfui-status-badge_adaptive .mfui-status-badge__container{font-size:15px;line-height:24px}}.mfui-status-badge_tooltip .mfui-status-badge__container{cursor:pointer}.mfui-status-badge__tooltip{width:288px}.mfui-status-badge_view_dot .mfui-status-badge__container{gap:8px}.mfui-status-badge_view_dot .mfui-status-badge__container:before{border-radius:50%;content:"";height:8px;width:8px}.mfui-status-badge_view_dot.mfui-status-badge_tooltip .mfui-status-badge__text{-webkit-text-decoration:underline dashed var(--spbSky3);text-decoration:underline dashed var(--spbSky3);text-decoration-thickness:1px;text-underline-offset:3px;-webkit-transition:-webkit-text-decoration .3s ease-out;transition:-webkit-text-decoration .3s ease-out;transition:text-decoration .3s ease-out;transition:text-decoration .3s ease-out,-webkit-text-decoration .3s ease-out}@media (pointer:fine){.mfui-status-badge_view_dot.mfui-status-badge_tooltip .mfui-status-badge__container:hover .mfui-status-badge__text{-webkit-text-decoration:underline dashed var(--content);text-decoration:underline dashed var(--content);text-decoration-thickness:1px}.mfui-status-badge_view_dot.mfui-status-badge_tooltip .mfui-status-badge__container:hover:before{-webkit-animation:pulse .8s ease-out;animation:pulse .8s ease-out}}@media screen and (min-width:1024px){.mfui-status-badge_view_dot.mfui-status-badge_adaptive.mfui-status-badge_tooltip .mfui-status-badge__text{text-underline-offset:5px}}.mfui-status-badge_view_dot.mfui-status-badge_theme_green .mfui-status-badge__container:before{background-color:var(--brandGreen)}.mfui-status-badge_view_dot.mfui-status-badge_theme_blue .mfui-status-badge__container:before{background-color:var(--sky)}.mfui-status-badge_view_dot.mfui-status-badge_theme_gray .mfui-status-badge__container:before{background-color:var(--spbSky3)}.mfui-status-badge_view_dot.mfui-status-badge_theme_orange .mfui-status-badge__container:before{background-color:var(--137C)}.mfui-status-badge_view_dot.mfui-status-badge_theme_red .mfui-status-badge__container:before{background-color:var(--fury)}.mfui-status-badge_view_icon .mfui-status-badge__container{border:1px solid var(--spbSky1);border-radius:8px;padding:1px 7px 1px 1px}.mfui-status-badge_view_icon .mfui-status-badge__arrow{rotate:180deg;-webkit-transition:rotate .3s ease-out,fill .3s ease-out;transition:rotate .3s ease-out,fill .3s ease-out;fill:var(--spbSky3)}.mfui-status-badge_view_icon.mfui-status-badge_opened .mfui-status-badge__arrow{rotate:1turn}@media (pointer:fine){.mfui-status-badge_view_icon .mfui-status-badge__container:hover .mfui-status-badge__arrow{fill:var(--content)}}.mfui-status-badge_view_icon.mfui-status-badge_tooltip .mfui-status-badge__container{padding-right:1px}@media screen and (min-width:1024px){.mfui-status-badge_view_icon.mfui-status-badge_adaptive .mfui-status-badge__container{padding:3px 10px 3px 5px}.mfui-status-badge_view_icon.mfui-status-badge_adaptive .mfui-status-badge__icon{margin-right:4px}.mfui-status-badge_view_icon.mfui-status-badge_adaptive .mfui-status-badge__text{margin-top:-1px}.mfui-status-badge_view_icon.mfui-status-badge_adaptive.mfui-status-badge_tooltip .mfui-status-badge__container{padding-right:5px}}.mfui-status-badge_view_icon.mfui-status-badge_theme_green .mfui-status-badge__icon{fill:var(--brandGreen)}.mfui-status-badge_view_icon.mfui-status-badge_theme_blue .mfui-status-badge__icon{fill:var(--sky)}.mfui-status-badge_view_icon.mfui-status-badge_theme_gray .mfui-status-badge__icon{fill:var(--spbSky3)}.mfui-status-badge_view_icon.mfui-status-badge_theme_orange .mfui-status-badge__icon{fill:var(--137C)}.mfui-status-badge_view_icon.mfui-status-badge_theme_red .mfui-status-badge__icon{fill:var(--fury)}@-webkit-keyframes pulse{0%{opacity:1;scale:1}30%{opacity:.7}50%{opacity:1;scale:1.3}70%{opacity:.7}to{opacity:1;scale:1}}@keyframes pulse{0%{opacity:1;scale:1}30%{opacity:.7}50%{opacity:1;scale:1.3}70%{opacity:.7}to{opacity:1;scale:1}}
@@ -0,0 +1,39 @@
1
+ import * as React from 'react';
2
+ import Tooltip from '../../Tooltip/Tooltip';
3
+ import './StatusBadge.scss';
4
+ type TooltipPropsType = Pick<React.ComponentProps<typeof Tooltip>, 'title' | 'text' | 'buttonText' | 'placement' | 'isPortal' | 'portalSelector' | 'isHiddenResize' | 'onClick' | 'onOpen' | 'onClose' | 'onCloseButtonClick'>;
5
+ export interface IStatusBadgeProps {
6
+ /** Вид компонента */
7
+ view?: 'icon' | 'dot';
8
+ /** Тема компонента */
9
+ theme?: 'green' | 'blue' | 'gray' | 'orange' | 'red';
10
+ /** Тип иконки (для view = icon) */
11
+ iconType?: 'timer' | 'price' | 'checkInvert' | 'attention' | 'info' | 'profileFull';
12
+ /** Адаптивный режим */
13
+ isAdaptive?: boolean;
14
+ /** Тултип */
15
+ tooltip?: TooltipPropsType;
16
+ /** Дополнительный класс корневого элемента */
17
+ className?: string;
18
+ /** Дополнительные классы для внутренних элементов */
19
+ classes?: {
20
+ root?: string;
21
+ container?: string;
22
+ tooltip?: string;
23
+ tooltipButton?: string;
24
+ tooltipCloseButton?: string;
25
+ };
26
+ /** Дополнительные data-атрибуты к внутренним элементам */
27
+ dataAttrs?: {
28
+ root?: Record<string, string>;
29
+ container?: Record<string, string>;
30
+ icon?: Record<string, string>;
31
+ arrow?: Record<string, string>;
32
+ tooltip?: Record<string, string>;
33
+ tooltipButton?: Record<string, string>;
34
+ tooltipCloseButton?: Record<string, string>;
35
+ };
36
+ children: React.ReactNode;
37
+ }
38
+ declare const StatusBadge: React.FC<IStatusBadgeProps>;
39
+ export default StatusBadge;
@@ -0,0 +1,156 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+ import _extends from "@babel/runtime/helpers/extends";
3
+ import * as React from 'react';
4
+ import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
5
+ import Tooltip from "../../Tooltip/Tooltip";
6
+ import "./StatusBadge.css";
7
+ var ProfileFullIcon = function ProfileFullIcon(props) {
8
+ return /*#__PURE__*/React.createElement("svg", _extends({
9
+ viewBox: "0 0 20 20"
10
+ }, props), /*#__PURE__*/React.createElement("path", {
11
+ d: "M5.22 18h9.55L16 13.47A8.28 8.28 0 0010 11a8.302 8.302 0 00-6 2.5L5.22 18zM14 6a4 4 0 10-8 0 4 4 0 008 0z"
12
+ }));
13
+ };
14
+ var ArrowIcon = function ArrowIcon(props) {
15
+ return /*#__PURE__*/React.createElement("svg", _extends({
16
+ viewBox: "0 0 20 20"
17
+ }, props), /*#__PURE__*/React.createElement("path", {
18
+ d: "M13 12l-3-3-3 3-1-1 4-4 4 4z"
19
+ }));
20
+ };
21
+ var AttentionIcon = function AttentionIcon(props) {
22
+ return /*#__PURE__*/React.createElement("svg", _extends({
23
+ viewBox: "0 0 20 20"
24
+ }, props), /*#__PURE__*/React.createElement("path", {
25
+ 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 13c.3 0 .5-.1.7-.3.2-.2.3-.4.3-.7s-.1-.5-.3-.7c-.2-.2-.5-.3-.7-.3s-.5.1-.7.3c-.2.2-.3.4-.3.7s.1.5.3.7.5.3.7.3zM9 5v6h2V5H9z"
26
+ }));
27
+ };
28
+ var CheckInvertIcon = function CheckInvertIcon(props) {
29
+ return /*#__PURE__*/React.createElement("svg", _extends({
30
+ viewBox: "0 0 20 20"
31
+ }, props), /*#__PURE__*/React.createElement("path", {
32
+ fillRule: "evenodd",
33
+ clipRule: "evenodd",
34
+ d: "M10 18a8 8 0 100-16 8 8 0 000 16zM7.295 9.467l1.77 1.77 3.66-5.22 1.31.918-4.745 6.79-3.126-3.127 1.131-1.13z"
35
+ }));
36
+ };
37
+ var InfoIcon = function InfoIcon(props) {
38
+ return /*#__PURE__*/React.createElement("svg", _extends({
39
+ viewBox: "0 0 20 20"
40
+ }, props), /*#__PURE__*/React.createElement("path", {
41
+ 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"
42
+ }));
43
+ };
44
+ var PriceIcon = function PriceIcon(props) {
45
+ return /*#__PURE__*/React.createElement("svg", _extends({
46
+ viewBox: "0 0 20 20"
47
+ }, props), /*#__PURE__*/React.createElement("path", {
48
+ fillRule: "evenodd",
49
+ clipRule: "evenodd",
50
+ d: "M10 18a8 8 0 100-16 8 8 0 000 16zM7.75 5.75H11a2.75 2.75 0 010 5.5H9.25V12h3v1.5h-3v1.75h-1.5V13.5h-1V12h1v-.75h-1v-1.5h1v-4zM11 7.25H9.25v2.5H11a1.25 1.25 0 000-2.5z"
51
+ }));
52
+ };
53
+ var TimerIcon = function TimerIcon(props) {
54
+ return /*#__PURE__*/React.createElement("svg", _extends({
55
+ viewBox: "0 0 20 20"
56
+ }, props), /*#__PURE__*/React.createElement("path", {
57
+ fillRule: "evenodd",
58
+ clipRule: "evenodd",
59
+ d: "M10 18a8 8 0 100-16 8 8 0 000 16zm1-8.414V5H9v5.414l3 3L13.414 12 11 9.586z"
60
+ }));
61
+ };
62
+ var statusIconsMap = {
63
+ attention: AttentionIcon,
64
+ checkInvert: CheckInvertIcon,
65
+ info: InfoIcon,
66
+ price: PriceIcon,
67
+ profileFull: ProfileFullIcon,
68
+ timer: TimerIcon
69
+ };
70
+ var cn = cnCreate('mfui-status-badge');
71
+ var StatusBadge = function StatusBadge(_ref) {
72
+ var _ref$view = _ref.view,
73
+ view = _ref$view === void 0 ? 'dot' : _ref$view,
74
+ _ref$theme = _ref.theme,
75
+ theme = _ref$theme === void 0 ? 'green' : _ref$theme,
76
+ _ref$isAdaptive = _ref.isAdaptive,
77
+ isAdaptive = _ref$isAdaptive === void 0 ? false : _ref$isAdaptive,
78
+ _ref$iconType = _ref.iconType,
79
+ iconType = _ref$iconType === void 0 ? 'timer' : _ref$iconType,
80
+ tooltip = _ref.tooltip,
81
+ children = _ref.children,
82
+ className = _ref.className,
83
+ classes = _ref.classes,
84
+ dataAttrs = _ref.dataAttrs;
85
+ var triggerRef = React.useRef(null);
86
+ var _React$useState = React.useState(false),
87
+ _React$useState2 = _slicedToArray(_React$useState, 2),
88
+ isOpened = _React$useState2[0],
89
+ setIsOpened = _React$useState2[1];
90
+ var showIcon = view === 'icon';
91
+ var showArrow = showIcon && !!tooltip;
92
+ var StatusIconElement = statusIconsMap[iconType];
93
+ var handleOpen = React.useCallback(function (e) {
94
+ var _a;
95
+ setIsOpened(true);
96
+ (_a = tooltip === null || tooltip === void 0 ? void 0 : tooltip.onOpen) === null || _a === void 0 ? void 0 : _a.call(tooltip, e);
97
+ }, [tooltip]);
98
+ var handleClose = React.useCallback(function (e) {
99
+ var _a;
100
+ setIsOpened(false);
101
+ (_a = tooltip === null || tooltip === void 0 ? void 0 : tooltip.onClose) === null || _a === void 0 ? void 0 : _a.call(tooltip, e);
102
+ }, [tooltip]);
103
+ var handleCloseButtonClick = React.useCallback(function (e) {
104
+ var _a;
105
+ setIsOpened(false);
106
+ (_a = tooltip === null || tooltip === void 0 ? void 0 : tooltip.onCloseButtonClick) === null || _a === void 0 ? void 0 : _a.call(tooltip, e);
107
+ }, [tooltip]);
108
+ return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
109
+ className: cn({
110
+ view: view,
111
+ theme: theme,
112
+ adaptive: isAdaptive,
113
+ tooltip: !!tooltip,
114
+ opened: isOpened
115
+ }, [className, classes === null || classes === void 0 ? void 0 : classes.root])
116
+ }), /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.container), {
117
+ className: cn('container', [classes === null || classes === void 0 ? void 0 : classes.container]),
118
+ ref: triggerRef
119
+ }), showIcon && /*#__PURE__*/React.createElement(StatusIconElement, _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.icon), {
120
+ className: cn('icon')
121
+ })), /*#__PURE__*/React.createElement("div", {
122
+ className: cn('text')
123
+ }, children), showArrow && /*#__PURE__*/React.createElement(ArrowIcon, _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.arrow), {
124
+ className: cn('arrow')
125
+ }))), !!tooltip && /*#__PURE__*/React.createElement(Tooltip, {
126
+ className: cn('tooltip'),
127
+ title: tooltip.title,
128
+ text: tooltip.text,
129
+ buttonText: tooltip.buttonText,
130
+ isHiddenResize: tooltip.isHiddenResize,
131
+ isPortal: tooltip.isPortal,
132
+ portalSelector: tooltip.portalSelector,
133
+ triggerElement: triggerRef,
134
+ hasCloseButton: true,
135
+ placement: tooltip.placement || 'bottom',
136
+ fallbackPlacements: ['top', 'left', 'right'],
137
+ offset: "small",
138
+ triggerEvent: "click",
139
+ colorTheme: "blue",
140
+ onClick: tooltip.onClick,
141
+ onCloseButtonClick: handleCloseButtonClick,
142
+ onClose: handleClose,
143
+ onOpen: handleOpen,
144
+ dataAttrs: {
145
+ root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.tooltip,
146
+ button: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.tooltipButton,
147
+ close: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.tooltipCloseButton
148
+ },
149
+ classes: {
150
+ root: classes === null || classes === void 0 ? void 0 : classes.tooltip,
151
+ button: classes === null || classes === void 0 ? void 0 : classes.tooltipButton,
152
+ close: classes === null || classes === void 0 ? void 0 : classes.tooltipCloseButton
153
+ }
154
+ }));
155
+ };
156
+ export default StatusBadge;
@@ -1 +1 @@
1
- h1,h2,h3,h4,h5{margin:0}@-webkit-keyframes listAppear{0%{opacity:0;-webkit-transform:translateY(-25px);transform:translateY(-25px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes listAppear{0%{opacity:0;-webkit-transform:translateY(-25px);transform:translateY(-25px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}.mfui-search{-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--content);font-family:inherit;font-size:15px;line-height:24px;min-height:40px;position:relative;z-index:auto}.mfui-search__require-mark{color:var(--fury);font-size:20px;line-height:0;margin-left:1px}.mfui-search__control{border:1px solid;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;outline:none;position:relative;-webkit-transition:border-color .3s;transition:border-color .3s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%;z-index:1}.mfui-search__field_labeled::-webkit-input-placeholder{color:var(--spbSky3);opacity:0;-webkit-transition:opacity .2s;transition:opacity .2s}.mfui-search__field_labeled::-moz-placeholder{color:var(--spbSky3);opacity:0;-moz-transition:opacity .2s;transition:opacity .2s}.mfui-search__field_labeled:-ms-input-placeholder{color:var(--spbSky3);opacity:0;-ms-transition:opacity .2s;transition:opacity .2s}.mfui-search__field_labeled::-ms-input-placeholder{color:var(--spbSky3);opacity:0;-ms-transition:opacity .2s;transition:opacity .2s}.mfui-search__field_labeled::placeholder{color:var(--spbSky3);opacity:0;-webkit-transition:opacity .2s;transition:opacity .2s}.mfui-search__field:focus::-webkit-input-placeholder{opacity:1}.mfui-search__field:focus::-moz-placeholder{opacity:1}.mfui-search__field:focus:-ms-input-placeholder{opacity:1}.mfui-search__field:focus::-ms-input-placeholder{opacity:1}.mfui-search__field:focus::placeholder{opacity:1}.mfui-search__field{display:block;position:relative;z-index:1;-webkit-box-flex:1;-ms-flex-positive:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:none;border-radius:0;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;caret-color:var(--brandGreen);color:var(--content);cursor:text;flex-grow:1;font-family:inherit;font-size:100%;height:100%;line-height:24px;opacity:1;outline:none;overflow:auto;padding:0;resize:none;width:100%}@media screen and (max-width:767px){.mfui-search__field{width:90%}}.mfui-search__label{color:var(--spbSky3);display:block;font-family:inherit;font-size:15px;line-height:24px;overflow:auto;pointer-events:none;position:absolute;-webkit-transition:scale .5s,top .01s,-webkit-transform .5s;transition:scale .5s,top .01s,-webkit-transform .5s;transition:transform .5s,scale .5s,top .01s;transition:transform .5s,scale .5s,top .01s,-webkit-transform .5s;z-index:1}.mfui-search__list{background-color:var(--base);border-radius:12px;-webkit-box-shadow:0 4px 12px rgba(0,0,0,.08);box-shadow:0 4px 12px rgba(0,0,0,.08);display:none;left:-1px;position:absolute;right:-1px;top:calc(100% + 1px);z-index:0}.mfui-search__clear,.mfui-search__submit-button{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;background-color:transparent;border:none;cursor:pointer;height:100%;justify-content:center;padding:0;text-align:center}.mfui-search__list-inner{-webkit-box-sizing:border-box;box-sizing:border-box;max-height:368px;overflow-y:auto;padding:16px}.mfui-search__list-item{background-color:var(--base);border-radius:16px;cursor:pointer;font-family:inherit;padding-bottom:12px;padding-top:12px}.mfui-search__list-item_paddings_large{padding-left:32px;padding-right:32px}.mfui-search__list-item_paddings_small{padding-left:12px;padding-right:12px}.mfui-search__popular-item{background-color:var(--base);border-radius:16px;cursor:pointer;min-height:48px;padding-left:12px;padding-right:16px;text-decoration:none}.mfui-search__popular-icon,.mfui-search__popular-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mfui-search__popular-icon{-ms-flex-negative:0;flex-shrink:0;-webkit-box-pack:center;-ms-flex-pack:center;height:32px;justify-content:center;margin-right:16px;width:32px}.mfui-search__list-item_active,.mfui-search__popular-item_active{background-color:var(--spbSky0)}.mfui-search__item-title,.mfui-search__popular-item-title{position:relative;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;overflow:hidden;white-space:nowrap}.mfui-search__item-title:after,.mfui-search__popular-item-title:after{background:var(--base);bottom:0;content:"";-webkit-mask-image:-webkit-gradient(linear,left top,right top,from(hsla(0,0%,100%,0)),to(var(--base)));-webkit-mask-image:linear-gradient(to right,hsla(0,0%,100%,0) 0,var(--base) 100%);mask-image:-webkit-gradient(linear,left top,right top,from(hsla(0,0%,100%,0)),to(var(--spbSky0)));mask-image:linear-gradient(to right,hsla(0,0%,100%,0) 0,var(--spbSky0) 100%);position:absolute;right:0;top:0;width:40px}.mfui-search__list-item_active .mfui-search__item-title:after,.mfui-search__popular-item_active .mfui-search__popular-item-title:after{background:var(--spbSky0);-webkit-mask-image:-webkit-gradient(linear,left top,right top,from(hsla(0,0%,100%,0)),to(var(--spbSky0)));-webkit-mask-image:linear-gradient(to right,hsla(0,0%,100%,0) 0,var(--spbSky0) 100%);mask-image:-webkit-gradient(linear,left top,right top,from(hsla(0,0%,100%,0)),to(var(--spbSky0)));mask-image:linear-gradient(to right,hsla(0,0%,100%,0) 0,var(--spbSky0) 100%)}.mfui-search__highlighted-fragment{font-weight:700}.mfui-search__notice{font-size:12px;line-height:16px;margin-top:4px}.mfui-search__notice_error{color:var(--fury)}.mfui-search__notice_success{color:var(--brandGreen)}.mfui-search__icons{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%}.mfui-search__list_not-found{cursor:default}.mfui-search__not-found-text{background-color:var(--base);color:var(--spbSky3);font-family:inherit;padding:12px 32px}.mfui-search__not-found-text_show-popular{border-bottom:1px solid var(--spbSky2);padding:0 0 16px}.mfui-search__popular-title{padding-bottom:8px;padding-top:16px}.mfui-search_open{z-index:12}.mfui-search_open .mfui-search__list{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-name:listAppear;animation-name:listAppear;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;display:block}.mfui-search_type_textfield .mfui-search__control{background-color:var(--base);border-color:var(--spbSky2);border-radius:12px;height:60px;padding:0 16px}.mfui-search_type_textfield .mfui-search__control:hover,.mfui-search_type_textfield .mfui-search__control_focused{border-color:var(--content)}.mfui-search_type_textfield .mfui-search__label{top:17px}.mfui-search_type_textfield .mfui-search__field:focus+.mfui-search__label,.mfui-search_type_textfield .mfui-search__field_filled+.mfui-search__label{-webkit-transform:scale(.8) translate(-12.5%,-75%);transform:scale(.8) translate(-12.5%,-75%);-webkit-transition:scale .2s,top .01s,-webkit-transform .2s;transition:scale .2s,top .01s,-webkit-transform .2s;transition:transform .2s,scale .2s,top .01s;transition:transform .2s,scale .2s,top .01s,-webkit-transform .2s}.mfui-search_type_textfield .mfui-search__field_labeled{padding-bottom:9px;padding-top:25px}.mfui-search_type_textfield .mfui-search__submit-icon{height:32px;width:32px;fill:var(--content)}.mfui-search_textarea .mfui-search__control{height:auto;min-height:60px}.mfui-search_textarea .mfui-search__field{-webkit-box-sizing:content-box;box-sizing:content-box;max-height:204px;padding-bottom:9px;padding-top:17px;scrollbar-color:var(--spbSky2) transparent;scrollbar-width:thin}.mfui-search_textarea .mfui-search__field_labeled{padding-bottom:9px;padding-top:25px}.mfui-search_textarea .mfui-search__icons{height:58px;margin-left:8px}.mfui-search_textarea .mfui-search__field_resized{-webkit-transition:height .1s;transition:height .1s;will-change:height}.mfui-search__textarea-wrapper{position:relative;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;overflow:hidden;width:100%}.mfui-search_type_textfield.mfui-search_disabled .mfui-search__control{background-color:var(--spbSky1);border-color:var(--spbSky1)}.mfui-search_type_textfield.mfui-search_disabled .mfui-search__submit-icon{opacity:.5;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mfui-search_type_compact .mfui-search__control{background-color:var(--spbSky0);border-color:var(--spbSky0);border-radius:24px;height:40px;padding:0 12px;-webkit-transition:background-color,border-color .3s;transition:background-color,border-color .3s}.mfui-search_type_compact .mfui-search__control:hover{background-color:var(--spbSky1)}.mfui-search_type_compact .mfui-search__field{height:100%;padding:8px 0 8px 12px}.mfui-search_type_compact .mfui-search__label{left:44px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.mfui-search_type_compact .mfui-search__field:focus+.mfui-search__label,.mfui-search_type_compact .mfui-search__field_filled+.mfui-search__label{opacity:0}.mfui-search_type_compact .mfui-search__submit-icon{height:20px;width:20px;fill:var(--spbSky3)}.mfui-search_type_compact .mfui-search__clear{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;background-color:transparent;border:none;cursor:pointer;height:24px;justify-content:center;margin-left:12px;padding:0;width:24px}.mfui-search_type_compact .mfui-search__clear-icon{height:24px;width:24px;fill:var(--spbSky3)}.mfui-search_type_compact .mfui-search__clear-icon:hover{fill:var(--content)}.mfui-search_type_compact .mfui-search__clear-icon:active{fill:var(--buttonDown)}.mfui-search_type_compact.mfui-search_open .mfui-search__control{background-color:var(--spbSky1)}.mfui-search_type_compact.mfui-search_open .mfui-search__submit-icon{fill:var(--content)}.mfui-search_disabled .mfui-search__control{cursor:default;pointer-events:none}.mfui-search_disabled .mfui-search__submit-icon{opacity:.5;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mfui-search_error .mfui-search__control{border-color:var(--fury)}.mfui-search_success .mfui-search__control{border-color:var(--brandGreen)}.mfui-search__resizer{bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;position:absolute;right:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-box-sizing:content-box;box-sizing:content-box;cursor:ns-resize;height:12px;justify-content:center;padding:4px;width:12px}.mfui-search__resizer svg{-webkit-transition:stroke .3s;transition:stroke .3s;stroke:var(--spbSky2)}.mfui-search__resizer:active svg,.mfui-search__resizer:hover svg{stroke:var(--spbSky3)}
1
+ h1,h2,h3,h4,h5{margin:0}@-webkit-keyframes listAppear{0%{opacity:0;-webkit-transform:translateY(-25px);transform:translateY(-25px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes listAppear{0%{opacity:0;-webkit-transform:translateY(-25px);transform:translateY(-25px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}.mfui-search{-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--content);font-family:inherit;font-size:15px;line-height:24px;min-height:40px;position:relative;z-index:auto}.mfui-search__require-mark{color:var(--fury);font-size:20px;line-height:0;margin-left:1px}.mfui-search__control{border:1px solid;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;outline:none;position:relative;-webkit-transition:border-color .3s;transition:border-color .3s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%;z-index:1}.mfui-search__field_labeled::-webkit-input-placeholder{color:var(--spbSky3);opacity:0;-webkit-transition:opacity .2s;transition:opacity .2s}.mfui-search__field_labeled::-moz-placeholder{color:var(--spbSky3);opacity:0;-moz-transition:opacity .2s;transition:opacity .2s}.mfui-search__field_labeled:-ms-input-placeholder{color:var(--spbSky3);opacity:0;-ms-transition:opacity .2s;transition:opacity .2s}.mfui-search__field_labeled::-ms-input-placeholder{color:var(--spbSky3);opacity:0;-ms-transition:opacity .2s;transition:opacity .2s}.mfui-search__field_labeled::placeholder{color:var(--spbSky3);opacity:0;-webkit-transition:opacity .2s;transition:opacity .2s}.mfui-search__field:focus::-webkit-input-placeholder{opacity:1}.mfui-search__field:focus::-moz-placeholder{opacity:1}.mfui-search__field:focus:-ms-input-placeholder{opacity:1}.mfui-search__field:focus::-ms-input-placeholder{opacity:1}.mfui-search__field:focus::placeholder{opacity:1}.mfui-search__field{display:block;position:relative;z-index:1;-webkit-box-flex:1;-ms-flex-positive:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:none;border-radius:0;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;caret-color:var(--brandGreen);color:var(--content);cursor:text;flex-grow:1;font-family:inherit;font-size:100%;height:100%;line-height:24px;opacity:1;outline:none;overflow:auto;padding:0;resize:none;width:100%}@media screen and (max-width:767px){.mfui-search__field{width:90%}}.mfui-search__label{color:var(--spbSky3);display:block;font-family:inherit;font-size:15px;line-height:24px;overflow:auto;pointer-events:none;position:absolute;-webkit-transition:scale .5s,top .01s,-webkit-transform .5s;transition:scale .5s,top .01s,-webkit-transform .5s;transition:transform .5s,scale .5s,top .01s;transition:transform .5s,scale .5s,top .01s,-webkit-transform .5s;z-index:1}.mfui-search__list{background-color:var(--base);border-radius:12px;-webkit-box-shadow:0 4px 12px rgba(0,0,0,.08);box-shadow:0 4px 12px rgba(0,0,0,.08);display:none;left:-1px;position:absolute;right:-1px;top:calc(100% + 1px);z-index:0}.mfui-search__clear,.mfui-search__submit-button{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;background-color:transparent;border:none;cursor:pointer;height:100%;justify-content:center;padding:0;text-align:center}.mfui-search__list-inner{-webkit-box-sizing:border-box;box-sizing:border-box;max-height:368px;overflow-y:auto;padding:16px;scrollbar-width:none}.mfui-search__list-inner::-webkit-scrollbar{display:none}.mfui-search__list-item{background-color:var(--base);border-radius:16px;cursor:pointer;font-family:inherit;padding-bottom:12px;padding-top:12px}.mfui-search__list-item_paddings_large{padding-left:32px;padding-right:32px}.mfui-search__list-item_paddings_small{padding-left:12px;padding-right:12px}.mfui-search__popular-item{background-color:var(--base);border-radius:16px;cursor:pointer;min-height:48px;padding-left:12px;padding-right:16px;text-decoration:none}.mfui-search__popular-icon,.mfui-search__popular-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mfui-search__popular-icon{-ms-flex-negative:0;flex-shrink:0;-webkit-box-pack:center;-ms-flex-pack:center;height:32px;justify-content:center;margin-right:16px;width:32px}.mfui-search__list-item_active,.mfui-search__popular-item_active{background-color:var(--spbSky0)}.mfui-search__item-title,.mfui-search__popular-item-title{position:relative;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;overflow:hidden;white-space:nowrap}.mfui-search__item-title:after,.mfui-search__popular-item-title:after{background:var(--base);bottom:0;content:"";-webkit-mask-image:-webkit-gradient(linear,left top,right top,from(hsla(0,0%,100%,0)),to(var(--base)));-webkit-mask-image:linear-gradient(to right,hsla(0,0%,100%,0) 0,var(--base) 100%);mask-image:-webkit-gradient(linear,left top,right top,from(hsla(0,0%,100%,0)),to(var(--spbSky0)));mask-image:linear-gradient(to right,hsla(0,0%,100%,0) 0,var(--spbSky0) 100%);position:absolute;right:0;top:0;width:40px}.mfui-search__list-item_active .mfui-search__item-title:after,.mfui-search__popular-item_active .mfui-search__popular-item-title:after{background:var(--spbSky0);-webkit-mask-image:-webkit-gradient(linear,left top,right top,from(hsla(0,0%,100%,0)),to(var(--spbSky0)));-webkit-mask-image:linear-gradient(to right,hsla(0,0%,100%,0) 0,var(--spbSky0) 100%);mask-image:-webkit-gradient(linear,left top,right top,from(hsla(0,0%,100%,0)),to(var(--spbSky0)));mask-image:linear-gradient(to right,hsla(0,0%,100%,0) 0,var(--spbSky0) 100%)}.mfui-search__highlighted-fragment{font-weight:700}.mfui-search__notice{font-size:12px;line-height:16px;margin-top:4px}.mfui-search__notice_error{color:var(--fury)}.mfui-search__notice_success{color:var(--brandGreen)}.mfui-search__icons{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%}.mfui-search__list_not-found{cursor:default}.mfui-search__not-found-text{background-color:var(--base);color:var(--spbSky3);font-family:inherit;padding:12px 32px}.mfui-search__not-found-text_show-popular{border-bottom:1px solid var(--spbSky2);padding:0 0 16px}.mfui-search__popular-title{padding-bottom:8px;padding-top:16px}.mfui-search_open{z-index:12}.mfui-search_open .mfui-search__list{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-name:listAppear;animation-name:listAppear;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;display:block}.mfui-search_type_textfield .mfui-search__control{background-color:var(--base);border-color:var(--spbSky2);border-radius:12px;height:60px;padding:0 16px}.mfui-search_type_textfield .mfui-search__control:hover,.mfui-search_type_textfield .mfui-search__control_focused{border-color:var(--content)}.mfui-search_type_textfield .mfui-search__label{top:17px}.mfui-search_type_textfield .mfui-search__field:focus+.mfui-search__label,.mfui-search_type_textfield .mfui-search__field_filled+.mfui-search__label{-webkit-transform:scale(.8) translate(-12.5%,-75%);transform:scale(.8) translate(-12.5%,-75%);-webkit-transition:scale .2s,top .01s,-webkit-transform .2s;transition:scale .2s,top .01s,-webkit-transform .2s;transition:transform .2s,scale .2s,top .01s;transition:transform .2s,scale .2s,top .01s,-webkit-transform .2s}.mfui-search_type_textfield .mfui-search__field_labeled{padding-bottom:9px;padding-top:25px}.mfui-search_type_textfield .mfui-search__submit-icon{height:32px;width:32px;fill:var(--content)}.mfui-search_textarea .mfui-search__control{height:auto;min-height:60px}.mfui-search_textarea .mfui-search__field{-webkit-box-sizing:content-box;box-sizing:content-box;max-height:204px;padding-bottom:9px;padding-top:17px;scrollbar-color:var(--spbSky2) transparent;scrollbar-width:thin}.mfui-search_textarea .mfui-search__field_labeled{padding-bottom:9px;padding-top:25px}.mfui-search_textarea .mfui-search__icons{height:58px;margin-left:8px}.mfui-search_textarea .mfui-search__field_resized{-webkit-transition:height .1s;transition:height .1s;will-change:height}.mfui-search__textarea-wrapper{position:relative;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;overflow:hidden;width:100%}.mfui-search_type_textfield.mfui-search_disabled .mfui-search__control{background-color:var(--spbSky1);border-color:var(--spbSky1)}.mfui-search_type_textfield.mfui-search_disabled .mfui-search__submit-icon{opacity:.5;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mfui-search_type_compact .mfui-search__control{background-color:var(--spbSky0);border-color:var(--spbSky0);border-radius:24px;height:40px;padding:0 12px;-webkit-transition:background-color,border-color .3s;transition:background-color,border-color .3s}.mfui-search_type_compact .mfui-search__control:hover{background-color:var(--spbSky1)}.mfui-search_type_compact .mfui-search__field{height:100%;padding:8px 0 8px 12px}.mfui-search_type_compact .mfui-search__label{left:44px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.mfui-search_type_compact .mfui-search__field:focus+.mfui-search__label,.mfui-search_type_compact .mfui-search__field_filled+.mfui-search__label{opacity:0}.mfui-search_type_compact .mfui-search__submit-icon{height:20px;width:20px;fill:var(--spbSky3)}.mfui-search_type_compact .mfui-search__clear{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;background-color:transparent;border:none;cursor:pointer;height:24px;justify-content:center;margin-left:12px;padding:0;width:24px}.mfui-search_type_compact .mfui-search__clear-icon{height:24px;width:24px;fill:var(--spbSky3)}.mfui-search_type_compact .mfui-search__clear-icon:hover{fill:var(--content)}.mfui-search_type_compact .mfui-search__clear-icon:active{fill:var(--buttonDown)}.mfui-search_type_compact.mfui-search_open .mfui-search__control{background-color:var(--spbSky1)}.mfui-search_type_compact.mfui-search_open .mfui-search__submit-icon{fill:var(--content)}.mfui-search_disabled .mfui-search__control{cursor:default;pointer-events:none}.mfui-search_disabled .mfui-search__submit-icon{opacity:.5;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mfui-search_error .mfui-search__control{border-color:var(--fury)}.mfui-search_success .mfui-search__control{border-color:var(--brandGreen)}.mfui-search__resizer{bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;position:absolute;right:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-box-sizing:content-box;box-sizing:content-box;cursor:ns-resize;height:12px;justify-content:center;padding:4px;width:12px}.mfui-search__resizer svg{-webkit-transition:stroke .3s;transition:stroke .3s;stroke:var(--spbSky2)}.mfui-search__resizer:active svg,.mfui-search__resizer:hover svg{stroke:var(--spbSky3)}
@@ -70,6 +70,8 @@ export interface ISearchProps {
70
70
  noticeText?: string | JSX.Element;
71
71
  /** Максимальное вводимое количество текста */
72
72
  maxLength?: number;
73
+ /** Максимальная высота для скролла */
74
+ maxHeightScrollBar?: number;
73
75
  /** Отключение поля ввода */
74
76
  disabled?: boolean;
75
77
  /** Делает поле обязательным */
@@ -17,6 +17,7 @@ import throttleTime from "../../constants/throttleTime";
17
17
  import Caption from "../Caption/Caption";
18
18
  import Header from "../Header/Header";
19
19
  import Preloader from "../Preloader/Preloader";
20
+ import ScrollBar from "../ScrollBar/ScrollBar";
20
21
  import "./Search.css";
21
22
  var SearchIcon16 = function SearchIcon16(props) {
22
23
  return /*#__PURE__*/React.createElement("svg", _extends({
@@ -86,6 +87,8 @@ var Search = function Search(_ref) {
86
87
  required = _ref.required,
87
88
  noticeText = _ref.noticeText,
88
89
  maxLength = _ref.maxLength,
90
+ _ref$maxHeightScrollB = _ref.maxHeightScrollBar,
91
+ maxHeightScrollBar = _ref$maxHeightScrollB === void 0 ? 350 : _ref$maxHeightScrollB,
89
92
  className = _ref.className,
90
93
  classes = _ref.classes,
91
94
  _ref$type = _ref.type,
@@ -425,6 +428,8 @@ var Search = function Search(_ref) {
425
428
  ref: listRef
426
429
  }, /*#__PURE__*/React.createElement("div", {
427
430
  className: cn('list-inner', [classes === null || classes === void 0 ? void 0 : classes.listInner])
431
+ }, /*#__PURE__*/React.createElement(ScrollBar, {
432
+ maxHeight: maxHeightScrollBar
428
433
  }, items.map(function (_ref2, i) {
429
434
  var itemValue = _ref2.value,
430
435
  searchView = _ref2.searchView,
@@ -442,7 +447,7 @@ var Search = function Search(_ref) {
442
447
  }), /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.itemTitle, i + 1), {
443
448
  className: cn('item-title', [classes === null || classes === void 0 ? void 0 : classes.listItemTitle])
444
449
  }), searchView || highlightString(itemValue)));
445
- })));
450
+ }))));
446
451
  };
447
452
  var renderPopularItems = function renderPopularItems() {
448
453
  return /*#__PURE__*/React.createElement("div", {
@@ -12,7 +12,7 @@ import "core-js/modules/es.regexp.sticky.js";
12
12
  import "core-js/modules/web.dom-collections.for-each.js";
13
13
  /* eslint-disable @typescript-eslint/no-var-requires */
14
14
  import * as React from 'react';
15
- import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
15
+ import { breakpoints, cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
16
16
  import throttle from 'lodash.throttle';
17
17
  import usePrevious from "../../hooks/usePrevious";
18
18
  import NotificationBadge from "../Badges/NotificationBadge/NotificationBadge";
@@ -33,7 +33,7 @@ try {
33
33
  SwiperSlide = SwiperAll.SwiperSlide;
34
34
  } catch (e) {
35
35
  // eslint-disable-next-line no-console
36
- console.warn("\n WARNING: megafon/ui-core is using the latest version of swiper. \n For more information about server-side rendering\n please check the Tabs component documentation at:\n https://ui.megafon.ru/components/tabs\n ");
36
+ console.warn("\n WARNING: megafon/ui-core is using the latest version of swiper.\n For more information about server-side rendering\n please check the Tabs component documentation at:\n https://ui.megafon.ru/components/tabs\n ");
37
37
  }
38
38
  export var TabAlign = {
39
39
  LEFT: 'left',
@@ -219,7 +219,11 @@ var Tabs = function Tabs(_ref) {
219
219
  if (outerIndex === undefined) {
220
220
  setInnerIndex(index);
221
221
  }
222
- swiperInstance === null || swiperInstance === void 0 ? void 0 : swiperInstance.slideTo(index);
222
+ if (index > 0 && window.innerWidth > breakpoints.MOBILE_BIG_END) {
223
+ swiperInstance === null || swiperInstance === void 0 ? void 0 : swiperInstance.slideTo(index - 1);
224
+ } else {
225
+ swiperInstance === null || swiperInstance === void 0 ? void 0 : swiperInstance.slideTo(index);
226
+ }
223
227
  };
224
228
  }, [onTabClick, outerIndex, swiperInstance]);
225
229
  var handleSwiper = React.useCallback(function (swiper) {
@@ -62,6 +62,7 @@ export { default as SliderScale } from './components/Sliders/components/SliderSc
62
62
  export { default as slidesSettings } from './components/Banner/slidesSettings';
63
63
  export { default as Snackbar } from './components/Snackbar/Snackbar';
64
64
  export { default as SnackbarTimer } from './components/Snackbar/SnackbarTimer/SnackbarTimer';
65
+ export { default as StatusBadge } from './components/Badges/StatusBadge/StatusBadge';
65
66
  export { default as Switcher } from './components/Switcher/Switcher';
66
67
  export { default as Tab } from './components/Tabs/Tab';
67
68
  export { default as Tabs } from './components/Tabs/Tabs';
package/dist/es/index.js CHANGED
@@ -62,6 +62,7 @@ export { default as SliderScale } from "./components/Sliders/components/SliderSc
62
62
  export { default as slidesSettings } from "./components/Banner/slidesSettings";
63
63
  export { default as Snackbar } from "./components/Snackbar/Snackbar";
64
64
  export { default as SnackbarTimer } from "./components/Snackbar/SnackbarTimer/SnackbarTimer";
65
+ export { default as StatusBadge } from "./components/Badges/StatusBadge/StatusBadge";
65
66
  export { default as Switcher } from "./components/Switcher/Switcher";
66
67
  export { default as Tab } from "./components/Tabs/Tab";
67
68
  export { default as Tabs } from "./components/Tabs/Tabs";
@@ -0,0 +1 @@
1
+ h1,h2,h3,h4,h5{margin:0}.mfui-status-badge__container{display:-webkit-box;display:-ms-flexbox;display:flex;font-size:12px;line-height:18px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--content);font-weight:400;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.mfui-status-badge__text{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mfui-status-badge__arrow,.mfui-status-badge__icon{height:20px;width:20px}.mfui-status-badge__icon{margin-right:2px}@media screen and (min-width:1024px){.mfui-status-badge_adaptive .mfui-status-badge__container{font-size:15px;line-height:24px}}.mfui-status-badge_tooltip .mfui-status-badge__container{cursor:pointer}.mfui-status-badge__tooltip{width:288px}.mfui-status-badge_view_dot .mfui-status-badge__container{gap:8px}.mfui-status-badge_view_dot .mfui-status-badge__container:before{border-radius:50%;content:"";height:8px;width:8px}.mfui-status-badge_view_dot.mfui-status-badge_tooltip .mfui-status-badge__text{-webkit-text-decoration:underline dashed var(--spbSky3);text-decoration:underline dashed var(--spbSky3);text-decoration-thickness:1px;text-underline-offset:3px;-webkit-transition:-webkit-text-decoration .3s ease-out;transition:-webkit-text-decoration .3s ease-out;transition:text-decoration .3s ease-out;transition:text-decoration .3s ease-out,-webkit-text-decoration .3s ease-out}@media (pointer:fine){.mfui-status-badge_view_dot.mfui-status-badge_tooltip .mfui-status-badge__container:hover .mfui-status-badge__text{-webkit-text-decoration:underline dashed var(--content);text-decoration:underline dashed var(--content);text-decoration-thickness:1px}.mfui-status-badge_view_dot.mfui-status-badge_tooltip .mfui-status-badge__container:hover:before{-webkit-animation:pulse .8s ease-out;animation:pulse .8s ease-out}}@media screen and (min-width:1024px){.mfui-status-badge_view_dot.mfui-status-badge_adaptive.mfui-status-badge_tooltip .mfui-status-badge__text{text-underline-offset:5px}}.mfui-status-badge_view_dot.mfui-status-badge_theme_green .mfui-status-badge__container:before{background-color:var(--brandGreen)}.mfui-status-badge_view_dot.mfui-status-badge_theme_blue .mfui-status-badge__container:before{background-color:var(--sky)}.mfui-status-badge_view_dot.mfui-status-badge_theme_gray .mfui-status-badge__container:before{background-color:var(--spbSky3)}.mfui-status-badge_view_dot.mfui-status-badge_theme_orange .mfui-status-badge__container:before{background-color:var(--137C)}.mfui-status-badge_view_dot.mfui-status-badge_theme_red .mfui-status-badge__container:before{background-color:var(--fury)}.mfui-status-badge_view_icon .mfui-status-badge__container{border:1px solid var(--spbSky1);border-radius:8px;padding:1px 7px 1px 1px}.mfui-status-badge_view_icon .mfui-status-badge__arrow{rotate:180deg;-webkit-transition:rotate .3s ease-out,fill .3s ease-out;transition:rotate .3s ease-out,fill .3s ease-out;fill:var(--spbSky3)}.mfui-status-badge_view_icon.mfui-status-badge_opened .mfui-status-badge__arrow{rotate:1turn}@media (pointer:fine){.mfui-status-badge_view_icon .mfui-status-badge__container:hover .mfui-status-badge__arrow{fill:var(--content)}}.mfui-status-badge_view_icon.mfui-status-badge_tooltip .mfui-status-badge__container{padding-right:1px}@media screen and (min-width:1024px){.mfui-status-badge_view_icon.mfui-status-badge_adaptive .mfui-status-badge__container{padding:3px 10px 3px 5px}.mfui-status-badge_view_icon.mfui-status-badge_adaptive .mfui-status-badge__icon{margin-right:4px}.mfui-status-badge_view_icon.mfui-status-badge_adaptive .mfui-status-badge__text{margin-top:-1px}.mfui-status-badge_view_icon.mfui-status-badge_adaptive.mfui-status-badge_tooltip .mfui-status-badge__container{padding-right:5px}}.mfui-status-badge_view_icon.mfui-status-badge_theme_green .mfui-status-badge__icon{fill:var(--brandGreen)}.mfui-status-badge_view_icon.mfui-status-badge_theme_blue .mfui-status-badge__icon{fill:var(--sky)}.mfui-status-badge_view_icon.mfui-status-badge_theme_gray .mfui-status-badge__icon{fill:var(--spbSky3)}.mfui-status-badge_view_icon.mfui-status-badge_theme_orange .mfui-status-badge__icon{fill:var(--137C)}.mfui-status-badge_view_icon.mfui-status-badge_theme_red .mfui-status-badge__icon{fill:var(--fury)}@-webkit-keyframes pulse{0%{opacity:1;scale:1}30%{opacity:.7}50%{opacity:1;scale:1.3}70%{opacity:.7}to{opacity:1;scale:1}}@keyframes pulse{0%{opacity:1;scale:1}30%{opacity:.7}50%{opacity:1;scale:1.3}70%{opacity:.7}to{opacity:1;scale:1}}
@@ -0,0 +1,39 @@
1
+ import * as React from 'react';
2
+ import Tooltip from '../../Tooltip/Tooltip';
3
+ import './StatusBadge.scss';
4
+ type TooltipPropsType = Pick<React.ComponentProps<typeof Tooltip>, 'title' | 'text' | 'buttonText' | 'placement' | 'isPortal' | 'portalSelector' | 'isHiddenResize' | 'onClick' | 'onOpen' | 'onClose' | 'onCloseButtonClick'>;
5
+ export interface IStatusBadgeProps {
6
+ /** Вид компонента */
7
+ view?: 'icon' | 'dot';
8
+ /** Тема компонента */
9
+ theme?: 'green' | 'blue' | 'gray' | 'orange' | 'red';
10
+ /** Тип иконки (для view = icon) */
11
+ iconType?: 'timer' | 'price' | 'checkInvert' | 'attention' | 'info' | 'profileFull';
12
+ /** Адаптивный режим */
13
+ isAdaptive?: boolean;
14
+ /** Тултип */
15
+ tooltip?: TooltipPropsType;
16
+ /** Дополнительный класс корневого элемента */
17
+ className?: string;
18
+ /** Дополнительные классы для внутренних элементов */
19
+ classes?: {
20
+ root?: string;
21
+ container?: string;
22
+ tooltip?: string;
23
+ tooltipButton?: string;
24
+ tooltipCloseButton?: string;
25
+ };
26
+ /** Дополнительные data-атрибуты к внутренним элементам */
27
+ dataAttrs?: {
28
+ root?: Record<string, string>;
29
+ container?: Record<string, string>;
30
+ icon?: Record<string, string>;
31
+ arrow?: Record<string, string>;
32
+ tooltip?: Record<string, string>;
33
+ tooltipButton?: Record<string, string>;
34
+ tooltipCloseButton?: Record<string, string>;
35
+ };
36
+ children: React.ReactNode;
37
+ }
38
+ declare const StatusBadge: React.FC<IStatusBadgeProps>;
39
+ export default StatusBadge;
@@ -0,0 +1,165 @@
1
+ "use strict";
2
+
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = void 0;
8
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var React = _interopRequireWildcard(require("react"));
11
+ var _uiHelpers = require("@megafon/ui-helpers");
12
+ var _Tooltip = _interopRequireDefault(require("../../Tooltip/Tooltip"));
13
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
14
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
15
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
16
+ var ProfileFullIcon = function ProfileFullIcon(props) {
17
+ return /*#__PURE__*/React.createElement("svg", (0, _extends2["default"])({
18
+ viewBox: "0 0 20 20"
19
+ }, props), /*#__PURE__*/React.createElement("path", {
20
+ d: "M5.22 18h9.55L16 13.47A8.28 8.28 0 0010 11a8.302 8.302 0 00-6 2.5L5.22 18zM14 6a4 4 0 10-8 0 4 4 0 008 0z"
21
+ }));
22
+ };
23
+ var ArrowIcon = function ArrowIcon(props) {
24
+ return /*#__PURE__*/React.createElement("svg", (0, _extends2["default"])({
25
+ viewBox: "0 0 20 20"
26
+ }, props), /*#__PURE__*/React.createElement("path", {
27
+ d: "M13 12l-3-3-3 3-1-1 4-4 4 4z"
28
+ }));
29
+ };
30
+ var AttentionIcon = function AttentionIcon(props) {
31
+ return /*#__PURE__*/React.createElement("svg", (0, _extends2["default"])({
32
+ viewBox: "0 0 20 20"
33
+ }, props), /*#__PURE__*/React.createElement("path", {
34
+ 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 13c.3 0 .5-.1.7-.3.2-.2.3-.4.3-.7s-.1-.5-.3-.7c-.2-.2-.5-.3-.7-.3s-.5.1-.7.3c-.2.2-.3.4-.3.7s.1.5.3.7.5.3.7.3zM9 5v6h2V5H9z"
35
+ }));
36
+ };
37
+ var CheckInvertIcon = function CheckInvertIcon(props) {
38
+ return /*#__PURE__*/React.createElement("svg", (0, _extends2["default"])({
39
+ viewBox: "0 0 20 20"
40
+ }, props), /*#__PURE__*/React.createElement("path", {
41
+ fillRule: "evenodd",
42
+ clipRule: "evenodd",
43
+ d: "M10 18a8 8 0 100-16 8 8 0 000 16zM7.295 9.467l1.77 1.77 3.66-5.22 1.31.918-4.745 6.79-3.126-3.127 1.131-1.13z"
44
+ }));
45
+ };
46
+ var InfoIcon = function InfoIcon(props) {
47
+ return /*#__PURE__*/React.createElement("svg", (0, _extends2["default"])({
48
+ viewBox: "0 0 20 20"
49
+ }, props), /*#__PURE__*/React.createElement("path", {
50
+ 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"
51
+ }));
52
+ };
53
+ var PriceIcon = function PriceIcon(props) {
54
+ return /*#__PURE__*/React.createElement("svg", (0, _extends2["default"])({
55
+ viewBox: "0 0 20 20"
56
+ }, props), /*#__PURE__*/React.createElement("path", {
57
+ fillRule: "evenodd",
58
+ clipRule: "evenodd",
59
+ d: "M10 18a8 8 0 100-16 8 8 0 000 16zM7.75 5.75H11a2.75 2.75 0 010 5.5H9.25V12h3v1.5h-3v1.75h-1.5V13.5h-1V12h1v-.75h-1v-1.5h1v-4zM11 7.25H9.25v2.5H11a1.25 1.25 0 000-2.5z"
60
+ }));
61
+ };
62
+ var TimerIcon = function TimerIcon(props) {
63
+ return /*#__PURE__*/React.createElement("svg", (0, _extends2["default"])({
64
+ viewBox: "0 0 20 20"
65
+ }, props), /*#__PURE__*/React.createElement("path", {
66
+ fillRule: "evenodd",
67
+ clipRule: "evenodd",
68
+ d: "M10 18a8 8 0 100-16 8 8 0 000 16zm1-8.414V5H9v5.414l3 3L13.414 12 11 9.586z"
69
+ }));
70
+ };
71
+ var statusIconsMap = {
72
+ attention: AttentionIcon,
73
+ checkInvert: CheckInvertIcon,
74
+ info: InfoIcon,
75
+ price: PriceIcon,
76
+ profileFull: ProfileFullIcon,
77
+ timer: TimerIcon
78
+ };
79
+ var cn = (0, _uiHelpers.cnCreate)('mfui-status-badge');
80
+ var StatusBadge = function StatusBadge(_ref) {
81
+ var _ref$view = _ref.view,
82
+ view = _ref$view === void 0 ? 'dot' : _ref$view,
83
+ _ref$theme = _ref.theme,
84
+ theme = _ref$theme === void 0 ? 'green' : _ref$theme,
85
+ _ref$isAdaptive = _ref.isAdaptive,
86
+ isAdaptive = _ref$isAdaptive === void 0 ? false : _ref$isAdaptive,
87
+ _ref$iconType = _ref.iconType,
88
+ iconType = _ref$iconType === void 0 ? 'timer' : _ref$iconType,
89
+ tooltip = _ref.tooltip,
90
+ children = _ref.children,
91
+ className = _ref.className,
92
+ classes = _ref.classes,
93
+ dataAttrs = _ref.dataAttrs;
94
+ var triggerRef = React.useRef(null);
95
+ var _React$useState = React.useState(false),
96
+ _React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
97
+ isOpened = _React$useState2[0],
98
+ setIsOpened = _React$useState2[1];
99
+ var showIcon = view === 'icon';
100
+ var showArrow = showIcon && !!tooltip;
101
+ var StatusIconElement = statusIconsMap[iconType];
102
+ var handleOpen = React.useCallback(function (e) {
103
+ var _a;
104
+ setIsOpened(true);
105
+ (_a = tooltip === null || tooltip === void 0 ? void 0 : tooltip.onOpen) === null || _a === void 0 ? void 0 : _a.call(tooltip, e);
106
+ }, [tooltip]);
107
+ var handleClose = React.useCallback(function (e) {
108
+ var _a;
109
+ setIsOpened(false);
110
+ (_a = tooltip === null || tooltip === void 0 ? void 0 : tooltip.onClose) === null || _a === void 0 ? void 0 : _a.call(tooltip, e);
111
+ }, [tooltip]);
112
+ var handleCloseButtonClick = React.useCallback(function (e) {
113
+ var _a;
114
+ setIsOpened(false);
115
+ (_a = tooltip === null || tooltip === void 0 ? void 0 : tooltip.onCloseButtonClick) === null || _a === void 0 ? void 0 : _a.call(tooltip, e);
116
+ }, [tooltip]);
117
+ return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
118
+ className: cn({
119
+ view: view,
120
+ theme: theme,
121
+ adaptive: isAdaptive,
122
+ tooltip: !!tooltip,
123
+ opened: isOpened
124
+ }, [className, classes === null || classes === void 0 ? void 0 : classes.root])
125
+ }), /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.container), {
126
+ className: cn('container', [classes === null || classes === void 0 ? void 0 : classes.container]),
127
+ ref: triggerRef
128
+ }), showIcon && /*#__PURE__*/React.createElement(StatusIconElement, (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.icon), {
129
+ className: cn('icon')
130
+ })), /*#__PURE__*/React.createElement("div", {
131
+ className: cn('text')
132
+ }, children), showArrow && /*#__PURE__*/React.createElement(ArrowIcon, (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.arrow), {
133
+ className: cn('arrow')
134
+ }))), !!tooltip && /*#__PURE__*/React.createElement(_Tooltip["default"], {
135
+ className: cn('tooltip'),
136
+ title: tooltip.title,
137
+ text: tooltip.text,
138
+ buttonText: tooltip.buttonText,
139
+ isHiddenResize: tooltip.isHiddenResize,
140
+ isPortal: tooltip.isPortal,
141
+ portalSelector: tooltip.portalSelector,
142
+ triggerElement: triggerRef,
143
+ hasCloseButton: true,
144
+ placement: tooltip.placement || 'bottom',
145
+ fallbackPlacements: ['top', 'left', 'right'],
146
+ offset: "small",
147
+ triggerEvent: "click",
148
+ colorTheme: "blue",
149
+ onClick: tooltip.onClick,
150
+ onCloseButtonClick: handleCloseButtonClick,
151
+ onClose: handleClose,
152
+ onOpen: handleOpen,
153
+ dataAttrs: {
154
+ root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.tooltip,
155
+ button: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.tooltipButton,
156
+ close: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.tooltipCloseButton
157
+ },
158
+ classes: {
159
+ root: classes === null || classes === void 0 ? void 0 : classes.tooltip,
160
+ button: classes === null || classes === void 0 ? void 0 : classes.tooltipButton,
161
+ close: classes === null || classes === void 0 ? void 0 : classes.tooltipCloseButton
162
+ }
163
+ }));
164
+ };
165
+ var _default = exports["default"] = StatusBadge;
@@ -1 +1 @@
1
- h1,h2,h3,h4,h5{margin:0}@-webkit-keyframes listAppear{0%{opacity:0;-webkit-transform:translateY(-25px);transform:translateY(-25px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes listAppear{0%{opacity:0;-webkit-transform:translateY(-25px);transform:translateY(-25px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}.mfui-search{-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--content);font-family:inherit;font-size:15px;line-height:24px;min-height:40px;position:relative;z-index:auto}.mfui-search__require-mark{color:var(--fury);font-size:20px;line-height:0;margin-left:1px}.mfui-search__control{border:1px solid;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;outline:none;position:relative;-webkit-transition:border-color .3s;transition:border-color .3s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%;z-index:1}.mfui-search__field_labeled::-webkit-input-placeholder{color:var(--spbSky3);opacity:0;-webkit-transition:opacity .2s;transition:opacity .2s}.mfui-search__field_labeled::-moz-placeholder{color:var(--spbSky3);opacity:0;-moz-transition:opacity .2s;transition:opacity .2s}.mfui-search__field_labeled:-ms-input-placeholder{color:var(--spbSky3);opacity:0;-ms-transition:opacity .2s;transition:opacity .2s}.mfui-search__field_labeled::-ms-input-placeholder{color:var(--spbSky3);opacity:0;-ms-transition:opacity .2s;transition:opacity .2s}.mfui-search__field_labeled::placeholder{color:var(--spbSky3);opacity:0;-webkit-transition:opacity .2s;transition:opacity .2s}.mfui-search__field:focus::-webkit-input-placeholder{opacity:1}.mfui-search__field:focus::-moz-placeholder{opacity:1}.mfui-search__field:focus:-ms-input-placeholder{opacity:1}.mfui-search__field:focus::-ms-input-placeholder{opacity:1}.mfui-search__field:focus::placeholder{opacity:1}.mfui-search__field{display:block;position:relative;z-index:1;-webkit-box-flex:1;-ms-flex-positive:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:none;border-radius:0;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;caret-color:var(--brandGreen);color:var(--content);cursor:text;flex-grow:1;font-family:inherit;font-size:100%;height:100%;line-height:24px;opacity:1;outline:none;overflow:auto;padding:0;resize:none;width:100%}@media screen and (max-width:767px){.mfui-search__field{width:90%}}.mfui-search__label{color:var(--spbSky3);display:block;font-family:inherit;font-size:15px;line-height:24px;overflow:auto;pointer-events:none;position:absolute;-webkit-transition:scale .5s,top .01s,-webkit-transform .5s;transition:scale .5s,top .01s,-webkit-transform .5s;transition:transform .5s,scale .5s,top .01s;transition:transform .5s,scale .5s,top .01s,-webkit-transform .5s;z-index:1}.mfui-search__list{background-color:var(--base);border-radius:12px;-webkit-box-shadow:0 4px 12px rgba(0,0,0,.08);box-shadow:0 4px 12px rgba(0,0,0,.08);display:none;left:-1px;position:absolute;right:-1px;top:calc(100% + 1px);z-index:0}.mfui-search__clear,.mfui-search__submit-button{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;background-color:transparent;border:none;cursor:pointer;height:100%;justify-content:center;padding:0;text-align:center}.mfui-search__list-inner{-webkit-box-sizing:border-box;box-sizing:border-box;max-height:368px;overflow-y:auto;padding:16px}.mfui-search__list-item{background-color:var(--base);border-radius:16px;cursor:pointer;font-family:inherit;padding-bottom:12px;padding-top:12px}.mfui-search__list-item_paddings_large{padding-left:32px;padding-right:32px}.mfui-search__list-item_paddings_small{padding-left:12px;padding-right:12px}.mfui-search__popular-item{background-color:var(--base);border-radius:16px;cursor:pointer;min-height:48px;padding-left:12px;padding-right:16px;text-decoration:none}.mfui-search__popular-icon,.mfui-search__popular-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mfui-search__popular-icon{-ms-flex-negative:0;flex-shrink:0;-webkit-box-pack:center;-ms-flex-pack:center;height:32px;justify-content:center;margin-right:16px;width:32px}.mfui-search__list-item_active,.mfui-search__popular-item_active{background-color:var(--spbSky0)}.mfui-search__item-title,.mfui-search__popular-item-title{position:relative;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;overflow:hidden;white-space:nowrap}.mfui-search__item-title:after,.mfui-search__popular-item-title:after{background:var(--base);bottom:0;content:"";-webkit-mask-image:-webkit-gradient(linear,left top,right top,from(hsla(0,0%,100%,0)),to(var(--base)));-webkit-mask-image:linear-gradient(to right,hsla(0,0%,100%,0) 0,var(--base) 100%);mask-image:-webkit-gradient(linear,left top,right top,from(hsla(0,0%,100%,0)),to(var(--spbSky0)));mask-image:linear-gradient(to right,hsla(0,0%,100%,0) 0,var(--spbSky0) 100%);position:absolute;right:0;top:0;width:40px}.mfui-search__list-item_active .mfui-search__item-title:after,.mfui-search__popular-item_active .mfui-search__popular-item-title:after{background:var(--spbSky0);-webkit-mask-image:-webkit-gradient(linear,left top,right top,from(hsla(0,0%,100%,0)),to(var(--spbSky0)));-webkit-mask-image:linear-gradient(to right,hsla(0,0%,100%,0) 0,var(--spbSky0) 100%);mask-image:-webkit-gradient(linear,left top,right top,from(hsla(0,0%,100%,0)),to(var(--spbSky0)));mask-image:linear-gradient(to right,hsla(0,0%,100%,0) 0,var(--spbSky0) 100%)}.mfui-search__highlighted-fragment{font-weight:700}.mfui-search__notice{font-size:12px;line-height:16px;margin-top:4px}.mfui-search__notice_error{color:var(--fury)}.mfui-search__notice_success{color:var(--brandGreen)}.mfui-search__icons{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%}.mfui-search__list_not-found{cursor:default}.mfui-search__not-found-text{background-color:var(--base);color:var(--spbSky3);font-family:inherit;padding:12px 32px}.mfui-search__not-found-text_show-popular{border-bottom:1px solid var(--spbSky2);padding:0 0 16px}.mfui-search__popular-title{padding-bottom:8px;padding-top:16px}.mfui-search_open{z-index:12}.mfui-search_open .mfui-search__list{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-name:listAppear;animation-name:listAppear;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;display:block}.mfui-search_type_textfield .mfui-search__control{background-color:var(--base);border-color:var(--spbSky2);border-radius:12px;height:60px;padding:0 16px}.mfui-search_type_textfield .mfui-search__control:hover,.mfui-search_type_textfield .mfui-search__control_focused{border-color:var(--content)}.mfui-search_type_textfield .mfui-search__label{top:17px}.mfui-search_type_textfield .mfui-search__field:focus+.mfui-search__label,.mfui-search_type_textfield .mfui-search__field_filled+.mfui-search__label{-webkit-transform:scale(.8) translate(-12.5%,-75%);transform:scale(.8) translate(-12.5%,-75%);-webkit-transition:scale .2s,top .01s,-webkit-transform .2s;transition:scale .2s,top .01s,-webkit-transform .2s;transition:transform .2s,scale .2s,top .01s;transition:transform .2s,scale .2s,top .01s,-webkit-transform .2s}.mfui-search_type_textfield .mfui-search__field_labeled{padding-bottom:9px;padding-top:25px}.mfui-search_type_textfield .mfui-search__submit-icon{height:32px;width:32px;fill:var(--content)}.mfui-search_textarea .mfui-search__control{height:auto;min-height:60px}.mfui-search_textarea .mfui-search__field{-webkit-box-sizing:content-box;box-sizing:content-box;max-height:204px;padding-bottom:9px;padding-top:17px;scrollbar-color:var(--spbSky2) transparent;scrollbar-width:thin}.mfui-search_textarea .mfui-search__field_labeled{padding-bottom:9px;padding-top:25px}.mfui-search_textarea .mfui-search__icons{height:58px;margin-left:8px}.mfui-search_textarea .mfui-search__field_resized{-webkit-transition:height .1s;transition:height .1s;will-change:height}.mfui-search__textarea-wrapper{position:relative;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;overflow:hidden;width:100%}.mfui-search_type_textfield.mfui-search_disabled .mfui-search__control{background-color:var(--spbSky1);border-color:var(--spbSky1)}.mfui-search_type_textfield.mfui-search_disabled .mfui-search__submit-icon{opacity:.5;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mfui-search_type_compact .mfui-search__control{background-color:var(--spbSky0);border-color:var(--spbSky0);border-radius:24px;height:40px;padding:0 12px;-webkit-transition:background-color,border-color .3s;transition:background-color,border-color .3s}.mfui-search_type_compact .mfui-search__control:hover{background-color:var(--spbSky1)}.mfui-search_type_compact .mfui-search__field{height:100%;padding:8px 0 8px 12px}.mfui-search_type_compact .mfui-search__label{left:44px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.mfui-search_type_compact .mfui-search__field:focus+.mfui-search__label,.mfui-search_type_compact .mfui-search__field_filled+.mfui-search__label{opacity:0}.mfui-search_type_compact .mfui-search__submit-icon{height:20px;width:20px;fill:var(--spbSky3)}.mfui-search_type_compact .mfui-search__clear{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;background-color:transparent;border:none;cursor:pointer;height:24px;justify-content:center;margin-left:12px;padding:0;width:24px}.mfui-search_type_compact .mfui-search__clear-icon{height:24px;width:24px;fill:var(--spbSky3)}.mfui-search_type_compact .mfui-search__clear-icon:hover{fill:var(--content)}.mfui-search_type_compact .mfui-search__clear-icon:active{fill:var(--buttonDown)}.mfui-search_type_compact.mfui-search_open .mfui-search__control{background-color:var(--spbSky1)}.mfui-search_type_compact.mfui-search_open .mfui-search__submit-icon{fill:var(--content)}.mfui-search_disabled .mfui-search__control{cursor:default;pointer-events:none}.mfui-search_disabled .mfui-search__submit-icon{opacity:.5;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mfui-search_error .mfui-search__control{border-color:var(--fury)}.mfui-search_success .mfui-search__control{border-color:var(--brandGreen)}.mfui-search__resizer{bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;position:absolute;right:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-box-sizing:content-box;box-sizing:content-box;cursor:ns-resize;height:12px;justify-content:center;padding:4px;width:12px}.mfui-search__resizer svg{-webkit-transition:stroke .3s;transition:stroke .3s;stroke:var(--spbSky2)}.mfui-search__resizer:active svg,.mfui-search__resizer:hover svg{stroke:var(--spbSky3)}
1
+ h1,h2,h3,h4,h5{margin:0}@-webkit-keyframes listAppear{0%{opacity:0;-webkit-transform:translateY(-25px);transform:translateY(-25px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes listAppear{0%{opacity:0;-webkit-transform:translateY(-25px);transform:translateY(-25px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}.mfui-search{-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--content);font-family:inherit;font-size:15px;line-height:24px;min-height:40px;position:relative;z-index:auto}.mfui-search__require-mark{color:var(--fury);font-size:20px;line-height:0;margin-left:1px}.mfui-search__control{border:1px solid;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;outline:none;position:relative;-webkit-transition:border-color .3s;transition:border-color .3s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%;z-index:1}.mfui-search__field_labeled::-webkit-input-placeholder{color:var(--spbSky3);opacity:0;-webkit-transition:opacity .2s;transition:opacity .2s}.mfui-search__field_labeled::-moz-placeholder{color:var(--spbSky3);opacity:0;-moz-transition:opacity .2s;transition:opacity .2s}.mfui-search__field_labeled:-ms-input-placeholder{color:var(--spbSky3);opacity:0;-ms-transition:opacity .2s;transition:opacity .2s}.mfui-search__field_labeled::-ms-input-placeholder{color:var(--spbSky3);opacity:0;-ms-transition:opacity .2s;transition:opacity .2s}.mfui-search__field_labeled::placeholder{color:var(--spbSky3);opacity:0;-webkit-transition:opacity .2s;transition:opacity .2s}.mfui-search__field:focus::-webkit-input-placeholder{opacity:1}.mfui-search__field:focus::-moz-placeholder{opacity:1}.mfui-search__field:focus:-ms-input-placeholder{opacity:1}.mfui-search__field:focus::-ms-input-placeholder{opacity:1}.mfui-search__field:focus::placeholder{opacity:1}.mfui-search__field{display:block;position:relative;z-index:1;-webkit-box-flex:1;-ms-flex-positive:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:none;border-radius:0;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;caret-color:var(--brandGreen);color:var(--content);cursor:text;flex-grow:1;font-family:inherit;font-size:100%;height:100%;line-height:24px;opacity:1;outline:none;overflow:auto;padding:0;resize:none;width:100%}@media screen and (max-width:767px){.mfui-search__field{width:90%}}.mfui-search__label{color:var(--spbSky3);display:block;font-family:inherit;font-size:15px;line-height:24px;overflow:auto;pointer-events:none;position:absolute;-webkit-transition:scale .5s,top .01s,-webkit-transform .5s;transition:scale .5s,top .01s,-webkit-transform .5s;transition:transform .5s,scale .5s,top .01s;transition:transform .5s,scale .5s,top .01s,-webkit-transform .5s;z-index:1}.mfui-search__list{background-color:var(--base);border-radius:12px;-webkit-box-shadow:0 4px 12px rgba(0,0,0,.08);box-shadow:0 4px 12px rgba(0,0,0,.08);display:none;left:-1px;position:absolute;right:-1px;top:calc(100% + 1px);z-index:0}.mfui-search__clear,.mfui-search__submit-button{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;background-color:transparent;border:none;cursor:pointer;height:100%;justify-content:center;padding:0;text-align:center}.mfui-search__list-inner{-webkit-box-sizing:border-box;box-sizing:border-box;max-height:368px;overflow-y:auto;padding:16px;scrollbar-width:none}.mfui-search__list-inner::-webkit-scrollbar{display:none}.mfui-search__list-item{background-color:var(--base);border-radius:16px;cursor:pointer;font-family:inherit;padding-bottom:12px;padding-top:12px}.mfui-search__list-item_paddings_large{padding-left:32px;padding-right:32px}.mfui-search__list-item_paddings_small{padding-left:12px;padding-right:12px}.mfui-search__popular-item{background-color:var(--base);border-radius:16px;cursor:pointer;min-height:48px;padding-left:12px;padding-right:16px;text-decoration:none}.mfui-search__popular-icon,.mfui-search__popular-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mfui-search__popular-icon{-ms-flex-negative:0;flex-shrink:0;-webkit-box-pack:center;-ms-flex-pack:center;height:32px;justify-content:center;margin-right:16px;width:32px}.mfui-search__list-item_active,.mfui-search__popular-item_active{background-color:var(--spbSky0)}.mfui-search__item-title,.mfui-search__popular-item-title{position:relative;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;overflow:hidden;white-space:nowrap}.mfui-search__item-title:after,.mfui-search__popular-item-title:after{background:var(--base);bottom:0;content:"";-webkit-mask-image:-webkit-gradient(linear,left top,right top,from(hsla(0,0%,100%,0)),to(var(--base)));-webkit-mask-image:linear-gradient(to right,hsla(0,0%,100%,0) 0,var(--base) 100%);mask-image:-webkit-gradient(linear,left top,right top,from(hsla(0,0%,100%,0)),to(var(--spbSky0)));mask-image:linear-gradient(to right,hsla(0,0%,100%,0) 0,var(--spbSky0) 100%);position:absolute;right:0;top:0;width:40px}.mfui-search__list-item_active .mfui-search__item-title:after,.mfui-search__popular-item_active .mfui-search__popular-item-title:after{background:var(--spbSky0);-webkit-mask-image:-webkit-gradient(linear,left top,right top,from(hsla(0,0%,100%,0)),to(var(--spbSky0)));-webkit-mask-image:linear-gradient(to right,hsla(0,0%,100%,0) 0,var(--spbSky0) 100%);mask-image:-webkit-gradient(linear,left top,right top,from(hsla(0,0%,100%,0)),to(var(--spbSky0)));mask-image:linear-gradient(to right,hsla(0,0%,100%,0) 0,var(--spbSky0) 100%)}.mfui-search__highlighted-fragment{font-weight:700}.mfui-search__notice{font-size:12px;line-height:16px;margin-top:4px}.mfui-search__notice_error{color:var(--fury)}.mfui-search__notice_success{color:var(--brandGreen)}.mfui-search__icons{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%}.mfui-search__list_not-found{cursor:default}.mfui-search__not-found-text{background-color:var(--base);color:var(--spbSky3);font-family:inherit;padding:12px 32px}.mfui-search__not-found-text_show-popular{border-bottom:1px solid var(--spbSky2);padding:0 0 16px}.mfui-search__popular-title{padding-bottom:8px;padding-top:16px}.mfui-search_open{z-index:12}.mfui-search_open .mfui-search__list{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-name:listAppear;animation-name:listAppear;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;display:block}.mfui-search_type_textfield .mfui-search__control{background-color:var(--base);border-color:var(--spbSky2);border-radius:12px;height:60px;padding:0 16px}.mfui-search_type_textfield .mfui-search__control:hover,.mfui-search_type_textfield .mfui-search__control_focused{border-color:var(--content)}.mfui-search_type_textfield .mfui-search__label{top:17px}.mfui-search_type_textfield .mfui-search__field:focus+.mfui-search__label,.mfui-search_type_textfield .mfui-search__field_filled+.mfui-search__label{-webkit-transform:scale(.8) translate(-12.5%,-75%);transform:scale(.8) translate(-12.5%,-75%);-webkit-transition:scale .2s,top .01s,-webkit-transform .2s;transition:scale .2s,top .01s,-webkit-transform .2s;transition:transform .2s,scale .2s,top .01s;transition:transform .2s,scale .2s,top .01s,-webkit-transform .2s}.mfui-search_type_textfield .mfui-search__field_labeled{padding-bottom:9px;padding-top:25px}.mfui-search_type_textfield .mfui-search__submit-icon{height:32px;width:32px;fill:var(--content)}.mfui-search_textarea .mfui-search__control{height:auto;min-height:60px}.mfui-search_textarea .mfui-search__field{-webkit-box-sizing:content-box;box-sizing:content-box;max-height:204px;padding-bottom:9px;padding-top:17px;scrollbar-color:var(--spbSky2) transparent;scrollbar-width:thin}.mfui-search_textarea .mfui-search__field_labeled{padding-bottom:9px;padding-top:25px}.mfui-search_textarea .mfui-search__icons{height:58px;margin-left:8px}.mfui-search_textarea .mfui-search__field_resized{-webkit-transition:height .1s;transition:height .1s;will-change:height}.mfui-search__textarea-wrapper{position:relative;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;overflow:hidden;width:100%}.mfui-search_type_textfield.mfui-search_disabled .mfui-search__control{background-color:var(--spbSky1);border-color:var(--spbSky1)}.mfui-search_type_textfield.mfui-search_disabled .mfui-search__submit-icon{opacity:.5;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mfui-search_type_compact .mfui-search__control{background-color:var(--spbSky0);border-color:var(--spbSky0);border-radius:24px;height:40px;padding:0 12px;-webkit-transition:background-color,border-color .3s;transition:background-color,border-color .3s}.mfui-search_type_compact .mfui-search__control:hover{background-color:var(--spbSky1)}.mfui-search_type_compact .mfui-search__field{height:100%;padding:8px 0 8px 12px}.mfui-search_type_compact .mfui-search__label{left:44px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.mfui-search_type_compact .mfui-search__field:focus+.mfui-search__label,.mfui-search_type_compact .mfui-search__field_filled+.mfui-search__label{opacity:0}.mfui-search_type_compact .mfui-search__submit-icon{height:20px;width:20px;fill:var(--spbSky3)}.mfui-search_type_compact .mfui-search__clear{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;background-color:transparent;border:none;cursor:pointer;height:24px;justify-content:center;margin-left:12px;padding:0;width:24px}.mfui-search_type_compact .mfui-search__clear-icon{height:24px;width:24px;fill:var(--spbSky3)}.mfui-search_type_compact .mfui-search__clear-icon:hover{fill:var(--content)}.mfui-search_type_compact .mfui-search__clear-icon:active{fill:var(--buttonDown)}.mfui-search_type_compact.mfui-search_open .mfui-search__control{background-color:var(--spbSky1)}.mfui-search_type_compact.mfui-search_open .mfui-search__submit-icon{fill:var(--content)}.mfui-search_disabled .mfui-search__control{cursor:default;pointer-events:none}.mfui-search_disabled .mfui-search__submit-icon{opacity:.5;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mfui-search_error .mfui-search__control{border-color:var(--fury)}.mfui-search_success .mfui-search__control{border-color:var(--brandGreen)}.mfui-search__resizer{bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;position:absolute;right:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-box-sizing:content-box;box-sizing:content-box;cursor:ns-resize;height:12px;justify-content:center;padding:4px;width:12px}.mfui-search__resizer svg{-webkit-transition:stroke .3s;transition:stroke .3s;stroke:var(--spbSky2)}.mfui-search__resizer:active svg,.mfui-search__resizer:hover svg{stroke:var(--spbSky3)}
@@ -70,6 +70,8 @@ export interface ISearchProps {
70
70
  noticeText?: string | JSX.Element;
71
71
  /** Максимальное вводимое количество текста */
72
72
  maxLength?: number;
73
+ /** Максимальная высота для скролла */
74
+ maxHeightScrollBar?: number;
73
75
  /** Отключение поля ввода */
74
76
  disabled?: boolean;
75
77
  /** Делает поле обязательным */
@@ -24,6 +24,7 @@ var _throttleTime = _interopRequireDefault(require("../../constants/throttleTime
24
24
  var _Caption = _interopRequireDefault(require("../Caption/Caption"));
25
25
  var _Header = _interopRequireDefault(require("../Header/Header"));
26
26
  var _Preloader = _interopRequireDefault(require("../Preloader/Preloader"));
27
+ var _ScrollBar = _interopRequireDefault(require("../ScrollBar/ScrollBar"));
27
28
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
28
29
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
29
30
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
@@ -95,6 +96,8 @@ var Search = function Search(_ref) {
95
96
  required = _ref.required,
96
97
  noticeText = _ref.noticeText,
97
98
  maxLength = _ref.maxLength,
99
+ _ref$maxHeightScrollB = _ref.maxHeightScrollBar,
100
+ maxHeightScrollBar = _ref$maxHeightScrollB === void 0 ? 350 : _ref$maxHeightScrollB,
98
101
  className = _ref.className,
99
102
  classes = _ref.classes,
100
103
  _ref$type = _ref.type,
@@ -434,6 +437,8 @@ var Search = function Search(_ref) {
434
437
  ref: listRef
435
438
  }, /*#__PURE__*/React.createElement("div", {
436
439
  className: cn('list-inner', [classes === null || classes === void 0 ? void 0 : classes.listInner])
440
+ }, /*#__PURE__*/React.createElement(_ScrollBar["default"], {
441
+ maxHeight: maxHeightScrollBar
437
442
  }, items.map(function (_ref2, i) {
438
443
  var itemValue = _ref2.value,
439
444
  searchView = _ref2.searchView,
@@ -451,7 +456,7 @@ var Search = function Search(_ref) {
451
456
  }), /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.itemTitle, i + 1), {
452
457
  className: cn('item-title', [classes === null || classes === void 0 ? void 0 : classes.listItemTitle])
453
458
  }), searchView || highlightString(itemValue)));
454
- })));
459
+ }))));
455
460
  };
456
461
  var renderPopularItems = function renderPopularItems() {
457
462
  return /*#__PURE__*/React.createElement("div", {
@@ -43,7 +43,7 @@ try {
43
43
  SwiperSlide = SwiperAll.SwiperSlide;
44
44
  } catch (e) {
45
45
  // eslint-disable-next-line no-console
46
- console.warn("\n WARNING: megafon/ui-core is using the latest version of swiper. \n For more information about server-side rendering\n please check the Tabs component documentation at:\n https://ui.megafon.ru/components/tabs\n ");
46
+ console.warn("\n WARNING: megafon/ui-core is using the latest version of swiper.\n For more information about server-side rendering\n please check the Tabs component documentation at:\n https://ui.megafon.ru/components/tabs\n ");
47
47
  }
48
48
  var TabAlign = exports.TabAlign = {
49
49
  LEFT: 'left',
@@ -229,7 +229,11 @@ var Tabs = function Tabs(_ref) {
229
229
  if (outerIndex === undefined) {
230
230
  setInnerIndex(index);
231
231
  }
232
- swiperInstance === null || swiperInstance === void 0 ? void 0 : swiperInstance.slideTo(index);
232
+ if (index > 0 && window.innerWidth > _uiHelpers.breakpoints.MOBILE_BIG_END) {
233
+ swiperInstance === null || swiperInstance === void 0 ? void 0 : swiperInstance.slideTo(index - 1);
234
+ } else {
235
+ swiperInstance === null || swiperInstance === void 0 ? void 0 : swiperInstance.slideTo(index);
236
+ }
233
237
  };
234
238
  }, [onTabClick, outerIndex, swiperInstance]);
235
239
  var handleSwiper = React.useCallback(function (swiper) {
@@ -62,6 +62,7 @@ export { default as SliderScale } from './components/Sliders/components/SliderSc
62
62
  export { default as slidesSettings } from './components/Banner/slidesSettings';
63
63
  export { default as Snackbar } from './components/Snackbar/Snackbar';
64
64
  export { default as SnackbarTimer } from './components/Snackbar/SnackbarTimer/SnackbarTimer';
65
+ export { default as StatusBadge } from './components/Badges/StatusBadge/StatusBadge';
65
66
  export { default as Switcher } from './components/Switcher/Switcher';
66
67
  export { default as Tab } from './components/Tabs/Tab';
67
68
  export { default as Tabs } from './components/Tabs/Tabs';
package/dist/lib/index.js CHANGED
@@ -363,6 +363,12 @@ Object.defineProperty(exports, "SnackbarTimer", {
363
363
  return _SnackbarTimer["default"];
364
364
  }
365
365
  });
366
+ Object.defineProperty(exports, "StatusBadge", {
367
+ enumerable: true,
368
+ get: function get() {
369
+ return _StatusBadge["default"];
370
+ }
371
+ });
366
372
  Object.defineProperty(exports, "Switcher", {
367
373
  enumerable: true,
368
374
  get: function get() {
@@ -559,6 +565,7 @@ var _SliderScale = _interopRequireDefault(require("./components/Sliders/componen
559
565
  var _slidesSettings = _interopRequireDefault(require("./components/Banner/slidesSettings"));
560
566
  var _Snackbar = _interopRequireDefault(require("./components/Snackbar/Snackbar"));
561
567
  var _SnackbarTimer = _interopRequireDefault(require("./components/Snackbar/SnackbarTimer/SnackbarTimer"));
568
+ var _StatusBadge = _interopRequireDefault(require("./components/Badges/StatusBadge/StatusBadge"));
562
569
  var _Switcher = _interopRequireDefault(require("./components/Switcher/Switcher"));
563
570
  var _Tab = _interopRequireDefault(require("./components/Tabs/Tab"));
564
571
  var _Tabs = _interopRequireDefault(require("./components/Tabs/Tabs"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megafon/ui-core",
3
- "version": "8.1.1",
3
+ "version": "8.2.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": "^3.8.1",
53
+ "@megafon/ui-icons": "^3.9.0",
54
54
  "@svgr/core": "^2.4.1",
55
55
  "@testing-library/jest-dom": "^6.5.0",
56
56
  "@testing-library/react": "^16.0.1",
@@ -104,5 +104,5 @@
104
104
  "simplebar-react": "^3.2.5",
105
105
  "swiper": "^11.1.1"
106
106
  },
107
- "gitHead": "8f7c745516c705fbacf35241c8470de2ce8be671"
107
+ "gitHead": "bf090c9d8db62ae578449898acfd83da9f5b0e55"
108
108
  }
package/styles/colors.css CHANGED
@@ -93,7 +93,7 @@
93
93
  --spbSky2: #595959;
94
94
  --spbSky3: #999999;
95
95
  --lime: #AAFF00;
96
- --sky: #3CB9FF;
96
+ --sky: #3CB9FF;
97
97
  --night: #1E64AA;
98
98
  --berry: #AA5AFF;
99
99
  --flamingo: #E64DE6;