@gravity-ui/navigation 0.8.1 → 0.9.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/components/ActionBar/__stories__/ActionBar.stories.d.ts +21 -0
- package/build/cjs/components/ActionBar/__stories__/ActionBarSingleSection.d.ts +2 -0
- package/build/cjs/components/index.d.ts +1 -1
- package/build/cjs/index.js +138 -138
- package/build/cjs/index.js.map +1 -1
- package/build/esm/components/ActionBar/__stories__/ActionBar.stories.d.ts +21 -0
- package/build/esm/components/ActionBar/__stories__/ActionBarSingleSection.d.ts +2 -0
- package/build/esm/components/index.d.ts +1 -1
- package/build/esm/index.js +138 -138
- package/build/esm/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -42,3 +42,24 @@ export declare const Showcase: ComponentStory<{
|
|
|
42
42
|
displayName: string;
|
|
43
43
|
};
|
|
44
44
|
}>;
|
|
45
|
+
export declare const SingleSection: ComponentStory<{
|
|
46
|
+
({ children, className, "aria-label": ariaLabel }: import("../ActionBar").Props): JSX.Element;
|
|
47
|
+
displayName: string;
|
|
48
|
+
} & {
|
|
49
|
+
Section: {
|
|
50
|
+
({ children, type }: import("..").ActionBarSectionProps): JSX.Element;
|
|
51
|
+
displayName: string;
|
|
52
|
+
};
|
|
53
|
+
Group: {
|
|
54
|
+
({ children, className, pull }: import("..").ActionBarGroupProps): JSX.Element;
|
|
55
|
+
displayName: string;
|
|
56
|
+
};
|
|
57
|
+
Item: {
|
|
58
|
+
({ children, className, pull, spacing }: import("..").ActionBarItemProps): JSX.Element;
|
|
59
|
+
displayName: string;
|
|
60
|
+
};
|
|
61
|
+
Separator: {
|
|
62
|
+
(): JSX.Element;
|
|
63
|
+
displayName: string;
|
|
64
|
+
};
|
|
65
|
+
}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { ActionBar } from './ActionBar';
|
|
2
1
|
export { AsideHeader, AsideHeaderProps } from './AsideHeader/AsideHeader';
|
|
3
2
|
export { Drawer, DrawerProps, DrawerItemProps, DrawerItem } from './Drawer/Drawer';
|
|
4
3
|
export { FooterItem, FooterItemProps } from './FooterItem/FooterItem';
|
|
4
|
+
export * from './ActionBar';
|
|
5
5
|
export * from './Title';
|
|
6
6
|
export * from './HotkeysPanel';
|
|
7
7
|
export * from './Settings';
|
package/build/esm/index.js
CHANGED
|
@@ -61,84 +61,6 @@ function block(name) {
|
|
|
61
61
|
return _default(`${NAMESPACE}${name}`);
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
function styleInject(css, ref) {
|
|
65
|
-
if ( ref === void 0 ) ref = {};
|
|
66
|
-
var insertAt = ref.insertAt;
|
|
67
|
-
|
|
68
|
-
if (!css || typeof document === 'undefined') { return; }
|
|
69
|
-
|
|
70
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
71
|
-
var style = document.createElement('style');
|
|
72
|
-
style.type = 'text/css';
|
|
73
|
-
|
|
74
|
-
if (insertAt === 'top') {
|
|
75
|
-
if (head.firstChild) {
|
|
76
|
-
head.insertBefore(style, head.firstChild);
|
|
77
|
-
} else {
|
|
78
|
-
head.appendChild(style);
|
|
79
|
-
}
|
|
80
|
-
} else {
|
|
81
|
-
head.appendChild(style);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
if (style.styleSheet) {
|
|
85
|
-
style.styleSheet.cssText = css;
|
|
86
|
-
} else {
|
|
87
|
-
style.appendChild(document.createTextNode(css));
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
var css_248z$l = ".ycn-action-bar-group {\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n margin: 0;\n padding: 0;\n}\n.ycn-action-bar-group_pull_left {\n margin-left: 0;\n margin-right: auto;\n}\n.ycn-action-bar-group_pull_right {\n margin-left: auto;\n margin-right: 0;\n}\n.ycn-action-bar-group_pull_center {\n margin-left: auto;\n margin-right: auto;\n}";
|
|
92
|
-
styleInject(css_248z$l);
|
|
93
|
-
|
|
94
|
-
const b$m = block('action-bar-group');
|
|
95
|
-
const ActionBarGroup = ({ children, className, pull }) => {
|
|
96
|
-
return (React__default.createElement("ul", { className: b$m({ pull }, className), role: "group" }, children));
|
|
97
|
-
};
|
|
98
|
-
ActionBarGroup.displayName = 'ActionBar.Group';
|
|
99
|
-
|
|
100
|
-
var css_248z$k = ".ycn-action-bar-item {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n.ycn-action-bar-item_pull_left {\n margin-left: 0;\n margin-right: auto;\n}\n.ycn-action-bar-item_pull_right {\n margin-left: auto;\n margin-right: 0;\n}\n.ycn-action-bar-item_pull_center {\n margin-left: auto;\n margin-right: auto;\n}\n.ycn-action-bar-item + .ycn-action-bar-item_spacing {\n margin-left: 8px;\n}";
|
|
101
|
-
styleInject(css_248z$k);
|
|
102
|
-
|
|
103
|
-
const b$l = block('action-bar-item');
|
|
104
|
-
const ActionBarItem = ({ children, className, pull, spacing = true }) => {
|
|
105
|
-
return React__default.createElement("li", { className: b$l({ pull, spacing }, className) }, children);
|
|
106
|
-
};
|
|
107
|
-
ActionBarItem.displayName = 'ActionBar.Item';
|
|
108
|
-
|
|
109
|
-
var css_248z$j = ".ycn-action-bar-section {\n display: flex;\n flex-flow: row nowrap;\n justify-content: flex-start;\n align-items: stretch;\n}\n.ycn-action-bar-section + .ycn-action-bar-section {\n border-left: solid 1px var(--yc-color-line-generic);\n}\n.ycn-action-bar-section_type_primary {\n flex: 1 1 auto;\n padding-left: 20px;\n padding-right: 20px;\n}\n.ycn-action-bar-section_type_secondary {\n padding-left: 6px;\n padding-right: 6px;\n}";
|
|
110
|
-
styleInject(css_248z$j);
|
|
111
|
-
|
|
112
|
-
const b$k = block('action-bar-section');
|
|
113
|
-
const ActionBarSection = ({ children, type = 'primary' }) => {
|
|
114
|
-
return React__default.createElement("div", { className: b$k({ type }) }, children);
|
|
115
|
-
};
|
|
116
|
-
ActionBarSection.displayName = 'ActionBar.Section';
|
|
117
|
-
|
|
118
|
-
var css_248z$i = ".ycn-action-bar-separator {\n list-style: none;\n margin: 0;\n padding: 0;\n margin-left: 6px;\n margin-right: 6px;\n border-right: solid 1px var(--yc-color-line-generic);\n height: 40px;\n}";
|
|
119
|
-
styleInject(css_248z$i);
|
|
120
|
-
|
|
121
|
-
const b$j = block('action-bar-separator');
|
|
122
|
-
const ActionBarSeparator = () => {
|
|
123
|
-
return React__default.createElement("li", { role: "separator", className: b$j() });
|
|
124
|
-
};
|
|
125
|
-
ActionBarSeparator.displayName = 'ActionBar.Separator';
|
|
126
|
-
|
|
127
|
-
var css_248z$h = ".ycn-action-bar {\n box-sizing: border-box;\n height: 40px;\n border-bottom: solid 1px var(--yc-color-line-generic);\n display: flex;\n flex-flow: row nowrap;\n justify-content: flex-start;\n align-items: stretch;\n}";
|
|
128
|
-
styleInject(css_248z$h);
|
|
129
|
-
|
|
130
|
-
const b$i = block('action-bar');
|
|
131
|
-
const ActionBar = ({ children, className, 'aria-label': ariaLabel }) => {
|
|
132
|
-
return (React__default.createElement("section", { className: b$i(null, className), "aria-label": ariaLabel }, children));
|
|
133
|
-
};
|
|
134
|
-
ActionBar.displayName = 'ActionBar';
|
|
135
|
-
const PublicActionBar = Object.assign(ActionBar, {
|
|
136
|
-
Section: ActionBarSection,
|
|
137
|
-
Group: ActionBarGroup,
|
|
138
|
-
Item: ActionBarItem,
|
|
139
|
-
Separator: ActionBarSeparator,
|
|
140
|
-
});
|
|
141
|
-
|
|
142
64
|
var MobileHeaderDict;
|
|
143
65
|
(function (MobileHeaderDict) {
|
|
144
66
|
MobileHeaderDict["CloseBurger"] = "button_close-burger";
|
|
@@ -3181,15 +3103,42 @@ SwitchTransition.defaultProps = {
|
|
|
3181
3103
|
mode: modes.out
|
|
3182
3104
|
};
|
|
3183
3105
|
|
|
3184
|
-
|
|
3185
|
-
|
|
3106
|
+
function styleInject(css, ref) {
|
|
3107
|
+
if ( ref === void 0 ) ref = {};
|
|
3108
|
+
var insertAt = ref.insertAt;
|
|
3109
|
+
|
|
3110
|
+
if (!css || typeof document === 'undefined') { return; }
|
|
3186
3111
|
|
|
3187
|
-
|
|
3112
|
+
var head = document.head || document.getElementsByTagName('head')[0];
|
|
3113
|
+
var style = document.createElement('style');
|
|
3114
|
+
style.type = 'text/css';
|
|
3115
|
+
|
|
3116
|
+
if (insertAt === 'top') {
|
|
3117
|
+
if (head.firstChild) {
|
|
3118
|
+
head.insertBefore(style, head.firstChild);
|
|
3119
|
+
} else {
|
|
3120
|
+
head.appendChild(style);
|
|
3121
|
+
}
|
|
3122
|
+
} else {
|
|
3123
|
+
head.appendChild(style);
|
|
3124
|
+
}
|
|
3125
|
+
|
|
3126
|
+
if (style.styleSheet) {
|
|
3127
|
+
style.styleSheet.cssText = css;
|
|
3128
|
+
} else {
|
|
3129
|
+
style.appendChild(document.createTextNode(css));
|
|
3130
|
+
}
|
|
3131
|
+
}
|
|
3132
|
+
|
|
3133
|
+
var css_248z$l = ".ycn-drawer__item {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n height: 100%;\n will-change: transform;\n background-color: var(--yc-color-base-background);\n}\n.ycn-drawer__item_direction_right {\n left: auto;\n right: 0;\n}\n.ycn-drawer__item-transition-enter {\n transform: translate(-100%, 0);\n}\n.ycn-drawer__item-transition_direction_right-enter {\n transform: translate(100%, 0);\n}\n.ycn-drawer__item-transition-enter-active, .ycn-drawer__item-transition_direction_right-enter-active {\n transform: translate(0, 0);\n transition: transform 300ms;\n}\n.ycn-drawer__item-transition-enter-done, .ycn-drawer__item-transition_direction_right-enter-done {\n filter: blur(0px);\n transform: translateZ(0);\n}\n.ycn-drawer__item-transition-exit, .ycn-drawer__item-transition_direction_right-exit {\n transform: translate(0, 0);\n}\n.ycn-drawer__item-transition-exit-active, .ycn-drawer__item-transition_direction_right-exit-active {\n transition: transform 300ms;\n}\n.ycn-drawer__item-transition-exit-active {\n transform: translate(-100%, 0);\n}\n.ycn-drawer__item-transition_direction_right-exit-active {\n transform: translate(100%, 0);\n}\n.ycn-drawer__item-transition-exit-done, .ycn-drawer__item-transition_direction_right-exit-done {\n visibility: hidden;\n}\n.ycn-drawer__veil {\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n background-color: var(--yc-color-sfx-veil);\n}\n.ycn-drawer__veil-transition-enter {\n opacity: 0;\n}\n.ycn-drawer__veil-transition-enter-active {\n opacity: 1;\n transition: opacity 300ms;\n}\n.ycn-drawer__veil-transition-exit {\n opacity: 1;\n}\n.ycn-drawer__veil-transition-exit-active {\n opacity: 0;\n transition: opacity 300ms;\n}\n.ycn-drawer__veil-transition-exit-done {\n visibility: hidden;\n}";
|
|
3134
|
+
styleInject(css_248z$l);
|
|
3135
|
+
|
|
3136
|
+
const b$m = block('drawer');
|
|
3188
3137
|
const TIMEOUT = 300;
|
|
3189
3138
|
const DrawerItem = ({ visible, content, direction, className }) => {
|
|
3190
3139
|
const itemRef = React__default.useRef(null);
|
|
3191
|
-
return (React__default.createElement(CSSTransition, { in: visible, timeout: TIMEOUT, unmountOnExit: true, classNames: b$
|
|
3192
|
-
React__default.createElement("div", { ref: itemRef, className: b$
|
|
3140
|
+
return (React__default.createElement(CSSTransition, { in: visible, timeout: TIMEOUT, unmountOnExit: true, classNames: b$m('item-transition', { direction }), nodeRef: itemRef },
|
|
3141
|
+
React__default.createElement("div", { ref: itemRef, className: b$m('item', { direction }, className) }, content)));
|
|
3193
3142
|
};
|
|
3194
3143
|
const Drawer = ({ className, children, style, onVeilClick, onEscape, preventScrollBody = true, }) => {
|
|
3195
3144
|
let someItemVisible = false;
|
|
@@ -3220,9 +3169,9 @@ const Drawer = ({ className, children, style, onVeilClick, onEscape, preventScro
|
|
|
3220
3169
|
const veilRef = React__default.useRef(null);
|
|
3221
3170
|
return (React__default.createElement(Transition, { in: someItemVisible, timeout: { enter: 0, exit: TIMEOUT }, mountOnEnter: true, unmountOnExit: true, nodeRef: containerRef }, (state) => {
|
|
3222
3171
|
const childrenVisible = someItemVisible && state === 'entered';
|
|
3223
|
-
return (React__default.createElement("div", { ref: containerRef, className: b$
|
|
3224
|
-
React__default.createElement(CSSTransition, { in: childrenVisible, timeout: TIMEOUT, unmountOnExit: true, classNames: b$
|
|
3225
|
-
React__default.createElement("div", { ref: veilRef, className: b$
|
|
3172
|
+
return (React__default.createElement("div", { ref: containerRef, className: b$m(null, className), style: style },
|
|
3173
|
+
React__default.createElement(CSSTransition, { in: childrenVisible, timeout: TIMEOUT, unmountOnExit: true, classNames: b$m('veil-transition'), nodeRef: veilRef },
|
|
3174
|
+
React__default.createElement("div", { ref: veilRef, className: b$m('veil'), onClick: onVeilClick })),
|
|
3226
3175
|
React__default.Children.map(children, (child) => {
|
|
3227
3176
|
const childElem = child;
|
|
3228
3177
|
if (childElem.type === DrawerItem) {
|
|
@@ -3234,10 +3183,10 @@ const Drawer = ({ className, children, style, onVeilClick, onEscape, preventScro
|
|
|
3234
3183
|
}));
|
|
3235
3184
|
};
|
|
3236
3185
|
|
|
3237
|
-
var css_248z$
|
|
3238
|
-
styleInject(css_248z$
|
|
3186
|
+
var css_248z$k = ".ycn-logo {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n height: 40px;\n}\n.ycn-logo__logo-btn-place {\n flex-shrink: 0;\n width: var(--aside-header-min-width);\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n}\n.ycn-logo__logo-btn-place .yc-button::before {\n background-color: transparent;\n}\n.ycn-logo__btn-logo.yc-button_view_flat.yc-button_size_l {\n --yc-button-height: 38px;\n}\n.ycn-logo__logo {\n font-size: var(--yc-text-body-2-font-size);\n line-height: var(--yc-text-body-2-line-height);\n font-weight: var(--yc-text-body-font-weight);\n vertical-align: middle;\n cursor: pointer;\n}\n.ycn-logo__logo-link, .ycn-logo__logo-link:hover, .ycn-logo__logo-link:active, .ycn-logo__logo-link:visited, .ycn-logo__logo-link:focus {\n text-decoration: none;\n outline: none;\n color: inherit;\n}\n.yc-root .ycn-logo__btn-logo.button2_theme_flat.button2_hovered_yes::before {\n background-color: transparent;\n}";
|
|
3187
|
+
styleInject(css_248z$k);
|
|
3239
3188
|
|
|
3240
|
-
const b$
|
|
3189
|
+
const b$l = block('logo');
|
|
3241
3190
|
const Logo$1 = ({ text, compact, icon, iconSrc, iconClassName, iconSize = 24, textSize = 15, href = '/', wrapper, onClick, }) => {
|
|
3242
3191
|
const hasClickHandler = typeof onClick === 'function';
|
|
3243
3192
|
const hasWrapper = typeof wrapper === 'function';
|
|
@@ -3255,18 +3204,18 @@ const Logo$1 = ({ text, compact, icon, iconSrc, iconClassName, iconSize = 24, te
|
|
|
3255
3204
|
else if (icon) {
|
|
3256
3205
|
buttonIcon = React__default.createElement(Icon, { data: icon, size: iconSize, className: iconClassName });
|
|
3257
3206
|
}
|
|
3258
|
-
const button = (React__default.createElement(Button, Object.assign({ view: "flat", size: "l", className: b$
|
|
3207
|
+
const button = (React__default.createElement(Button, Object.assign({ view: "flat", size: "l", className: b$l('btn-logo'), component: hasWrapper ? 'span' : undefined, onClick: onClick }, linkProps), buttonIcon));
|
|
3259
3208
|
let logo;
|
|
3260
3209
|
if (typeof text === 'function') {
|
|
3261
3210
|
logo = text();
|
|
3262
3211
|
}
|
|
3263
3212
|
else {
|
|
3264
|
-
logo = (React__default.createElement("div", { className: b$
|
|
3213
|
+
logo = (React__default.createElement("div", { className: b$l('logo'), style: { fontSize: textSize } }, text));
|
|
3265
3214
|
}
|
|
3266
|
-
return (React__default.createElement("div", { className: b$
|
|
3267
|
-
React__default.createElement("div", { className: b$
|
|
3215
|
+
return (React__default.createElement("div", { className: b$l() },
|
|
3216
|
+
React__default.createElement("div", { className: b$l('logo-btn-place') }, hasWrapper ? wrapper(button, compact) : button),
|
|
3268
3217
|
!compact &&
|
|
3269
|
-
(hasWrapper ? (React__default.createElement("div", { onClick: onClick }, wrapper(logo, compact))) : (React__default.createElement("a", Object.assign({}, linkProps, { className: b$
|
|
3218
|
+
(hasWrapper ? (React__default.createElement("div", { onClick: onClick }, wrapper(logo, compact))) : (React__default.createElement("a", Object.assign({}, linkProps, { className: b$l('logo-link'), onClick: onClick }), logo)))));
|
|
3270
3219
|
};
|
|
3271
3220
|
|
|
3272
3221
|
var classCallCheck = function (instance, Constructor) {
|
|
@@ -3798,16 +3747,16 @@ function getItemsMinHeight(items) {
|
|
|
3798
3747
|
(pinnedItems.length === items.length ? 0 : ITEM_HEIGHT));
|
|
3799
3748
|
}
|
|
3800
3749
|
|
|
3801
|
-
var css_248z$
|
|
3802
|
-
styleInject(css_248z$
|
|
3750
|
+
var css_248z$j = ".ycn-composite-bar-item {\n --composite-bar-item-action-size: 36px;\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n cursor: pointer;\n}\n.ycn-composite-bar-item__icon {\n color: var(--yc-color-text-misc);\n}\n.ycn-composite-bar-item__icon-place {\n flex-shrink: 0;\n width: var(--aside-header-min-width);\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n.ycn-composite-bar-item__title {\n display: flex;\n overflow: hidden;\n}\n.ycn-composite-bar-item__title-text {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n.ycn-composite-bar-item__title-adornment {\n margin: 0 10px;\n}\n.ycn-composite-bar-item__collapse-item {\n display: flex;\n padding: 0 16px;\n align-items: center;\n width: 100%;\n height: 100%;\n cursor: pointer;\n}\n.ycn-composite-bar-item__collapse-item .ycn-composite-bar-item__title-adornment {\n margin-right: 0;\n}\n.ycn-composite-bar-item__menu-divider {\n margin: 0 8px;\n width: 100%;\n border-top: 1px solid var(--yc-color-line-generic);\n cursor: default;\n}\n.ycn-composite-bar-item__collapse-items-popup-content {\n padding: 4px 0;\n}\n.ycn-composite-bar-item__link {\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n}\n.ycn-composite-bar-item__link, .ycn-composite-bar-item__link:hover, .ycn-composite-bar-item__link:active, .ycn-composite-bar-item__link:visited, .ycn-composite-bar-item__link:focus {\n text-decoration: none;\n outline: none;\n color: inherit;\n}\n.ycn-composite-bar-item__btn-icon {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.ycn-composite-bar-item_type_action {\n justify-content: center;\n height: var(--composite-bar-item-action-size);\n margin: 0 10px 8px;\n background: var(--yc-color-base-float);\n box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.03), 0px 5px 6px rgba(0, 0, 0, 0.12);\n border-radius: var(--composite-bar-item-action-size);\n transition: transform 0.1s ease-out, background-color 0.15s linear;\n}\n.ycn-composite-bar-item_type_action:focus {\n box-shadow: 0 0 0 2px var(--yc-color-line-misc);\n}\n.ycn-composite-bar-item_type_action:focus:not(:focus-visible) {\n box-shadow: none;\n}\n.ycn-composite-bar-item_type_action:hover {\n background-color: var(--yc-color-base-float-hover);\n}\n.ycn-composite-bar-item_type_action:active {\n box-shadow: 0 1px 2px var(--yc-color-sfx-shadow);\n transition: none;\n transform: scale(0.96);\n}\n.ycn-composite-bar-item_type_action .ycn-composite-bar-item__icon-place {\n width: var(--composite-bar-item-action-size);\n}\n.ycn-composite-bar-item_type_action .ycn-composite-bar-item__title {\n margin-right: 16px;\n}\n.ycn-composite-bar-item__icon-tooltip_item-type_action {\n margin-left: 10px;\n}\n.ycn-composite-bar-item:not(.ycn-composite-bar-item_compact).ycn-composite-bar-item_current.ycn-composite-bar-item_type_regular {\n background-color: var(--yc-color-base-selection);\n}\n.ycn-composite-bar-item:not(.ycn-composite-bar-item_compact):not(.ycn-composite-bar-item_current):hover.ycn-composite-bar-item_type_regular {\n background-color: var(--yc-color-base-simple-hover);\n}\n.ycn-composite-bar-item_compact.ycn-composite-bar-item_type_action {\n width: var(--composite-bar-item-action-size);\n}\n.ycn-composite-bar-item_compact.ycn-composite-bar-item_type_action .ycn-composite-bar-item__title {\n margin: 0;\n}\n.ycn-composite-bar-item_compact.ycn-composite-bar-item_current.ycn-composite-bar-item_type_regular .ycn-composite-bar-item__btn-icon {\n position: relative;\n background-color: transparent;\n}\n.ycn-composite-bar-item_compact.ycn-composite-bar-item_current.ycn-composite-bar-item_type_regular .ycn-composite-bar-item__btn-icon::before {\n content: \"\";\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: -1;\n width: 38px;\n height: 38px;\n margin-top: -19px;\n margin-left: -19px;\n border-radius: 7px;\n}\n.ycn-composite-bar-item_compact.ycn-composite-bar-item_current.ycn-composite-bar-item_type_regular .ycn-composite-bar-item__btn-icon::before {\n background-color: var(--yc-color-base-selection);\n}\n.ycn-composite-bar-item_compact:not(.ycn-composite-bar-item_current):hover.ycn-composite-bar-item_type_regular .ycn-composite-bar-item__btn-icon {\n position: relative;\n background-color: transparent;\n}\n.ycn-composite-bar-item_compact:not(.ycn-composite-bar-item_current):hover.ycn-composite-bar-item_type_regular .ycn-composite-bar-item__btn-icon::before {\n content: \"\";\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: -1;\n width: 38px;\n height: 38px;\n margin-top: -19px;\n margin-left: -19px;\n border-radius: 7px;\n}\n.ycn-composite-bar-item_compact:not(.ycn-composite-bar-item_current):hover.ycn-composite-bar-item_type_regular .ycn-composite-bar-item__btn-icon::before {\n background-color: var(--yc-color-base-simple-hover);\n}";
|
|
3751
|
+
styleInject(css_248z$j);
|
|
3803
3752
|
|
|
3804
|
-
const b$
|
|
3753
|
+
const b$k = block('composite-bar-item');
|
|
3805
3754
|
function renderItemTitle(item) {
|
|
3806
|
-
let titleNode = React__default.createElement("div", { className: b$
|
|
3755
|
+
let titleNode = React__default.createElement("div", { className: b$k('title-text') }, item.title);
|
|
3807
3756
|
if (item.rightAdornment) {
|
|
3808
3757
|
titleNode = (React__default.createElement(React__default.Fragment, null,
|
|
3809
3758
|
titleNode,
|
|
3810
|
-
React__default.createElement("div", { className: b$
|
|
3759
|
+
React__default.createElement("div", { className: b$k('title-adornment') }, item.rightAdornment)));
|
|
3811
3760
|
}
|
|
3812
3761
|
return titleNode;
|
|
3813
3762
|
}
|
|
@@ -3816,7 +3765,7 @@ const defaultPopupOffset = [-20, 8];
|
|
|
3816
3765
|
const Item$1 = (props) => {
|
|
3817
3766
|
const { item, compact, className, collapseItems, onMouseLeave, onMouseEnter, enableTooltip = true, popupVisible = false, popupAnchor, popupPlacement = defaultPopupPlacement, popupOffset = defaultPopupOffset, popupKeepMounted, renderPopupContent, onClosePopup, onItemClick, } = props;
|
|
3818
3767
|
if (item.type === 'divider') {
|
|
3819
|
-
return React__default.createElement("div", { className: b$
|
|
3768
|
+
return React__default.createElement("div", { className: b$k('menu-divider') });
|
|
3820
3769
|
}
|
|
3821
3770
|
const [open, toggleOpen] = React__default.useState(false);
|
|
3822
3771
|
const ref = React__default.useRef(null);
|
|
@@ -3837,7 +3786,7 @@ const Item$1 = (props) => {
|
|
|
3837
3786
|
onClosePopup === null || onClosePopup === void 0 ? void 0 : onClosePopup();
|
|
3838
3787
|
}, [onClosePopup]);
|
|
3839
3788
|
const makeNode = ({ icon: iconEl, title: titleEl }) => {
|
|
3840
|
-
const createdNode = (React__default.createElement("div", { className: b$
|
|
3789
|
+
const createdNode = (React__default.createElement("div", { className: b$k({ type, current, compact }, className), ref: ref, onClick: () => {
|
|
3841
3790
|
if (collapsedItem) {
|
|
3842
3791
|
/**
|
|
3843
3792
|
* If we call onItemClick for collapsedItem then:
|
|
@@ -3858,13 +3807,13 @@ const Item$1 = (props) => {
|
|
|
3858
3807
|
onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave();
|
|
3859
3808
|
}
|
|
3860
3809
|
} },
|
|
3861
|
-
React__default.createElement("div", { className: b$
|
|
3862
|
-
React__default.createElement("div", { onMouseEnter: () => onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(), onMouseLeave: () => onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(), className: b$
|
|
3863
|
-
React__default.createElement("div", { className: b$
|
|
3864
|
-
renderPopupContent && Boolean(anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current) && (React__default.createElement(Popup, { className: b$
|
|
3865
|
-
return item.link ? (React__default.createElement("a", { href: item.link, className: b$
|
|
3810
|
+
React__default.createElement("div", { className: b$k('icon-place') }, compact ? (React__default.createElement(Tooltip, { content: tooltipText, disabled: !enableTooltip || (collapsedItem && open), placement: "right", className: b$k('icon-tooltip', { 'item-type': type }) },
|
|
3811
|
+
React__default.createElement("div", { onMouseEnter: () => onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(), onMouseLeave: () => onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(), className: b$k('btn-icon') }, iconEl))) : (iconEl)),
|
|
3812
|
+
React__default.createElement("div", { className: b$k('title'), title: typeof item.title === 'string' ? item.title : undefined }, titleEl),
|
|
3813
|
+
renderPopupContent && Boolean(anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current) && (React__default.createElement(Popup, { className: b$k('popup'), open: popupVisible, keepMounted: popupKeepMounted, placement: popupPlacement, offset: popupOffset, anchorRef: anchorRef, onClose: onClose }, renderPopupContent()))));
|
|
3814
|
+
return item.link ? (React__default.createElement("a", { href: item.link, className: b$k('link') }, createdNode)) : (createdNode);
|
|
3866
3815
|
};
|
|
3867
|
-
const iconNode = icon ? React__default.createElement(Icon, { data: icon, size: iconSize, className: b$
|
|
3816
|
+
const iconNode = icon ? React__default.createElement(Icon, { data: icon, size: iconSize, className: b$k('icon') }) : null;
|
|
3868
3817
|
const titleNode = renderItemTitle(item);
|
|
3869
3818
|
const params = { icon: iconNode, title: titleNode };
|
|
3870
3819
|
let node;
|
|
@@ -3882,13 +3831,13 @@ const Item$1 = (props) => {
|
|
|
3882
3831
|
Item$1.displayName = 'Item';
|
|
3883
3832
|
function CollapsedPopup({ compact, onItemClick, collapseItems, anchorRef, onClose, }) {
|
|
3884
3833
|
return (collapseItems === null || collapseItems === void 0 ? void 0 : collapseItems.length) ? (React__default.createElement(Popup, { placement: POPUP_PLACEMENT, open: true, anchorRef: anchorRef, onClose: onClose },
|
|
3885
|
-
React__default.createElement("div", { className: b$
|
|
3886
|
-
React__default.createElement(List, { itemClassName: b$
|
|
3834
|
+
React__default.createElement("div", { className: b$k('collapse-items-popup-content') },
|
|
3835
|
+
React__default.createElement(List, { itemClassName: b$k('root-collapse-item'), items: collapseItems, selectedItemIndex: getSelectedItemIndex$1(collapseItems), itemHeight: POPUP_ITEM_HEIGHT, itemsHeight: collapseItems.length * POPUP_ITEM_HEIGHT, virtualized: false, filterable: false, sortable: false, renderItem: (collapseItem) => {
|
|
3887
3836
|
const makeCollapseNode = ({ title: titleEl }) => {
|
|
3888
|
-
const res = (React__default.createElement("div", { className: b$
|
|
3837
|
+
const res = (React__default.createElement("div", { className: b$k('collapse-item'), onClick: () => {
|
|
3889
3838
|
onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(collapseItem, true);
|
|
3890
3839
|
} }, titleEl));
|
|
3891
|
-
return collapseItem.link ? (React__default.createElement("a", { href: collapseItem.link, className: b$
|
|
3840
|
+
return collapseItem.link ? (React__default.createElement("a", { href: collapseItem.link, className: b$k('link') }, res)) : (res);
|
|
3892
3841
|
};
|
|
3893
3842
|
const titleNode = renderItemTitle(collapseItem);
|
|
3894
3843
|
const params = { title: titleNode };
|
|
@@ -3918,10 +3867,10 @@ var SvgDots = function SvgDots(props) {
|
|
|
3918
3867
|
};
|
|
3919
3868
|
var dotsIcon = SvgDots;
|
|
3920
3869
|
|
|
3921
|
-
var css_248z$
|
|
3922
|
-
styleInject(css_248z$
|
|
3870
|
+
var css_248z$i = ".ycn-composite-bar {\n flex: 1 0 auto;\n width: 100%;\n min-height: 40px;\n}\n.ycn-composite-bar .ycn-composite-bar__root-menu-item[class] {\n background-color: transparent;\n}";
|
|
3871
|
+
styleInject(css_248z$i);
|
|
3923
3872
|
|
|
3924
|
-
const b$
|
|
3873
|
+
const b$j = block('composite-bar');
|
|
3925
3874
|
class CompositeBar extends React__default.Component {
|
|
3926
3875
|
constructor() {
|
|
3927
3876
|
super(...arguments);
|
|
@@ -3936,10 +3885,10 @@ class CompositeBar extends React__default.Component {
|
|
|
3936
3885
|
return null;
|
|
3937
3886
|
}
|
|
3938
3887
|
if (!enableCollapsing) {
|
|
3939
|
-
return React__default.createElement("div", { className: b$
|
|
3888
|
+
return React__default.createElement("div", { className: b$j() }, this.renderMenu());
|
|
3940
3889
|
}
|
|
3941
3890
|
const minHeight = getItemsMinHeight(items);
|
|
3942
|
-
return (React__default.createElement("div", { className: b$
|
|
3891
|
+
return (React__default.createElement("div", { className: b$j({ autosizer: true }), style: { minHeight } }, items.length !== 0 && (React__default.createElement(AutoSizer, null, ({ width, height }) => {
|
|
3943
3892
|
const style = {
|
|
3944
3893
|
width,
|
|
3945
3894
|
height,
|
|
@@ -3950,7 +3899,7 @@ class CompositeBar extends React__default.Component {
|
|
|
3950
3899
|
renderAutosizeMenu(height) {
|
|
3951
3900
|
const { compact, onItemClick } = this.props;
|
|
3952
3901
|
const { listItems, collapseItems } = this.getAutosizeListItems(height);
|
|
3953
|
-
return (React__default.createElement(List, { ref: this.listRef, items: listItems, selectedItemIndex: getSelectedItemIndex$1(listItems), itemHeight: getItemHeight$1, itemClassName: b$
|
|
3902
|
+
return (React__default.createElement(List, { ref: this.listRef, items: listItems, selectedItemIndex: getSelectedItemIndex$1(listItems), itemHeight: getItemHeight$1, itemClassName: b$j('root-menu-item'), itemsHeight: getItemsHeight, virtualized: false, filterable: false, sortable: false, renderItem: (item) => (React__default.createElement(Item$1, { item: item, onMouseLeave: () => {
|
|
3954
3903
|
var _a;
|
|
3955
3904
|
if (compact) {
|
|
3956
3905
|
(_a = this.listRef.current) === null || _a === void 0 ? void 0 : _a.activateItem(undefined);
|
|
@@ -3959,7 +3908,7 @@ class CompositeBar extends React__default.Component {
|
|
|
3959
3908
|
}
|
|
3960
3909
|
renderMenu() {
|
|
3961
3910
|
const { items, onItemClick, compact } = this.props;
|
|
3962
|
-
return (React__default.createElement(List, { ref: this.listRef, items: items, selectedItemIndex: getSelectedItemIndex$1(items), itemHeight: getItemHeight$1, itemClassName: b$
|
|
3911
|
+
return (React__default.createElement(List, { ref: this.listRef, items: items, selectedItemIndex: getSelectedItemIndex$1(items), itemHeight: getItemHeight$1, itemClassName: b$j('root-menu-item'), itemsHeight: getItemsHeight, virtualized: false, filterable: false, sortable: false, renderItem: (item) => (React__default.createElement(Item$1, { item: item, onMouseLeave: () => {
|
|
3963
3912
|
var _a;
|
|
3964
3913
|
if (compact) {
|
|
3965
3914
|
(_a = this.listRef.current) === null || _a === void 0 ? void 0 : _a.activateItem(undefined);
|
|
@@ -4059,10 +4008,10 @@ var SvgDividerCollapsed = function SvgDividerCollapsed(props) {
|
|
|
4059
4008
|
};
|
|
4060
4009
|
var headerDividerCollapsedIcon = SvgDividerCollapsed;
|
|
4061
4010
|
|
|
4062
|
-
var css_248z$
|
|
4063
|
-
styleInject(css_248z$
|
|
4011
|
+
var css_248z$h = ".yc-root {\n --aside-header-background-color: var(--yc-color-base-info);\n --aside-header-collapse-button-divider-line-color: var(\n --aside-header-header-divider-line-color\n );\n}\n\n.yc-root_theme_light,\n.yc-root_theme_light-hc {\n --aside-header-divider-line-color: transparent;\n --aside-header-header-divider-line-color: var(--yc-color-line-generic);\n}\n\n.yc-root_theme_dark,\n.yc-root_theme_dark-hc {\n --aside-header-divider-line-color: var(--yc-color-line-solid);\n --aside-header-header-divider-line-color: var(--yc-color-line-solid);\n}\n\n.ycn-aside-header {\n --aside-header-min-width: 56px;\n height: 100%;\n width: 100%;\n position: relative;\n background-color: var(--yc-color-base-background);\n}\n.ycn-aside-header__aside {\n position: sticky;\n top: 0;\n left: 0;\n height: 100vh;\n width: inherit;\n display: flex;\n flex-direction: column;\n background-color: var(--yc-color-base-background);\n z-index: 100;\n box-sizing: border-box;\n}\n.ycn-aside-header__aside::after {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 2;\n width: 1px;\n height: 100%;\n content: \"\";\n background-color: var(--aside-header-divider-line-color);\n}\n.ycn-aside-header__aside-popup-anchor {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1;\n}\n.ycn-aside-header__aside-content {\n --gradient-height: 334px;\n display: flex;\n flex-direction: column;\n overflow-x: hidden;\n width: inherit;\n height: inherit;\n position: relative;\n z-index: 2;\n user-select: none;\n}\n.ycn-aside-header__aside-content::after {\n position: absolute;\n top: 0;\n right: -100px;\n bottom: 0;\n width: 100px;\n content: \"\";\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.1), 0px 0px 24px rgba(0, 0, 0, 0.08);\n}\n.ycn-aside-header__aside-content > .ycn-aside-header-logo {\n margin: 8px 0;\n}\n.ycn-aside-header__aside-content_with-decoration {\n background: linear-gradient(180deg, var(--aside-header-background-color) calc(var(--gradient-height) * 0.33), transparent calc(var(--gradient-height) * 0.88));\n}\n.ycn-aside-header_compact .ycn-aside-header__aside-content {\n background: transparent;\n}\n.ycn-aside-header__header {\n --aside-header-header-divider-height: 29px;\n position: relative;\n z-index: 1;\n flex: none;\n box-sizing: border-box;\n width: 100%;\n padding-top: 8px;\n padding-bottom: 22px;\n}\n.ycn-aside-header__header .ycn-aside-header__header-divider {\n position: absolute;\n bottom: 0;\n left: 0;\n z-index: -2;\n display: none;\n color: var(--aside-header-background-color);\n}\n.ycn-aside-header__header_with-decoration::before {\n position: absolute;\n top: 0;\n left: 0;\n z-index: -2;\n display: none;\n width: 100%;\n height: calc(100% - var(--aside-header-header-divider-height));\n content: \"\";\n background-color: var(--aside-header-background-color);\n}\n.ycn-aside-header__header::after {\n position: absolute;\n bottom: 12px;\n left: 0;\n z-index: -2;\n width: 100%;\n height: 1px;\n content: \"\";\n background-color: var(--aside-header-header-divider-line-color);\n}\n.ycn-aside-header_compact .ycn-aside-header__header::before {\n display: block;\n}\n.ycn-aside-header_compact .ycn-aside-header__header_with-decoration .ycn-aside-header__header-divider {\n display: block;\n}\n.ycn-aside-header_compact .ycn-aside-header__header_with-decoration::after {\n display: none;\n}\n.ycn-aside-header__menu-items {\n flex-grow: 1;\n}\n.ycn-aside-header__footer {\n flex-shrink: 0;\n width: 100%;\n margin: 8px 0;\n display: flex;\n flex-direction: column;\n}\n.ycn-aside-header__panels {\n z-index: 98;\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n overflow: auto;\n}\n.ycn-aside-header__panel {\n height: 100%;\n}\n.ycn-aside-header__pane-container {\n display: flex;\n outline: none;\n overflow: visible;\n user-select: text;\n flex-direction: row;\n}\n.ycn-aside-header__content {\n width: calc(100% - var(--aside-header-size));\n z-index: 95;\n}\n.ycn-aside-header__collapse-button {\n --yc-button-background-color-hover: transparent;\n overflow: hidden;\n box-sizing: border-box;\n flex: none;\n width: 100%;\n height: 20px;\n border-top: 1px solid var(--aside-header-collapse-button-divider-line-color);\n margin-top: auto;\n}\n.ycn-aside-header__collapse-button:not(.ycn-aside-header__collapse-button_compact) .ycn-aside-header__collapse-icon {\n transform: rotate(180deg);\n}\n.ycn-aside-header__collapse-button .ycn-aside-header__collapse-icon {\n color: var(--yc-color-text-secondary);\n}\n.ycn-aside-header__collapse-button:hover .ycn-aside-header__collapse-icon {\n color: var(--yc-color-text-primary);\n}";
|
|
4012
|
+
styleInject(css_248z$h);
|
|
4064
4013
|
|
|
4065
|
-
const b$
|
|
4014
|
+
const b$i = block('aside-header');
|
|
4066
4015
|
class AsideHeader extends React__default.Component {
|
|
4067
4016
|
constructor() {
|
|
4068
4017
|
super(...arguments);
|
|
@@ -4070,26 +4019,26 @@ class AsideHeader extends React__default.Component {
|
|
|
4070
4019
|
this.renderFirstPane = (size) => {
|
|
4071
4020
|
const { dict, menuItems, panelItems, compact, headerDecoration } = this.props;
|
|
4072
4021
|
return (React__default.createElement(React__default.Fragment, null,
|
|
4073
|
-
React__default.createElement("div", { className: b$
|
|
4074
|
-
React__default.createElement("div", { className: b$
|
|
4075
|
-
React__default.createElement("div", { className: b$
|
|
4022
|
+
React__default.createElement("div", { className: b$i('aside'), style: { width: size } },
|
|
4023
|
+
React__default.createElement("div", { className: b$i('aside-popup-anchor'), ref: this.asideRef }),
|
|
4024
|
+
React__default.createElement("div", { className: b$i('aside-content', { ['with-decoration']: headerDecoration }) },
|
|
4076
4025
|
this.renderHeader(),
|
|
4077
|
-
(menuItems === null || menuItems === void 0 ? void 0 : menuItems.length) ? (React__default.createElement(CompositeBar, { items: menuItems, compact: compact, enableCollapsing: true, dict: dict, onItemClick: this.onItemClick })) : (React__default.createElement("div", { className: b$
|
|
4026
|
+
(menuItems === null || menuItems === void 0 ? void 0 : menuItems.length) ? (React__default.createElement(CompositeBar, { items: menuItems, compact: compact, enableCollapsing: true, dict: dict, onItemClick: this.onItemClick })) : (React__default.createElement("div", { className: b$i('menu-items') })),
|
|
4078
4027
|
this.renderFooter(size),
|
|
4079
4028
|
this.renderCollapseButton())),
|
|
4080
4029
|
panelItems && this.renderPanels(size)));
|
|
4081
4030
|
};
|
|
4082
4031
|
this.renderSecondPane = (size) => {
|
|
4083
|
-
return (React__default.createElement(Content, { size: size, renderContent: this.props.renderContent, className: b$
|
|
4032
|
+
return (React__default.createElement(Content, { size: size, renderContent: this.props.renderContent, className: b$i('content') }));
|
|
4084
4033
|
};
|
|
4085
4034
|
this.renderLogo = () => (React__default.createElement(Logo$1, Object.assign({}, this.props.logo, { compact: this.props.compact, onClick: this.onLogoClick })));
|
|
4086
|
-
this.renderHeader = () => (React__default.createElement("div", { className: b$
|
|
4035
|
+
this.renderHeader = () => (React__default.createElement("div", { className: b$i('header', { ['with-decoration']: this.props.headerDecoration }) },
|
|
4087
4036
|
this.renderLogo(),
|
|
4088
4037
|
React__default.createElement(CompositeBar, { items: this.props.subheaderItems, compact: this.props.compact, enableCollapsing: false, onItemClick: this.onItemClick }),
|
|
4089
|
-
React__default.createElement(Icon, { data: headerDividerCollapsedIcon, className: b$
|
|
4038
|
+
React__default.createElement(Icon, { data: headerDividerCollapsedIcon, className: b$i('header-divider'), width: ASIDE_HEADER_COMPACT_WIDTH, height: "29" })));
|
|
4090
4039
|
this.renderFooter = (size) => {
|
|
4091
4040
|
const { compact, renderFooter } = this.props;
|
|
4092
|
-
return (React__default.createElement("div", { className: b$
|
|
4041
|
+
return (React__default.createElement("div", { className: b$i('footer') }, renderFooter === null || renderFooter === void 0 ? void 0 : renderFooter({
|
|
4093
4042
|
size,
|
|
4094
4043
|
compact,
|
|
4095
4044
|
asideRef: this.asideRef,
|
|
@@ -4097,14 +4046,14 @@ class AsideHeader extends React__default.Component {
|
|
|
4097
4046
|
};
|
|
4098
4047
|
this.renderPanels = (size) => {
|
|
4099
4048
|
const { panelItems } = this.props;
|
|
4100
|
-
return (React__default.createElement(Drawer, { className: b$
|
|
4049
|
+
return (React__default.createElement(Drawer, { className: b$i('panels'), onVeilClick: this.onCloseDrawer, onEscape: this.onCloseDrawer, style: { left: size } }, panelItems.map((item) => (React__default.createElement(DrawerItem, Object.assign({ key: item.id }, item))))));
|
|
4101
4050
|
};
|
|
4102
4051
|
this.renderCollapseButton = () => {
|
|
4103
4052
|
var _a;
|
|
4104
4053
|
const { compact, dict } = this.props;
|
|
4105
4054
|
const typeButton = compact ? Dict.ExpandButton : Dict.CollapseButton;
|
|
4106
|
-
return (React__default.createElement(Button, { className: b$
|
|
4107
|
-
React__default.createElement(Icon, { data: controlMenuButtonIcon, className: b$
|
|
4055
|
+
return (React__default.createElement(Button, { className: b$i('collapse-button', { compact }), view: "flat", onClick: this.onCollapseButtonClick, title: (_a = dict === null || dict === void 0 ? void 0 : dict[typeButton]) !== null && _a !== void 0 ? _a : defaultDict$2[typeButton] },
|
|
4056
|
+
React__default.createElement(Icon, { data: controlMenuButtonIcon, className: b$i('collapse-icon'), width: "16", height: "10" })));
|
|
4108
4057
|
};
|
|
4109
4058
|
this.onCollapseButtonClick = () => {
|
|
4110
4059
|
var _a, _b;
|
|
@@ -4128,8 +4077,8 @@ class AsideHeader extends React__default.Component {
|
|
|
4128
4077
|
render() {
|
|
4129
4078
|
const { className, compact } = this.props;
|
|
4130
4079
|
const size = compact ? ASIDE_HEADER_COMPACT_WIDTH : ASIDE_HEADER_EXPANDED_WIDTH;
|
|
4131
|
-
return (React__default.createElement("div", { className: b$
|
|
4132
|
-
React__default.createElement("div", { className: b$
|
|
4080
|
+
return (React__default.createElement("div", { className: b$i({ compact }, className) },
|
|
4081
|
+
React__default.createElement("div", { className: b$i('pane-container') },
|
|
4133
4082
|
this.renderFirstPane(size),
|
|
4134
4083
|
this.renderSecondPane(size))));
|
|
4135
4084
|
}
|
|
@@ -4168,15 +4117,66 @@ function __rest(s, e) {
|
|
|
4168
4117
|
return t;
|
|
4169
4118
|
}
|
|
4170
4119
|
|
|
4171
|
-
var css_248z$
|
|
4172
|
-
styleInject(css_248z$
|
|
4120
|
+
var css_248z$g = ".ycn-footer-item {\n width: 100%;\n height: 40px;\n}";
|
|
4121
|
+
styleInject(css_248z$g);
|
|
4173
4122
|
|
|
4174
|
-
const b$
|
|
4123
|
+
const b$h = block('footer-item');
|
|
4175
4124
|
const FooterItem$1 = (_a) => {
|
|
4176
4125
|
var { item } = _a, props = __rest(_a, ["item"]);
|
|
4177
|
-
return (React__default.createElement(Item$1, Object.assign({}, props, { item: Object.assign({ iconSize: ASIDE_HEADER_FOOTER_ICON_SIZE }, item), className: b$
|
|
4126
|
+
return (React__default.createElement(Item$1, Object.assign({}, props, { item: Object.assign({ iconSize: ASIDE_HEADER_FOOTER_ICON_SIZE }, item), className: b$h({ compact: props.compact }), onItemClick: item.onItemClick })));
|
|
4178
4127
|
};
|
|
4179
4128
|
|
|
4129
|
+
var css_248z$f = ".ycn-action-bar-group {\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n margin: 0;\n padding: 0;\n}\n.ycn-action-bar-group_pull_left {\n margin-left: 0;\n margin-right: auto;\n}\n.ycn-action-bar-group_pull_right {\n margin-left: auto;\n margin-right: 0;\n}\n.ycn-action-bar-group_pull_center {\n margin-left: auto;\n margin-right: auto;\n}";
|
|
4130
|
+
styleInject(css_248z$f);
|
|
4131
|
+
|
|
4132
|
+
const b$g = block('action-bar-group');
|
|
4133
|
+
const ActionBarGroup = ({ children, className, pull }) => {
|
|
4134
|
+
return (React__default.createElement("ul", { className: b$g({ pull }, className), role: "group" }, children));
|
|
4135
|
+
};
|
|
4136
|
+
ActionBarGroup.displayName = 'ActionBar.Group';
|
|
4137
|
+
|
|
4138
|
+
var css_248z$e = ".ycn-action-bar-item {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n.ycn-action-bar-item_pull_left {\n margin-left: 0;\n margin-right: auto;\n}\n.ycn-action-bar-item_pull_right {\n margin-left: auto;\n margin-right: 0;\n}\n.ycn-action-bar-item_pull_center {\n margin-left: auto;\n margin-right: auto;\n}\n.ycn-action-bar-item + .ycn-action-bar-item_spacing {\n margin-left: 8px;\n}";
|
|
4139
|
+
styleInject(css_248z$e);
|
|
4140
|
+
|
|
4141
|
+
const b$f = block('action-bar-item');
|
|
4142
|
+
const ActionBarItem = ({ children, className, pull, spacing = true }) => {
|
|
4143
|
+
return React__default.createElement("li", { className: b$f({ pull, spacing }, className) }, children);
|
|
4144
|
+
};
|
|
4145
|
+
ActionBarItem.displayName = 'ActionBar.Item';
|
|
4146
|
+
|
|
4147
|
+
var css_248z$d = ".ycn-action-bar-section {\n display: flex;\n flex-flow: row nowrap;\n justify-content: flex-start;\n align-items: stretch;\n}\n.ycn-action-bar-section + .ycn-action-bar-section {\n border-left: solid 1px var(--yc-color-line-generic);\n}\n.ycn-action-bar-section_type_primary {\n flex: 1 1 auto;\n padding-left: 20px;\n padding-right: 20px;\n}\n.ycn-action-bar-section_type_secondary {\n padding-left: 6px;\n padding-right: 6px;\n}";
|
|
4148
|
+
styleInject(css_248z$d);
|
|
4149
|
+
|
|
4150
|
+
const b$e = block('action-bar-section');
|
|
4151
|
+
const ActionBarSection = ({ children, type = 'primary' }) => {
|
|
4152
|
+
return React__default.createElement("div", { className: b$e({ type }) }, children);
|
|
4153
|
+
};
|
|
4154
|
+
ActionBarSection.displayName = 'ActionBar.Section';
|
|
4155
|
+
|
|
4156
|
+
var css_248z$c = ".ycn-action-bar-separator {\n list-style: none;\n margin: 0;\n padding: 0;\n margin-left: 6px;\n margin-right: 6px;\n border-right: solid 1px var(--yc-color-line-generic);\n height: 40px;\n}";
|
|
4157
|
+
styleInject(css_248z$c);
|
|
4158
|
+
|
|
4159
|
+
const b$d = block('action-bar-separator');
|
|
4160
|
+
const ActionBarSeparator = () => {
|
|
4161
|
+
return React__default.createElement("li", { role: "separator", className: b$d() });
|
|
4162
|
+
};
|
|
4163
|
+
ActionBarSeparator.displayName = 'ActionBar.Separator';
|
|
4164
|
+
|
|
4165
|
+
var css_248z$b = ".ycn-action-bar {\n box-sizing: border-box;\n height: 40px;\n border-bottom: solid 1px var(--yc-color-line-generic);\n display: flex;\n flex-flow: row nowrap;\n justify-content: flex-start;\n align-items: stretch;\n}";
|
|
4166
|
+
styleInject(css_248z$b);
|
|
4167
|
+
|
|
4168
|
+
const b$c = block('action-bar');
|
|
4169
|
+
const ActionBar = ({ children, className, 'aria-label': ariaLabel }) => {
|
|
4170
|
+
return (React__default.createElement("section", { className: b$c(null, className), "aria-label": ariaLabel }, children));
|
|
4171
|
+
};
|
|
4172
|
+
ActionBar.displayName = 'ActionBar';
|
|
4173
|
+
const PublicActionBar = Object.assign(ActionBar, {
|
|
4174
|
+
Section: ActionBarSection,
|
|
4175
|
+
Group: ActionBarGroup,
|
|
4176
|
+
Item: ActionBarItem,
|
|
4177
|
+
Separator: ActionBarSeparator,
|
|
4178
|
+
});
|
|
4179
|
+
|
|
4180
4180
|
var css_248z$a = ".ycn-title {\n box-sizing: border-box;\n padding: 14px 10px 14px 20px;\n min-height: 64px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.ycn-title_separator {\n border-bottom: 1px solid var(--yc-color-line-generic);\n}\n.ycn-title__text {\n margin: 0;\n margin-right: 20px;\n}";
|
|
4181
4181
|
styleInject(css_248z$a);
|
|
4182
4182
|
|