@gravity-ui/navigation 0.0.7 → 0.1.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.
- package/CHANGELOG.md +8 -0
- package/build/cjs/index.js +157 -73
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/types/components/ActionBar/ActionBar.d.ts +28 -0
- package/build/cjs/types/components/ActionBar/Group/ActionBarGroup.d.ts +10 -0
- package/build/cjs/types/components/ActionBar/Item/ActionBarItem.d.ts +11 -0
- package/build/cjs/types/components/ActionBar/Section/ActionBarSection.d.ts +9 -0
- package/build/cjs/types/components/ActionBar/Separator/ActionBarSeparator.d.ts +5 -0
- package/build/cjs/types/components/ActionBar/__stories__/ActionBar.stories.d.ts +44 -0
- package/build/cjs/types/components/ActionBar/__stories__/ActionBarShowcase.d.ts +2 -0
- package/build/cjs/types/components/ActionBar/index.d.ts +5 -0
- package/build/cjs/types/components/ActionBar/types.d.ts +3 -0
- package/build/cjs/types/components/AsideHeader/__stories__/getAsideHeaderWrapper.d.ts +3 -0
- package/build/cjs/types/components/CompositeBar/CompositeBar.d.ts +2 -1
- package/build/cjs/types/components/CompositeBar/utils.d.ts +4 -2
- package/build/cjs/types/components/index.d.ts +1 -0
- package/build/cjs/types/components/types.d.ts +1 -1
- package/build/esm/index.js +157 -74
- package/build/esm/index.js.map +1 -1
- package/build/esm/types/components/ActionBar/ActionBar.d.ts +28 -0
- package/build/esm/types/components/ActionBar/Group/ActionBarGroup.d.ts +10 -0
- package/build/esm/types/components/ActionBar/Item/ActionBarItem.d.ts +11 -0
- package/build/esm/types/components/ActionBar/Section/ActionBarSection.d.ts +9 -0
- package/build/esm/types/components/ActionBar/Separator/ActionBarSeparator.d.ts +5 -0
- package/build/esm/types/components/ActionBar/__stories__/ActionBar.stories.d.ts +44 -0
- package/build/esm/types/components/ActionBar/__stories__/ActionBarShowcase.d.ts +2 -0
- package/build/esm/types/components/ActionBar/index.d.ts +5 -0
- package/build/esm/types/components/ActionBar/types.d.ts +3 -0
- package/build/esm/types/components/AsideHeader/__stories__/getAsideHeaderWrapper.d.ts +3 -0
- package/build/esm/types/components/CompositeBar/CompositeBar.d.ts +2 -1
- package/build/esm/types/components/CompositeBar/utils.d.ts +4 -2
- package/build/esm/types/components/index.d.ts +1 -0
- package/build/esm/types/components/types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import './ActionBar.scss';
|
|
3
|
+
export declare type Props = PropsWithChildren<{
|
|
4
|
+
'aria-label'?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
}>;
|
|
7
|
+
declare const PublicActionBar: {
|
|
8
|
+
({ children, className, "aria-label": ariaLabel }: Props): JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
} & {
|
|
11
|
+
Section: {
|
|
12
|
+
({ children, type }: import("./Section/ActionBarSection").Props): JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
Group: {
|
|
16
|
+
({ children, className, pull }: import("./Group/ActionBarGroup").Props): JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
19
|
+
Item: {
|
|
20
|
+
({ children, className, pull, spacing }: import("./Item/ActionBarItem").Props): JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
Separator: {
|
|
24
|
+
(): JSX.Element;
|
|
25
|
+
displayName: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export { PublicActionBar as ActionBar };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { PropsWithPull } from '../types';
|
|
3
|
+
import './ActionBarGroup.scss';
|
|
4
|
+
export declare type Props = PropsWithChildren<PropsWithPull<{
|
|
5
|
+
className?: string;
|
|
6
|
+
}>>;
|
|
7
|
+
export declare const ActionBarGroup: {
|
|
8
|
+
({ children, className, pull }: Props): JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { PropsWithPull } from '../types';
|
|
3
|
+
import './ActionBarItem.scss';
|
|
4
|
+
export declare type Props = PropsWithChildren<PropsWithPull<{
|
|
5
|
+
spacing?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
}>>;
|
|
8
|
+
export declare const ActionBarItem: {
|
|
9
|
+
({ children, className, pull, spacing }: Props): JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import './ActionBarSection.scss';
|
|
3
|
+
export declare type Props = PropsWithChildren<{
|
|
4
|
+
type?: 'primary' | 'secondary';
|
|
5
|
+
}>;
|
|
6
|
+
export declare const ActionBarSection: {
|
|
7
|
+
({ children, type }: Props): JSX.Element;
|
|
8
|
+
displayName: string;
|
|
9
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
2
|
+
declare const _default: ComponentMeta<{
|
|
3
|
+
({ children, className, "aria-label": ariaLabel }: import("../ActionBar").Props): JSX.Element;
|
|
4
|
+
displayName: string;
|
|
5
|
+
} & {
|
|
6
|
+
Section: {
|
|
7
|
+
({ children, type }: import("..").ActionBarSectionProps): JSX.Element;
|
|
8
|
+
displayName: string;
|
|
9
|
+
};
|
|
10
|
+
Group: {
|
|
11
|
+
({ children, className, pull }: import("..").ActionBarGroupProps): JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
Item: {
|
|
15
|
+
({ children, className, pull, spacing }: import("..").ActionBarItemProps): JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
Separator: {
|
|
19
|
+
(): JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
}>;
|
|
23
|
+
export default _default;
|
|
24
|
+
export declare const Showcase: ComponentStory<{
|
|
25
|
+
({ children, className, "aria-label": ariaLabel }: import("../ActionBar").Props): JSX.Element;
|
|
26
|
+
displayName: string;
|
|
27
|
+
} & {
|
|
28
|
+
Section: {
|
|
29
|
+
({ children, type }: import("..").ActionBarSectionProps): JSX.Element;
|
|
30
|
+
displayName: string;
|
|
31
|
+
};
|
|
32
|
+
Group: {
|
|
33
|
+
({ children, className, pull }: import("..").ActionBarGroupProps): JSX.Element;
|
|
34
|
+
displayName: string;
|
|
35
|
+
};
|
|
36
|
+
Item: {
|
|
37
|
+
({ children, className, pull, spacing }: import("..").ActionBarItemProps): JSX.Element;
|
|
38
|
+
displayName: string;
|
|
39
|
+
};
|
|
40
|
+
Separator: {
|
|
41
|
+
(): JSX.Element;
|
|
42
|
+
displayName: string;
|
|
43
|
+
};
|
|
44
|
+
}>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ActionBar } from './ActionBar';
|
|
2
|
+
export type { Props as ActionBarProps } from './ActionBar';
|
|
3
|
+
export type { Props as ActionBarGroupProps } from './Group/ActionBarGroup';
|
|
4
|
+
export type { Props as ActionBarItemProps } from './Item/ActionBarItem';
|
|
5
|
+
export type { Props as ActionBarSectionProps } from './Section/ActionBarSection';
|
|
@@ -14,9 +14,10 @@ interface CompositeBarState {
|
|
|
14
14
|
export declare class CompositeBar extends React.Component<CompositeBarProps> {
|
|
15
15
|
state: CompositeBarState;
|
|
16
16
|
private listRef;
|
|
17
|
-
render(): JSX.Element;
|
|
17
|
+
render(): JSX.Element | null;
|
|
18
18
|
private renderAutosizeMenu;
|
|
19
19
|
private renderMenu;
|
|
20
20
|
private getMoreButtonItem;
|
|
21
|
+
private getAutosizeListItems;
|
|
21
22
|
}
|
|
22
23
|
export {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { MenuItem } from './../types';
|
|
2
|
-
export declare function getItemHeight(item: MenuItem): 40 | 50;
|
|
2
|
+
export declare function getItemHeight(item: MenuItem): 15 | 40 | 50;
|
|
3
3
|
export declare function getItemsHeight(items: MenuItem[]): number;
|
|
4
|
-
export declare
|
|
4
|
+
export declare function getSelectedItemIndex(items: MenuItem[]): number | undefined;
|
|
5
|
+
export declare function getPinnedItems(items: MenuItem[]): MenuItem[];
|
|
6
|
+
export declare function getItemsMinHeight(items: MenuItem[]): number;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { ActionBar } from './ActionBar';
|
|
1
2
|
export { AsideHeader, AsideHeaderProps } from './AsideHeader/AsideHeader';
|
|
2
3
|
export { Drawer, DrawerProps, DrawerItemProps, DrawerItem } from './Drawer/Drawer';
|
|
3
4
|
export { FooterItem, FooterItemProps } from './FooterItem/FooterItem';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IconProps } from '@gravity-ui/uikit';
|
|
3
|
-
export declare type MenuItemType = 'regular' | 'action';
|
|
3
|
+
export declare type MenuItemType = 'regular' | 'action' | 'divider';
|
|
4
4
|
export interface MenuItem {
|
|
5
5
|
id: string;
|
|
6
6
|
title: React.ReactNode;
|
package/build/esm/index.js
CHANGED
|
@@ -60,6 +60,84 @@ function block(name) {
|
|
|
60
60
|
return _default(`${NAMESPACE}${name}`);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
function styleInject(css, ref) {
|
|
64
|
+
if ( ref === void 0 ) ref = {};
|
|
65
|
+
var insertAt = ref.insertAt;
|
|
66
|
+
|
|
67
|
+
if (!css || typeof document === 'undefined') { return; }
|
|
68
|
+
|
|
69
|
+
var head = document.head || document.getElementsByTagName('head')[0];
|
|
70
|
+
var style = document.createElement('style');
|
|
71
|
+
style.type = 'text/css';
|
|
72
|
+
|
|
73
|
+
if (insertAt === 'top') {
|
|
74
|
+
if (head.firstChild) {
|
|
75
|
+
head.insertBefore(style, head.firstChild);
|
|
76
|
+
} else {
|
|
77
|
+
head.appendChild(style);
|
|
78
|
+
}
|
|
79
|
+
} else {
|
|
80
|
+
head.appendChild(style);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (style.styleSheet) {
|
|
84
|
+
style.styleSheet.cssText = css;
|
|
85
|
+
} else {
|
|
86
|
+
style.appendChild(document.createTextNode(css));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
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);
|
|
92
|
+
|
|
93
|
+
const b$b = block('action-bar-group');
|
|
94
|
+
const ActionBarGroup = ({ children, className, pull }) => {
|
|
95
|
+
return (React__default.createElement("ul", { className: b$b({ pull }, className), role: "group" }, children));
|
|
96
|
+
};
|
|
97
|
+
ActionBarGroup.displayName = 'ActionBar.Group';
|
|
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);
|
|
101
|
+
|
|
102
|
+
const b$a = block('action-bar-item');
|
|
103
|
+
const ActionBarItem = ({ children, className, pull, spacing = true }) => {
|
|
104
|
+
return React__default.createElement("li", { className: b$a({ pull, spacing }, className) }, children);
|
|
105
|
+
};
|
|
106
|
+
ActionBarItem.displayName = 'ActionBar.Item';
|
|
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);
|
|
110
|
+
|
|
111
|
+
const b$9 = block('action-bar-section');
|
|
112
|
+
const ActionBarSection = ({ children, type = 'primary' }) => {
|
|
113
|
+
return React__default.createElement("div", { className: b$9({ type }) }, children);
|
|
114
|
+
};
|
|
115
|
+
ActionBarSection.displayName = 'ActionBar.Section';
|
|
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);
|
|
119
|
+
|
|
120
|
+
const b$8 = block('action-bar-separator');
|
|
121
|
+
const ActionBarSeparator = () => {
|
|
122
|
+
return React__default.createElement("li", { role: "separator", className: b$8() });
|
|
123
|
+
};
|
|
124
|
+
ActionBarSeparator.displayName = 'ActionBar.Separator';
|
|
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);
|
|
128
|
+
|
|
129
|
+
const b$7 = block('action-bar');
|
|
130
|
+
const ActionBar = ({ children, className, 'aria-label': ariaLabel }) => {
|
|
131
|
+
return (React__default.createElement("section", { className: b$7(null, className), "aria-label": ariaLabel }, children));
|
|
132
|
+
};
|
|
133
|
+
ActionBar.displayName = 'ActionBar';
|
|
134
|
+
const PublicActionBar = Object.assign(ActionBar, {
|
|
135
|
+
Section: ActionBarSection,
|
|
136
|
+
Group: ActionBarGroup,
|
|
137
|
+
Item: ActionBarItem,
|
|
138
|
+
Separator: ActionBarSeparator,
|
|
139
|
+
});
|
|
140
|
+
|
|
63
141
|
var Dict;
|
|
64
142
|
(function (Dict) {
|
|
65
143
|
Dict["ExpandButton"] = "button_expand";
|
|
@@ -3086,33 +3164,6 @@ SwitchTransition.defaultProps = {
|
|
|
3086
3164
|
mode: modes.out
|
|
3087
3165
|
};
|
|
3088
3166
|
|
|
3089
|
-
function styleInject(css, ref) {
|
|
3090
|
-
if ( ref === void 0 ) ref = {};
|
|
3091
|
-
var insertAt = ref.insertAt;
|
|
3092
|
-
|
|
3093
|
-
if (!css || typeof document === 'undefined') { return; }
|
|
3094
|
-
|
|
3095
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
3096
|
-
var style = document.createElement('style');
|
|
3097
|
-
style.type = 'text/css';
|
|
3098
|
-
|
|
3099
|
-
if (insertAt === 'top') {
|
|
3100
|
-
if (head.firstChild) {
|
|
3101
|
-
head.insertBefore(style, head.firstChild);
|
|
3102
|
-
} else {
|
|
3103
|
-
head.appendChild(style);
|
|
3104
|
-
}
|
|
3105
|
-
} else {
|
|
3106
|
-
head.appendChild(style);
|
|
3107
|
-
}
|
|
3108
|
-
|
|
3109
|
-
if (style.styleSheet) {
|
|
3110
|
-
style.styleSheet.cssText = css;
|
|
3111
|
-
} else {
|
|
3112
|
-
style.appendChild(document.createTextNode(css));
|
|
3113
|
-
}
|
|
3114
|
-
}
|
|
3115
|
-
|
|
3116
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}";
|
|
3117
3168
|
styleInject(css_248z$6);
|
|
3118
3169
|
|
|
@@ -3722,6 +3773,8 @@ function getItemHeight(item) {
|
|
|
3722
3773
|
switch (item.type) {
|
|
3723
3774
|
case 'action':
|
|
3724
3775
|
return 50;
|
|
3776
|
+
case 'divider':
|
|
3777
|
+
return 15;
|
|
3725
3778
|
default:
|
|
3726
3779
|
return ITEM_HEIGHT;
|
|
3727
3780
|
}
|
|
@@ -3729,10 +3782,31 @@ function getItemHeight(item) {
|
|
|
3729
3782
|
function getItemsHeight(items) {
|
|
3730
3783
|
return items.reduce((sum, item) => sum + getItemHeight(item), 0);
|
|
3731
3784
|
}
|
|
3732
|
-
|
|
3785
|
+
function getSelectedItemIndex(items) {
|
|
3733
3786
|
const index = items.findIndex(({ current }) => Boolean(current));
|
|
3734
3787
|
return index === -1 ? undefined : index;
|
|
3735
|
-
}
|
|
3788
|
+
}
|
|
3789
|
+
function getPinnedItems(items) {
|
|
3790
|
+
const pinnedItems = [];
|
|
3791
|
+
for (const item of items) {
|
|
3792
|
+
if (item.pinned) {
|
|
3793
|
+
pinnedItems.push(item);
|
|
3794
|
+
}
|
|
3795
|
+
else if (item.type === 'divider') {
|
|
3796
|
+
if (pinnedItems.length > 0 && pinnedItems[pinnedItems.length - 1].type !== 'divider') {
|
|
3797
|
+
pinnedItems.push(item);
|
|
3798
|
+
}
|
|
3799
|
+
}
|
|
3800
|
+
}
|
|
3801
|
+
return pinnedItems;
|
|
3802
|
+
}
|
|
3803
|
+
function getItemsMinHeight(items) {
|
|
3804
|
+
const pinnedItems = getPinnedItems(items);
|
|
3805
|
+
const afterMoreButtonItems = items.filter((item) => item.afterMoreButton);
|
|
3806
|
+
return (getItemsHeight(pinnedItems) +
|
|
3807
|
+
getItemsHeight(afterMoreButtonItems) +
|
|
3808
|
+
(pinnedItems.length === items.length ? 0 : ITEM_HEIGHT));
|
|
3809
|
+
}
|
|
3736
3810
|
|
|
3737
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}";
|
|
3738
3812
|
styleInject(css_248z$4);
|
|
@@ -3751,7 +3825,7 @@ const ItemTooltip = ({ anchor, text }) => {
|
|
|
3751
3825
|
React__default.createElement("div", { className: b$4('text') }, text)));
|
|
3752
3826
|
};
|
|
3753
3827
|
|
|
3754
|
-
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__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}";
|
|
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}";
|
|
3755
3829
|
styleInject(css_248z$3);
|
|
3756
3830
|
|
|
3757
3831
|
const b$3 = block('composite-bar-item');
|
|
@@ -3767,6 +3841,9 @@ function renderItemTitle(item) {
|
|
|
3767
3841
|
const defaultPopupPlacement = ['right-end'];
|
|
3768
3842
|
const defaultPopupOffset = [-20, 8];
|
|
3769
3843
|
const Item = ({ item, compact, className, collapseItems, onMouseLeave, onMouseEnter, enableTooltip = true, popupVisible = false, popupAnchor, popupPlacement = defaultPopupPlacement, popupOffset = defaultPopupOffset, renderPopupContent, onClosePopup, }) => {
|
|
3844
|
+
if (item.type === 'divider') {
|
|
3845
|
+
return React__default.createElement("div", { className: b$3('menu-divider') });
|
|
3846
|
+
}
|
|
3770
3847
|
const [tooltipAnchor, setTooltipAnchor] = React__default.useState(null);
|
|
3771
3848
|
const [open, toggleOpen] = React__default.useState(false);
|
|
3772
3849
|
const ref = React__default.useRef(null);
|
|
@@ -3867,14 +3944,13 @@ class CompositeBar extends React__default.Component {
|
|
|
3867
3944
|
}
|
|
3868
3945
|
render() {
|
|
3869
3946
|
const { enableCollapsing, items } = this.props;
|
|
3947
|
+
if (items.length === 0) {
|
|
3948
|
+
return null;
|
|
3949
|
+
}
|
|
3870
3950
|
if (!enableCollapsing) {
|
|
3871
3951
|
return React__default.createElement("div", { className: b$2() }, this.renderMenu());
|
|
3872
3952
|
}
|
|
3873
|
-
const
|
|
3874
|
-
const afterMoreButtonItems = items.filter((item) => item.afterMoreButton);
|
|
3875
|
-
const minHeight = getItemsHeight(pinnedItems) +
|
|
3876
|
-
getItemsHeight(afterMoreButtonItems) +
|
|
3877
|
-
(pinnedItems.length === items.length ? 0 : ITEM_HEIGHT);
|
|
3953
|
+
const minHeight = getItemsMinHeight(items);
|
|
3878
3954
|
return (React__default.createElement("div", { className: b$2({ autosizer: true }), style: { minHeight } }, items.length !== 0 && (React__default.createElement(AutoSizer, null, ({ width, height }) => {
|
|
3879
3955
|
const style = {
|
|
3880
3956
|
width,
|
|
@@ -3884,42 +3960,8 @@ class CompositeBar extends React__default.Component {
|
|
|
3884
3960
|
}))));
|
|
3885
3961
|
}
|
|
3886
3962
|
renderAutosizeMenu(height) {
|
|
3887
|
-
const {
|
|
3888
|
-
const
|
|
3889
|
-
const extraItemHeight = items.reduce((sum, item) => sum + (getItemHeight(item) - ITEM_HEIGHT), afterMoreButtonItems.length * ITEM_HEIGHT);
|
|
3890
|
-
const capacity = Math.max(1, Math.floor((height - extraItemHeight) / ITEM_HEIGHT));
|
|
3891
|
-
let listItems;
|
|
3892
|
-
let collapseItems = [];
|
|
3893
|
-
const regularItems = items.filter((item) => !item.afterMoreButton);
|
|
3894
|
-
if (capacity === 1) {
|
|
3895
|
-
listItems = regularItems.filter((item) => item.pinned);
|
|
3896
|
-
collapseItems = [...regularItems.filter((item) => !item.pinned)];
|
|
3897
|
-
}
|
|
3898
|
-
else if (capacity < items.length) {
|
|
3899
|
-
const extraCount = regularItems.filter((item, idx) => item.pinned && idx >= capacity - 1).length;
|
|
3900
|
-
const pinnedFlag = regularItems.reduceRight((acc, curr, idx) => {
|
|
3901
|
-
const useExtraCount = !curr.pinned && idx < capacity - 1 && acc.extraCount > 0;
|
|
3902
|
-
acc.flags.unshift(curr.pinned || useExtraCount);
|
|
3903
|
-
return {
|
|
3904
|
-
flags: acc.flags,
|
|
3905
|
-
extraCount: acc.extraCount - Number(useExtraCount),
|
|
3906
|
-
};
|
|
3907
|
-
}, { flags: [], extraCount }).flags;
|
|
3908
|
-
listItems = regularItems.filter((item, idx) => item.pinned || (idx < capacity - 1 && !pinnedFlag[idx]));
|
|
3909
|
-
collapseItems = regularItems.filter((item, idx) => !item.pinned && (idx >= capacity - 1 || pinnedFlag[idx]));
|
|
3910
|
-
}
|
|
3911
|
-
else {
|
|
3912
|
-
listItems = [...regularItems];
|
|
3913
|
-
}
|
|
3914
|
-
if ((collapseItems === null || collapseItems === void 0 ? void 0 : collapseItems.length) === 1) {
|
|
3915
|
-
listItems = listItems.concat(collapseItems);
|
|
3916
|
-
}
|
|
3917
|
-
else if ((collapseItems === null || collapseItems === void 0 ? void 0 : collapseItems.length) > 1) {
|
|
3918
|
-
listItems.push(this.getMoreButtonItem(dict));
|
|
3919
|
-
}
|
|
3920
|
-
if (afterMoreButtonItems.length) {
|
|
3921
|
-
listItems = listItems.concat(afterMoreButtonItems);
|
|
3922
|
-
}
|
|
3963
|
+
const { compact, onItemClick } = this.props;
|
|
3964
|
+
const { listItems, collapseItems } = this.getAutosizeListItems(height);
|
|
3923
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: () => {
|
|
3924
3966
|
var _a;
|
|
3925
3967
|
if (compact) {
|
|
@@ -3936,8 +3978,9 @@ class CompositeBar extends React__default.Component {
|
|
|
3936
3978
|
}
|
|
3937
3979
|
}, compact: compact })) }));
|
|
3938
3980
|
}
|
|
3939
|
-
getMoreButtonItem(
|
|
3981
|
+
getMoreButtonItem() {
|
|
3940
3982
|
var _a;
|
|
3983
|
+
const { dict } = this.props;
|
|
3941
3984
|
const title = (_a = dict === null || dict === void 0 ? void 0 : dict[Dict.MoreButton]) !== null && _a !== void 0 ? _a : defaultDict[Dict.MoreButton];
|
|
3942
3985
|
return {
|
|
3943
3986
|
id: COLLAPSE_ITEM_ID,
|
|
@@ -3946,6 +3989,46 @@ class CompositeBar extends React__default.Component {
|
|
|
3946
3989
|
iconSize: 16,
|
|
3947
3990
|
};
|
|
3948
3991
|
}
|
|
3992
|
+
getAutosizeListItems(height) {
|
|
3993
|
+
const { items } = this.props;
|
|
3994
|
+
const afterMoreButtonItems = items.filter((item) => item.afterMoreButton);
|
|
3995
|
+
const regularItems = items.filter((item) => !item.afterMoreButton);
|
|
3996
|
+
const listItems = [...regularItems, ...afterMoreButtonItems];
|
|
3997
|
+
const allItemsHeight = getItemsHeight(listItems);
|
|
3998
|
+
if (allItemsHeight <= height) {
|
|
3999
|
+
return { listItems, collapseItems: [] };
|
|
4000
|
+
}
|
|
4001
|
+
const collapseItem = this.getMoreButtonItem();
|
|
4002
|
+
const collapseItemHeight = getItemHeight(collapseItem);
|
|
4003
|
+
listItems.splice(regularItems.length, 0, collapseItem);
|
|
4004
|
+
const collapseItems = [];
|
|
4005
|
+
let listHeight = allItemsHeight + collapseItemHeight;
|
|
4006
|
+
let index = listItems.length;
|
|
4007
|
+
while (listHeight > height) {
|
|
4008
|
+
if (index === 0) {
|
|
4009
|
+
break;
|
|
4010
|
+
}
|
|
4011
|
+
index--;
|
|
4012
|
+
const item = listItems[index];
|
|
4013
|
+
if (item.pinned || item.id === COLLAPSE_ITEM_ID || item.afterMoreButton) {
|
|
4014
|
+
continue;
|
|
4015
|
+
}
|
|
4016
|
+
if (item.type === 'divider') {
|
|
4017
|
+
if (index + 1 < listItems.length && listItems[index + 1].type === 'divider') {
|
|
4018
|
+
listHeight -= getItemHeight(item);
|
|
4019
|
+
listItems.splice(index, 1);
|
|
4020
|
+
}
|
|
4021
|
+
continue;
|
|
4022
|
+
}
|
|
4023
|
+
listHeight -= getItemHeight(item);
|
|
4024
|
+
collapseItems.unshift(...listItems.splice(index, 1));
|
|
4025
|
+
}
|
|
4026
|
+
if (listItems[index].type === 'divider' &&
|
|
4027
|
+
(index === 0 || listItems[index - 1].type === 'divider')) {
|
|
4028
|
+
listItems.splice(index, 1);
|
|
4029
|
+
}
|
|
4030
|
+
return { listItems, collapseItems };
|
|
4031
|
+
}
|
|
3949
4032
|
}
|
|
3950
4033
|
|
|
3951
4034
|
/* Used by renderContent AsideHeader prop */
|
|
@@ -3989,7 +4072,7 @@ var SvgDividerCollapsed = function SvgDividerCollapsed(props) {
|
|
|
3989
4072
|
})));
|
|
3990
4073
|
};
|
|
3991
4074
|
|
|
3992
|
-
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}\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}";
|
|
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}";
|
|
3993
4076
|
styleInject(css_248z$1);
|
|
3994
4077
|
|
|
3995
4078
|
const b$1 = block('aside-header');
|
|
@@ -4113,5 +4196,5 @@ const FooterItem = (_a) => {
|
|
|
4113
4196
|
return (React__default.createElement(Item, Object.assign({}, props, { item: Object.assign({ iconSize: ASIDE_HEADER_FOOTER_ICON_SIZE }, item), className: b({ compact: props.compact }) })));
|
|
4114
4197
|
};
|
|
4115
4198
|
|
|
4116
|
-
export { AsideHeader, Dict, Drawer, DrawerItem, FooterItem };
|
|
4199
|
+
export { PublicActionBar as ActionBar, AsideHeader, Dict, Drawer, DrawerItem, FooterItem };
|
|
4117
4200
|
//# sourceMappingURL=index.js.map
|