@atlaskit/atlassian-navigation 2.1.3 → 2.1.6
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 +19 -0
- package/README.md +3 -3
- package/dist/cjs/components/AtlassianNavigation/skeleton.js +4 -2
- package/dist/cjs/controllers/overflow/index.js +2 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/AtlassianNavigation/skeleton.js +2 -1
- package/dist/es2019/controllers/overflow/index.js +2 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/AtlassianNavigation/skeleton.js +2 -1
- package/dist/esm/controllers/overflow/index.js +2 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/common/styles.d.ts +519 -514
- package/dist/types/components/AtlassianNavigation/skeleton.d.ts +1 -0
- package/dist/types/components/AtlassianNavigation/types.d.ts +30 -15
- package/dist/types/components/Help/index.d.ts +1 -1
- package/dist/types/components/IconButton/index.d.ts +1 -1
- package/dist/types/components/PrimaryButton/index.d.ts +1 -1
- package/dist/types/components/PrimaryDropdownButton/index.d.ts +1 -1
- package/dist/types/components/Profile/index.d.ts +1 -1
- package/dist/types/controllers/overflow/index.d.ts +2 -2
- package/package.json +7 -4
- package/skeleton/package.json +1 -0
- package/skeleton-help-button/package.json +1 -0
- package/skeleton-notification-button/package.json +1 -0
- package/skeleton-settings-button/package.json +1 -0
- package/skeleton-switcher-button/package.json +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/atlassian-navigation
|
|
2
2
|
|
|
3
|
+
## 2.1.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`3622df604ee`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3622df604ee) - Fixes bug where navigation items cannot be added after intial render if the initial item array was empty
|
|
8
|
+
|
|
9
|
+
## 2.1.5
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Upgrade to TypeScript 4.2.4
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
16
|
+
## 2.1.4
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 2.1.3
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Atlassian
|
|
1
|
+
# Atlassian navigation
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A horizontal navigation component for Atlassian products.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@ yarn add @atlaskit/atlassian-navigation
|
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
|
-
Detailed docs and example usage can be found [here](https://
|
|
13
|
+
Detailed docs and example usage can be found [here](https://atlassian.design/components/atlassian-navigation).
|
|
14
14
|
|
|
15
15
|
To add side navigation, use [@atlaskit/side-navigation](https://atlaskit.atlassian.com/packages/navigation/side-navigation)
|
|
16
16
|
To control the layout of these navigation elements and add expand/collapse functionality to `side-navigation`, use [@atlaskit/page-layout](https://atlaskit.atlassian.com/packages/design-system/page-layout).
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.NavigationSkeleton = void 0;
|
|
6
|
+
exports.default = exports.NavigationSkeleton = void 0;
|
|
7
7
|
|
|
8
8
|
var _core = require("@emotion/core");
|
|
9
9
|
|
|
@@ -120,4 +120,6 @@ var NavigationSkeleton = function NavigationSkeleton(_ref) {
|
|
|
120
120
|
}), (0, _core.jsx)(_skeleton4.ProfileSkeleton, null))));
|
|
121
121
|
};
|
|
122
122
|
|
|
123
|
-
exports.NavigationSkeleton = NavigationSkeleton;
|
|
123
|
+
exports.NavigationSkeleton = NavigationSkeleton;
|
|
124
|
+
var _default = NavigationSkeleton;
|
|
125
|
+
exports.default = _default;
|
|
@@ -93,7 +93,7 @@ var useOverflowController = function useOverflowController(nodes) {
|
|
|
93
93
|
|
|
94
94
|
var throttleSetWidth = (0, _react.useCallback)((0, _throttle.default)(setWidth, THROTTLE_INTERVAL), [setWidth]);
|
|
95
95
|
(0, _react.useEffect)(function () {
|
|
96
|
-
var lastItemWidth = itemsWidths[itemsLimit];
|
|
96
|
+
var lastItemWidth = itemsWidths[itemsLimit] || 0;
|
|
97
97
|
var wasJustLimited = lastItemWidth < 0;
|
|
98
98
|
var currentHash = calculateHash(width, itemsLimit);
|
|
99
99
|
|
|
@@ -134,7 +134,7 @@ var useOverflowController = function useOverflowController(nodes) {
|
|
|
134
134
|
return;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
if (width -
|
|
137
|
+
if (width - lastItemWidth > ITEM_APPROX_MINWIDTH * 1.1 && itemsLimit < items.length) {
|
|
138
138
|
// If we have enough room to accomodate next item width we increase the limit
|
|
139
139
|
// unless it has been recently removed
|
|
140
140
|
var _nextHash = calculateHash(width, itemsLimit + 1);
|
package/dist/cjs/version.json
CHANGED
|
@@ -51,7 +51,7 @@ export const useOverflowController = nodes => {
|
|
|
51
51
|
|
|
52
52
|
const throttleSetWidth = useCallback(throttle(setWidth, THROTTLE_INTERVAL), [setWidth]);
|
|
53
53
|
useEffect(() => {
|
|
54
|
-
const lastItemWidth = itemsWidths[itemsLimit];
|
|
54
|
+
const lastItemWidth = itemsWidths[itemsLimit] || 0;
|
|
55
55
|
const wasJustLimited = lastItemWidth < 0;
|
|
56
56
|
const currentHash = calculateHash(width, itemsLimit);
|
|
57
57
|
|
|
@@ -90,7 +90,7 @@ export const useOverflowController = nodes => {
|
|
|
90
90
|
return;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
if (width -
|
|
93
|
+
if (width - lastItemWidth > ITEM_APPROX_MINWIDTH * 1.1 && itemsLimit < items.length) {
|
|
94
94
|
// If we have enough room to accomodate next item width we increase the limit
|
|
95
95
|
// unless it has been recently removed
|
|
96
96
|
const nextHash = calculateHash(width, itemsLimit + 1);
|
package/dist/es2019/version.json
CHANGED
|
@@ -68,7 +68,7 @@ export var useOverflowController = function useOverflowController(nodes) {
|
|
|
68
68
|
|
|
69
69
|
var throttleSetWidth = useCallback(throttle(setWidth, THROTTLE_INTERVAL), [setWidth]);
|
|
70
70
|
useEffect(function () {
|
|
71
|
-
var lastItemWidth = itemsWidths[itemsLimit];
|
|
71
|
+
var lastItemWidth = itemsWidths[itemsLimit] || 0;
|
|
72
72
|
var wasJustLimited = lastItemWidth < 0;
|
|
73
73
|
var currentHash = calculateHash(width, itemsLimit);
|
|
74
74
|
|
|
@@ -109,7 +109,7 @@ export var useOverflowController = function useOverflowController(nodes) {
|
|
|
109
109
|
return;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
if (width -
|
|
112
|
+
if (width - lastItemWidth > ITEM_APPROX_MINWIDTH * 1.1 && itemsLimit < items.length) {
|
|
113
113
|
// If we have enough room to accomodate next item width we increase the limit
|
|
114
114
|
// unless it has been recently removed
|
|
115
115
|
var _nextHash = calculateHash(width, itemsLimit + 1);
|
package/dist/esm/version.json
CHANGED