@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.
@@ -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,4 @@
1
1
  import { PopupPlacement } from '@gravity-ui/uikit';
2
- export declare const ICON_SIZE = 24;
3
2
  export declare const ITEM_HEIGHT = 40;
4
3
  export declare const ITEM_TYPE_REGULAR = "regular";
5
4
  export declare const COLLAPSE_ITEM_ID = "collapse-item-id";
@@ -1,3 +1,3 @@
1
- export declare const ASIDE_HEADER_FOOTER_ICON_SIZE = 20;
1
+ export declare const ASIDE_HEADER_ICON_SIZE = 18;
2
2
  export declare const ASIDE_HEADER_COMPACT_WIDTH = 56;
3
3
  export declare const ASIDE_HEADER_EXPANDED_WIDTH = 236;
@@ -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 function block(name: string): CnBlock;
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>;