@gravity-ui/navigation 0.1.0 → 0.2.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 (88) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/build/cjs/{types/components → components}/ActionBar/ActionBar.d.ts +0 -0
  3. package/build/cjs/{types/components → components}/ActionBar/Group/ActionBarGroup.d.ts +0 -0
  4. package/build/cjs/{types/components → components}/ActionBar/Item/ActionBarItem.d.ts +0 -0
  5. package/build/cjs/{types/components → components}/ActionBar/Section/ActionBarSection.d.ts +0 -0
  6. package/build/cjs/{types/components → components}/ActionBar/Separator/ActionBarSeparator.d.ts +0 -0
  7. package/build/cjs/{types/components → components}/ActionBar/__stories__/ActionBar.stories.d.ts +0 -0
  8. package/build/cjs/{types/components → components}/ActionBar/__stories__/ActionBarShowcase.d.ts +0 -0
  9. package/build/cjs/{types/components → components}/ActionBar/index.d.ts +0 -0
  10. package/build/cjs/{types/components → components}/ActionBar/types.d.ts +0 -0
  11. package/build/{esm/types → cjs}/components/AsideHeader/AsideHeader.d.ts +2 -7
  12. package/build/cjs/{types/components → components}/AsideHeader/Content.d.ts +0 -0
  13. package/build/cjs/{types/components → components}/AsideHeader/__stories__/AsideHeader.stories.d.ts +0 -0
  14. package/build/cjs/{types/components → components}/AsideHeader/__stories__/AsideHeaderShowcase.d.ts +0 -0
  15. package/build/cjs/{types/components → components}/AsideHeader/__stories__/getAsideHeaderWrapper.d.ts +0 -0
  16. package/build/cjs/{types/components → components}/AsideHeader/__stories__/moc.d.ts +0 -0
  17. package/build/cjs/{types/components → components}/CompositeBar/CompositeBar.d.ts +1 -1
  18. package/build/{esm/types → cjs}/components/CompositeBar/Item/Item.d.ts +1 -0
  19. package/build/cjs/{types/components → components}/CompositeBar/__stories__/CompositeBar.stories.d.ts +0 -0
  20. package/build/cjs/{types/components → components}/CompositeBar/__stories__/moc.d.ts +0 -0
  21. package/build/cjs/{types/components → components}/CompositeBar/constants.d.ts +0 -0
  22. package/build/cjs/{types/components → components}/CompositeBar/utils.d.ts +0 -0
  23. package/build/cjs/{types/components → components}/Drawer/Drawer.d.ts +0 -0
  24. package/build/cjs/{types/components → components}/Drawer/__stories__/Drawer.stories.d.ts +0 -0
  25. package/build/cjs/{types/components → components}/Drawer/__stories__/DrawerShowcase.d.ts +0 -0
  26. package/build/{esm/types → cjs}/components/FooterItem/FooterItem.d.ts +1 -1
  27. package/build/cjs/{types/components → components}/FooterItem/__stories__/FooterItem.stories.d.ts +0 -0
  28. package/build/cjs/{types/components → components}/ItemTooltip/ItemTooltip.d.ts +0 -0
  29. package/build/cjs/{types/components → components}/Logo/Logo.d.ts +0 -0
  30. package/build/cjs/components/Settings/Settings.d.ts +49 -0
  31. package/build/cjs/components/Settings/SettingsMenu/SettingsMenu.d.ts +27 -0
  32. package/build/cjs/components/Settings/SettingsSearch/SettingsSearch.d.ts +10 -0
  33. package/build/{esm/types/components/AsideHeader/__stories__/AsideHeader.stories.d.ts → cjs/components/Settings/__stories__/Settings.stories.d.ts} +0 -0
  34. package/build/cjs/components/Settings/__stories__/SettingsDemo.d.ts +13 -0
  35. package/build/cjs/components/Settings/collect-settings.d.ts +40 -0
  36. package/build/cjs/components/Settings/helpers.d.ts +6 -0
  37. package/build/cjs/components/Settings/index.d.ts +1 -0
  38. package/build/cjs/{types/components → components}/constants.d.ts +0 -0
  39. package/build/cjs/{types/components → components}/index.d.ts +1 -0
  40. package/build/cjs/{types/components → components}/types.d.ts +0 -0
  41. package/build/cjs/{types/components → components}/utils/cn.d.ts +0 -0
  42. package/build/cjs/{types/index.d.ts → index.d.ts} +0 -0
  43. package/build/cjs/index.js +1053 -141
  44. package/build/cjs/index.js.map +1 -1
  45. package/build/esm/{types/components → components}/ActionBar/ActionBar.d.ts +0 -0
  46. package/build/esm/{types/components → components}/ActionBar/Group/ActionBarGroup.d.ts +0 -0
  47. package/build/esm/{types/components → components}/ActionBar/Item/ActionBarItem.d.ts +0 -0
  48. package/build/esm/{types/components → components}/ActionBar/Section/ActionBarSection.d.ts +0 -0
  49. package/build/esm/{types/components → components}/ActionBar/Separator/ActionBarSeparator.d.ts +0 -0
  50. package/build/esm/{types/components → components}/ActionBar/__stories__/ActionBar.stories.d.ts +0 -0
  51. package/build/esm/{types/components → components}/ActionBar/__stories__/ActionBarShowcase.d.ts +0 -0
  52. package/build/esm/{types/components → components}/ActionBar/index.d.ts +0 -0
  53. package/build/esm/{types/components → components}/ActionBar/types.d.ts +0 -0
  54. package/build/{cjs/types → esm}/components/AsideHeader/AsideHeader.d.ts +2 -7
  55. package/build/esm/{types/components → components}/AsideHeader/Content.d.ts +0 -0
  56. package/build/esm/{types/components/Drawer/__stories__/Drawer.stories.d.ts → components/AsideHeader/__stories__/AsideHeader.stories.d.ts} +0 -0
  57. package/build/esm/{types/components → components}/AsideHeader/__stories__/AsideHeaderShowcase.d.ts +0 -0
  58. package/build/esm/{types/components → components}/AsideHeader/__stories__/getAsideHeaderWrapper.d.ts +0 -0
  59. package/build/esm/{types/components → components}/AsideHeader/__stories__/moc.d.ts +0 -0
  60. package/build/esm/{types/components → components}/CompositeBar/CompositeBar.d.ts +1 -1
  61. package/build/{cjs/types → esm}/components/CompositeBar/Item/Item.d.ts +1 -0
  62. package/build/esm/{types/components → components}/CompositeBar/__stories__/CompositeBar.stories.d.ts +0 -0
  63. package/build/esm/{types/components → components}/CompositeBar/__stories__/moc.d.ts +0 -0
  64. package/build/esm/{types/components → components}/CompositeBar/constants.d.ts +0 -0
  65. package/build/esm/{types/components → components}/CompositeBar/utils.d.ts +0 -0
  66. package/build/esm/{types/components → components}/Drawer/Drawer.d.ts +0 -0
  67. package/build/esm/components/Drawer/__stories__/Drawer.stories.d.ts +4 -0
  68. package/build/esm/{types/components → components}/Drawer/__stories__/DrawerShowcase.d.ts +0 -0
  69. package/build/{cjs/types → esm}/components/FooterItem/FooterItem.d.ts +1 -1
  70. package/build/esm/{types/components → components}/FooterItem/__stories__/FooterItem.stories.d.ts +0 -0
  71. package/build/esm/{types/components → components}/ItemTooltip/ItemTooltip.d.ts +0 -0
  72. package/build/esm/{types/components → components}/Logo/Logo.d.ts +0 -0
  73. package/build/esm/components/Settings/Settings.d.ts +49 -0
  74. package/build/esm/components/Settings/SettingsMenu/SettingsMenu.d.ts +27 -0
  75. package/build/esm/components/Settings/SettingsSearch/SettingsSearch.d.ts +10 -0
  76. package/build/esm/components/Settings/__stories__/Settings.stories.d.ts +4 -0
  77. package/build/esm/components/Settings/__stories__/SettingsDemo.d.ts +13 -0
  78. package/build/esm/components/Settings/collect-settings.d.ts +40 -0
  79. package/build/esm/components/Settings/helpers.d.ts +6 -0
  80. package/build/esm/components/Settings/index.d.ts +1 -0
  81. package/build/esm/{types/components → components}/constants.d.ts +0 -0
  82. package/build/esm/{types/components → components}/index.d.ts +1 -0
  83. package/build/esm/{types/components → components}/types.d.ts +0 -0
  84. package/build/esm/{types/components → components}/utils/cn.d.ts +0 -0
  85. package/build/esm/{types/index.d.ts → index.d.ts} +0 -0
  86. package/build/esm/index.js +1054 -143
  87. package/build/esm/index.js.map +1 -1
  88. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { Children, isValidElement, cloneElement, createElement, PureComponent } from 'react';
3
- import { Button, Icon, Popup, List } from '@gravity-ui/uikit';
3
+ import { Button, Icon, Popup, List, TextInput, Loader } from '@gravity-ui/uikit';
4
4
  import ReactDOM from 'react-dom';
5
5
 
6
6
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
@@ -87,48 +87,48 @@ function styleInject(css, ref) {
87
87
  }
88
88
  }
89
89
 
90
- var css_248z$b = ".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}";
91
- styleInject(css_248z$b);
90
+ var css_248z$d = ".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}";
91
+ styleInject(css_248z$d);
92
92
 
93
- const b$b = block('action-bar-group');
93
+ const b$e = block('action-bar-group');
94
94
  const ActionBarGroup = ({ children, className, pull }) => {
95
- return (React__default.createElement("ul", { className: b$b({ pull }, className), role: "group" }, children));
95
+ return (React__default.createElement("ul", { className: b$e({ pull }, className), role: "group" }, children));
96
96
  };
97
97
  ActionBarGroup.displayName = 'ActionBar.Group';
98
98
 
99
- var css_248z$a = ".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}";
100
- styleInject(css_248z$a);
99
+ var css_248z$c = ".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}";
100
+ styleInject(css_248z$c);
101
101
 
102
- const b$a = block('action-bar-item');
102
+ const b$d = block('action-bar-item');
103
103
  const ActionBarItem = ({ children, className, pull, spacing = true }) => {
104
- return React__default.createElement("li", { className: b$a({ pull, spacing }, className) }, children);
104
+ return React__default.createElement("li", { className: b$d({ pull, spacing }, className) }, children);
105
105
  };
106
106
  ActionBarItem.displayName = 'ActionBar.Item';
107
107
 
108
- var css_248z$9 = ".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}";
109
- styleInject(css_248z$9);
108
+ var css_248z$b = ".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}";
109
+ styleInject(css_248z$b);
110
110
 
111
- const b$9 = block('action-bar-section');
111
+ const b$c = block('action-bar-section');
112
112
  const ActionBarSection = ({ children, type = 'primary' }) => {
113
- return React__default.createElement("div", { className: b$9({ type }) }, children);
113
+ return React__default.createElement("div", { className: b$c({ type }) }, children);
114
114
  };
115
115
  ActionBarSection.displayName = 'ActionBar.Section';
116
116
 
117
- var css_248z$8 = ".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}";
118
- styleInject(css_248z$8);
117
+ var css_248z$a = ".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}";
118
+ styleInject(css_248z$a);
119
119
 
120
- const b$8 = block('action-bar-separator');
120
+ const b$b = block('action-bar-separator');
121
121
  const ActionBarSeparator = () => {
122
- return React__default.createElement("li", { role: "separator", className: b$8() });
122
+ return React__default.createElement("li", { role: "separator", className: b$b() });
123
123
  };
124
124
  ActionBarSeparator.displayName = 'ActionBar.Separator';
125
125
 
126
- var css_248z$7 = ".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}";
127
- styleInject(css_248z$7);
126
+ var css_248z$9 = ".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}";
127
+ styleInject(css_248z$9);
128
128
 
129
- const b$7 = block('action-bar');
129
+ const b$a = block('action-bar');
130
130
  const ActionBar = ({ children, className, 'aria-label': ariaLabel }) => {
131
- return (React__default.createElement("section", { className: b$7(null, className), "aria-label": ariaLabel }, children));
131
+ return (React__default.createElement("section", { className: b$a(null, className), "aria-label": ariaLabel }, children));
132
132
  };
133
133
  ActionBar.displayName = 'ActionBar';
134
134
  const PublicActionBar = Object.assign(ActionBar, {
@@ -148,7 +148,7 @@ var Dict;
148
148
  const ASIDE_HEADER_FOOTER_ICON_SIZE = 20;
149
149
  const ASIDE_HEADER_COMPACT_WIDTH = 56;
150
150
  const ASIDE_HEADER_EXPANDED_WIDTH = 236;
151
- const defaultDict = {
151
+ const defaultDict$1 = {
152
152
  [Dict.CollapseButton]: 'Collapse',
153
153
  [Dict.ExpandButton]: 'Expand',
154
154
  [Dict.MoreButton]: 'More',
@@ -158,14 +158,12 @@ function _extends$4() {
158
158
  _extends$4 = Object.assign ? Object.assign.bind() : function (target) {
159
159
  for (var i = 1; i < arguments.length; i++) {
160
160
  var source = arguments[i];
161
-
162
161
  for (var key in source) {
163
162
  if (Object.prototype.hasOwnProperty.call(source, key)) {
164
163
  target[key] = source[key];
165
164
  }
166
165
  }
167
166
  }
168
-
169
167
  return target;
170
168
  };
171
169
  return _extends$4.apply(this, arguments);
@@ -176,13 +174,11 @@ function _objectWithoutPropertiesLoose(source, excluded) {
176
174
  var target = {};
177
175
  var sourceKeys = Object.keys(source);
178
176
  var key, i;
179
-
180
177
  for (i = 0; i < sourceKeys.length; i++) {
181
178
  key = sourceKeys[i];
182
179
  if (excluded.indexOf(key) >= 0) continue;
183
180
  target[key] = source[key];
184
181
  }
185
-
186
182
  return target;
187
183
  }
188
184
 
@@ -1449,6 +1445,10 @@ var classNamesShape = process.env.NODE_ENV !== 'production' ? propTypes.exports.
1449
1445
 
1450
1446
  var TransitionGroupContext = React__default.createContext(null);
1451
1447
 
1448
+ var forceReflow = function forceReflow(node) {
1449
+ return node.scrollTop;
1450
+ };
1451
+
1452
1452
  var UNMOUNTED = 'unmounted';
1453
1453
  var EXITED = 'exited';
1454
1454
  var ENTERING = 'entering';
@@ -1668,6 +1668,14 @@ var Transition = /*#__PURE__*/function (_React$Component) {
1668
1668
  this.cancelNextCallback();
1669
1669
 
1670
1670
  if (nextStatus === ENTERING) {
1671
+ if (this.props.unmountOnExit || this.props.mountOnEnter) {
1672
+ var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this); // https://github.com/reactjs/react-transition-group/pull/749
1673
+ // With unmountOnExit or mountOnEnter, the enter animation should happen at the transition between `exited` and `entering`.
1674
+ // To make the animation happen, we have to separate each rendering and avoid being processed as batched.
1675
+
1676
+ if (node) forceReflow(node);
1677
+ }
1678
+
1671
1679
  this.performEnter(mounting);
1672
1680
  } else {
1673
1681
  this.performExit();
@@ -1860,7 +1868,10 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
1860
1868
  * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
1861
1869
  */
1862
1870
  nodeRef: propTypes.exports.shape({
1863
- current: typeof Element === 'undefined' ? propTypes.exports.any : propTypes.exports.instanceOf(Element)
1871
+ current: typeof Element === 'undefined' ? propTypes.exports.any : function (propValue, key, componentName, location, propFullName, secret) {
1872
+ var value = propValue[key];
1873
+ return propTypes.exports.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);
1874
+ }
1864
1875
  }),
1865
1876
 
1866
1877
  /**
@@ -2268,13 +2279,12 @@ var CSSTransition = /*#__PURE__*/function (_React$Component) {
2268
2279
 
2269
2280
  if (type === 'appear' && phase === 'done' && doneClassName) {
2270
2281
  className += " " + doneClassName;
2271
- } // This is for to force a repaint,
2282
+ } // This is to force a repaint,
2272
2283
  // which is necessary in order to transition styles when adding a class name.
2273
2284
 
2274
2285
 
2275
2286
  if (phase === 'active') {
2276
- /* eslint-disable no-unused-expressions */
2277
- node && node.scrollTop;
2287
+ if (node) forceReflow(node);
2278
2288
  }
2279
2289
 
2280
2290
  if (className) {
@@ -2460,7 +2470,6 @@ function _assertThisInitialized(self) {
2460
2470
  if (self === void 0) {
2461
2471
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
2462
2472
  }
2463
-
2464
2473
  return self;
2465
2474
  }
2466
2475
 
@@ -3164,15 +3173,15 @@ SwitchTransition.defaultProps = {
3164
3173
  mode: modes.out
3165
3174
  };
3166
3175
 
3167
- var css_248z$6 = ".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-transition-enter {\n transform: translate(-100%, 0);\n}\n.ycn-drawer__item-transition-enter-active {\n transform: translate(0, 0);\n transition: transform 300ms;\n}\n.ycn-drawer__item-transition-enter-done {\n filter: blur(0px);\n transform: translateZ(0);\n}\n.ycn-drawer__item-transition-exit {\n transform: translate(0, 0);\n}\n.ycn-drawer__item-transition-exit-active {\n transform: translate(-100%, 0);\n transition: transform 300ms;\n}\n.ycn-drawer__item-transition-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}";
3168
- styleInject(css_248z$6);
3176
+ var css_248z$8 = ".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-transition-enter {\n transform: translate(-100%, 0);\n}\n.ycn-drawer__item-transition-enter-active {\n transform: translate(0, 0);\n transition: transform 300ms;\n}\n.ycn-drawer__item-transition-enter-done {\n filter: blur(0px);\n transform: translateZ(0);\n}\n.ycn-drawer__item-transition-exit {\n transform: translate(0, 0);\n}\n.ycn-drawer__item-transition-exit-active {\n transform: translate(-100%, 0);\n transition: transform 300ms;\n}\n.ycn-drawer__item-transition-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}";
3177
+ styleInject(css_248z$8);
3169
3178
 
3170
- const b$6 = block('drawer');
3179
+ const b$9 = block('drawer');
3171
3180
  const TIMEOUT = 300;
3172
3181
  const DrawerItem = ({ visible, content, className }) => {
3173
3182
  const itemRef = React__default.useRef(null);
3174
- return (React__default.createElement(CSSTransition, { in: visible, timeout: TIMEOUT, unmountOnExit: true, classNames: b$6('item-transition'), nodeRef: itemRef },
3175
- React__default.createElement("div", { ref: itemRef, className: b$6('item', className) }, content)));
3183
+ return (React__default.createElement(CSSTransition, { in: visible, timeout: TIMEOUT, unmountOnExit: true, classNames: b$9('item-transition'), nodeRef: itemRef },
3184
+ React__default.createElement("div", { ref: itemRef, className: b$9('item', className) }, content)));
3176
3185
  };
3177
3186
  const Drawer = ({ className, children, style, onVeilClick, onEscape, preventScrollBody = true, }) => {
3178
3187
  let someItemVisible = false;
@@ -3230,9 +3239,9 @@ const Drawer = ({ className, children, style, onVeilClick, onEscape, preventScro
3230
3239
  const veilRef = React__default.useRef(null);
3231
3240
  return (React__default.createElement(Transition, { in: someItemVisible, timeout: { enter: 0, exit: TIMEOUT }, mountOnEnter: true, unmountOnExit: true, nodeRef: containerRef }, (state) => {
3232
3241
  const childrenVisible = someItemVisible && state === 'entered';
3233
- return (React__default.createElement("div", { ref: containerRef, className: b$6(null, className), style: style },
3234
- React__default.createElement(CSSTransition, { in: childrenVisible, timeout: TIMEOUT, unmountOnExit: true, classNames: b$6('veil-transition'), nodeRef: veilRef },
3235
- React__default.createElement("div", { ref: veilRef, className: b$6('veil'), onClick: onVeilClick })),
3242
+ return (React__default.createElement("div", { ref: containerRef, className: b$9(null, className), style: style },
3243
+ React__default.createElement(CSSTransition, { in: childrenVisible, timeout: TIMEOUT, unmountOnExit: true, classNames: b$9('veil-transition'), nodeRef: veilRef },
3244
+ React__default.createElement("div", { ref: veilRef, className: b$9('veil'), onClick: onVeilClick })),
3236
3245
  React__default.Children.map(children, (child) => {
3237
3246
  const childElem = child;
3238
3247
  if (childElem.type === DrawerItem) {
@@ -3244,10 +3253,10 @@ const Drawer = ({ className, children, style, onVeilClick, onEscape, preventScro
3244
3253
  }));
3245
3254
  };
3246
3255
 
3247
- var css_248z$5 = ".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}\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}\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}";
3248
- styleInject(css_248z$5);
3256
+ var css_248z$7 = ".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}\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}\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}";
3257
+ styleInject(css_248z$7);
3249
3258
 
3250
- const b$5 = block('logo');
3259
+ const b$8 = block('logo');
3251
3260
  const Logo = ({ text, compact, icon, iconSrc, iconClassName, iconSize = 24, textSize = 15, href = '/', wrapper, onClick, }) => {
3252
3261
  const hasClickHandler = typeof onClick === 'function';
3253
3262
  const hasWrapper = typeof wrapper === 'function';
@@ -3265,18 +3274,18 @@ const Logo = ({ text, compact, icon, iconSrc, iconClassName, iconSize = 24, text
3265
3274
  else if (icon) {
3266
3275
  buttonIcon = React__default.createElement(Icon, { data: icon, size: iconSize, className: iconClassName });
3267
3276
  }
3268
- const button = (React__default.createElement(Button, Object.assign({ view: "flat", size: "l", className: b$5('btn-logo'), component: hasWrapper ? 'span' : undefined, onClick: onClick }, linkProps), buttonIcon));
3277
+ const button = (React__default.createElement(Button, Object.assign({ view: "flat", size: "l", className: b$8('btn-logo'), component: hasWrapper ? 'span' : undefined, onClick: onClick }, linkProps), buttonIcon));
3269
3278
  let logo;
3270
3279
  if (typeof text === 'function') {
3271
3280
  logo = text();
3272
3281
  }
3273
3282
  else {
3274
- logo = (React__default.createElement("div", { className: b$5('logo'), style: { fontSize: textSize } }, text));
3283
+ logo = (React__default.createElement("div", { className: b$8('logo'), style: { fontSize: textSize } }, text));
3275
3284
  }
3276
- return (React__default.createElement("div", { className: b$5() },
3277
- React__default.createElement("div", { className: b$5('logo-btn-place') }, hasWrapper ? wrapper(button, compact) : button),
3285
+ return (React__default.createElement("div", { className: b$8() },
3286
+ React__default.createElement("div", { className: b$8('logo-btn-place') }, hasWrapper ? wrapper(button, compact) : button),
3278
3287
  !compact &&
3279
- (hasWrapper ? (wrapper(logo, compact)) : (React__default.createElement("a", Object.assign({}, linkProps, { className: b$5('logo-link'), onClick: onClick }), logo)))));
3288
+ (hasWrapper ? (wrapper(logo, compact)) : (React__default.createElement("a", Object.assign({}, linkProps, { className: b$8('logo-link'), onClick: onClick }), logo)))));
3280
3289
  };
3281
3290
 
3282
3291
  var classCallCheck = function (instance, Constructor) {
@@ -3808,10 +3817,10 @@ function getItemsMinHeight(items) {
3808
3817
  (pinnedItems.length === items.length ? 0 : ITEM_HEIGHT));
3809
3818
  }
3810
3819
 
3811
- var css_248z$4 = ".ycn-item-tooltip.yc-popup {\n animation-name: none;\n box-shadow: none;\n border: none;\n}\n.ycn-item-tooltip__text {\n padding: 6px 12px;\n background-color: var(--yc-color-base-float-heavy);\n color: var(--yc-color-text-light-primary);\n border-radius: 4px;\n}";
3812
- styleInject(css_248z$4);
3820
+ var css_248z$6 = ".ycn-item-tooltip.yc-popup {\n animation-name: none;\n box-shadow: none;\n border: none;\n}\n.ycn-item-tooltip__text {\n padding: 6px 12px;\n background-color: var(--yc-color-base-float-heavy);\n color: var(--yc-color-text-light-primary);\n border-radius: 4px;\n}";
3821
+ styleInject(css_248z$6);
3813
3822
 
3814
- const b$4 = block('item-tooltip');
3823
+ const b$7 = block('item-tooltip');
3815
3824
  const popupPlacement = ['right'];
3816
3825
  const ItemTooltip = ({ anchor, text }) => {
3817
3826
  const anchorRef = React__default.useRef(anchor);
@@ -3821,28 +3830,28 @@ const ItemTooltip = ({ anchor, text }) => {
3821
3830
  if (!anchor) {
3822
3831
  return null;
3823
3832
  }
3824
- return (React__default.createElement(Popup, { className: b$4(), open: true, anchorRef: anchorRef, placement: popupPlacement, disableEscapeKeyDown: true, disableOutsideClick: true, disableLayer: true },
3825
- React__default.createElement("div", { className: b$4('text') }, text)));
3833
+ return (React__default.createElement(Popup, { className: b$7(), open: true, anchorRef: anchorRef, placement: popupPlacement, disableEscapeKeyDown: true, disableOutsideClick: true, disableLayer: true },
3834
+ React__default.createElement("div", { className: b$7('text') }, text)));
3826
3835
  };
3827
3836
 
3828
- var css_248z$3 = ".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: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}";
3829
- styleInject(css_248z$3);
3837
+ var css_248z$5 = ".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: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}";
3838
+ styleInject(css_248z$5);
3830
3839
 
3831
- const b$3 = block('composite-bar-item');
3840
+ const b$6 = block('composite-bar-item');
3832
3841
  function renderItemTitle(item) {
3833
- let titleNode = React__default.createElement("div", { className: b$3('title-text') }, item.title);
3842
+ let titleNode = React__default.createElement("div", { className: b$6('title-text') }, item.title);
3834
3843
  if (item.rightAdornment) {
3835
3844
  titleNode = (React__default.createElement(React__default.Fragment, null,
3836
3845
  titleNode,
3837
- React__default.createElement("div", { className: b$3('title-adornment') }, item.rightAdornment)));
3846
+ React__default.createElement("div", { className: b$6('title-adornment') }, item.rightAdornment)));
3838
3847
  }
3839
3848
  return titleNode;
3840
3849
  }
3841
3850
  const defaultPopupPlacement = ['right-end'];
3842
3851
  const defaultPopupOffset = [-20, 8];
3843
- const Item = ({ item, compact, className, collapseItems, onMouseLeave, onMouseEnter, enableTooltip = true, popupVisible = false, popupAnchor, popupPlacement = defaultPopupPlacement, popupOffset = defaultPopupOffset, renderPopupContent, onClosePopup, }) => {
3852
+ const Item = ({ item, compact, className, collapseItems, onMouseLeave, onMouseEnter, enableTooltip = true, popupVisible = false, popupAnchor, popupPlacement = defaultPopupPlacement, popupOffset = defaultPopupOffset, renderPopupContent, onClosePopup, onItemClick, }) => {
3844
3853
  if (item.type === 'divider') {
3845
- return React__default.createElement("div", { className: b$3('menu-divider') });
3854
+ return React__default.createElement("div", { className: b$6('menu-divider') });
3846
3855
  }
3847
3856
  const [tooltipAnchor, setTooltipAnchor] = React__default.useState(null);
3848
3857
  const [open, toggleOpen] = React__default.useState(false);
@@ -3863,14 +3872,19 @@ const Item = ({ item, compact, className, collapseItems, onMouseLeave, onMouseEn
3863
3872
  }
3864
3873
  onClosePopup === null || onClosePopup === void 0 ? void 0 : onClosePopup();
3865
3874
  }, [onClosePopup]);
3866
- const node = (React__default.createElement("div", { className: b$3({ type, current, compact }, className), ref: ref, onClick: () => {
3867
- if (typeof item.onItemClick === 'function') {
3868
- item.onItemClick(item, false);
3869
- }
3875
+ const node = (React__default.createElement("div", { className: b$6({ type, current, compact }, className), ref: ref, onClick: () => {
3870
3876
  if (collapsedItem) {
3877
+ /**
3878
+ * If we call onItemClick for collapsedItem then:
3879
+ * - User get unexpected item in onItemClick callback
3880
+ * - onClosePanel calls twice for each popuped item, as result it will prevent opening of panelItems
3881
+ */
3871
3882
  toggleOpen(!open);
3872
3883
  setTooltipAnchor(null);
3873
3884
  }
3885
+ else {
3886
+ onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(item, false);
3887
+ }
3874
3888
  }, onMouseEnter: () => {
3875
3889
  if (!compact) {
3876
3890
  onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter();
@@ -3880,7 +3894,7 @@ const Item = ({ item, compact, className, collapseItems, onMouseLeave, onMouseEn
3880
3894
  onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave();
3881
3895
  }
3882
3896
  } },
3883
- React__default.createElement("div", { className: b$3('icon-place') }, compact ? (React__default.createElement(React__default.Fragment, null,
3897
+ React__default.createElement("div", { className: b$6('icon-place') }, compact ? (React__default.createElement(React__default.Fragment, null,
3884
3898
  React__default.createElement("div", { onMouseEnter: (event) => {
3885
3899
  if (!open) {
3886
3900
  setTooltipAnchor(event.currentTarget);
@@ -3889,51 +3903,47 @@ const Item = ({ item, compact, className, collapseItems, onMouseLeave, onMouseEn
3889
3903
  }, onMouseLeave: () => {
3890
3904
  setTooltipAnchor(null);
3891
3905
  onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave();
3892
- }, className: b$3('btn-icon') }, icon && React__default.createElement(Icon, { data: icon, size: iconSize, className: b$3('icon') })),
3893
- enableTooltip && React__default.createElement(ItemTooltip, { anchor: tooltipAnchor, text: tooltipText }))) : (icon && React__default.createElement(Icon, { data: icon, size: iconSize, className: b$3('icon') }))),
3894
- React__default.createElement("div", { className: b$3('title'), title: typeof item.title === 'string' ? item.title : undefined }, renderItemTitle(item)),
3906
+ }, className: b$6('btn-icon') }, icon && React__default.createElement(Icon, { data: icon, size: iconSize, className: b$6('icon') })),
3907
+ enableTooltip && React__default.createElement(ItemTooltip, { anchor: tooltipAnchor, text: tooltipText }))) : (icon && React__default.createElement(Icon, { data: icon, size: iconSize, className: b$6('icon') }))),
3908
+ React__default.createElement("div", { className: b$6('title'), title: typeof item.title === 'string' ? item.title : undefined }, renderItemTitle(item)),
3895
3909
  collapsedItem && (collapseItems === null || collapseItems === void 0 ? void 0 : collapseItems.length) && Boolean(anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current) && (React__default.createElement(Popup, { placement: POPUP_PLACEMENT, open: open, anchorRef: ref, onClose: () => toggleOpen(false) },
3896
- React__default.createElement("div", { className: b$3('collapse-items-popup-content') },
3897
- React__default.createElement(List, { itemClassName: b$3('root-collapse-item'), items: collapseItems, selectedItemIndex: getSelectedItemIndex(collapseItems), itemHeight: POPUP_ITEM_HEIGHT, itemsHeight: collapseItems.length * POPUP_ITEM_HEIGHT, virtualized: false, filterable: false, sortable: false, renderItem: (collapseItem) => {
3898
- const collapseNode = (React__default.createElement("div", { className: b$3('collapse-item'), onClick: () => {
3899
- if (typeof collapseItem.onItemClick === 'function') {
3900
- collapseItem.onItemClick(collapseItem, true);
3901
- }
3910
+ React__default.createElement("div", { className: b$6('collapse-items-popup-content') },
3911
+ React__default.createElement(List, { itemClassName: b$6('root-collapse-item'), items: collapseItems, selectedItemIndex: getSelectedItemIndex(collapseItems), itemHeight: POPUP_ITEM_HEIGHT, itemsHeight: collapseItems.length * POPUP_ITEM_HEIGHT, virtualized: false, filterable: false, sortable: false, renderItem: (collapseItem) => {
3912
+ const collapseNode = (React__default.createElement("div", { className: b$6('collapse-item'), onClick: () => {
3913
+ onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(collapseItem, true);
3902
3914
  } }, renderItemTitle(collapseItem)));
3903
3915
  if (typeof collapseItem.itemWrapper === 'function') {
3904
3916
  return collapseItem.itemWrapper(collapseNode, collapseItem, true, compact);
3905
3917
  }
3906
- return collapseItem.link ? (React__default.createElement("a", { href: collapseItem.link, className: b$3('link') }, collapseNode)) : (collapseNode);
3918
+ return collapseItem.link ? (React__default.createElement("a", { href: collapseItem.link, className: b$6('link') }, collapseNode)) : (collapseNode);
3907
3919
  } })))),
3908
- renderPopupContent && Boolean(anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current) && (React__default.createElement(Popup, { className: b$3('popup'), open: popupVisible, placement: popupPlacement, offset: popupOffset, anchorRef: anchorRef, onClose: onClose }, renderPopupContent()))));
3920
+ renderPopupContent && Boolean(anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current) && (React__default.createElement(Popup, { className: b$6('popup'), open: popupVisible, placement: popupPlacement, offset: popupOffset, anchorRef: anchorRef, onClose: onClose }, renderPopupContent()))));
3909
3921
  if (typeof item.itemWrapper === 'function') {
3910
3922
  return item.itemWrapper(node, item, false, compact);
3911
3923
  }
3912
- return item.link ? (React__default.createElement("a", { href: item.link, className: b$3('link') }, node)) : (node);
3924
+ return item.link ? (React__default.createElement("a", { href: item.link, className: b$6('link') }, node)) : (node);
3913
3925
  };
3914
3926
  Item.displayName = 'Item';
3915
3927
 
3916
3928
  var _path$2;
3917
-
3918
3929
  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); }
3919
-
3920
3930
  var SvgDots = function SvgDots(props) {
3921
3931
  return /*#__PURE__*/React.createElement("svg", _extends$2({
3922
3932
  xmlns: "http://www.w3.org/2000/svg",
3923
3933
  width: 16,
3924
- height: 16,
3925
- role: "img"
3934
+ height: 16
3926
3935
  }, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
3927
3936
  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",
3928
3937
  fill: "currentColor",
3929
3938
  fillRule: "evenodd"
3930
3939
  })));
3931
3940
  };
3941
+ var dotsIcon = SvgDots;
3932
3942
 
3933
- var css_248z$2 = ".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}";
3934
- styleInject(css_248z$2);
3943
+ var css_248z$4 = ".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}";
3944
+ styleInject(css_248z$4);
3935
3945
 
3936
- const b$2 = block('composite-bar');
3946
+ const b$5 = block('composite-bar');
3937
3947
  class CompositeBar extends React__default.Component {
3938
3948
  constructor() {
3939
3949
  super(...arguments);
@@ -3948,10 +3958,10 @@ class CompositeBar extends React__default.Component {
3948
3958
  return null;
3949
3959
  }
3950
3960
  if (!enableCollapsing) {
3951
- return React__default.createElement("div", { className: b$2() }, this.renderMenu());
3961
+ return React__default.createElement("div", { className: b$5() }, this.renderMenu());
3952
3962
  }
3953
3963
  const minHeight = getItemsMinHeight(items);
3954
- return (React__default.createElement("div", { className: b$2({ autosizer: true }), style: { minHeight } }, items.length !== 0 && (React__default.createElement(AutoSizer, null, ({ width, height }) => {
3964
+ return (React__default.createElement("div", { className: b$5({ autosizer: true }), style: { minHeight } }, items.length !== 0 && (React__default.createElement(AutoSizer, null, ({ width, height }) => {
3955
3965
  const style = {
3956
3966
  width,
3957
3967
  height,
@@ -3962,30 +3972,30 @@ class CompositeBar extends React__default.Component {
3962
3972
  renderAutosizeMenu(height) {
3963
3973
  const { compact, onItemClick } = this.props;
3964
3974
  const { listItems, collapseItems } = this.getAutosizeListItems(height);
3965
- return (React__default.createElement(List, { ref: this.listRef, items: listItems, selectedItemIndex: getSelectedItemIndex(listItems), itemHeight: getItemHeight, itemClassName: b$2('root-menu-item'), itemsHeight: getItemsHeight, virtualized: false, filterable: false, sortable: false, onItemClick: onItemClick, renderItem: (item) => (React__default.createElement(Item, { item: item, onMouseLeave: () => {
3975
+ return (React__default.createElement(List, { ref: this.listRef, items: listItems, selectedItemIndex: getSelectedItemIndex(listItems), itemHeight: getItemHeight, itemClassName: b$5('root-menu-item'), itemsHeight: getItemsHeight, virtualized: false, filterable: false, sortable: false, renderItem: (item) => (React__default.createElement(Item, { item: item, onMouseLeave: () => {
3966
3976
  var _a;
3967
3977
  if (compact) {
3968
3978
  (_a = this.listRef.current) === null || _a === void 0 ? void 0 : _a.activateItem(undefined);
3969
3979
  }
3970
- }, compact: compact, collapseItems: collapseItems })) }));
3980
+ }, compact: compact, collapseItems: collapseItems, onItemClick: onItemClick })) }));
3971
3981
  }
3972
3982
  renderMenu() {
3973
3983
  const { items, onItemClick, compact } = this.props;
3974
- return (React__default.createElement(List, { ref: this.listRef, items: items, selectedItemIndex: getSelectedItemIndex(items), itemHeight: getItemHeight, itemClassName: b$2('root-menu-item'), itemsHeight: getItemsHeight, virtualized: false, filterable: false, sortable: false, onItemClick: onItemClick, renderItem: (item) => (React__default.createElement(Item, { item: item, onMouseLeave: () => {
3984
+ return (React__default.createElement(List, { ref: this.listRef, items: items, selectedItemIndex: getSelectedItemIndex(items), itemHeight: getItemHeight, itemClassName: b$5('root-menu-item'), itemsHeight: getItemsHeight, virtualized: false, filterable: false, sortable: false, renderItem: (item) => (React__default.createElement(Item, { item: item, onMouseLeave: () => {
3975
3985
  var _a;
3976
3986
  if (compact) {
3977
3987
  (_a = this.listRef.current) === null || _a === void 0 ? void 0 : _a.activateItem(undefined);
3978
3988
  }
3979
- }, compact: compact })) }));
3989
+ }, compact: compact, onItemClick: onItemClick })) }));
3980
3990
  }
3981
3991
  getMoreButtonItem() {
3982
3992
  var _a;
3983
3993
  const { dict } = this.props;
3984
- const title = (_a = dict === null || dict === void 0 ? void 0 : dict[Dict.MoreButton]) !== null && _a !== void 0 ? _a : defaultDict[Dict.MoreButton];
3994
+ const title = (_a = dict === null || dict === void 0 ? void 0 : dict[Dict.MoreButton]) !== null && _a !== void 0 ? _a : defaultDict$1[Dict.MoreButton];
3985
3995
  return {
3986
3996
  id: COLLAPSE_ITEM_ID,
3987
3997
  title,
3988
- icon: SvgDots,
3998
+ icon: dotsIcon,
3989
3999
  iconSize: 16,
3990
4000
  };
3991
4001
  }
@@ -4041,70 +4051,64 @@ const Content = ({ size, className, renderContent }) => {
4041
4051
  };
4042
4052
 
4043
4053
  var _path$1;
4044
-
4045
4054
  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); }
4046
-
4047
4055
  var SvgControlMenuButton = function SvgControlMenuButton(props) {
4048
4056
  return /*#__PURE__*/React.createElement("svg", _extends$1({
4049
4057
  width: 8,
4050
4058
  height: 8,
4051
4059
  fill: "currentColor",
4052
- xmlns: "http://www.w3.org/2000/svg",
4053
- role: "img"
4060
+ xmlns: "http://www.w3.org/2000/svg"
4054
4061
  }, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
4055
4062
  d: "m.72 7.64 6.39-3.2a.5.5 0 0 0 0-.89L.72.36A.5.5 0 0 0 0 .81v6.38c0 .37.4.61.72.45Z"
4056
4063
  })));
4057
4064
  };
4065
+ var controlMenuButtonIcon = SvgControlMenuButton;
4058
4066
 
4059
4067
  var _path;
4060
-
4061
4068
  function _extends() { _extends = 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.apply(this, arguments); }
4062
-
4063
4069
  var SvgDividerCollapsed = function SvgDividerCollapsed(props) {
4064
4070
  return /*#__PURE__*/React.createElement("svg", _extends({
4065
4071
  width: 56,
4066
4072
  height: 29,
4067
4073
  fill: "currentColor",
4068
- xmlns: "http://www.w3.org/2000/svg",
4069
- role: "img"
4074
+ xmlns: "http://www.w3.org/2000/svg"
4070
4075
  }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
4071
4076
  d: "M56 0v29c-.8-1-7-6.1-17.7-8.4L13 15.7A16 16 0 0 1 0 0Z"
4072
4077
  })));
4073
4078
  };
4079
+ var headerDividerCollapsedIcon = SvgDividerCollapsed;
4074
4080
 
4075
- var css_248z$1 = ".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 --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 --aside-header-divider-line-color: var(--yc-color-base-light-simple-hover);\n --aside-header-header-divider-line-color: var(--yc-color-base-light-simple-hover);\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 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__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_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::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::after {\n display: none;\n}\n.ycn-aside-header_compact .ycn-aside-header__header .ycn-aside-header__header-divider {\n display: block;\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}\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}";
4076
- styleInject(css_248z$1);
4081
+ var css_248z$3 = ".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 --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 --aside-header-divider-line-color: var(--yc-color-base-light-simple-hover);\n --aside-header-header-divider-line-color: var(--yc-color-base-light-simple-hover);\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 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__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_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::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::after {\n display: none;\n}\n.ycn-aside-header_compact .ycn-aside-header__header .ycn-aside-header__header-divider {\n display: block;\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}";
4082
+ styleInject(css_248z$3);
4077
4083
 
4078
- const b$1 = block('aside-header');
4084
+ const b$4 = block('aside-header');
4079
4085
  class AsideHeader extends React__default.Component {
4080
- constructor(props) {
4081
- super(props);
4086
+ constructor() {
4087
+ super(...arguments);
4082
4088
  this.asideRef = React__default.createRef();
4083
4089
  this.renderFirstPane = (size) => {
4084
- const { dict, menuItems, panelItems } = this.props;
4085
- const { compact } = this.state;
4086
- return (React__default.createElement("div", null,
4087
- React__default.createElement("div", { className: b$1('aside'), style: { width: size } },
4088
- React__default.createElement("div", { className: b$1('aside-popup-anchor'), ref: this.asideRef }),
4089
- React__default.createElement("div", { className: b$1('aside-content') },
4090
+ const { dict, menuItems, panelItems, compact } = this.props;
4091
+ return (React__default.createElement(React__default.Fragment, null,
4092
+ React__default.createElement("div", { className: b$4('aside'), style: { width: size } },
4093
+ React__default.createElement("div", { className: b$4('aside-popup-anchor'), ref: this.asideRef }),
4094
+ React__default.createElement("div", { className: b$4('aside-content') },
4090
4095
  this.renderHeader(),
4091
- React__default.createElement(CompositeBar, { items: menuItems, compact: compact, enableCollapsing: true, dict: dict, onItemClick: this.onCompositeBarClick }),
4096
+ React__default.createElement(CompositeBar, { items: menuItems, compact: compact, enableCollapsing: true, dict: dict, onItemClick: this.onItemClick }),
4092
4097
  this.renderFooter(size),
4093
4098
  this.renderCollapseButton())),
4094
4099
  panelItems && this.renderPanels(size)));
4095
4100
  };
4096
4101
  this.renderSecondPane = (size) => {
4097
- return (React__default.createElement(Content, { size: size, renderContent: this.props.renderContent, className: b$1('content') }));
4102
+ return (React__default.createElement(Content, { size: size, renderContent: this.props.renderContent, className: b$4('content') }));
4098
4103
  };
4099
4104
  this.renderLogo = () => React__default.createElement(Logo, Object.assign({}, this.props.logo, { compact: this.props.compact }));
4100
- this.renderHeader = () => (React__default.createElement("div", { className: b$1('header') },
4105
+ this.renderHeader = () => (React__default.createElement("div", { className: b$4('header') },
4101
4106
  this.renderLogo(),
4102
- React__default.createElement(CompositeBar, { items: this.props.subheaderItems, compact: this.props.compact, enableCollapsing: false }),
4103
- React__default.createElement(Icon, { data: SvgDividerCollapsed, className: b$1('header-divider'), width: ASIDE_HEADER_COMPACT_WIDTH, height: "29" })));
4107
+ React__default.createElement(CompositeBar, { items: this.props.subheaderItems, compact: this.props.compact, enableCollapsing: false, onItemClick: this.onItemClick }),
4108
+ React__default.createElement(Icon, { data: headerDividerCollapsedIcon, className: b$4('header-divider'), width: ASIDE_HEADER_COMPACT_WIDTH, height: "29" })));
4104
4109
  this.renderFooter = (size) => {
4105
- var _a, _b;
4106
- const { compact } = this.state;
4107
- return (React__default.createElement("div", { className: b$1('footer') }, (_b = (_a = this.props).renderFooter) === null || _b === void 0 ? void 0 : _b.call(_a, {
4110
+ const { compact, renderFooter } = this.props;
4111
+ return (React__default.createElement("div", { className: b$4('footer') }, renderFooter === null || renderFooter === void 0 ? void 0 : renderFooter({
4108
4112
  size,
4109
4113
  compact,
4110
4114
  asideRef: this.asideRef,
@@ -4112,44 +4116,34 @@ class AsideHeader extends React__default.Component {
4112
4116
  };
4113
4117
  this.renderPanels = (size) => {
4114
4118
  const { panelItems } = this.props;
4115
- return (React__default.createElement(Drawer, { className: b$1('panels'), onVeilClick: this.onCloseDrawer, onEscape: this.onCloseDrawer, style: { left: size } }, panelItems.map((item) => (React__default.createElement(DrawerItem, Object.assign({ key: item.id }, item))))));
4119
+ return (React__default.createElement(Drawer, { className: b$4('panels'), onVeilClick: this.onCloseDrawer, onEscape: this.onCloseDrawer, style: { left: size } }, panelItems.map((item) => (React__default.createElement(DrawerItem, Object.assign({ key: item.id }, item))))));
4116
4120
  };
4117
4121
  this.renderCollapseButton = () => {
4118
4122
  var _a;
4119
4123
  const { compact, dict } = this.props;
4120
4124
  const typeButton = compact ? Dict.ExpandButton : Dict.CollapseButton;
4121
- return (React__default.createElement(Button, { className: b$1('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[typeButton] },
4122
- React__default.createElement(Icon, { data: SvgControlMenuButton, className: b$1('collapse-icon'), width: "16", height: "10" })));
4125
+ return (React__default.createElement(Button, { className: b$4('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$1[typeButton] },
4126
+ React__default.createElement(Icon, { data: controlMenuButtonIcon, className: b$4('collapse-icon'), width: "16", height: "10" })));
4123
4127
  };
4124
4128
  this.onCollapseButtonClick = () => {
4125
4129
  var _a, _b;
4126
- const newCompact = !this.state.compact;
4127
- this.setState({ compact: newCompact });
4128
- (_b = (_a = this.props).onChangeCompact) === null || _b === void 0 ? void 0 : _b.call(_a, newCompact);
4130
+ (_b = (_a = this.props).onChangeCompact) === null || _b === void 0 ? void 0 : _b.call(_a, !this.props.compact);
4129
4131
  };
4130
4132
  this.onCloseDrawer = () => {
4131
4133
  var _a, _b;
4132
4134
  (_b = (_a = this.props).onClosePanel) === null || _b === void 0 ? void 0 : _b.call(_a);
4133
4135
  };
4134
- this.onCompositeBarClick = () => {
4135
- var _a, _b;
4136
+ this.onItemClick = (item, collapsed) => {
4137
+ var _a, _b, _c;
4136
4138
  (_b = (_a = this.props).onClosePanel) === null || _b === void 0 ? void 0 : _b.call(_a);
4137
- };
4138
- this.state = {
4139
- compact: Boolean(props.compact),
4139
+ (_c = item.onItemClick) === null || _c === void 0 ? void 0 : _c.call(item, item, collapsed);
4140
4140
  };
4141
4141
  }
4142
- componentDidUpdate(prevProps) {
4143
- if (prevProps.compact !== this.props.compact) {
4144
- this.setState({ compact: Boolean(this.props.compact) });
4145
- }
4146
- }
4147
4142
  render() {
4148
- const { className } = this.props;
4149
- const { compact } = this.state;
4143
+ const { className, compact } = this.props;
4150
4144
  const size = compact ? ASIDE_HEADER_COMPACT_WIDTH : ASIDE_HEADER_EXPANDED_WIDTH;
4151
- return (React__default.createElement("div", { className: b$1({ compact }, className) },
4152
- React__default.createElement("div", { className: b$1('pane-container') },
4145
+ return (React__default.createElement("div", { className: b$4({ compact }, className) },
4146
+ React__default.createElement("div", { className: b$4('pane-container') },
4153
4147
  this.renderFirstPane(size),
4154
4148
  this.renderSecondPane(size))));
4155
4149
  }
@@ -4187,14 +4181,931 @@ function __rest(s, e) {
4187
4181
  return t;
4188
4182
  }
4189
4183
 
4190
- var css_248z = ".ycn-footer-item {\n width: 100%;\n height: 40px;\n}";
4191
- styleInject(css_248z);
4184
+ var css_248z$2 = ".ycn-footer-item {\n width: 100%;\n height: 40px;\n}";
4185
+ styleInject(css_248z$2);
4192
4186
 
4193
- const b = block('footer-item');
4187
+ const b$3 = block('footer-item');
4194
4188
  const FooterItem = (_a) => {
4195
4189
  var { item } = _a, props = __rest(_a, ["item"]);
4196
- return (React__default.createElement(Item, Object.assign({}, props, { item: Object.assign({ iconSize: ASIDE_HEADER_FOOTER_ICON_SIZE }, item), className: b({ compact: props.compact }) })));
4190
+ return (React__default.createElement(Item, Object.assign({}, props, { item: Object.assign({ iconSize: ASIDE_HEADER_FOOTER_ICON_SIZE }, item), className: b$3({ compact: props.compact }), onItemClick: item.onItemClick })));
4191
+ };
4192
+
4193
+ /**
4194
+ * This method returns the first argument it receives.
4195
+ *
4196
+ * @static
4197
+ * @since 0.1.0
4198
+ * @memberOf _
4199
+ * @category Util
4200
+ * @param {*} value Any value.
4201
+ * @returns {*} Returns `value`.
4202
+ * @example
4203
+ *
4204
+ * var object = { 'a': 1 };
4205
+ *
4206
+ * console.log(_.identity(object) === object);
4207
+ * // => true
4208
+ */
4209
+
4210
+ function identity(value) {
4211
+ return value;
4212
+ }
4213
+
4214
+ var identity_1 = identity;
4215
+
4216
+ /**
4217
+ * Checks if `value` is the
4218
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
4219
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
4220
+ *
4221
+ * @static
4222
+ * @memberOf _
4223
+ * @since 0.1.0
4224
+ * @category Lang
4225
+ * @param {*} value The value to check.
4226
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
4227
+ * @example
4228
+ *
4229
+ * _.isObject({});
4230
+ * // => true
4231
+ *
4232
+ * _.isObject([1, 2, 3]);
4233
+ * // => true
4234
+ *
4235
+ * _.isObject(_.noop);
4236
+ * // => true
4237
+ *
4238
+ * _.isObject(null);
4239
+ * // => false
4240
+ */
4241
+
4242
+ function isObject$2(value) {
4243
+ var type = typeof value;
4244
+ return value != null && (type == 'object' || type == 'function');
4245
+ }
4246
+
4247
+ var isObject_1 = isObject$2;
4248
+
4249
+ /** Detect free variable `global` from Node.js. */
4250
+
4251
+ var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
4252
+
4253
+ var _freeGlobal = freeGlobal$1;
4254
+
4255
+ var freeGlobal = _freeGlobal;
4256
+
4257
+ /** Detect free variable `self`. */
4258
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
4259
+
4260
+ /** Used as a reference to the global object. */
4261
+ var root$2 = freeGlobal || freeSelf || Function('return this')();
4262
+
4263
+ var _root = root$2;
4264
+
4265
+ var root$1 = _root;
4266
+
4267
+ /**
4268
+ * Gets the timestamp of the number of milliseconds that have elapsed since
4269
+ * the Unix epoch (1 January 1970 00:00:00 UTC).
4270
+ *
4271
+ * @static
4272
+ * @memberOf _
4273
+ * @since 2.4.0
4274
+ * @category Date
4275
+ * @returns {number} Returns the timestamp.
4276
+ * @example
4277
+ *
4278
+ * _.defer(function(stamp) {
4279
+ * console.log(_.now() - stamp);
4280
+ * }, _.now());
4281
+ * // => Logs the number of milliseconds it took for the deferred invocation.
4282
+ */
4283
+ var now$1 = function() {
4284
+ return root$1.Date.now();
4285
+ };
4286
+
4287
+ var now_1 = now$1;
4288
+
4289
+ /** Used to match a single whitespace character. */
4290
+
4291
+ var reWhitespace = /\s/;
4292
+
4293
+ /**
4294
+ * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
4295
+ * character of `string`.
4296
+ *
4297
+ * @private
4298
+ * @param {string} string The string to inspect.
4299
+ * @returns {number} Returns the index of the last non-whitespace character.
4300
+ */
4301
+ function trimmedEndIndex$1(string) {
4302
+ var index = string.length;
4303
+
4304
+ while (index-- && reWhitespace.test(string.charAt(index))) {}
4305
+ return index;
4306
+ }
4307
+
4308
+ var _trimmedEndIndex = trimmedEndIndex$1;
4309
+
4310
+ var trimmedEndIndex = _trimmedEndIndex;
4311
+
4312
+ /** Used to match leading whitespace. */
4313
+ var reTrimStart = /^\s+/;
4314
+
4315
+ /**
4316
+ * The base implementation of `_.trim`.
4317
+ *
4318
+ * @private
4319
+ * @param {string} string The string to trim.
4320
+ * @returns {string} Returns the trimmed string.
4321
+ */
4322
+ function baseTrim$1(string) {
4323
+ return string
4324
+ ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
4325
+ : string;
4326
+ }
4327
+
4328
+ var _baseTrim = baseTrim$1;
4329
+
4330
+ var root = _root;
4331
+
4332
+ /** Built-in value references. */
4333
+ var Symbol$3 = root.Symbol;
4334
+
4335
+ var _Symbol = Symbol$3;
4336
+
4337
+ var Symbol$2 = _Symbol;
4338
+
4339
+ /** Used for built-in method references. */
4340
+ var objectProto$1 = Object.prototype;
4341
+
4342
+ /** Used to check objects for own properties. */
4343
+ var hasOwnProperty = objectProto$1.hasOwnProperty;
4344
+
4345
+ /**
4346
+ * Used to resolve the
4347
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
4348
+ * of values.
4349
+ */
4350
+ var nativeObjectToString$1 = objectProto$1.toString;
4351
+
4352
+ /** Built-in value references. */
4353
+ var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : undefined;
4354
+
4355
+ /**
4356
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
4357
+ *
4358
+ * @private
4359
+ * @param {*} value The value to query.
4360
+ * @returns {string} Returns the raw `toStringTag`.
4361
+ */
4362
+ function getRawTag$1(value) {
4363
+ var isOwn = hasOwnProperty.call(value, symToStringTag$1),
4364
+ tag = value[symToStringTag$1];
4365
+
4366
+ try {
4367
+ value[symToStringTag$1] = undefined;
4368
+ var unmasked = true;
4369
+ } catch (e) {}
4370
+
4371
+ var result = nativeObjectToString$1.call(value);
4372
+ if (unmasked) {
4373
+ if (isOwn) {
4374
+ value[symToStringTag$1] = tag;
4375
+ } else {
4376
+ delete value[symToStringTag$1];
4377
+ }
4378
+ }
4379
+ return result;
4380
+ }
4381
+
4382
+ var _getRawTag = getRawTag$1;
4383
+
4384
+ /** Used for built-in method references. */
4385
+
4386
+ var objectProto = Object.prototype;
4387
+
4388
+ /**
4389
+ * Used to resolve the
4390
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
4391
+ * of values.
4392
+ */
4393
+ var nativeObjectToString = objectProto.toString;
4394
+
4395
+ /**
4396
+ * Converts `value` to a string using `Object.prototype.toString`.
4397
+ *
4398
+ * @private
4399
+ * @param {*} value The value to convert.
4400
+ * @returns {string} Returns the converted string.
4401
+ */
4402
+ function objectToString$1(value) {
4403
+ return nativeObjectToString.call(value);
4404
+ }
4405
+
4406
+ var _objectToString = objectToString$1;
4407
+
4408
+ var Symbol$1 = _Symbol,
4409
+ getRawTag = _getRawTag,
4410
+ objectToString = _objectToString;
4411
+
4412
+ /** `Object#toString` result references. */
4413
+ var nullTag = '[object Null]',
4414
+ undefinedTag = '[object Undefined]';
4415
+
4416
+ /** Built-in value references. */
4417
+ var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
4418
+
4419
+ /**
4420
+ * The base implementation of `getTag` without fallbacks for buggy environments.
4421
+ *
4422
+ * @private
4423
+ * @param {*} value The value to query.
4424
+ * @returns {string} Returns the `toStringTag`.
4425
+ */
4426
+ function baseGetTag$1(value) {
4427
+ if (value == null) {
4428
+ return value === undefined ? undefinedTag : nullTag;
4429
+ }
4430
+ return (symToStringTag && symToStringTag in Object(value))
4431
+ ? getRawTag(value)
4432
+ : objectToString(value);
4433
+ }
4434
+
4435
+ var _baseGetTag = baseGetTag$1;
4436
+
4437
+ /**
4438
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
4439
+ * and has a `typeof` result of "object".
4440
+ *
4441
+ * @static
4442
+ * @memberOf _
4443
+ * @since 4.0.0
4444
+ * @category Lang
4445
+ * @param {*} value The value to check.
4446
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
4447
+ * @example
4448
+ *
4449
+ * _.isObjectLike({});
4450
+ * // => true
4451
+ *
4452
+ * _.isObjectLike([1, 2, 3]);
4453
+ * // => true
4454
+ *
4455
+ * _.isObjectLike(_.noop);
4456
+ * // => false
4457
+ *
4458
+ * _.isObjectLike(null);
4459
+ * // => false
4460
+ */
4461
+
4462
+ function isObjectLike$1(value) {
4463
+ return value != null && typeof value == 'object';
4464
+ }
4465
+
4466
+ var isObjectLike_1 = isObjectLike$1;
4467
+
4468
+ var baseGetTag = _baseGetTag,
4469
+ isObjectLike = isObjectLike_1;
4470
+
4471
+ /** `Object#toString` result references. */
4472
+ var symbolTag = '[object Symbol]';
4473
+
4474
+ /**
4475
+ * Checks if `value` is classified as a `Symbol` primitive or object.
4476
+ *
4477
+ * @static
4478
+ * @memberOf _
4479
+ * @since 4.0.0
4480
+ * @category Lang
4481
+ * @param {*} value The value to check.
4482
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
4483
+ * @example
4484
+ *
4485
+ * _.isSymbol(Symbol.iterator);
4486
+ * // => true
4487
+ *
4488
+ * _.isSymbol('abc');
4489
+ * // => false
4490
+ */
4491
+ function isSymbol$1(value) {
4492
+ return typeof value == 'symbol' ||
4493
+ (isObjectLike(value) && baseGetTag(value) == symbolTag);
4494
+ }
4495
+
4496
+ var isSymbol_1 = isSymbol$1;
4497
+
4498
+ var baseTrim = _baseTrim,
4499
+ isObject$1 = isObject_1,
4500
+ isSymbol = isSymbol_1;
4501
+
4502
+ /** Used as references for various `Number` constants. */
4503
+ var NAN = 0 / 0;
4504
+
4505
+ /** Used to detect bad signed hexadecimal string values. */
4506
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
4507
+
4508
+ /** Used to detect binary string values. */
4509
+ var reIsBinary = /^0b[01]+$/i;
4510
+
4511
+ /** Used to detect octal string values. */
4512
+ var reIsOctal = /^0o[0-7]+$/i;
4513
+
4514
+ /** Built-in method references without a dependency on `root`. */
4515
+ var freeParseInt = parseInt;
4516
+
4517
+ /**
4518
+ * Converts `value` to a number.
4519
+ *
4520
+ * @static
4521
+ * @memberOf _
4522
+ * @since 4.0.0
4523
+ * @category Lang
4524
+ * @param {*} value The value to process.
4525
+ * @returns {number} Returns the number.
4526
+ * @example
4527
+ *
4528
+ * _.toNumber(3.2);
4529
+ * // => 3.2
4530
+ *
4531
+ * _.toNumber(Number.MIN_VALUE);
4532
+ * // => 5e-324
4533
+ *
4534
+ * _.toNumber(Infinity);
4535
+ * // => Infinity
4536
+ *
4537
+ * _.toNumber('3.2');
4538
+ * // => 3.2
4539
+ */
4540
+ function toNumber$1(value) {
4541
+ if (typeof value == 'number') {
4542
+ return value;
4543
+ }
4544
+ if (isSymbol(value)) {
4545
+ return NAN;
4546
+ }
4547
+ if (isObject$1(value)) {
4548
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
4549
+ value = isObject$1(other) ? (other + '') : other;
4550
+ }
4551
+ if (typeof value != 'string') {
4552
+ return value === 0 ? value : +value;
4553
+ }
4554
+ value = baseTrim(value);
4555
+ var isBinary = reIsBinary.test(value);
4556
+ return (isBinary || reIsOctal.test(value))
4557
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
4558
+ : (reIsBadHex.test(value) ? NAN : +value);
4559
+ }
4560
+
4561
+ var toNumber_1 = toNumber$1;
4562
+
4563
+ var isObject = isObject_1,
4564
+ now = now_1,
4565
+ toNumber = toNumber_1;
4566
+
4567
+ /** Error message constants. */
4568
+ var FUNC_ERROR_TEXT = 'Expected a function';
4569
+
4570
+ /* Built-in method references for those with the same name as other `lodash` methods. */
4571
+ var nativeMax = Math.max,
4572
+ nativeMin = Math.min;
4573
+
4574
+ /**
4575
+ * Creates a debounced function that delays invoking `func` until after `wait`
4576
+ * milliseconds have elapsed since the last time the debounced function was
4577
+ * invoked. The debounced function comes with a `cancel` method to cancel
4578
+ * delayed `func` invocations and a `flush` method to immediately invoke them.
4579
+ * Provide `options` to indicate whether `func` should be invoked on the
4580
+ * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
4581
+ * with the last arguments provided to the debounced function. Subsequent
4582
+ * calls to the debounced function return the result of the last `func`
4583
+ * invocation.
4584
+ *
4585
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
4586
+ * invoked on the trailing edge of the timeout only if the debounced function
4587
+ * is invoked more than once during the `wait` timeout.
4588
+ *
4589
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
4590
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
4591
+ *
4592
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
4593
+ * for details over the differences between `_.debounce` and `_.throttle`.
4594
+ *
4595
+ * @static
4596
+ * @memberOf _
4597
+ * @since 0.1.0
4598
+ * @category Function
4599
+ * @param {Function} func The function to debounce.
4600
+ * @param {number} [wait=0] The number of milliseconds to delay.
4601
+ * @param {Object} [options={}] The options object.
4602
+ * @param {boolean} [options.leading=false]
4603
+ * Specify invoking on the leading edge of the timeout.
4604
+ * @param {number} [options.maxWait]
4605
+ * The maximum time `func` is allowed to be delayed before it's invoked.
4606
+ * @param {boolean} [options.trailing=true]
4607
+ * Specify invoking on the trailing edge of the timeout.
4608
+ * @returns {Function} Returns the new debounced function.
4609
+ * @example
4610
+ *
4611
+ * // Avoid costly calculations while the window size is in flux.
4612
+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
4613
+ *
4614
+ * // Invoke `sendMail` when clicked, debouncing subsequent calls.
4615
+ * jQuery(element).on('click', _.debounce(sendMail, 300, {
4616
+ * 'leading': true,
4617
+ * 'trailing': false
4618
+ * }));
4619
+ *
4620
+ * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
4621
+ * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
4622
+ * var source = new EventSource('/stream');
4623
+ * jQuery(source).on('message', debounced);
4624
+ *
4625
+ * // Cancel the trailing debounced invocation.
4626
+ * jQuery(window).on('popstate', debounced.cancel);
4627
+ */
4628
+ function debounce(func, wait, options) {
4629
+ var lastArgs,
4630
+ lastThis,
4631
+ maxWait,
4632
+ result,
4633
+ timerId,
4634
+ lastCallTime,
4635
+ lastInvokeTime = 0,
4636
+ leading = false,
4637
+ maxing = false,
4638
+ trailing = true;
4639
+
4640
+ if (typeof func != 'function') {
4641
+ throw new TypeError(FUNC_ERROR_TEXT);
4642
+ }
4643
+ wait = toNumber(wait) || 0;
4644
+ if (isObject(options)) {
4645
+ leading = !!options.leading;
4646
+ maxing = 'maxWait' in options;
4647
+ maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
4648
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
4649
+ }
4650
+
4651
+ function invokeFunc(time) {
4652
+ var args = lastArgs,
4653
+ thisArg = lastThis;
4654
+
4655
+ lastArgs = lastThis = undefined;
4656
+ lastInvokeTime = time;
4657
+ result = func.apply(thisArg, args);
4658
+ return result;
4659
+ }
4660
+
4661
+ function leadingEdge(time) {
4662
+ // Reset any `maxWait` timer.
4663
+ lastInvokeTime = time;
4664
+ // Start the timer for the trailing edge.
4665
+ timerId = setTimeout(timerExpired, wait);
4666
+ // Invoke the leading edge.
4667
+ return leading ? invokeFunc(time) : result;
4668
+ }
4669
+
4670
+ function remainingWait(time) {
4671
+ var timeSinceLastCall = time - lastCallTime,
4672
+ timeSinceLastInvoke = time - lastInvokeTime,
4673
+ timeWaiting = wait - timeSinceLastCall;
4674
+
4675
+ return maxing
4676
+ ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
4677
+ : timeWaiting;
4678
+ }
4679
+
4680
+ function shouldInvoke(time) {
4681
+ var timeSinceLastCall = time - lastCallTime,
4682
+ timeSinceLastInvoke = time - lastInvokeTime;
4683
+
4684
+ // Either this is the first call, activity has stopped and we're at the
4685
+ // trailing edge, the system time has gone backwards and we're treating
4686
+ // it as the trailing edge, or we've hit the `maxWait` limit.
4687
+ return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
4688
+ (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
4689
+ }
4690
+
4691
+ function timerExpired() {
4692
+ var time = now();
4693
+ if (shouldInvoke(time)) {
4694
+ return trailingEdge(time);
4695
+ }
4696
+ // Restart the timer.
4697
+ timerId = setTimeout(timerExpired, remainingWait(time));
4698
+ }
4699
+
4700
+ function trailingEdge(time) {
4701
+ timerId = undefined;
4702
+
4703
+ // Only invoke if we have `lastArgs` which means `func` has been
4704
+ // debounced at least once.
4705
+ if (trailing && lastArgs) {
4706
+ return invokeFunc(time);
4707
+ }
4708
+ lastArgs = lastThis = undefined;
4709
+ return result;
4710
+ }
4711
+
4712
+ function cancel() {
4713
+ if (timerId !== undefined) {
4714
+ clearTimeout(timerId);
4715
+ }
4716
+ lastInvokeTime = 0;
4717
+ lastArgs = lastCallTime = lastThis = timerId = undefined;
4718
+ }
4719
+
4720
+ function flush() {
4721
+ return timerId === undefined ? result : trailingEdge(now());
4722
+ }
4723
+
4724
+ function debounced() {
4725
+ var time = now(),
4726
+ isInvoking = shouldInvoke(time);
4727
+
4728
+ lastArgs = arguments;
4729
+ lastThis = this;
4730
+ lastCallTime = time;
4731
+
4732
+ if (isInvoking) {
4733
+ if (timerId === undefined) {
4734
+ return leadingEdge(lastCallTime);
4735
+ }
4736
+ if (maxing) {
4737
+ // Handle invocations in a tight loop.
4738
+ clearTimeout(timerId);
4739
+ timerId = setTimeout(timerExpired, wait);
4740
+ return invokeFunc(lastCallTime);
4741
+ }
4742
+ }
4743
+ if (timerId === undefined) {
4744
+ timerId = setTimeout(timerExpired, wait);
4745
+ }
4746
+ return result;
4747
+ }
4748
+ debounced.cancel = cancel;
4749
+ debounced.flush = flush;
4750
+ return debounced;
4751
+ }
4752
+
4753
+ var debounce_1 = debounce;
4754
+
4755
+ function useStableCallback(func) {
4756
+ const funcRef = React.useRef();
4757
+ React.useEffect(() => {
4758
+ funcRef.current = func;
4759
+ return () => {
4760
+ funcRef.current = undefined;
4761
+ };
4762
+ }, [func]);
4763
+ return React.useCallback((...args) => {
4764
+ if (typeof funcRef.current === 'function') {
4765
+ return funcRef.current(...args);
4766
+ }
4767
+ return undefined;
4768
+ }, []);
4769
+ }
4770
+ function useCurrent(value) {
4771
+ const ref = React.useRef(value);
4772
+ ref.current = value;
4773
+ return React.useCallback(() => ref.current, []);
4774
+ }
4775
+ function invariant(cond, message) {
4776
+ if (!cond) {
4777
+ throw new Error(message);
4778
+ }
4779
+ }
4780
+ function escapeStringForRegExp(input) {
4781
+ return input.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
4782
+ }
4783
+
4784
+ const b$2 = block('settings-search');
4785
+ function SettingsSearch({ className, onChange, debounce = 200, inputRef, placeholder, }) {
4786
+ const onChangeStable = useStableCallback(onChange);
4787
+ const handleUpdate = React__default.useCallback(debounce_1(onChangeStable, debounce), [debounce]);
4788
+ return (React__default.createElement("div", { className: b$2(null, className) },
4789
+ React__default.createElement(TextInput, { controlRef: inputRef, hasClear: true, autoFocus: true, placeholder: placeholder, onUpdate: handleUpdate })));
4790
+ }
4791
+
4792
+ var css_248z$1 = ".ycn-settings-menu__group-heading {\n font-weight: var(--yc-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(--yc-color-text-primary);\n}\n.ycn-settings-menu__item-icon {\n color: var(--yc-color-text-misc);\n margin-right: 5px;\n}\n.ycn-settings-menu__item:hover, .ycn-settings-menu__item_focused {\n background: var(--yc-color-base-simple-hover);\n}\n.ycn-settings-menu__item_selected {\n background: var(--yc-color-base-selection);\n}\n.ycn-settings-menu__item_selected:hover, .ycn-settings-menu__item_selected.ycn-settings-menu__item_focused {\n background: var(--yc-color-base-selection-hover);\n}\n.ycn-settings-menu__item_disabled {\n color: var(--yc-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(--yc-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(--yc-color-text-danger);\n position: absolute;\n right: 9px;\n top: calc(50% - 3px);\n}";
4793
+ styleInject(css_248z$1);
4794
+
4795
+ const b$1 = block('settings-menu');
4796
+ const SettingsMenu = React__default.forwardRef(
4797
+ // eslint-disable-next-line prefer-arrow-callback
4798
+ function SettingsMenu({ items, onChange, activeItem }, ref) {
4799
+ const [focusItem, setFocus] = React__default.useState();
4800
+ const containerRef = React__default.useRef(null);
4801
+ const handleChange = useStableCallback(onChange);
4802
+ const getFocused = useCurrent(focusItem);
4803
+ React__default.useImperativeHandle(ref, () => ({
4804
+ handleKeyDown(event) {
4805
+ if (!containerRef.current) {
4806
+ return false;
4807
+ }
4808
+ const focused = getFocused();
4809
+ if (focused && event.key === 'Enter') {
4810
+ handleChange(focused);
4811
+ return true;
4812
+ }
4813
+ else if (event.key === 'ArrowDown') {
4814
+ setFocus(focusNext(containerRef.current, focused, 1));
4815
+ return true;
4816
+ }
4817
+ else if (event.key === 'ArrowUp') {
4818
+ setFocus(focusNext(containerRef.current, focused, -1));
4819
+ return true;
4820
+ }
4821
+ return false;
4822
+ },
4823
+ clearFocus() {
4824
+ setFocus(undefined);
4825
+ },
4826
+ }), [getFocused, handleChange]);
4827
+ return (React__default.createElement("div", { ref: containerRef, className: b$1() }, items.map((firstLevelItem) => {
4828
+ if ('groupTitle' in firstLevelItem) {
4829
+ return (React__default.createElement("div", { key: firstLevelItem.groupTitle, className: b$1('group') },
4830
+ React__default.createElement("span", { className: b$1('group-heading') }, firstLevelItem.groupTitle),
4831
+ firstLevelItem.items.map((item) => {
4832
+ return renderMenuItem(item, onChange, activeItem, focusItem);
4833
+ })));
4834
+ }
4835
+ return renderMenuItem(firstLevelItem, onChange, activeItem, focusItem);
4836
+ })));
4837
+ });
4838
+ function renderMenuItem(item, onChange, activeItem, focusItem) {
4839
+ return (React__default.createElement("span", { key: item.title, className: b$1('item', {
4840
+ selected: activeItem === item.id,
4841
+ disabled: item.disabled,
4842
+ focused: focusItem === item.id,
4843
+ badge: item.withBadge,
4844
+ }), onClick: () => {
4845
+ if (!item.disabled) {
4846
+ onChange(item.id);
4847
+ }
4848
+ }, "data-id": item.id },
4849
+ item.icon ? React__default.createElement(Icon, Object.assign({ size: 16 }, item.icon, { className: b$1('item-icon') })) : undefined,
4850
+ React__default.createElement("span", null, item.title)));
4851
+ }
4852
+ function focusNext(container, focused, direction) {
4853
+ var _a;
4854
+ const elements = container.querySelectorAll(`.${b$1('item')}:not(.${b$1('item')}_disabled)`);
4855
+ if (elements.length === 0) {
4856
+ return undefined;
4857
+ }
4858
+ let currentIndex = direction > 0 ? -1 : 0;
4859
+ if (focused) {
4860
+ currentIndex = Array.prototype.findIndex.call(elements, (element) => element.getAttribute('data-id') === focused);
4861
+ }
4862
+ currentIndex = (elements.length + currentIndex + direction) % elements.length;
4863
+ return (_a = elements[currentIndex].getAttribute('data-id')) !== null && _a !== void 0 ? _a : undefined;
4864
+ }
4865
+
4866
+ function getSettingsFromChildren(children, searchText = '') {
4867
+ // 'abc def fg' -> abc.*?cde.*?fg
4868
+ const preparedFilter = escapeStringForRegExp(searchText).replace(/\s+/g, '.*?');
4869
+ const filterRe = new RegExp(preparedFilter, 'i');
4870
+ return getSettingsFromChildrenRecursive(children, '', filterRe);
4871
+ }
4872
+ function getSettingsFromChildrenRecursive(children, basepath = '', filterRe) {
4873
+ const menu = [];
4874
+ const pages = {};
4875
+ let hasGroup = false;
4876
+ let hasItems = false;
4877
+ React__default.Children.forEach(children, (element) => {
4878
+ var _a, _b;
4879
+ if (!React__default.isValidElement(element)) {
4880
+ // Ignore non-elements.
4881
+ return;
4882
+ }
4883
+ if (element.type === React__default.Fragment) {
4884
+ // Transparently support React.Fragment and its children.
4885
+ const { menu: menuFragment, pages: pagesFragment } = getSettingsFromChildrenRecursive(element.props.children, basepath, filterRe);
4886
+ menu.push(...menuFragment);
4887
+ Object.assign(pages, pagesFragment);
4888
+ }
4889
+ else if (element.props.groupTitle) {
4890
+ if (process.env.NODE_ENV === 'development') {
4891
+ invariant(!hasItems, 'Setting menu must not mix groups and pages on one level');
4892
+ }
4893
+ const pageId = `${basepath}/${(_a = element.props.id) !== null && _a !== void 0 ? _a : element.props.groupTitle}`;
4894
+ hasGroup = true;
4895
+ const { menu: menuFragment, pages: pagesFragment } = getSettingsFromChildrenRecursive(element.props.children, pageId, filterRe);
4896
+ if (process.env.NODE_ENV === 'development') {
4897
+ const hasInnerGroup = menuFragment.some((item) => 'groupTitle' in item);
4898
+ invariant(!hasInnerGroup, `Group ${element.props.groupTitle} should not include groups`);
4899
+ }
4900
+ menu.push({
4901
+ groupTitle: element.props.groupTitle,
4902
+ // @ts-ignore
4903
+ items: menuFragment,
4904
+ });
4905
+ Object.assign(pages, pagesFragment);
4906
+ }
4907
+ else {
4908
+ hasItems = true;
4909
+ const pageId = `${basepath}/${(_b = element.props.id) !== null && _b !== void 0 ? _b : element.props.title}`;
4910
+ if (process.env.NODE_ENV === 'development') {
4911
+ invariant(Boolean(element.props.title), 'Component must include title prop');
4912
+ invariant(!hasGroup, 'Setting menu must not mix groups and pages on one level');
4913
+ invariant(!pages[pageId], `Setting menu page id must be uniq (${pageId})`);
4914
+ }
4915
+ pages[pageId] = getSettingsPageFromChildren(element.props.children, filterRe);
4916
+ pages[pageId].id = pageId;
4917
+ menu.push({
4918
+ id: pageId,
4919
+ title: element.props.title,
4920
+ icon: element.props.icon,
4921
+ withBadge: pages[pageId].withBadge,
4922
+ disabled: pages[pageId].hidden,
4923
+ });
4924
+ }
4925
+ });
4926
+ return { menu, pages };
4927
+ }
4928
+ function getSettingsPageFromChildren(children, filterRe) {
4929
+ const page = { id: '', sections: [], hidden: true };
4930
+ React__default.Children.forEach(children, (element) => {
4931
+ if (!React__default.isValidElement(element)) {
4932
+ // Ignore non-elements.
4933
+ return;
4934
+ }
4935
+ if (element.type === React__default.Fragment) {
4936
+ // Transparently support React.Fragment and its children.
4937
+ const { sections, withBadge, hidden } = getSettingsPageFromChildren(element.props.children, filterRe);
4938
+ page.sections.push(...sections);
4939
+ page.withBadge = withBadge || page.withBadge;
4940
+ page.hidden = hidden && page.hidden;
4941
+ }
4942
+ else {
4943
+ const { title, header, withBadge } = element.props;
4944
+ const { items, hidden } = getSettingsItemsFromChildren(element.props.children, filterRe);
4945
+ page.withBadge = withBadge || page.withBadge;
4946
+ page.hidden = hidden && page.hidden;
4947
+ page.sections.push({
4948
+ title,
4949
+ header,
4950
+ withBadge,
4951
+ items,
4952
+ hidden,
4953
+ });
4954
+ }
4955
+ });
4956
+ return page;
4957
+ }
4958
+ function getSettingsItemsFromChildren(children, filterRe) {
4959
+ let hidden = true;
4960
+ const items = [];
4961
+ React__default.Children.forEach(children, (element) => {
4962
+ if (!React__default.isValidElement(element)) {
4963
+ // Ignore non-elements.
4964
+ return;
4965
+ }
4966
+ if (element.type === React__default.Fragment) {
4967
+ // Transparently support React.Fragment and its children.
4968
+ const fragmentItems = getSettingsItemsFromChildren(element.props.children, filterRe);
4969
+ items.push(...fragmentItems.items);
4970
+ hidden = hidden && fragmentItems.hidden;
4971
+ }
4972
+ else {
4973
+ const item = {
4974
+ title: element.props.title,
4975
+ renderTitleComponent: element.props.renderTitleComponent,
4976
+ element,
4977
+ hidden: !filterRe.test(element.props.title),
4978
+ };
4979
+ items.push(item);
4980
+ hidden = hidden && item.hidden;
4981
+ }
4982
+ });
4983
+ return { items, hidden };
4984
+ }
4985
+
4986
+ var css_248z = ".ycn-settings {\n display: grid;\n grid-template-columns: 216px 1fr;\n width: 834px;\n height: 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(--yc-color-line-generic);\n}\n.ycn-settings__heading {\n font-size: var(--yc-text-subheader-2-font-size);\n line-height: var(--yc-text-subheader-2-line-height);\n font-weight: var(--yc-text-subheader-font-weight);\n margin: 20px 20px 0;\n}\n.ycn-settings__search {\n margin: 12px 20px 16px;\n}\n.ycn-settings__page {\n padding: 20px;\n overflow-y: auto;\n}\n.ycn-settings__section-heading {\n font-size: var(--yc-text-subheader-2-font-size);\n line-height: var(--yc-text-subheader-2-line-height);\n font-weight: var(--yc-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-heading_badge {\n position: relative;\n}\n.ycn-settings__item-heading_badge::after {\n content: \"\";\n display: block;\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background-color: var(--yc-color-text-danger);\n position: absolute;\n right: -8px;\n top: 1px;\n}\n.ycn-settings__found {\n font-weight: var(--yc-text-accent-font-weight);\n background: var(--yc-color-base-selection);\n}";
4987
+ styleInject(css_248z);
4988
+
4989
+ const b = block('settings');
4990
+ const defaultDict = {
4991
+ heading_settings: 'Settings',
4992
+ placeholder_search: 'Search settings',
4993
+ not_found: 'No results found',
4994
+ };
4995
+ function Settings(_a) {
4996
+ var { loading, renderLoading, children } = _a, props = __rest(_a, ["loading", "renderLoading", "children"]);
4997
+ if (loading) {
4998
+ return (React__default.createElement("div", { className: b({ loading: true }) }, typeof renderLoading === 'function' ? (renderLoading()) : (React__default.createElement(Loader, { className: b('loader'), size: "m" }))));
4999
+ }
5000
+ return React__default.createElement(SettingsContent, Object.assign({}, props), children);
5001
+ }
5002
+ Settings.defaultProps = {
5003
+ dict: defaultDict,
5004
+ };
5005
+ function SettingsContent({ initialPage, onPageChange, children, renderNotFound, dict, }) {
5006
+ var _a, _b;
5007
+ const [search, setSearch] = React__default.useState('');
5008
+ const { menu, pages } = getSettingsFromChildren(children, search);
5009
+ const pageKeys = Object.keys(pages);
5010
+ const [selectedPage, setCurrentPage] = React__default.useState(initialPage && pageKeys.includes(initialPage) ? initialPage : undefined);
5011
+ const searchInputRef = React__default.useRef(null);
5012
+ const menuRef = React__default.useRef(null);
5013
+ React__default.useEffect(() => {
5014
+ var _a;
5015
+ (_a = menuRef.current) === null || _a === void 0 ? void 0 : _a.clearFocus();
5016
+ }, [search]);
5017
+ React__default.useEffect(() => {
5018
+ const handler = () => {
5019
+ var _a;
5020
+ (_a = menuRef.current) === null || _a === void 0 ? void 0 : _a.clearFocus();
5021
+ };
5022
+ window.addEventListener('click', handler);
5023
+ return () => {
5024
+ window.removeEventListener('click', handler);
5025
+ };
5026
+ }, []);
5027
+ let activePage = selectedPage;
5028
+ if (!activePage || ((_a = pages[activePage]) === null || _a === void 0 ? void 0 : _a.hidden)) {
5029
+ activePage = (_b = Object.values(pages).find(({ hidden }) => !hidden)) === null || _b === void 0 ? void 0 : _b.id;
5030
+ }
5031
+ const handlePageChange = (newPage) => {
5032
+ setCurrentPage((prevPage) => {
5033
+ if (prevPage !== newPage) {
5034
+ onPageChange === null || onPageChange === void 0 ? void 0 : onPageChange(newPage);
5035
+ }
5036
+ return newPage;
5037
+ });
5038
+ };
5039
+ React__default.useEffect(() => {
5040
+ if (activePage !== selectedPage) {
5041
+ handlePageChange(activePage);
5042
+ }
5043
+ });
5044
+ const renderPageContent = () => {
5045
+ if (!activePage) {
5046
+ return typeof renderNotFound === 'function' ? (renderNotFound()) : (React__default.createElement("div", { className: b('not-found') }, dict === null || dict === void 0 ? void 0 : dict.not_found));
5047
+ }
5048
+ return pages[activePage].sections
5049
+ .filter((section) => !section.hidden)
5050
+ .map((section) => (React__default.createElement("div", { key: section.title, className: b('section') },
5051
+ React__default.createElement("h3", { className: b('section-heading') }, section.title),
5052
+ section.header ? section.header : null,
5053
+ section.items.map(({ hidden, title, element }) => hidden ? null : (React__default.createElement("div", { key: title, className: b('section-item') }, React__default.cloneElement(element, Object.assign(Object.assign({}, element.props), { title: search && title ? prepareTitle(title, search) : title }))))))));
5054
+ };
5055
+ return (React__default.createElement("div", { className: b() },
5056
+ React__default.createElement("div", { className: b('menu'), onClick: () => {
5057
+ if (searchInputRef.current) {
5058
+ searchInputRef.current.focus();
5059
+ }
5060
+ }, onKeyDown: (event) => {
5061
+ if (menuRef.current) {
5062
+ if (menuRef.current.handleKeyDown(event)) {
5063
+ event.preventDefault();
5064
+ }
5065
+ }
5066
+ } },
5067
+ React__default.createElement("h2", { className: b('heading') }, dict === null || dict === void 0 ? void 0 : dict.heading_settings),
5068
+ React__default.createElement(SettingsSearch, { inputRef: searchInputRef, className: b('search'), onChange: setSearch, placeholder: dict === null || dict === void 0 ? void 0 : dict.placeholder_search }),
5069
+ React__default.createElement(SettingsMenu, { ref: menuRef, items: menu, onChange: handlePageChange, activeItem: activePage })),
5070
+ React__default.createElement("div", { className: b('page') }, renderPageContent())));
5071
+ }
5072
+ Settings.Group = function SettingsGroup({ children }) {
5073
+ return React__default.createElement(React__default.Fragment, null, children);
5074
+ };
5075
+ Settings.Page = function SettingsPage({ children }) {
5076
+ return React__default.createElement(React__default.Fragment, null, children);
5077
+ };
5078
+ Settings.Section = function SettingsSection({ children }) {
5079
+ return React__default.createElement(React__default.Fragment, null, children);
5080
+ };
5081
+ Settings.Item = function SettingsItem({ title, children, align = 'center', withBadge, renderTitleComponent = identity_1, }) {
5082
+ return (React__default.createElement("div", { className: b('item', { align }) },
5083
+ React__default.createElement("label", { className: b('item-heading', { badge: withBadge }) }, renderTitleComponent(title)),
5084
+ React__default.createElement("div", null, children)));
4197
5085
  };
5086
+ function prepareTitle(string, search) {
5087
+ let temp = string.slice(0);
5088
+ const title = [];
5089
+ const parts = escapeStringForRegExp(search).split(' ').filter(Boolean);
5090
+ let key = 0;
5091
+ for (const part of parts) {
5092
+ const regex = new RegExp(part, 'ig');
5093
+ const match = regex.exec(temp);
5094
+ if (match) {
5095
+ const m = match[0];
5096
+ const i = match.index;
5097
+ if (i > 0) {
5098
+ title.push(temp.slice(0, i));
5099
+ }
5100
+ title.push(React__default.createElement("strong", { key: key++, className: b('found') }, m));
5101
+ temp = temp.slice(i + m.length);
5102
+ }
5103
+ }
5104
+ if (temp) {
5105
+ title.push(temp);
5106
+ }
5107
+ return title;
5108
+ }
4198
5109
 
4199
- export { PublicActionBar as ActionBar, AsideHeader, Dict, Drawer, DrawerItem, FooterItem };
5110
+ export { PublicActionBar as ActionBar, AsideHeader, Dict, Drawer, DrawerItem, FooterItem, Settings };
4200
5111
  //# sourceMappingURL=index.js.map