@gravity-ui/navigation 0.10.1 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/components/ActionBar/ActionBar.d.ts +7 -7
- package/build/cjs/components/ActionBar/Group/ActionBarGroup.d.ts +3 -3
- package/build/cjs/components/ActionBar/Item/ActionBarItem.d.ts +3 -3
- package/build/cjs/components/ActionBar/Section/ActionBarSection.d.ts +3 -3
- package/build/cjs/components/ActionBar/Separator/ActionBarSeparator.d.ts +2 -1
- package/build/cjs/components/ActionBar/__stories__/ActionBar.stories.d.ts +13 -58
- package/build/cjs/components/ActionBar/__stories__/ActionBarShowcase.d.ts +2 -2
- package/build/cjs/components/ActionBar/__stories__/ActionBarSingleSection.d.ts +2 -2
- package/build/cjs/components/ActionBar/types.d.ts +1 -1
- package/build/cjs/components/AsideHeader/AsideHeader.d.ts +2 -2
- package/build/cjs/components/AsideHeader/__stories__/AsideHeader.stories.d.ts +4 -5
- package/build/cjs/components/AsideHeader/__stories__/getAsideHeaderWrapper.d.ts +2 -2
- package/build/cjs/components/CompositeBar/CompositeBar.d.ts +1 -1
- package/build/cjs/components/CompositeBar/MultipleTooltip/MultipleTooltip.d.ts +1 -1
- package/build/cjs/components/CompositeBar/MultipleTooltip/MultipleTooltipContext.d.ts +2 -2
- package/build/cjs/components/CompositeBar/__stories__/CompositeBar.stories.d.ts +2 -4
- package/build/cjs/components/Content/Content.d.ts +1 -1
- package/build/cjs/components/Drawer/Drawer.d.ts +1 -1
- package/build/cjs/components/Drawer/__stories__/Drawer.stories.d.ts +2 -3
- package/build/cjs/components/Drawer/__stories__/DrawerShowcase.d.ts +2 -2
- package/build/cjs/components/FooterItem/__stories__/FooterItem.stories.d.ts +2 -4
- package/build/cjs/components/HotkeysPanel/HotkeysPanel.d.ts +3 -2
- package/build/cjs/components/HotkeysPanel/__stories__/HotkeysPanel.stories.d.ts +2 -3
- package/build/cjs/components/HotkeysPanel/__stories__/HotkeysPanelShowcase.d.ts +2 -2
- package/build/cjs/components/HotkeysPanel/types.d.ts +3 -3
- package/build/cjs/components/MobileHeader/Burger/Burger.d.ts +1 -1
- package/build/cjs/components/MobileHeader/BurgerMenu/BurgerCompositeBar/BurgerCompositeBar.d.ts +1 -1
- package/build/cjs/components/MobileHeader/BurgerMenu/BurgerMenu.d.ts +1 -1
- package/build/cjs/components/MobileHeader/BurgerMenu/__stories__/BurgerMenu.stories.d.ts +2 -4
- package/build/cjs/components/MobileHeader/FooterItem/FooterItem.d.ts +1 -1
- package/build/cjs/components/MobileHeader/__stories__/MobileHeader.stories.d.ts +2 -3
- package/build/cjs/components/MobileHeader/__stories__/MobileHeaderShowcase.d.ts +2 -2
- package/build/cjs/components/MobileHeader/types.d.ts +4 -4
- package/build/cjs/components/Settings/Settings.d.ts +7 -7
- package/build/cjs/components/Settings/SettingsMenuMobile/SettingsMenuMobile.d.ts +2 -1
- package/build/cjs/components/Settings/SettingsSearch/SettingsSearch.d.ts +1 -1
- package/build/cjs/components/Settings/__stories__/Settings.stories.d.ts +3 -4
- package/build/cjs/components/Settings/__stories__/SettingsDemo.d.ts +2 -2
- package/build/cjs/components/Settings/__stories__/SettingsMobileDemo.d.ts +2 -2
- package/build/cjs/components/Settings/collect-settings.d.ts +1 -1
- package/build/cjs/components/Settings/helpers.d.ts +1 -1
- package/build/cjs/components/Settings/types.d.ts +1 -1
- package/build/cjs/components/Title/Title.d.ts +2 -2
- package/build/cjs/components/helpers.d.ts +5 -0
- package/build/cjs/components/index.d.ts +1 -0
- package/build/cjs/components/types.d.ts +2 -2
- package/build/cjs/components/utils/cn.d.ts +2 -2
- package/build/cjs/components/utils/configure.d.ts +12 -0
- package/build/cjs/index.js +313 -385
- package/build/cjs/index.js.map +1 -1
- package/build/esm/components/ActionBar/ActionBar.d.ts +7 -7
- package/build/esm/components/ActionBar/Group/ActionBarGroup.d.ts +3 -3
- package/build/esm/components/ActionBar/Item/ActionBarItem.d.ts +3 -3
- package/build/esm/components/ActionBar/Section/ActionBarSection.d.ts +3 -3
- package/build/esm/components/ActionBar/Separator/ActionBarSeparator.d.ts +2 -1
- package/build/esm/components/ActionBar/__stories__/ActionBar.stories.d.ts +13 -58
- package/build/esm/components/ActionBar/__stories__/ActionBarShowcase.d.ts +2 -2
- package/build/esm/components/ActionBar/__stories__/ActionBarSingleSection.d.ts +2 -2
- package/build/esm/components/ActionBar/types.d.ts +1 -1
- package/build/esm/components/AsideHeader/AsideHeader.d.ts +2 -2
- package/build/esm/components/AsideHeader/__stories__/AsideHeader.stories.d.ts +4 -5
- package/build/esm/components/AsideHeader/__stories__/getAsideHeaderWrapper.d.ts +2 -2
- package/build/esm/components/CompositeBar/CompositeBar.d.ts +1 -1
- package/build/esm/components/CompositeBar/MultipleTooltip/MultipleTooltip.d.ts +1 -1
- package/build/esm/components/CompositeBar/MultipleTooltip/MultipleTooltipContext.d.ts +2 -2
- package/build/esm/components/CompositeBar/__stories__/CompositeBar.stories.d.ts +2 -4
- package/build/esm/components/Content/Content.d.ts +1 -1
- package/build/esm/components/Drawer/Drawer.d.ts +1 -1
- package/build/esm/components/Drawer/__stories__/Drawer.stories.d.ts +2 -3
- package/build/esm/components/Drawer/__stories__/DrawerShowcase.d.ts +2 -2
- package/build/esm/components/FooterItem/__stories__/FooterItem.stories.d.ts +2 -4
- package/build/esm/components/HotkeysPanel/HotkeysPanel.d.ts +3 -2
- package/build/esm/components/HotkeysPanel/__stories__/HotkeysPanel.stories.d.ts +2 -3
- package/build/esm/components/HotkeysPanel/__stories__/HotkeysPanelShowcase.d.ts +2 -2
- package/build/esm/components/HotkeysPanel/types.d.ts +3 -3
- package/build/esm/components/MobileHeader/Burger/Burger.d.ts +1 -1
- package/build/esm/components/MobileHeader/BurgerMenu/BurgerCompositeBar/BurgerCompositeBar.d.ts +1 -1
- package/build/esm/components/MobileHeader/BurgerMenu/BurgerMenu.d.ts +1 -1
- package/build/esm/components/MobileHeader/BurgerMenu/__stories__/BurgerMenu.stories.d.ts +2 -4
- package/build/esm/components/MobileHeader/FooterItem/FooterItem.d.ts +1 -1
- package/build/esm/components/MobileHeader/__stories__/MobileHeader.stories.d.ts +2 -3
- package/build/esm/components/MobileHeader/__stories__/MobileHeaderShowcase.d.ts +2 -2
- package/build/esm/components/MobileHeader/types.d.ts +4 -4
- package/build/esm/components/Settings/Settings.d.ts +7 -7
- package/build/esm/components/Settings/SettingsMenuMobile/SettingsMenuMobile.d.ts +2 -1
- package/build/esm/components/Settings/SettingsSearch/SettingsSearch.d.ts +1 -1
- package/build/esm/components/Settings/__stories__/Settings.stories.d.ts +3 -4
- package/build/esm/components/Settings/__stories__/SettingsDemo.d.ts +2 -2
- package/build/esm/components/Settings/__stories__/SettingsMobileDemo.d.ts +2 -2
- package/build/esm/components/Settings/collect-settings.d.ts +1 -1
- package/build/esm/components/Settings/helpers.d.ts +1 -1
- package/build/esm/components/Settings/types.d.ts +1 -1
- package/build/esm/components/Title/Title.d.ts +2 -2
- package/build/esm/components/helpers.d.ts +5 -0
- package/build/esm/components/index.d.ts +1 -0
- package/build/esm/components/types.d.ts +2 -2
- package/build/esm/components/utils/cn.d.ts +2 -2
- package/build/esm/components/utils/configure.d.ts +12 -0
- package/build/esm/index.js +314 -387
- package/build/esm/index.js.map +1 -1
- package/package.json +107 -99
- package/CHANGELOG.md +0 -193
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import './ActionBar.scss';
|
|
3
|
-
export
|
|
3
|
+
export type Props = PropsWithChildren<{
|
|
4
4
|
'aria-label'?: string;
|
|
5
5
|
className?: string;
|
|
6
6
|
}>;
|
|
7
7
|
declare const PublicActionBar: {
|
|
8
|
-
({ children, className, "aria-label": ariaLabel }: Props): JSX.Element;
|
|
8
|
+
({ children, className, "aria-label": ariaLabel }: Props): React.JSX.Element;
|
|
9
9
|
displayName: string;
|
|
10
10
|
} & {
|
|
11
11
|
Section: {
|
|
12
|
-
({ children, type }: import("./Section/ActionBarSection").Props): JSX.Element;
|
|
12
|
+
({ children, type }: import("./Section/ActionBarSection").Props): React.JSX.Element;
|
|
13
13
|
displayName: string;
|
|
14
14
|
};
|
|
15
15
|
Group: {
|
|
16
|
-
({ children, className, pull }: import("./Group/ActionBarGroup").Props): JSX.Element;
|
|
16
|
+
({ children, className, pull }: import("./Group/ActionBarGroup").Props): React.JSX.Element;
|
|
17
17
|
displayName: string;
|
|
18
18
|
};
|
|
19
19
|
Item: {
|
|
20
|
-
({ children, className, pull, spacing }: import("./Item/ActionBarItem").Props): JSX.Element;
|
|
20
|
+
({ children, className, pull, spacing }: import("./Item/ActionBarItem").Props): React.JSX.Element;
|
|
21
21
|
displayName: string;
|
|
22
22
|
};
|
|
23
23
|
Separator: {
|
|
24
|
-
(): JSX.Element;
|
|
24
|
+
(): React.JSX.Element;
|
|
25
25
|
displayName: string;
|
|
26
26
|
};
|
|
27
27
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import { PropsWithPull } from '../types';
|
|
3
3
|
import './ActionBarGroup.scss';
|
|
4
|
-
export
|
|
4
|
+
export type Props = PropsWithChildren<PropsWithPull<{
|
|
5
5
|
className?: string;
|
|
6
6
|
}>>;
|
|
7
7
|
export declare const ActionBarGroup: {
|
|
8
|
-
({ children, className, pull }: Props): JSX.Element;
|
|
8
|
+
({ children, className, pull }: Props): React.JSX.Element;
|
|
9
9
|
displayName: string;
|
|
10
10
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import { PropsWithPull } from '../types';
|
|
3
3
|
import './ActionBarItem.scss';
|
|
4
|
-
export
|
|
4
|
+
export type Props = PropsWithChildren<PropsWithPull<{
|
|
5
5
|
spacing?: boolean;
|
|
6
6
|
className?: string;
|
|
7
7
|
}>>;
|
|
8
8
|
export declare const ActionBarItem: {
|
|
9
|
-
({ children, className, pull, spacing }: Props): JSX.Element;
|
|
9
|
+
({ children, className, pull, spacing }: Props): React.JSX.Element;
|
|
10
10
|
displayName: string;
|
|
11
11
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import './ActionBarSection.scss';
|
|
3
|
-
export
|
|
3
|
+
export type Props = PropsWithChildren<{
|
|
4
4
|
type?: 'primary' | 'secondary';
|
|
5
5
|
}>;
|
|
6
6
|
export declare const ActionBarSection: {
|
|
7
|
-
({ children, type }: Props): JSX.Element;
|
|
7
|
+
({ children, type }: Props): React.JSX.Element;
|
|
8
8
|
displayName: string;
|
|
9
9
|
};
|
|
@@ -1,65 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
declare const _default:
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, {
|
|
3
|
+
'aria-label'?: string | undefined;
|
|
4
|
+
className?: string | undefined;
|
|
5
5
|
} & {
|
|
6
|
-
|
|
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
|
-
};
|
|
6
|
+
children?: React.ReactNode;
|
|
22
7
|
}>;
|
|
23
8
|
export default _default;
|
|
24
|
-
export declare const Showcase:
|
|
25
|
-
|
|
26
|
-
|
|
9
|
+
export declare const Showcase: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, {
|
|
10
|
+
'aria-label'?: string | undefined;
|
|
11
|
+
className?: string | undefined;
|
|
27
12
|
} & {
|
|
28
|
-
|
|
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
|
-
};
|
|
13
|
+
children?: React.ReactNode;
|
|
44
14
|
}>;
|
|
45
|
-
export declare const SingleSection:
|
|
46
|
-
|
|
47
|
-
|
|
15
|
+
export declare const SingleSection: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, {
|
|
16
|
+
'aria-label'?: string | undefined;
|
|
17
|
+
className?: string | undefined;
|
|
48
18
|
} & {
|
|
49
|
-
|
|
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
|
-
};
|
|
19
|
+
children?: React.ReactNode;
|
|
65
20
|
}>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function ActionBarShowcase(): JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare function ActionBarShowcase(): React.JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function ActionBarSingleSection(): JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare function ActionBarSingleSection(): React.JSX.Element;
|
|
@@ -26,11 +26,11 @@ interface AsideHeaderDefaultProps {
|
|
|
26
26
|
}
|
|
27
27
|
export interface AsideHeaderProps extends AsideHeaderGeneralProps, Partial<AsideHeaderDefaultProps> {
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
type AsideHeaderInnerProps = AsideHeaderGeneralProps & AsideHeaderDefaultProps;
|
|
30
30
|
export declare class AsideHeader extends React.Component<AsideHeaderInnerProps> {
|
|
31
31
|
static defaultProps: AsideHeaderDefaultProps;
|
|
32
32
|
asideRef: React.RefObject<HTMLDivElement>;
|
|
33
|
-
render(): JSX.Element;
|
|
33
|
+
render(): React.JSX.Element;
|
|
34
34
|
private renderFirstPane;
|
|
35
35
|
private renderSecondPane;
|
|
36
36
|
private renderLogo;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
declare const _default: Meta<import("@storybook/react/types-6-0").Args>;
|
|
1
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
|
|
3
2
|
export default _default;
|
|
4
|
-
export declare const Showcase:
|
|
5
|
-
export declare const Compact:
|
|
6
|
-
export declare const MultipleTooltip:
|
|
3
|
+
export declare const Showcase: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
|
|
4
|
+
export declare const Compact: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
|
|
5
|
+
export declare const MultipleTooltip: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
2
|
import { AsideHeaderProps } from '../AsideHeader';
|
|
3
|
-
export declare function getAsideHeaderWrapper(props?: AsideHeaderProps): (Story: FC) => JSX.Element;
|
|
3
|
+
export declare function getAsideHeaderWrapper(props?: AsideHeaderProps): (Story: FC) => React.JSX.Element;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { PopupProps } from '@gravity-ui/uikit';
|
|
3
3
|
import { MenuItem } from '../../types';
|
|
4
4
|
import './MultipleTooltip.scss';
|
|
5
|
-
export
|
|
5
|
+
export type MultipleTooltipProps = Pick<PopupProps, 'open' | 'anchorRef' | 'placement'> & {
|
|
6
6
|
items: MenuItem[];
|
|
7
7
|
};
|
|
8
8
|
export declare const MultipleTooltip: React.FC<MultipleTooltipProps>;
|
|
@@ -7,7 +7,7 @@ interface MultipleTooltipContextProps {
|
|
|
7
7
|
setValue<K extends keyof Omit<MultipleTooltipContextProps, 'setValue'>>(value: Pick<Omit<MultipleTooltipContextProps, 'setValue'>, K> | Omit<MultipleTooltipContextProps, 'setValue'>): void;
|
|
8
8
|
}
|
|
9
9
|
export declare const MultipleTooltipContext: React.Context<MultipleTooltipContextProps>;
|
|
10
|
-
|
|
10
|
+
type MultipleTooltipProviderState = Omit<MultipleTooltipContextProps, 'setValue'>;
|
|
11
11
|
export declare class MultipleTooltipProvider extends React.PureComponent<{
|
|
12
12
|
children: React.ReactNode;
|
|
13
13
|
}, MultipleTooltipProviderState> {
|
|
@@ -19,6 +19,6 @@ export declare class MultipleTooltipProvider extends React.PureComponent<{
|
|
|
19
19
|
setValue: () => void;
|
|
20
20
|
};
|
|
21
21
|
setValue: MultipleTooltipContextProps['setValue'];
|
|
22
|
-
render(): JSX.Element;
|
|
22
|
+
render(): React.JSX.Element;
|
|
23
23
|
}
|
|
24
24
|
export {};
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { Meta } from '@storybook/react/types-6-0';
|
|
2
|
-
import { Story } from '@storybook/react';
|
|
3
1
|
import { CompositeBarProps } from '../CompositeBar';
|
|
4
2
|
import './CompositeBarShowcase.scss';
|
|
5
|
-
declare const _default:
|
|
3
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
|
|
6
4
|
export default _default;
|
|
7
|
-
export declare const Default:
|
|
5
|
+
export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, CompositeBarProps>;
|
|
@@ -8,7 +8,7 @@ export interface DrawerItemProps {
|
|
|
8
8
|
className?: string;
|
|
9
9
|
}
|
|
10
10
|
export declare const DrawerItem: React.FC<DrawerItemProps>;
|
|
11
|
-
|
|
11
|
+
type DrawerChild = React.ReactElement<DrawerItemProps>;
|
|
12
12
|
export interface DrawerProps {
|
|
13
13
|
children: DrawerChild | DrawerChild[];
|
|
14
14
|
preventScrollBody?: boolean;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const _default: Meta<import("@storybook/react/types-6-0").Args>;
|
|
1
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
|
|
3
2
|
export default _default;
|
|
4
|
-
export declare const Showcase:
|
|
3
|
+
export declare const Showcase: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import './DrawerShowcase.scss';
|
|
3
|
-
export declare function DrawerShowcase(): JSX.Element;
|
|
3
|
+
export declare function DrawerShowcase(): React.JSX.Element;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { Meta } from '@storybook/react/types-6-0';
|
|
2
|
-
import { Story } from '@storybook/react';
|
|
3
1
|
import { FooterItemProps } from '../FooterItem';
|
|
4
2
|
import './FooterItemShowcase.scss';
|
|
5
|
-
declare const _default:
|
|
3
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
|
|
6
4
|
export default _default;
|
|
7
|
-
export declare const Default:
|
|
5
|
+
export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, FooterItemProps>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { ReactNode } from 'react';
|
|
2
3
|
import type { ListProps } from '@gravity-ui/uikit';
|
|
3
4
|
import type { DrawerProps } from '../Drawer/Drawer';
|
|
4
5
|
import type { HotkeysListItem, HotkeysGroup } from './types';
|
|
5
6
|
import './HotkeysPanel.scss';
|
|
6
|
-
export
|
|
7
|
+
export type HotkeysPanelProps<T> = {
|
|
7
8
|
hotkeys: HotkeysGroup<T>[];
|
|
8
9
|
title?: ReactNode;
|
|
9
10
|
filterPlaceholder?: string;
|
|
@@ -15,4 +16,4 @@ export declare type HotkeysPanelProps<T> = {
|
|
|
15
16
|
topOffset?: number | string;
|
|
16
17
|
preventScrollBody?: DrawerProps['preventScrollBody'];
|
|
17
18
|
} & Omit<ListProps<HotkeysListItem>, 'items' | 'emptyPlaceholder'>;
|
|
18
|
-
export declare function HotkeysPanel<T = {}>({ visible, onClose, leftOffset, topOffset, className, preventScrollBody, hotkeys, itemClassName, filterPlaceholder, title, emptyState, ...listProps }: HotkeysPanelProps<T>): JSX.Element;
|
|
19
|
+
export declare function HotkeysPanel<T = {}>({ visible, onClose, leftOffset, topOffset, className, preventScrollBody, hotkeys, itemClassName, filterPlaceholder, title, emptyState, ...listProps }: HotkeysPanelProps<T>): React.JSX.Element;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const _default: Meta<import("@storybook/react/types-6-0").Args>;
|
|
1
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
|
|
3
2
|
export default _default;
|
|
4
|
-
export declare const Showcase:
|
|
3
|
+
export declare const Showcase: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import './HotkeysPanelShowcase.scss';
|
|
3
|
-
export declare function HotkeysPanelShowcase(): JSX.Element;
|
|
3
|
+
export declare function HotkeysPanelShowcase(): React.JSX.Element;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type HotkeysItem = {
|
|
2
2
|
title: string;
|
|
3
3
|
value: string;
|
|
4
4
|
};
|
|
5
|
-
export
|
|
5
|
+
export type HotkeysGroup<T = {}> = {
|
|
6
6
|
title: string;
|
|
7
7
|
items: HotkeysItem[];
|
|
8
8
|
} & T;
|
|
9
|
-
export
|
|
9
|
+
export type HotkeysListItem = {
|
|
10
10
|
title: string;
|
|
11
11
|
group?: boolean;
|
|
12
12
|
value?: string;
|
|
@@ -5,4 +5,4 @@ export interface BurgerProps {
|
|
|
5
5
|
className?: string;
|
|
6
6
|
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
7
7
|
}
|
|
8
|
-
export declare const Burger: React.MemoExoticComponent<({ opened, className, onClick }: BurgerProps) => JSX.Element>;
|
|
8
|
+
export declare const Burger: React.MemoExoticComponent<({ opened, className, onClick }: BurgerProps) => React.JSX.Element>;
|
package/build/cjs/components/MobileHeader/BurgerMenu/BurgerCompositeBar/BurgerCompositeBar.d.ts
CHANGED
|
@@ -5,5 +5,5 @@ interface BurgerCompositeBarProps {
|
|
|
5
5
|
items: MobileMenuItem[];
|
|
6
6
|
onItemClick?: (item: MobileMenuItem) => void;
|
|
7
7
|
}
|
|
8
|
-
export declare const BurgerCompositeBar: React.MemoExoticComponent<({ items, onItemClick }: BurgerCompositeBarProps) => JSX.Element>;
|
|
8
|
+
export declare const BurgerCompositeBar: React.MemoExoticComponent<({ items, onItemClick }: BurgerCompositeBarProps) => React.JSX.Element>;
|
|
9
9
|
export {};
|
|
@@ -8,4 +8,4 @@ export interface BurgerMenuInnerProps {
|
|
|
8
8
|
onItemClick?: (item: MobileMenuItem) => void;
|
|
9
9
|
className?: string;
|
|
10
10
|
}
|
|
11
|
-
export declare const BurgerMenu: React.MemoExoticComponent<({ items, renderFooter, modalItem, className, onItemClick }: BurgerMenuInnerProps) => JSX.Element>;
|
|
11
|
+
export declare const BurgerMenu: React.MemoExoticComponent<({ items, renderFooter, modalItem, className, onItemClick }: BurgerMenuInnerProps) => React.JSX.Element>;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { Meta } from '@storybook/react/types-6-0';
|
|
2
|
-
import { Story } from '@storybook/react';
|
|
3
1
|
import { BurgerMenuInnerProps } from '../BurgerMenu';
|
|
4
2
|
import './BurgerMenuShowcase.scss';
|
|
5
|
-
declare const _default:
|
|
3
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
|
|
6
4
|
export default _default;
|
|
7
|
-
export declare const Showcase:
|
|
5
|
+
export declare const Showcase: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, BurgerMenuInnerProps>;
|
|
@@ -9,4 +9,4 @@ export interface FooterItemProps {
|
|
|
9
9
|
modalItem: ModalItem;
|
|
10
10
|
onClick?: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
11
11
|
}
|
|
12
|
-
export declare const FooterItem: ({ icon, iconSize, className, modalItem, onClick, }: FooterItemProps) => JSX.Element;
|
|
12
|
+
export declare const FooterItem: ({ icon, iconSize, className, modalItem, onClick, }: FooterItemProps) => React.JSX.Element;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const _default: Meta<import("@storybook/react/types-6-0").Args>;
|
|
1
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
|
|
3
2
|
export default _default;
|
|
4
|
-
export declare const Showcase:
|
|
3
|
+
export declare const Showcase: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import './MobileHeaderShowcase.scss';
|
|
3
|
-
export declare function MobileHeaderShowcase(): JSX.Element;
|
|
3
|
+
export declare function MobileHeaderShowcase(): React.JSX.Element;
|
|
@@ -10,19 +10,19 @@ export interface ModalItem {
|
|
|
10
10
|
renderContent?: () => void;
|
|
11
11
|
onClose?: () => void;
|
|
12
12
|
}
|
|
13
|
-
export
|
|
13
|
+
export type MobileMenuItemType = 'regular' | 'divider';
|
|
14
14
|
export interface MobileMenuItem extends Omit<MenuItem, 'tooltipText' | 'pinned' | 'rightAdornment' | 'afterMoreButton' | 'itemWrapper' | 'onItemClick'> {
|
|
15
15
|
type?: MobileMenuItemType;
|
|
16
16
|
closeMenuOnClick?: boolean;
|
|
17
17
|
onItemClick?: (item: MobileMenuItem) => void;
|
|
18
18
|
itemWrapper?: (node: React.ReactNode, item: MobileMenuItem) => React.ReactNode;
|
|
19
19
|
}
|
|
20
|
-
export
|
|
21
|
-
export
|
|
20
|
+
export type MobileHeaderEvent = 'MOBILE_PANEL_TOGGLE' | 'MOBILE_PANEL_CLOSE' | 'MOBILE_PANEL_OPEN';
|
|
21
|
+
export type ItemEventsConfig = {
|
|
22
22
|
closeEvent: MobileHeaderEvent;
|
|
23
23
|
openEvent: MobileHeaderEvent;
|
|
24
24
|
toggleEvent?: MobileHeaderEvent;
|
|
25
25
|
};
|
|
26
|
-
export
|
|
26
|
+
export type MobileHeaderEventOptions = {
|
|
27
27
|
panelName?: string;
|
|
28
28
|
};
|
|
@@ -12,8 +12,8 @@ interface SettingsProps {
|
|
|
12
12
|
view?: 'normal' | 'mobile';
|
|
13
13
|
onClose?: () => void;
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
type SettingsDict = Record<SettingsDictKeys, string>;
|
|
16
|
+
type SettingsDictKeys = 'heading_settings' | 'placeholder_search' | 'not_found';
|
|
17
17
|
interface SettingsGroupProps {
|
|
18
18
|
id?: string;
|
|
19
19
|
groupTitle: string;
|
|
@@ -41,14 +41,14 @@ interface SettingsItemProps {
|
|
|
41
41
|
mode?: 'row';
|
|
42
42
|
description?: string;
|
|
43
43
|
}
|
|
44
|
-
export declare function Settings({ loading, renderLoading, children, view, ...props }: SettingsProps): JSX.Element;
|
|
44
|
+
export declare function Settings({ loading, renderLoading, children, view, ...props }: SettingsProps): React.JSX.Element;
|
|
45
45
|
export declare namespace Settings {
|
|
46
46
|
var defaultProps: {
|
|
47
47
|
dict: SettingsDict;
|
|
48
48
|
};
|
|
49
|
-
var Group: ({ children }: SettingsGroupProps) => JSX.Element;
|
|
50
|
-
var Page: ({ children }: SettingsPageProps) => JSX.Element;
|
|
51
|
-
var Section: ({ children }: SettingsSectionProps) => JSX.Element;
|
|
52
|
-
var Item: ({ title, children, align, withBadge, renderTitleComponent, mode, description, }: SettingsItemProps) => JSX.Element;
|
|
49
|
+
var Group: ({ children }: SettingsGroupProps) => React.JSX.Element;
|
|
50
|
+
var Page: ({ children }: SettingsPageProps) => React.JSX.Element;
|
|
51
|
+
var Section: ({ children }: SettingsSectionProps) => React.JSX.Element;
|
|
52
|
+
var Item: ({ title, children, align, withBadge, renderTitleComponent, mode, description, }: SettingsItemProps) => React.JSX.Element;
|
|
53
53
|
}
|
|
54
54
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { SettingsMenuProps } from '../types';
|
|
2
3
|
import './SettingsMenuMobile.scss';
|
|
3
|
-
export declare const SettingsMenuMobile: ({ items, onChange, activeItemId, className, }: SettingsMenuProps) => JSX.Element;
|
|
4
|
+
export declare const SettingsMenuMobile: ({ items, onChange, activeItemId, className, }: SettingsMenuProps) => React.JSX.Element;
|
|
@@ -9,5 +9,5 @@ interface SettingsSearchProps {
|
|
|
9
9
|
placeholder?: string;
|
|
10
10
|
autoFocus?: boolean;
|
|
11
11
|
}
|
|
12
|
-
export declare function SettingsSearch({ className, onChange, debounce, inputRef, inputSize, placeholder, autoFocus, }: SettingsSearchProps): JSX.Element;
|
|
12
|
+
export declare function SettingsSearch({ className, onChange, debounce, inputRef, inputSize, placeholder, autoFocus, }: SettingsSearchProps): React.JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
declare const _default: Meta<import("@storybook/react/types-6-0").Args>;
|
|
1
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
|
|
3
2
|
export default _default;
|
|
4
|
-
export declare const Showcase:
|
|
5
|
-
export declare const ViewMobile:
|
|
3
|
+
export declare const Showcase: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
|
|
4
|
+
export declare const ViewMobile: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
|
|
@@ -10,5 +10,5 @@ export declare const SettingsComponent: React.MemoExoticComponent<({ initialPage
|
|
|
10
10
|
initialPage?: string | undefined;
|
|
11
11
|
withBadge?: boolean | undefined;
|
|
12
12
|
onClose: () => void;
|
|
13
|
-
}) => JSX.Element>;
|
|
14
|
-
export declare function SettingsDemo(): JSX.Element;
|
|
13
|
+
}) => React.JSX.Element>;
|
|
14
|
+
export declare function SettingsDemo(): React.JSX.Element;
|
|
@@ -4,5 +4,5 @@ export declare const SettingsMobileComponent: React.MemoExoticComponent<({ initi
|
|
|
4
4
|
initialPage?: string | undefined;
|
|
5
5
|
withBadge?: boolean | undefined;
|
|
6
6
|
onClose?: (() => void) | undefined;
|
|
7
|
-
}) => JSX.Element>;
|
|
8
|
-
export declare function SettingsMobileDemo(): JSX.Element;
|
|
7
|
+
}) => React.JSX.Element>;
|
|
8
|
+
export declare function SettingsMobileDemo(): React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IconProps } from '@gravity-ui/uikit';
|
|
3
|
-
export
|
|
3
|
+
export type SettingsMenu = (SettingsMenuGroup | SettingsMenuItem)[];
|
|
4
4
|
interface SettingsMenuGroup {
|
|
5
5
|
groupTitle: string;
|
|
6
6
|
items: SettingsMenuItem[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
type AnyFunc = (...args: any[]) => any;
|
|
2
2
|
export declare function useStableCallback<T extends AnyFunc>(func: T): (...args: Parameters<T>) => ReturnType<T> | undefined;
|
|
3
3
|
export declare function useCurrent<T>(value: T): () => T;
|
|
4
4
|
export declare function invariant(cond: boolean, message: string): void;
|
|
@@ -10,7 +10,7 @@ export interface Item {
|
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
withBadge?: boolean;
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
type SettingsMenuItems = (GroupItem | Item)[];
|
|
14
14
|
export interface SettingsMenuProps {
|
|
15
15
|
items: SettingsMenuItems;
|
|
16
16
|
onChange: (id: string) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './Title.scss';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type TitleDictKeys = 'close';
|
|
4
|
+
type TitleDict = Record<TitleDictKeys, string>;
|
|
5
5
|
interface TitleProps {
|
|
6
6
|
hasSeparator?: boolean;
|
|
7
7
|
dict?: TitleDict;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IconProps } from '@gravity-ui/uikit';
|
|
3
|
-
export
|
|
3
|
+
export type MenuItemType = 'regular' | 'action' | 'divider';
|
|
4
4
|
export interface MakeItemParams {
|
|
5
5
|
icon?: React.ReactNode;
|
|
6
6
|
title: React.ReactNode;
|
|
@@ -33,7 +33,7 @@ export declare enum Dict {
|
|
|
33
33
|
CollapseButton = "button_collapse",
|
|
34
34
|
MoreButton = "button_more"
|
|
35
35
|
}
|
|
36
|
-
export
|
|
36
|
+
export type AsideHeaderDict = Record<Dict, string>;
|
|
37
37
|
export interface LogoProps {
|
|
38
38
|
text: (() => React.ReactNode) | string;
|
|
39
39
|
icon?: IconProps['data'];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import bemBlock from 'bem-cn-lite';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type CnBlock = ReturnType<typeof bemBlock>;
|
|
3
|
+
export type CnMods = Record<string, string | boolean | undefined>;
|
|
4
4
|
export declare const NAMESPACE = "ycn-";
|
|
5
5
|
export declare function block(name: string): CnBlock;
|