@gravity-ui/navigation 0.8.1 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/build/cjs/components/ActionBar/__stories__/ActionBar.stories.d.ts +21 -0
  3. package/build/cjs/components/ActionBar/__stories__/ActionBarSingleSection.d.ts +2 -0
  4. package/build/cjs/components/AsideHeader/AsideHeader.d.ts +1 -0
  5. package/build/cjs/components/AsideHeader/__stories__/AsideHeader.stories.d.ts +2 -0
  6. package/build/cjs/components/AsideHeader/__stories__/AsideHeaderShowcase.d.ts +7 -2
  7. package/build/cjs/components/CompositeBar/CompositeBar.d.ts +7 -15
  8. package/build/cjs/components/CompositeBar/Item/Item.d.ts +1 -1
  9. package/build/cjs/components/CompositeBar/MultipleTooltip/MultipleTooltip.d.ts +8 -0
  10. package/build/cjs/components/CompositeBar/MultipleTooltip/MultipleTooltipContext.d.ts +24 -0
  11. package/build/cjs/components/CompositeBar/MultipleTooltip/index.d.ts +3 -0
  12. package/build/cjs/components/CompositeBar/utils.d.ts +6 -1
  13. package/build/cjs/components/index.d.ts +1 -1
  14. package/build/cjs/index.js +320 -245
  15. package/build/cjs/index.js.map +1 -1
  16. package/build/esm/components/ActionBar/__stories__/ActionBar.stories.d.ts +21 -0
  17. package/build/esm/components/ActionBar/__stories__/ActionBarSingleSection.d.ts +2 -0
  18. package/build/esm/components/AsideHeader/AsideHeader.d.ts +1 -0
  19. package/build/esm/components/AsideHeader/__stories__/AsideHeader.stories.d.ts +2 -0
  20. package/build/esm/components/AsideHeader/__stories__/AsideHeaderShowcase.d.ts +7 -2
  21. package/build/esm/components/CompositeBar/CompositeBar.d.ts +7 -15
  22. package/build/esm/components/CompositeBar/Item/Item.d.ts +1 -1
  23. package/build/esm/components/CompositeBar/MultipleTooltip/MultipleTooltip.d.ts +8 -0
  24. package/build/esm/components/CompositeBar/MultipleTooltip/MultipleTooltipContext.d.ts +24 -0
  25. package/build/esm/components/CompositeBar/MultipleTooltip/index.d.ts +3 -0
  26. package/build/esm/components/CompositeBar/utils.d.ts +6 -1
  27. package/build/esm/components/index.d.ts +1 -1
  28. package/build/esm/index.js +322 -247
  29. package/build/esm/index.js.map +1 -1
  30. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
- import React__default, { Children, isValidElement, cloneElement, createElement, PureComponent, useState, useMemo, useCallback, useEffect } from 'react';
2
+ import React__default, { Children, isValidElement, cloneElement, createElement, PureComponent, 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
- import { Xmark } from '@gravity-ui/icons';
5
+ import { Ellipsis, Xmark } from '@gravity-ui/icons';
6
6
 
7
7
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
8
8
 
@@ -61,84 +61,6 @@ function block(name) {
61
61
  return _default(`${NAMESPACE}${name}`);
62
62
  }
63
63
 
64
- function styleInject(css, ref) {
65
- if ( ref === void 0 ) ref = {};
66
- var insertAt = ref.insertAt;
67
-
68
- if (!css || typeof document === 'undefined') { return; }
69
-
70
- var head = document.head || document.getElementsByTagName('head')[0];
71
- var style = document.createElement('style');
72
- style.type = 'text/css';
73
-
74
- if (insertAt === 'top') {
75
- if (head.firstChild) {
76
- head.insertBefore(style, head.firstChild);
77
- } else {
78
- head.appendChild(style);
79
- }
80
- } else {
81
- head.appendChild(style);
82
- }
83
-
84
- if (style.styleSheet) {
85
- style.styleSheet.cssText = css;
86
- } else {
87
- style.appendChild(document.createTextNode(css));
88
- }
89
- }
90
-
91
- var css_248z$l = ".ycn-action-bar-group {\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n margin: 0;\n padding: 0;\n}\n.ycn-action-bar-group_pull_left {\n margin-left: 0;\n margin-right: auto;\n}\n.ycn-action-bar-group_pull_right {\n margin-left: auto;\n margin-right: 0;\n}\n.ycn-action-bar-group_pull_center {\n margin-left: auto;\n margin-right: auto;\n}";
92
- styleInject(css_248z$l);
93
-
94
- const b$m = block('action-bar-group');
95
- const ActionBarGroup = ({ children, className, pull }) => {
96
- return (React__default.createElement("ul", { className: b$m({ pull }, className), role: "group" }, children));
97
- };
98
- ActionBarGroup.displayName = 'ActionBar.Group';
99
-
100
- var css_248z$k = ".ycn-action-bar-item {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n.ycn-action-bar-item_pull_left {\n margin-left: 0;\n margin-right: auto;\n}\n.ycn-action-bar-item_pull_right {\n margin-left: auto;\n margin-right: 0;\n}\n.ycn-action-bar-item_pull_center {\n margin-left: auto;\n margin-right: auto;\n}\n.ycn-action-bar-item + .ycn-action-bar-item_spacing {\n margin-left: 8px;\n}";
101
- styleInject(css_248z$k);
102
-
103
- const b$l = block('action-bar-item');
104
- const ActionBarItem = ({ children, className, pull, spacing = true }) => {
105
- return React__default.createElement("li", { className: b$l({ pull, spacing }, className) }, children);
106
- };
107
- ActionBarItem.displayName = 'ActionBar.Item';
108
-
109
- var css_248z$j = ".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(--yc-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}";
110
- styleInject(css_248z$j);
111
-
112
- const b$k = block('action-bar-section');
113
- const ActionBarSection = ({ children, type = 'primary' }) => {
114
- return React__default.createElement("div", { className: b$k({ type }) }, children);
115
- };
116
- ActionBarSection.displayName = 'ActionBar.Section';
117
-
118
- var css_248z$i = ".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(--yc-color-line-generic);\n height: 40px;\n}";
119
- styleInject(css_248z$i);
120
-
121
- const b$j = block('action-bar-separator');
122
- const ActionBarSeparator = () => {
123
- return React__default.createElement("li", { role: "separator", className: b$j() });
124
- };
125
- ActionBarSeparator.displayName = 'ActionBar.Separator';
126
-
127
- var css_248z$h = ".ycn-action-bar {\n box-sizing: border-box;\n height: 40px;\n border-bottom: solid 1px var(--yc-color-line-generic);\n display: flex;\n flex-flow: row nowrap;\n justify-content: flex-start;\n align-items: stretch;\n}";
128
- styleInject(css_248z$h);
129
-
130
- const b$i = block('action-bar');
131
- const ActionBar = ({ children, className, 'aria-label': ariaLabel }) => {
132
- return (React__default.createElement("section", { className: b$i(null, className), "aria-label": ariaLabel }, children));
133
- };
134
- ActionBar.displayName = 'ActionBar';
135
- const PublicActionBar = Object.assign(ActionBar, {
136
- Section: ActionBarSection,
137
- Group: ActionBarGroup,
138
- Item: ActionBarItem,
139
- Separator: ActionBarSeparator,
140
- });
141
-
142
64
  var MobileHeaderDict;
143
65
  (function (MobileHeaderDict) {
144
66
  MobileHeaderDict["CloseBurger"] = "button_close-burger";
@@ -162,8 +84,8 @@ const defaultDict$2 = {
162
84
  [MobileHeaderDict.OpenBurger]: 'Open menu',
163
85
  };
164
86
 
165
- function _extends$4() {
166
- _extends$4 = Object.assign ? Object.assign.bind() : function (target) {
87
+ function _extends$3() {
88
+ _extends$3 = Object.assign ? Object.assign.bind() : function (target) {
167
89
  for (var i = 1; i < arguments.length; i++) {
168
90
  var source = arguments[i];
169
91
  for (var key in source) {
@@ -174,7 +96,7 @@ function _extends$4() {
174
96
  }
175
97
  return target;
176
98
  };
177
- return _extends$4.apply(this, arguments);
99
+ return _extends$3.apply(this, arguments);
178
100
  }
179
101
 
180
102
  function _objectWithoutPropertiesLoose(source, excluded) {
@@ -2327,7 +2249,7 @@ var CSSTransition = /*#__PURE__*/function (_React$Component) {
2327
2249
  _this$props.classNames;
2328
2250
  var props = _objectWithoutPropertiesLoose(_this$props, ["classNames"]);
2329
2251
 
2330
- return /*#__PURE__*/React__default.createElement(Transition, _extends$4({}, props, {
2252
+ return /*#__PURE__*/React__default.createElement(Transition, _extends$3({}, props, {
2331
2253
  onEnter: this.onEnter,
2332
2254
  onEntered: this.onEntered,
2333
2255
  onEntering: this.onEntering,
@@ -2343,7 +2265,7 @@ var CSSTransition = /*#__PURE__*/function (_React$Component) {
2343
2265
  CSSTransition.defaultProps = {
2344
2266
  classNames: ''
2345
2267
  };
2346
- CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$4({}, Transition.propTypes, {
2268
+ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$3({}, Transition.propTypes, {
2347
2269
  /**
2348
2270
  * The animation classNames applied to the component as it appears, enters,
2349
2271
  * exits or has finished the transition. A single name can be provided, which
@@ -2705,7 +2627,7 @@ var TransitionGroup = /*#__PURE__*/function (_React$Component) {
2705
2627
 
2706
2628
  if (this.mounted) {
2707
2629
  this.setState(function (state) {
2708
- var children = _extends$4({}, state.children);
2630
+ var children = _extends$3({}, state.children);
2709
2631
 
2710
2632
  delete children[child.key];
2711
2633
  return {
@@ -3181,15 +3103,42 @@ SwitchTransition.defaultProps = {
3181
3103
  mode: modes.out
3182
3104
  };
3183
3105
 
3184
- var css_248z$g = ".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(--yc-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(--yc-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}";
3185
- styleInject(css_248z$g);
3106
+ function styleInject(css, ref) {
3107
+ if ( ref === void 0 ) ref = {};
3108
+ var insertAt = ref.insertAt;
3109
+
3110
+ if (!css || typeof document === 'undefined') { return; }
3111
+
3112
+ var head = document.head || document.getElementsByTagName('head')[0];
3113
+ var style = document.createElement('style');
3114
+ style.type = 'text/css';
3186
3115
 
3187
- const b$h = block('drawer');
3116
+ if (insertAt === 'top') {
3117
+ if (head.firstChild) {
3118
+ head.insertBefore(style, head.firstChild);
3119
+ } else {
3120
+ head.appendChild(style);
3121
+ }
3122
+ } else {
3123
+ head.appendChild(style);
3124
+ }
3125
+
3126
+ if (style.styleSheet) {
3127
+ style.styleSheet.cssText = css;
3128
+ } else {
3129
+ style.appendChild(document.createTextNode(css));
3130
+ }
3131
+ }
3132
+
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(--yc-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(--yc-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
+ styleInject(css_248z$m);
3135
+
3136
+ const b$n = block('drawer');
3188
3137
  const TIMEOUT = 300;
3189
3138
  const DrawerItem = ({ visible, content, direction, className }) => {
3190
3139
  const itemRef = React__default.useRef(null);
3191
- return (React__default.createElement(CSSTransition, { in: visible, timeout: TIMEOUT, unmountOnExit: true, classNames: b$h('item-transition', { direction }), nodeRef: itemRef },
3192
- React__default.createElement("div", { ref: itemRef, className: b$h('item', { direction }, className) }, content)));
3140
+ return (React__default.createElement(CSSTransition, { in: visible, timeout: TIMEOUT, unmountOnExit: true, classNames: b$n('item-transition', { direction }), nodeRef: itemRef },
3141
+ React__default.createElement("div", { ref: itemRef, className: b$n('item', { direction }, className) }, content)));
3193
3142
  };
3194
3143
  const Drawer = ({ className, children, style, onVeilClick, onEscape, preventScrollBody = true, }) => {
3195
3144
  let someItemVisible = false;
@@ -3220,9 +3169,9 @@ const Drawer = ({ className, children, style, onVeilClick, onEscape, preventScro
3220
3169
  const veilRef = React__default.useRef(null);
3221
3170
  return (React__default.createElement(Transition, { in: someItemVisible, timeout: { enter: 0, exit: TIMEOUT }, mountOnEnter: true, unmountOnExit: true, nodeRef: containerRef }, (state) => {
3222
3171
  const childrenVisible = someItemVisible && state === 'entered';
3223
- return (React__default.createElement("div", { ref: containerRef, className: b$h(null, className), style: style },
3224
- React__default.createElement(CSSTransition, { in: childrenVisible, timeout: TIMEOUT, unmountOnExit: true, classNames: b$h('veil-transition'), nodeRef: veilRef },
3225
- React__default.createElement("div", { ref: veilRef, className: b$h('veil'), onClick: onVeilClick })),
3172
+ return (React__default.createElement("div", { ref: containerRef, className: b$n(null, className), style: style },
3173
+ React__default.createElement(CSSTransition, { in: childrenVisible, timeout: TIMEOUT, unmountOnExit: true, classNames: b$n('veil-transition'), nodeRef: veilRef },
3174
+ React__default.createElement("div", { ref: veilRef, className: b$n('veil'), onClick: onVeilClick })),
3226
3175
  React__default.Children.map(children, (child) => {
3227
3176
  const childElem = child;
3228
3177
  if (childElem.type === DrawerItem) {
@@ -3234,10 +3183,10 @@ const Drawer = ({ className, children, style, onVeilClick, onEscape, preventScro
3234
3183
  }));
3235
3184
  };
3236
3185
 
3237
- var css_248z$f = ".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(--yc-text-body-2-font-size);\n line-height: var(--yc-text-body-2-line-height);\n font-weight: var(--yc-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}";
3238
- styleInject(css_248z$f);
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(--yc-text-body-2-font-size);\n line-height: var(--yc-text-body-2-line-height);\n font-weight: var(--yc-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
+ styleInject(css_248z$l);
3239
3188
 
3240
- const b$g = block('logo');
3189
+ const b$m = block('logo');
3241
3190
  const Logo$1 = ({ text, compact, icon, iconSrc, iconClassName, iconSize = 24, textSize = 15, href = '/', wrapper, onClick, }) => {
3242
3191
  const hasClickHandler = typeof onClick === 'function';
3243
3192
  const hasWrapper = typeof wrapper === 'function';
@@ -3255,18 +3204,18 @@ const Logo$1 = ({ text, compact, icon, iconSrc, iconClassName, iconSize = 24, te
3255
3204
  else if (icon) {
3256
3205
  buttonIcon = React__default.createElement(Icon, { data: icon, size: iconSize, className: iconClassName });
3257
3206
  }
3258
- const button = (React__default.createElement(Button, Object.assign({ view: "flat", size: "l", className: b$g('btn-logo'), component: hasWrapper ? 'span' : undefined, onClick: onClick }, linkProps), buttonIcon));
3207
+ const button = (React__default.createElement(Button, Object.assign({ view: "flat", size: "l", className: b$m('btn-logo'), component: hasWrapper ? 'span' : undefined, onClick: onClick }, linkProps), buttonIcon));
3259
3208
  let logo;
3260
3209
  if (typeof text === 'function') {
3261
3210
  logo = text();
3262
3211
  }
3263
3212
  else {
3264
- logo = (React__default.createElement("div", { className: b$g('logo'), style: { fontSize: textSize } }, text));
3213
+ logo = (React__default.createElement("div", { className: b$m('logo'), style: { fontSize: textSize } }, text));
3265
3214
  }
3266
- return (React__default.createElement("div", { className: b$g() },
3267
- React__default.createElement("div", { className: b$g('logo-btn-place') }, hasWrapper ? wrapper(button, compact) : button),
3215
+ return (React__default.createElement("div", { className: b$m() },
3216
+ React__default.createElement("div", { className: b$m('logo-btn-place') }, hasWrapper ? wrapper(button, compact) : button),
3268
3217
  !compact &&
3269
- (hasWrapper ? (React__default.createElement("div", { onClick: onClick }, wrapper(logo, compact))) : (React__default.createElement("a", Object.assign({}, linkProps, { className: b$g('logo-link'), onClick: onClick }), logo)))));
3218
+ (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)))));
3270
3219
  };
3271
3220
 
3272
3221
  var classCallCheck = function (instance, Constructor) {
@@ -3293,7 +3242,7 @@ var createClass = function () {
3293
3242
  };
3294
3243
  }();
3295
3244
 
3296
- var _extends$3 = Object.assign || function (target) {
3245
+ var _extends$2 = Object.assign || function (target) {
3297
3246
  for (var i = 1; i < arguments.length; i++) {
3298
3247
  var source = arguments[i];
3299
3248
 
@@ -3736,7 +3685,7 @@ var AutoSizer = function (_React$PureComponent) {
3736
3685
  {
3737
3686
  className: className,
3738
3687
  ref: this._setRef,
3739
- style: _extends$3({}, outerStyle, style)
3688
+ style: _extends$2({}, outerStyle, style)
3740
3689
  },
3741
3690
  !bailoutOnChildren && children(childParams)
3742
3691
  );
@@ -3797,17 +3746,66 @@ function getItemsMinHeight(items) {
3797
3746
  getItemsHeight(afterMoreButtonItems) +
3798
3747
  (pinnedItems.length === items.length ? 0 : ITEM_HEIGHT));
3799
3748
  }
3749
+ function getMoreButtonItem(dict) {
3750
+ var _a;
3751
+ const title = (_a = dict === null || dict === void 0 ? void 0 : dict[Dict.MoreButton]) !== null && _a !== void 0 ? _a : defaultDict$2[Dict.MoreButton];
3752
+ return {
3753
+ id: COLLAPSE_ITEM_ID,
3754
+ title,
3755
+ icon: Ellipsis,
3756
+ iconSize: 18,
3757
+ };
3758
+ }
3759
+ function getAutosizeListItems(items, height, collapseItem) {
3760
+ var _a, _b, _c;
3761
+ const afterMoreButtonItems = items.filter((item) => item.afterMoreButton);
3762
+ const regularItems = items.filter((item) => !item.afterMoreButton);
3763
+ const listItems = [...regularItems, ...afterMoreButtonItems];
3764
+ const allItemsHeight = getItemsHeight(listItems);
3765
+ if (allItemsHeight <= height) {
3766
+ return { listItems, collapseItems: [] };
3767
+ }
3768
+ const collapseItemHeight = getItemHeight$1(collapseItem);
3769
+ listItems.splice(regularItems.length, 0, collapseItem);
3770
+ const collapseItems = [];
3771
+ let listHeight = allItemsHeight + collapseItemHeight;
3772
+ let index = listItems.length;
3773
+ while (listHeight > height) {
3774
+ if (index === 0) {
3775
+ break;
3776
+ }
3777
+ index--;
3778
+ const item = listItems[index];
3779
+ if (item.pinned || item.id === COLLAPSE_ITEM_ID || item.afterMoreButton) {
3780
+ continue;
3781
+ }
3782
+ if (item.type === 'divider') {
3783
+ if (index + 1 < listItems.length && ((_a = listItems[index + 1]) === null || _a === void 0 ? void 0 : _a.type) === 'divider') {
3784
+ listHeight -= getItemHeight$1(item);
3785
+ listItems.splice(index, 1);
3786
+ }
3787
+ continue;
3788
+ }
3789
+ listHeight -= getItemHeight$1(item);
3790
+ collapseItems.unshift(...listItems.splice(index, 1));
3791
+ }
3792
+ if (((_b = listItems[index]) === null || _b === void 0 ? void 0 : _b.type) === 'divider' &&
3793
+ (index === 0 || ((_c = listItems[index - 1]) === null || _c === void 0 ? void 0 : _c.type) === 'divider')) {
3794
+ listItems.splice(index, 1);
3795
+ }
3796
+ return { listItems, collapseItems };
3797
+ }
3800
3798
 
3801
- var css_248z$e = ".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(--yc-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(--yc-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(--yc-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(--yc-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(--yc-color-base-float-hover);\n}\n.ycn-composite-bar-item_type_action:active {\n box-shadow: 0 1px 2px var(--yc-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(--yc-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(--yc-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(--yc-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(--yc-color-base-simple-hover);\n}";
3802
- styleInject(css_248z$e);
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(--yc-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(--yc-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(--yc-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(--yc-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(--yc-color-base-float-hover);\n}\n.ycn-composite-bar-item_type_action:active {\n box-shadow: 0 1px 2px var(--yc-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(--yc-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(--yc-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(--yc-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(--yc-color-base-simple-hover);\n}";
3800
+ styleInject(css_248z$k);
3803
3801
 
3804
- const b$f = block('composite-bar-item');
3802
+ const b$l = block('composite-bar-item');
3805
3803
  function renderItemTitle(item) {
3806
- let titleNode = React__default.createElement("div", { className: b$f('title-text') }, item.title);
3804
+ let titleNode = React__default.createElement("div", { className: b$l('title-text') }, item.title);
3807
3805
  if (item.rightAdornment) {
3808
3806
  titleNode = (React__default.createElement(React__default.Fragment, null,
3809
3807
  titleNode,
3810
- React__default.createElement("div", { className: b$f('title-adornment') }, item.rightAdornment)));
3808
+ React__default.createElement("div", { className: b$l('title-adornment') }, item.rightAdornment)));
3811
3809
  }
3812
3810
  return titleNode;
3813
3811
  }
@@ -3816,7 +3814,7 @@ const defaultPopupOffset = [-20, 8];
3816
3814
  const Item$1 = (props) => {
3817
3815
  const { item, compact, className, collapseItems, onMouseLeave, onMouseEnter, enableTooltip = true, popupVisible = false, popupAnchor, popupPlacement = defaultPopupPlacement, popupOffset = defaultPopupOffset, popupKeepMounted, renderPopupContent, onClosePopup, onItemClick, } = props;
3818
3816
  if (item.type === 'divider') {
3819
- return React__default.createElement("div", { className: b$f('menu-divider') });
3817
+ return React__default.createElement("div", { className: b$l('menu-divider') });
3820
3818
  }
3821
3819
  const [open, toggleOpen] = React__default.useState(false);
3822
3820
  const ref = React__default.useRef(null);
@@ -3837,7 +3835,7 @@ const Item$1 = (props) => {
3837
3835
  onClosePopup === null || onClosePopup === void 0 ? void 0 : onClosePopup();
3838
3836
  }, [onClosePopup]);
3839
3837
  const makeNode = ({ icon: iconEl, title: titleEl }) => {
3840
- const createdNode = (React__default.createElement("div", { className: b$f({ type, current, compact }, className), ref: ref, onClick: () => {
3838
+ const createdNode = (React__default.createElement("div", { className: b$l({ type, current, compact }, className), ref: ref, onClick: (event) => {
3841
3839
  if (collapsedItem) {
3842
3840
  /**
3843
3841
  * If we call onItemClick for collapsedItem then:
@@ -3847,7 +3845,7 @@ const Item$1 = (props) => {
3847
3845
  toggleOpen(!open);
3848
3846
  }
3849
3847
  else {
3850
- onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(item, false);
3848
+ onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(item, false, event);
3851
3849
  }
3852
3850
  }, onMouseEnter: () => {
3853
3851
  if (!compact) {
@@ -3858,13 +3856,13 @@ const Item$1 = (props) => {
3858
3856
  onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave();
3859
3857
  }
3860
3858
  } },
3861
- React__default.createElement("div", { className: b$f('icon-place') }, compact ? (React__default.createElement(Tooltip, { content: tooltipText, disabled: !enableTooltip || (collapsedItem && open), placement: "right", className: b$f('icon-tooltip', { 'item-type': type }) },
3862
- React__default.createElement("div", { onMouseEnter: () => onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(), onMouseLeave: () => onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(), className: b$f('btn-icon') }, iconEl))) : (iconEl)),
3863
- React__default.createElement("div", { className: b$f('title'), title: typeof item.title === 'string' ? item.title : undefined }, titleEl),
3864
- renderPopupContent && Boolean(anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current) && (React__default.createElement(Popup, { className: b$f('popup'), open: popupVisible, keepMounted: popupKeepMounted, placement: popupPlacement, offset: popupOffset, anchorRef: anchorRef, onClose: onClose }, renderPopupContent()))));
3865
- return item.link ? (React__default.createElement("a", { href: item.link, className: b$f('link') }, createdNode)) : (createdNode);
3859
+ 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
+ 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
+ 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, { className: b$l('popup'), open: popupVisible, keepMounted: popupKeepMounted, placement: popupPlacement, offset: popupOffset, anchorRef: anchorRef, onClose: onClose }, renderPopupContent()))));
3863
+ return item.link ? (React__default.createElement("a", { href: item.link, className: b$l('link') }, createdNode)) : (createdNode);
3866
3864
  };
3867
- const iconNode = icon ? React__default.createElement(Icon, { data: icon, size: iconSize, className: b$f('icon') }) : null;
3865
+ const iconNode = icon ? React__default.createElement(Icon, { data: icon, size: iconSize, className: b$l('icon') }) : null;
3868
3866
  const titleNode = renderItemTitle(item);
3869
3867
  const params = { icon: iconNode, title: titleNode };
3870
3868
  let node;
@@ -3882,13 +3880,13 @@ const Item$1 = (props) => {
3882
3880
  Item$1.displayName = 'Item';
3883
3881
  function CollapsedPopup({ compact, onItemClick, collapseItems, anchorRef, onClose, }) {
3884
3882
  return (collapseItems === null || collapseItems === void 0 ? void 0 : collapseItems.length) ? (React__default.createElement(Popup, { placement: POPUP_PLACEMENT, open: true, anchorRef: anchorRef, onClose: onClose },
3885
- React__default.createElement("div", { className: b$f('collapse-items-popup-content') },
3886
- React__default.createElement(List, { itemClassName: b$f('root-collapse-item'), items: collapseItems, selectedItemIndex: getSelectedItemIndex$1(collapseItems), itemHeight: POPUP_ITEM_HEIGHT, itemsHeight: collapseItems.length * POPUP_ITEM_HEIGHT, virtualized: false, filterable: false, sortable: false, renderItem: (collapseItem) => {
3883
+ React__default.createElement("div", { className: b$l('collapse-items-popup-content') },
3884
+ React__default.createElement(List, { itemClassName: b$l('root-collapse-item'), items: collapseItems, selectedItemIndex: getSelectedItemIndex$1(collapseItems), itemHeight: POPUP_ITEM_HEIGHT, itemsHeight: collapseItems.length * POPUP_ITEM_HEIGHT, virtualized: false, filterable: false, sortable: false, renderItem: (collapseItem) => {
3887
3885
  const makeCollapseNode = ({ title: titleEl }) => {
3888
- const res = (React__default.createElement("div", { className: b$f('collapse-item'), onClick: () => {
3889
- onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(collapseItem, true);
3886
+ const res = (React__default.createElement("div", { className: b$l('collapse-item'), onClick: (event) => {
3887
+ onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(collapseItem, true, event);
3890
3888
  } }, titleEl));
3891
- return collapseItem.link ? (React__default.createElement("a", { href: collapseItem.link, className: b$f('link') }, res)) : (res);
3889
+ return collapseItem.link ? (React__default.createElement("a", { href: collapseItem.link, className: b$l('link') }, res)) : (res);
3892
3890
  };
3893
3891
  const titleNode = renderItemTitle(collapseItem);
3894
3892
  const params = { title: titleNode };
@@ -3902,123 +3900,149 @@ function CollapsedPopup({ compact, onItemClick, collapseItems, anchorRef, onClos
3902
3900
  } })))) : null;
3903
3901
  }
3904
3902
 
3905
- var _path$2;
3906
- function _extends$2() { _extends$2 = 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$2.apply(this, arguments); }
3907
- var SvgDots = function SvgDots(props) {
3908
- return /*#__PURE__*/React.createElement("svg", _extends$2({
3909
- xmlns: "http://www.w3.org/2000/svg",
3910
- viewBox: "0 0 16 16",
3911
- width: 16,
3912
- height: 16
3913
- }, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
3914
- d: "M14 6.125a1.874 1.874 0 1 1 .001 3.749A1.874 1.874 0 0 1 14 6.125zm-5.906 0a1.874 1.874 0 1 1 0 3.749 1.874 1.874 0 0 1 0-3.749zM2 6.125a1.874 1.874 0 1 1 .001 3.749A1.874 1.874 0 0 1 2 6.125z",
3915
- fill: "currentColor",
3916
- fillRule: "evenodd"
3917
- })));
3918
- };
3919
- var dotsIcon = SvgDots;
3920
-
3921
- var css_248z$d = ".ycn-composite-bar {\n flex: 1 0 auto;\n width: 100%;\n min-height: 40px;\n}\n.ycn-composite-bar .ycn-composite-bar__root-menu-item[class] {\n background-color: transparent;\n}";
3922
- styleInject(css_248z$d);
3903
+ var css_248z$j = ".ycn-composite-bar {\n flex: 1 0 auto;\n width: 100%;\n min-height: 40px;\n}\n.ycn-composite-bar .ycn-composite-bar__root-menu-item[class] {\n background-color: transparent;\n}";
3904
+ styleInject(css_248z$j);
3923
3905
 
3924
- const b$e = block('composite-bar');
3925
- class CompositeBar extends React__default.Component {
3906
+ const multipleTooltipContextDefaults = {
3907
+ active: false,
3908
+ activeIndex: undefined,
3909
+ hideCollapseItemTooltip: false,
3910
+ lastClickedItemIndex: undefined,
3911
+ setValue: () => { },
3912
+ };
3913
+ const MultipleTooltipContext = React__default.createContext(multipleTooltipContextDefaults);
3914
+ class MultipleTooltipProvider extends React__default.PureComponent {
3926
3915
  constructor() {
3927
3916
  super(...arguments);
3928
- this.state = {
3929
- activeItemIndex: undefined,
3917
+ this.state = Object.assign({}, multipleTooltipContextDefaults);
3918
+ this.setValue = (value) => {
3919
+ this.setState(Object.assign({}, value));
3930
3920
  };
3931
- this.listRef = React__default.createRef();
3932
3921
  }
3933
3922
  render() {
3934
- const { enableCollapsing, items } = this.props;
3935
- if (items.length === 0) {
3936
- return null;
3937
- }
3938
- if (!enableCollapsing) {
3939
- return React__default.createElement("div", { className: b$e() }, this.renderMenu());
3940
- }
3941
- const minHeight = getItemsMinHeight(items);
3942
- return (React__default.createElement("div", { className: b$e({ autosizer: true }), style: { minHeight } }, items.length !== 0 && (React__default.createElement(AutoSizer, null, ({ width, height }) => {
3943
- const style = {
3944
- width,
3945
- height,
3946
- };
3947
- return React__default.createElement("div", { style: style }, this.renderAutosizeMenu(height));
3948
- }))));
3949
- }
3950
- renderAutosizeMenu(height) {
3951
- const { compact, onItemClick } = this.props;
3952
- const { listItems, collapseItems } = this.getAutosizeListItems(height);
3953
- return (React__default.createElement(List, { ref: this.listRef, items: listItems, selectedItemIndex: getSelectedItemIndex$1(listItems), itemHeight: getItemHeight$1, itemClassName: b$e('root-menu-item'), itemsHeight: getItemsHeight, virtualized: false, filterable: false, sortable: false, renderItem: (item) => (React__default.createElement(Item$1, { item: item, onMouseLeave: () => {
3954
- var _a;
3955
- if (compact) {
3956
- (_a = this.listRef.current) === null || _a === void 0 ? void 0 : _a.activateItem(undefined);
3957
- }
3958
- }, compact: compact, collapseItems: collapseItems, onItemClick: onItemClick })) }));
3923
+ const { children } = this.props;
3924
+ return (React__default.createElement(MultipleTooltipContext.Provider, { value: Object.assign(Object.assign({}, this.state), { setValue: this.setValue }) }, children));
3959
3925
  }
3960
- renderMenu() {
3961
- const { items, onItemClick, compact } = this.props;
3962
- return (React__default.createElement(List, { ref: this.listRef, items: items, selectedItemIndex: getSelectedItemIndex$1(items), itemHeight: getItemHeight$1, itemClassName: b$e('root-menu-item'), itemsHeight: getItemsHeight, virtualized: false, filterable: false, sortable: false, renderItem: (item) => (React__default.createElement(Item$1, { item: item, onMouseLeave: () => {
3963
- var _a;
3964
- if (compact) {
3965
- (_a = this.listRef.current) === null || _a === void 0 ? void 0 : _a.activateItem(undefined);
3966
- }
3967
- }, compact: compact, onItemClick: onItemClick })) }));
3968
- }
3969
- getMoreButtonItem() {
3970
- var _a;
3971
- const { dict } = this.props;
3972
- const title = (_a = dict === null || dict === void 0 ? void 0 : dict[Dict.MoreButton]) !== null && _a !== void 0 ? _a : defaultDict$2[Dict.MoreButton];
3973
- return {
3974
- id: COLLAPSE_ITEM_ID,
3975
- title,
3976
- icon: dotsIcon,
3977
- iconSize: 16,
3978
- };
3979
- }
3980
- getAutosizeListItems(height) {
3981
- var _a, _b, _c;
3982
- const { items } = this.props;
3983
- const afterMoreButtonItems = items.filter((item) => item.afterMoreButton);
3984
- const regularItems = items.filter((item) => !item.afterMoreButton);
3985
- const listItems = [...regularItems, ...afterMoreButtonItems];
3986
- const allItemsHeight = getItemsHeight(listItems);
3987
- if (allItemsHeight <= height) {
3988
- return { listItems, collapseItems: [] };
3926
+ }
3927
+
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(--yc-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(--yc-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(--yc-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
+ styleInject(css_248z$i);
3930
+
3931
+ const b$k = block('multiple-tooltip');
3932
+ const POPUP_OFFSET = [-32, 4];
3933
+ const POPUP_MODIFIERS = [
3934
+ {
3935
+ name: 'preventOverflow',
3936
+ enabled: false,
3937
+ },
3938
+ ];
3939
+ const MultipleTooltip = ({ items, open, anchorRef, placement, }) => {
3940
+ const { activeIndex, hideCollapseItemTooltip } = React__default.useContext(MultipleTooltipContext);
3941
+ const activeItem = activeIndex === undefined ? null : items[activeIndex];
3942
+ return (React__default.createElement(Popup, { open: open, anchorRef: anchorRef, placement: placement, offset: POPUP_OFFSET, className: b$k(null), modifiers: POPUP_MODIFIERS },
3943
+ React__default.createElement("div", { className: b$k('items-container') }, items
3944
+ .filter(({ type = 'regular', id }) => !hideCollapseItemTooltip ||
3945
+ (id !== COLLAPSE_ITEM_ID && type !== 'action'))
3946
+ .map((item, idx) => {
3947
+ switch (item.type) {
3948
+ case 'divider':
3949
+ return (React__default.createElement("div", { className: b$k('item', { divider: true }), key: idx }, item.title));
3950
+ default:
3951
+ return (React__default.createElement("div", { className: b$k('item', {
3952
+ active: item === activeItem,
3953
+ }), key: idx }, item.title));
3954
+ }
3955
+ }))));
3956
+ };
3957
+
3958
+ const b$j = block('composite-bar');
3959
+ const CompositeBarView = ({ items, compact, onItemClick, collapseItems, multipleTooltip = true, }) => {
3960
+ const ref = useRef(null);
3961
+ const tooltipRef = useRef(null);
3962
+ const { setValue: setMultipleTooltipContextValue, active: multipleTooltipActive, activeIndex, lastClickedItemIndex, } = useContext(MultipleTooltipContext);
3963
+ const onTooltipMouseEnter = useCallback((e) => {
3964
+ if (!multipleTooltipActive &&
3965
+ activeIndex !== lastClickedItemIndex &&
3966
+ e.clientX <= ASIDE_HEADER_COMPACT_WIDTH) {
3967
+ setMultipleTooltipContextValue === null || setMultipleTooltipContextValue === void 0 ? void 0 : setMultipleTooltipContextValue({
3968
+ active: true,
3969
+ });
3970
+ }
3971
+ }, [multipleTooltipActive, activeIndex, lastClickedItemIndex, setMultipleTooltipContextValue]);
3972
+ const onTooltipMouseLeave = useCallback(() => {
3973
+ if (multipleTooltipActive) {
3974
+ setMultipleTooltipContextValue === null || setMultipleTooltipContextValue === void 0 ? void 0 : setMultipleTooltipContextValue({
3975
+ active: false,
3976
+ lastClickedItemIndex: undefined,
3977
+ });
3989
3978
  }
3990
- const collapseItem = this.getMoreButtonItem();
3991
- const collapseItemHeight = getItemHeight$1(collapseItem);
3992
- listItems.splice(regularItems.length, 0, collapseItem);
3993
- const collapseItems = [];
3994
- let listHeight = allItemsHeight + collapseItemHeight;
3995
- let index = listItems.length;
3996
- while (listHeight > height) {
3997
- if (index === 0) {
3998
- break;
3979
+ }, [multipleTooltipActive, setMultipleTooltipContextValue]);
3980
+ const onMouseEnterByIndex = useCallback((itemIndex) => () => {
3981
+ if (multipleTooltip) {
3982
+ let multipleTooltipActiveValue = multipleTooltipActive;
3983
+ if (!multipleTooltipActive && itemIndex !== lastClickedItemIndex) {
3984
+ multipleTooltipActiveValue = true;
3999
3985
  }
4000
- index--;
4001
- const item = listItems[index];
4002
- if (item.pinned || item.id === COLLAPSE_ITEM_ID || item.afterMoreButton) {
4003
- continue;
3986
+ if (activeIndex === itemIndex &&
3987
+ multipleTooltipActive === multipleTooltipActiveValue) {
3988
+ return;
4004
3989
  }
4005
- if (item.type === 'divider') {
4006
- if (index + 1 < listItems.length && ((_a = listItems[index + 1]) === null || _a === void 0 ? void 0 : _a.type) === 'divider') {
4007
- listHeight -= getItemHeight$1(item);
4008
- listItems.splice(index, 1);
4009
- }
4010
- continue;
3990
+ setMultipleTooltipContextValue({
3991
+ activeIndex: itemIndex,
3992
+ active: multipleTooltipActiveValue,
3993
+ });
3994
+ }
3995
+ }, [multipleTooltipActive, activeIndex, lastClickedItemIndex, setMultipleTooltipContextValue]);
3996
+ const onMouseLeave = useCallback(() => {
3997
+ var _a;
3998
+ if (compact) {
3999
+ (_a = ref.current) === null || _a === void 0 ? void 0 : _a.activateItem(undefined);
4000
+ if (multipleTooltip &&
4001
+ (activeIndex !== undefined || lastClickedItemIndex !== undefined)) {
4002
+ setMultipleTooltipContextValue({
4003
+ activeIndex: undefined,
4004
+ lastClickedItemIndex: undefined,
4005
+ });
4011
4006
  }
4012
- listHeight -= getItemHeight$1(item);
4013
- collapseItems.unshift(...listItems.splice(index, 1));
4014
4007
  }
4015
- if (((_b = listItems[index]) === null || _b === void 0 ? void 0 : _b.type) === 'divider' &&
4016
- (index === 0 || ((_c = listItems[index - 1]) === null || _c === void 0 ? void 0 : _c.type) === 'divider')) {
4017
- listItems.splice(index, 1);
4008
+ }, [activeIndex, lastClickedItemIndex, setMultipleTooltipContextValue]);
4009
+ const onItemClickByIndex = useCallback((itemIndex) => (item, collapsed) => {
4010
+ if (compact &&
4011
+ multipleTooltip &&
4012
+ itemIndex !== lastClickedItemIndex &&
4013
+ item.id !== COLLAPSE_ITEM_ID) {
4014
+ setMultipleTooltipContextValue({
4015
+ lastClickedItemIndex: itemIndex,
4016
+ active: false,
4017
+ });
4018
4018
  }
4019
- return { listItems, collapseItems };
4019
+ onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(item, collapsed);
4020
+ }, [lastClickedItemIndex, setMultipleTooltipContextValue]);
4021
+ return (React__default.createElement(React__default.Fragment, null,
4022
+ 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 })) })),
4024
+ React__default.createElement(MultipleTooltip, { open: compact && multipleTooltip && multipleTooltipActive, anchorRef: tooltipRef, placement: ['right-start'], items: items })));
4025
+ };
4026
+ const CompositeBar = ({ items, compact, enableCollapsing, dict, onItemClick, multipleTooltip = false, }) => {
4027
+ if (items.length === 0) {
4028
+ return null;
4020
4029
  }
4021
- }
4030
+ let node = null;
4031
+ if (enableCollapsing) {
4032
+ const minHeight = getItemsMinHeight(items);
4033
+ const collapseItem = getMoreButtonItem(dict);
4034
+ node = (React__default.createElement("div", { className: b$j({ autosizer: true }), style: { minHeight } }, items.length !== 0 && (React__default.createElement(AutoSizer, null, ({ width, height }) => {
4035
+ const { listItems, collapseItems } = getAutosizeListItems(items, height, collapseItem);
4036
+ return (React__default.createElement("div", { style: { width, height } },
4037
+ React__default.createElement(CompositeBarView, { items: listItems, compact: compact, onItemClick: onItemClick, collapseItems: collapseItems, multipleTooltip: multipleTooltip })));
4038
+ }))));
4039
+ }
4040
+ else {
4041
+ node = (React__default.createElement("div", { className: b$j() },
4042
+ React__default.createElement(CompositeBarView, { items: items, compact: compact, onItemClick: onItemClick, multipleTooltip: multipleTooltip })));
4043
+ }
4044
+ return React__default.createElement(MultipleTooltipProvider, null, node);
4045
+ };
4022
4046
 
4023
4047
  /* Used by renderContent AsideHeader prop */
4024
4048
  const RenderContent = React__default.memo(({ renderContent, size }) => {
@@ -4059,37 +4083,37 @@ var SvgDividerCollapsed = function SvgDividerCollapsed(props) {
4059
4083
  };
4060
4084
  var headerDividerCollapsedIcon = SvgDividerCollapsed;
4061
4085
 
4062
- var css_248z$c = ".yc-root {\n --aside-header-background-color: var(--yc-color-base-info);\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(--yc-color-line-generic);\n}\n\n.yc-root_theme_dark,\n.yc-root_theme_dark-hc {\n --aside-header-divider-line-color: var(--yc-color-line-solid);\n --aside-header-header-divider-line-color: var(--yc-color-line-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(--yc-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(--yc-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: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(--yc-color-text-secondary);\n}\n.ycn-aside-header__collapse-button:hover .ycn-aside-header__collapse-icon {\n color: var(--yc-color-text-primary);\n}";
4063
- styleInject(css_248z$c);
4086
+ var css_248z$h = ".yc-root {\n --aside-header-background-color: var(--yc-color-base-info);\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(--yc-color-line-generic);\n}\n\n.yc-root_theme_dark,\n.yc-root_theme_dark-hc {\n --aside-header-divider-line-color: var(--yc-color-line-solid);\n --aside-header-header-divider-line-color: var(--yc-color-line-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(--yc-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(--yc-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: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(--yc-color-text-secondary);\n}\n.ycn-aside-header__collapse-button:hover .ycn-aside-header__collapse-icon {\n color: var(--yc-color-text-primary);\n}";
4087
+ styleInject(css_248z$h);
4064
4088
 
4065
- const b$d = block('aside-header');
4089
+ const b$i = block('aside-header');
4066
4090
  class AsideHeader extends React__default.Component {
4067
4091
  constructor() {
4068
4092
  super(...arguments);
4069
4093
  this.asideRef = React__default.createRef();
4070
4094
  this.renderFirstPane = (size) => {
4071
- const { dict, menuItems, panelItems, compact, headerDecoration } = this.props;
4095
+ const { dict, menuItems, panelItems, compact, headerDecoration, multipleTooltip } = this.props;
4072
4096
  return (React__default.createElement(React__default.Fragment, null,
4073
- React__default.createElement("div", { className: b$d('aside'), style: { width: size } },
4074
- React__default.createElement("div", { className: b$d('aside-popup-anchor'), ref: this.asideRef }),
4075
- React__default.createElement("div", { className: b$d('aside-content', { ['with-decoration']: headerDecoration }) },
4097
+ React__default.createElement("div", { className: b$i('aside'), style: { width: size } },
4098
+ React__default.createElement("div", { className: b$i('aside-popup-anchor'), ref: this.asideRef }),
4099
+ React__default.createElement("div", { className: b$i('aside-content', { ['with-decoration']: headerDecoration }) },
4076
4100
  this.renderHeader(),
4077
- (menuItems === null || menuItems === void 0 ? void 0 : menuItems.length) ? (React__default.createElement(CompositeBar, { items: menuItems, compact: compact, enableCollapsing: true, dict: dict, onItemClick: this.onItemClick })) : (React__default.createElement("div", { className: b$d('menu-items') })),
4101
+ (menuItems === null || menuItems === void 0 ? void 0 : menuItems.length) ? (React__default.createElement(CompositeBar, { items: menuItems, compact: compact, enableCollapsing: true, dict: dict, onItemClick: this.onItemClick, multipleTooltip: multipleTooltip })) : (React__default.createElement("div", { className: b$i('menu-items') })),
4078
4102
  this.renderFooter(size),
4079
4103
  this.renderCollapseButton())),
4080
4104
  panelItems && this.renderPanels(size)));
4081
4105
  };
4082
4106
  this.renderSecondPane = (size) => {
4083
- return (React__default.createElement(Content, { size: size, renderContent: this.props.renderContent, className: b$d('content') }));
4107
+ return (React__default.createElement(Content, { size: size, renderContent: this.props.renderContent, className: b$i('content') }));
4084
4108
  };
4085
4109
  this.renderLogo = () => (React__default.createElement(Logo$1, Object.assign({}, this.props.logo, { compact: this.props.compact, onClick: this.onLogoClick })));
4086
- this.renderHeader = () => (React__default.createElement("div", { className: b$d('header', { ['with-decoration']: this.props.headerDecoration }) },
4110
+ this.renderHeader = () => (React__default.createElement("div", { className: b$i('header', { ['with-decoration']: this.props.headerDecoration }) },
4087
4111
  this.renderLogo(),
4088
4112
  React__default.createElement(CompositeBar, { items: this.props.subheaderItems, compact: this.props.compact, enableCollapsing: false, onItemClick: this.onItemClick }),
4089
- React__default.createElement(Icon, { data: headerDividerCollapsedIcon, className: b$d('header-divider'), width: ASIDE_HEADER_COMPACT_WIDTH, height: "29" })));
4113
+ React__default.createElement(Icon, { data: headerDividerCollapsedIcon, className: b$i('header-divider'), width: ASIDE_HEADER_COMPACT_WIDTH, height: "29" })));
4090
4114
  this.renderFooter = (size) => {
4091
4115
  const { compact, renderFooter } = this.props;
4092
- return (React__default.createElement("div", { className: b$d('footer') }, renderFooter === null || renderFooter === void 0 ? void 0 : renderFooter({
4116
+ return (React__default.createElement("div", { className: b$i('footer') }, renderFooter === null || renderFooter === void 0 ? void 0 : renderFooter({
4093
4117
  size,
4094
4118
  compact,
4095
4119
  asideRef: this.asideRef,
@@ -4097,14 +4121,14 @@ class AsideHeader extends React__default.Component {
4097
4121
  };
4098
4122
  this.renderPanels = (size) => {
4099
4123
  const { panelItems } = this.props;
4100
- return (React__default.createElement(Drawer, { className: b$d('panels'), onVeilClick: this.onCloseDrawer, onEscape: this.onCloseDrawer, style: { left: size } }, panelItems.map((item) => (React__default.createElement(DrawerItem, Object.assign({ key: item.id }, item))))));
4124
+ return (React__default.createElement(Drawer, { className: b$i('panels'), onVeilClick: this.onCloseDrawer, onEscape: this.onCloseDrawer, style: { left: size } }, panelItems.map((item) => (React__default.createElement(DrawerItem, Object.assign({ key: item.id }, item))))));
4101
4125
  };
4102
4126
  this.renderCollapseButton = () => {
4103
4127
  var _a;
4104
4128
  const { compact, dict } = this.props;
4105
4129
  const typeButton = compact ? Dict.ExpandButton : Dict.CollapseButton;
4106
- return (React__default.createElement(Button, { className: b$d('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] },
4107
- React__default.createElement(Icon, { data: controlMenuButtonIcon, className: b$d('collapse-icon'), width: "16", height: "10" })));
4130
+ 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(Icon, { data: controlMenuButtonIcon, className: b$i('collapse-icon'), width: "16", height: "10" })));
4108
4132
  };
4109
4133
  this.onCollapseButtonClick = () => {
4110
4134
  var _a, _b;
@@ -4128,8 +4152,8 @@ class AsideHeader extends React__default.Component {
4128
4152
  render() {
4129
4153
  const { className, compact } = this.props;
4130
4154
  const size = compact ? ASIDE_HEADER_COMPACT_WIDTH : ASIDE_HEADER_EXPANDED_WIDTH;
4131
- return (React__default.createElement("div", { className: b$d({ compact }, className) },
4132
- React__default.createElement("div", { className: b$d('pane-container') },
4155
+ return (React__default.createElement("div", { className: b$i({ compact }, className) },
4156
+ React__default.createElement("div", { className: b$i('pane-container') },
4133
4157
  this.renderFirstPane(size),
4134
4158
  this.renderSecondPane(size))));
4135
4159
  }
@@ -4168,14 +4192,65 @@ function __rest(s, e) {
4168
4192
  return t;
4169
4193
  }
4170
4194
 
4171
- var css_248z$b = ".ycn-footer-item {\n width: 100%;\n height: 40px;\n}";
4172
- styleInject(css_248z$b);
4195
+ var css_248z$g = ".ycn-footer-item {\n width: 100%;\n height: 40px;\n}";
4196
+ styleInject(css_248z$g);
4173
4197
 
4174
- const b$c = block('footer-item');
4198
+ const b$h = block('footer-item');
4175
4199
  const FooterItem$1 = (_a) => {
4176
4200
  var { item } = _a, props = __rest(_a, ["item"]);
4177
- return (React__default.createElement(Item$1, Object.assign({}, props, { item: Object.assign({ iconSize: ASIDE_HEADER_FOOTER_ICON_SIZE }, item), className: b$c({ compact: props.compact }), onItemClick: item.onItemClick })));
4201
+ return (React__default.createElement(Item$1, Object.assign({}, props, { item: Object.assign({ iconSize: ASIDE_HEADER_FOOTER_ICON_SIZE }, item), className: b$h({ compact: props.compact }), onItemClick: item.onItemClick })));
4202
+ };
4203
+
4204
+ var css_248z$f = ".ycn-action-bar-group {\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n margin: 0;\n padding: 0;\n}\n.ycn-action-bar-group_pull_left {\n margin-left: 0;\n margin-right: auto;\n}\n.ycn-action-bar-group_pull_right {\n margin-left: auto;\n margin-right: 0;\n}\n.ycn-action-bar-group_pull_center {\n margin-left: auto;\n margin-right: auto;\n}";
4205
+ styleInject(css_248z$f);
4206
+
4207
+ const b$g = block('action-bar-group');
4208
+ const ActionBarGroup = ({ children, className, pull }) => {
4209
+ return (React__default.createElement("ul", { className: b$g({ pull }, className), role: "group" }, children));
4210
+ };
4211
+ ActionBarGroup.displayName = 'ActionBar.Group';
4212
+
4213
+ var css_248z$e = ".ycn-action-bar-item {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n.ycn-action-bar-item_pull_left {\n margin-left: 0;\n margin-right: auto;\n}\n.ycn-action-bar-item_pull_right {\n margin-left: auto;\n margin-right: 0;\n}\n.ycn-action-bar-item_pull_center {\n margin-left: auto;\n margin-right: auto;\n}\n.ycn-action-bar-item + .ycn-action-bar-item_spacing {\n margin-left: 8px;\n}";
4214
+ styleInject(css_248z$e);
4215
+
4216
+ const b$f = block('action-bar-item');
4217
+ const ActionBarItem = ({ children, className, pull, spacing = true }) => {
4218
+ return React__default.createElement("li", { className: b$f({ pull, spacing }, className) }, children);
4219
+ };
4220
+ ActionBarItem.displayName = 'ActionBar.Item';
4221
+
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(--yc-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
+ styleInject(css_248z$d);
4224
+
4225
+ const b$e = block('action-bar-section');
4226
+ const ActionBarSection = ({ children, type = 'primary' }) => {
4227
+ return React__default.createElement("div", { className: b$e({ type }) }, children);
4228
+ };
4229
+ ActionBarSection.displayName = 'ActionBar.Section';
4230
+
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(--yc-color-line-generic);\n height: 40px;\n}";
4232
+ styleInject(css_248z$c);
4233
+
4234
+ const b$d = block('action-bar-separator');
4235
+ const ActionBarSeparator = () => {
4236
+ return React__default.createElement("li", { role: "separator", className: b$d() });
4237
+ };
4238
+ ActionBarSeparator.displayName = 'ActionBar.Separator';
4239
+
4240
+ var css_248z$b = ".ycn-action-bar {\n box-sizing: border-box;\n height: 40px;\n border-bottom: solid 1px var(--yc-color-line-generic);\n display: flex;\n flex-flow: row nowrap;\n justify-content: flex-start;\n align-items: stretch;\n}";
4241
+ styleInject(css_248z$b);
4242
+
4243
+ const b$c = block('action-bar');
4244
+ const ActionBar = ({ children, className, 'aria-label': ariaLabel }) => {
4245
+ return (React__default.createElement("section", { className: b$c(null, className), "aria-label": ariaLabel }, children));
4178
4246
  };
4247
+ ActionBar.displayName = 'ActionBar';
4248
+ const PublicActionBar = Object.assign(ActionBar, {
4249
+ Section: ActionBarSection,
4250
+ Group: ActionBarGroup,
4251
+ Item: ActionBarItem,
4252
+ Separator: ActionBarSeparator,
4253
+ });
4179
4254
 
4180
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(--yc-color-line-generic);\n}\n.ycn-title__text {\n margin: 0;\n margin-right: 20px;\n}";
4181
4256
  styleInject(css_248z$a);