@atlaskit/side-navigation 1.9.0 → 1.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/CHANGELOG.md +13 -1
  2. package/dist/cjs/components/LoadingItems/index.js +3 -3
  3. package/dist/cjs/components/NavigationContent/styles.js +1 -1
  4. package/dist/cjs/components/NestableNavigationContent/context.js +4 -0
  5. package/dist/cjs/components/NestableNavigationContent/index.js +5 -3
  6. package/dist/cjs/components/NestingItem/index.js +6 -7
  7. package/dist/cjs/version.json +1 -1
  8. package/dist/es2019/components/LoadingItems/index.js +3 -3
  9. package/dist/es2019/components/NavigationContent/styles.js +1 -1
  10. package/dist/es2019/components/NestableNavigationContent/context.js +5 -0
  11. package/dist/es2019/components/NestableNavigationContent/index.js +5 -3
  12. package/dist/es2019/components/NestingItem/index.js +6 -7
  13. package/dist/es2019/version.json +1 -1
  14. package/dist/esm/components/LoadingItems/index.js +3 -3
  15. package/dist/esm/components/NavigationContent/styles.js +1 -1
  16. package/dist/esm/components/NestableNavigationContent/context.js +5 -0
  17. package/dist/esm/components/NestableNavigationContent/index.js +5 -3
  18. package/dist/esm/components/NestingItem/index.js +6 -7
  19. package/dist/esm/version.json +1 -1
  20. package/dist/types/components/NavigationContent/index.d.ts +1 -1
  21. package/dist/types/components/NestableNavigationContent/context.d.ts +7 -4
  22. package/dist/types/components/NestableNavigationContent/index.d.ts +5 -0
  23. package/dist/types-ts4.5/components/NavigationContent/index.d.ts +1 -1
  24. package/dist/types-ts4.5/components/NestableNavigationContent/context.d.ts +7 -4
  25. package/dist/types-ts4.5/components/NestableNavigationContent/index.d.ts +5 -0
  26. package/package.json +4 -3
  27. package/report.api.md +1 -0
  28. package/tmp/api-report-tmp.d.ts +1 -0
package/CHANGELOG.md CHANGED
@@ -1,10 +1,22 @@
1
1
  # @atlaskit/side-navigation
2
2
 
3
+ ## 1.10.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 1.10.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`ee296a14a87`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ee296a14a87) - Adds the `showTopScrollIndicator` prop to the nestable navigation content component. This prop should be used only when needed to distinctly separate the side navigation header from the side navigation content.
14
+
3
15
  ## 1.9.0
4
16
 
5
17
  ### Minor Changes
6
18
 
7
- - [`0af122e7d0f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0af122e7d0f) - [ux] Prop isList in Section component allows to add <ul> and <li> elements around the items to better semantic markup if it is a list of items
19
+ - [`0af122e7d0f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0af122e7d0f) - [ux] Prop isList in Section component allows to add `<ul>` and `<li>` elements around the items to better semantic markup if it is a list of items
8
20
 
9
21
  ### Patch Changes
10
22
 
@@ -14,11 +14,11 @@ var _context = require("../NestableNavigationContent/context");
14
14
  var baseMotionStyles = (0, _react.css)({
15
15
  position: 'absolute',
16
16
  zIndex: 1,
17
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
17
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
18
18
  top: 0,
19
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
19
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
20
20
  right: 0,
21
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
21
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
22
22
  left: 0
23
23
  });
24
24
  var enteringStyles = (0, _react.css)({
@@ -10,7 +10,7 @@ var _colors = require("@atlaskit/theme/colors");
10
10
  var _typography = require("@atlaskit/theme/typography");
11
11
  var _constants = require("../../common/constants");
12
12
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
13
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } /* eslint-disable @atlaskit/design-system/ensure-design-token-usage-spacing */
13
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
14
14
  var scrollIndicatorMaskZIndex = 2;
15
15
  var scrollIndicatorZIndex = 1;
16
16
  var scrollIndicatorHeight = 2;
@@ -5,6 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useShouldNestedElementRender = exports.useNestedContext = exports.NestedContext = void 0;
7
7
  var _react = require("react");
8
+ /**
9
+ * @internal
10
+ */
11
+
8
12
  /**
9
13
  * @internal
10
14
  */
@@ -50,7 +50,8 @@ var NestableNavigationContent = function NestableNavigationContent(props) {
50
50
  initialStack = props.initialStack,
51
51
  onChange = props.onChange,
52
52
  onUnknownNest = props.onUnknownNest,
53
- stack = props.stack;
53
+ stack = props.stack,
54
+ showTopScrollIndicator = props.showTopScrollIndicator;
54
55
  var _useState = (0, _react.useState)(stack || initialStack || []),
55
56
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
56
57
  committedStack = _useState2[0],
@@ -137,9 +138,10 @@ var NestableNavigationContent = function NestableNavigationContent(props) {
137
138
  onNest: onNestHandler,
138
139
  onUnNest: onUnNestHandler,
139
140
  parentId: ROOT_ID,
140
- childIds: childIdsRef
141
+ childIds: childIdsRef,
142
+ forceShowTopScrollIndicator: showTopScrollIndicator
141
143
  };
142
- }, [currentStackId, backButton, committedStack, onNestHandler, onUnNestHandler, childIdsRef]);
144
+ }, [currentStackId, backButton, committedStack, onNestHandler, onUnNestHandler, childIdsRef, showTopScrollIndicator]);
143
145
  var manageFocus = function manageFocus(event) {
144
146
  var triggeredByKeyboard = event.nativeEvent.detail === 0;
145
147
  if (triggeredByKeyboard) {
@@ -52,7 +52,8 @@ var NestingItem = function NestingItem(props) {
52
52
  onUnNest = _useNestedContext.onUnNest,
53
53
  contextualBackButton = _useNestedContext.backButton,
54
54
  stack = _useNestedContext.stack,
55
- childIds = _useNestedContext.childIds;
55
+ childIds = _useNestedContext.childIds,
56
+ forceShowTopScrollIndicator = _useNestedContext.forceShowTopScrollIndicator;
56
57
  var mergedStyles = (0, _styles.overrideStyleFunction)(_styles2.nestingItemStyle, cssFn);
57
58
  var _useState = (0, _react.useState)(false),
58
59
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
@@ -70,12 +71,10 @@ var NestingItem = function NestingItem(props) {
70
71
  onUnNest: onUnNest,
71
72
  backButton: backButton,
72
73
  parentId: id,
73
- childIds: childIds
74
+ childIds: childIds,
75
+ forceShowTopScrollIndicator: forceShowTopScrollIndicator
74
76
  };
75
- },
76
- // childIds shouldn't change as it's a ref
77
- // eslint-disable-next-line react-hooks/exhaustive-deps
78
- [onNest, onUnNest, backButton, stack, id, currentStackId]);
77
+ }, [stack, currentStackId, onNest, onUnNest, backButton, id, childIds, forceShowTopScrollIndicator]);
79
78
  (0, _hooks.useChildIdsEffect)(childIds, id);
80
79
  var isNormalClick = function isNormalClick(e) {
81
80
  return !(e.button || e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
@@ -109,7 +108,7 @@ var NestingItem = function NestingItem(props) {
109
108
  paddingInline: "space.100"
110
109
  }, backButton), (0, _react2.jsx)(_index.NavigationContent, {
111
110
  testId: testId,
112
- showTopScrollIndicator: stack.length >= 1
111
+ showTopScrollIndicator: forceShowTopScrollIndicator || stack.length >= 1
113
112
  }, children));
114
113
  }
115
114
  if ([_NestableNavigationContent.ROOT_ID].concat((0, _toConsumableArray2.default)(stack)).includes(id)) {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/side-navigation",
3
- "version": "1.9.0",
3
+ "version": "1.10.1",
4
4
  "sideEffects": false
5
5
  }
@@ -6,11 +6,11 @@ import { useShouldNestedElementRender } from '../NestableNavigationContent/conte
6
6
  const baseMotionStyles = css({
7
7
  position: 'absolute',
8
8
  zIndex: 1,
9
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
9
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
10
10
  top: 0,
11
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
11
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
12
12
  right: 0,
13
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
13
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
14
14
  left: 0
15
15
  });
16
16
  const enteringStyles = css({
@@ -1,4 +1,4 @@
1
- /* eslint-disable @atlaskit/design-system/ensure-design-token-usage-spacing */
1
+ /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
2
2
  import { N10, N30 } from '@atlaskit/theme/colors';
3
3
  import { headingSizes } from '@atlaskit/theme/typography';
4
4
  import { VAR_SCROLL_INDICATOR_COLOR, VAR_SEPARATOR_COLOR } from '../../common/constants';
@@ -1,4 +1,9 @@
1
1
  import { createContext, useContext } from 'react';
2
+
3
+ /**
4
+ * @internal
5
+ */
6
+
2
7
  /**
3
8
  * @internal
4
9
  */
@@ -41,7 +41,8 @@ const NestableNavigationContent = props => {
41
41
  initialStack,
42
42
  onChange,
43
43
  onUnknownNest,
44
- stack
44
+ stack,
45
+ showTopScrollIndicator
45
46
  } = props;
46
47
  const [committedStack, setCommittedStack] = useState(stack || initialStack || []);
47
48
  const controlledStack = stack || undefined;
@@ -121,8 +122,9 @@ const NestableNavigationContent = props => {
121
122
  onNest: onNestHandler,
122
123
  onUnNest: onUnNestHandler,
123
124
  parentId: ROOT_ID,
124
- childIds: childIdsRef
125
- }), [currentStackId, backButton, committedStack, onNestHandler, onUnNestHandler, childIdsRef]);
125
+ childIds: childIdsRef,
126
+ forceShowTopScrollIndicator: showTopScrollIndicator
127
+ }), [currentStackId, backButton, committedStack, onNestHandler, onUnNestHandler, childIdsRef, showTopScrollIndicator]);
126
128
  const manageFocus = event => {
127
129
  const triggeredByKeyboard = event.nativeEvent.detail === 0;
128
130
  if (triggeredByKeyboard) {
@@ -38,7 +38,8 @@ const NestingItem = props => {
38
38
  onUnNest,
39
39
  backButton: contextualBackButton,
40
40
  stack,
41
- childIds
41
+ childIds,
42
+ forceShowTopScrollIndicator
42
43
  } = useNestedContext();
43
44
  const mergedStyles = overrideStyleFunction(nestingItemStyle, cssFn);
44
45
  const [isInteracted, setIsInteracted] = useState(false);
@@ -53,11 +54,9 @@ const NestingItem = props => {
53
54
  onUnNest,
54
55
  backButton,
55
56
  parentId: id,
56
- childIds
57
- }),
58
- // childIds shouldn't change as it's a ref
59
- // eslint-disable-next-line react-hooks/exhaustive-deps
60
- [onNest, onUnNest, backButton, stack, id, currentStackId]);
57
+ childIds,
58
+ forceShowTopScrollIndicator
59
+ }), [stack, currentStackId, onNest, onUnNest, backButton, id, childIds, forceShowTopScrollIndicator]);
61
60
  useChildIdsEffect(childIds, id);
62
61
  const isNormalClick = e => !(e.button || e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
63
62
 
@@ -89,7 +88,7 @@ const NestingItem = props => {
89
88
  paddingInline: "space.100"
90
89
  }, backButton), jsx(NavigationContent, {
91
90
  testId: testId,
92
- showTopScrollIndicator: stack.length >= 1
91
+ showTopScrollIndicator: forceShowTopScrollIndicator || stack.length >= 1
93
92
  }, children));
94
93
  }
95
94
  if ([ROOT_ID, ...stack].includes(id)) {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/side-navigation",
3
- "version": "1.9.0",
3
+ "version": "1.10.1",
4
4
  "sideEffects": false
5
5
  }
@@ -6,11 +6,11 @@ import { useShouldNestedElementRender } from '../NestableNavigationContent/conte
6
6
  var baseMotionStyles = css({
7
7
  position: 'absolute',
8
8
  zIndex: 1,
9
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
9
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
10
10
  top: 0,
11
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
11
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
12
12
  right: 0,
13
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
13
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
14
14
  left: 0
15
15
  });
16
16
  var enteringStyles = css({
@@ -1,7 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
3
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
- /* eslint-disable @atlaskit/design-system/ensure-design-token-usage-spacing */
4
+ /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
5
5
  import { N10, N30 } from '@atlaskit/theme/colors';
6
6
  import { headingSizes } from '@atlaskit/theme/typography';
7
7
  import { VAR_SCROLL_INDICATOR_COLOR, VAR_SEPARATOR_COLOR } from '../../common/constants';
@@ -1,4 +1,9 @@
1
1
  import { createContext, useContext } from 'react';
2
+
3
+ /**
4
+ * @internal
5
+ */
6
+
2
7
  /**
3
8
  * @internal
4
9
  */
@@ -41,7 +41,8 @@ var NestableNavigationContent = function NestableNavigationContent(props) {
41
41
  initialStack = props.initialStack,
42
42
  onChange = props.onChange,
43
43
  onUnknownNest = props.onUnknownNest,
44
- stack = props.stack;
44
+ stack = props.stack,
45
+ showTopScrollIndicator = props.showTopScrollIndicator;
45
46
  var _useState = useState(stack || initialStack || []),
46
47
  _useState2 = _slicedToArray(_useState, 2),
47
48
  committedStack = _useState2[0],
@@ -128,9 +129,10 @@ var NestableNavigationContent = function NestableNavigationContent(props) {
128
129
  onNest: onNestHandler,
129
130
  onUnNest: onUnNestHandler,
130
131
  parentId: ROOT_ID,
131
- childIds: childIdsRef
132
+ childIds: childIdsRef,
133
+ forceShowTopScrollIndicator: showTopScrollIndicator
132
134
  };
133
- }, [currentStackId, backButton, committedStack, onNestHandler, onUnNestHandler, childIdsRef]);
135
+ }, [currentStackId, backButton, committedStack, onNestHandler, onUnNestHandler, childIdsRef, showTopScrollIndicator]);
134
136
  var manageFocus = function manageFocus(event) {
135
137
  var triggeredByKeyboard = event.nativeEvent.detail === 0;
136
138
  if (triggeredByKeyboard) {
@@ -43,7 +43,8 @@ var NestingItem = function NestingItem(props) {
43
43
  onUnNest = _useNestedContext.onUnNest,
44
44
  contextualBackButton = _useNestedContext.backButton,
45
45
  stack = _useNestedContext.stack,
46
- childIds = _useNestedContext.childIds;
46
+ childIds = _useNestedContext.childIds,
47
+ forceShowTopScrollIndicator = _useNestedContext.forceShowTopScrollIndicator;
47
48
  var mergedStyles = overrideStyleFunction(nestingItemStyle, cssFn);
48
49
  var _useState = useState(false),
49
50
  _useState2 = _slicedToArray(_useState, 2),
@@ -61,12 +62,10 @@ var NestingItem = function NestingItem(props) {
61
62
  onUnNest: onUnNest,
62
63
  backButton: backButton,
63
64
  parentId: id,
64
- childIds: childIds
65
+ childIds: childIds,
66
+ forceShowTopScrollIndicator: forceShowTopScrollIndicator
65
67
  };
66
- },
67
- // childIds shouldn't change as it's a ref
68
- // eslint-disable-next-line react-hooks/exhaustive-deps
69
- [onNest, onUnNest, backButton, stack, id, currentStackId]);
68
+ }, [stack, currentStackId, onNest, onUnNest, backButton, id, childIds, forceShowTopScrollIndicator]);
70
69
  useChildIdsEffect(childIds, id);
71
70
  var isNormalClick = function isNormalClick(e) {
72
71
  return !(e.button || e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
@@ -100,7 +99,7 @@ var NestingItem = function NestingItem(props) {
100
99
  paddingInline: "space.100"
101
100
  }, backButton), jsx(NavigationContent, {
102
101
  testId: testId,
103
- showTopScrollIndicator: stack.length >= 1
102
+ showTopScrollIndicator: forceShowTopScrollIndicator || stack.length >= 1
104
103
  }, children));
105
104
  }
106
105
  if ([ROOT_ID].concat(_toConsumableArray(stack)).includes(id)) {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/side-navigation",
3
- "version": "1.9.0",
3
+ "version": "1.10.1",
4
4
  "sideEffects": false
5
5
  }
@@ -3,7 +3,7 @@ import { HTMLAttributes } from 'react';
3
3
  export interface NavigationContentProps {
4
4
  children: React.ReactNode;
5
5
  /**
6
- * Forces the top scroll indicator to be shown all the time.
6
+ * Forces the top scroll indicator to be shown.
7
7
  */
8
8
  showTopScrollIndicator?: boolean;
9
9
  /**
@@ -1,5 +1,8 @@
1
1
  import { MutableRefObject } from 'react';
2
- interface NestedContext {
2
+ /**
3
+ * @internal
4
+ */
5
+ export interface NestedContextValue {
3
6
  currentStackId: string;
4
7
  onNest: (id: string) => void;
5
8
  onUnNest: () => void;
@@ -7,12 +10,13 @@ interface NestedContext {
7
10
  parentId: string;
8
11
  backButton?: React.ReactNode;
9
12
  childIds: MutableRefObject<Set<string>>;
13
+ forceShowTopScrollIndicator: boolean | undefined;
10
14
  }
11
15
  /**
12
16
  * @internal
13
17
  */
14
- export declare const NestedContext: import("react").Context<NestedContext | undefined>;
15
- export declare const useNestedContext: () => NestedContext;
18
+ export declare const NestedContext: import("react").Context<NestedContextValue | undefined>;
19
+ export declare const useNestedContext: () => NestedContextValue;
16
20
  /**
17
21
  * Used by children of the NestableNavigationContent component to see if they should render or not.
18
22
  * If `shouldRender` returns `true` - return your nodes.
@@ -21,4 +25,3 @@ export declare const useNestedContext: () => NestedContext;
21
25
  export declare const useShouldNestedElementRender: () => {
22
26
  shouldRender: boolean;
23
27
  };
24
- export {};
@@ -18,6 +18,11 @@ export interface NestableNavigationContentProps {
18
18
  * - The back item (displayed when inside a nested view) - `{testId}--go-back-item`
19
19
  */
20
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;
21
26
  /**
22
27
  * Array of the initial stack you want to show.
23
28
  * Useful when wanting to set the initial nested view but not wanting to opt into controlled state.
@@ -3,7 +3,7 @@ import { HTMLAttributes } from 'react';
3
3
  export interface NavigationContentProps {
4
4
  children: React.ReactNode;
5
5
  /**
6
- * Forces the top scroll indicator to be shown all the time.
6
+ * Forces the top scroll indicator to be shown.
7
7
  */
8
8
  showTopScrollIndicator?: boolean;
9
9
  /**
@@ -1,5 +1,8 @@
1
1
  import { MutableRefObject } from 'react';
2
- interface NestedContext {
2
+ /**
3
+ * @internal
4
+ */
5
+ export interface NestedContextValue {
3
6
  currentStackId: string;
4
7
  onNest: (id: string) => void;
5
8
  onUnNest: () => void;
@@ -7,12 +10,13 @@ interface NestedContext {
7
10
  parentId: string;
8
11
  backButton?: React.ReactNode;
9
12
  childIds: MutableRefObject<Set<string>>;
13
+ forceShowTopScrollIndicator: boolean | undefined;
10
14
  }
11
15
  /**
12
16
  * @internal
13
17
  */
14
- export declare const NestedContext: import("react").Context<NestedContext | undefined>;
15
- export declare const useNestedContext: () => NestedContext;
18
+ export declare const NestedContext: import("react").Context<NestedContextValue | undefined>;
19
+ export declare const useNestedContext: () => NestedContextValue;
16
20
  /**
17
21
  * Used by children of the NestableNavigationContent component to see if they should render or not.
18
22
  * If `shouldRender` returns `true` - return your nodes.
@@ -21,4 +25,3 @@ export declare const useNestedContext: () => NestedContext;
21
25
  export declare const useShouldNestedElementRender: () => {
22
26
  shouldRender: boolean;
23
27
  };
24
- export {};
@@ -18,6 +18,11 @@ export interface NestableNavigationContentProps {
18
18
  * - The back item (displayed when inside a nested view) - `{testId}--go-back-item`
19
19
  */
20
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;
21
26
  /**
22
27
  * Array of the initial stack you want to show.
23
28
  * Useful when wanting to set the initial nested view but not wanting to opt into controlled state.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/side-navigation",
3
- "version": "1.9.0",
3
+ "version": "1.10.1",
4
4
  "description": "A highly composable side navigation component that supports nested views.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -37,9 +37,9 @@
37
37
  "@atlaskit/icon": "^21.12.0",
38
38
  "@atlaskit/menu": "^1.9.0",
39
39
  "@atlaskit/motion": "^1.4.0",
40
- "@atlaskit/primitives": "^0.14.0",
40
+ "@atlaskit/primitives": "^0.15.0",
41
41
  "@atlaskit/theme": "^12.5.0",
42
- "@atlaskit/tokens": "^1.9.0",
42
+ "@atlaskit/tokens": "^1.10.0",
43
43
  "@babel/runtime": "^7.0.0",
44
44
  "@emotion/react": "^11.7.1"
45
45
  },
@@ -58,6 +58,7 @@
58
58
  "@atlaskit/webdriver-runner": "*",
59
59
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
60
60
  "@atlassian/feature-flags-test-utils": "*",
61
+ "@atlassian/gemini-visual-regression": "*",
61
62
  "@testing-library/react": "^12.1.5",
62
63
  "@types/jest-axe": "^3.5.0",
63
64
  "ast-types": "^0.13.3",
package/report.api.md CHANGED
@@ -191,6 +191,7 @@ export interface NestableNavigationContentProps {
191
191
  }) => React.ReactNode;
192
192
  };
193
193
  };
194
+ showTopScrollIndicator?: boolean;
194
195
  stack?: string[];
195
196
  testId?: string;
196
197
  }
@@ -144,6 +144,7 @@ export interface NestableNavigationContentProps {
144
144
  }) => React.ReactNode;
145
145
  };
146
146
  };
147
+ showTopScrollIndicator?: boolean;
147
148
  stack?: string[];
148
149
  testId?: string;
149
150
  }