@atlaskit/react-select 2.4.10 → 2.6.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,27 @@
1
1
  # @atlaskit/react-select
2
2
 
3
+ ## 2.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#158127](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/158127)
8
+ [`b7989ac128aef`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b7989ac128aef) -
9
+ Added "shouldOmitDefaultDescription" prop for <Select> to omit default description being set for
10
+ "aria-describedby" attribute
11
+
12
+ ## 2.5.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [#155681](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/155681)
17
+ [`679a437d9a866`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/679a437d9a866) -
18
+ The feature flag for registering `Select` and `PopupSelect` with the experimental open layer
19
+ observer has now been cleaned up.
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies
24
+
3
25
  ## 2.4.10
4
26
 
5
27
  ### Patch Changes
@@ -81,7 +81,8 @@ var defaultProps = exports.defaultProps = {
81
81
  styles: {},
82
82
  tabIndex: 0,
83
83
  tabSelectsValue: true,
84
- UNSAFE_is_experimental_generic: false
84
+ UNSAFE_is_experimental_generic: false,
85
+ shouldOmitDefaultDescription: false
85
86
  };
86
87
  function toCategorizedOption(props, option, selectValue, index) {
87
88
  var isDisabled = _isOptionDisabled(props, option, selectValue);
@@ -833,9 +834,6 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
833
834
  event.preventDefault();
834
835
  });
835
836
  (0, _defineProperty2.default)(_this, "handleOpenLayerObserverCloseSignal", function () {
836
- if (!(0, _platformFeatureFlags.fg)('platform_dst_layer_observer_select')) {
837
- return;
838
- }
839
837
  _this.onMenuClose();
840
838
  });
841
839
  _this.state.instancePrefix = 'react-select-' + (_this.props.instanceId || ++instanceId);
@@ -1164,7 +1162,9 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
1164
1162
  key: "calculateDescription",
1165
1163
  value: function calculateDescription(action) {
1166
1164
  var descriptionProp = this.props['aria-describedby'] || this.props['descriptionId'];
1167
- var isMulti = this.props.isMulti;
1165
+ var _this$props8 = this.props,
1166
+ isMulti = _this$props8.isMulti,
1167
+ shouldOmitDefaultDescription = _this$props8.shouldOmitDefaultDescription;
1168
1168
  var selectValue = this.state.selectValue;
1169
1169
  var defaultDescription = selectValue.length ? this.getElementId('live-region') : this.getElementId('placeholder');
1170
1170
  if (!isMulti && selectValue.length && action !== 'initial-input-focus') {
@@ -1173,7 +1173,7 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
1173
1173
  if (isMulti) {
1174
1174
  var multiMessage = this.getElementId('multi-message');
1175
1175
  return {
1176
- 'aria-describedby': descriptionProp ? [descriptionProp, defaultDescription, multiMessage].join(' ') : [defaultDescription, multiMessage].join(' ')
1176
+ 'aria-describedby': [descriptionProp, !shouldOmitDefaultDescription && defaultDescription, multiMessage].filter(Boolean).join(' ')
1177
1177
  };
1178
1178
  } else {
1179
1179
  return {
@@ -1242,22 +1242,22 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
1242
1242
  // Renderers
1243
1243
  // ==============================
1244
1244
  function renderInput() {
1245
- var _this$props8 = this.props,
1246
- descriptionId = _this$props8.descriptionId,
1247
- form = _this$props8.form,
1248
- inputId = _this$props8.inputId,
1249
- inputValue = _this$props8.inputValue,
1250
- isDisabled = _this$props8.isDisabled,
1251
- isInvalid = _this$props8.isInvalid,
1252
- isRequired = _this$props8.isRequired,
1253
- isSearchable = _this$props8.isSearchable,
1254
- label = _this$props8.label,
1255
- labelId = _this$props8.labelId,
1256
- menuIsOpen = _this$props8.menuIsOpen,
1257
- required = _this$props8.required,
1258
- _this$props8$tabIndex = _this$props8.tabIndex,
1259
- tabIndex = _this$props8$tabIndex === void 0 ? 0 : _this$props8$tabIndex,
1260
- testId = _this$props8.testId;
1245
+ var _this$props9 = this.props,
1246
+ descriptionId = _this$props9.descriptionId,
1247
+ form = _this$props9.form,
1248
+ inputId = _this$props9.inputId,
1249
+ inputValue = _this$props9.inputValue,
1250
+ isDisabled = _this$props9.isDisabled,
1251
+ isInvalid = _this$props9.isInvalid,
1252
+ isRequired = _this$props9.isRequired,
1253
+ isSearchable = _this$props9.isSearchable,
1254
+ label = _this$props9.label,
1255
+ labelId = _this$props9.labelId,
1256
+ menuIsOpen = _this$props9.menuIsOpen,
1257
+ required = _this$props9.required,
1258
+ _this$props9$tabIndex = _this$props9.tabIndex,
1259
+ tabIndex = _this$props9$tabIndex === void 0 ? 0 : _this$props9$tabIndex,
1260
+ testId = _this$props9.testId;
1261
1261
  var _this$getComponents = this.getComponents(),
1262
1262
  Input = _this$getComponents.Input;
1263
1263
  var _this$state4 = this.state,
@@ -1332,13 +1332,13 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
1332
1332
  SingleValue = _this$getComponents2.SingleValue,
1333
1333
  Placeholder = _this$getComponents2.Placeholder;
1334
1334
  var commonProps = this.commonProps;
1335
- var _this$props9 = this.props,
1336
- controlShouldRenderValue = _this$props9.controlShouldRenderValue,
1337
- isDisabled = _this$props9.isDisabled,
1338
- isMulti = _this$props9.isMulti,
1339
- inputValue = _this$props9.inputValue,
1340
- placeholder = _this$props9.placeholder,
1341
- testId = _this$props9.testId;
1335
+ var _this$props10 = this.props,
1336
+ controlShouldRenderValue = _this$props10.controlShouldRenderValue,
1337
+ isDisabled = _this$props10.isDisabled,
1338
+ isMulti = _this$props10.isMulti,
1339
+ inputValue = _this$props10.inputValue,
1340
+ placeholder = _this$props10.placeholder,
1341
+ testId = _this$props10.testId;
1342
1342
  var _this$state5 = this.state,
1343
1343
  selectValue = _this$state5.selectValue,
1344
1344
  focusedValue = _this$state5.focusedValue,
@@ -1408,12 +1408,12 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
1408
1408
  var _this$getComponents3 = this.getComponents(),
1409
1409
  ClearIndicator = _this$getComponents3.ClearIndicator;
1410
1410
  var commonProps = this.commonProps;
1411
- var _this$props10 = this.props,
1412
- clearControlLabel = _this$props10.clearControlLabel,
1413
- isDisabled = _this$props10.isDisabled,
1414
- isLoading = _this$props10.isLoading,
1415
- spacing = _this$props10.spacing,
1416
- testId = _this$props10.testId;
1411
+ var _this$props11 = this.props,
1412
+ clearControlLabel = _this$props11.clearControlLabel,
1413
+ isDisabled = _this$props11.isDisabled,
1414
+ isLoading = _this$props11.isLoading,
1415
+ spacing = _this$props11.spacing,
1416
+ testId = _this$props11.testId;
1417
1417
  var isFocused = this.state.isFocused;
1418
1418
  if (!this.isClearable() || !ClearIndicator || isDisabled || !this.hasValue() || isLoading) {
1419
1419
  return null;
@@ -1439,11 +1439,11 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
1439
1439
  var _this$getComponents4 = this.getComponents(),
1440
1440
  LoadingIndicator = _this$getComponents4.LoadingIndicator;
1441
1441
  var commonProps = this.commonProps;
1442
- var _this$props11 = this.props,
1443
- isDisabled = _this$props11.isDisabled,
1444
- isLoading = _this$props11.isLoading,
1445
- spacing = _this$props11.spacing,
1446
- testId = _this$props11.testId;
1442
+ var _this$props12 = this.props,
1443
+ isDisabled = _this$props12.isDisabled,
1444
+ isLoading = _this$props12.isLoading,
1445
+ spacing = _this$props12.spacing,
1446
+ testId = _this$props12.testId;
1447
1447
  var isFocused = this.state.isFocused;
1448
1448
  if (!LoadingIndicator || !isLoading) {
1449
1449
  return null;
@@ -1470,10 +1470,10 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
1470
1470
  return null;
1471
1471
  }
1472
1472
  var commonProps = this.commonProps;
1473
- var _this$props12 = this.props,
1474
- isDisabled = _this$props12.isDisabled,
1475
- spacing = _this$props12.spacing,
1476
- testId = _this$props12.testId;
1473
+ var _this$props13 = this.props,
1474
+ isDisabled = _this$props13.isDisabled,
1475
+ spacing = _this$props13.spacing,
1476
+ testId = _this$props13.testId;
1477
1477
  var isFocused = this.state.isFocused;
1478
1478
  var isCompact = spacing === 'compact';
1479
1479
  var innerProps = _objectSpread({
@@ -1505,25 +1505,25 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
1505
1505
  Option = _this$getComponents6.Option;
1506
1506
  var commonProps = this.commonProps;
1507
1507
  var focusedOption = this.state.focusedOption;
1508
- var _this$props13 = this.props,
1509
- captureMenuScroll = _this$props13.captureMenuScroll,
1510
- inputValue = _this$props13.inputValue,
1511
- isLoading = _this$props13.isLoading,
1512
- loadingMessage = _this$props13.loadingMessage,
1513
- minMenuHeight = _this$props13.minMenuHeight,
1514
- maxMenuHeight = _this$props13.maxMenuHeight,
1515
- menuIsOpen = _this$props13.menuIsOpen,
1516
- menuPlacement = _this$props13.menuPlacement,
1517
- menuPosition = _this$props13.menuPosition,
1518
- menuPortalTarget = _this$props13.menuPortalTarget,
1519
- menuShouldBlockScroll = _this$props13.menuShouldBlockScroll,
1520
- menuShouldScrollIntoView = _this$props13.menuShouldScrollIntoView,
1521
- noOptionsMessage = _this$props13.noOptionsMessage,
1522
- onMenuScrollToTop = _this$props13.onMenuScrollToTop,
1523
- onMenuScrollToBottom = _this$props13.onMenuScrollToBottom,
1524
- labelId = _this$props13.labelId,
1525
- label = _this$props13.label,
1526
- testId = _this$props13.testId;
1508
+ var _this$props14 = this.props,
1509
+ captureMenuScroll = _this$props14.captureMenuScroll,
1510
+ inputValue = _this$props14.inputValue,
1511
+ isLoading = _this$props14.isLoading,
1512
+ loadingMessage = _this$props14.loadingMessage,
1513
+ minMenuHeight = _this$props14.minMenuHeight,
1514
+ maxMenuHeight = _this$props14.maxMenuHeight,
1515
+ menuIsOpen = _this$props14.menuIsOpen,
1516
+ menuPlacement = _this$props14.menuPlacement,
1517
+ menuPosition = _this$props14.menuPosition,
1518
+ menuPortalTarget = _this$props14.menuPortalTarget,
1519
+ menuShouldBlockScroll = _this$props14.menuShouldBlockScroll,
1520
+ menuShouldScrollIntoView = _this$props14.menuShouldScrollIntoView,
1521
+ noOptionsMessage = _this$props14.noOptionsMessage,
1522
+ onMenuScrollToTop = _this$props14.onMenuScrollToTop,
1523
+ onMenuScrollToBottom = _this$props14.onMenuScrollToBottom,
1524
+ labelId = _this$props14.labelId,
1525
+ label = _this$props14.label,
1526
+ testId = _this$props14.testId;
1527
1527
  if (!menuIsOpen) {
1528
1528
  return null;
1529
1529
  }
@@ -1704,12 +1704,12 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
1704
1704
  key: "renderFormField",
1705
1705
  value: function renderFormField() {
1706
1706
  var _this5 = this;
1707
- var _this$props14 = this.props,
1708
- delimiter = _this$props14.delimiter,
1709
- isDisabled = _this$props14.isDisabled,
1710
- isMulti = _this$props14.isMulti,
1711
- required = _this$props14.required,
1712
- name = _this$props14.name;
1707
+ var _this$props15 = this.props,
1708
+ delimiter = _this$props15.delimiter,
1709
+ isDisabled = _this$props15.isDisabled,
1710
+ isMulti = _this$props15.isMulti,
1711
+ required = _this$props15.required,
1712
+ name = _this$props15.name;
1713
1713
  var selectValue = this.state.selectValue;
1714
1714
  if (required && !this.hasValue() && !isDisabled) {
1715
1715
  return /*#__PURE__*/_react.default.createElement(_internal.RequiredInput, {
@@ -1796,17 +1796,17 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
1796
1796
  IndicatorsContainer = _this$getComponents7.IndicatorsContainer,
1797
1797
  SelectContainer = _this$getComponents7.SelectContainer,
1798
1798
  ValueContainer = _this$getComponents7.ValueContainer;
1799
- var _this$props15 = this.props,
1800
- className = _this$props15.className,
1801
- id = _this$props15.id,
1802
- isDisabled = _this$props15.isDisabled,
1803
- menuIsOpen = _this$props15.menuIsOpen,
1804
- isInvalid = _this$props15.isInvalid,
1805
- testId = _this$props15.testId,
1806
- _this$props15$appeara = _this$props15.appearance,
1807
- appearance = _this$props15$appeara === void 0 ? 'default' : _this$props15$appeara,
1808
- _this$props15$spacing = _this$props15.spacing,
1809
- spacing = _this$props15$spacing === void 0 ? 'default' : _this$props15$spacing;
1799
+ var _this$props16 = this.props,
1800
+ className = _this$props16.className,
1801
+ id = _this$props16.id,
1802
+ isDisabled = _this$props16.isDisabled,
1803
+ menuIsOpen = _this$props16.menuIsOpen,
1804
+ isInvalid = _this$props16.isInvalid,
1805
+ testId = _this$props16.testId,
1806
+ _this$props16$appeara = _this$props16.appearance,
1807
+ appearance = _this$props16$appeara === void 0 ? 'default' : _this$props16$appeara,
1808
+ _this$props16$spacing = _this$props16.spacing,
1809
+ spacing = _this$props16$spacing === void 0 ? 'default' : _this$props16$spacing;
1810
1810
  var isFocused = this.state.isFocused;
1811
1811
  var commonProps = this.commonProps = this.getCommonProps();
1812
1812
  var isCompact = spacing === 'compact';
@@ -1852,7 +1852,7 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
1852
1852
  'data-testid': "".concat(testId, "-select--indicators-container")
1853
1853
  })
1854
1854
  }), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField(), /*#__PURE__*/_react.default.createElement(_notifyOpenLayerObserver.NotifyOpenLayerObserver, {
1855
- isOpen: (0, _platformFeatureFlags.fg)('platform_dst_layer_observer_select') && this.props.menuIsOpen,
1855
+ isOpen: this.props.menuIsOpen,
1856
1856
  onClose: this.handleOpenLayerObserverCloseSignal
1857
1857
  }));
1858
1858
  }
@@ -56,7 +56,8 @@ export const defaultProps = {
56
56
  styles: {},
57
57
  tabIndex: 0,
58
58
  tabSelectsValue: true,
59
- UNSAFE_is_experimental_generic: false
59
+ UNSAFE_is_experimental_generic: false,
60
+ shouldOmitDefaultDescription: false
60
61
  };
61
62
  function toCategorizedOption(props, option, selectValue, index) {
62
63
  const isDisabled = isOptionDisabled(props, option, selectValue);
@@ -809,9 +810,6 @@ export default class Select extends Component {
809
810
  event.preventDefault();
810
811
  });
811
812
  _defineProperty(this, "handleOpenLayerObserverCloseSignal", () => {
812
- if (!fg('platform_dst_layer_observer_select')) {
813
- return;
814
- }
815
813
  this.onMenuClose();
816
814
  });
817
815
  this.state.instancePrefix = 'react-select-' + (this.props.instanceId || ++instanceId);
@@ -1180,7 +1178,8 @@ export default class Select extends Component {
1180
1178
  calculateDescription(action) {
1181
1179
  const descriptionProp = this.props['aria-describedby'] || this.props['descriptionId'];
1182
1180
  const {
1183
- isMulti
1181
+ isMulti,
1182
+ shouldOmitDefaultDescription
1184
1183
  } = this.props;
1185
1184
  const {
1186
1185
  selectValue
@@ -1192,7 +1191,7 @@ export default class Select extends Component {
1192
1191
  if (isMulti) {
1193
1192
  const multiMessage = this.getElementId('multi-message');
1194
1193
  return {
1195
- 'aria-describedby': descriptionProp ? [descriptionProp, defaultDescription, multiMessage].join(' ') : [defaultDescription, multiMessage].join(' ')
1194
+ 'aria-describedby': [descriptionProp, !shouldOmitDefaultDescription && defaultDescription, multiMessage].filter(Boolean).join(' ')
1196
1195
  };
1197
1196
  } else {
1198
1197
  return {
@@ -1889,7 +1888,7 @@ export default class Select extends Component {
1889
1888
  })
1890
1889
  }
1891
1890
  }), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField(), /*#__PURE__*/React.createElement(NotifyOpenLayerObserver, {
1892
- isOpen: fg('platform_dst_layer_observer_select') && this.props.menuIsOpen,
1891
+ isOpen: this.props.menuIsOpen,
1893
1892
  onClose: this.handleOpenLayerObserverCloseSignal
1894
1893
  }));
1895
1894
  }
@@ -72,7 +72,8 @@ export var defaultProps = {
72
72
  styles: {},
73
73
  tabIndex: 0,
74
74
  tabSelectsValue: true,
75
- UNSAFE_is_experimental_generic: false
75
+ UNSAFE_is_experimental_generic: false,
76
+ shouldOmitDefaultDescription: false
76
77
  };
77
78
  function toCategorizedOption(props, option, selectValue, index) {
78
79
  var isDisabled = _isOptionDisabled(props, option, selectValue);
@@ -824,9 +825,6 @@ var Select = /*#__PURE__*/function (_Component) {
824
825
  event.preventDefault();
825
826
  });
826
827
  _defineProperty(_this, "handleOpenLayerObserverCloseSignal", function () {
827
- if (!fg('platform_dst_layer_observer_select')) {
828
- return;
829
- }
830
828
  _this.onMenuClose();
831
829
  });
832
830
  _this.state.instancePrefix = 'react-select-' + (_this.props.instanceId || ++instanceId);
@@ -1155,7 +1153,9 @@ var Select = /*#__PURE__*/function (_Component) {
1155
1153
  key: "calculateDescription",
1156
1154
  value: function calculateDescription(action) {
1157
1155
  var descriptionProp = this.props['aria-describedby'] || this.props['descriptionId'];
1158
- var isMulti = this.props.isMulti;
1156
+ var _this$props8 = this.props,
1157
+ isMulti = _this$props8.isMulti,
1158
+ shouldOmitDefaultDescription = _this$props8.shouldOmitDefaultDescription;
1159
1159
  var selectValue = this.state.selectValue;
1160
1160
  var defaultDescription = selectValue.length ? this.getElementId('live-region') : this.getElementId('placeholder');
1161
1161
  if (!isMulti && selectValue.length && action !== 'initial-input-focus') {
@@ -1164,7 +1164,7 @@ var Select = /*#__PURE__*/function (_Component) {
1164
1164
  if (isMulti) {
1165
1165
  var multiMessage = this.getElementId('multi-message');
1166
1166
  return {
1167
- 'aria-describedby': descriptionProp ? [descriptionProp, defaultDescription, multiMessage].join(' ') : [defaultDescription, multiMessage].join(' ')
1167
+ 'aria-describedby': [descriptionProp, !shouldOmitDefaultDescription && defaultDescription, multiMessage].filter(Boolean).join(' ')
1168
1168
  };
1169
1169
  } else {
1170
1170
  return {
@@ -1233,22 +1233,22 @@ var Select = /*#__PURE__*/function (_Component) {
1233
1233
  // Renderers
1234
1234
  // ==============================
1235
1235
  function renderInput() {
1236
- var _this$props8 = this.props,
1237
- descriptionId = _this$props8.descriptionId,
1238
- form = _this$props8.form,
1239
- inputId = _this$props8.inputId,
1240
- inputValue = _this$props8.inputValue,
1241
- isDisabled = _this$props8.isDisabled,
1242
- isInvalid = _this$props8.isInvalid,
1243
- isRequired = _this$props8.isRequired,
1244
- isSearchable = _this$props8.isSearchable,
1245
- label = _this$props8.label,
1246
- labelId = _this$props8.labelId,
1247
- menuIsOpen = _this$props8.menuIsOpen,
1248
- required = _this$props8.required,
1249
- _this$props8$tabIndex = _this$props8.tabIndex,
1250
- tabIndex = _this$props8$tabIndex === void 0 ? 0 : _this$props8$tabIndex,
1251
- testId = _this$props8.testId;
1236
+ var _this$props9 = this.props,
1237
+ descriptionId = _this$props9.descriptionId,
1238
+ form = _this$props9.form,
1239
+ inputId = _this$props9.inputId,
1240
+ inputValue = _this$props9.inputValue,
1241
+ isDisabled = _this$props9.isDisabled,
1242
+ isInvalid = _this$props9.isInvalid,
1243
+ isRequired = _this$props9.isRequired,
1244
+ isSearchable = _this$props9.isSearchable,
1245
+ label = _this$props9.label,
1246
+ labelId = _this$props9.labelId,
1247
+ menuIsOpen = _this$props9.menuIsOpen,
1248
+ required = _this$props9.required,
1249
+ _this$props9$tabIndex = _this$props9.tabIndex,
1250
+ tabIndex = _this$props9$tabIndex === void 0 ? 0 : _this$props9$tabIndex,
1251
+ testId = _this$props9.testId;
1252
1252
  var _this$getComponents = this.getComponents(),
1253
1253
  Input = _this$getComponents.Input;
1254
1254
  var _this$state4 = this.state,
@@ -1323,13 +1323,13 @@ var Select = /*#__PURE__*/function (_Component) {
1323
1323
  SingleValue = _this$getComponents2.SingleValue,
1324
1324
  Placeholder = _this$getComponents2.Placeholder;
1325
1325
  var commonProps = this.commonProps;
1326
- var _this$props9 = this.props,
1327
- controlShouldRenderValue = _this$props9.controlShouldRenderValue,
1328
- isDisabled = _this$props9.isDisabled,
1329
- isMulti = _this$props9.isMulti,
1330
- inputValue = _this$props9.inputValue,
1331
- placeholder = _this$props9.placeholder,
1332
- testId = _this$props9.testId;
1326
+ var _this$props10 = this.props,
1327
+ controlShouldRenderValue = _this$props10.controlShouldRenderValue,
1328
+ isDisabled = _this$props10.isDisabled,
1329
+ isMulti = _this$props10.isMulti,
1330
+ inputValue = _this$props10.inputValue,
1331
+ placeholder = _this$props10.placeholder,
1332
+ testId = _this$props10.testId;
1333
1333
  var _this$state5 = this.state,
1334
1334
  selectValue = _this$state5.selectValue,
1335
1335
  focusedValue = _this$state5.focusedValue,
@@ -1399,12 +1399,12 @@ var Select = /*#__PURE__*/function (_Component) {
1399
1399
  var _this$getComponents3 = this.getComponents(),
1400
1400
  ClearIndicator = _this$getComponents3.ClearIndicator;
1401
1401
  var commonProps = this.commonProps;
1402
- var _this$props10 = this.props,
1403
- clearControlLabel = _this$props10.clearControlLabel,
1404
- isDisabled = _this$props10.isDisabled,
1405
- isLoading = _this$props10.isLoading,
1406
- spacing = _this$props10.spacing,
1407
- testId = _this$props10.testId;
1402
+ var _this$props11 = this.props,
1403
+ clearControlLabel = _this$props11.clearControlLabel,
1404
+ isDisabled = _this$props11.isDisabled,
1405
+ isLoading = _this$props11.isLoading,
1406
+ spacing = _this$props11.spacing,
1407
+ testId = _this$props11.testId;
1408
1408
  var isFocused = this.state.isFocused;
1409
1409
  if (!this.isClearable() || !ClearIndicator || isDisabled || !this.hasValue() || isLoading) {
1410
1410
  return null;
@@ -1430,11 +1430,11 @@ var Select = /*#__PURE__*/function (_Component) {
1430
1430
  var _this$getComponents4 = this.getComponents(),
1431
1431
  LoadingIndicator = _this$getComponents4.LoadingIndicator;
1432
1432
  var commonProps = this.commonProps;
1433
- var _this$props11 = this.props,
1434
- isDisabled = _this$props11.isDisabled,
1435
- isLoading = _this$props11.isLoading,
1436
- spacing = _this$props11.spacing,
1437
- testId = _this$props11.testId;
1433
+ var _this$props12 = this.props,
1434
+ isDisabled = _this$props12.isDisabled,
1435
+ isLoading = _this$props12.isLoading,
1436
+ spacing = _this$props12.spacing,
1437
+ testId = _this$props12.testId;
1438
1438
  var isFocused = this.state.isFocused;
1439
1439
  if (!LoadingIndicator || !isLoading) {
1440
1440
  return null;
@@ -1461,10 +1461,10 @@ var Select = /*#__PURE__*/function (_Component) {
1461
1461
  return null;
1462
1462
  }
1463
1463
  var commonProps = this.commonProps;
1464
- var _this$props12 = this.props,
1465
- isDisabled = _this$props12.isDisabled,
1466
- spacing = _this$props12.spacing,
1467
- testId = _this$props12.testId;
1464
+ var _this$props13 = this.props,
1465
+ isDisabled = _this$props13.isDisabled,
1466
+ spacing = _this$props13.spacing,
1467
+ testId = _this$props13.testId;
1468
1468
  var isFocused = this.state.isFocused;
1469
1469
  var isCompact = spacing === 'compact';
1470
1470
  var innerProps = _objectSpread({
@@ -1496,25 +1496,25 @@ var Select = /*#__PURE__*/function (_Component) {
1496
1496
  Option = _this$getComponents6.Option;
1497
1497
  var commonProps = this.commonProps;
1498
1498
  var focusedOption = this.state.focusedOption;
1499
- var _this$props13 = this.props,
1500
- captureMenuScroll = _this$props13.captureMenuScroll,
1501
- inputValue = _this$props13.inputValue,
1502
- isLoading = _this$props13.isLoading,
1503
- loadingMessage = _this$props13.loadingMessage,
1504
- minMenuHeight = _this$props13.minMenuHeight,
1505
- maxMenuHeight = _this$props13.maxMenuHeight,
1506
- menuIsOpen = _this$props13.menuIsOpen,
1507
- menuPlacement = _this$props13.menuPlacement,
1508
- menuPosition = _this$props13.menuPosition,
1509
- menuPortalTarget = _this$props13.menuPortalTarget,
1510
- menuShouldBlockScroll = _this$props13.menuShouldBlockScroll,
1511
- menuShouldScrollIntoView = _this$props13.menuShouldScrollIntoView,
1512
- noOptionsMessage = _this$props13.noOptionsMessage,
1513
- onMenuScrollToTop = _this$props13.onMenuScrollToTop,
1514
- onMenuScrollToBottom = _this$props13.onMenuScrollToBottom,
1515
- labelId = _this$props13.labelId,
1516
- label = _this$props13.label,
1517
- testId = _this$props13.testId;
1499
+ var _this$props14 = this.props,
1500
+ captureMenuScroll = _this$props14.captureMenuScroll,
1501
+ inputValue = _this$props14.inputValue,
1502
+ isLoading = _this$props14.isLoading,
1503
+ loadingMessage = _this$props14.loadingMessage,
1504
+ minMenuHeight = _this$props14.minMenuHeight,
1505
+ maxMenuHeight = _this$props14.maxMenuHeight,
1506
+ menuIsOpen = _this$props14.menuIsOpen,
1507
+ menuPlacement = _this$props14.menuPlacement,
1508
+ menuPosition = _this$props14.menuPosition,
1509
+ menuPortalTarget = _this$props14.menuPortalTarget,
1510
+ menuShouldBlockScroll = _this$props14.menuShouldBlockScroll,
1511
+ menuShouldScrollIntoView = _this$props14.menuShouldScrollIntoView,
1512
+ noOptionsMessage = _this$props14.noOptionsMessage,
1513
+ onMenuScrollToTop = _this$props14.onMenuScrollToTop,
1514
+ onMenuScrollToBottom = _this$props14.onMenuScrollToBottom,
1515
+ labelId = _this$props14.labelId,
1516
+ label = _this$props14.label,
1517
+ testId = _this$props14.testId;
1518
1518
  if (!menuIsOpen) {
1519
1519
  return null;
1520
1520
  }
@@ -1695,12 +1695,12 @@ var Select = /*#__PURE__*/function (_Component) {
1695
1695
  key: "renderFormField",
1696
1696
  value: function renderFormField() {
1697
1697
  var _this5 = this;
1698
- var _this$props14 = this.props,
1699
- delimiter = _this$props14.delimiter,
1700
- isDisabled = _this$props14.isDisabled,
1701
- isMulti = _this$props14.isMulti,
1702
- required = _this$props14.required,
1703
- name = _this$props14.name;
1698
+ var _this$props15 = this.props,
1699
+ delimiter = _this$props15.delimiter,
1700
+ isDisabled = _this$props15.isDisabled,
1701
+ isMulti = _this$props15.isMulti,
1702
+ required = _this$props15.required,
1703
+ name = _this$props15.name;
1704
1704
  var selectValue = this.state.selectValue;
1705
1705
  if (required && !this.hasValue() && !isDisabled) {
1706
1706
  return /*#__PURE__*/React.createElement(RequiredInput, {
@@ -1787,17 +1787,17 @@ var Select = /*#__PURE__*/function (_Component) {
1787
1787
  IndicatorsContainer = _this$getComponents7.IndicatorsContainer,
1788
1788
  SelectContainer = _this$getComponents7.SelectContainer,
1789
1789
  ValueContainer = _this$getComponents7.ValueContainer;
1790
- var _this$props15 = this.props,
1791
- className = _this$props15.className,
1792
- id = _this$props15.id,
1793
- isDisabled = _this$props15.isDisabled,
1794
- menuIsOpen = _this$props15.menuIsOpen,
1795
- isInvalid = _this$props15.isInvalid,
1796
- testId = _this$props15.testId,
1797
- _this$props15$appeara = _this$props15.appearance,
1798
- appearance = _this$props15$appeara === void 0 ? 'default' : _this$props15$appeara,
1799
- _this$props15$spacing = _this$props15.spacing,
1800
- spacing = _this$props15$spacing === void 0 ? 'default' : _this$props15$spacing;
1790
+ var _this$props16 = this.props,
1791
+ className = _this$props16.className,
1792
+ id = _this$props16.id,
1793
+ isDisabled = _this$props16.isDisabled,
1794
+ menuIsOpen = _this$props16.menuIsOpen,
1795
+ isInvalid = _this$props16.isInvalid,
1796
+ testId = _this$props16.testId,
1797
+ _this$props16$appeara = _this$props16.appearance,
1798
+ appearance = _this$props16$appeara === void 0 ? 'default' : _this$props16$appeara,
1799
+ _this$props16$spacing = _this$props16.spacing,
1800
+ spacing = _this$props16$spacing === void 0 ? 'default' : _this$props16$spacing;
1801
1801
  var isFocused = this.state.isFocused;
1802
1802
  var commonProps = this.commonProps = this.getCommonProps();
1803
1803
  var isCompact = spacing === 'compact';
@@ -1843,7 +1843,7 @@ var Select = /*#__PURE__*/function (_Component) {
1843
1843
  'data-testid': "".concat(testId, "-select--indicators-container")
1844
1844
  })
1845
1845
  }), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField(), /*#__PURE__*/React.createElement(NotifyOpenLayerObserver, {
1846
- isOpen: fg('platform_dst_layer_observer_select') && this.props.menuIsOpen,
1846
+ isOpen: this.props.menuIsOpen,
1847
1847
  onClose: this.handleOpenLayerObserverCloseSignal
1848
1848
  }));
1849
1849
  }
@@ -425,6 +425,10 @@ export interface SelectProps<Option, IsMulti extends boolean, Group extends Grou
425
425
  appearance: 'default' | 'subtle' | 'none';
426
426
  [key: string]: any;
427
427
  UNSAFE_is_experimental_generic?: boolean;
428
+ /**
429
+ * omit default description being set for "aria-describedby" attribute
430
+ */
431
+ shouldOmitDefaultDescription?: boolean;
428
432
  }
429
433
  export declare const defaultProps: {
430
434
  'aria-live': string | undefined;
@@ -468,6 +472,7 @@ export declare const defaultProps: {
468
472
  tabIndex: number;
469
473
  tabSelectsValue: boolean;
470
474
  UNSAFE_is_experimental_generic: boolean;
475
+ shouldOmitDefaultDescription: boolean;
471
476
  };
472
477
  interface State<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {
473
478
  ariaSelection: AriaSelection<Option, IsMulti> | null;
@@ -548,6 +553,7 @@ export default class Select<Option = unknown, IsMulti extends boolean = false, G
548
553
  tabIndex: number;
549
554
  tabSelectsValue: boolean;
550
555
  UNSAFE_is_experimental_generic: boolean;
556
+ shouldOmitDefaultDescription: boolean;
551
557
  };
552
558
  state: State<Option, IsMulti, Group>;
553
559
  blockOptionHover: boolean;
@@ -425,6 +425,10 @@ export interface SelectProps<Option, IsMulti extends boolean, Group extends Grou
425
425
  appearance: 'default' | 'subtle' | 'none';
426
426
  [key: string]: any;
427
427
  UNSAFE_is_experimental_generic?: boolean;
428
+ /**
429
+ * omit default description being set for "aria-describedby" attribute
430
+ */
431
+ shouldOmitDefaultDescription?: boolean;
428
432
  }
429
433
  export declare const defaultProps: {
430
434
  'aria-live': string | undefined;
@@ -468,6 +472,7 @@ export declare const defaultProps: {
468
472
  tabIndex: number;
469
473
  tabSelectsValue: boolean;
470
474
  UNSAFE_is_experimental_generic: boolean;
475
+ shouldOmitDefaultDescription: boolean;
471
476
  };
472
477
  interface State<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {
473
478
  ariaSelection: AriaSelection<Option, IsMulti> | null;
@@ -548,6 +553,7 @@ export default class Select<Option = unknown, IsMulti extends boolean = false, G
548
553
  tabIndex: number;
549
554
  tabSelectsValue: boolean;
550
555
  UNSAFE_is_experimental_generic: boolean;
556
+ shouldOmitDefaultDescription: boolean;
551
557
  };
552
558
  state: State<Option, IsMulti, Group>;
553
559
  blockOptionHover: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-select",
3
- "version": "2.4.10",
3
+ "version": "2.6.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",
@@ -30,12 +30,12 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@atlaskit/ds-lib": "^4.0.0",
33
- "@atlaskit/icon": "^26.0.0",
33
+ "@atlaskit/icon": "^26.1.0",
34
34
  "@atlaskit/layering": "^2.1.0",
35
35
  "@atlaskit/platform-feature-flags": "^1.1.0",
36
- "@atlaskit/primitives": "^14.7.0",
36
+ "@atlaskit/primitives": "^14.8.0",
37
37
  "@atlaskit/spinner": "^18.0.0",
38
- "@atlaskit/tokens": "^4.8.0",
38
+ "@atlaskit/tokens": "^4.9.0",
39
39
  "@babel/runtime": "^7.0.0",
40
40
  "@compiled/react": "^0.18.3",
41
41
  "@emotion/react": "^11.7.1",
@@ -72,9 +72,6 @@
72
72
  "design-system-select-fix-placement": {
73
73
  "type": "boolean"
74
74
  },
75
- "platform_dst_layer_observer_select": {
76
- "type": "boolean"
77
- },
78
75
  "compiled-react-select": {
79
76
  "type": "boolean"
80
77
  }