@megafon/ui-core 9.0.0-alpha.1 → 9.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/components/Avatar/Avatar.css +1 -1
- package/dist/es/components/Avatar/Avatar.d.ts +1 -1
- package/dist/es/components/Banner/Banner.css +1 -1
- package/dist/es/components/Banner/Banner.d.ts +0 -7
- package/dist/es/components/Banner/Banner.js +16 -8
- package/dist/es/components/Buttons/Button/Button.css +1 -0
- package/dist/{lib/components → es/components/Buttons}/Button/Button.d.ts +1 -0
- package/dist/es/components/{Button → Buttons/Button}/Button.js +3 -2
- package/dist/es/components/Buttons/ButtonClose/ButtonClose.css +1 -0
- package/dist/es/components/Buttons/ButtonClose/ButtonClose.d.ts +34 -0
- package/dist/es/components/Buttons/ButtonClose/ButtonClose.js +70 -0
- package/dist/es/components/Chips/Chips/Chip.css +1 -1
- package/dist/es/components/Chips/Chips/Chip.d.ts +9 -1
- package/dist/es/components/Chips/Chips/Chip.js +8 -1
- package/dist/es/components/Chips/Chips/Chips.d.ts +12 -1
- package/dist/es/components/Chips/Chips/Chips.js +20 -6
- package/dist/es/components/Chips/Chips/components/ChipsDropdown/ChipsDropdown.css +1 -1
- package/dist/es/components/Chips/Chips/components/ChipsDropdown/ChipsDropdown.d.ts +12 -4
- package/dist/es/components/Chips/Chips/components/ChipsDropdown/ChipsDropdown.js +55 -47
- package/dist/es/components/Chips/Chips/components/ChipsScrollPanel/ChipsScrollPanel.d.ts +2 -1
- package/dist/es/components/Chips/Chips/components/ChipsScrollPanel/ChipsScrollPanel.js +2 -0
- package/dist/es/components/ContentView/ContentView.js +1 -1
- package/dist/es/components/Counter/Counter.css +1 -1
- package/dist/es/components/Counter/Counter.d.ts +2 -0
- package/dist/es/components/Counter/Counter.js +4 -1
- package/dist/es/components/Dropdown/Dropdown.css +1 -0
- package/dist/es/components/Dropdown/Dropdown.d.ts +62 -0
- package/dist/es/components/Dropdown/Dropdown.js +119 -0
- package/dist/es/components/ErrorLoad/ErrorLoad.d.ts +1 -1
- package/dist/es/components/ErrorLoad/ErrorLoad.js +1 -1
- package/dist/es/components/ListData/ListData.css +1 -1
- package/dist/es/components/ListData/ListData.d.ts +9 -1
- package/dist/es/components/ListData/ListData.js +8 -0
- package/dist/es/components/Modal/Modal.css +1 -1
- package/dist/es/components/Modal/_ModalContent/ModalContent.js +4 -1
- package/dist/es/components/Modal/_ModalMobileBottom/ModalMobileBottom.js +18 -3
- package/dist/es/components/Notification/Notification.js +1 -1
- package/dist/es/components/Parameter/Parameter.css +1 -1
- package/dist/es/components/Parameter/Parameter.js +6 -4
- package/dist/es/components/Snackbar/Snackbar.js +1 -1
- package/dist/es/components/Tooltip/Tooltip.css +1 -1
- package/dist/es/components/Tooltip/Tooltip.js +5 -13
- package/dist/es/components/UploadForm/UploadField/components/_UploadFieldDropArea/UploadFieldDropArea.css +1 -1
- package/dist/es/components/UploadForm/UploadFileItem/UploadFileItem.css +1 -1
- package/dist/es/index.d.ts +3 -1
- package/dist/es/index.js +3 -1
- package/dist/lib/components/Avatar/Avatar.css +1 -1
- package/dist/lib/components/Avatar/Avatar.d.ts +1 -1
- package/dist/lib/components/Banner/Banner.css +1 -1
- package/dist/lib/components/Banner/Banner.d.ts +0 -7
- package/dist/lib/components/Banner/Banner.js +16 -8
- package/dist/lib/components/Buttons/Button/Button.css +1 -0
- package/dist/{es/components → lib/components/Buttons}/Button/Button.d.ts +1 -0
- package/dist/lib/components/{Button → Buttons/Button}/Button.js +3 -2
- package/dist/lib/components/Buttons/ButtonClose/ButtonClose.css +1 -0
- package/dist/lib/components/Buttons/ButtonClose/ButtonClose.d.ts +34 -0
- package/dist/lib/components/Buttons/ButtonClose/ButtonClose.js +79 -0
- package/dist/lib/components/Chips/Chips/Chip.css +1 -1
- package/dist/lib/components/Chips/Chips/Chip.d.ts +9 -1
- package/dist/lib/components/Chips/Chips/Chip.js +9 -2
- package/dist/lib/components/Chips/Chips/Chips.d.ts +12 -1
- package/dist/lib/components/Chips/Chips/Chips.js +20 -6
- package/dist/lib/components/Chips/Chips/components/ChipsDropdown/ChipsDropdown.css +1 -1
- package/dist/lib/components/Chips/Chips/components/ChipsDropdown/ChipsDropdown.d.ts +12 -4
- package/dist/lib/components/Chips/Chips/components/ChipsDropdown/ChipsDropdown.js +55 -47
- package/dist/lib/components/Chips/Chips/components/ChipsScrollPanel/ChipsScrollPanel.d.ts +2 -1
- package/dist/lib/components/Chips/Chips/components/ChipsScrollPanel/ChipsScrollPanel.js +2 -0
- package/dist/lib/components/ContentView/ContentView.js +1 -1
- package/dist/lib/components/Counter/Counter.css +1 -1
- package/dist/lib/components/Counter/Counter.d.ts +2 -0
- package/dist/lib/components/Counter/Counter.js +4 -1
- package/dist/lib/components/Dropdown/Dropdown.css +1 -0
- package/dist/lib/components/Dropdown/Dropdown.d.ts +62 -0
- package/dist/lib/components/Dropdown/Dropdown.js +128 -0
- package/dist/lib/components/ErrorLoad/ErrorLoad.d.ts +1 -1
- package/dist/lib/components/ErrorLoad/ErrorLoad.js +1 -1
- package/dist/lib/components/ListData/ListData.css +1 -1
- package/dist/lib/components/ListData/ListData.d.ts +9 -1
- package/dist/lib/components/ListData/ListData.js +8 -0
- package/dist/lib/components/Modal/Modal.css +1 -1
- package/dist/lib/components/Modal/_ModalContent/ModalContent.js +4 -1
- package/dist/lib/components/Modal/_ModalMobileBottom/ModalMobileBottom.js +18 -3
- package/dist/lib/components/Notification/Notification.js +1 -1
- package/dist/lib/components/Parameter/Parameter.css +1 -1
- package/dist/lib/components/Parameter/Parameter.js +6 -4
- package/dist/lib/components/Snackbar/Snackbar.js +1 -1
- package/dist/lib/components/Tooltip/Tooltip.css +1 -1
- package/dist/lib/components/Tooltip/Tooltip.js +5 -13
- package/dist/lib/components/UploadForm/UploadField/components/_UploadFieldDropArea/UploadFieldDropArea.css +1 -1
- package/dist/lib/components/UploadForm/UploadFileItem/UploadFileItem.css +1 -1
- package/dist/lib/index.d.ts +3 -1
- package/dist/lib/index.js +15 -1
- package/package.json +2 -2
- package/dist/es/components/Button/Button.css +0 -1
- package/dist/lib/components/Button/Button.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-9-avatar{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;position:relative;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;border-radius:
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-avatar{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;position:relative;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;border-radius:12px;-webkit-box-sizing:border-box;box-sizing:border-box;font-size:15px;font-weight:500;height:40px;justify-content:center;overflow:hidden;width:40px}.mfui-9-avatar__text{display:block}.mfui-9-avatar__image{background-color:var(--base);height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.mfui-9-avatar__placeholder{opacity:.3}.mfui-9-avatar_color_green{background-color:var(--brandGreen20);color:var(--brandGreen)}.mfui-9-avatar_color_green .mfui-9-avatar__placeholder{fill:var(--brandGreen)}.mfui-9-avatar_color_gray{background-color:var(--spbSky0);color:var(--spbSky3)}.mfui-9-avatar_color_gray .mfui-9-avatar__placeholder{fill:var(--spbSky3)}.mfui-9-avatar_color_white{background-color:var(--stcWhite);color:var(--spbSky3)}.mfui-9-avatar_color_white .mfui-9-avatar__placeholder{fill:var(--spbSky3)}.mfui-9-avatar_size_auto{font-size:inherit;height:100%;width:100%}.mfui-9-avatar_size_small{font-size:12px;height:32px;width:32px}.mfui-9-avatar_default{display:block}.mfui-9-avatar_default svg{margin:auto}
|
|
@@ -10,7 +10,7 @@ export interface IAvatarProps {
|
|
|
10
10
|
/** Цвет заливки */
|
|
11
11
|
color?: 'green' | 'gray' | 'white';
|
|
12
12
|
/** Размер (по умолчанию 40х40 пикселей). */
|
|
13
|
-
size?: 'default' | 'auto';
|
|
13
|
+
size?: 'default' | 'auto' | 'small';
|
|
14
14
|
/** Дополнительный класс корневого элемента */
|
|
15
15
|
className?: string;
|
|
16
16
|
/** Дополнительные data атрибуты к внутренним элементам */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-9-banner{position:relative}.mfui-9-banner .swiper-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex}.mfui-9-banner .mfui-9-banner__swiper-container{position:relative}.mfui-9-banner__swiper{overflow:hidden}.mfui-9-banner__slide{-ms-flex-negative:0;flex-shrink:0;height:500px}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-9-banner__slide{height:420px}}@media screen and (min-width:1280px){.mfui-9-banner__slide{height:400px}}.mfui-9-banner__slide-content{border-right:1px solid transparent;margin-right:-1px}@media screen and (max-width:1023px){.mfui-9-banner__slide-content{height:100%}}.mfui-9-banner_auto-height .mfui-9-banner__slide{height:auto}.mfui-9-banner .mfui-9-banner__arrow{position:absolute;top:50%;-webkit-transition:scale .2s linear;transition:scale .2s linear;translate:0 -50%;z-index:10}@media screen and (max-width:767px){.mfui-9-banner .mfui-9-banner__arrow{display:none}}@media screen and (max-width:1023px){.mfui-9-banner .mfui-9-banner__arrow_theme_white{display:none}}.mfui-9-banner .mfui-9-banner__arrow_prev{left:12px}@media screen and (max-width:767px){.mfui-9-banner .mfui-9-banner__arrow_prev{left:8px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-9-banner .mfui-9-banner__arrow_prev{left:16px}}@media screen and (min-width:1280px){.mfui-9-banner .mfui-9-banner__arrow_prev{left:20px}}.mfui-9-banner .mfui-9-banner__arrow_next{right:12px}@media screen and (max-width:767px){.mfui-9-banner .mfui-9-banner__arrow_next{right:8px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-9-banner .mfui-9-banner__arrow_next{right:16px}}@media screen and (min-width:1280px){.mfui-9-banner .mfui-9-banner__arrow_next{right:20px}}.mfui-9-banner .mfui-9-banner__arrow_prev.mfui-9-banner__arrow_theme_white{left:0;translate:-50% -50%}.mfui-9-banner .mfui-9-banner__arrow_next.mfui-9-banner__arrow_theme_white{right:0;translate:50% -50%}.mfui-9-banner_no-touch .mfui-9-banner__arrow_theme_white:hover{scale:1.25}.mfui-9-banner_no-touch .mfui-9-banner__arrow_theme_white:active{scale:1.125}.mfui-9-banner__pagination{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px;left:50%;z-index:10;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-box-sizing:border-box;box-sizing:border-box;justify-content:center;margin-top:32px}.mfui-9-banner__pagination_position_top-in{left:0;margin-top:0;padding:0 24px;position:absolute;top:16px;width:100%}@media screen and (min-width:1280px){.mfui-9-banner__pagination_position_top-in{padding:0 80px}}.mfui-9-banner__pagination_type_flat{gap:4px}@media screen and (min-width:1280px){.mfui-9-banner__pagination_type_flat{gap:10px}}.mfui-9-
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-banner{position:relative}.mfui-9-banner .swiper-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex}.mfui-9-banner .mfui-9-banner__swiper-container{position:relative}.mfui-9-banner__swiper{overflow:hidden}.mfui-9-banner__slide{-ms-flex-negative:0;flex-shrink:0;height:500px}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-9-banner__slide{height:420px}}@media screen and (min-width:1280px){.mfui-9-banner__slide{height:400px}}.mfui-9-banner__slide-content{border-right:1px solid transparent;margin-right:-1px}@media screen and (max-width:1023px){.mfui-9-banner__slide-content{height:100%}}.mfui-9-banner_auto-height .mfui-9-banner__slide{height:auto}.mfui-9-banner .mfui-9-banner__arrow{position:absolute;top:50%;-webkit-transition:scale .2s linear;transition:scale .2s linear;translate:0 -50%;z-index:10}@media screen and (max-width:767px){.mfui-9-banner .mfui-9-banner__arrow{display:none}}@media screen and (max-width:1023px){.mfui-9-banner .mfui-9-banner__arrow_theme_white{display:none}}.mfui-9-banner .mfui-9-banner__arrow_prev{left:12px}@media screen and (max-width:767px){.mfui-9-banner .mfui-9-banner__arrow_prev{left:8px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-9-banner .mfui-9-banner__arrow_prev{left:16px}}@media screen and (min-width:1280px){.mfui-9-banner .mfui-9-banner__arrow_prev{left:20px}}.mfui-9-banner .mfui-9-banner__arrow_next{right:12px}@media screen and (max-width:767px){.mfui-9-banner .mfui-9-banner__arrow_next{right:8px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-9-banner .mfui-9-banner__arrow_next{right:16px}}@media screen and (min-width:1280px){.mfui-9-banner .mfui-9-banner__arrow_next{right:20px}}.mfui-9-banner .mfui-9-banner__arrow_prev.mfui-9-banner__arrow_theme_white{left:0;translate:-50% -50%}.mfui-9-banner .mfui-9-banner__arrow_next.mfui-9-banner__arrow_theme_white{right:0;translate:50% -50%}.mfui-9-banner_no-touch .mfui-9-banner__arrow_theme_white:hover{scale:1.25}.mfui-9-banner_no-touch .mfui-9-banner__arrow_theme_white:active{scale:1.125}.mfui-9-banner__pagination{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px;left:50%;z-index:10;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-box-sizing:border-box;box-sizing:border-box;justify-content:center;margin-top:32px}.mfui-9-banner__pagination_position_top-in{left:0;margin-top:0;padding:0 24px;position:absolute;top:16px;width:100%}@media screen and (min-width:1280px){.mfui-9-banner__pagination_position_top-in{padding:0 80px}}.mfui-9-banner__pagination_type_flat{gap:4px}@media screen and (min-width:1280px){.mfui-9-banner__pagination_type_flat{gap:10px}}.mfui-9-banner__pagination_bottom-offset{bottom:60px;left:50%;position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%);z-index:10}@media screen and (min-width:768px) and (max-width:1023px){.mfui-9-banner__pagination_bottom-offset{bottom:89px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-9-banner__pagination_bottom-offset{bottom:90px}}@media screen and (min-width:1280px) and (max-width:1439px){.mfui-9-banner__pagination_bottom-offset{bottom:65px}}@media screen and (min-width:1440px){.mfui-9-banner__pagination_bottom-offset{bottom:72px}}.mfui-9-banner_margin-top{margin-top:24px}.mfui-9-banner_radius_rounded .mfui-9-banner__swiper{border-radius:24px}@media screen and (max-width:767px){.mfui-9-banner_show-next-slide .mfui-9-banner__swiper{border-radius:0;margin-left:-16px;margin-right:-16px;padding-left:16px;padding-right:32px}.mfui-9-banner_show-next-slide .mfui-9-banner__slide-content{border-right:none;margin-right:0}.mfui-9-banner_show-next-slide.mfui-9-banner_radius_rounded .mfui-9-banner__slide-content{border-radius:24px}}.mfui-9-banner_background-color_green .mfui-9-banner__swiper{background-color:var(--brandGreen)}.mfui-9-banner_background-color_purple .mfui-9-banner__swiper{background-color:var(--brandPurple)}.mfui-9-banner_background-color_gradient .mfui-9-banner__swiper{background:-webkit-gradient(linear,right top,left top,from(#ada6ba),to(#f6f2f9));background:linear-gradient(270deg,#ada6ba,#f6f2f9)}.mfui-9-banner_background-color_light .mfui-9-banner__swiper{background-color:#f6f2f9}.mfui-9-banner_background-color_spbSky0 .mfui-9-banner__swiper{background-color:var(--spbSky0)}
|
|
@@ -36,7 +36,6 @@ export declare const PaginationPositionType: {
|
|
|
36
36
|
readonly BOTTOM_OUT: "bottom-out";
|
|
37
37
|
readonly TOP_IN: "top-in";
|
|
38
38
|
};
|
|
39
|
-
type PaginationPositionType = (typeof PaginationPositionType)[keyof typeof PaginationPositionType];
|
|
40
39
|
export interface IBannerProps {
|
|
41
40
|
/** Сss класс для внешнего контейнера */
|
|
42
41
|
className?: string;
|
|
@@ -63,14 +62,8 @@ export interface IBannerProps {
|
|
|
63
62
|
dotSvg?: Record<string, string>;
|
|
64
63
|
dotInner?: Record<string, string>;
|
|
65
64
|
};
|
|
66
|
-
/** Выравнивание блока пагинации */
|
|
67
|
-
paginationAlign?: 'center' | 'left';
|
|
68
|
-
/** Цветовая тема пагинации */
|
|
69
|
-
paginationTheme?: PaginationThemeType;
|
|
70
65
|
/** Тип кнопок пагинации */
|
|
71
66
|
paginationType?: PaginationType;
|
|
72
|
-
/** Расположение пагинации */
|
|
73
|
-
paginationPosition?: PaginationPositionType;
|
|
74
67
|
/** Предполагается использование с наезжанием на баннер следующего за баннером элемента */
|
|
75
68
|
withPaginationBottomOffset?: boolean;
|
|
76
69
|
/** Автоматическая прокрутка */
|
|
@@ -22,7 +22,7 @@ try {
|
|
|
22
22
|
Autoplay = Modules.Autoplay;
|
|
23
23
|
} catch (e) {
|
|
24
24
|
// eslint-disable-next-line no-console
|
|
25
|
-
console.warn("\n WARNING: megafon/ui-core is using the latest version of swiper
|
|
25
|
+
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 Banner component documentation at:\n https://ui.megafon.ru/components/banner\n ");
|
|
26
26
|
}
|
|
27
27
|
export var BackgroundColor = {
|
|
28
28
|
TRANSPARENT: 'transparent',
|
|
@@ -59,10 +59,7 @@ var Banner = function Banner(_ref) {
|
|
|
59
59
|
_ref$classes = _ref.classes,
|
|
60
60
|
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
|
61
61
|
dataAttrs = _ref.dataAttrs,
|
|
62
|
-
paginationAlign = _ref.paginationAlign,
|
|
63
|
-
paginationTheme = _ref.paginationTheme,
|
|
64
62
|
paginationType = _ref.paginationType,
|
|
65
|
-
paginationPosition = _ref.paginationPosition,
|
|
66
63
|
_ref$withPaginationBo = _ref.withPaginationBottomOffset,
|
|
67
64
|
withPaginationBottomOffset = _ref$withPaginationBo === void 0 ? false : _ref$withPaginationBo,
|
|
68
65
|
_ref$autoPlay = _ref.autoPlay,
|
|
@@ -73,8 +70,7 @@ var Banner = function Banner(_ref) {
|
|
|
73
70
|
loop = _ref$loop === void 0 ? false : _ref$loop,
|
|
74
71
|
_ref$pauseOnHover = _ref.pauseOnHover,
|
|
75
72
|
pauseOnHover = _ref$pauseOnHover === void 0 ? false : _ref$pauseOnHover,
|
|
76
|
-
|
|
77
|
-
backgroundColor = _ref$backgroundColor === void 0 ? BackgroundColor.TRANSPARENT : _ref$backgroundColor,
|
|
73
|
+
backgroundColor = _ref.backgroundColor,
|
|
78
74
|
_ref$radius = _ref.radius,
|
|
79
75
|
radius = _ref$radius === void 0 ? Radius.ROUNDED : _ref$radius,
|
|
80
76
|
_ref$arrowTheme = _ref.arrowTheme,
|
|
@@ -130,6 +126,19 @@ var Banner = function Banner(_ref) {
|
|
|
130
126
|
var dotTimerDelay = delay / 1000;
|
|
131
127
|
var arrowSize = arrowTheme === ArrowTheme.WHITE ? ArrowSize.LARGE : ArrowSize.MIDDLE;
|
|
132
128
|
var rootRef = React.useRef(null);
|
|
129
|
+
var paginationPosition = paginationType === PaginationButtonType.FLAT ? PaginationPositionType.TOP_IN : PaginationPositionType.BOTTOM_OUT;
|
|
130
|
+
var getPaginationTheme = function getPaginationTheme() {
|
|
131
|
+
switch (backgroundColor) {
|
|
132
|
+
case BackgroundColor.GREEN:
|
|
133
|
+
case BackgroundColor.PURPLE:
|
|
134
|
+
return PaginationTheme.LIGHT;
|
|
135
|
+
case BackgroundColor.LIGHT:
|
|
136
|
+
case BackgroundColor.GRADIENT:
|
|
137
|
+
return PaginationTheme.DARK;
|
|
138
|
+
default:
|
|
139
|
+
return PaginationTheme.DEFAULT;
|
|
140
|
+
}
|
|
141
|
+
};
|
|
133
142
|
var increaseAutoplayDelay = React.useCallback(function (_ref2) {
|
|
134
143
|
var params = _ref2.params,
|
|
135
144
|
autoplay = _ref2.autoplay;
|
|
@@ -249,7 +258,6 @@ var Banner = function Banner(_ref) {
|
|
|
249
258
|
var renderPagination = /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.pagination), {
|
|
250
259
|
className: cn('pagination', {
|
|
251
260
|
type: paginationType,
|
|
252
|
-
align: paginationAlign,
|
|
253
261
|
position: paginationPosition,
|
|
254
262
|
'bottom-offset': withPaginationBottomOffset
|
|
255
263
|
}, [classes.pagination])
|
|
@@ -267,7 +275,7 @@ var Banner = function Banner(_ref) {
|
|
|
267
275
|
showTimer: showDotTimer,
|
|
268
276
|
timerDelay: dotTimerDelay,
|
|
269
277
|
type: paginationType,
|
|
270
|
-
theme:
|
|
278
|
+
theme: getPaginationTheme(),
|
|
271
279
|
onClick: handleDotClick
|
|
272
280
|
});
|
|
273
281
|
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:none;border-radius:30px;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--stcWhite);cursor:pointer;display:inline-block;font-family:inherit;font-size:15px;font-weight:500;line-height:24px;min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content;outline:none;overflow:hidden;padding:0 32px;text-align:center;text-decoration:none;-webkit-transition:background-color .3s,color .3s;transition:background-color .3s,color .3s;vertical-align:top;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mfui-9-button svg{display:block;-webkit-transition:fill .3s;transition:fill .3s}.mfui-9-button_size-all_extra-small{border-radius:8px;font-size:12px;height:24px;line-height:14px;min-width:24px;padding:0 16px}.mfui-9-button_size-all_extra-small .mfui-9-button__icon,.mfui-9-button_size-all_extra-small .mfui-9-button__icon-arrow,.mfui-9-button_size-all_extra-small.mfui-9-button_content-type_icon-text .mfui-9-button__icon{height:20px;width:20px}.mfui-9-button_size-all_extra-small.mfui-9-button_content-type_icon-text .mfui-9-button__icon{margin-right:2px}.mfui-9-button_size-all_extra-small .mfui-9-button__icon-arrow{margin-left:0}.mfui-9-button_size-all_small{border-radius:12px;height:40px;min-width:40px;padding:0 24px}.mfui-9-button_size-all_small .mfui-9-button__icon,.mfui-9-button_size-all_small .mfui-9-button__icon-arrow{height:20px;width:20px}.mfui-9-button_size-all_small.mfui-9-button_content-type_icon-text .mfui-9-button__icon{height:32px;width:32px}.mfui-9-button_size-all_medium{border-radius:16px;height:52px;min-width:52px}.mfui-9-button_size-all_medium .mfui-9-button__icon,.mfui-9-button_size-all_medium .mfui-9-button__icon-arrow,.mfui-9-button_size-all_medium.mfui-9-button_content-type_icon-text .mfui-9-button__icon{height:32px;width:32px}.mfui-9-button_size-all_large{border-radius:16px;height:60px;min-width:60px}.mfui-9-button_size-all_large .mfui-9-button__icon,.mfui-9-button_size-all_large .mfui-9-button__icon-arrow,.mfui-9-button_size-all_large.mfui-9-button_content-type_icon-text .mfui-9-button__icon{height:32px;width:32px}.mfui-9-button_size-all_extra-small.mfui-9-buttonhas-arrow{padding:0 8px}.mfui-9-button_size-all_extra-small.mfui-9-buttonhas-arrow .mfui-9-button__content{padding-left:12px}.mfui-9-button_size-all_large.mfui-9-buttonhas-arrow,.mfui-9-button_size-all_medium.mfui-9-buttonhas-arrow{padding:0 24px}.mfui-9-button_size-all_large.mfui-9-buttonhas-arrow .mfui-9-button__content,.mfui-9-button_size-all_medium.mfui-9-buttonhas-arrow .mfui-9-button__content,.mfui-9-button_size-all_small.mfui-9-buttonhas-arrow .mfui-9-button__content{padding-left:16px}.mfui-9-button_type_text{padding:0}@media screen and (min-width:1024px){.mfui-9-button_size-desktop_extra-small{border-radius:8px;font-size:12px;height:24px;line-height:14px;min-width:24px;padding:0 16px}.mfui-9-button_size-desktop_extra-small .mfui-9-button__icon,.mfui-9-button_size-desktop_extra-small .mfui-9-button__icon-arrow,.mfui-9-button_size-desktop_extra-small.mfui-9-button_content-type_icon-text .mfui-9-button__icon{height:20px;width:20px}.mfui-9-button_size-desktop_extra-small.mfui-9-button_content-type_icon-text .mfui-9-button__icon{margin-right:2px}.mfui-9-button_size-desktop_extra-small .mfui-9-button__icon-arrow{margin-left:0}.mfui-9-button_size-desktop_small{border-radius:12px;height:40px;min-width:40px;padding:0 24px}.mfui-9-button_size-desktop_small .mfui-9-button__icon,.mfui-9-button_size-desktop_small .mfui-9-button__icon-arrow{height:20px;width:20px}.mfui-9-button_size-desktop_small.mfui-9-button_content-type_icon-text .mfui-9-button__icon{height:32px;width:32px}.mfui-9-button_size-desktop_medium{border-radius:16px;height:52px;min-width:52px}.mfui-9-button_size-desktop_medium .mfui-9-button__icon,.mfui-9-button_size-desktop_medium .mfui-9-button__icon-arrow,.mfui-9-button_size-desktop_medium.mfui-9-button_content-type_icon-text .mfui-9-button__icon{height:32px;width:32px}.mfui-9-button_size-desktop_large{border-radius:16px;height:60px;min-width:60px}.mfui-9-button_size-desktop_large .mfui-9-button__icon,.mfui-9-button_size-desktop_large .mfui-9-button__icon-arrow,.mfui-9-button_size-desktop_large.mfui-9-button_content-type_icon-text .mfui-9-button__icon{height:32px;width:32px}.mfui-9-button_size-desktop_extra-small.mfui-9-buttonhas-arrow{padding:0 8px}.mfui-9-button_size-desktop_extra-small.mfui-9-buttonhas-arrow .mfui-9-button__content{padding-left:12px}.mfui-9-button_size-desktop_large.mfui-9-buttonhas-arrow,.mfui-9-button_size-desktop_medium.mfui-9-buttonhas-arrow{padding:0 24px}.mfui-9-button_size-desktop_large.mfui-9-buttonhas-arrow .mfui-9-button__content,.mfui-9-button_size-desktop_medium.mfui-9-buttonhas-arrow .mfui-9-button__content,.mfui-9-button_size-desktop_small.mfui-9-buttonhas-arrow .mfui-9-button__content{padding-left:16px}.mfui-9-button_type_text{padding:0}}@media screen and (min-width:1280px){.mfui-9-button_size-wide_extra-small{border-radius:8px;font-size:12px;height:24px;line-height:14px;min-width:24px;padding:0 16px}.mfui-9-button_size-wide_extra-small .mfui-9-button__icon,.mfui-9-button_size-wide_extra-small .mfui-9-button__icon-arrow,.mfui-9-button_size-wide_extra-small.mfui-9-button_content-type_icon-text .mfui-9-button__icon{height:20px;width:20px}.mfui-9-button_size-wide_extra-small.mfui-9-button_content-type_icon-text .mfui-9-button__icon{margin-right:2px}.mfui-9-button_size-wide_extra-small .mfui-9-button__icon-arrow{margin-left:0}.mfui-9-button_size-wide_small{border-radius:12px;height:40px;min-width:40px;padding:0 24px}.mfui-9-button_size-wide_small .mfui-9-button__icon,.mfui-9-button_size-wide_small .mfui-9-button__icon-arrow{height:20px;width:20px}.mfui-9-button_size-wide_small.mfui-9-button_content-type_icon-text .mfui-9-button__icon{height:32px;width:32px}.mfui-9-button_size-wide_medium{border-radius:16px;height:52px;min-width:52px}.mfui-9-button_size-wide_medium .mfui-9-button__icon,.mfui-9-button_size-wide_medium .mfui-9-button__icon-arrow,.mfui-9-button_size-wide_medium.mfui-9-button_content-type_icon-text .mfui-9-button__icon{height:32px;width:32px}.mfui-9-button_size-wide_large{border-radius:16px;height:60px;min-width:60px}.mfui-9-button_size-wide_large .mfui-9-button__icon,.mfui-9-button_size-wide_large .mfui-9-button__icon-arrow,.mfui-9-button_size-wide_large.mfui-9-button_content-type_icon-text .mfui-9-button__icon{height:32px;width:32px}.mfui-9-button_size-wide_extra-small.mfui-9-buttonhas-arrow{padding:0 8px}.mfui-9-button_size-wide_extra-small.mfui-9-buttonhas-arrow .mfui-9-button__content{padding-left:12px}.mfui-9-button_size-wide_large.mfui-9-buttonhas-arrow,.mfui-9-button_size-wide_medium.mfui-9-buttonhas-arrow{padding:0 24px}.mfui-9-button_size-wide_large.mfui-9-buttonhas-arrow .mfui-9-button__content,.mfui-9-button_size-wide_medium.mfui-9-buttonhas-arrow .mfui-9-button__content,.mfui-9-button_size-wide_small.mfui-9-buttonhas-arrow .mfui-9-button__content{padding-left:16px}.mfui-9-button_type_text{padding:0}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-9-button_size-tablet_extra-small{border-radius:8px;font-size:12px;height:24px;line-height:14px;min-width:24px;padding:0 16px}.mfui-9-button_size-tablet_extra-small .mfui-9-button__icon,.mfui-9-button_size-tablet_extra-small .mfui-9-button__icon-arrow,.mfui-9-button_size-tablet_extra-small.mfui-9-button_content-type_icon-text .mfui-9-button__icon{height:20px;width:20px}.mfui-9-button_size-tablet_extra-small.mfui-9-button_content-type_icon-text .mfui-9-button__icon{margin-right:2px}.mfui-9-button_size-tablet_extra-small .mfui-9-button__icon-arrow{margin-left:0}.mfui-9-button_size-tablet_small{border-radius:12px;height:40px;min-width:40px;padding:0 24px}.mfui-9-button_size-tablet_small .mfui-9-button__icon,.mfui-9-button_size-tablet_small .mfui-9-button__icon-arrow{height:20px;width:20px}.mfui-9-button_size-tablet_small.mfui-9-button_content-type_icon-text .mfui-9-button__icon{height:32px;width:32px}.mfui-9-button_size-tablet_medium{border-radius:16px;height:52px;min-width:52px}.mfui-9-button_size-tablet_medium .mfui-9-button__icon,.mfui-9-button_size-tablet_medium .mfui-9-button__icon-arrow,.mfui-9-button_size-tablet_medium.mfui-9-button_content-type_icon-text .mfui-9-button__icon{height:32px;width:32px}.mfui-9-button_size-tablet_large{border-radius:16px;height:60px;min-width:60px}.mfui-9-button_size-tablet_large .mfui-9-button__icon,.mfui-9-button_size-tablet_large .mfui-9-button__icon-arrow,.mfui-9-button_size-tablet_large.mfui-9-button_content-type_icon-text .mfui-9-button__icon{height:32px;width:32px}.mfui-9-button_size-tablet_extra-small.mfui-9-buttonhas-arrow{padding:0 8px}.mfui-9-button_size-tablet_extra-small.mfui-9-buttonhas-arrow .mfui-9-button__content{padding-left:12px}.mfui-9-button_size-tablet_large.mfui-9-buttonhas-arrow,.mfui-9-button_size-tablet_medium.mfui-9-buttonhas-arrow{padding:0 24px}.mfui-9-button_size-tablet_large.mfui-9-buttonhas-arrow .mfui-9-button__content,.mfui-9-button_size-tablet_medium.mfui-9-buttonhas-arrow .mfui-9-button__content,.mfui-9-button_size-tablet_small.mfui-9-buttonhas-arrow .mfui-9-button__content{padding-left:16px}.mfui-9-button_type_text{padding:0}}@media screen and (max-width:767px){.mfui-9-button_size-mobile_extra-small{border-radius:8px;font-size:12px;height:24px;line-height:14px;min-width:24px;padding:0 16px}.mfui-9-button_size-mobile_extra-small .mfui-9-button__icon,.mfui-9-button_size-mobile_extra-small .mfui-9-button__icon-arrow,.mfui-9-button_size-mobile_extra-small.mfui-9-button_content-type_icon-text .mfui-9-button__icon{height:20px;width:20px}.mfui-9-button_size-mobile_extra-small.mfui-9-button_content-type_icon-text .mfui-9-button__icon{margin-right:2px}.mfui-9-button_size-mobile_extra-small .mfui-9-button__icon-arrow{margin-left:0}.mfui-9-button_size-mobile_small{border-radius:12px;height:40px;min-width:40px;padding:0 24px}.mfui-9-button_size-mobile_small .mfui-9-button__icon,.mfui-9-button_size-mobile_small .mfui-9-button__icon-arrow{height:20px;width:20px}.mfui-9-button_size-mobile_small.mfui-9-button_content-type_icon-text .mfui-9-button__icon{height:32px;width:32px}.mfui-9-button_size-mobile_medium{border-radius:16px;height:52px;min-width:52px}.mfui-9-button_size-mobile_medium .mfui-9-button__icon,.mfui-9-button_size-mobile_medium .mfui-9-button__icon-arrow,.mfui-9-button_size-mobile_medium.mfui-9-button_content-type_icon-text .mfui-9-button__icon{height:32px;width:32px}.mfui-9-button_size-mobile_large{border-radius:16px;height:60px;min-width:60px}.mfui-9-button_size-mobile_large .mfui-9-button__icon,.mfui-9-button_size-mobile_large .mfui-9-button__icon-arrow,.mfui-9-button_size-mobile_large.mfui-9-button_content-type_icon-text .mfui-9-button__icon{height:32px;width:32px}.mfui-9-button_size-mobile_extra-small.mfui-9-buttonhas-arrow{padding:0 8px}.mfui-9-button_size-mobile_extra-small.mfui-9-buttonhas-arrow .mfui-9-button__content{padding-left:12px}.mfui-9-button_size-mobile_large.mfui-9-buttonhas-arrow,.mfui-9-button_size-mobile_medium.mfui-9-buttonhas-arrow{padding:0 24px}.mfui-9-button_size-mobile_large.mfui-9-buttonhas-arrow .mfui-9-button__content,.mfui-9-button_size-mobile_medium.mfui-9-buttonhas-arrow .mfui-9-button__content,.mfui-9-button_size-mobile_small.mfui-9-buttonhas-arrow .mfui-9-button__content{padding-left:16px}.mfui-9-button_type_text{padding:0}}.mfui-9-button:hover{text-decoration:none;-webkit-transition:background-color .3s,color .3s;transition:background-color .3s,color .3s}.mfui-9-button:hover svg{-webkit-transition:fill .3s;transition:fill .3s}.mfui-9-button_disabled{cursor:default}.mfui-9-button__inner{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-box-sizing:border-box;box-sizing:border-box;height:inherit;justify-content:center;vertical-align:top;width:100%}.mfui-9-button__text{margin-bottom:2px}.mfui-9-button__text_ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mfui-9-button__content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mfui-9-button__content_ellipsis{max-width:-webkit-fit-content;max-width:-moz-fit-content;max-width:fit-content;width:inherit}.mfui-9-button__content_show-loader{visibility:hidden}.mfui-9-button__preloader{position:absolute}.mfui-9-button__icon-arrow{height:32px;margin-left:4px;width:32px}.mfui-9-button_content-type_icon{padding:0}.mfui-9-button_content-type_icon-text .mfui-9-button__icon,.mfui-9-button_content-type_icon-text:not(.mfui-9-button_type_text) .mfui-9-button__text{margin-right:4px}.mfui-9-button_type_text.mfui-9-button_theme_green{background-color:transparent;color:var(--brandGreen);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.mfui-9-button_type_text.mfui-9-button_theme_green svg{fill:var(--brandGreen)}.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_theme_green:not(.mfui-9-button_loading):hover{color:var(--buttonHoverGreen)}.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_theme_green:not(.mfui-9-button_loading):hover svg{fill:var(--buttonHoverGreen)}.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_theme_green:not(.mfui-9-button_loading):active{color:var(--buttonDown)}.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_theme_green:not(.mfui-9-button_loading):active svg{fill:var(--buttonDown)}.mfui-9-button_type_text.mfui-9-button_theme_purple{background-color:transparent;color:var(--brandPurple);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.mfui-9-button_type_text.mfui-9-button_theme_purple svg{fill:var(--brandPurple)}.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_theme_purple:not(.mfui-9-button_loading):hover{color:var(--buttonHoverPurple)}.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_theme_purple:not(.mfui-9-button_loading):hover svg{fill:var(--buttonHoverPurple)}.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_theme_purple:not(.mfui-9-button_loading):active{color:var(--buttonDown)}.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_theme_purple:not(.mfui-9-button_loading):active svg{fill:var(--buttonDown)}.mfui-9-button_type_text.mfui-9-button_theme_white{background-color:transparent;color:var(--stcWhite);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.mfui-9-button_type_text.mfui-9-button_theme_white svg{fill:var(--stcWhite)}.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_theme_white:not(.mfui-9-button_loading):hover{color:var(--buttonHoverGrey)}.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_theme_white:not(.mfui-9-button_loading):hover svg{fill:var(--buttonHoverGrey)}.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_theme_white:not(.mfui-9-button_loading):active{color:var(--buttonDown)}.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_theme_white:not(.mfui-9-button_loading):active svg{fill:var(--buttonDown)}.mfui-9-button_type_text.mfui-9-button_theme_black{background-color:transparent;color:var(--stcBlack);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.mfui-9-button_type_text.mfui-9-button_theme_black svg{fill:var(--stcBlack)}.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_theme_black{--stcBlack7:#818181}.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_theme_black:not(.mfui-9-button_loading):hover{color:var(--stcBlack7)}.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_theme_black:not(.mfui-9-button_loading):hover svg{fill:var(--stcBlack7)}.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_theme_black:not(.mfui-9-button_loading):active{color:var(--buttonDown)}.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_theme_black:not(.mfui-9-button_loading):active svg{fill:var(--buttonDown)}.mfui-9-button_type_text.mfui-9-button_theme_danger{background-color:transparent;color:var(--fury);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.mfui-9-button_type_text.mfui-9-button_theme_danger svg{fill:var(--fury)}.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_theme_danger:not(.mfui-9-button_loading):hover{color:var(--fury80)}.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_theme_danger:not(.mfui-9-button_loading):hover svg{fill:var(--fury80)}.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_theme_danger:not(.mfui-9-button_loading):active{color:var(--buttonDown)}.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_theme_danger:not(.mfui-9-button_loading):active svg{fill:var(--buttonDown)}.mfui-9-button_type_primary.mfui-9-button_theme_green{background-color:var(--brandGreen);color:var(--stcWhite)}.mfui-9-button_type_primary.mfui-9-button_theme_green svg{fill:var(--stcWhite)}.mfui-9-button_no-touch.mfui-9-button_type_primary.mfui-9-button_theme_green:not(.mfui-9-button_loading):hover{background-color:var(--buttonHoverGreen)}.mfui-9-button_no-touch.mfui-9-button_type_primary.mfui-9-button_theme_green:not(.mfui-9-button_loading):active{background-color:var(--buttonDown)}.mfui-9-button_type_primary.mfui-9-button_theme_green-soft{background-color:var(--brandGreen20);border:1px solid rgba(0,185,86,.2);color:var(--brandGreen)}.mfui-9-button_type_primary.mfui-9-button_theme_green-soft svg{fill:var(--brandGreen)}.mfui-9-button_no-touch.mfui-9-button_type_primary.mfui-9-button_theme_green-soft:not(.mfui-9-button_loading):hover{background-color:var(--buttonHoverGreenSoft)}.mfui-9-button_no-touch.mfui-9-button_type_primary.mfui-9-button_theme_green-soft:not(.mfui-9-button_loading):active{background-color:var(--buttonDown);color:var(--stcWhite)}.mfui-9-button_no-touch.mfui-9-button_type_primary.mfui-9-button_theme_green-soft:not(.mfui-9-button_loading):active svg{fill:var(--stcWhite)}.mfui-9-button_type_primary.mfui-9-button_theme_purple{background-color:var(--brandPurple);color:var(--stcWhite)}.mfui-9-button_type_primary.mfui-9-button_theme_purple svg{fill:var(--stcWhite)}.mfui-9-button_no-touch.mfui-9-button_type_primary.mfui-9-button_theme_purple:not(.mfui-9-button_loading):hover{background-color:var(--buttonHoverPurple)}.mfui-9-button_no-touch.mfui-9-button_type_primary.mfui-9-button_theme_purple:not(.mfui-9-button_loading):active{background-color:var(--buttonDown)}.mfui-9-button_type_primary.mfui-9-button_theme_purple-soft{background-color:var(--brandPurple20);border:1px solid rgba(115,25,130,.2);color:var(--brandPurple)}.mfui-9-button_type_primary.mfui-9-button_theme_purple-soft svg{fill:var(--brandPurple)}.mfui-9-button_no-touch.mfui-9-button_type_primary.mfui-9-button_theme_purple-soft:not(.mfui-9-button_loading):hover{background-color:var(--buttonHoverPurpleSoft)}.mfui-9-button_no-touch.mfui-9-button_type_primary.mfui-9-button_theme_purple-soft:not(.mfui-9-button_loading):active{background-color:var(--buttonDown);color:var(--stcWhite)}.mfui-9-button_no-touch.mfui-9-button_type_primary.mfui-9-button_theme_purple-soft:not(.mfui-9-button_loading):active svg{fill:var(--stcWhite)}.mfui-9-button_type_primary.mfui-9-button_theme_white{background-color:var(--stcWhite);color:var(--stcBlack)}.mfui-9-button_type_primary.mfui-9-button_theme_white svg{fill:var(--stcBlack)}.mfui-9-button_no-touch.mfui-9-button_type_primary.mfui-9-button_theme_white:not(.mfui-9-button_loading):hover{background-color:var(--buttonHoverGrey);color:var(--stcBlack)}.mfui-9-button_no-touch.mfui-9-button_type_primary.mfui-9-button_theme_white:not(.mfui-9-button_loading):hover svg{fill:var(--stcBlack)}.mfui-9-button_no-touch.mfui-9-button_type_primary.mfui-9-button_theme_white:not(.mfui-9-button_loading):active{background-color:var(--buttonDown);color:var(--stcWhite)}.mfui-9-button_no-touch.mfui-9-button_type_primary.mfui-9-button_theme_white:not(.mfui-9-button_loading):active svg{fill:var(--stcWhite)}.mfui-9-button_type_primary.mfui-9-button_theme_gray{background-color:var(--spbSky0);color:var(--content)}.mfui-9-button_type_primary.mfui-9-button_theme_gray svg{fill:var(--content)}.mfui-9-button_type_primary.mfui-9-button_theme_gray .mfui-9-button__content,.mfui-9-button_type_primary.mfui-9-button_theme_gray svg{opacity:.8}.mfui-9-button_no-touch.mfui-9-button_type_primary.mfui-9-button_theme_gray:not(.mfui-9-button_loading):hover{background-color:var(--spbSky1)}.mfui-9-button_no-touch.mfui-9-button_type_primary.mfui-9-button_theme_gray:not(.mfui-9-button_loading):hover svg{opacity:.8;fill:var(--content)}.mfui-9-button_no-touch.mfui-9-button_type_primary.mfui-9-button_theme_gray:not(.mfui-9-button_loading):active{background-color:var(--spbSky2)}.mfui-9-button_no-touch.mfui-9-button_type_primary.mfui-9-button_theme_gray:not(.mfui-9-button_loading):active svg{opacity:.8;fill:var(--content)}.mfui-9-button_type_outline.mfui-9-button_theme_green{background-color:transparent;border:1px solid var(--brandGreen);color:var(--brandGreen)}.mfui-9-button_type_outline.mfui-9-button_theme_green svg{fill:var(--brandGreen)}.mfui-9-button_no-touch.mfui-9-button_type_outline.mfui-9-button_theme_green{--brandGreen7:rgba(0,185,86,.07);--brandGreen14:rgba(0,185,86,.14)}.mfui-9-button_no-touch.mfui-9-button_type_outline.mfui-9-button_theme_green:not(.mfui-9-button_loading):hover{background-color:var(--brandGreen7)}.mfui-9-button_no-touch.mfui-9-button_type_outline.mfui-9-button_theme_green:not(.mfui-9-button_loading):active{background-color:var(--brandGreen14)}.mfui-9-button_type_outline.mfui-9-button_theme_green-soft{background-color:transparent;color:var(--brandGreen)}.mfui-9-button_type_outline.mfui-9-button_theme_green-soft svg{fill:var(--brandGreen)}.mfui-9-button_no-touch.mfui-9-button_type_outline.mfui-9-button_theme_green-soft{--brandGreen7:rgba(0,185,86,.07);--brandGreen14:rgba(0,185,86,.14)}.mfui-9-button_no-touch.mfui-9-button_type_outline.mfui-9-button_theme_green-soft:not(.mfui-9-button_loading):hover{background-color:var(--brandGreen7)}.mfui-9-button_no-touch.mfui-9-button_type_outline.mfui-9-button_theme_green-soft:not(.mfui-9-button_loading):active{background-color:var(--brandGreen14)}.mfui-9-button_type_outline.mfui-9-button_theme_purple{background-color:transparent;border:1px solid var(--brandPurple);color:var(--brandPurple)}.mfui-9-button_type_outline.mfui-9-button_theme_purple svg{fill:var(--brandPurple)}.mfui-9-button_no-touch.mfui-9-button_type_outline.mfui-9-button_theme_purple{--brandPurple7:rgba(115,25,130,.07);--brandPurple14:rgba(115,25,130,.14)}.mfui-9-button_no-touch.mfui-9-button_type_outline.mfui-9-button_theme_purple:not(.mfui-9-button_loading):hover{background-color:var(--brandPurple7)}.mfui-9-button_no-touch.mfui-9-button_type_outline.mfui-9-button_theme_purple:not(.mfui-9-button_loading):active{background-color:var(--brandPurple14)}.mfui-9-button_type_outline.mfui-9-button_theme_white{background-color:transparent;border:1px solid var(--stcWhite);color:var(--stcWhite)}.mfui-9-button_type_outline.mfui-9-button_theme_white svg{fill:var(--stcWhite)}.mfui-9-button_no-touch.mfui-9-button_type_outline.mfui-9-button_theme_white{--stcWhite7:hsla(0,0%,100%,.07);--stcWhite14:hsla(0,0%,100%,.14)}.mfui-9-button_no-touch.mfui-9-button_type_outline.mfui-9-button_theme_white:not(.mfui-9-button_loading):hover{background-color:var(--stcWhite7)}.mfui-9-button_no-touch.mfui-9-button_type_outline.mfui-9-button_theme_white:not(.mfui-9-button_loading):active{background-color:var(--stcWhite14)}.mfui-9-button_type_outline.mfui-9-button_theme_black{background-color:transparent;border:1px solid var(--stcBlack);color:var(--stcBlack)}.mfui-9-button_type_outline.mfui-9-button_theme_black svg{fill:var(--stcBlack)}.mfui-9-button_no-touch.mfui-9-button_type_outline.mfui-9-button_theme_black{--stcBlack7:rgba(51,51,51,.07);--stcBlack14:rgba(51,51,51,.14)}.mfui-9-button_no-touch.mfui-9-button_type_outline.mfui-9-button_theme_black:not(.mfui-9-button_loading):hover{background-color:var(--stcBlack7)}.mfui-9-button_no-touch.mfui-9-button_type_outline.mfui-9-button_theme_black:not(.mfui-9-button_loading):active{background-color:var(--stcBlack14)}.mfui-9-button_full-width{display:block;width:100%}@media screen and (max-width:767px){.mfui-9-button_full-width-mobile{display:block;width:100%}}.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_primary.mfui-9-button_disabled,.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_primary.mfui-9-button_disabled:active,.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_primary.mfui-9-button_disabled:hover,.mfui-9-button.mfui-9-button_type_primary.mfui-9-button_disabled{background-color:var(--spbSky1);border:1px solid var(--spbSky2);color:var(--spbSky3)}.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_primary.mfui-9-button_disabled svg,.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_primary.mfui-9-button_disabled:active svg,.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_primary.mfui-9-button_disabled:hover svg,.mfui-9-button.mfui-9-button_type_primary.mfui-9-button_disabled svg{fill:var(--spbSky3)}.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_outline.mfui-9-button_theme_white.mfui-9-button_disabled,.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_outline.mfui-9-button_theme_white.mfui-9-button_disabled:active,.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_outline.mfui-9-button_theme_white.mfui-9-button_disabled:hover,.mfui-9-button.mfui-9-button_type_outline.mfui-9-button_theme_white.mfui-9-button_disabled{background-color:transparent;border:1px solid var(--stcWhite);color:var(--stcWhite50)}.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_outline.mfui-9-button_theme_white.mfui-9-button_disabled svg,.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_outline.mfui-9-button_theme_white.mfui-9-button_disabled:active svg,.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_outline.mfui-9-button_theme_white.mfui-9-button_disabled:hover svg,.mfui-9-button.mfui-9-button_type_outline.mfui-9-button_theme_white.mfui-9-button_disabled svg{fill:var(--stcWhite50)}.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_outline.mfui-9-button_disabled,.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_outline.mfui-9-button_disabled:active,.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_outline.mfui-9-button_disabled:hover,.mfui-9-button.mfui-9-button_type_outline.mfui-9-button_disabled{background-color:transparent;border:1px solid var(--spbSky2);color:var(--spbSky3)}.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_outline.mfui-9-button_disabled svg,.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_outline.mfui-9-button_disabled:active svg,.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_outline.mfui-9-button_disabled:hover svg,.mfui-9-button.mfui-9-button_type_outline.mfui-9-button_disabled svg{fill:var(--spbSky3)}.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_disabled,.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_disabled:active,.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_disabled:hover,.mfui-9-button.mfui-9-button_type_text.mfui-9-button_disabled{color:var(--spbSky3)}.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_disabled svg,.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_disabled:active svg,.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_disabled:hover svg,.mfui-9-button.mfui-9-button_type_text.mfui-9-button_disabled svg{fill:var(--spbSky3)}.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_theme_white.mfui-9-button_disabled,.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_theme_white.mfui-9-button_disabled:active,.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_theme_white.mfui-9-button_disabled:hover,.mfui-9-button.mfui-9-button_type_text.mfui-9-button_theme_white.mfui-9-button_disabled{background-color:transparent;color:var(--stcWhite)}.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_theme_white.mfui-9-button_disabled svg,.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_theme_white.mfui-9-button_disabled:active svg,.mfui-9-button.mfui-9-button_no-touch.mfui-9-button_type_text.mfui-9-button_theme_white.mfui-9-button_disabled:hover svg,.mfui-9-button.mfui-9-button_type_text.mfui-9-button_theme_white.mfui-9-button_disabled svg{fill:var(--stcWhite)}
|
|
@@ -14,6 +14,7 @@ export declare const ButtonThemes: {
|
|
|
14
14
|
readonly WHITE: "white";
|
|
15
15
|
readonly BLACK: "black";
|
|
16
16
|
readonly DANGER: "danger";
|
|
17
|
+
readonly GRAY: "gray";
|
|
17
18
|
};
|
|
18
19
|
type ButtonThemesType = (typeof ButtonThemes)[keyof typeof ButtonThemes];
|
|
19
20
|
export declare const ButtonSizes: {
|
|
@@ -15,7 +15,7 @@ var __rest = this && this.__rest || function (s, e) {
|
|
|
15
15
|
};
|
|
16
16
|
import * as React from 'react';
|
|
17
17
|
import { cnCreate, detectTouch, filterDataAttrs } from '@megafon/ui-helpers';
|
|
18
|
-
import Preloader, { PreloaderColors } from "
|
|
18
|
+
import Preloader, { PreloaderColors } from "../../Preloader/Preloader";
|
|
19
19
|
import "./Button.css";
|
|
20
20
|
var Arrow = function Arrow(props) {
|
|
21
21
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
@@ -36,7 +36,8 @@ export var ButtonThemes = {
|
|
|
36
36
|
PURPLE_SOFT: 'purple-soft',
|
|
37
37
|
WHITE: 'white',
|
|
38
38
|
BLACK: 'black',
|
|
39
|
-
DANGER: 'danger'
|
|
39
|
+
DANGER: 'danger',
|
|
40
|
+
GRAY: 'gray'
|
|
40
41
|
};
|
|
41
42
|
export var ButtonSizes = {
|
|
42
43
|
EXTRA_SMALL: 'extra-small',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-button-close{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;border-radius:30px;cursor:pointer;height:44px;justify-content:center;outline:none;overflow:hidden;text-decoration:none;width:44px;-webkit-tap-highlight-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.mfui-9-button-close__inner{position:relative;-webkit-transition:background-color .3s,color .3s;transition:background-color .3s,color .3s}.mfui-9-button-close__inner:before{border-radius:inherit;content:"";height:100%;left:0;position:absolute;top:0;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:background-color,color,opacity;transition-property:background-color,color,opacity;width:100%}.mfui-9-button-close_size_small .mfui-9-button-close__inner{border-radius:8px}.mfui-9-button-close_size_small .mfui-9-button-close__icon{height:24px;min-width:24px}.mfui-9-button-close_size_medium .mfui-9-button-close__inner{border-radius:12px}.mfui-9-button-close_size_medium .mfui-9-button-close__icon{height:32px;min-width:32px}.mfui-9-button-close_theme_white .mfui-9-button-close__inner{background-color:var(--spbSky0)}.mfui-9-button-close_theme_white .mfui-9-button-close__inner svg{fill:var(--spbSky3)}.mfui-9-button-close_theme_white:hover .mfui-9-button-close__inner{background-color:var(--spbSky1)}.mfui-9-button-close_theme_white:active .mfui-9-button-close__inner{background-color:var(--spbSky2)}.mfui-9-button-close_theme_gray .mfui-9-button-close__inner{background-color:var(--base)}.mfui-9-button-close_theme_gray .mfui-9-button-close__inner svg{fill:var(--spbSky3)}.mfui-9-button-close_theme_gray:hover .mfui-9-button-close__inner{background-color:var(--spbSky1)}.mfui-9-button-close_theme_gray:active .mfui-9-button-close__inner{background-color:var(--spbSky2)}.mfui-9-button-close_theme_soft .mfui-9-button-close__inner svg{opacity:.5;fill:var(--content)}.mfui-9-button-close_theme_soft .mfui-9-button-close__inner:before{background-color:var(--content);opacity:.05}.mfui-9-button-close_theme_soft:hover .mfui-9-button-close__inner:before{background-color:var(--content);opacity:.1}.mfui-9-button-close_theme_soft:active .mfui-9-button-close__inner:before{background-color:var(--content);opacity:.2}.mfui-9-button-close_theme_color .mfui-9-button-close__inner{background-color:var(--stcWhite20)}.mfui-9-button-close_theme_color .mfui-9-button-close__inner svg{fill:var(--stcWhite)}.mfui-9-button-close_theme_color:hover .mfui-9-button-close__inner{background-color:var(--stcWhite50)}.mfui-9-button-close_theme_color:active .mfui-9-button-close__inner{background:hsla(0,0%,100%,.8)}.mfui-9-button-close_theme_black .mfui-9-button-close__inner:before{background-color:var(--base);opacity:.1}.mfui-9-button-close_theme_black .mfui-9-button-close__inner svg{fill:var(--spbSky3)}.mfui-9-button-close_theme_black:hover .mfui-9-button-close__inner:before{background-color:var(--base);opacity:.2}.mfui-9-button-close_theme_black:active .mfui-9-button-close__inner:before{background-color:var(--base);opacity:.5}.mfui-9-button-close_theme_black:active .mfui-9-button-close__inner svg{fill:var(--base)}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import './ButtonClose.scss';
|
|
3
|
+
export declare const ButtonCloseThemes: {
|
|
4
|
+
readonly WHITE: "white";
|
|
5
|
+
readonly GRAY: "gray";
|
|
6
|
+
readonly SOFT: "soft";
|
|
7
|
+
readonly COLOR: "color";
|
|
8
|
+
readonly BLACK: "black";
|
|
9
|
+
};
|
|
10
|
+
type ButtonCloseThemesType = (typeof ButtonCloseThemes)[keyof typeof ButtonCloseThemes];
|
|
11
|
+
export declare const ButtonCloseSizes: {
|
|
12
|
+
readonly SMALL: "small";
|
|
13
|
+
readonly MEDIUM: "medium";
|
|
14
|
+
};
|
|
15
|
+
type ButtonCloseSizesType = (typeof ButtonCloseSizes)[keyof typeof ButtonCloseSizes];
|
|
16
|
+
type ButtonCloseAttributes = Pick<React.ButtonHTMLAttributes<HTMLButtonElement>, keyof React.ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
17
|
+
export interface IButtonCloseProps extends Omit<ButtonCloseAttributes, 'className'> {
|
|
18
|
+
/** Дополнительный класс корневого элемента */
|
|
19
|
+
className?: string | string[];
|
|
20
|
+
/** Дополнительные data атрибуты к внутренним элементам */
|
|
21
|
+
dataAttrs?: Record<string, string>;
|
|
22
|
+
/** Тема компонента */
|
|
23
|
+
theme?: ButtonCloseThemesType;
|
|
24
|
+
/** Размер компонента */
|
|
25
|
+
size?: ButtonCloseSizesType;
|
|
26
|
+
/** Отключение кнопки */
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/** Ссылка на элемент */
|
|
29
|
+
buttonRef?: React.Ref<HTMLButtonElement>;
|
|
30
|
+
/** Обработчик клика по кнопке */
|
|
31
|
+
onClick?: (e: React.SyntheticEvent<EventTarget>) => void;
|
|
32
|
+
}
|
|
33
|
+
declare const ButtonClose: React.FC<IButtonCloseProps>;
|
|
34
|
+
export default ButtonClose;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import "core-js/modules/es.symbol.js";
|
|
3
|
+
import "core-js/modules/es.array.index-of.js";
|
|
4
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
5
|
+
var t = {};
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
7
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import * as React from 'react';
|
|
13
|
+
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
14
|
+
import "./ButtonClose.css";
|
|
15
|
+
var CancelIcon = function CancelIcon(props) {
|
|
16
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
17
|
+
viewBox: "0 0 32 32"
|
|
18
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
19
|
+
className: "CancelIcon__st0",
|
|
20
|
+
d: "M16 14.5L11.5 10 10 11.5l4.5 4.5-4.5 4.5 1.5 1.5 4.5-4.5 4.5 4.5 1.5-1.5-4.5-4.5 4.5-4.5-1.5-1.5-4.5 4.5z"
|
|
21
|
+
}));
|
|
22
|
+
};
|
|
23
|
+
export var ButtonCloseThemes = {
|
|
24
|
+
WHITE: 'white',
|
|
25
|
+
GRAY: 'gray',
|
|
26
|
+
SOFT: 'soft',
|
|
27
|
+
COLOR: 'color',
|
|
28
|
+
BLACK: 'black'
|
|
29
|
+
};
|
|
30
|
+
export var ButtonCloseSizes = {
|
|
31
|
+
SMALL: 'small',
|
|
32
|
+
MEDIUM: 'medium'
|
|
33
|
+
};
|
|
34
|
+
var cn = cnCreate('mfui-9-button-close');
|
|
35
|
+
var ButtonClose = function ButtonClose(_a) {
|
|
36
|
+
var _a$className = _a.className,
|
|
37
|
+
className = _a$className === void 0 ? '' : _a$className,
|
|
38
|
+
_a$theme = _a.theme,
|
|
39
|
+
theme = _a$theme === void 0 ? 'white' : _a$theme,
|
|
40
|
+
_a$size = _a.size,
|
|
41
|
+
size = _a$size === void 0 ? 'small' : _a$size,
|
|
42
|
+
disabled = _a.disabled,
|
|
43
|
+
onClick = _a.onClick,
|
|
44
|
+
dataAttrs = _a.dataAttrs,
|
|
45
|
+
buttonRef = _a.buttonRef,
|
|
46
|
+
rest = __rest(_a, ["className", "theme", "size", "disabled", "onClick", "dataAttrs", "buttonRef"]);
|
|
47
|
+
var handleClick = React.useCallback(function (e) {
|
|
48
|
+
if (disabled) {
|
|
49
|
+
e.preventDefault();
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
53
|
+
}, [disabled, onClick]);
|
|
54
|
+
return /*#__PURE__*/React.createElement("button", _extends({
|
|
55
|
+
type: "button",
|
|
56
|
+
className: cn({
|
|
57
|
+
size: size,
|
|
58
|
+
theme: theme,
|
|
59
|
+
disabled: disabled
|
|
60
|
+
}, className),
|
|
61
|
+
onClick: handleClick,
|
|
62
|
+
disabled: disabled,
|
|
63
|
+
ref: buttonRef
|
|
64
|
+
}, filterDataAttrs(dataAttrs), rest), /*#__PURE__*/React.createElement("div", {
|
|
65
|
+
className: cn('inner')
|
|
66
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
67
|
+
className: cn('icon')
|
|
68
|
+
}, /*#__PURE__*/React.createElement(CancelIcon, null))));
|
|
69
|
+
};
|
|
70
|
+
export default ButtonClose;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-9-chip{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-family:inherit;font-size:15px;font-weight:500;line-height:24px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--spbSky0);border:none;border-radius:20px;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--content);overflow:hidden;padding:8px 20px;text-align:center;text-decoration:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;outline:none;-webkit-transition:background-color .3s,color .3s;transition:background-color .3s,color .3s}.mfui-9-chip svg{-webkit-transition:fill .3s;transition:fill .3s;fill:var(--content)}@media screen and (max-width:767px){.mfui-9-chip{padding:4px 12px}}.mfui-9-chip:hover{background-color:var(--spbSky1)}.mfui-9-chip__inner{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mfui-9-chip__counter{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--spbSky3);margin-left:6px}@media screen and (max-width:767px){.mfui-9-chip__counter{margin-left:4px}}.mfui-9-chip__icon,.mfui-9-chip__icon-arrow{display:block;max-height:20px;min-width:20px;width:20px}.mfui-9-chip__icon svg,.mfui-9-chip__icon-arrow svg{display:block;height:100%;width:100%}.mfui-9-chip__icon{margin-right:6px}@media screen and (max-width:767px){.mfui-9-chip__icon{margin-right:4px}}.mfui-9-chip_disabled,.mfui-9-chip_disabled:hover{background-color:var(--spbSky0);color:var(--spbSky3);cursor:default;pointer-events:none}.mfui-9-chip_disabled svg,.mfui-9-chip_disabled:hover svg{fill:var(--spbSky3)}.mfui-9-chip_disabled .mfui-9-chip__counter,.mfui-9-chip_disabled:hover .mfui-9-chip__counter{color:var(--spbSky2)}.mfui-9-chip_checked,.mfui-9-chip_checked:hover{background-color:var(--night);color:var(--stcWhite)}.mfui-9-chip_checked svg,.mfui-9-chip_checked:hover svg{fill:var(--stcWhite)}.mfui-9-chip_checked .mfui-9-chip__counter,.mfui-9-chip_checked:hover .mfui-9-chip__counter{color:var(--stcWhite)}.mfui-9-chip_checked.mfui-9-chip_color_black,.mfui-9-chip_checked.mfui-9-chip_color_black:hover{background-color:var(--content);color:var(--base)}.mfui-9-chip_checked.mfui-9-chip_color_black svg,.mfui-9-chip_checked.mfui-9-chip_color_black:hover svg{fill:var(--base)}.mfui-9-chip_checked.mfui-9-chip_color_black .mfui-9-chip__counter,.mfui-9-chip_checked.mfui-9-chip_color_black:hover .mfui-9-chip__counter{color:var(--base)}.mfui-9-chip_with-icon{padding-left:16px}@media screen and (max-width:767px){.mfui-9-chip_with-icon{padding-left:8px}}
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-chip{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-family:inherit;font-size:15px;font-weight:500;line-height:24px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--spbSky0);border:none;border-radius:20px;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--content);overflow:hidden;padding:8px 20px;text-align:center;text-decoration:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;outline:none;-webkit-transition:background-color .3s,color .3s;transition:background-color .3s,color .3s}.mfui-9-chip.mfui-9-chip_theme_gray{background-color:var(--spbSky1)}.mfui-9-chip svg{-webkit-transition:fill .3s;transition:fill .3s;fill:var(--content)}@media screen and (max-width:767px){.mfui-9-chip{padding:4px 12px}}.mfui-9-chip:hover{background-color:var(--spbSky1)}.mfui-9-chip.mfui-9-chip_theme_gray:hover{background-color:var(--spbSky2)}.mfui-9-chip__inner{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mfui-9-chip__counter{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--spbSky3);margin-left:6px}@media screen and (max-width:767px){.mfui-9-chip__counter{margin-left:4px}}.mfui-9-chip__icon,.mfui-9-chip__icon-arrow{display:block;max-height:20px;min-width:20px;width:20px}.mfui-9-chip__icon svg,.mfui-9-chip__icon-arrow svg{display:block;height:100%;width:100%}.mfui-9-chip__icon{margin-right:6px}@media screen and (max-width:767px){.mfui-9-chip__icon{margin-right:4px}}.mfui-9-chip_disabled,.mfui-9-chip_disabled:hover{background-color:var(--spbSky0);color:var(--spbSky3);cursor:default;pointer-events:none}.mfui-9-chip_disabled svg,.mfui-9-chip_disabled:hover svg{fill:var(--spbSky3)}.mfui-9-chip_disabled .mfui-9-chip__counter,.mfui-9-chip_disabled:hover .mfui-9-chip__counter{color:var(--spbSky2)}.mfui-9-chip_disabled.mfui-9-chip_theme_gray,.mfui-9-chip_disabled.mfui-9-chip_theme_gray:hover{background-color:var(--spbSky1)}.mfui-9-chip_checked,.mfui-9-chip_checked:hover{background-color:var(--night);color:var(--stcWhite)}.mfui-9-chip_checked svg,.mfui-9-chip_checked:hover svg{fill:var(--stcWhite)}.mfui-9-chip_checked .mfui-9-chip__counter,.mfui-9-chip_checked:hover .mfui-9-chip__counter{color:var(--stcWhite)}.mfui-9-chip_checked.mfui-9-chip_color_black,.mfui-9-chip_checked.mfui-9-chip_color_black:hover{background-color:var(--content);color:var(--base)}.mfui-9-chip_checked.mfui-9-chip_color_black svg,.mfui-9-chip_checked.mfui-9-chip_color_black:hover svg{fill:var(--base)}.mfui-9-chip_checked.mfui-9-chip_color_black .mfui-9-chip__counter,.mfui-9-chip_checked.mfui-9-chip_color_black:hover .mfui-9-chip__counter{color:var(--base)}.mfui-9-chip_with-icon{padding-left:16px}@media screen and (max-width:767px){.mfui-9-chip_with-icon{padding-left:8px}}
|
|
@@ -6,6 +6,11 @@ export declare const ChipColors: {
|
|
|
6
6
|
readonly BLACK: "black";
|
|
7
7
|
};
|
|
8
8
|
export type ChipColorsType = (typeof ChipColors)[keyof typeof ChipColors];
|
|
9
|
+
export declare const ChipThemes: {
|
|
10
|
+
readonly WHITE: "white";
|
|
11
|
+
readonly GRAY: "gray";
|
|
12
|
+
};
|
|
13
|
+
export type ChipsThemeType = (typeof ChipThemes)[keyof typeof ChipThemes];
|
|
9
14
|
export declare const ChipArrow: {
|
|
10
15
|
readonly UP: "up";
|
|
11
16
|
readonly DOWN: "down";
|
|
@@ -16,8 +21,10 @@ export interface IChipProps {
|
|
|
16
21
|
id: ChipIdType;
|
|
17
22
|
/** Заголовок */
|
|
18
23
|
title?: string;
|
|
19
|
-
/**
|
|
24
|
+
/** Цвет активного элемента компонента */
|
|
20
25
|
color?: ChipColorsType;
|
|
26
|
+
/** Цвета неактивных элементов компонента */
|
|
27
|
+
theme?: ChipsThemeType;
|
|
21
28
|
/** Отображение в отмеченном (зажатом) состоянии */
|
|
22
29
|
checked?: boolean;
|
|
23
30
|
/** Отключенное состояние */
|
|
@@ -41,6 +48,7 @@ export interface IChipProps {
|
|
|
41
48
|
inner?: string;
|
|
42
49
|
icon?: string;
|
|
43
50
|
counter?: string;
|
|
51
|
+
arrow?: string;
|
|
44
52
|
};
|
|
45
53
|
/** Дополнительные data атрибуты к внутренним элементам */
|
|
46
54
|
dataAttrs?: {
|
|
@@ -24,6 +24,10 @@ export var ChipColors = {
|
|
|
24
24
|
DEFAULT: 'default',
|
|
25
25
|
BLACK: 'black'
|
|
26
26
|
};
|
|
27
|
+
export var ChipThemes = {
|
|
28
|
+
WHITE: 'white',
|
|
29
|
+
GRAY: 'gray'
|
|
30
|
+
};
|
|
27
31
|
export var ChipArrow = {
|
|
28
32
|
UP: 'up',
|
|
29
33
|
DOWN: 'down'
|
|
@@ -34,6 +38,8 @@ var Chip = function Chip(_ref) {
|
|
|
34
38
|
title = _ref.title,
|
|
35
39
|
_ref$color = _ref.color,
|
|
36
40
|
color = _ref$color === void 0 ? 'default' : _ref$color,
|
|
41
|
+
_ref$theme = _ref.theme,
|
|
42
|
+
theme = _ref$theme === void 0 ? 'white' : _ref$theme,
|
|
37
43
|
_ref$checked = _ref.checked,
|
|
38
44
|
checked = _ref$checked === void 0 ? false : _ref$checked,
|
|
39
45
|
_ref$disabled = _ref.disabled,
|
|
@@ -56,6 +62,7 @@ var Chip = function Chip(_ref) {
|
|
|
56
62
|
type: "button",
|
|
57
63
|
className: cn({
|
|
58
64
|
color: color,
|
|
65
|
+
theme: theme,
|
|
59
66
|
checked: checked,
|
|
60
67
|
disabled: disabled,
|
|
61
68
|
'with-icon': !!icon
|
|
@@ -71,7 +78,7 @@ var Chip = function Chip(_ref) {
|
|
|
71
78
|
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.inner)), children || title), !!counterValue && /*#__PURE__*/React.createElement("span", _extends({
|
|
72
79
|
className: cn('counter', [classes.counter])
|
|
73
80
|
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.counter)), counterValue), !!arrow && /*#__PURE__*/React.createElement("div", _extends({
|
|
74
|
-
className: cn('icon-arrow')
|
|
81
|
+
className: cn('icon-arrow', [classes.arrow])
|
|
75
82
|
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.arrow)), arrow === 'up' ? /*#__PURE__*/React.createElement(ArrowUp, null) : /*#__PURE__*/React.createElement(ArrowDown, null)));
|
|
76
83
|
};
|
|
77
84
|
export default Chip;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { DropdownItemsPaddingType } from '../../Dropdown/Dropdown';
|
|
3
|
+
import { ChipColorsType, ChipIdType, IChipProps, ChipsThemeType } from './Chip';
|
|
3
4
|
import './Chips.scss';
|
|
4
5
|
export interface IChipsProps {
|
|
5
6
|
/** Массив элементов */
|
|
@@ -8,6 +9,8 @@ export interface IChipsProps {
|
|
|
8
9
|
value?: ChipIdType;
|
|
9
10
|
/** Цвет активного элемента */
|
|
10
11
|
color?: ChipColorsType;
|
|
12
|
+
/** Цвет неактивных элементов */
|
|
13
|
+
theme?: ChipsThemeType;
|
|
11
14
|
/** Горизонтальное выравнивание */
|
|
12
15
|
align?: 'left' | 'center';
|
|
13
16
|
/** Переводит компонент в контролируемое состояние */
|
|
@@ -24,6 +27,10 @@ export interface IChipsProps {
|
|
|
24
27
|
visibleItemsCountWide?: number;
|
|
25
28
|
/** Название дополнительной кнопки */
|
|
26
29
|
moreTitle?: string;
|
|
30
|
+
/** Попап выпадающего списка короче в высоту */
|
|
31
|
+
isDropdownShort?: boolean;
|
|
32
|
+
/** Отступы элементов списка выпадающего списка */
|
|
33
|
+
dropdownPaddings?: DropdownItemsPaddingType;
|
|
27
34
|
/** Обработчик изменения значения */
|
|
28
35
|
onChange?: (id: ChipIdType, e?: React.SyntheticEvent<EventTarget>) => void;
|
|
29
36
|
/** Дополнительный класс корневого элемента */
|
|
@@ -32,13 +39,17 @@ export interface IChipsProps {
|
|
|
32
39
|
classes?: {
|
|
33
40
|
root?: string;
|
|
34
41
|
dropdown?: string;
|
|
42
|
+
dropdownPopup?: string;
|
|
35
43
|
dropdownList?: string;
|
|
44
|
+
dropdownItem?: string;
|
|
36
45
|
};
|
|
37
46
|
/** Дополнительные data атрибуты к внутренним элементам */
|
|
38
47
|
dataAttrs?: {
|
|
39
48
|
root?: Record<string, string>;
|
|
40
49
|
dropdown?: Record<string, string>;
|
|
50
|
+
dropdownPopup?: Record<string, string>;
|
|
41
51
|
dropdownList?: Record<string, string>;
|
|
52
|
+
dropdownItem?: Record<string, string>;
|
|
42
53
|
};
|
|
43
54
|
}
|
|
44
55
|
declare const Chips: React.FC<IChipsProps>;
|
|
@@ -29,8 +29,13 @@ var Chips = function Chips(_ref) {
|
|
|
29
29
|
value = _ref.value,
|
|
30
30
|
_ref$color = _ref.color,
|
|
31
31
|
color = _ref$color === void 0 ? 'default' : _ref$color,
|
|
32
|
+
_ref$theme = _ref.theme,
|
|
33
|
+
theme = _ref$theme === void 0 ? 'white' : _ref$theme,
|
|
32
34
|
_ref$moreTitle = _ref.moreTitle,
|
|
33
35
|
moreTitle = _ref$moreTitle === void 0 ? 'Еще' : _ref$moreTitle,
|
|
36
|
+
_ref$isDropdownShort = _ref.isDropdownShort,
|
|
37
|
+
isDropdownShort = _ref$isDropdownShort === void 0 ? false : _ref$isDropdownShort,
|
|
38
|
+
dropdownPaddings = _ref.dropdownPaddings,
|
|
34
39
|
visibleItemsCountAll = _ref.visibleItemsCountAll,
|
|
35
40
|
visibleItemsCountTablet = _ref.visibleItemsCountTablet,
|
|
36
41
|
visibleItemsCountDesktop = _ref.visibleItemsCountDesktop,
|
|
@@ -79,6 +84,7 @@ var Chips = function Chips(_ref) {
|
|
|
79
84
|
value: selectedId,
|
|
80
85
|
items: visibleItems,
|
|
81
86
|
color: color,
|
|
87
|
+
theme: theme,
|
|
82
88
|
onClick: handleClick
|
|
83
89
|
});
|
|
84
90
|
}
|
|
@@ -91,6 +97,7 @@ var Chips = function Chips(_ref) {
|
|
|
91
97
|
id: id,
|
|
92
98
|
checked: id === selectedId,
|
|
93
99
|
color: color,
|
|
100
|
+
theme: theme,
|
|
94
101
|
onClick: handleClick
|
|
95
102
|
}, rest), !!children && children);
|
|
96
103
|
});
|
|
@@ -137,19 +144,26 @@ var Chips = function Chips(_ref) {
|
|
|
137
144
|
align: align
|
|
138
145
|
}, [className, classes.root])
|
|
139
146
|
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), renderItems(), !!hiddenItems && /*#__PURE__*/React.createElement(ChipsDropdown, {
|
|
140
|
-
value: selectedId,
|
|
141
147
|
items: hiddenItems,
|
|
142
|
-
moreTitle: moreTitle,
|
|
143
148
|
color: color,
|
|
144
|
-
|
|
149
|
+
theme: theme,
|
|
150
|
+
moreTitle: moreTitle,
|
|
151
|
+
"short": isDropdownShort,
|
|
152
|
+
value: selectedId,
|
|
153
|
+
paddings: dropdownPaddings,
|
|
145
154
|
classes: {
|
|
146
155
|
root: classes.dropdown,
|
|
147
|
-
|
|
156
|
+
popup: classes.dropdownPopup,
|
|
157
|
+
list: classes.dropdownList,
|
|
158
|
+
item: classes.dropdownItem
|
|
148
159
|
},
|
|
149
160
|
dataAttrs: {
|
|
150
161
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.dropdown,
|
|
151
|
-
|
|
152
|
-
|
|
162
|
+
popup: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.dropdownPopup,
|
|
163
|
+
list: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.dropdownList,
|
|
164
|
+
item: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.dropdownItem
|
|
165
|
+
},
|
|
166
|
+
onClick: handleClick
|
|
153
167
|
}));
|
|
154
168
|
};
|
|
155
169
|
export default Chips;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-chips-dropdown{position:relative}.mfui-9-chips-dropdown__button{width:100%}.mfui-9-chips-dropdown__arrow{-webkit-transition:-webkit-transform .6s;transition:-webkit-transform .6s;transition:transform .6s;transition:transform .6s,-webkit-transform .6s}.mfui-9-chips-dropdown__arrow_open{-webkit-transform:rotate(-180deg);transform:rotate(-180deg)}.mfui-9-chips-dropdown__dropdown{max-width:256px;width:-webkit-max-content;width:-moz-max-content;width:max-content}.mfui-9-chips-dropdown__list-item{display:-webkit-box;display:-ms-flexbox;display:flex}.mfui-9-chips-dropdown__icon{display:block;margin-right:16px;max-height:24px;min-width:24px;width:24px}.mfui-9-chips-dropdown__icon svg{display:block;height:100%;width:100%;fill:var(--content)}
|
|
@@ -1,20 +1,28 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { DropdownItemsPaddingType } from '../../../../Dropdown/Dropdown';
|
|
3
|
+
import { ChipColorsType, ChipIdType, ChipsThemeType, IChipProps } from '../../Chip';
|
|
3
4
|
import './ChipsDropdown.scss';
|
|
4
5
|
export interface IChipsDropdownProps {
|
|
5
|
-
moreTitle: string;
|
|
6
|
-
value?: ChipIdType;
|
|
7
6
|
items: IChipProps[];
|
|
8
7
|
color: ChipColorsType;
|
|
9
|
-
|
|
8
|
+
theme: ChipsThemeType;
|
|
9
|
+
moreTitle: string;
|
|
10
|
+
short: boolean;
|
|
11
|
+
value?: ChipIdType;
|
|
12
|
+
paddings?: DropdownItemsPaddingType;
|
|
10
13
|
classes?: {
|
|
11
14
|
root?: string;
|
|
15
|
+
popup?: string;
|
|
12
16
|
list?: string;
|
|
17
|
+
item?: string;
|
|
13
18
|
};
|
|
14
19
|
dataAttrs?: {
|
|
15
20
|
root?: Record<string, string>;
|
|
21
|
+
popup?: Record<string, string>;
|
|
16
22
|
list?: Record<string, string>;
|
|
23
|
+
item?: Record<string, string>;
|
|
17
24
|
};
|
|
25
|
+
onClick: (e: React.SyntheticEvent<EventTarget>, id: ChipIdType) => void;
|
|
18
26
|
}
|
|
19
27
|
declare const ChipsDropdown: React.FC<IChipsDropdownProps>;
|
|
20
28
|
export default ChipsDropdown;
|