@atlaskit/select 17.10.2 → 17.10.4

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 (42) hide show
  1. package/CHANGELOG.md +15 -1
  2. package/README.md +2 -1
  3. package/__perf__/default.tsx +8 -8
  4. package/codemods/13.0.0-popper-props.ts +76 -89
  5. package/codemods/__tests__/13.0.0-popper-props.ts +51 -51
  6. package/codemods/utils/helpers.ts +250 -261
  7. package/dist/cjs/CountrySelect.js +2 -0
  8. package/dist/cjs/PopupSelect/PopupSelect.js +3 -1
  9. package/dist/cjs/PopupSelect/components.js +1 -0
  10. package/dist/cjs/Select.js +1 -1
  11. package/dist/cjs/components/index.js +1 -0
  12. package/dist/cjs/components/indicators.js +2 -1
  13. package/dist/cjs/components/input-options.js +2 -2
  14. package/dist/cjs/createSelect.js +6 -2
  15. package/dist/es2019/CountrySelect.js +1 -0
  16. package/dist/es2019/PopupSelect/PopupSelect.js +3 -1
  17. package/dist/es2019/PopupSelect/components.js +1 -0
  18. package/dist/es2019/Select.js +1 -1
  19. package/dist/es2019/components/index.js +1 -0
  20. package/dist/es2019/components/indicators.js +2 -0
  21. package/dist/es2019/components/input-options.js +4 -1
  22. package/dist/es2019/createSelect.js +6 -2
  23. package/dist/esm/CountrySelect.js +1 -0
  24. package/dist/esm/PopupSelect/PopupSelect.js +3 -1
  25. package/dist/esm/PopupSelect/components.js +1 -0
  26. package/dist/esm/Select.js +1 -1
  27. package/dist/esm/components/index.js +1 -0
  28. package/dist/esm/components/indicators.js +2 -0
  29. package/dist/esm/components/input-options.js +2 -1
  30. package/dist/esm/createSelect.js +6 -2
  31. package/dist/types/PopupSelect/PopupSelect.d.ts +19 -21
  32. package/dist/types/components/index.d.ts +1 -1
  33. package/dist/types/extract-react-types/react-popper-props.d.ts +4 -4
  34. package/dist/types/extract-react-types/react-select-props.d.ts +10 -10
  35. package/dist/types/types.d.ts +7 -7
  36. package/dist/types-ts4.5/PopupSelect/PopupSelect.d.ts +19 -21
  37. package/dist/types-ts4.5/components/index.d.ts +1 -1
  38. package/dist/types-ts4.5/extract-react-types/react-popper-props.d.ts +4 -4
  39. package/dist/types-ts4.5/extract-react-types/react-select-props.d.ts +10 -10
  40. package/dist/types-ts4.5/types.d.ts +7 -7
  41. package/package.json +116 -116
  42. package/report.api.md +971 -1125
@@ -24,7 +24,7 @@ var _excluded = ["getStyles", "Icon", "children", "innerProps", "innerRef"];
24
24
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
25
25
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
26
26
  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; }
27
- 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; } /** @jsx jsx */
27
+ 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; } /** @jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
28
28
  var getPrimitiveStyles = function getPrimitiveStyles(props) {
29
29
  var cx = props.cx,
30
30
  className = props.className,
@@ -134,7 +134,7 @@ var baseIconStyles = (0, _react.css)({
134
134
  // Here we are adding a border to the Checkbox and Radio SVG icons
135
135
  // This is an a11y fix for Select only for now but it may be rolled
136
136
  // into the `@atlaskit/icon` package's Checkbox and Radio SVGs later
137
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
137
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
138
138
  '& svg rect, & svg circle:first-of-type': {
139
139
  strokeWidth: "var(--ds-border-width, 1px)",
140
140
  strokeLinejoin: 'round'
@@ -95,8 +95,12 @@ function createSelect(WrappedComponent) {
95
95
  tabSelectsValue: tabSelectsValue,
96
96
  onClickPreventDefault: onClickPreventDefault
97
97
  }, restProps, {
98
- components: components,
99
- styles: (0, _reactSelect.mergeStyles)((0, _styles.default)(
98
+ components: components
99
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
100
+ ,
101
+ styles: (0, _reactSelect.mergeStyles)(
102
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
103
+ (0, _styles.default)(
100
104
  // This will cover both props for invalid state while giving priority to isInvalid. When cleaning up validationState, we can just keep the inner condition.
101
105
  typeof isInvalid !== 'undefined' ? isInvalid ? 'error' : 'default' : validationState, isCompact, appearance || 'default'), styles)
102
106
  }));
@@ -1,6 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  /** @jsx jsx */
3
3
 
4
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
5
  import { jsx, css } from '@emotion/react';
5
6
  import { groupedCountries } from './data/countries';
6
7
  import Select from './Select';
@@ -346,7 +346,9 @@ export default class PopupSelect extends PureComponent {
346
346
  getBooleanFF('platform.design-system-team.popup-select-close_8h15h') && this.close();
347
347
  (_props$onMenuClose = props.onMenuClose) === null || _props$onMenuClose === void 0 ? void 0 : _props$onMenuClose.call(props);
348
348
  },
349
- isSearchable: showSearchControl,
349
+ isSearchable: showSearchControl
350
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
351
+ ,
350
352
  styles: mergeStyles(this.defaultStyles, props.styles || {}),
351
353
  maxMenuHeight: this.getMaxHeight(),
352
354
  components: selectComponents,
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  /** @jsx jsx */
3
3
 
4
4
  import { components } from 'react-select';
5
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
5
6
  import { css, jsx } from '@emotion/react';
6
7
  import VisuallyHidden from '@atlaskit/visually-hidden';
7
8
  import SearchIcon from '@atlaskit/icon/glyph/editor/search';
@@ -2,7 +2,7 @@ import ReactSelect from 'react-select';
2
2
  import { withAnalyticsEvents, withAnalyticsContext, createAndFireEvent } from '@atlaskit/analytics-next';
3
3
  import createSelect from './createSelect';
4
4
  const packageName = "@atlaskit/select";
5
- const packageVersion = "17.10.2";
5
+ const packageVersion = "17.10.4";
6
6
  export const SelectWithoutAnalytics = createSelect(ReactSelect);
7
7
  const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
8
8
  const Select = withAnalyticsContext({
@@ -1,4 +1,5 @@
1
1
  /** @jsx jsx */
2
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
3
  import { jsx, css } from '@emotion/react';
3
4
  import SelectClearIcon from '@atlaskit/icon/glyph/select-clear';
4
5
  import { components } from 'react-select';
@@ -1,5 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  /** @jsx jsx */
3
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
4
  import { jsx, css } from '@emotion/react';
4
5
  import { components } from 'react-select';
5
6
  import { Pressable, xcss } from '@atlaskit/primitives';
@@ -28,6 +29,7 @@ export const DropdownIndicator = props => jsx(components.DropdownIndicator, prop
28
29
  label: "open"
29
30
  }));
30
31
  export const LoadingIndicator = props => {
32
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
31
33
  const loadingStyles = css(props.getStyles('loadingIndicator', props));
32
34
  return (
33
35
  // This *must* be constructed this way because this is being consumed by
@@ -1,6 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  /** @jsx jsx */
4
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
5
  import { css, jsx } from '@emotion/react';
5
6
  import { Component } from 'react';
6
7
  import RadioIcon from '@atlaskit/icon/glyph/radio';
@@ -34,7 +35,9 @@ const getPrimitiveStyles = props => {
34
35
  }
35
36
  };
36
37
  const augmentedStyles = css({
38
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
37
39
  ...getStyles('option', props),
40
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
38
41
  ...baseStyles
39
42
  });
40
43
  const bemClasses = {
@@ -123,7 +126,7 @@ const baseIconStyles = css({
123
126
  // Here we are adding a border to the Checkbox and Radio SVG icons
124
127
  // This is an a11y fix for Select only for now but it may be rolled
125
128
  // into the `@atlaskit/icon` package's Checkbox and Radio SVGs later
126
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
129
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
127
130
  '& svg rect, & svg circle:first-of-type': {
128
131
  strokeWidth: "var(--ds-border-width, 1px)",
129
132
  strokeLinejoin: 'round'
@@ -78,8 +78,12 @@ export default function createSelect(WrappedComponent) {
78
78
  tabSelectsValue: tabSelectsValue,
79
79
  onClickPreventDefault: onClickPreventDefault
80
80
  }, restProps, {
81
- components: components,
82
- styles: mergeStyles(baseStyles(
81
+ components: components
82
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
83
+ ,
84
+ styles: mergeStyles(
85
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
86
+ baseStyles(
83
87
  // This will cover both props for invalid state while giving priority to isInvalid. When cleaning up validationState, we can just keep the inner condition.
84
88
  typeof isInvalid !== 'undefined' ? isInvalid ? 'error' : 'default' : validationState, isCompact, appearance || 'default'), styles)
85
89
  }));
@@ -1,6 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  /** @jsx jsx */
3
3
 
4
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
5
  import { jsx, css } from '@emotion/react';
5
6
  import { groupedCountries } from './data/countries';
6
7
  import Select from './Select';
@@ -360,7 +360,9 @@ var PopupSelect = /*#__PURE__*/function (_PureComponent) {
360
360
  getBooleanFF('platform.design-system-team.popup-select-close_8h15h') && _this.close();
361
361
  (_props$onMenuClose = props.onMenuClose) === null || _props$onMenuClose === void 0 || _props$onMenuClose.call(props);
362
362
  },
363
- isSearchable: showSearchControl,
363
+ isSearchable: showSearchControl
364
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
365
+ ,
364
366
  styles: mergeStyles(_this.defaultStyles, props.styles || {}),
365
367
  maxMenuHeight: _this.getMaxHeight(),
366
368
  components: selectComponents,
@@ -4,6 +4,7 @@ var _excluded = ["innerRef", "innerProps"];
4
4
  /** @jsx jsx */
5
5
 
6
6
  import { components } from 'react-select';
7
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
8
  import { css, jsx } from '@emotion/react';
8
9
  import VisuallyHidden from '@atlaskit/visually-hidden';
9
10
  import SearchIcon from '@atlaskit/icon/glyph/editor/search';
@@ -2,7 +2,7 @@ import ReactSelect from 'react-select';
2
2
  import { withAnalyticsEvents, withAnalyticsContext, createAndFireEvent } from '@atlaskit/analytics-next';
3
3
  import createSelect from './createSelect';
4
4
  var packageName = "@atlaskit/select";
5
- var packageVersion = "17.10.2";
5
+ var packageVersion = "17.10.4";
6
6
  export var SelectWithoutAnalytics = createSelect(ReactSelect);
7
7
  var createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
8
8
  var Select = withAnalyticsContext({
@@ -1,4 +1,5 @@
1
1
  /** @jsx jsx */
2
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
3
  import { jsx, css } from '@emotion/react';
3
4
  import SelectClearIcon from '@atlaskit/icon/glyph/select-clear';
4
5
  import { components } from 'react-select';
@@ -3,6 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  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; }
4
4
  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; }
5
5
  /** @jsx jsx */
6
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
7
  import { jsx, css } from '@emotion/react';
7
8
  import { components } from 'react-select';
8
9
  import { Pressable, xcss } from '@atlaskit/primitives';
@@ -34,6 +35,7 @@ export var DropdownIndicator = function DropdownIndicator(props) {
34
35
  }));
35
36
  };
36
37
  export var LoadingIndicator = function LoadingIndicator(props) {
38
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
37
39
  var loadingStyles = css(props.getStyles('loadingIndicator', props));
38
40
  return (
39
41
  // This *must* be constructed this way because this is being consumed by
@@ -14,6 +14,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
14
14
  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; }
15
15
  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; }
16
16
  /** @jsx jsx */
17
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
17
18
  import { css, jsx } from '@emotion/react';
18
19
  import { Component } from 'react';
19
20
  import RadioIcon from '@atlaskit/icon/glyph/radio';
@@ -128,7 +129,7 @@ var baseIconStyles = css({
128
129
  // Here we are adding a border to the Checkbox and Radio SVG icons
129
130
  // This is an a11y fix for Select only for now but it may be rolled
130
131
  // into the `@atlaskit/icon` package's Checkbox and Radio SVGs later
131
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
132
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
132
133
  '& svg rect, & svg circle:first-of-type': {
133
134
  strokeWidth: "var(--ds-border-width, 1px)",
134
135
  strokeLinejoin: 'round'
@@ -85,8 +85,12 @@ export default function createSelect(WrappedComponent) {
85
85
  tabSelectsValue: tabSelectsValue,
86
86
  onClickPreventDefault: onClickPreventDefault
87
87
  }, restProps, {
88
- components: components,
89
- styles: mergeStyles(baseStyles(
88
+ components: components
89
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
90
+ ,
91
+ styles: mergeStyles(
92
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
93
+ baseStyles(
90
94
  // This will cover both props for invalid state while giving priority to isInvalid. When cleaning up validationState, we can just keep the inner condition.
91
95
  typeof isInvalid !== 'undefined' ? isInvalid ? 'error' : 'default' : validationState, isCompact, appearance || 'default'), styles)
92
96
  }));
@@ -22,12 +22,12 @@ export interface PopupSelectProps<Option = OptionType, IsMulti extends boolean =
22
22
  */
23
23
  footer?: ReactNode;
24
24
  /**
25
- The props passed down to React Popper.
26
-
27
- Use these to override the default positioning strategy, behaviour and placement used by this library.
28
- For more information, see the Popper Props section below, or [React Popper documentation](https://popper.js.org/react-popper/v2/render-props).
29
-
30
- */
25
+ The props passed down to React Popper.
26
+
27
+ Use these to override the default positioning strategy, behaviour and placement used by this library.
28
+ For more information, see the Popper Props section below, or [React Popper documentation](https://popper.js.org/react-popper/v2/render-props).
29
+
30
+ */
31
31
  popperProps?: PopperPropsNoChildren<Modifiers>;
32
32
  /**
33
33
  * The maximum number of options the select can contain without rendering the search field. The default is `5`.
@@ -49,18 +49,18 @@ export interface PopupSelectProps<Option = OptionType, IsMulti extends boolean =
49
49
  */
50
50
  minMenuWidth?: number | string;
51
51
  /**
52
- Render props used to anchor the popup to your content.
53
-
54
- Make this an interactive element, such as an @atlaskit/button component.
55
-
56
- The provided render props in `options` are detailed below:
57
- - `isOpen`: The current state of the popup.
58
- Use this to change the appearance of your target based on the state of your component
59
- - `ref`: Pass this ref to the element the Popup should be attached to
60
- - `onKeyDown`: Pass this keydown handler to the element to allow keyboard users to access the element.
61
- - `aria-haspopup`, `aria-expanded`, `aria-controls`: Spread these onto a target element to
62
- ensure your experience is accessible
63
- */
52
+ Render props used to anchor the popup to your content.
53
+
54
+ Make this an interactive element, such as an @atlaskit/button component.
55
+
56
+ The provided render props in `options` are detailed below:
57
+ - `isOpen`: The current state of the popup.
58
+ Use this to change the appearance of your target based on the state of your component
59
+ - `ref`: Pass this ref to the element the Popup should be attached to
60
+ - `onKeyDown`: Pass this keydown handler to the element to allow keyboard users to access the element.
61
+ - `aria-haspopup`, `aria-expanded`, `aria-controls`: Spread these onto a target element to
62
+ ensure your experience is accessible
63
+ */
64
64
  target?: (options: PopupSelectTriggerProps & {
65
65
  isOpen: boolean;
66
66
  }) => ReactNode;
@@ -97,9 +97,7 @@ export default class PopupSelect<Option = OptionType, IsMulti extends boolean =
97
97
  isOpen: boolean;
98
98
  mergedComponents: {
99
99
  Control: React.FC<import("../types").ControlProps<OptionType, boolean>>;
100
- DropdownIndicator: () => import("@emotion/react").jsx.JSX.Element; /**
101
- * The maximum number of options the select can contain without rendering the search field. The default is `5`.
102
- */
100
+ DropdownIndicator: () => import("@emotion/react").jsx.JSX.Element;
103
101
  Menu: ({ children, innerProps }: import("../types").MenuProps<OptionType, boolean>) => import("@emotion/react").jsx.JSX.Element;
104
102
  };
105
103
  mergedPopperProps: PopperPropsNoChildren<string>;
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { jsx } from '@emotion/react';
3
3
  import { type MultiValueRemoveProps } from '../types';
4
- export { ClearIndicator, DropdownIndicator, LoadingIndicator, } from './indicators';
4
+ export { ClearIndicator, DropdownIndicator, LoadingIndicator } from './indicators';
5
5
  export declare const MultiValueRemove: (props: MultiValueRemoveProps<any>) => jsx.JSX.Element;
6
6
  export declare const IndicatorSeparator: null;
@@ -6,15 +6,15 @@ interface NativeReactPopperProps<Name = unknown> {
6
6
  /** Function `(?HTMLElement) => void` that can be used to obtain popper reference */
7
7
  innerRef?: React.Ref<any>;
8
8
  /** One of the accepted placement values listed in the Popper.js documentation.
9
- Your popper is going to be placed according to the value of this property.
10
- Defaults to bottom.*/
9
+ Your popper is going to be placed according to the value of this property.
10
+ Defaults to bottom.*/
11
11
  placement?: Placement;
12
12
  /** Describes the positioning strategy to use. By default, it is absolute, which in the simplest cases does not
13
13
  * require repositioning of the popper. If your reference element is in a fixed container, use the fixed strategy. */
14
14
  strategy: Strategy;
15
15
  /** An object containing custom settings for the Popper.js modifiers.
16
- You can use this property to override their settings or to inject your custom ones.
17
- See [Popper Modifiers](https://popper.js.org/docs/v2/modifiers/) for full details. */
16
+ You can use this property to override their settings or to inject your custom ones.
17
+ See [Popper Modifiers](https://popper.js.org/docs/v2/modifiers/) for full details. */
18
18
  modifiers?: ReadonlyArray<Modifier<Name, Options>>;
19
19
  }
20
20
  export default function ertHackForPopper(_: NativeReactPopperProps): void;
@@ -32,10 +32,10 @@ interface NativeReactSelectProps<Option = unknown, IsMulti extends boolean = fal
32
32
  closeMenuOnSelect?: boolean;
33
33
  closeMenuOnScroll?: boolean | EventListener;
34
34
  /**
35
- This complex object includes all the compositional components that are used in `react-select`. If you wish to overwrite a component, pass in an object with the appropriate namespace.
36
-
37
- If you only wish to restyle a component, we recommend using the `styles` prop instead. For a list of the components that can be passed in, and the shape that will be passed to them, see [the components docs](/components).
38
- */
35
+ This complex object includes all the compositional components that are used in `react-select`. If you wish to overwrite a component, pass in an object with the appropriate namespace.
36
+
37
+ If you only wish to restyle a component, we recommend using the `styles` prop instead. For a list of the components that can be passed in, and the shape that will be passed to them, see [the components docs](/components).
38
+ */
39
39
  components?: SelectComponentsConfig<Option, IsMulti, Group>;
40
40
  /** Whether the value of the select, e.g. SingleValue, should be displayed in the control. */
41
41
  controlShouldRenderValue?: boolean;
@@ -50,10 +50,10 @@ interface NativeReactSelectProps<Option = unknown, IsMulti extends boolean = fal
50
50
  /** Formats option labels in the menu and control as React components. */
51
51
  formatOptionLabel?: (data?: Option, formatOptionLabelMeta?: FormatOptionLabelMeta<Option>) => ReactNode;
52
52
  /**
53
- Resolves option data to a string to be displayed as the label by components.
54
-
55
- Note: Failure to resolve to a string type can interfere with filtering and assistive technology support.
56
- */
53
+ Resolves option data to a string to be displayed as the label by components.
54
+
55
+ Note: Failure to resolve to a string type can interfere with filtering and assistive technology support.
56
+ */
57
57
  getOptionLabel?: GetOptionLabel<Option>;
58
58
  /** Resolves option data to a string to compare options and specify value attributes. */
59
59
  getOptionValue?: GetOptionValue<Option>;
@@ -75,8 +75,8 @@ interface NativeReactSelectProps<Option = unknown, IsMulti extends boolean = fal
75
75
  /** Sets whether the select is in a state of loading (async). */
76
76
  isLoading?: boolean;
77
77
  /**
78
- Override the built-in logic to detect whether an option is disabled.
79
- */
78
+ Override the built-in logic to detect whether an option is disabled.
79
+ */
80
80
  isOptionDisabled?: (option?: Option, selectValue?: Options<Option>) => boolean;
81
81
  /** Override the built-in logic to detect whether an option is selected. */
82
82
  isOptionSelected?: (option?: Option, selectValue?: Options<Option>) => boolean;
@@ -30,12 +30,12 @@ interface CustomSelectProps extends WithAnalyticsEventsProps {
30
30
  /** This prop affects the backgroundColor and border of the Select field. 'subtle' makes these transparent while 'none' prevents all field styling. Take care when using the none appearance as this doesn't include accessible interactions. */
31
31
  appearance?: 'default' | 'subtle' | 'none';
32
32
  /**
33
- A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests.
34
-
35
- **WARNING:** This prop is currently broken and a test ID will not be added to select.
36
- Please refer to the [select testing page](https://atlassian.design/components/select/testing)
37
- for guidance on alternatives to identifying select in tests.
38
- */
33
+ A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests.
34
+
35
+ **WARNING:** This prop is currently broken and a test ID will not be added to select.
36
+ Please refer to the [select testing page](https://atlassian.design/components/select/testing)
37
+ for guidance on alternatives to identifying select in tests.
38
+ */
39
39
  testId?: string;
40
40
  /** This prop indicates if the component is in an error state */
41
41
  isInvalid?: boolean;
@@ -65,7 +65,7 @@ export type AtlaskitSelectRefType = {
65
65
  focus: () => void;
66
66
  };
67
67
  export type { SelectInstance, FormatOptionLabelMeta, InputActionMeta, GroupType, InputProps, MultiValueProps, ReactSelectProps, SingleValueProps, ClearIndicatorProps, DropdownIndicatorProps, IndicatorSeparatorProps, LoadingIndicatorProps, NoticeProps, MultiValueRemoveProps, };
68
- declare module 'react-select/dist/declarations/src/Select' {
68
+ declare module 'react-select/base' {
69
69
  interface Props<Option, IsMulti extends boolean, Group extends GroupType<Option>> {
70
70
  [key: string]: any;
71
71
  }
@@ -22,12 +22,12 @@ export interface PopupSelectProps<Option = OptionType, IsMulti extends boolean =
22
22
  */
23
23
  footer?: ReactNode;
24
24
  /**
25
- The props passed down to React Popper.
26
-
27
- Use these to override the default positioning strategy, behaviour and placement used by this library.
28
- For more information, see the Popper Props section below, or [React Popper documentation](https://popper.js.org/react-popper/v2/render-props).
29
-
30
- */
25
+ The props passed down to React Popper.
26
+
27
+ Use these to override the default positioning strategy, behaviour and placement used by this library.
28
+ For more information, see the Popper Props section below, or [React Popper documentation](https://popper.js.org/react-popper/v2/render-props).
29
+
30
+ */
31
31
  popperProps?: PopperPropsNoChildren<Modifiers>;
32
32
  /**
33
33
  * The maximum number of options the select can contain without rendering the search field. The default is `5`.
@@ -49,18 +49,18 @@ export interface PopupSelectProps<Option = OptionType, IsMulti extends boolean =
49
49
  */
50
50
  minMenuWidth?: number | string;
51
51
  /**
52
- Render props used to anchor the popup to your content.
53
-
54
- Make this an interactive element, such as an @atlaskit/button component.
55
-
56
- The provided render props in `options` are detailed below:
57
- - `isOpen`: The current state of the popup.
58
- Use this to change the appearance of your target based on the state of your component
59
- - `ref`: Pass this ref to the element the Popup should be attached to
60
- - `onKeyDown`: Pass this keydown handler to the element to allow keyboard users to access the element.
61
- - `aria-haspopup`, `aria-expanded`, `aria-controls`: Spread these onto a target element to
62
- ensure your experience is accessible
63
- */
52
+ Render props used to anchor the popup to your content.
53
+
54
+ Make this an interactive element, such as an @atlaskit/button component.
55
+
56
+ The provided render props in `options` are detailed below:
57
+ - `isOpen`: The current state of the popup.
58
+ Use this to change the appearance of your target based on the state of your component
59
+ - `ref`: Pass this ref to the element the Popup should be attached to
60
+ - `onKeyDown`: Pass this keydown handler to the element to allow keyboard users to access the element.
61
+ - `aria-haspopup`, `aria-expanded`, `aria-controls`: Spread these onto a target element to
62
+ ensure your experience is accessible
63
+ */
64
64
  target?: (options: PopupSelectTriggerProps & {
65
65
  isOpen: boolean;
66
66
  }) => ReactNode;
@@ -97,9 +97,7 @@ export default class PopupSelect<Option = OptionType, IsMulti extends boolean =
97
97
  isOpen: boolean;
98
98
  mergedComponents: {
99
99
  Control: React.FC<import("../types").ControlProps<OptionType, boolean>>;
100
- DropdownIndicator: () => import("@emotion/react").jsx.JSX.Element; /**
101
- * The maximum number of options the select can contain without rendering the search field. The default is `5`.
102
- */
100
+ DropdownIndicator: () => import("@emotion/react").jsx.JSX.Element;
103
101
  Menu: ({ children, innerProps }: import("../types").MenuProps<OptionType, boolean>) => import("@emotion/react").jsx.JSX.Element;
104
102
  };
105
103
  mergedPopperProps: PopperPropsNoChildren<string>;
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { jsx } from '@emotion/react';
3
3
  import { type MultiValueRemoveProps } from '../types';
4
- export { ClearIndicator, DropdownIndicator, LoadingIndicator, } from './indicators';
4
+ export { ClearIndicator, DropdownIndicator, LoadingIndicator } from './indicators';
5
5
  export declare const MultiValueRemove: (props: MultiValueRemoveProps<any>) => jsx.JSX.Element;
6
6
  export declare const IndicatorSeparator: null;
@@ -6,15 +6,15 @@ interface NativeReactPopperProps<Name = unknown> {
6
6
  /** Function `(?HTMLElement) => void` that can be used to obtain popper reference */
7
7
  innerRef?: React.Ref<any>;
8
8
  /** One of the accepted placement values listed in the Popper.js documentation.
9
- Your popper is going to be placed according to the value of this property.
10
- Defaults to bottom.*/
9
+ Your popper is going to be placed according to the value of this property.
10
+ Defaults to bottom.*/
11
11
  placement?: Placement;
12
12
  /** Describes the positioning strategy to use. By default, it is absolute, which in the simplest cases does not
13
13
  * require repositioning of the popper. If your reference element is in a fixed container, use the fixed strategy. */
14
14
  strategy: Strategy;
15
15
  /** An object containing custom settings for the Popper.js modifiers.
16
- You can use this property to override their settings or to inject your custom ones.
17
- See [Popper Modifiers](https://popper.js.org/docs/v2/modifiers/) for full details. */
16
+ You can use this property to override their settings or to inject your custom ones.
17
+ See [Popper Modifiers](https://popper.js.org/docs/v2/modifiers/) for full details. */
18
18
  modifiers?: ReadonlyArray<Modifier<Name, Options>>;
19
19
  }
20
20
  export default function ertHackForPopper(_: NativeReactPopperProps): void;
@@ -32,10 +32,10 @@ interface NativeReactSelectProps<Option = unknown, IsMulti extends boolean = fal
32
32
  closeMenuOnSelect?: boolean;
33
33
  closeMenuOnScroll?: boolean | EventListener;
34
34
  /**
35
- This complex object includes all the compositional components that are used in `react-select`. If you wish to overwrite a component, pass in an object with the appropriate namespace.
36
-
37
- If you only wish to restyle a component, we recommend using the `styles` prop instead. For a list of the components that can be passed in, and the shape that will be passed to them, see [the components docs](/components).
38
- */
35
+ This complex object includes all the compositional components that are used in `react-select`. If you wish to overwrite a component, pass in an object with the appropriate namespace.
36
+
37
+ If you only wish to restyle a component, we recommend using the `styles` prop instead. For a list of the components that can be passed in, and the shape that will be passed to them, see [the components docs](/components).
38
+ */
39
39
  components?: SelectComponentsConfig<Option, IsMulti, Group>;
40
40
  /** Whether the value of the select, e.g. SingleValue, should be displayed in the control. */
41
41
  controlShouldRenderValue?: boolean;
@@ -50,10 +50,10 @@ interface NativeReactSelectProps<Option = unknown, IsMulti extends boolean = fal
50
50
  /** Formats option labels in the menu and control as React components. */
51
51
  formatOptionLabel?: (data?: Option, formatOptionLabelMeta?: FormatOptionLabelMeta<Option>) => ReactNode;
52
52
  /**
53
- Resolves option data to a string to be displayed as the label by components.
54
-
55
- Note: Failure to resolve to a string type can interfere with filtering and assistive technology support.
56
- */
53
+ Resolves option data to a string to be displayed as the label by components.
54
+
55
+ Note: Failure to resolve to a string type can interfere with filtering and assistive technology support.
56
+ */
57
57
  getOptionLabel?: GetOptionLabel<Option>;
58
58
  /** Resolves option data to a string to compare options and specify value attributes. */
59
59
  getOptionValue?: GetOptionValue<Option>;
@@ -75,8 +75,8 @@ interface NativeReactSelectProps<Option = unknown, IsMulti extends boolean = fal
75
75
  /** Sets whether the select is in a state of loading (async). */
76
76
  isLoading?: boolean;
77
77
  /**
78
- Override the built-in logic to detect whether an option is disabled.
79
- */
78
+ Override the built-in logic to detect whether an option is disabled.
79
+ */
80
80
  isOptionDisabled?: (option?: Option, selectValue?: Options<Option>) => boolean;
81
81
  /** Override the built-in logic to detect whether an option is selected. */
82
82
  isOptionSelected?: (option?: Option, selectValue?: Options<Option>) => boolean;
@@ -30,12 +30,12 @@ interface CustomSelectProps extends WithAnalyticsEventsProps {
30
30
  /** This prop affects the backgroundColor and border of the Select field. 'subtle' makes these transparent while 'none' prevents all field styling. Take care when using the none appearance as this doesn't include accessible interactions. */
31
31
  appearance?: 'default' | 'subtle' | 'none';
32
32
  /**
33
- A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests.
34
-
35
- **WARNING:** This prop is currently broken and a test ID will not be added to select.
36
- Please refer to the [select testing page](https://atlassian.design/components/select/testing)
37
- for guidance on alternatives to identifying select in tests.
38
- */
33
+ A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests.
34
+
35
+ **WARNING:** This prop is currently broken and a test ID will not be added to select.
36
+ Please refer to the [select testing page](https://atlassian.design/components/select/testing)
37
+ for guidance on alternatives to identifying select in tests.
38
+ */
39
39
  testId?: string;
40
40
  /** This prop indicates if the component is in an error state */
41
41
  isInvalid?: boolean;
@@ -65,7 +65,7 @@ export type AtlaskitSelectRefType = {
65
65
  focus: () => void;
66
66
  };
67
67
  export type { SelectInstance, FormatOptionLabelMeta, InputActionMeta, GroupType, InputProps, MultiValueProps, ReactSelectProps, SingleValueProps, ClearIndicatorProps, DropdownIndicatorProps, IndicatorSeparatorProps, LoadingIndicatorProps, NoticeProps, MultiValueRemoveProps, };
68
- declare module 'react-select/dist/declarations/src/Select' {
68
+ declare module 'react-select/base' {
69
69
  interface Props<Option, IsMulti extends boolean, Group extends GroupType<Option>> {
70
70
  [key: string]: any;
71
71
  }