@atlaskit/side-navigation 3.0.0 → 3.0.2

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 (35) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/components/Item/link-item.js +4 -2
  3. package/dist/es2019/components/Item/link-item.js +3 -1
  4. package/dist/esm/components/Item/link-item.js +4 -2
  5. package/dist/types-ts4.5/common/constants.d.ts +2 -0
  6. package/dist/types-ts4.5/common/styles.d.ts +11 -0
  7. package/dist/types-ts4.5/components/Footer/index.d.ts +28 -0
  8. package/dist/types-ts4.5/components/Header/index.d.ts +56 -0
  9. package/dist/types-ts4.5/components/Item/button-item.d.ts +14 -0
  10. package/dist/types-ts4.5/components/Item/custom-item.d.ts +14 -0
  11. package/dist/types-ts4.5/components/Item/go-back-item.d.ts +14 -0
  12. package/dist/types-ts4.5/components/Item/index.d.ts +10 -0
  13. package/dist/types-ts4.5/components/Item/link-item.d.ts +16 -0
  14. package/dist/types-ts4.5/components/Item/skeleton-item.d.ts +13 -0
  15. package/dist/types-ts4.5/components/LoadingItems/index.d.ts +35 -0
  16. package/dist/types-ts4.5/components/NavigationContent/index.d.ts +25 -0
  17. package/dist/types-ts4.5/components/NavigationContent/styles.d.ts +91 -0
  18. package/dist/types-ts4.5/components/NavigationFooter/index.d.ts +14 -0
  19. package/dist/types-ts4.5/components/NavigationHeader/index.d.ts +16 -0
  20. package/dist/types-ts4.5/components/NestableNavigationContent/context.d.ts +27 -0
  21. package/dist/types-ts4.5/components/NestableNavigationContent/index.d.ts +79 -0
  22. package/dist/types-ts4.5/components/NestableNavigationContent/nesting-motion.d.ts +22 -0
  23. package/dist/types-ts4.5/components/NestingItem/hack-for-ert.d.ts +2 -0
  24. package/dist/types-ts4.5/components/NestingItem/index.d.ts +91 -0
  25. package/dist/types-ts4.5/components/NestingItem/styles.d.ts +28 -0
  26. package/dist/types-ts4.5/components/Section/heading-item.d.ts +11 -0
  27. package/dist/types-ts4.5/components/Section/index.d.ts +6 -0
  28. package/dist/types-ts4.5/components/Section/section.d.ts +39 -0
  29. package/dist/types-ts4.5/components/Section/skeleton-heading-item.d.ts +12 -0
  30. package/dist/types-ts4.5/components/SideNavigation/index.d.ts +32 -0
  31. package/dist/types-ts4.5/components/index.d.ts +22 -0
  32. package/dist/types-ts4.5/components/utils/hooks.d.ts +5 -0
  33. package/dist/types-ts4.5/index.d.ts +4 -0
  34. package/package.json +5 -5
  35. package/tmp/api-report-tmp.d.ts +230 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/side-navigation
2
2
 
3
+ ## 3.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 3.0.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#42240](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42240) [`e5f784d7889`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e5f784d7889) - Add explicit `href` to link item.
14
+
3
15
  ## 3.0.0
4
16
 
5
17
  ### Major Changes
@@ -12,7 +12,7 @@ var _react = _interopRequireWildcard(require("react"));
12
12
  var _menu = require("@atlaskit/menu");
13
13
  var _styles = require("../../common/styles");
14
14
  var _context = require("../NestableNavigationContent/context");
15
- var _excluded = ["cssFn"];
15
+ var _excluded = ["cssFn", "href"];
16
16
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
17
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
18
18
  /**
@@ -30,6 +30,7 @@ var LinkItem = /*#__PURE__*/(0, _react.forwardRef)(
30
30
  // Type needed on props to extract types with extract react types.
31
31
  function (_ref, ref) {
32
32
  var cssFn = _ref.cssFn,
33
+ href = _ref.href,
33
34
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
34
35
  var _useShouldNestedEleme = (0, _context.useShouldNestedElementRender)(),
35
36
  shouldRender = _useShouldNestedEleme.shouldRender;
@@ -40,7 +41,8 @@ function (_ref, ref) {
40
41
  // eslint-disable-next-line @atlaskit/design-system/no-deprecated-apis, @repo/internal/react/no-unsafe-overrides
41
42
  return /*#__PURE__*/_react.default.createElement(_menu.LinkItem, (0, _extends2.default)({
42
43
  ref: ref,
43
- cssFn: cssOverride
44
+ cssFn: cssOverride,
45
+ href: href
44
46
  }, rest));
45
47
  });
46
48
  var _default = exports.default = LinkItem;
@@ -18,6 +18,7 @@ const LinkItem = /*#__PURE__*/forwardRef(
18
18
  // Type needed on props to extract types with extract react types.
19
19
  ({
20
20
  cssFn,
21
+ href,
21
22
  ...rest
22
23
  }, ref) => {
23
24
  const {
@@ -30,7 +31,8 @@ const LinkItem = /*#__PURE__*/forwardRef(
30
31
  // eslint-disable-next-line @atlaskit/design-system/no-deprecated-apis, @repo/internal/react/no-unsafe-overrides
31
32
  return /*#__PURE__*/React.createElement(Link, _extends({
32
33
  ref: ref,
33
- cssFn: cssOverride
34
+ cssFn: cssOverride,
35
+ href: href
34
36
  }, rest));
35
37
  });
36
38
  export default LinkItem;
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["cssFn"];
3
+ var _excluded = ["cssFn", "href"];
4
4
  import React, { forwardRef } from 'react';
5
5
  import { LinkItem as Link } from '@atlaskit/menu';
6
6
  import { baseSideNavItemStyle, overrideStyleFunction } from '../../common/styles';
@@ -20,6 +20,7 @@ var LinkItem = /*#__PURE__*/forwardRef(
20
20
  // Type needed on props to extract types with extract react types.
21
21
  function (_ref, ref) {
22
22
  var cssFn = _ref.cssFn,
23
+ href = _ref.href,
23
24
  rest = _objectWithoutProperties(_ref, _excluded);
24
25
  var _useShouldNestedEleme = useShouldNestedElementRender(),
25
26
  shouldRender = _useShouldNestedEleme.shouldRender;
@@ -30,7 +31,8 @@ function (_ref, ref) {
30
31
  // eslint-disable-next-line @atlaskit/design-system/no-deprecated-apis, @repo/internal/react/no-unsafe-overrides
31
32
  return /*#__PURE__*/React.createElement(Link, _extends({
32
33
  ref: ref,
33
- cssFn: cssOverride
34
+ cssFn: cssOverride,
35
+ href: href
34
36
  }, rest));
35
37
  });
36
38
  export default LinkItem;
@@ -0,0 +1,2 @@
1
+ export declare const VAR_SEPARATOR_COLOR = "--ds-menu-seperator-color";
2
+ export declare const VAR_SCROLL_INDICATOR_COLOR = "--ds-menu-scroll-indicator-color";
@@ -0,0 +1,11 @@
1
+ import { CSSFn, StatelessCSSFn } from '@atlaskit/menu';
2
+ /**
3
+ * Allows chaining of style functions on top of base style functions
4
+ * @param baseStyle the base custom cssFn
5
+ * @param newStyle a new cssFn to be applied after the base style
6
+ *
7
+ * @deprecated Please avoid using this prop as we intend to remove the prop completely in a future release. See DSP-2682 for more information.
8
+ */
9
+ export declare const overrideStyleFunction: <TState>(baseStyle: CSSFn<TState>, newStyle?: CSSFn<TState> | undefined) => CSSFn<TState>;
10
+ export declare const baseSideNavItemStyle: CSSFn;
11
+ export declare const sectionHeaderSpacingStyles: StatelessCSSFn;
@@ -0,0 +1,28 @@
1
+ /// <reference types="react" />
2
+ import { HeaderProps } from '../Header';
3
+ type NewFooterProps = Omit<HeaderProps, 'cssFn' | 'component' | 'onClick'>;
4
+ type FooterFacadeProps = (HeaderProps & {
5
+ /**
6
+ * @private
7
+ * @deprecated
8
+ */
9
+ useDeprecatedApi?: true;
10
+ }) | (NewFooterProps & {
11
+ /**
12
+ * @private
13
+ * @deprecated
14
+ */
15
+ useDeprecatedApi?: false;
16
+ cssFn?: never;
17
+ component?: never;
18
+ onClick?: never;
19
+ });
20
+ export type FooterProps = HeaderProps | NewFooterProps;
21
+ /**
22
+ * __Footer__
23
+ *
24
+ * - [Examples](https://atlassian.design/components/side-navigation/examples#header-and-footer)
25
+ * - [Code](https://atlassian.design/components/side-navigation/code)
26
+ */
27
+ declare const FooterFacade: ({ useDeprecatedApi, description, iconBefore, testId, children, component, cssFn, onClick, }: FooterFacadeProps) => JSX.Element;
28
+ export default FooterFacade;
@@ -0,0 +1,56 @@
1
+ /// <reference types="react" />
2
+ import { jsx } from '@emotion/react';
3
+ import { CSSFn, CustomItemComponentProps } from '@atlaskit/menu';
4
+ /**
5
+ * __Container__
6
+ *
7
+ * A container for Header and Footer that safely handles props to the child component
8
+ */
9
+ export declare const Container: ({ children, "data-testid": testId, ...props }: CustomItemComponentProps) => jsx.JSX.Element;
10
+ export type HeaderProps = {
11
+ /**
12
+ * A function that can be used to override the styles of the component.
13
+ * It receives the current styles and state and expects a styles object.
14
+ * @deprecated Please avoid using this prop as we intend to remove the prop completely in a future release. See DSP-2682 for more information.
15
+ */
16
+ cssFn?: CSSFn;
17
+ /**
18
+ * Element to render before the item text.
19
+ * Generally should be an [icon](https://atlaskit.atlassian.com/packages/design-system/icon) component.
20
+ */
21
+ iconBefore?: React.ReactNode;
22
+ /**
23
+ * Event that is triggered when the element is clicked.
24
+ */
25
+ onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;
26
+ /**
27
+ * Description of the item.
28
+ * This will render smaller text below the primary text of the item as well as slightly increasing the height of the item.
29
+ */
30
+ description?: string | JSX.Element;
31
+ /**
32
+ * Primary content for the item.
33
+ */
34
+ children?: React.ReactNode;
35
+ /**
36
+ * A `testId` prop is provided for specified elements,
37
+ * which is a unique string that appears as a data attribute `data-testid` in the rendered code,
38
+ * serving as a hook for automated tests.
39
+ */
40
+ testId?: string;
41
+ /**
42
+ * Custom component to render as an item.
43
+ * This can be both a functional component or a class component.
44
+ * __Will return `null` if no component is defined.__
45
+ * __NOTE:__ Make sure the reference for this component does not change between renders else undefined behavior may happen.
46
+ */
47
+ component?: React.ComponentType<CustomItemComponentProps>;
48
+ };
49
+ /**
50
+ * __Header__
51
+ *
52
+ * - [Examples](https://atlassian.design/components/side-navigation/examples#header-and-footer)
53
+ * - [Code](https://atlassian.design/components/side-navigation/code)
54
+ */
55
+ declare const Header: import("react").ForwardRefExoticComponent<HeaderProps & import("react").RefAttributes<HTMLElement>>;
56
+ export default Header;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { ButtonItemProps } from '@atlaskit/menu';
3
+ export type { ButtonItemProps } from '@atlaskit/menu';
4
+ /**
5
+ * __Button item__
6
+ *
7
+ * A button item renders an item wrapped in a button tag, used primarily when an
8
+ * action does something other than changing routes.
9
+ *
10
+ * - [Examples](https://atlassian.design/components/side-navigation/examples#button-item)
11
+ * - [Code](https://atlassian.design/components/side-navigation/code)
12
+ */
13
+ declare const ButtonItem: React.ForwardRefExoticComponent<ButtonItemProps & React.RefAttributes<HTMLElement>>;
14
+ export default ButtonItem;
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { CustomItemComponentProps, CustomItemProps } from '@atlaskit/menu';
3
+ export type { CustomItemComponentProps, CustomItemProps } from '@atlaskit/menu';
4
+ interface CustomItemPropsHack {
5
+ <TComponentProps extends {}>(props: CustomItemProps<TComponentProps> & {
6
+ ref?: any;
7
+ } & Omit<TComponentProps, keyof CustomItemComponentProps>): JSX.Element | null;
8
+ }
9
+ /**
10
+ * Used to support any custom items needed by products alongside the Header and Footer patterns.
11
+ * Specific implementation of headers and footers are provided in the examples folder.
12
+ */
13
+ declare const CustomItem: CustomItemPropsHack;
14
+ export default CustomItem;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import type { ButtonItemProps } from '@atlaskit/menu';
3
+ export type { ButtonItemProps as GoBackItemProps } from '@atlaskit/menu';
4
+ /**
5
+ * __Go back item__
6
+ *
7
+ * A go back item is used to provide a customized "go back" button in nested
8
+ * navigations.
9
+ *
10
+ * - [Examples](https://atlassian.design/components/side-navigation/examples#go-back-item)
11
+ * - [Code](https://atlassian.design/components/side-navigation/code)
12
+ */
13
+ declare const GoBackItem: React.ForwardRefExoticComponent<ButtonItemProps & React.RefAttributes<HTMLElement>>;
14
+ export default GoBackItem;
@@ -0,0 +1,10 @@
1
+ export { default as ButtonItem } from './button-item';
2
+ export type { ButtonItemProps } from './button-item';
3
+ export { default as CustomItem } from './custom-item';
4
+ export type { CustomItemProps, CustomItemComponentProps } from './custom-item';
5
+ export { default as GoBackItem } from './go-back-item';
6
+ export type { GoBackItemProps } from './go-back-item';
7
+ export { default as LinkItem } from './link-item';
8
+ export type { LinkItemProps } from './link-item';
9
+ export { default as SkeletonItem } from './skeleton-item';
10
+ export type { SkeletonItemProps } from './skeleton-item';
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { LinkItemProps } from '@atlaskit/menu';
3
+ export type { LinkItemProps } from '@atlaskit/menu';
4
+ /**
5
+ * __Link item__
6
+ *
7
+ * Renders an item wrapped in an anchor tag, useful when you have an item that
8
+ * should change routes using native browser navigation. For SPA transitions use
9
+ * a [custom item](https://atlassian.design/components/side-navigation/examples#custom-item)
10
+ * with the respective router logic.
11
+ *
12
+ * - [Examples](https://atlassian.design/components/side-navigation/examples#link-item)
13
+ * - [Code](https://atlassian.design/components/side-navigation/code)
14
+ */
15
+ declare const LinkItem: React.ForwardRefExoticComponent<LinkItemProps & React.RefAttributes<HTMLElement>>;
16
+ export default LinkItem;
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import { SkeletonItemProps } from '@atlaskit/menu';
3
+ export type { SkeletonItemProps } from '@atlaskit/menu';
4
+ /**
5
+ * __Skeleton item__
6
+ *
7
+ * A skeleton item can be used to reduce the perceived loading time.
8
+ *
9
+ * - [Examples](https://atlassian.design/components/side-navigation/examples#loading)
10
+ * - [Code](https://atlassian.design/components/side-navigation/code)
11
+ */
12
+ declare const SkeletonItem: (props: SkeletonItemProps) => JSX.Element | null;
13
+ export default SkeletonItem;
@@ -0,0 +1,35 @@
1
+ /// <reference types="react" />
2
+ export interface LoadingItemsProps {
3
+ /**
4
+ * Child items that will be loaded asynchronously.
5
+ */
6
+ children: React.ReactNode;
7
+ /**
8
+ * Fallback you want to show when loading.
9
+ * You'll want to use the supplied [skeleton item](/packages/navigation/side-navigation/docs/skeleton-item)
10
+ * or [skeleton heading item](/packages/navigation/side-navigation/docs/skeleton-heading-item) components.
11
+ */
12
+ fallback: React.ReactNode;
13
+ /**
14
+ * Used to show either the loading fallback or the loaded contents.
15
+ * Will cross fade between children and fallback when this is flipped.
16
+ */
17
+ isLoading?: boolean;
18
+ /**
19
+ * A `testId` prop is provided for specified elements,
20
+ * which is a unique string that appears as a data attribute `data-testid` in the rendered code,
21
+ * serving as a hook for automated tests.
22
+ *
23
+ * Will set these elements when defined:
24
+ * - The entering container - `{testId}--entering`
25
+ * - The exiting container - `{testId}--exiting`
26
+ */
27
+ testId?: string;
28
+ }
29
+ /**
30
+ * __Loading items__
31
+ *
32
+ * Loading items conditionally render based on the useShouldNestedElementRender() hook.
33
+ */
34
+ declare const LoadingItems: ({ children, isLoading, fallback, testId, }: LoadingItemsProps) => JSX.Element;
35
+ export default LoadingItems;
@@ -0,0 +1,25 @@
1
+ /** @jsx jsx */
2
+ import { HTMLAttributes } from 'react';
3
+ export interface NavigationContentProps {
4
+ children: React.ReactNode;
5
+ /**
6
+ * Forces the top scroll indicator to be shown.
7
+ */
8
+ showTopScrollIndicator?: boolean;
9
+ /**
10
+ * A `testId` prop is provided for specified elements,
11
+ * which is a unique string that appears as a data attribute `data-testid` in the rendered code,
12
+ * serving as a hook for automated tests.
13
+ */
14
+ testId?: string;
15
+ }
16
+ /**
17
+ * __Navigation content__
18
+ *
19
+ * A navigation content is used as the container for navigation items.
20
+ *
21
+ * - [Examples](https://atlassian.design/components/side-navigation/examples#content)
22
+ * - [Code](https://atlassian.design/components/side-navigation/code)
23
+ */
24
+ declare const NavigationContent: import("react").ForwardRefExoticComponent<NavigationContentProps & HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLElement>>;
25
+ export default NavigationContent;
@@ -0,0 +1,91 @@
1
+ interface StyleOpts {
2
+ showTopScrollIndicator?: boolean;
3
+ }
4
+ /**
5
+ * This outer container css contains the "real" scroll indicators which are
6
+ * always rendered to the screen.
7
+ * They are "conditionally" shown from the users perspective using the inner container CSS
8
+ * which has other pseudo elements which "mask" the "real" scroll indicators.
9
+ */
10
+ export declare const outerContainerCSS: (opts: StyleOpts & {
11
+ scrollbarWidth: number;
12
+ }) => {
13
+ readonly display: "flex";
14
+ readonly height: "100%";
15
+ readonly overflow: "hidden";
16
+ readonly position: "relative";
17
+ readonly '&::before': {
18
+ readonly content: "''";
19
+ readonly display: "block";
20
+ readonly left: "var(--ds-space-100)";
21
+ readonly right: number;
22
+ readonly height: 2;
23
+ readonly borderRadius: "var(--ds-border-radius-050)";
24
+ readonly backgroundColor: "var(--ds-menu-seperator-color, var(--ds-border))";
25
+ readonly position: "absolute";
26
+ readonly zIndex: 1;
27
+ };
28
+ readonly '&::after': {
29
+ readonly content: "''";
30
+ readonly position: "absolute";
31
+ readonly display: "block";
32
+ readonly borderRadius: "var(--ds-border-radius-050)";
33
+ readonly flexShrink: 0;
34
+ readonly height: 2;
35
+ readonly left: "var(--ds-space-100)";
36
+ readonly right: number;
37
+ readonly bottom: 0;
38
+ readonly zIndex: 1;
39
+ readonly backgroundColor: "var(--ds-menu-seperator-color, var(--ds-border))";
40
+ };
41
+ };
42
+ /**
43
+ * This inner container css contains the "mask" logic for the scroll indicators.
44
+ * Essentially they cover (mask) the "real" scroll indicators when the user is scrolled
45
+ * to the top or bottom of the container.
46
+ */
47
+ export declare const innerContainerCSS: (opts: StyleOpts) => {
48
+ readonly '&::after': {
49
+ readonly borderRadius: "var(--ds-border-radius-050)";
50
+ readonly content: "''";
51
+ readonly display: "block";
52
+ readonly flexShrink: 0;
53
+ readonly height: 2;
54
+ readonly marginTop: "auto";
55
+ readonly position: "relative";
56
+ readonly zIndex: 2;
57
+ readonly backgroundColor: "var(--ds-menu-scroll-indicator-color, var(--ds-surface))";
58
+ };
59
+ readonly '&::before'?: {
60
+ readonly borderRadius: "var(--ds-border-radius-050)";
61
+ readonly content: "''";
62
+ readonly left: 0;
63
+ readonly right: 0;
64
+ readonly height: 2;
65
+ readonly backgroundColor: "var(--ds-menu-scroll-indicator-color, var(--ds-surface))";
66
+ readonly position: "absolute";
67
+ readonly display: "block";
68
+ readonly zIndex: 2;
69
+ } | undefined;
70
+ readonly display: "flex";
71
+ readonly overflow: "auto";
72
+ readonly width: "100%";
73
+ readonly position: "relative";
74
+ readonly boxSizing: "border-box";
75
+ readonly flexDirection: "column";
76
+ };
77
+ export declare const containerCSS: (opts: StyleOpts) => {
78
+ readonly marginTop: 0 | 2;
79
+ readonly marginLeft: "var(--ds-space-100)";
80
+ readonly marginRight: "var(--ds-space-100)";
81
+ readonly position: "relative";
82
+ readonly '& [data-ds--menu--heading-item]': {
83
+ readonly marginBottom: "var(--ds-space-075)";
84
+ readonly marginTop: "var(--ds-space-200)";
85
+ };
86
+ readonly '& [data-ds--menu--skeleton-heading-item]': {
87
+ readonly marginTop: number;
88
+ readonly marginBottom: number;
89
+ };
90
+ };
91
+ export {};
@@ -0,0 +1,14 @@
1
+ import { ReactNode } from 'react';
2
+ export interface NavigationFooterProps {
3
+ children: ReactNode;
4
+ }
5
+ /**
6
+ * __Navigation footer__
7
+ *
8
+ * Allows for customisation of the footer.
9
+ *
10
+ * - [Examples](https://atlassian.design/components/side-navigation/examples#header-and-footer)
11
+ * - [Code](https://atlassian.design/components/side-navigation/code)
12
+ */
13
+ declare const NavigationFooter: ({ children }: NavigationFooterProps) => JSX.Element;
14
+ export default NavigationFooter;
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ /** @jsx jsx */
3
+ import { jsx } from '@emotion/react';
4
+ export interface NavigationHeaderProps {
5
+ children: JSX.Element | JSX.Element[];
6
+ }
7
+ /**
8
+ * __Navigation header__
9
+ *
10
+ * Allows for customisation of the header.
11
+ *
12
+ * - [Examples](https://atlassian.design/components/side-navigation/examples#header-and-footer)
13
+ * - [Code](https://atlassian.design/components/side-navigation/code)
14
+ */
15
+ declare const NavigationHeader: (props: NavigationHeaderProps) => jsx.JSX.Element;
16
+ export default NavigationHeader;
@@ -0,0 +1,27 @@
1
+ import { MutableRefObject } from 'react';
2
+ /**
3
+ * @internal
4
+ */
5
+ export interface NestedContextValue {
6
+ currentStackId: string;
7
+ onNest: (id: string) => void;
8
+ onUnNest: () => void;
9
+ stack: string[];
10
+ parentId: string;
11
+ backButton?: React.ReactNode;
12
+ childIds: MutableRefObject<Set<string>>;
13
+ forceShowTopScrollIndicator: boolean | undefined;
14
+ }
15
+ /**
16
+ * @internal
17
+ */
18
+ export declare const NestedContext: import("react").Context<NestedContextValue | undefined>;
19
+ export declare const useNestedContext: () => NestedContextValue;
20
+ /**
21
+ * Used by children of the NestableNavigationContent component to see if they should render or not.
22
+ * If `shouldRender` returns `true` - return your nodes.
23
+ * If it returns `false` - either return `null` or `children` if you have children.
24
+ */
25
+ export declare const useShouldNestedElementRender: () => {
26
+ shouldRender: boolean;
27
+ };
@@ -0,0 +1,79 @@
1
+ /// <reference types="react" />
2
+ import { jsx } from '@emotion/react';
3
+ export declare const ROOT_ID = "ATLASKIT_NESTED_ROOT";
4
+ export interface NestableNavigationContentProps {
5
+ /**
6
+ * The NestableNavigationContent wraps the entire navigation hierarchy of a side-navigation.
7
+ * Using this component is only needed if you want to enable nested views with [nesting items](/packages/navigation/side-navigation/docs/nesting-item),
8
+ * else you should use [navigation content](/packages/navigation/side-navigation/docs/navigation-content) instead.
9
+ */
10
+ children: JSX.Element | JSX.Element[];
11
+ /**
12
+ * A `testId` prop is provided for specified elements,
13
+ * which is a unique string that appears as a data attribute `data-testid` in the rendered code,
14
+ * serving as a hook for automated tests.
15
+ *
16
+ * Will set these elements when defined:
17
+ * - This wrapper - `{testId}`
18
+ * - The back item (displayed when inside a nested view) - `{testId}--go-back-item`
19
+ */
20
+ testId?: string;
21
+ /**
22
+ * Forces the top scroll indicator to be shown. This prop should be used when needing to
23
+ * distinctly separate the side navigation header from the side navigation content.
24
+ */
25
+ showTopScrollIndicator?: boolean;
26
+ /**
27
+ * Array of the initial stack you want to show.
28
+ * Useful when wanting to set the initial nested view but not wanting to opt into controlled state.
29
+ * Make sure to have all intermediate navigation pages line up.
30
+ */
31
+ initialStack?: string[];
32
+ /**
33
+ * Enables you to control the stack of navigation views you want to show.
34
+ * Do not jump between controlled and uncontrolled else undefined behaviour will occur.
35
+ * This means either using `initialStack` OR `stack` but not both.
36
+ * Make sure your stack array has a stable reference and does not change between renders.
37
+ */
38
+ stack?: string[];
39
+ /**
40
+ * Allows you to react based on transitions between [nesting items](/packages/navigation/side-navigation/docs/nesting-item).
41
+ * It will be called everytime a user navigates from one [nesting item](/packages/navigation/side-navigation/docs/nesting-item) to another,
42
+ * both up or down the navigation hierarchy.
43
+ * This prop should be used with the `stack` prop for controlled behavior.
44
+ */
45
+ onChange?: (stack: string[]) => void;
46
+ /**
47
+ * Called when a nesting id that does not exist among `<NestingItem>`s is pushed to the stack. Use this callback to be notified when there is an undefined nesting state.
48
+ * Provides you with the stack which led to the undefined state, with the top of the stack (last item in array) being the invalid item.
49
+ */
50
+ onUnknownNest?: (stack: string[]) => void;
51
+ /**
52
+ * Custom overrides for the composed components.
53
+ *
54
+ * @deprecated Please avoid using this prop as we intend to remove the prop completely in a future release. See DSP-2682 for more information.
55
+ */
56
+ overrides?: {
57
+ /**
58
+ * Use this to override the default back button displayed when navigation is nested.
59
+ * You'll want to import the [go back item](/packages/navigation/docs/go-back-item) component and use it here.
60
+ * This will be displayed for all children [nesting items](/packages/navigation/side-navigation/docs/nesting-item) unless they define their own.
61
+ */
62
+ GoBackItem?: {
63
+ render?: (props: {
64
+ onClick: () => void;
65
+ testId?: string;
66
+ }) => React.ReactNode;
67
+ };
68
+ };
69
+ }
70
+ /**
71
+ * __Nestable navigation content__
72
+ *
73
+ * The container for navigation items with nested views
74
+ *
75
+ * - [Examples](https://atlassian.design/components/side-navigation/examples#nested-navigation)
76
+ * - [Code](https://atlassian.design/components/side-navigation/code)
77
+ */
78
+ declare const NestableNavigationContent: (props: NestableNavigationContentProps) => jsx.JSX.Element;
79
+ export default NestableNavigationContent;
@@ -0,0 +1,22 @@
1
+ /** @jsx jsx */
2
+ import { Ref } from 'react';
3
+ import { jsx } from '@emotion/react';
4
+ import { Direction } from '@atlaskit/motion';
5
+ interface ChildrenAsFunctionProps {
6
+ 'data-enter-from': string;
7
+ 'data-exit-to': string;
8
+ 'data-testid'?: string;
9
+ className?: string;
10
+ ref: Ref<any>;
11
+ }
12
+ interface NestingMotionProps {
13
+ enterFrom: Direction;
14
+ exitTo: Direction;
15
+ children: (props: ChildrenAsFunctionProps) => React.ReactNode;
16
+ testId?: string;
17
+ }
18
+ /**
19
+ * @internal
20
+ */
21
+ export declare const NestingMotion: (props: NestingMotionProps) => jsx.JSX.Element;
22
+ export {};
@@ -0,0 +1,2 @@
1
+ import { NestingItemProps } from './index';
2
+ export default function (_: NestingItemProps): void;
@@ -0,0 +1,91 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ import { CSSFn, CustomItemComponentProps, Overrides } from '@atlaskit/menu';
4
+ interface NestingItemOverrides extends Overrides {
5
+ /**
6
+ * Use this to override the back button displayed when navigation is nested.
7
+ * You'll want to import the [go back item](/packages/navigation/side-navigation/docs/go-back-item) component and use it here.
8
+ * This will be displayed for all children nesting item components unless they define their own.
9
+ */
10
+ GoBackItem?: {
11
+ render?: (props: {
12
+ onClick: () => void;
13
+ testId?: string;
14
+ }) => React.ReactNode;
15
+ };
16
+ }
17
+ export interface NestingItemProps<TCustomComponentProps = CustomItemComponentProps> {
18
+ /**
19
+ * A **unique identifier** for the nesting item.
20
+ * Every nesting item component needs a unique id else undefined behavior will occur.
21
+ */
22
+ id: string;
23
+ /**
24
+ * Text to display when the nesting item is rendered as a interactable element.
25
+ */
26
+ title: React.ReactNode;
27
+ /**
28
+ * The view that should be shown when this nesting item is visible.
29
+ */
30
+ children: React.ReactNode;
31
+ /**
32
+ * Used to customize the rendered component when shown as an item.
33
+ * You can use this for example to change it to a SPA link.
34
+ */
35
+ component?: React.ComponentType<TCustomComponentProps>;
36
+ /**
37
+ * A `testId` prop is provided for specified elements,
38
+ * which is a unique string that appears as a data attribute `data-testid` in the rendered code,
39
+ * serving as a hook for automated tests.
40
+ *
41
+ * Will set these elements when defined:
42
+ * - The container - `{testId}--container`
43
+ * - The nesting item - `{testId}--item`
44
+ * - The go back item - `{testId}--go-back-item` (only used if you pass in a override).
45
+ * - The nesting item default right arrow icon - `{testId}--item--right-arrow`
46
+ */
47
+ testId?: string;
48
+ /**
49
+ * A function that can be used to override the styles of the component.
50
+ * It receives the current styles and state and expects a styles object.
51
+ */
52
+ cssFn?: CSSFn;
53
+ /**
54
+ * Element to render before the item text.
55
+ * Generally should be an [icon](https://atlaskit.atlassian.com/packages/design-system/icon) component.
56
+ */
57
+ iconBefore?: React.ReactNode;
58
+ /**
59
+ * Element to render after the item text.
60
+ * Generally should be an [icon](https://atlaskit.atlassian.com/packages/design-system/icon) component.
61
+ */
62
+ iconAfter?: React.ReactNode;
63
+ /**
64
+ * Event that is triggered when the element is clicked.
65
+ */
66
+ onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;
67
+ /**
68
+ * Description of the item.
69
+ * This will render smaller text below the primary text of the item as well as slightly increasing the height of the item.
70
+ */
71
+ description?: string | JSX.Element;
72
+ /**
73
+ * Makes the element appear disabled as well as removing interactivity.
74
+ */
75
+ isDisabled?: boolean;
76
+ /**
77
+ * Makes the element appear selected.
78
+ */
79
+ isSelected?: boolean;
80
+ /**
81
+ * Custom overrides for the composed components.
82
+ */
83
+ overrides?: NestingItemOverrides;
84
+ }
85
+ /**
86
+ * NestingItem will render itself differently depending in what context it is rendered in.
87
+ * When not open - it will render itself as an item.
88
+ * When open - it will render its children.
89
+ */
90
+ declare const NestingItem: <TCustomComponentProps extends CustomItemComponentProps>(props: NestingItemProps<TCustomComponentProps> & Omit<TCustomComponentProps, keyof CustomItemComponentProps>) => JSX.Element;
91
+ export default NestingItem;
@@ -0,0 +1,28 @@
1
+ import { CSSFn } from '@atlaskit/menu';
2
+ export declare const enabledCSS: {
3
+ "&:hover [data-custom-icon]": {
4
+ display: string;
5
+ };
6
+ "&:active [data-custom-icon]": {
7
+ display: string;
8
+ };
9
+ "&:focus [data-custom-icon]": {
10
+ display: string;
11
+ };
12
+ "& [data-custom-icon]": {
13
+ display: string;
14
+ };
15
+ "&:hover [data-right-arrow]": {
16
+ display: string;
17
+ };
18
+ "&:active [data-right-arrow]": {
19
+ display: string;
20
+ };
21
+ "&:focus [data-right-arrow]": {
22
+ display: string;
23
+ };
24
+ "& [data-right-arrow]": {
25
+ display: string;
26
+ };
27
+ };
28
+ export declare const nestingItemStyle: CSSFn;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { HeadingItemProps } from '@atlaskit/menu';
3
+ export type { HeadingItemProps } from '@atlaskit/menu';
4
+ /**
5
+ * __Heading item__
6
+ *
7
+ * Available for advanced use cases, for most situations providing a title to Section should be enough.
8
+ *
9
+ */
10
+ declare const HeadingItem: (props: HeadingItemProps) => JSX.Element | null;
11
+ export default HeadingItem;
@@ -0,0 +1,6 @@
1
+ export { default as HeadingItem } from './heading-item';
2
+ export type { HeadingItemProps } from './heading-item';
3
+ export { default as Section } from './section';
4
+ export type { SectionProps } from './section';
5
+ export { default as SkeletonHeadingItem } from './skeleton-heading-item';
6
+ export type { SkeletonHeadingItemProps } from './skeleton-heading-item';
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ export interface SectionProps {
3
+ /**
4
+ * Children of the section,
5
+ * should generally be item or heading components.
6
+ */
7
+ children: React.ReactNode;
8
+ /**
9
+ * The text passed to heading.
10
+ * If a title is not provided no heading will be rendered.
11
+ */
12
+ title?: string;
13
+ /**
14
+ * Will render a border at the top of the section.
15
+ */
16
+ hasSeparator?: boolean;
17
+ /**
18
+ * A `testId` prop is provided for specified elements,
19
+ * which is a unique string that appears as a data attribute `data-testid` in the rendered code,
20
+ * serving as a hook for automated tests.
21
+ */
22
+ testId?: string;
23
+ /**
24
+ * Adds `<ul>` and `<li>` tags around the items for better semantic markup in a list of items.
25
+ *
26
+ */
27
+ isList?: boolean;
28
+ }
29
+ /**
30
+ * __Section__
31
+ *
32
+ * Used to separate items into sections. Using the title prop makes a section
33
+ * implicitly group the items for screen readers with no additional work required.
34
+ *
35
+ * - [Examples](https://atlassian.design/components/side-navigation/examples#section)
36
+ * - [Code](https://atlassian.design/components/side-navigation/code)
37
+ */
38
+ declare const Section: React.ForwardRefExoticComponent<SectionProps & React.RefAttributes<HTMLElement>>;
39
+ export default Section;
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { SkeletonHeadingItemProps } from '@atlaskit/menu';
3
+ export type { SkeletonHeadingItemProps } from '@atlaskit/menu';
4
+ /**
5
+ * __Skeleton heading item__
6
+ *
7
+ * A skeleton heading item for use in managing loading states.
8
+ *
9
+ * - [Examples](https://atlassian.design/components/side-navigation/examples#loading)
10
+ */
11
+ declare const SkeletonHeadingItem: (props: SkeletonHeadingItemProps) => JSX.Element | null;
12
+ export default SkeletonHeadingItem;
@@ -0,0 +1,32 @@
1
+ /// <reference types="react" />
2
+ export interface SideNavigationProps {
3
+ /**
4
+ * Describes the specific role of this navigation component for users viewing the page with a screen reader.
5
+ * Differentiates from other navigation components on a page.
6
+ */
7
+ label: string;
8
+ /**
9
+ * Child navigation elements.
10
+ * You'll want to compose children from [navigation header](/packages/navigation/side-navigation/docs/navigation-header),
11
+ * [navigation content](/packages/navigation/side-navigation/docs/navigation-content) or [nestable navigation content](/packages/navigation/side-navigation/docs/nestable-navigation-content),
12
+ * and [navigation footer](/packages/navigation/side-navigation/docs/navigation-footer).
13
+ */
14
+ children: JSX.Element[] | JSX.Element;
15
+ /**
16
+ * A `testId` prop is provided for specified elements,
17
+ * which is a unique string that appears as a data attribute `data-testid` in the rendered code,
18
+ * serving as a hook for automated tests.
19
+ */
20
+ testId?: string;
21
+ }
22
+ /**
23
+ * __Side navigation__
24
+ *
25
+ * A highly composable side navigation component that supports nested views.
26
+ *
27
+ * - [Examples](https://atlassian.design/components/side-navigation/examples)
28
+ * - [Code](https://atlassian.design/components/side-navigation/code)
29
+ * - [Usage](https://atlassian.design/components/side-navigation/usage)
30
+ */
31
+ declare const SideNavigation: import("react").ForwardRefExoticComponent<SideNavigationProps & import("react").RefAttributes<HTMLElement>>;
32
+ export default SideNavigation;
@@ -0,0 +1,22 @@
1
+ export { default as SideNavigation } from './SideNavigation';
2
+ export type { SideNavigationProps } from './SideNavigation';
3
+ export { Section, HeadingItem, SkeletonHeadingItem } from './Section';
4
+ export type { HeadingItemProps, SectionProps, SkeletonHeadingItemProps, } from './Section';
5
+ export { default as NestingItem } from './NestingItem';
6
+ export type { NestingItemProps } from './NestingItem';
7
+ export { default as NavigationContent } from './NavigationContent';
8
+ export type { NavigationContentProps } from './NavigationContent';
9
+ export { ButtonItem, GoBackItem, LinkItem, CustomItem, SkeletonItem, } from './Item';
10
+ export type { CustomItemComponentProps, CustomItemProps, ButtonItemProps, GoBackItemProps, LinkItemProps, SkeletonItemProps, } from './Item';
11
+ export { default as Footer } from './Footer';
12
+ export type { FooterProps } from './Footer';
13
+ export { default as Header } from './Header';
14
+ export type { HeaderProps } from './Header';
15
+ export { default as NavigationHeader } from './NavigationHeader';
16
+ export type { NavigationHeaderProps } from './NavigationHeader';
17
+ export { default as NavigationFooter } from './NavigationFooter';
18
+ export type { NavigationFooterProps } from './NavigationFooter';
19
+ export { default as LoadingItems } from './LoadingItems';
20
+ export type { LoadingItemsProps } from './LoadingItems';
21
+ export { default as NestableNavigationContent } from './NestableNavigationContent';
22
+ export type { NestableNavigationContentProps } from './NestableNavigationContent';
@@ -0,0 +1,5 @@
1
+ import { MutableRefObject } from 'react';
2
+ export declare const useChildIds: (currentStackId: string, committedStack: string[], onUnknownNest?: ((stack: string[]) => void) | undefined) => {
3
+ childIdsRef: MutableRefObject<Set<string>>;
4
+ };
5
+ export declare const useChildIdsEffect: (childIds: MutableRefObject<Set<string>>, id: string) => void;
@@ -0,0 +1,4 @@
1
+ export { SideNavigation, Header, NavigationHeader, NavigationContent, Section, HeadingItem, SkeletonHeadingItem, NestableNavigationContent, NestingItem, ButtonItem, LinkItem, GoBackItem, CustomItem, SkeletonItem, Footer, NavigationFooter, LoadingItems, } from './components';
2
+ export type { CustomItemComponentProps, CustomItemProps, LoadingItemsProps, ButtonItemProps, FooterProps, GoBackItemProps, HeaderProps, HeadingItemProps, LinkItemProps, NavigationContentProps, NavigationFooterProps, NavigationHeaderProps, NestableNavigationContentProps, NestingItemProps, SectionProps, SideNavigationProps, SkeletonHeadingItemProps, SkeletonItemProps, } from './components';
3
+ export { useShouldNestedElementRender } from './components/NestableNavigationContent/context';
4
+ export { VAR_SCROLL_INDICATOR_COLOR, VAR_SEPARATOR_COLOR, } from './common/constants';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/side-navigation",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
4
4
  "description": "A highly composable side navigation component that supports nested views.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -26,12 +26,12 @@
26
26
  "dependencies": {
27
27
  "@atlaskit/ds-explorations": "^3.0.0",
28
28
  "@atlaskit/ds-lib": "^2.2.0",
29
- "@atlaskit/icon": "^21.12.0",
30
- "@atlaskit/menu": "^2.0.0",
29
+ "@atlaskit/icon": "^22.0.0",
30
+ "@atlaskit/menu": "^2.1.0",
31
31
  "@atlaskit/motion": "^1.5.0",
32
- "@atlaskit/primitives": "^1.6.0",
32
+ "@atlaskit/primitives": "^1.10.0",
33
33
  "@atlaskit/theme": "^12.6.0",
34
- "@atlaskit/tokens": "^1.25.0",
34
+ "@atlaskit/tokens": "^1.28.0",
35
35
  "@babel/runtime": "^7.0.0",
36
36
  "@emotion/react": "^11.7.1"
37
37
  },
@@ -0,0 +1,230 @@
1
+ ## API Report File for "@atlaskit/side-navigation"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ /// <reference types="react" />
8
+
9
+ import { ButtonItemProps } from '@atlaskit/menu';
10
+ import { CSSFn } from '@atlaskit/menu';
11
+ import { CustomItemComponentProps } from '@atlaskit/menu';
12
+ import { CustomItemProps } from '@atlaskit/menu';
13
+ import { ForwardRefExoticComponent } from 'react';
14
+ import { HeadingItemProps } from '@atlaskit/menu';
15
+ import { HTMLAttributes } from 'react';
16
+ import { jsx } from '@emotion/react';
17
+ import { LinkItemProps } from '@atlaskit/menu';
18
+ import { Overrides } from '@atlaskit/menu';
19
+ import { default as React_2 } from 'react';
20
+ import { ReactNode } from 'react';
21
+ import { RefAttributes } from 'react';
22
+ import { SkeletonHeadingItemProps } from '@atlaskit/menu';
23
+ import { SkeletonItemProps } from '@atlaskit/menu';
24
+
25
+ // @public
26
+ export const ButtonItem: React_2.ForwardRefExoticComponent<ButtonItemProps & React_2.RefAttributes<HTMLElement>>;
27
+
28
+ export { ButtonItemProps }
29
+ export { ButtonItemProps as GoBackItemProps }
30
+
31
+ // @public
32
+ export const CustomItem: CustomItemPropsHack;
33
+
34
+ export { CustomItemComponentProps }
35
+
36
+ export { CustomItemProps }
37
+
38
+ // @public (undocumented)
39
+ interface CustomItemPropsHack {
40
+ // (undocumented)
41
+ <TComponentProps extends {}>(props: CustomItemProps<TComponentProps> & {
42
+ ref?: any;
43
+ } & Omit<TComponentProps, keyof CustomItemComponentProps>): JSX.Element | null;
44
+ }
45
+
46
+ // @public
47
+ export const Footer: ({ useDeprecatedApi, description, iconBefore, testId, children, component, cssFn, onClick, }: FooterFacadeProps) => JSX.Element;
48
+
49
+ // @public (undocumented)
50
+ type FooterFacadeProps = (HeaderProps & {
51
+ useDeprecatedApi?: true;
52
+ }) | (NewFooterProps & {
53
+ useDeprecatedApi?: false;
54
+ cssFn?: never;
55
+ component?: never;
56
+ onClick?: never;
57
+ });
58
+
59
+ // @public (undocumented)
60
+ export type FooterProps = HeaderProps | NewFooterProps;
61
+
62
+ // @public
63
+ export const GoBackItem: React_2.ForwardRefExoticComponent<ButtonItemProps & React_2.RefAttributes<HTMLElement>>;
64
+
65
+ // @public
66
+ export const Header: ForwardRefExoticComponent<HeaderProps & RefAttributes<HTMLElement>>;
67
+
68
+ // @public (undocumented)
69
+ export type HeaderProps = {
70
+ cssFn?: CSSFn;
71
+ iconBefore?: React.ReactNode;
72
+ onClick?: (event: React.KeyboardEvent | React.MouseEvent) => void;
73
+ description?: JSX.Element | string;
74
+ children?: React.ReactNode;
75
+ testId?: string;
76
+ component?: React.ComponentType<CustomItemComponentProps>;
77
+ };
78
+
79
+ // @public
80
+ export const HeadingItem: (props: HeadingItemProps) => JSX.Element | null;
81
+
82
+ export { HeadingItemProps }
83
+
84
+ // @public
85
+ export const LinkItem: React_2.ForwardRefExoticComponent<LinkItemProps & React_2.RefAttributes<HTMLElement>>;
86
+
87
+ export { LinkItemProps }
88
+
89
+ // @public
90
+ export const LoadingItems: ({ children, isLoading, fallback, testId, }: LoadingItemsProps) => JSX.Element;
91
+
92
+ // @public (undocumented)
93
+ export interface LoadingItemsProps {
94
+ children: React.ReactNode;
95
+ fallback: React.ReactNode;
96
+ isLoading?: boolean;
97
+ testId?: string;
98
+ }
99
+
100
+ // @public
101
+ export const NavigationContent: ForwardRefExoticComponent<NavigationContentProps & HTMLAttributes<HTMLElement> & RefAttributes<HTMLElement>>;
102
+
103
+ // @public (undocumented)
104
+ export interface NavigationContentProps {
105
+ // (undocumented)
106
+ children: React.ReactNode;
107
+ showTopScrollIndicator?: boolean;
108
+ testId?: string;
109
+ }
110
+
111
+ // @public
112
+ export const NavigationFooter: ({ children }: NavigationFooterProps) => JSX.Element;
113
+
114
+ // @public (undocumented)
115
+ export interface NavigationFooterProps {
116
+ // (undocumented)
117
+ children: ReactNode;
118
+ }
119
+
120
+ // @public
121
+ export const NavigationHeader: (props: NavigationHeaderProps) => jsx.JSX.Element;
122
+
123
+ // @public (undocumented)
124
+ export interface NavigationHeaderProps {
125
+ // (undocumented)
126
+ children: JSX.Element | JSX.Element[];
127
+ }
128
+
129
+ // @public
130
+ export const NestableNavigationContent: (props: NestableNavigationContentProps) => jsx.JSX.Element;
131
+
132
+ // @public (undocumented)
133
+ export interface NestableNavigationContentProps {
134
+ children: JSX.Element | JSX.Element[];
135
+ initialStack?: string[];
136
+ onChange?: (stack: string[]) => void;
137
+ onUnknownNest?: (stack: string[]) => void;
138
+ // @deprecated
139
+ overrides?: {
140
+ GoBackItem?: {
141
+ render?: (props: {
142
+ onClick: () => void;
143
+ testId?: string;
144
+ }) => React.ReactNode;
145
+ };
146
+ };
147
+ showTopScrollIndicator?: boolean;
148
+ stack?: string[];
149
+ testId?: string;
150
+ }
151
+
152
+ // @public
153
+ export const NestingItem: <TCustomComponentProps extends CustomItemComponentProps>(props: NestingItemProps<TCustomComponentProps> & Omit<TCustomComponentProps, keyof CustomItemComponentProps>) => JSX.Element;
154
+
155
+ // @public (undocumented)
156
+ interface NestingItemOverrides extends Overrides {
157
+ GoBackItem?: {
158
+ render?: (props: {
159
+ onClick: () => void;
160
+ testId?: string;
161
+ }) => React_2.ReactNode;
162
+ };
163
+ }
164
+
165
+ // @public (undocumented)
166
+ export interface NestingItemProps<TCustomComponentProps = CustomItemComponentProps> {
167
+ children: React_2.ReactNode;
168
+ component?: React_2.ComponentType<TCustomComponentProps>;
169
+ cssFn?: CSSFn;
170
+ description?: JSX.Element | string;
171
+ iconAfter?: React_2.ReactNode;
172
+ iconBefore?: React_2.ReactNode;
173
+ id: string;
174
+ isDisabled?: boolean;
175
+ isSelected?: boolean;
176
+ onClick?: (event: React_2.KeyboardEvent | React_2.MouseEvent) => void;
177
+ overrides?: NestingItemOverrides;
178
+ testId?: string;
179
+ title: React_2.ReactNode;
180
+ }
181
+
182
+ // @public (undocumented)
183
+ type NewFooterProps = Omit<HeaderProps, 'component' | 'cssFn' | 'onClick'>;
184
+
185
+ // @public
186
+ export const Section: React_2.ForwardRefExoticComponent<SectionProps & React_2.RefAttributes<HTMLElement>>;
187
+
188
+ // @public (undocumented)
189
+ export interface SectionProps {
190
+ children: React_2.ReactNode;
191
+ hasSeparator?: boolean;
192
+ isList?: boolean;
193
+ testId?: string;
194
+ title?: string;
195
+ }
196
+
197
+ // @public
198
+ export const SideNavigation: ForwardRefExoticComponent<SideNavigationProps & RefAttributes<HTMLElement>>;
199
+
200
+ // @public (undocumented)
201
+ export interface SideNavigationProps {
202
+ children: JSX.Element | JSX.Element[];
203
+ label: string;
204
+ testId?: string;
205
+ }
206
+
207
+ // @public
208
+ export const SkeletonHeadingItem: (props: SkeletonHeadingItemProps) => JSX.Element | null;
209
+
210
+ export { SkeletonHeadingItemProps }
211
+
212
+ // @public
213
+ export const SkeletonItem: (props: SkeletonItemProps) => JSX.Element | null;
214
+
215
+ export { SkeletonItemProps }
216
+
217
+ // @public
218
+ export const useShouldNestedElementRender: () => {
219
+ shouldRender: boolean;
220
+ };
221
+
222
+ // @public (undocumented)
223
+ export const VAR_SCROLL_INDICATOR_COLOR = "--ds-menu-scroll-indicator-color";
224
+
225
+ // @public (undocumented)
226
+ export const VAR_SEPARATOR_COLOR = "--ds-menu-seperator-color";
227
+
228
+ // (No @packageDocumentation comment for this package)
229
+
230
+ ```