@atlaskit/side-navigation 1.2.0 → 1.2.4
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 +27 -0
- package/dist/cjs/common/constants.js +1 -1
- package/dist/cjs/common/styles.js +17 -17
- package/dist/cjs/components/Footer/index.js +1 -3
- package/dist/cjs/components/Header/index.js +5 -5
- package/dist/cjs/components/Item/button-item.js +5 -2
- package/dist/cjs/components/Item/custom-item.js +5 -2
- package/dist/cjs/components/Item/go-back-item.js +4 -4
- package/dist/cjs/components/Item/link-item.js +5 -2
- package/dist/cjs/components/Item/skeleton-item.js +2 -1
- package/dist/cjs/components/NavigationContent/styles.js +7 -9
- package/dist/cjs/components/NestableNavigationContent/nesting-motion.js +2 -2
- package/dist/cjs/components/NestingItem/index.js +6 -6
- package/dist/cjs/components/NestingItem/styles.js +2 -2
- package/dist/cjs/components/Section/heading-item.js +2 -1
- package/dist/cjs/components/Section/section.js +2 -1
- package/dist/cjs/components/Section/skeleton-heading-item.js +2 -1
- package/dist/cjs/components/SideNavigation/index.js +2 -4
- package/dist/cjs/components/index.js +34 -34
- package/dist/cjs/index.js +38 -38
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/common/styles.js +14 -13
- package/dist/es2019/components/Footer/index.js +1 -2
- package/dist/es2019/components/Header/index.js +2 -3
- package/dist/es2019/components/Item/button-item.js +2 -1
- package/dist/es2019/components/Item/custom-item.js +2 -1
- package/dist/es2019/components/Item/go-back-item.js +1 -2
- package/dist/es2019/components/Item/link-item.js +2 -1
- package/dist/es2019/components/Item/skeleton-item.js +2 -1
- package/dist/es2019/components/NavigationContent/styles.js +4 -5
- package/dist/es2019/components/NestingItem/index.js +1 -2
- package/dist/es2019/components/Section/heading-item.js +2 -1
- package/dist/es2019/components/Section/section.js +2 -1
- package/dist/es2019/components/Section/skeleton-heading-item.js +2 -1
- package/dist/es2019/components/SideNavigation/index.js +2 -3
- package/dist/es2019/version.json +1 -1
- package/dist/esm/common/styles.js +16 -15
- package/dist/esm/components/Footer/index.js +1 -2
- package/dist/esm/components/Header/index.js +4 -4
- package/dist/esm/components/Item/button-item.js +4 -2
- package/dist/esm/components/Item/custom-item.js +4 -2
- package/dist/esm/components/Item/go-back-item.js +3 -3
- package/dist/esm/components/Item/link-item.js +4 -2
- package/dist/esm/components/Item/skeleton-item.js +2 -1
- package/dist/esm/components/NavigationContent/styles.js +6 -7
- package/dist/esm/components/NestableNavigationContent/nesting-motion.js +2 -2
- package/dist/esm/components/NestingItem/index.js +5 -5
- package/dist/esm/components/NestingItem/styles.js +2 -2
- package/dist/esm/components/Section/heading-item.js +2 -1
- package/dist/esm/components/Section/section.js +2 -1
- package/dist/esm/components/Section/skeleton-heading-item.js +2 -1
- package/dist/esm/components/SideNavigation/index.js +2 -3
- package/dist/esm/version.json +1 -1
- package/dist/types/common/styles.d.ts +2 -0
- package/dist/types/components/Footer/index.d.ts +1 -0
- package/dist/types/components/Header/index.d.ts +1 -0
- package/dist/types/components/Item/custom-item.d.ts +1 -0
- package/dist/types/components/Item/skeleton-item.d.ts +1 -0
- package/dist/types/components/NavigationHeader/index.d.ts +1 -0
- package/dist/types/components/NestableNavigationContent/index.d.ts +2 -0
- package/dist/types/components/Section/heading-item.d.ts +1 -0
- package/dist/types/components/Section/skeleton-heading-item.d.ts +1 -0
- package/package.json +6 -6
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
|
|
3
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
3
|
+
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; }
|
|
4
4
|
|
|
5
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
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
|
import { B400, B50, N10, N30, N500 } from '@atlaskit/theme/colors';
|
|
8
8
|
import { borderRadius as borderRadiusFn, gridSize as gridSizeFn } from '@atlaskit/theme/constants';
|
|
9
|
-
import { token } from '@atlaskit/tokens';
|
|
10
9
|
var gridSize = gridSizeFn();
|
|
11
10
|
var borderRadius = borderRadiusFn();
|
|
12
11
|
var itemIconSize = gridSize * 3;
|
|
@@ -16,6 +15,8 @@ export var ITEM_SIDE_PADDING = gridSize * 1.25;
|
|
|
16
15
|
* Allows chaining of style functions on top of base style functions
|
|
17
16
|
* @param baseStyle the base custom cssFn
|
|
18
17
|
* @param newStyle a new cssFn to be applied after the base style
|
|
18
|
+
*
|
|
19
|
+
* @deprecated Please avoid using this prop as we intend to remove the prop completely in a future release. See DSP-2682 for more information.
|
|
19
20
|
*/
|
|
20
21
|
|
|
21
22
|
export var overrideStyleFunction = function overrideStyleFunction(baseStyle) {
|
|
@@ -28,27 +29,27 @@ export var overrideStyleFunction = function overrideStyleFunction(baseStyle) {
|
|
|
28
29
|
};
|
|
29
30
|
var defaultStyles = {
|
|
30
31
|
'&:hover': {
|
|
31
|
-
color:
|
|
32
|
-
backgroundColor:
|
|
32
|
+
color: "var(--ds-text-subtle, ".concat(N500, ")"),
|
|
33
|
+
backgroundColor: "var(--ds-background-neutral-subtle-hovered, ".concat(N30, ")")
|
|
33
34
|
},
|
|
34
35
|
'&:active': {
|
|
35
|
-
color:
|
|
36
|
-
backgroundColor:
|
|
36
|
+
color: "var(--ds-text-subtle, ".concat(B400, ")"),
|
|
37
|
+
backgroundColor: "var(--ds-background-neutral-subtle-pressed, ".concat(B50, ")")
|
|
37
38
|
}
|
|
38
39
|
};
|
|
39
40
|
var selectedStyles = {
|
|
40
|
-
backgroundColor:
|
|
41
|
-
color:
|
|
41
|
+
backgroundColor: "var(--ds-background-brand, ".concat(N30, ")"),
|
|
42
|
+
color: "var(--ds-text-brand, ".concat(B400, ")"),
|
|
42
43
|
':visited': {
|
|
43
|
-
color:
|
|
44
|
+
color: "var(--ds-text-brand, ".concat(B400, ")")
|
|
44
45
|
},
|
|
45
46
|
'&:hover': {
|
|
46
|
-
backgroundColor:
|
|
47
|
-
color:
|
|
47
|
+
backgroundColor: "var(--ds-background-brand-hovered, ".concat(N30, ")"),
|
|
48
|
+
color: "var(--ds-text-brand, ".concat(N500, ")")
|
|
48
49
|
},
|
|
49
50
|
'&:active': {
|
|
50
|
-
backgroundColor:
|
|
51
|
-
color:
|
|
51
|
+
backgroundColor: "var(--ds-background-brand-pressed, ".concat(B50, ")"),
|
|
52
|
+
color: "var(--ds-text-brand, ".concat(B400, ")")
|
|
52
53
|
}
|
|
53
54
|
};
|
|
54
55
|
export var baseSideNavItemStyle = function baseSideNavItemStyle(_ref) {
|
|
@@ -62,7 +63,7 @@ export var baseSideNavItemStyle = function baseSideNavItemStyle(_ref) {
|
|
|
62
63
|
// -- TODO: DELETE THESE COLOR OVERRIDES WHEN CLEANING UP FALLBACK THEMING --
|
|
63
64
|
// Menu and side navigation are now color aligned so they do not need this!
|
|
64
65
|
// See: https://product-fabric.atlassian.net/browse/DSP-1684
|
|
65
|
-
backgroundColor:
|
|
66
|
+
backgroundColor: "var(--ds-surface, ".concat(N10, ")")
|
|
66
67
|
}, !isDisabled && !isSelected && defaultStyles), !isDisabled && isSelected && selectedStyles), {}, _defineProperty({}, '& [data-item-elem-before]', {
|
|
67
68
|
// TODO: Can this be moved into menu?
|
|
68
69
|
// center align icons with app-switcher regardless of size
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { N500 } from '@atlaskit/theme/colors';
|
|
4
|
-
import { token } from '@atlaskit/tokens';
|
|
5
4
|
import { overrideStyleFunction } from '../../common/styles';
|
|
6
5
|
import { CustomItem } from '../Item';
|
|
7
6
|
|
|
@@ -39,7 +38,7 @@ var Footer = function Footer(props) {
|
|
|
39
38
|
},
|
|
40
39
|
'div&:active': {
|
|
41
40
|
backgroundColor: 'transparent',
|
|
42
|
-
color:
|
|
41
|
+
color: "var(--ds-text-subtle, ".concat(N500, ")")
|
|
43
42
|
}
|
|
44
43
|
};
|
|
45
44
|
}, props.cssFn);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
+
var _excluded = ["children"];
|
|
4
5
|
import React, { forwardRef } from 'react';
|
|
5
6
|
import { N500 } from '@atlaskit/theme/colors';
|
|
6
7
|
import { headingSizes } from '@atlaskit/theme/typography';
|
|
7
|
-
import { token } from '@atlaskit/tokens';
|
|
8
8
|
import { overrideStyleFunction } from '../../common/styles';
|
|
9
9
|
import { CustomItem } from '../Item';
|
|
10
10
|
|
|
@@ -22,13 +22,13 @@ var Header = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
22
22
|
fontSize: headingSizes.h400.size,
|
|
23
23
|
letterSpacing: '-0.003em',
|
|
24
24
|
fontWeight: 600,
|
|
25
|
-
color:
|
|
25
|
+
color: "var(--ds-text, ".concat(N500, ")")
|
|
26
26
|
}), _defineProperty(_ref, 'div&:hover', {
|
|
27
27
|
backgroundColor: 'transparent',
|
|
28
28
|
cursor: 'default'
|
|
29
29
|
}), _defineProperty(_ref, 'div&:active', {
|
|
30
30
|
backgroundColor: 'transparent',
|
|
31
|
-
color:
|
|
31
|
+
color: "var(--ds-text, ".concat(N500, ")")
|
|
32
32
|
}), _ref;
|
|
33
33
|
}, props.cssFn);
|
|
34
34
|
return /*#__PURE__*/React.createElement(CustomItem, _extends({}, props, {
|
|
@@ -39,7 +39,7 @@ var Header = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
39
39
|
Title: {
|
|
40
40
|
render: function render(_, _ref2) {
|
|
41
41
|
var children = _ref2.children,
|
|
42
|
-
props = _objectWithoutProperties(_ref2,
|
|
42
|
+
props = _objectWithoutProperties(_ref2, _excluded);
|
|
43
43
|
|
|
44
44
|
return /*#__PURE__*/React.createElement("h2", props, children);
|
|
45
45
|
}
|
|
@@ -1,5 +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
4
|
import React, { forwardRef } from 'react';
|
|
4
5
|
import { ButtonItem as Button } from '@atlaskit/menu';
|
|
5
6
|
import { baseSideNavItemStyle, overrideStyleFunction } from '../../common/styles';
|
|
@@ -7,7 +8,7 @@ import { useShouldNestedElementRender } from '../NestableNavigationContent/conte
|
|
|
7
8
|
var ButtonItem = /*#__PURE__*/forwardRef( // Type needed on props to extract types with extract react types.
|
|
8
9
|
function (_ref, ref) {
|
|
9
10
|
var cssFn = _ref.cssFn,
|
|
10
|
-
rest = _objectWithoutProperties(_ref,
|
|
11
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
11
12
|
|
|
12
13
|
var _useShouldNestedEleme = useShouldNestedElementRender(),
|
|
13
14
|
shouldRender = _useShouldNestedEleme.shouldRender;
|
|
@@ -16,7 +17,8 @@ function (_ref, ref) {
|
|
|
16
17
|
return null;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
|
-
var cssOverride = overrideStyleFunction(baseSideNavItemStyle, cssFn);
|
|
20
|
+
var cssOverride = overrideStyleFunction(baseSideNavItemStyle, cssFn); // eslint-disable-next-line @atlaskit/design-system/no-deprecated-apis
|
|
21
|
+
|
|
20
22
|
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
21
23
|
ref: ref,
|
|
22
24
|
cssFn: cssOverride
|
|
@@ -1,5 +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
4
|
import React, { forwardRef } from 'react';
|
|
4
5
|
import { CustomItem as Custom } from '@atlaskit/menu';
|
|
5
6
|
import { baseSideNavItemStyle, overrideStyleFunction } from '../../common/styles';
|
|
@@ -12,7 +13,7 @@ import { useShouldNestedElementRender } from '../NestableNavigationContent/conte
|
|
|
12
13
|
var CustomItem = /*#__PURE__*/forwardRef( // Type needed on props to extract types with extract react types.
|
|
13
14
|
function (_ref, ref) {
|
|
14
15
|
var cssFn = _ref.cssFn,
|
|
15
|
-
rest = _objectWithoutProperties(_ref,
|
|
16
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
16
17
|
|
|
17
18
|
var _useShouldNestedEleme = useShouldNestedElementRender(),
|
|
18
19
|
shouldRender = _useShouldNestedEleme.shouldRender;
|
|
@@ -21,7 +22,8 @@ function (_ref, ref) {
|
|
|
21
22
|
return null;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
var cssOverride = overrideStyleFunction(baseSideNavItemStyle, cssFn);
|
|
25
|
+
var cssOverride = overrideStyleFunction(baseSideNavItemStyle, cssFn); // eslint-disable-next-line @atlaskit/design-system/no-deprecated-apis
|
|
26
|
+
|
|
25
27
|
return /*#__PURE__*/React.createElement(Custom, _extends({
|
|
26
28
|
ref: ref,
|
|
27
29
|
cssFn: cssOverride
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["cssFn", "iconBefore", "onClick", "isSelected"];
|
|
4
5
|
import React, { forwardRef, useCallback, useState } from 'react';
|
|
5
6
|
import LeftArrow from '@atlaskit/icon/glyph/arrow-left-circle';
|
|
6
7
|
import { N10 } from '@atlaskit/theme/colors';
|
|
7
|
-
import { token } from '@atlaskit/tokens';
|
|
8
8
|
import ButtonItem from './button-item';
|
|
9
9
|
var GoBackItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
10
10
|
var cssFn = _ref.cssFn,
|
|
11
11
|
_ref$iconBefore = _ref.iconBefore,
|
|
12
12
|
iconBefore = _ref$iconBefore === void 0 ? /*#__PURE__*/React.createElement(LeftArrow, {
|
|
13
|
-
secondaryColor:
|
|
13
|
+
secondaryColor: "var(--ds-surface, ".concat(N10, ")"),
|
|
14
14
|
label: ""
|
|
15
15
|
}) : _ref$iconBefore,
|
|
16
16
|
onClick = _ref.onClick,
|
|
17
17
|
isSelected = _ref.isSelected,
|
|
18
|
-
rest = _objectWithoutProperties(_ref,
|
|
18
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
19
19
|
|
|
20
20
|
var _useState = useState(false),
|
|
21
21
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -1,5 +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
4
|
import React, { forwardRef } from 'react';
|
|
4
5
|
import { LinkItem as Link } from '@atlaskit/menu';
|
|
5
6
|
import { baseSideNavItemStyle, overrideStyleFunction } from '../../common/styles';
|
|
@@ -7,7 +8,7 @@ import { useShouldNestedElementRender } from '../NestableNavigationContent/conte
|
|
|
7
8
|
var LinkItem = /*#__PURE__*/forwardRef( // Type needed on props to extract types with extract react types.
|
|
8
9
|
function (_ref, ref) {
|
|
9
10
|
var cssFn = _ref.cssFn,
|
|
10
|
-
rest = _objectWithoutProperties(_ref,
|
|
11
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
11
12
|
|
|
12
13
|
var _useShouldNestedEleme = useShouldNestedElementRender(),
|
|
13
14
|
shouldRender = _useShouldNestedEleme.shouldRender;
|
|
@@ -16,7 +17,8 @@ function (_ref, ref) {
|
|
|
16
17
|
return null;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
|
-
var cssOverride = overrideStyleFunction(baseSideNavItemStyle, cssFn);
|
|
20
|
+
var cssOverride = overrideStyleFunction(baseSideNavItemStyle, cssFn); // eslint-disable-next-line @atlaskit/design-system/no-deprecated-apis
|
|
21
|
+
|
|
20
22
|
return /*#__PURE__*/React.createElement(Link, _extends({
|
|
21
23
|
ref: ref,
|
|
22
24
|
cssFn: cssOverride
|
|
@@ -12,7 +12,8 @@ var SkeletonItem = function SkeletonItem(props) {
|
|
|
12
12
|
return null;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
return /*#__PURE__*/React.createElement(SkelItem
|
|
15
|
+
return /*#__PURE__*/React.createElement(SkelItem // eslint-disable-next-line @atlaskit/design-system/no-deprecated-apis
|
|
16
|
+
, _extends({
|
|
16
17
|
cssFn: function cssFn() {
|
|
17
18
|
return {
|
|
18
19
|
paddingLeft: ITEM_SIDE_PADDING,
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
|
|
3
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
3
|
+
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; }
|
|
4
4
|
|
|
5
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
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
|
import { N10, N30 } from '@atlaskit/theme/colors';
|
|
8
8
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
9
9
|
import { headingSizes } from '@atlaskit/theme/typography';
|
|
10
|
-
import { token } from '@atlaskit/tokens';
|
|
11
10
|
import { VAR_SCROLL_INDICATOR_COLOR, VAR_SEPARATOR_COLOR } from '../../common/constants';
|
|
12
11
|
var scrollIndicatorMaskZIndex = 2;
|
|
13
12
|
var scrollIndicatorZIndex = 1;
|
|
@@ -46,7 +45,7 @@ export var outerContainerCSS = function outerContainerCSS(opts) {
|
|
|
46
45
|
right: containerPadding + opts.scrollbarWidth,
|
|
47
46
|
height: scrollIndicatorHeight,
|
|
48
47
|
borderRadius: scrollIndicatorBorderRadius,
|
|
49
|
-
backgroundColor: "var(".concat(VAR_SEPARATOR_COLOR, ", ").concat(
|
|
48
|
+
backgroundColor: "var(".concat(VAR_SEPARATOR_COLOR, ", ").concat("var(--ds-border, ".concat(N30, ")"), ")"),
|
|
50
49
|
position: 'absolute',
|
|
51
50
|
zIndex: scrollIndicatorZIndex
|
|
52
51
|
},
|
|
@@ -61,7 +60,7 @@ export var outerContainerCSS = function outerContainerCSS(opts) {
|
|
|
61
60
|
right: containerPadding + opts.scrollbarWidth,
|
|
62
61
|
bottom: 0,
|
|
63
62
|
zIndex: scrollIndicatorZIndex,
|
|
64
|
-
backgroundColor: "var(".concat(VAR_SEPARATOR_COLOR, ", ").concat(
|
|
63
|
+
backgroundColor: "var(".concat(VAR_SEPARATOR_COLOR, ", ").concat("var(--ds-border, ".concat(N30, ")"), ")")
|
|
65
64
|
}
|
|
66
65
|
};
|
|
67
66
|
};
|
|
@@ -86,7 +85,7 @@ export var innerContainerCSS = function innerContainerCSS(opts) {
|
|
|
86
85
|
left: 0,
|
|
87
86
|
right: 0,
|
|
88
87
|
height: scrollIndicatorHeight,
|
|
89
|
-
backgroundColor: "var(".concat(VAR_SCROLL_INDICATOR_COLOR, ", ").concat(
|
|
88
|
+
backgroundColor: "var(".concat(VAR_SCROLL_INDICATOR_COLOR, ", ").concat("var(--ds-surface, ".concat(N10, ")"), ")"),
|
|
90
89
|
position: 'absolute',
|
|
91
90
|
display: 'block',
|
|
92
91
|
zIndex: scrollIndicatorMaskZIndex
|
|
@@ -104,7 +103,7 @@ export var innerContainerCSS = function innerContainerCSS(opts) {
|
|
|
104
103
|
marginTop: 'auto',
|
|
105
104
|
position: 'relative',
|
|
106
105
|
zIndex: scrollIndicatorMaskZIndex,
|
|
107
|
-
backgroundColor: "var(".concat(VAR_SCROLL_INDICATOR_COLOR, ", ").concat(
|
|
106
|
+
backgroundColor: "var(".concat(VAR_SCROLL_INDICATOR_COLOR, ", ").concat("var(--ds-surface, ".concat(N10, ")"), ")")
|
|
108
107
|
}
|
|
109
108
|
});
|
|
110
109
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
|
|
3
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
3
|
+
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; }
|
|
4
4
|
|
|
5
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
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
8
|
import { jsx } from '@emotion/core';
|
|
@@ -3,10 +3,11 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
4
4
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
5
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
6
|
+
var _excluded = ["children", "iconAfter", "title", "onClick", "cssFn", "isSelected", "id", "component", "testId"];
|
|
6
7
|
|
|
7
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
8
|
+
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; }
|
|
8
9
|
|
|
9
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
10
|
+
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; }
|
|
10
11
|
|
|
11
12
|
/** @jsx jsx */
|
|
12
13
|
import React, { Fragment, useCallback, useMemo, useState } from 'react';
|
|
@@ -14,7 +15,6 @@ import { jsx } from '@emotion/core';
|
|
|
14
15
|
import RightArrow from '@atlaskit/icon/glyph/arrow-right-circle';
|
|
15
16
|
import { N10 } from '@atlaskit/theme/colors';
|
|
16
17
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
17
|
-
import { token } from '@atlaskit/tokens';
|
|
18
18
|
import { overrideStyleFunction } from '../../common/styles';
|
|
19
19
|
import { ButtonItem, CustomItem, NavigationContent } from '../index';
|
|
20
20
|
import { ROOT_ID } from '../NestableNavigationContent';
|
|
@@ -36,7 +36,7 @@ var NestingItem = function NestingItem(props) {
|
|
|
36
36
|
id = props.id,
|
|
37
37
|
component = props.component,
|
|
38
38
|
testId = props.testId,
|
|
39
|
-
rest = _objectWithoutProperties(props,
|
|
39
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
40
40
|
|
|
41
41
|
var _useNestedContext = useNestedContext(),
|
|
42
42
|
currentStackId = _useNestedContext.currentStackId,
|
|
@@ -120,7 +120,7 @@ var NestingItem = function NestingItem(props) {
|
|
|
120
120
|
"data-right-arrow": true
|
|
121
121
|
}, jsx(RightArrow, {
|
|
122
122
|
testId: testId && "".concat(testId, "--item--right-arrow"),
|
|
123
|
-
secondaryColor:
|
|
123
|
+
secondaryColor: "var(--ds-surface, ".concat(N10, ")"),
|
|
124
124
|
label: ""
|
|
125
125
|
}))),
|
|
126
126
|
onClick: onClickHandler,
|
|
@@ -2,9 +2,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
|
|
3
3
|
var _enabledCSS, _disabledCSS;
|
|
4
4
|
|
|
5
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
5
|
+
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; }
|
|
6
6
|
|
|
7
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
7
|
+
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; }
|
|
8
8
|
|
|
9
9
|
// exposed for testing purposes
|
|
10
10
|
export var enabledCSS = (_enabledCSS = {}, _defineProperty(_enabledCSS, '&:hover [data-custom-icon]', {
|
|
@@ -12,7 +12,8 @@ var HeadingItem = function HeadingItem(props) {
|
|
|
12
12
|
return null;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
var cssFn = overrideStyleFunction(sectionHeaderStyle, props.cssFn);
|
|
15
|
+
var cssFn = overrideStyleFunction(sectionHeaderStyle, props.cssFn); // eslint-disable-next-line @atlaskit/design-system/no-deprecated-apis
|
|
16
|
+
|
|
16
17
|
return /*#__PURE__*/React.createElement(MenuHeadingItem, _extends({}, props, {
|
|
17
18
|
cssFn: cssFn
|
|
18
19
|
}));
|
|
@@ -13,7 +13,8 @@ var Section = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
return /*#__PURE__*/React.createElement(MenuSection, _extends({}, props, {
|
|
16
|
-
ref: ref
|
|
16
|
+
ref: ref // eslint-disable-next-line @atlaskit/design-system/no-deprecated-apis
|
|
17
|
+
,
|
|
17
18
|
overrides: {
|
|
18
19
|
HeadingItem: {
|
|
19
20
|
cssFn: sectionHeaderStyle
|
|
@@ -12,7 +12,8 @@ var SkeletonHeadingItem = function SkeletonHeadingItem(props) {
|
|
|
12
12
|
return null;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
return /*#__PURE__*/React.createElement(MenuSkeletonHeadingItem
|
|
15
|
+
return /*#__PURE__*/React.createElement(MenuSkeletonHeadingItem // eslint-disable-next-line @atlaskit/design-system/no-deprecated-apis
|
|
16
|
+
, _extends({
|
|
16
17
|
cssFn: function cssFn() {
|
|
17
18
|
return {
|
|
18
19
|
paddingLeft: ITEM_SIDE_PADDING,
|
|
@@ -3,7 +3,6 @@ import { forwardRef } from 'react';
|
|
|
3
3
|
import { jsx } from '@emotion/core';
|
|
4
4
|
import { N10, N500 } from '@atlaskit/theme/colors';
|
|
5
5
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
6
|
-
import { token } from '@atlaskit/tokens';
|
|
7
6
|
var SideNavigation = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
8
7
|
var children = props.children,
|
|
9
8
|
testId = props.testId,
|
|
@@ -15,9 +14,9 @@ var SideNavigation = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
15
14
|
css: {
|
|
16
15
|
width: '100%',
|
|
17
16
|
height: '100%',
|
|
18
|
-
color:
|
|
17
|
+
color: "var(--ds-text-subtle, ".concat(N500, ")"),
|
|
19
18
|
minWidth: gridSize() * 30,
|
|
20
|
-
backgroundColor:
|
|
19
|
+
backgroundColor: "var(--ds-surface, ".concat(N10, ")"),
|
|
21
20
|
position: 'relative',
|
|
22
21
|
display: 'flex',
|
|
23
22
|
flexDirection: 'column',
|
package/dist/esm/version.json
CHANGED
|
@@ -4,6 +4,8 @@ export declare const ITEM_SIDE_PADDING: number;
|
|
|
4
4
|
* Allows chaining of style functions on top of base style functions
|
|
5
5
|
* @param baseStyle the base custom cssFn
|
|
6
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.
|
|
7
9
|
*/
|
|
8
10
|
export declare const overrideStyleFunction: <TState>(baseStyle: CSSFn<TState>, newStyle?: CSSFn<TState> | undefined) => CSSFn<TState>;
|
|
9
11
|
export declare const baseSideNavItemStyle: CSSFn;
|
|
@@ -4,6 +4,7 @@ export interface HeaderProps {
|
|
|
4
4
|
/**
|
|
5
5
|
* A function that can be used to override the styles of the component.
|
|
6
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.
|
|
7
8
|
*/
|
|
8
9
|
cssFn?: CSSFn;
|
|
9
10
|
/**
|
|
@@ -39,6 +39,8 @@ export interface NestableNavigationContentProps {
|
|
|
39
39
|
onChange?: (stack: string[]) => void;
|
|
40
40
|
/**
|
|
41
41
|
* Custom overrides for the composed components.
|
|
42
|
+
*
|
|
43
|
+
* @deprecated Please avoid using this prop as we intend to remove the prop completely in a future release. See DSP-2682 for more information.
|
|
42
44
|
*/
|
|
43
45
|
overrides?: {
|
|
44
46
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/side-navigation",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"description": "A highly composable side navigation component that supports nested views.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@atlaskit/ds-lib": "^1.
|
|
27
|
-
"@atlaskit/icon": "^21.
|
|
26
|
+
"@atlaskit/ds-lib": "^1.4.0",
|
|
27
|
+
"@atlaskit/icon": "^21.10.0",
|
|
28
28
|
"@atlaskit/menu": "^1.2.0",
|
|
29
29
|
"@atlaskit/motion": "^1.0.0",
|
|
30
|
-
"@atlaskit/theme": "^12.
|
|
31
|
-
"@atlaskit/tokens": "^0.
|
|
30
|
+
"@atlaskit/theme": "^12.1.0",
|
|
31
|
+
"@atlaskit/tokens": "^0.6.0",
|
|
32
32
|
"@babel/runtime": "^7.0.0",
|
|
33
33
|
"@emotion/core": "^10.0.9"
|
|
34
34
|
},
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"react": "^16.8.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@atlaskit/atlassian-navigation": "^1.
|
|
39
|
+
"@atlaskit/atlassian-navigation": "^2.1.0",
|
|
40
40
|
"@atlaskit/button": "^16.0.0",
|
|
41
41
|
"@atlaskit/docs": "*",
|
|
42
42
|
"@atlaskit/logo": "^13.5.0",
|