@atlaskit/menu 5.0.1 → 7.0.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 +29 -0
- package/dist/cjs/menu-item/heading-item.compiled.css +4 -0
- package/dist/cjs/menu-item/heading-item.js +17 -29
- package/dist/cjs/menu-section/menu-group.compiled.css +5 -0
- package/dist/cjs/menu-section/menu-group.js +12 -17
- package/dist/cjs/menu-section/popup-menu-group.js +9 -8
- package/dist/cjs/menu-section/section.compiled.css +17 -0
- package/dist/cjs/menu-section/section.js +34 -88
- package/dist/es2019/menu-item/heading-item.compiled.css +4 -0
- package/dist/es2019/menu-item/heading-item.js +7 -26
- package/dist/es2019/menu-section/menu-group.compiled.css +5 -0
- package/dist/es2019/menu-section/menu-group.js +9 -17
- package/dist/es2019/menu-section/popup-menu-group.js +6 -6
- package/dist/es2019/menu-section/section.compiled.css +17 -0
- package/dist/es2019/menu-section/section.js +28 -87
- package/dist/esm/menu-item/heading-item.compiled.css +4 -0
- package/dist/esm/menu-item/heading-item.js +13 -29
- package/dist/esm/menu-section/menu-group.compiled.css +5 -0
- package/dist/esm/menu-section/menu-group.js +9 -17
- package/dist/esm/menu-section/popup-menu-group.js +6 -6
- package/dist/esm/menu-section/section.compiled.css +17 -0
- package/dist/esm/menu-section/section.js +30 -88
- package/dist/types/index.d.ts +1 -1
- package/dist/types/menu-item/heading-item.d.ts +1 -2
- package/dist/types/menu-section/menu-group.d.ts +2 -6
- package/dist/types/menu-section/popup-menu-group.d.ts +2 -6
- package/dist/types/types.d.ts +6 -36
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/menu-item/heading-item.d.ts +1 -2
- package/dist/types-ts4.5/menu-section/menu-group.d.ts +2 -6
- package/dist/types-ts4.5/menu-section/popup-menu-group.d.ts +2 -6
- package/dist/types-ts4.5/types.d.ts +6 -36
- package/package.json +3 -2
|
@@ -8,4 +8,4 @@ export { default as SkeletonHeadingItem } from './menu-item/skeleton-heading-ite
|
|
|
8
8
|
export { default as Section } from './menu-section/section';
|
|
9
9
|
export { default as MenuGroup } from './menu-section/menu-group';
|
|
10
10
|
export { default as PopupMenuGroup } from './menu-section/popup-menu-group';
|
|
11
|
-
export type { ButtonItemProps, CSSFn, StatelessCSSFn, CustomItemComponentProps, CustomItemProps, HeadingItemProps, ItemState, LinkItemProps, MenuGroupProps, SectionProps, SkeletonHeadingItemProps, SkeletonItemProps, Dimension, MenuItemProps as BaseItemProps,
|
|
11
|
+
export type { ButtonItemProps, CSSFn, StatelessCSSFn, CustomItemComponentProps, CustomItemProps, HeadingItemProps, ItemState, LinkItemProps, MenuGroupProps, SectionProps, SkeletonHeadingItemProps, SkeletonItemProps, Dimension, MenuItemProps as BaseItemProps, MenuGroupSizing, RenderFunction, SectionProps as SectionBaseProps, } from './types';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
3
2
|
import type { HeadingItemProps } from '../types';
|
|
4
3
|
/**
|
|
5
4
|
* __Heading item__
|
|
@@ -9,5 +8,5 @@ import type { HeadingItemProps } from '../types';
|
|
|
9
8
|
* - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/heading-item)
|
|
10
9
|
* - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
|
|
11
10
|
*/
|
|
12
|
-
declare const HeadingItem: import("react").MemoExoticComponent<({ children, testId, headingLevel, id,
|
|
11
|
+
declare const HeadingItem: import("react").MemoExoticComponent<({ children, testId, headingLevel, id, className: UNSAFE_className, ...rest }: HeadingItemProps) => JSX.Element>;
|
|
13
12
|
export default HeadingItem;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
/// <reference types="react" />
|
|
6
2
|
import type { MenuGroupProps } from '../types';
|
|
7
3
|
/**
|
|
8
4
|
* __Menu group__
|
|
@@ -12,5 +8,5 @@ import type { MenuGroupProps } from '../types';
|
|
|
12
8
|
* - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/menu-group)
|
|
13
9
|
* - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
|
|
14
10
|
*/
|
|
15
|
-
declare const MenuGroup: ({ isLoading, maxWidth, minWidth, minHeight, maxHeight, testId, role, spacing, className: UNSAFE_className, ...rest }: MenuGroupProps) =>
|
|
11
|
+
declare const MenuGroup: ({ isLoading, maxWidth, minWidth, minHeight, maxHeight, testId, role, spacing, className: UNSAFE_className, ...rest }: MenuGroupProps) => JSX.Element;
|
|
16
12
|
export default MenuGroup;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
/// <reference types="react" />
|
|
6
2
|
import type { MenuGroupProps } from '../types';
|
|
7
3
|
/**
|
|
8
4
|
* @deprecated refer to MenuGroup, explicitly set maxWidth and minWidth
|
|
9
5
|
*/
|
|
10
|
-
declare const PopupMenuGroup: ({ maxWidth, minWidth, ...rest }: MenuGroupProps) =>
|
|
6
|
+
declare const PopupMenuGroup: ({ maxWidth, minWidth, ...rest }: MenuGroupProps) => JSX.Element;
|
|
11
7
|
export default PopupMenuGroup;
|
|
@@ -1,25 +1,9 @@
|
|
|
1
|
-
import { type ComponentType, type PropsWithChildren, type
|
|
1
|
+
import { type ComponentType, type PropsWithChildren, type Ref } from 'react';
|
|
2
2
|
import { type CSSObject } from '@emotion/react';
|
|
3
3
|
import type { SpacingMode } from './internal/components/menu-context';
|
|
4
4
|
export interface RenderFunction<TProps = {}> {
|
|
5
5
|
(Component: ComponentType | string, props: TProps): React.ReactNode;
|
|
6
6
|
}
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated This type is deprecated and will be removed in a future release. See DSP-2676 for more information.
|
|
9
|
-
*/
|
|
10
|
-
export interface TitleOverrides {
|
|
11
|
-
render?: RenderFunction<{
|
|
12
|
-
className?: string;
|
|
13
|
-
children: ReactNode;
|
|
14
|
-
'data-item-title': boolean;
|
|
15
|
-
}>;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* @deprecated This type is deprecated and will be removed in a future release. See DSP-2676 for more information.
|
|
19
|
-
*/
|
|
20
|
-
export interface Overrides {
|
|
21
|
-
Title?: TitleOverrides;
|
|
22
|
-
}
|
|
23
7
|
export type Dimension = string | number;
|
|
24
8
|
export interface MenuGroupSizing {
|
|
25
9
|
/**
|
|
@@ -97,18 +81,6 @@ export interface SectionProps {
|
|
|
97
81
|
* serving as a hook for automated tests.
|
|
98
82
|
*/
|
|
99
83
|
testId?: string;
|
|
100
|
-
/**
|
|
101
|
-
* @deprecated This API is deprecated and will be removed in a future release. See DSP-2676 for more information.
|
|
102
|
-
*/
|
|
103
|
-
overrides?: {
|
|
104
|
-
HeadingItem?: {
|
|
105
|
-
/**
|
|
106
|
-
* A function that overrides the styles of the component.
|
|
107
|
-
* It receives the current styles and state and expects a styles object.
|
|
108
|
-
*/
|
|
109
|
-
cssFn?: StatelessCSSFn;
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
84
|
/**
|
|
113
85
|
* The text passed into the internal `HeadingItem`. If a title isn't provided,
|
|
114
86
|
* the `HeadingItem` won't be rendered, and this component will act as a regular `Section`.
|
|
@@ -123,6 +95,11 @@ export interface SectionProps {
|
|
|
123
95
|
* If your menu contains a list, use this to add `<ul>` and `<li>` tags around the items. This is essential for offering better, accessible semantic markup in a list of items.
|
|
124
96
|
*/
|
|
125
97
|
isList?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* When `true`, section header inline padding is reduced.
|
|
100
|
+
* @deprecated This API exists to support functionality in `@atlaskit/side-navigation` and should not be used. Once the new navigation is fully rolled out, this prop will be removed.
|
|
101
|
+
*/
|
|
102
|
+
isSideNavSection?: boolean;
|
|
126
103
|
}
|
|
127
104
|
export interface MenuItemPrimitiveProps {
|
|
128
105
|
children: (props: {
|
|
@@ -347,13 +324,6 @@ export interface SkeletonItemProps {
|
|
|
347
324
|
cssFn?: StatelessCSSFn;
|
|
348
325
|
}
|
|
349
326
|
export interface HeadingItemProps {
|
|
350
|
-
/**
|
|
351
|
-
* A function that overrides the styles.
|
|
352
|
-
* It receives the current styles and returns a customized styles object.
|
|
353
|
-
*
|
|
354
|
-
* @deprecated This API is deprecated and will be removed in a future release. See DSP-2676 for more information.
|
|
355
|
-
*/
|
|
356
|
-
cssFn?: StatelessCSSFn;
|
|
357
327
|
/**
|
|
358
328
|
* The text of the heading.
|
|
359
329
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/menu",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "A list of options to help users navigate, or perform actions.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@atlaskit/app-provider": "^2.1.0",
|
|
45
|
+
"@atlaskit/css": "^0.10.0",
|
|
45
46
|
"@atlaskit/ds-lib": "^4.0.0",
|
|
46
47
|
"@atlaskit/focus-ring": "^3.0.0",
|
|
47
48
|
"@atlaskit/interaction-context": "^3.0.0",
|
|
@@ -63,7 +64,7 @@
|
|
|
63
64
|
"@af/visual-regression": "workspace:^",
|
|
64
65
|
"@atlaskit/button": "^23.0.0",
|
|
65
66
|
"@atlaskit/docs": "^10.0.0",
|
|
66
|
-
"@atlaskit/icon": "^
|
|
67
|
+
"@atlaskit/icon": "^26.0.0",
|
|
67
68
|
"@atlaskit/icon-file-type": "^7.0.0",
|
|
68
69
|
"@atlaskit/icon-object": "^7.1.0",
|
|
69
70
|
"@atlaskit/link": "^3.1.0",
|