@atlaskit/select 19.0.0 → 20.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 (34) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/cjs/CountrySelect.compiled.css +5 -0
  3. package/dist/cjs/CountrySelect.js +17 -24
  4. package/dist/cjs/PopupSelect/PopupSelect.js +5 -3
  5. package/dist/cjs/PopupSelect/components.compiled.css +11 -0
  6. package/dist/cjs/PopupSelect/components.js +37 -48
  7. package/dist/cjs/Select.js +1 -1
  8. package/dist/cjs/components/input-options.compiled.css +28 -0
  9. package/dist/cjs/components/input-options.js +64 -155
  10. package/dist/es2019/CountrySelect.compiled.css +5 -0
  11. package/dist/es2019/CountrySelect.js +14 -26
  12. package/dist/es2019/PopupSelect/PopupSelect.js +6 -3
  13. package/dist/es2019/PopupSelect/components.compiled.css +11 -0
  14. package/dist/es2019/PopupSelect/components.js +32 -50
  15. package/dist/es2019/Select.js +1 -1
  16. package/dist/es2019/components/input-options.compiled.css +28 -0
  17. package/dist/es2019/components/input-options.js +55 -161
  18. package/dist/esm/CountrySelect.compiled.css +5 -0
  19. package/dist/esm/CountrySelect.js +14 -26
  20. package/dist/esm/PopupSelect/PopupSelect.js +5 -3
  21. package/dist/esm/PopupSelect/components.compiled.css +11 -0
  22. package/dist/esm/PopupSelect/components.js +33 -48
  23. package/dist/esm/Select.js +1 -1
  24. package/dist/esm/components/input-options.compiled.css +28 -0
  25. package/dist/esm/components/input-options.js +61 -157
  26. package/dist/types/CountrySelect.d.ts +2 -6
  27. package/dist/types/PopupSelect/PopupSelect.d.ts +4 -8
  28. package/dist/types/PopupSelect/components.d.ts +4 -8
  29. package/dist/types/components/input-options.d.ts +1 -2
  30. package/dist/types-ts4.5/CountrySelect.d.ts +2 -6
  31. package/dist/types-ts4.5/PopupSelect/PopupSelect.d.ts +4 -8
  32. package/dist/types-ts4.5/PopupSelect/components.d.ts +4 -8
  33. package/dist/types-ts4.5/components/input-options.d.ts +1 -2
  34. package/package.json +8 -9
@@ -1,66 +1,28 @@
1
+ /* input-options.tsx generated by @compiled/babel-plugin v0.36.1 */
1
2
  "use strict";
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
6
  Object.defineProperty(exports, "__esModule", {
5
7
  value: true
6
8
  });
7
9
  exports.RadioOption = exports.CheckboxOption = void 0;
10
+ require("./input-options.compiled.css");
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var React = _react;
13
+ var _runtime = require("@compiled/react/runtime");
8
14
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
15
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
12
- var _react = require("react");
13
- var _react2 = require("@emotion/react");
14
- var _deviceCheck = require("@atlaskit/ds-lib/device-check");
15
16
  var _checkbox = _interopRequireDefault(require("@atlaskit/icon/glyph/checkbox"));
16
17
  var _radio = _interopRequireDefault(require("@atlaskit/icon/glyph/radio"));
17
18
  var _svg = _interopRequireDefault(require("@atlaskit/icon/svg"));
18
19
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
19
- var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
20
- var _excluded = ["getStyles", "Icon", "children", "innerProps", "innerRef"];
21
- 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; }
22
- 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; } /**
23
- * @jsxRuntime classic
24
- * @jsx jsx
25
- */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
- var getPrimitiveStyles = function getPrimitiveStyles(props) {
27
- var cx = props.cx,
28
- className = props.className,
29
- getStyles = props.getStyles,
30
- isDisabled = props.isDisabled,
31
- isFocused = props.isFocused,
32
- isSelected = props.isSelected;
33
- var baseStyles = {
34
- alignItems: 'center',
35
- backgroundColor: isFocused ? "var(--ds-background-neutral-subtle-hovered, #091E420F)" : 'transparent',
36
- color: isDisabled ? "var(--ds-text-disabled, inherit)" : 'inherit',
37
- display: 'flex ',
38
- paddingBottom: "var(--ds-space-050, 4px)",
39
- paddingLeft: "var(--ds-space-200, 16px)",
40
- paddingTop: "var(--ds-space-050, 4px)",
41
- // This 'none' needs to be present to ensure that style is not applied when
42
- // the option is selected but not focused.
43
- boxShadow: isFocused ? "inset 2px 0px 0px ".concat("var(--ds-border-focused, #388BFF)") : 'none',
44
- ':active': {
45
- backgroundColor: "var(--ds-background-neutral-subtle-pressed, #091E4224)"
46
- },
47
- '@media screen and (-ms-high-contrast: active)': {
48
- borderLeft: isFocused ? '2px solid transparent' : ''
49
- }
50
- };
51
- var augmentedStyles = (0, _react2.css)(_objectSpread(_objectSpread({}, getStyles('option', props)), baseStyles));
52
- var bemClasses = {
53
- option: true,
54
- 'option--is-disabled': isDisabled,
55
- 'option--is-focused': isFocused,
56
- 'option--is-selected': isSelected
57
- };
58
-
59
- // maintain react-select API
60
- return {
61
- styles: augmentedStyles,
62
- classes: cx(bemClasses, className)
63
- };
20
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
21
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
22
+ var optionStyles = {
23
+ default: "_1e0c1txw _4cvr1h6o _1bsb1osq _uiztglyw _18ql1j7p _vchhusvi _85i51b66 _1q511b66 _bozgpxbi _y4tiutpp _bfhk1j28 _16qs1kw7 _syaz1kw7 _1di61dty",
24
+ focused: "_bfhk166n _16qsn8hf _112e1vrj",
25
+ disabled: "_syaz15gi"
64
26
  };
65
27
 
66
28
  // state of the parent option
@@ -89,46 +51,21 @@ var getPrimaryColor = function getPrimaryColor(_ref) {
89
51
 
90
52
  // the secondary color represents the radio dot or checkmark
91
53
  var getSecondaryColor = function getSecondaryColor(_ref2) {
92
- var isActive = _ref2.isActive,
93
- isDisabled = _ref2.isDisabled,
54
+ var isDisabled = _ref2.isDisabled,
94
55
  isSelected = _ref2.isSelected;
95
56
  if (isDisabled && isSelected) {
96
57
  return "var(--ds-text-disabled, #091E424F)";
97
- } else if (isActive && isSelected && !isDisabled) {
98
- return "var(--ds-surface, #FFFFFF)";
99
58
  } else if (!isSelected) {
100
59
  return 'transparent';
101
60
  }
102
61
  return "var(--ds-surface, #FFFFFF)";
103
62
  };
104
-
105
- // the border color surrounds the checkbox/radio
106
- var getBorderColor = function getBorderColor(_ref3) {
107
- var isActive = _ref3.isActive,
108
- isDisabled = _ref3.isDisabled,
109
- isSelected = _ref3.isSelected;
110
- if (isSelected || isActive || isDisabled) {
111
- return 'currentColor';
112
- }
113
- return "var(--ds-border-input, #8590A2)";
63
+ var iconStyles = {
64
+ inherit: "_1u9j1r31 _1gqp1r31",
65
+ default: "_1u9j1elr _1gqp1elr"
114
66
  };
115
- var baseIconStyles = (0, _react2.css)({
116
- display: 'flex ',
117
- alignItems: 'center',
118
- flexShrink: 0,
119
- paddingInlineEnd: "var(--ds-space-050, 4px)",
120
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-unsafe-selectors
121
- '& svg rect, & svg circle:first-of-type': {
122
- strokeLinejoin: 'round',
123
- strokeWidth: "var(--ds-border-width, 1px)"
124
- }
125
- });
126
- var baseOptionStyles = (0, _react2.css)({
127
- flexGrow: 1,
128
- overflowX: 'hidden',
129
- textOverflow: 'ellipsis',
130
- whiteSpace: 'nowrap'
131
- });
67
+ var baseIconStyles = null;
68
+ var baseOptionStyles = null;
132
69
 
133
70
  // eslint-disable-next-line @repo/internal/react/no-class-components
134
71
  var ControlOption = function ControlOption(props) {
@@ -142,91 +79,63 @@ var ControlOption = function ControlOption(props) {
142
79
  var onMouseUp = (0, _react.useCallback)(function () {
143
80
  return setIsActive(false);
144
81
  }, []);
145
- var getStyles = props.getStyles,
146
- Icon = props.Icon,
82
+ var Icon = props.Icon,
147
83
  children = props.children,
148
84
  innerProps = props.innerProps,
149
85
  innerRef = props.innerRef,
150
- rest = (0, _objectWithoutProperties2.default)(props, _excluded);
151
- var isDisabled = props.isDisabled,
86
+ cx = props.cx,
87
+ className = props.className,
88
+ isDisabled = props.isDisabled,
152
89
  isSelected = props.isSelected,
153
90
  isFocused = props.isFocused;
154
-
155
- // prop assignment
156
- var newProps = _objectSpread(_objectSpread({}, innerProps), {}, {
91
+ var classNames = (0, _react.useMemo)(function () {
92
+ return cx({
93
+ option: true,
94
+ 'option--is-disabled': isDisabled,
95
+ 'option--is-focused': isFocused,
96
+ 'option--is-selected': isSelected
97
+ }, className);
98
+ }, [cx, isDisabled, isFocused, isSelected, className]);
99
+ return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({
100
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
101
+ className: (0, _runtime.ax)([optionStyles.default, isFocused && optionStyles.focused, isDisabled && optionStyles.disabled, classNames]),
102
+ ref: innerRef,
157
103
  onMouseDown: onMouseDown,
158
104
  onMouseUp: onMouseUp,
159
105
  onMouseLeave: onMouseUp
160
- });
161
- var _getPrimitiveStyles = getPrimitiveStyles(_objectSpread({
162
- getStyles: getStyles
163
- }, rest)),
164
- styles = _getPrimitiveStyles.styles,
165
- classes = _getPrimitiveStyles.classes;
166
- var isVoiceOver = (0, _deviceCheck.isAppleDevice)() &&
167
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
168
- (0, _platformFeatureFlags.fg)('design_system_select-a11y-improvement');
169
- return (
170
- // These need to remain this way because `react-select` passes props with
171
- // styles inside, and that must be done dynamically.
172
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
173
- (0, _react2.jsx)("div", (0, _extends2.default)({
174
- css: styles,
175
- className: classes,
176
- ref: innerRef
177
- }, newProps), (0, _react2.jsx)("div", {
178
- css: [baseIconStyles,
179
- // Here we are adding a border to the Checkbox and Radio SVG icons
180
- // This is an a11y fix for Select only for now but it may be rolled
181
- // into the `@atlaskit/icon` package's Checkbox and Radio SVGs later
182
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
183
- {
184
- // This can eventually be changed to static styles that are
185
- // applied conditionally (e.g. `isActive && activeBorderStyles`),
186
- // but considering there are multiple instances of `react-select`
187
- // requiring styles to be generated dynamically, it seemed like a
188
- // low priority.
189
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
190
- '& svg rect, & svg circle:first-of-type': {
191
- stroke: getBorderColor({
192
- isActive: isActive,
193
- isDisabled: isDisabled,
194
- isSelected: isSelected
195
- })
196
- }
197
- }]
198
- }, !!Icon ? (0, _react2.jsx)(Icon, {
199
- label: "",
200
- primaryColor: getPrimaryColor({
201
- isDisabled: isDisabled,
202
- isSelected: isSelected,
203
- isFocused: isFocused,
204
- isActive: isActive
205
- }),
206
- secondaryColor: getSecondaryColor({
207
- isDisabled: isDisabled,
208
- isSelected: isSelected,
209
- isActive: isActive
210
- }),
211
- isFacadeDisabled: true
212
- }) : null), (0, _react2.jsx)("div", {
213
- css: baseOptionStyles
214
- }, children, isVoiceOver && (isSelected || isDisabled) && (0, _react2.jsx)(_visuallyHidden.default, null, "".concat(isSelected ? ',selected' : '').concat(isDisabled ? ',dimmed' : ''))))
215
- );
106
+ }, innerProps), /*#__PURE__*/React.createElement("div", {
107
+ className: (0, _runtime.ax)(["_1e0c1txw _4cvr1h6o _1o9zidpf _y4ti1b66 _16cu892t _1xci892t _59qxe4h9 _8y3xe4h9", isSelected || isActive || isDisabled ? iconStyles.inherit : iconStyles.default])
108
+ }, !!Icon ? /*#__PURE__*/React.createElement(Icon, {
109
+ label: "",
110
+ primaryColor: getPrimaryColor({
111
+ isDisabled: isDisabled,
112
+ isSelected: isSelected,
113
+ isFocused: isFocused,
114
+ isActive: isActive
115
+ }),
116
+ secondaryColor: getSecondaryColor({
117
+ isDisabled: isDisabled,
118
+ isSelected: isSelected
119
+ }),
120
+ isFacadeDisabled: true
121
+ }) : null), /*#__PURE__*/React.createElement("div", {
122
+ className: (0, _runtime.ax)(["_16jlkb7n _1reo15vq _1bto1l2s _o5721q9c"])
123
+ }, children));
216
124
  };
217
125
  var NewCheckboxIcon = function NewCheckboxIcon(props) {
218
126
  return (
127
+ /*#__PURE__*/
219
128
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
220
- (0, _react2.jsx)(_svg.default, props, (0, _react2.jsx)("g", {
129
+ React.createElement(_svg.default, props, /*#__PURE__*/React.createElement("g", {
221
130
  fillRule: "evenodd"
222
- }, (0, _react2.jsx)("rect", {
131
+ }, /*#__PURE__*/React.createElement("rect", {
223
132
  x: "5.5",
224
133
  y: "5.5",
225
134
  width: "13",
226
135
  height: "13",
227
136
  rx: "1.5",
228
137
  fill: "currentColor"
229
- }), (0, _react2.jsx)("path", {
138
+ }), /*#__PURE__*/React.createElement("path", {
230
139
  fillRule: "evenodd",
231
140
  clipRule: "evenodd",
232
141
  d: "M16.3262 9.48011L15.1738 8.51984L10.75 13.8284L8.82616 11.5198L7.67383 12.4801L10.1738 15.4801C10.3163 15.6511 10.5274 15.75 10.75 15.75C10.9726 15.75 11.1837 15.6511 11.3262 15.4801L16.3262 9.48011Z",
@@ -236,16 +145,17 @@ var NewCheckboxIcon = function NewCheckboxIcon(props) {
236
145
  };
237
146
  var NewRadioIcon = function NewRadioIcon(props) {
238
147
  return (
148
+ /*#__PURE__*/
239
149
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
240
- (0, _react2.jsx)(_svg.default, props, (0, _react2.jsx)("g", {
150
+ React.createElement(_svg.default, props, /*#__PURE__*/React.createElement("g", {
241
151
  fillRule: "evenodd"
242
- }, (0, _react2.jsx)("circle", {
152
+ }, /*#__PURE__*/React.createElement("circle", {
243
153
  cx: "12",
244
154
  cy: "12",
245
155
  r: "6.75",
246
156
  fill: "currentColor",
247
157
  strokeWidth: "1.5"
248
- }), (0, _react2.jsx)("circle", {
158
+ }), /*#__PURE__*/React.createElement("circle", {
249
159
  cx: "12",
250
160
  cy: "12",
251
161
  r: "3",
@@ -257,10 +167,8 @@ var NewRadioIcon = function NewRadioIcon(props) {
257
167
  /**
258
168
  * __Checkbox option__
259
169
  */
260
- var CheckboxOption = exports.CheckboxOption = function CheckboxOption(props
261
- // ): JSX.Element => <ControlOption<OptionT, true> Icon={CheckboxIcon} {...props} />;
262
- ) {
263
- return (0, _react2.jsx)(ControlOption, (0, _extends2.default)({
170
+ var CheckboxOption = exports.CheckboxOption = function CheckboxOption(props) {
171
+ return /*#__PURE__*/React.createElement(ControlOption, (0, _extends2.default)({
264
172
  Icon:
265
173
  // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix, @atlaskit/platform/no-preconditioning
266
174
  (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && (0, _platformFeatureFlags.fg)('platform-icon-control-migration') ? NewCheckboxIcon :
@@ -275,9 +183,10 @@ var CheckboxOption = exports.CheckboxOption = function CheckboxOption(props
275
183
  */
276
184
  var RadioOption = exports.RadioOption = function RadioOption(props) {
277
185
  return (
186
+ /*#__PURE__*/
278
187
  // TODO https://product-fabric.atlassian.net/browse/DSP-20769
279
188
  // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons, @repo/internal/react/no-unsafe-spread-props
280
- (0, _react2.jsx)(ControlOption, (0, _extends2.default)({
189
+ React.createElement(ControlOption, (0, _extends2.default)({
281
190
  Icon:
282
191
  // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix, @atlaskit/platform/no-preconditioning
283
192
  (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && (0, _platformFeatureFlags.fg)('platform-icon-control-migration') ? NewRadioIcon :
@@ -0,0 +1,5 @@
1
+ ._12l2u2gc{margin-inline-end:var(--ds-space-100,8px)}
2
+ ._1e0c1txw{display:flex}
3
+ ._1wyb1cby{font-size:1.125rem}
4
+ ._4cvr1h6o{align-items:center}
5
+ ._vwz4cjiy{line-height:1.2}
@@ -1,37 +1,25 @@
1
+ /* CountrySelect.tsx generated by @compiled/babel-plugin v0.36.1 */
1
2
  import _extends from "@babel/runtime/helpers/extends";
3
+ import "./CountrySelect.compiled.css";
4
+ import * as React from 'react';
5
+ import { ax, ix } from "@compiled/react/runtime";
2
6
  /* eslint-disable @repo/internal/fs/filename-pattern-match */
3
- /**
4
- * @jsxRuntime classic
5
- * @jsx jsx
6
- */
7
- import { css, jsx } from '@emotion/react';
8
- import { fg } from '@atlaskit/platform-feature-flags';
9
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
10
7
 
8
+ import { fg } from '@atlaskit/platform-feature-flags';
11
9
  import { groupedCountries } from './data/countries';
12
10
  import Select from './Select';
13
11
  import { isCountryOptionsGrouped, onCountryOptionFocus } from './utils/country-groups-announcement';
14
12
  // custom option renderer
15
- const labelStyles = css({
16
- display: 'flex',
17
- alignItems: 'center',
18
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
19
- lineHeight: 1.2
20
- });
21
- const flagStyles = css({
22
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
23
- fontSize: '1.125rem',
24
- // emoji size
25
- marginInlineEnd: "var(--ds-space-100, 8px)"
26
- });
13
+ const labelStyles = null;
14
+ const flagStyles = null;
27
15
  const Opt = ({
28
16
  children,
29
17
  icon
30
- }) => jsx("div", {
31
- css: labelStyles
32
- }, jsx("span", {
18
+ }) => /*#__PURE__*/React.createElement("div", {
19
+ className: ax(["_1e0c1txw _4cvr1h6o _vwz4cjiy"])
20
+ }, /*#__PURE__*/React.createElement("span", {
33
21
  "aria-hidden": "true",
34
- css: flagStyles
22
+ className: ax(["_1wyb1cby _12l2u2gc"])
35
23
  }, icon), children);
36
24
 
37
25
  // return the country name; used for searching
@@ -45,7 +33,7 @@ const getOptionLabel = ({
45
33
  const getOptionValue = opt => opt.abbr;
46
34
 
47
35
  // the text node of the control
48
- const controlLabel = opt => jsx(Opt, {
36
+ const controlLabel = opt => /*#__PURE__*/React.createElement(Opt, {
49
37
  icon: opt.icon
50
38
  }, opt.abbr.toUpperCase());
51
39
  // the text node for an option
@@ -54,7 +42,7 @@ const optionLabel = ({
54
42
  code,
55
43
  icon,
56
44
  name
57
- }) => jsx(Opt, {
45
+ }) => /*#__PURE__*/React.createElement(Opt, {
58
46
  icon: icon
59
47
  }, getOptionLabel({
60
48
  abbr,
@@ -74,7 +62,7 @@ const CountrySelect = props => {
74
62
  options
75
63
  } = props;
76
64
  const countryOptions = options || groupedCountries;
77
- return jsx(Select, _extends({
65
+ return /*#__PURE__*/React.createElement(Select, _extends({
78
66
  isClearable: false,
79
67
  formatOptionLabel: formatOptionLabel,
80
68
  getOptionLabel: getOptionLabel,
@@ -386,12 +386,15 @@ export default class PopupSelect extends PureComponent {
386
386
  ref,
387
387
  style
388
388
  }) => /*#__PURE__*/React.createElement(MenuDialog
389
+ // There is not a limited amount of values for the widths, so they need to remain dynamic.
389
390
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
390
391
  , {
391
- style: style,
392
+ style: {
393
+ ...style,
394
+ maxWidth: maxMenuWidth,
395
+ minWidth: minMenuWidth
396
+ },
392
397
  "data-placement": placement,
393
- minWidth: minMenuWidth,
394
- maxWidth: maxMenuWidth,
395
398
  id: id,
396
399
  testId: testId,
397
400
  ref: this.resolveMenuRef(ref)
@@ -0,0 +1,11 @@
1
+
2
+ ._2rkoiti9{border-radius:var(--ds-border-radius-100,4px)}._12l2v77o{margin-inline-end:var(--ds-space-025,2px)}
3
+ ._16qs1s1a{box-shadow:var(--ds-shadow-overlay,0 0 0 1px rgba(9,30,66,.13),0 4px 11px rgba(9,30,66,.13))}
4
+ ._1bsbzwfg{width:2pc}
5
+ ._1pby16oo{z-index:510}
6
+ ._1q51u2gc{padding-block-start:var(--ds-space-100,8px)}
7
+ ._85i51b66{padding-block-end:var(--ds-space-050,4px)}
8
+ ._bfhk1bhr{background-color:var(--ds-surface-overlay,#fff)}
9
+ ._bozgu2gc{padding-inline-start:var(--ds-space-100,8px)}
10
+ ._y3gn1h6o{text-align:center}
11
+ ._y4tiu2gc{padding-inline-end:var(--ds-space-100,8px)}
@@ -1,12 +1,9 @@
1
+ /* components.tsx generated by @compiled/babel-plugin v0.36.1 */
1
2
  import _extends from "@babel/runtime/helpers/extends";
2
- /**
3
- * @jsxRuntime classic
4
- * @jsx jsx
5
- */
3
+ import "./components.compiled.css";
4
+ import * as React from 'react';
5
+ import { ax, ix } from "@compiled/react/runtime";
6
6
  import { forwardRef } from 'react';
7
-
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
- import { css, jsx } from '@emotion/react';
10
7
  import SearchIcon from '@atlaskit/icon/core/migration/search--editor-search';
11
8
  import { components } from '@atlaskit/react-select';
12
9
  import { N40A } from '@atlaskit/theme/colors';
@@ -17,68 +14,48 @@ import VisuallyHidden from '@atlaskit/visually-hidden';
17
14
  // Styled Components
18
15
  // ==============================
19
16
 
20
- const menuDialogStyles = css({
21
- zIndex: layers.modal(),
22
- backgroundColor: "var(--ds-surface-overlay, white)",
23
- borderRadius: "var(--ds-border-radius-100, 4px)",
24
- boxShadow: `var(--ds-shadow-overlay, ${`0 0 0 1px ${N40A}, 0 4px 11px ${N40A}`})`
25
- });
17
+ const menuDialogStyles = null;
26
18
 
27
19
  /**
28
20
  * __Menu dialog__
29
21
  * Wrapper for PopupSelect component.
30
- *
31
22
  */
32
23
  export const MenuDialog = /*#__PURE__*/forwardRef(({
33
- maxWidth,
34
- minWidth,
35
24
  children,
36
25
  id,
37
26
  style,
38
27
  testId
39
- }, ref) => jsx("div", {
40
- ref: ref,
41
- css: [menuDialogStyles,
42
- // There is not a limited amount of values for the widths, so they need
43
- // to remain dynamic.
44
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
45
- {
46
- maxWidth,
47
- minWidth
48
- }]
49
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
50
- ,
51
- style: style,
52
- id: id,
53
- "data-testid": testId && `${testId}--menu`
54
- }, children));
28
+ }, ref) => {
29
+ return /*#__PURE__*/React.createElement("div", {
30
+ ref: ref,
31
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
32
+ style: style,
33
+ id: id,
34
+ "data-testid": testId && `${testId}--menu`,
35
+ className: ax(["_2rkoiti9 _1pby16oo _bfhk1bhr _16qs1s1a"])
36
+ }, children);
37
+ });
55
38
 
56
39
  // ==============================
57
40
  // Custom Components
58
41
  // ==============================
59
42
 
60
- const dropdownStyles = css({
61
- width: 32,
62
- marginInlineEnd: "var(--ds-space-025, 2px)",
63
- textAlign: 'center'
64
- });
65
- const DropdownIndicator = () => jsx("div", {
66
- css: dropdownStyles
67
- }, jsx(SearchIcon, {
43
+ const dropdownStyles = null;
44
+ const DropdownIndicator = () => /*#__PURE__*/React.createElement("div", {
45
+ className: ax(["_1bsbzwfg _12l2v77o _y3gn1h6o"])
46
+ }, /*#__PURE__*/React.createElement(SearchIcon, {
68
47
  color: "currentColor",
69
48
  label: ""
70
49
  }));
71
- const controlStyles = css({
72
- padding: `${"var(--ds-space-100, 8px)"} ${"var(--ds-space-100, 8px)"} ${"var(--ds-space-050, 4px)"}`
73
- });
50
+ const controlStyles = null;
74
51
  const Control = ({
75
52
  innerRef,
76
53
  innerProps,
77
54
  ...props
78
- }) => jsx("div", {
55
+ }) => /*#__PURE__*/React.createElement("div", {
79
56
  ref: innerRef,
80
- css: controlStyles
81
- }, jsx(components.Control, _extends({}, props, {
57
+ className: ax(["_85i51b66 _1q51u2gc _y4tiu2gc _bozgu2gc"])
58
+ }, /*#__PURE__*/React.createElement(components.Control, _extends({}, props, {
82
59
  innerProps: innerProps
83
60
  })));
84
61
 
@@ -86,15 +63,20 @@ const Control = ({
86
63
  * __Dummy control__
87
64
  * Overrides the default DummyControl component in Select.
88
65
  */
89
- export const DummyControl = props => jsx(VisuallyHidden, null, jsx(components.Control, props));
66
+ export const DummyControl = props => /*#__PURE__*/React.createElement(VisuallyHidden, null, /*#__PURE__*/React.createElement(components.Control, props));
90
67
 
91
68
  // NOTE `props` intentionally omitted from `Fragment`
92
69
  const Menu = ({
93
70
  children,
94
71
  innerProps
95
- }) => jsx("div", innerProps, children);
96
- const ClearIndicator = props => jsx(components.ClearIndicator, props);
97
- const MultiValueRemove = props => jsx(components.MultiValueRemove, props);
72
+ }) => /*#__PURE__*/React.createElement("div", innerProps, children);
73
+
74
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
75
+ const ClearIndicator = props => /*#__PURE__*/React.createElement(components.ClearIndicator, props);
76
+ const MultiValueRemove = props =>
77
+ /*#__PURE__*/
78
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
79
+ React.createElement(components.MultiValueRemove, props);
98
80
  export const defaultComponents = {
99
81
  Control,
100
82
  DropdownIndicator,
@@ -3,7 +3,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
3
3
  import AsyncSelect from '@atlaskit/react-select/async';
4
4
  import createSelect from './createSelect';
5
5
  const packageName = "@atlaskit/select";
6
- const packageVersion = "19.0.0";
6
+ const packageVersion = "20.0.0";
7
7
  export const SelectWithoutAnalytics = createSelect(AsyncSelect);
8
8
  const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
9
9
  const Select = withAnalyticsContext({
@@ -0,0 +1,28 @@
1
+ ._16cu892t svg circle:first-of-type, ._1xci892t svg rect{stroke-linejoin:round}
2
+ ._16jlkb7n{flex-grow:1}
3
+ ._16qs1kw7{box-shadow:inherit}
4
+ ._16qsn8hf{box-shadow:inset 2px 0 0 var(--ds-border-focused,#388bff)}
5
+ ._18ql1j7p{-webkit-tap-highlight-color:rgba(0,0,0,0)}
6
+ ._1bsb1osq{width:100%}
7
+ ._1bto1l2s{text-overflow:ellipsis}
8
+ ._1e0c1txw{display:flex}
9
+ ._1o9zidpf{flex-shrink:0}
10
+ ._1q511b66{padding-block-start:var(--ds-space-050,4px)}
11
+ ._1reo15vq{overflow-x:hidden}
12
+ ._1u9j1elr svg circle:first-of-type, ._1gqp1elr svg rect{stroke:var(--ds-border-input,#8590a2)}
13
+ ._1u9j1r31 svg circle:first-of-type, ._1gqp1r31 svg rect{stroke:currentColor}
14
+ ._4cvr1h6o{align-items:center}
15
+ ._59qxe4h9 svg circle:first-of-type, ._8y3xe4h9 svg rect{stroke-width:var(--ds-border-width,1px)}
16
+ ._85i51b66{padding-block-end:var(--ds-space-050,4px)}
17
+ ._bfhk166n{background-color:var(--ds-background-neutral-subtle-hovered,#091e420f)}
18
+ ._bfhk1j28{background-color:transparent}
19
+ ._bozgpxbi{padding-inline-start:var(--ds-space-200,1pc)}
20
+ ._o5721q9c{white-space:nowrap}
21
+ ._syaz15gi{color:var(--ds-text-disabled,inherit)}
22
+ ._syaz1kw7{color:inherit}
23
+ ._uiztglyw{-webkit-user-select:none;-ms-user-select:none;user-select:none}
24
+ ._vchhusvi{box-sizing:border-box}
25
+ ._y4ti1b66{padding-inline-end:var(--ds-space-050,4px)}
26
+ ._y4tiutpp{padding-inline-end:var(--ds-space-150,9pt)}
27
+ ._1di61dty:active{background-color:var(--ds-background-neutral-subtle-pressed,#091e4224)}
28
+ @media screen and (-ms-high-contrast:active){._112e1vrj{border-inline-start:2px solid transparent}}