@atlaskit/react-select 2.7.5 → 3.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 (55) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/cjs/components/containers.js +6 -7
  3. package/dist/cjs/components/control.js +2 -4
  4. package/dist/cjs/components/group.js +4 -6
  5. package/dist/cjs/components/indicators.js +6 -8
  6. package/dist/cjs/components/input.js +2 -4
  7. package/dist/cjs/components/internal/a11y-text.js +1 -3
  8. package/dist/cjs/components/internal/dummy-input.js +1 -3
  9. package/dist/cjs/components/internal/required-input.js +1 -3
  10. package/dist/cjs/components/live-region.js +1 -3
  11. package/dist/cjs/components/menu.js +9 -11
  12. package/dist/cjs/components/multi-value.js +7 -12
  13. package/dist/cjs/components/option.js +2 -4
  14. package/dist/cjs/components/placeholder.js +2 -4
  15. package/dist/cjs/components/single-value.js +2 -4
  16. package/dist/cjs/emotion/components/containers.js +7 -3
  17. package/dist/cjs/emotion/components/menu.js +5 -2
  18. package/dist/cjs/select.js +1 -1
  19. package/dist/es2019/components/containers.js +6 -7
  20. package/dist/es2019/components/control.js +2 -4
  21. package/dist/es2019/components/group.js +4 -6
  22. package/dist/es2019/components/indicators.js +6 -8
  23. package/dist/es2019/components/input.js +2 -4
  24. package/dist/es2019/components/internal/a11y-text.js +1 -3
  25. package/dist/es2019/components/internal/dummy-input.js +1 -3
  26. package/dist/es2019/components/internal/required-input.js +1 -3
  27. package/dist/es2019/components/live-region.js +1 -3
  28. package/dist/es2019/components/menu.js +9 -11
  29. package/dist/es2019/components/multi-value.js +7 -12
  30. package/dist/es2019/components/option.js +2 -4
  31. package/dist/es2019/components/placeholder.js +2 -4
  32. package/dist/es2019/components/single-value.js +2 -4
  33. package/dist/es2019/emotion/components/containers.js +7 -3
  34. package/dist/es2019/emotion/components/menu.js +5 -2
  35. package/dist/es2019/select.js +1 -1
  36. package/dist/esm/components/containers.js +6 -7
  37. package/dist/esm/components/control.js +2 -4
  38. package/dist/esm/components/group.js +4 -6
  39. package/dist/esm/components/indicators.js +6 -8
  40. package/dist/esm/components/input.js +2 -4
  41. package/dist/esm/components/internal/a11y-text.js +1 -3
  42. package/dist/esm/components/internal/dummy-input.js +1 -3
  43. package/dist/esm/components/internal/required-input.js +1 -3
  44. package/dist/esm/components/live-region.js +1 -3
  45. package/dist/esm/components/menu.js +9 -11
  46. package/dist/esm/components/multi-value.js +7 -12
  47. package/dist/esm/components/option.js +2 -4
  48. package/dist/esm/components/placeholder.js +2 -4
  49. package/dist/esm/components/single-value.js +2 -4
  50. package/dist/esm/emotion/components/containers.js +7 -3
  51. package/dist/esm/emotion/components/menu.js +5 -2
  52. package/dist/esm/select.js +1 -1
  53. package/dist/types/select.d.ts +2 -4
  54. package/dist/types-ts4.5/select.d.ts +2 -4
  55. package/package.json +2 -2
@@ -1,13 +1,11 @@
1
1
  /* eslint-disable @repo/internal/react/no-unsafe-spread-props */
2
2
  import React from 'react';
3
- import { fg } from '@atlaskit/platform-feature-flags';
4
3
  import CompiledOption, { optionCSS as compiledOptionCSS } from '../compiled/components/option';
5
- import EmotionOption, { optionCSS as emotionOptionCSS } from '../emotion/components/option';
6
4
  export var optionCSS = function optionCSS(props) {
7
- return fg('compiled-react-select') ? compiledOptionCSS() : emotionOptionCSS(props);
5
+ return compiledOptionCSS();
8
6
  };
9
7
  var Option = function Option(props) {
10
- return fg('compiled-react-select') ? /*#__PURE__*/React.createElement(CompiledOption, props) : /*#__PURE__*/React.createElement(EmotionOption, props);
8
+ return /*#__PURE__*/React.createElement(CompiledOption, props);
11
9
  };
12
10
 
13
11
  // eslint-disable-next-line @repo/internal/react/require-jsdoc
@@ -1,13 +1,11 @@
1
1
  /* eslint-disable @repo/internal/react/no-unsafe-spread-props */
2
2
  import React from 'react';
3
- import { fg } from '@atlaskit/platform-feature-flags';
4
3
  import Compiled, { placeholderCSS as compiledPlaceholderCSS } from '../compiled/components/placeholder';
5
- import Emotion, { placeholderCSS as emotionPlaceholderCSS } from '../emotion/components/placeholder';
6
4
  export var placeholderCSS = function placeholderCSS(props) {
7
- return fg('compiled-react-select') ? compiledPlaceholderCSS() : emotionPlaceholderCSS(props);
5
+ return compiledPlaceholderCSS();
8
6
  };
9
7
  var Placeholder = function Placeholder(props) {
10
- return fg('compiled-react-select') ? /*#__PURE__*/React.createElement(Compiled, props) : /*#__PURE__*/React.createElement(Emotion, props);
8
+ return /*#__PURE__*/React.createElement(Compiled, props);
11
9
  };
12
10
 
13
11
  // eslint-disable-next-line @repo/internal/react/require-jsdoc
@@ -1,13 +1,11 @@
1
1
  /* eslint-disable @repo/internal/react/no-unsafe-spread-props */
2
2
  import React from 'react';
3
- import { fg } from '@atlaskit/platform-feature-flags';
4
3
  import Compiled, { css as compiledCSS } from '../compiled/components/single-value';
5
- import Emotion, { css as emotionCSS } from '../emotion/components/single-value';
6
4
  export var css = function css(props) {
7
- return fg('compiled-react-select') ? compiledCSS() : emotionCSS(props);
5
+ return compiledCSS();
8
6
  };
9
7
  var SingleValue = function SingleValue(props) {
10
- return fg('compiled-react-select') ? /*#__PURE__*/React.createElement(Compiled, props) : /*#__PURE__*/React.createElement(Emotion, props);
8
+ return /*#__PURE__*/React.createElement(Compiled, props);
11
9
  };
12
10
 
13
11
  // eslint-disable-next-line @repo/internal/react/require-jsdoc
@@ -36,10 +36,14 @@ export var SelectContainer = function SelectContainer(props) {
36
36
  innerProps = props.innerProps,
37
37
  isDisabled = props.isDisabled,
38
38
  isRtl = props.isRtl;
39
- return jsx("div", _extends({}, getStyleProps(props, 'container', {
39
+ var styles = getStyleProps(props, 'container', {
40
40
  '--is-disabled': isDisabled,
41
41
  '--is-rtl': isRtl
42
- }), innerProps), children);
42
+ });
43
+ return jsx("div", _extends({}, styles, {
44
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
45
+ className: styles.className || '-container'
46
+ }, innerProps), children);
43
47
  };
44
48
 
45
49
  // ==============================
@@ -78,7 +82,7 @@ export var ValueContainer = function ValueContainer(props) {
78
82
  css: styles.css
79
83
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
80
84
  ,
81
- className: styles.className || 'value-container'
85
+ className: styles.className || '-ValueContainer'
82
86
  }, innerProps), children);
83
87
  };
84
88
 
@@ -261,9 +261,12 @@ var Menu = function Menu(props) {
261
261
  var children = props.children,
262
262
  innerRef = props.innerRef,
263
263
  innerProps = props.innerProps;
264
- return jsx("div", _extends({}, getStyleProps(props, 'menu', {
264
+ var styles = getStyleProps(props, 'menu', {
265
265
  menu: true
266
- }), {
266
+ });
267
+ return jsx("div", _extends({}, styles, {
268
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
269
+ className: styles.className || '-menu',
267
270
  ref: innerRef
268
271
  }, innerProps), children);
269
272
  };
@@ -396,7 +396,7 @@ var Select = /*#__PURE__*/function (_Component) {
396
396
  if (!custom) {
397
397
  return base;
398
398
  }
399
- var customStyles = fg('compiled-react-select') ? filterUnsupportedSelectors(custom(base, props)) : custom(base, props);
399
+ var customStyles = filterUnsupportedSelectors(custom(base, props));
400
400
  return customStyles;
401
401
  });
402
402
  _defineProperty(_this, "getClassNames", function (key, props) {
@@ -119,11 +119,9 @@ export interface SelectProps<Option, IsMulti extends boolean, Group extends Grou
119
119
  /**
120
120
  * This complex object includes all the compositional components that are used
121
121
  * in `react-select`. If you wish to overwrite a component, pass in an object
122
- * with the appropriate namespace.
122
+ * with the appropriate namespace. If you wish to restyle a component, we recommend
123
+ * using this prop with the `xcss` prop.
123
124
  *
124
- * If you only wish to restyle a component, we recommend using the `styles` prop
125
- * instead. For a list of the components that can be passed in, and the shape
126
- * that will be passed to them, see [the components docs](/components)
127
125
  */
128
126
  components: SelectComponentsConfig<Option, IsMulti, Group>;
129
127
  /**
@@ -119,11 +119,9 @@ export interface SelectProps<Option, IsMulti extends boolean, Group extends Grou
119
119
  /**
120
120
  * This complex object includes all the compositional components that are used
121
121
  * in `react-select`. If you wish to overwrite a component, pass in an object
122
- * with the appropriate namespace.
122
+ * with the appropriate namespace. If you wish to restyle a component, we recommend
123
+ * using this prop with the `xcss` prop.
123
124
  *
124
- * If you only wish to restyle a component, we recommend using the `styles` prop
125
- * instead. For a list of the components that can be passed in, and the shape
126
- * that will be passed to them, see [the components docs](/components)
127
125
  */
128
126
  components: SelectComponentsConfig<Option, IsMulti, Group>;
129
127
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-select",
3
- "version": "2.7.5",
3
+ "version": "3.0.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,7 +30,7 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@atlaskit/ds-lib": "^4.0.0",
33
- "@atlaskit/icon": "^27.0.0",
33
+ "@atlaskit/icon": "^27.2.0",
34
34
  "@atlaskit/layering": "^3.0.0",
35
35
  "@atlaskit/platform-feature-flags": "^1.1.0",
36
36
  "@atlaskit/primitives": "^14.9.0",