@gravity-ui/navigation 0.16.0 → 0.17.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/README.md +17 -1
- package/build/cjs/components/CompositeBar/HighlightedItem/HighlightedItem.d.ts +12 -0
- package/build/cjs/components/CompositeBar/Item/Item.d.ts +3 -0
- package/build/cjs/components/CompositeBar/constants.d.ts +0 -1
- package/build/cjs/components/constants.d.ts +1 -1
- package/build/cjs/components/utils/cn.d.ts +3 -3
- package/build/cjs/index.js +1328 -1315
- package/build/cjs/index.js.map +1 -1
- package/build/esm/components/CompositeBar/HighlightedItem/HighlightedItem.d.ts +12 -0
- package/build/esm/components/CompositeBar/Item/Item.d.ts +3 -0
- package/build/esm/components/CompositeBar/constants.d.ts +0 -1
- package/build/esm/components/constants.d.ts +1 -1
- package/build/esm/components/utils/cn.d.ts +3 -3
- package/build/esm/index.js +1313 -1300
- package/build/esm/index.js.map +1 -1
- package/package.json +3 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './HighlightedItem.scss';
|
|
3
|
+
export type OpenModalSubscriber = (open: boolean) => void;
|
|
4
|
+
interface ItemInnerProps {
|
|
5
|
+
iconRef: React.RefObject<HTMLDivElement>;
|
|
6
|
+
iconNode: React.ReactNode;
|
|
7
|
+
onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
8
|
+
onClickCapture?: (event: React.SyntheticEvent) => void;
|
|
9
|
+
openModalSubscriber?: (subscriber: OpenModalSubscriber) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const HighlightedItem: React.FC<ItemInnerProps>;
|
|
12
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PopupPlacement, PopupProps } from '@gravity-ui/uikit';
|
|
3
3
|
import { MenuItem } from '../../types';
|
|
4
|
+
import { OpenModalSubscriber } from '../HighlightedItem/HighlightedItem';
|
|
4
5
|
import './Item.scss';
|
|
5
6
|
interface ItemPopup {
|
|
6
7
|
popupVisible?: boolean;
|
|
@@ -10,12 +11,14 @@ interface ItemPopup {
|
|
|
10
11
|
popupKeepMounted?: boolean;
|
|
11
12
|
renderPopupContent?: () => React.ReactNode;
|
|
12
13
|
onClosePopup?: () => void;
|
|
14
|
+
openModalSubscriber?: (subscriber: OpenModalSubscriber) => void;
|
|
13
15
|
}
|
|
14
16
|
export interface ItemProps extends ItemPopup {
|
|
15
17
|
item: MenuItem;
|
|
16
18
|
enableTooltip?: boolean;
|
|
17
19
|
onItemClick?: (item: MenuItem, collapsed: boolean, event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
18
20
|
onItemClickCapture?: (event: React.SyntheticEvent) => void;
|
|
21
|
+
bringForward?: boolean;
|
|
19
22
|
}
|
|
20
23
|
interface ItemInnerProps extends ItemProps {
|
|
21
24
|
className?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import bemBlock from 'bem-cn-lite';
|
|
2
|
-
export type CnBlock = ReturnType<typeof bemBlock>;
|
|
3
1
|
export type CnMods = Record<string, string | boolean | undefined>;
|
|
4
2
|
export declare const NAMESPACE = "gn-";
|
|
5
|
-
export declare
|
|
3
|
+
export declare const cn: import("@bem-react/classname").ClassNameInitilizer;
|
|
4
|
+
export declare const block: import("@bem-react/classname").ClassNameInitilizer;
|
|
5
|
+
export type CnBlock = ReturnType<typeof cn>;
|