@atlaskit/select 18.4.2 → 18.5.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,25 @@
1
1
  # @atlaskit/select
2
2
 
3
+ ## 18.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#160447](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/160447)
8
+ [`515ed7a31a9fb`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/515ed7a31a9fb) -
9
+ Make async select by default in select
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 18.4.3
16
+
17
+ ### Patch Changes
18
+
19
+ - [#158691](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/158691)
20
+ [`453919c3f78d3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/453919c3f78d3) -
21
+ Pass isInvalid to internal react-select from select prop to support aria-invalid on input
22
+
3
23
  ## 18.4.2
4
24
 
5
25
  ### Patch Changes
@@ -6,13 +6,13 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = exports.SelectWithoutAnalytics = void 0;
8
8
  var _analyticsNext = require("@atlaskit/analytics-next");
9
- var _reactSelect = _interopRequireDefault(require("@atlaskit/react-select"));
9
+ var _async = _interopRequireDefault(require("@atlaskit/react-select/async"));
10
10
  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.4.2";
15
- var SelectWithoutAnalytics = exports.SelectWithoutAnalytics = (0, _createSelect.default)(_reactSelect.default);
14
+ var packageVersion = "18.5.0";
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)({
18
18
  componentName: 'select',
@@ -95,7 +95,8 @@ function createSelect(WrappedComponent) {
95
95
  }
96
96
  }, ariaLiveMessages) : _objectSpread({}, ariaLiveMessages),
97
97
  tabSelectsValue: tabSelectsValue,
98
- onClickPreventDefault: onClickPreventDefault
98
+ onClickPreventDefault: onClickPreventDefault,
99
+ isInvalid: isInvalid
99
100
  }, restProps, {
100
101
  components: components
101
102
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
@@ -105,6 +106,10 @@ function createSelect(WrappedComponent) {
105
106
  (0, _styles.default)(
106
107
  // This will cover both props for invalid state while giving priority to isInvalid. When cleaning up validationState, we can just keep the inner condition.
107
108
  typeof isInvalid !== 'undefined' ? isInvalid ? 'error' : 'default' : validationState, isCompact, appearance || 'default'), styles)
109
+ // indicates react-select to be async by default using the base Select component
110
+ // so that makers can pass all async props on the base select to async load options.
111
+ ,
112
+ isAsync: true
108
113
  }));
109
114
  });
110
115
  AtlaskitSelect.displayName = 'AtlaskitSelect';
@@ -1,10 +1,10 @@
1
1
  /* eslint-disable @repo/internal/react/require-jsdoc */
2
2
  import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
3
- import ReactSelect from '@atlaskit/react-select';
3
+ import AsyncSelect from '@atlaskit/react-select/async';
4
4
  import createSelect from './createSelect';
5
5
  const packageName = "@atlaskit/select";
6
- const packageVersion = "18.4.2";
7
- export const SelectWithoutAnalytics = createSelect(ReactSelect);
6
+ const packageVersion = "18.5.0";
7
+ export const SelectWithoutAnalytics = createSelect(AsyncSelect);
8
8
  const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
9
9
  const Select = withAnalyticsContext({
10
10
  componentName: 'select',
@@ -77,7 +77,8 @@ export default function createSelect(WrappedComponent) {
77
77
  ...ariaLiveMessages
78
78
  },
79
79
  tabSelectsValue: tabSelectsValue,
80
- onClickPreventDefault: onClickPreventDefault
80
+ onClickPreventDefault: onClickPreventDefault,
81
+ isInvalid: isInvalid
81
82
  }, restProps, {
82
83
  components: components
83
84
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
@@ -87,6 +88,10 @@ export default function createSelect(WrappedComponent) {
87
88
  baseStyles(
88
89
  // This will cover both props for invalid state while giving priority to isInvalid. When cleaning up validationState, we can just keep the inner condition.
89
90
  typeof isInvalid !== 'undefined' ? isInvalid ? 'error' : 'default' : validationState, isCompact, appearance || 'default'), styles)
91
+ // indicates react-select to be async by default using the base Select component
92
+ // so that makers can pass all async props on the base select to async load options.
93
+ ,
94
+ isAsync: true
90
95
  }));
91
96
  });
92
97
  AtlaskitSelect.displayName = 'AtlaskitSelect';
@@ -1,10 +1,10 @@
1
1
  /* eslint-disable @repo/internal/react/require-jsdoc */
2
2
  import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
3
- import ReactSelect from '@atlaskit/react-select';
3
+ import AsyncSelect from '@atlaskit/react-select/async';
4
4
  import createSelect from './createSelect';
5
5
  var packageName = "@atlaskit/select";
6
- var packageVersion = "18.4.2";
7
- export var SelectWithoutAnalytics = createSelect(ReactSelect);
6
+ var packageVersion = "18.5.0";
7
+ export var SelectWithoutAnalytics = createSelect(AsyncSelect);
8
8
  var createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
9
9
  var Select = withAnalyticsContext({
10
10
  componentName: 'select',
@@ -86,7 +86,8 @@ export default function createSelect(WrappedComponent) {
86
86
  }
87
87
  }, ariaLiveMessages) : _objectSpread({}, ariaLiveMessages),
88
88
  tabSelectsValue: tabSelectsValue,
89
- onClickPreventDefault: onClickPreventDefault
89
+ onClickPreventDefault: onClickPreventDefault,
90
+ isInvalid: isInvalid
90
91
  }, restProps, {
91
92
  components: components
92
93
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
@@ -96,6 +97,10 @@ export default function createSelect(WrappedComponent) {
96
97
  baseStyles(
97
98
  // This will cover both props for invalid state while giving priority to isInvalid. When cleaning up validationState, we can just keep the inner condition.
98
99
  typeof isInvalid !== 'undefined' ? isInvalid ? 'error' : 'default' : validationState, isCompact, appearance || 'default'), styles)
100
+ // indicates react-select to be async by default using the base Select component
101
+ // so that makers can pass all async props on the base select to async load options.
102
+ ,
103
+ isAsync: true
99
104
  }));
100
105
  });
101
106
  AtlaskitSelect.displayName = 'AtlaskitSelect';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/select",
3
- "version": "18.4.2",
3
+ "version": "18.5.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/"
@@ -43,10 +43,10 @@
43
43
  "@atlaskit/icon": "^22.24.0",
44
44
  "@atlaskit/platform-feature-flags": "^0.3.0",
45
45
  "@atlaskit/primitives": "^13.0.0",
46
- "@atlaskit/react-select": "^1.2.0",
46
+ "@atlaskit/react-select": "^1.3.0",
47
47
  "@atlaskit/spinner": "^16.3.0",
48
48
  "@atlaskit/theme": "^14.0.0",
49
- "@atlaskit/tokens": "^2.0.0",
49
+ "@atlaskit/tokens": "^2.2.0",
50
50
  "@atlaskit/visually-hidden": "^1.5.0",
51
51
  "@babel/runtime": "^7.0.0",
52
52
  "@emotion/react": "^11.7.1",