@megafon/ui-core 8.5.1 → 8.6.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.
- package/dist/es/components/Banner/Banner.css +1 -1
- package/dist/es/components/Chips/Chips.d.ts +4 -0
- package/dist/es/components/Chips/Chips.js +9 -1
- package/dist/es/components/Chips/components/ChipsDropdown/ChipsDropdown.d.ts +4 -0
- package/dist/es/components/Chips/components/ChipsDropdown/ChipsDropdown.js +9 -6
- package/dist/lib/components/Banner/Banner.css +1 -1
- package/dist/lib/components/Chips/Chips.d.ts +4 -0
- package/dist/lib/components/Chips/Chips.js +9 -1
- package/dist/lib/components/Chips/components/ChipsDropdown/ChipsDropdown.d.ts +4 -0
- package/dist/lib/components/Chips/components/ChipsDropdown/ChipsDropdown.js +9 -6
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-banner{position:relative}.mfui-banner .swiper-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex}.mfui-banner .mfui-banner__swiper-container{position:relative}.mfui-banner__swiper{overflow:hidden}.mfui-banner__slide{-ms-flex-negative:0;flex-shrink:0;height:500px}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-banner__slide{height:420px}}@media screen and (min-width:1280px){.mfui-banner__slide{height:400px}}.mfui-banner__slide-content{border-right:1px solid transparent;margin-right:-1px}@media screen and (max-width:1023px){.mfui-banner__slide-content{height:100%}}.mfui-banner_auto-height .mfui-banner__slide{height:auto}.mfui-banner .mfui-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-banner .mfui-banner__arrow{display:none}}.mfui-banner .mfui-banner__arrow_theme_white{height:64px;width:64px}@media screen and (max-width:1023px){.mfui-banner .mfui-banner__arrow_theme_white{display:none}}.mfui-banner .mfui-banner__arrow_prev{left:12px}@media screen and (max-width:767px){.mfui-banner .mfui-banner__arrow_prev{left:8px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-banner .mfui-banner__arrow_prev{left:16px}}@media screen and (min-width:1280px){.mfui-banner .mfui-banner__arrow_prev{left:20px}}.mfui-banner .mfui-banner__arrow_next{right:12px}@media screen and (max-width:767px){.mfui-banner .mfui-banner__arrow_next{right:8px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-banner .mfui-banner__arrow_next{right:16px}}@media screen and (min-width:1280px){.mfui-banner .mfui-banner__arrow_next{right:20px}}.mfui-banner .mfui-banner__arrow_prev.mfui-banner__arrow_theme_white{left:0;translate:-50% -50%}.mfui-banner .mfui-banner__arrow_next.mfui-banner__arrow_theme_white{right:0;translate:50% -50%}.mfui-banner_no-touch .mfui-banner__arrow_theme_white:hover{scale:1.25}.mfui-banner_no-touch .mfui-banner__arrow_theme_white:active{scale:1.125}.mfui-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;justify-content:center;margin-top:32px}.mfui-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-banner__pagination_position_top-in{padding:0 80px}}.mfui-banner__pagination_type_flat{gap:4px}@media screen and (min-width:1280px){.mfui-banner__pagination_type_flat{gap:10px}}.mfui-banner__pagination_align_left{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.mfui-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-banner__pagination_bottom-offset{bottom:89px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-banner__pagination_bottom-offset{bottom:90px}}@media screen and (min-width:1280px) and (max-width:1439px){.mfui-banner__pagination_bottom-offset{bottom:65px}}@media screen and (min-width:1440px){.mfui-banner__pagination_bottom-offset{bottom:72px}}.mfui-banner_margin-top{margin-top:24px}.mfui-banner_radius_rounded .mfui-banner__swiper{border-radius:24px}@media screen and (max-width:767px){.mfui-banner_show-next-slide .mfui-banner__swiper{border-radius:0;margin-left:-16px;margin-right:-16px;padding-left:16px;padding-right:32px}.mfui-banner_show-next-slide .mfui-banner__slide-content{border-right:none;margin-right:0}.mfui-banner_show-next-slide.mfui-banner_radius_rounded .mfui-banner__slide-content{border-radius:24px}}.mfui-banner_background-color_green .mfui-banner__swiper{background-color:var(--brandGreen)}.mfui-banner_background-color_purple .mfui-banner__swiper{background-color:var(--brandPurple)}.mfui-banner_background-color_gradient .mfui-banner__swiper{background:-webkit-gradient(linear,right top,left top,from(#ada6ba),to(#f6f2f9));background:linear-gradient(270deg,#ada6ba,#f6f2f9)}.mfui-banner_background-color_light .mfui-banner__swiper{background-color:#f6f2f9}.mfui-banner_background-color_spbSky0 .mfui-banner__swiper{background-color:var(--spbSky0)}
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-banner{position:relative}.mfui-banner .swiper-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex}.mfui-banner .mfui-banner__swiper-container{position:relative}.mfui-banner__swiper{overflow:hidden}.mfui-banner__slide{-ms-flex-negative:0;flex-shrink:0;height:500px}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-banner__slide{height:420px}}@media screen and (min-width:1280px){.mfui-banner__slide{height:400px}}.mfui-banner__slide-content{border-right:1px solid transparent;margin-right:-1px}@media screen and (max-width:1023px){.mfui-banner__slide-content{height:100%}}.mfui-banner_auto-height .mfui-banner__slide{height:auto}.mfui-banner .mfui-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-banner .mfui-banner__arrow{display:none}}.mfui-banner .mfui-banner__arrow_theme_white{height:64px;width:64px}@media screen and (max-width:1023px){.mfui-banner .mfui-banner__arrow_theme_white{display:none}}.mfui-banner .mfui-banner__arrow_prev{left:12px}@media screen and (max-width:767px){.mfui-banner .mfui-banner__arrow_prev{left:8px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-banner .mfui-banner__arrow_prev{left:16px}}@media screen and (min-width:1280px){.mfui-banner .mfui-banner__arrow_prev{left:20px}}.mfui-banner .mfui-banner__arrow_next{right:12px}@media screen and (max-width:767px){.mfui-banner .mfui-banner__arrow_next{right:8px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-banner .mfui-banner__arrow_next{right:16px}}@media screen and (min-width:1280px){.mfui-banner .mfui-banner__arrow_next{right:20px}}.mfui-banner .mfui-banner__arrow_prev.mfui-banner__arrow_theme_white{left:0;translate:-50% -50%}.mfui-banner .mfui-banner__arrow_next.mfui-banner__arrow_theme_white{right:0;translate:50% -50%}.mfui-banner_no-touch .mfui-banner__arrow_theme_white:hover{scale:1.25}.mfui-banner_no-touch .mfui-banner__arrow_theme_white:active{scale:1.125}.mfui-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-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-banner__pagination_position_top-in{padding:0 80px}}.mfui-banner__pagination_type_flat{gap:4px}@media screen and (min-width:1280px){.mfui-banner__pagination_type_flat{gap:10px}}.mfui-banner__pagination_align_left{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.mfui-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-banner__pagination_bottom-offset{bottom:89px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-banner__pagination_bottom-offset{bottom:90px}}@media screen and (min-width:1280px) and (max-width:1439px){.mfui-banner__pagination_bottom-offset{bottom:65px}}@media screen and (min-width:1440px){.mfui-banner__pagination_bottom-offset{bottom:72px}}.mfui-banner_margin-top{margin-top:24px}.mfui-banner_radius_rounded .mfui-banner__swiper{border-radius:24px}@media screen and (max-width:767px){.mfui-banner_show-next-slide .mfui-banner__swiper{border-radius:0;margin-left:-16px;margin-right:-16px;padding-left:16px;padding-right:32px}.mfui-banner_show-next-slide .mfui-banner__slide-content{border-right:none;margin-right:0}.mfui-banner_show-next-slide.mfui-banner_radius_rounded .mfui-banner__slide-content{border-radius:24px}}.mfui-banner_background-color_green .mfui-banner__swiper{background-color:var(--brandGreen)}.mfui-banner_background-color_purple .mfui-banner__swiper{background-color:var(--brandPurple)}.mfui-banner_background-color_gradient .mfui-banner__swiper{background:-webkit-gradient(linear,right top,left top,from(#ada6ba),to(#f6f2f9));background:linear-gradient(270deg,#ada6ba,#f6f2f9)}.mfui-banner_background-color_light .mfui-banner__swiper{background-color:#f6f2f9}.mfui-banner_background-color_spbSky0 .mfui-banner__swiper{background-color:var(--spbSky0)}
|
|
@@ -31,10 +31,14 @@ export interface IChipsProps {
|
|
|
31
31
|
/** Дополнительные классы для внутренних элементов */
|
|
32
32
|
classes?: {
|
|
33
33
|
root?: string;
|
|
34
|
+
dropdown?: string;
|
|
35
|
+
dropdownList?: string;
|
|
34
36
|
};
|
|
35
37
|
/** Дополнительные data атрибуты к внутренним элементам */
|
|
36
38
|
dataAttrs?: {
|
|
37
39
|
root?: Record<string, string>;
|
|
40
|
+
dropdown?: Record<string, string>;
|
|
41
|
+
dropdownList?: Record<string, string>;
|
|
38
42
|
};
|
|
39
43
|
}
|
|
40
44
|
declare const Chips: React.FC<IChipsProps>;
|
|
@@ -141,7 +141,15 @@ var Chips = function Chips(_ref) {
|
|
|
141
141
|
items: hiddenItems,
|
|
142
142
|
moreTitle: moreTitle,
|
|
143
143
|
color: color,
|
|
144
|
-
onClick: handleClick
|
|
144
|
+
onClick: handleClick,
|
|
145
|
+
classes: {
|
|
146
|
+
root: classes.dropdown,
|
|
147
|
+
list: classes.dropdownList
|
|
148
|
+
},
|
|
149
|
+
dataAttrs: {
|
|
150
|
+
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.dropdown,
|
|
151
|
+
list: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.dropdownList
|
|
152
|
+
}
|
|
145
153
|
}));
|
|
146
154
|
};
|
|
147
155
|
export default Chips;
|
|
@@ -7,6 +7,10 @@ export interface IChipsDropdownProps {
|
|
|
7
7
|
items: IChipProps[];
|
|
8
8
|
color: ChipColorsType;
|
|
9
9
|
onClick: (e: React.SyntheticEvent<EventTarget>, id: ChipIdType) => void;
|
|
10
|
+
classes?: {
|
|
11
|
+
root?: string;
|
|
12
|
+
list?: string;
|
|
13
|
+
};
|
|
10
14
|
dataAttrs?: {
|
|
11
15
|
root?: Record<string, string>;
|
|
12
16
|
list?: Record<string, string>;
|
|
@@ -15,6 +15,8 @@ var ChipsDropdown = function ChipsDropdown(_ref) {
|
|
|
15
15
|
items = _ref$items === void 0 ? [] : _ref$items,
|
|
16
16
|
value = _ref.value,
|
|
17
17
|
onClick = _ref.onClick,
|
|
18
|
+
_ref$classes = _ref.classes,
|
|
19
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
|
18
20
|
dataAttrs = _ref.dataAttrs;
|
|
19
21
|
var _React$useState = React.useState(false),
|
|
20
22
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -57,31 +59,32 @@ var ChipsDropdown = function ChipsDropdown(_ref) {
|
|
|
57
59
|
};
|
|
58
60
|
}, [handleOutsideClick]);
|
|
59
61
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
60
|
-
className: cn(),
|
|
62
|
+
className: cn([classes.root]),
|
|
61
63
|
ref: dropdownRef
|
|
62
64
|
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), /*#__PURE__*/React.createElement(Chip, _extends({}, currentItem, {
|
|
63
|
-
className: cn('button'),
|
|
65
|
+
className: cn('button', [currentItem.className]),
|
|
64
66
|
color: color,
|
|
65
67
|
checked: !!currentItem.id,
|
|
66
68
|
arrow: isDropdownOpen ? 'up' : 'down',
|
|
67
69
|
onClick: handleOpenItemList
|
|
68
70
|
})), isDropdownOpen && /*#__PURE__*/React.createElement("div", _extends({
|
|
69
|
-
className: cn('list'),
|
|
71
|
+
className: cn('list', [classes.list]),
|
|
70
72
|
ref: listRef
|
|
71
73
|
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.list)), /*#__PURE__*/React.createElement("div", {
|
|
72
74
|
className: cn('list-inner')
|
|
73
75
|
}, items.map(function (item, key) {
|
|
76
|
+
var _a, _b;
|
|
74
77
|
var children = item.children,
|
|
75
78
|
title = item.title,
|
|
76
79
|
icon = item.icon;
|
|
77
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
80
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
78
81
|
key: key,
|
|
79
82
|
className: cn('list-item', {
|
|
80
83
|
'with-icon': !!icon
|
|
81
|
-
}),
|
|
84
|
+
}, [item.className, (_a = item.classes) === null || _a === void 0 ? void 0 : _a.root]),
|
|
82
85
|
onClick: handleItemClick(item),
|
|
83
86
|
onKeyDown: handleItemClick(item)
|
|
84
|
-
}, !!icon && /*#__PURE__*/React.createElement("span", {
|
|
87
|
+
}, filterDataAttrs((_b = item === null || item === void 0 ? void 0 : item.dataAttrs) === null || _b === void 0 ? void 0 : _b.root)), !!icon && /*#__PURE__*/React.createElement("span", {
|
|
85
88
|
className: cn('icon')
|
|
86
89
|
}, icon), children || title);
|
|
87
90
|
}))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-banner{position:relative}.mfui-banner .swiper-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex}.mfui-banner .mfui-banner__swiper-container{position:relative}.mfui-banner__swiper{overflow:hidden}.mfui-banner__slide{-ms-flex-negative:0;flex-shrink:0;height:500px}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-banner__slide{height:420px}}@media screen and (min-width:1280px){.mfui-banner__slide{height:400px}}.mfui-banner__slide-content{border-right:1px solid transparent;margin-right:-1px}@media screen and (max-width:1023px){.mfui-banner__slide-content{height:100%}}.mfui-banner_auto-height .mfui-banner__slide{height:auto}.mfui-banner .mfui-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-banner .mfui-banner__arrow{display:none}}.mfui-banner .mfui-banner__arrow_theme_white{height:64px;width:64px}@media screen and (max-width:1023px){.mfui-banner .mfui-banner__arrow_theme_white{display:none}}.mfui-banner .mfui-banner__arrow_prev{left:12px}@media screen and (max-width:767px){.mfui-banner .mfui-banner__arrow_prev{left:8px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-banner .mfui-banner__arrow_prev{left:16px}}@media screen and (min-width:1280px){.mfui-banner .mfui-banner__arrow_prev{left:20px}}.mfui-banner .mfui-banner__arrow_next{right:12px}@media screen and (max-width:767px){.mfui-banner .mfui-banner__arrow_next{right:8px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-banner .mfui-banner__arrow_next{right:16px}}@media screen and (min-width:1280px){.mfui-banner .mfui-banner__arrow_next{right:20px}}.mfui-banner .mfui-banner__arrow_prev.mfui-banner__arrow_theme_white{left:0;translate:-50% -50%}.mfui-banner .mfui-banner__arrow_next.mfui-banner__arrow_theme_white{right:0;translate:50% -50%}.mfui-banner_no-touch .mfui-banner__arrow_theme_white:hover{scale:1.25}.mfui-banner_no-touch .mfui-banner__arrow_theme_white:active{scale:1.125}.mfui-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;justify-content:center;margin-top:32px}.mfui-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-banner__pagination_position_top-in{padding:0 80px}}.mfui-banner__pagination_type_flat{gap:4px}@media screen and (min-width:1280px){.mfui-banner__pagination_type_flat{gap:10px}}.mfui-banner__pagination_align_left{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.mfui-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-banner__pagination_bottom-offset{bottom:89px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-banner__pagination_bottom-offset{bottom:90px}}@media screen and (min-width:1280px) and (max-width:1439px){.mfui-banner__pagination_bottom-offset{bottom:65px}}@media screen and (min-width:1440px){.mfui-banner__pagination_bottom-offset{bottom:72px}}.mfui-banner_margin-top{margin-top:24px}.mfui-banner_radius_rounded .mfui-banner__swiper{border-radius:24px}@media screen and (max-width:767px){.mfui-banner_show-next-slide .mfui-banner__swiper{border-radius:0;margin-left:-16px;margin-right:-16px;padding-left:16px;padding-right:32px}.mfui-banner_show-next-slide .mfui-banner__slide-content{border-right:none;margin-right:0}.mfui-banner_show-next-slide.mfui-banner_radius_rounded .mfui-banner__slide-content{border-radius:24px}}.mfui-banner_background-color_green .mfui-banner__swiper{background-color:var(--brandGreen)}.mfui-banner_background-color_purple .mfui-banner__swiper{background-color:var(--brandPurple)}.mfui-banner_background-color_gradient .mfui-banner__swiper{background:-webkit-gradient(linear,right top,left top,from(#ada6ba),to(#f6f2f9));background:linear-gradient(270deg,#ada6ba,#f6f2f9)}.mfui-banner_background-color_light .mfui-banner__swiper{background-color:#f6f2f9}.mfui-banner_background-color_spbSky0 .mfui-banner__swiper{background-color:var(--spbSky0)}
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-banner{position:relative}.mfui-banner .swiper-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex}.mfui-banner .mfui-banner__swiper-container{position:relative}.mfui-banner__swiper{overflow:hidden}.mfui-banner__slide{-ms-flex-negative:0;flex-shrink:0;height:500px}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-banner__slide{height:420px}}@media screen and (min-width:1280px){.mfui-banner__slide{height:400px}}.mfui-banner__slide-content{border-right:1px solid transparent;margin-right:-1px}@media screen and (max-width:1023px){.mfui-banner__slide-content{height:100%}}.mfui-banner_auto-height .mfui-banner__slide{height:auto}.mfui-banner .mfui-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-banner .mfui-banner__arrow{display:none}}.mfui-banner .mfui-banner__arrow_theme_white{height:64px;width:64px}@media screen and (max-width:1023px){.mfui-banner .mfui-banner__arrow_theme_white{display:none}}.mfui-banner .mfui-banner__arrow_prev{left:12px}@media screen and (max-width:767px){.mfui-banner .mfui-banner__arrow_prev{left:8px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-banner .mfui-banner__arrow_prev{left:16px}}@media screen and (min-width:1280px){.mfui-banner .mfui-banner__arrow_prev{left:20px}}.mfui-banner .mfui-banner__arrow_next{right:12px}@media screen and (max-width:767px){.mfui-banner .mfui-banner__arrow_next{right:8px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-banner .mfui-banner__arrow_next{right:16px}}@media screen and (min-width:1280px){.mfui-banner .mfui-banner__arrow_next{right:20px}}.mfui-banner .mfui-banner__arrow_prev.mfui-banner__arrow_theme_white{left:0;translate:-50% -50%}.mfui-banner .mfui-banner__arrow_next.mfui-banner__arrow_theme_white{right:0;translate:50% -50%}.mfui-banner_no-touch .mfui-banner__arrow_theme_white:hover{scale:1.25}.mfui-banner_no-touch .mfui-banner__arrow_theme_white:active{scale:1.125}.mfui-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-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-banner__pagination_position_top-in{padding:0 80px}}.mfui-banner__pagination_type_flat{gap:4px}@media screen and (min-width:1280px){.mfui-banner__pagination_type_flat{gap:10px}}.mfui-banner__pagination_align_left{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.mfui-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-banner__pagination_bottom-offset{bottom:89px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-banner__pagination_bottom-offset{bottom:90px}}@media screen and (min-width:1280px) and (max-width:1439px){.mfui-banner__pagination_bottom-offset{bottom:65px}}@media screen and (min-width:1440px){.mfui-banner__pagination_bottom-offset{bottom:72px}}.mfui-banner_margin-top{margin-top:24px}.mfui-banner_radius_rounded .mfui-banner__swiper{border-radius:24px}@media screen and (max-width:767px){.mfui-banner_show-next-slide .mfui-banner__swiper{border-radius:0;margin-left:-16px;margin-right:-16px;padding-left:16px;padding-right:32px}.mfui-banner_show-next-slide .mfui-banner__slide-content{border-right:none;margin-right:0}.mfui-banner_show-next-slide.mfui-banner_radius_rounded .mfui-banner__slide-content{border-radius:24px}}.mfui-banner_background-color_green .mfui-banner__swiper{background-color:var(--brandGreen)}.mfui-banner_background-color_purple .mfui-banner__swiper{background-color:var(--brandPurple)}.mfui-banner_background-color_gradient .mfui-banner__swiper{background:-webkit-gradient(linear,right top,left top,from(#ada6ba),to(#f6f2f9));background:linear-gradient(270deg,#ada6ba,#f6f2f9)}.mfui-banner_background-color_light .mfui-banner__swiper{background-color:#f6f2f9}.mfui-banner_background-color_spbSky0 .mfui-banner__swiper{background-color:var(--spbSky0)}
|
|
@@ -31,10 +31,14 @@ export interface IChipsProps {
|
|
|
31
31
|
/** Дополнительные классы для внутренних элементов */
|
|
32
32
|
classes?: {
|
|
33
33
|
root?: string;
|
|
34
|
+
dropdown?: string;
|
|
35
|
+
dropdownList?: string;
|
|
34
36
|
};
|
|
35
37
|
/** Дополнительные data атрибуты к внутренним элементам */
|
|
36
38
|
dataAttrs?: {
|
|
37
39
|
root?: Record<string, string>;
|
|
40
|
+
dropdown?: Record<string, string>;
|
|
41
|
+
dropdownList?: Record<string, string>;
|
|
38
42
|
};
|
|
39
43
|
}
|
|
40
44
|
declare const Chips: React.FC<IChipsProps>;
|
|
@@ -150,7 +150,15 @@ var Chips = function Chips(_ref) {
|
|
|
150
150
|
items: hiddenItems,
|
|
151
151
|
moreTitle: moreTitle,
|
|
152
152
|
color: color,
|
|
153
|
-
onClick: handleClick
|
|
153
|
+
onClick: handleClick,
|
|
154
|
+
classes: {
|
|
155
|
+
root: classes.dropdown,
|
|
156
|
+
list: classes.dropdownList
|
|
157
|
+
},
|
|
158
|
+
dataAttrs: {
|
|
159
|
+
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.dropdown,
|
|
160
|
+
list: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.dropdownList
|
|
161
|
+
}
|
|
154
162
|
}));
|
|
155
163
|
};
|
|
156
164
|
var _default = exports["default"] = Chips;
|
|
@@ -7,6 +7,10 @@ export interface IChipsDropdownProps {
|
|
|
7
7
|
items: IChipProps[];
|
|
8
8
|
color: ChipColorsType;
|
|
9
9
|
onClick: (e: React.SyntheticEvent<EventTarget>, id: ChipIdType) => void;
|
|
10
|
+
classes?: {
|
|
11
|
+
root?: string;
|
|
12
|
+
list?: string;
|
|
13
|
+
};
|
|
10
14
|
dataAttrs?: {
|
|
11
15
|
root?: Record<string, string>;
|
|
12
16
|
list?: Record<string, string>;
|
|
@@ -24,6 +24,8 @@ var ChipsDropdown = function ChipsDropdown(_ref) {
|
|
|
24
24
|
items = _ref$items === void 0 ? [] : _ref$items,
|
|
25
25
|
value = _ref.value,
|
|
26
26
|
onClick = _ref.onClick,
|
|
27
|
+
_ref$classes = _ref.classes,
|
|
28
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
|
27
29
|
dataAttrs = _ref.dataAttrs;
|
|
28
30
|
var _React$useState = React.useState(false),
|
|
29
31
|
_React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
|
|
@@ -66,31 +68,32 @@ var ChipsDropdown = function ChipsDropdown(_ref) {
|
|
|
66
68
|
};
|
|
67
69
|
}, [handleOutsideClick]);
|
|
68
70
|
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({
|
|
69
|
-
className: cn(),
|
|
71
|
+
className: cn([classes.root]),
|
|
70
72
|
ref: dropdownRef
|
|
71
73
|
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), /*#__PURE__*/React.createElement(_Chip["default"], (0, _extends2["default"])({}, currentItem, {
|
|
72
|
-
className: cn('button'),
|
|
74
|
+
className: cn('button', [currentItem.className]),
|
|
73
75
|
color: color,
|
|
74
76
|
checked: !!currentItem.id,
|
|
75
77
|
arrow: isDropdownOpen ? 'up' : 'down',
|
|
76
78
|
onClick: handleOpenItemList
|
|
77
79
|
})), isDropdownOpen && /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({
|
|
78
|
-
className: cn('list'),
|
|
80
|
+
className: cn('list', [classes.list]),
|
|
79
81
|
ref: listRef
|
|
80
82
|
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.list)), /*#__PURE__*/React.createElement("div", {
|
|
81
83
|
className: cn('list-inner')
|
|
82
84
|
}, items.map(function (item, key) {
|
|
85
|
+
var _a, _b;
|
|
83
86
|
var children = item.children,
|
|
84
87
|
title = item.title,
|
|
85
88
|
icon = item.icon;
|
|
86
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
89
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({
|
|
87
90
|
key: key,
|
|
88
91
|
className: cn('list-item', {
|
|
89
92
|
'with-icon': !!icon
|
|
90
|
-
}),
|
|
93
|
+
}, [item.className, (_a = item.classes) === null || _a === void 0 ? void 0 : _a.root]),
|
|
91
94
|
onClick: handleItemClick(item),
|
|
92
95
|
onKeyDown: handleItemClick(item)
|
|
93
|
-
}, !!icon && /*#__PURE__*/React.createElement("span", {
|
|
96
|
+
}, (0, _uiHelpers.filterDataAttrs)((_b = item === null || item === void 0 ? void 0 : item.dataAttrs) === null || _b === void 0 ? void 0 : _b.root)), !!icon && /*#__PURE__*/React.createElement("span", {
|
|
94
97
|
className: cn('icon')
|
|
95
98
|
}, icon), children || title);
|
|
96
99
|
}))));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@megafon/ui-core",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.6.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist",
|
|
6
6
|
"styles"
|
|
@@ -104,5 +104,5 @@
|
|
|
104
104
|
"simplebar-react": "^3.2.5",
|
|
105
105
|
"swiper": "^11.1.1"
|
|
106
106
|
},
|
|
107
|
-
"gitHead": "
|
|
107
|
+
"gitHead": "6d52031f7c5db8634f49913026723b2291d3ccc6"
|
|
108
108
|
}
|