@atlaskit/side-navigation 1.3.0 → 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.
Files changed (59) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/codemods/helpers/generic.tsx +10 -12
  3. package/dist/cjs/components/LoadingItems/index.js +13 -9
  4. package/dist/cjs/components/NavigationFooter/index.js +5 -5
  5. package/dist/cjs/components/NavigationHeader/index.js +8 -7
  6. package/dist/cjs/components/NestableNavigationContent/index.js +25 -15
  7. package/dist/cjs/components/NestingItem/index.js +19 -10
  8. package/dist/cjs/components/SideNavigation/index.js +13 -12
  9. package/dist/cjs/components/utils/hooks.js +48 -0
  10. package/dist/cjs/version.json +1 -1
  11. package/dist/es2019/components/LoadingItems/index.js +14 -10
  12. package/dist/es2019/components/NavigationFooter/index.js +6 -6
  13. package/dist/es2019/components/NavigationHeader/index.js +9 -8
  14. package/dist/es2019/components/NestableNavigationContent/index.js +24 -16
  15. package/dist/es2019/components/NestingItem/index.js +19 -12
  16. package/dist/es2019/components/SideNavigation/index.js +14 -13
  17. package/dist/es2019/components/utils/hooks.js +34 -0
  18. package/dist/es2019/version.json +1 -1
  19. package/dist/esm/components/LoadingItems/index.js +14 -10
  20. package/dist/esm/components/NavigationFooter/index.js +6 -6
  21. package/dist/esm/components/NavigationHeader/index.js +9 -8
  22. package/dist/esm/components/NestableNavigationContent/index.js +25 -16
  23. package/dist/esm/components/NestingItem/index.js +19 -12
  24. package/dist/esm/components/SideNavigation/index.js +14 -13
  25. package/dist/esm/components/utils/hooks.js +34 -0
  26. package/dist/esm/version.json +1 -1
  27. package/dist/types/components/NestableNavigationContent/context.d.ts +2 -1
  28. package/dist/types/components/NestableNavigationContent/index.d.ts +5 -0
  29. package/dist/types/components/utils/hooks.d.ts +5 -0
  30. package/package.json +6 -12
  31. package/report.api.md +92 -375
  32. package/dist/types-ts4.0/common/constants.d.ts +0 -2
  33. package/dist/types-ts4.0/common/styles.d.ts +0 -12
  34. package/dist/types-ts4.0/components/Footer/index.d.ts +0 -11
  35. package/dist/types-ts4.0/components/Header/index.d.ts +0 -50
  36. package/dist/types-ts4.0/components/Item/button-item.d.ts +0 -14
  37. package/dist/types-ts4.0/components/Item/custom-item.d.ts +0 -14
  38. package/dist/types-ts4.0/components/Item/go-back-item.d.ts +0 -14
  39. package/dist/types-ts4.0/components/Item/index.d.ts +0 -10
  40. package/dist/types-ts4.0/components/Item/link-item.d.ts +0 -16
  41. package/dist/types-ts4.0/components/Item/skeleton-item.d.ts +0 -13
  42. package/dist/types-ts4.0/components/LoadingItems/index.d.ts +0 -35
  43. package/dist/types-ts4.0/components/NavigationContent/index.d.ts +0 -25
  44. package/dist/types-ts4.0/components/NavigationContent/styles.d.ts +0 -91
  45. package/dist/types-ts4.0/components/NavigationFooter/index.d.ts +0 -16
  46. package/dist/types-ts4.0/components/NavigationHeader/index.d.ts +0 -16
  47. package/dist/types-ts4.0/components/NestableNavigationContent/context.d.ts +0 -23
  48. package/dist/types-ts4.0/components/NestableNavigationContent/index.d.ts +0 -69
  49. package/dist/types-ts4.0/components/NestableNavigationContent/nesting-motion.d.ts +0 -22
  50. package/dist/types-ts4.0/components/NestingItem/hack-for-ert.d.ts +0 -2
  51. package/dist/types-ts4.0/components/NestingItem/index.d.ts +0 -91
  52. package/dist/types-ts4.0/components/NestingItem/styles.d.ts +0 -28
  53. package/dist/types-ts4.0/components/Section/heading-item.d.ts +0 -11
  54. package/dist/types-ts4.0/components/Section/index.d.ts +0 -6
  55. package/dist/types-ts4.0/components/Section/section.d.ts +0 -34
  56. package/dist/types-ts4.0/components/Section/skeleton-heading-item.d.ts +0 -12
  57. package/dist/types-ts4.0/components/SideNavigation/index.d.ts +0 -32
  58. package/dist/types-ts4.0/components/index.d.ts +0 -22
  59. package/dist/types-ts4.0/index.d.ts +0 -4
package/report.api.md CHANGED
@@ -1,6 +1,10 @@
1
- ## API Report File for "@atlaskit/side-navigation".
1
+ ## API Report File for "@atlaskit/side-navigation"
2
2
 
3
- > Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
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
 
@@ -23,33 +27,24 @@ import { RefAttributes } from 'react';
23
27
  import { SkeletonHeadingItemProps } from '@atlaskit/menu';
24
28
  import { SkeletonItemProps } from '@atlaskit/menu';
25
29
 
26
- /**
27
- * __Button item__
28
- *
29
- * A button item renders an item wrapped in a button tag, used primarily when an
30
- * action does something other than changing routes.
31
- *
32
- * - [Examples](https://atlassian.design/components/side-navigation/examples#button-item)
33
- * - [Code](https://atlassian.design/components/side-navigation/code)
34
- */
35
- export declare const ButtonItem: React_2.ForwardRefExoticComponent<
30
+ // @public
31
+ export const ButtonItem: React_2.ForwardRefExoticComponent<
36
32
  ButtonItemProps & React_2.RefAttributes<HTMLElement>
37
33
  >;
38
34
 
39
35
  export { ButtonItemProps };
40
36
  export { ButtonItemProps as GoBackItemProps };
41
37
 
42
- /**
43
- * Used to support any custom items needed by products alongside the Header and Footer patterns.
44
- * Specific implementation of headers and footers are provided in the examples folder.
45
- */
46
- export declare const CustomItem: CustomItemPropsHack;
38
+ // @public
39
+ export const CustomItem: CustomItemPropsHack;
47
40
 
48
41
  export { CustomItemComponentProps };
49
42
 
50
43
  export { CustomItemProps };
51
44
 
52
- declare interface CustomItemPropsHack {
45
+ // @public (undocumented)
46
+ interface CustomItemPropsHack {
47
+ // (undocumented)
53
48
  <TComponentProps extends {}>(
54
49
  props: CustomItemProps<TComponentProps> & {
55
50
  ref?: any;
@@ -57,269 +52,110 @@ declare interface CustomItemPropsHack {
57
52
  ): JSX.Element | null;
58
53
  }
59
54
 
60
- /**
61
- * __Header__
62
- *
63
- * - [Examples](https://atlassian.design/components/side-navigation/examples#header-and-footer)
64
- * - [Code](https://atlassian.design/components/side-navigation/code)
65
- */
66
- export declare const Footer: (props: HeaderProps) => JSX.Element;
67
-
68
- /**
69
- * __Go back item__
70
- *
71
- * A go back item is used to provide a customized "go back" button in nested
72
- * navigations.
73
- *
74
- * - [Examples](https://atlassian.design/components/side-navigation/examples#go-back-item)
75
- * - [Code](https://atlassian.design/components/side-navigation/code)
76
- */
77
- export declare const GoBackItem: React_2.ForwardRefExoticComponent<
55
+ // @public
56
+ export const Footer: (props: HeaderProps) => JSX.Element;
57
+
58
+ // @public
59
+ export const GoBackItem: React_2.ForwardRefExoticComponent<
78
60
  ButtonItemProps & React_2.RefAttributes<HTMLElement>
79
61
  >;
80
62
 
81
- /**
82
- * __Header__
83
- *
84
- * - [Examples](https://atlassian.design/components/side-navigation/examples#header-and-footer)
85
- * - [Code](https://atlassian.design/components/side-navigation/code)
86
- */
87
- export declare const Header: React_2.ForwardRefExoticComponent<
63
+ // @public
64
+ export const Header: React_2.ForwardRefExoticComponent<
88
65
  HeaderProps & React_2.RefAttributes<HTMLElement>
89
66
  >;
90
67
 
91
- declare interface HeaderProps {
92
- /**
93
- * A function that can be used to override the styles of the component.
94
- * It receives the current styles and state and expects a styles object.
95
- * @deprecated Please avoid using this prop as we intend to remove the prop completely in a future release. See DSP-2682 for more information.
96
- */
68
+ // @public (undocumented)
69
+ interface HeaderProps {
70
+ children?: React_2.ReactNode;
71
+ component?: React_2.ComponentType<CustomItemComponentProps>;
72
+ // @deprecated
97
73
  cssFn?: CSSFn;
98
- /**
99
- * Element to render before the item text.
100
- * Generally should be an [icon](https://atlaskit.atlassian.com/packages/design-system/icon) component.
101
- */
74
+ description?: string | JSX.Element;
102
75
  iconBefore?: React_2.ReactNode;
103
- /**
104
- * Event that is triggered when the element is clicked.
105
- */
106
76
  onClick?: (event: React_2.MouseEvent | React_2.KeyboardEvent) => void;
107
- /**
108
- * Description of the item.
109
- * This will render smaller text below the primary text of the item as well as slightly increasing the height of the item.
110
- */
111
- description?: string | JSX.Element;
112
- /**
113
- * Primary content for the item.
114
- */
115
- children?: React_2.ReactNode;
116
- /**
117
- * A `testId` prop is provided for specified elements,
118
- * which is a unique string that appears as a data attribute `data-testid` in the rendered code,
119
- * serving as a hook for automated tests.
120
- */
121
77
  testId?: string;
122
- /**
123
- * Custom component to render as an item.
124
- * This can be both a functional component or a class component.
125
- * __Will return `null` if no component is defined.__
126
- *
127
- * __NOTE:__ Make sure the reference for this component does not change between renders else undefined behavior may happen.
128
- */
129
- component?: React_2.ComponentType<CustomItemComponentProps>;
130
78
  }
131
79
  export { HeaderProps as FooterProps };
132
80
  export { HeaderProps };
133
81
 
134
- /**
135
- * __Heading item__
136
- *
137
- * Available for advanced use cases, for most situations providing a title to Section should be enough.
138
- *
139
- */
140
- export declare const HeadingItem: (
141
- props: HeadingItemProps,
142
- ) => JSX.Element | null;
82
+ // @public
83
+ export const HeadingItem: (props: HeadingItemProps) => JSX.Element | null;
143
84
 
144
85
  export { HeadingItemProps };
145
86
 
146
- /**
147
- * __Link item__
148
- *
149
- * Renders an item wrapped in an anchor tag, useful when you have an item that
150
- * should change routes using native browser navigation. For SPA transitions use
151
- * a [custom item](https://atlassian.design/components/side-navigation/examples#custom-item)
152
- * with the respective router logic.
153
- *
154
- * - [Examples](https://atlassian.design/components/side-navigation/examples#link-item)
155
- * - [Code](https://atlassian.design/components/side-navigation/code)
156
- */
157
- export declare const LinkItem: React_2.ForwardRefExoticComponent<
87
+ // @public
88
+ export const LinkItem: React_2.ForwardRefExoticComponent<
158
89
  LinkItemProps & React_2.RefAttributes<HTMLElement>
159
90
  >;
160
91
 
161
92
  export { LinkItemProps };
162
93
 
163
- /**
164
- * __Loading items__
165
- *
166
- * Loading items conditionally render based on the useShouldNestedElementRender() hook.
167
- */
168
- export declare const LoadingItems: ({
94
+ // @public
95
+ export const LoadingItems: ({
169
96
  children,
170
97
  isLoading,
171
98
  fallback,
172
99
  testId,
173
100
  }: LoadingItemsProps) => JSX.Element;
174
101
 
175
- export declare interface LoadingItemsProps {
176
- /**
177
- * Child items that will be loaded asynchronously.
178
- */
102
+ // @public (undocumented)
103
+ export interface LoadingItemsProps {
179
104
  children: React.ReactNode;
180
- /**
181
- * Fallback you want to show when loading.
182
- * You'll want to use the supplied [skeleton item](/packages/navigation/side-navigation/docs/skeleton-item)
183
- * or [skeleton heading item](/packages/navigation/side-navigation/docs/skeleton-heading-item) components.
184
- */
185
105
  fallback: React.ReactNode;
186
- /**
187
- * Used to show either the loading fallback or the loaded contents.
188
- * Will cross fade between children and fallback when this is flipped.
189
- */
190
106
  isLoading?: boolean;
191
- /**
192
- * A `testId` prop is provided for specified elements,
193
- * which is a unique string that appears as a data attribute `data-testid` in the rendered code,
194
- * serving as a hook for automated tests.
195
- *
196
- * Will set these elements when defined:
197
- * - The entering container - `{testId}--entering`
198
- * - The exiting container - `{testId}--exiting`
199
- */
200
107
  testId?: string;
201
108
  }
202
109
 
203
- /**
204
- * __Navigation content__
205
- *
206
- * A navigation content is used as the container for navigation items.
207
- *
208
- * - [Examples](https://atlassian.design/components/side-navigation/examples#content)
209
- * - [Code](https://atlassian.design/components/side-navigation/code)
210
- */
211
- export declare const NavigationContent: ForwardRefExoticComponent<
110
+ // @public
111
+ export const NavigationContent: ForwardRefExoticComponent<
212
112
  NavigationContentProps &
213
113
  HTMLAttributes<HTMLElement> &
214
114
  RefAttributes<HTMLElement>
215
115
  >;
216
116
 
217
- export declare interface NavigationContentProps {
117
+ // @public (undocumented)
118
+ export interface NavigationContentProps {
119
+ // (undocumented)
218
120
  children: React.ReactNode;
219
- /**
220
- * Forces the top scroll indicator to be shown all the time.
221
- */
222
121
  showTopScrollIndicator?: boolean;
223
- /**
224
- * A `testId` prop is provided for specified elements,
225
- * which is a unique string that appears as a data attribute `data-testid` in the rendered code,
226
- * serving as a hook for automated tests.
227
- */
228
122
  testId?: string;
229
123
  }
230
124
 
231
- /**
232
- * __Navigation footer__
233
- *
234
- * Allows for customisation of the footer.
235
- *
236
- * - [Examples](https://atlassian.design/components/side-navigation/examples#header-and-footer)
237
- * - [Code](https://atlassian.design/components/side-navigation/code)
238
- */
239
- export declare const NavigationFooter: ({
125
+ // @public
126
+ export const NavigationFooter: ({
240
127
  children,
241
128
  }: NavigationFooterProps) => jsx.JSX.Element;
242
129
 
243
- export declare interface NavigationFooterProps {
130
+ // @public (undocumented)
131
+ export interface NavigationFooterProps {
132
+ // (undocumented)
244
133
  children: ReactNode;
245
134
  }
246
135
 
247
- /**
248
- * __Navigation header__
249
- *
250
- * Allows for customisation of the header.
251
- *
252
- * - [Examples](https://atlassian.design/components/side-navigation/examples#header-and-footer)
253
- * - [Code](https://atlassian.design/components/side-navigation/code)
254
- */
255
- export declare const NavigationHeader: (
136
+ // @public
137
+ export const NavigationHeader: (
256
138
  props: NavigationHeaderProps,
257
139
  ) => jsx.JSX.Element;
258
140
 
259
- export declare interface NavigationHeaderProps {
141
+ // @public (undocumented)
142
+ export interface NavigationHeaderProps {
143
+ // (undocumented)
260
144
  children: JSX.Element | JSX.Element[];
261
145
  }
262
146
 
263
- /**
264
- * __Nestable navigation content__
265
- *
266
- * The container for navigation items with nested views
267
- *
268
- * - [Examples](https://atlassian.design/components/side-navigation/examples#nested-navigation)
269
- * - [Code](https://atlassian.design/components/side-navigation/code)
270
- */
271
- export declare const NestableNavigationContent: (
147
+ // @public
148
+ export const NestableNavigationContent: (
272
149
  props: NestableNavigationContentProps,
273
150
  ) => jsx.JSX.Element;
274
151
 
275
- export declare interface NestableNavigationContentProps {
276
- /**
277
- * The NestableNavigationContent wraps the entire navigation hierarchy of a side-navigation.
278
- * Using this component is only needed if you want to enable nested views with [nesting items](/packages/navigation/side-navigation/docs/nesting-item),
279
- * else you should use [navigation content](/packages/navigation/side-navigation/docs/navigation-content) instead.
280
- */
152
+ // @public (undocumented)
153
+ export interface NestableNavigationContentProps {
281
154
  children: JSX.Element | JSX.Element[];
282
- /**
283
- * A `testId` prop is provided for specified elements,
284
- * which is a unique string that appears as a data attribute `data-testid` in the rendered code,
285
- * serving as a hook for automated tests.
286
- *
287
- * Will set these elements when defined:
288
- * - This wrapper - `{testId}`
289
- * - The back item (displayed when inside a nested view) - `{testId}--go-back-item`
290
- */
291
- testId?: string;
292
- /**
293
- * Array of the initial stack you want to show.
294
- * Useful when wanting to set the initial nested view but not wanting to opt into controlled state.
295
- * Make sure to have all intermediate navigation pages line up.
296
- */
297
155
  initialStack?: string[];
298
- /**
299
- * Enables you to control the stack of navigation views you want to show.
300
- * Do not jump between controlled and uncontrolled else undefined behaviour will occur.
301
- * This means either using `initialStack` OR `stack` but not both.
302
- * Make sure your stack array has a stable reference and does not change between renders.
303
- */
304
- stack?: string[];
305
- /**
306
- * Allows you to react based on transitions between [nesting items](/packages/navigation/side-navigation/docs/nesting-item).
307
- * It will be called everytime a user navigates from one [nesting item](/packages/navigation/side-navigation/docs/nesting-item) to another,
308
- * both up or down the navigation hierarchy.
309
- * This prop should be used with the `stack` prop for controlled behavior.
310
- */
311
156
  onChange?: (stack: string[]) => void;
312
- /**
313
- * Custom overrides for the composed components.
314
- *
315
- * @deprecated Please avoid using this prop as we intend to remove the prop completely in a future release. See DSP-2682 for more information.
316
- */
157
+ // @deprecated
317
158
  overrides?: {
318
- /**
319
- * Use this to override the default back button displayed when navigation is nested.
320
- * You'll want to import the [go back item](/packages/navigation/docs/go-back-item) component and use it here.
321
- * This will be displayed for all children [nesting items](/packages/navigation/side-navigation/docs/nesting-item) unless they define their own.
322
- */
323
159
  GoBackItem?: {
324
160
  render?: (props: {
325
161
  onClick: () => void;
@@ -327,24 +163,20 @@ export declare interface NestableNavigationContentProps {
327
163
  }) => React.ReactNode;
328
164
  };
329
165
  };
166
+ stack?: string[];
167
+ testId?: string;
330
168
  }
331
169
 
332
- /**
333
- * NestingItem will render itself differently depending in what context it is rendered in.
334
- * When not open - it will render itself as an item.
335
- * When open - it will render its children.
336
- */
337
- export declare const NestingItem: <TCustomComponentProps extends CustomItemComponentProps>(
170
+ // @public
171
+ export const NestingItem: <
172
+ TCustomComponentProps extends CustomItemComponentProps,
173
+ >(
338
174
  props: NestingItemProps<TCustomComponentProps> &
339
175
  Omit<TCustomComponentProps, keyof CustomItemComponentProps>,
340
176
  ) => JSX.Element;
341
177
 
342
- declare interface NestingItemOverrides extends Overrides {
343
- /**
344
- * Use this to override the back button displayed when navigation is nested.
345
- * You'll want to import the [go back item](/packages/navigation/side-navigation/docs/go-back-item) component and use it here.
346
- * This will be displayed for all children nesting item components unless they define their own.
347
- */
178
+ // @public (undocumented)
179
+ interface NestingItemOverrides extends Overrides {
348
180
  GoBackItem?: {
349
181
  render?: (props: {
350
182
  onClick: () => void;
@@ -353,187 +185,72 @@ declare interface NestingItemOverrides extends Overrides {
353
185
  };
354
186
  }
355
187
 
356
- export declare interface NestingItemProps<
357
- TCustomComponentProps = CustomItemComponentProps
188
+ // @public (undocumented)
189
+ export interface NestingItemProps<
190
+ TCustomComponentProps = CustomItemComponentProps,
358
191
  > {
359
- /**
360
- * A **unique identifier** for the nesting item.
361
- * Every nesting item component needs a unique id else undefined behavior will occur.
362
- */
363
- id: string;
364
- /**
365
- * Text to display when the nesting item is rendered as a interactable element.
366
- */
367
- title: React_2.ReactNode;
368
- /**
369
- * The view that should be shown when this nesting item is visible.
370
- */
371
192
  children: React_2.ReactNode;
372
- /**
373
- * Used to customize the rendered component when shown as an item.
374
- * You can use this for example to change it to a SPA link.
375
- */
376
193
  component?: React_2.ComponentType<TCustomComponentProps>;
377
- /**
378
- * A `testId` prop is provided for specified elements,
379
- * which is a unique string that appears as a data attribute `data-testid` in the rendered code,
380
- * serving as a hook for automated tests.
381
- *
382
- * Will set these elements when defined:
383
- * - The container - `{testId}--container`
384
- * - The nesting item - `{testId}--item`
385
- * - The go back item - `{testId}--go-back-item` (only used if you pass in a override).
386
- * - The nesting item default right arrow icon - `{testId}--item--right-arrow`
387
- */
388
- testId?: string;
389
- /**
390
- * A function that can be used to override the styles of the component.
391
- * It receives the current styles and state and expects a styles object.
392
- */
393
194
  cssFn?: CSSFn;
394
- /**
395
- * Element to render before the item text.
396
- * Generally should be an [icon](https://atlaskit.atlassian.com/packages/design-system/icon) component.
397
- */
398
- iconBefore?: React_2.ReactNode;
399
- /**
400
- * Element to render after the item text.
401
- * Generally should be an [icon](https://atlaskit.atlassian.com/packages/design-system/icon) component.
402
- */
403
- iconAfter?: React_2.ReactNode;
404
- /**
405
- * Event that is triggered when the element is clicked.
406
- */
407
- onClick?: (event: React_2.MouseEvent | React_2.KeyboardEvent) => void;
408
- /**
409
- * Description of the item.
410
- * This will render smaller text below the primary text of the item as well as slightly increasing the height of the item.
411
- */
412
195
  description?: string | JSX.Element;
413
- /**
414
- * Makes the element appear disabled as well as removing interactivity.
415
- */
196
+ iconAfter?: React_2.ReactNode;
197
+ iconBefore?: React_2.ReactNode;
198
+ id: string;
416
199
  isDisabled?: boolean;
417
- /**
418
- * Makes the element appear selected.
419
- */
420
200
  isSelected?: boolean;
421
- /**
422
- * Custom overrides for the composed components.
423
- */
201
+ onClick?: (event: React_2.MouseEvent | React_2.KeyboardEvent) => void;
424
202
  overrides?: NestingItemOverrides;
203
+ testId?: string;
204
+ title: React_2.ReactNode;
425
205
  }
426
206
 
427
- /**
428
- * __Section__
429
- *
430
- * Used to separate items into sections. Using the title prop makes a section
431
- * implicitly group the items for screen readers with no additional work required.
432
- *
433
- * - [Examples](https://atlassian.design/components/side-navigation/examples#section)
434
- * - [Code](https://atlassian.design/components/side-navigation/code)
435
- */
436
- export declare const Section: React_2.ForwardRefExoticComponent<
207
+ // @public
208
+ export const Section: React_2.ForwardRefExoticComponent<
437
209
  SectionProps & React_2.RefAttributes<HTMLElement>
438
210
  >;
439
211
 
440
- export declare interface SectionProps {
441
- /**
442
- * Children of the section,
443
- * should generally be item or heading components.
444
- */
212
+ // @public (undocumented)
213
+ export interface SectionProps {
445
214
  children: React_2.ReactNode;
446
- /**
447
- * The text passed to heading.
448
- * If a title is not provided no heading will be rendered.
449
- */
450
- title?: string;
451
- /**
452
- * Will render a border at the top of the section.
453
- */
454
215
  hasSeparator?: boolean;
455
- /**
456
- * A `testId` prop is provided for specified elements,
457
- * which is a unique string that appears as a data attribute `data-testid` in the rendered code,
458
- * serving as a hook for automated tests.
459
- */
460
216
  testId?: string;
217
+ title?: string;
461
218
  }
462
219
 
463
- /**
464
- * __Side navigation__
465
- *
466
- * A highly composable side navigation component that supports nested views.
467
- *
468
- * - [Examples](https://atlassian.design/components/side-navigation/examples)
469
- * - [Code](https://atlassian.design/components/side-navigation/code)
470
- * - [Usage](https://atlassian.design/components/side-navigation/usage)
471
- */
472
- export declare const SideNavigation: ForwardRefExoticComponent<
220
+ // @public
221
+ export const SideNavigation: ForwardRefExoticComponent<
473
222
  SideNavigationProps & RefAttributes<HTMLElement>
474
223
  >;
475
224
 
476
- export declare interface SideNavigationProps {
477
- /**
478
- * Describes the specific role of this navigation component for users viewing the page with a screen reader.
479
- * Differentiates from other navigation components on a page.
480
- */
481
- label: string;
482
- /**
483
- * Child navigation elements.
484
- * You'll want to compose children from [navigation header](/packages/navigation/side-navigation/docs/navigation-header),
485
- * [navigation content](/packages/navigation/side-navigation/docs/navigation-content) or [nestable navigation content](/packages/navigation/side-navigation/docs/nestable-navigation-content),
486
- * and [navigation footer](/packages/navigation/side-navigation/docs/navigation-footer).
487
- */
225
+ // @public (undocumented)
226
+ export interface SideNavigationProps {
488
227
  children: JSX.Element[] | JSX.Element;
489
- /**
490
- * A `testId` prop is provided for specified elements,
491
- * which is a unique string that appears as a data attribute `data-testid` in the rendered code,
492
- * serving as a hook for automated tests.
493
- */
228
+ label: string;
494
229
  testId?: string;
495
230
  }
496
231
 
497
- /**
498
- * __Skeleton heading item__
499
- *
500
- * A skeleton heading item for use in managing loading states.
501
- *
502
- * - [Examples](https://atlassian.design/components/side-navigation/examples#loading)
503
- */
504
- export declare const SkeletonHeadingItem: (
232
+ // @public
233
+ export const SkeletonHeadingItem: (
505
234
  props: SkeletonHeadingItemProps,
506
235
  ) => JSX.Element | null;
507
236
 
508
237
  export { SkeletonHeadingItemProps };
509
238
 
510
- /**
511
- * __Skeleton item__
512
- *
513
- * A skeleton item can be used to reduce the perceived laoding time.
514
- *
515
- * - [Examples](https://atlassian.design/components/side-navigation/examples#loading)
516
- * - [Code](https://atlassian.design/components/side-navigation/code)
517
- */
518
- export declare const SkeletonItem: (
519
- props: SkeletonItemProps,
520
- ) => JSX.Element | null;
239
+ // @public
240
+ export const SkeletonItem: (props: SkeletonItemProps) => JSX.Element | null;
521
241
 
522
242
  export { SkeletonItemProps };
523
243
 
524
- /**
525
- * Used by children of the NestableNavigationContent component to see if they should render or not.
526
- * If `shouldRender` returns `true` - return your nodes.
527
- * If it returns `false` - either return `null` or `children` if you have children.
528
- */
529
- export declare const useShouldNestedElementRender: () => {
244
+ // @public
245
+ export const useShouldNestedElementRender: () => {
530
246
  shouldRender: boolean;
531
247
  };
532
248
 
533
- export declare const VAR_SCROLL_INDICATOR_COLOR =
534
- '--ds-menu-scroll-indicator-color';
249
+ // @public (undocumented)
250
+ export const VAR_SCROLL_INDICATOR_COLOR = '--ds-menu-scroll-indicator-color';
535
251
 
536
- export declare const VAR_SEPARATOR_COLOR = '--ds-menu-seperator-color';
252
+ // @public (undocumented)
253
+ export const VAR_SEPARATOR_COLOR = '--ds-menu-seperator-color';
537
254
 
538
- export {};
255
+ // (No @packageDocumentation comment for this package)
539
256
  ```
@@ -1,2 +0,0 @@
1
- export declare const VAR_SEPARATOR_COLOR = "--ds-menu-seperator-color";
2
- export declare const VAR_SCROLL_INDICATOR_COLOR = "--ds-menu-scroll-indicator-color";
@@ -1,12 +0,0 @@
1
- import { CSSFn, StatelessCSSFn } from '@atlaskit/menu';
2
- export declare const ITEM_SIDE_PADDING: number;
3
- /**
4
- * Allows chaining of style functions on top of base style functions
5
- * @param baseStyle the base custom cssFn
6
- * @param newStyle a new cssFn to be applied after the base style
7
- *
8
- * @deprecated Please avoid using this prop as we intend to remove the prop completely in a future release. See DSP-2682 for more information.
9
- */
10
- export declare const overrideStyleFunction: <TState>(baseStyle: CSSFn<TState>, newStyle?: CSSFn<TState> | undefined) => CSSFn<TState>;
11
- export declare const baseSideNavItemStyle: CSSFn;
12
- export declare const sectionHeaderStyle: StatelessCSSFn;
@@ -1,11 +0,0 @@
1
- /// <reference types="react" />
2
- import { HeaderProps } from '../Header';
3
- export type { HeaderProps as FooterProps } from '../Header';
4
- /**
5
- * __Header__
6
- *
7
- * - [Examples](https://atlassian.design/components/side-navigation/examples#header-and-footer)
8
- * - [Code](https://atlassian.design/components/side-navigation/code)
9
- */
10
- declare const Footer: (props: HeaderProps) => JSX.Element;
11
- export default Footer;