@atlaskit/react-select 1.3.3 → 1.4.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 (59) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/components/containers.js +6 -8
  3. package/dist/cjs/components/control.js +6 -8
  4. package/dist/cjs/components/group.js +7 -10
  5. package/dist/cjs/components/indicators.js +12 -15
  6. package/dist/cjs/components/input.js +2 -2
  7. package/dist/cjs/components/menu.js +33 -41
  8. package/dist/cjs/components/multi-value.js +14 -16
  9. package/dist/cjs/components/option.js +6 -8
  10. package/dist/cjs/components/placeholder.js +6 -8
  11. package/dist/cjs/components/single-value.js +6 -8
  12. package/dist/cjs/select.js +2 -4
  13. package/dist/es2019/components/containers.js +2 -4
  14. package/dist/es2019/components/control.js +10 -12
  15. package/dist/es2019/components/group.js +10 -12
  16. package/dist/es2019/components/indicators.js +13 -19
  17. package/dist/es2019/components/input.js +5 -7
  18. package/dist/es2019/components/menu.js +12 -18
  19. package/dist/es2019/components/multi-value.js +19 -25
  20. package/dist/es2019/components/option.js +8 -10
  21. package/dist/es2019/components/placeholder.js +4 -6
  22. package/dist/es2019/components/single-value.js +4 -6
  23. package/dist/es2019/select.js +2 -6
  24. package/dist/esm/components/containers.js +4 -8
  25. package/dist/esm/components/control.js +4 -8
  26. package/dist/esm/components/group.js +6 -10
  27. package/dist/esm/components/indicators.js +12 -15
  28. package/dist/esm/components/input.js +2 -2
  29. package/dist/esm/components/menu.js +33 -41
  30. package/dist/esm/components/multi-value.js +14 -16
  31. package/dist/esm/components/option.js +4 -8
  32. package/dist/esm/components/placeholder.js +4 -8
  33. package/dist/esm/components/single-value.js +4 -8
  34. package/dist/esm/select.js +2 -4
  35. package/dist/types/components/containers.d.ts +1 -1
  36. package/dist/types/components/control.d.ts +1 -1
  37. package/dist/types/components/group.d.ts +2 -2
  38. package/dist/types/components/indicators.d.ts +4 -4
  39. package/dist/types/components/input.d.ts +1 -1
  40. package/dist/types/components/menu.d.ts +4 -4
  41. package/dist/types/components/multi-value.d.ts +3 -3
  42. package/dist/types/components/option.d.ts +1 -1
  43. package/dist/types/components/placeholder.d.ts +1 -1
  44. package/dist/types/components/single-value.d.ts +1 -1
  45. package/dist/types/select.d.ts +0 -6
  46. package/dist/types/styles.d.ts +1 -1
  47. package/dist/types-ts4.5/components/containers.d.ts +1 -1
  48. package/dist/types-ts4.5/components/control.d.ts +1 -1
  49. package/dist/types-ts4.5/components/group.d.ts +2 -2
  50. package/dist/types-ts4.5/components/indicators.d.ts +4 -4
  51. package/dist/types-ts4.5/components/input.d.ts +1 -1
  52. package/dist/types-ts4.5/components/menu.d.ts +4 -4
  53. package/dist/types-ts4.5/components/multi-value.d.ts +3 -3
  54. package/dist/types-ts4.5/components/option.d.ts +1 -1
  55. package/dist/types-ts4.5/components/placeholder.d.ts +1 -1
  56. package/dist/types-ts4.5/components/single-value.d.ts +1 -1
  57. package/dist/types-ts4.5/select.d.ts +0 -6
  58. package/dist/types-ts4.5/styles.d.ts +1 -1
  59. package/package.json +1 -1
@@ -14,7 +14,7 @@ export const css = ({
14
14
  borderRadius,
15
15
  spacing
16
16
  }
17
- }, unstyled) => ({
17
+ }) => ({
18
18
  label: 'control',
19
19
  alignItems: 'center',
20
20
  cursor: 'default',
@@ -25,17 +25,15 @@ export const css = ({
25
25
  outline: '0 !important',
26
26
  position: 'relative',
27
27
  transition: 'all 100ms',
28
- ...(unstyled ? {} : {
29
- backgroundColor: isDisabled ? colors.neutral5 : colors.neutral0,
30
- borderColor: isDisabled ? colors.neutral10 : isFocused ? colors.primary : colors.neutral20,
31
- borderRadius: borderRadius,
32
- borderStyle: 'solid',
33
- borderWidth: 1,
34
- boxShadow: isFocused ? `0 0 0 1px ${colors.primary}` : undefined,
35
- '&:hover': {
36
- borderColor: isFocused ? colors.primary : colors.neutral30
37
- }
38
- })
28
+ backgroundColor: isDisabled ? colors.neutral5 : colors.neutral0,
29
+ borderColor: isDisabled ? colors.neutral10 : isFocused ? colors.primary : colors.neutral20,
30
+ borderRadius: borderRadius,
31
+ borderStyle: 'solid',
32
+ borderWidth: 1,
33
+ boxShadow: isFocused ? `0 0 0 1px ${colors.primary}` : undefined,
34
+ '&:hover': {
35
+ borderColor: isFocused ? colors.primary : colors.neutral30
36
+ }
39
37
  });
40
38
  const Control = props => {
41
39
  const {
@@ -10,10 +10,10 @@ export const groupCSS = ({
10
10
  theme: {
11
11
  spacing
12
12
  }
13
- }, unstyled) => unstyled ? {} : {
13
+ }) => ({
14
14
  paddingBottom: spacing.baseUnit * 2,
15
15
  paddingTop: spacing.baseUnit * 2
16
- };
16
+ });
17
17
  const Group = props => {
18
18
  const {
19
19
  children,
@@ -44,19 +44,17 @@ export const groupHeadingCSS = ({
44
44
  colors,
45
45
  spacing
46
46
  }
47
- }, unstyled) => ({
47
+ }) => ({
48
48
  label: 'group',
49
49
  cursor: 'default',
50
50
  display: 'block',
51
- ...(unstyled ? {} : {
52
- color: colors.neutral40,
53
- fontSize: '75%',
54
- fontWeight: 500,
55
- marginBottom: '0.25em',
56
- paddingLeft: spacing.baseUnit * 3,
57
- paddingRight: spacing.baseUnit * 3,
58
- textTransform: 'uppercase'
59
- })
51
+ color: colors.neutral40,
52
+ fontSize: '75%',
53
+ fontWeight: 500,
54
+ marginBottom: '0.25em',
55
+ paddingLeft: spacing.baseUnit * 3,
56
+ paddingRight: spacing.baseUnit * 3,
57
+ textTransform: 'uppercase'
60
58
  });
61
59
 
62
60
  // eslint-disable-next-line @repo/internal/react/require-jsdoc
@@ -59,17 +59,15 @@ const baseCSS = ({
59
59
  },
60
60
  colors
61
61
  }
62
- }, unstyled) => ({
62
+ }) => ({
63
63
  label: 'indicatorContainer',
64
64
  display: 'flex',
65
65
  transition: 'color 150ms',
66
- ...(unstyled ? {} : {
67
- color: isFocused ? colors.neutral60 : colors.neutral20,
68
- padding: baseUnit * 2,
69
- ':hover': {
70
- color: isFocused ? colors.neutral80 : colors.neutral40
71
- }
72
- })
66
+ color: isFocused ? colors.neutral60 : colors.neutral20,
67
+ padding: baseUnit * 2,
68
+ ':hover': {
69
+ color: isFocused ? colors.neutral80 : colors.neutral40
70
+ }
73
71
  });
74
72
  export const dropdownIndicatorCSS = baseCSS;
75
73
 
@@ -110,15 +108,13 @@ export const indicatorSeparatorCSS = ({
110
108
  },
111
109
  colors
112
110
  }
113
- }, unstyled) => ({
111
+ }) => ({
114
112
  label: 'indicatorSeparator',
115
113
  alignSelf: 'stretch',
116
114
  width: 1,
117
- ...(unstyled ? {} : {
118
- backgroundColor: isDisabled ? colors.neutral10 : colors.neutral20,
119
- marginBottom: baseUnit * 2,
120
- marginTop: baseUnit * 2
121
- })
115
+ backgroundColor: isDisabled ? colors.neutral10 : colors.neutral20,
116
+ marginBottom: baseUnit * 2,
117
+ marginTop: baseUnit * 2
122
118
  });
123
119
 
124
120
  // eslint-disable-next-line @repo/internal/react/require-jsdoc
@@ -152,7 +148,7 @@ export const loadingIndicatorCSS = ({
152
148
  baseUnit
153
149
  }
154
150
  }
155
- }, unstyled) => ({
151
+ }) => ({
156
152
  label: 'loadingIndicator',
157
153
  display: 'flex',
158
154
  transition: 'color 150ms',
@@ -162,10 +158,8 @@ export const loadingIndicatorCSS = ({
162
158
  marginRight: size,
163
159
  textAlign: 'center',
164
160
  verticalAlign: 'middle',
165
- ...(unstyled ? {} : {
166
- color: isFocused ? colors.neutral60 : colors.neutral20,
167
- padding: baseUnit * 2
168
- })
161
+ color: isFocused ? colors.neutral60 : colors.neutral20,
162
+ padding: baseUnit * 2
169
163
  });
170
164
  const LoadingDot = ({
171
165
  delay,
@@ -13,18 +13,16 @@ export const inputCSS = ({
13
13
  spacing,
14
14
  colors
15
15
  }
16
- }, unstyled) => ({
16
+ }) => ({
17
17
  visibility: isDisabled ? 'hidden' : 'visible',
18
18
  // force css to recompute when value change due to @emotion bug.
19
19
  // We can remove it whenever the bug is fixed.
20
20
  transform: value ? 'translateZ(0)' : '',
21
21
  ...containerStyle,
22
- ...(unstyled ? {} : {
23
- margin: spacing.baseUnit / 2,
24
- paddingBottom: spacing.baseUnit / 2,
25
- paddingTop: spacing.baseUnit / 2,
26
- color: colors.neutral80
27
- })
22
+ margin: spacing.baseUnit / 2,
23
+ paddingBottom: spacing.baseUnit / 2,
24
+ paddingTop: spacing.baseUnit / 2,
25
+ color: colors.neutral80
28
26
  });
29
27
  const spacingStyle = {
30
28
  gridArea: '1 / 2',
@@ -194,19 +194,17 @@ export const menuCSS = ({
194
194
  spacing,
195
195
  colors
196
196
  }
197
- }, unstyled) => ({
197
+ }) => ({
198
198
  label: 'menu',
199
199
  [alignToControl(placement)]: '100%',
200
200
  position: 'absolute',
201
201
  width: '100%',
202
202
  zIndex: 1,
203
- ...(unstyled ? {} : {
204
- backgroundColor: colors.neutral0,
205
- borderRadius: borderRadius,
206
- boxShadow: '0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)',
207
- marginBottom: spacing.menuGutter,
208
- marginTop: spacing.menuGutter
209
- })
203
+ backgroundColor: colors.neutral0,
204
+ borderRadius: borderRadius,
205
+ boxShadow: '0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)',
206
+ marginBottom: spacing.menuGutter,
207
+ marginTop: spacing.menuGutter
210
208
  });
211
209
  const PortalPlacementContext = /*#__PURE__*/createContext(null);
212
210
 
@@ -289,16 +287,14 @@ export const menuListCSS = ({
289
287
  baseUnit
290
288
  }
291
289
  }
292
- }, unstyled) => ({
290
+ }) => ({
293
291
  maxHeight,
294
292
  overflowY: 'auto',
295
293
  position: 'relative',
296
294
  // required for offset[Height, Top] > keyboard scroll
297
295
  WebkitOverflowScrolling: 'touch',
298
- ...(unstyled ? {} : {
299
- paddingBottom: baseUnit,
300
- paddingTop: baseUnit
301
- })
296
+ paddingBottom: baseUnit,
297
+ paddingTop: baseUnit
302
298
  });
303
299
 
304
300
  // eslint-disable-next-line @repo/internal/react/require-jsdoc
@@ -330,12 +326,10 @@ const noticeCSS = ({
330
326
  },
331
327
  colors
332
328
  }
333
- }, unstyled) => ({
329
+ }) => ({
334
330
  textAlign: 'center',
335
- ...(unstyled ? {} : {
336
- color: colors.neutral40,
337
- padding: `${baseUnit * 2}px ${baseUnit * 3}px`
338
- })
331
+ color: colors.neutral40,
332
+ padding: `${baseUnit * 2}px ${baseUnit * 3}px`
339
333
  });
340
334
  export const noOptionsMessageCSS = noticeCSS;
341
335
  export const loadingMessageCSS = noticeCSS;
@@ -13,16 +13,14 @@ export const multiValueCSS = ({
13
13
  borderRadius,
14
14
  colors
15
15
  }
16
- }, unstyled) => ({
16
+ }) => ({
17
17
  label: 'multiValue',
18
18
  display: 'flex',
19
19
  minWidth: 0,
20
20
  // resolves flex/text-overflow bug
21
- ...(unstyled ? {} : {
22
- backgroundColor: colors.neutral10,
23
- borderRadius: borderRadius / 2,
24
- margin: spacing.baseUnit / 2
25
- })
21
+ backgroundColor: colors.neutral10,
22
+ borderRadius: borderRadius / 2,
23
+ margin: spacing.baseUnit / 2
26
24
  });
27
25
  export const multiValueLabelCSS = ({
28
26
  theme: {
@@ -30,17 +28,15 @@ export const multiValueLabelCSS = ({
30
28
  colors
31
29
  },
32
30
  cropWithEllipsis
33
- }, unstyled) => ({
31
+ }) => ({
34
32
  overflow: 'hidden',
35
33
  textOverflow: cropWithEllipsis || cropWithEllipsis === undefined ? 'ellipsis' : undefined,
36
34
  whiteSpace: 'nowrap',
37
- ...(unstyled ? {} : {
38
- borderRadius: borderRadius / 2,
39
- color: colors.neutral80,
40
- fontSize: '85%',
41
- padding: 3,
42
- paddingLeft: 6
43
- })
35
+ borderRadius: borderRadius / 2,
36
+ color: colors.neutral80,
37
+ fontSize: '85%',
38
+ padding: 3,
39
+ paddingLeft: 6
44
40
  });
45
41
  export const multiValueRemoveCSS = ({
46
42
  theme: {
@@ -49,19 +45,17 @@ export const multiValueRemoveCSS = ({
49
45
  colors
50
46
  },
51
47
  isFocused
52
- }, unstyled) => ({
48
+ }) => ({
53
49
  alignItems: 'center',
54
50
  display: 'flex',
55
- ...(unstyled ? {} : {
56
- borderRadius: borderRadius / 2,
57
- backgroundColor: isFocused ? colors.dangerLight : undefined,
58
- paddingLeft: spacing.baseUnit,
59
- paddingRight: spacing.baseUnit,
60
- ':hover': {
61
- backgroundColor: colors.dangerLight,
62
- color: colors.danger
63
- }
64
- })
51
+ borderRadius: borderRadius / 2,
52
+ backgroundColor: isFocused ? colors.dangerLight : undefined,
53
+ paddingLeft: spacing.baseUnit,
54
+ paddingRight: spacing.baseUnit,
55
+ ':hover': {
56
+ backgroundColor: colors.dangerLight,
57
+ color: colors.danger
58
+ }
65
59
  });
66
60
  // eslint-disable-next-line @repo/internal/react/require-jsdoc
67
61
  export const MultiValueGeneric = ({
@@ -14,7 +14,7 @@ export const optionCSS = ({
14
14
  spacing,
15
15
  colors
16
16
  }
17
- }, unstyled) => ({
17
+ }) => ({
18
18
  label: 'option',
19
19
  cursor: 'default',
20
20
  display: 'block',
@@ -22,15 +22,13 @@ export const optionCSS = ({
22
22
  width: '100%',
23
23
  userSelect: 'none',
24
24
  WebkitTapHighlightColor: 'rgba(0, 0, 0, 0)',
25
- ...(unstyled ? {} : {
26
- backgroundColor: isSelected ? colors.primary : isFocused ? colors.primary25 : 'transparent',
27
- color: isDisabled ? colors.neutral20 : isSelected ? colors.neutral0 : 'inherit',
28
- padding: `${spacing.baseUnit * 2}px ${spacing.baseUnit * 3}px`,
29
- // provide some affordance on touch devices
30
- ':active': {
31
- backgroundColor: !isDisabled ? isSelected ? colors.primary : colors.primary50 : undefined
32
- }
33
- })
25
+ backgroundColor: isSelected ? colors.primary : isFocused ? colors.primary25 : 'transparent',
26
+ color: isDisabled ? colors.neutral20 : isSelected ? colors.neutral0 : 'inherit',
27
+ padding: `${spacing.baseUnit * 2}px ${spacing.baseUnit * 3}px`,
28
+ // provide some affordance on touch devices
29
+ ':active': {
30
+ backgroundColor: !isDisabled ? isSelected ? colors.primary : colors.primary50 : undefined
31
+ }
34
32
  });
35
33
  const Option = props => {
36
34
  const {
@@ -11,14 +11,12 @@ export const placeholderCSS = ({
11
11
  spacing,
12
12
  colors
13
13
  }
14
- }, unstyled) => ({
14
+ }) => ({
15
15
  label: 'placeholder',
16
16
  gridArea: '1 / 1 / 2 / 3',
17
- ...(unstyled ? {} : {
18
- color: colors.neutral50,
19
- marginLeft: spacing.baseUnit / 2,
20
- marginRight: spacing.baseUnit / 2
21
- })
17
+ color: colors.neutral50,
18
+ marginLeft: spacing.baseUnit / 2,
19
+ marginRight: spacing.baseUnit / 2
22
20
  });
23
21
  const Placeholder = props => {
24
22
  const {
@@ -12,18 +12,16 @@ export const css = ({
12
12
  spacing,
13
13
  colors
14
14
  }
15
- }, unstyled) => ({
15
+ }) => ({
16
16
  label: 'singleValue',
17
17
  gridArea: '1 / 1 / 2 / 3',
18
18
  maxWidth: '100%',
19
19
  overflow: 'hidden',
20
20
  textOverflow: 'ellipsis',
21
21
  whiteSpace: 'nowrap',
22
- ...(unstyled ? {} : {
23
- color: isDisabled ? colors.neutral40 : colors.neutral80,
24
- marginLeft: spacing.baseUnit / 2,
25
- marginRight: spacing.baseUnit / 2
26
- })
22
+ color: isDisabled ? colors.neutral40 : colors.neutral80,
23
+ marginLeft: spacing.baseUnit / 2,
24
+ marginRight: spacing.baseUnit / 2
27
25
  });
28
26
  const SingleValue = props => {
29
27
  const {
@@ -52,8 +52,7 @@ export const defaultProps = {
52
52
  }) => `${count} result${count !== 1 ? 's' : ''} available`,
53
53
  styles: {},
54
54
  tabIndex: 0,
55
- tabSelectsValue: true,
56
- unstyled: false
55
+ tabSelectsValue: true
57
56
  };
58
57
  function toCategorizedOption(props, option, selectValue, index) {
59
58
  const isDisabled = isOptionDisabled(props, option, selectValue);
@@ -370,10 +369,7 @@ export default class Select extends Component {
370
369
  return getOptionValue(this.props, data);
371
370
  });
372
371
  _defineProperty(this, "getStyles", (key, props) => {
373
- const {
374
- unstyled
375
- } = this.props;
376
- const base = defaultStyles[key](props, unstyled);
372
+ const base = defaultStyles[key](props);
377
373
  base.boxSizing = 'border-box';
378
374
  const custom = this.props.styles[key];
379
375
  return custom ? custom(base, props) : base;
@@ -1,7 +1,4 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
1
  import _extends from "@babel/runtime/helpers/extends";
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
- 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
2
  /**
6
3
  * @jsxRuntime classic
7
4
  * @jsx jsx
@@ -42,22 +39,21 @@ export var SelectContainer = function SelectContainer(props) {
42
39
  // Value Container
43
40
  // ==============================
44
41
 
45
- export var valueContainerCSS = function valueContainerCSS(_ref2, unstyled) {
42
+ export var valueContainerCSS = function valueContainerCSS(_ref2) {
46
43
  var spacing = _ref2.theme.spacing,
47
44
  isMulti = _ref2.isMulti,
48
45
  hasValue = _ref2.hasValue,
49
46
  controlShouldRenderValue = _ref2.selectProps.controlShouldRenderValue;
50
- return _objectSpread({
47
+ return {
51
48
  alignItems: 'center',
52
49
  display: isMulti && hasValue && controlShouldRenderValue ? 'flex' : 'grid',
53
50
  flex: 1,
54
51
  flexWrap: 'wrap',
55
52
  WebkitOverflowScrolling: 'touch',
56
53
  position: 'relative',
57
- overflow: 'hidden'
58
- }, unstyled ? {} : {
54
+ overflow: 'hidden',
59
55
  padding: "".concat(spacing.baseUnit / 2, "px ").concat(spacing.baseUnit * 2, "px")
60
- });
56
+ };
61
57
  };
62
58
 
63
59
  // eslint-disable-next-line @repo/internal/react/require-jsdoc
@@ -1,7 +1,4 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
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
- 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
2
  /**
6
3
  * @jsxRuntime classic
7
4
  * @jsx jsx
@@ -9,14 +6,14 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
9
6
 
10
7
  import { jsx } from '@emotion/react';
11
8
  import { getStyleProps } from '../utils';
12
- export var css = function css(_ref, unstyled) {
9
+ export var css = function css(_ref) {
13
10
  var isDisabled = _ref.isDisabled,
14
11
  isFocused = _ref.isFocused,
15
12
  _ref$theme = _ref.theme,
16
13
  colors = _ref$theme.colors,
17
14
  borderRadius = _ref$theme.borderRadius,
18
15
  spacing = _ref$theme.spacing;
19
- return _objectSpread({
16
+ return {
20
17
  label: 'control',
21
18
  alignItems: 'center',
22
19
  cursor: 'default',
@@ -26,8 +23,7 @@ export var css = function css(_ref, unstyled) {
26
23
  minHeight: spacing.controlHeight,
27
24
  outline: '0 !important',
28
25
  position: 'relative',
29
- transition: 'all 100ms'
30
- }, unstyled ? {} : {
26
+ transition: 'all 100ms',
31
27
  backgroundColor: isDisabled ? colors.neutral5 : colors.neutral0,
32
28
  borderColor: isDisabled ? colors.neutral10 : isFocused ? colors.primary : colors.neutral20,
33
29
  borderRadius: borderRadius,
@@ -37,7 +33,7 @@ export var css = function css(_ref, unstyled) {
37
33
  '&:hover': {
38
34
  borderColor: isFocused ? colors.primary : colors.neutral30
39
35
  }
40
- });
36
+ };
41
37
  };
42
38
  var Control = function Control(props) {
43
39
  var children = props.children,
@@ -1,9 +1,6 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
2
  import _extends from "@babel/runtime/helpers/extends";
4
3
  var _excluded = ["data"];
5
- 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; }
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
4
  /**
8
5
  * @jsxRuntime classic
9
6
  * @jsx jsx
@@ -11,9 +8,9 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
11
8
 
12
9
  import { jsx } from '@emotion/react';
13
10
  import { cleanCommonProps, getStyleProps } from '../utils';
14
- export var groupCSS = function groupCSS(_ref, unstyled) {
11
+ export var groupCSS = function groupCSS(_ref) {
15
12
  var spacing = _ref.theme.spacing;
16
- return unstyled ? {} : {
13
+ return {
17
14
  paddingBottom: spacing.baseUnit * 2,
18
15
  paddingTop: spacing.baseUnit * 2
19
16
  };
@@ -41,15 +38,14 @@ var Group = function Group(props) {
41
38
  cx: cx
42
39
  }), label), jsx("div", null, children));
43
40
  };
44
- export var groupHeadingCSS = function groupHeadingCSS(_ref2, unstyled) {
41
+ export var groupHeadingCSS = function groupHeadingCSS(_ref2) {
45
42
  var _ref2$theme = _ref2.theme,
46
43
  colors = _ref2$theme.colors,
47
44
  spacing = _ref2$theme.spacing;
48
- return _objectSpread({
45
+ return {
49
46
  label: 'group',
50
47
  cursor: 'default',
51
- display: 'block'
52
- }, unstyled ? {} : {
48
+ display: 'block',
53
49
  color: colors.neutral40,
54
50
  fontSize: '75%',
55
51
  fontWeight: 500,
@@ -57,7 +53,7 @@ export var groupHeadingCSS = function groupHeadingCSS(_ref2, unstyled) {
57
53
  paddingLeft: spacing.baseUnit * 3,
58
54
  paddingRight: spacing.baseUnit * 3,
59
55
  textTransform: 'uppercase'
60
- });
56
+ };
61
57
  };
62
58
 
63
59
  // eslint-disable-next-line @repo/internal/react/require-jsdoc
@@ -64,22 +64,21 @@ export var DownChevron = function DownChevron(props) {
64
64
  // Dropdown & Clear Buttons
65
65
  // ==============================
66
66
 
67
- var baseCSS = function baseCSS(_ref2, unstyled) {
67
+ var baseCSS = function baseCSS(_ref2) {
68
68
  var isFocused = _ref2.isFocused,
69
69
  _ref2$theme = _ref2.theme,
70
70
  baseUnit = _ref2$theme.spacing.baseUnit,
71
71
  colors = _ref2$theme.colors;
72
- return _objectSpread({
72
+ return {
73
73
  label: 'indicatorContainer',
74
74
  display: 'flex',
75
- transition: 'color 150ms'
76
- }, unstyled ? {} : {
75
+ transition: 'color 150ms',
77
76
  color: isFocused ? colors.neutral60 : colors.neutral20,
78
77
  padding: baseUnit * 2,
79
78
  ':hover': {
80
79
  color: isFocused ? colors.neutral80 : colors.neutral40
81
80
  }
82
- });
81
+ };
83
82
  };
84
83
  export var dropdownIndicatorCSS = baseCSS;
85
84
 
@@ -108,20 +107,19 @@ export var ClearIndicator = function ClearIndicator(props) {
108
107
  // Separator
109
108
  // ==============================
110
109
 
111
- export var indicatorSeparatorCSS = function indicatorSeparatorCSS(_ref3, unstyled) {
110
+ export var indicatorSeparatorCSS = function indicatorSeparatorCSS(_ref3) {
112
111
  var isDisabled = _ref3.isDisabled,
113
112
  _ref3$theme = _ref3.theme,
114
113
  baseUnit = _ref3$theme.spacing.baseUnit,
115
114
  colors = _ref3$theme.colors;
116
- return _objectSpread({
115
+ return {
117
116
  label: 'indicatorSeparator',
118
117
  alignSelf: 'stretch',
119
- width: 1
120
- }, unstyled ? {} : {
118
+ width: 1,
121
119
  backgroundColor: isDisabled ? colors.neutral10 : colors.neutral20,
122
120
  marginBottom: baseUnit * 2,
123
121
  marginTop: baseUnit * 2
124
- });
122
+ };
125
123
  };
126
124
 
127
125
  // eslint-disable-next-line @repo/internal/react/require-jsdoc
@@ -144,13 +142,13 @@ var loadingDotAnimations = keyframes({
144
142
  opacity: 1
145
143
  }
146
144
  });
147
- export var loadingIndicatorCSS = function loadingIndicatorCSS(_ref4, unstyled) {
145
+ export var loadingIndicatorCSS = function loadingIndicatorCSS(_ref4) {
148
146
  var isFocused = _ref4.isFocused,
149
147
  size = _ref4.size,
150
148
  _ref4$theme = _ref4.theme,
151
149
  colors = _ref4$theme.colors,
152
150
  baseUnit = _ref4$theme.spacing.baseUnit;
153
- return _objectSpread({
151
+ return {
154
152
  label: 'loadingIndicator',
155
153
  display: 'flex',
156
154
  transition: 'color 150ms',
@@ -159,11 +157,10 @@ export var loadingIndicatorCSS = function loadingIndicatorCSS(_ref4, unstyled) {
159
157
  lineHeight: 1,
160
158
  marginRight: size,
161
159
  textAlign: 'center',
162
- verticalAlign: 'middle'
163
- }, unstyled ? {} : {
160
+ verticalAlign: 'middle',
164
161
  color: isFocused ? colors.neutral60 : colors.neutral20,
165
162
  padding: baseUnit * 2
166
- });
163
+ };
167
164
  };
168
165
  var LoadingDot = function LoadingDot(_ref5) {
169
166
  var delay = _ref5.delay,
@@ -11,7 +11,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
11
11
 
12
12
  import { jsx } from '@emotion/react';
13
13
  import { cleanCommonProps, getStyleProps } from '../utils';
14
- export var inputCSS = function inputCSS(_ref, unstyled) {
14
+ export var inputCSS = function inputCSS(_ref) {
15
15
  var isDisabled = _ref.isDisabled,
16
16
  value = _ref.value,
17
17
  _ref$theme = _ref.theme,
@@ -22,7 +22,7 @@ export var inputCSS = function inputCSS(_ref, unstyled) {
22
22
  // force css to recompute when value change due to @emotion bug.
23
23
  // We can remove it whenever the bug is fixed.
24
24
  transform: value ? 'translateZ(0)' : ''
25
- }, containerStyle), unstyled ? {} : {
25
+ }, containerStyle), {}, {
26
26
  margin: spacing.baseUnit / 2,
27
27
  paddingBottom: spacing.baseUnit / 2,
28
28
  paddingTop: spacing.baseUnit / 2,