@atlaskit/select 17.19.3 → 18.0.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.
Files changed (58) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/AsyncCreatableSelect.js +3 -1
  3. package/dist/cjs/AsyncSelect.js +3 -1
  4. package/dist/cjs/CountrySelect.js +2 -11
  5. package/dist/cjs/CreatableSelect.js +3 -1
  6. package/dist/cjs/PopupSelect/PopupSelect.js +2 -1
  7. package/dist/cjs/PopupSelect/components.js +1 -1
  8. package/dist/cjs/RadioSelect.js +2 -0
  9. package/dist/cjs/Select.js +4 -2
  10. package/dist/cjs/components/index.js +1 -1
  11. package/dist/cjs/components/indicators.js +1 -1
  12. package/dist/cjs/components/input-aria-describedby.js +5 -4
  13. package/dist/cjs/components/no-options.js +1 -1
  14. package/dist/cjs/createSelect.js +1 -1
  15. package/dist/cjs/index.js +3 -3
  16. package/dist/es2019/AsyncCreatableSelect.js +3 -1
  17. package/dist/es2019/AsyncSelect.js +3 -1
  18. package/dist/es2019/CountrySelect.js +2 -11
  19. package/dist/es2019/CreatableSelect.js +3 -1
  20. package/dist/es2019/PopupSelect/PopupSelect.js +2 -1
  21. package/dist/es2019/PopupSelect/components.js +1 -1
  22. package/dist/es2019/RadioSelect.js +2 -0
  23. package/dist/es2019/Select.js +4 -3
  24. package/dist/es2019/components/index.js +1 -1
  25. package/dist/es2019/components/indicators.js +1 -1
  26. package/dist/es2019/components/input-aria-describedby.js +5 -4
  27. package/dist/es2019/components/no-options.js +1 -1
  28. package/dist/es2019/createSelect.js +1 -1
  29. package/dist/es2019/index.js +3 -3
  30. package/dist/esm/AsyncCreatableSelect.js +3 -1
  31. package/dist/esm/AsyncSelect.js +3 -1
  32. package/dist/esm/CountrySelect.js +2 -11
  33. package/dist/esm/CreatableSelect.js +3 -1
  34. package/dist/esm/PopupSelect/PopupSelect.js +2 -1
  35. package/dist/esm/PopupSelect/components.js +1 -1
  36. package/dist/esm/RadioSelect.js +2 -0
  37. package/dist/esm/Select.js +4 -3
  38. package/dist/esm/components/index.js +1 -1
  39. package/dist/esm/components/indicators.js +1 -1
  40. package/dist/esm/components/input-aria-describedby.js +5 -4
  41. package/dist/esm/components/no-options.js +1 -1
  42. package/dist/esm/createSelect.js +1 -1
  43. package/dist/esm/index.js +3 -3
  44. package/dist/types/CountrySelect.d.ts +0 -9
  45. package/dist/types/PopupSelect/PopupSelect.d.ts +4 -4
  46. package/dist/types/components/input-aria-describedby.d.ts +1 -1
  47. package/dist/types/index.d.ts +3 -3
  48. package/dist/types/types.d.ts +9 -9
  49. package/dist/types/utils/country-groups-announcement.d.ts +1 -1
  50. package/dist/types/utils/grouped-options-announcement.d.ts +1 -1
  51. package/dist/types-ts4.5/CountrySelect.d.ts +0 -9
  52. package/dist/types-ts4.5/PopupSelect/PopupSelect.d.ts +4 -4
  53. package/dist/types-ts4.5/components/input-aria-describedby.d.ts +1 -1
  54. package/dist/types-ts4.5/index.d.ts +3 -3
  55. package/dist/types-ts4.5/types.d.ts +9 -9
  56. package/dist/types-ts4.5/utils/country-groups-announcement.d.ts +1 -1
  57. package/dist/types-ts4.5/utils/grouped-options-announcement.d.ts +1 -1
  58. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/select
2
2
 
3
+ ## 18.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#143559](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/143559)
8
+ [`56dfbfe361f96`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/56dfbfe361f96) -
9
+ Upgrade react-select from 5.4 to 5.8 and replace it with internal atlaskit/react-select
10
+
11
+ ### Patch Changes
12
+
13
+ - [#143559](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/143559)
14
+ [`56dfbfe361f96`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/56dfbfe361f96) -
15
+ Upgrade react-select from 5.4 to 5.8 and replace it with internal atlaskit/react-select
16
+
3
17
  ## 17.19.3
4
18
 
5
19
  ### Patch Changes
@@ -5,7 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _asyncCreatable = _interopRequireDefault(require("react-select/async-creatable"));
8
+ var _asyncCreatable = _interopRequireDefault(require("@atlaskit/react-select/async-creatable"));
9
9
  var _createSelect = _interopRequireDefault(require("./createSelect"));
10
10
  var AsyncCreatableSelect = (0, _createSelect.default)(_asyncCreatable.default);
11
+
12
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
11
13
  var _default = exports.default = AsyncCreatableSelect;
@@ -5,7 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _async = _interopRequireDefault(require("react-select/async"));
8
+ var _async = _interopRequireDefault(require("@atlaskit/react-select/async"));
9
9
  var _createSelect = _interopRequireDefault(require("./createSelect"));
10
10
  var AsyncSelect = (0, _createSelect.default)(_async.default);
11
+
12
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
11
13
  var _default = exports.default = AsyncSelect;
@@ -78,17 +78,6 @@ var formatOptionLabel = function formatOptionLabel(opt, _ref4) {
78
78
  };
79
79
 
80
80
  // put it all together
81
- // TODO: Fill in the component {description} and ensure links point to the correct {packageName} location.
82
- // Remove links that the component does not have (such as usage). If there are no links remove them all.
83
- /**
84
- * __Country select__
85
- *
86
- * A country select {description}.
87
- *
88
- * - [Examples](https://atlassian.design/components/{packageName}/examples)
89
- * - [Code](https://atlassian.design/components/{packageName}/code)
90
- * - [Usage](https://atlassian.design/components/{packageName}/usage)
91
- */
92
81
  var CountrySelect = function CountrySelect(props) {
93
82
  var ariaLiveMessages = props.ariaLiveMessages,
94
83
  options = props.options;
@@ -107,4 +96,6 @@ var CountrySelect = function CountrySelect(props) {
107
96
  }, ariaLiveMessages) : _objectSpread({}, ariaLiveMessages)
108
97
  }, props));
109
98
  };
99
+
100
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
110
101
  var _default = exports.default = CountrySelect;
@@ -5,7 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _creatable = _interopRequireDefault(require("react-select/creatable"));
8
+ var _creatable = _interopRequireDefault(require("@atlaskit/react-select/creatable"));
9
9
  var _createSelect = _interopRequireDefault(require("./createSelect"));
10
10
  var CreatableSelect = (0, _createSelect.default)(_creatable.default);
11
+
12
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
11
13
  var _default = exports.default = CreatableSelect;
@@ -22,10 +22,10 @@ var _reactFocusLock = _interopRequireDefault(require("react-focus-lock"));
22
22
  var _reactFocusLockNext = _interopRequireDefault(require("react-focus-lock-next"));
23
23
  var _reactNodeResolver = _interopRequireDefault(require("react-node-resolver"));
24
24
  var _reactPopper = require("react-popper");
25
- var _reactSelect = require("react-select");
26
25
  var _reactUid = require("react-uid");
27
26
  var _shallowEqual = require("shallow-equal");
28
27
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
28
+ var _reactSelect = require("@atlaskit/react-select");
29
29
  var _colors = require("@atlaskit/theme/colors");
30
30
  var _Select = _interopRequireDefault(require("../Select"));
31
31
  var _styles = _interopRequireDefault(require("../styles"));
@@ -229,6 +229,7 @@ var PopupSelect = exports.default = /*#__PURE__*/function (_PureComponent) {
229
229
  */
230
230
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "close", function (options) {
231
231
  var _this$unbindWindowKey, _this2;
232
+ //@ts-ignore react-select unsupported props
232
233
  var _this$props3 = _this.props,
233
234
  onClose = _this$props3.onClose,
234
235
  onMenuClose = _this$props3.onMenuClose;
@@ -9,8 +9,8 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
9
9
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
10
  var _react = require("react");
11
11
  var _react2 = require("@emotion/react");
12
- var _reactSelect = require("react-select");
13
12
  var _searchEditorSearch = _interopRequireDefault(require("@atlaskit/icon/core/migration/search--editor-search"));
13
+ var _reactSelect = require("@atlaskit/react-select");
14
14
  var _colors = require("@atlaskit/theme/colors");
15
15
  var _constants = require("@atlaskit/theme/constants");
16
16
  var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
@@ -30,4 +30,6 @@ var RadioSelect = /*#__PURE__*/_react.default.memo(function (_ref) {
30
30
  components: mergedComponents
31
31
  }));
32
32
  });
33
+
34
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
33
35
  var _default = exports.default = RadioSelect;
@@ -5,11 +5,13 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = exports.SelectWithoutAnalytics = void 0;
8
- var _reactSelect = _interopRequireDefault(require("react-select"));
9
8
  var _analyticsNext = require("@atlaskit/analytics-next");
9
+ var _reactSelect = _interopRequireDefault(require("@atlaskit/react-select"));
10
10
  var _createSelect = _interopRequireDefault(require("./createSelect"));
11
+ /* eslint-disable @repo/internal/react/require-jsdoc */
12
+
11
13
  var packageName = "@atlaskit/select";
12
- var packageVersion = "17.19.3";
14
+ var packageVersion = "18.0.0";
13
15
  var SelectWithoutAnalytics = exports.SelectWithoutAnalytics = (0, _createSelect.default)(_reactSelect.default);
14
16
  var createAndFireEventOnAtlaskit = (0, _analyticsNext.createAndFireEvent)('atlaskit');
15
17
  var Select = (0, _analyticsNext.withAnalyticsContext)({
@@ -25,11 +25,11 @@ Object.defineProperty(exports, "LoadingIndicator", {
25
25
  });
26
26
  exports.MultiValueRemove = void 0;
27
27
  var _react = require("@emotion/react");
28
- var _reactSelect = require("react-select");
29
28
  var _selectClear = _interopRequireDefault(require("@atlaskit/icon/glyph/select-clear"));
30
29
  var _cross = _interopRequireDefault(require("@atlaskit/icon/utility/cross"));
31
30
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
32
31
  var _primitives = require("@atlaskit/primitives");
32
+ var _reactSelect = require("@atlaskit/react-select");
33
33
  var _indicators = require("./indicators");
34
34
  /**
35
35
  * @jsxRuntime classic
@@ -8,10 +8,10 @@ exports.LoadingIndicator = exports.DropdownIndicator = exports.ClearIndicator =
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _react = require("@emotion/react");
11
- var _reactSelect = require("react-select");
12
11
  var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-down"));
13
12
  var _crossCircleSelectClear = _interopRequireDefault(require("@atlaskit/icon/utility/migration/cross-circle--select-clear"));
14
13
  var _primitives = require("@atlaskit/primitives");
14
+ var _reactSelect = require("@atlaskit/react-select");
15
15
  var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
16
16
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
17
17
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /* eslint-disable @repo/internal/react/require-jsdoc */ /**
@@ -7,11 +7,12 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.Input = Input;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _react = _interopRequireDefault(require("react"));
10
- var _reactSelect = require("react-select");
10
+ var _reactSelect = require("@atlaskit/react-select");
11
11
  function Input(props) {
12
- var ariaDescribedByAttribute;
13
- var passed_describedby = props.selectProps['aria-describedby'];
14
- if (props['aria-describedby'] && passed_describedby) {
12
+ var _ariaDescribedByAttri;
13
+ var ariaDescribedByAttribute = props['aria-describedby'];
14
+ var passed_describedby = props.selectProps['aria-describedby'] || props.selectProps.descriptionId;
15
+ if (passed_describedby && !((_ariaDescribedByAttri = ariaDescribedByAttribute) !== null && _ariaDescribedByAttri !== void 0 && _ariaDescribedByAttri.includes(passed_describedby))) {
15
16
  ariaDescribedByAttribute = props['aria-describedby'] + ' ' + passed_describedby;
16
17
  } else {
17
18
  ariaDescribedByAttribute = props['aria-describedby'] || passed_describedby;
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.NoOptionsMessage = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
- var _reactSelect = require("react-select");
10
9
  var _primitives = require("@atlaskit/primitives");
10
+ var _reactSelect = require("@atlaskit/react-select");
11
11
  /**
12
12
  * __No options message__
13
13
  */
@@ -10,7 +10,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
11
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
12
12
  var _react = _interopRequireWildcard(require("react"));
13
- var _reactSelect = require("react-select");
13
+ var _reactSelect = require("@atlaskit/react-select");
14
14
  var _components = require("./components");
15
15
  var _inputAriaDescribedby = require("./components/input-aria-describedby");
16
16
  var _noOptions = require("./components/no-options");
package/dist/cjs/index.js CHANGED
@@ -119,9 +119,9 @@ Object.defineProperty(exports, "useCreatable", {
119
119
  return _creatable.useCreatable;
120
120
  }
121
121
  });
122
- var _reactSelect = require("react-select");
123
- var _async = require("react-select/async");
124
- var _creatable = require("react-select/creatable");
122
+ var _reactSelect = require("@atlaskit/react-select");
123
+ var _async = require("@atlaskit/react-select/async");
124
+ var _creatable = require("@atlaskit/react-select/creatable");
125
125
  var _inputOptions = require("./components/input-options");
126
126
  var _select = _interopRequireWildcard(require("./entry-points/select"));
127
127
  var _asyncSelect = _interopRequireDefault(require("./entry-points/async-select"));
@@ -1,4 +1,6 @@
1
- import AsyncCreatableReactSelect from 'react-select/async-creatable';
1
+ import AsyncCreatableReactSelect from '@atlaskit/react-select/async-creatable';
2
2
  import createSelect from './createSelect';
3
3
  const AsyncCreatableSelect = createSelect(AsyncCreatableReactSelect);
4
+
5
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
4
6
  export default AsyncCreatableSelect;
@@ -1,4 +1,6 @@
1
- import AsyncReactSelect from 'react-select/async';
1
+ import AsyncReactSelect from '@atlaskit/react-select/async';
2
2
  import createSelect from './createSelect';
3
3
  const AsyncSelect = createSelect(AsyncReactSelect);
4
+
5
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
4
6
  export default AsyncSelect;
@@ -63,17 +63,6 @@ const formatOptionLabel = (opt, {
63
63
  }) => context === 'value' ? controlLabel(opt) : optionLabel(opt);
64
64
 
65
65
  // put it all together
66
- // TODO: Fill in the component {description} and ensure links point to the correct {packageName} location.
67
- // Remove links that the component does not have (such as usage). If there are no links remove them all.
68
- /**
69
- * __Country select__
70
- *
71
- * A country select {description}.
72
- *
73
- * - [Examples](https://atlassian.design/components/{packageName}/examples)
74
- * - [Code](https://atlassian.design/components/{packageName}/code)
75
- * - [Usage](https://atlassian.design/components/{packageName}/usage)
76
- */
77
66
  const CountrySelect = props => {
78
67
  const {
79
68
  ariaLiveMessages,
@@ -95,4 +84,6 @@ const CountrySelect = props => {
95
84
  }
96
85
  }, props));
97
86
  };
87
+
88
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
98
89
  export default CountrySelect;
@@ -1,4 +1,6 @@
1
- import CreatableReactSelect from 'react-select/creatable';
1
+ import CreatableReactSelect from '@atlaskit/react-select/creatable';
2
2
  import createSelect from './createSelect';
3
3
  const CreatableSelect = createSelect(CreatableReactSelect);
4
+
5
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
4
6
  export default CreatableSelect;
@@ -8,10 +8,10 @@ import FocusLockOld from 'react-focus-lock';
8
8
  import FocusLockNext from 'react-focus-lock-next';
9
9
  import NodeResolver from 'react-node-resolver';
10
10
  import { Manager, Popper, Reference } from 'react-popper';
11
- import { mergeStyles } from 'react-select';
12
11
  import { uid } from 'react-uid';
13
12
  import { shallowEqualObjects } from 'shallow-equal';
14
13
  import { fg } from '@atlaskit/platform-feature-flags';
14
+ import { mergeStyles } from '@atlaskit/react-select';
15
15
  import { N80 } from '@atlaskit/theme/colors';
16
16
  import Select from '../Select';
17
17
  import baseStyles from '../styles';
@@ -201,6 +201,7 @@ export default class PopupSelect extends PureComponent {
201
201
  */
202
202
  _defineProperty(this, "close", options => {
203
203
  var _this$unbindWindowKey;
204
+ //@ts-ignore react-select unsupported props
204
205
  const {
205
206
  onClose,
206
207
  onMenuClose
@@ -7,8 +7,8 @@ import { forwardRef } from 'react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { css, jsx } from '@emotion/react';
10
- import { components } from 'react-select';
11
10
  import SearchIcon from '@atlaskit/icon/core/migration/search--editor-search';
11
+ import { components } from '@atlaskit/react-select';
12
12
  import { N40A } from '@atlaskit/theme/colors';
13
13
  import { layers } from '@atlaskit/theme/constants';
14
14
  import VisuallyHidden from '@atlaskit/visually-hidden';
@@ -15,4 +15,6 @@ const RadioSelect = /*#__PURE__*/React.memo(({
15
15
  components: mergedComponents
16
16
  }));
17
17
  });
18
+
19
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
18
20
  export default RadioSelect;
@@ -1,8 +1,9 @@
1
- import ReactSelect from 'react-select';
2
- import { withAnalyticsEvents, withAnalyticsContext, createAndFireEvent } from '@atlaskit/analytics-next';
1
+ /* eslint-disable @repo/internal/react/require-jsdoc */
2
+ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
3
+ import ReactSelect from '@atlaskit/react-select';
3
4
  import createSelect from './createSelect';
4
5
  const packageName = "@atlaskit/select";
5
- const packageVersion = "17.19.3";
6
+ const packageVersion = "18.0.0";
6
7
  export const SelectWithoutAnalytics = createSelect(ReactSelect);
7
8
  const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
8
9
  const Select = withAnalyticsContext({
@@ -4,11 +4,11 @@
4
4
  */
5
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
6
  import { css, jsx } from '@emotion/react';
7
- import { components } from 'react-select';
8
7
  import LegacySelectClearIcon from '@atlaskit/icon/glyph/select-clear';
9
8
  import CrossIcon from '@atlaskit/icon/utility/cross';
10
9
  import { fg } from '@atlaskit/platform-feature-flags';
11
10
  import { Inline, xcss } from '@atlaskit/primitives';
11
+ import { components } from '@atlaskit/react-select';
12
12
  export { ClearIndicator, DropdownIndicator, LoadingIndicator } from './indicators';
13
13
  const disabledStyles = css({
14
14
  display: 'none'
@@ -6,10 +6,10 @@ import _extends from "@babel/runtime/helpers/extends";
6
6
  */
7
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
8
  import { css, jsx } from '@emotion/react';
9
- import { components } from 'react-select';
10
9
  import DownIcon from '@atlaskit/icon/utility/migration/chevron-down';
11
10
  import CrossIcon from '@atlaskit/icon/utility/migration/cross-circle--select-clear';
12
11
  import { Inline, Pressable, xcss } from '@atlaskit/primitives';
12
+ import { components } from '@atlaskit/react-select';
13
13
  import Spinner from '@atlaskit/spinner';
14
14
  const iconContainerStyles = xcss({
15
15
  all: 'unset',
@@ -1,10 +1,11 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
- import { components } from 'react-select';
3
+ import { components } from '@atlaskit/react-select';
4
4
  export function Input(props) {
5
- let ariaDescribedByAttribute;
6
- const passed_describedby = props.selectProps['aria-describedby'];
7
- if (props['aria-describedby'] && passed_describedby) {
5
+ var _ariaDescribedByAttri;
6
+ let ariaDescribedByAttribute = props['aria-describedby'];
7
+ const passed_describedby = props.selectProps['aria-describedby'] || props.selectProps.descriptionId;
8
+ if (passed_describedby && !((_ariaDescribedByAttri = ariaDescribedByAttribute) !== null && _ariaDescribedByAttri !== void 0 && _ariaDescribedByAttri.includes(passed_describedby))) {
8
9
  ariaDescribedByAttribute = props['aria-describedby'] + ' ' + passed_describedby;
9
10
  } else {
10
11
  ariaDescribedByAttribute = props['aria-describedby'] || passed_describedby;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { components } from 'react-select';
3
2
  import { Text } from '@atlaskit/primitives';
3
+ import { components } from '@atlaskit/react-select';
4
4
  /**
5
5
  * __No options message__
6
6
  */
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  // eslint-disable-next-line @repo/internal/fs/filename-pattern-match
3
3
  import React, { forwardRef, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
4
- import { mergeStyles } from 'react-select';
4
+ import { mergeStyles } from '@atlaskit/react-select';
5
5
  import { ClearIndicator, DropdownIndicator, IndicatorSeparator, LoadingIndicator, MultiValueRemove } from './components';
6
6
  import { Input } from './components/input-aria-describedby';
7
7
  import { NoOptionsMessage } from './components/no-options';
@@ -1,6 +1,6 @@
1
- export { components, createFilter, mergeStyles } from 'react-select';
2
- export { useAsync } from 'react-select/async';
3
- export { useCreatable } from 'react-select/creatable';
1
+ export { components, createFilter, mergeStyles } from '@atlaskit/react-select';
2
+ export { useAsync } from '@atlaskit/react-select/async';
3
+ export { useCreatable } from '@atlaskit/react-select/creatable';
4
4
  export { CheckboxOption, RadioOption } from './components/input-options';
5
5
  export { default, SelectWithoutAnalytics } from './entry-points/select';
6
6
  export { default as AsyncSelect } from './entry-points/async-select';
@@ -1,4 +1,6 @@
1
- import AsyncCreatableReactSelect from 'react-select/async-creatable';
1
+ import AsyncCreatableReactSelect from '@atlaskit/react-select/async-creatable';
2
2
  import createSelect from './createSelect';
3
3
  var AsyncCreatableSelect = createSelect(AsyncCreatableReactSelect);
4
+
5
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
4
6
  export default AsyncCreatableSelect;
@@ -1,4 +1,6 @@
1
- import AsyncReactSelect from 'react-select/async';
1
+ import AsyncReactSelect from '@atlaskit/react-select/async';
2
2
  import createSelect from './createSelect';
3
3
  var AsyncSelect = createSelect(AsyncReactSelect);
4
+
5
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
4
6
  export default AsyncSelect;
@@ -74,17 +74,6 @@ var formatOptionLabel = function formatOptionLabel(opt, _ref4) {
74
74
  };
75
75
 
76
76
  // put it all together
77
- // TODO: Fill in the component {description} and ensure links point to the correct {packageName} location.
78
- // Remove links that the component does not have (such as usage). If there are no links remove them all.
79
- /**
80
- * __Country select__
81
- *
82
- * A country select {description}.
83
- *
84
- * - [Examples](https://atlassian.design/components/{packageName}/examples)
85
- * - [Code](https://atlassian.design/components/{packageName}/code)
86
- * - [Usage](https://atlassian.design/components/{packageName}/usage)
87
- */
88
77
  var CountrySelect = function CountrySelect(props) {
89
78
  var ariaLiveMessages = props.ariaLiveMessages,
90
79
  options = props.options;
@@ -103,4 +92,6 @@ var CountrySelect = function CountrySelect(props) {
103
92
  }, ariaLiveMessages) : _objectSpread({}, ariaLiveMessages)
104
93
  }, props));
105
94
  };
95
+
96
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
106
97
  export default CountrySelect;
@@ -1,4 +1,6 @@
1
- import CreatableReactSelect from 'react-select/creatable';
1
+ import CreatableReactSelect from '@atlaskit/react-select/creatable';
2
2
  import createSelect from './createSelect';
3
3
  var CreatableSelect = createSelect(CreatableReactSelect);
4
+
5
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
4
6
  export default CreatableSelect;
@@ -20,10 +20,10 @@ import FocusLockOld from 'react-focus-lock';
20
20
  import FocusLockNext from 'react-focus-lock-next';
21
21
  import NodeResolver from 'react-node-resolver';
22
22
  import { Manager, Popper, Reference } from 'react-popper';
23
- import { mergeStyles } from 'react-select';
24
23
  import { uid } from 'react-uid';
25
24
  import { shallowEqualObjects } from 'shallow-equal';
26
25
  import { fg } from '@atlaskit/platform-feature-flags';
26
+ import { mergeStyles } from '@atlaskit/react-select';
27
27
  import { N80 } from '@atlaskit/theme/colors';
28
28
  import Select from '../Select';
29
29
  import baseStyles from '../styles';
@@ -220,6 +220,7 @@ var PopupSelect = /*#__PURE__*/function (_PureComponent) {
220
220
  */
221
221
  _defineProperty(_assertThisInitialized(_this), "close", function (options) {
222
222
  var _this$unbindWindowKey, _this2;
223
+ //@ts-ignore react-select unsupported props
223
224
  var _this$props3 = _this.props,
224
225
  onClose = _this$props3.onClose,
225
226
  onMenuClose = _this$props3.onMenuClose;
@@ -9,8 +9,8 @@ import { forwardRef } from 'react';
9
9
 
10
10
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
11
11
  import { css, jsx } from '@emotion/react';
12
- import { components } from 'react-select';
13
12
  import SearchIcon from '@atlaskit/icon/core/migration/search--editor-search';
13
+ import { components } from '@atlaskit/react-select';
14
14
  import { N40A } from '@atlaskit/theme/colors';
15
15
  import { layers } from '@atlaskit/theme/constants';
16
16
  import VisuallyHidden from '@atlaskit/visually-hidden';
@@ -20,4 +20,6 @@ var RadioSelect = /*#__PURE__*/React.memo(function (_ref) {
20
20
  components: mergedComponents
21
21
  }));
22
22
  });
23
+
24
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
23
25
  export default RadioSelect;
@@ -1,8 +1,9 @@
1
- import ReactSelect from 'react-select';
2
- import { withAnalyticsEvents, withAnalyticsContext, createAndFireEvent } from '@atlaskit/analytics-next';
1
+ /* eslint-disable @repo/internal/react/require-jsdoc */
2
+ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
3
+ import ReactSelect from '@atlaskit/react-select';
3
4
  import createSelect from './createSelect';
4
5
  var packageName = "@atlaskit/select";
5
- var packageVersion = "17.19.3";
6
+ var packageVersion = "18.0.0";
6
7
  export var SelectWithoutAnalytics = createSelect(ReactSelect);
7
8
  var createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
8
9
  var Select = withAnalyticsContext({
@@ -4,11 +4,11 @@
4
4
  */
5
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
6
  import { css, jsx } from '@emotion/react';
7
- import { components } from 'react-select';
8
7
  import LegacySelectClearIcon from '@atlaskit/icon/glyph/select-clear';
9
8
  import CrossIcon from '@atlaskit/icon/utility/cross';
10
9
  import { fg } from '@atlaskit/platform-feature-flags';
11
10
  import { Inline, xcss } from '@atlaskit/primitives';
11
+ import { components } from '@atlaskit/react-select';
12
12
  export { ClearIndicator, DropdownIndicator, LoadingIndicator } from './indicators';
13
13
  var disabledStyles = css({
14
14
  display: 'none'
@@ -9,10 +9,10 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
9
9
  */
10
10
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
11
11
  import { css, jsx } from '@emotion/react';
12
- import { components } from 'react-select';
13
12
  import DownIcon from '@atlaskit/icon/utility/migration/chevron-down';
14
13
  import CrossIcon from '@atlaskit/icon/utility/migration/cross-circle--select-clear';
15
14
  import { Inline, Pressable, xcss } from '@atlaskit/primitives';
15
+ import { components } from '@atlaskit/react-select';
16
16
  import Spinner from '@atlaskit/spinner';
17
17
  var iconContainerStyles = xcss({
18
18
  all: 'unset',
@@ -1,10 +1,11 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
- import { components } from 'react-select';
3
+ import { components } from '@atlaskit/react-select';
4
4
  export function Input(props) {
5
- var ariaDescribedByAttribute;
6
- var passed_describedby = props.selectProps['aria-describedby'];
7
- if (props['aria-describedby'] && passed_describedby) {
5
+ var _ariaDescribedByAttri;
6
+ var ariaDescribedByAttribute = props['aria-describedby'];
7
+ var passed_describedby = props.selectProps['aria-describedby'] || props.selectProps.descriptionId;
8
+ if (passed_describedby && !((_ariaDescribedByAttri = ariaDescribedByAttribute) !== null && _ariaDescribedByAttri !== void 0 && _ariaDescribedByAttri.includes(passed_describedby))) {
8
9
  ariaDescribedByAttribute = props['aria-describedby'] + ' ' + passed_describedby;
9
10
  } else {
10
11
  ariaDescribedByAttribute = props['aria-describedby'] || passed_describedby;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { components } from 'react-select';
3
2
  import { Text } from '@atlaskit/primitives';
3
+ import { components } from '@atlaskit/react-select';
4
4
  /**
5
5
  * __No options message__
6
6
  */
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
6
6
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7
7
  // eslint-disable-next-line @repo/internal/fs/filename-pattern-match
8
8
  import React, { forwardRef, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
9
- import { mergeStyles } from 'react-select';
9
+ import { mergeStyles } from '@atlaskit/react-select';
10
10
  import { ClearIndicator, DropdownIndicator, IndicatorSeparator, LoadingIndicator, MultiValueRemove } from './components';
11
11
  import { Input } from './components/input-aria-describedby';
12
12
  import { NoOptionsMessage } from './components/no-options';
package/dist/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
- export { components, createFilter, mergeStyles } from 'react-select';
2
- export { useAsync } from 'react-select/async';
3
- export { useCreatable } from 'react-select/creatable';
1
+ export { components, createFilter, mergeStyles } from '@atlaskit/react-select';
2
+ export { useAsync } from '@atlaskit/react-select/async';
3
+ export { useCreatable } from '@atlaskit/react-select/creatable';
4
4
  export { CheckboxOption, RadioOption } from './components/input-options';
5
5
  export { default, SelectWithoutAnalytics } from './entry-points/select';
6
6
  export { default as AsyncSelect } from './entry-points/async-select';
@@ -6,14 +6,5 @@ import { jsx } from '@emotion/react';
6
6
  import { groupedCountries } from './data/countries';
7
7
  import { type SelectProps } from './types';
8
8
  type Country = (typeof groupedCountries)[number]['options'][number];
9
- /**
10
- * __Country select__
11
- *
12
- * A country select {description}.
13
- *
14
- * - [Examples](https://atlassian.design/components/{packageName}/examples)
15
- * - [Code](https://atlassian.design/components/{packageName}/code)
16
- * - [Usage](https://atlassian.design/components/{packageName}/usage)
17
- */
18
9
  declare const CountrySelect: (props: SelectProps<Country>) => jsx.JSX.Element;
19
10
  export default CountrySelect;
@@ -1,7 +1,7 @@
1
1
  import React, { type KeyboardEventHandler, PureComponent, type ReactNode } from 'react';
2
2
  import { type UnbindFn } from 'bind-event-listener';
3
3
  import { type PopperProps } from 'react-popper';
4
- import { type GroupBase } from 'react-select';
4
+ import { type GroupBase } from '@atlaskit/react-select';
5
5
  import { type ActionMeta, type AtlaskitSelectRefType, type OptionType, type ReactSelectProps, type StylesConfig, type ValidationState, type ValueType } from '../types';
6
6
  type defaultModifiers = 'offset' | 'preventOverflow';
7
7
  type PopperPropsNoChildren<Modifiers> = Omit<PopperProps<Modifiers>, 'children'>;
@@ -113,9 +113,9 @@ export default class PopupSelect<Option = OptionType, IsMulti extends boolean =
113
113
  Control: React.FC<import("../types").ControlProps<OptionType, boolean>>;
114
114
  DropdownIndicator: () => import("@emotion/react").jsx.JSX.Element;
115
115
  Menu: ({ children, innerProps }: import("../types").MenuProps<OptionType, boolean>) => import("@emotion/react").jsx.JSX.Element;
116
- IndicatorSeparator: (props: import("react-select").IndicatorSeparatorProps<unknown, boolean, GroupBase<unknown>>) => import("@emotion/react").jsx.JSX.Element;
117
- ClearIndicator: (props: import("react-select").ClearIndicatorProps<unknown, boolean, GroupBase<unknown>>) => import("@emotion/react").jsx.JSX.Element;
118
- MultiValueRemove: (props: import("react-select").MultiValueRemoveProps<unknown, boolean, GroupBase<unknown>>) => import("@emotion/react").jsx.JSX.Element;
116
+ IndicatorSeparator: (props: import("@atlaskit/react-select").IndicatorSeparatorProps<unknown, boolean, GroupBase<unknown>>) => import("@emotion/react").jsx.JSX.Element;
117
+ ClearIndicator: (props: import("@atlaskit/react-select").ClearIndicatorProps<unknown, boolean, GroupBase<unknown>>) => import("@emotion/react").jsx.JSX.Element;
118
+ MultiValueRemove: (props: import("@atlaskit/react-select").MultiValueRemoveProps<unknown, boolean, GroupBase<unknown>>) => import("@emotion/react").jsx.JSX.Element;
119
119
  };
120
120
  mergedPopperProps: PopperPropsNoChildren<string>;
121
121
  };
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
- import { type InputProps } from 'react-select';
2
+ import { type InputProps } from '@atlaskit/react-select';
3
3
  import type { OptionType } from '../types';
4
4
  export declare function Input<Option = OptionType, IsMulti extends boolean = false>(props: InputProps<Option, IsMulti>): JSX.Element;
@@ -1,6 +1,6 @@
1
- export { components, createFilter, mergeStyles } from 'react-select';
2
- export { useAsync } from 'react-select/async';
3
- export { useCreatable } from 'react-select/creatable';
1
+ export { components, createFilter, mergeStyles } from '@atlaskit/react-select';
2
+ export { useAsync } from '@atlaskit/react-select/async';
3
+ export { useCreatable } from '@atlaskit/react-select/creatable';
4
4
  export { CheckboxOption, RadioOption } from './components/input-options';
5
5
  export { default, SelectWithoutAnalytics } from './entry-points/select';
6
6
  export { default as AsyncSelect } from './entry-points/async-select';
@@ -1,9 +1,9 @@
1
1
  /// <reference types="react" />
2
- import { type AriaOnFocusProps, type ClearIndicatorProps, type DropdownIndicatorProps, type FormatOptionLabelMeta, type GroupBase as GroupType, type IndicatorSeparatorProps, type InputActionMeta, type InputProps, type LoadingIndicatorProps, type MultiValueProps, type MultiValueRemoveProps, type NoticeProps, type OptionProps as ReactSelectOptionProps, type Props as ReactSelectProps, type ActionMeta as RSActionMeta, type ControlProps as RSControlProps, type GroupProps as RSGroupProps, type MenuListProps as RSMenuListComponentProps, type MenuProps as RSMenuProps, type Options as RSOptionsType, type PlaceholderProps as RSPlaceholderProps, type SelectComponentsConfig as RSSelectComponentsConfig, type StylesConfig as RSStylesConfig, type ValueContainerProps as RSValueContainerProps, type OnChangeValue as RSValueType, type SelectInstance, type SingleValueProps } from 'react-select';
3
- import { type AsyncProps } from 'react-select/async';
4
- import type BaseSelect from 'react-select/base';
5
- import { type CreatableProps } from 'react-select/creatable';
6
2
  import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
3
+ import { type AriaOnFocusProps, type ClearIndicatorProps, type DropdownIndicatorProps, type FormatOptionLabelMeta, type GroupBase as GroupType, type IndicatorSeparatorProps, type InputActionMeta, type InputProps, type LoadingIndicatorProps, type MultiValueProps, type MultiValueRemoveProps, type NoticeProps, type OptionProps as ReactSelectOptionProps, type Props as ReactSelectProps, type ActionMeta as RSActionMeta, type ControlProps as RSControlProps, type GroupProps as RSGroupProps, type MenuListProps as RSMenuListComponentProps, type MenuProps as RSMenuProps, type Options as RSOptionsType, type PlaceholderProps as RSPlaceholderProps, type SelectComponentsConfig as RSSelectComponentsConfig, type StylesConfig as RSStylesConfig, type ValueContainerProps as RSValueContainerProps, type OnChangeValue as RSValueType, type SelectInstance, type SingleValueProps } from '@atlaskit/react-select';
4
+ import { type AsyncProps } from '@atlaskit/react-select/async';
5
+ import type BaseSelect from '@atlaskit/react-select/base';
6
+ import { type CreatableProps } from '@atlaskit/react-select/creatable';
7
7
  export type ValidationState = 'default' | 'error' | 'success';
8
8
  export interface OptionType {
9
9
  [key: string]: any;
@@ -50,12 +50,17 @@ interface CustomSelectProps extends WithAnalyticsEventsProps {
50
50
  * @deprecated Use isInvalid instead. The state of validation if used in a form.
51
51
  */
52
52
  validationState?: ValidationState;
53
+ descriptionId?: string;
54
+ onClickPreventDefault?: boolean;
53
55
  }
54
56
  export interface SelectProps<Option, IsMulti extends boolean = false> extends ReactSelectProps<Option, IsMulti>, CustomSelectProps {
57
+ [key: string]: any;
55
58
  }
56
59
  export interface AsyncSelectProps<Option, IsMulti extends boolean = false> extends AsyncProps<Option, IsMulti, GroupType<Option>>, CustomSelectProps {
60
+ [key: string]: any;
57
61
  }
58
62
  export interface CreatableSelectProps<Option, IsMulti extends boolean = false> extends CreatableProps<Option, IsMulti, GroupType<Option>>, CustomSelectProps {
63
+ [key: string]: any;
59
64
  }
60
65
  export type ActionMeta<Option = OptionType> = RSActionMeta<Option>;
61
66
  export type ControlProps<Option, IsMulti extends boolean = false> = RSControlProps<Option, IsMulti>;
@@ -74,8 +79,3 @@ export type AtlaskitSelectRefType = {
74
79
  focus: () => void;
75
80
  };
76
81
  export type { SelectInstance, FormatOptionLabelMeta, InputActionMeta, GroupType, InputProps, MultiValueProps, ReactSelectProps, SingleValueProps, ClearIndicatorProps, DropdownIndicatorProps, IndicatorSeparatorProps, LoadingIndicatorProps, NoticeProps, MultiValueRemoveProps, AriaOnFocusProps, };
77
- declare module 'react-select/base' {
78
- interface Props<Option, IsMulti extends boolean, Group extends GroupType<Option>> {
79
- [key: string]: any;
80
- }
81
- }
@@ -1,4 +1,4 @@
1
- import { type AriaOnFocusProps, type OptionsOrGroups } from 'react-select';
1
+ import { type AriaOnFocusProps, type OptionsOrGroups } from '@atlaskit/react-select';
2
2
  import { type GroupType } from '../types';
3
3
  type Country = {
4
4
  icon: string;
@@ -1,4 +1,4 @@
1
- import { type AriaOnFocusProps, type GroupBase, type OptionsOrGroups } from 'react-select';
1
+ import { type AriaOnFocusProps, type GroupBase, type OptionsOrGroups } from '@atlaskit/react-select';
2
2
  import { type GroupType, type OptionType } from '../types';
3
3
  export declare function onFocus(onFocusProps: AriaOnFocusProps<OptionType, GroupBase<OptionType>>, defaultOptions?: OptionsOrGroups<OptionType, GroupType<OptionType>>): string;
4
4
  export declare const isOptionsGrouped: (arr: OptionsOrGroups<OptionType, GroupType<OptionType>> | undefined) => boolean | undefined;
@@ -6,14 +6,5 @@ import { jsx } from '@emotion/react';
6
6
  import { groupedCountries } from './data/countries';
7
7
  import { type SelectProps } from './types';
8
8
  type Country = (typeof groupedCountries)[number]['options'][number];
9
- /**
10
- * __Country select__
11
- *
12
- * A country select {description}.
13
- *
14
- * - [Examples](https://atlassian.design/components/{packageName}/examples)
15
- * - [Code](https://atlassian.design/components/{packageName}/code)
16
- * - [Usage](https://atlassian.design/components/{packageName}/usage)
17
- */
18
9
  declare const CountrySelect: (props: SelectProps<Country>) => jsx.JSX.Element;
19
10
  export default CountrySelect;
@@ -1,7 +1,7 @@
1
1
  import React, { type KeyboardEventHandler, PureComponent, type ReactNode } from 'react';
2
2
  import { type UnbindFn } from 'bind-event-listener';
3
3
  import { type PopperProps } from 'react-popper';
4
- import { type GroupBase } from 'react-select';
4
+ import { type GroupBase } from '@atlaskit/react-select';
5
5
  import { type ActionMeta, type AtlaskitSelectRefType, type OptionType, type ReactSelectProps, type StylesConfig, type ValidationState, type ValueType } from '../types';
6
6
  type defaultModifiers = 'offset' | 'preventOverflow';
7
7
  type PopperPropsNoChildren<Modifiers> = Omit<PopperProps<Modifiers>, 'children'>;
@@ -113,9 +113,9 @@ export default class PopupSelect<Option = OptionType, IsMulti extends boolean =
113
113
  Control: React.FC<import("../types").ControlProps<OptionType, boolean>>;
114
114
  DropdownIndicator: () => import("@emotion/react").jsx.JSX.Element;
115
115
  Menu: ({ children, innerProps }: import("../types").MenuProps<OptionType, boolean>) => import("@emotion/react").jsx.JSX.Element;
116
- IndicatorSeparator: (props: import("react-select").IndicatorSeparatorProps<unknown, boolean, GroupBase<unknown>>) => import("@emotion/react").jsx.JSX.Element;
117
- ClearIndicator: (props: import("react-select").ClearIndicatorProps<unknown, boolean, GroupBase<unknown>>) => import("@emotion/react").jsx.JSX.Element;
118
- MultiValueRemove: (props: import("react-select").MultiValueRemoveProps<unknown, boolean, GroupBase<unknown>>) => import("@emotion/react").jsx.JSX.Element;
116
+ IndicatorSeparator: (props: import("@atlaskit/react-select").IndicatorSeparatorProps<unknown, boolean, GroupBase<unknown>>) => import("@emotion/react").jsx.JSX.Element;
117
+ ClearIndicator: (props: import("@atlaskit/react-select").ClearIndicatorProps<unknown, boolean, GroupBase<unknown>>) => import("@emotion/react").jsx.JSX.Element;
118
+ MultiValueRemove: (props: import("@atlaskit/react-select").MultiValueRemoveProps<unknown, boolean, GroupBase<unknown>>) => import("@emotion/react").jsx.JSX.Element;
119
119
  };
120
120
  mergedPopperProps: PopperPropsNoChildren<string>;
121
121
  };
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
- import { type InputProps } from 'react-select';
2
+ import { type InputProps } from '@atlaskit/react-select';
3
3
  import type { OptionType } from '../types';
4
4
  export declare function Input<Option = OptionType, IsMulti extends boolean = false>(props: InputProps<Option, IsMulti>): JSX.Element;
@@ -1,6 +1,6 @@
1
- export { components, createFilter, mergeStyles } from 'react-select';
2
- export { useAsync } from 'react-select/async';
3
- export { useCreatable } from 'react-select/creatable';
1
+ export { components, createFilter, mergeStyles } from '@atlaskit/react-select';
2
+ export { useAsync } from '@atlaskit/react-select/async';
3
+ export { useCreatable } from '@atlaskit/react-select/creatable';
4
4
  export { CheckboxOption, RadioOption } from './components/input-options';
5
5
  export { default, SelectWithoutAnalytics } from './entry-points/select';
6
6
  export { default as AsyncSelect } from './entry-points/async-select';
@@ -1,9 +1,9 @@
1
1
  /// <reference types="react" />
2
- import { type AriaOnFocusProps, type ClearIndicatorProps, type DropdownIndicatorProps, type FormatOptionLabelMeta, type GroupBase as GroupType, type IndicatorSeparatorProps, type InputActionMeta, type InputProps, type LoadingIndicatorProps, type MultiValueProps, type MultiValueRemoveProps, type NoticeProps, type OptionProps as ReactSelectOptionProps, type Props as ReactSelectProps, type ActionMeta as RSActionMeta, type ControlProps as RSControlProps, type GroupProps as RSGroupProps, type MenuListProps as RSMenuListComponentProps, type MenuProps as RSMenuProps, type Options as RSOptionsType, type PlaceholderProps as RSPlaceholderProps, type SelectComponentsConfig as RSSelectComponentsConfig, type StylesConfig as RSStylesConfig, type ValueContainerProps as RSValueContainerProps, type OnChangeValue as RSValueType, type SelectInstance, type SingleValueProps } from 'react-select';
3
- import { type AsyncProps } from 'react-select/async';
4
- import type BaseSelect from 'react-select/base';
5
- import { type CreatableProps } from 'react-select/creatable';
6
2
  import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
3
+ import { type AriaOnFocusProps, type ClearIndicatorProps, type DropdownIndicatorProps, type FormatOptionLabelMeta, type GroupBase as GroupType, type IndicatorSeparatorProps, type InputActionMeta, type InputProps, type LoadingIndicatorProps, type MultiValueProps, type MultiValueRemoveProps, type NoticeProps, type OptionProps as ReactSelectOptionProps, type Props as ReactSelectProps, type ActionMeta as RSActionMeta, type ControlProps as RSControlProps, type GroupProps as RSGroupProps, type MenuListProps as RSMenuListComponentProps, type MenuProps as RSMenuProps, type Options as RSOptionsType, type PlaceholderProps as RSPlaceholderProps, type SelectComponentsConfig as RSSelectComponentsConfig, type StylesConfig as RSStylesConfig, type ValueContainerProps as RSValueContainerProps, type OnChangeValue as RSValueType, type SelectInstance, type SingleValueProps } from '@atlaskit/react-select';
4
+ import { type AsyncProps } from '@atlaskit/react-select/async';
5
+ import type BaseSelect from '@atlaskit/react-select/base';
6
+ import { type CreatableProps } from '@atlaskit/react-select/creatable';
7
7
  export type ValidationState = 'default' | 'error' | 'success';
8
8
  export interface OptionType {
9
9
  [key: string]: any;
@@ -50,12 +50,17 @@ interface CustomSelectProps extends WithAnalyticsEventsProps {
50
50
  * @deprecated Use isInvalid instead. The state of validation if used in a form.
51
51
  */
52
52
  validationState?: ValidationState;
53
+ descriptionId?: string;
54
+ onClickPreventDefault?: boolean;
53
55
  }
54
56
  export interface SelectProps<Option, IsMulti extends boolean = false> extends ReactSelectProps<Option, IsMulti>, CustomSelectProps {
57
+ [key: string]: any;
55
58
  }
56
59
  export interface AsyncSelectProps<Option, IsMulti extends boolean = false> extends AsyncProps<Option, IsMulti, GroupType<Option>>, CustomSelectProps {
60
+ [key: string]: any;
57
61
  }
58
62
  export interface CreatableSelectProps<Option, IsMulti extends boolean = false> extends CreatableProps<Option, IsMulti, GroupType<Option>>, CustomSelectProps {
63
+ [key: string]: any;
59
64
  }
60
65
  export type ActionMeta<Option = OptionType> = RSActionMeta<Option>;
61
66
  export type ControlProps<Option, IsMulti extends boolean = false> = RSControlProps<Option, IsMulti>;
@@ -74,8 +79,3 @@ export type AtlaskitSelectRefType = {
74
79
  focus: () => void;
75
80
  };
76
81
  export type { SelectInstance, FormatOptionLabelMeta, InputActionMeta, GroupType, InputProps, MultiValueProps, ReactSelectProps, SingleValueProps, ClearIndicatorProps, DropdownIndicatorProps, IndicatorSeparatorProps, LoadingIndicatorProps, NoticeProps, MultiValueRemoveProps, AriaOnFocusProps, };
77
- declare module 'react-select/base' {
78
- interface Props<Option, IsMulti extends boolean, Group extends GroupType<Option>> {
79
- [key: string]: any;
80
- }
81
- }
@@ -1,4 +1,4 @@
1
- import { type AriaOnFocusProps, type OptionsOrGroups } from 'react-select';
1
+ import { type AriaOnFocusProps, type OptionsOrGroups } from '@atlaskit/react-select';
2
2
  import { type GroupType } from '../types';
3
3
  type Country = {
4
4
  icon: string;
@@ -1,4 +1,4 @@
1
- import { type AriaOnFocusProps, type GroupBase, type OptionsOrGroups } from 'react-select';
1
+ import { type AriaOnFocusProps, type GroupBase, type OptionsOrGroups } from '@atlaskit/react-select';
2
2
  import { type GroupType, type OptionType } from '../types';
3
3
  export declare function onFocus(onFocusProps: AriaOnFocusProps<OptionType, GroupBase<OptionType>>, defaultOptions?: OptionsOrGroups<OptionType, GroupType<OptionType>>): string;
4
4
  export declare const isOptionsGrouped: (arr: OptionsOrGroups<OptionType, GroupType<OptionType>> | undefined) => boolean | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/select",
3
- "version": "17.19.3",
3
+ "version": "18.0.0",
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/"
@@ -42,6 +42,7 @@
42
42
  "@atlaskit/icon": "^22.20.0",
43
43
  "@atlaskit/platform-feature-flags": "^0.3.0",
44
44
  "@atlaskit/primitives": "^12.2.0",
45
+ "@atlaskit/react-select": "^1.0.1",
45
46
  "@atlaskit/spinner": "^16.3.0",
46
47
  "@atlaskit/theme": "^13.0.0",
47
48
  "@atlaskit/tokens": "^2.0.0",
@@ -54,7 +55,6 @@
54
55
  "react-focus-lock-next": "npm:react-focus-lock@^2.13.2",
55
56
  "react-node-resolver": "^1.0.1",
56
57
  "react-popper": "^2.3.0",
57
- "react-select": "^5.4.0",
58
58
  "react-uid": "^2.2.0",
59
59
  "shallow-equal": "^3.1.0"
60
60
  },
@@ -67,7 +67,7 @@
67
67
  "@af/integration-testing": "*",
68
68
  "@af/visual-regression": "*",
69
69
  "@atlaskit/checkbox": "^14.0.0",
70
- "@atlaskit/ds-lib": "^2.6.0",
70
+ "@atlaskit/ds-lib": "^3.0.0",
71
71
  "@atlaskit/modal-dialog": "^12.17.0",
72
72
  "@atlaskit/radio": "^6.5.0",
73
73
  "@atlaskit/ssr": "*",