@atlaskit/lozenge 13.4.5 → 13.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,19 @@
1
1
  # @atlaskit/lozenge
2
2
 
3
+ ## 13.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 13.5.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`1090b6ca92c60`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1090b6ca92c60) -
14
+ Added `aria-label` prop support to LozengeDropdownTrigger for providing custom accessible labels
15
+ to the trigger button element.
16
+
3
17
  ## 13.4.5
4
18
 
5
19
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- /* lozenge.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* lozenge.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* lozenge-base.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* lozenge-base.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -126,7 +126,8 @@ var LozengeBase = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forward
126
126
  interactionName = _ref.interactionName,
127
127
  ariaControls = _ref['aria-controls'],
128
128
  ariaExpanded = _ref['aria-expanded'],
129
- ariaHaspopup = _ref['aria-haspopup'];
129
+ ariaHaspopup = _ref['aria-haspopup'],
130
+ ariaLabel = _ref['aria-label'];
130
131
  var isInteractive = typeof onClick === 'function';
131
132
 
132
133
  // Determine the effective color, with fallback logic for legacy appearances
@@ -186,7 +187,7 @@ var LozengeBase = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forward
186
187
  'aria-disabled': true,
187
188
  isDisabled: true
188
189
  }, {
189
- "aria-label": isLoading ? 'Loading' : undefined,
190
+ "aria-label": isLoading ? 'Loading' : ariaLabel,
190
191
  "aria-controls": ariaControls,
191
192
  "aria-expanded": ariaExpanded,
192
193
  "aria-haspopup": ariaHaspopup,
@@ -1,4 +1,4 @@
1
- /* lozenge-dropdown-trigger.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* lozenge-dropdown-trigger.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -49,7 +49,8 @@ var LozengeDropdownTrigger = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _re
49
49
  interactionName = _ref.interactionName,
50
50
  ariaControls = _ref['aria-controls'],
51
51
  ariaExpanded = _ref['aria-expanded'],
52
- ariaHaspopup = _ref['aria-haspopup'];
52
+ ariaHaspopup = _ref['aria-haspopup'],
53
+ ariaLabel = _ref['aria-label'];
53
54
  var baseProps = {
54
55
  appearance: appearance,
55
56
  spacing: spacing,
@@ -67,7 +68,8 @@ var LozengeDropdownTrigger = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _re
67
68
  children: children,
68
69
  'aria-controls': ariaControls,
69
70
  'aria-expanded': ariaExpanded,
70
- 'aria-haspopup': ariaHaspopup
71
+ 'aria-haspopup': ariaHaspopup,
72
+ 'aria-label': ariaLabel
71
73
  };
72
74
  return /*#__PURE__*/React.createElement(_lozengeBase.default, (0, _extends2.default)({
73
75
  ref: ref
@@ -1,4 +1,4 @@
1
- /* lozenge.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* lozenge.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* lozenge.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* lozenge.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./lozenge.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* lozenge-base.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* lozenge-base.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./lozenge-base.compiled.css";
4
4
  import * as React from 'react';
@@ -114,7 +114,8 @@ const LozengeBase = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
114
114
  interactionName,
115
115
  'aria-controls': ariaControls,
116
116
  'aria-expanded': ariaExpanded,
117
- 'aria-haspopup': ariaHaspopup
117
+ 'aria-haspopup': ariaHaspopup,
118
+ 'aria-label': ariaLabel
118
119
  }, ref) => {
119
120
  const isInteractive = typeof onClick === 'function';
120
121
 
@@ -176,7 +177,7 @@ const LozengeBase = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
176
177
  'aria-disabled': true,
177
178
  isDisabled: true
178
179
  }, {
179
- "aria-label": isLoading ? 'Loading' : undefined,
180
+ "aria-label": isLoading ? 'Loading' : ariaLabel,
180
181
  "aria-controls": ariaControls,
181
182
  "aria-expanded": ariaExpanded,
182
183
  "aria-haspopup": ariaHaspopup,
@@ -1,4 +1,4 @@
1
- /* lozenge-dropdown-trigger.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* lozenge-dropdown-trigger.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -34,7 +34,8 @@ const LozengeDropdownTrigger = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
34
34
  interactionName,
35
35
  'aria-controls': ariaControls,
36
36
  'aria-expanded': ariaExpanded,
37
- 'aria-haspopup': ariaHaspopup
37
+ 'aria-haspopup': ariaHaspopup,
38
+ 'aria-label': ariaLabel
38
39
  }, ref) => {
39
40
  const baseProps = {
40
41
  appearance,
@@ -53,7 +54,8 @@ const LozengeDropdownTrigger = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
53
54
  children,
54
55
  'aria-controls': ariaControls,
55
56
  'aria-expanded': ariaExpanded,
56
- 'aria-haspopup': ariaHaspopup
57
+ 'aria-haspopup': ariaHaspopup,
58
+ 'aria-label': ariaLabel
57
59
  };
58
60
  return /*#__PURE__*/React.createElement(LozengeBase, _extends({
59
61
  ref: ref
@@ -1,4 +1,4 @@
1
- /* lozenge.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* lozenge.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import * as React from 'react';
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import LozengeBase from './lozenge-base';
@@ -1,4 +1,4 @@
1
- /* lozenge.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* lozenge.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./lozenge.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* lozenge-base.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* lozenge-base.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  import "./lozenge-base.compiled.css";
@@ -117,7 +117,8 @@ var LozengeBase = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref, ref
117
117
  interactionName = _ref.interactionName,
118
118
  ariaControls = _ref['aria-controls'],
119
119
  ariaExpanded = _ref['aria-expanded'],
120
- ariaHaspopup = _ref['aria-haspopup'];
120
+ ariaHaspopup = _ref['aria-haspopup'],
121
+ ariaLabel = _ref['aria-label'];
121
122
  var isInteractive = typeof onClick === 'function';
122
123
 
123
124
  // Determine the effective color, with fallback logic for legacy appearances
@@ -177,7 +178,7 @@ var LozengeBase = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref, ref
177
178
  'aria-disabled': true,
178
179
  isDisabled: true
179
180
  }, {
180
- "aria-label": isLoading ? 'Loading' : undefined,
181
+ "aria-label": isLoading ? 'Loading' : ariaLabel,
181
182
  "aria-controls": ariaControls,
182
183
  "aria-expanded": ariaExpanded,
183
184
  "aria-haspopup": ariaHaspopup,
@@ -1,4 +1,4 @@
1
- /* lozenge-dropdown-trigger.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* lozenge-dropdown-trigger.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -40,7 +40,8 @@ var LozengeDropdownTrigger = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function
40
40
  interactionName = _ref.interactionName,
41
41
  ariaControls = _ref['aria-controls'],
42
42
  ariaExpanded = _ref['aria-expanded'],
43
- ariaHaspopup = _ref['aria-haspopup'];
43
+ ariaHaspopup = _ref['aria-haspopup'],
44
+ ariaLabel = _ref['aria-label'];
44
45
  var baseProps = {
45
46
  appearance: appearance,
46
47
  spacing: spacing,
@@ -58,7 +59,8 @@ var LozengeDropdownTrigger = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function
58
59
  children: children,
59
60
  'aria-controls': ariaControls,
60
61
  'aria-expanded': ariaExpanded,
61
- 'aria-haspopup': ariaHaspopup
62
+ 'aria-haspopup': ariaHaspopup,
63
+ 'aria-label': ariaLabel
62
64
  };
63
65
  return /*#__PURE__*/React.createElement(LozengeBase, _extends({
64
66
  ref: ref
@@ -1,4 +1,4 @@
1
- /* lozenge.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* lozenge.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import * as React from 'react';
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import LozengeBase from './lozenge-base';
@@ -109,6 +109,7 @@ export type LozengeBaseProps = NewLozengeBaseProps & {
109
109
  'aria-controls'?: string;
110
110
  'aria-expanded'?: boolean;
111
111
  'aria-haspopup'?: boolean | 'dialog';
112
+ 'aria-label'?: string;
112
113
  };
113
114
  /**
114
115
  * Props for the LozengeDropdownTrigger component
@@ -148,5 +149,9 @@ export type LozengeDropdownTriggerProps = NewLozengeProps & {
148
149
  * Informs assistive technology that this element triggers a popup.
149
150
  */
150
151
  'aria-haspopup'?: boolean | 'dialog';
152
+ /**
153
+ * Defines a string value that labels the trigger element for assistive technology.
154
+ */
155
+ 'aria-label'?: string;
151
156
  };
152
157
  export {};
@@ -109,6 +109,7 @@ export type LozengeBaseProps = NewLozengeBaseProps & {
109
109
  'aria-controls'?: string;
110
110
  'aria-expanded'?: boolean;
111
111
  'aria-haspopup'?: boolean | 'dialog';
112
+ 'aria-label'?: string;
112
113
  };
113
114
  /**
114
115
  * Props for the LozengeDropdownTrigger component
@@ -148,5 +149,9 @@ export type LozengeDropdownTriggerProps = NewLozengeProps & {
148
149
  * Informs assistive technology that this element triggers a popup.
149
150
  */
150
151
  'aria-haspopup'?: boolean | 'dialog';
152
+ /**
153
+ * Defines a string value that labels the trigger element for assistive technology.
154
+ */
155
+ 'aria-label'?: string;
151
156
  };
152
157
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/lozenge",
3
- "version": "13.4.5",
3
+ "version": "13.5.1",
4
4
  "description": "A lozenge is a visual indicator used to highlight an item's status for quick recognition.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -53,14 +53,14 @@
53
53
  "@atlaskit/analytics-next": "^11.1.0",
54
54
  "@atlaskit/badge": "^18.4.0",
55
55
  "@atlaskit/css": "^0.19.0",
56
- "@atlaskit/ds-lib": "^5.3.0",
56
+ "@atlaskit/ds-lib": "^6.0.0",
57
57
  "@atlaskit/icon": "^32.0.0",
58
58
  "@atlaskit/platform-feature-flags": "^1.1.0",
59
59
  "@atlaskit/primitives": "^18.0.0",
60
60
  "@atlaskit/spinner": "^19.0.0",
61
- "@atlaskit/tokens": "^11.0.0",
61
+ "@atlaskit/tokens": "^11.1.0",
62
62
  "@babel/runtime": "^7.0.0",
63
- "@compiled/react": "^0.18.6"
63
+ "@compiled/react": "^0.20.0"
64
64
  },
65
65
  "peerDependencies": {
66
66
  "react": "^18.2.0"
@@ -69,8 +69,8 @@
69
69
  "@af/accessibility-testing": "workspace:^",
70
70
  "@af/integration-testing": "workspace:^",
71
71
  "@af/visual-regression": "workspace:^",
72
- "@atlaskit/docs": "^11.5.0",
73
- "@atlaskit/dropdown-menu": "^16.5.0",
72
+ "@atlaskit/docs": "^11.6.0",
73
+ "@atlaskit/dropdown-menu": "^16.6.0",
74
74
  "@atlaskit/heading": "^5.3.0",
75
75
  "@atlaskit/link": "^3.3.0",
76
76
  "@atlaskit/section-message": "^8.12.0",