@atlaskit/atlassian-navigation 4.8.0 → 4.9.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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/atlassian-navigation
2
2
 
3
+ ## 4.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#163994](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/163994)
8
+ [`93794f3c42f1e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/93794f3c42f1e) -
9
+ Add explicit support for `aria-label` to `ProductHome`. This already worked due to spread props,
10
+ but is now typed and explicitly applied.
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
3
16
  ## 4.8.0
4
17
 
5
18
  ### Minor Changes
@@ -1,57 +1,57 @@
1
1
  {
2
- "extends": "../../../../tsconfig.entry-points.jira.json",
3
- "compilerOptions": {
4
- "declaration": true,
5
- "target": "es5",
6
- "outDir": "../../../../../tsDist/@atlaskit__atlassian-navigation/app",
7
- "composite": true,
8
- "rootDir": "../"
9
- },
10
- "include": [
11
- "../src/**/*.ts",
12
- "../src/**/*.tsx"
13
- ],
14
- "exclude": [
15
- "../src/**/__tests__/*",
16
- "../src/**/*.test.*",
17
- "../src/**/test.*"
18
- ],
19
- "references": [
20
- {
21
- "path": "../../../analytics/analytics-namespaced-context/afm-jira/tsconfig.json"
22
- },
23
- {
24
- "path": "../../button/afm-jira/tsconfig.json"
25
- },
26
- {
27
- "path": "../../ds-lib/afm-jira/tsconfig.json"
28
- },
29
- {
30
- "path": "../../icon/afm-jira/tsconfig.json"
31
- },
32
- {
33
- "path": "../../logo/afm-jira/tsconfig.json"
34
- },
35
- {
36
- "path": "../../../platform/feature-flags/afm-jira/tsconfig.json"
37
- },
38
- {
39
- "path": "../../popup/afm-jira/tsconfig.json"
40
- },
41
- {
42
- "path": "../../primitives/afm-jira/tsconfig.json"
43
- },
44
- {
45
- "path": "../../theme/afm-jira/tsconfig.json"
46
- },
47
- {
48
- "path": "../../tokens/afm-jira/tsconfig.json"
49
- },
50
- {
51
- "path": "../../tooltip/afm-jira/tsconfig.json"
52
- },
53
- {
54
- "path": "../../width-detector/afm-jira/tsconfig.json"
55
- }
56
- ]
57
- }
2
+ "extends": "../../../../tsconfig.entry-points.jira.json",
3
+ "compilerOptions": {
4
+ "declaration": true,
5
+ "target": "es5",
6
+ "outDir": "../../../../../tsDist/@atlaskit__atlassian-navigation/app",
7
+ "rootDir": "../",
8
+ "composite": true
9
+ },
10
+ "include": [
11
+ "../src/**/*.ts",
12
+ "../src/**/*.tsx"
13
+ ],
14
+ "exclude": [
15
+ "../src/**/__tests__/*",
16
+ "../src/**/*.test.*",
17
+ "../src/**/test.*"
18
+ ],
19
+ "references": [
20
+ {
21
+ "path": "../../../analytics/analytics-namespaced-context/afm-jira/tsconfig.json"
22
+ },
23
+ {
24
+ "path": "../../button/afm-jira/tsconfig.json"
25
+ },
26
+ {
27
+ "path": "../../ds-lib/afm-jira/tsconfig.json"
28
+ },
29
+ {
30
+ "path": "../../icon/afm-jira/tsconfig.json"
31
+ },
32
+ {
33
+ "path": "../../logo/afm-jira/tsconfig.json"
34
+ },
35
+ {
36
+ "path": "../../../platform/feature-flags/afm-jira/tsconfig.json"
37
+ },
38
+ {
39
+ "path": "../../popup/afm-jira/tsconfig.json"
40
+ },
41
+ {
42
+ "path": "../../primitives/afm-jira/tsconfig.json"
43
+ },
44
+ {
45
+ "path": "../../theme/afm-jira/tsconfig.json"
46
+ },
47
+ {
48
+ "path": "../../tokens/afm-jira/tsconfig.json"
49
+ },
50
+ {
51
+ "path": "../../tooltip/afm-jira/tsconfig.json"
52
+ },
53
+ {
54
+ "path": "../../width-detector/afm-jira/tsconfig.json"
55
+ }
56
+ ]
57
+ }
@@ -1,57 +1,57 @@
1
1
  {
2
- "extends": "../../../../tsconfig.entry-points.post-office.json",
3
- "compilerOptions": {
4
- "declaration": true,
5
- "target": "es5",
6
- "outDir": "../../../../../tsDist/@atlaskit__atlassian-navigation/app",
7
- "composite": true,
8
- "rootDir": "../"
9
- },
10
- "include": [
11
- "../src/**/*.ts",
12
- "../src/**/*.tsx"
13
- ],
14
- "exclude": [
15
- "../src/**/__tests__/*",
16
- "../src/**/*.test.*",
17
- "../src/**/test.*"
18
- ],
19
- "references": [
20
- {
21
- "path": "../../../analytics/analytics-namespaced-context/afm-post-office/tsconfig.json"
22
- },
23
- {
24
- "path": "../../button/afm-post-office/tsconfig.json"
25
- },
26
- {
27
- "path": "../../ds-lib/afm-post-office/tsconfig.json"
28
- },
29
- {
30
- "path": "../../icon/afm-post-office/tsconfig.json"
31
- },
32
- {
33
- "path": "../../logo/afm-post-office/tsconfig.json"
34
- },
35
- {
36
- "path": "../../../platform/feature-flags/afm-post-office/tsconfig.json"
37
- },
38
- {
39
- "path": "../../popup/afm-post-office/tsconfig.json"
40
- },
41
- {
42
- "path": "../../primitives/afm-post-office/tsconfig.json"
43
- },
44
- {
45
- "path": "../../theme/afm-post-office/tsconfig.json"
46
- },
47
- {
48
- "path": "../../tokens/afm-post-office/tsconfig.json"
49
- },
50
- {
51
- "path": "../../tooltip/afm-post-office/tsconfig.json"
52
- },
53
- {
54
- "path": "../../width-detector/afm-post-office/tsconfig.json"
55
- }
56
- ]
57
- }
2
+ "extends": "../../../../tsconfig.entry-points.post-office.json",
3
+ "compilerOptions": {
4
+ "declaration": true,
5
+ "target": "es5",
6
+ "outDir": "../../../../../post-office/tsDist/@atlaskit__atlassian-navigation/app",
7
+ "rootDir": "../",
8
+ "composite": true
9
+ },
10
+ "include": [
11
+ "../src/**/*.ts",
12
+ "../src/**/*.tsx"
13
+ ],
14
+ "exclude": [
15
+ "../src/**/__tests__/*",
16
+ "../src/**/*.test.*",
17
+ "../src/**/test.*"
18
+ ],
19
+ "references": [
20
+ {
21
+ "path": "../../../analytics/analytics-namespaced-context/afm-post-office/tsconfig.json"
22
+ },
23
+ {
24
+ "path": "../../button/afm-post-office/tsconfig.json"
25
+ },
26
+ {
27
+ "path": "../../ds-lib/afm-post-office/tsconfig.json"
28
+ },
29
+ {
30
+ "path": "../../icon/afm-post-office/tsconfig.json"
31
+ },
32
+ {
33
+ "path": "../../logo/afm-post-office/tsconfig.json"
34
+ },
35
+ {
36
+ "path": "../../../platform/feature-flags/afm-post-office/tsconfig.json"
37
+ },
38
+ {
39
+ "path": "../../popup/afm-post-office/tsconfig.json"
40
+ },
41
+ {
42
+ "path": "../../primitives/afm-post-office/tsconfig.json"
43
+ },
44
+ {
45
+ "path": "../../theme/afm-post-office/tsconfig.json"
46
+ },
47
+ {
48
+ "path": "../../tokens/afm-post-office/tsconfig.json"
49
+ },
50
+ {
51
+ "path": "../../tooltip/afm-post-office/tsconfig.json"
52
+ },
53
+ {
54
+ "path": "../../width-detector/afm-post-office/tsconfig.json"
55
+ }
56
+ ]
57
+ }
@@ -14,7 +14,7 @@ var _constants = require("../../common/constants");
14
14
  var _theme = require("../../theme");
15
15
  var _utils = require("../../utils");
16
16
  var _utils2 = require("./utils");
17
- var _excluded = ["icon", "logo", "siteTitle", "onClick", "href", "onMouseDown", "testId", "logoMaxWidth"];
17
+ var _excluded = ["icon", "logo", "siteTitle", "onClick", "href", "onMouseDown", "testId", "logoMaxWidth", "aria-label"];
18
18
  var _css;
19
19
  /**
20
20
  * @jsxRuntime classic
@@ -132,6 +132,7 @@ var ProductHome = function ProductHome(_ref) {
132
132
  testId = _ref.testId,
133
133
  _ref$logoMaxWidth = _ref.logoMaxWidth,
134
134
  logoMaxWidth = _ref$logoMaxWidth === void 0 ? 260 : _ref$logoMaxWidth,
135
+ ariaLabel = _ref['aria-label'],
135
136
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
136
137
  var theme = (0, _theme.useTheme)();
137
138
  var primaryButton = theme.mode.primaryButton;
@@ -154,7 +155,8 @@ var ProductHome = function ProductHome(_ref) {
154
155
  href: href,
155
156
  onClick: onClick,
156
157
  onMouseDown: preventFocusRing,
157
- "data-testid": testId && "".concat(testId, "-container")
158
+ "data-testid": testId && "".concat(testId, "-container"),
159
+ "aria-label": ariaLabel
158
160
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
159
161
  }, rest), (0, _react2.jsx)("div", {
160
162
  css: [customMaxHeightStyles, productLogoStyles],
@@ -128,6 +128,7 @@ const ProductHome = ({
128
128
  onMouseDown,
129
129
  testId,
130
130
  logoMaxWidth = 260,
131
+ 'aria-label': ariaLabel,
131
132
  ...rest
132
133
  }) => {
133
134
  const theme = useTheme();
@@ -161,7 +162,8 @@ const ProductHome = ({
161
162
  href: href,
162
163
  onClick: onClick,
163
164
  onMouseDown: preventFocusRing,
164
- "data-testid": testId && `${testId}-container`
165
+ "data-testid": testId && `${testId}-container`,
166
+ "aria-label": ariaLabel
165
167
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
166
168
  }, rest), jsx("div", {
167
169
  css: [customMaxHeightStyles, productLogoStyles],
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
- var _excluded = ["icon", "logo", "siteTitle", "onClick", "href", "onMouseDown", "testId", "logoMaxWidth"];
4
+ var _excluded = ["icon", "logo", "siteTitle", "onClick", "href", "onMouseDown", "testId", "logoMaxWidth", "aria-label"];
5
5
  var _css;
6
6
  /**
7
7
  * @jsxRuntime classic
@@ -126,6 +126,7 @@ var ProductHome = function ProductHome(_ref) {
126
126
  testId = _ref.testId,
127
127
  _ref$logoMaxWidth = _ref.logoMaxWidth,
128
128
  logoMaxWidth = _ref$logoMaxWidth === void 0 ? 260 : _ref$logoMaxWidth,
129
+ ariaLabel = _ref['aria-label'],
129
130
  rest = _objectWithoutProperties(_ref, _excluded);
130
131
  var theme = useTheme();
131
132
  var primaryButton = theme.mode.primaryButton;
@@ -148,7 +149,8 @@ var ProductHome = function ProductHome(_ref) {
148
149
  href: href,
149
150
  onClick: onClick,
150
151
  onMouseDown: preventFocusRing,
151
- "data-testid": testId && "".concat(testId, "-container")
152
+ "data-testid": testId && "".concat(testId, "-container"),
153
+ "aria-label": ariaLabel
152
154
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
153
155
  }, rest), jsx("div", {
154
156
  css: [customMaxHeightStyles, productLogoStyles],
@@ -11,5 +11,5 @@ import { type ProductHomeProps } from './types';
11
11
  * - [Examples](https://atlassian.design/components/atlassian-navigation/examples#product-home)
12
12
  * - [Code](https://atlassian.design/components/atlassian-navigation/code)
13
13
  */
14
- declare const ProductHome: ({ icon: Icon, logo: Logo, siteTitle, onClick, href, onMouseDown, testId, logoMaxWidth, ...rest }: ProductHomeProps) => jsx.JSX.Element;
14
+ declare const ProductHome: ({ icon: Icon, logo: Logo, siteTitle, onClick, href, onMouseDown, testId, logoMaxWidth, "aria-label": ariaLabel, ...rest }: ProductHomeProps) => jsx.JSX.Element;
15
15
  export default ProductHome;
@@ -45,6 +45,10 @@ export interface ProductHomeProps {
45
45
  - Site title - `{testId}-site-title`
46
46
  */
47
47
  testId?: string;
48
+ /**
49
+ * Provide an accessible label, often used by screen readers.
50
+ */
51
+ 'aria-label'?: string;
48
52
  }
49
53
  export interface CustomProductHomeProps {
50
54
  /**
@@ -11,5 +11,5 @@ import { type ProductHomeProps } from './types';
11
11
  * - [Examples](https://atlassian.design/components/atlassian-navigation/examples#product-home)
12
12
  * - [Code](https://atlassian.design/components/atlassian-navigation/code)
13
13
  */
14
- declare const ProductHome: ({ icon: Icon, logo: Logo, siteTitle, onClick, href, onMouseDown, testId, logoMaxWidth, ...rest }: ProductHomeProps) => jsx.JSX.Element;
14
+ declare const ProductHome: ({ icon: Icon, logo: Logo, siteTitle, onClick, href, onMouseDown, testId, logoMaxWidth, "aria-label": ariaLabel, ...rest }: ProductHomeProps) => jsx.JSX.Element;
15
15
  export default ProductHome;
@@ -45,6 +45,10 @@ export interface ProductHomeProps {
45
45
  - Site title - `{testId}-site-title`
46
46
  */
47
47
  testId?: string;
48
+ /**
49
+ * Provide an accessible label, often used by screen readers.
50
+ */
51
+ 'aria-label'?: string;
48
52
  }
49
53
  export interface CustomProductHomeProps {
50
54
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/atlassian-navigation",
3
- "version": "4.8.0",
3
+ "version": "4.9.0",
4
4
  "description": "A horizontal navigation component for Atlassian products.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -41,15 +41,15 @@
41
41
  "dependencies": {
42
42
  "@atlaskit/analytics-namespaced-context": "^6.12.0",
43
43
  "@atlaskit/button": "^20.3.0",
44
- "@atlaskit/ds-lib": "^3.1.0",
44
+ "@atlaskit/ds-lib": "^3.2.0",
45
45
  "@atlaskit/icon": "^22.24.0",
46
46
  "@atlaskit/logo": "*",
47
47
  "@atlaskit/platform-feature-flags": "^0.3.0",
48
48
  "@atlaskit/popup": "^1.29.0",
49
- "@atlaskit/primitives": "^13.0.0",
49
+ "@atlaskit/primitives": "^13.2.0",
50
50
  "@atlaskit/theme": "^14.0.0",
51
- "@atlaskit/tokens": "^2.0.0",
52
- "@atlaskit/tooltip": "^18.8.0",
51
+ "@atlaskit/tokens": "^2.2.0",
52
+ "@atlaskit/tooltip": "^18.9.0",
53
53
  "@atlaskit/width-detector": "^4.3.0",
54
54
  "@babel/runtime": "^7.0.0",
55
55
  "@emotion/react": "^11.7.1",