@atlaskit/menu 1.3.12 → 1.4.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 +10 -0
- 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/dist/types-ts4.0/internal/components/menu-item-primitive.d.ts +2 -2
- package/dist/types-ts4.0/internal/components/skeleton-shimmer.d.ts +2 -1
- package/dist/types-ts4.0/menu-item/heading-item.d.ts +2 -1
- package/dist/types-ts4.0/menu-item/skeleton-heading-item.d.ts +2 -2
- package/dist/types-ts4.0/menu-item/skeleton-item.d.ts +2 -2
- package/dist/types-ts4.0/menu-section/menu-group.d.ts +3 -2
- package/dist/types-ts4.0/menu-section/popup-menu-group.d.ts +3 -2
- package/dist/types-ts4.0/types.d.ts +1 -1
- package/package.json +5 -5
- package/report.api.md +107 -388
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
|
-
* A button item is used to populate a menu with items that are buttons.
|
|
87
|
-
*
|
|
88
|
-
* - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/button-item)
|
|
89
|
-
* - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
|
|
90
|
-
*/
|
|
91
|
-
export declare const ButtonItem: MemoExoticComponent<ForwardRefExoticComponent<
|
|
42
|
+
// @public
|
|
43
|
+
export const ButtonItem: MemoExoticComponent<ForwardRefExoticComponent<
|
|
92
44
|
ButtonItemProps & RefAttributes<HTMLElement>
|
|
93
45
|
>>;
|
|
94
46
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
* Unique identifier for the element.
|
|
98
|
-
*/
|
|
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
|
-
|
|
76
|
+
// @public (undocumented)
|
|
77
|
+
export interface CustomItemProps<
|
|
177
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,48 @@ declare interface CustomItemTypeGenericHackProps {
|
|
|
199
90
|
): JSX.Element | null;
|
|
200
91
|
}
|
|
201
92
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
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<({
|
|
93
|
+
// @public (undocumented)
|
|
94
|
+
export type Dimension = string | number;
|
|
95
|
+
|
|
96
|
+
// @public
|
|
97
|
+
export const HeadingItem: MemoExoticComponent<({
|
|
213
98
|
children,
|
|
214
99
|
testId,
|
|
215
100
|
id,
|
|
216
101
|
cssFn,
|
|
217
102
|
...rest
|
|
218
|
-
}: HeadingItemProps) => JSX.Element>;
|
|
219
|
-
|
|
220
|
-
export declare interface HeadingItemProps {
|
|
221
|
-
/**
|
|
222
|
-
A function that overrides the styles.
|
|
223
|
-
It receives the current styles and returns a customized styles object.
|
|
103
|
+
}: HeadingItemProps) => jsx.JSX.Element>;
|
|
224
104
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
cssFn?: StatelessCSSFn;
|
|
228
|
-
/**
|
|
229
|
-
* The text of the heading.
|
|
230
|
-
*/
|
|
105
|
+
// @public (undocumented)
|
|
106
|
+
export interface HeadingItemProps {
|
|
231
107
|
children: React.ReactNode;
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
* section to allow screen readers to announce the name of groups.
|
|
235
|
-
*/
|
|
108
|
+
// @deprecated
|
|
109
|
+
cssFn?: StatelessCSSFn;
|
|
236
110
|
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
111
|
testId?: string;
|
|
243
112
|
}
|
|
244
113
|
|
|
245
|
-
|
|
114
|
+
// @public (undocumented)
|
|
115
|
+
export type ItemState = {
|
|
246
116
|
isSelected: boolean;
|
|
247
117
|
isDisabled: boolean;
|
|
248
118
|
};
|
|
249
119
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
*
|
|
253
|
-
* A link item is used to populate a menu with items that are links.
|
|
254
|
-
*
|
|
255
|
-
* - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/link-item)
|
|
256
|
-
* - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
|
|
257
|
-
*/
|
|
258
|
-
export declare const LinkItem: MemoExoticComponent<ForwardRefExoticComponent<
|
|
120
|
+
// @public
|
|
121
|
+
export const LinkItem: MemoExoticComponent<ForwardRefExoticComponent<
|
|
259
122
|
LinkItemProps & RefAttributes<HTMLElement>
|
|
260
123
|
>>;
|
|
261
124
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
* Link to another page.
|
|
265
|
-
*/
|
|
125
|
+
// @public (undocumented)
|
|
126
|
+
export interface LinkItemProps extends BaseItemProps {
|
|
266
127
|
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
128
|
rel?: string;
|
|
277
|
-
/**
|
|
278
|
-
* Used to override the accessibility role for the element.
|
|
279
|
-
*/
|
|
280
129
|
role?: string;
|
|
130
|
+
target?: string;
|
|
281
131
|
}
|
|
282
132
|
|
|
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: ({
|
|
133
|
+
// @public
|
|
134
|
+
export const MenuGroup: ({
|
|
292
135
|
maxWidth,
|
|
293
136
|
minWidth,
|
|
294
137
|
minHeight,
|
|
@@ -296,233 +139,109 @@ export declare const MenuGroup: ({
|
|
|
296
139
|
testId,
|
|
297
140
|
role,
|
|
298
141
|
...rest
|
|
299
|
-
}: MenuGroupProps) => JSX.Element;
|
|
142
|
+
}: MenuGroupProps) => jsx.JSX.Element;
|
|
300
143
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
* Children of the menu group,
|
|
304
|
-
* should generally be `Section` components.
|
|
305
|
-
*/
|
|
144
|
+
// @public (undocumented)
|
|
145
|
+
export interface MenuGroupProps extends MenuGroupSizing {
|
|
306
146
|
children: React.ReactNode;
|
|
307
|
-
|
|
308
|
-
* Used to override the accessibility role for the element.
|
|
309
|
-
*/
|
|
147
|
+
onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
310
148
|
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
149
|
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
150
|
}
|
|
324
151
|
|
|
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
|
-
*/
|
|
152
|
+
// @public (undocumented)
|
|
153
|
+
export interface MenuGroupSizing {
|
|
334
154
|
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
155
|
maxWidth?: Dimension;
|
|
156
|
+
minHeight?: Dimension;
|
|
157
|
+
minWidth?: Dimension;
|
|
343
158
|
}
|
|
344
159
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
export declare interface Overrides {
|
|
160
|
+
// @public @deprecated (undocumented)
|
|
161
|
+
export interface Overrides {
|
|
162
|
+
// (undocumented)
|
|
349
163
|
Title?: TitleOverrides;
|
|
350
164
|
}
|
|
351
165
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
*/
|
|
355
|
-
export declare const PopupMenuGroup: ({
|
|
166
|
+
// @public @deprecated (undocumented)
|
|
167
|
+
export const PopupMenuGroup: ({
|
|
356
168
|
maxWidth,
|
|
357
169
|
minWidth,
|
|
358
170
|
...rest
|
|
359
|
-
}: MenuGroupProps) => JSX.Element;
|
|
171
|
+
}: MenuGroupProps) => jsx.JSX.Element;
|
|
360
172
|
|
|
361
|
-
|
|
173
|
+
// @public (undocumented)
|
|
174
|
+
export interface RenderFunction<TProps = {}> {
|
|
175
|
+
// (undocumented)
|
|
362
176
|
(Component: ComponentType | string, props: TProps): React.ReactNode;
|
|
363
177
|
}
|
|
364
178
|
|
|
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<
|
|
179
|
+
// @public
|
|
180
|
+
export const Section: ForwardRefExoticComponent<
|
|
374
181
|
SectionProps & RefAttributes<HTMLElement>
|
|
375
182
|
>;
|
|
376
183
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
184
|
+
// @public (undocumented)
|
|
185
|
+
interface SectionProps {
|
|
186
|
+
children: React.ReactNode;
|
|
187
|
+
hasSeparator?: boolean;
|
|
381
188
|
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
189
|
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
|
-
*/
|
|
190
|
+
// @deprecated (undocumented)
|
|
406
191
|
overrides?: {
|
|
407
192
|
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
193
|
cssFn?: StatelessCSSFn;
|
|
413
194
|
};
|
|
414
195
|
};
|
|
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
|
-
*/
|
|
196
|
+
testId?: string;
|
|
419
197
|
title?: string;
|
|
420
198
|
}
|
|
421
199
|
export { SectionProps as SectionBaseProps };
|
|
422
200
|
export { SectionProps };
|
|
423
201
|
|
|
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: ({
|
|
202
|
+
// @public
|
|
203
|
+
export const SkeletonHeadingItem: ({
|
|
433
204
|
isShimmering,
|
|
434
205
|
testId,
|
|
435
206
|
width,
|
|
436
207
|
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.
|
|
208
|
+
}: SkeletonHeadingItemProps) => jsx.JSX.Element;
|
|
460
209
|
|
|
461
|
-
|
|
462
|
-
|
|
210
|
+
// @public (undocumented)
|
|
211
|
+
export interface SkeletonHeadingItemProps {
|
|
212
|
+
// @deprecated
|
|
463
213
|
cssFn?: StatelessCSSFn;
|
|
214
|
+
isShimmering?: boolean;
|
|
215
|
+
testId?: string;
|
|
216
|
+
width?: Dimension;
|
|
464
217
|
}
|
|
465
218
|
|
|
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: ({
|
|
219
|
+
// @public
|
|
220
|
+
export const SkeletonItem: ({
|
|
475
221
|
hasAvatar,
|
|
476
222
|
hasIcon,
|
|
477
223
|
isShimmering,
|
|
478
224
|
testId,
|
|
479
225
|
width,
|
|
480
226
|
cssFn,
|
|
481
|
-
}: SkeletonItemProps) => JSX.Element;
|
|
227
|
+
}: SkeletonItemProps) => jsx.JSX.Element;
|
|
482
228
|
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
* Takes priority over `hasIcon.
|
|
487
|
-
*/
|
|
229
|
+
// @public (undocumented)
|
|
230
|
+
export interface SkeletonItemProps {
|
|
231
|
+
cssFn?: StatelessCSSFn;
|
|
488
232
|
hasAvatar?: boolean;
|
|
489
|
-
/**
|
|
490
|
-
* Renders a skeleton square in the `iconBefore` location.
|
|
491
|
-
*/
|
|
492
233
|
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
234
|
isShimmering?: boolean;
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
* It receives the current styles and returns a customized styles object.
|
|
513
|
-
*/
|
|
514
|
-
cssFn?: StatelessCSSFn;
|
|
235
|
+
testId?: string;
|
|
236
|
+
width?: Dimension;
|
|
515
237
|
}
|
|
516
238
|
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
*/
|
|
520
|
-
export declare type StatelessCSSFn = CSSFn<void>;
|
|
239
|
+
// @public @deprecated (undocumented)
|
|
240
|
+
export type StatelessCSSFn = CSSFn<void>;
|
|
521
241
|
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
export declare interface TitleOverrides {
|
|
242
|
+
// @public @deprecated (undocumented)
|
|
243
|
+
export interface TitleOverrides {
|
|
244
|
+
// (undocumented)
|
|
526
245
|
render?: RenderFunction<{
|
|
527
246
|
className?: string;
|
|
528
247
|
children: ReactNode;
|
|
@@ -530,5 +249,5 @@ export declare interface TitleOverrides {
|
|
|
530
249
|
}>;
|
|
531
250
|
}
|
|
532
251
|
|
|
533
|
-
|
|
252
|
+
// (No @packageDocumentation comment for this package)
|
|
534
253
|
```
|