@atlaskit/side-navigation 1.6.3 → 1.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/side-navigation
2
2
 
3
+ ## 1.6.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`f7f852b0a4f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f7f852b0a4f) - Migrated use of `gridSize` to space tokens where possible. There is no expected visual or behaviour change.
8
+
9
+ ## 1.6.4
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 1.6.3
4
16
 
5
17
  ### Patch Changes
@@ -13,8 +13,11 @@ var _menu = require("@atlaskit/menu");
13
13
  var _styles = require("../../common/styles");
14
14
  var _context = require("../NestableNavigationContent/context");
15
15
  var _excluded = ["cssFn"];
16
+ /* eslint-disable @repo/internal/react/no-unsafe-overrides */
16
17
  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
18
  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; }
19
+ // Dirty hack to get generics working with forward ref [1/2]
20
+
18
21
  /**
19
22
  * Used to support any custom items needed by products alongside the Header and Footer patterns.
20
23
  * Specific implementation of headers and footers are provided in the examples folder.
@@ -7,16 +7,15 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.outerContainerCSS = exports.innerContainerCSS = exports.containerCSS = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _colors = require("@atlaskit/theme/colors");
10
- var _constants = require("@atlaskit/theme/constants");
11
10
  var _typography = require("@atlaskit/theme/typography");
12
- var _constants2 = require("../../common/constants");
11
+ var _constants = require("../../common/constants");
13
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; }
14
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; }
15
14
  var scrollIndicatorMaskZIndex = 2;
16
15
  var scrollIndicatorZIndex = 1;
17
16
  var scrollIndicatorHeight = 2;
18
17
  var scrollIndicatorBorderRadius = 1;
19
- var containerPadding = (0, _constants.gridSize)();
18
+ var containerPadding = 8;
20
19
  var itemHeadingContentHeight = _typography.headingSizes.h100.lineHeight;
21
20
  var skeletonHeadingHeight = containerPadding;
22
21
  var skeletonHeadingMarginOffset = 3;
@@ -46,7 +45,7 @@ var outerContainerCSS = function outerContainerCSS(opts) {
46
45
  right: containerPadding + opts.scrollbarWidth,
47
46
  height: scrollIndicatorHeight,
48
47
  borderRadius: scrollIndicatorBorderRadius,
49
- backgroundColor: "var(".concat(_constants2.VAR_SEPARATOR_COLOR, ", ", "var(--ds-border, ".concat(_colors.N30, ")"), ")"),
48
+ backgroundColor: "var(".concat(_constants.VAR_SEPARATOR_COLOR, ", ", "var(--ds-border, ".concat(_colors.N30, ")"), ")"),
50
49
  position: 'absolute',
51
50
  zIndex: scrollIndicatorZIndex
52
51
  },
@@ -61,7 +60,7 @@ var outerContainerCSS = function outerContainerCSS(opts) {
61
60
  right: containerPadding + opts.scrollbarWidth,
62
61
  bottom: 0,
63
62
  zIndex: scrollIndicatorZIndex,
64
- backgroundColor: "var(".concat(_constants2.VAR_SEPARATOR_COLOR, ", ", "var(--ds-border, ".concat(_colors.N30, ")"), ")")
63
+ backgroundColor: "var(".concat(_constants.VAR_SEPARATOR_COLOR, ", ", "var(--ds-border, ".concat(_colors.N30, ")"), ")")
65
64
  }
66
65
  };
67
66
  };
@@ -87,7 +86,7 @@ var innerContainerCSS = function innerContainerCSS(opts) {
87
86
  left: 0,
88
87
  right: 0,
89
88
  height: scrollIndicatorHeight,
90
- backgroundColor: "var(".concat(_constants2.VAR_SCROLL_INDICATOR_COLOR, ", ", "var(--ds-surface, ".concat(_colors.N10, ")"), ")"),
89
+ backgroundColor: "var(".concat(_constants.VAR_SCROLL_INDICATOR_COLOR, ", ", "var(--ds-surface, ".concat(_colors.N10, ")"), ")"),
91
90
  position: 'absolute',
92
91
  display: 'block',
93
92
  zIndex: scrollIndicatorMaskZIndex
@@ -105,7 +104,7 @@ var innerContainerCSS = function innerContainerCSS(opts) {
105
104
  marginTop: 'auto',
106
105
  position: 'relative',
107
106
  zIndex: scrollIndicatorMaskZIndex,
108
- backgroundColor: "var(".concat(_constants2.VAR_SCROLL_INDICATOR_COLOR, ", ", "var(--ds-surface, ".concat(_colors.N10, ")"), ")")
107
+ backgroundColor: "var(".concat(_constants.VAR_SCROLL_INDICATOR_COLOR, ", ", "var(--ds-surface, ".concat(_colors.N10, ")"), ")")
109
108
  }
110
109
  });
111
110
  };
@@ -9,7 +9,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
9
9
  var _react = require("@emotion/react");
10
10
  var _motion = require("@atlaskit/motion");
11
11
  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; }
12
- 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; }
12
+ 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; } /** @jsx jsx */
13
13
  /**
14
14
  * @internal
15
15
  */
@@ -23,10 +23,13 @@ var _context = require("../NestableNavigationContent/context");
23
23
  var _hooks = require("../utils/hooks");
24
24
  var _styles2 = require("./styles");
25
25
  var _excluded = ["children", "iconAfter", "title", "onClick", "cssFn", "isSelected", "id", "component", "testId"];
26
+ /** @jsx jsx */
26
27
  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); }
27
28
  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; }
28
29
  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; }
29
30
  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; }
31
+ // Doesn't extend from ButtonItemProps because it blows ERT up.
32
+
30
33
  /**
31
34
  * NestingItem will render itself differently depending in what context it is rendered in.
32
35
  * When not open - it will render itself as an item.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/side-navigation",
3
- "version": "1.6.3",
3
+ "version": "1.6.5",
4
4
  "sideEffects": false
5
5
  }
@@ -4,6 +4,9 @@ import React, { forwardRef } from 'react';
4
4
  import { CustomItem as Custom } from '@atlaskit/menu';
5
5
  import { baseSideNavItemStyle, overrideStyleFunction } from '../../common/styles';
6
6
  import { useShouldNestedElementRender } from '../NestableNavigationContent/context';
7
+
8
+ // Dirty hack to get generics working with forward ref [1/2]
9
+
7
10
  /**
8
11
  * Used to support any custom items needed by products alongside the Header and Footer patterns.
9
12
  * Specific implementation of headers and footers are provided in the examples folder.
@@ -1,12 +1,11 @@
1
1
  import { N10, N30 } from '@atlaskit/theme/colors';
2
- import { gridSize } from '@atlaskit/theme/constants';
3
2
  import { headingSizes } from '@atlaskit/theme/typography';
4
3
  import { VAR_SCROLL_INDICATOR_COLOR, VAR_SEPARATOR_COLOR } from '../../common/constants';
5
4
  const scrollIndicatorMaskZIndex = 2;
6
5
  const scrollIndicatorZIndex = 1;
7
6
  const scrollIndicatorHeight = 2;
8
7
  const scrollIndicatorBorderRadius = 1;
9
- const containerPadding = gridSize();
8
+ const containerPadding = 8;
10
9
  const itemHeadingContentHeight = headingSizes.h100.lineHeight;
11
10
  const skeletonHeadingHeight = containerPadding;
12
11
  const skeletonHeadingMarginOffset = 3;
@@ -11,6 +11,9 @@ import { ROOT_ID } from '../NestableNavigationContent';
11
11
  import { NestedContext, useNestedContext } from '../NestableNavigationContent/context';
12
12
  import { useChildIdsEffect } from '../utils/hooks';
13
13
  import { nestingItemStyle } from './styles';
14
+
15
+ // Doesn't extend from ButtonItemProps because it blows ERT up.
16
+
14
17
  /**
15
18
  * NestingItem will render itself differently depending in what context it is rendered in.
16
19
  * When not open - it will render itself as an item.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/side-navigation",
3
- "version": "1.6.3",
3
+ "version": "1.6.5",
4
4
  "sideEffects": false
5
5
  }
@@ -6,6 +6,9 @@ import React, { forwardRef } from 'react';
6
6
  import { CustomItem as Custom } from '@atlaskit/menu';
7
7
  import { baseSideNavItemStyle, overrideStyleFunction } from '../../common/styles';
8
8
  import { useShouldNestedElementRender } from '../NestableNavigationContent/context';
9
+
10
+ // Dirty hack to get generics working with forward ref [1/2]
11
+
9
12
  /**
10
13
  * Used to support any custom items needed by products alongside the Header and Footer patterns.
11
14
  * Specific implementation of headers and footers are provided in the examples folder.
@@ -2,14 +2,13 @@ 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
4
  import { N10, N30 } from '@atlaskit/theme/colors';
5
- import { gridSize } from '@atlaskit/theme/constants';
6
5
  import { headingSizes } from '@atlaskit/theme/typography';
7
6
  import { VAR_SCROLL_INDICATOR_COLOR, VAR_SEPARATOR_COLOR } from '../../common/constants';
8
7
  var scrollIndicatorMaskZIndex = 2;
9
8
  var scrollIndicatorZIndex = 1;
10
9
  var scrollIndicatorHeight = 2;
11
10
  var scrollIndicatorBorderRadius = 1;
12
- var containerPadding = gridSize();
11
+ var containerPadding = 8;
13
12
  var itemHeadingContentHeight = headingSizes.h100.lineHeight;
14
13
  var skeletonHeadingHeight = containerPadding;
15
14
  var skeletonHeadingMarginOffset = 3;
@@ -18,6 +18,9 @@ import { ROOT_ID } from '../NestableNavigationContent';
18
18
  import { NestedContext, useNestedContext } from '../NestableNavigationContent/context';
19
19
  import { useChildIdsEffect } from '../utils/hooks';
20
20
  import { nestingItemStyle } from './styles';
21
+
22
+ // Doesn't extend from ButtonItemProps because it blows ERT up.
23
+
21
24
  /**
22
25
  * NestingItem will render itself differently depending in what context it is rendered in.
23
26
  * When not open - it will render itself as an item.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/side-navigation",
3
- "version": "1.6.3",
3
+ "version": "1.6.5",
4
4
  "sideEffects": false
5
5
  }
@@ -17,7 +17,7 @@ export declare const outerContainerCSS: (opts: StyleOpts & {
17
17
  readonly '&::before': {
18
18
  readonly content: "''";
19
19
  readonly display: "block";
20
- readonly left: number;
20
+ readonly left: 8;
21
21
  readonly right: number;
22
22
  readonly height: 2;
23
23
  readonly borderRadius: 1;
@@ -32,7 +32,7 @@ export declare const outerContainerCSS: (opts: StyleOpts & {
32
32
  readonly borderRadius: 1;
33
33
  readonly flexShrink: 0;
34
34
  readonly height: 2;
35
- readonly left: number;
35
+ readonly left: 8;
36
36
  readonly right: number;
37
37
  readonly bottom: 0;
38
38
  readonly zIndex: 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/side-navigation",
3
- "version": "1.6.3",
3
+ "version": "1.6.5",
4
4
  "description": "A highly composable side navigation component that supports nested views.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -29,7 +29,7 @@
29
29
  "@atlaskit/icon": "^21.11.0",
30
30
  "@atlaskit/menu": "^1.5.0",
31
31
  "@atlaskit/motion": "^1.3.0",
32
- "@atlaskit/primitives": "^0.6.0",
32
+ "@atlaskit/primitives": "^0.7.0",
33
33
  "@atlaskit/theme": "^12.3.0",
34
34
  "@atlaskit/tokens": "^1.2.0",
35
35
  "@babel/runtime": "^7.0.0",
@@ -42,7 +42,7 @@
42
42
  "@atlaskit/atlassian-navigation": "^2.4.0",
43
43
  "@atlaskit/button": "^16.6.0",
44
44
  "@atlaskit/docs": "*",
45
- "@atlaskit/logo": "^13.11.0",
45
+ "@atlaskit/logo": "^13.12.0",
46
46
  "@atlaskit/onboarding": "^10.7.0",
47
47
  "@atlaskit/section-message": "^6.3.0",
48
48
  "@atlaskit/select": "^16.1.0",
@@ -67,7 +67,6 @@
67
67
  "design-system": "v1",
68
68
  "dom-events": "use-bind-event-listener",
69
69
  "ui-components": [
70
- "primitives",
71
70
  "lite-mode"
72
71
  ],
73
72
  "design-tokens": [