@atlaskit/atlassian-navigation 2.1.5 → 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 +6 -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 +14 -9
- package/dist/types/components/AtlassianNavigation/skeleton.d.ts +1 -0
- package/dist/types/components/AtlassianNavigation/types.d.ts +30 -15
- package/package.json +4 -1
- 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,11 @@
|
|
|
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
|
+
|
|
3
9
|
## 2.1.5
|
|
4
10
|
|
|
5
11
|
### 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
|
@@ -10,6 +10,7 @@ export declare const actionSectionMobileCSS: {
|
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
12
|
export declare const skeletonCSS: ({ mode: { skeleton } }: NavigationTheme) => {
|
|
13
|
+
accentColor?: string | string[] | undefined;
|
|
13
14
|
alignContent?: string | string[] | undefined;
|
|
14
15
|
alignItems?: string | string[] | undefined;
|
|
15
16
|
alignSelf?: string | string[] | undefined;
|
|
@@ -32,7 +33,6 @@ export declare const skeletonCSS: ({ mode: { skeleton } }: NavigationTheme) => {
|
|
|
32
33
|
backgroundColor: (string | string[] | undefined) & string;
|
|
33
34
|
backgroundImage?: string | string[] | undefined;
|
|
34
35
|
backgroundOrigin?: string | string[] | undefined;
|
|
35
|
-
backgroundPosition?: string[] | import("csstype").BackgroundPositionProperty<string | number> | import("csstype").BackgroundPositionProperty<string | number>[] | undefined;
|
|
36
36
|
backgroundPositionX?: string[] | import("csstype").BackgroundPositionXProperty<string | number> | import("csstype").BackgroundPositionXProperty<string | number>[] | undefined;
|
|
37
37
|
backgroundPositionY?: string[] | import("csstype").BackgroundPositionYProperty<string | number> | import("csstype").BackgroundPositionYProperty<string | number>[] | undefined;
|
|
38
38
|
backgroundRepeat?: string | string[] | undefined;
|
|
@@ -97,6 +97,7 @@ export declare const skeletonCSS: ({ mode: { skeleton } }: NavigationTheme) => {
|
|
|
97
97
|
clipPath?: string | string[] | undefined;
|
|
98
98
|
color?: string | string[] | undefined;
|
|
99
99
|
colorAdjust?: import("csstype").ColorAdjustProperty | import("csstype").ColorAdjustProperty[] | undefined;
|
|
100
|
+
colorScheme?: string | string[] | undefined;
|
|
100
101
|
columnCount?: import("csstype").ColumnCountProperty | import("csstype").ColumnCountProperty[] | (import("csstype").Globals | "auto")[] | undefined;
|
|
101
102
|
columnFill?: import("csstype").ColumnFillProperty | import("csstype").ColumnFillProperty[] | undefined;
|
|
102
103
|
columnGap?: string[] | import("csstype").ColumnGapProperty<string | number> | import("csstype").ColumnGapProperty<string | number>[] | undefined;
|
|
@@ -128,7 +129,7 @@ export declare const skeletonCSS: ({ mode: { skeleton } }: NavigationTheme) => {
|
|
|
128
129
|
fontLanguageOverride?: string | string[] | undefined;
|
|
129
130
|
fontOpticalSizing?: import("csstype").FontOpticalSizingProperty | import("csstype").FontOpticalSizingProperty[] | undefined;
|
|
130
131
|
fontSize?: string[] | import("csstype").FontSizeProperty<string | number> | import("csstype").FontSizeProperty<string | number>[] | undefined;
|
|
131
|
-
fontSizeAdjust?:
|
|
132
|
+
fontSizeAdjust?: string[] | import("csstype").FontSizeAdjustProperty | import("csstype").FontSizeAdjustProperty[] | undefined;
|
|
132
133
|
fontSmooth?: string[] | import("csstype").FontSmoothProperty<string | number> | import("csstype").FontSmoothProperty<string | number>[] | undefined;
|
|
133
134
|
fontStretch?: string | string[] | undefined;
|
|
134
135
|
fontStyle?: string | string[] | undefined;
|
|
@@ -209,7 +210,7 @@ export declare const skeletonCSS: ({ mode: { skeleton } }: NavigationTheme) => {
|
|
|
209
210
|
maxBlockSize?: string[] | import("csstype").MaxBlockSizeProperty<string | number> | import("csstype").MaxBlockSizeProperty<string | number>[] | undefined;
|
|
210
211
|
maxHeight?: string[] | import("csstype").MaxHeightProperty<string | number> | import("csstype").MaxHeightProperty<string | number>[] | undefined;
|
|
211
212
|
maxInlineSize?: string[] | import("csstype").MaxInlineSizeProperty<string | number> | import("csstype").MaxInlineSizeProperty<string | number>[] | undefined;
|
|
212
|
-
maxLines?:
|
|
213
|
+
maxLines?: import("csstype").MaxLinesProperty | import("csstype").MaxLinesProperty[] | (import("csstype").Globals | "none")[] | undefined;
|
|
213
214
|
maxWidth?: string[] | import("csstype").MaxWidthProperty<string | number> | import("csstype").MaxWidthProperty<string | number>[] | undefined;
|
|
214
215
|
minBlockSize?: string[] | import("csstype").MinBlockSizeProperty<string | number> | import("csstype").MinBlockSizeProperty<string | number>[] | undefined;
|
|
215
216
|
minHeight?: string[] | import("csstype").MinHeightProperty<string | number> | import("csstype").MinHeightProperty<string | number>[] | undefined;
|
|
@@ -236,11 +237,11 @@ export declare const skeletonCSS: ({ mode: { skeleton } }: NavigationTheme) => {
|
|
|
236
237
|
overflowAnchor?: import("csstype").OverflowAnchorProperty | import("csstype").OverflowAnchorProperty[] | undefined;
|
|
237
238
|
overflowBlock?: import("csstype").OverflowBlockProperty | import("csstype").OverflowBlockProperty[] | undefined;
|
|
238
239
|
overflowClipBox?: import("csstype").OverflowClipBoxProperty | import("csstype").OverflowClipBoxProperty[] | undefined;
|
|
240
|
+
overflowClipMargin?: string[] | import("csstype").OverflowClipMarginProperty<string | number> | import("csstype").OverflowClipMarginProperty<string | number>[] | undefined;
|
|
239
241
|
overflowInline?: import("csstype").OverflowInlineProperty | import("csstype").OverflowInlineProperty[] | undefined;
|
|
240
242
|
overflowWrap?: import("csstype").OverflowWrapProperty | import("csstype").OverflowWrapProperty[] | undefined;
|
|
241
243
|
overflowX?: import("csstype").OverflowXProperty | import("csstype").OverflowXProperty[] | undefined;
|
|
242
244
|
overflowY?: import("csstype").OverflowYProperty | import("csstype").OverflowYProperty[] | undefined;
|
|
243
|
-
overscrollBehavior?: string | string[] | undefined;
|
|
244
245
|
overscrollBehaviorBlock?: import("csstype").OverscrollBehaviorBlockProperty | import("csstype").OverscrollBehaviorBlockProperty[] | undefined;
|
|
245
246
|
overscrollBehaviorInline?: import("csstype").OverscrollBehaviorInlineProperty | import("csstype").OverscrollBehaviorInlineProperty[] | undefined;
|
|
246
247
|
overscrollBehaviorX?: import("csstype").OverscrollBehaviorXProperty | import("csstype").OverscrollBehaviorXProperty[] | undefined;
|
|
@@ -271,7 +272,7 @@ export declare const skeletonCSS: ({ mode: { skeleton } }: NavigationTheme) => {
|
|
|
271
272
|
rowGap?: string[] | import("csstype").RowGapProperty<string | number> | import("csstype").RowGapProperty<string | number>[] | undefined;
|
|
272
273
|
rubyAlign?: import("csstype").RubyAlignProperty | import("csstype").RubyAlignProperty[] | undefined;
|
|
273
274
|
rubyMerge?: import("csstype").RubyMergeProperty | import("csstype").RubyMergeProperty[] | undefined;
|
|
274
|
-
rubyPosition?:
|
|
275
|
+
rubyPosition?: string | string[] | undefined;
|
|
275
276
|
scale?: string[] | import("csstype").ScaleProperty | import("csstype").ScaleProperty[] | undefined;
|
|
276
277
|
scrollBehavior?: import("csstype").ScrollBehaviorProperty | import("csstype").ScrollBehaviorProperty[] | undefined;
|
|
277
278
|
scrollMargin?: string[] | import("csstype").ScrollMarginProperty<string | number> | import("csstype").ScrollMarginProperty<string | number>[] | undefined;
|
|
@@ -363,6 +364,7 @@ export declare const skeletonCSS: ({ mode: { skeleton } }: NavigationTheme) => {
|
|
|
363
364
|
all?: import("csstype").Globals | import("csstype").Globals[] | undefined;
|
|
364
365
|
animation?: string[] | import("csstype").AnimationProperty | import("csstype").AnimationProperty[] | undefined;
|
|
365
366
|
background?: string[] | import("csstype").BackgroundProperty<string | number> | import("csstype").BackgroundProperty<string | number>[] | undefined;
|
|
367
|
+
backgroundPosition?: string[] | import("csstype").BackgroundPositionProperty<string | number> | import("csstype").BackgroundPositionProperty<string | number>[] | undefined;
|
|
366
368
|
border?: string[] | import("csstype").BorderProperty<string | number> | import("csstype").BorderProperty<string | number>[] | undefined;
|
|
367
369
|
borderBlock?: string[] | import("csstype").BorderBlockProperty<string | number> | import("csstype").BorderBlockProperty<string | number>[] | undefined;
|
|
368
370
|
borderBlockEnd?: string[] | import("csstype").BorderBlockEndProperty<string | number> | import("csstype").BorderBlockEndProperty<string | number>[] | undefined;
|
|
@@ -399,6 +401,7 @@ export declare const skeletonCSS: ({ mode: { skeleton } }: NavigationTheme) => {
|
|
|
399
401
|
offset?: string[] | import("csstype").OffsetProperty<string | number> | import("csstype").OffsetProperty<string | number>[] | undefined;
|
|
400
402
|
outline?: string[] | import("csstype").OutlineProperty<string | number> | import("csstype").OutlineProperty<string | number>[] | undefined;
|
|
401
403
|
overflow?: string | string[] | undefined;
|
|
404
|
+
overscrollBehavior?: string | string[] | undefined;
|
|
402
405
|
padding?: string[] | import("csstype").PaddingProperty<string | number> | import("csstype").PaddingProperty<string | number>[] | undefined;
|
|
403
406
|
placeItems?: string | string[] | undefined;
|
|
404
407
|
placeSelf?: string | string[] | undefined;
|
|
@@ -571,6 +574,7 @@ export declare const skeletonCSS: ({ mode: { skeleton } }: NavigationTheme) => {
|
|
|
571
574
|
WebkitFontSmoothing?: string[] | import("csstype").FontSmoothProperty<string | number> | import("csstype").FontSmoothProperty<string | number>[] | undefined;
|
|
572
575
|
WebkitFontVariantLigatures?: string | string[] | undefined;
|
|
573
576
|
WebkitHyphens?: import("csstype").HyphensProperty | import("csstype").HyphensProperty[] | undefined;
|
|
577
|
+
WebkitInitialLetter?: string[] | import("csstype").InitialLetterProperty | import("csstype").InitialLetterProperty[] | undefined;
|
|
574
578
|
WebkitJustifyContent?: string | string[] | undefined;
|
|
575
579
|
WebkitLineBreak?: import("csstype").LineBreakProperty | import("csstype").LineBreakProperty[] | undefined;
|
|
576
580
|
WebkitLineClamp?: (import("csstype").Globals | "none")[] | import("csstype").WebkitLineClampProperty | import("csstype").WebkitLineClampProperty[] | undefined;
|
|
@@ -601,7 +605,7 @@ export declare const skeletonCSS: ({ mode: { skeleton } }: NavigationTheme) => {
|
|
|
601
605
|
WebkitPerspective?: string[] | import("csstype").PerspectiveProperty<string | number> | import("csstype").PerspectiveProperty<string | number>[] | undefined;
|
|
602
606
|
WebkitPerspectiveOrigin?: string[] | import("csstype").PerspectiveOriginProperty<string | number> | import("csstype").PerspectiveOriginProperty<string | number>[] | undefined;
|
|
603
607
|
WebkitPrintColorAdjust?: import("csstype").ColorAdjustProperty | import("csstype").ColorAdjustProperty[] | undefined;
|
|
604
|
-
WebkitRubyPosition?:
|
|
608
|
+
WebkitRubyPosition?: string | string[] | undefined;
|
|
605
609
|
WebkitScrollSnapType?: string | string[] | undefined;
|
|
606
610
|
WebkitShapeMargin?: string[] | import("csstype").ShapeMarginProperty<string | number> | import("csstype").ShapeMarginProperty<string | number>[] | undefined;
|
|
607
611
|
WebkitTapHighlightColor?: string | string[] | undefined;
|
|
@@ -683,7 +687,6 @@ export declare const skeletonCSS: ({ mode: { skeleton } }: NavigationTheme) => {
|
|
|
683
687
|
scrollSnapTypeX?: import("csstype").ScrollSnapTypeXProperty | import("csstype").ScrollSnapTypeXProperty[] | undefined;
|
|
684
688
|
scrollSnapTypeY?: import("csstype").ScrollSnapTypeYProperty | import("csstype").ScrollSnapTypeYProperty[] | undefined;
|
|
685
689
|
scrollbarTrackColor?: string | string[] | undefined;
|
|
686
|
-
textCombineHorizontal?: string | string[] | undefined;
|
|
687
690
|
KhtmlBoxAlign?: import("csstype").BoxAlignProperty | import("csstype").BoxAlignProperty[] | undefined;
|
|
688
691
|
KhtmlBoxDirection?: import("csstype").BoxDirectionProperty | import("csstype").BoxDirectionProperty[] | undefined;
|
|
689
692
|
KhtmlBoxFlex?: import("csstype").GlobalsNumber | import("csstype").GlobalsNumber[] | import("csstype").Globals[] | undefined;
|
|
@@ -713,7 +716,7 @@ export declare const skeletonCSS: ({ mode: { skeleton } }: NavigationTheme) => {
|
|
|
713
716
|
MozBoxPack?: import("csstype").BoxPackProperty | import("csstype").BoxPackProperty[] | undefined;
|
|
714
717
|
MozBoxShadow?: string | string[] | undefined;
|
|
715
718
|
MozFloatEdge?: import("csstype").MozFloatEdgeProperty | import("csstype").MozFloatEdgeProperty[] | undefined;
|
|
716
|
-
MozForceBrokenImageIcon?: import("csstype").
|
|
719
|
+
MozForceBrokenImageIcon?: import("csstype").Globals[] | import("csstype").MozForceBrokenImageIconProperty | import("csstype").MozForceBrokenImageIconProperty[] | undefined;
|
|
717
720
|
MozOpacity?: string[] | import("csstype").OpacityProperty | import("csstype").OpacityProperty[] | undefined;
|
|
718
721
|
MozOutline?: string[] | import("csstype").OutlineProperty<string | number> | import("csstype").OutlineProperty<string | number>[] | undefined;
|
|
719
722
|
MozOutlineColor?: string | string[] | undefined;
|
|
@@ -820,6 +823,8 @@ export declare const skeletonCSS: ({ mode: { skeleton } }: NavigationTheme) => {
|
|
|
820
823
|
":-moz-placeholder"?: import("@emotion/serialize").CSSObject | undefined;
|
|
821
824
|
":-moz-read-only"?: import("@emotion/serialize").CSSObject | undefined;
|
|
822
825
|
":-moz-read-write"?: import("@emotion/serialize").CSSObject | undefined;
|
|
826
|
+
":-moz-ui-invalid"?: import("@emotion/serialize").CSSObject | undefined;
|
|
827
|
+
":-moz-ui-valid"?: import("@emotion/serialize").CSSObject | undefined;
|
|
823
828
|
":-ms-fullscreen"?: import("@emotion/serialize").CSSObject | undefined;
|
|
824
829
|
":-ms-input-placeholder"?: import("@emotion/serialize").CSSObject | undefined;
|
|
825
830
|
":-webkit-any-link"?: import("@emotion/serialize").CSSObject | undefined;
|
|
@@ -830,7 +835,6 @@ export declare const skeletonCSS: ({ mode: { skeleton } }: NavigationTheme) => {
|
|
|
830
835
|
"::-moz-range-thumb"?: import("@emotion/serialize").CSSObject | undefined;
|
|
831
836
|
"::-moz-range-track"?: import("@emotion/serialize").CSSObject | undefined;
|
|
832
837
|
"::-moz-selection"?: import("@emotion/serialize").CSSObject | undefined;
|
|
833
|
-
"::-moz-ui-invalid"?: import("@emotion/serialize").CSSObject | undefined;
|
|
834
838
|
"::-ms-backdrop"?: import("@emotion/serialize").CSSObject | undefined;
|
|
835
839
|
"::-ms-browse"?: import("@emotion/serialize").CSSObject | undefined;
|
|
836
840
|
"::-ms-check"?: import("@emotion/serialize").CSSObject | undefined;
|
|
@@ -914,6 +918,7 @@ export declare const skeletonCSS: ({ mode: { skeleton } }: NavigationTheme) => {
|
|
|
914
918
|
":target"?: import("@emotion/serialize").CSSObject | undefined;
|
|
915
919
|
":target-within"?: import("@emotion/serialize").CSSObject | undefined;
|
|
916
920
|
":user-invalid"?: import("@emotion/serialize").CSSObject | undefined;
|
|
921
|
+
":user-valid"?: import("@emotion/serialize").CSSObject | undefined;
|
|
917
922
|
":valid"?: import("@emotion/serialize").CSSObject | undefined;
|
|
918
923
|
":visited"?: import("@emotion/serialize").CSSObject | undefined;
|
|
919
924
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { NavigationSkeletonProps } from './types';
|
|
3
3
|
export declare const NavigationSkeleton: ({ primaryItemsCount, secondaryItemsCount, theme, showSiteName, shouldShowSearch, testId, }: NavigationSkeletonProps) => JSX.Element;
|
|
4
|
+
export default NavigationSkeleton;
|
|
@@ -8,63 +8,50 @@ export interface AtlassianNavigationProps {
|
|
|
8
8
|
label: string;
|
|
9
9
|
/**
|
|
10
10
|
* Slot for the primary actions.
|
|
11
|
-
* Refer to [primary actions](atlassian-navigation/docs/primary-actions) docs for more information.
|
|
12
11
|
*/
|
|
13
12
|
primaryItems: ReactNodeArray;
|
|
14
13
|
/**
|
|
15
14
|
* Slot for the app switcher.
|
|
16
|
-
* Refer to [app switcher](atlassian-navigation/docs/app-switcher) docs for more information.
|
|
17
15
|
*/
|
|
18
16
|
renderAppSwitcher?: React.ComponentType<{}>;
|
|
19
17
|
/**
|
|
20
18
|
* Slot for the create call to action button.
|
|
21
|
-
* Refer to [create](atlassian-navigation/docs/create) docs for more information.
|
|
22
19
|
*/
|
|
23
20
|
renderCreate?: React.ComponentType<{}>;
|
|
24
21
|
/**
|
|
25
22
|
* Slot for the help button.
|
|
26
|
-
* Refer to [secondary actions](atlassian-navigation/docs/secondary-actions) docs for more information.
|
|
27
23
|
*/
|
|
28
24
|
renderHelp?: React.ComponentType<{}>;
|
|
29
25
|
/**
|
|
30
26
|
* Slot for the notification button.
|
|
31
|
-
* Refer to [secondary actions](atlassian-navigation/docs/secondary-actions) docs for more information.
|
|
32
27
|
*/
|
|
33
28
|
renderNotifications?: React.ComponentType<{}>;
|
|
34
29
|
/**
|
|
35
|
-
* Slot for the product home logo
|
|
36
|
-
* this will render your product brand.
|
|
37
|
-
* Refer to [product home](atlassian-navigation/docs/product home) docs for more information.
|
|
30
|
+
* Slot for the product home logo which renders a product's brand.
|
|
38
31
|
*/
|
|
39
32
|
renderProductHome: React.ComponentType<{}>;
|
|
40
33
|
/**
|
|
41
34
|
* Slot for the profile button.
|
|
42
|
-
* Refer to [secondary actions](atlassian-navigation/docs/secondary-actions) docs for more information.
|
|
43
35
|
*/
|
|
44
36
|
renderProfile?: React.ComponentType<{}>;
|
|
45
37
|
/**
|
|
46
38
|
* Slot for the search textbox.
|
|
47
|
-
* Refer to [secondary actions](atlassian-navigation/docs/secondary-actions) docs for more information.
|
|
48
39
|
*/
|
|
49
40
|
renderSearch?: React.ComponentType<{}>;
|
|
50
41
|
/**
|
|
51
42
|
* Slot for the sign in button.
|
|
52
|
-
* Refer to [secondary actions](atlassian-navigation/docs/secondary-actions) docs for more information.
|
|
53
43
|
*/
|
|
54
44
|
renderSignIn?: React.ComponentType<{}>;
|
|
55
45
|
/**
|
|
56
46
|
* Slot for the settings button.
|
|
57
|
-
* Refer to [secondary actions](atlassian-navigation/docs/secondary-actions) docs for more information.
|
|
58
47
|
*/
|
|
59
48
|
renderSettings?: React.ComponentType<{}>;
|
|
60
49
|
/**
|
|
61
50
|
* Label used for the overflow menu button tooltip.
|
|
62
|
-
* Refer to [overflow menu](atlassian-navigation/docs/overflow-menu) docs for more information.
|
|
63
51
|
*/
|
|
64
52
|
moreLabel?: ReactNode;
|
|
65
53
|
/**
|
|
66
|
-
*
|
|
67
|
-
* Refer to [theming](atlassian-navigation/docs/theming) docs for more information.
|
|
54
|
+
* __Slow and discouraged custom theme API.__
|
|
68
55
|
*/
|
|
69
56
|
theme?: NavigationTheme;
|
|
70
57
|
/**
|
|
@@ -83,10 +70,38 @@ export interface AtlassianNavigationProps {
|
|
|
83
70
|
testId?: string;
|
|
84
71
|
}
|
|
85
72
|
export interface NavigationSkeletonProps {
|
|
73
|
+
/**
|
|
74
|
+
* How many skeleton primary items to display.
|
|
75
|
+
*/
|
|
86
76
|
primaryItemsCount?: number;
|
|
77
|
+
/**
|
|
78
|
+
* How many skeleton secondary items to display.
|
|
79
|
+
*/
|
|
87
80
|
secondaryItemsCount?: number;
|
|
81
|
+
/**
|
|
82
|
+
* Whether to display a skeleton for the site name.
|
|
83
|
+
*/
|
|
88
84
|
showSiteName?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Whether to display a skeleton for the search bar.
|
|
87
|
+
*/
|
|
89
88
|
shouldShowSearch?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* __Slow and discouraged custom theme API.__
|
|
91
|
+
*/
|
|
90
92
|
theme?: NavigationTheme;
|
|
93
|
+
/**
|
|
94
|
+
* A `testId` prop is provided for specified elements,
|
|
95
|
+
* which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
96
|
+
* serving as a hook for automated tests.
|
|
97
|
+
|
|
98
|
+
* Will set these elements when defined:
|
|
99
|
+
|
|
100
|
+
* - Header element - `{testId}-header`
|
|
101
|
+
* - Primary actions container - `{testId}-primary-actions`
|
|
102
|
+
* - Secondary actions container - `{testId}-secondary-actions`
|
|
103
|
+
* - Overflow menu popup - `{testId}-overflow-menu-popup`
|
|
104
|
+
* - Overflow menu button - `{testId}-overflow-menu-trigger`
|
|
105
|
+
*/
|
|
91
106
|
testId?: string;
|
|
92
107
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/atlassian-navigation",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.6",
|
|
4
4
|
"description": "A horizontal navigation component for Atlassian products.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@atlaskit/analytics-next": "*",
|
|
45
45
|
"@atlaskit/atlassian-notifications": "*",
|
|
46
|
+
"@atlaskit/avatar": "*",
|
|
46
47
|
"@atlaskit/badge": "*",
|
|
47
48
|
"@atlaskit/docs": "*",
|
|
48
49
|
"@atlaskit/drawer": "*",
|
|
@@ -55,6 +56,7 @@
|
|
|
55
56
|
"@atlassian/switcher": "*",
|
|
56
57
|
"@atlassian/switcher-test-utils": "*",
|
|
57
58
|
"@testing-library/react": "^8.0.1",
|
|
59
|
+
"@testing-library/react-hooks": "^1.0.4",
|
|
58
60
|
"jest-axe": "^4.0.0",
|
|
59
61
|
"jest-emotion": "^10.0.32",
|
|
60
62
|
"react": "^16.8.0",
|
|
@@ -76,5 +78,6 @@
|
|
|
76
78
|
"deprecation": "no-deprecated-imports"
|
|
77
79
|
}
|
|
78
80
|
},
|
|
81
|
+
"homepage": "https://atlassian.design/components/atlassian-navigation/",
|
|
79
82
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
80
83
|
}
|
package/skeleton/package.json
CHANGED
|
@@ -3,5 +3,6 @@
|
|
|
3
3
|
"main": "../dist/cjs/skeleton-notification-button.js",
|
|
4
4
|
"module": "../dist/esm/skeleton-notification-button.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/skeleton-notification-button.js",
|
|
6
|
+
"sideEffects": false,
|
|
6
7
|
"types": "../dist/types/skeleton-notification-button.d.ts"
|
|
7
8
|
}
|