@atlaskit/react-select 3.9.0 → 3.9.2

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,20 @@
1
1
  # @atlaskit/react-select
2
2
 
3
+ ## 3.9.2
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
+ ## 3.9.1
12
+
13
+ ### Patch Changes
14
+
15
+ - [`062b55b337dd8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/062b55b337dd8) -
16
+ aria-autocomplete is omitted when isSearchable is false.
17
+
3
18
  ## 3.9.0
4
19
 
5
20
  ### Minor Changes
@@ -1342,8 +1342,9 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
1342
1342
  var id = inputId || this.getElementId('input');
1343
1343
 
1344
1344
  // aria attributes makes the JSX "noisy", separated for clarity
1345
- var ariaAttributes = _objectSpread(_objectSpread(_objectSpread({
1346
- 'aria-autocomplete': 'both',
1345
+ var ariaAttributes = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, !this.props.isSearchable && (0, _platformFeatureFlags.fg)('platform_fix_autocomplete_aria_for_select') ? {} : {
1346
+ 'aria-autocomplete': 'both'
1347
+ }), {}, {
1347
1348
  'aria-errormessage': this.props['aria-errormessage'],
1348
1349
  'aria-expanded': menuIsOpen,
1349
1350
  // TODO: aria-haspopup is implied as listbox with role="combobox" and was deprecated for aria 1.2, we still might need to keep it for back compat
package/dist/cjs/utils.js CHANGED
@@ -274,7 +274,7 @@ function isTouchCapable() {
274
274
  try {
275
275
  document.createEvent('TouchEvent');
276
276
  return true;
277
- } catch (e) {
277
+ } catch (_unused) {
278
278
  return false;
279
279
  }
280
280
  }
@@ -286,7 +286,7 @@ function isTouchCapable() {
286
286
  function isMobileDevice() {
287
287
  try {
288
288
  return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
289
- } catch (e) {
289
+ } catch (_unused2) {
290
290
  return false;
291
291
  }
292
292
  }
@@ -1345,7 +1345,9 @@ export default class Select extends Component {
1345
1345
 
1346
1346
  // aria attributes makes the JSX "noisy", separated for clarity
1347
1347
  const ariaAttributes = {
1348
- 'aria-autocomplete': 'both',
1348
+ ...(!this.props.isSearchable && fg('platform_fix_autocomplete_aria_for_select') ? {} : {
1349
+ 'aria-autocomplete': 'both'
1350
+ }),
1349
1351
  'aria-errormessage': this.props['aria-errormessage'],
1350
1352
  'aria-expanded': menuIsOpen,
1351
1353
  // TODO: aria-haspopup is implied as listbox with role="combobox" and was deprecated for aria 1.2, we still might need to keep it for back compat
@@ -239,7 +239,7 @@ export function isTouchCapable() {
239
239
  try {
240
240
  document.createEvent('TouchEvent');
241
241
  return true;
242
- } catch (e) {
242
+ } catch {
243
243
  return false;
244
244
  }
245
245
  }
@@ -251,7 +251,7 @@ export function isTouchCapable() {
251
251
  export function isMobileDevice() {
252
252
  try {
253
253
  return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
254
- } catch (e) {
254
+ } catch {
255
255
  return false;
256
256
  }
257
257
  }
@@ -1333,8 +1333,9 @@ var Select = /*#__PURE__*/function (_Component) {
1333
1333
  var id = inputId || this.getElementId('input');
1334
1334
 
1335
1335
  // aria attributes makes the JSX "noisy", separated for clarity
1336
- var ariaAttributes = _objectSpread(_objectSpread(_objectSpread({
1337
- 'aria-autocomplete': 'both',
1336
+ var ariaAttributes = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, !this.props.isSearchable && fg('platform_fix_autocomplete_aria_for_select') ? {} : {
1337
+ 'aria-autocomplete': 'both'
1338
+ }), {}, {
1338
1339
  'aria-errormessage': this.props['aria-errormessage'],
1339
1340
  'aria-expanded': menuIsOpen,
1340
1341
  // TODO: aria-haspopup is implied as listbox with role="combobox" and was deprecated for aria 1.2, we still might need to keep it for back compat
package/dist/esm/utils.js CHANGED
@@ -247,7 +247,7 @@ export function isTouchCapable() {
247
247
  try {
248
248
  document.createEvent('TouchEvent');
249
249
  return true;
250
- } catch (e) {
250
+ } catch (_unused) {
251
251
  return false;
252
252
  }
253
253
  }
@@ -259,7 +259,7 @@ export function isTouchCapable() {
259
259
  export function isMobileDevice() {
260
260
  try {
261
261
  return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
262
- } catch (e) {
262
+ } catch (_unused2) {
263
263
  return false;
264
264
  }
265
265
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-select",
3
- "version": "3.9.0",
3
+ "version": "3.9.2",
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",
@@ -20,13 +20,13 @@
20
20
  ],
21
21
  "atlaskit:src": "src/index.tsx",
22
22
  "dependencies": {
23
- "@atlaskit/ds-lib": "^5.2.0",
23
+ "@atlaskit/ds-lib": "^5.3.0",
24
24
  "@atlaskit/icon": "^29.0.0",
25
- "@atlaskit/layering": "^3.3.0",
25
+ "@atlaskit/layering": "^3.4.0",
26
26
  "@atlaskit/platform-feature-flags": "^1.1.0",
27
- "@atlaskit/primitives": "^16.1.0",
27
+ "@atlaskit/primitives": "^16.4.0",
28
28
  "@atlaskit/spinner": "^19.0.0",
29
- "@atlaskit/tokens": "^8.0.0",
29
+ "@atlaskit/tokens": "^8.4.0",
30
30
  "@babel/runtime": "^7.0.0",
31
31
  "@compiled/react": "^0.18.6",
32
32
  "@floating-ui/dom": "^1.0.1",
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "devDependencies": {
41
41
  "@atlaskit/checkbox": "^17.1.0",
42
- "@atlaskit/form": "^14.2.0",
42
+ "@atlaskit/form": "^14.3.0",
43
43
  "@atlassian/feature-flags-test-utils": "^1.0.0",
44
44
  "@testing-library/react": "^13.4.0",
45
45
  "@testing-library/user-event": "^14.4.3",
@@ -54,6 +54,9 @@
54
54
  },
55
55
  "platform_do_not_clear_input_for_multiselect": {
56
56
  "type": "boolean"
57
+ },
58
+ "platform_fix_autocomplete_aria_for_select": {
59
+ "type": "boolean"
57
60
  }
58
61
  },
59
62
  "techstack": {