@gravity-ui/navigation 0.10.0 → 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 +314 -386
- 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 +315 -388
- package/build/esm/index.js.map +1 -1
- package/package.json +107 -99
- package/CHANGELOG.md +0 -186
package/build/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default, { Children, isValidElement, cloneElement,
|
|
2
|
+
import React__default, { Children, isValidElement, cloneElement, Component, createElement, useRef, useContext, useCallback, useState, useMemo, useEffect } from 'react';
|
|
3
3
|
import { useBodyScrollLock, Button, Icon, Popup, List, Tooltip, Text, Hotkey, TextInput, Tabs, Loader, Sheet, eventBroker } from '@gravity-ui/uikit';
|
|
4
4
|
import ReactDOM from 'react-dom';
|
|
5
5
|
import { Ellipsis, Xmark } from '@gravity-ui/icons';
|
|
@@ -22,7 +22,13 @@ var lib = {exports: {}};
|
|
|
22
22
|
|
|
23
23
|
Object.defineProperty(lib$1, "__esModule", { value: true });
|
|
24
24
|
var bem_cn_1 = lib.exports;
|
|
25
|
-
var block$1 = bem_cn_1.setup();
|
|
25
|
+
var block$1 = (0, bem_cn_1.setup)();
|
|
26
|
+
function isString(data) {
|
|
27
|
+
return typeof data === 'string';
|
|
28
|
+
}
|
|
29
|
+
function hasMixinShape(data) {
|
|
30
|
+
return isString(data) || (Array.isArray(data) && data.every(isString));
|
|
31
|
+
}
|
|
26
32
|
function bemClassNameLite(blockName) {
|
|
27
33
|
var b = block$1(blockName);
|
|
28
34
|
function element() {
|
|
@@ -33,7 +39,7 @@ function bemClassNameLite(blockName) {
|
|
|
33
39
|
var elementName = args.shift();
|
|
34
40
|
var modifiers = args[0], mixin = args[1];
|
|
35
41
|
var result;
|
|
36
|
-
if (typeof elementName !== 'string' ||
|
|
42
|
+
if (typeof elementName !== 'string' || hasMixinShape(modifiers)) {
|
|
37
43
|
mixin = modifiers;
|
|
38
44
|
modifiers = null;
|
|
39
45
|
}
|
|
@@ -49,10 +55,10 @@ function bemClassNameLite(blockName) {
|
|
|
49
55
|
return element;
|
|
50
56
|
}
|
|
51
57
|
bemClassNameLite.setup = function (config) {
|
|
52
|
-
block$1 = bem_cn_1.setup(config);
|
|
58
|
+
block$1 = (0, bem_cn_1.setup)(config);
|
|
53
59
|
};
|
|
54
60
|
bemClassNameLite.reset = function () {
|
|
55
|
-
block$1 = bem_cn_1.setup();
|
|
61
|
+
block$1 = (0, bem_cn_1.setup)();
|
|
56
62
|
};
|
|
57
63
|
var _default = lib$1.default = bemClassNameLite;
|
|
58
64
|
|
|
@@ -84,8 +90,8 @@ const defaultDict$2 = {
|
|
|
84
90
|
[MobileHeaderDict.OpenBurger]: 'Open menu',
|
|
85
91
|
};
|
|
86
92
|
|
|
87
|
-
function _extends$
|
|
88
|
-
_extends$
|
|
93
|
+
function _extends$2() {
|
|
94
|
+
_extends$2 = Object.assign ? Object.assign.bind() : function (target) {
|
|
89
95
|
for (var i = 1; i < arguments.length; i++) {
|
|
90
96
|
var source = arguments[i];
|
|
91
97
|
for (var key in source) {
|
|
@@ -96,7 +102,7 @@ function _extends$3() {
|
|
|
96
102
|
}
|
|
97
103
|
return target;
|
|
98
104
|
};
|
|
99
|
-
return _extends$
|
|
105
|
+
return _extends$2.apply(this, arguments);
|
|
100
106
|
}
|
|
101
107
|
|
|
102
108
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
@@ -1351,7 +1357,7 @@ function removeClass$1(element, className) {
|
|
|
1351
1357
|
}
|
|
1352
1358
|
}
|
|
1353
1359
|
|
|
1354
|
-
var config = {
|
|
1360
|
+
var config$1 = {
|
|
1355
1361
|
disabled: false
|
|
1356
1362
|
};
|
|
1357
1363
|
|
|
@@ -1631,7 +1637,7 @@ var Transition = /*#__PURE__*/function (_React$Component) {
|
|
|
1631
1637
|
var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED
|
|
1632
1638
|
// if we are mounting and running this it means appear _must_ be set
|
|
1633
1639
|
|
|
1634
|
-
if (!mounting && !enter || config.disabled) {
|
|
1640
|
+
if (!mounting && !enter || config$1.disabled) {
|
|
1635
1641
|
this.safeSetState({
|
|
1636
1642
|
status: ENTERED
|
|
1637
1643
|
}, function () {
|
|
@@ -1663,7 +1669,7 @@ var Transition = /*#__PURE__*/function (_React$Component) {
|
|
|
1663
1669
|
var timeouts = this.getTimeouts();
|
|
1664
1670
|
var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED
|
|
1665
1671
|
|
|
1666
|
-
if (!exit || config.disabled) {
|
|
1672
|
+
if (!exit || config$1.disabled) {
|
|
1667
1673
|
this.safeSetState({
|
|
1668
1674
|
status: EXITED
|
|
1669
1675
|
}, function () {
|
|
@@ -2249,7 +2255,7 @@ var CSSTransition = /*#__PURE__*/function (_React$Component) {
|
|
|
2249
2255
|
_this$props.classNames;
|
|
2250
2256
|
var props = _objectWithoutPropertiesLoose(_this$props, ["classNames"]);
|
|
2251
2257
|
|
|
2252
|
-
return /*#__PURE__*/React__default.createElement(Transition, _extends$
|
|
2258
|
+
return /*#__PURE__*/React__default.createElement(Transition, _extends$2({}, props, {
|
|
2253
2259
|
onEnter: this.onEnter,
|
|
2254
2260
|
onEntered: this.onEntered,
|
|
2255
2261
|
onEntering: this.onEntering,
|
|
@@ -2265,7 +2271,7 @@ var CSSTransition = /*#__PURE__*/function (_React$Component) {
|
|
|
2265
2271
|
CSSTransition.defaultProps = {
|
|
2266
2272
|
classNames: ''
|
|
2267
2273
|
};
|
|
2268
|
-
CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$
|
|
2274
|
+
CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$2({}, Transition.propTypes, {
|
|
2269
2275
|
/**
|
|
2270
2276
|
* The animation classNames applied to the component as it appears, enters,
|
|
2271
2277
|
* exits or has finished the transition. A single name can be provided, which
|
|
@@ -2627,7 +2633,7 @@ var TransitionGroup = /*#__PURE__*/function (_React$Component) {
|
|
|
2627
2633
|
|
|
2628
2634
|
if (this.mounted) {
|
|
2629
2635
|
this.setState(function (state) {
|
|
2630
|
-
var children = _extends$
|
|
2636
|
+
var children = _extends$2({}, state.children);
|
|
2631
2637
|
|
|
2632
2638
|
delete children[child.key];
|
|
2633
2639
|
return {
|
|
@@ -3130,7 +3136,7 @@ function styleInject(css, ref) {
|
|
|
3130
3136
|
}
|
|
3131
3137
|
}
|
|
3132
3138
|
|
|
3133
|
-
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(--
|
|
3139
|
+
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}";
|
|
3134
3140
|
styleInject(css_248z$m);
|
|
3135
3141
|
|
|
3136
3142
|
const b$n = block('drawer');
|
|
@@ -3183,7 +3189,7 @@ const Drawer = ({ className, children, style, onVeilClick, onEscape, preventScro
|
|
|
3183
3189
|
}));
|
|
3184
3190
|
};
|
|
3185
3191
|
|
|
3186
|
-
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(--
|
|
3192
|
+
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}";
|
|
3187
3193
|
styleInject(css_248z$l);
|
|
3188
3194
|
|
|
3189
3195
|
const b$m = block('logo');
|
|
@@ -3218,143 +3224,38 @@ const Logo$1 = ({ text, compact, icon, iconSrc, iconClassName, iconSize = 24, te
|
|
|
3218
3224
|
(hasWrapper ? (React__default.createElement("div", { onClick: onClick }, wrapper(logo, compact))) : (React__default.createElement("a", Object.assign({}, linkProps, { className: b$m('logo-link'), onClick: onClick }), logo)))));
|
|
3219
3225
|
};
|
|
3220
3226
|
|
|
3221
|
-
var classCallCheck = function (instance, Constructor) {
|
|
3222
|
-
if (!(instance instanceof Constructor)) {
|
|
3223
|
-
throw new TypeError("Cannot call a class as a function");
|
|
3224
|
-
}
|
|
3225
|
-
};
|
|
3226
|
-
|
|
3227
|
-
var createClass = function () {
|
|
3228
|
-
function defineProperties(target, props) {
|
|
3229
|
-
for (var i = 0; i < props.length; i++) {
|
|
3230
|
-
var descriptor = props[i];
|
|
3231
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
3232
|
-
descriptor.configurable = true;
|
|
3233
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
3234
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
3235
|
-
}
|
|
3236
|
-
}
|
|
3237
|
-
|
|
3238
|
-
return function (Constructor, protoProps, staticProps) {
|
|
3239
|
-
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
|
3240
|
-
if (staticProps) defineProperties(Constructor, staticProps);
|
|
3241
|
-
return Constructor;
|
|
3242
|
-
};
|
|
3243
|
-
}();
|
|
3244
|
-
|
|
3245
|
-
var _extends$2 = Object.assign || function (target) {
|
|
3246
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
3247
|
-
var source = arguments[i];
|
|
3248
|
-
|
|
3249
|
-
for (var key in source) {
|
|
3250
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
3251
|
-
target[key] = source[key];
|
|
3252
|
-
}
|
|
3253
|
-
}
|
|
3254
|
-
}
|
|
3255
|
-
|
|
3256
|
-
return target;
|
|
3257
|
-
};
|
|
3258
|
-
|
|
3259
|
-
var inherits = function (subClass, superClass) {
|
|
3260
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
3261
|
-
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
|
|
3262
|
-
}
|
|
3263
|
-
|
|
3264
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
3265
|
-
constructor: {
|
|
3266
|
-
value: subClass,
|
|
3267
|
-
enumerable: false,
|
|
3268
|
-
writable: true,
|
|
3269
|
-
configurable: true
|
|
3270
|
-
}
|
|
3271
|
-
});
|
|
3272
|
-
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
|
|
3273
|
-
};
|
|
3274
|
-
|
|
3275
|
-
var possibleConstructorReturn = function (self, call) {
|
|
3276
|
-
if (!self) {
|
|
3277
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3278
|
-
}
|
|
3279
|
-
|
|
3280
|
-
return call && (typeof call === "object" || typeof call === "function") ? call : self;
|
|
3281
|
-
};
|
|
3282
|
-
|
|
3283
|
-
var slicedToArray = function () {
|
|
3284
|
-
function sliceIterator(arr, i) {
|
|
3285
|
-
var _arr = [];
|
|
3286
|
-
var _n = true;
|
|
3287
|
-
var _d = false;
|
|
3288
|
-
var _e = undefined;
|
|
3289
|
-
|
|
3290
|
-
try {
|
|
3291
|
-
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
3292
|
-
_arr.push(_s.value);
|
|
3293
|
-
|
|
3294
|
-
if (i && _arr.length === i) break;
|
|
3295
|
-
}
|
|
3296
|
-
} catch (err) {
|
|
3297
|
-
_d = true;
|
|
3298
|
-
_e = err;
|
|
3299
|
-
} finally {
|
|
3300
|
-
try {
|
|
3301
|
-
if (!_n && _i["return"]) _i["return"]();
|
|
3302
|
-
} finally {
|
|
3303
|
-
if (_d) throw _e;
|
|
3304
|
-
}
|
|
3305
|
-
}
|
|
3306
|
-
|
|
3307
|
-
return _arr;
|
|
3308
|
-
}
|
|
3309
|
-
|
|
3310
|
-
return function (arr, i) {
|
|
3311
|
-
if (Array.isArray(arr)) {
|
|
3312
|
-
return arr;
|
|
3313
|
-
} else if (Symbol.iterator in Object(arr)) {
|
|
3314
|
-
return sliceIterator(arr, i);
|
|
3315
|
-
} else {
|
|
3316
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
3317
|
-
}
|
|
3318
|
-
};
|
|
3319
|
-
}();
|
|
3320
|
-
|
|
3321
3227
|
/**
|
|
3322
3228
|
* Detect Element Resize.
|
|
3323
3229
|
* https://github.com/sdecima/javascript-detect-element-resize
|
|
3324
3230
|
* Sebastian Decima
|
|
3325
3231
|
*
|
|
3326
3232
|
* Forked from version 0.5.3; includes the following modifications:
|
|
3327
|
-
* 1)
|
|
3328
|
-
* 2)
|
|
3233
|
+
* 1) Guard against unsafe 'window' and 'document' references (to support SSR).
|
|
3234
|
+
* 2) Defer initialization code via a top-level function wrapper (to support SSR).
|
|
3329
3235
|
* 3) Avoid unnecessary reflows by not measuring size for scroll events bubbling from children.
|
|
3330
3236
|
* 4) Add nonce for style element.
|
|
3237
|
+
* 5) Use 'export' statement over 'module.exports' assignment
|
|
3331
3238
|
**/
|
|
3332
3239
|
|
|
3333
3240
|
// Check `document` and `window` in case of server-side rendering
|
|
3334
|
-
|
|
3335
|
-
if (typeof window !==
|
|
3241
|
+
let windowObject;
|
|
3242
|
+
if (typeof window !== "undefined") {
|
|
3336
3243
|
windowObject = window;
|
|
3337
3244
|
|
|
3338
3245
|
// eslint-disable-next-line no-restricted-globals
|
|
3339
|
-
} else if (typeof self !==
|
|
3246
|
+
} else if (typeof self !== "undefined") {
|
|
3340
3247
|
// eslint-disable-next-line no-restricted-globals
|
|
3341
3248
|
windowObject = self;
|
|
3342
3249
|
} else {
|
|
3343
3250
|
windowObject = global;
|
|
3344
3251
|
}
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
var setTimeoutFn = windowObject.setTimeout;
|
|
3353
|
-
|
|
3354
|
-
var cancelAnimationFrameFn = windowObject.cancelAnimationFrame || windowObject.mozCancelAnimationFrame || windowObject.webkitCancelAnimationFrame;
|
|
3355
|
-
|
|
3356
|
-
var requestAnimationFrameFn = windowObject.requestAnimationFrame || windowObject.mozRequestAnimationFrame || windowObject.webkitRequestAnimationFrame;
|
|
3357
|
-
|
|
3252
|
+
let cancelFrame = null;
|
|
3253
|
+
let requestFrame = null;
|
|
3254
|
+
const TIMEOUT_DURATION = 20;
|
|
3255
|
+
const clearTimeoutFn = windowObject.clearTimeout;
|
|
3256
|
+
const setTimeoutFn = windowObject.setTimeout;
|
|
3257
|
+
const cancelAnimationFrameFn = windowObject.cancelAnimationFrame || windowObject.mozCancelAnimationFrame || windowObject.webkitCancelAnimationFrame;
|
|
3258
|
+
const requestAnimationFrameFn = windowObject.requestAnimationFrame || windowObject.mozRequestAnimationFrame || windowObject.webkitRequestAnimationFrame;
|
|
3358
3259
|
if (cancelAnimationFrameFn == null || requestAnimationFrameFn == null) {
|
|
3359
3260
|
// For environments that don't support animation frame,
|
|
3360
3261
|
// fallback to a setTimeout based approach.
|
|
@@ -3366,64 +3267,53 @@ if (cancelAnimationFrameFn == null || requestAnimationFrameFn == null) {
|
|
|
3366
3267
|
// Counter intuitively, environments that support animation frames can be trickier.
|
|
3367
3268
|
// Chrome's "Throttle non-visible cross-origin iframes" flag can prevent rAFs from being called.
|
|
3368
3269
|
// In this case, we should fallback to a setTimeout() implementation.
|
|
3369
|
-
cancelFrame = function cancelFrame(
|
|
3370
|
-
var _ref2 = slicedToArray(_ref, 2),
|
|
3371
|
-
animationFrameID = _ref2[0],
|
|
3372
|
-
timeoutID = _ref2[1];
|
|
3373
|
-
|
|
3270
|
+
cancelFrame = function cancelFrame([animationFrameID, timeoutID]) {
|
|
3374
3271
|
cancelAnimationFrameFn(animationFrameID);
|
|
3375
3272
|
clearTimeoutFn(timeoutID);
|
|
3376
3273
|
};
|
|
3377
3274
|
requestFrame = function requestAnimationFrameWithSetTimeoutFallback(callback) {
|
|
3378
|
-
|
|
3275
|
+
const animationFrameID = requestAnimationFrameFn(function animationFrameCallback() {
|
|
3379
3276
|
clearTimeoutFn(timeoutID);
|
|
3380
3277
|
callback();
|
|
3381
3278
|
});
|
|
3382
|
-
|
|
3383
|
-
var timeoutID = setTimeoutFn(function timeoutCallback() {
|
|
3279
|
+
const timeoutID = setTimeoutFn(function timeoutCallback() {
|
|
3384
3280
|
cancelAnimationFrameFn(animationFrameID);
|
|
3385
3281
|
callback();
|
|
3386
3282
|
}, TIMEOUT_DURATION);
|
|
3387
|
-
|
|
3388
3283
|
return [animationFrameID, timeoutID];
|
|
3389
3284
|
};
|
|
3390
3285
|
}
|
|
3391
|
-
|
|
3392
3286
|
function createDetectElementResize(nonce) {
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
var attachEvent = typeof document !== 'undefined' && document.attachEvent;
|
|
3287
|
+
let animationKeyframes;
|
|
3288
|
+
let animationName;
|
|
3289
|
+
let animationStartEvent;
|
|
3290
|
+
let animationStyle;
|
|
3291
|
+
let checkTriggers;
|
|
3292
|
+
let resetTriggers;
|
|
3293
|
+
let scrollListener;
|
|
3294
|
+
const attachEvent = typeof document !== "undefined" && document.attachEvent;
|
|
3402
3295
|
if (!attachEvent) {
|
|
3403
|
-
resetTriggers = function
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3296
|
+
resetTriggers = function (element) {
|
|
3297
|
+
const triggers = element.__resizeTriggers__,
|
|
3298
|
+
expand = triggers.firstElementChild,
|
|
3299
|
+
contract = triggers.lastElementChild,
|
|
3300
|
+
expandChild = expand.firstElementChild;
|
|
3408
3301
|
contract.scrollLeft = contract.scrollWidth;
|
|
3409
3302
|
contract.scrollTop = contract.scrollHeight;
|
|
3410
|
-
expandChild.style.width = expand.offsetWidth + 1 +
|
|
3411
|
-
expandChild.style.height = expand.offsetHeight + 1 +
|
|
3303
|
+
expandChild.style.width = expand.offsetWidth + 1 + "px";
|
|
3304
|
+
expandChild.style.height = expand.offsetHeight + 1 + "px";
|
|
3412
3305
|
expand.scrollLeft = expand.scrollWidth;
|
|
3413
3306
|
expand.scrollTop = expand.scrollHeight;
|
|
3414
3307
|
};
|
|
3415
|
-
|
|
3416
|
-
checkTriggers = function checkTriggers(element) {
|
|
3308
|
+
checkTriggers = function (element) {
|
|
3417
3309
|
return element.offsetWidth !== element.__resizeLast__.width || element.offsetHeight !== element.__resizeLast__.height;
|
|
3418
3310
|
};
|
|
3419
|
-
|
|
3420
|
-
scrollListener = function scrollListener(e) {
|
|
3311
|
+
scrollListener = function (e) {
|
|
3421
3312
|
// Don't measure (which forces) reflow for scrolls that happen inside of children!
|
|
3422
|
-
if (e.target.className && typeof e.target.className.indexOf ===
|
|
3313
|
+
if (e.target.className && typeof e.target.className.indexOf === "function" && e.target.className.indexOf("contract-trigger") < 0 && e.target.className.indexOf("expand-trigger") < 0) {
|
|
3423
3314
|
return;
|
|
3424
3315
|
}
|
|
3425
|
-
|
|
3426
|
-
var element = this;
|
|
3316
|
+
const element = this;
|
|
3427
3317
|
resetTriggers(this);
|
|
3428
3318
|
if (this.__resizeRAF__) {
|
|
3429
3319
|
cancelFrame(this.__resizeRAF__);
|
|
@@ -3440,23 +3330,22 @@ function createDetectElementResize(nonce) {
|
|
|
3440
3330
|
};
|
|
3441
3331
|
|
|
3442
3332
|
/* Detect CSS Animations support to detect element display/re-attach */
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
animationStartEvent =
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3333
|
+
let animation = false;
|
|
3334
|
+
let keyframeprefix = "";
|
|
3335
|
+
animationStartEvent = "animationstart";
|
|
3336
|
+
const domPrefixes = "Webkit Moz O ms".split(" ");
|
|
3337
|
+
let startEvents = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" ");
|
|
3338
|
+
let pfx = "";
|
|
3449
3339
|
{
|
|
3450
|
-
|
|
3340
|
+
const elm = document.createElement("fakeelement");
|
|
3451
3341
|
if (elm.style.animationName !== undefined) {
|
|
3452
3342
|
animation = true;
|
|
3453
3343
|
}
|
|
3454
|
-
|
|
3455
3344
|
if (animation === false) {
|
|
3456
|
-
for (
|
|
3457
|
-
if (elm.style[domPrefixes[i] +
|
|
3345
|
+
for (let i = 0; i < domPrefixes.length; i++) {
|
|
3346
|
+
if (elm.style[domPrefixes[i] + "AnimationName"] !== undefined) {
|
|
3458
3347
|
pfx = domPrefixes[i];
|
|
3459
|
-
keyframeprefix =
|
|
3348
|
+
keyframeprefix = "-" + pfx.toLowerCase() + "-";
|
|
3460
3349
|
animationStartEvent = startEvents[i];
|
|
3461
3350
|
animation = true;
|
|
3462
3351
|
break;
|
|
@@ -3464,60 +3353,53 @@ function createDetectElementResize(nonce) {
|
|
|
3464
3353
|
}
|
|
3465
3354
|
}
|
|
3466
3355
|
}
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
animationStyle = keyframeprefix + 'animation: 1ms ' + animationName + '; ';
|
|
3356
|
+
animationName = "resizeanim";
|
|
3357
|
+
animationKeyframes = "@" + keyframeprefix + "keyframes " + animationName + " { from { opacity: 0; } to { opacity: 0; } } ";
|
|
3358
|
+
animationStyle = keyframeprefix + "animation: 1ms " + animationName + "; ";
|
|
3471
3359
|
}
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
if (!doc.getElementById('detectElementResize')) {
|
|
3360
|
+
const createStyles = function (doc) {
|
|
3361
|
+
if (!doc.getElementById("detectElementResize")) {
|
|
3475
3362
|
//opacity:0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
style.
|
|
3481
|
-
style.type = 'text/css';
|
|
3482
|
-
|
|
3363
|
+
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%; }',
|
|
3364
|
+
head = doc.head || doc.getElementsByTagName("head")[0],
|
|
3365
|
+
style = doc.createElement("style");
|
|
3366
|
+
style.id = "detectElementResize";
|
|
3367
|
+
style.type = "text/css";
|
|
3483
3368
|
if (nonce != null) {
|
|
3484
|
-
style.setAttribute(
|
|
3369
|
+
style.setAttribute("nonce", nonce);
|
|
3485
3370
|
}
|
|
3486
|
-
|
|
3487
3371
|
if (style.styleSheet) {
|
|
3488
3372
|
style.styleSheet.cssText = css;
|
|
3489
3373
|
} else {
|
|
3490
3374
|
style.appendChild(doc.createTextNode(css));
|
|
3491
3375
|
}
|
|
3492
|
-
|
|
3493
3376
|
head.appendChild(style);
|
|
3494
3377
|
}
|
|
3495
3378
|
};
|
|
3496
|
-
|
|
3497
|
-
var addResizeListener = function addResizeListener(element, fn) {
|
|
3379
|
+
const addResizeListener = function (element, fn) {
|
|
3498
3380
|
if (attachEvent) {
|
|
3499
|
-
element.attachEvent(
|
|
3381
|
+
element.attachEvent("onresize", fn);
|
|
3500
3382
|
} else {
|
|
3501
3383
|
if (!element.__resizeTriggers__) {
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
if (elementStyle && elementStyle.position ===
|
|
3505
|
-
element.style.position =
|
|
3384
|
+
const doc = element.ownerDocument;
|
|
3385
|
+
const elementStyle = windowObject.getComputedStyle(element);
|
|
3386
|
+
if (elementStyle && elementStyle.position === "static") {
|
|
3387
|
+
element.style.position = "relative";
|
|
3506
3388
|
}
|
|
3507
3389
|
createStyles(doc);
|
|
3508
3390
|
element.__resizeLast__ = {};
|
|
3509
3391
|
element.__resizeListeners__ = [];
|
|
3510
|
-
(element.__resizeTriggers__ = doc.createElement(
|
|
3511
|
-
|
|
3512
|
-
expandTrigger.className =
|
|
3513
|
-
expandTrigger.appendChild(doc.createElement(
|
|
3514
|
-
|
|
3515
|
-
contractTrigger.className =
|
|
3392
|
+
(element.__resizeTriggers__ = doc.createElement("div")).className = "resize-triggers";
|
|
3393
|
+
const expandTrigger = doc.createElement("div");
|
|
3394
|
+
expandTrigger.className = "expand-trigger";
|
|
3395
|
+
expandTrigger.appendChild(doc.createElement("div"));
|
|
3396
|
+
const contractTrigger = doc.createElement("div");
|
|
3397
|
+
contractTrigger.className = "contract-trigger";
|
|
3516
3398
|
element.__resizeTriggers__.appendChild(expandTrigger);
|
|
3517
3399
|
element.__resizeTriggers__.appendChild(contractTrigger);
|
|
3518
3400
|
element.appendChild(element.__resizeTriggers__);
|
|
3519
3401
|
resetTriggers(element);
|
|
3520
|
-
element.addEventListener(
|
|
3402
|
+
element.addEventListener("scroll", scrollListener, true);
|
|
3521
3403
|
|
|
3522
3404
|
/* Listen for a css animation to detect element display/re-attach */
|
|
3523
3405
|
if (animationStartEvent) {
|
|
@@ -3532,14 +3414,13 @@ function createDetectElementResize(nonce) {
|
|
|
3532
3414
|
element.__resizeListeners__.push(fn);
|
|
3533
3415
|
}
|
|
3534
3416
|
};
|
|
3535
|
-
|
|
3536
|
-
var removeResizeListener = function removeResizeListener(element, fn) {
|
|
3417
|
+
const removeResizeListener = function (element, fn) {
|
|
3537
3418
|
if (attachEvent) {
|
|
3538
|
-
element.detachEvent(
|
|
3419
|
+
element.detachEvent("onresize", fn);
|
|
3539
3420
|
} else {
|
|
3540
3421
|
element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
|
|
3541
3422
|
if (!element.__resizeListeners__.length) {
|
|
3542
|
-
element.removeEventListener(
|
|
3423
|
+
element.removeEventListener("scroll", scrollListener, true);
|
|
3543
3424
|
if (element.__resizeTriggers__.__animationListener__) {
|
|
3544
3425
|
element.__resizeTriggers__.removeEventListener(animationStartEvent, element.__resizeTriggers__.__animationListener__);
|
|
3545
3426
|
element.__resizeTriggers__.__animationListener__ = null;
|
|
@@ -3552,154 +3433,171 @@ function createDetectElementResize(nonce) {
|
|
|
3552
3433
|
}
|
|
3553
3434
|
}
|
|
3554
3435
|
};
|
|
3555
|
-
|
|
3556
3436
|
return {
|
|
3557
|
-
addResizeListener
|
|
3558
|
-
removeResizeListener
|
|
3437
|
+
addResizeListener,
|
|
3438
|
+
removeResizeListener
|
|
3559
3439
|
};
|
|
3560
3440
|
}
|
|
3561
3441
|
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
if (_this._parentNode) {
|
|
3442
|
+
class AutoSizer extends Component {
|
|
3443
|
+
constructor(...args) {
|
|
3444
|
+
super(...args);
|
|
3445
|
+
this.state = {
|
|
3446
|
+
height: this.props.defaultHeight || 0,
|
|
3447
|
+
scaledHeight: this.props.defaultHeight || 0,
|
|
3448
|
+
scaledWidth: this.props.defaultWidth || 0,
|
|
3449
|
+
width: this.props.defaultWidth || 0
|
|
3450
|
+
};
|
|
3451
|
+
this._autoSizer = null;
|
|
3452
|
+
this._detectElementResize = null;
|
|
3453
|
+
this._parentNode = null;
|
|
3454
|
+
this._resizeObserver = null;
|
|
3455
|
+
this._timeoutId = null;
|
|
3456
|
+
this._onResize = () => {
|
|
3457
|
+
this._timeoutId = null;
|
|
3458
|
+
const {
|
|
3459
|
+
disableHeight,
|
|
3460
|
+
disableWidth,
|
|
3461
|
+
onResize
|
|
3462
|
+
} = this.props;
|
|
3463
|
+
if (this._parentNode) {
|
|
3464
|
+
var _style$paddingLeft, _style$paddingRight, _style$paddingTop, _style$paddingBottom;
|
|
3587
3465
|
// Guard against AutoSizer component being removed from the DOM immediately after being added.
|
|
3588
3466
|
// This can result in invalid style values which can result in NaN values if we don't handle them.
|
|
3589
3467
|
// See issue #150 for more context.
|
|
3590
3468
|
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3469
|
+
const style = window.getComputedStyle(this._parentNode) || {};
|
|
3470
|
+
const paddingLeft = parseFloat((_style$paddingLeft = style.paddingLeft) !== null && _style$paddingLeft !== void 0 ? _style$paddingLeft : "0");
|
|
3471
|
+
const paddingRight = parseFloat((_style$paddingRight = style.paddingRight) !== null && _style$paddingRight !== void 0 ? _style$paddingRight : "0");
|
|
3472
|
+
const paddingTop = parseFloat((_style$paddingTop = style.paddingTop) !== null && _style$paddingTop !== void 0 ? _style$paddingTop : "0");
|
|
3473
|
+
const paddingBottom = parseFloat((_style$paddingBottom = style.paddingBottom) !== null && _style$paddingBottom !== void 0 ? _style$paddingBottom : "0");
|
|
3474
|
+
const rect = this._parentNode.getBoundingClientRect();
|
|
3475
|
+
const scaledHeight = rect.height - paddingTop - paddingBottom;
|
|
3476
|
+
const scaledWidth = rect.width - paddingLeft - paddingRight;
|
|
3477
|
+
const height = this._parentNode.offsetHeight - paddingTop - paddingBottom;
|
|
3478
|
+
const width = this._parentNode.offsetWidth - paddingLeft - paddingRight;
|
|
3479
|
+
if (!disableHeight && (this.state.height !== height || this.state.scaledHeight !== scaledHeight) || !disableWidth && (this.state.width !== width || this.state.scaledWidth !== scaledWidth)) {
|
|
3480
|
+
this.setState({
|
|
3481
|
+
height,
|
|
3482
|
+
width,
|
|
3483
|
+
scaledHeight,
|
|
3484
|
+
scaledWidth
|
|
3607
3485
|
});
|
|
3608
|
-
|
|
3609
|
-
|
|
3486
|
+
if (typeof onResize === "function") {
|
|
3487
|
+
onResize({
|
|
3488
|
+
height,
|
|
3489
|
+
scaledHeight,
|
|
3490
|
+
scaledWidth,
|
|
3491
|
+
width
|
|
3492
|
+
});
|
|
3493
|
+
}
|
|
3610
3494
|
}
|
|
3611
3495
|
}
|
|
3612
|
-
}
|
|
3613
|
-
|
|
3614
|
-
|
|
3496
|
+
};
|
|
3497
|
+
this._setRef = autoSizer => {
|
|
3498
|
+
this._autoSizer = autoSizer;
|
|
3499
|
+
};
|
|
3615
3500
|
}
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3501
|
+
componentDidMount() {
|
|
3502
|
+
const {
|
|
3503
|
+
nonce
|
|
3504
|
+
} = this.props;
|
|
3505
|
+
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) {
|
|
3506
|
+
// Delay access of parentNode until mount.
|
|
3507
|
+
// This handles edge-cases where the component has already been unmounted before its ref has been set,
|
|
3508
|
+
// As well as libraries like react-lite which have a slightly different lifecycle.
|
|
3509
|
+
this._parentNode = this._autoSizer.parentNode;
|
|
3510
|
+
|
|
3511
|
+
// Defer requiring resize handler in order to support server-side rendering.
|
|
3512
|
+
// See issue #41
|
|
3513
|
+
if (this._parentNode != null) {
|
|
3514
|
+
if (typeof ResizeObserver !== "undefined") {
|
|
3515
|
+
this._resizeObserver = new ResizeObserver(() => {
|
|
3516
|
+
// Guard against "ResizeObserver loop limit exceeded" error;
|
|
3517
|
+
// could be triggered if the state update causes the ResizeObserver handler to run long.
|
|
3518
|
+
// See https://github.com/bvaughn/react-virtualized-auto-sizer/issues/55
|
|
3519
|
+
this._timeoutId = setTimeout(this._onResize, 0);
|
|
3520
|
+
});
|
|
3521
|
+
this._resizeObserver.observe(this._parentNode);
|
|
3522
|
+
} else {
|
|
3523
|
+
this._detectElementResize = createDetectElementResize(nonce);
|
|
3524
|
+
this._detectElementResize.addResizeListener(this._parentNode, this._onResize);
|
|
3525
|
+
}
|
|
3633
3526
|
this._onResize();
|
|
3634
3527
|
}
|
|
3635
3528
|
}
|
|
3636
|
-
}
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
if (this._detectElementResize
|
|
3529
|
+
}
|
|
3530
|
+
componentWillUnmount() {
|
|
3531
|
+
if (this._parentNode) {
|
|
3532
|
+
if (this._detectElementResize) {
|
|
3640
3533
|
this._detectElementResize.removeResizeListener(this._parentNode, this._onResize);
|
|
3641
3534
|
}
|
|
3535
|
+
if (this._timeoutId !== null) {
|
|
3536
|
+
clearTimeout(this._timeoutId);
|
|
3537
|
+
}
|
|
3538
|
+
if (this._resizeObserver) {
|
|
3539
|
+
this._resizeObserver.observe(this._parentNode);
|
|
3540
|
+
this._resizeObserver.disconnect();
|
|
3541
|
+
}
|
|
3642
3542
|
}
|
|
3643
|
-
}
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3543
|
+
}
|
|
3544
|
+
render() {
|
|
3545
|
+
const {
|
|
3546
|
+
children,
|
|
3547
|
+
defaultHeight,
|
|
3548
|
+
defaultWidth,
|
|
3549
|
+
disableHeight = false,
|
|
3550
|
+
disableWidth = false,
|
|
3551
|
+
nonce,
|
|
3552
|
+
onResize,
|
|
3553
|
+
style = {},
|
|
3554
|
+
tagName = "div",
|
|
3555
|
+
...rest
|
|
3556
|
+
} = this.props;
|
|
3557
|
+
const {
|
|
3558
|
+
height,
|
|
3559
|
+
scaledHeight,
|
|
3560
|
+
scaledWidth,
|
|
3561
|
+
width
|
|
3562
|
+
} = this.state;
|
|
3563
|
+
|
|
3564
|
+
// Outer div should not force width/height since that may prevent containers from shrinking.
|
|
3565
|
+
// Inner component should overflow and use calculated width/height.
|
|
3566
|
+
// See issue #68 for more information.
|
|
3567
|
+
const outerStyle = {
|
|
3568
|
+
overflow: "visible"
|
|
3569
|
+
};
|
|
3570
|
+
const childParams = {};
|
|
3571
|
+
|
|
3572
|
+
// Avoid rendering children before the initial measurements have been collected.
|
|
3573
|
+
// At best this would just be wasting cycles.
|
|
3574
|
+
let bailoutOnChildren = false;
|
|
3575
|
+
if (!disableHeight) {
|
|
3576
|
+
if (height === 0) {
|
|
3577
|
+
bailoutOnChildren = true;
|
|
3673
3578
|
}
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3579
|
+
outerStyle.height = 0;
|
|
3580
|
+
childParams.height = height;
|
|
3581
|
+
childParams.scaledHeight = scaledHeight;
|
|
3582
|
+
}
|
|
3583
|
+
if (!disableWidth) {
|
|
3584
|
+
if (width === 0) {
|
|
3585
|
+
bailoutOnChildren = true;
|
|
3681
3586
|
}
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
{
|
|
3686
|
-
className: className,
|
|
3687
|
-
ref: this._setRef,
|
|
3688
|
-
style: _extends$2({}, outerStyle, style)
|
|
3689
|
-
},
|
|
3690
|
-
!bailoutOnChildren && children(childParams)
|
|
3691
|
-
);
|
|
3587
|
+
outerStyle.width = 0;
|
|
3588
|
+
childParams.width = width;
|
|
3589
|
+
childParams.scaledWidth = scaledWidth;
|
|
3692
3590
|
}
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
}
|
|
3591
|
+
return createElement(tagName, {
|
|
3592
|
+
ref: this._setRef,
|
|
3593
|
+
style: {
|
|
3594
|
+
...outerStyle,
|
|
3595
|
+
...style
|
|
3596
|
+
},
|
|
3597
|
+
...rest
|
|
3598
|
+
}, !bailoutOnChildren && children(childParams));
|
|
3599
|
+
}
|
|
3600
|
+
}
|
|
3703
3601
|
|
|
3704
3602
|
const ICON_SIZE = 24;
|
|
3705
3603
|
const ITEM_HEIGHT = 40;
|
|
@@ -3796,7 +3694,7 @@ function getAutosizeListItems(items, height, collapseItem) {
|
|
|
3796
3694
|
return { listItems, collapseItems };
|
|
3797
3695
|
}
|
|
3798
3696
|
|
|
3799
|
-
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(--
|
|
3697
|
+
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}";
|
|
3800
3698
|
styleInject(css_248z$k);
|
|
3801
3699
|
|
|
3802
3700
|
const b$l = block('composite-bar-item');
|
|
@@ -3859,7 +3757,7 @@ const Item$1 = (props) => {
|
|
|
3859
3757
|
React__default.createElement("div", { className: b$l('icon-place') }, compact ? (React__default.createElement(Tooltip, { content: tooltipText, disabled: !enableTooltip || (collapsedItem && open), placement: "right", className: b$l('icon-tooltip', { 'item-type': type }) },
|
|
3860
3758
|
React__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)),
|
|
3861
3759
|
React__default.createElement("div", { className: b$l('title'), title: typeof item.title === 'string' ? item.title : undefined }, titleEl),
|
|
3862
|
-
renderPopupContent && Boolean(anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current) && (React__default.createElement(Popup, {
|
|
3760
|
+
renderPopupContent && Boolean(anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current) && (React__default.createElement(Popup, { contentClassName: b$l('popup'), open: popupVisible, keepMounted: popupKeepMounted, placement: popupPlacement, offset: popupOffset, anchorRef: anchorRef, onClose: onClose }, renderPopupContent()))));
|
|
3863
3761
|
return item.link ? (React__default.createElement("a", { href: item.link, className: b$l('link') }, createdNode)) : (createdNode);
|
|
3864
3762
|
};
|
|
3865
3763
|
const iconNode = icon ? React__default.createElement(Icon, { data: icon, size: iconSize, className: b$l('icon') }) : null;
|
|
@@ -3925,7 +3823,7 @@ class MultipleTooltipProvider extends React__default.PureComponent {
|
|
|
3925
3823
|
}
|
|
3926
3824
|
}
|
|
3927
3825
|
|
|
3928
|
-
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(--
|
|
3826
|
+
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}";
|
|
3929
3827
|
styleInject(css_248z$i);
|
|
3930
3828
|
|
|
3931
3829
|
const b$k = block('multiple-tooltip');
|
|
@@ -3939,7 +3837,7 @@ const POPUP_MODIFIERS = [
|
|
|
3939
3837
|
const MultipleTooltip = ({ items, open, anchorRef, placement, }) => {
|
|
3940
3838
|
const { activeIndex, hideCollapseItemTooltip } = React__default.useContext(MultipleTooltipContext);
|
|
3941
3839
|
const activeItem = activeIndex === undefined ? null : items[activeIndex];
|
|
3942
|
-
return (React__default.createElement(Popup, { open: open, anchorRef: anchorRef, placement: placement, offset: POPUP_OFFSET,
|
|
3840
|
+
return (React__default.createElement(Popup, { open: open, anchorRef: anchorRef, placement: placement, offset: POPUP_OFFSET, contentClassName: b$k(null), modifiers: POPUP_MODIFIERS },
|
|
3943
3841
|
React__default.createElement("div", { className: b$k('items-container') }, items
|
|
3944
3842
|
.filter(({ type = 'regular', id }) => !hideCollapseItemTooltip ||
|
|
3945
3843
|
(id !== COLLAPSE_ITEM_ID && type !== 'action'))
|
|
@@ -4020,14 +3918,14 @@ const CompositeBarView = ({ items, compact, onItemClick, collapseItems, multiple
|
|
|
4020
3918
|
}, [lastClickedItemIndex, setMultipleTooltipContextValue]);
|
|
4021
3919
|
return (React__default.createElement(React__default.Fragment, null,
|
|
4022
3920
|
React__default.createElement("div", { ref: tooltipRef, onMouseEnter: onTooltipMouseEnter, onMouseLeave: onTooltipMouseLeave },
|
|
4023
|
-
React__default.createElement(List, { ref: ref, items: items, selectedItemIndex: getSelectedItemIndex$1(items), itemHeight: getItemHeight$1, itemClassName: b$j('root-menu-item'), itemsHeight: getItemsHeight, virtualized: false, filterable: false, sortable: false, renderItem: (item, _isItemActive, itemIndex) => (React__default.createElement(Item$1, { item: item, onMouseEnter: onMouseEnterByIndex(itemIndex), onMouseLeave: onMouseLeave, onItemClick: onItemClickByIndex, compact: compact, collapseItems: collapseItems, enableTooltip: !multipleTooltip })) })),
|
|
3921
|
+
React__default.createElement(List, { ref: ref, items: items, selectedItemIndex: getSelectedItemIndex$1(items), itemHeight: getItemHeight$1, itemClassName: b$j('root-menu-item'), itemsHeight: getItemsHeight, virtualized: false, filterable: false, sortable: false, renderItem: (item, _isItemActive, itemIndex) => (React__default.createElement(Item$1, { item: item, onMouseEnter: onMouseEnterByIndex(itemIndex), onMouseLeave: onMouseLeave, onItemClick: onItemClickByIndex(itemIndex), compact: compact, collapseItems: collapseItems, enableTooltip: !multipleTooltip })) })),
|
|
4024
3922
|
React__default.createElement(MultipleTooltip, { open: compact && multipleTooltip && multipleTooltipActive, anchorRef: tooltipRef, placement: ['right-start'], items: items })));
|
|
4025
3923
|
};
|
|
4026
3924
|
const CompositeBar = ({ items, compact, enableCollapsing, dict, onItemClick, multipleTooltip = false, }) => {
|
|
4027
3925
|
if (items.length === 0) {
|
|
4028
3926
|
return null;
|
|
4029
3927
|
}
|
|
4030
|
-
let node
|
|
3928
|
+
let node;
|
|
4031
3929
|
if (enableCollapsing) {
|
|
4032
3930
|
const minHeight = getItemsMinHeight(items);
|
|
4033
3931
|
const collapseItem = getMoreButtonItem(dict);
|
|
@@ -4053,6 +3951,12 @@ const Content = ({ size, className, cssSizeVariableName = '--aside-header-size',
|
|
|
4053
3951
|
return (React__default.createElement("div", { className: className, style: Object.assign({}, { [cssSizeVariableName]: `${size}px` }) }, typeof renderContent === 'function' && (React__default.createElement(RenderContent, { size: size, renderContent: renderContent }))));
|
|
4054
3952
|
};
|
|
4055
3953
|
|
|
3954
|
+
function fakeDisplayName(newDisplayName, Component) {
|
|
3955
|
+
const Fake = (props) => React__default.createElement(Component, Object.assign({}, props));
|
|
3956
|
+
Fake.displayName = newDisplayName;
|
|
3957
|
+
return Fake;
|
|
3958
|
+
}
|
|
3959
|
+
|
|
4056
3960
|
var _path$1;
|
|
4057
3961
|
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); }
|
|
4058
3962
|
var SvgControlMenuButton = function SvgControlMenuButton(props) {
|
|
@@ -4083,9 +3987,11 @@ var SvgDividerCollapsed = function SvgDividerCollapsed(props) {
|
|
|
4083
3987
|
};
|
|
4084
3988
|
var headerDividerCollapsedIcon = SvgDividerCollapsed;
|
|
4085
3989
|
|
|
4086
|
-
var css_248z$h = ".yc-root {\n --aside-header-background-color: var(--
|
|
3990
|
+
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}";
|
|
4087
3991
|
styleInject(css_248z$h);
|
|
4088
3992
|
|
|
3993
|
+
// TODO: remove temporary fix for expand button
|
|
3994
|
+
const NotIcon = fakeDisplayName('NotIcon', Icon);
|
|
4089
3995
|
const b$i = block('aside-header');
|
|
4090
3996
|
class AsideHeader extends React__default.Component {
|
|
4091
3997
|
constructor() {
|
|
@@ -4128,7 +4034,7 @@ class AsideHeader extends React__default.Component {
|
|
|
4128
4034
|
const { compact, dict } = this.props;
|
|
4129
4035
|
const typeButton = compact ? Dict.ExpandButton : Dict.CollapseButton;
|
|
4130
4036
|
return (React__default.createElement(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] },
|
|
4131
|
-
React__default.createElement(
|
|
4037
|
+
React__default.createElement(NotIcon, { data: controlMenuButtonIcon, className: b$i('collapse-icon'), width: "16", height: "10" })));
|
|
4132
4038
|
};
|
|
4133
4039
|
this.onCollapseButtonClick = () => {
|
|
4134
4040
|
var _a, _b;
|
|
@@ -4165,33 +4071,38 @@ AsideHeader.defaultProps = {
|
|
|
4165
4071
|
headerDecoration: true,
|
|
4166
4072
|
};
|
|
4167
4073
|
|
|
4168
|
-
/******************************************************************************
|
|
4169
|
-
Copyright (c) Microsoft Corporation.
|
|
4170
|
-
|
|
4171
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
4172
|
-
purpose with or without fee is hereby granted.
|
|
4173
|
-
|
|
4174
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
4175
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
4176
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
4177
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
4178
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
4179
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
4180
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
4181
|
-
***************************************************************************** */
|
|
4182
|
-
|
|
4183
|
-
function __rest(s, e) {
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4074
|
+
/******************************************************************************
|
|
4075
|
+
Copyright (c) Microsoft Corporation.
|
|
4076
|
+
|
|
4077
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
4078
|
+
purpose with or without fee is hereby granted.
|
|
4079
|
+
|
|
4080
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
4081
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
4082
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
4083
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
4084
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
4085
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
4086
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
4087
|
+
***************************************************************************** */
|
|
4088
|
+
|
|
4089
|
+
function __rest(s, e) {
|
|
4090
|
+
var t = {};
|
|
4091
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4092
|
+
t[p] = s[p];
|
|
4093
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
4094
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
4095
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
4096
|
+
t[p[i]] = s[p[i]];
|
|
4097
|
+
}
|
|
4098
|
+
return t;
|
|
4193
4099
|
}
|
|
4194
4100
|
|
|
4101
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
4102
|
+
var e = new Error(message);
|
|
4103
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
4104
|
+
};
|
|
4105
|
+
|
|
4195
4106
|
var css_248z$g = ".ycn-footer-item {\n width: 100%;\n height: 40px;\n}";
|
|
4196
4107
|
styleInject(css_248z$g);
|
|
4197
4108
|
|
|
@@ -4219,7 +4130,7 @@ const ActionBarItem = ({ children, className, pull, spacing = true }) => {
|
|
|
4219
4130
|
};
|
|
4220
4131
|
ActionBarItem.displayName = 'ActionBar.Item';
|
|
4221
4132
|
|
|
4222
|
-
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(--
|
|
4133
|
+
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}";
|
|
4223
4134
|
styleInject(css_248z$d);
|
|
4224
4135
|
|
|
4225
4136
|
const b$e = block('action-bar-section');
|
|
@@ -4228,7 +4139,7 @@ const ActionBarSection = ({ children, type = 'primary' }) => {
|
|
|
4228
4139
|
};
|
|
4229
4140
|
ActionBarSection.displayName = 'ActionBar.Section';
|
|
4230
4141
|
|
|
4231
|
-
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(--
|
|
4142
|
+
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}";
|
|
4232
4143
|
styleInject(css_248z$c);
|
|
4233
4144
|
|
|
4234
4145
|
const b$d = block('action-bar-separator');
|
|
@@ -4237,7 +4148,7 @@ const ActionBarSeparator = () => {
|
|
|
4237
4148
|
};
|
|
4238
4149
|
ActionBarSeparator.displayName = 'ActionBar.Separator';
|
|
4239
4150
|
|
|
4240
|
-
var css_248z$b = ".ycn-action-bar {\n box-sizing: border-box;\n height: 40px;\n border-bottom: solid 1px var(--
|
|
4151
|
+
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}";
|
|
4241
4152
|
styleInject(css_248z$b);
|
|
4242
4153
|
|
|
4243
4154
|
const b$c = block('action-bar');
|
|
@@ -4252,7 +4163,7 @@ const PublicActionBar = Object.assign(ActionBar, {
|
|
|
4252
4163
|
Separator: ActionBarSeparator,
|
|
4253
4164
|
});
|
|
4254
4165
|
|
|
4255
|
-
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(--
|
|
4166
|
+
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}";
|
|
4256
4167
|
styleInject(css_248z$a);
|
|
4257
4168
|
|
|
4258
4169
|
const b$b = block('title');
|
|
@@ -4296,7 +4207,7 @@ function filterHotkeys(hotkeys, filter) {
|
|
|
4296
4207
|
return hotkeys;
|
|
4297
4208
|
}
|
|
4298
4209
|
|
|
4299
|
-
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(--
|
|
4210
|
+
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}";
|
|
4300
4211
|
styleInject(css_248z$9);
|
|
4301
4212
|
|
|
4302
4213
|
const b$a = block('hotkeys-panel');
|
|
@@ -4920,7 +4831,7 @@ function SettingsSearch({ className, onChange, debounce = 200, inputRef, inputSi
|
|
|
4920
4831
|
React__default.createElement(TextInput, { controlRef: inputRef, hasClear: true, autoFocus: autoFocus, size: inputSize, placeholder: placeholder, onUpdate: handleUpdate })));
|
|
4921
4832
|
}
|
|
4922
4833
|
|
|
4923
|
-
var css_248z$8 = ".ycn-settings-menu__group-heading {\n font-weight: var(--
|
|
4834
|
+
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}";
|
|
4924
4835
|
styleInject(css_248z$8);
|
|
4925
4836
|
|
|
4926
4837
|
const b$8 = block('settings-menu');
|
|
@@ -4994,7 +4905,7 @@ function focusNext(container, focused, direction) {
|
|
|
4994
4905
|
return (_a = elements[currentIndex].getAttribute('data-id')) !== null && _a !== void 0 ? _a : undefined;
|
|
4995
4906
|
}
|
|
4996
4907
|
|
|
4997
|
-
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(--
|
|
4908
|
+
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}";
|
|
4998
4909
|
styleInject(css_248z$7);
|
|
4999
4910
|
|
|
5000
4911
|
const b$7 = block('settings-menu-mobile');
|
|
@@ -5146,7 +5057,7 @@ function getSettingsItemsFromChildren(children, filterRe) {
|
|
|
5146
5057
|
return { items, hidden };
|
|
5147
5058
|
}
|
|
5148
5059
|
|
|
5149
|
-
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(--
|
|
5060
|
+
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}";
|
|
5150
5061
|
styleInject(css_248z$6);
|
|
5151
5062
|
|
|
5152
5063
|
const b$6 = block('settings');
|
|
@@ -5306,7 +5217,7 @@ const useForwardRef = (ref, initialValue = null) => {
|
|
|
5306
5217
|
return targetRef;
|
|
5307
5218
|
};
|
|
5308
5219
|
|
|
5309
|
-
var css_248z$5 = ".ycn-mobile-header-burger {\n margin: 0;\n padding: 0;\n font-family: var(--
|
|
5220
|
+
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}";
|
|
5310
5221
|
styleInject(css_248z$5);
|
|
5311
5222
|
|
|
5312
5223
|
const b$5 = block('mobile-header-burger');
|
|
@@ -5315,7 +5226,7 @@ const Burger = React__default.memo(({ opened, className, onClick }) => (React__d
|
|
|
5315
5226
|
React__default.createElement("span", { className: b$5('icon-dash') })))));
|
|
5316
5227
|
Burger.displayName = 'Burger';
|
|
5317
5228
|
|
|
5318
|
-
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(--
|
|
5229
|
+
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}";
|
|
5319
5230
|
styleInject(css_248z$4);
|
|
5320
5231
|
|
|
5321
5232
|
const b$4 = block('mobile-header-logo');
|
|
@@ -5372,7 +5283,7 @@ const getSelectedItemIndex = (items) => {
|
|
|
5372
5283
|
return index === -1 ? undefined : index;
|
|
5373
5284
|
};
|
|
5374
5285
|
|
|
5375
|
-
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(--
|
|
5286
|
+
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}";
|
|
5376
5287
|
styleInject(css_248z$3);
|
|
5377
5288
|
|
|
5378
5289
|
const b$3 = block('burger-composite-bar');
|
|
@@ -5403,7 +5314,7 @@ const BurgerCompositeBar = React__default.memo(({ items, onItemClick }) => {
|
|
|
5403
5314
|
});
|
|
5404
5315
|
BurgerCompositeBar.displayName = 'BurgerCompositeBar';
|
|
5405
5316
|
|
|
5406
|
-
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(--
|
|
5317
|
+
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}";
|
|
5407
5318
|
styleInject(css_248z$2);
|
|
5408
5319
|
|
|
5409
5320
|
const b$2 = block('mobile-header-burger-menu');
|
|
@@ -5416,7 +5327,7 @@ const BurgerMenu = React__default.memo(({ items = [], renderFooter, modalItem, c
|
|
|
5416
5327
|
});
|
|
5417
5328
|
BurgerMenu.displayName = 'BurgerMenu';
|
|
5418
5329
|
|
|
5419
|
-
var css_248z$1 = ".ycn-mobile-header {\n --mobile-header-min-heigth: 50px;\n --mobile-header-icon-size: 20px;\n background-color: var(--
|
|
5330
|
+
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}";
|
|
5420
5331
|
styleInject(css_248z$1);
|
|
5421
5332
|
|
|
5422
5333
|
const b$1 = block('mobile-header');
|
|
@@ -5518,7 +5429,7 @@ const MobileHeader = React__default.forwardRef(({ logo, burgerMenu, panelItems =
|
|
|
5518
5429
|
});
|
|
5519
5430
|
MobileHeader.displayName = 'MobileHeader';
|
|
5520
5431
|
|
|
5521
|
-
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(--
|
|
5432
|
+
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}";
|
|
5522
5433
|
styleInject(css_248z);
|
|
5523
5434
|
|
|
5524
5435
|
const b = block('mobile-header-footer-item');
|
|
@@ -5537,5 +5448,21 @@ const FooterItem = ({ icon, iconSize = MOBILE_HEADER_ICON_SIZE, className, modal
|
|
|
5537
5448
|
React__default.createElement(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))));
|
|
5538
5449
|
};
|
|
5539
5450
|
|
|
5540
|
-
|
|
5451
|
+
var Lang;
|
|
5452
|
+
(function (Lang) {
|
|
5453
|
+
Lang["Ru"] = "ru";
|
|
5454
|
+
Lang["En"] = "en";
|
|
5455
|
+
})(Lang || (Lang = {}));
|
|
5456
|
+
let subs = [];
|
|
5457
|
+
const config = {
|
|
5458
|
+
lang: Lang.En,
|
|
5459
|
+
};
|
|
5460
|
+
const configure = (newConfig) => {
|
|
5461
|
+
Object.assign(config, newConfig);
|
|
5462
|
+
subs.forEach((sub) => {
|
|
5463
|
+
sub(config);
|
|
5464
|
+
});
|
|
5465
|
+
};
|
|
5466
|
+
|
|
5467
|
+
export { PublicActionBar as ActionBar, AsideHeader, Dict, Drawer, DrawerItem, FooterItem$1 as FooterItem, HotkeysPanel, Lang, MobileHeader, MobileHeaderDict, FooterItem as MobileHeaderFooterItem, Settings, Title, configure };
|
|
5541
5468
|
//# sourceMappingURL=index.js.map
|