@atlaskit/atlassian-navigation 5.4.2 → 5.5.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 +8 -0
- package/afm-jira/tsconfig.json +1 -1
- package/dist/cjs/components/PrimaryButton/index.js +4 -2
- package/dist/es2019/components/PrimaryButton/index.js +3 -1
- package/dist/esm/components/PrimaryButton/index.js +4 -2
- package/dist/types/components/PrimaryButton/types.d.ts +9 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/skeleton-help-button.d.ts +1 -1
- package/dist/types/skeleton-notification-button.d.ts +2 -2
- package/dist/types/skeleton-settings-button.d.ts +2 -2
- package/dist/types-ts4.5/components/PrimaryButton/types.d.ts +9 -0
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/skeleton-help-button.d.ts +1 -1
- package/dist/types-ts4.5/skeleton-notification-button.d.ts +2 -2
- package/dist/types-ts4.5/skeleton-settings-button.d.ts +2 -2
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/atlassian-navigation
|
|
2
2
|
|
|
3
|
+
## 5.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`f089cdf7f6a28`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f089cdf7f6a28) -
|
|
8
|
+
PrimaryButton now supports displaying a shortcut in the tooltip, through the new `shortcut` prop.
|
|
9
|
+
It is passed through to the Tooltip's `shortcut` prop.
|
|
10
|
+
|
|
3
11
|
## 5.4.2
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/afm-jira/tsconfig.json
CHANGED
|
@@ -14,7 +14,7 @@ var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom
|
|
|
14
14
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
15
15
|
var _theme = require("../../theme");
|
|
16
16
|
var _styles = require("./styles");
|
|
17
|
-
var _excluded = ["children", "component", "isHighlighted", "isLoading", "isSelected", "onClick", "testId", "theme", "tooltip"];
|
|
17
|
+
var _excluded = ["children", "component", "isHighlighted", "isLoading", "isSelected", "onClick", "testId", "theme", "tooltip", "shortcut"];
|
|
18
18
|
/**
|
|
19
19
|
* @jsxRuntime classic
|
|
20
20
|
* @jsx jsx
|
|
@@ -71,6 +71,7 @@ var PrimaryButton = exports.PrimaryButton = /*#__PURE__*/(0, _react.forwardRef)(
|
|
|
71
71
|
testId = props.testId,
|
|
72
72
|
theme = props.theme,
|
|
73
73
|
tooltip = props.tooltip,
|
|
74
|
+
shortcut = props.shortcut,
|
|
74
75
|
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
75
76
|
var themeFromContext = (0, _theme.useTheme)();
|
|
76
77
|
var button = (0, _react2.jsx)("div", {
|
|
@@ -95,7 +96,8 @@ var PrimaryButton = exports.PrimaryButton = /*#__PURE__*/(0, _react.forwardRef)(
|
|
|
95
96
|
if (tooltip) {
|
|
96
97
|
return (0, _react2.jsx)(_tooltip.default, {
|
|
97
98
|
content: tooltip,
|
|
98
|
-
hideTooltipOnClick: true
|
|
99
|
+
hideTooltipOnClick: true,
|
|
100
|
+
shortcut: shortcut
|
|
99
101
|
}, button);
|
|
100
102
|
}
|
|
101
103
|
return button;
|
|
@@ -63,6 +63,7 @@ export const PrimaryButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
63
63
|
testId,
|
|
64
64
|
theme,
|
|
65
65
|
tooltip,
|
|
66
|
+
shortcut,
|
|
66
67
|
...rest
|
|
67
68
|
} = props;
|
|
68
69
|
const themeFromContext = useTheme();
|
|
@@ -91,7 +92,8 @@ export const PrimaryButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
91
92
|
if (tooltip) {
|
|
92
93
|
return jsx(Tooltip, {
|
|
93
94
|
content: tooltip,
|
|
94
|
-
hideTooltipOnClick: true
|
|
95
|
+
hideTooltipOnClick: true,
|
|
96
|
+
shortcut: shortcut
|
|
95
97
|
}, button);
|
|
96
98
|
}
|
|
97
99
|
return button;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["children", "component", "isHighlighted", "isLoading", "isSelected", "onClick", "testId", "theme", "tooltip"];
|
|
4
|
+
var _excluded = ["children", "component", "isHighlighted", "isLoading", "isSelected", "onClick", "testId", "theme", "tooltip", "shortcut"];
|
|
5
5
|
/**
|
|
6
6
|
* @jsxRuntime classic
|
|
7
7
|
* @jsx jsx
|
|
@@ -65,6 +65,7 @@ export var PrimaryButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
65
65
|
testId = props.testId,
|
|
66
66
|
theme = props.theme,
|
|
67
67
|
tooltip = props.tooltip,
|
|
68
|
+
shortcut = props.shortcut,
|
|
68
69
|
rest = _objectWithoutProperties(props, _excluded);
|
|
69
70
|
var themeFromContext = useTheme();
|
|
70
71
|
var button = jsx("div", {
|
|
@@ -89,7 +90,8 @@ export var PrimaryButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
89
90
|
if (tooltip) {
|
|
90
91
|
return jsx(Tooltip, {
|
|
91
92
|
content: tooltip,
|
|
92
|
-
hideTooltipOnClick: true
|
|
93
|
+
hideTooltipOnClick: true,
|
|
94
|
+
shortcut: shortcut
|
|
93
95
|
}, button);
|
|
94
96
|
}
|
|
95
97
|
return button;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type AllHTMLAttributes, type ComponentType, type ElementType } from 'react';
|
|
2
2
|
import { type CustomThemeButtonProps } from '@atlaskit/button/types';
|
|
3
|
+
import type { TooltipProps } from '@atlaskit/tooltip';
|
|
3
4
|
export type PrimaryButtonProps = Omit<CustomThemeButtonProps, 'appearance' | 'onClick'> & {
|
|
4
5
|
/**
|
|
5
6
|
* Allows for overriding the component used to render the button.
|
|
@@ -31,6 +32,14 @@ export type PrimaryButtonProps = Omit<CustomThemeButtonProps, 'appearance' | 'on
|
|
|
31
32
|
* Optional text to show when the button is focused or hovered.
|
|
32
33
|
*/
|
|
33
34
|
tooltip?: React.ReactNode;
|
|
35
|
+
/**
|
|
36
|
+
* Display a keyboard shortcut in the tooltip.
|
|
37
|
+
*
|
|
38
|
+
* Keys will be displayed as individual keyboard key segments after the tooltip content.
|
|
39
|
+
*
|
|
40
|
+
* Note: it will only be used if the `tooltip` prop is also provided.
|
|
41
|
+
*/
|
|
42
|
+
shortcut?: TooltipProps['shortcut'];
|
|
34
43
|
/**
|
|
35
44
|
* On click handler.
|
|
36
45
|
* See @atlaskit/analytics-next for analyticsEvent type information
|
package/dist/types/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export type { PrimaryButtonProps } from './components/PrimaryButton/types';
|
|
|
13
13
|
export { PrimaryDropdownButton } from './components/PrimaryDropdownButton';
|
|
14
14
|
export type { PrimaryDropdownButtonProps } from './components/PrimaryDropdownButton/types';
|
|
15
15
|
export { IconButton } from './components/IconButton';
|
|
16
|
-
export type { IconButtonProps } from './components/IconButton/types';
|
|
16
|
+
export type { IconButtonProps, BaseIconButtonProps } from './components/IconButton/types';
|
|
17
17
|
export { CustomProductHome, ProductHome, AppHome } from './components/ProductHome';
|
|
18
18
|
export type { CustomProductHomeProps, ProductHomeProps, AppHomeProps, } from './components/ProductHome/types';
|
|
19
19
|
export { Profile } from './components/Profile';
|
|
@@ -22,4 +22,4 @@ export declare const SkeletonHelpButton: ({ label }: SkeletonHelpButtonProps) =>
|
|
|
22
22
|
*
|
|
23
23
|
* A nav 4 skeleton help button {description}.
|
|
24
24
|
*/
|
|
25
|
-
export declare const Nav4SkeletonHelpButton: ({ label }: SkeletonHelpButtonProps) => React.JSX.Element;
|
|
25
|
+
export declare const Nav4SkeletonHelpButton: ({ label, }: SkeletonHelpButtonProps) => React.JSX.Element;
|
|
@@ -16,11 +16,11 @@ export type SkeletonNotificationButtonProps = {
|
|
|
16
16
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-button)
|
|
17
17
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
18
18
|
*/
|
|
19
|
-
export declare const SkeletonNotificationButton: ({ label }: SkeletonNotificationButtonProps) => React.JSX.Element;
|
|
19
|
+
export declare const SkeletonNotificationButton: ({ label, }: SkeletonNotificationButtonProps) => React.JSX.Element;
|
|
20
20
|
/**
|
|
21
21
|
* __Nav 4 skeleton notification button__
|
|
22
22
|
*
|
|
23
23
|
* A nav 4 skeleton notification button.
|
|
24
24
|
*
|
|
25
25
|
*/
|
|
26
|
-
export declare const Nav4SkeletonNotificationButton: ({ label }: SkeletonNotificationButtonProps) => React.JSX.Element;
|
|
26
|
+
export declare const Nav4SkeletonNotificationButton: ({ label, }: SkeletonNotificationButtonProps) => React.JSX.Element;
|
|
@@ -16,10 +16,10 @@ export type SkeletonSettingsButtonProps = {
|
|
|
16
16
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-button)
|
|
17
17
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
18
18
|
*/
|
|
19
|
-
export declare const SkeletonSettingsButton: ({ label }: SkeletonSettingsButtonProps) => React.JSX.Element;
|
|
19
|
+
export declare const SkeletonSettingsButton: ({ label, }: SkeletonSettingsButtonProps) => React.JSX.Element;
|
|
20
20
|
/**
|
|
21
21
|
* __Nav 4 skeleton settings button__
|
|
22
22
|
*
|
|
23
23
|
* A nav 4 skeleton settings button
|
|
24
24
|
*/
|
|
25
|
-
export declare const Nav4SkeletonSettingsButton: ({ label }: SkeletonSettingsButtonProps) => React.JSX.Element;
|
|
25
|
+
export declare const Nav4SkeletonSettingsButton: ({ label, }: SkeletonSettingsButtonProps) => React.JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type AllHTMLAttributes, type ComponentType, type ElementType } from 'react';
|
|
2
2
|
import { type CustomThemeButtonProps } from '@atlaskit/button/types';
|
|
3
|
+
import type { TooltipProps } from '@atlaskit/tooltip';
|
|
3
4
|
export type PrimaryButtonProps = Omit<CustomThemeButtonProps, 'appearance' | 'onClick'> & {
|
|
4
5
|
/**
|
|
5
6
|
* Allows for overriding the component used to render the button.
|
|
@@ -31,6 +32,14 @@ export type PrimaryButtonProps = Omit<CustomThemeButtonProps, 'appearance' | 'on
|
|
|
31
32
|
* Optional text to show when the button is focused or hovered.
|
|
32
33
|
*/
|
|
33
34
|
tooltip?: React.ReactNode;
|
|
35
|
+
/**
|
|
36
|
+
* Display a keyboard shortcut in the tooltip.
|
|
37
|
+
*
|
|
38
|
+
* Keys will be displayed as individual keyboard key segments after the tooltip content.
|
|
39
|
+
*
|
|
40
|
+
* Note: it will only be used if the `tooltip` prop is also provided.
|
|
41
|
+
*/
|
|
42
|
+
shortcut?: TooltipProps['shortcut'];
|
|
34
43
|
/**
|
|
35
44
|
* On click handler.
|
|
36
45
|
* See @atlaskit/analytics-next for analyticsEvent type information
|
|
@@ -13,7 +13,7 @@ export type { PrimaryButtonProps } from './components/PrimaryButton/types';
|
|
|
13
13
|
export { PrimaryDropdownButton } from './components/PrimaryDropdownButton';
|
|
14
14
|
export type { PrimaryDropdownButtonProps } from './components/PrimaryDropdownButton/types';
|
|
15
15
|
export { IconButton } from './components/IconButton';
|
|
16
|
-
export type { IconButtonProps } from './components/IconButton/types';
|
|
16
|
+
export type { IconButtonProps, BaseIconButtonProps } from './components/IconButton/types';
|
|
17
17
|
export { CustomProductHome, ProductHome, AppHome } from './components/ProductHome';
|
|
18
18
|
export type { CustomProductHomeProps, ProductHomeProps, AppHomeProps, } from './components/ProductHome/types';
|
|
19
19
|
export { Profile } from './components/Profile';
|
|
@@ -22,4 +22,4 @@ export declare const SkeletonHelpButton: ({ label }: SkeletonHelpButtonProps) =>
|
|
|
22
22
|
*
|
|
23
23
|
* A nav 4 skeleton help button {description}.
|
|
24
24
|
*/
|
|
25
|
-
export declare const Nav4SkeletonHelpButton: ({ label }: SkeletonHelpButtonProps) => React.JSX.Element;
|
|
25
|
+
export declare const Nav4SkeletonHelpButton: ({ label, }: SkeletonHelpButtonProps) => React.JSX.Element;
|
|
@@ -16,11 +16,11 @@ export type SkeletonNotificationButtonProps = {
|
|
|
16
16
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-button)
|
|
17
17
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
18
18
|
*/
|
|
19
|
-
export declare const SkeletonNotificationButton: ({ label }: SkeletonNotificationButtonProps) => React.JSX.Element;
|
|
19
|
+
export declare const SkeletonNotificationButton: ({ label, }: SkeletonNotificationButtonProps) => React.JSX.Element;
|
|
20
20
|
/**
|
|
21
21
|
* __Nav 4 skeleton notification button__
|
|
22
22
|
*
|
|
23
23
|
* A nav 4 skeleton notification button.
|
|
24
24
|
*
|
|
25
25
|
*/
|
|
26
|
-
export declare const Nav4SkeletonNotificationButton: ({ label }: SkeletonNotificationButtonProps) => React.JSX.Element;
|
|
26
|
+
export declare const Nav4SkeletonNotificationButton: ({ label, }: SkeletonNotificationButtonProps) => React.JSX.Element;
|
|
@@ -16,10 +16,10 @@ export type SkeletonSettingsButtonProps = {
|
|
|
16
16
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-button)
|
|
17
17
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
18
18
|
*/
|
|
19
|
-
export declare const SkeletonSettingsButton: ({ label }: SkeletonSettingsButtonProps) => React.JSX.Element;
|
|
19
|
+
export declare const SkeletonSettingsButton: ({ label, }: SkeletonSettingsButtonProps) => React.JSX.Element;
|
|
20
20
|
/**
|
|
21
21
|
* __Nav 4 skeleton settings button__
|
|
22
22
|
*
|
|
23
23
|
* A nav 4 skeleton settings button
|
|
24
24
|
*/
|
|
25
|
-
export declare const Nav4SkeletonSettingsButton: ({ label }: SkeletonSettingsButtonProps) => React.JSX.Element;
|
|
25
|
+
export declare const Nav4SkeletonSettingsButton: ({ label, }: SkeletonSettingsButtonProps) => React.JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/atlassian-navigation",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.5.0",
|
|
4
4
|
"description": "A horizontal navigation component for Atlassian apps.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -36,17 +36,17 @@
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@atlaskit/analytics-namespaced-context": "^7.
|
|
39
|
+
"@atlaskit/analytics-namespaced-context": "^7.2.0",
|
|
40
40
|
"@atlaskit/button": "^23.6.0",
|
|
41
|
-
"@atlaskit/ds-lib": "^5.
|
|
41
|
+
"@atlaskit/ds-lib": "^5.3.0",
|
|
42
42
|
"@atlaskit/icon": "^29.0.0",
|
|
43
43
|
"@atlaskit/logo": "^19.9.0",
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
45
45
|
"@atlaskit/popup": "^4.6.0",
|
|
46
|
-
"@atlaskit/primitives": "^16.
|
|
46
|
+
"@atlaskit/primitives": "^16.4.0",
|
|
47
47
|
"@atlaskit/theme": "^21.0.0",
|
|
48
|
-
"@atlaskit/tokens": "^8.
|
|
49
|
-
"@atlaskit/tooltip": "^20.
|
|
48
|
+
"@atlaskit/tokens": "^8.4.0",
|
|
49
|
+
"@atlaskit/tooltip": "^20.10.0",
|
|
50
50
|
"@atlaskit/width-detector": "^5.0.0",
|
|
51
51
|
"@babel/runtime": "^7.0.0",
|
|
52
52
|
"@emotion/react": "^11.7.1",
|
|
@@ -67,15 +67,15 @@
|
|
|
67
67
|
"@atlaskit/docs": "^11.2.0",
|
|
68
68
|
"@atlaskit/drawer": "^11.0.0",
|
|
69
69
|
"@atlaskit/dropdown-menu": "^16.3.0",
|
|
70
|
-
"@atlaskit/form": "^14.
|
|
70
|
+
"@atlaskit/form": "^14.3.0",
|
|
71
71
|
"@atlaskit/menu": "^8.4.0",
|
|
72
72
|
"@atlaskit/notification-indicator": "^10.0.0",
|
|
73
|
-
"@atlaskit/notification-log-client": "^6.
|
|
73
|
+
"@atlaskit/notification-log-client": "^6.3.0",
|
|
74
74
|
"@atlaskit/section-message": "^8.9.0",
|
|
75
75
|
"@atlaskit/spinner": "^19.0.0",
|
|
76
|
-
"@atlaskit/textfield": "^8.
|
|
77
|
-
"@atlassian/switcher": "^
|
|
78
|
-
"@atlassian/switcher-test-utils": "^
|
|
76
|
+
"@atlaskit/textfield": "^8.1.0",
|
|
77
|
+
"@atlassian/switcher": "^43.2.0",
|
|
78
|
+
"@atlassian/switcher-test-utils": "^8.0.0",
|
|
79
79
|
"@testing-library/react": "^13.4.0",
|
|
80
80
|
"@testing-library/react-hooks": "^8.0.1",
|
|
81
81
|
"@testing-library/user-event": "^14.4.3",
|