@atlaskit/side-navigation 3.2.0 → 3.3.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 +20 -1
- package/README.md +7 -3
- package/afm-jira/tsconfig.json +3 -0
- package/codemods/0.8.0-change-css-fn-prop.tsx +136 -164
- package/codemods/__tests__/0.8.0-change-css-fn-prop.tsx +77 -77
- package/codemods/helpers/generic.tsx +528 -564
- package/constellation/index/examples.mdx +20 -20
- package/constellation/index/props.mdx +8 -8
- package/constellation/index/usage.mdx +27 -11
- package/dist/cjs/components/Header/index.js +4 -0
- package/dist/cjs/components/Item/link-item.js +3 -1
- package/dist/cjs/components/LoadingItems/index.js +7 -3
- package/dist/cjs/components/NavigationContent/index.js +8 -1
- package/dist/cjs/components/NavigationHeader/index.js +4 -0
- package/dist/cjs/components/NestableNavigationContent/index.js +5 -0
- package/dist/cjs/components/NestableNavigationContent/nesting-motion.js +3 -1
- package/dist/cjs/components/NestingItem/index.js +4 -0
- package/dist/cjs/components/SideNavigation/index.js +5 -0
- package/dist/es2019/components/Header/index.js +5 -0
- package/dist/es2019/components/Item/link-item.js +3 -1
- package/dist/es2019/components/LoadingItems/index.js +7 -3
- package/dist/es2019/components/NavigationContent/index.js +8 -1
- package/dist/es2019/components/NavigationHeader/index.js +4 -0
- package/dist/es2019/components/NestableNavigationContent/index.js +5 -0
- package/dist/es2019/components/NestableNavigationContent/nesting-motion.js +4 -0
- package/dist/es2019/components/NestingItem/index.js +5 -0
- package/dist/es2019/components/SideNavigation/index.js +5 -0
- package/dist/esm/components/Header/index.js +5 -0
- package/dist/esm/components/Item/link-item.js +3 -1
- package/dist/esm/components/LoadingItems/index.js +7 -3
- package/dist/esm/components/NavigationContent/index.js +8 -1
- package/dist/esm/components/NavigationHeader/index.js +4 -0
- package/dist/esm/components/NestableNavigationContent/index.js +5 -0
- package/dist/esm/components/NestableNavigationContent/nesting-motion.js +4 -0
- package/dist/esm/components/NestingItem/index.js +5 -0
- package/dist/esm/components/SideNavigation/index.js +5 -0
- package/dist/types/components/LoadingItems/index.d.ts +1 -1
- package/dist/types/components/NavigationContent/index.d.ts +3 -0
- package/dist/types/components/NavigationHeader/index.d.ts +3 -0
- package/dist/types/components/NestableNavigationContent/index.d.ts +0 -1
- package/dist/types/components/NestableNavigationContent/nesting-motion.d.ts +3 -0
- package/dist/types/components/NestingItem/index.d.ts +3 -0
- package/dist/types/components/index.d.ts +2 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types-ts4.5/components/LoadingItems/index.d.ts +1 -1
- package/dist/types-ts4.5/components/NavigationContent/index.d.ts +3 -0
- package/dist/types-ts4.5/components/NavigationHeader/index.d.ts +3 -0
- package/dist/types-ts4.5/components/NestableNavigationContent/index.d.ts +0 -1
- package/dist/types-ts4.5/components/NestableNavigationContent/nesting-motion.d.ts +3 -0
- package/dist/types-ts4.5/components/NestingItem/index.d.ts +3 -0
- package/dist/types-ts4.5/components/index.d.ts +2 -2
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/docs/00-intro.tsx +4 -6
- package/docs/ert/footer.tsx +6 -6
- package/package.json +97 -97
- package/report.api.md +102 -123
package/report.api.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## API Report File for "@atlaskit/side-navigation"
|
|
4
4
|
|
|
5
|
-
> Do not edit this file. This report is auto-generated using
|
|
5
|
+
> Do not edit this file. This report is auto-generated using
|
|
6
|
+
> [API Extractor](https://api-extractor.com/).
|
|
6
7
|
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
7
8
|
|
|
8
9
|
### Table of contents
|
|
@@ -35,7 +36,7 @@ import { SkeletonItemProps } from '@atlaskit/menu';
|
|
|
35
36
|
|
|
36
37
|
// @public
|
|
37
38
|
export const ButtonItem: React_2.ForwardRefExoticComponent<
|
|
38
|
-
|
|
39
|
+
ButtonItemProps & React_2.RefAttributes<HTMLElement>
|
|
39
40
|
>;
|
|
40
41
|
|
|
41
42
|
export { ButtonItemProps };
|
|
@@ -50,60 +51,58 @@ export { CustomItemProps };
|
|
|
50
51
|
|
|
51
52
|
// @public (undocumented)
|
|
52
53
|
interface CustomItemPropsHack {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
// (undocumented)
|
|
55
|
+
<TComponentProps extends {}>(
|
|
56
|
+
props: CustomItemProps<TComponentProps> & {
|
|
57
|
+
ref?: any;
|
|
58
|
+
} & Omit<TComponentProps, keyof CustomItemComponentProps>,
|
|
59
|
+
): JSX.Element | null;
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
// @public
|
|
62
63
|
export const Footer: ({
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
useDeprecatedApi,
|
|
65
|
+
description,
|
|
66
|
+
iconBefore,
|
|
67
|
+
testId,
|
|
68
|
+
children,
|
|
69
|
+
component,
|
|
70
|
+
cssFn,
|
|
71
|
+
onClick,
|
|
71
72
|
}: FooterFacadeProps) => JSX.Element;
|
|
72
73
|
|
|
73
74
|
// @public (undocumented)
|
|
74
75
|
type FooterFacadeProps =
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
76
|
+
| (HeaderProps & {
|
|
77
|
+
useDeprecatedApi?: true;
|
|
78
|
+
})
|
|
79
|
+
| (NewFooterProps & {
|
|
80
|
+
useDeprecatedApi?: false;
|
|
81
|
+
cssFn?: never;
|
|
82
|
+
component?: never;
|
|
83
|
+
onClick?: never;
|
|
84
|
+
});
|
|
84
85
|
|
|
85
86
|
// @public (undocumented)
|
|
86
87
|
export type FooterProps = HeaderProps | NewFooterProps;
|
|
87
88
|
|
|
88
89
|
// @public
|
|
89
90
|
export const GoBackItem: React_2.ForwardRefExoticComponent<
|
|
90
|
-
|
|
91
|
+
ButtonItemProps & React_2.RefAttributes<HTMLElement>
|
|
91
92
|
>;
|
|
92
93
|
|
|
93
94
|
// @public
|
|
94
|
-
export const Header: ForwardRefExoticComponent<
|
|
95
|
-
HeaderProps & RefAttributes<HTMLElement>
|
|
96
|
-
>;
|
|
95
|
+
export const Header: ForwardRefExoticComponent<HeaderProps & RefAttributes<HTMLElement>>;
|
|
97
96
|
|
|
98
97
|
// @public (undocumented)
|
|
99
98
|
export type HeaderProps = {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
99
|
+
cssFn?: CSSFn;
|
|
100
|
+
iconBefore?: React.ReactNode;
|
|
101
|
+
onClick?: (event: React.KeyboardEvent | React.MouseEvent) => void;
|
|
102
|
+
description?: JSX.Element | string;
|
|
103
|
+
children?: React.ReactNode;
|
|
104
|
+
testId?: string;
|
|
105
|
+
component?: React.ComponentType<CustomItemComponentProps>;
|
|
107
106
|
};
|
|
108
107
|
|
|
109
108
|
// @public
|
|
@@ -113,124 +112,106 @@ export { HeadingItemProps };
|
|
|
113
112
|
|
|
114
113
|
// @public
|
|
115
114
|
export const LinkItem: React_2.ForwardRefExoticComponent<
|
|
116
|
-
|
|
115
|
+
LinkItemProps & React_2.RefAttributes<HTMLElement>
|
|
117
116
|
>;
|
|
118
117
|
|
|
119
118
|
export { LinkItemProps };
|
|
120
119
|
|
|
121
120
|
// @public
|
|
122
121
|
export const LoadingItems: ({
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
122
|
+
children,
|
|
123
|
+
isLoading,
|
|
124
|
+
fallback,
|
|
125
|
+
testId,
|
|
127
126
|
}: LoadingItemsProps) => JSX.Element;
|
|
128
127
|
|
|
129
128
|
// @public (undocumented)
|
|
130
129
|
export interface LoadingItemsProps {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
130
|
+
children: React.ReactNode;
|
|
131
|
+
fallback: React.ReactNode;
|
|
132
|
+
isLoading?: boolean;
|
|
133
|
+
testId?: string;
|
|
135
134
|
}
|
|
136
135
|
|
|
137
136
|
// @public
|
|
138
137
|
export const NavigationContent: ForwardRefExoticComponent<
|
|
139
|
-
|
|
140
|
-
HTMLAttributes<HTMLElement> &
|
|
141
|
-
RefAttributes<HTMLElement>
|
|
138
|
+
NavigationContentProps & HTMLAttributes<HTMLElement> & RefAttributes<HTMLElement>
|
|
142
139
|
>;
|
|
143
140
|
|
|
144
141
|
// @public (undocumented)
|
|
145
142
|
export interface NavigationContentProps {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
143
|
+
// (undocumented)
|
|
144
|
+
children: React.ReactNode;
|
|
145
|
+
showTopScrollIndicator?: boolean;
|
|
146
|
+
testId?: string;
|
|
150
147
|
}
|
|
151
148
|
|
|
152
149
|
// @public
|
|
153
|
-
export const NavigationFooter: ({
|
|
154
|
-
children,
|
|
155
|
-
}: NavigationFooterProps) => JSX.Element;
|
|
150
|
+
export const NavigationFooter: ({ children }: NavigationFooterProps) => JSX.Element;
|
|
156
151
|
|
|
157
152
|
// @public (undocumented)
|
|
158
153
|
export interface NavigationFooterProps {
|
|
159
|
-
|
|
160
|
-
|
|
154
|
+
// (undocumented)
|
|
155
|
+
children: ReactNode;
|
|
161
156
|
}
|
|
162
157
|
|
|
163
158
|
// @public
|
|
164
|
-
export const NavigationHeader: (
|
|
165
|
-
props: NavigationHeaderProps,
|
|
166
|
-
) => jsx.JSX.Element;
|
|
159
|
+
export const NavigationHeader: (props: NavigationHeaderProps) => jsx.JSX.Element;
|
|
167
160
|
|
|
168
161
|
// @public (undocumented)
|
|
169
162
|
export interface NavigationHeaderProps {
|
|
170
|
-
|
|
171
|
-
|
|
163
|
+
// (undocumented)
|
|
164
|
+
children: JSX.Element | JSX.Element[];
|
|
172
165
|
}
|
|
173
166
|
|
|
174
167
|
// @public
|
|
175
|
-
export const NestableNavigationContent: (
|
|
176
|
-
props: NestableNavigationContentProps,
|
|
177
|
-
) => jsx.JSX.Element;
|
|
168
|
+
export const NestableNavigationContent: (props: NestableNavigationContentProps) => jsx.JSX.Element;
|
|
178
169
|
|
|
179
170
|
// @public (undocumented)
|
|
180
171
|
export interface NestableNavigationContentProps {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
showTopScrollIndicator?: boolean;
|
|
195
|
-
stack?: string[];
|
|
196
|
-
testId?: string;
|
|
172
|
+
children: JSX.Element | JSX.Element[];
|
|
173
|
+
initialStack?: string[];
|
|
174
|
+
onChange?: (stack: string[]) => void;
|
|
175
|
+
onUnknownNest?: (stack: string[]) => void;
|
|
176
|
+
// @deprecated
|
|
177
|
+
overrides?: {
|
|
178
|
+
GoBackItem?: {
|
|
179
|
+
render?: (props: { onClick: () => void; testId?: string }) => React.ReactNode;
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
showTopScrollIndicator?: boolean;
|
|
183
|
+
stack?: string[];
|
|
184
|
+
testId?: string;
|
|
197
185
|
}
|
|
198
186
|
|
|
199
187
|
// @public
|
|
200
|
-
export const NestingItem: <
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
props: NestingItemProps<TCustomComponentProps> &
|
|
204
|
-
Omit<TCustomComponentProps, keyof CustomItemComponentProps>,
|
|
188
|
+
export const NestingItem: <TCustomComponentProps extends CustomItemComponentProps>(
|
|
189
|
+
props: NestingItemProps<TCustomComponentProps> &
|
|
190
|
+
Omit<TCustomComponentProps, keyof CustomItemComponentProps>,
|
|
205
191
|
) => JSX.Element;
|
|
206
192
|
|
|
207
193
|
// @public (undocumented)
|
|
208
194
|
interface NestingItemOverrides extends Overrides {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
testId?: string;
|
|
213
|
-
}) => React_2.ReactNode;
|
|
214
|
-
};
|
|
195
|
+
GoBackItem?: {
|
|
196
|
+
render?: (props: { onClick: () => void; testId?: string }) => React_2.ReactNode;
|
|
197
|
+
};
|
|
215
198
|
}
|
|
216
199
|
|
|
217
200
|
// @public (undocumented)
|
|
218
|
-
export interface NestingItemProps<
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
testId?: string;
|
|
233
|
-
title: React_2.ReactNode;
|
|
201
|
+
export interface NestingItemProps<TCustomComponentProps = CustomItemComponentProps> {
|
|
202
|
+
children: React_2.ReactNode;
|
|
203
|
+
component?: React_2.ComponentType<TCustomComponentProps>;
|
|
204
|
+
cssFn?: CSSFn;
|
|
205
|
+
description?: JSX.Element | string;
|
|
206
|
+
iconAfter?: React_2.ReactNode;
|
|
207
|
+
iconBefore?: React_2.ReactNode;
|
|
208
|
+
id: string;
|
|
209
|
+
isDisabled?: boolean;
|
|
210
|
+
isSelected?: boolean;
|
|
211
|
+
onClick?: (event: React_2.KeyboardEvent | React_2.MouseEvent) => void;
|
|
212
|
+
overrides?: NestingItemOverrides;
|
|
213
|
+
testId?: string;
|
|
214
|
+
title: React_2.ReactNode;
|
|
234
215
|
}
|
|
235
216
|
|
|
236
217
|
// @public (undocumented)
|
|
@@ -238,34 +219,32 @@ type NewFooterProps = Omit<HeaderProps, 'component' | 'cssFn' | 'onClick'>;
|
|
|
238
219
|
|
|
239
220
|
// @public
|
|
240
221
|
export const Section: React_2.ForwardRefExoticComponent<
|
|
241
|
-
|
|
222
|
+
SectionProps & React_2.RefAttributes<HTMLElement>
|
|
242
223
|
>;
|
|
243
224
|
|
|
244
225
|
// @public (undocumented)
|
|
245
226
|
export interface SectionProps {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
227
|
+
children: React_2.ReactNode;
|
|
228
|
+
hasSeparator?: boolean;
|
|
229
|
+
isList?: boolean;
|
|
230
|
+
testId?: string;
|
|
231
|
+
title?: string;
|
|
251
232
|
}
|
|
252
233
|
|
|
253
234
|
// @public
|
|
254
235
|
export const SideNavigation: ForwardRefExoticComponent<
|
|
255
|
-
|
|
236
|
+
SideNavigationProps & RefAttributes<HTMLElement>
|
|
256
237
|
>;
|
|
257
238
|
|
|
258
239
|
// @public (undocumented)
|
|
259
240
|
export interface SideNavigationProps {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
241
|
+
children: JSX.Element | JSX.Element[];
|
|
242
|
+
label: string;
|
|
243
|
+
testId?: string;
|
|
263
244
|
}
|
|
264
245
|
|
|
265
246
|
// @public
|
|
266
|
-
export const SkeletonHeadingItem: (
|
|
267
|
-
props: SkeletonHeadingItemProps,
|
|
268
|
-
) => JSX.Element | null;
|
|
247
|
+
export const SkeletonHeadingItem: (props: SkeletonHeadingItemProps) => JSX.Element | null;
|
|
269
248
|
|
|
270
249
|
export { SkeletonHeadingItemProps };
|
|
271
250
|
|
|
@@ -276,7 +255,7 @@ export { SkeletonItemProps };
|
|
|
276
255
|
|
|
277
256
|
// @public
|
|
278
257
|
export const useShouldNestedElementRender: () => {
|
|
279
|
-
|
|
258
|
+
shouldRender: boolean;
|
|
280
259
|
};
|
|
281
260
|
|
|
282
261
|
// @public (undocumented)
|
|
@@ -296,7 +275,7 @@ export const VAR_SEPARATOR_COLOR = '--ds-menu-seperator-color';
|
|
|
296
275
|
|
|
297
276
|
```json
|
|
298
277
|
{
|
|
299
|
-
|
|
278
|
+
"react": "^16.8.0"
|
|
300
279
|
}
|
|
301
280
|
```
|
|
302
281
|
|