@atlaskit/atlassian-navigation 5.4.2 → 5.5.1

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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/atlassian-navigation
2
2
 
3
+ ## 5.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`a60a82196851a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a60a82196851a) -
8
+ Internal refactors to remove unused variables. No functional or public changes.
9
+ - Updated dependencies
10
+
11
+ ## 5.5.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [`f089cdf7f6a28`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f089cdf7f6a28) -
16
+ PrimaryButton now supports displaying a shortcut in the tooltip, through the new `shortcut` prop.
17
+ It is passed through to the Tooltip's `shortcut` prop.
18
+
3
19
  ## 5.4.2
4
20
 
5
21
  ### Patch Changes
@@ -38,9 +38,6 @@
38
38
  {
39
39
  "path": "../../logo/afm-cc/tsconfig.json"
40
40
  },
41
- {
42
- "path": "../../../platform/feature-flags/afm-cc/tsconfig.json"
43
- },
44
41
  {
45
42
  "path": "../../popup/afm-cc/tsconfig.json"
46
43
  },
@@ -3,7 +3,7 @@
3
3
  "compilerOptions": {
4
4
  "declaration": true,
5
5
  "target": "es5",
6
- "outDir": "../../../../../tsDist/@atlaskit__atlassian-navigation/app",
6
+ "outDir": "../../../../../jira/tsDist/@atlaskit__atlassian-navigation/app",
7
7
  "rootDir": "../",
8
8
  "composite": true
9
9
  },
@@ -38,9 +38,6 @@
38
38
  {
39
39
  "path": "../../logo/afm-jira/tsconfig.json"
40
40
  },
41
- {
42
- "path": "../../../platform/feature-flags/afm-jira/tsconfig.json"
43
- },
44
41
  {
45
42
  "path": "../../popup/afm-jira/tsconfig.json"
46
43
  },
@@ -38,9 +38,6 @@
38
38
  {
39
39
  "path": "../../logo/afm-products/tsconfig.json"
40
40
  },
41
- {
42
- "path": "../../../platform/feature-flags/afm-products/tsconfig.json"
43
- },
44
41
  {
45
42
  "path": "../../popup/afm-products/tsconfig.json"
46
43
  },
@@ -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
@@ -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.4.2",
3
+ "version": "5.5.1",
4
4
  "description": "A horizontal navigation component for Atlassian apps.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -36,17 +36,16 @@
36
36
  }
37
37
  },
38
38
  "dependencies": {
39
- "@atlaskit/analytics-namespaced-context": "^7.1.0",
39
+ "@atlaskit/analytics-namespaced-context": "^7.2.0",
40
40
  "@atlaskit/button": "^23.6.0",
41
- "@atlaskit/ds-lib": "^5.2.0",
41
+ "@atlaskit/ds-lib": "^5.3.0",
42
42
  "@atlaskit/icon": "^29.0.0",
43
43
  "@atlaskit/logo": "^19.9.0",
44
- "@atlaskit/platform-feature-flags": "^1.1.0",
45
44
  "@atlaskit/popup": "^4.6.0",
46
- "@atlaskit/primitives": "^16.1.0",
45
+ "@atlaskit/primitives": "^16.4.0",
47
46
  "@atlaskit/theme": "^21.0.0",
48
- "@atlaskit/tokens": "^8.0.0",
49
- "@atlaskit/tooltip": "^20.8.0",
47
+ "@atlaskit/tokens": "^8.4.0",
48
+ "@atlaskit/tooltip": "^20.11.0",
50
49
  "@atlaskit/width-detector": "^5.0.0",
51
50
  "@babel/runtime": "^7.0.0",
52
51
  "@emotion/react": "^11.7.1",
@@ -67,15 +66,15 @@
67
66
  "@atlaskit/docs": "^11.2.0",
68
67
  "@atlaskit/drawer": "^11.0.0",
69
68
  "@atlaskit/dropdown-menu": "^16.3.0",
70
- "@atlaskit/form": "^14.2.0",
69
+ "@atlaskit/form": "^14.3.0",
71
70
  "@atlaskit/menu": "^8.4.0",
72
71
  "@atlaskit/notification-indicator": "^10.0.0",
73
- "@atlaskit/notification-log-client": "^6.2.0",
72
+ "@atlaskit/notification-log-client": "^6.3.0",
74
73
  "@atlaskit/section-message": "^8.9.0",
75
74
  "@atlaskit/spinner": "^19.0.0",
76
- "@atlaskit/textfield": "^8.0.0",
77
- "@atlassian/switcher": "^41.2.0",
78
- "@atlassian/switcher-test-utils": "^7.2.0",
75
+ "@atlaskit/textfield": "^8.1.0",
76
+ "@atlassian/switcher": "^43.5.0",
77
+ "@atlassian/switcher-test-utils": "^8.0.0",
79
78
  "@testing-library/react": "^13.4.0",
80
79
  "@testing-library/react-hooks": "^8.0.1",
81
80
  "@testing-library/user-event": "^14.4.3",