@atlaskit/react-select 1.0.6 → 1.1.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,13 @@
1
1
  # @atlaskit/react-select
2
2
 
3
+ ## 1.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#156026](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/156026)
8
+ [`709b9c76673df`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/709b9c76673df) -
9
+ add clearControlLabel prop to pass aria-label to clear icon button
10
+
3
11
  ## 1.0.6
4
12
 
5
13
  ### Patch Changes
@@ -1379,6 +1379,7 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
1379
1379
  ClearIndicator = _this$getComponents3.ClearIndicator;
1380
1380
  var commonProps = this.commonProps;
1381
1381
  var _this$props10 = this.props,
1382
+ clearControlLabel = _this$props10.clearControlLabel,
1382
1383
  isDisabled = _this$props10.isDisabled,
1383
1384
  isLoading = _this$props10.isLoading;
1384
1385
  var isFocused = this.state.isFocused;
@@ -1390,7 +1391,9 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
1390
1391
  onTouchEnd: this.onClearIndicatorTouchEnd,
1391
1392
  'aria-hidden': 'true'
1392
1393
  };
1393
- return /*#__PURE__*/_react.default.createElement(ClearIndicator, (0, _extends2.default)({}, commonProps, {
1394
+ return /*#__PURE__*/_react.default.createElement(ClearIndicator, (0, _extends2.default)({
1395
+ clearControlLabel: clearControlLabel
1396
+ }, commonProps, {
1394
1397
  innerProps: innerProps,
1395
1398
  isFocused: isFocused
1396
1399
  }));
@@ -1390,6 +1390,7 @@ export default class Select extends Component {
1390
1390
  commonProps
1391
1391
  } = this;
1392
1392
  const {
1393
+ clearControlLabel,
1393
1394
  isDisabled,
1394
1395
  isLoading
1395
1396
  } = this.props;
@@ -1404,7 +1405,9 @@ export default class Select extends Component {
1404
1405
  onTouchEnd: this.onClearIndicatorTouchEnd,
1405
1406
  'aria-hidden': 'true'
1406
1407
  };
1407
- return /*#__PURE__*/React.createElement(ClearIndicator, _extends({}, commonProps, {
1408
+ return /*#__PURE__*/React.createElement(ClearIndicator, _extends({
1409
+ clearControlLabel: clearControlLabel
1410
+ }, commonProps, {
1408
1411
  innerProps: innerProps,
1409
1412
  isFocused: isFocused
1410
1413
  }));
@@ -1369,6 +1369,7 @@ var Select = /*#__PURE__*/function (_Component) {
1369
1369
  ClearIndicator = _this$getComponents3.ClearIndicator;
1370
1370
  var commonProps = this.commonProps;
1371
1371
  var _this$props10 = this.props,
1372
+ clearControlLabel = _this$props10.clearControlLabel,
1372
1373
  isDisabled = _this$props10.isDisabled,
1373
1374
  isLoading = _this$props10.isLoading;
1374
1375
  var isFocused = this.state.isFocused;
@@ -1380,7 +1381,9 @@ var Select = /*#__PURE__*/function (_Component) {
1380
1381
  onTouchEnd: this.onClearIndicatorTouchEnd,
1381
1382
  'aria-hidden': 'true'
1382
1383
  };
1383
- return /*#__PURE__*/React.createElement(ClearIndicator, _extends({}, commonProps, {
1384
+ return /*#__PURE__*/React.createElement(ClearIndicator, _extends({
1385
+ clearControlLabel: clearControlLabel
1386
+ }, commonProps, {
1384
1387
  innerProps: innerProps,
1385
1388
  isFocused: isFocused
1386
1389
  }));
@@ -35,6 +35,10 @@ export interface ClearIndicatorProps<Option = unknown, IsMulti extends boolean =
35
35
  * The children to be rendered inside the indicator.
36
36
  */
37
37
  children?: ReactNode;
38
+ /**
39
+ * Sets the `aria-label` for the clear icon button
40
+ */
41
+ clearControlLabel?: string;
38
42
  /**
39
43
  * Props that will be passed on to the children.
40
44
  */
@@ -94,6 +94,10 @@ export interface SelectProps<Option, IsMulti extends boolean, Group extends Grou
94
94
  * Provide classNames based on state for each inner component
95
95
  */
96
96
  classNames: ClassNamesConfig<Option, IsMulti, Group>;
97
+ /**
98
+ * Set the `aria-label` for the clear icon button.
99
+ */
100
+ clearControlLabel?: string;
97
101
  /**
98
102
  * Close the select menu when the user selects an option
99
103
  */
@@ -35,6 +35,10 @@ export interface ClearIndicatorProps<Option = unknown, IsMulti extends boolean =
35
35
  * The children to be rendered inside the indicator.
36
36
  */
37
37
  children?: ReactNode;
38
+ /**
39
+ * Sets the `aria-label` for the clear icon button
40
+ */
41
+ clearControlLabel?: string;
38
42
  /**
39
43
  * Props that will be passed on to the children.
40
44
  */
@@ -94,6 +94,10 @@ export interface SelectProps<Option, IsMulti extends boolean, Group extends Grou
94
94
  * Provide classNames based on state for each inner component
95
95
  */
96
96
  classNames: ClassNamesConfig<Option, IsMulti, Group>;
97
+ /**
98
+ * Set the `aria-label` for the clear icon button.
99
+ */
100
+ clearControlLabel?: string;
97
101
  /**
98
102
  * Close the select menu when the user selects an option
99
103
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-select",
3
- "version": "1.0.6",
3
+ "version": "1.1.0",
4
4
  "description": "A forked version of react-select to only be used in atlaskit/select",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",