@atlaskit/side-nav-items 1.13.1 → 1.13.2
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 +7 -0
- package/dist/types/ui/menu-item/drag-and-drop/use-menu-item-drag-and-drop.d.ts +6 -6
- package/dist/types/ui/menu-item/expandable-menu-item/expandable-menu-item-context.d.ts +6 -5
- package/dist/types/ui/menu-item/expandable-menu-item/expandable-menu-item-level-context.d.ts +2 -1
- package/dist/types/ui/menu-item/flyout-menu-item/flyout-menu-item-context.d.ts +7 -6
- package/dist/types/ui/menu-section/menu-section-context.d.ts +2 -1
- package/dist/types-ts4.5/ui/menu-item/drag-and-drop/use-menu-item-drag-and-drop.d.ts +6 -6
- package/dist/types-ts4.5/ui/menu-item/expandable-menu-item/expandable-menu-item-context.d.ts +6 -5
- package/dist/types-ts4.5/ui/menu-item/expandable-menu-item/expandable-menu-item-level-context.d.ts +2 -1
- package/dist/types-ts4.5/ui/menu-item/flyout-menu-item/flyout-menu-item-context.d.ts +7 -6
- package/dist/types-ts4.5/ui/menu-section/menu-section-context.d.ts +2 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/side-nav-items
|
|
2
2
|
|
|
3
|
+
## 1.13.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`9205cdd5ef843`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9205cdd5ef843) -
|
|
8
|
+
(NAVX-3624): Fixing eslint suppression warnings in GSN
|
|
9
|
+
|
|
3
10
|
## 1.13.1
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @jsxRuntime classic
|
|
4
4
|
* @jsx jsx
|
|
5
5
|
*/
|
|
6
|
-
import { type ReactNode } from 'react';
|
|
6
|
+
import { type JSXElementConstructor, type MutableRefObject, type ReactElement, type ReactNode, type ReactPortal } from 'react';
|
|
7
7
|
import { type Instruction } from '@atlaskit/pragmatic-drag-and-drop-hitbox/list-item';
|
|
8
8
|
import { draggable, dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
9
9
|
import { attachInstruction } from './hitbox';
|
|
@@ -52,11 +52,11 @@ export declare function useMenuItemDragAndDrop({ draggable: draggableArgs, dropT
|
|
|
52
52
|
draggable?: TDraggableArgs;
|
|
53
53
|
dropTarget?: TDropTargetArgs;
|
|
54
54
|
}): {
|
|
55
|
-
|
|
56
|
-
draggableButtonRef:
|
|
57
|
-
|
|
58
|
-
draggableAnchorRef: import("react").MutableRefObject<HTMLAnchorElement | null>;
|
|
59
|
-
dragPreview: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null;
|
|
55
|
+
draggableAnchorRef: MutableRefObject<HTMLAnchorElement | null>;
|
|
56
|
+
draggableButtonRef: MutableRefObject<HTMLButtonElement | null>;
|
|
57
|
+
dragPreview: ReactElement<any, string | JSXElementConstructor<any>> | ReactPortal | null;
|
|
60
58
|
dropIndicator: false | JSX.Element | null;
|
|
59
|
+
dropTargetRef: MutableRefObject<HTMLDivElement | null>;
|
|
60
|
+
state: TMenuItemDragAndDropState;
|
|
61
61
|
};
|
|
62
62
|
export {};
|
|
@@ -1,25 +1,26 @@
|
|
|
1
|
+
import { type Context } from 'react';
|
|
1
2
|
type onExpansionToggle = (isExpanded: boolean) => void;
|
|
2
3
|
/**
|
|
3
4
|
* Whether all ancestor menu items of the current menu item are expanded. Used to know if the current menu item is
|
|
4
5
|
* shown within the menu item tree.
|
|
5
6
|
*/
|
|
6
|
-
export declare const AreAllAncestorsExpandedContext:
|
|
7
|
+
export declare const AreAllAncestorsExpandedContext: Context<boolean | null>;
|
|
7
8
|
/**
|
|
8
9
|
* A context for storing the isExpanded value of the ExpandableMenuItem.
|
|
9
10
|
*/
|
|
10
|
-
export declare const IsExpandedContext:
|
|
11
|
+
export declare const IsExpandedContext: Context<boolean | null>;
|
|
11
12
|
/**
|
|
12
13
|
* A context for storing a function that sets isExpanded value of the ExpandableMenuItem.
|
|
13
14
|
*/
|
|
14
|
-
export declare const SetIsExpandedContext:
|
|
15
|
+
export declare const SetIsExpandedContext: Context<((value: boolean) => void) | null>;
|
|
15
16
|
/**
|
|
16
17
|
* A context for storing a function that triggers when isExpanded value of the ExpandableMenuItem is changed.
|
|
17
18
|
*/
|
|
18
|
-
export declare const OnExpansionToggleContext:
|
|
19
|
+
export declare const OnExpansionToggleContext: Context<onExpansionToggle | null>;
|
|
19
20
|
/**
|
|
20
21
|
* A context for storing the level value of the ExpandableMenuItem.
|
|
21
22
|
*/
|
|
22
|
-
export declare const LevelContext:
|
|
23
|
+
export declare const LevelContext: Context<number>;
|
|
23
24
|
export declare const useIsExpanded: () => boolean;
|
|
24
25
|
export declare const useSetIsExpanded: () => ((value: boolean) => void);
|
|
25
26
|
export declare const useOnExpansionToggle: () => onExpansionToggle | null;
|
package/dist/types/ui/menu-item/expandable-menu-item/expandable-menu-item-level-context.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { type Context } from 'react';
|
|
1
2
|
/**
|
|
2
3
|
* A context for storing the level value of the ExpandableMenuItem.
|
|
3
4
|
*/
|
|
4
|
-
export declare const ExpandableMenuItemLevelContext:
|
|
5
|
+
export declare const ExpandableMenuItemLevelContext: Context<number>;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
+
import { type Context, type MutableRefObject, type Provider } from 'react';
|
|
1
2
|
import type { FlyoutCloseSource } from './flyout-menu-item-content';
|
|
2
3
|
/**
|
|
3
4
|
* __Is open context__
|
|
4
5
|
*
|
|
5
6
|
* A context for storing the isOpen value of the FlyoutMenuItem.
|
|
6
7
|
*/
|
|
7
|
-
export declare const IsOpenContext:
|
|
8
|
+
export declare const IsOpenContext: Context<boolean>;
|
|
8
9
|
/**
|
|
9
10
|
* __Set is open context__
|
|
10
11
|
*
|
|
11
12
|
* A context for storing a function that sets isOpen value of the FlyoutMenuItem.
|
|
12
13
|
*/
|
|
13
|
-
export declare const SetIsOpenContext:
|
|
14
|
+
export declare const SetIsOpenContext: Context<(value: boolean) => void>;
|
|
14
15
|
export declare const useFlyoutMenuOpen: () => boolean;
|
|
15
|
-
export declare const useSetFlyoutMenuOpen: () => (value: boolean) => void;
|
|
16
|
+
export declare const useSetFlyoutMenuOpen: () => ((value: boolean) => void);
|
|
16
17
|
/**
|
|
17
18
|
* __On close context__
|
|
18
19
|
*
|
|
@@ -20,7 +21,7 @@ export declare const useSetFlyoutMenuOpen: () => (value: boolean) => void;
|
|
|
20
21
|
* is used by FlyoutMenuItemContent, FlyoutMenuItemTrigger and FlyoutHeader to store
|
|
21
22
|
* the on close function and source information for closing the flyout menu.
|
|
22
23
|
*/
|
|
23
|
-
export declare const OnCloseContext:
|
|
24
|
+
export declare const OnCloseContext: Context<MutableRefObject<((event: Event | React.MouseEvent<HTMLButtonElement> | KeyboardEvent | MouseEvent | null, source?: FlyoutCloseSource) => void) | null>>;
|
|
24
25
|
/**
|
|
25
26
|
* __Title id context__
|
|
26
27
|
*
|
|
@@ -28,11 +29,11 @@ export declare const OnCloseContext: import("react").Context<import("react").Mut
|
|
|
28
29
|
* FlyoutHeader, and used as the aria-labelledby on the FlyoutMenuItemContent
|
|
29
30
|
* container.
|
|
30
31
|
*/
|
|
31
|
-
export declare const TitleIdContext:
|
|
32
|
+
export declare const TitleIdContext: Context<string | undefined>;
|
|
32
33
|
export declare const useTitleId: () => string | undefined;
|
|
33
34
|
/**
|
|
34
35
|
* __Title id provider__
|
|
35
36
|
*
|
|
36
37
|
* A context provider for supplying the title id to the FlyoutHeader.
|
|
37
38
|
*/
|
|
38
|
-
export declare const TitleIdContextProvider:
|
|
39
|
+
export declare const TitleIdContextProvider: Provider<string | undefined>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { type Context } from 'react';
|
|
1
2
|
/**
|
|
2
3
|
* Context for the current menu section. It holds a unique ID for the section, used for associating the section heading
|
|
3
4
|
* as an accessible label for the group.
|
|
4
5
|
*/
|
|
5
|
-
export declare const MenuSectionContext:
|
|
6
|
+
export declare const MenuSectionContext: Context<string | null>;
|
|
6
7
|
export declare const useMenuSectionContext: () => string;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @jsxRuntime classic
|
|
4
4
|
* @jsx jsx
|
|
5
5
|
*/
|
|
6
|
-
import { type ReactNode } from 'react';
|
|
6
|
+
import { type JSXElementConstructor, type MutableRefObject, type ReactElement, type ReactNode, type ReactPortal } from 'react';
|
|
7
7
|
import { type Instruction } from '@atlaskit/pragmatic-drag-and-drop-hitbox/list-item';
|
|
8
8
|
import { draggable, dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
9
9
|
import { attachInstruction } from './hitbox';
|
|
@@ -52,11 +52,11 @@ export declare function useMenuItemDragAndDrop({ draggable: draggableArgs, dropT
|
|
|
52
52
|
draggable?: TDraggableArgs;
|
|
53
53
|
dropTarget?: TDropTargetArgs;
|
|
54
54
|
}): {
|
|
55
|
-
|
|
56
|
-
draggableButtonRef:
|
|
57
|
-
|
|
58
|
-
draggableAnchorRef: import("react").MutableRefObject<HTMLAnchorElement | null>;
|
|
59
|
-
dragPreview: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null;
|
|
55
|
+
draggableAnchorRef: MutableRefObject<HTMLAnchorElement | null>;
|
|
56
|
+
draggableButtonRef: MutableRefObject<HTMLButtonElement | null>;
|
|
57
|
+
dragPreview: ReactElement<any, string | JSXElementConstructor<any>> | ReactPortal | null;
|
|
60
58
|
dropIndicator: false | JSX.Element | null;
|
|
59
|
+
dropTargetRef: MutableRefObject<HTMLDivElement | null>;
|
|
60
|
+
state: TMenuItemDragAndDropState;
|
|
61
61
|
};
|
|
62
62
|
export {};
|
package/dist/types-ts4.5/ui/menu-item/expandable-menu-item/expandable-menu-item-context.d.ts
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
|
+
import { type Context } from 'react';
|
|
1
2
|
type onExpansionToggle = (isExpanded: boolean) => void;
|
|
2
3
|
/**
|
|
3
4
|
* Whether all ancestor menu items of the current menu item are expanded. Used to know if the current menu item is
|
|
4
5
|
* shown within the menu item tree.
|
|
5
6
|
*/
|
|
6
|
-
export declare const AreAllAncestorsExpandedContext:
|
|
7
|
+
export declare const AreAllAncestorsExpandedContext: Context<boolean | null>;
|
|
7
8
|
/**
|
|
8
9
|
* A context for storing the isExpanded value of the ExpandableMenuItem.
|
|
9
10
|
*/
|
|
10
|
-
export declare const IsExpandedContext:
|
|
11
|
+
export declare const IsExpandedContext: Context<boolean | null>;
|
|
11
12
|
/**
|
|
12
13
|
* A context for storing a function that sets isExpanded value of the ExpandableMenuItem.
|
|
13
14
|
*/
|
|
14
|
-
export declare const SetIsExpandedContext:
|
|
15
|
+
export declare const SetIsExpandedContext: Context<((value: boolean) => void) | null>;
|
|
15
16
|
/**
|
|
16
17
|
* A context for storing a function that triggers when isExpanded value of the ExpandableMenuItem is changed.
|
|
17
18
|
*/
|
|
18
|
-
export declare const OnExpansionToggleContext:
|
|
19
|
+
export declare const OnExpansionToggleContext: Context<onExpansionToggle | null>;
|
|
19
20
|
/**
|
|
20
21
|
* A context for storing the level value of the ExpandableMenuItem.
|
|
21
22
|
*/
|
|
22
|
-
export declare const LevelContext:
|
|
23
|
+
export declare const LevelContext: Context<number>;
|
|
23
24
|
export declare const useIsExpanded: () => boolean;
|
|
24
25
|
export declare const useSetIsExpanded: () => ((value: boolean) => void);
|
|
25
26
|
export declare const useOnExpansionToggle: () => onExpansionToggle | null;
|
package/dist/types-ts4.5/ui/menu-item/expandable-menu-item/expandable-menu-item-level-context.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { type Context } from 'react';
|
|
1
2
|
/**
|
|
2
3
|
* A context for storing the level value of the ExpandableMenuItem.
|
|
3
4
|
*/
|
|
4
|
-
export declare const ExpandableMenuItemLevelContext:
|
|
5
|
+
export declare const ExpandableMenuItemLevelContext: Context<number>;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
+
import { type Context, type MutableRefObject, type Provider } from 'react';
|
|
1
2
|
import type { FlyoutCloseSource } from './flyout-menu-item-content';
|
|
2
3
|
/**
|
|
3
4
|
* __Is open context__
|
|
4
5
|
*
|
|
5
6
|
* A context for storing the isOpen value of the FlyoutMenuItem.
|
|
6
7
|
*/
|
|
7
|
-
export declare const IsOpenContext:
|
|
8
|
+
export declare const IsOpenContext: Context<boolean>;
|
|
8
9
|
/**
|
|
9
10
|
* __Set is open context__
|
|
10
11
|
*
|
|
11
12
|
* A context for storing a function that sets isOpen value of the FlyoutMenuItem.
|
|
12
13
|
*/
|
|
13
|
-
export declare const SetIsOpenContext:
|
|
14
|
+
export declare const SetIsOpenContext: Context<(value: boolean) => void>;
|
|
14
15
|
export declare const useFlyoutMenuOpen: () => boolean;
|
|
15
|
-
export declare const useSetFlyoutMenuOpen: () => (value: boolean) => void;
|
|
16
|
+
export declare const useSetFlyoutMenuOpen: () => ((value: boolean) => void);
|
|
16
17
|
/**
|
|
17
18
|
* __On close context__
|
|
18
19
|
*
|
|
@@ -20,7 +21,7 @@ export declare const useSetFlyoutMenuOpen: () => (value: boolean) => void;
|
|
|
20
21
|
* is used by FlyoutMenuItemContent, FlyoutMenuItemTrigger and FlyoutHeader to store
|
|
21
22
|
* the on close function and source information for closing the flyout menu.
|
|
22
23
|
*/
|
|
23
|
-
export declare const OnCloseContext:
|
|
24
|
+
export declare const OnCloseContext: Context<MutableRefObject<((event: Event | React.MouseEvent<HTMLButtonElement> | KeyboardEvent | MouseEvent | null, source?: FlyoutCloseSource) => void) | null>>;
|
|
24
25
|
/**
|
|
25
26
|
* __Title id context__
|
|
26
27
|
*
|
|
@@ -28,11 +29,11 @@ export declare const OnCloseContext: import("react").Context<import("react").Mut
|
|
|
28
29
|
* FlyoutHeader, and used as the aria-labelledby on the FlyoutMenuItemContent
|
|
29
30
|
* container.
|
|
30
31
|
*/
|
|
31
|
-
export declare const TitleIdContext:
|
|
32
|
+
export declare const TitleIdContext: Context<string | undefined>;
|
|
32
33
|
export declare const useTitleId: () => string | undefined;
|
|
33
34
|
/**
|
|
34
35
|
* __Title id provider__
|
|
35
36
|
*
|
|
36
37
|
* A context provider for supplying the title id to the FlyoutHeader.
|
|
37
38
|
*/
|
|
38
|
-
export declare const TitleIdContextProvider:
|
|
39
|
+
export declare const TitleIdContextProvider: Provider<string | undefined>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { type Context } from 'react';
|
|
1
2
|
/**
|
|
2
3
|
* Context for the current menu section. It holds a unique ID for the section, used for associating the section heading
|
|
3
4
|
* as an accessible label for the group.
|
|
4
5
|
*/
|
|
5
|
-
export declare const MenuSectionContext:
|
|
6
|
+
export declare const MenuSectionContext: Context<string | null>;
|
|
6
7
|
export declare const useMenuSectionContext: () => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/side-nav-items",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.2",
|
|
4
4
|
"description": "Menu items and elements for the side nav area.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,15 +37,15 @@
|
|
|
37
37
|
"atlaskit:src": "src/index.ts",
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@atlaskit/analytics-next": "^11.2.0",
|
|
40
|
-
"@atlaskit/avatar": "^25.
|
|
40
|
+
"@atlaskit/avatar": "^25.12.0",
|
|
41
41
|
"@atlaskit/button": "^23.11.0",
|
|
42
42
|
"@atlaskit/css": "^0.19.0",
|
|
43
43
|
"@atlaskit/ds-lib": "^7.0.0",
|
|
44
44
|
"@atlaskit/heading": "^5.4.0",
|
|
45
|
-
"@atlaskit/icon": "^34.
|
|
45
|
+
"@atlaskit/icon": "^34.2.0",
|
|
46
46
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
47
47
|
"@atlaskit/popup": "^4.16.0",
|
|
48
|
-
"@atlaskit/pragmatic-drag-and-drop": "^1.
|
|
48
|
+
"@atlaskit/pragmatic-drag-and-drop": "^1.8.0",
|
|
49
49
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
|
|
50
50
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
|
|
51
51
|
"@atlaskit/primitives": "^19.0.0",
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
"@af/accessibility-testing": "workspace:^",
|
|
64
64
|
"@af/integration-testing": "workspace:^",
|
|
65
65
|
"@af/visual-regression": "workspace:^",
|
|
66
|
-
"@atlaskit/app-provider": "^4.
|
|
67
|
-
"@atlaskit/lozenge": "^13.
|
|
68
|
-
"@atlaskit/navigation-system": "^
|
|
66
|
+
"@atlaskit/app-provider": "^4.3.0",
|
|
67
|
+
"@atlaskit/lozenge": "^13.7.0",
|
|
68
|
+
"@atlaskit/navigation-system": "^8.0.0",
|
|
69
69
|
"@atlaskit/ssr": "workspace:^",
|
|
70
70
|
"@atlassian/a11y-jest-testing": "^0.11.0",
|
|
71
71
|
"@atlassian/feature-flags-test-utils": "^1.0.0",
|