@atlaskit/side-navigation 7.0.0 → 8.0.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.
- package/CHANGELOG.md +18 -0
- package/dist/cjs/components/Footer/index.js +1 -3
- package/dist/cjs/components/Header/index.js +1 -4
- package/dist/cjs/components/NestingItem/index.compiled.css +5 -1
- package/dist/cjs/components/NestingItem/index.js +15 -9
- package/dist/es2019/components/Footer/index.js +1 -3
- package/dist/es2019/components/Header/index.js +1 -4
- package/dist/es2019/components/NestingItem/index.compiled.css +5 -1
- package/dist/es2019/components/NestingItem/index.js +14 -8
- package/dist/esm/components/Footer/index.js +1 -3
- package/dist/esm/components/Header/index.js +1 -4
- package/dist/esm/components/NestingItem/index.compiled.css +5 -1
- package/dist/esm/components/NestingItem/index.js +15 -9
- package/dist/types/components/NestingItem/index.d.ts +3 -4
- package/dist/types-ts4.5/components/NestingItem/index.d.ts +3 -4
- package/package.json +14 -14
- package/dist/cjs/components/NestingItem/styles.js +0 -36
- package/dist/es2019/components/NestingItem/styles.js +0 -40
- package/dist/esm/components/NestingItem/styles.js +0 -29
- package/dist/types/components/NestingItem/styles.d.ts +0 -28
- package/dist/types-ts4.5/components/NestingItem/styles.d.ts +0 -28
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/side-navigation
|
|
2
2
|
|
|
3
|
+
## 8.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#138235](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/138235)
|
|
8
|
+
[`98d3b1420253a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/98d3b1420253a) -
|
|
9
|
+
Removes the deprecated `cssFn` prop from `NestingItem` and adds the `className` prop. This allows
|
|
10
|
+
`NestingItem` style overrides that are compatible with Compiled CSS-in-JS.
|
|
11
|
+
|
|
12
|
+
## 7.0.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#129972](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/129972)
|
|
17
|
+
[`b2d69a39e6687`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b2d69a39e6687) -
|
|
18
|
+
Update `@compiled/react` dependency for improved type checking support.
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 7.0.0
|
|
4
22
|
|
|
5
23
|
### Major Changes
|
|
@@ -46,9 +46,7 @@ var OldFooter = function OldFooter(props) {
|
|
|
46
46
|
};
|
|
47
47
|
}(props);
|
|
48
48
|
return /*#__PURE__*/React.createElement(_Item.CustomItem, (0, _extends2.default)({}, safeProps, {
|
|
49
|
-
component: props.component || _Header.Container
|
|
50
|
-
// @ts-expect-error
|
|
51
|
-
,
|
|
49
|
+
component: props.component || _Header.Container,
|
|
52
50
|
className: (0, _runtime.ax)([styles.oldFooter])
|
|
53
51
|
}));
|
|
54
52
|
};
|
|
@@ -72,10 +72,7 @@ var Container = exports.Container = function Container(_ref) {
|
|
|
72
72
|
var Header = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
73
73
|
return /*#__PURE__*/_react.default.createElement(_Item.CustomItem, (0, _extends2.default)({}, props, {
|
|
74
74
|
ref: ref,
|
|
75
|
-
component: props.component || Container
|
|
76
|
-
// @ts-expect-error
|
|
77
|
-
,
|
|
78
|
-
|
|
75
|
+
component: props.component || Container,
|
|
79
76
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
|
|
80
77
|
overrides: {
|
|
81
78
|
Title: {
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
.
|
|
1
|
+
._1c06idpf [data-item-elem-after]{opacity:0}
|
|
2
|
+
._1e0c1nu9{display:inline}
|
|
3
|
+
._9mqr1kw7:active [data-right-arrow], ._povs1kw7:focus [data-right-arrow], ._uv2d1kw7:hover [data-right-arrow], ._atks1kw7 [data-custom-icon]{display:inherit}
|
|
4
|
+
._udl3glyw [data-right-arrow], ._kqsfglyw:active [data-custom-icon], ._udrwglyw:focus [data-custom-icon], ._13qvglyw:hover [data-custom-icon]{display:none}
|
|
5
|
+
._udl3glyw [data-right-arrow]{display:none}
|
|
@@ -19,19 +19,19 @@ var _arrowRightArrowRightCircle = _interopRequireDefault(require("@atlaskit/icon
|
|
|
19
19
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
20
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
21
21
|
var _colors = require("@atlaskit/theme/colors");
|
|
22
|
-
var _styles = require("../../common/styles");
|
|
23
22
|
var _index = require("../index");
|
|
24
23
|
var _NestableNavigationContent = require("../NestableNavigationContent");
|
|
25
24
|
var _context = require("../NestableNavigationContent/context");
|
|
26
25
|
var _hooks = require("../utils/hooks");
|
|
27
|
-
var
|
|
28
|
-
var _excluded = ["children", "iconAfter", "title", "onClick", "cssFn", "isSelected", "id", "component", "testId"];
|
|
26
|
+
var _excluded = ["children", "iconAfter", "title", "onClick", "className", "isDisabled", "isSelected", "id", "component", "testId"];
|
|
29
27
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
30
28
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
31
29
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
32
30
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
33
31
|
var styles = {
|
|
34
|
-
iconContainer: "_1e0c1nu9"
|
|
32
|
+
iconContainer: "_1e0c1nu9",
|
|
33
|
+
nestingItem: "_udl3glyw _kqsfglyw _udrwglyw _13qvglyw _9mqr1kw7 _povs1kw7 _uv2d1kw7 _atks1kw7",
|
|
34
|
+
nestingItemDisabled: "_1c06idpf _udl3glyw"
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
// Doesn't extend from ButtonItemProps because it blows ERT up.
|
|
@@ -46,7 +46,8 @@ var NestingItem = function NestingItem(props) {
|
|
|
46
46
|
iconAfter = props.iconAfter,
|
|
47
47
|
title = props.title,
|
|
48
48
|
onClick = props.onClick,
|
|
49
|
-
|
|
49
|
+
className = props.className,
|
|
50
|
+
isDisabled = props.isDisabled,
|
|
50
51
|
isSelected = props.isSelected,
|
|
51
52
|
id = props.id,
|
|
52
53
|
component = props.component,
|
|
@@ -64,7 +65,6 @@ var NestingItem = function NestingItem(props) {
|
|
|
64
65
|
goBackButtonRef = _useNestedContext.goBackButtonRef,
|
|
65
66
|
isDefaultFocusControl = _useNestedContext.isDefaultFocusControl,
|
|
66
67
|
focusGoBackButton = _useNestedContext.focusGoBackButton;
|
|
67
|
-
var mergedStyles = (0, _styles.overrideStyleFunction)(_styles2.nestingItemStyle, cssFn);
|
|
68
68
|
var _useState = (0, _react.useState)(false),
|
|
69
69
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
70
70
|
isInteracted = _useState2[0],
|
|
@@ -170,21 +170,27 @@ var NestingItem = function NestingItem(props) {
|
|
|
170
170
|
}))),
|
|
171
171
|
onClick: onClickHandler,
|
|
172
172
|
isSelected: isSelected,
|
|
173
|
+
isDisabled: isDisabled,
|
|
173
174
|
testId: testId && "".concat(testId, "--item")
|
|
174
175
|
}, rest), {}, {
|
|
175
|
-
children: title
|
|
176
|
-
cssFn: mergedStyles
|
|
176
|
+
children: title
|
|
177
177
|
});
|
|
178
178
|
if (component) {
|
|
179
179
|
return /*#__PURE__*/_react.default.createElement(_index.CustomItem, (0, _extends2.default)({
|
|
180
180
|
ref: isForwardRefCheck(component) ? parentItemRef : null
|
|
181
181
|
}, componentProps, {
|
|
182
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
183
|
+
className: (0, _runtime.ax)([styles.nestingItem, isDisabled && styles.nestingItemDisabled, className])
|
|
182
184
|
//@ts-expect-error TODO Fix legit TypeScript 3.9.6 improved inference error
|
|
185
|
+
,
|
|
183
186
|
component: component
|
|
184
187
|
}));
|
|
185
188
|
}
|
|
186
189
|
return /*#__PURE__*/_react.default.createElement(_index.ButtonItem, (0, _extends2.default)({
|
|
187
190
|
ref: activeParentRef
|
|
188
|
-
}, componentProps
|
|
191
|
+
}, componentProps, {
|
|
192
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
193
|
+
className: (0, _runtime.ax)([styles.nestingItem, isDisabled && styles.nestingItemDisabled, className])
|
|
194
|
+
}));
|
|
189
195
|
};
|
|
190
196
|
var _default = exports.default = NestingItem;
|
|
@@ -36,9 +36,7 @@ const OldFooter = props => {
|
|
|
36
36
|
testId
|
|
37
37
|
}))(props);
|
|
38
38
|
return /*#__PURE__*/React.createElement(CustomItem, _extends({}, safeProps, {
|
|
39
|
-
component: props.component || Container
|
|
40
|
-
// @ts-expect-error
|
|
41
|
-
,
|
|
39
|
+
component: props.component || Container,
|
|
42
40
|
className: ax([styles.oldFooter])
|
|
43
41
|
}));
|
|
44
42
|
};
|
|
@@ -59,10 +59,7 @@ export const Container = ({
|
|
|
59
59
|
const Header = /*#__PURE__*/forwardRef((props, ref) => {
|
|
60
60
|
return /*#__PURE__*/React.createElement(CustomItem, _extends({}, props, {
|
|
61
61
|
ref: ref,
|
|
62
|
-
component: props.component || Container
|
|
63
|
-
// @ts-expect-error
|
|
64
|
-
,
|
|
65
|
-
|
|
62
|
+
component: props.component || Container,
|
|
66
63
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
|
|
67
64
|
overrides: {
|
|
68
65
|
Title: {
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
.
|
|
1
|
+
._1c06idpf [data-item-elem-after]{opacity:0}
|
|
2
|
+
._1e0c1nu9{display:inline}
|
|
3
|
+
._9mqr1kw7:active [data-right-arrow], ._povs1kw7:focus [data-right-arrow], ._uv2d1kw7:hover [data-right-arrow], ._atks1kw7 [data-custom-icon]{display:inherit}
|
|
4
|
+
._udl3glyw [data-right-arrow], ._kqsfglyw:active [data-custom-icon], ._udrwglyw:focus [data-custom-icon], ._13qvglyw:hover [data-custom-icon]{display:none}
|
|
5
|
+
._udl3glyw [data-right-arrow]{display:none}
|
|
@@ -7,14 +7,14 @@ import ArrowRightIcon from '@atlaskit/icon/core/migration/arrow-right--arrow-rig
|
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
8
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
9
9
|
import { N10 } from '@atlaskit/theme/colors';
|
|
10
|
-
import { overrideStyleFunction } from '../../common/styles';
|
|
11
10
|
import { ButtonItem, CustomItem, NavigationContent } from '../index';
|
|
12
11
|
import { ROOT_ID } from '../NestableNavigationContent';
|
|
13
12
|
import { NestedContext, useNestedContext } from '../NestableNavigationContent/context';
|
|
14
13
|
import { useChildIdsEffect } from '../utils/hooks';
|
|
15
|
-
import { nestingItemStyle } from './styles';
|
|
16
14
|
const styles = {
|
|
17
|
-
iconContainer: "_1e0c1nu9"
|
|
15
|
+
iconContainer: "_1e0c1nu9",
|
|
16
|
+
nestingItem: "_udl3glyw _kqsfglyw _udrwglyw _13qvglyw _9mqr1kw7 _povs1kw7 _uv2d1kw7 _atks1kw7",
|
|
17
|
+
nestingItemDisabled: "_1c06idpf _udl3glyw"
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
// Doesn't extend from ButtonItemProps because it blows ERT up.
|
|
@@ -30,7 +30,8 @@ const NestingItem = props => {
|
|
|
30
30
|
iconAfter,
|
|
31
31
|
title,
|
|
32
32
|
onClick,
|
|
33
|
-
|
|
33
|
+
className,
|
|
34
|
+
isDisabled,
|
|
34
35
|
isSelected,
|
|
35
36
|
id,
|
|
36
37
|
component,
|
|
@@ -50,7 +51,6 @@ const NestingItem = props => {
|
|
|
50
51
|
isDefaultFocusControl,
|
|
51
52
|
focusGoBackButton
|
|
52
53
|
} = useNestedContext();
|
|
53
|
-
const mergedStyles = overrideStyleFunction(nestingItemStyle, cssFn);
|
|
54
54
|
const [isInteracted, setIsInteracted] = useState(false);
|
|
55
55
|
const parentItemRef = useRef(null);
|
|
56
56
|
|
|
@@ -149,21 +149,27 @@ const NestingItem = props => {
|
|
|
149
149
|
}))),
|
|
150
150
|
onClick: onClickHandler,
|
|
151
151
|
isSelected: isSelected,
|
|
152
|
+
isDisabled: isDisabled,
|
|
152
153
|
testId: testId && `${testId}--item`,
|
|
153
154
|
...rest,
|
|
154
|
-
children: title
|
|
155
|
-
cssFn: mergedStyles
|
|
155
|
+
children: title
|
|
156
156
|
};
|
|
157
157
|
if (component) {
|
|
158
158
|
return /*#__PURE__*/React.createElement(CustomItem, _extends({
|
|
159
159
|
ref: isForwardRefCheck(component) ? parentItemRef : null
|
|
160
160
|
}, componentProps, {
|
|
161
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
162
|
+
className: ax([styles.nestingItem, isDisabled && styles.nestingItemDisabled, className])
|
|
161
163
|
//@ts-expect-error TODO Fix legit TypeScript 3.9.6 improved inference error
|
|
164
|
+
,
|
|
162
165
|
component: component
|
|
163
166
|
}));
|
|
164
167
|
}
|
|
165
168
|
return /*#__PURE__*/React.createElement(ButtonItem, _extends({
|
|
166
169
|
ref: activeParentRef
|
|
167
|
-
}, componentProps
|
|
170
|
+
}, componentProps, {
|
|
171
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
172
|
+
className: ax([styles.nestingItem, isDisabled && styles.nestingItemDisabled, className])
|
|
173
|
+
}));
|
|
168
174
|
};
|
|
169
175
|
export default NestingItem;
|
|
@@ -37,9 +37,7 @@ var OldFooter = function OldFooter(props) {
|
|
|
37
37
|
};
|
|
38
38
|
}(props);
|
|
39
39
|
return /*#__PURE__*/React.createElement(CustomItem, _extends({}, safeProps, {
|
|
40
|
-
component: props.component || Container
|
|
41
|
-
// @ts-expect-error
|
|
42
|
-
,
|
|
40
|
+
component: props.component || Container,
|
|
43
41
|
className: ax([styles.oldFooter])
|
|
44
42
|
}));
|
|
45
43
|
};
|
|
@@ -62,10 +62,7 @@ export var Container = function Container(_ref) {
|
|
|
62
62
|
var Header = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
63
63
|
return /*#__PURE__*/React.createElement(CustomItem, _extends({}, props, {
|
|
64
64
|
ref: ref,
|
|
65
|
-
component: props.component || Container
|
|
66
|
-
// @ts-expect-error
|
|
67
|
-
,
|
|
68
|
-
|
|
65
|
+
component: props.component || Container,
|
|
69
66
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
|
|
70
67
|
overrides: {
|
|
71
68
|
Title: {
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
.
|
|
1
|
+
._1c06idpf [data-item-elem-after]{opacity:0}
|
|
2
|
+
._1e0c1nu9{display:inline}
|
|
3
|
+
._9mqr1kw7:active [data-right-arrow], ._povs1kw7:focus [data-right-arrow], ._uv2d1kw7:hover [data-right-arrow], ._atks1kw7 [data-custom-icon]{display:inherit}
|
|
4
|
+
._udl3glyw [data-right-arrow], ._kqsfglyw:active [data-custom-icon], ._udrwglyw:focus [data-custom-icon], ._13qvglyw:hover [data-custom-icon]{display:none}
|
|
5
|
+
._udl3glyw [data-right-arrow]{display:none}
|
|
@@ -4,7 +4,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
4
4
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
5
5
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
6
6
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
7
|
-
var _excluded = ["children", "iconAfter", "title", "onClick", "
|
|
7
|
+
var _excluded = ["children", "iconAfter", "title", "onClick", "className", "isDisabled", "isSelected", "id", "component", "testId"];
|
|
8
8
|
import "./index.compiled.css";
|
|
9
9
|
import { ax, ix } from "@compiled/react/runtime";
|
|
10
10
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -14,14 +14,14 @@ import ArrowRightIcon from '@atlaskit/icon/core/migration/arrow-right--arrow-rig
|
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
15
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
16
16
|
import { N10 } from '@atlaskit/theme/colors';
|
|
17
|
-
import { overrideStyleFunction } from '../../common/styles';
|
|
18
17
|
import { ButtonItem, CustomItem, NavigationContent } from '../index';
|
|
19
18
|
import { ROOT_ID } from '../NestableNavigationContent';
|
|
20
19
|
import { NestedContext, useNestedContext } from '../NestableNavigationContent/context';
|
|
21
20
|
import { useChildIdsEffect } from '../utils/hooks';
|
|
22
|
-
import { nestingItemStyle } from './styles';
|
|
23
21
|
var styles = {
|
|
24
|
-
iconContainer: "_1e0c1nu9"
|
|
22
|
+
iconContainer: "_1e0c1nu9",
|
|
23
|
+
nestingItem: "_udl3glyw _kqsfglyw _udrwglyw _13qvglyw _9mqr1kw7 _povs1kw7 _uv2d1kw7 _atks1kw7",
|
|
24
|
+
nestingItemDisabled: "_1c06idpf _udl3glyw"
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
// Doesn't extend from ButtonItemProps because it blows ERT up.
|
|
@@ -36,7 +36,8 @@ var NestingItem = function NestingItem(props) {
|
|
|
36
36
|
iconAfter = props.iconAfter,
|
|
37
37
|
title = props.title,
|
|
38
38
|
onClick = props.onClick,
|
|
39
|
-
|
|
39
|
+
className = props.className,
|
|
40
|
+
isDisabled = props.isDisabled,
|
|
40
41
|
isSelected = props.isSelected,
|
|
41
42
|
id = props.id,
|
|
42
43
|
component = props.component,
|
|
@@ -54,7 +55,6 @@ var NestingItem = function NestingItem(props) {
|
|
|
54
55
|
goBackButtonRef = _useNestedContext.goBackButtonRef,
|
|
55
56
|
isDefaultFocusControl = _useNestedContext.isDefaultFocusControl,
|
|
56
57
|
focusGoBackButton = _useNestedContext.focusGoBackButton;
|
|
57
|
-
var mergedStyles = overrideStyleFunction(nestingItemStyle, cssFn);
|
|
58
58
|
var _useState = useState(false),
|
|
59
59
|
_useState2 = _slicedToArray(_useState, 2),
|
|
60
60
|
isInteracted = _useState2[0],
|
|
@@ -160,21 +160,27 @@ var NestingItem = function NestingItem(props) {
|
|
|
160
160
|
}))),
|
|
161
161
|
onClick: onClickHandler,
|
|
162
162
|
isSelected: isSelected,
|
|
163
|
+
isDisabled: isDisabled,
|
|
163
164
|
testId: testId && "".concat(testId, "--item")
|
|
164
165
|
}, rest), {}, {
|
|
165
|
-
children: title
|
|
166
|
-
cssFn: mergedStyles
|
|
166
|
+
children: title
|
|
167
167
|
});
|
|
168
168
|
if (component) {
|
|
169
169
|
return /*#__PURE__*/React.createElement(CustomItem, _extends({
|
|
170
170
|
ref: isForwardRefCheck(component) ? parentItemRef : null
|
|
171
171
|
}, componentProps, {
|
|
172
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
173
|
+
className: ax([styles.nestingItem, isDisabled && styles.nestingItemDisabled, className])
|
|
172
174
|
//@ts-expect-error TODO Fix legit TypeScript 3.9.6 improved inference error
|
|
175
|
+
,
|
|
173
176
|
component: component
|
|
174
177
|
}));
|
|
175
178
|
}
|
|
176
179
|
return /*#__PURE__*/React.createElement(ButtonItem, _extends({
|
|
177
180
|
ref: activeParentRef
|
|
178
|
-
}, componentProps
|
|
181
|
+
}, componentProps, {
|
|
182
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
183
|
+
className: ax([styles.nestingItem, isDisabled && styles.nestingItemDisabled, className])
|
|
184
|
+
}));
|
|
179
185
|
};
|
|
180
186
|
export default NestingItem;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import { type
|
|
6
|
+
import { type CustomItemComponentProps, type Overrides } from '@atlaskit/menu';
|
|
7
7
|
interface NestingItemOverrides extends Overrides {
|
|
8
8
|
/**
|
|
9
9
|
* Use this to override the back button displayed when navigation is nested.
|
|
@@ -52,10 +52,9 @@ export interface NestingItemProps<TCustomComponentProps = CustomItemComponentPro
|
|
|
52
52
|
*/
|
|
53
53
|
testId?: string;
|
|
54
54
|
/**
|
|
55
|
-
*
|
|
56
|
-
* It receives the current styles and state and expects a styles object.
|
|
55
|
+
* Not recommended for general use as it enables unsafe style overrides.
|
|
57
56
|
*/
|
|
58
|
-
|
|
57
|
+
className?: string;
|
|
59
58
|
/**
|
|
60
59
|
* Element to render before the item text.
|
|
61
60
|
* Generally should be an [icon](https://atlassian.design/components/icon/icon-explorer) component.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import { type
|
|
6
|
+
import { type CustomItemComponentProps, type Overrides } from '@atlaskit/menu';
|
|
7
7
|
interface NestingItemOverrides extends Overrides {
|
|
8
8
|
/**
|
|
9
9
|
* Use this to override the back button displayed when navigation is nested.
|
|
@@ -52,10 +52,9 @@ export interface NestingItemProps<TCustomComponentProps = CustomItemComponentPro
|
|
|
52
52
|
*/
|
|
53
53
|
testId?: string;
|
|
54
54
|
/**
|
|
55
|
-
*
|
|
56
|
-
* It receives the current styles and state and expects a styles object.
|
|
55
|
+
* Not recommended for general use as it enables unsafe style overrides.
|
|
57
56
|
*/
|
|
58
|
-
|
|
57
|
+
className?: string;
|
|
59
58
|
/**
|
|
60
59
|
* Element to render before the item text.
|
|
61
60
|
* Generally should be an [icon](https://atlassian.design/components/icon/icon-explorer) component.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/side-navigation",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "A highly composable side navigation component that supports nested views.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@atlaskit/css": "^0.10.0",
|
|
36
36
|
"@atlaskit/ds-lib": "^4.0.0",
|
|
37
|
-
"@atlaskit/icon": "^25.
|
|
38
|
-
"@atlaskit/menu": "^3.
|
|
37
|
+
"@atlaskit/icon": "^25.5.0",
|
|
38
|
+
"@atlaskit/menu": "^3.2.0",
|
|
39
39
|
"@atlaskit/motion": "^5.1.0",
|
|
40
40
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
41
|
-
"@atlaskit/primitives": "^14.
|
|
41
|
+
"@atlaskit/primitives": "^14.4.0",
|
|
42
42
|
"@atlaskit/theme": "^18.0.0",
|
|
43
|
-
"@atlaskit/tokens": "^4.
|
|
43
|
+
"@atlaskit/tokens": "^4.7.0",
|
|
44
44
|
"@babel/runtime": "^7.0.0",
|
|
45
|
-
"@compiled/react": "^0.18.
|
|
45
|
+
"@compiled/react": "^0.18.3"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"react": "^18.2.0"
|
|
@@ -51,21 +51,21 @@
|
|
|
51
51
|
"@af/accessibility-testing": "^2.0.0",
|
|
52
52
|
"@af/integration-testing": "^0.5.0",
|
|
53
53
|
"@af/visual-regression": "^1.3.0",
|
|
54
|
-
"@atlaskit/atlassian-navigation": "^5.
|
|
55
|
-
"@atlaskit/button": "^
|
|
54
|
+
"@atlaskit/atlassian-navigation": "^5.1.0",
|
|
55
|
+
"@atlaskit/button": "^23.0.0",
|
|
56
56
|
"@atlaskit/docs": "^10.0.0",
|
|
57
|
-
"@atlaskit/dropdown-menu": "^
|
|
57
|
+
"@atlaskit/dropdown-menu": "^14.0.0",
|
|
58
58
|
"@atlaskit/form": "^12.0.0",
|
|
59
|
-
"@atlaskit/image": "^
|
|
60
|
-
"@atlaskit/link": "^3.
|
|
59
|
+
"@atlaskit/image": "^3.0.0",
|
|
60
|
+
"@atlaskit/link": "^3.1.0",
|
|
61
61
|
"@atlaskit/logo": "^16.0.0",
|
|
62
|
-
"@atlaskit/onboarding": "^
|
|
62
|
+
"@atlaskit/onboarding": "^14.0.0",
|
|
63
63
|
"@atlaskit/pragmatic-drag-and-drop": "^1.5.0",
|
|
64
64
|
"@atlaskit/pragmatic-drag-and-drop-live-region": "^1.3.0",
|
|
65
65
|
"@atlaskit/pragmatic-drag-and-drop-react-accessibility": "^2.0.0",
|
|
66
|
-
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.
|
|
66
|
+
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.1.0",
|
|
67
67
|
"@atlaskit/section-message": "^8.2.0",
|
|
68
|
-
"@atlaskit/select": "^20.
|
|
68
|
+
"@atlaskit/select": "^20.3.0",
|
|
69
69
|
"@atlaskit/visual-regression": "^0.10.0",
|
|
70
70
|
"@testing-library/react": "^13.4.0",
|
|
71
71
|
"raf-stub": "^2.0.1",
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.nestingItemStyle = exports.enabledCSS = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11
|
-
// exposed for testing purposes
|
|
12
|
-
var enabledCSS = exports.enabledCSS = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, '&:hover [data-custom-icon]', {
|
|
13
|
-
display: 'none'
|
|
14
|
-
}), '&:active [data-custom-icon]', {
|
|
15
|
-
display: 'none'
|
|
16
|
-
}), '&:focus [data-custom-icon]', {
|
|
17
|
-
display: 'none'
|
|
18
|
-
}), '& [data-custom-icon]', {
|
|
19
|
-
display: 'inherit'
|
|
20
|
-
}), '&:hover [data-right-arrow]', {
|
|
21
|
-
display: 'inherit'
|
|
22
|
-
}), '&:active [data-right-arrow]', {
|
|
23
|
-
display: 'inherit'
|
|
24
|
-
}), '&:focus [data-right-arrow]', {
|
|
25
|
-
display: 'inherit'
|
|
26
|
-
}), '& [data-right-arrow]', {
|
|
27
|
-
display: 'none'
|
|
28
|
-
});
|
|
29
|
-
var disabledCSS = (0, _defineProperty2.default)((0, _defineProperty2.default)({}, '[data-item-elem-after]', {
|
|
30
|
-
opacity: 0
|
|
31
|
-
}), '& [data-right-arrow]', {
|
|
32
|
-
display: 'none'
|
|
33
|
-
});
|
|
34
|
-
var nestingItemStyle = exports.nestingItemStyle = function nestingItemStyle(state) {
|
|
35
|
-
return _objectSpread({}, state.isDisabled ? disabledCSS : enabledCSS);
|
|
36
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
// exposed for testing purposes
|
|
2
|
-
export const enabledCSS = {
|
|
3
|
-
['&:hover [data-custom-icon]']: {
|
|
4
|
-
display: 'none'
|
|
5
|
-
},
|
|
6
|
-
['&:active [data-custom-icon]']: {
|
|
7
|
-
display: 'none'
|
|
8
|
-
},
|
|
9
|
-
['&:focus [data-custom-icon]']: {
|
|
10
|
-
display: 'none'
|
|
11
|
-
},
|
|
12
|
-
['& [data-custom-icon]']: {
|
|
13
|
-
display: 'inherit'
|
|
14
|
-
},
|
|
15
|
-
['&:hover [data-right-arrow]']: {
|
|
16
|
-
display: 'inherit'
|
|
17
|
-
},
|
|
18
|
-
['&:active [data-right-arrow]']: {
|
|
19
|
-
display: 'inherit'
|
|
20
|
-
},
|
|
21
|
-
['&:focus [data-right-arrow]']: {
|
|
22
|
-
display: 'inherit'
|
|
23
|
-
},
|
|
24
|
-
['& [data-right-arrow]']: {
|
|
25
|
-
display: 'none'
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
const disabledCSS = {
|
|
29
|
-
['[data-item-elem-after]']: {
|
|
30
|
-
opacity: 0
|
|
31
|
-
},
|
|
32
|
-
['& [data-right-arrow]']: {
|
|
33
|
-
display: 'none'
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
export const nestingItemStyle = state => {
|
|
37
|
-
return {
|
|
38
|
-
...(state.isDisabled ? disabledCSS : enabledCSS)
|
|
39
|
-
};
|
|
40
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
// exposed for testing purposes
|
|
5
|
-
export var enabledCSS = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, '&:hover [data-custom-icon]', {
|
|
6
|
-
display: 'none'
|
|
7
|
-
}), '&:active [data-custom-icon]', {
|
|
8
|
-
display: 'none'
|
|
9
|
-
}), '&:focus [data-custom-icon]', {
|
|
10
|
-
display: 'none'
|
|
11
|
-
}), '& [data-custom-icon]', {
|
|
12
|
-
display: 'inherit'
|
|
13
|
-
}), '&:hover [data-right-arrow]', {
|
|
14
|
-
display: 'inherit'
|
|
15
|
-
}), '&:active [data-right-arrow]', {
|
|
16
|
-
display: 'inherit'
|
|
17
|
-
}), '&:focus [data-right-arrow]', {
|
|
18
|
-
display: 'inherit'
|
|
19
|
-
}), '& [data-right-arrow]', {
|
|
20
|
-
display: 'none'
|
|
21
|
-
});
|
|
22
|
-
var disabledCSS = _defineProperty(_defineProperty({}, '[data-item-elem-after]', {
|
|
23
|
-
opacity: 0
|
|
24
|
-
}), '& [data-right-arrow]', {
|
|
25
|
-
display: 'none'
|
|
26
|
-
});
|
|
27
|
-
export var nestingItemStyle = function nestingItemStyle(state) {
|
|
28
|
-
return _objectSpread({}, state.isDisabled ? disabledCSS : enabledCSS);
|
|
29
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { type CSSFn } from '@atlaskit/menu';
|
|
2
|
-
export declare const enabledCSS: {
|
|
3
|
-
"&:hover [data-custom-icon]": {
|
|
4
|
-
display: string;
|
|
5
|
-
};
|
|
6
|
-
"&:active [data-custom-icon]": {
|
|
7
|
-
display: string;
|
|
8
|
-
};
|
|
9
|
-
"&:focus [data-custom-icon]": {
|
|
10
|
-
display: string;
|
|
11
|
-
};
|
|
12
|
-
"& [data-custom-icon]": {
|
|
13
|
-
display: string;
|
|
14
|
-
};
|
|
15
|
-
"&:hover [data-right-arrow]": {
|
|
16
|
-
display: string;
|
|
17
|
-
};
|
|
18
|
-
"&:active [data-right-arrow]": {
|
|
19
|
-
display: string;
|
|
20
|
-
};
|
|
21
|
-
"&:focus [data-right-arrow]": {
|
|
22
|
-
display: string;
|
|
23
|
-
};
|
|
24
|
-
"& [data-right-arrow]": {
|
|
25
|
-
display: string;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
export declare const nestingItemStyle: CSSFn;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { type CSSFn } from '@atlaskit/menu';
|
|
2
|
-
export declare const enabledCSS: {
|
|
3
|
-
"&:hover [data-custom-icon]": {
|
|
4
|
-
display: string;
|
|
5
|
-
};
|
|
6
|
-
"&:active [data-custom-icon]": {
|
|
7
|
-
display: string;
|
|
8
|
-
};
|
|
9
|
-
"&:focus [data-custom-icon]": {
|
|
10
|
-
display: string;
|
|
11
|
-
};
|
|
12
|
-
"& [data-custom-icon]": {
|
|
13
|
-
display: string;
|
|
14
|
-
};
|
|
15
|
-
"&:hover [data-right-arrow]": {
|
|
16
|
-
display: string;
|
|
17
|
-
};
|
|
18
|
-
"&:active [data-right-arrow]": {
|
|
19
|
-
display: string;
|
|
20
|
-
};
|
|
21
|
-
"&:focus [data-right-arrow]": {
|
|
22
|
-
display: string;
|
|
23
|
-
};
|
|
24
|
-
"& [data-right-arrow]": {
|
|
25
|
-
display: string;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
export declare const nestingItemStyle: CSSFn;
|