@gravity-ui/navigation 0.10.1 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/components/ActionBar/ActionBar.d.ts +7 -7
- package/build/cjs/components/ActionBar/Group/ActionBarGroup.d.ts +3 -3
- package/build/cjs/components/ActionBar/Item/ActionBarItem.d.ts +3 -3
- package/build/cjs/components/ActionBar/Section/ActionBarSection.d.ts +3 -3
- package/build/cjs/components/ActionBar/Separator/ActionBarSeparator.d.ts +2 -1
- package/build/cjs/components/ActionBar/__stories__/ActionBar.stories.d.ts +13 -58
- package/build/cjs/components/ActionBar/__stories__/ActionBarShowcase.d.ts +2 -2
- package/build/cjs/components/ActionBar/__stories__/ActionBarSingleSection.d.ts +2 -2
- package/build/cjs/components/ActionBar/types.d.ts +1 -1
- package/build/cjs/components/AsideHeader/AsideHeader.d.ts +2 -2
- package/build/cjs/components/AsideHeader/__stories__/AsideHeader.stories.d.ts +4 -5
- package/build/cjs/components/AsideHeader/__stories__/getAsideHeaderWrapper.d.ts +2 -2
- package/build/cjs/components/CompositeBar/CompositeBar.d.ts +1 -1
- package/build/cjs/components/CompositeBar/MultipleTooltip/MultipleTooltip.d.ts +1 -1
- package/build/cjs/components/CompositeBar/MultipleTooltip/MultipleTooltipContext.d.ts +2 -2
- package/build/cjs/components/CompositeBar/__stories__/CompositeBar.stories.d.ts +2 -4
- package/build/cjs/components/Content/Content.d.ts +1 -1
- package/build/cjs/components/Drawer/Drawer.d.ts +1 -1
- package/build/cjs/components/Drawer/__stories__/Drawer.stories.d.ts +2 -3
- package/build/cjs/components/Drawer/__stories__/DrawerShowcase.d.ts +2 -2
- package/build/cjs/components/FooterItem/__stories__/FooterItem.stories.d.ts +2 -4
- package/build/cjs/components/HotkeysPanel/HotkeysPanel.d.ts +3 -2
- package/build/cjs/components/HotkeysPanel/__stories__/HotkeysPanel.stories.d.ts +2 -3
- package/build/cjs/components/HotkeysPanel/__stories__/HotkeysPanelShowcase.d.ts +2 -2
- package/build/cjs/components/HotkeysPanel/types.d.ts +3 -3
- package/build/cjs/components/MobileHeader/Burger/Burger.d.ts +1 -1
- package/build/cjs/components/MobileHeader/BurgerMenu/BurgerCompositeBar/BurgerCompositeBar.d.ts +1 -1
- package/build/cjs/components/MobileHeader/BurgerMenu/BurgerMenu.d.ts +1 -1
- package/build/cjs/components/MobileHeader/BurgerMenu/__stories__/BurgerMenu.stories.d.ts +2 -4
- package/build/cjs/components/MobileHeader/FooterItem/FooterItem.d.ts +1 -1
- package/build/cjs/components/MobileHeader/__stories__/MobileHeader.stories.d.ts +2 -3
- package/build/cjs/components/MobileHeader/__stories__/MobileHeaderShowcase.d.ts +2 -2
- package/build/cjs/components/MobileHeader/types.d.ts +4 -4
- package/build/cjs/components/Settings/Settings.d.ts +7 -7
- package/build/cjs/components/Settings/SettingsMenuMobile/SettingsMenuMobile.d.ts +2 -1
- package/build/cjs/components/Settings/SettingsSearch/SettingsSearch.d.ts +1 -1
- package/build/cjs/components/Settings/__stories__/Settings.stories.d.ts +3 -4
- package/build/cjs/components/Settings/__stories__/SettingsDemo.d.ts +2 -2
- package/build/cjs/components/Settings/__stories__/SettingsMobileDemo.d.ts +2 -2
- package/build/cjs/components/Settings/collect-settings.d.ts +1 -1
- package/build/cjs/components/Settings/helpers.d.ts +1 -1
- package/build/cjs/components/Settings/types.d.ts +1 -1
- package/build/cjs/components/Title/Title.d.ts +2 -2
- package/build/cjs/components/helpers.d.ts +5 -0
- package/build/cjs/components/index.d.ts +1 -0
- package/build/cjs/components/types.d.ts +2 -2
- package/build/cjs/components/utils/cn.d.ts +2 -2
- package/build/cjs/components/utils/configure.d.ts +12 -0
- package/build/cjs/index.js +313 -385
- package/build/cjs/index.js.map +1 -1
- package/build/esm/components/ActionBar/ActionBar.d.ts +7 -7
- package/build/esm/components/ActionBar/Group/ActionBarGroup.d.ts +3 -3
- package/build/esm/components/ActionBar/Item/ActionBarItem.d.ts +3 -3
- package/build/esm/components/ActionBar/Section/ActionBarSection.d.ts +3 -3
- package/build/esm/components/ActionBar/Separator/ActionBarSeparator.d.ts +2 -1
- package/build/esm/components/ActionBar/__stories__/ActionBar.stories.d.ts +13 -58
- package/build/esm/components/ActionBar/__stories__/ActionBarShowcase.d.ts +2 -2
- package/build/esm/components/ActionBar/__stories__/ActionBarSingleSection.d.ts +2 -2
- package/build/esm/components/ActionBar/types.d.ts +1 -1
- package/build/esm/components/AsideHeader/AsideHeader.d.ts +2 -2
- package/build/esm/components/AsideHeader/__stories__/AsideHeader.stories.d.ts +4 -5
- package/build/esm/components/AsideHeader/__stories__/getAsideHeaderWrapper.d.ts +2 -2
- package/build/esm/components/CompositeBar/CompositeBar.d.ts +1 -1
- package/build/esm/components/CompositeBar/MultipleTooltip/MultipleTooltip.d.ts +1 -1
- package/build/esm/components/CompositeBar/MultipleTooltip/MultipleTooltipContext.d.ts +2 -2
- package/build/esm/components/CompositeBar/__stories__/CompositeBar.stories.d.ts +2 -4
- package/build/esm/components/Content/Content.d.ts +1 -1
- package/build/esm/components/Drawer/Drawer.d.ts +1 -1
- package/build/esm/components/Drawer/__stories__/Drawer.stories.d.ts +2 -3
- package/build/esm/components/Drawer/__stories__/DrawerShowcase.d.ts +2 -2
- package/build/esm/components/FooterItem/__stories__/FooterItem.stories.d.ts +2 -4
- package/build/esm/components/HotkeysPanel/HotkeysPanel.d.ts +3 -2
- package/build/esm/components/HotkeysPanel/__stories__/HotkeysPanel.stories.d.ts +2 -3
- package/build/esm/components/HotkeysPanel/__stories__/HotkeysPanelShowcase.d.ts +2 -2
- package/build/esm/components/HotkeysPanel/types.d.ts +3 -3
- package/build/esm/components/MobileHeader/Burger/Burger.d.ts +1 -1
- package/build/esm/components/MobileHeader/BurgerMenu/BurgerCompositeBar/BurgerCompositeBar.d.ts +1 -1
- package/build/esm/components/MobileHeader/BurgerMenu/BurgerMenu.d.ts +1 -1
- package/build/esm/components/MobileHeader/BurgerMenu/__stories__/BurgerMenu.stories.d.ts +2 -4
- package/build/esm/components/MobileHeader/FooterItem/FooterItem.d.ts +1 -1
- package/build/esm/components/MobileHeader/__stories__/MobileHeader.stories.d.ts +2 -3
- package/build/esm/components/MobileHeader/__stories__/MobileHeaderShowcase.d.ts +2 -2
- package/build/esm/components/MobileHeader/types.d.ts +4 -4
- package/build/esm/components/Settings/Settings.d.ts +7 -7
- package/build/esm/components/Settings/SettingsMenuMobile/SettingsMenuMobile.d.ts +2 -1
- package/build/esm/components/Settings/SettingsSearch/SettingsSearch.d.ts +1 -1
- package/build/esm/components/Settings/__stories__/Settings.stories.d.ts +3 -4
- package/build/esm/components/Settings/__stories__/SettingsDemo.d.ts +2 -2
- package/build/esm/components/Settings/__stories__/SettingsMobileDemo.d.ts +2 -2
- package/build/esm/components/Settings/collect-settings.d.ts +1 -1
- package/build/esm/components/Settings/helpers.d.ts +1 -1
- package/build/esm/components/Settings/types.d.ts +1 -1
- package/build/esm/components/Title/Title.d.ts +2 -2
- package/build/esm/components/helpers.d.ts +5 -0
- package/build/esm/components/index.d.ts +1 -0
- package/build/esm/components/types.d.ts +2 -2
- package/build/esm/components/utils/cn.d.ts +2 -2
- package/build/esm/components/utils/configure.d.ts +12 -0
- package/build/esm/index.js +314 -387
- package/build/esm/index.js.map +1 -1
- package/package.json +107 -99
- package/CHANGELOG.md +0 -193
package/build/cjs/index.js
CHANGED
|
@@ -49,7 +49,13 @@ var lib = {exports: {}};
|
|
|
49
49
|
|
|
50
50
|
Object.defineProperty(lib$1, "__esModule", { value: true });
|
|
51
51
|
var bem_cn_1 = lib.exports;
|
|
52
|
-
var block$1 = bem_cn_1.setup();
|
|
52
|
+
var block$1 = (0, bem_cn_1.setup)();
|
|
53
|
+
function isString(data) {
|
|
54
|
+
return typeof data === 'string';
|
|
55
|
+
}
|
|
56
|
+
function hasMixinShape(data) {
|
|
57
|
+
return isString(data) || (Array.isArray(data) && data.every(isString));
|
|
58
|
+
}
|
|
53
59
|
function bemClassNameLite(blockName) {
|
|
54
60
|
var b = block$1(blockName);
|
|
55
61
|
function element() {
|
|
@@ -60,7 +66,7 @@ function bemClassNameLite(blockName) {
|
|
|
60
66
|
var elementName = args.shift();
|
|
61
67
|
var modifiers = args[0], mixin = args[1];
|
|
62
68
|
var result;
|
|
63
|
-
if (typeof elementName !== 'string' ||
|
|
69
|
+
if (typeof elementName !== 'string' || hasMixinShape(modifiers)) {
|
|
64
70
|
mixin = modifiers;
|
|
65
71
|
modifiers = null;
|
|
66
72
|
}
|
|
@@ -76,10 +82,10 @@ function bemClassNameLite(blockName) {
|
|
|
76
82
|
return element;
|
|
77
83
|
}
|
|
78
84
|
bemClassNameLite.setup = function (config) {
|
|
79
|
-
block$1 = bem_cn_1.setup(config);
|
|
85
|
+
block$1 = (0, bem_cn_1.setup)(config);
|
|
80
86
|
};
|
|
81
87
|
bemClassNameLite.reset = function () {
|
|
82
|
-
block$1 = bem_cn_1.setup();
|
|
88
|
+
block$1 = (0, bem_cn_1.setup)();
|
|
83
89
|
};
|
|
84
90
|
var _default = lib$1.default = bemClassNameLite;
|
|
85
91
|
|
|
@@ -111,8 +117,8 @@ const defaultDict$2 = {
|
|
|
111
117
|
[exports.MobileHeaderDict.OpenBurger]: 'Open menu',
|
|
112
118
|
};
|
|
113
119
|
|
|
114
|
-
function _extends$
|
|
115
|
-
_extends$
|
|
120
|
+
function _extends$2() {
|
|
121
|
+
_extends$2 = Object.assign ? Object.assign.bind() : function (target) {
|
|
116
122
|
for (var i = 1; i < arguments.length; i++) {
|
|
117
123
|
var source = arguments[i];
|
|
118
124
|
for (var key in source) {
|
|
@@ -123,7 +129,7 @@ function _extends$3() {
|
|
|
123
129
|
}
|
|
124
130
|
return target;
|
|
125
131
|
};
|
|
126
|
-
return _extends$
|
|
132
|
+
return _extends$2.apply(this, arguments);
|
|
127
133
|
}
|
|
128
134
|
|
|
129
135
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
@@ -1378,7 +1384,7 @@ function removeClass$1(element, className) {
|
|
|
1378
1384
|
}
|
|
1379
1385
|
}
|
|
1380
1386
|
|
|
1381
|
-
var config = {
|
|
1387
|
+
var config$1 = {
|
|
1382
1388
|
disabled: false
|
|
1383
1389
|
};
|
|
1384
1390
|
|
|
@@ -1658,7 +1664,7 @@ var Transition = /*#__PURE__*/function (_React$Component) {
|
|
|
1658
1664
|
var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED
|
|
1659
1665
|
// if we are mounting and running this it means appear _must_ be set
|
|
1660
1666
|
|
|
1661
|
-
if (!mounting && !enter || config.disabled) {
|
|
1667
|
+
if (!mounting && !enter || config$1.disabled) {
|
|
1662
1668
|
this.safeSetState({
|
|
1663
1669
|
status: ENTERED
|
|
1664
1670
|
}, function () {
|
|
@@ -1690,7 +1696,7 @@ var Transition = /*#__PURE__*/function (_React$Component) {
|
|
|
1690
1696
|
var timeouts = this.getTimeouts();
|
|
1691
1697
|
var maybeNode = this.props.nodeRef ? undefined : ReactDOM__default["default"].findDOMNode(this); // no exit animation skip right to EXITED
|
|
1692
1698
|
|
|
1693
|
-
if (!exit || config.disabled) {
|
|
1699
|
+
if (!exit || config$1.disabled) {
|
|
1694
1700
|
this.safeSetState({
|
|
1695
1701
|
status: EXITED
|
|
1696
1702
|
}, function () {
|
|
@@ -2276,7 +2282,7 @@ var CSSTransition = /*#__PURE__*/function (_React$Component) {
|
|
|
2276
2282
|
_this$props.classNames;
|
|
2277
2283
|
var props = _objectWithoutPropertiesLoose(_this$props, ["classNames"]);
|
|
2278
2284
|
|
|
2279
|
-
return /*#__PURE__*/React__default["default"].createElement(Transition, _extends$
|
|
2285
|
+
return /*#__PURE__*/React__default["default"].createElement(Transition, _extends$2({}, props, {
|
|
2280
2286
|
onEnter: this.onEnter,
|
|
2281
2287
|
onEntered: this.onEntered,
|
|
2282
2288
|
onEntering: this.onEntering,
|
|
@@ -2292,7 +2298,7 @@ var CSSTransition = /*#__PURE__*/function (_React$Component) {
|
|
|
2292
2298
|
CSSTransition.defaultProps = {
|
|
2293
2299
|
classNames: ''
|
|
2294
2300
|
};
|
|
2295
|
-
CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$
|
|
2301
|
+
CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$2({}, Transition.propTypes, {
|
|
2296
2302
|
/**
|
|
2297
2303
|
* The animation classNames applied to the component as it appears, enters,
|
|
2298
2304
|
* exits or has finished the transition. A single name can be provided, which
|
|
@@ -2654,7 +2660,7 @@ var TransitionGroup = /*#__PURE__*/function (_React$Component) {
|
|
|
2654
2660
|
|
|
2655
2661
|
if (this.mounted) {
|
|
2656
2662
|
this.setState(function (state) {
|
|
2657
|
-
var children = _extends$
|
|
2663
|
+
var children = _extends$2({}, state.children);
|
|
2658
2664
|
|
|
2659
2665
|
delete children[child.key];
|
|
2660
2666
|
return {
|
|
@@ -3157,7 +3163,7 @@ function styleInject(css, ref) {
|
|
|
3157
3163
|
}
|
|
3158
3164
|
}
|
|
3159
3165
|
|
|
3160
|
-
var css_248z$m = ".ycn-drawer__item {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n height: 100%;\n will-change: transform;\n background-color: var(--
|
|
3166
|
+
var css_248z$m = ".ycn-drawer__item {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n height: 100%;\n will-change: transform;\n background-color: var(--g-color-base-background);\n}\n.ycn-drawer__item_direction_right {\n left: auto;\n right: 0;\n}\n.ycn-drawer__item-transition-enter {\n transform: translate(-100%, 0);\n}\n.ycn-drawer__item-transition_direction_right-enter {\n transform: translate(100%, 0);\n}\n.ycn-drawer__item-transition-enter-active, .ycn-drawer__item-transition_direction_right-enter-active {\n transform: translate(0, 0);\n transition: transform 300ms;\n}\n.ycn-drawer__item-transition-enter-done, .ycn-drawer__item-transition_direction_right-enter-done {\n filter: blur(0px);\n transform: translateZ(0);\n}\n.ycn-drawer__item-transition-exit, .ycn-drawer__item-transition_direction_right-exit {\n transform: translate(0, 0);\n}\n.ycn-drawer__item-transition-exit-active, .ycn-drawer__item-transition_direction_right-exit-active {\n transition: transform 300ms;\n}\n.ycn-drawer__item-transition-exit-active {\n transform: translate(-100%, 0);\n}\n.ycn-drawer__item-transition_direction_right-exit-active {\n transform: translate(100%, 0);\n}\n.ycn-drawer__item-transition-exit-done, .ycn-drawer__item-transition_direction_right-exit-done {\n visibility: hidden;\n}\n.ycn-drawer__veil {\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n background-color: var(--g-color-sfx-veil);\n}\n.ycn-drawer__veil-transition-enter {\n opacity: 0;\n}\n.ycn-drawer__veil-transition-enter-active {\n opacity: 1;\n transition: opacity 300ms;\n}\n.ycn-drawer__veil-transition-exit {\n opacity: 1;\n}\n.ycn-drawer__veil-transition-exit-active {\n opacity: 0;\n transition: opacity 300ms;\n}\n.ycn-drawer__veil-transition-exit-done {\n visibility: hidden;\n}";
|
|
3161
3167
|
styleInject(css_248z$m);
|
|
3162
3168
|
|
|
3163
3169
|
const b$n = block('drawer');
|
|
@@ -3210,7 +3216,7 @@ const Drawer = ({ className, children, style, onVeilClick, onEscape, preventScro
|
|
|
3210
3216
|
}));
|
|
3211
3217
|
};
|
|
3212
3218
|
|
|
3213
|
-
var css_248z$l = ".ycn-logo {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n height: 40px;\n}\n.ycn-logo__logo-btn-place {\n flex-shrink: 0;\n width: var(--aside-header-min-width);\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n}\n.ycn-logo__logo-btn-place .yc-button::before {\n background-color: transparent;\n}\n.ycn-logo__btn-logo.yc-button_view_flat.yc-button_size_l {\n --yc-button-height: 38px;\n}\n.ycn-logo__logo {\n font-size: var(--
|
|
3219
|
+
var css_248z$l = ".ycn-logo {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n height: 40px;\n}\n.ycn-logo__logo-btn-place {\n flex-shrink: 0;\n width: var(--aside-header-min-width);\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n}\n.ycn-logo__logo-btn-place .yc-button::before {\n background-color: transparent;\n}\n.ycn-logo__btn-logo.yc-button_view_flat.yc-button_size_l {\n --yc-button-height: 38px;\n}\n.ycn-logo__logo {\n font-size: var(--g-text-body-2-font-size);\n line-height: var(--g-text-body-2-line-height);\n font-weight: var(--g-text-body-font-weight);\n vertical-align: middle;\n cursor: pointer;\n}\n.ycn-logo__logo-link, .ycn-logo__logo-link:hover, .ycn-logo__logo-link:active, .ycn-logo__logo-link:visited, .ycn-logo__logo-link:focus {\n text-decoration: none;\n outline: none;\n color: inherit;\n}\n.yc-root .ycn-logo__btn-logo.button2_theme_flat.button2_hovered_yes::before {\n background-color: transparent;\n}";
|
|
3214
3220
|
styleInject(css_248z$l);
|
|
3215
3221
|
|
|
3216
3222
|
const b$m = block('logo');
|
|
@@ -3245,143 +3251,38 @@ const Logo$1 = ({ text, compact, icon, iconSrc, iconClassName, iconSize = 24, te
|
|
|
3245
3251
|
(hasWrapper ? (React__default["default"].createElement("div", { onClick: onClick }, wrapper(logo, compact))) : (React__default["default"].createElement("a", Object.assign({}, linkProps, { className: b$m('logo-link'), onClick: onClick }), logo)))));
|
|
3246
3252
|
};
|
|
3247
3253
|
|
|
3248
|
-
var classCallCheck = function (instance, Constructor) {
|
|
3249
|
-
if (!(instance instanceof Constructor)) {
|
|
3250
|
-
throw new TypeError("Cannot call a class as a function");
|
|
3251
|
-
}
|
|
3252
|
-
};
|
|
3253
|
-
|
|
3254
|
-
var createClass = function () {
|
|
3255
|
-
function defineProperties(target, props) {
|
|
3256
|
-
for (var i = 0; i < props.length; i++) {
|
|
3257
|
-
var descriptor = props[i];
|
|
3258
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
3259
|
-
descriptor.configurable = true;
|
|
3260
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
3261
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
3262
|
-
}
|
|
3263
|
-
}
|
|
3264
|
-
|
|
3265
|
-
return function (Constructor, protoProps, staticProps) {
|
|
3266
|
-
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
|
3267
|
-
if (staticProps) defineProperties(Constructor, staticProps);
|
|
3268
|
-
return Constructor;
|
|
3269
|
-
};
|
|
3270
|
-
}();
|
|
3271
|
-
|
|
3272
|
-
var _extends$2 = Object.assign || function (target) {
|
|
3273
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
3274
|
-
var source = arguments[i];
|
|
3275
|
-
|
|
3276
|
-
for (var key in source) {
|
|
3277
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
3278
|
-
target[key] = source[key];
|
|
3279
|
-
}
|
|
3280
|
-
}
|
|
3281
|
-
}
|
|
3282
|
-
|
|
3283
|
-
return target;
|
|
3284
|
-
};
|
|
3285
|
-
|
|
3286
|
-
var inherits = function (subClass, superClass) {
|
|
3287
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
3288
|
-
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
|
|
3289
|
-
}
|
|
3290
|
-
|
|
3291
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
3292
|
-
constructor: {
|
|
3293
|
-
value: subClass,
|
|
3294
|
-
enumerable: false,
|
|
3295
|
-
writable: true,
|
|
3296
|
-
configurable: true
|
|
3297
|
-
}
|
|
3298
|
-
});
|
|
3299
|
-
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
|
|
3300
|
-
};
|
|
3301
|
-
|
|
3302
|
-
var possibleConstructorReturn = function (self, call) {
|
|
3303
|
-
if (!self) {
|
|
3304
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3305
|
-
}
|
|
3306
|
-
|
|
3307
|
-
return call && (typeof call === "object" || typeof call === "function") ? call : self;
|
|
3308
|
-
};
|
|
3309
|
-
|
|
3310
|
-
var slicedToArray = function () {
|
|
3311
|
-
function sliceIterator(arr, i) {
|
|
3312
|
-
var _arr = [];
|
|
3313
|
-
var _n = true;
|
|
3314
|
-
var _d = false;
|
|
3315
|
-
var _e = undefined;
|
|
3316
|
-
|
|
3317
|
-
try {
|
|
3318
|
-
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
3319
|
-
_arr.push(_s.value);
|
|
3320
|
-
|
|
3321
|
-
if (i && _arr.length === i) break;
|
|
3322
|
-
}
|
|
3323
|
-
} catch (err) {
|
|
3324
|
-
_d = true;
|
|
3325
|
-
_e = err;
|
|
3326
|
-
} finally {
|
|
3327
|
-
try {
|
|
3328
|
-
if (!_n && _i["return"]) _i["return"]();
|
|
3329
|
-
} finally {
|
|
3330
|
-
if (_d) throw _e;
|
|
3331
|
-
}
|
|
3332
|
-
}
|
|
3333
|
-
|
|
3334
|
-
return _arr;
|
|
3335
|
-
}
|
|
3336
|
-
|
|
3337
|
-
return function (arr, i) {
|
|
3338
|
-
if (Array.isArray(arr)) {
|
|
3339
|
-
return arr;
|
|
3340
|
-
} else if (Symbol.iterator in Object(arr)) {
|
|
3341
|
-
return sliceIterator(arr, i);
|
|
3342
|
-
} else {
|
|
3343
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
3344
|
-
}
|
|
3345
|
-
};
|
|
3346
|
-
}();
|
|
3347
|
-
|
|
3348
3254
|
/**
|
|
3349
3255
|
* Detect Element Resize.
|
|
3350
3256
|
* https://github.com/sdecima/javascript-detect-element-resize
|
|
3351
3257
|
* Sebastian Decima
|
|
3352
3258
|
*
|
|
3353
3259
|
* Forked from version 0.5.3; includes the following modifications:
|
|
3354
|
-
* 1)
|
|
3355
|
-
* 2)
|
|
3260
|
+
* 1) Guard against unsafe 'window' and 'document' references (to support SSR).
|
|
3261
|
+
* 2) Defer initialization code via a top-level function wrapper (to support SSR).
|
|
3356
3262
|
* 3) Avoid unnecessary reflows by not measuring size for scroll events bubbling from children.
|
|
3357
3263
|
* 4) Add nonce for style element.
|
|
3264
|
+
* 5) Use 'export' statement over 'module.exports' assignment
|
|
3358
3265
|
**/
|
|
3359
3266
|
|
|
3360
3267
|
// Check `document` and `window` in case of server-side rendering
|
|
3361
|
-
|
|
3362
|
-
if (typeof window !==
|
|
3268
|
+
let windowObject;
|
|
3269
|
+
if (typeof window !== "undefined") {
|
|
3363
3270
|
windowObject = window;
|
|
3364
3271
|
|
|
3365
3272
|
// eslint-disable-next-line no-restricted-globals
|
|
3366
|
-
} else if (typeof self !==
|
|
3273
|
+
} else if (typeof self !== "undefined") {
|
|
3367
3274
|
// eslint-disable-next-line no-restricted-globals
|
|
3368
3275
|
windowObject = self;
|
|
3369
3276
|
} else {
|
|
3370
3277
|
windowObject = global;
|
|
3371
3278
|
}
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
var setTimeoutFn = windowObject.setTimeout;
|
|
3380
|
-
|
|
3381
|
-
var cancelAnimationFrameFn = windowObject.cancelAnimationFrame || windowObject.mozCancelAnimationFrame || windowObject.webkitCancelAnimationFrame;
|
|
3382
|
-
|
|
3383
|
-
var requestAnimationFrameFn = windowObject.requestAnimationFrame || windowObject.mozRequestAnimationFrame || windowObject.webkitRequestAnimationFrame;
|
|
3384
|
-
|
|
3279
|
+
let cancelFrame = null;
|
|
3280
|
+
let requestFrame = null;
|
|
3281
|
+
const TIMEOUT_DURATION = 20;
|
|
3282
|
+
const clearTimeoutFn = windowObject.clearTimeout;
|
|
3283
|
+
const setTimeoutFn = windowObject.setTimeout;
|
|
3284
|
+
const cancelAnimationFrameFn = windowObject.cancelAnimationFrame || windowObject.mozCancelAnimationFrame || windowObject.webkitCancelAnimationFrame;
|
|
3285
|
+
const requestAnimationFrameFn = windowObject.requestAnimationFrame || windowObject.mozRequestAnimationFrame || windowObject.webkitRequestAnimationFrame;
|
|
3385
3286
|
if (cancelAnimationFrameFn == null || requestAnimationFrameFn == null) {
|
|
3386
3287
|
// For environments that don't support animation frame,
|
|
3387
3288
|
// fallback to a setTimeout based approach.
|
|
@@ -3393,64 +3294,53 @@ if (cancelAnimationFrameFn == null || requestAnimationFrameFn == null) {
|
|
|
3393
3294
|
// Counter intuitively, environments that support animation frames can be trickier.
|
|
3394
3295
|
// Chrome's "Throttle non-visible cross-origin iframes" flag can prevent rAFs from being called.
|
|
3395
3296
|
// In this case, we should fallback to a setTimeout() implementation.
|
|
3396
|
-
cancelFrame = function cancelFrame(
|
|
3397
|
-
var _ref2 = slicedToArray(_ref, 2),
|
|
3398
|
-
animationFrameID = _ref2[0],
|
|
3399
|
-
timeoutID = _ref2[1];
|
|
3400
|
-
|
|
3297
|
+
cancelFrame = function cancelFrame([animationFrameID, timeoutID]) {
|
|
3401
3298
|
cancelAnimationFrameFn(animationFrameID);
|
|
3402
3299
|
clearTimeoutFn(timeoutID);
|
|
3403
3300
|
};
|
|
3404
3301
|
requestFrame = function requestAnimationFrameWithSetTimeoutFallback(callback) {
|
|
3405
|
-
|
|
3302
|
+
const animationFrameID = requestAnimationFrameFn(function animationFrameCallback() {
|
|
3406
3303
|
clearTimeoutFn(timeoutID);
|
|
3407
3304
|
callback();
|
|
3408
3305
|
});
|
|
3409
|
-
|
|
3410
|
-
var timeoutID = setTimeoutFn(function timeoutCallback() {
|
|
3306
|
+
const timeoutID = setTimeoutFn(function timeoutCallback() {
|
|
3411
3307
|
cancelAnimationFrameFn(animationFrameID);
|
|
3412
3308
|
callback();
|
|
3413
3309
|
}, TIMEOUT_DURATION);
|
|
3414
|
-
|
|
3415
3310
|
return [animationFrameID, timeoutID];
|
|
3416
3311
|
};
|
|
3417
3312
|
}
|
|
3418
|
-
|
|
3419
3313
|
function createDetectElementResize(nonce) {
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
var attachEvent = typeof document !== 'undefined' && document.attachEvent;
|
|
3314
|
+
let animationKeyframes;
|
|
3315
|
+
let animationName;
|
|
3316
|
+
let animationStartEvent;
|
|
3317
|
+
let animationStyle;
|
|
3318
|
+
let checkTriggers;
|
|
3319
|
+
let resetTriggers;
|
|
3320
|
+
let scrollListener;
|
|
3321
|
+
const attachEvent = typeof document !== "undefined" && document.attachEvent;
|
|
3429
3322
|
if (!attachEvent) {
|
|
3430
|
-
resetTriggers = function
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3323
|
+
resetTriggers = function (element) {
|
|
3324
|
+
const triggers = element.__resizeTriggers__,
|
|
3325
|
+
expand = triggers.firstElementChild,
|
|
3326
|
+
contract = triggers.lastElementChild,
|
|
3327
|
+
expandChild = expand.firstElementChild;
|
|
3435
3328
|
contract.scrollLeft = contract.scrollWidth;
|
|
3436
3329
|
contract.scrollTop = contract.scrollHeight;
|
|
3437
|
-
expandChild.style.width = expand.offsetWidth + 1 +
|
|
3438
|
-
expandChild.style.height = expand.offsetHeight + 1 +
|
|
3330
|
+
expandChild.style.width = expand.offsetWidth + 1 + "px";
|
|
3331
|
+
expandChild.style.height = expand.offsetHeight + 1 + "px";
|
|
3439
3332
|
expand.scrollLeft = expand.scrollWidth;
|
|
3440
3333
|
expand.scrollTop = expand.scrollHeight;
|
|
3441
3334
|
};
|
|
3442
|
-
|
|
3443
|
-
checkTriggers = function checkTriggers(element) {
|
|
3335
|
+
checkTriggers = function (element) {
|
|
3444
3336
|
return element.offsetWidth !== element.__resizeLast__.width || element.offsetHeight !== element.__resizeLast__.height;
|
|
3445
3337
|
};
|
|
3446
|
-
|
|
3447
|
-
scrollListener = function scrollListener(e) {
|
|
3338
|
+
scrollListener = function (e) {
|
|
3448
3339
|
// Don't measure (which forces) reflow for scrolls that happen inside of children!
|
|
3449
|
-
if (e.target.className && typeof e.target.className.indexOf ===
|
|
3340
|
+
if (e.target.className && typeof e.target.className.indexOf === "function" && e.target.className.indexOf("contract-trigger") < 0 && e.target.className.indexOf("expand-trigger") < 0) {
|
|
3450
3341
|
return;
|
|
3451
3342
|
}
|
|
3452
|
-
|
|
3453
|
-
var element = this;
|
|
3343
|
+
const element = this;
|
|
3454
3344
|
resetTriggers(this);
|
|
3455
3345
|
if (this.__resizeRAF__) {
|
|
3456
3346
|
cancelFrame(this.__resizeRAF__);
|
|
@@ -3467,23 +3357,22 @@ function createDetectElementResize(nonce) {
|
|
|
3467
3357
|
};
|
|
3468
3358
|
|
|
3469
3359
|
/* Detect CSS Animations support to detect element display/re-attach */
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
animationStartEvent =
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3360
|
+
let animation = false;
|
|
3361
|
+
let keyframeprefix = "";
|
|
3362
|
+
animationStartEvent = "animationstart";
|
|
3363
|
+
const domPrefixes = "Webkit Moz O ms".split(" ");
|
|
3364
|
+
let startEvents = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" ");
|
|
3365
|
+
let pfx = "";
|
|
3476
3366
|
{
|
|
3477
|
-
|
|
3367
|
+
const elm = document.createElement("fakeelement");
|
|
3478
3368
|
if (elm.style.animationName !== undefined) {
|
|
3479
3369
|
animation = true;
|
|
3480
3370
|
}
|
|
3481
|
-
|
|
3482
3371
|
if (animation === false) {
|
|
3483
|
-
for (
|
|
3484
|
-
if (elm.style[domPrefixes[i] +
|
|
3372
|
+
for (let i = 0; i < domPrefixes.length; i++) {
|
|
3373
|
+
if (elm.style[domPrefixes[i] + "AnimationName"] !== undefined) {
|
|
3485
3374
|
pfx = domPrefixes[i];
|
|
3486
|
-
keyframeprefix =
|
|
3375
|
+
keyframeprefix = "-" + pfx.toLowerCase() + "-";
|
|
3487
3376
|
animationStartEvent = startEvents[i];
|
|
3488
3377
|
animation = true;
|
|
3489
3378
|
break;
|
|
@@ -3491,60 +3380,53 @@ function createDetectElementResize(nonce) {
|
|
|
3491
3380
|
}
|
|
3492
3381
|
}
|
|
3493
3382
|
}
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
animationStyle = keyframeprefix + 'animation: 1ms ' + animationName + '; ';
|
|
3383
|
+
animationName = "resizeanim";
|
|
3384
|
+
animationKeyframes = "@" + keyframeprefix + "keyframes " + animationName + " { from { opacity: 0; } to { opacity: 0; } } ";
|
|
3385
|
+
animationStyle = keyframeprefix + "animation: 1ms " + animationName + "; ";
|
|
3498
3386
|
}
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
if (!doc.getElementById('detectElementResize')) {
|
|
3387
|
+
const createStyles = function (doc) {
|
|
3388
|
+
if (!doc.getElementById("detectElementResize")) {
|
|
3502
3389
|
//opacity:0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
style.
|
|
3508
|
-
style.type = 'text/css';
|
|
3509
|
-
|
|
3390
|
+
const css = (animationKeyframes ? animationKeyframes : "") + ".resize-triggers { " + (animationStyle ? animationStyle : "") + "visibility: hidden; opacity: 0; } " + '.resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',
|
|
3391
|
+
head = doc.head || doc.getElementsByTagName("head")[0],
|
|
3392
|
+
style = doc.createElement("style");
|
|
3393
|
+
style.id = "detectElementResize";
|
|
3394
|
+
style.type = "text/css";
|
|
3510
3395
|
if (nonce != null) {
|
|
3511
|
-
style.setAttribute(
|
|
3396
|
+
style.setAttribute("nonce", nonce);
|
|
3512
3397
|
}
|
|
3513
|
-
|
|
3514
3398
|
if (style.styleSheet) {
|
|
3515
3399
|
style.styleSheet.cssText = css;
|
|
3516
3400
|
} else {
|
|
3517
3401
|
style.appendChild(doc.createTextNode(css));
|
|
3518
3402
|
}
|
|
3519
|
-
|
|
3520
3403
|
head.appendChild(style);
|
|
3521
3404
|
}
|
|
3522
3405
|
};
|
|
3523
|
-
|
|
3524
|
-
var addResizeListener = function addResizeListener(element, fn) {
|
|
3406
|
+
const addResizeListener = function (element, fn) {
|
|
3525
3407
|
if (attachEvent) {
|
|
3526
|
-
element.attachEvent(
|
|
3408
|
+
element.attachEvent("onresize", fn);
|
|
3527
3409
|
} else {
|
|
3528
3410
|
if (!element.__resizeTriggers__) {
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
if (elementStyle && elementStyle.position ===
|
|
3532
|
-
element.style.position =
|
|
3411
|
+
const doc = element.ownerDocument;
|
|
3412
|
+
const elementStyle = windowObject.getComputedStyle(element);
|
|
3413
|
+
if (elementStyle && elementStyle.position === "static") {
|
|
3414
|
+
element.style.position = "relative";
|
|
3533
3415
|
}
|
|
3534
3416
|
createStyles(doc);
|
|
3535
3417
|
element.__resizeLast__ = {};
|
|
3536
3418
|
element.__resizeListeners__ = [];
|
|
3537
|
-
(element.__resizeTriggers__ = doc.createElement(
|
|
3538
|
-
|
|
3539
|
-
expandTrigger.className =
|
|
3540
|
-
expandTrigger.appendChild(doc.createElement(
|
|
3541
|
-
|
|
3542
|
-
contractTrigger.className =
|
|
3419
|
+
(element.__resizeTriggers__ = doc.createElement("div")).className = "resize-triggers";
|
|
3420
|
+
const expandTrigger = doc.createElement("div");
|
|
3421
|
+
expandTrigger.className = "expand-trigger";
|
|
3422
|
+
expandTrigger.appendChild(doc.createElement("div"));
|
|
3423
|
+
const contractTrigger = doc.createElement("div");
|
|
3424
|
+
contractTrigger.className = "contract-trigger";
|
|
3543
3425
|
element.__resizeTriggers__.appendChild(expandTrigger);
|
|
3544
3426
|
element.__resizeTriggers__.appendChild(contractTrigger);
|
|
3545
3427
|
element.appendChild(element.__resizeTriggers__);
|
|
3546
3428
|
resetTriggers(element);
|
|
3547
|
-
element.addEventListener(
|
|
3429
|
+
element.addEventListener("scroll", scrollListener, true);
|
|
3548
3430
|
|
|
3549
3431
|
/* Listen for a css animation to detect element display/re-attach */
|
|
3550
3432
|
if (animationStartEvent) {
|
|
@@ -3559,14 +3441,13 @@ function createDetectElementResize(nonce) {
|
|
|
3559
3441
|
element.__resizeListeners__.push(fn);
|
|
3560
3442
|
}
|
|
3561
3443
|
};
|
|
3562
|
-
|
|
3563
|
-
var removeResizeListener = function removeResizeListener(element, fn) {
|
|
3444
|
+
const removeResizeListener = function (element, fn) {
|
|
3564
3445
|
if (attachEvent) {
|
|
3565
|
-
element.detachEvent(
|
|
3446
|
+
element.detachEvent("onresize", fn);
|
|
3566
3447
|
} else {
|
|
3567
3448
|
element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
|
|
3568
3449
|
if (!element.__resizeListeners__.length) {
|
|
3569
|
-
element.removeEventListener(
|
|
3450
|
+
element.removeEventListener("scroll", scrollListener, true);
|
|
3570
3451
|
if (element.__resizeTriggers__.__animationListener__) {
|
|
3571
3452
|
element.__resizeTriggers__.removeEventListener(animationStartEvent, element.__resizeTriggers__.__animationListener__);
|
|
3572
3453
|
element.__resizeTriggers__.__animationListener__ = null;
|
|
@@ -3579,154 +3460,171 @@ function createDetectElementResize(nonce) {
|
|
|
3579
3460
|
}
|
|
3580
3461
|
}
|
|
3581
3462
|
};
|
|
3582
|
-
|
|
3583
3463
|
return {
|
|
3584
|
-
addResizeListener
|
|
3585
|
-
removeResizeListener
|
|
3464
|
+
addResizeListener,
|
|
3465
|
+
removeResizeListener
|
|
3586
3466
|
};
|
|
3587
3467
|
}
|
|
3588
3468
|
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
if (_this._parentNode) {
|
|
3469
|
+
class AutoSizer extends React.Component {
|
|
3470
|
+
constructor(...args) {
|
|
3471
|
+
super(...args);
|
|
3472
|
+
this.state = {
|
|
3473
|
+
height: this.props.defaultHeight || 0,
|
|
3474
|
+
scaledHeight: this.props.defaultHeight || 0,
|
|
3475
|
+
scaledWidth: this.props.defaultWidth || 0,
|
|
3476
|
+
width: this.props.defaultWidth || 0
|
|
3477
|
+
};
|
|
3478
|
+
this._autoSizer = null;
|
|
3479
|
+
this._detectElementResize = null;
|
|
3480
|
+
this._parentNode = null;
|
|
3481
|
+
this._resizeObserver = null;
|
|
3482
|
+
this._timeoutId = null;
|
|
3483
|
+
this._onResize = () => {
|
|
3484
|
+
this._timeoutId = null;
|
|
3485
|
+
const {
|
|
3486
|
+
disableHeight,
|
|
3487
|
+
disableWidth,
|
|
3488
|
+
onResize
|
|
3489
|
+
} = this.props;
|
|
3490
|
+
if (this._parentNode) {
|
|
3491
|
+
var _style$paddingLeft, _style$paddingRight, _style$paddingTop, _style$paddingBottom;
|
|
3614
3492
|
// Guard against AutoSizer component being removed from the DOM immediately after being added.
|
|
3615
3493
|
// This can result in invalid style values which can result in NaN values if we don't handle them.
|
|
3616
3494
|
// See issue #150 for more context.
|
|
3617
3495
|
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3496
|
+
const style = window.getComputedStyle(this._parentNode) || {};
|
|
3497
|
+
const paddingLeft = parseFloat((_style$paddingLeft = style.paddingLeft) !== null && _style$paddingLeft !== void 0 ? _style$paddingLeft : "0");
|
|
3498
|
+
const paddingRight = parseFloat((_style$paddingRight = style.paddingRight) !== null && _style$paddingRight !== void 0 ? _style$paddingRight : "0");
|
|
3499
|
+
const paddingTop = parseFloat((_style$paddingTop = style.paddingTop) !== null && _style$paddingTop !== void 0 ? _style$paddingTop : "0");
|
|
3500
|
+
const paddingBottom = parseFloat((_style$paddingBottom = style.paddingBottom) !== null && _style$paddingBottom !== void 0 ? _style$paddingBottom : "0");
|
|
3501
|
+
const rect = this._parentNode.getBoundingClientRect();
|
|
3502
|
+
const scaledHeight = rect.height - paddingTop - paddingBottom;
|
|
3503
|
+
const scaledWidth = rect.width - paddingLeft - paddingRight;
|
|
3504
|
+
const height = this._parentNode.offsetHeight - paddingTop - paddingBottom;
|
|
3505
|
+
const width = this._parentNode.offsetWidth - paddingLeft - paddingRight;
|
|
3506
|
+
if (!disableHeight && (this.state.height !== height || this.state.scaledHeight !== scaledHeight) || !disableWidth && (this.state.width !== width || this.state.scaledWidth !== scaledWidth)) {
|
|
3507
|
+
this.setState({
|
|
3508
|
+
height,
|
|
3509
|
+
width,
|
|
3510
|
+
scaledHeight,
|
|
3511
|
+
scaledWidth
|
|
3634
3512
|
});
|
|
3635
|
-
|
|
3636
|
-
|
|
3513
|
+
if (typeof onResize === "function") {
|
|
3514
|
+
onResize({
|
|
3515
|
+
height,
|
|
3516
|
+
scaledHeight,
|
|
3517
|
+
scaledWidth,
|
|
3518
|
+
width
|
|
3519
|
+
});
|
|
3520
|
+
}
|
|
3637
3521
|
}
|
|
3638
3522
|
}
|
|
3639
|
-
}
|
|
3640
|
-
|
|
3641
|
-
|
|
3523
|
+
};
|
|
3524
|
+
this._setRef = autoSizer => {
|
|
3525
|
+
this._autoSizer = autoSizer;
|
|
3526
|
+
};
|
|
3642
3527
|
}
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3528
|
+
componentDidMount() {
|
|
3529
|
+
const {
|
|
3530
|
+
nonce
|
|
3531
|
+
} = this.props;
|
|
3532
|
+
if (this._autoSizer && this._autoSizer.parentNode && this._autoSizer.parentNode.ownerDocument && this._autoSizer.parentNode.ownerDocument.defaultView && this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement) {
|
|
3533
|
+
// Delay access of parentNode until mount.
|
|
3534
|
+
// This handles edge-cases where the component has already been unmounted before its ref has been set,
|
|
3535
|
+
// As well as libraries like react-lite which have a slightly different lifecycle.
|
|
3536
|
+
this._parentNode = this._autoSizer.parentNode;
|
|
3537
|
+
|
|
3538
|
+
// Defer requiring resize handler in order to support server-side rendering.
|
|
3539
|
+
// See issue #41
|
|
3540
|
+
if (this._parentNode != null) {
|
|
3541
|
+
if (typeof ResizeObserver !== "undefined") {
|
|
3542
|
+
this._resizeObserver = new ResizeObserver(() => {
|
|
3543
|
+
// Guard against "ResizeObserver loop limit exceeded" error;
|
|
3544
|
+
// could be triggered if the state update causes the ResizeObserver handler to run long.
|
|
3545
|
+
// See https://github.com/bvaughn/react-virtualized-auto-sizer/issues/55
|
|
3546
|
+
this._timeoutId = setTimeout(this._onResize, 0);
|
|
3547
|
+
});
|
|
3548
|
+
this._resizeObserver.observe(this._parentNode);
|
|
3549
|
+
} else {
|
|
3550
|
+
this._detectElementResize = createDetectElementResize(nonce);
|
|
3551
|
+
this._detectElementResize.addResizeListener(this._parentNode, this._onResize);
|
|
3552
|
+
}
|
|
3660
3553
|
this._onResize();
|
|
3661
3554
|
}
|
|
3662
3555
|
}
|
|
3663
|
-
}
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
if (this._detectElementResize
|
|
3556
|
+
}
|
|
3557
|
+
componentWillUnmount() {
|
|
3558
|
+
if (this._parentNode) {
|
|
3559
|
+
if (this._detectElementResize) {
|
|
3667
3560
|
this._detectElementResize.removeResizeListener(this._parentNode, this._onResize);
|
|
3668
3561
|
}
|
|
3562
|
+
if (this._timeoutId !== null) {
|
|
3563
|
+
clearTimeout(this._timeoutId);
|
|
3564
|
+
}
|
|
3565
|
+
if (this._resizeObserver) {
|
|
3566
|
+
this._resizeObserver.observe(this._parentNode);
|
|
3567
|
+
this._resizeObserver.disconnect();
|
|
3568
|
+
}
|
|
3669
3569
|
}
|
|
3670
|
-
}
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3570
|
+
}
|
|
3571
|
+
render() {
|
|
3572
|
+
const {
|
|
3573
|
+
children,
|
|
3574
|
+
defaultHeight,
|
|
3575
|
+
defaultWidth,
|
|
3576
|
+
disableHeight = false,
|
|
3577
|
+
disableWidth = false,
|
|
3578
|
+
nonce,
|
|
3579
|
+
onResize,
|
|
3580
|
+
style = {},
|
|
3581
|
+
tagName = "div",
|
|
3582
|
+
...rest
|
|
3583
|
+
} = this.props;
|
|
3584
|
+
const {
|
|
3585
|
+
height,
|
|
3586
|
+
scaledHeight,
|
|
3587
|
+
scaledWidth,
|
|
3588
|
+
width
|
|
3589
|
+
} = this.state;
|
|
3590
|
+
|
|
3591
|
+
// Outer div should not force width/height since that may prevent containers from shrinking.
|
|
3592
|
+
// Inner component should overflow and use calculated width/height.
|
|
3593
|
+
// See issue #68 for more information.
|
|
3594
|
+
const outerStyle = {
|
|
3595
|
+
overflow: "visible"
|
|
3596
|
+
};
|
|
3597
|
+
const childParams = {};
|
|
3598
|
+
|
|
3599
|
+
// Avoid rendering children before the initial measurements have been collected.
|
|
3600
|
+
// At best this would just be wasting cycles.
|
|
3601
|
+
let bailoutOnChildren = false;
|
|
3602
|
+
if (!disableHeight) {
|
|
3603
|
+
if (height === 0) {
|
|
3604
|
+
bailoutOnChildren = true;
|
|
3700
3605
|
}
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3606
|
+
outerStyle.height = 0;
|
|
3607
|
+
childParams.height = height;
|
|
3608
|
+
childParams.scaledHeight = scaledHeight;
|
|
3609
|
+
}
|
|
3610
|
+
if (!disableWidth) {
|
|
3611
|
+
if (width === 0) {
|
|
3612
|
+
bailoutOnChildren = true;
|
|
3708
3613
|
}
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
{
|
|
3713
|
-
className: className,
|
|
3714
|
-
ref: this._setRef,
|
|
3715
|
-
style: _extends$2({}, outerStyle, style)
|
|
3716
|
-
},
|
|
3717
|
-
!bailoutOnChildren && children(childParams)
|
|
3718
|
-
);
|
|
3614
|
+
outerStyle.width = 0;
|
|
3615
|
+
childParams.width = width;
|
|
3616
|
+
childParams.scaledWidth = scaledWidth;
|
|
3719
3617
|
}
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
}
|
|
3618
|
+
return React.createElement(tagName, {
|
|
3619
|
+
ref: this._setRef,
|
|
3620
|
+
style: {
|
|
3621
|
+
...outerStyle,
|
|
3622
|
+
...style
|
|
3623
|
+
},
|
|
3624
|
+
...rest
|
|
3625
|
+
}, !bailoutOnChildren && children(childParams));
|
|
3626
|
+
}
|
|
3627
|
+
}
|
|
3730
3628
|
|
|
3731
3629
|
const ICON_SIZE = 24;
|
|
3732
3630
|
const ITEM_HEIGHT = 40;
|
|
@@ -3823,7 +3721,7 @@ function getAutosizeListItems(items, height, collapseItem) {
|
|
|
3823
3721
|
return { listItems, collapseItems };
|
|
3824
3722
|
}
|
|
3825
3723
|
|
|
3826
|
-
var css_248z$k = ".ycn-composite-bar-item {\n --composite-bar-item-action-size: 36px;\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n cursor: pointer;\n}\n.ycn-composite-bar-item__icon {\n color: var(--
|
|
3724
|
+
var css_248z$k = ".ycn-composite-bar-item {\n --composite-bar-item-action-size: 36px;\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n cursor: pointer;\n}\n.ycn-composite-bar-item__icon {\n color: var(--g-color-text-misc);\n}\n.ycn-composite-bar-item__icon-place {\n flex-shrink: 0;\n width: var(--aside-header-min-width);\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n.ycn-composite-bar-item__title {\n display: flex;\n overflow: hidden;\n}\n.ycn-composite-bar-item__title-text {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n.ycn-composite-bar-item__title-adornment {\n margin: 0 10px;\n}\n.ycn-composite-bar-item__collapse-item {\n display: flex;\n padding: 0 16px;\n align-items: center;\n width: 100%;\n height: 100%;\n cursor: pointer;\n}\n.ycn-composite-bar-item__collapse-item .ycn-composite-bar-item__title-adornment {\n margin-right: 0;\n}\n.ycn-composite-bar-item__menu-divider {\n margin: 0 8px;\n width: 100%;\n border-top: 1px solid var(--g-color-line-generic);\n cursor: default;\n}\n.ycn-composite-bar-item__collapse-items-popup-content {\n padding: 4px 0;\n}\n.ycn-composite-bar-item__link {\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n}\n.ycn-composite-bar-item__link, .ycn-composite-bar-item__link:hover, .ycn-composite-bar-item__link:active, .ycn-composite-bar-item__link:visited, .ycn-composite-bar-item__link:focus {\n text-decoration: none;\n outline: none;\n color: inherit;\n}\n.ycn-composite-bar-item__btn-icon {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.ycn-composite-bar-item_type_action {\n justify-content: center;\n height: var(--composite-bar-item-action-size);\n margin: 0 10px 8px;\n background: var(--g-color-base-float);\n box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.03), 0px 5px 6px rgba(0, 0, 0, 0.12);\n border-radius: var(--composite-bar-item-action-size);\n transition: transform 0.1s ease-out, background-color 0.15s linear;\n}\n.ycn-composite-bar-item_type_action:focus {\n box-shadow: 0 0 0 2px var(--g-color-line-misc);\n}\n.ycn-composite-bar-item_type_action:focus:not(:focus-visible) {\n box-shadow: none;\n}\n.ycn-composite-bar-item_type_action:hover {\n background-color: var(--g-color-base-float-hover);\n}\n.ycn-composite-bar-item_type_action:active {\n box-shadow: 0 1px 2px var(--g-color-sfx-shadow);\n transition: none;\n transform: scale(0.96);\n}\n.ycn-composite-bar-item_type_action .ycn-composite-bar-item__icon-place {\n width: var(--composite-bar-item-action-size);\n}\n.ycn-composite-bar-item_type_action .ycn-composite-bar-item__title {\n margin-right: 16px;\n}\n.ycn-composite-bar-item__icon-tooltip_item-type_action {\n margin-left: 10px;\n}\n.ycn-composite-bar-item:not(.ycn-composite-bar-item_compact).ycn-composite-bar-item_current.ycn-composite-bar-item_type_regular {\n background-color: var(--g-color-base-selection);\n}\n.ycn-composite-bar-item:not(.ycn-composite-bar-item_compact):not(.ycn-composite-bar-item_current):hover.ycn-composite-bar-item_type_regular {\n background-color: var(--g-color-base-simple-hover);\n}\n.ycn-composite-bar-item_compact.ycn-composite-bar-item_type_action {\n width: var(--composite-bar-item-action-size);\n}\n.ycn-composite-bar-item_compact.ycn-composite-bar-item_type_action .ycn-composite-bar-item__title {\n margin: 0;\n}\n.ycn-composite-bar-item_compact.ycn-composite-bar-item_current.ycn-composite-bar-item_type_regular .ycn-composite-bar-item__btn-icon {\n position: relative;\n background-color: transparent;\n}\n.ycn-composite-bar-item_compact.ycn-composite-bar-item_current.ycn-composite-bar-item_type_regular .ycn-composite-bar-item__btn-icon::before {\n content: \"\";\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: -1;\n width: 38px;\n height: 38px;\n margin-top: -19px;\n margin-left: -19px;\n border-radius: 7px;\n}\n.ycn-composite-bar-item_compact.ycn-composite-bar-item_current.ycn-composite-bar-item_type_regular .ycn-composite-bar-item__btn-icon::before {\n background-color: var(--g-color-base-selection);\n}\n.ycn-composite-bar-item_compact:not(.ycn-composite-bar-item_current):hover.ycn-composite-bar-item_type_regular .ycn-composite-bar-item__btn-icon {\n position: relative;\n background-color: transparent;\n}\n.ycn-composite-bar-item_compact:not(.ycn-composite-bar-item_current):hover.ycn-composite-bar-item_type_regular .ycn-composite-bar-item__btn-icon::before {\n content: \"\";\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: -1;\n width: 38px;\n height: 38px;\n margin-top: -19px;\n margin-left: -19px;\n border-radius: 7px;\n}\n.ycn-composite-bar-item_compact:not(.ycn-composite-bar-item_current):hover.ycn-composite-bar-item_type_regular .ycn-composite-bar-item__btn-icon::before {\n background-color: var(--g-color-base-simple-hover);\n}";
|
|
3827
3725
|
styleInject(css_248z$k);
|
|
3828
3726
|
|
|
3829
3727
|
const b$l = block('composite-bar-item');
|
|
@@ -3886,7 +3784,7 @@ const Item$1 = (props) => {
|
|
|
3886
3784
|
React__default["default"].createElement("div", { className: b$l('icon-place') }, compact ? (React__default["default"].createElement(uikit.Tooltip, { content: tooltipText, disabled: !enableTooltip || (collapsedItem && open), placement: "right", className: b$l('icon-tooltip', { 'item-type': type }) },
|
|
3887
3785
|
React__default["default"].createElement("div", { onMouseEnter: () => onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(), onMouseLeave: () => onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(), className: b$l('btn-icon') }, iconEl))) : (iconEl)),
|
|
3888
3786
|
React__default["default"].createElement("div", { className: b$l('title'), title: typeof item.title === 'string' ? item.title : undefined }, titleEl),
|
|
3889
|
-
renderPopupContent && Boolean(anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current) && (React__default["default"].createElement(uikit.Popup, {
|
|
3787
|
+
renderPopupContent && Boolean(anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current) && (React__default["default"].createElement(uikit.Popup, { contentClassName: b$l('popup'), open: popupVisible, keepMounted: popupKeepMounted, placement: popupPlacement, offset: popupOffset, anchorRef: anchorRef, onClose: onClose }, renderPopupContent()))));
|
|
3890
3788
|
return item.link ? (React__default["default"].createElement("a", { href: item.link, className: b$l('link') }, createdNode)) : (createdNode);
|
|
3891
3789
|
};
|
|
3892
3790
|
const iconNode = icon ? React__default["default"].createElement(uikit.Icon, { data: icon, size: iconSize, className: b$l('icon') }) : null;
|
|
@@ -3952,7 +3850,7 @@ class MultipleTooltipProvider extends React__default["default"].PureComponent {
|
|
|
3952
3850
|
}
|
|
3953
3851
|
}
|
|
3954
3852
|
|
|
3955
|
-
var css_248z$i = ".yc-root_theme_dark .ycn-multiple-tooltip,\n.yc-root_theme_dark-hc .ycn-multiple-tooltip {\n --multiple-tooltip-item-bg-color: #424147;\n --multiple-tooltip-item-active-bg-color: var(--
|
|
3853
|
+
var css_248z$i = ".yc-root_theme_dark .ycn-multiple-tooltip,\n.yc-root_theme_dark-hc .ycn-multiple-tooltip {\n --multiple-tooltip-item-bg-color: #424147;\n --multiple-tooltip-item-active-bg-color: var(--g-color-base-float-heavy);\n --multiple-tooltip-backdrop-background: linear-gradient(\n 90deg,\n #313036 0%,\n rgba(49, 48, 54, 0.3) 100%\n );\n --multiple-tooltip-backdrop-filter: blur(16px);\n}\n\n.yc-root_theme_light .ycn-multiple-tooltip,\n.yc-root_theme_light-hc .ycn-multiple-tooltip {\n --multiple-tooltip-item-bg-color: #7a7a7a;\n --multiple-tooltip-item-active-bg-color: var(--g-color-base-float-heavy);\n --multiple-tooltip-backdrop-background: linear-gradient(\n 90deg,\n #ffffff 0%,\n rgba(255, 255, 255, 0.3) 100%\n );\n --multiple-tooltip-backdrop-filter: blur(12px);\n}\n\n.ycn-multiple-tooltip {\n background-color: transparent;\n box-shadow: none;\n}\n.ycn-multiple-tooltip::before {\n content: \"\";\n box-shadow: none;\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: -1;\n background: var(--multiple-tooltip-backdrop-background);\n filter: var(--multiple-tooltip-backdrop-filter);\n}\n.ycn-multiple-tooltip__items-container {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 32px 40px 32px 12px;\n}\n.ycn-multiple-tooltip__item {\n display: flex;\n box-sizing: border-box;\n height: 30px;\n padding: 8px 12px;\n background-color: var(--multiple-tooltip-item-bg-color);\n position: relative;\n border-radius: 5px;\n align-items: center;\n color: var(--g-color-text-light-primary);\n margin-bottom: 5px;\n transition: transform 100ms ease-in-out;\n}\n.ycn-multiple-tooltip__item:not(.ycn-multiple-tooltip__item_divider) + .ycn-multiple-tooltip__item:not(.ycn-multiple-tooltip__item_divider), .ycn-multiple-tooltip__item:first-child {\n margin-top: 5px;\n}\n.ycn-multiple-tooltip__item_divider + .ycn-multiple-tooltip__item:not(.ycn-multiple-tooltip__item_divider) {\n margin-top: 4px;\n}\n.ycn-multiple-tooltip__item_active {\n background-color: var(--multiple-tooltip-item-active-bg-color);\n transform: translateX(-12px);\n}\n.ycn-multiple-tooltip__item_divider {\n height: 15px;\n visibility: hidden;\n margin: 0;\n}";
|
|
3956
3854
|
styleInject(css_248z$i);
|
|
3957
3855
|
|
|
3958
3856
|
const b$k = block('multiple-tooltip');
|
|
@@ -3966,7 +3864,7 @@ const POPUP_MODIFIERS = [
|
|
|
3966
3864
|
const MultipleTooltip = ({ items, open, anchorRef, placement, }) => {
|
|
3967
3865
|
const { activeIndex, hideCollapseItemTooltip } = React__default["default"].useContext(MultipleTooltipContext);
|
|
3968
3866
|
const activeItem = activeIndex === undefined ? null : items[activeIndex];
|
|
3969
|
-
return (React__default["default"].createElement(uikit.Popup, { open: open, anchorRef: anchorRef, placement: placement, offset: POPUP_OFFSET,
|
|
3867
|
+
return (React__default["default"].createElement(uikit.Popup, { open: open, anchorRef: anchorRef, placement: placement, offset: POPUP_OFFSET, contentClassName: b$k(null), modifiers: POPUP_MODIFIERS },
|
|
3970
3868
|
React__default["default"].createElement("div", { className: b$k('items-container') }, items
|
|
3971
3869
|
.filter(({ type = 'regular', id }) => !hideCollapseItemTooltip ||
|
|
3972
3870
|
(id !== COLLAPSE_ITEM_ID && type !== 'action'))
|
|
@@ -4054,7 +3952,7 @@ const CompositeBar = ({ items, compact, enableCollapsing, dict, onItemClick, mul
|
|
|
4054
3952
|
if (items.length === 0) {
|
|
4055
3953
|
return null;
|
|
4056
3954
|
}
|
|
4057
|
-
let node
|
|
3955
|
+
let node;
|
|
4058
3956
|
if (enableCollapsing) {
|
|
4059
3957
|
const minHeight = getItemsMinHeight(items);
|
|
4060
3958
|
const collapseItem = getMoreButtonItem(dict);
|
|
@@ -4080,6 +3978,12 @@ const Content = ({ size, className, cssSizeVariableName = '--aside-header-size',
|
|
|
4080
3978
|
return (React__default["default"].createElement("div", { className: className, style: Object.assign({}, { [cssSizeVariableName]: `${size}px` }) }, typeof renderContent === 'function' && (React__default["default"].createElement(RenderContent, { size: size, renderContent: renderContent }))));
|
|
4081
3979
|
};
|
|
4082
3980
|
|
|
3981
|
+
function fakeDisplayName(newDisplayName, Component) {
|
|
3982
|
+
const Fake = (props) => React__default["default"].createElement(Component, Object.assign({}, props));
|
|
3983
|
+
Fake.displayName = newDisplayName;
|
|
3984
|
+
return Fake;
|
|
3985
|
+
}
|
|
3986
|
+
|
|
4083
3987
|
var _path$1;
|
|
4084
3988
|
function _extends$1() { _extends$1 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
|
|
4085
3989
|
var SvgControlMenuButton = function SvgControlMenuButton(props) {
|
|
@@ -4110,9 +4014,11 @@ var SvgDividerCollapsed = function SvgDividerCollapsed(props) {
|
|
|
4110
4014
|
};
|
|
4111
4015
|
var headerDividerCollapsedIcon = SvgDividerCollapsed;
|
|
4112
4016
|
|
|
4113
|
-
var css_248z$h = ".yc-root {\n --aside-header-background-color: var(--
|
|
4017
|
+
var css_248z$h = ".yc-root {\n --aside-header-background-color: var(--g-color-base-warning-light);\n --aside-header-collapse-button-divider-line-color: var(\n --aside-header-header-divider-line-color\n );\n}\n\n.yc-root_theme_light,\n.yc-root_theme_light-hc {\n --aside-header-divider-line-color: transparent;\n --aside-header-header-divider-line-color: var(--g-color-line-generic);\n}\n\n.yc-root_theme_dark,\n.yc-root_theme_dark-hc {\n --aside-header-divider-line-color: var(--g-color-line-generic-solid);\n --aside-header-header-divider-line-color: var(--g-color-line-generic-solid);\n}\n\n.ycn-aside-header {\n --aside-header-min-width: 56px;\n height: 100%;\n width: 100%;\n position: relative;\n background-color: var(--g-color-base-background);\n}\n.ycn-aside-header__aside {\n position: sticky;\n top: 0;\n left: 0;\n height: 100vh;\n width: inherit;\n display: flex;\n flex-direction: column;\n background-color: var(--g-color-base-background);\n z-index: 100;\n box-sizing: border-box;\n}\n.ycn-aside-header__aside::after {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 2;\n width: 1px;\n height: 100%;\n content: \"\";\n background-color: var(--aside-header-divider-line-color);\n}\n.ycn-aside-header__aside-popup-anchor {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1;\n}\n.ycn-aside-header__aside-content {\n --gradient-height: 334px;\n display: flex;\n flex-direction: column;\n overflow-x: hidden;\n width: inherit;\n height: inherit;\n position: relative;\n z-index: 2;\n user-select: none;\n}\n.ycn-aside-header__aside-content::after {\n position: absolute;\n top: 0;\n right: -100px;\n bottom: 0;\n width: 100px;\n content: \"\";\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.1), 0px 0px 24px rgba(0, 0, 0, 0.08);\n}\n.ycn-aside-header__aside-content > .ycn-aside-header-logo {\n margin: 8px 0;\n}\n.ycn-aside-header__aside-content_with-decoration {\n background: linear-gradient(180deg, var(--aside-header-background-color) calc(var(--gradient-height) * 0.33), transparent calc(var(--gradient-height) * 0.88));\n}\n.ycn-aside-header_compact .ycn-aside-header__aside-content {\n background: transparent;\n}\n.ycn-aside-header__header {\n --aside-header-header-divider-height: 29px;\n position: relative;\n z-index: 1;\n flex: none;\n box-sizing: border-box;\n width: 100%;\n padding-top: 8px;\n padding-bottom: 22px;\n}\n.ycn-aside-header__header .ycn-aside-header__header-divider {\n position: absolute;\n bottom: 0;\n left: 0;\n z-index: -2;\n display: none;\n color: var(--aside-header-background-color);\n}\n.ycn-aside-header__header_with-decoration::before {\n position: absolute;\n top: 0;\n left: 0;\n z-index: -2;\n display: none;\n width: 100%;\n height: calc(100% - var(--aside-header-header-divider-height));\n content: \"\";\n background-color: var(--aside-header-background-color);\n}\n.ycn-aside-header__header::after {\n position: absolute;\n bottom: 12px;\n left: 0;\n z-index: -2;\n width: 100%;\n height: 1px;\n content: \"\";\n background-color: var(--aside-header-header-divider-line-color);\n}\n.ycn-aside-header_compact .ycn-aside-header__header::before {\n display: block;\n}\n.ycn-aside-header_compact .ycn-aside-header__header_with-decoration .ycn-aside-header__header-divider {\n display: block;\n}\n.ycn-aside-header_compact .ycn-aside-header__header_with-decoration::after {\n display: none;\n}\n.ycn-aside-header__menu-items {\n flex-grow: 1;\n}\n.ycn-aside-header__footer {\n flex-shrink: 0;\n width: 100%;\n margin: 8px 0;\n display: flex;\n flex-direction: column;\n}\n.ycn-aside-header__panels {\n z-index: 98;\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n overflow: auto;\n}\n.ycn-aside-header__panel {\n height: 100%;\n}\n.ycn-aside-header__pane-container {\n display: flex;\n outline: none;\n overflow: visible;\n user-select: text;\n flex-direction: row;\n}\n.ycn-aside-header__content {\n width: calc(100% - var(--aside-header-size));\n z-index: 95;\n}\n.ycn-aside-header__collapse-button {\n --yc-button-background-color-hover: transparent;\n overflow: hidden;\n box-sizing: border-box;\n flex: none;\n width: 100%;\n height: 20px;\n border-top: 1px solid var(--aside-header-collapse-button-divider-line-color);\n margin-top: auto;\n}\n.ycn-aside-header__collapse-button > .yc-button__text {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 20px;\n}\n.ycn-aside-header__collapse-button:not(.ycn-aside-header__collapse-button_compact) .ycn-aside-header__collapse-icon {\n transform: rotate(180deg);\n}\n.ycn-aside-header__collapse-button .ycn-aside-header__collapse-icon {\n color: var(--g-color-text-secondary);\n}\n.ycn-aside-header__collapse-button:hover .ycn-aside-header__collapse-icon {\n color: var(--g-color-text-primary);\n}";
|
|
4114
4018
|
styleInject(css_248z$h);
|
|
4115
4019
|
|
|
4020
|
+
// TODO: remove temporary fix for expand button
|
|
4021
|
+
const NotIcon = fakeDisplayName('NotIcon', uikit.Icon);
|
|
4116
4022
|
const b$i = block('aside-header');
|
|
4117
4023
|
class AsideHeader extends React__default["default"].Component {
|
|
4118
4024
|
constructor() {
|
|
@@ -4155,7 +4061,7 @@ class AsideHeader extends React__default["default"].Component {
|
|
|
4155
4061
|
const { compact, dict } = this.props;
|
|
4156
4062
|
const typeButton = compact ? exports.Dict.ExpandButton : exports.Dict.CollapseButton;
|
|
4157
4063
|
return (React__default["default"].createElement(uikit.Button, { className: b$i('collapse-button', { compact }), view: "flat", onClick: this.onCollapseButtonClick, title: (_a = dict === null || dict === void 0 ? void 0 : dict[typeButton]) !== null && _a !== void 0 ? _a : defaultDict$2[typeButton] },
|
|
4158
|
-
React__default["default"].createElement(
|
|
4064
|
+
React__default["default"].createElement(NotIcon, { data: controlMenuButtonIcon, className: b$i('collapse-icon'), width: "16", height: "10" })));
|
|
4159
4065
|
};
|
|
4160
4066
|
this.onCollapseButtonClick = () => {
|
|
4161
4067
|
var _a, _b;
|
|
@@ -4192,33 +4098,38 @@ AsideHeader.defaultProps = {
|
|
|
4192
4098
|
headerDecoration: true,
|
|
4193
4099
|
};
|
|
4194
4100
|
|
|
4195
|
-
/******************************************************************************
|
|
4196
|
-
Copyright (c) Microsoft Corporation.
|
|
4197
|
-
|
|
4198
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
4199
|
-
purpose with or without fee is hereby granted.
|
|
4200
|
-
|
|
4201
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
4202
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
4203
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
4204
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
4205
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
4206
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
4207
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
4208
|
-
***************************************************************************** */
|
|
4209
|
-
|
|
4210
|
-
function __rest(s, e) {
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4101
|
+
/******************************************************************************
|
|
4102
|
+
Copyright (c) Microsoft Corporation.
|
|
4103
|
+
|
|
4104
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
4105
|
+
purpose with or without fee is hereby granted.
|
|
4106
|
+
|
|
4107
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
4108
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
4109
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
4110
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
4111
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
4112
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
4113
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
4114
|
+
***************************************************************************** */
|
|
4115
|
+
|
|
4116
|
+
function __rest(s, e) {
|
|
4117
|
+
var t = {};
|
|
4118
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4119
|
+
t[p] = s[p];
|
|
4120
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
4121
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
4122
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
4123
|
+
t[p[i]] = s[p[i]];
|
|
4124
|
+
}
|
|
4125
|
+
return t;
|
|
4220
4126
|
}
|
|
4221
4127
|
|
|
4128
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
4129
|
+
var e = new Error(message);
|
|
4130
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
4131
|
+
};
|
|
4132
|
+
|
|
4222
4133
|
var css_248z$g = ".ycn-footer-item {\n width: 100%;\n height: 40px;\n}";
|
|
4223
4134
|
styleInject(css_248z$g);
|
|
4224
4135
|
|
|
@@ -4246,7 +4157,7 @@ const ActionBarItem = ({ children, className, pull, spacing = true }) => {
|
|
|
4246
4157
|
};
|
|
4247
4158
|
ActionBarItem.displayName = 'ActionBar.Item';
|
|
4248
4159
|
|
|
4249
|
-
var css_248z$d = ".ycn-action-bar-section {\n display: flex;\n flex-flow: row nowrap;\n justify-content: flex-start;\n align-items: stretch;\n}\n.ycn-action-bar-section + .ycn-action-bar-section {\n border-left: solid 1px var(--
|
|
4160
|
+
var css_248z$d = ".ycn-action-bar-section {\n display: flex;\n flex-flow: row nowrap;\n justify-content: flex-start;\n align-items: stretch;\n}\n.ycn-action-bar-section + .ycn-action-bar-section {\n border-left: solid 1px var(--g-color-line-generic);\n}\n.ycn-action-bar-section_type_primary {\n flex: 1 1 auto;\n padding-left: 20px;\n padding-right: 20px;\n}\n.ycn-action-bar-section_type_secondary {\n padding-left: 6px;\n padding-right: 6px;\n}";
|
|
4250
4161
|
styleInject(css_248z$d);
|
|
4251
4162
|
|
|
4252
4163
|
const b$e = block('action-bar-section');
|
|
@@ -4255,7 +4166,7 @@ const ActionBarSection = ({ children, type = 'primary' }) => {
|
|
|
4255
4166
|
};
|
|
4256
4167
|
ActionBarSection.displayName = 'ActionBar.Section';
|
|
4257
4168
|
|
|
4258
|
-
var css_248z$c = ".ycn-action-bar-separator {\n list-style: none;\n margin: 0;\n padding: 0;\n margin-left: 6px;\n margin-right: 6px;\n border-right: solid 1px var(--
|
|
4169
|
+
var css_248z$c = ".ycn-action-bar-separator {\n list-style: none;\n margin: 0;\n padding: 0;\n margin-left: 6px;\n margin-right: 6px;\n border-right: solid 1px var(--g-color-line-generic);\n height: 40px;\n}";
|
|
4259
4170
|
styleInject(css_248z$c);
|
|
4260
4171
|
|
|
4261
4172
|
const b$d = block('action-bar-separator');
|
|
@@ -4264,7 +4175,7 @@ const ActionBarSeparator = () => {
|
|
|
4264
4175
|
};
|
|
4265
4176
|
ActionBarSeparator.displayName = 'ActionBar.Separator';
|
|
4266
4177
|
|
|
4267
|
-
var css_248z$b = ".ycn-action-bar {\n box-sizing: border-box;\n height: 40px;\n border-bottom: solid 1px var(--
|
|
4178
|
+
var css_248z$b = ".ycn-action-bar {\n box-sizing: border-box;\n height: 40px;\n border-bottom: solid 1px var(--g-color-line-generic);\n display: flex;\n flex-flow: row nowrap;\n justify-content: flex-start;\n align-items: stretch;\n}";
|
|
4268
4179
|
styleInject(css_248z$b);
|
|
4269
4180
|
|
|
4270
4181
|
const b$c = block('action-bar');
|
|
@@ -4279,7 +4190,7 @@ const PublicActionBar = Object.assign(ActionBar, {
|
|
|
4279
4190
|
Separator: ActionBarSeparator,
|
|
4280
4191
|
});
|
|
4281
4192
|
|
|
4282
|
-
var css_248z$a = ".ycn-title {\n box-sizing: border-box;\n padding: 14px 10px 14px 20px;\n min-height: 64px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.ycn-title_separator {\n border-bottom: 1px solid var(--
|
|
4193
|
+
var css_248z$a = ".ycn-title {\n box-sizing: border-box;\n padding: 14px 10px 14px 20px;\n min-height: 64px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.ycn-title_separator {\n border-bottom: 1px solid var(--g-color-line-generic);\n}\n.ycn-title__text {\n margin: 0;\n margin-right: 20px;\n}";
|
|
4283
4194
|
styleInject(css_248z$a);
|
|
4284
4195
|
|
|
4285
4196
|
const b$b = block('title');
|
|
@@ -4323,7 +4234,7 @@ function filterHotkeys(hotkeys, filter) {
|
|
|
4323
4234
|
return hotkeys;
|
|
4324
4235
|
}
|
|
4325
4236
|
|
|
4326
|
-
var css_248z$9 = ".ycn-hotkeys-panel {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n --hotkeys-panel-width: 400px;\n --hotkeys-panel-vertical-padding: 18px;\n --hotkeys-panel-horizontal-padding: 24px;\n}\n.ycn-hotkeys-panel__drawer-item {\n width: var(--hotkeys-panel-width);\n padding: var(--hotkeys-panel-vertical-padding) 0;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n}\n.ycn-hotkeys-panel__title {\n margin: 0 var(--hotkeys-panel-horizontal-padding) 16px var(--hotkeys-panel-horizontal-padding);\n}\n.ycn-hotkeys-panel__search {\n padding: 0 var(--hotkeys-panel-horizontal-padding);\n margin-bottom: 14px;\n}\n.ycn-hotkeys-panel__list {\n flex: 1;\n overflow-y: auto;\n}\n.ycn-hotkeys-panel__item {\n height: auto;\n padding: 8px var(--hotkeys-panel-horizontal-padding);\n}\n.ycn-hotkeys-panel__item.yc-list__item_active {\n background: inherit;\n}\n.ycn-hotkeys-panel__item-content {\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n width: 100%;\n font-size: var(--
|
|
4237
|
+
var css_248z$9 = ".ycn-hotkeys-panel {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n --hotkeys-panel-width: 400px;\n --hotkeys-panel-vertical-padding: 18px;\n --hotkeys-panel-horizontal-padding: 24px;\n}\n.ycn-hotkeys-panel__drawer-item {\n width: var(--hotkeys-panel-width);\n padding: var(--hotkeys-panel-vertical-padding) 0;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n}\n.ycn-hotkeys-panel__title {\n margin: 0 var(--hotkeys-panel-horizontal-padding) 16px var(--hotkeys-panel-horizontal-padding);\n}\n.ycn-hotkeys-panel__search {\n padding: 0 var(--hotkeys-panel-horizontal-padding);\n margin-bottom: 14px;\n}\n.ycn-hotkeys-panel__list {\n flex: 1;\n overflow-y: auto;\n}\n.ycn-hotkeys-panel__item {\n height: auto;\n padding: 8px var(--hotkeys-panel-horizontal-padding);\n}\n.ycn-hotkeys-panel__item.yc-list__item_active {\n background: inherit;\n}\n.ycn-hotkeys-panel__item-content {\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n width: 100%;\n font-size: var(--g-text-body-1-font-size);\n line-height: var(--g-text-body-1-line-height);\n color: var(--g-color-text-primary);\n}\n.ycn-hotkeys-panel__item-content_group {\n font-size: var(--g-text-body-2-font-size);\n font-weight: 500;\n line-height: var(--g-text-body-2-line-height);\n}\n.ycn-hotkeys-panel__hotkey {\n color: var(--g-color-text-complementary);\n}";
|
|
4327
4238
|
styleInject(css_248z$9);
|
|
4328
4239
|
|
|
4329
4240
|
const b$a = block('hotkeys-panel');
|
|
@@ -4947,7 +4858,7 @@ function SettingsSearch({ className, onChange, debounce = 200, inputRef, inputSi
|
|
|
4947
4858
|
React__default["default"].createElement(uikit.TextInput, { controlRef: inputRef, hasClear: true, autoFocus: autoFocus, size: inputSize, placeholder: placeholder, onUpdate: handleUpdate })));
|
|
4948
4859
|
}
|
|
4949
4860
|
|
|
4950
|
-
var css_248z$8 = ".ycn-settings-menu__group-heading {\n font-weight: var(--
|
|
4861
|
+
var css_248z$8 = ".ycn-settings-menu__group-heading {\n font-weight: var(--g-text-accent-font-weight);\n display: inline-block;\n padding: 0 20px;\n margin-bottom: 12px;\n line-height: 18px;\n}\n.ycn-settings-menu__group + .ycn-settings-menu__group {\n margin-top: 24px;\n}\n.ycn-settings-menu__item {\n display: flex;\n align-items: center;\n height: 40px;\n padding: 0 20px;\n cursor: pointer;\n color: var(--g-color-text-primary);\n}\n.ycn-settings-menu__item-icon {\n color: var(--g-color-text-misc);\n margin-right: 5px;\n}\n.ycn-settings-menu__item:hover, .ycn-settings-menu__item_focused {\n background: var(--g-color-base-simple-hover);\n}\n.ycn-settings-menu__item_selected {\n background: var(--g-color-base-selection);\n}\n.ycn-settings-menu__item_selected:hover, .ycn-settings-menu__item_selected.ycn-settings-menu__item_focused {\n background: var(--g-color-base-selection-hover);\n}\n.ycn-settings-menu__item_disabled {\n color: var(--g-color-text-secondary);\n cursor: auto;\n}\n.ycn-settings-menu__item_disabled:hover {\n background: none;\n}\n.ycn-settings-menu__item_disabled .ycn-settings-menu__item-icon {\n color: var(--g-color-base-misc-heavy);\n}\n.ycn-settings-menu__item_badge {\n position: relative;\n}\n.ycn-settings-menu__item_badge::after {\n content: \"\";\n display: block;\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background-color: var(--g-color-text-danger);\n position: absolute;\n right: 9px;\n top: calc(50% - 3px);\n}";
|
|
4951
4862
|
styleInject(css_248z$8);
|
|
4952
4863
|
|
|
4953
4864
|
const b$8 = block('settings-menu');
|
|
@@ -5021,7 +4932,7 @@ function focusNext(container, focused, direction) {
|
|
|
5021
4932
|
return (_a = elements[currentIndex].getAttribute('data-id')) !== null && _a !== void 0 ? _a : undefined;
|
|
5022
4933
|
}
|
|
5023
4934
|
|
|
5024
|
-
var css_248z$7 = ".ycn-settings-menu-mobile.yc-tabs_direction_horizontal {\n overflow-x: auto;\n flex-wrap: nowrap;\n overscroll-behavior-x: none;\n -ms-overflow-style: none;\n scrollbar-width: none;\n}\n.ycn-settings-menu-mobile.yc-tabs_direction_horizontal::-webkit-scrollbar {\n display: none;\n}\n.ycn-settings-menu-mobile__item_badge {\n position: relative;\n}\n.ycn-settings-menu-mobile__item_badge::after {\n content: \"\";\n display: block;\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background-color: var(--
|
|
4935
|
+
var css_248z$7 = ".ycn-settings-menu-mobile.yc-tabs_direction_horizontal {\n overflow-x: auto;\n flex-wrap: nowrap;\n overscroll-behavior-x: none;\n -ms-overflow-style: none;\n scrollbar-width: none;\n}\n.ycn-settings-menu-mobile.yc-tabs_direction_horizontal::-webkit-scrollbar {\n display: none;\n}\n.ycn-settings-menu-mobile__item_badge {\n position: relative;\n}\n.ycn-settings-menu-mobile__item_badge::after {\n content: \"\";\n display: block;\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background-color: var(--g-color-text-danger);\n position: absolute;\n right: -8px;\n top: 11px;\n}";
|
|
5025
4936
|
styleInject(css_248z$7);
|
|
5026
4937
|
|
|
5027
4938
|
const b$7 = block('settings-menu-mobile');
|
|
@@ -5173,7 +5084,7 @@ function getSettingsItemsFromChildren(children, filterRe) {
|
|
|
5173
5084
|
return { items, hidden };
|
|
5174
5085
|
}
|
|
5175
5086
|
|
|
5176
|
-
var css_248z$6 = ".ycn-settings {\n display: grid;\n grid-template-columns: 216px 1fr;\n width: 834px;\n height: 100%;\n}\n.ycn-settings_view_mobile {\n display: block;\n width: auto;\n height: calc(80vh - 56px);\n overflow-x: hidden;\n}\n@supports (height: 90dvh) {\n .ycn-settings_view_mobile {\n /* stylelint-disable-next-line */\n height: calc(90dvh - 56px);\n }\n}\n.ycn-settings_view_mobile.ycn-settings_loading {\n text-align: center;\n}\n.ycn-settings_view_mobile .ycn-settings__loader {\n margin-top: 20px;\n}\n.ycn-settings_view_mobile .ycn-settings__search {\n padding: 0 20px;\n margin: 4px 0 16px;\n}\n.ycn-settings_view_mobile .ycn-settings__page {\n overflow-y: visible;\n}\n.ycn-settings_view_mobile .ycn-settings__tabs .yc-tabs__item:first-child {\n margin-left: 20px;\n}\n.ycn-settings_view_mobile .ycn-settings__tabs .yc-tabs__item:last-child {\n margin-right: 20px;\n}\n.ycn-settings_view_mobile .ycn-settings__section-heading {\n font-size: var(--
|
|
5087
|
+
var css_248z$6 = ".ycn-settings {\n display: grid;\n grid-template-columns: 216px 1fr;\n width: 834px;\n height: 100%;\n}\n.ycn-settings_view_mobile {\n display: block;\n width: auto;\n height: calc(80vh - 56px);\n overflow-x: hidden;\n}\n@supports (height: 90dvh) {\n .ycn-settings_view_mobile {\n /* stylelint-disable-next-line */\n height: calc(90dvh - 56px);\n }\n}\n.ycn-settings_view_mobile.ycn-settings_loading {\n text-align: center;\n}\n.ycn-settings_view_mobile .ycn-settings__loader {\n margin-top: 20px;\n}\n.ycn-settings_view_mobile .ycn-settings__search {\n padding: 0 20px;\n margin: 4px 0 16px;\n}\n.ycn-settings_view_mobile .ycn-settings__page {\n overflow-y: visible;\n}\n.ycn-settings_view_mobile .ycn-settings__tabs .yc-tabs__item:first-child {\n margin-left: 20px;\n}\n.ycn-settings_view_mobile .ycn-settings__tabs .yc-tabs__item:last-child {\n margin-right: 20px;\n}\n.ycn-settings_view_mobile .ycn-settings__section-heading {\n font-size: var(--g-text-subheader-3-font-size);\n line-height: var(--g-text-subheader-3-line-height);\n font-weight: var(--g-text-subheader-font-weight);\n}\n.ycn-settings_view_mobile .ycn-settings__section-subheader {\n color: var(--g-color-text-secondary);\n}\n.ycn-settings_view_mobile .ycn-settings__section-heading + .ycn-settings-subheader {\n margin-top: 8px;\n}\n.ycn-settings_view_mobile .ycn-settings__section-item {\n margin-top: 0;\n}\n.ycn-settings_view_mobile .ycn-settings__section-heading + .ycn-settings__section-item, .ycn-settings_view_mobile .ycn-settings__section-subheader + .ycn-settings__section-item {\n margin-top: 30px;\n}\n.ycn-settings_view_mobile .ycn-settings__section-item + .ycn-settings__section-item {\n margin-top: 22px;\n}\n.ycn-settings_view_mobile .ycn-settings__item:not(.ycn-settings_view_mobile .ycn-settings__item_mode_row) {\n grid-template-columns: 1fr;\n gap: 8px;\n}\n.ycn-settings_view_mobile .ycn-settings__item-heading {\n font-size: var(--g-text-body-2-font-size);\n line-height: var(--g-text-body-2-line-height);\n font-weight: var(--g-text-body-font-weight);\n}\n.ycn-settings_view_mobile .ycn-settings__item-description {\n font-size: var(--g-text-body-1-font-size);\n line-height: var(--g-text-body-1-line-height);\n font-weight: var(--g-text-body-font-weight);\n}\n.ycn-settings_view_mobile .ycn-settings__item_mode_row {\n grid-template-columns: 1fr auto;\n}\n.ycn-settings_view_mobile .ycn-settings__item_mode_row .ycn-settings__item-heading {\n padding-right: 20px;\n}\n.ycn-settings_view_mobile .ycn-settings__item-content {\n width: 100%;\n}\n.ycn-settings_loading {\n grid-template-columns: auto;\n}\n.ycn-settings__loader {\n align-self: center;\n justify-self: center;\n}\n.ycn-settings__not-found {\n display: grid;\n align-items: center;\n justify-items: center;\n height: 100%;\n}\n.ycn-settings__menu {\n border-right: 1px solid var(--g-color-line-generic);\n}\n.ycn-settings__heading {\n font-size: var(--g-text-subheader-2-font-size);\n line-height: var(--g-text-subheader-2-line-height);\n font-weight: var(--g-text-subheader-font-weight);\n margin: 20px 20px 0;\n}\n.ycn-settings__search {\n margin: 0 20px 16px;\n}\n.ycn-settings__page {\n overflow-y: auto;\n}\n.ycn-settings__content {\n padding: 20px;\n}\n.ycn-settings__section-heading {\n font-size: var(--g-text-subheader-2-font-size);\n line-height: var(--g-text-subheader-2-line-height);\n font-weight: var(--g-text-subheader-font-weight);\n margin: 0;\n}\n.ycn-settings__section-item {\n margin-top: 24px;\n}\n.ycn-settings__section + .ycn-settings__section {\n margin-top: 32px;\n}\n.ycn-settings__item {\n display: grid;\n grid-template-columns: 216px 1fr;\n justify-items: start;\n}\n.ycn-settings__item_align_top {\n align-items: start;\n}\n.ycn-settings__item_align_center {\n align-items: center;\n}\n.ycn-settings__item-title_badge {\n position: relative;\n}\n.ycn-settings__item-title_badge::after {\n content: \"\";\n display: block;\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background-color: var(--g-color-text-danger);\n position: absolute;\n right: -8px;\n top: 1px;\n}\n.ycn-settings__item-description {\n font-size: var(--g-text-caption-2-font-size);\n line-height: var(--g-text-caption-2-line-height);\n font-weight: var(--g-text-caption-font-weight);\n display: block;\n margin-top: 2px;\n padding-right: 20px;\n color: var(--g-color-text-secondary);\n}\n.ycn-settings__found {\n font-weight: var(--g-text-accent-font-weight);\n background: var(--g-color-base-selection);\n}";
|
|
5177
5088
|
styleInject(css_248z$6);
|
|
5178
5089
|
|
|
5179
5090
|
const b$6 = block('settings');
|
|
@@ -5333,7 +5244,7 @@ const useForwardRef = (ref, initialValue = null) => {
|
|
|
5333
5244
|
return targetRef;
|
|
5334
5245
|
};
|
|
5335
5246
|
|
|
5336
|
-
var css_248z$5 = ".ycn-mobile-header-burger {\n margin: 0;\n padding: 0;\n font-family: var(--
|
|
5247
|
+
var css_248z$5 = ".ycn-mobile-header-burger {\n margin: 0;\n padding: 0;\n font-family: var(--g-font-family-sans);\n font-size: inherit;\n font-weight: 400;\n color: inherit;\n background: none;\n border: none;\n outline: none;\n cursor: pointer;\n}\n.ycn-mobile-header-burger_opened .ycn-mobile-header-burger__icon:before, .ycn-mobile-header-burger_opened .ycn-mobile-header-burger__icon:after,\n.ycn-mobile-header-burger_opened .ycn-mobile-header-burger__icon .ycn-mobile-header-burger__icon-dash {\n left: 3px;\n}\n.ycn-mobile-header-burger_opened .ycn-mobile-header-burger__icon:before {\n transform: rotate(45deg);\n}\n.ycn-mobile-header-burger_opened .ycn-mobile-header-burger__icon:after {\n transform: rotate(-45deg);\n}\n.ycn-mobile-header-burger_opened .ycn-mobile-header-burger__icon .ycn-mobile-header-burger__icon-dash {\n opacity: 0;\n}\n.ycn-mobile-header-burger__icon {\n display: flex;\n align-content: center;\n justify-content: center;\n height: var(--mobile-header-icon-size);\n width: var(--mobile-header-icon-size);\n position: relative;\n}\n.ycn-mobile-header-burger__icon:after, .ycn-mobile-header-burger__icon:before {\n content: \"\";\n transform-origin: left center;\n transition: transform 0.2s, left 0.2s;\n}\n.ycn-mobile-header-burger__icon:before {\n top: 2px;\n}\n.ycn-mobile-header-burger__icon:after {\n bottom: 2px;\n}\n.ycn-mobile-header-burger__icon:before, .ycn-mobile-header-burger__icon:after,\n.ycn-mobile-header-burger__icon .ycn-mobile-header-burger__icon-dash {\n background-color: var(--g-color-text-primary);\n border-radius: 1px;\n height: 2px;\n left: 0;\n position: absolute;\n width: 100%;\n}\n.ycn-mobile-header-burger__icon .ycn-mobile-header-burger__icon-dash {\n margin-top: -1px;\n top: 50%;\n transition: opacity 0.2s;\n}";
|
|
5337
5248
|
styleInject(css_248z$5);
|
|
5338
5249
|
|
|
5339
5250
|
const b$5 = block('mobile-header-burger');
|
|
@@ -5342,7 +5253,7 @@ const Burger = React__default["default"].memo(({ opened, className, onClick }) =
|
|
|
5342
5253
|
React__default["default"].createElement("span", { className: b$5('icon-dash') })))));
|
|
5343
5254
|
Burger.displayName = 'Burger';
|
|
5344
5255
|
|
|
5345
|
-
var css_248z$4 = ".ycn-mobile-header-logo {\n display: flex;\n align-items: center;\n overflow: hidden;\n gap: 8px;\n}\n.ycn-mobile-header-logo:is(a), .ycn-mobile-header-logo:is(a):hover, .ycn-mobile-header-logo:is(a):active, .ycn-mobile-header-logo:is(a):visited, .ycn-mobile-header-logo:is(a):focus {\n text-decoration: none;\n outline: none;\n color: var(--
|
|
5256
|
+
var css_248z$4 = ".ycn-mobile-header-logo {\n display: flex;\n align-items: center;\n overflow: hidden;\n gap: 8px;\n}\n.ycn-mobile-header-logo:is(a), .ycn-mobile-header-logo:is(a):hover, .ycn-mobile-header-logo:is(a):active, .ycn-mobile-header-logo:is(a):visited, .ycn-mobile-header-logo:is(a):focus {\n text-decoration: none;\n outline: none;\n color: var(--g-color-text-primary);\n}\n.ycn-mobile-header-logo__icon {\n flex-shrink: 0;\n}\n.ycn-mobile-header-logo__title {\n font-size: var(--g-text-header-1-font-size);\n line-height: var(--g-text-header-1-line-height);\n font-weight: var(--g-text-header-font-weight);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}";
|
|
5346
5257
|
styleInject(css_248z$4);
|
|
5347
5258
|
|
|
5348
5259
|
const b$4 = block('mobile-header-logo');
|
|
@@ -5399,7 +5310,7 @@ const getSelectedItemIndex = (items) => {
|
|
|
5399
5310
|
return index === -1 ? undefined : index;
|
|
5400
5311
|
};
|
|
5401
5312
|
|
|
5402
|
-
var css_248z$3 = ".ycn-burger-composite-bar {\n overflow-y: auto;\n}\n.ycn-burger-composite-bar__item {\n display: flex;\n height: 100%;\n align-items: center;\n flex-grow: 1;\n box-sizing: border-box;\n padding: 4px 22px 4px 12px;\n overflow: hidden;\n}\n.ycn-burger-composite-bar__item-icon-place {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: 40px;\n margin-right: 8px;\n}\n.ycn-burger-composite-bar .ycn-burger-composite-bar__item-icon {\n color: var(--
|
|
5313
|
+
var css_248z$3 = ".ycn-burger-composite-bar {\n overflow-y: auto;\n}\n.ycn-burger-composite-bar__item {\n display: flex;\n height: 100%;\n align-items: center;\n flex-grow: 1;\n box-sizing: border-box;\n padding: 4px 22px 4px 12px;\n overflow: hidden;\n}\n.ycn-burger-composite-bar__item-icon-place {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: 40px;\n margin-right: 8px;\n}\n.ycn-burger-composite-bar .ycn-burger-composite-bar__item-icon {\n color: var(--g-color-text-misc);\n}\n.ycn-burger-composite-bar__item-title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--g-text-body-2-font-size);\n line-height: var(--g-text-body-2-line-height);\n font-weight: var(--g-text-body-font-weight);\n}\n.ycn-burger-composite-bar__link {\n display: flex;\n flex-grow: 1;\n height: 100%;\n align-items: center;\n}\n.ycn-burger-composite-bar__link, .ycn-burger-composite-bar__link:hover, .ycn-burger-composite-bar__link:active, .ycn-burger-composite-bar__link:visited, .ycn-burger-composite-bar__link:focus {\n text-decoration: none;\n outline: none;\n color: inherit;\n}\n.ycn-burger-composite-bar__menu-divider {\n margin: 0;\n flex-grow: 1;\n border-top: 1px solid var(--g-color-line-generic);\n}\n.ycn-burger-composite-bar__root-menu-item.yc-list__item_selected {\n background-color: var(--g-color-base-selection);\n}\n.ycn-burger-composite-bar__root-menu-item:not(.yc-list__item_selected).yc-list__item_active {\n background: none;\n}";
|
|
5403
5314
|
styleInject(css_248z$3);
|
|
5404
5315
|
|
|
5405
5316
|
const b$3 = block('burger-composite-bar');
|
|
@@ -5430,7 +5341,7 @@ const BurgerCompositeBar = React__default["default"].memo(({ items, onItemClick
|
|
|
5430
5341
|
});
|
|
5431
5342
|
BurgerCompositeBar.displayName = 'BurgerCompositeBar';
|
|
5432
5343
|
|
|
5433
|
-
var css_248z$2 = ".ycn-mobile-header-burger-menu {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n.ycn-mobile-header-burger-menu__footer {\n display: flex;\n border-top: 1px solid var(--
|
|
5344
|
+
var css_248z$2 = ".ycn-mobile-header-burger-menu {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n.ycn-mobile-header-burger-menu__footer {\n display: flex;\n border-top: 1px solid var(--g-color-base-generic);\n margin-top: auto;\n}";
|
|
5434
5345
|
styleInject(css_248z$2);
|
|
5435
5346
|
|
|
5436
5347
|
const b$2 = block('mobile-header-burger-menu');
|
|
@@ -5443,7 +5354,7 @@ const BurgerMenu = React__default["default"].memo(({ items = [], renderFooter, m
|
|
|
5443
5354
|
});
|
|
5444
5355
|
BurgerMenu.displayName = 'BurgerMenu';
|
|
5445
5356
|
|
|
5446
|
-
var css_248z$1 = ".ycn-mobile-header {\n --mobile-header-min-heigth: 50px;\n --mobile-header-icon-size: 20px;\n background-color: var(--
|
|
5357
|
+
var css_248z$1 = ".ycn-mobile-header {\n --mobile-header-min-heigth: 50px;\n --mobile-header-icon-size: 20px;\n background-color: var(--g-color-base-background);\n}\n.ycn-mobile-header__header {\n background-color: var(--g-color-base-background);\n border-bottom: 1px solid var(--g-color-line-generic);\n position: sticky;\n top: 0;\n padding: 0 10px;\n box-sizing: border-box;\n display: flex;\n justify-content: space-between;\n align-items: center;\n z-index: 100;\n}\n.ycn-mobile-header__burger {\n padding: 12px;\n}\n.ycn-mobile-header__burger-menu, .ycn-mobile-header__panel-item {\n background-color: var(--g-color-base-background);\n width: 320px;\n max-width: 90vw;\n max-height: 100%;\n}\n.ycn-mobile-header__user-menu {\n overflow-y: auto;\n}\n.ycn-mobile-header__panels {\n z-index: 98;\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n top: var(--mobile-header-min-heigth);\n overflow: hidden;\n}\n.ycn-mobile-header__content {\n overflow: auto;\n}";
|
|
5447
5358
|
styleInject(css_248z$1);
|
|
5448
5359
|
|
|
5449
5360
|
const b$1 = block('mobile-header');
|
|
@@ -5545,7 +5456,7 @@ const MobileHeader = React__default["default"].forwardRef(({ logo, burgerMenu, p
|
|
|
5545
5456
|
});
|
|
5546
5457
|
MobileHeader.displayName = 'MobileHeader';
|
|
5547
5458
|
|
|
5548
|
-
var css_248z = ".ycn-mobile-header-footer-item {\n flex-grow: 1;\n position: relative;\n}\n.ycn-mobile-header-footer-item__button {\n margin: 0;\n padding: 0;\n font-family: var(--
|
|
5459
|
+
var css_248z = ".ycn-mobile-header-footer-item {\n flex-grow: 1;\n position: relative;\n}\n.ycn-mobile-header-footer-item__button {\n margin: 0;\n padding: 0;\n font-family: var(--g-font-family-sans);\n font-size: inherit;\n font-weight: 400;\n color: inherit;\n background: none;\n border: none;\n outline: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 13px 10px;\n width: 100%;\n box-sizing: border-box;\n}\n.ycn-mobile-header-footer-item .ycn-mobile-header-footer-item__icon {\n color: var(--g-color-text-misc);\n}\n.ycn-mobile-header-footer-item + .ycn-mobile-header-footer-item::before {\n content: \"\";\n border-left: 1px solid var(--g-color-base-generic);\n position: absolute;\n top: 8px;\n bottom: 8px;\n left: 0;\n}\n.ycn-mobile-header-footer-item:empty {\n display: none;\n}";
|
|
5549
5460
|
styleInject(css_248z);
|
|
5550
5461
|
|
|
5551
5462
|
const b = block('mobile-header-footer-item');
|
|
@@ -5564,6 +5475,22 @@ const FooterItem = ({ icon, iconSize = MOBILE_HEADER_ICON_SIZE, className, modal
|
|
|
5564
5475
|
React__default["default"].createElement(uikit.Sheet, { id: modalItem.id, title: modalItem.title, visible: modalItem.visible, className: b('modal', modalItem.className), contentClassName: b('modal-content', modalItem.contentClassName), allowHideOnContentScroll: modalItem.modalAllowHideOnContentScroll, onClose: modalItem.onClose }, (_a = modalItem.renderContent) === null || _a === void 0 ? void 0 : _a.call(modalItem))));
|
|
5565
5476
|
};
|
|
5566
5477
|
|
|
5478
|
+
exports.Lang = void 0;
|
|
5479
|
+
(function (Lang) {
|
|
5480
|
+
Lang["Ru"] = "ru";
|
|
5481
|
+
Lang["En"] = "en";
|
|
5482
|
+
})(exports.Lang || (exports.Lang = {}));
|
|
5483
|
+
let subs = [];
|
|
5484
|
+
const config = {
|
|
5485
|
+
lang: exports.Lang.En,
|
|
5486
|
+
};
|
|
5487
|
+
const configure = (newConfig) => {
|
|
5488
|
+
Object.assign(config, newConfig);
|
|
5489
|
+
subs.forEach((sub) => {
|
|
5490
|
+
sub(config);
|
|
5491
|
+
});
|
|
5492
|
+
};
|
|
5493
|
+
|
|
5567
5494
|
exports.ActionBar = PublicActionBar;
|
|
5568
5495
|
exports.AsideHeader = AsideHeader;
|
|
5569
5496
|
exports.Drawer = Drawer;
|
|
@@ -5574,4 +5501,5 @@ exports.MobileHeader = MobileHeader;
|
|
|
5574
5501
|
exports.MobileHeaderFooterItem = FooterItem;
|
|
5575
5502
|
exports.Settings = Settings;
|
|
5576
5503
|
exports.Title = Title;
|
|
5504
|
+
exports.configure = configure;
|
|
5577
5505
|
//# sourceMappingURL=index.js.map
|