@atlaskit/select 18.10.2 → 18.10.3

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/select
2
2
 
3
+ ## 18.10.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#110434](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/110434)
8
+ [`29da4bcb1cd78`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/29da4bcb1cd78) -
9
+ Inprove device vevification with common utils
10
+
3
11
  ## 18.10.2
4
12
 
5
13
  ### Patch Changes
@@ -20,6 +20,7 @@ var _reactDom = require("react-dom");
20
20
  var _reactFocusLock = _interopRequireDefault(require("react-focus-lock"));
21
21
  var _reactPopper = require("react-popper");
22
22
  var _shallowEqual = require("shallow-equal");
23
+ var _deviceCheck = require("@atlaskit/ds-lib/device-check");
23
24
  var _useId = require("@atlaskit/ds-lib/use-id");
24
25
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
25
26
  var _reactSelect = require("@atlaskit/react-select");
@@ -420,8 +421,7 @@ var PopupSelect = exports.default = /*#__PURE__*/function (_PureComponent) {
420
421
  label: providedAriaLabel
421
422
  // TODO: Popup Select does not work well with active-descendant
422
423
  ,
423
- "aria-live": (/iPad|iPhone|iPod/.test(navigator.userAgent) || navigator.platform === 'MacIntel') &&
424
- // temporary check for now
424
+ "aria-live": (0, _deviceCheck.isAppleDevice)() &&
425
425
  // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
426
426
  (0, _platformFeatureFlags.fg)('design_system_select-a11y-improvement') ? 'assertive' // only needed on Apple products
427
427
  : undefined,
@@ -11,7 +11,7 @@ var _createSelect = _interopRequireDefault(require("./createSelect"));
11
11
  /* eslint-disable @repo/internal/react/require-jsdoc */
12
12
 
13
13
  var packageName = "@atlaskit/select";
14
- var packageVersion = "18.10.2";
14
+ var packageVersion = "18.10.3";
15
15
  var SelectWithoutAnalytics = exports.SelectWithoutAnalytics = (0, _createSelect.default)(_async.default);
16
16
  var createAndFireEventOnAtlaskit = (0, _analyticsNext.createAndFireEvent)('atlaskit');
17
17
  var Select = (0, _analyticsNext.withAnalyticsContext)({
@@ -11,6 +11,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
11
11
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
12
12
  var _react = require("react");
13
13
  var _react2 = require("@emotion/react");
14
+ var _deviceCheck = require("@atlaskit/ds-lib/device-check");
14
15
  var _checkbox = _interopRequireDefault(require("@atlaskit/icon/glyph/checkbox"));
15
16
  var _radio = _interopRequireDefault(require("@atlaskit/icon/glyph/radio"));
16
17
  var _svg = _interopRequireDefault(require("@atlaskit/icon/svg"));
@@ -162,8 +163,7 @@ var ControlOption = function ControlOption(props) {
162
163
  }, rest)),
163
164
  styles = _getPrimitiveStyles.styles,
164
165
  classes = _getPrimitiveStyles.classes;
165
- var isVoiceOver = (/iPad|iPhone|iPod/.test(navigator.userAgent) || navigator.platform === 'MacIntel') &&
166
- // temporary check for now
166
+ var isVoiceOver = (0, _deviceCheck.isAppleDevice)() &&
167
167
  // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
168
168
  (0, _platformFeatureFlags.fg)('design_system_select-a11y-improvement');
169
169
  return (
@@ -7,6 +7,7 @@ import { createPortal } from 'react-dom';
7
7
  import FocusLock from 'react-focus-lock';
8
8
  import { Manager, Popper, Reference } from 'react-popper';
9
9
  import { shallowEqualObjects } from 'shallow-equal';
10
+ import { isAppleDevice } from '@atlaskit/ds-lib/device-check';
10
11
  import { IdProvider } from '@atlaskit/ds-lib/use-id';
11
12
  import { fg } from '@atlaskit/platform-feature-flags';
12
13
  import { mergeStyles } from '@atlaskit/react-select';
@@ -401,8 +402,7 @@ export default class PopupSelect extends PureComponent {
401
402
  label: providedAriaLabel
402
403
  // TODO: Popup Select does not work well with active-descendant
403
404
  ,
404
- "aria-live": (/iPad|iPhone|iPod/.test(navigator.userAgent) || navigator.platform === 'MacIntel') &&
405
- // temporary check for now
405
+ "aria-live": isAppleDevice() &&
406
406
  // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
407
407
  fg('design_system_select-a11y-improvement') ? 'assertive' // only needed on Apple products
408
408
  : undefined,
@@ -3,7 +3,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
3
3
  import AsyncSelect from '@atlaskit/react-select/async';
4
4
  import createSelect from './createSelect';
5
5
  const packageName = "@atlaskit/select";
6
- const packageVersion = "18.10.2";
6
+ const packageVersion = "18.10.3";
7
7
  export const SelectWithoutAnalytics = createSelect(AsyncSelect);
8
8
  const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
9
9
  const Select = withAnalyticsContext({
@@ -6,6 +6,7 @@ import _extends from "@babel/runtime/helpers/extends";
6
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
7
  import { useCallback, useState } from 'react';
8
8
  import { css, jsx } from '@emotion/react';
9
+ import { isAppleDevice } from '@atlaskit/ds-lib/device-check';
9
10
  import CheckboxIcon from '@atlaskit/icon/glyph/checkbox';
10
11
  import RadioIcon from '@atlaskit/icon/glyph/radio';
11
12
  import PrimitiveSVGIcon from '@atlaskit/icon/svg';
@@ -161,8 +162,7 @@ const ControlOption = props => {
161
162
  getStyles,
162
163
  ...rest
163
164
  });
164
- const isVoiceOver = (/iPad|iPhone|iPod/.test(navigator.userAgent) || navigator.platform === 'MacIntel') &&
165
- // temporary check for now
165
+ const isVoiceOver = isAppleDevice() &&
166
166
  // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
167
167
  fg('design_system_select-a11y-improvement');
168
168
  return (
@@ -18,6 +18,7 @@ import { createPortal } from 'react-dom';
18
18
  import FocusLock from 'react-focus-lock';
19
19
  import { Manager, Popper, Reference } from 'react-popper';
20
20
  import { shallowEqualObjects } from 'shallow-equal';
21
+ import { isAppleDevice } from '@atlaskit/ds-lib/device-check';
21
22
  import { IdProvider } from '@atlaskit/ds-lib/use-id';
22
23
  import { fg } from '@atlaskit/platform-feature-flags';
23
24
  import { mergeStyles } from '@atlaskit/react-select';
@@ -411,8 +412,7 @@ var PopupSelect = /*#__PURE__*/function (_PureComponent) {
411
412
  label: providedAriaLabel
412
413
  // TODO: Popup Select does not work well with active-descendant
413
414
  ,
414
- "aria-live": (/iPad|iPhone|iPod/.test(navigator.userAgent) || navigator.platform === 'MacIntel') &&
415
- // temporary check for now
415
+ "aria-live": isAppleDevice() &&
416
416
  // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
417
417
  fg('design_system_select-a11y-improvement') ? 'assertive' // only needed on Apple products
418
418
  : undefined,
@@ -3,7 +3,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
3
3
  import AsyncSelect from '@atlaskit/react-select/async';
4
4
  import createSelect from './createSelect';
5
5
  var packageName = "@atlaskit/select";
6
- var packageVersion = "18.10.2";
6
+ var packageVersion = "18.10.3";
7
7
  export var SelectWithoutAnalytics = createSelect(AsyncSelect);
8
8
  var createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
9
9
  var Select = withAnalyticsContext({
@@ -12,6 +12,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
12
12
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
13
13
  import { useCallback, useState } from 'react';
14
14
  import { css, jsx } from '@emotion/react';
15
+ import { isAppleDevice } from '@atlaskit/ds-lib/device-check';
15
16
  import CheckboxIcon from '@atlaskit/icon/glyph/checkbox';
16
17
  import RadioIcon from '@atlaskit/icon/glyph/radio';
17
18
  import PrimitiveSVGIcon from '@atlaskit/icon/svg';
@@ -157,8 +158,7 @@ var ControlOption = function ControlOption(props) {
157
158
  }, rest)),
158
159
  styles = _getPrimitiveStyles.styles,
159
160
  classes = _getPrimitiveStyles.classes;
160
- var isVoiceOver = (/iPad|iPhone|iPod/.test(navigator.userAgent) || navigator.platform === 'MacIntel') &&
161
- // temporary check for now
161
+ var isVoiceOver = isAppleDevice() &&
162
162
  // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
163
163
  fg('design_system_select-a11y-improvement');
164
164
  return (
@@ -111,6 +111,10 @@ export default class PopupSelect<Option = OptionType, IsMulti extends boolean =
111
111
  focusLockEnabled: boolean;
112
112
  isOpen: boolean;
113
113
  mergedComponents: {
114
+ /**
115
+ * If `false`, renders a select with no search field. If `true`, renders a search field in the select when the
116
+ * number of options exceeds the `searchThreshold`. The default is `true`.
117
+ */
114
118
  Control: React.FC<import("../types").ControlProps<OptionType, boolean>>;
115
119
  DropdownIndicator: () => import("@emotion/react").jsx.JSX.Element;
116
120
  Menu: ({ children, innerProps }: import("../types").MenuProps<OptionType, boolean>) => import("@emotion/react").jsx.JSX.Element;
@@ -111,6 +111,10 @@ export default class PopupSelect<Option = OptionType, IsMulti extends boolean =
111
111
  focusLockEnabled: boolean;
112
112
  isOpen: boolean;
113
113
  mergedComponents: {
114
+ /**
115
+ * If `false`, renders a select with no search field. If `true`, renders a search field in the select when the
116
+ * number of options exceeds the `searchThreshold`. The default is `true`.
117
+ */
114
118
  Control: React.FC<import("../types").ControlProps<OptionType, boolean>>;
115
119
  DropdownIndicator: () => import("@emotion/react").jsx.JSX.Element;
116
120
  Menu: ({ children, innerProps }: import("../types").MenuProps<OptionType, boolean>) => import("@emotion/react").jsx.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/select",
3
- "version": "18.10.2",
3
+ "version": "18.10.3",
4
4
  "description": "Select allows users to make a single selection or multiple selections from a list of options.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"