@gravity-ui/navigation 0.0.6 → 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 +15 -0
- package/build/cjs/index.js +3344 -63660
- 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 +3320 -63660
- 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 +5 -4
- package/build/esm/index.css +0 -5288
|
@@ -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;
|