@atlaskit/side-navigation 1.2.14 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/components/LoadingItems/index.js +3 -3
  3. package/dist/cjs/components/NavigationContent/index.js +4 -4
  4. package/dist/cjs/components/NavigationFooter/index.js +2 -2
  5. package/dist/cjs/components/NavigationHeader/index.js +2 -2
  6. package/dist/cjs/components/NestableNavigationContent/index.js +7 -7
  7. package/dist/cjs/components/NestableNavigationContent/nesting-motion.js +2 -2
  8. package/dist/cjs/components/NestingItem/index.js +9 -9
  9. package/dist/cjs/components/SideNavigation/index.js +2 -2
  10. package/dist/cjs/version.json +1 -1
  11. package/dist/es2019/components/LoadingItems/index.js +1 -1
  12. package/dist/es2019/components/NavigationContent/index.js +1 -1
  13. package/dist/es2019/components/NavigationFooter/index.js +1 -1
  14. package/dist/es2019/components/NavigationHeader/index.js +1 -1
  15. package/dist/es2019/components/NestableNavigationContent/index.js +1 -1
  16. package/dist/es2019/components/NestableNavigationContent/nesting-motion.js +1 -1
  17. package/dist/es2019/components/NestingItem/index.js +1 -1
  18. package/dist/es2019/components/SideNavigation/index.js +1 -1
  19. package/dist/es2019/version.json +1 -1
  20. package/dist/esm/components/LoadingItems/index.js +1 -1
  21. package/dist/esm/components/NavigationContent/index.js +1 -1
  22. package/dist/esm/components/NavigationFooter/index.js +1 -1
  23. package/dist/esm/components/NavigationHeader/index.js +1 -1
  24. package/dist/esm/components/NestableNavigationContent/index.js +1 -1
  25. package/dist/esm/components/NestableNavigationContent/nesting-motion.js +1 -1
  26. package/dist/esm/components/NestingItem/index.js +1 -1
  27. package/dist/esm/components/SideNavigation/index.js +1 -1
  28. package/dist/esm/version.json +1 -1
  29. package/dist/types/components/NavigationFooter/index.d.ts +2 -1
  30. package/dist/types/components/NavigationHeader/index.d.ts +3 -1
  31. package/dist/types/components/NestableNavigationContent/index.d.ts +2 -1
  32. package/dist/types/components/NestableNavigationContent/nesting-motion.d.ts +2 -1
  33. package/dist/types-ts4.0/common/constants.d.ts +2 -0
  34. package/dist/types-ts4.0/common/styles.d.ts +12 -0
  35. package/dist/types-ts4.0/components/Footer/index.d.ts +11 -0
  36. package/dist/types-ts4.0/components/Header/index.d.ts +50 -0
  37. package/dist/types-ts4.0/components/Item/button-item.d.ts +14 -0
  38. package/dist/types-ts4.0/components/Item/custom-item.d.ts +14 -0
  39. package/dist/types-ts4.0/components/Item/go-back-item.d.ts +14 -0
  40. package/dist/types-ts4.0/components/Item/index.d.ts +10 -0
  41. package/dist/types-ts4.0/components/Item/link-item.d.ts +16 -0
  42. package/dist/types-ts4.0/components/Item/skeleton-item.d.ts +13 -0
  43. package/dist/types-ts4.0/components/LoadingItems/index.d.ts +35 -0
  44. package/dist/types-ts4.0/components/NavigationContent/index.d.ts +25 -0
  45. package/dist/types-ts4.0/components/NavigationContent/styles.d.ts +91 -0
  46. package/dist/types-ts4.0/components/NavigationFooter/index.d.ts +16 -0
  47. package/dist/types-ts4.0/components/NavigationHeader/index.d.ts +16 -0
  48. package/dist/types-ts4.0/components/NestableNavigationContent/context.d.ts +23 -0
  49. package/dist/types-ts4.0/components/NestableNavigationContent/index.d.ts +69 -0
  50. package/dist/types-ts4.0/components/NestableNavigationContent/nesting-motion.d.ts +22 -0
  51. package/dist/types-ts4.0/components/NestingItem/hack-for-ert.d.ts +2 -0
  52. package/dist/types-ts4.0/components/NestingItem/index.d.ts +91 -0
  53. package/dist/types-ts4.0/components/NestingItem/styles.d.ts +28 -0
  54. package/dist/types-ts4.0/components/Section/heading-item.d.ts +11 -0
  55. package/dist/types-ts4.0/components/Section/index.d.ts +6 -0
  56. package/dist/types-ts4.0/components/Section/section.d.ts +34 -0
  57. package/dist/types-ts4.0/components/Section/skeleton-heading-item.d.ts +12 -0
  58. package/dist/types-ts4.0/components/SideNavigation/index.d.ts +32 -0
  59. package/dist/types-ts4.0/components/index.d.ts +22 -0
  60. package/dist/types-ts4.0/index.d.ts +4 -0
  61. package/package.json +17 -10
  62. package/report.api.md +163 -43
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/side-navigation
2
2
 
3
+ ## 1.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`02e2f7aacef`](https://bitbucket.org/atlassian/atlassian-frontend/commits/02e2f7aacef) - Updates `@emotion/core` to `@emotion/react`; v10 to v11. There is no expected behavior change.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+
13
+ ## 1.2.15
14
+
15
+ ### Patch Changes
16
+
17
+ - [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5`
18
+
3
19
  ## 1.2.14
4
20
 
5
21
  ### Patch Changes
@@ -9,7 +9,7 @@ exports.default = void 0;
9
9
 
10
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
11
 
12
- var _core = require("@emotion/core");
12
+ var _react = require("@emotion/react");
13
13
 
14
14
  var _motion = require("@atlaskit/motion");
15
15
 
@@ -35,11 +35,11 @@ var LoadingItems = function LoadingItems(_ref) {
35
35
  return children;
36
36
  }
37
37
 
38
- return (0, _core.jsx)(_motion.ExitingPersistence, null, (0, _core.jsx)(_motion.FadeIn, {
38
+ return (0, _react.jsx)(_motion.ExitingPersistence, null, (0, _react.jsx)(_motion.FadeIn, {
39
39
  key: "loading-section-".concat(isLoading),
40
40
  duration: _motion.mediumDurationMs
41
41
  }, function (motion, state) {
42
- return (0, _core.jsx)("span", (0, _extends2.default)({}, motion, {
42
+ return (0, _react.jsx)("span", (0, _extends2.default)({}, motion, {
43
43
  "data-testid": testId && "".concat(testId, "--").concat(state),
44
44
  css: {
45
45
  // Used to have the exiting section appear above the entering one.
@@ -9,7 +9,7 @@ exports.default = void 0;
9
9
 
10
10
  var _react = require("react");
11
11
 
12
- var _core = require("@emotion/core");
12
+ var _react2 = require("@emotion/react");
13
13
 
14
14
  var _useScrollbarWidth = _interopRequireDefault(require("@atlaskit/ds-lib/use-scrollbar-width"));
15
15
 
@@ -40,18 +40,18 @@ var NavigationContent = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref
40
40
  return children;
41
41
  }
42
42
 
43
- return (0, _core.jsx)("div", {
43
+ return (0, _react2.jsx)("div", {
44
44
  ref: ref,
45
45
  css: (0, _styles.outerContainerCSS)({
46
46
  showTopScrollIndicator: showTopScrollIndicator,
47
47
  scrollbarWidth: scrollbar.width
48
48
  })
49
- }, (0, _core.jsx)("div", {
49
+ }, (0, _react2.jsx)("div", {
50
50
  ref: scrollbar.ref,
51
51
  css: (0, _styles.innerContainerCSS)({
52
52
  showTopScrollIndicator: showTopScrollIndicator
53
53
  })
54
- }, (0, _core.jsx)("div", {
54
+ }, (0, _react2.jsx)("div", {
55
55
  css: (0, _styles.containerCSS)({
56
56
  showTopScrollIndicator: showTopScrollIndicator
57
57
  })
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
 
8
- var _core = require("@emotion/core");
8
+ var _react = require("@emotion/react");
9
9
 
10
10
  var _constants = require("@atlaskit/theme/constants");
11
11
 
@@ -26,7 +26,7 @@ var footerCSS = {
26
26
 
27
27
  var NavigationFooter = function NavigationFooter(_ref) {
28
28
  var children = _ref.children;
29
- return (0, _core.jsx)("div", {
29
+ return (0, _react.jsx)("div", {
30
30
  css: footerCSS
31
31
  }, children);
32
32
  };
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
 
8
- var _core = require("@emotion/core");
8
+ var _react = require("@emotion/react");
9
9
 
10
10
  var _constants = require("@atlaskit/theme/constants");
11
11
 
@@ -21,7 +21,7 @@ var _constants = require("@atlaskit/theme/constants");
21
21
  */
22
22
  var NavigationHeader = function NavigationHeader(props) {
23
23
  var children = props.children;
24
- return (0, _core.jsx)("div", {
24
+ return (0, _react.jsx)("div", {
25
25
  "data-navheader": true,
26
26
  css: {
27
27
  paddingTop: (0, _constants.gridSize)() * 3,
@@ -13,7 +13,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
13
13
 
14
14
  var _react = require("react");
15
15
 
16
- var _core = require("@emotion/core");
16
+ var _react2 = require("@emotion/react");
17
17
 
18
18
  var _motion = require("@atlaskit/motion");
19
19
 
@@ -62,7 +62,7 @@ var NestableNavigationContent = function NestableNavigationContent(props) {
62
62
 
63
63
  var backTestId = testId && "".concat(testId, "--go-back-item");
64
64
  var renderGoBackItem = overrides && overrides.GoBackItem && overrides.GoBackItem.render ? overrides.GoBackItem.render : function (props) {
65
- return (0, _core.jsx)(_Item.GoBackItem, props, "Go back");
65
+ return (0, _react2.jsx)(_Item.GoBackItem, props, "Go back");
66
66
  };
67
67
  var onNestHandler = (0, _react.useCallback)(function (layerId) {
68
68
  onChange && onChange(committedStack.concat(layerId));
@@ -149,7 +149,7 @@ var NestableNavigationContent = function NestableNavigationContent(props) {
149
149
  }
150
150
  };
151
151
 
152
- return (0, _core.jsx)("div", {
152
+ return (0, _react2.jsx)("div", {
153
153
  "data-testid": testId,
154
154
  css: {
155
155
  position: 'relative',
@@ -159,7 +159,7 @@ var NestableNavigationContent = function NestableNavigationContent(props) {
159
159
  ref: containerRef,
160
160
  tabIndex: -1,
161
161
  onClick: manageFocus
162
- }, (0, _core.jsx)(_motion.ExitingPersistence, null, (0, _core.jsx)(_nestingMotion.NestingMotion // Key is needed to have a unique react instance per stack name.
162
+ }, (0, _react2.jsx)(_motion.ExitingPersistence, null, (0, _react2.jsx)(_nestingMotion.NestingMotion // Key is needed to have a unique react instance per stack name.
163
163
  // This enables us to easily animate it in & out with exiting persistence.
164
164
  , {
165
165
  key: currentStackId,
@@ -167,7 +167,7 @@ var NestableNavigationContent = function NestableNavigationContent(props) {
167
167
  exitTo: transition === 'nesting' ? 'left' : 'right',
168
168
  testId: testId && "".concat(testId, "-anim")
169
169
  }, function (motion) {
170
- return (0, _core.jsx)("div", (0, _extends2.default)({
170
+ return (0, _react2.jsx)("div", (0, _extends2.default)({
171
171
  css: {
172
172
  position: 'absolute',
173
173
  width: '100%',
@@ -175,11 +175,11 @@ var NestableNavigationContent = function NestableNavigationContent(props) {
175
175
  display: 'flex',
176
176
  flexDirection: 'column'
177
177
  }
178
- }, motion), (0, _core.jsx)(_context.NestedContext.Provider, {
178
+ }, motion), (0, _react2.jsx)(_context.NestedContext.Provider, {
179
179
  // This provider is inside the NestingMotion to ensure it keeps a stale
180
180
  // reference to the previous value.
181
181
  value: context
182
- }, (0, _core.jsx)(_NestingItem.default, {
182
+ }, (0, _react2.jsx)(_NestingItem.default, {
183
183
  title: "",
184
184
  id: ROOT_ID
185
185
  }, children)));
@@ -9,7 +9,7 @@ exports.NestingMotion = void 0;
9
9
 
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
11
 
12
- var _core = require("@emotion/core");
12
+ var _react = require("@emotion/react");
13
13
 
14
14
  var _motion = require("@atlaskit/motion");
15
15
 
@@ -25,7 +25,7 @@ var NestingMotion = function NestingMotion(props) {
25
25
  enterFrom = props.enterFrom,
26
26
  exitTo = props.exitTo,
27
27
  testId = props.testId;
28
- return (0, _core.jsx)(_motion.SlideIn, {
28
+ return (0, _react.jsx)(_motion.SlideIn, {
29
29
  exitTo: exitTo,
30
30
  enterFrom: enterFrom,
31
31
  animationTimingFunction: function animationTimingFunction(_) {
@@ -21,7 +21,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
21
21
 
22
22
  var _react = _interopRequireWildcard(require("react"));
23
23
 
24
- var _core = require("@emotion/core");
24
+ var _react2 = require("@emotion/react");
25
25
 
26
26
  var _arrowRightCircle = _interopRequireDefault(require("@atlaskit/icon/glyph/arrow-right-circle"));
27
27
 
@@ -121,9 +121,9 @@ var NestingItem = function NestingItem(props) {
121
121
  }, [isInteracted, onClick, onNest, id]);
122
122
 
123
123
  if (currentStackId === id) {
124
- return (0, _core.jsx)(_context.NestedContext.Provider, {
124
+ return (0, _react2.jsx)(_context.NestedContext.Provider, {
125
125
  value: context
126
- }, stack.length >= 1 && (0, _core.jsx)("div", {
126
+ }, stack.length >= 1 && (0, _react2.jsx)("div", {
127
127
  css: {
128
128
  marginLeft: (0, _constants.gridSize)(),
129
129
  marginRight: (0, _constants.gridSize)(),
@@ -131,7 +131,7 @@ var NestingItem = function NestingItem(props) {
131
131
  paddingTop: (0, _constants.gridSize)() * 0.75,
132
132
  paddingBottom: (0, _constants.gridSize)() * 0.75
133
133
  }
134
- }, backButton), (0, _core.jsx)(_index.NavigationContent, {
134
+ }, backButton), (0, _react2.jsx)(_index.NavigationContent, {
135
135
  testId: testId,
136
136
  showTopScrollIndicator: stack.length >= 1
137
137
  }, children));
@@ -142,11 +142,11 @@ var NestingItem = function NestingItem(props) {
142
142
  }
143
143
 
144
144
  var componentProps = _objectSpread(_objectSpread({
145
- iconAfter: (0, _core.jsx)(_react.Fragment, null, iconAfter ? (0, _core.jsx)("span", {
145
+ iconAfter: (0, _react2.jsx)(_react.Fragment, null, iconAfter ? (0, _react2.jsx)("span", {
146
146
  "data-custom-icon": true
147
- }, iconAfter) : null, (0, _core.jsx)("span", {
147
+ }, iconAfter) : null, (0, _react2.jsx)("span", {
148
148
  "data-right-arrow": true
149
- }, (0, _core.jsx)(_arrowRightCircle.default, {
149
+ }, (0, _react2.jsx)(_arrowRightCircle.default, {
150
150
  testId: testId && "".concat(testId, "--item--right-arrow"),
151
151
  secondaryColor: "var(--ds-surface, ".concat(_colors.N10, ")"),
152
152
  label: ""
@@ -160,13 +160,13 @@ var NestingItem = function NestingItem(props) {
160
160
  });
161
161
 
162
162
  if (component) {
163
- return (0, _core.jsx)(_index.CustomItem, (0, _extends2.default)({}, componentProps, {
163
+ return (0, _react2.jsx)(_index.CustomItem, (0, _extends2.default)({}, componentProps, {
164
164
  //@ts-expect-error TODO Fix legit TypeScript 3.9.6 improved inference error
165
165
  component: component
166
166
  }));
167
167
  }
168
168
 
169
- return (0, _core.jsx)(_index.ButtonItem, componentProps);
169
+ return (0, _react2.jsx)(_index.ButtonItem, componentProps);
170
170
  };
171
171
 
172
172
  var _default = NestingItem;
@@ -7,7 +7,7 @@ exports.default = void 0;
7
7
 
8
8
  var _react = require("react");
9
9
 
10
- var _core = require("@emotion/core");
10
+ var _react2 = require("@emotion/react");
11
11
 
12
12
  var _colors = require("@atlaskit/theme/colors");
13
13
 
@@ -28,7 +28,7 @@ var SideNavigation = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
28
28
  var children = props.children,
29
29
  testId = props.testId,
30
30
  label = props.label;
31
- return (0, _core.jsx)("nav", {
31
+ return (0, _react2.jsx)("nav", {
32
32
  ref: ref,
33
33
  "data-testid": testId,
34
34
  "aria-label": label,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/side-navigation",
3
- "version": "1.2.14",
3
+ "version": "1.3.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
 
3
3
  /** @jsx jsx */
4
- import { jsx } from '@emotion/core';
4
+ import { jsx } from '@emotion/react';
5
5
  import { ExitingPersistence, FadeIn, mediumDurationMs } from '@atlaskit/motion';
6
6
  import { useShouldNestedElementRender } from '../NestableNavigationContent/context';
7
7
 
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { forwardRef } from 'react';
3
- import { jsx } from '@emotion/core';
3
+ import { jsx } from '@emotion/react';
4
4
  import useScrollbarWidth from '@atlaskit/ds-lib/use-scrollbar-width';
5
5
  import { useShouldNestedElementRender } from '../NestableNavigationContent/context';
6
6
  import { containerCSS, innerContainerCSS, outerContainerCSS } from './styles';
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { jsx } from '@emotion/core';
2
+ import { jsx } from '@emotion/react';
3
3
  import { gridSize } from '@atlaskit/theme/constants';
4
4
  const footerCSS = {
5
5
  position: 'relative',
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { jsx } from '@emotion/core';
2
+ import { jsx } from '@emotion/react';
3
3
  import { gridSize } from '@atlaskit/theme/constants';
4
4
 
5
5
  /**
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
 
3
3
  /** @jsx jsx */
4
4
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
5
- import { jsx } from '@emotion/core';
5
+ import { jsx } from '@emotion/react';
6
6
  import { ExitingPersistence } from '@atlaskit/motion';
7
7
  import { GoBackItem as GoBackButton } from '../Item';
8
8
  import { default as NestingItem } from '../NestingItem';
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { jsx } from '@emotion/core';
2
+ import { jsx } from '@emotion/react';
3
3
  import { easeOut, SlideIn } from '@atlaskit/motion';
4
4
 
5
5
  /**
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
 
3
3
  /** @jsx jsx */
4
4
  import React, { Fragment, useCallback, useMemo, useState } from 'react';
5
- import { jsx } from '@emotion/core';
5
+ import { jsx } from '@emotion/react';
6
6
  import RightArrow from '@atlaskit/icon/glyph/arrow-right-circle';
7
7
  import { N10 } from '@atlaskit/theme/colors';
8
8
  import { gridSize } from '@atlaskit/theme/constants';
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { forwardRef } from 'react';
3
- import { jsx } from '@emotion/core';
3
+ import { jsx } from '@emotion/react';
4
4
  import { N10, N500 } from '@atlaskit/theme/colors';
5
5
  import { gridSize } from '@atlaskit/theme/constants';
6
6
 
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/side-navigation",
3
- "version": "1.2.14",
3
+ "version": "1.3.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
 
3
3
  /** @jsx jsx */
4
- import { jsx } from '@emotion/core';
4
+ import { jsx } from '@emotion/react';
5
5
  import { ExitingPersistence, FadeIn, mediumDurationMs } from '@atlaskit/motion';
6
6
  import { useShouldNestedElementRender } from '../NestableNavigationContent/context';
7
7
 
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { forwardRef } from 'react';
3
- import { jsx } from '@emotion/core';
3
+ import { jsx } from '@emotion/react';
4
4
  import useScrollbarWidth from '@atlaskit/ds-lib/use-scrollbar-width';
5
5
  import { useShouldNestedElementRender } from '../NestableNavigationContent/context';
6
6
  import { containerCSS, innerContainerCSS, outerContainerCSS } from './styles';
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { jsx } from '@emotion/core';
2
+ import { jsx } from '@emotion/react';
3
3
  import { gridSize } from '@atlaskit/theme/constants';
4
4
  var footerCSS = {
5
5
  position: 'relative',
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { jsx } from '@emotion/core';
2
+ import { jsx } from '@emotion/react';
3
3
  import { gridSize } from '@atlaskit/theme/constants';
4
4
 
5
5
  /**
@@ -3,7 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
 
4
4
  /** @jsx jsx */
5
5
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
6
- import { jsx } from '@emotion/core';
6
+ import { jsx } from '@emotion/react';
7
7
  import { ExitingPersistence } from '@atlaskit/motion';
8
8
  import { GoBackItem as GoBackButton } from '../Item';
9
9
  import { default as NestingItem } from '../NestingItem';
@@ -5,7 +5,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
5
5
  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; }
6
6
 
7
7
  /** @jsx jsx */
8
- import { jsx } from '@emotion/core';
8
+ import { jsx } from '@emotion/react';
9
9
  import { easeOut, SlideIn } from '@atlaskit/motion';
10
10
 
11
11
  /**
@@ -11,7 +11,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
11
11
 
12
12
  /** @jsx jsx */
13
13
  import React, { Fragment, useCallback, useMemo, useState } from 'react';
14
- import { jsx } from '@emotion/core';
14
+ import { jsx } from '@emotion/react';
15
15
  import RightArrow from '@atlaskit/icon/glyph/arrow-right-circle';
16
16
  import { N10 } from '@atlaskit/theme/colors';
17
17
  import { gridSize } from '@atlaskit/theme/constants';
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { forwardRef } from 'react';
3
- import { jsx } from '@emotion/core';
3
+ import { jsx } from '@emotion/react';
4
4
  import { N10, N500 } from '@atlaskit/theme/colors';
5
5
  import { gridSize } from '@atlaskit/theme/constants';
6
6
 
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/side-navigation",
3
- "version": "1.2.14",
3
+ "version": "1.3.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { ReactNode } from 'react';
3
+ import { jsx } from '@emotion/react';
3
4
  export interface NavigationFooterProps {
4
5
  children: ReactNode;
5
6
  }
@@ -11,5 +12,5 @@ export interface NavigationFooterProps {
11
12
  * - [Examples](https://atlassian.design/components/side-navigation/examples#header-and-footer)
12
13
  * - [Code](https://atlassian.design/components/side-navigation/code)
13
14
  */
14
- declare const NavigationFooter: ({ children }: NavigationFooterProps) => JSX.Element;
15
+ declare const NavigationFooter: ({ children }: NavigationFooterProps) => jsx.JSX.Element;
15
16
  export default NavigationFooter;
@@ -1,4 +1,6 @@
1
1
  /// <reference types="react" />
2
+ /** @jsx jsx */
3
+ import { jsx } from '@emotion/react';
2
4
  export interface NavigationHeaderProps {
3
5
  children: JSX.Element | JSX.Element[];
4
6
  }
@@ -10,5 +12,5 @@ export interface NavigationHeaderProps {
10
12
  * - [Examples](https://atlassian.design/components/side-navigation/examples#header-and-footer)
11
13
  * - [Code](https://atlassian.design/components/side-navigation/code)
12
14
  */
13
- declare const NavigationHeader: (props: NavigationHeaderProps) => JSX.Element;
15
+ declare const NavigationHeader: (props: NavigationHeaderProps) => jsx.JSX.Element;
14
16
  export default NavigationHeader;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import { jsx } from '@emotion/react';
2
3
  export declare const ROOT_ID = "ATLASKIT_NESTED_ROOT";
3
4
  export interface NestableNavigationContentProps {
4
5
  /**
@@ -64,5 +65,5 @@ export interface NestableNavigationContentProps {
64
65
  * - [Examples](https://atlassian.design/components/side-navigation/examples#nested-navigation)
65
66
  * - [Code](https://atlassian.design/components/side-navigation/code)
66
67
  */
67
- declare const NestableNavigationContent: (props: NestableNavigationContentProps) => JSX.Element;
68
+ declare const NestableNavigationContent: (props: NestableNavigationContentProps) => jsx.JSX.Element;
68
69
  export default NestableNavigationContent;
@@ -1,5 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { Ref } from 'react';
3
+ import { jsx } from '@emotion/react';
3
4
  import { Direction } from '@atlaskit/motion';
4
5
  interface ChildrenAsFunctionProps {
5
6
  'data-enter-from': string;
@@ -17,5 +18,5 @@ interface NestingMotionProps {
17
18
  /**
18
19
  * @internal
19
20
  */
20
- export declare const NestingMotion: (props: NestingMotionProps) => JSX.Element;
21
+ export declare const NestingMotion: (props: NestingMotionProps) => jsx.JSX.Element;
21
22
  export {};
@@ -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,12 @@
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;
@@ -0,0 +1,11 @@
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;
@@ -0,0 +1,50 @@
1
+ import React from 'react';
2
+ import { CSSFn, CustomItemComponentProps } from '@atlaskit/menu';
3
+ export interface HeaderProps {
4
+ /**
5
+ * A function that can be used to override the styles of the component.
6
+ * It receives the current styles and state and expects a styles object.
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
+ cssFn?: CSSFn;
10
+ /**
11
+ * Element to render before the item text.
12
+ * Generally should be an [icon](https://atlaskit.atlassian.com/packages/design-system/icon) component.
13
+ */
14
+ iconBefore?: React.ReactNode;
15
+ /**
16
+ * Event that is triggered when the element is clicked.
17
+ */
18
+ onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;
19
+ /**
20
+ * Description of the item.
21
+ * This will render smaller text below the primary text of the item as well as slightly increasing the height of the item.
22
+ */
23
+ description?: string | JSX.Element;
24
+ /**
25
+ * Primary content for the item.
26
+ */
27
+ children?: React.ReactNode;
28
+ /**
29
+ * A `testId` prop is provided for specified elements,
30
+ * which is a unique string that appears as a data attribute `data-testid` in the rendered code,
31
+ * serving as a hook for automated tests.
32
+ */
33
+ testId?: string;
34
+ /**
35
+ * Custom component to render as an item.
36
+ * This can be both a functional component or a class component.
37
+ * __Will return `null` if no component is defined.__
38
+ *
39
+ * __NOTE:__ Make sure the reference for this component does not change between renders else undefined behavior may happen.
40
+ */
41
+ component?: React.ComponentType<CustomItemComponentProps>;
42
+ }
43
+ /**
44
+ * __Header__
45
+ *
46
+ * - [Examples](https://atlassian.design/components/side-navigation/examples#header-and-footer)
47
+ * - [Code](https://atlassian.design/components/side-navigation/code)
48
+ */
49
+ declare const Header: React.ForwardRefExoticComponent<HeaderProps & React.RefAttributes<HTMLElement>>;
50
+ 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;