@atlaskit/menu 1.3.12 → 1.4.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/CHANGELOG.md +16 -0
- package/codemods/helpers/generic.tsx +10 -12
- package/dist/cjs/internal/components/menu-item-primitive.js +19 -19
- package/dist/cjs/internal/components/skeleton-shimmer.js +4 -4
- package/dist/cjs/menu-item/button-item.js +3 -3
- package/dist/cjs/menu-item/custom-item.js +4 -4
- package/dist/cjs/menu-item/heading-item.js +4 -4
- package/dist/cjs/menu-item/link-item.js +3 -3
- package/dist/cjs/menu-item/skeleton-heading-item.js +7 -7
- package/dist/cjs/menu-item/skeleton-item.js +10 -10
- package/dist/cjs/menu-section/menu-group.js +2 -2
- package/dist/cjs/menu-section/popup-menu-group.js +2 -2
- package/dist/cjs/menu-section/section.js +8 -8
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/internal/components/menu-item-primitive.js +1 -1
- package/dist/es2019/internal/components/skeleton-shimmer.js +1 -1
- package/dist/es2019/menu-item/button-item.js +1 -1
- package/dist/es2019/menu-item/custom-item.js +1 -1
- package/dist/es2019/menu-item/heading-item.js +2 -2
- package/dist/es2019/menu-item/link-item.js +1 -1
- package/dist/es2019/menu-item/skeleton-heading-item.js +2 -2
- package/dist/es2019/menu-item/skeleton-item.js +2 -2
- package/dist/es2019/menu-section/menu-group.js +1 -1
- package/dist/es2019/menu-section/popup-menu-group.js +1 -1
- package/dist/es2019/menu-section/section.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/internal/components/menu-item-primitive.js +1 -1
- package/dist/esm/internal/components/skeleton-shimmer.js +1 -1
- package/dist/esm/menu-item/button-item.js +1 -1
- package/dist/esm/menu-item/custom-item.js +1 -1
- package/dist/esm/menu-item/heading-item.js +2 -2
- package/dist/esm/menu-item/link-item.js +1 -1
- package/dist/esm/menu-item/skeleton-heading-item.js +2 -2
- package/dist/esm/menu-item/skeleton-item.js +2 -2
- package/dist/esm/menu-section/menu-group.js +1 -1
- package/dist/esm/menu-section/popup-menu-group.js +1 -1
- package/dist/esm/menu-section/section.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/internal/components/menu-item-primitive.d.ts +2 -2
- package/dist/types/internal/components/skeleton-shimmer.d.ts +2 -1
- package/dist/types/menu-item/heading-item.d.ts +2 -1
- package/dist/types/menu-item/skeleton-heading-item.d.ts +2 -2
- package/dist/types/menu-item/skeleton-item.d.ts +2 -2
- package/dist/types/menu-section/menu-group.d.ts +3 -2
- package/dist/types/menu-section/popup-menu-group.d.ts +3 -2
- package/dist/types/types.d.ts +1 -1
- package/package.json +7 -15
- package/report.api.md +120 -399
- package/dist/types-ts4.0/entry-points/menu-item/button-item.d.ts +0 -1
- package/dist/types-ts4.0/entry-points/menu-item/custom-item.d.ts +0 -1
- package/dist/types-ts4.0/entry-points/menu-item/heading-item.d.ts +0 -1
- package/dist/types-ts4.0/entry-points/menu-item/link-item.d.ts +0 -1
- package/dist/types-ts4.0/entry-points/menu-item/skeleton-heading-item.d.ts +0 -1
- package/dist/types-ts4.0/entry-points/menu-item/skeleton-item.d.ts +0 -1
- package/dist/types-ts4.0/entry-points/menu-section/menu-group.d.ts +0 -1
- package/dist/types-ts4.0/entry-points/menu-section/popup-menu-group.d.ts +0 -1
- package/dist/types-ts4.0/entry-points/menu-section/section.d.ts +0 -1
- package/dist/types-ts4.0/index.d.ts +0 -10
- package/dist/types-ts4.0/internal/components/menu-item-primitive.d.ts +0 -18
- package/dist/types-ts4.0/internal/components/skeleton-shimmer.d.ts +0 -23
- package/dist/types-ts4.0/menu-item/button-item.d.ts +0 -12
- package/dist/types-ts4.0/menu-item/custom-item.d.ts +0 -18
- package/dist/types-ts4.0/menu-item/heading-item.d.ts +0 -12
- package/dist/types-ts4.0/menu-item/link-item.d.ts +0 -12
- package/dist/types-ts4.0/menu-item/skeleton-heading-item.d.ts +0 -12
- package/dist/types-ts4.0/menu-item/skeleton-item.d.ts +0 -12
- package/dist/types-ts4.0/menu-section/menu-group.d.ts +0 -12
- package/dist/types-ts4.0/menu-section/popup-menu-group.d.ts +0 -7
- package/dist/types-ts4.0/menu-section/section.d.ts +0 -12
- package/dist/types-ts4.0/types.d.ts +0 -383
package/report.api.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/menu"
|
|
1
|
+
## API Report File for "@atlaskit/menu"
|
|
2
2
|
|
|
3
|
-
> Do not edit this file.
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
<!--
|
|
6
|
+
Generated API Report version: 2.0
|
|
7
|
+
-->
|
|
4
8
|
|
|
5
9
|
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
6
10
|
|
|
@@ -8,190 +12,77 @@
|
|
|
8
12
|
/// <reference types="react" />
|
|
9
13
|
|
|
10
14
|
import { ComponentType } from 'react';
|
|
11
|
-
import { CSSObject } from '@emotion/
|
|
15
|
+
import { CSSObject } from '@emotion/react';
|
|
12
16
|
import { ForwardRefExoticComponent } from 'react';
|
|
17
|
+
import { jsx } from '@emotion/react';
|
|
13
18
|
import { MemoExoticComponent } from 'react';
|
|
14
19
|
import { ReactNode } from 'react';
|
|
15
20
|
import { Ref } from 'react';
|
|
16
21
|
import { RefAttributes } from 'react';
|
|
17
22
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
@deprecated This API is deprecated and will be removed in a future release. See DSP-2676 for more information.
|
|
24
|
-
*/
|
|
23
|
+
// @public (undocumented)
|
|
24
|
+
export interface BaseItemProps {
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
// @deprecated
|
|
25
27
|
cssFn?: CSSFn;
|
|
26
|
-
/**
|
|
27
|
-
* Element to render before the item text.
|
|
28
|
-
* Generally should be an [icon](https://atlaskit.atlassian.com/packages/design-system/icon) component.
|
|
29
|
-
*/
|
|
30
|
-
iconBefore?: React.ReactNode;
|
|
31
|
-
/**
|
|
32
|
-
* Element to render after the item text.
|
|
33
|
-
* Generally should be an [icon](https://atlaskit.atlassian.com/packages/design-system/icon) component.
|
|
34
|
-
*/
|
|
35
|
-
iconAfter?: React.ReactNode;
|
|
36
|
-
/**
|
|
37
|
-
* Event that is triggered when the element is clicked.
|
|
38
|
-
*/
|
|
39
|
-
onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
40
|
-
/**
|
|
41
|
-
* Event that is triggered when the element has been pressed.
|
|
42
|
-
*/
|
|
43
|
-
onMouseDown?: React.MouseEventHandler;
|
|
44
|
-
/**
|
|
45
|
-
* Description of the item.
|
|
46
|
-
* This will render smaller text below the primary text of the item as well as slightly increasing the height of the item.
|
|
47
|
-
*/
|
|
48
28
|
description?: string | JSX.Element;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
*/
|
|
29
|
+
iconAfter?: React.ReactNode;
|
|
30
|
+
iconBefore?: React.ReactNode;
|
|
52
31
|
isDisabled?: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* Makes the element appear selected.
|
|
55
|
-
*/
|
|
56
32
|
isSelected?: boolean;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
children?: React.ReactNode;
|
|
61
|
-
/**
|
|
62
|
-
* A `testId` prop is provided for specified elements,
|
|
63
|
-
* which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
64
|
-
* serving as a hook for automated tests.
|
|
65
|
-
*/
|
|
66
|
-
testId?: string;
|
|
67
|
-
/**
|
|
68
|
-
Custom overrides for the composed components.
|
|
69
|
-
|
|
70
|
-
@deprecated This API is deprecated and will be removed in a future release. See DSP-2676 for more information.
|
|
71
|
-
*/
|
|
33
|
+
onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
34
|
+
onMouseDown?: React.MouseEventHandler;
|
|
35
|
+
// @deprecated
|
|
72
36
|
overrides?: Overrides;
|
|
73
|
-
/**
|
|
74
|
-
* When `true` the title of the item will wrap multiple lines if it's long enough.
|
|
75
|
-
*/
|
|
76
|
-
shouldTitleWrap?: boolean;
|
|
77
|
-
/**
|
|
78
|
-
* When `true` the description of the item will wrap multiple lines if it's long enough.
|
|
79
|
-
*/
|
|
80
37
|
shouldDescriptionWrap?: boolean;
|
|
38
|
+
shouldTitleWrap?: boolean;
|
|
39
|
+
testId?: string;
|
|
81
40
|
}
|
|
82
41
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
*/
|
|
91
|
-
export declare const ButtonItem: MemoExoticComponent<ForwardRefExoticComponent<
|
|
92
|
-
ButtonItemProps & RefAttributes<HTMLElement>
|
|
93
|
-
>>;
|
|
94
|
-
|
|
95
|
-
export declare interface ButtonItemProps extends BaseItemProps {
|
|
96
|
-
/**
|
|
97
|
-
* Unique identifier for the element.
|
|
98
|
-
*/
|
|
42
|
+
// @public
|
|
43
|
+
export const ButtonItem: MemoExoticComponent<
|
|
44
|
+
ForwardRefExoticComponent<ButtonItemProps & RefAttributes<HTMLElement>>
|
|
45
|
+
>;
|
|
46
|
+
|
|
47
|
+
// @public (undocumented)
|
|
48
|
+
export interface ButtonItemProps extends BaseItemProps {
|
|
99
49
|
id?: string;
|
|
100
|
-
/**
|
|
101
|
-
* Used to override the accessibility role for the element.
|
|
102
|
-
*/
|
|
103
50
|
role?: string;
|
|
104
51
|
}
|
|
105
52
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
and should return a CSSObject.
|
|
110
|
-
|
|
111
|
-
@see @atlaskit/menu/docs/85-overriding-item-styles
|
|
112
|
-
@deprecated This type is deprecated and will be removed in a future release. See DSP-2676 for more information.
|
|
113
|
-
*/
|
|
114
|
-
export declare interface CSSFn<
|
|
115
|
-
TState = ItemState extends void ? void : ItemState
|
|
116
|
-
> {
|
|
53
|
+
// @public @deprecated
|
|
54
|
+
export interface CSSFn<TState = ItemState extends void ? void : ItemState> {
|
|
55
|
+
// (undocumented)
|
|
117
56
|
(currentState: TState): CSSObject | CSSObject[];
|
|
118
57
|
}
|
|
119
58
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
* - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
|
|
127
|
-
*/
|
|
128
|
-
export declare const CustomItem: CustomItemTypeGenericHackProps;
|
|
129
|
-
|
|
130
|
-
export declare interface CustomItemComponentProps {
|
|
131
|
-
/**
|
|
132
|
-
* The children of the item.
|
|
133
|
-
*/
|
|
59
|
+
// @public
|
|
60
|
+
export const CustomItem: CustomItemTypeGenericHackProps;
|
|
61
|
+
|
|
62
|
+
// @public (undocumented)
|
|
63
|
+
export interface CustomItemComponentProps {
|
|
64
|
+
'data-testid'?: string;
|
|
134
65
|
children: React.ReactNode;
|
|
135
|
-
/**
|
|
136
|
-
* Class to apply to the root container of the custom component,
|
|
137
|
-
* ensure this has been applied so the consistent item styling is applied.
|
|
138
|
-
*/
|
|
139
66
|
className: string;
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
*/
|
|
143
|
-
'data-testid'?: string;
|
|
144
|
-
/**
|
|
145
|
-
* Event handler that is passed through to the custom component.
|
|
146
|
-
*/
|
|
67
|
+
disabled?: boolean;
|
|
68
|
+
draggable: boolean;
|
|
147
69
|
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
148
|
-
/**
|
|
149
|
-
* Event handler that is passed through to the custom component.
|
|
150
|
-
*/
|
|
151
|
-
onMouseDown?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
152
|
-
/**
|
|
153
|
-
* Event handler that is passed through to the custom component.
|
|
154
|
-
* Used to disable the element from being draggable.
|
|
155
|
-
*/
|
|
156
70
|
onDragStart?: (event: React.DragEvent) => void;
|
|
157
|
-
|
|
158
|
-
* Turns off the element being draggable.
|
|
159
|
-
*/
|
|
160
|
-
draggable: boolean;
|
|
161
|
-
/**
|
|
162
|
-
* React ref for the raw DOM element,
|
|
163
|
-
* make sure to place this on the outer most DOM element.
|
|
164
|
-
*/
|
|
71
|
+
onMouseDown?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
165
72
|
ref?: Ref<any>;
|
|
166
|
-
/**
|
|
167
|
-
* Makes the element appear disabled as well as removing interactivity.
|
|
168
|
-
*/
|
|
169
73
|
tabIndex?: number;
|
|
170
|
-
/**
|
|
171
|
-
* Disabled attribute.
|
|
172
|
-
*/
|
|
173
|
-
disabled?: boolean;
|
|
174
74
|
}
|
|
175
75
|
|
|
176
|
-
|
|
177
|
-
|
|
76
|
+
// @public (undocumented)
|
|
77
|
+
export interface CustomItemProps<
|
|
78
|
+
TCustomComponentProps = CustomItemComponentProps,
|
|
178
79
|
> extends BaseItemProps {
|
|
179
|
-
/**
|
|
180
|
-
Custom component to render as an item. This can be both a functional component or a class component.
|
|
181
|
-
|
|
182
|
-
__Will return `null` if no component is defined.__
|
|
183
|
-
|
|
184
|
-
Props passed to `CustomItem` will be passed down to this component. If the props for `component` have TypeScript types,
|
|
185
|
-
CustomItem will extend them, providing type safety for your custom item.
|
|
186
|
-
|
|
187
|
-
e.g. `<CustomItem to="/link" component={RouterLink} />`
|
|
188
|
-
|
|
189
|
-
__NOTE:__ Make sure the reference for this component does not change between renders else undefined behavior may happen.
|
|
190
|
-
*/
|
|
191
80
|
component?: React.ComponentType<TCustomComponentProps>;
|
|
192
81
|
}
|
|
193
82
|
|
|
194
|
-
|
|
83
|
+
// @public (undocumented)
|
|
84
|
+
interface CustomItemTypeGenericHackProps {
|
|
85
|
+
// (undocumented)
|
|
195
86
|
<TComponentProps>(
|
|
196
87
|
props: CustomItemProps<TComponentProps> & {
|
|
197
88
|
ref?: any;
|
|
@@ -199,96 +90,50 @@ declare interface CustomItemTypeGenericHackProps {
|
|
|
199
90
|
): JSX.Element | null;
|
|
200
91
|
}
|
|
201
92
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* __Heading item__
|
|
206
|
-
*
|
|
207
|
-
* A heading item is used to describe sibling menu items.
|
|
208
|
-
*
|
|
209
|
-
* - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/heading-item)
|
|
210
|
-
* - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
|
|
211
|
-
*/
|
|
212
|
-
export declare const HeadingItem: MemoExoticComponent<({
|
|
213
|
-
children,
|
|
214
|
-
testId,
|
|
215
|
-
id,
|
|
216
|
-
cssFn,
|
|
217
|
-
...rest
|
|
218
|
-
}: HeadingItemProps) => JSX.Element>;
|
|
93
|
+
// @public (undocumented)
|
|
94
|
+
export type Dimension = string | number;
|
|
219
95
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
96
|
+
// @public
|
|
97
|
+
export const HeadingItem: MemoExoticComponent<
|
|
98
|
+
({
|
|
99
|
+
children,
|
|
100
|
+
testId,
|
|
101
|
+
id,
|
|
102
|
+
cssFn,
|
|
103
|
+
...rest
|
|
104
|
+
}: HeadingItemProps) => jsx.JSX.Element
|
|
105
|
+
>;
|
|
224
106
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
cssFn?: StatelessCSSFn;
|
|
228
|
-
/**
|
|
229
|
-
* The text of the heading.
|
|
230
|
-
*/
|
|
107
|
+
// @public (undocumented)
|
|
108
|
+
export interface HeadingItemProps {
|
|
231
109
|
children: React.ReactNode;
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
* section to allow screen readers to announce the name of groups.
|
|
235
|
-
*/
|
|
110
|
+
// @deprecated
|
|
111
|
+
cssFn?: StatelessCSSFn;
|
|
236
112
|
id?: string;
|
|
237
|
-
/**
|
|
238
|
-
* A `testId` prop is provided for specified elements,
|
|
239
|
-
* which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
240
|
-
* serving as a hook for automated tests.
|
|
241
|
-
*/
|
|
242
113
|
testId?: string;
|
|
243
114
|
}
|
|
244
115
|
|
|
245
|
-
|
|
116
|
+
// @public (undocumented)
|
|
117
|
+
export type ItemState = {
|
|
246
118
|
isSelected: boolean;
|
|
247
119
|
isDisabled: boolean;
|
|
248
120
|
};
|
|
249
121
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
*/
|
|
258
|
-
export declare const LinkItem: MemoExoticComponent<ForwardRefExoticComponent<
|
|
259
|
-
LinkItemProps & RefAttributes<HTMLElement>
|
|
260
|
-
>>;
|
|
261
|
-
|
|
262
|
-
export declare interface LinkItemProps extends BaseItemProps {
|
|
263
|
-
/**
|
|
264
|
-
* Link to another page.
|
|
265
|
-
*/
|
|
122
|
+
// @public
|
|
123
|
+
export const LinkItem: MemoExoticComponent<
|
|
124
|
+
ForwardRefExoticComponent<LinkItemProps & RefAttributes<HTMLElement>>
|
|
125
|
+
>;
|
|
126
|
+
|
|
127
|
+
// @public (undocumented)
|
|
128
|
+
export interface LinkItemProps extends BaseItemProps {
|
|
266
129
|
href?: string;
|
|
267
|
-
/**
|
|
268
|
-
* Where to display the linked URL,
|
|
269
|
-
* see [anchor information](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a) on mdn for more information.
|
|
270
|
-
*/
|
|
271
|
-
target?: string;
|
|
272
|
-
/**
|
|
273
|
-
* The relationship of the linked URL as space-separated link types.
|
|
274
|
-
* Generally you'll want to set this to "noopener noreferrer" when `target` is "_blank".
|
|
275
|
-
*/
|
|
276
130
|
rel?: string;
|
|
277
|
-
/**
|
|
278
|
-
* Used to override the accessibility role for the element.
|
|
279
|
-
*/
|
|
280
131
|
role?: string;
|
|
132
|
+
target?: string;
|
|
281
133
|
}
|
|
282
134
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
*
|
|
286
|
-
* A menu group includes all the actions or items in a menu.
|
|
287
|
-
*
|
|
288
|
-
* - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/menu-group)
|
|
289
|
-
* - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
|
|
290
|
-
*/
|
|
291
|
-
export declare const MenuGroup: ({
|
|
135
|
+
// @public
|
|
136
|
+
export const MenuGroup: ({
|
|
292
137
|
maxWidth,
|
|
293
138
|
minWidth,
|
|
294
139
|
minHeight,
|
|
@@ -296,233 +141,109 @@ export declare const MenuGroup: ({
|
|
|
296
141
|
testId,
|
|
297
142
|
role,
|
|
298
143
|
...rest
|
|
299
|
-
}: MenuGroupProps) => JSX.Element;
|
|
144
|
+
}: MenuGroupProps) => jsx.JSX.Element;
|
|
300
145
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
* Children of the menu group,
|
|
304
|
-
* should generally be `Section` components.
|
|
305
|
-
*/
|
|
146
|
+
// @public (undocumented)
|
|
147
|
+
export interface MenuGroupProps extends MenuGroupSizing {
|
|
306
148
|
children: React.ReactNode;
|
|
307
|
-
|
|
308
|
-
* Used to override the accessibility role for the element.
|
|
309
|
-
*/
|
|
149
|
+
onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
310
150
|
role?: string;
|
|
311
|
-
/**
|
|
312
|
-
* A `testId` prop is provided for specified elements,
|
|
313
|
-
* which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
314
|
-
* serving as a hook for automated tests.
|
|
315
|
-
*/
|
|
316
151
|
testId?: string;
|
|
317
|
-
/**
|
|
318
|
-
* Handler called when clicking on this element,
|
|
319
|
-
* or any children elements.
|
|
320
|
-
* Useful when needing to stop propagation of child events.
|
|
321
|
-
*/
|
|
322
|
-
onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
323
152
|
}
|
|
324
153
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
* Useful to constrain the menu group minimum height to a specific value.
|
|
328
|
-
*/
|
|
329
|
-
minHeight?: Dimension;
|
|
330
|
-
/**
|
|
331
|
-
* Useful to constrain the menu groups height to a specific value.
|
|
332
|
-
* Needs to be set when wanting to have scrollable sections.
|
|
333
|
-
*/
|
|
154
|
+
// @public (undocumented)
|
|
155
|
+
export interface MenuGroupSizing {
|
|
334
156
|
maxHeight?: Dimension;
|
|
335
|
-
/**
|
|
336
|
-
* Useful to constrain the menu group minimum width to a specific value.
|
|
337
|
-
*/
|
|
338
|
-
minWidth?: Dimension;
|
|
339
|
-
/**
|
|
340
|
-
* Useful to constrain the menu group width to a specific value.
|
|
341
|
-
*/
|
|
342
157
|
maxWidth?: Dimension;
|
|
158
|
+
minHeight?: Dimension;
|
|
159
|
+
minWidth?: Dimension;
|
|
343
160
|
}
|
|
344
161
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
export declare interface Overrides {
|
|
162
|
+
// @public @deprecated (undocumented)
|
|
163
|
+
export interface Overrides {
|
|
164
|
+
// (undocumented)
|
|
349
165
|
Title?: TitleOverrides;
|
|
350
166
|
}
|
|
351
167
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
*/
|
|
355
|
-
export declare const PopupMenuGroup: ({
|
|
168
|
+
// @public @deprecated (undocumented)
|
|
169
|
+
export const PopupMenuGroup: ({
|
|
356
170
|
maxWidth,
|
|
357
171
|
minWidth,
|
|
358
172
|
...rest
|
|
359
|
-
}: MenuGroupProps) => JSX.Element;
|
|
173
|
+
}: MenuGroupProps) => jsx.JSX.Element;
|
|
360
174
|
|
|
361
|
-
|
|
175
|
+
// @public (undocumented)
|
|
176
|
+
export interface RenderFunction<TProps = {}> {
|
|
177
|
+
// (undocumented)
|
|
362
178
|
(Component: ComponentType | string, props: TProps): React.ReactNode;
|
|
363
179
|
}
|
|
364
180
|
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
*
|
|
368
|
-
* A section includes related actions or items in a menu.
|
|
369
|
-
*
|
|
370
|
-
* - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/section)
|
|
371
|
-
* - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
|
|
372
|
-
*/
|
|
373
|
-
export declare const Section: ForwardRefExoticComponent<
|
|
181
|
+
// @public
|
|
182
|
+
export const Section: ForwardRefExoticComponent<
|
|
374
183
|
SectionProps & RefAttributes<HTMLElement>
|
|
375
184
|
>;
|
|
376
185
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
186
|
+
// @public (undocumented)
|
|
187
|
+
interface SectionProps {
|
|
188
|
+
children: React.ReactNode;
|
|
189
|
+
hasSeparator?: boolean;
|
|
381
190
|
id?: string;
|
|
382
|
-
/**
|
|
383
|
-
* Enables scrolling within the section.
|
|
384
|
-
* Make sure to set `maxHeight` on the parent `MenuGroup` component else it will not work.
|
|
385
|
-
*/
|
|
386
191
|
isScrollable?: boolean;
|
|
387
|
-
|
|
388
|
-
* Will render a border at the top of the section.
|
|
389
|
-
*/
|
|
390
|
-
hasSeparator?: boolean;
|
|
391
|
-
/**
|
|
392
|
-
* Children of the section,
|
|
393
|
-
* should generally be `Item` or `Heading` components,
|
|
394
|
-
* but can also be [`EmptyState`](https://atlaskit.atlassian.com/packages/design-system/empty-state)s when wanting to render errors.
|
|
395
|
-
*/
|
|
396
|
-
children: React.ReactNode;
|
|
397
|
-
/**
|
|
398
|
-
* A `testId` prop is provided for specified elements,
|
|
399
|
-
* which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
400
|
-
* serving as a hook for automated tests.
|
|
401
|
-
*/
|
|
402
|
-
testId?: string;
|
|
403
|
-
/**
|
|
404
|
-
* @deprecated This API is deprecated and will be removed in a future release. See DSP-2676 for more information.
|
|
405
|
-
*/
|
|
192
|
+
// @deprecated (undocumented)
|
|
406
193
|
overrides?: {
|
|
407
194
|
HeadingItem?: {
|
|
408
|
-
/**
|
|
409
|
-
* A function that overrides the styles of the component.
|
|
410
|
-
* It receives the current styles and state and expects a styles object.
|
|
411
|
-
*/
|
|
412
195
|
cssFn?: StatelessCSSFn;
|
|
413
196
|
};
|
|
414
197
|
};
|
|
415
|
-
|
|
416
|
-
* The text passed into the internal HeadingItem. If a title is not provided,
|
|
417
|
-
* the HeadingItem will not be rendered, and this component acts as a regular Section
|
|
418
|
-
*/
|
|
198
|
+
testId?: string;
|
|
419
199
|
title?: string;
|
|
420
200
|
}
|
|
421
201
|
export { SectionProps as SectionBaseProps };
|
|
422
202
|
export { SectionProps };
|
|
423
203
|
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
*
|
|
427
|
-
* A skeleton heading item is used in place of a heading item when its contents it not ready.
|
|
428
|
-
*
|
|
429
|
-
* - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/skeleton-heading-item)
|
|
430
|
-
* - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
|
|
431
|
-
*/
|
|
432
|
-
export declare const SkeletonHeadingItem: ({
|
|
204
|
+
// @public
|
|
205
|
+
export const SkeletonHeadingItem: ({
|
|
433
206
|
isShimmering,
|
|
434
207
|
testId,
|
|
435
208
|
width,
|
|
436
209
|
cssFn,
|
|
437
|
-
}: SkeletonHeadingItemProps) => JSX.Element;
|
|
438
|
-
|
|
439
|
-
export declare interface SkeletonHeadingItemProps {
|
|
440
|
-
/**
|
|
441
|
-
*
|
|
442
|
-
* Width of the skeleton heading item.
|
|
443
|
-
* Generally you don't need to specify this as it has a staggered width based on `:nth-child` by default.
|
|
444
|
-
*/
|
|
445
|
-
width?: Dimension;
|
|
446
|
-
/**
|
|
447
|
-
* A `testId` prop is provided for specified elements,
|
|
448
|
-
* which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
449
|
-
* serving as a hook for automated tests.
|
|
450
|
-
*/
|
|
451
|
-
testId?: string;
|
|
452
|
-
/**
|
|
453
|
-
* Causes to the skeleton to have a slight horizontal shimmer.
|
|
454
|
-
* Only use this when you want to bring more attention to the loading content.
|
|
455
|
-
*/
|
|
456
|
-
isShimmering?: boolean;
|
|
457
|
-
/**
|
|
458
|
-
A function that overrides the styles of this component.
|
|
459
|
-
It receives the current styles and returns a customized styles object.
|
|
210
|
+
}: SkeletonHeadingItemProps) => jsx.JSX.Element;
|
|
460
211
|
|
|
461
|
-
|
|
462
|
-
|
|
212
|
+
// @public (undocumented)
|
|
213
|
+
export interface SkeletonHeadingItemProps {
|
|
214
|
+
// @deprecated
|
|
463
215
|
cssFn?: StatelessCSSFn;
|
|
216
|
+
isShimmering?: boolean;
|
|
217
|
+
testId?: string;
|
|
218
|
+
width?: Dimension;
|
|
464
219
|
}
|
|
465
220
|
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
*
|
|
469
|
-
* A skeleton item is used in place of an item when its contents it not ready.
|
|
470
|
-
*
|
|
471
|
-
* - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/skeleton-item)
|
|
472
|
-
* - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
|
|
473
|
-
*/
|
|
474
|
-
export declare const SkeletonItem: ({
|
|
221
|
+
// @public
|
|
222
|
+
export const SkeletonItem: ({
|
|
475
223
|
hasAvatar,
|
|
476
224
|
hasIcon,
|
|
477
225
|
isShimmering,
|
|
478
226
|
testId,
|
|
479
227
|
width,
|
|
480
228
|
cssFn,
|
|
481
|
-
}: SkeletonItemProps) => JSX.Element;
|
|
229
|
+
}: SkeletonItemProps) => jsx.JSX.Element;
|
|
482
230
|
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
* Takes priority over `hasIcon.
|
|
487
|
-
*/
|
|
231
|
+
// @public (undocumented)
|
|
232
|
+
export interface SkeletonItemProps {
|
|
233
|
+
cssFn?: StatelessCSSFn;
|
|
488
234
|
hasAvatar?: boolean;
|
|
489
|
-
/**
|
|
490
|
-
* Renders a skeleton square in the `iconBefore` location.
|
|
491
|
-
*/
|
|
492
235
|
hasIcon?: boolean;
|
|
493
|
-
/**
|
|
494
|
-
*
|
|
495
|
-
* Width of the skeleton item.
|
|
496
|
-
* Generally you don't need to specify this as it has a staggered width based on `:nth-child` by default.
|
|
497
|
-
*/
|
|
498
|
-
width?: Dimension;
|
|
499
|
-
/**
|
|
500
|
-
* A `testId` prop is provided for specified elements,
|
|
501
|
-
* which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
502
|
-
* serving as a hook for automated tests.
|
|
503
|
-
*/
|
|
504
|
-
testId?: string;
|
|
505
|
-
/**
|
|
506
|
-
* Causes to the skeleton to have a slight horizontal shimmer.
|
|
507
|
-
* Only use this when you want to bring more attention to the loading content.
|
|
508
|
-
*/
|
|
509
236
|
isShimmering?: boolean;
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
* It receives the current styles and returns a customized styles object.
|
|
513
|
-
*/
|
|
514
|
-
cssFn?: StatelessCSSFn;
|
|
237
|
+
testId?: string;
|
|
238
|
+
width?: Dimension;
|
|
515
239
|
}
|
|
516
240
|
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
*/
|
|
520
|
-
export declare type StatelessCSSFn = CSSFn<void>;
|
|
241
|
+
// @public @deprecated (undocumented)
|
|
242
|
+
export type StatelessCSSFn = CSSFn<void>;
|
|
521
243
|
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
export declare interface TitleOverrides {
|
|
244
|
+
// @public @deprecated (undocumented)
|
|
245
|
+
export interface TitleOverrides {
|
|
246
|
+
// (undocumented)
|
|
526
247
|
render?: RenderFunction<{
|
|
527
248
|
className?: string;
|
|
528
249
|
children: ReactNode;
|
|
@@ -530,5 +251,5 @@ export declare interface TitleOverrides {
|
|
|
530
251
|
}>;
|
|
531
252
|
}
|
|
532
253
|
|
|
533
|
-
|
|
254
|
+
// (No @packageDocumentation comment for this package)
|
|
534
255
|
```
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../../menu-item/button-item';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../../menu-item/custom-item';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../../menu-item/heading-item';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../../menu-item/link-item';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../../menu-item/skeleton-heading-item';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../../menu-item/skeleton-item';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../../menu-section/menu-group';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../../menu-section/popup-menu-group';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../../menu-section/section';
|