@gravity-ui/navigation 2.3.1 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/README.md +2 -0
  2. package/build/cjs/AsideHeader.js +1 -1
  3. package/build/cjs/{FooterItem-f6a1d34b.js → FooterItem-3bd7bdc7.js} +4 -4
  4. package/build/cjs/FooterItem-3bd7bdc7.js.map +1 -0
  5. package/build/cjs/PageLayout.js +1 -1
  6. package/build/cjs/{PageLayoutAside-f05a501f.js → PageLayoutAside-27cb5df9.js} +7 -7
  7. package/build/cjs/PageLayoutAside-27cb5df9.js.map +1 -0
  8. package/build/cjs/PageLayoutAside.js +1 -1
  9. package/build/cjs/components/Footer/MenuItem/MenuItem.d.ts +5 -0
  10. package/build/cjs/components/Footer/desktop/Footer.d.ts +4 -0
  11. package/build/cjs/components/Footer/desktop/constants/moreItemsPopupProps.d.ts +2 -0
  12. package/build/cjs/components/Footer/desktop/index.d.ts +1 -0
  13. package/build/cjs/components/Footer/index.d.ts +3 -0
  14. package/build/cjs/components/Footer/mobile/Footer.d.ts +4 -0
  15. package/build/cjs/components/Footer/mobile/index.d.ts +1 -0
  16. package/build/cjs/components/Footer/types.d.ts +16 -0
  17. package/build/cjs/components/Logo/Logo.d.ts +2 -0
  18. package/build/cjs/components/index.d.ts +1 -0
  19. package/build/cjs/components/types.d.ts +1 -0
  20. package/build/cjs/hooks/useOverflowingHorizontalListItems/index.d.ts +1 -0
  21. package/build/cjs/hooks/useOverflowingHorizontalListItems/useOverflowingHorizontalListItems.d.ts +12 -0
  22. package/build/cjs/index.js +150 -10
  23. package/build/cjs/index.js.map +1 -1
  24. package/build/cjs/index6.js +1 -1
  25. package/build/esm/AsideHeader.js +1 -1
  26. package/build/esm/{FooterItem-f4ec6e5b.js → FooterItem-58eb8d93.js} +4 -4
  27. package/build/esm/FooterItem-58eb8d93.js.map +1 -0
  28. package/build/esm/PageLayout.js +1 -1
  29. package/build/esm/{PageLayoutAside-39c04908.js → PageLayoutAside-8e7666c7.js} +7 -7
  30. package/build/esm/PageLayoutAside-8e7666c7.js.map +1 -0
  31. package/build/esm/PageLayoutAside.js +1 -1
  32. package/build/esm/components/Footer/MenuItem/MenuItem.d.ts +5 -0
  33. package/build/esm/components/Footer/desktop/Footer.d.ts +4 -0
  34. package/build/esm/components/Footer/desktop/constants/moreItemsPopupProps.d.ts +2 -0
  35. package/build/esm/components/Footer/desktop/index.d.ts +1 -0
  36. package/build/esm/components/Footer/index.d.ts +3 -0
  37. package/build/esm/components/Footer/mobile/Footer.d.ts +4 -0
  38. package/build/esm/components/Footer/mobile/index.d.ts +1 -0
  39. package/build/esm/components/Footer/types.d.ts +16 -0
  40. package/build/esm/components/Logo/Logo.d.ts +2 -0
  41. package/build/esm/components/index.d.ts +1 -0
  42. package/build/esm/components/types.d.ts +1 -0
  43. package/build/esm/hooks/useOverflowingHorizontalListItems/index.d.ts +1 -0
  44. package/build/esm/hooks/useOverflowingHorizontalListItems/useOverflowingHorizontalListItems.d.ts +12 -0
  45. package/build/esm/index.js +149 -10
  46. package/build/esm/index.js.map +1 -1
  47. package/build/esm/index6.js +1 -1
  48. package/package.json +1 -1
  49. package/build/cjs/FooterItem-f6a1d34b.js.map +0 -1
  50. package/build/cjs/PageLayoutAside-f05a501f.js.map +0 -1
  51. package/build/esm/FooterItem-f4ec6e5b.js.map +0 -1
  52. package/build/esm/PageLayoutAside-39c04908.js.map +0 -1
@@ -7,30 +7,168 @@ var AsideHeaderContext = require('./AsideHeaderContext.js');
7
7
  var Drawer = require('./Drawer.js');
8
8
  var FooterItem = require('./FooterItem.js');
9
9
  var PageLayout = require('./PageLayout.js');
10
- var PageLayoutAside = require('./PageLayoutAside-f05a501f.js');
10
+ var PageLayoutAside = require('./PageLayoutAside-27cb5df9.js');
11
11
  var AsideFallback = require('./AsideFallback.js');
12
- var FooterItem$1 = require('./FooterItem-f6a1d34b.js');
12
+ var FooterItem$1 = require('./FooterItem-3bd7bdc7.js');
13
+ var React = require('react');
14
+ var uikit = require('@gravity-ui/uikit');
15
+ var debounce = require('./debounce-8772fd80.js');
16
+ var cn = require('./cn-9933321a.js');
17
+ var tslib_es6 = require('./tslib.es6-705c6589.js');
18
+ var styleInject_es = require('./style-inject.es-dcee06b6.js');
19
+ var icons = require('@gravity-ui/icons');
13
20
  var ActionBar = require('./ActionBar-38c4e24f.js');
14
21
  var Title = require('./Title-54580605.js');
15
22
  var HotkeysPanel = require('./HotkeysPanel-4ad41893.js');
16
23
  var Settings = require('./Settings-a0deac97.js');
17
- require('./tslib.es6-705c6589.js');
18
- require('react');
19
- require('@gravity-ui/uikit');
20
24
  require('react-dom');
21
- require('./cn-9933321a.js');
22
- require('@bem-react/classname');
23
- require('./style-inject.es-dcee06b6.js');
24
25
  require('./Item-27f590b7.js');
25
26
  require('./constants-d81c3867.js');
26
- require('./debounce-8772fd80.js');
27
- require('@gravity-ui/icons');
28
27
  require('./Content-64d5738a.js');
29
28
  require('./utils-db3e03c2.js');
30
29
  require('@gravity-ui/uikit/i18n');
31
30
  require('./divider-collapsed-153868e7.js');
31
+ require('@bem-react/classname');
32
+
33
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
34
+
35
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
36
+
37
+ function useOverflowingHorizontalListItems({ containerRef, items, itemSelector, moreButtonWidth = 0, }) {
38
+ const [containerWidth, setContainerWidth] = React.useState(0);
39
+ const [itemWidths, setItemWidths] = React.useState([]);
40
+ React.useLayoutEffect(() => {
41
+ if (!containerRef.current) {
42
+ return;
43
+ }
44
+ const measureItemSizes = () => {
45
+ var _a, _b;
46
+ const itemElements = Array.from((_b = (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.querySelectorAll(itemSelector)) !== null && _b !== void 0 ? _b : []);
47
+ setItemWidths(itemElements.map((item) => item.clientWidth));
48
+ };
49
+ measureItemSizes();
50
+ }, [containerRef, itemSelector]);
51
+ React.useLayoutEffect(() => {
52
+ const footerMenu = containerRef.current;
53
+ if (!footerMenu) {
54
+ return;
55
+ }
56
+ const updateContainerSize = (entries) => {
57
+ if (entries.length > 0) {
58
+ setContainerWidth(entries[0].contentRect.width);
59
+ }
60
+ };
61
+ const updateContainerSizeDebounced = debounce.debounce_1(updateContainerSize, 100);
62
+ const footerMenuResizeObserver = new ResizeObserver(updateContainerSizeDebounced);
63
+ footerMenuResizeObserver.observe(footerMenu);
64
+ }, [containerRef]);
65
+ const isMeasured = containerWidth > 0;
66
+ const { visibleItems, hiddenItems } = React.useMemo(() => {
67
+ var _a, _b;
68
+ if (!isMeasured) {
69
+ return {
70
+ visibleItems: items !== null && items !== void 0 ? items : [],
71
+ hiddenItems: [],
72
+ };
73
+ }
74
+ const itemsCount = itemWidths.length;
75
+ let visibleItemsCount = 0;
76
+ let remainingContainerWidth = containerWidth;
77
+ for (const width of itemWidths) {
78
+ remainingContainerWidth -= width;
79
+ if (remainingContainerWidth < moreButtonWidth) {
80
+ const isMoreThanOneItemLeft = itemsCount !== visibleItemsCount + 1;
81
+ const hasNoSpaceForTheLastItem = remainingContainerWidth < 0;
82
+ if (isMoreThanOneItemLeft || hasNoSpaceForTheLastItem) {
83
+ break;
84
+ }
85
+ }
86
+ visibleItemsCount++;
87
+ }
88
+ return {
89
+ visibleItems: (_a = items === null || items === void 0 ? void 0 : items.slice(0, visibleItemsCount)) !== null && _a !== void 0 ? _a : [],
90
+ hiddenItems: (_b = items === null || items === void 0 ? void 0 : items.slice(visibleItemsCount)) !== null && _b !== void 0 ? _b : [],
91
+ };
92
+ }, [containerWidth, isMeasured, itemWidths, items, moreButtonWidth]);
93
+ return { visibleItems, hiddenItems, measured: isMeasured };
94
+ }
95
+
96
+ var css_248z$2 = ".gn-footer-menu-item{align-items:center;align-self:stretch;display:flex;height:100%;justify-content:center}.gn-footer-menu-item .g-menu__item-content{color:var(--g-color-text-secondary);font-size:var(--g-text-body-1-font-size);font-weight:var(--g-text-body-font-weight);line-height:var(--g-text-body-1-line-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gn-footer-menu-item[class]:hover{background-color:inherit}.gn-footer-menu-item[class]:hover[href] .g-menu__item-content{color:var(--g-color-text-link-hover)}";
97
+ styleInject_es.styleInject(css_248z$2);
98
+
99
+ const b$2 = cn.block('footer-menu-item');
100
+ const MenuItem = (_a) => {
101
+ var { text, className } = _a, menuItemProps = tslib_es6.__rest(_a, ["text", "className"]);
102
+ return (React__default["default"].createElement(uikit.Menu.Item, Object.assign({ className: b$2(null, className) }, menuItemProps), text));
103
+ };
104
+
105
+ const moreItemsPopupProps = {
106
+ placement: 'top-start',
107
+ };
108
+
109
+ var css_248z$1 = ".gn-footer_desktop{align-items:center;background:var(--g-color-base-background);display:flex;gap:var(--g-spacing-6);height:40px;padding:0 var(--g-spacing-6) 0 var(--g-spacing-3)}.gn-footer_desktop .gn-footer__menu{align-items:center;align-self:stretch;display:flex;flex:1;min-width:0;visibility:hidden}.gn-footer_desktop .gn-footer__menu_measured{visibility:visible}.gn-footer_desktop .gn-footer__list[class]{background-color:inherit;display:flex;height:100%;padding:0}.gn-footer_desktop .gn-footer__more-button svg{color:var(--g-color-text-secondary)}.gn-footer_desktop .gn-footer__right{align-items:center;display:flex;gap:var(--g-spacing-5)}.gn-footer_desktop .gn-footer__copyright{color:var(--g-color-text-secondary);font-size:var(--g-text-body-1-font-size);font-weight:var(--g-text-body-font-weight);line-height:var(--g-text-body-1-line-height);white-space:nowrap}.gn-footer_desktop .gn-footer__copyright_small{font-size:var(--g-text-caption-2-font-size);font-weight:var(--g-text-caption-font-weight);line-height:var(--g-text-caption-2-line-height)}.gn-footer_with-divider{border-top:1px solid var(--g-color-line-generic)}.gn-footer_view_clear{background:transparent}";
110
+ styleInject_es.styleInject(css_248z$1);
111
+
112
+ const b$1 = cn.block('footer');
113
+ const Footer = ({ className, menuItems: providedMenuItems, withDivider, moreButtonTitle, view = 'normal', logo, logoWrapperClassName, copyright, }) => {
114
+ const menuContainerRef = React.useRef(null);
115
+ const menuItems = view === 'clear' ? undefined : providedMenuItems;
116
+ const { visibleItems, hiddenItems, measured } = useOverflowingHorizontalListItems({
117
+ containerRef: menuContainerRef,
118
+ items: menuItems,
119
+ itemSelector: `.${b$1('menu-item')}`,
120
+ moreButtonWidth: 28,
121
+ });
122
+ const moreButtonProps = React.useMemo(() => ({
123
+ title: moreButtonTitle,
124
+ }), [moreButtonTitle]);
125
+ const dropdownMenuItems = React.useMemo(() => hiddenItems.map((item) => (Object.assign(Object.assign({}, item), { action: item.onClick }))), [hiddenItems]);
126
+ const shouldRenderLogo = view !== 'clear' && Boolean(logo);
127
+ return (React__default["default"].createElement("footer", { className: b$1({ desktop: true, 'with-divider': withDivider, view }, className) },
128
+ React__default["default"].createElement("div", { className: b$1('menu', { measured }), ref: menuContainerRef },
129
+ visibleItems.length > 0 && (React__default["default"].createElement(uikit.Menu, { className: b$1('list') }, visibleItems.map((item, index) => (React__default["default"].createElement(MenuItem, Object.assign({ key: index }, item, { className: b$1('menu-item', item.className) })))))),
130
+ dropdownMenuItems.length > 0 && (React__default["default"].createElement(uikit.DropdownMenu, { items: dropdownMenuItems, switcherWrapperClassName: b$1('more-button'), popupProps: moreItemsPopupProps, defaultSwitcherProps: moreButtonProps }))),
131
+ React__default["default"].createElement("div", { className: b$1('right') },
132
+ React__default["default"].createElement("small", { className: b$1('copyright', { small: !(menuItems === null || menuItems === void 0 ? void 0 : menuItems.length) }) }, copyright),
133
+ shouldRenderLogo && (React__default["default"].createElement("div", { className: logoWrapperClassName },
134
+ React__default["default"].createElement(PageLayoutAside.Logo, Object.assign({}, logo)))))));
135
+ };
32
136
 
137
+ var css_248z = ".gn-footer_mobile{background:var(--g-color-base-background);display:flex;flex-direction:column;padding:var(--g-spacing-1) var(--g-spacing-6) var(--g-spacing-3) var(--g-spacing-3)}.gn-footer_mobile .gn-footer_with-divider{border-top:1px solid var(--g-color-line-generic)}.gn-footer_mobile .gn-footer__menu{align-items:center;display:flex;justify-content:space-between;margin-bottom:var(--g-spacing-1);visibility:hidden}.gn-footer_mobile .gn-footer__menu_measured{visibility:visible}.gn-footer_mobile .gn-footer__list[class]{background-color:inherit;display:flex;padding:0}.gn-footer_mobile .gn-footer__menu-item{padding:var(--g-spacing-2) var(--g-spacing-3)}.gn-footer_mobile .gn-footer__bottom-row{align-items:center;display:flex;justify-content:space-between}.gn-footer_mobile .gn-footer__copyright{color:var(--g-color-text-secondary);font-size:var(--g-text-caption-2-font-size);font-weight:var(--g-text-caption-font-weight);line-height:var(--g-text-caption-2-line-height);padding:0 var(--g-spacing-3);white-space:nowrap}.gn-footer__modal .gn-footer__menu-item{color:var(--g-color-text-primary);font-size:var(--g-text-body-2-font-size);font-weight:var(--g-text-body-font-weight);height:48px;line-height:var(--g-text-body-2-line-height)}.gn-footer_view_clear{background:transparent}.gn-footer_view_clear .gn-footer__bottom-row{justify-content:flex-end}";
138
+ styleInject_es.styleInject(css_248z);
33
139
 
140
+ const b = cn.block('footer');
141
+ const modalId = 'footer-more-items';
142
+ const MobileFooter = ({ className, menuItems: providedMenuItems, withDivider, moreButtonTitle, view = 'normal', logo, logoWrapperClassName, copyright, }) => {
143
+ const [moreItemsMenuVisible, setMoreItemsMenuVisible] = React.useState(false);
144
+ const menuContainerRef = React.useRef(null);
145
+ const handleOpenMoreItemsMenu = React.useCallback(() => {
146
+ setMoreItemsMenuVisible(true);
147
+ }, []);
148
+ const handleCloseMoreItemsMenu = React.useCallback(() => {
149
+ setMoreItemsMenuVisible(false);
150
+ }, []);
151
+ const menuItems = view === 'clear' ? undefined : providedMenuItems;
152
+ const { visibleItems, hiddenItems, measured } = useOverflowingHorizontalListItems({
153
+ containerRef: menuContainerRef,
154
+ items: menuItems,
155
+ itemSelector: `.${b('menu-item')}`,
156
+ moreButtonWidth: 28,
157
+ });
158
+ const renderMenu = (items) => (React__default["default"].createElement(uikit.Menu, { className: b('list') }, items.map((item, index) => (React__default["default"].createElement(MenuItem, Object.assign({ key: index }, item, { className: b('menu-item', item.className) }))))));
159
+ const shouldRenderLogo = view !== 'clear' && Boolean(logo);
160
+ return (React__default["default"].createElement("footer", { className: b({ mobile: true, 'with-divider': withDivider, view }, className) },
161
+ React__default["default"].createElement("div", { className: b('menu', { measured }), ref: menuContainerRef },
162
+ visibleItems.length > 0 && renderMenu(visibleItems),
163
+ hiddenItems.length > 0 && (React__default["default"].createElement(React__default["default"].Fragment, null,
164
+ React__default["default"].createElement(uikit.Button, { view: "flat-secondary", size: "l", onClick: handleOpenMoreItemsMenu, title: moreButtonTitle },
165
+ React__default["default"].createElement(uikit.Icon, { data: icons.Ellipsis, size: 16 })),
166
+ React__default["default"].createElement(uikit.Sheet, { id: modalId, visible: moreItemsMenuVisible, className: b('modal'), contentClassName: b('modal-content'), onClose: handleCloseMoreItemsMenu }, renderMenu(hiddenItems))))),
167
+ React__default["default"].createElement("div", { className: b('bottom-row') },
168
+ React__default["default"].createElement("small", { className: b('copyright') }, copyright),
169
+ shouldRenderLogo && (React__default["default"].createElement("div", { className: logoWrapperClassName },
170
+ React__default["default"].createElement(PageLayoutAside.Logo, Object.assign({}, logo)))))));
171
+ };
34
172
 
35
173
  exports.AsideHeader = AsideHeader.AsideHeader;
36
174
  exports.AsideHeaderContextProvider = AsideHeaderContext.AsideHeaderContextProvider;
@@ -51,4 +189,6 @@ exports.HotkeysPanel = HotkeysPanel.HotkeysPanel;
51
189
  exports.Settings = Settings.Settings;
52
190
  exports.useSettingsContext = Settings.useSettingsContext;
53
191
  exports.useSettingsSelectionContext = Settings.useSettingsSelectionContext;
192
+ exports.Footer = Footer;
193
+ exports.MobileFooter = MobileFooter;
54
194
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/hooks/useOverflowingHorizontalListItems/useOverflowingHorizontalListItems.ts","../../../src/components/Footer/MenuItem/MenuItem.tsx","../../../src/components/Footer/desktop/constants/moreItemsPopupProps.ts","../../../src/components/Footer/desktop/Footer.tsx","../../../src/components/Footer/mobile/Footer.tsx"],"sourcesContent":["import {useLayoutEffect, useMemo, useState} from 'react';\nimport type {RefObject} from 'react';\n\nimport debounceFn from 'lodash/debounce';\n\nexport type UseOverflowingContainerListItemsProps<ItemType extends unknown> = {\n containerRef: RefObject<HTMLElement>;\n items?: ItemType[];\n itemSelector: string;\n moreButtonWidth?: number;\n};\n\nexport function useOverflowingHorizontalListItems<ItemType>({\n containerRef,\n items,\n itemSelector,\n moreButtonWidth = 0,\n}: UseOverflowingContainerListItemsProps<ItemType>) {\n const [containerWidth, setContainerWidth] = useState<number>(0);\n const [itemWidths, setItemWidths] = useState<number[]>([]);\n\n useLayoutEffect(() => {\n if (!containerRef.current) {\n return;\n }\n\n const measureItemSizes = () => {\n const itemElements = Array.from(\n containerRef.current?.querySelectorAll(itemSelector) ?? [],\n );\n setItemWidths(itemElements.map((item) => item.clientWidth));\n };\n\n measureItemSizes();\n }, [containerRef, itemSelector]);\n\n useLayoutEffect(() => {\n const footerMenu = containerRef.current;\n if (!footerMenu) {\n return;\n }\n\n const updateContainerSize = (entries: ResizeObserverEntry[]) => {\n if (entries.length > 0) {\n setContainerWidth(entries[0].contentRect.width);\n }\n };\n\n const updateContainerSizeDebounced = debounceFn(updateContainerSize, 100);\n const footerMenuResizeObserver = new ResizeObserver(updateContainerSizeDebounced);\n\n footerMenuResizeObserver.observe(footerMenu);\n }, [containerRef]);\n\n const isMeasured = containerWidth > 0;\n\n const {visibleItems, hiddenItems} = useMemo(() => {\n if (!isMeasured) {\n return {\n visibleItems: items ?? [],\n hiddenItems: [],\n };\n }\n\n const itemsCount = itemWidths.length;\n let visibleItemsCount = 0;\n let remainingContainerWidth = containerWidth;\n for (const width of itemWidths) {\n remainingContainerWidth -= width;\n if (remainingContainerWidth < moreButtonWidth) {\n const isMoreThanOneItemLeft = itemsCount !== visibleItemsCount + 1;\n const hasNoSpaceForTheLastItem = remainingContainerWidth < 0;\n if (isMoreThanOneItemLeft || hasNoSpaceForTheLastItem) {\n break;\n }\n }\n\n visibleItemsCount++;\n }\n\n return {\n visibleItems: items?.slice(0, visibleItemsCount) ?? [],\n hiddenItems: items?.slice(visibleItemsCount) ?? [],\n };\n }, [containerWidth, isMeasured, itemWidths, items, moreButtonWidth]);\n\n return {visibleItems, hiddenItems, measured: isMeasured};\n}\n","import React from 'react';\nimport type {FC} from 'react';\n\nimport {Menu} from '@gravity-ui/uikit';\n\nimport {block} from '../../utils/cn';\nimport {FooterMenuItem} from '../types';\n\nimport './MenuItem.scss';\n\nconst b = block('footer-menu-item');\n\nexport type MenuItemProps = FooterMenuItem;\n\nexport const MenuItem: FC<MenuItemProps> = ({text, className, ...menuItemProps}) => {\n return (\n <Menu.Item className={b(null, className)} {...menuItemProps}>\n {text}\n </Menu.Item>\n );\n};\n","import {PopupProps} from '@gravity-ui/uikit';\n\nexport const moreItemsPopupProps: PopupProps = {\n placement: 'top-start',\n};\n","import React, {useMemo, useRef} from 'react';\nimport type {FC} from 'react';\n\nimport {DropdownMenu, Menu} from '@gravity-ui/uikit';\nimport type {DropdownMenuItem} from '@gravity-ui/uikit';\n\nimport {useOverflowingHorizontalListItems} from '../../../hooks/useOverflowingHorizontalListItems';\nimport {Logo} from '../../Logo';\nimport {block} from '../../utils/cn';\nimport {MenuItem} from '../MenuItem/MenuItem';\nimport {FooterProps} from '../types';\n\nimport {moreItemsPopupProps} from './constants/moreItemsPopupProps';\n\nimport './Footer.scss';\n\nconst b = block('footer');\n\nexport const Footer: FC<FooterProps> = ({\n className,\n menuItems: providedMenuItems,\n withDivider,\n moreButtonTitle,\n view = 'normal',\n logo,\n logoWrapperClassName,\n copyright,\n}) => {\n const menuContainerRef = useRef<HTMLDivElement>(null);\n\n const menuItems = view === 'clear' ? undefined : providedMenuItems;\n\n const {visibleItems, hiddenItems, measured} = useOverflowingHorizontalListItems({\n containerRef: menuContainerRef,\n items: menuItems,\n itemSelector: `.${b('menu-item')}`,\n moreButtonWidth: 28,\n });\n\n const moreButtonProps = useMemo(\n () => ({\n title: moreButtonTitle,\n }),\n [moreButtonTitle],\n );\n\n const dropdownMenuItems = useMemo(\n () =>\n hiddenItems.map(\n (item) =>\n ({\n ...item,\n action: item.onClick,\n }) as DropdownMenuItem,\n ),\n [hiddenItems],\n );\n\n const shouldRenderLogo = view !== 'clear' && Boolean(logo);\n\n return (\n <footer className={b({desktop: true, 'with-divider': withDivider, view}, className)}>\n <div className={b('menu', {measured})} ref={menuContainerRef}>\n {visibleItems.length > 0 && (\n <Menu className={b('list')}>\n {visibleItems.map((item, index) => (\n <MenuItem\n key={index}\n {...item}\n className={b('menu-item', item.className)}\n />\n ))}\n </Menu>\n )}\n {dropdownMenuItems.length > 0 && (\n <DropdownMenu\n items={dropdownMenuItems}\n switcherWrapperClassName={b('more-button')}\n popupProps={moreItemsPopupProps}\n defaultSwitcherProps={moreButtonProps}\n />\n )}\n </div>\n <div className={b('right')}>\n <small className={b('copyright', {small: !menuItems?.length})}>{copyright}</small>\n {shouldRenderLogo && (\n <div className={logoWrapperClassName}>\n <Logo {...logo!} />\n </div>\n )}\n </div>\n </footer>\n );\n};\n","import React, {useCallback, useRef, useState} from 'react';\nimport type {FC} from 'react';\n\nimport {Ellipsis} from '@gravity-ui/icons';\nimport {Button, Icon, Menu, Sheet} from '@gravity-ui/uikit';\n\nimport {useOverflowingHorizontalListItems} from '../../../hooks/useOverflowingHorizontalListItems';\nimport {Logo} from '../../Logo';\nimport {block} from '../../utils/cn';\nimport {MenuItem} from '../MenuItem/MenuItem';\nimport {FooterMenuItem, FooterProps} from '../types';\n\nimport './Footer.scss';\n\nconst b = block('footer');\n\nconst modalId = 'footer-more-items';\n\nexport const MobileFooter: FC<FooterProps> = ({\n className,\n menuItems: providedMenuItems,\n withDivider,\n moreButtonTitle,\n view = 'normal',\n logo,\n logoWrapperClassName,\n copyright,\n}) => {\n const [moreItemsMenuVisible, setMoreItemsMenuVisible] = useState(false);\n const menuContainerRef = useRef<HTMLDivElement>(null);\n\n const handleOpenMoreItemsMenu = useCallback(() => {\n setMoreItemsMenuVisible(true);\n }, []);\n\n const handleCloseMoreItemsMenu = useCallback(() => {\n setMoreItemsMenuVisible(false);\n }, []);\n\n const menuItems = view === 'clear' ? undefined : providedMenuItems;\n\n const {visibleItems, hiddenItems, measured} = useOverflowingHorizontalListItems({\n containerRef: menuContainerRef,\n items: menuItems,\n itemSelector: `.${b('menu-item')}`,\n moreButtonWidth: 28,\n });\n\n const renderMenu = (items: FooterMenuItem[]) => (\n <Menu className={b('list')}>\n {items.map((item, index) => (\n <MenuItem key={index} {...item} className={b('menu-item', item.className)} />\n ))}\n </Menu>\n );\n\n const shouldRenderLogo = view !== 'clear' && Boolean(logo);\n\n return (\n <footer className={b({mobile: true, 'with-divider': withDivider, view}, className)}>\n <div className={b('menu', {measured})} ref={menuContainerRef}>\n {visibleItems.length > 0 && renderMenu(visibleItems)}\n {hiddenItems.length > 0 && (\n <>\n <Button\n view=\"flat-secondary\"\n size=\"l\"\n onClick={handleOpenMoreItemsMenu}\n title={moreButtonTitle}\n >\n <Icon data={Ellipsis} size={16} />\n </Button>\n <Sheet\n id={modalId}\n visible={moreItemsMenuVisible}\n className={b('modal')}\n contentClassName={b('modal-content')}\n onClose={handleCloseMoreItemsMenu}\n >\n {renderMenu(hiddenItems)}\n </Sheet>\n </>\n )}\n </div>\n <div className={b('bottom-row')}>\n <small className={b('copyright')}>{copyright}</small>\n {shouldRenderLogo && (\n <div className={logoWrapperClassName}>\n <Logo {...logo!} />\n </div>\n )}\n </div>\n </footer>\n );\n};\n"],"names":["useState","useLayoutEffect","debounceFn","useMemo","b","block","__rest","React","Menu","useRef","DropdownMenu","Logo","useCallback","Button","Icon","Ellipsis","Sheet"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYgB,SAA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A,yBAAO,CAAA,aAAA,CAAA,OAAA,EAAA,EAAA,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,EAAA,EAAG,SAAS,CAAS;AACpD,YAAA,gBAAgB,KACbA,yBAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,oBAAoB,EAAA;gBAChCA,yBAAC,CAAA,aAAA,CAAAI,oBAAI,oBAAK,IAAK,CAAA,CAAI,CACjB,CACT,CACC,CACD,EACX;AACN;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var FooterItem = require('./FooterItem-f6a1d34b.js');
5
+ var FooterItem = require('./FooterItem-3bd7bdc7.js');
6
6
  require('react');
7
7
  require('./Content-64d5738a.js');
8
8
  require('./Drawer.js');
@@ -1,7 +1,7 @@
1
1
  import { _ as __rest } from './tslib.es6-3cd4e99f.js';
2
2
  import React__default from 'react';
3
3
  import { PageLayout } from './PageLayout.js';
4
- import { P as PageLayoutAside } from './PageLayoutAside-39c04908.js';
4
+ import { P as PageLayoutAside } from './PageLayoutAside-8e7666c7.js';
5
5
  import './Content-f94ba85d.js';
6
6
  import './constants-b1604ff5.js';
7
7
  import './AsideHeaderContext.js';
@@ -21,11 +21,11 @@ const useForwardRef = (ref, initialValue = null) => {
21
21
  return targetRef;
22
22
  };
23
23
 
24
- var css_248z$5 = ".gn-mobile-logo{align-items:center;display:flex;gap:8px;overflow:hidden}.gn-mobile-logo:is(a),.gn-mobile-logo:is(a):active,.gn-mobile-logo:is(a):focus,.gn-mobile-logo:is(a):hover,.gn-mobile-logo:is(a):visited{color:var(--g-color-text-primary);outline:none;text-decoration:none}.gn-mobile-logo__icon{flex-shrink:0}.gn-mobile-logo__title{font-size:var(--g-text-header-1-font-size);font-weight:var(--g-text-header-font-weight);line-height:var(--g-text-header-1-line-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}";
24
+ var css_248z$5 = ".gn-mobile-logo{align-items:center;display:flex;gap:var(--g-spacing-2);overflow:hidden}.gn-mobile-logo:is(a),.gn-mobile-logo:is(a):active,.gn-mobile-logo:is(a):focus,.gn-mobile-logo:is(a):hover,.gn-mobile-logo:is(a):visited{color:var(--g-color-text-primary);outline:none;text-decoration:none}.gn-mobile-logo__icon{flex-shrink:0}.gn-mobile-logo__title{font-size:var(--g-text-header-1-font-size);font-weight:var(--g-text-header-font-weight);line-height:var(--g-text-header-1-line-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}";
25
25
  styleInject(css_248z$5);
26
26
 
27
27
  const b$5 = block('mobile-logo');
28
- const MobileLogo = ({ text, compact, icon, iconSrc, iconClassName, iconSize = 32, textSize = 20, href = '/', target = '_self', wrapper, onClick, }) => {
28
+ const MobileLogo = ({ text, compact, icon, iconSrc, iconClassName, iconSize = 32, textSize = 20, href = '/', target = '_self', wrapper, onClick, className, }) => {
29
29
  const hasClickHandler = typeof onClick === 'function';
30
30
  const hasWrapper = typeof wrapper === 'function';
31
31
  const linkProps = hasClickHandler
@@ -52,7 +52,7 @@ const MobileLogo = ({ text, compact, icon, iconSrc, iconClassName, iconSize = 32
52
52
  const logo = (React__default.createElement(React__default.Fragment, null,
53
53
  logoIcon,
54
54
  logoTitle));
55
- return hasWrapper ? (React__default.createElement("div", { className: b$5(), onClick: onClick }, wrapper(logo, compact))) : (React__default.createElement("a", Object.assign({}, linkProps, { className: b$5(), onClick: onClick }), logo));
55
+ return hasWrapper ? (React__default.createElement("div", { className: b$5(null, className), onClick: onClick }, wrapper(logo, compact))) : (React__default.createElement("a", Object.assign({}, linkProps, { className: b$5(null, className), onClick: onClick }), logo));
56
56
  };
57
57
 
58
58
  var css_248z$4 = ".gn-mobile-header-burger{background:none;border:none;color:inherit;cursor:pointer;font-family:var(--g-text-body-font-family);font-size:inherit;font-weight:var(--g-text-body-font-weight);outline:none;padding:0}.gn-mobile-header-burger_opened .gn-mobile-header-burger__icon .gn-mobile-header-burger__icon-dash,.gn-mobile-header-burger_opened .gn-mobile-header-burger__icon:after,.gn-mobile-header-burger_opened .gn-mobile-header-burger__icon:before{left:3px}.gn-mobile-header-burger_opened .gn-mobile-header-burger__icon:before{transform:rotate(45deg)}.gn-mobile-header-burger_opened .gn-mobile-header-burger__icon:after{transform:rotate(-45deg)}.gn-mobile-header-burger_opened .gn-mobile-header-burger__icon .gn-mobile-header-burger__icon-dash{opacity:0}.gn-mobile-header-burger__icon{display:flex;height:var(--mobile-header-icon-size);place-content:center;position:relative;width:var(--mobile-header-icon-size)}.gn-mobile-header-burger__icon:after,.gn-mobile-header-burger__icon:before{content:\"\";transform-origin:left center;transition:transform .2s,left .2s}.gn-mobile-header-burger__icon:before{top:2px}.gn-mobile-header-burger__icon:after{bottom:2px}.gn-mobile-header-burger__icon .gn-mobile-header-burger__icon-dash,.gn-mobile-header-burger__icon:after,.gn-mobile-header-burger__icon:before{background-color:var(--g-color-text-primary);border-radius:1px;height:2px;left:0;position:absolute;width:100%}.gn-mobile-header-burger__icon .gn-mobile-header-burger__icon-dash{margin-top:-1px;top:50%;transition:opacity .2s}";
@@ -278,4 +278,4 @@ const FooterItem = ({ icon, iconSize = MOBILE_HEADER_ICON_SIZE, className, modal
278
278
  };
279
279
 
280
280
  export { FooterItem as F, MobileHeader as M, MobileLogo as a };
281
- //# sourceMappingURL=FooterItem-f4ec6e5b.js.map
281
+ //# sourceMappingURL=FooterItem-58eb8d93.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FooterItem-58eb8d93.js","sources":["../../../src/hooks/useForwardRef.tsx","../../../src/components/MobileLogo/MobileLogo.tsx","../../../src/components/MobileHeader/Burger/Burger.tsx","../../../src/components/MobileHeader/constants.ts","../../../src/components/MobileHeader/utils.ts","../../../src/components/MobileHeader/BurgerMenu/BurgerCompositeBar/BurgerCompositeBar.tsx","../../../src/components/MobileHeader/BurgerMenu/BurgerMenu.tsx","../../../src/components/MobileHeader/i18n/index.ts","../../../src/components/MobileHeader/MobileHeader.tsx","../../../src/components/MobileHeader/FooterItem/FooterItem.tsx"],"sourcesContent":["import React from 'react';\n\nexport const useForwardRef = <T,>(\n ref: ((instance: T | null) => void) | React.MutableRefObject<T | null> | null,\n initialValue: any = null,\n) => {\n const targetRef = React.useRef<T>(initialValue);\n\n React.useEffect(() => {\n if (!ref) return;\n\n if (typeof ref === 'function') {\n ref(targetRef.current);\n } else {\n ref.current = targetRef.current;\n }\n }, [ref]);\n\n return targetRef;\n};\n","import React from 'react';\n\nimport {Icon} from '@gravity-ui/uikit';\n\nimport {LogoProps} from '../types';\nimport {block} from '../utils/cn';\n\nimport './MobileLogo.scss';\n\nconst b = block('mobile-logo');\n\nexport interface MobileLogoProps extends LogoProps {\n compact: boolean;\n}\n\nexport const MobileLogo: React.FC<MobileLogoProps> = ({\n text,\n compact,\n icon,\n iconSrc,\n iconClassName,\n iconSize = 32,\n textSize = 20,\n href = '/',\n target = '_self',\n wrapper,\n onClick,\n className,\n}) => {\n const hasClickHandler = typeof onClick === 'function';\n const hasWrapper = typeof wrapper === 'function';\n\n const linkProps = hasClickHandler\n ? {}\n : {\n target,\n ref: target === '_self' ? undefined : 'noreferrer',\n href,\n };\n\n let logoIcon;\n\n if (iconSrc) {\n logoIcon = (\n <img\n alt=\"logo icon\"\n src={iconSrc}\n width={iconSize}\n height={iconSize}\n className={iconClassName}\n />\n );\n } else if (icon) {\n logoIcon = <Icon data={icon} size={iconSize} className={b('icon', iconClassName)} />;\n }\n\n let logoTitle: React.ReactNode;\n\n if (typeof text === 'function') {\n logoTitle = text();\n } else {\n logoTitle = (\n <span className={b('title')} style={{fontSize: textSize}}>\n {text}\n </span>\n );\n }\n\n const logo = (\n <React.Fragment>\n {logoIcon}\n {logoTitle}\n </React.Fragment>\n );\n\n return hasWrapper ? (\n <div className={b(null, className)} onClick={onClick}>\n {wrapper(logo, compact)}\n </div>\n ) : (\n <a {...linkProps} className={b(null, className)} onClick={onClick}>\n {logo}\n </a>\n );\n};\n","import React from 'react';\n\nimport {block} from '../../utils/cn';\n\nimport './Burger.scss';\n\nconst b = block('mobile-header-burger');\n\ninterface BurgerProps {\n closeTitle: string;\n openTitle: string;\n opened?: boolean;\n className?: string;\n onClick?: (event: React.MouseEvent<HTMLElement>) => void;\n}\n\nexport const Burger = React.memo(\n ({closeTitle, openTitle, opened, className, onClick}: BurgerProps) => (\n <button\n className={b({opened}, className)}\n onClick={onClick}\n aria-label={opened ? closeTitle : openTitle}\n >\n <span className={b('icon')}>\n <span className={b('icon-dash')}></span>\n </span>\n </button>\n ),\n);\n\nBurger.displayName = 'Burger';\n","import {ItemEventsConfig} from './types';\n\nexport const MOBILE_ITEM_HEIGHT = 48;\nexport const MOBILE_HEADER_COMPACT_HEIGHT = 50;\nexport const MOBILE_HEADER_EXPANDED_HEIGHT = 120;\nexport const MOBILE_HEADER_ICON_SIZE = 20;\n\nexport const EVENT_NAMES: ItemEventsConfig = {\n toggleEvent: 'MOBILE_PANEL_TOGGLE',\n closeEvent: 'MOBILE_PANEL_CLOSE',\n openEvent: 'MOBILE_PANEL_OPEN',\n};\n\nexport const BURGER_PANEL_ITEM_ID = 'burger';\n","import {MOBILE_ITEM_HEIGHT} from './constants';\nimport {MobileMenuItem} from './types';\n\nexport const getItemHeight = (item: MobileMenuItem) => {\n switch (item.type) {\n case 'divider':\n return 1;\n default:\n return MOBILE_ITEM_HEIGHT;\n }\n};\n\nexport const getSelectedItemIndex = (items: MobileMenuItem[]) => {\n const index = items.findIndex(({current}) => Boolean(current));\n\n return index === -1 ? undefined : index;\n};\n","import React from 'react';\n\nimport {Icon, List} from '@gravity-ui/uikit';\n\nimport {block} from '../../../utils/cn';\nimport {MOBILE_HEADER_ICON_SIZE} from '../../constants';\nimport {MobileMenuItem} from '../../types';\nimport {getItemHeight, getSelectedItemIndex} from '../../utils';\n\nimport './BurgerCompositeBar.scss';\n\nconst b = block('burger-composite-bar');\n\ninterface ItemProps {\n item: MobileMenuItem;\n onItemClick?: (item: MobileMenuItem) => void;\n}\n\nconst Item = ({item, onItemClick}: ItemProps) => {\n const {icon, type = 'regular', iconSize = MOBILE_HEADER_ICON_SIZE} = item;\n\n if (type === 'divider') {\n return <div className={b('menu-divider')} />;\n }\n\n const node = (\n <div\n className={b('item', {type})}\n onClick={() => {\n if (typeof item.onItemClick === 'function') {\n item.onItemClick(item);\n }\n\n if (type === 'regular') {\n onItemClick?.(item);\n }\n }}\n >\n <div className={b('item-icon-place')}>\n {icon && <Icon data={icon} size={iconSize} className={b('item-icon')} />}\n </div>\n <div className={b('item-title')}>{item.title}</div>\n </div>\n );\n\n if (typeof item.itemWrapper === 'function') {\n return item.itemWrapper(node, item) as React.ReactElement;\n }\n\n return item.link ? (\n <a href={item.link} className={b('link')}>\n {node}\n </a>\n ) : (\n node\n );\n};\nItem.displayName = 'Item';\n\ninterface BurgerCompositeBarProps {\n items: MobileMenuItem[];\n onItemClick?: (item: MobileMenuItem) => void;\n}\n\nexport const BurgerCompositeBar = React.memo(({items, onItemClick}: BurgerCompositeBarProps) => {\n return (\n <nav className={b()}>\n <List<MobileMenuItem>\n items={items}\n selectedItemIndex={getSelectedItemIndex(items)}\n itemHeight={getItemHeight}\n itemClassName={b('root-menu-item')}\n virtualized={false}\n filterable={false}\n sortable={false}\n renderItem={(item) => <Item item={item} onItemClick={onItemClick} />}\n />\n </nav>\n );\n});\n\nBurgerCompositeBar.displayName = 'BurgerCompositeBar';\n","import React from 'react';\n\nimport {Sheet} from '@gravity-ui/uikit';\n\nimport {block} from '../../utils/cn';\nimport {MobileMenuItem, ModalItem} from '../types';\n\nimport {BurgerCompositeBar} from './BurgerCompositeBar/BurgerCompositeBar';\n\nimport './BurgerMenu.scss';\n\nconst b = block('mobile-header-burger-menu');\n\nexport interface BurgerMenuInnerProps {\n items?: MobileMenuItem[];\n modalItem?: ModalItem;\n renderFooter?: () => React.ReactNode;\n onItemClick?: (item: MobileMenuItem) => void;\n className?: string;\n}\n\nexport const BurgerMenu = React.memo(\n ({items = [], renderFooter, modalItem, className, onItemClick}: BurgerMenuInnerProps) => {\n return (\n <div className={b(null, className)}>\n {modalItem && (\n <Sheet\n visible={modalItem.visible}\n id={modalItem.id}\n title={modalItem.title}\n onClose={modalItem.onClose}\n contentClassName={modalItem.contentClassName}\n className={modalItem.className}\n >\n {modalItem.renderContent?.()}\n </Sheet>\n )}\n\n <BurgerCompositeBar items={items} onItemClick={onItemClick} />\n\n {renderFooter && <div className={b('footer')}>{renderFooter?.()}</div>}\n </div>\n );\n },\n);\n\nBurgerMenu.displayName = 'BurgerMenu';\n","import {addComponentKeysets} from '@gravity-ui/uikit/i18n';\n\nimport {NAMESPACE} from '../../utils/cn';\n\nimport en from './en.json';\nimport ru from './ru.json';\n\nconst COMPONENT = 'MobileHeader';\nexport default addComponentKeysets({en, ru}, `${NAMESPACE}${COMPONENT}`);\n","import React, {useCallback, useEffect, useMemo, useState} from 'react';\n\nimport {useForwardRef} from '../../hooks/useForwardRef';\nimport {Content, RenderContentType} from '../Content';\nimport {Drawer, DrawerItem, DrawerItemProps} from '../Drawer/Drawer';\nimport {MobileLogo} from '../MobileLogo';\nimport {LogoProps} from '../types';\nimport {block} from '../utils/cn';\n\nimport {Burger} from './Burger/Burger';\nimport {BurgerMenu, BurgerMenuInnerProps} from './BurgerMenu/BurgerMenu';\nimport {\n BURGER_PANEL_ITEM_ID,\n EVENT_NAMES,\n MOBILE_HEADER_COMPACT_HEIGHT,\n MOBILE_HEADER_EXPANDED_HEIGHT,\n} from './constants';\nimport i18n from './i18n';\nimport {MobileHeaderEvent, MobileMenuItem} from './types';\n\nimport './MobileHeader.scss';\n\nconst b = block('mobile-header');\n\ntype PanelName = DrawerItemProps['id'] | null;\n\ninterface BurgerMenuProps extends Omit<BurgerMenuInnerProps, 'renderFooter'> {\n renderFooter?: (data: {size: number; isCompact: boolean}) => React.ReactNode;\n}\n\ninterface PanelItem extends Omit<DrawerItemProps, 'visible'> {}\n\nexport interface MobileHeaderProps {\n logo: LogoProps;\n burgerMenu: BurgerMenuProps;\n burgerCloseTitle?: string;\n burgerOpenTitle?: string;\n panelItems?: PanelItem[];\n renderContent?: RenderContentType;\n sideItemRenderContent?: RenderContentType;\n onEvent?: (itemName: string, eventName: MobileHeaderEvent) => void;\n onClosePanel?: () => void;\n className?: string;\n}\n\nexport const MobileHeader = React.forwardRef<HTMLDivElement, MobileHeaderProps>(\n (\n {\n logo,\n burgerMenu,\n burgerCloseTitle = i18n('burger_button_close'),\n burgerOpenTitle = i18n('burger_button_open'),\n panelItems = [],\n renderContent,\n sideItemRenderContent,\n onClosePanel,\n onEvent,\n className,\n },\n ref,\n ): React.ReactElement => {\n const targetRef = useForwardRef<HTMLDivElement>(ref);\n const [compact] = useState(true);\n const [visiblePanel, setVisiblePanel] = useState<PanelName>(null);\n\n // for expand top panel cases (i.e. switch service panel). Will be removed if not used in future design\n const size = compact ? MOBILE_HEADER_COMPACT_HEIGHT : MOBILE_HEADER_EXPANDED_HEIGHT;\n\n const onPanelToggle = useCallback(\n (name: PanelName) => {\n if (!name) return;\n\n setVisiblePanel((prev) => {\n const panelOpen = prev === name;\n\n onEvent?.(name, panelOpen ? EVENT_NAMES.closeEvent : EVENT_NAMES.openEvent);\n\n return panelOpen ? null : name;\n });\n },\n [onEvent],\n );\n\n const onMobilePanelToggle = useCallback(\n ({detail}) => {\n if (typeof detail?.panelName === 'string') {\n onPanelToggle(detail?.panelName);\n }\n },\n [onPanelToggle],\n );\n\n const onMobilePanelOpen = useCallback(\n ({detail}) => {\n if (typeof detail?.panelName === 'string') {\n onEvent?.(detail?.panelName, EVENT_NAMES.openEvent);\n setVisiblePanel(detail?.panelName);\n }\n },\n [onEvent],\n );\n\n const onMobilePanelClose = useCallback(\n ({detail}) => {\n if (typeof detail?.panelName === 'string') {\n onEvent?.(detail?.panelName, EVENT_NAMES.closeEvent);\n setVisiblePanel(null);\n }\n },\n [onEvent],\n );\n\n const onBurgerOpen = useCallback(() => {\n onEvent?.(BURGER_PANEL_ITEM_ID, EVENT_NAMES.openEvent);\n setVisiblePanel(BURGER_PANEL_ITEM_ID);\n }, [onEvent]);\n\n const onBurgerClose = useCallback(() => {\n onEvent?.(BURGER_PANEL_ITEM_ID, EVENT_NAMES.closeEvent);\n setVisiblePanel(null);\n }, [onEvent]);\n\n const onCloseDrawer = useCallback(() => {\n if (visiblePanel) {\n onEvent?.(visiblePanel, EVENT_NAMES.closeEvent);\n }\n setVisiblePanel(null);\n }, [visiblePanel, onEvent]);\n\n const onBurgerMenuItemClick = useCallback(\n (item: MobileMenuItem) => {\n const closeMenuOnClick = item.closeMenuOnClick ?? true;\n\n if (closeMenuOnClick) {\n onBurgerClose();\n }\n },\n [onBurgerClose],\n );\n\n const renderBurgerMenuFooter = useCallback(\n () =>\n burgerMenu.renderFooter?.({\n size,\n isCompact: compact,\n }),\n [burgerMenu, size, compact],\n );\n\n const onLogoClick = useCallback(\n (event: React.MouseEvent<HTMLElement, MouseEvent>) => {\n onClosePanel?.();\n logo.onClick?.(event);\n },\n [logo, onClosePanel],\n );\n\n const burgerPanelItem: PanelItem = useMemo(\n () => ({\n id: BURGER_PANEL_ITEM_ID,\n content: (\n <BurgerMenu\n items={burgerMenu.items}\n modalItem={burgerMenu.modalItem}\n renderFooter={renderBurgerMenuFooter}\n onItemClick={onBurgerMenuItemClick}\n className={b('burger-menu')}\n />\n ),\n }),\n [burgerMenu.items, burgerMenu.modalItem, onBurgerMenuItemClick, renderBurgerMenuFooter],\n );\n\n useEffect(() => {\n const node = targetRef?.current;\n\n if (node) {\n node.addEventListener('MOBILE_BURGER_OPEN', onBurgerOpen);\n node.addEventListener('MOBILE_BURGER_CLOSE', onBurgerClose);\n\n node.addEventListener('MOBILE_PANEL_TOGGLE', onMobilePanelToggle);\n node.addEventListener('MOBILE_PANEL_OPEN', onMobilePanelOpen);\n node.addEventListener('MOBILE_PANEL_CLOSE', onMobilePanelClose);\n }\n\n return () => {\n if (node) {\n node.removeEventListener('MOBILE_BURGER_OPEN', onBurgerOpen);\n node.removeEventListener('MOBILE_BURGER_CLOSE', onBurgerClose);\n\n node.removeEventListener('MOBILE_PANEL_TOGGLE', onMobilePanelToggle);\n node.removeEventListener('MOBILE_PANEL_OPEN', onMobilePanelOpen);\n node.removeEventListener('MOBILE_PANEL_CLOSE', onMobilePanelClose);\n }\n };\n }, [\n targetRef,\n onBurgerClose,\n onBurgerOpen,\n onMobilePanelToggle,\n onMobilePanelOpen,\n onMobilePanelClose,\n ]);\n\n return (\n <div className={b({compact}, className)} ref={targetRef}>\n <header className={b('header')} style={{height: size}}>\n <Burger\n opened={visiblePanel === burgerPanelItem.id}\n onClick={() => onPanelToggle(BURGER_PANEL_ITEM_ID)}\n className={b('burger')}\n closeTitle={burgerCloseTitle}\n openTitle={burgerOpenTitle}\n />\n <MobileLogo {...logo} compact={compact} onClick={onLogoClick} />\n\n <div className={b('side-item')}>{sideItemRenderContent?.({size})}</div>\n </header>\n\n <Drawer\n className={b('panels')}\n onVeilClick={onCloseDrawer}\n onEscape={onCloseDrawer}\n style={{top: size}}\n >\n {[burgerPanelItem, ...panelItems].map((item) => (\n <DrawerItem\n {...item}\n key={item.id}\n visible={visiblePanel === item.id}\n className={b('panel-item', item.className)}\n />\n ))}\n </Drawer>\n\n <Content\n size={size}\n renderContent={renderContent}\n className={b('content')}\n cssSizeVariableName=\"--mobile-header-size\"\n />\n </div>\n );\n },\n);\n\nMobileHeader.displayName = 'MobileHeader';\n","import React from 'react';\n\nimport {Icon, IconProps, Sheet, eventBroker} from '@gravity-ui/uikit';\n\nimport {block} from '../../utils/cn';\nimport {MOBILE_HEADER_ICON_SIZE} from '../constants';\nimport {ModalItem} from '../types';\n\nimport './FooterItem.scss';\n\nconst b = block('mobile-header-footer-item');\n\nexport interface FooterItemProps {\n icon?: IconProps['data'];\n iconSize?: string | number;\n className?: string;\n modalItem?: ModalItem;\n onClick?: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;\n}\n\nexport const FooterItem = ({\n icon,\n iconSize = MOBILE_HEADER_ICON_SIZE,\n className,\n modalItem = {visible: false},\n onClick,\n}: FooterItemProps) => {\n const handleClick = React.useCallback(\n (event: React.MouseEvent<HTMLElement, MouseEvent>) => {\n eventBroker.publish({\n componentId: 'MobileHeaderFooterItem',\n eventId: 'click',\n domEvent: event,\n });\n\n onClick?.(event);\n },\n [onClick],\n );\n\n return (\n <div className={b()}>\n <button className={b('button', className)} onClick={handleClick}>\n {icon ? <Icon data={icon} size={iconSize} className={b('icon')} /> : null}\n </button>\n\n <Sheet\n id={modalItem.id}\n title={modalItem.title}\n visible={modalItem.visible}\n className={b('modal', modalItem.className)}\n contentClassName={b('modal-content', modalItem.contentClassName)}\n allowHideOnContentScroll={modalItem.modalAllowHideOnContentScroll}\n onClose={modalItem.onClose}\n >\n {modalItem.renderContent?.()}\n </Sheet>\n </div>\n );\n};\n"],"names":["React","b"],"mappings":";;;;;;;;AAEO,MAAM,aAAa,GAAG,CACzB,GAA6E,EAC7E,YAAA,GAAoB,IAAI,KACxB;IACA,MAAM,SAAS,GAAGA,cAAK,CAAC,MAAM,CAAI,YAAY,CAAC,CAAC;AAEhD,IAAAA,cAAK,CAAC,SAAS,CAAC,MAAK;AACjB,QAAA,IAAI,CAAC,GAAG;YAAE,OAAO;AAEjB,QAAA,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;AAC3B,YAAA,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;AAC1B,SAAA;AAAM,aAAA;AACH,YAAA,GAAG,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC;AACnC,SAAA;AACL,KAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AAEV,IAAA,OAAO,SAAS,CAAC;AACrB,CAAC;;;;;ACVD,MAAMC,GAAC,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC;AAMlB,MAAA,UAAU,GAA8B,CAAC,EAClD,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,OAAO,EACP,aAAa,EACb,QAAQ,GAAG,EAAE,EACb,QAAQ,GAAG,E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KAAC,EACD,CAAC,OAAO,CAAC,CACZ,CAAC;AAEF,IAAA,QACIA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,CAAC,EAAE,EAAA;AACf,QAAAA,cAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAQ,SAAS,EAAE,CAAC,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,WAAW,EAAA,EAC1D,IAAI,GAAGA,cAAC,CAAA,aAAA,CAAA,IAAI,EAAC,EAAA,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,EAAA,CAAI,GAAG,IAAI,CACpE;AAET,QAAAA,cAAA,CAAA,aAAA,CAAC,KAAK,EAAA,EACF,EAAE,EAAE,SAAS,CAAC,EAAE,EAChB,KAAK,EAAE,SAAS,CAAC,KAAK,EACtB,OAAO,EAAE,SAAS,CAAC,OAAO,EAC1B,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,SAAS,CAAC,SAAS,CAAC,EAC1C,gBAAgB,EAAE,CAAC,CAAC,eAAe,EAAE,SAAS,CAAC,gBAAgB,CAAC,EAChE,wBAAwB,EAAE,SAAS,CAAC,6BAA6B,EACjE,OAAO,EAAE,SAAS,CAAC,OAAO,EAEzB,EAAA,CAAA,EAAA,GAAA,SAAS,CAAC,aAAa,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,CAAA,SAAA,CAAI,CACxB,CACN,EACR;AACN;;;;"}
@@ -7,7 +7,7 @@ import { s as styleInject } from './style-inject.es-1f59c1d0.js';
7
7
  import './cn-ffe5e9f5.js';
8
8
  import '@bem-react/classname';
9
9
 
10
- var css_248z = ".gn-aside-header{--gn-aside-header-min-width:56px;--_--item-icon-background-size:38px;--_--background-color:var(--g-color-base-background);--_--decoration-collapsed-background-color:var(--g-color-base-warning-light);--_--decoration-expanded-background-color:var(--g-color-base-warning-light);--_--vertical-divider-line-color:var(--g-color-line-generic);--_--horizontal-divider-line-color:var(--g-color-line-generic);--_--top-panel-height:0px;background-color:var(--g-color-base-background);height:100%;position:relative;width:100%}.gn-aside-header__aside{background-color:var(--gn-aside-header-background-color,var(--_--background-color));box-sizing:border-box;display:flex;flex-direction:column;height:100vh;left:0;margin-top:var(--gn-aside-top-panel-height,var(--_--top-panel-height));max-height:calc(100vh - var(--gn-aside-top-panel-height, var(--_--top-panel-height)));position:sticky;top:var(--gn-aside-top-panel-height,var(--_--top-panel-height));width:inherit;z-index:100}.gn-aside-header__aside:after{background-color:var(--gn-aside-header-divider-vertical-color,var(--_--vertical-divider-line-color));content:\"\";height:100%;position:absolute;right:0;top:0;width:1px;z-index:2}.gn-aside-header__aside-popup-anchor{inset:0;position:absolute;z-index:1}.gn-aside-header__aside-content{--gradient-height:334px;display:flex;flex-direction:column;height:inherit;overflow-x:hidden;position:relative;user-select:none;width:inherit;z-index:2}.gn-aside-header__aside-content>.gn-aside-header-logo{margin:8px 0}.gn-aside-header__aside-content_with-decoration{background:linear-gradient(180deg,var(--gn-aside-header-decoration-expanded-background-color,var(--_--decoration-expanded-background-color)) calc(var(--gradient-height)*.33),transparent calc(var(--gradient-height)*.88))}.gn-aside-header__aside-custom-background{bottom:0;display:flex;position:absolute;top:0;z-index:-1}.gn-aside-header_compact .gn-aside-header__aside-content{background:transparent}.gn-aside-header__header{--gn-aside-header-header-divider-height:29px;box-sizing:border-box;flex:none;padding-bottom:22px;padding-top:8px;position:relative;width:100%;z-index:1}.gn-aside-header__header .gn-aside-header__header-divider{bottom:0;color:var(--gn-aside-header-decoration-collapsed-background-color,var(--_--decoration-collapsed-background-color));display:none;left:0;position:absolute;z-index:-2}.gn-aside-header__header_with-decoration:before{background-color:var(--gn-aside-header-decoration-collapsed-background-color,var(--_--decoration-collapsed-background-color));content:\"\";display:none;height:calc(100% - var(--gn-aside-header-header-divider-height));left:0;position:absolute;top:0;width:100%;z-index:-2}.gn-aside-header__header:after{background-color:var(--gn-aside-header-divider-horizontal-color,var(--_--horizontal-divider-line-color));bottom:12px;content:\"\";height:1px;left:0;position:absolute;width:100%;z-index:-2}.gn-aside-header_compact .gn-aside-header__header:before,.gn-aside-header_compact .gn-aside-header__header_with-decoration .gn-aside-header__header-divider{display:block}.gn-aside-header_compact .gn-aside-header__header_with-decoration:after{display:none}.gn-aside-header__menu-items{flex-grow:1}.gn-aside-header__footer{display:flex;flex-direction:column;flex-shrink:0;margin:8px 0;width:100%}.gn-aside-header__panels{inset:var(--gn-aside-top-panel-height,var(--_--top-panel-height)) 0 0;max-height:calc(100vh - var(--gn-aside-top-panel-height, var(--_--top-panel-height)));overflow:auto;position:fixed;z-index:98}.gn-aside-header__panel{height:100%}.gn-aside-header__pane-container{display:flex;flex-direction:row;outline:none;overflow:visible;user-select:text}.gn-aside-header__pane-top-divider{background-color:var(--gn-aside-header-divider-horizontal-color,var(--_--horizontal-divider-line-color));height:1px;margin-top:-1px}.gn-aside-header__pane-top{background:var(--g-color-base-background);position:fixed;top:0;width:100%;z-index:98}.gn-aside-header__pane-top-alert_centered{display:flex;justify-content:space-around}.gn-aside-header__pane-top-alert_dense{padding-bottom:var(--g-spacing-2);padding-top:var(--g-spacing-2)}.gn-aside-header__content{margin-top:var(--gn-aside-top-panel-height,var(--_--top-panel-height));width:calc(100% - var(--gn-aside-header-size));z-index:95}.gn-aside-header__collapse-button{--g-button-background-color-hover:transparent;border-top:1px solid var(--gn-aside-header-divider-horizontal-color,var(--_--horizontal-divider-line-color));box-sizing:border-box;flex:none;height:20px;margin-top:auto;overflow:hidden;width:100%}.gn-aside-header__collapse-button>.g-button__text{align-items:center;display:flex;height:20px;justify-content:center}.gn-aside-header__collapse-button:not(.gn-aside-header__collapse-button_compact) .gn-aside-header__collapse-icon{transform:rotate(180deg)}.gn-aside-header__collapse-button .gn-aside-header__collapse-icon{color:var(--g-color-text-secondary)}.gn-aside-header__collapse-button:hover .gn-aside-header__collapse-icon{color:var(--g-color-text-primary)}";
10
+ var css_248z = ".gn-aside-header{--gn-aside-header-min-width:56px;--_--item-icon-background-size:38px;--_--background-color:var(--g-color-base-background);--_--decoration-collapsed-background-color:var(--g-color-base-warning-light);--_--decoration-expanded-background-color:var(--g-color-base-warning-light);--_--vertical-divider-line-color:var(--g-color-line-generic);--_--horizontal-divider-line-color:var(--g-color-line-generic);--_--top-panel-height:0px;background-color:var(--g-color-base-background);height:100%;position:relative;width:100%}.gn-aside-header__aside{background-color:var(--gn-aside-header-background-color,var(--_--background-color));box-sizing:border-box;display:flex;flex-direction:column;height:100vh;left:0;margin-top:var(--gn-aside-top-panel-height,var(--_--top-panel-height));max-height:calc(100vh - var(--gn-aside-top-panel-height, var(--_--top-panel-height)));position:sticky;top:var(--gn-aside-top-panel-height,var(--_--top-panel-height));width:inherit;z-index:100}.gn-aside-header__aside:after{background-color:var(--gn-aside-header-divider-vertical-color,var(--_--vertical-divider-line-color));content:\"\";height:100%;position:absolute;right:0;top:0;width:1px;z-index:2}.gn-aside-header__aside-popup-anchor{inset:0;position:absolute;z-index:1}.gn-aside-header__aside-content{--gradient-height:334px;display:flex;flex-direction:column;height:inherit;overflow-x:hidden;position:relative;user-select:none;width:inherit;z-index:2}.gn-aside-header__aside-content>.gn-aside-header-logo{margin:8px 0}.gn-aside-header__aside-content_with-decoration{background:linear-gradient(180deg,var(--gn-aside-header-decoration-expanded-background-color,var(--_--decoration-expanded-background-color)) calc(var(--gradient-height)*.33),transparent calc(var(--gradient-height)*.88))}.gn-aside-header__aside-custom-background{bottom:0;display:flex;position:absolute;top:0;z-index:-1}.gn-aside-header_compact .gn-aside-header__aside-content{background:transparent}.gn-aside-header__header{--gn-aside-header-header-divider-height:29px;box-sizing:border-box;flex:none;padding-bottom:22px;padding-top:8px;position:relative;width:100%;z-index:1}.gn-aside-header__header .gn-aside-header__header-divider{bottom:0;color:var(--gn-aside-header-decoration-collapsed-background-color,var(--_--decoration-collapsed-background-color));display:none;left:0;position:absolute;z-index:-2}.gn-aside-header__header_with-decoration:before{background-color:var(--gn-aside-header-decoration-collapsed-background-color,var(--_--decoration-collapsed-background-color));content:\"\";display:none;height:calc(100% - var(--gn-aside-header-header-divider-height));left:0;position:absolute;top:0;width:100%;z-index:-2}.gn-aside-header__header:after{background-color:var(--gn-aside-header-divider-horizontal-color,var(--_--horizontal-divider-line-color));bottom:12px;content:\"\";height:1px;left:0;position:absolute;width:100%;z-index:-2}.gn-aside-header_compact .gn-aside-header__header:before,.gn-aside-header_compact .gn-aside-header__header_with-decoration .gn-aside-header__header-divider{display:block}.gn-aside-header_compact .gn-aside-header__header_with-decoration:after{display:none}.gn-aside-header__logo-button-wrapper{width:var(--gn-aside-header-min-width)}.gn-aside-header__logo-button[class],.gn-aside-header__logo-button[class] .g-button__icon{height:var(--gn-aside-header-item-icon-background-size,var(--_--item-icon-background-size))}.gn-aside-header__menu-items{flex-grow:1}.gn-aside-header__footer{display:flex;flex-direction:column;flex-shrink:0;margin:8px 0;width:100%}.gn-aside-header__panels{inset:var(--gn-aside-top-panel-height,var(--_--top-panel-height)) 0 0;max-height:calc(100vh - var(--gn-aside-top-panel-height, var(--_--top-panel-height)));overflow:auto;position:fixed;z-index:98}.gn-aside-header__panel{height:100%}.gn-aside-header__pane-container{display:flex;flex-direction:row;outline:none;overflow:visible;user-select:text}.gn-aside-header__pane-top-divider{background-color:var(--gn-aside-header-divider-horizontal-color,var(--_--horizontal-divider-line-color));height:1px;margin-top:-1px}.gn-aside-header__pane-top{background:var(--g-color-base-background);position:fixed;top:0;width:100%;z-index:98}.gn-aside-header__pane-top-alert_centered{display:flex;justify-content:space-around}.gn-aside-header__pane-top-alert_dense{padding-bottom:var(--g-spacing-2);padding-top:var(--g-spacing-2)}.gn-aside-header__content{margin-top:var(--gn-aside-top-panel-height,var(--_--top-panel-height));width:calc(100% - var(--gn-aside-header-size));z-index:95}.gn-aside-header__collapse-button{--g-button-background-color-hover:transparent;border-top:1px solid var(--gn-aside-header-divider-horizontal-color,var(--_--horizontal-divider-line-color));box-sizing:border-box;flex:none;height:20px;margin-top:auto;overflow:hidden;width:100%}.gn-aside-header__collapse-button>.g-button__text{align-items:center;display:flex;height:20px;justify-content:center}.gn-aside-header__collapse-button:not(.gn-aside-header__collapse-button_compact) .gn-aside-header__collapse-icon{transform:rotate(180deg)}.gn-aside-header__collapse-button .gn-aside-header__collapse-icon{color:var(--g-color-text-secondary)}.gn-aside-header__collapse-button:hover .gn-aside-header__collapse-icon{color:var(--g-color-text-primary)}";
11
11
  styleInject(css_248z);
12
12
 
13
13
  const TopPanel = React__default.lazy(() => import('./TopPanel-2760cf72.js').then((module) => ({ default: module.TopPanel })));
@@ -790,11 +790,11 @@ const CollapseButton = () => {
790
790
  React__default.createElement(NotIcon, { data: controlMenuButtonIcon, className: b$5('collapse-icon'), width: "16", height: "10" })));
791
791
  };
792
792
 
793
- var css_248z = ".gn-logo{height:40px}.gn-logo,.gn-logo__logo-btn-place{align-items:center;display:flex;flex-shrink:0}.gn-logo__logo-btn-place{cursor:pointer;justify-content:center;width:var(--gn-aside-header-min-width)}.gn-logo__logo-btn-place .g-button:before{background-color:transparent}.gn-logo__btn-logo.g-button_view_flat.g-button_size_l{--g-button-height:var(\n --gn-aside-header-item-icon-background-size,var(--_--item-icon-background-size)\n )}.gn-logo__logo{cursor:pointer;font-size:var(--g-text-body-2-font-size);font-weight:var(--g-text-body-font-weight);line-height:var(--g-text-body-2-line-height);vertical-align:middle}.gn-logo__logo-link,.gn-logo__logo-link:active,.gn-logo__logo-link:focus,.gn-logo__logo-link:hover,.gn-logo__logo-link:visited{color:inherit;outline:none;text-decoration:none}.g-root .gn-logo__btn-logo.button2_theme_flat.button2_hovered_yes:before{background-color:transparent}";
793
+ var css_248z = ".gn-logo{height:40px}.gn-logo,.gn-logo__logo-btn-place{align-items:center;display:flex;flex-shrink:0}.gn-logo__logo-btn-place{cursor:pointer;justify-content:center}.gn-logo__logo-btn-place .g-button:before{background-color:transparent}.gn-logo__logo{cursor:pointer;font-size:var(--g-text-body-2-font-size);font-weight:var(--g-text-body-font-weight);line-height:var(--g-text-body-2-line-height);vertical-align:middle}.gn-logo__logo-link,.gn-logo__logo-link:active,.gn-logo__logo-link:focus,.gn-logo__logo-link:hover,.gn-logo__logo-link:visited{color:inherit;outline:none;text-decoration:none}.g-root .gn-logo__btn-logo.button2_theme_flat.button2_hovered_yes:before{background-color:transparent}";
794
794
  styleInject(css_248z);
795
795
 
796
796
  const b = block('logo');
797
- const Logo = ({ text, icon, iconSrc, iconClassName, iconSize = 24, textSize = 15, href, target = '_self', wrapper, onClick, compact, }) => {
797
+ const Logo = ({ text, icon, iconSrc, iconClassName, iconSize = 24, textSize = 15, href, target = '_self', wrapper, onClick, compact, className, buttonWrapperClassName, buttonClassName, }) => {
798
798
  const hasWrapper = typeof wrapper === 'function';
799
799
  let buttonIcon;
800
800
  if (iconSrc) {
@@ -804,7 +804,7 @@ const Logo = ({ text, icon, iconSrc, iconClassName, iconSize = 24, textSize = 15
804
804
  else if (icon) {
805
805
  buttonIcon = React__default.createElement(Icon, { data: icon, size: iconSize, className: iconClassName });
806
806
  }
807
- const button = (React__default.createElement(Button, { view: "flat", size: "l", className: b('btn-logo'), component: hasWrapper ? 'span' : undefined, onClick: onClick, target: target, rel: target === '_self' ? undefined : 'noreferrer', href: href }, buttonIcon));
807
+ const button = (React__default.createElement(Button, { view: "flat", size: "l", className: b('btn-logo', buttonClassName), component: hasWrapper ? 'span' : undefined, onClick: onClick, target: target, rel: target === '_self' ? undefined : 'noreferrer', href: href }, buttonIcon));
808
808
  let logo;
809
809
  if (typeof text === 'function') {
810
810
  logo = text();
@@ -812,8 +812,8 @@ const Logo = ({ text, icon, iconSrc, iconClassName, iconSize = 24, textSize = 15
812
812
  else {
813
813
  logo = (React__default.createElement("div", { className: b('logo'), style: { fontSize: textSize } }, text));
814
814
  }
815
- return (React__default.createElement("div", { className: b() },
816
- React__default.createElement("div", { className: b('logo-btn-place') }, hasWrapper ? wrapper(button, Boolean(compact)) : button),
815
+ return (React__default.createElement("div", { className: b(null, className) },
816
+ React__default.createElement("div", { className: b('logo-btn-place', buttonWrapperClassName) }, hasWrapper ? wrapper(button, Boolean(compact)) : button),
817
817
  !compact &&
818
818
  (hasWrapper ? (React__default.createElement("div", { onClick: onClick }, wrapper(logo, Boolean(compact)))) : (React__default.createElement("a", { href: href !== null && href !== void 0 ? href : '/', target: target, rel: target === '_self' ? undefined : 'noreferrer', className: b('logo-link'), onClick: onClick }, logo)))));
819
819
  };
@@ -828,7 +828,7 @@ const Header = () => {
828
828
  onLogoClickProp === null || onLogoClickProp === void 0 ? void 0 : onLogoClickProp(event);
829
829
  }, [onClosePanel, onLogoClickProp]);
830
830
  return (React__default.createElement("div", { className: b$5('header', { ['with-decoration']: headerDecoration }) },
831
- React__default.createElement(Logo, Object.assign({}, logo, { onClick: onLogoClick, compact: compact })),
831
+ React__default.createElement(Logo, Object.assign({}, logo, { onClick: onLogoClick, compact: compact, buttonWrapperClassName: b$5('logo-button-wrapper'), buttonClassName: b$5('logo-button') })),
832
832
  React__default.createElement(CompositeBar, { type: "subheader", items: subheaderItems || DEFAULT_SUBHEADER_ITEMS, onItemClick: onItemClick }),
833
833
  React__default.createElement(Icon, { data: headerDividerCollapsedIcon, className: b$5('header-divider'), width: ASIDE_HEADER_COMPACT_WIDTH, height: HEADER_DIVIDER_HEIGHT })));
834
834
  };
@@ -927,4 +927,4 @@ const PageLayoutAside = React__default.forwardRef((props, ref) => {
927
927
  PageLayoutAside.displayName = 'PageLayoutAside';
928
928
 
929
929
  export { Logo as L, PageLayoutAside as P };
930
- //# sourceMappingURL=PageLayoutAside-39c04908.js.map
930
+ //# sourceMappingURL=PageLayoutAside-8e7666c7.js.map