@atlaskit/select 17.15.1 → 17.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/select
2
2
 
3
+ ## 17.16.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#139165](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/139165)
8
+ [`c140497da3215`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c140497da3215) -
9
+ [ux] Enable new icons behind a feature flag.
10
+
11
+ ## 17.15.2
12
+
13
+ ### Patch Changes
14
+
15
+ - [#137619](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/137619)
16
+ [`a91489985e535`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a91489985e535) -
17
+ [ux] Tab and Shift+Tab now dismisses the list of opened popup select options and allows users to
18
+ navigate to next or previous elements accordingly.
19
+
3
20
  ## 17.15.1
4
21
 
5
22
  ### Patch Changes
@@ -119,6 +119,13 @@ var PopupSelect = exports.default = /*#__PURE__*/function (_PureComponent) {
119
119
  }
120
120
  });
121
121
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleKeyDown", function (event) {
122
+ //We shouldn't close PopupSelect on tab event if there are custom interactive element.
123
+ if ((0, _platformFeatureFlags.fg)('tab-event-should-close-popupSelect')) {
124
+ var tabEvent = event.key === 'Tab' && event.shiftKey || event.key === 'Tab';
125
+ if (_this.props.shouldCloseMenuOnTab && tabEvent) {
126
+ _this.close();
127
+ }
128
+ }
122
129
  switch (event.key) {
123
130
  case 'Escape':
124
131
  case 'Esc':
@@ -540,6 +547,7 @@ var PopupSelect = exports.default = /*#__PURE__*/function (_PureComponent) {
540
547
  }(_react.PureComponent);
541
548
  (0, _defineProperty2.default)(PopupSelect, "defaultProps", {
542
549
  closeMenuOnSelect: true,
550
+ shouldCloseMenuOnTab: true,
543
551
  components: {},
544
552
  maxMenuHeight: 300,
545
553
  maxMenuWidth: 440,
@@ -10,7 +10,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
10
10
  var _react = require("react");
11
11
  var _react2 = require("@emotion/react");
12
12
  var _reactSelect = require("react-select");
13
- var _search = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/search"));
13
+ var _searchEditorSearch = _interopRequireDefault(require("@atlaskit/icon/core/migration/search--editor-search"));
14
14
  var _colors = require("@atlaskit/theme/colors");
15
15
  var _constants = require("@atlaskit/theme/constants");
16
16
  var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
@@ -73,7 +73,9 @@ var dropdownStyles = (0, _react2.css)({
73
73
  var DropdownIndicator = function DropdownIndicator() {
74
74
  return (0, _react2.jsx)("div", {
75
75
  css: dropdownStyles
76
- }, (0, _react2.jsx)(_search.default, {
76
+ }, (0, _react2.jsx)(_searchEditorSearch.default, {
77
+ color: "currentColor",
78
+ spacing: "spacious",
77
79
  label: "open"
78
80
  }));
79
81
  };
@@ -9,7 +9,7 @@ var _reactSelect = _interopRequireDefault(require("react-select"));
9
9
  var _analyticsNext = require("@atlaskit/analytics-next");
10
10
  var _createSelect = _interopRequireDefault(require("./createSelect"));
11
11
  var packageName = "@atlaskit/select";
12
- var packageVersion = "17.15.1";
12
+ var packageVersion = "17.16.0";
13
13
  var SelectWithoutAnalytics = exports.SelectWithoutAnalytics = (0, _createSelect.default)(_reactSelect.default);
14
14
  var createAndFireEventOnAtlaskit = (0, _analyticsNext.createAndFireEvent)('atlaskit');
15
15
  var Select = (0, _analyticsNext.withAnalyticsContext)({
@@ -25,8 +25,11 @@ Object.defineProperty(exports, "LoadingIndicator", {
25
25
  });
26
26
  exports.MultiValueRemove = void 0;
27
27
  var _react = require("@emotion/react");
28
- var _selectClear = _interopRequireDefault(require("@atlaskit/icon/glyph/select-clear"));
29
28
  var _reactSelect = require("react-select");
29
+ var _selectClear = _interopRequireDefault(require("@atlaskit/icon/glyph/select-clear"));
30
+ var _cross = _interopRequireDefault(require("@atlaskit/icon/utility/cross"));
31
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
32
+ var _primitives = require("@atlaskit/primitives");
30
33
  var _indicators = require("./indicators");
31
34
  /**
32
35
  * @jsxRuntime classic
@@ -40,16 +43,35 @@ var disabledStyles = (0, _react.css)({
40
43
  var enabledStyles = (0, _react.css)({
41
44
  display: 'inherit'
42
45
  });
46
+ var iconWrapperStyles = (0, _primitives.xcss)({
47
+ padding: 'space.025'
48
+ });
49
+
50
+ /**
51
+ * __Multi value remove__
52
+ *
53
+ * The icon used to remove individual selections from a multi-select.
54
+ *
55
+ */
43
56
  var MultiValueRemove = exports.MultiValueRemove = function MultiValueRemove(props) {
44
57
  var isDisabled = props.selectProps.isDisabled;
45
58
  return (0, _react.jsx)(_reactSelect.components.MultiValueRemove, props, (0, _react.jsx)("div", {
46
59
  css: isDisabled ? disabledStyles : enabledStyles,
47
60
  "data-testid": isDisabled ? 'hide-clear-icon' : 'show-clear-icon'
48
- }, (0, _react.jsx)(_selectClear.default, {
61
+ }, (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ?
62
+ // eslint-disable-next-line @atlaskit/design-system/ensure-icon-color
63
+ (0, _react.jsx)(_cross.default, {
64
+ label: "Clear"
65
+ }) : (0, _react.jsx)(_primitives.Inline, {
66
+ xcss: iconWrapperStyles
67
+ }, (0, _react.jsx)(_cross.default, {
49
68
  label: "Clear",
50
- size: "small",
51
- primaryColor: "transparent",
52
- secondaryColor: "inherit"
53
- })));
69
+ color: "currentColor",
70
+ LEGACY_fallbackIcon: _selectClear.default,
71
+ LEGACY_size: "small",
72
+ LEGACY_primaryColor: "transparent",
73
+ LEGACY_secondaryColor: "inherit",
74
+ LEGACY_margin: "var(--ds-space-negative-025, -2px)"
75
+ }))));
54
76
  };
55
77
  var IndicatorSeparator = exports.IndicatorSeparator = null;
@@ -9,20 +9,26 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _react = require("@emotion/react");
11
11
  var _reactSelect = require("react-select");
12
+ var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-down"));
13
+ var _crossCircleSelectClear = _interopRequireDefault(require("@atlaskit/icon/utility/migration/cross-circle--select-clear"));
12
14
  var _primitives = require("@atlaskit/primitives");
13
15
  var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
14
- var _selectClear = _interopRequireDefault(require("@atlaskit/icon/glyph/select-clear"));
15
- var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-down"));
16
16
  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; }
17
- 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; } /**
17
+ 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; } /* eslint-disable @repo/internal/react/require-jsdoc */ /**
18
18
  * @jsxRuntime classic
19
19
  * @jsx jsx
20
20
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
21
+ // import LegacyDownIcon from '@atlaskit/icon/glyph/chevron-down';
21
22
  var iconContainerStyles = (0, _primitives.xcss)({
22
23
  all: 'unset',
23
24
  outline: 'revert',
24
25
  display: 'flex',
25
- alignItems: 'center'
26
+ alignItems: 'center',
27
+ justifyContent: 'center',
28
+ padding: 'space.025'
29
+ });
30
+ var dropdownWrapperStyles = (0, _primitives.xcss)({
31
+ padding: 'space.075'
26
32
  });
27
33
  var ClearIndicator = exports.ClearIndicator = function ClearIndicator(props) {
28
34
  return (0, _react.jsx)(_reactSelect.components.ClearIndicator, _objectSpread(_objectSpread({}, props), {}, {
@@ -32,15 +38,22 @@ var ClearIndicator = exports.ClearIndicator = function ClearIndicator(props) {
32
38
  }), (0, _react.jsx)(_primitives.Pressable, {
33
39
  xcss: iconContainerStyles,
34
40
  tabIndex: -1
35
- }, (0, _react.jsx)(_selectClear.default, {
36
- size: "small",
37
- label: "clear"
41
+ }, (0, _react.jsx)(_crossCircleSelectClear.default, {
42
+ label: "clear",
43
+ color: "currentColor",
44
+ LEGACY_size: "small",
45
+ LEGACY_margin: "var(--ds-space-negative-025, -0.125rem)"
38
46
  })));
39
47
  };
40
48
  var DropdownIndicator = exports.DropdownIndicator = function DropdownIndicator(props) {
41
- return (0, _react.jsx)(_reactSelect.components.DropdownIndicator, props, (0, _react.jsx)(_chevronDown.default, {
42
- label: "open"
43
- }));
49
+ return (0, _react.jsx)(_reactSelect.components.DropdownIndicator, props, (0, _react.jsx)(_primitives.Inline, {
50
+ as: "span",
51
+ xcss: dropdownWrapperStyles
52
+ }, (0, _react.jsx)(_chevronDown.default, {
53
+ color: "currentColor",
54
+ label: "open",
55
+ LEGACY_margin: "var(--ds-space-negative-075, -0.375rem)"
56
+ })));
44
57
  };
45
58
  var LoadingIndicator = exports.LoadingIndicator = function LoadingIndicator(props) {
46
59
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
@@ -15,10 +15,10 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
15
15
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
16
16
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
17
17
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
18
- var _react = require("@emotion/react");
19
- var _react2 = require("react");
20
- var _radio = _interopRequireDefault(require("@atlaskit/icon/glyph/radio"));
18
+ var _react = require("react");
19
+ var _react2 = require("@emotion/react");
21
20
  var _checkbox = _interopRequireDefault(require("@atlaskit/icon/glyph/checkbox"));
21
+ var _radio = _interopRequireDefault(require("@atlaskit/icon/glyph/radio"));
22
22
  var _colors = require("@atlaskit/theme/colors");
23
23
  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); }; }
@@ -53,7 +53,7 @@ var getPrimitiveStyles = function getPrimitiveStyles(props) {
53
53
  borderLeft: isFocused ? '2px solid transparent' : ''
54
54
  }
55
55
  };
56
- var augmentedStyles = (0, _react.css)(_objectSpread(_objectSpread({}, getStyles('option', props)), baseStyles));
56
+ var augmentedStyles = (0, _react2.css)(_objectSpread(_objectSpread({}, getStyles('option', props)), baseStyles));
57
57
  var bemClasses = {
58
58
  option: true,
59
59
  'option--is-disabled': isDisabled,
@@ -129,26 +129,24 @@ var getBorderColor = function getBorderColor(_ref3) {
129
129
  }
130
130
  return "var(--ds-border-input, ".concat(_colors.N100, ")");
131
131
  };
132
- var baseIconStyles = (0, _react.css)({
133
- alignItems: 'center',
132
+ var baseIconStyles = (0, _react2.css)({
134
133
  display: 'flex ',
134
+ alignItems: 'center',
135
135
  flexShrink: 0,
136
136
  paddingInlineEnd: "var(--ds-space-050, 4px)",
137
- // Here we are adding a border to the Checkbox and Radio SVG icons
138
- // This is an a11y fix for Select only for now but it may be rolled
139
- // into the `@atlaskit/icon` package's Checkbox and Radio SVGs later
140
- // 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
137
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-unsafe-selectors
141
138
  '& svg rect, & svg circle:first-of-type': {
142
- strokeWidth: "var(--ds-border-width, 1px)",
143
- strokeLinejoin: 'round'
139
+ strokeLinejoin: 'round',
140
+ strokeWidth: "var(--ds-border-width, 1px)"
144
141
  }
145
142
  });
146
- var baseOptionStyles = (0, _react.css)({
147
- textOverflow: 'ellipsis',
148
- overflowX: 'hidden',
143
+ var baseOptionStyles = (0, _react2.css)({
149
144
  flexGrow: 1,
145
+ overflowX: 'hidden',
146
+ textOverflow: 'ellipsis',
150
147
  whiteSpace: 'nowrap'
151
148
  });
149
+ // eslint-disable-next-line @repo/internal/react/no-class-components
152
150
  var ControlOption = /*#__PURE__*/function (_Component) {
153
151
  (0, _inherits2.default)(ControlOption, _Component);
154
152
  var _super = _createSuper(ControlOption);
@@ -206,11 +204,11 @@ var ControlOption = /*#__PURE__*/function (_Component) {
206
204
  // These need to remain this way because `react-select` passes props with
207
205
  // styles inside, and that must be done dynamically.
208
206
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
209
- (0, _react.jsx)("div", (0, _extends2.default)({
207
+ (0, _react2.jsx)("div", (0, _extends2.default)({
210
208
  css: styles,
211
209
  className: classes,
212
210
  ref: innerRef
213
- }, props), (0, _react.jsx)("div", {
211
+ }, props), (0, _react2.jsx)("div", {
214
212
  css: [baseIconStyles,
215
213
  // Here we are adding a border to the Checkbox and Radio SVG icons
216
214
  // This is an a11y fix for Select only for now but it may be rolled
@@ -227,25 +225,39 @@ var ControlOption = /*#__PURE__*/function (_Component) {
227
225
  stroke: getBorderColor(_objectSpread(_objectSpread({}, this.props), this.state))
228
226
  }
229
227
  }]
230
- }, !!Icon ? (0, _react.jsx)(Icon, {
228
+ }, !!Icon ? (0, _react2.jsx)(Icon, {
231
229
  label: "",
232
230
  primaryColor: getPrimaryColor(_objectSpread(_objectSpread({}, this.props), this.state)),
233
231
  secondaryColor: getSecondaryColor(_objectSpread(_objectSpread({}, this.props), this.state))
234
- }) : null), (0, _react.jsx)("div", {
232
+ }) : null), (0, _react2.jsx)("div", {
235
233
  css: baseOptionStyles
236
234
  }, children))
237
235
  );
238
236
  }
239
237
  }]);
240
238
  return ControlOption;
241
- }(_react2.Component);
242
- var CheckboxOption = exports.CheckboxOption = function CheckboxOption(props) {
243
- return (0, _react.jsx)(ControlOption, (0, _extends2.default)({
239
+ }(_react.Component);
240
+ /**
241
+ * __Checkbox option__
242
+ */
243
+ var CheckboxOption = exports.CheckboxOption = function CheckboxOption(props
244
+ // TODO https://product-fabric.atlassian.net/browse/DSP-20768
245
+ // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
246
+ ) {
247
+ return (0, _react2.jsx)(ControlOption, (0, _extends2.default)({
244
248
  Icon: _checkbox.default
245
249
  }, props));
246
250
  };
251
+
252
+ /**
253
+ * __Radio option__
254
+ */
247
255
  var RadioOption = exports.RadioOption = function RadioOption(props) {
248
- return (0, _react.jsx)(ControlOption, (0, _extends2.default)({
249
- Icon: _radio.default
250
- }, props));
256
+ return (
257
+ // TODO https://product-fabric.atlassian.net/browse/DSP-20769
258
+ // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
259
+ (0, _react2.jsx)(ControlOption, (0, _extends2.default)({
260
+ Icon: _radio.default
261
+ }, props))
262
+ );
251
263
  };
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = baseStyles;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
9
10
  var _colors = require("@atlaskit/theme/colors");
10
11
  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; }
11
12
  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; }
@@ -224,7 +225,7 @@ function baseStyles(validationState) {
224
225
  backgroundColor = "var(--ds-background-selected, ".concat(_colors.N40, ")");
225
226
  color = "var(--ds-text-selected, hsl(0, 0%, 20%))";
226
227
  } else {
227
- backgroundColor = "var(--ds-background-neutral, ".concat(_colors.N40, ")");
228
+ backgroundColor = (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? "var(--ds-background-neutral-subtle-hovered, #091E420F)" : "var(--ds-background-neutral, ".concat(_colors.N40, ")");
228
229
  color = "var(--ds-text, hsl(0, 0%, 20%))";
229
230
  }
230
231
  return _objectSpread(_objectSpread({}, css), {}, {
@@ -236,6 +237,13 @@ function baseStyles(validationState) {
236
237
  border: isFocused ? '1px solid transparent' : 'none'
237
238
  },
238
239
  color: color
240
+ }, (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') && {
241
+ borderRadius: "var(--ds-border-radius-100, 4px)",
242
+ // Hardcode this color for visual refresh as there is no token color yet
243
+ borderColor: '#B7B9BE',
244
+ borderWidth: "var(--ds-border-width, 1px)",
245
+ borderStyle: 'solid',
246
+ backgroundColor: "var(--ds-background-input, #FFFFFF)"
239
247
  });
240
248
  },
241
249
  multiValueLabel: function multiValueLabel(css, _ref8) {
@@ -245,6 +253,11 @@ function baseStyles(validationState) {
245
253
  padding: "var(--ds-space-025, 2px)",
246
254
  color: isDisabled ? "var(--ds-text-disabled, ".concat(_colors.N70, ")") : 'inherit',
247
255
  paddingRight: "var(--ds-space-025, 2px)"
256
+ }, (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') && {
257
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
258
+ paddingTop: 0,
259
+ paddingBottom: 0,
260
+ paddingLeft: "var(--ds-space-050, 4px)"
248
261
  });
249
262
  },
250
263
  multiValueRemove: function multiValueRemove(css, _ref9) {
@@ -264,6 +277,26 @@ function baseStyles(validationState) {
264
277
  backgroundColor: "var(--ds-background-danger-pressed, ".concat(_colors.R75, ")"),
265
278
  fill: "var(--ds-text-danger, #000)"
266
279
  }
280
+ }, (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') && {
281
+ backgroundColor: "var(--ds-background-neutral-subtle, #00000000)",
282
+ border: 'none',
283
+ alignItems: 'center',
284
+ justifyContent: 'center',
285
+ alignSelf: 'center',
286
+ appearance: 'none',
287
+ borderRadius: "var(--ds-border-radius, 4px)",
288
+ color: "var(--ds-text, #172B4D)",
289
+ padding: "var(--ds-space-025, 2px)",
290
+ marginRight: "var(--ds-space-025, 2px)",
291
+ ':focus-visible': {
292
+ outlineOffset: "var(--ds-space-negative-025, -2px)"
293
+ },
294
+ ':hover': {
295
+ backgroundColor: "var(--ds-background-neutral-subtle-hovered, #091E420F)"
296
+ },
297
+ ':active': {
298
+ backgroundColor: "var(--ds-background-neutral-subtle-pressed, #091E4224)"
299
+ }
267
300
  });
268
301
  },
269
302
  groupHeading: function groupHeading(css) {
@@ -85,6 +85,13 @@ export default class PopupSelect extends PureComponent {
85
85
  }
86
86
  });
87
87
  _defineProperty(this, "handleKeyDown", event => {
88
+ //We shouldn't close PopupSelect on tab event if there are custom interactive element.
89
+ if (fg('tab-event-should-close-popupSelect')) {
90
+ const tabEvent = event.key === 'Tab' && event.shiftKey || event.key === 'Tab';
91
+ if (this.props.shouldCloseMenuOnTab && tabEvent) {
92
+ this.close();
93
+ }
94
+ }
88
95
  switch (event.key) {
89
96
  case 'Escape':
90
97
  case 'Esc':
@@ -513,6 +520,7 @@ export default class PopupSelect extends PureComponent {
513
520
  }
514
521
  _defineProperty(PopupSelect, "defaultProps", {
515
522
  closeMenuOnSelect: true,
523
+ shouldCloseMenuOnTab: true,
516
524
  components: {},
517
525
  maxMenuHeight: 300,
518
526
  maxMenuWidth: 440,
@@ -8,7 +8,7 @@ import { forwardRef } from 'react';
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { css, jsx } from '@emotion/react';
10
10
  import { components } from 'react-select';
11
- import SearchIcon from '@atlaskit/icon/glyph/editor/search';
11
+ import SearchIcon from '@atlaskit/icon/core/migration/search--editor-search';
12
12
  import { N40A } from '@atlaskit/theme/colors';
13
13
  import { layers } from '@atlaskit/theme/constants';
14
14
  import VisuallyHidden from '@atlaskit/visually-hidden';
@@ -65,6 +65,8 @@ const dropdownStyles = css({
65
65
  const DropdownIndicator = () => jsx("div", {
66
66
  css: dropdownStyles
67
67
  }, jsx(SearchIcon, {
68
+ color: "currentColor",
69
+ spacing: "spacious",
68
70
  label: "open"
69
71
  }));
70
72
  const controlStyles = css({
@@ -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.15.1";
5
+ const packageVersion = "17.16.0";
6
6
  export const SelectWithoutAnalytics = createSelect(ReactSelect);
7
7
  const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
8
8
  const Select = withAnalyticsContext({
@@ -3,9 +3,12 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
- import { jsx, css } from '@emotion/react';
7
- import SelectClearIcon from '@atlaskit/icon/glyph/select-clear';
6
+ import { css, jsx } from '@emotion/react';
8
7
  import { components } from 'react-select';
8
+ import LegacySelectClearIcon from '@atlaskit/icon/glyph/select-clear';
9
+ import CrossIcon from '@atlaskit/icon/utility/cross';
10
+ import { fg } from '@atlaskit/platform-feature-flags';
11
+ import { Inline, xcss } from '@atlaskit/primitives';
9
12
  export { ClearIndicator, DropdownIndicator, LoadingIndicator } from './indicators';
10
13
  const disabledStyles = css({
11
14
  display: 'none'
@@ -13,6 +16,16 @@ const disabledStyles = css({
13
16
  const enabledStyles = css({
14
17
  display: 'inherit'
15
18
  });
19
+ const iconWrapperStyles = xcss({
20
+ padding: 'space.025'
21
+ });
22
+
23
+ /**
24
+ * __Multi value remove__
25
+ *
26
+ * The icon used to remove individual selections from a multi-select.
27
+ *
28
+ */
16
29
  export const MultiValueRemove = props => {
17
30
  const {
18
31
  isDisabled
@@ -20,11 +33,20 @@ export const MultiValueRemove = props => {
20
33
  return jsx(components.MultiValueRemove, props, jsx("div", {
21
34
  css: isDisabled ? disabledStyles : enabledStyles,
22
35
  "data-testid": isDisabled ? 'hide-clear-icon' : 'show-clear-icon'
23
- }, jsx(SelectClearIcon, {
36
+ }, fg('platform-component-visual-refresh') ?
37
+ // eslint-disable-next-line @atlaskit/design-system/ensure-icon-color
38
+ jsx(CrossIcon, {
39
+ label: "Clear"
40
+ }) : jsx(Inline, {
41
+ xcss: iconWrapperStyles
42
+ }, jsx(CrossIcon, {
24
43
  label: "Clear",
25
- size: "small",
26
- primaryColor: "transparent",
27
- secondaryColor: "inherit"
28
- })));
44
+ color: "currentColor",
45
+ LEGACY_fallbackIcon: LegacySelectClearIcon,
46
+ LEGACY_size: "small",
47
+ LEGACY_primaryColor: "transparent",
48
+ LEGACY_secondaryColor: "inherit",
49
+ LEGACY_margin: "var(--ds-space-negative-025, -2px)"
50
+ }))));
29
51
  };
30
52
  export const IndicatorSeparator = null;
@@ -1,20 +1,28 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ /* eslint-disable @repo/internal/react/require-jsdoc */
2
3
  /**
3
4
  * @jsxRuntime classic
4
5
  * @jsx jsx
5
6
  */
6
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
- import { jsx, css } from '@emotion/react';
8
+ import { css, jsx } from '@emotion/react';
8
9
  import { components } from 'react-select';
9
- import { Pressable, xcss } from '@atlaskit/primitives';
10
+
11
+ // import LegacyDownIcon from '@atlaskit/icon/glyph/chevron-down';
12
+ import DownIcon from '@atlaskit/icon/utility/migration/chevron-down';
13
+ import CrossIcon from '@atlaskit/icon/utility/migration/cross-circle--select-clear';
14
+ import { Inline, Pressable, xcss } from '@atlaskit/primitives';
10
15
  import Spinner from '@atlaskit/spinner';
11
- import SelectClearIcon from '@atlaskit/icon/glyph/select-clear';
12
- import DownIcon from '@atlaskit/icon/glyph/chevron-down';
13
16
  const iconContainerStyles = xcss({
14
17
  all: 'unset',
15
18
  outline: 'revert',
16
19
  display: 'flex',
17
- alignItems: 'center'
20
+ alignItems: 'center',
21
+ justifyContent: 'center',
22
+ padding: 'space.025'
23
+ });
24
+ const dropdownWrapperStyles = xcss({
25
+ padding: 'space.075'
18
26
  });
19
27
  export const ClearIndicator = props => jsx(components.ClearIndicator, _extends({}, props, {
20
28
  innerProps: {
@@ -24,13 +32,20 @@ export const ClearIndicator = props => jsx(components.ClearIndicator, _extends({
24
32
  }), jsx(Pressable, {
25
33
  xcss: iconContainerStyles,
26
34
  tabIndex: -1
27
- }, jsx(SelectClearIcon, {
28
- size: "small",
29
- label: "clear"
35
+ }, jsx(CrossIcon, {
36
+ label: "clear",
37
+ color: "currentColor",
38
+ LEGACY_size: "small",
39
+ LEGACY_margin: "var(--ds-space-negative-025, -0.125rem)"
40
+ })));
41
+ export const DropdownIndicator = props => jsx(components.DropdownIndicator, props, jsx(Inline, {
42
+ as: "span",
43
+ xcss: dropdownWrapperStyles
44
+ }, jsx(DownIcon, {
45
+ color: "currentColor",
46
+ label: "open",
47
+ LEGACY_margin: "var(--ds-space-negative-075, -0.375rem)"
30
48
  })));
31
- export const DropdownIndicator = props => jsx(components.DropdownIndicator, props, jsx(DownIcon, {
32
- label: "open"
33
- }));
34
49
  export const LoadingIndicator = props => {
35
50
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
36
51
  const loadingStyles = css(props.getStyles('loadingIndicator', props));
@@ -5,11 +5,11 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
5
5
  * @jsx jsx
6
6
  */
7
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
- import { css, jsx } from '@emotion/react';
9
8
  import { Component } from 'react';
10
- import RadioIcon from '@atlaskit/icon/glyph/radio';
9
+ import { css, jsx } from '@emotion/react';
11
10
  import CheckboxIcon from '@atlaskit/icon/glyph/checkbox';
12
- import { B300, B400, B75, N20A, N0, N100, N20, N30, N70 } from '@atlaskit/theme/colors';
11
+ import RadioIcon from '@atlaskit/icon/glyph/radio';
12
+ import { B300, B400, B75, N0, N100, N20, N20A, N30, N70 } from '@atlaskit/theme/colors';
13
13
  const getPrimitiveStyles = props => {
14
14
  const {
15
15
  cx,
@@ -122,25 +122,23 @@ const getBorderColor = ({
122
122
  return `var(--ds-border-input, ${N100})`;
123
123
  };
124
124
  const baseIconStyles = css({
125
- alignItems: 'center',
126
125
  display: 'flex ',
126
+ alignItems: 'center',
127
127
  flexShrink: 0,
128
128
  paddingInlineEnd: "var(--ds-space-050, 4px)",
129
- // Here we are adding a border to the Checkbox and Radio SVG icons
130
- // This is an a11y fix for Select only for now but it may be rolled
131
- // into the `@atlaskit/icon` package's Checkbox and Radio SVGs later
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
129
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-unsafe-selectors
133
130
  '& svg rect, & svg circle:first-of-type': {
134
- strokeWidth: "var(--ds-border-width, 1px)",
135
- strokeLinejoin: 'round'
131
+ strokeLinejoin: 'round',
132
+ strokeWidth: "var(--ds-border-width, 1px)"
136
133
  }
137
134
  });
138
135
  const baseOptionStyles = css({
139
- textOverflow: 'ellipsis',
140
- overflowX: 'hidden',
141
136
  flexGrow: 1,
137
+ overflowX: 'hidden',
138
+ textOverflow: 'ellipsis',
142
139
  whiteSpace: 'nowrap'
143
140
  });
141
+ // eslint-disable-next-line @repo/internal/react/no-class-components
144
142
  class ControlOption extends Component {
145
143
  constructor(...args) {
146
144
  super(...args);
@@ -222,9 +220,23 @@ class ControlOption extends Component {
222
220
  );
223
221
  }
224
222
  }
225
- export const CheckboxOption = props => jsx(ControlOption, _extends({
223
+
224
+ /**
225
+ * __Checkbox option__
226
+ */
227
+ export const CheckboxOption = (props
228
+ // TODO https://product-fabric.atlassian.net/browse/DSP-20768
229
+ // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
230
+ ) => jsx(ControlOption, _extends({
226
231
  Icon: CheckboxIcon
227
232
  }, props));
228
- export const RadioOption = props => jsx(ControlOption, _extends({
233
+
234
+ /**
235
+ * __Radio option__
236
+ */
237
+ export const RadioOption = props =>
238
+ // TODO https://product-fabric.atlassian.net/browse/DSP-20769
239
+ // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
240
+ jsx(ControlOption, _extends({
229
241
  Icon: RadioIcon
230
242
  }, props));
@@ -1,3 +1,4 @@
1
+ import { fg } from '@atlaskit/platform-feature-flags';
1
2
  import { B100, B400, B50, G400, N0, N100, N20, N200, N30, N300, N40, N500, N70, N800, R400, R75 } from '@atlaskit/theme/colors';
2
3
  export default function baseStyles(validationState, isCompact = false, appearance) {
3
4
  return {
@@ -213,7 +214,7 @@ export default function baseStyles(validationState, isCompact = false, appearanc
213
214
  backgroundColor = `var(--ds-background-selected, ${N40})`;
214
215
  color = "var(--ds-text-selected, hsl(0, 0%, 20%))";
215
216
  } else {
216
- backgroundColor = `var(--ds-background-neutral, ${N40})`;
217
+ backgroundColor = fg('platform-component-visual-refresh') ? "var(--ds-background-neutral-subtle-hovered, #091E420F)" : `var(--ds-background-neutral, ${N40})`;
217
218
  color = "var(--ds-text, hsl(0, 0%, 20%))";
218
219
  }
219
220
  return {
@@ -225,7 +226,15 @@ export default function baseStyles(validationState, isCompact = false, appearanc
225
226
  '@media screen and (-ms-high-contrast: active)': {
226
227
  border: isFocused ? '1px solid transparent' : 'none'
227
228
  },
228
- color
229
+ color,
230
+ ...(fg('platform-component-visual-refresh') && {
231
+ borderRadius: "var(--ds-border-radius-100, 4px)",
232
+ // Hardcode this color for visual refresh as there is no token color yet
233
+ borderColor: '#B7B9BE',
234
+ borderWidth: "var(--ds-border-width, 1px)",
235
+ borderStyle: 'solid',
236
+ backgroundColor: "var(--ds-background-input, #FFFFFF)"
237
+ })
229
238
  };
230
239
  },
231
240
  multiValueLabel: (css, {
@@ -235,7 +244,13 @@ export default function baseStyles(validationState, isCompact = false, appearanc
235
244
  font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
236
245
  padding: "var(--ds-space-025, 2px)",
237
246
  color: isDisabled ? `var(--ds-text-disabled, ${N70})` : 'inherit',
238
- paddingRight: "var(--ds-space-025, 2px)"
247
+ paddingRight: "var(--ds-space-025, 2px)",
248
+ ...(fg('platform-component-visual-refresh') && {
249
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
250
+ paddingTop: 0,
251
+ paddingBottom: 0,
252
+ paddingLeft: "var(--ds-space-050, 4px)"
253
+ })
239
254
  }),
240
255
  multiValueRemove: (css, {
241
256
  isFocused
@@ -254,7 +269,28 @@ export default function baseStyles(validationState, isCompact = false, appearanc
254
269
  ':active': {
255
270
  backgroundColor: `var(--ds-background-danger-pressed, ${R75})`,
256
271
  fill: "var(--ds-text-danger, #000)"
257
- }
272
+ },
273
+ ...(fg('platform-component-visual-refresh') && {
274
+ backgroundColor: "var(--ds-background-neutral-subtle, #00000000)",
275
+ border: 'none',
276
+ alignItems: 'center',
277
+ justifyContent: 'center',
278
+ alignSelf: 'center',
279
+ appearance: 'none',
280
+ borderRadius: "var(--ds-border-radius, 4px)",
281
+ color: "var(--ds-text, #172B4D)",
282
+ padding: "var(--ds-space-025, 2px)",
283
+ marginRight: "var(--ds-space-025, 2px)",
284
+ ':focus-visible': {
285
+ outlineOffset: "var(--ds-space-negative-025, -2px)"
286
+ },
287
+ ':hover': {
288
+ backgroundColor: "var(--ds-background-neutral-subtle-hovered, #091E420F)"
289
+ },
290
+ ':active': {
291
+ backgroundColor: "var(--ds-background-neutral-subtle-pressed, #091E4224)"
292
+ }
293
+ })
258
294
  }),
259
295
  groupHeading: css => ({
260
296
  ...css,
@@ -109,6 +109,13 @@ var PopupSelect = /*#__PURE__*/function (_PureComponent) {
109
109
  }
110
110
  });
111
111
  _defineProperty(_assertThisInitialized(_this), "handleKeyDown", function (event) {
112
+ //We shouldn't close PopupSelect on tab event if there are custom interactive element.
113
+ if (fg('tab-event-should-close-popupSelect')) {
114
+ var tabEvent = event.key === 'Tab' && event.shiftKey || event.key === 'Tab';
115
+ if (_this.props.shouldCloseMenuOnTab && tabEvent) {
116
+ _this.close();
117
+ }
118
+ }
112
119
  switch (event.key) {
113
120
  case 'Escape':
114
121
  case 'Esc':
@@ -530,6 +537,7 @@ var PopupSelect = /*#__PURE__*/function (_PureComponent) {
530
537
  }(PureComponent);
531
538
  _defineProperty(PopupSelect, "defaultProps", {
532
539
  closeMenuOnSelect: true,
540
+ shouldCloseMenuOnTab: true,
533
541
  components: {},
534
542
  maxMenuHeight: 300,
535
543
  maxMenuWidth: 440,
@@ -10,7 +10,7 @@ import { forwardRef } from 'react';
10
10
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
11
11
  import { css, jsx } from '@emotion/react';
12
12
  import { components } from 'react-select';
13
- import SearchIcon from '@atlaskit/icon/glyph/editor/search';
13
+ import SearchIcon from '@atlaskit/icon/core/migration/search--editor-search';
14
14
  import { N40A } from '@atlaskit/theme/colors';
15
15
  import { layers } from '@atlaskit/theme/constants';
16
16
  import VisuallyHidden from '@atlaskit/visually-hidden';
@@ -69,6 +69,8 @@ var DropdownIndicator = function DropdownIndicator() {
69
69
  return jsx("div", {
70
70
  css: dropdownStyles
71
71
  }, jsx(SearchIcon, {
72
+ color: "currentColor",
73
+ spacing: "spacious",
72
74
  label: "open"
73
75
  }));
74
76
  };
@@ -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.15.1";
5
+ var packageVersion = "17.16.0";
6
6
  export var SelectWithoutAnalytics = createSelect(ReactSelect);
7
7
  var createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
8
8
  var Select = withAnalyticsContext({
@@ -3,9 +3,12 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
- import { jsx, css } from '@emotion/react';
7
- import SelectClearIcon from '@atlaskit/icon/glyph/select-clear';
6
+ import { css, jsx } from '@emotion/react';
8
7
  import { components } from 'react-select';
8
+ import LegacySelectClearIcon from '@atlaskit/icon/glyph/select-clear';
9
+ import CrossIcon from '@atlaskit/icon/utility/cross';
10
+ import { fg } from '@atlaskit/platform-feature-flags';
11
+ import { Inline, xcss } from '@atlaskit/primitives';
9
12
  export { ClearIndicator, DropdownIndicator, LoadingIndicator } from './indicators';
10
13
  var disabledStyles = css({
11
14
  display: 'none'
@@ -13,16 +16,35 @@ var disabledStyles = css({
13
16
  var enabledStyles = css({
14
17
  display: 'inherit'
15
18
  });
19
+ var iconWrapperStyles = xcss({
20
+ padding: 'space.025'
21
+ });
22
+
23
+ /**
24
+ * __Multi value remove__
25
+ *
26
+ * The icon used to remove individual selections from a multi-select.
27
+ *
28
+ */
16
29
  export var MultiValueRemove = function MultiValueRemove(props) {
17
30
  var isDisabled = props.selectProps.isDisabled;
18
31
  return jsx(components.MultiValueRemove, props, jsx("div", {
19
32
  css: isDisabled ? disabledStyles : enabledStyles,
20
33
  "data-testid": isDisabled ? 'hide-clear-icon' : 'show-clear-icon'
21
- }, jsx(SelectClearIcon, {
34
+ }, fg('platform-component-visual-refresh') ?
35
+ // eslint-disable-next-line @atlaskit/design-system/ensure-icon-color
36
+ jsx(CrossIcon, {
37
+ label: "Clear"
38
+ }) : jsx(Inline, {
39
+ xcss: iconWrapperStyles
40
+ }, jsx(CrossIcon, {
22
41
  label: "Clear",
23
- size: "small",
24
- primaryColor: "transparent",
25
- secondaryColor: "inherit"
26
- })));
42
+ color: "currentColor",
43
+ LEGACY_fallbackIcon: LegacySelectClearIcon,
44
+ LEGACY_size: "small",
45
+ LEGACY_primaryColor: "transparent",
46
+ LEGACY_secondaryColor: "inherit",
47
+ LEGACY_margin: "var(--ds-space-negative-025, -2px)"
48
+ }))));
27
49
  };
28
50
  export var IndicatorSeparator = null;
@@ -2,22 +2,30 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  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
+ /* eslint-disable @repo/internal/react/require-jsdoc */
5
6
  /**
6
7
  * @jsxRuntime classic
7
8
  * @jsx jsx
8
9
  */
9
10
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
10
- import { jsx, css } from '@emotion/react';
11
+ import { css, jsx } from '@emotion/react';
11
12
  import { components } from 'react-select';
12
- import { Pressable, xcss } from '@atlaskit/primitives';
13
+
14
+ // import LegacyDownIcon from '@atlaskit/icon/glyph/chevron-down';
15
+ import DownIcon from '@atlaskit/icon/utility/migration/chevron-down';
16
+ import CrossIcon from '@atlaskit/icon/utility/migration/cross-circle--select-clear';
17
+ import { Inline, Pressable, xcss } from '@atlaskit/primitives';
13
18
  import Spinner from '@atlaskit/spinner';
14
- import SelectClearIcon from '@atlaskit/icon/glyph/select-clear';
15
- import DownIcon from '@atlaskit/icon/glyph/chevron-down';
16
19
  var iconContainerStyles = xcss({
17
20
  all: 'unset',
18
21
  outline: 'revert',
19
22
  display: 'flex',
20
- alignItems: 'center'
23
+ alignItems: 'center',
24
+ justifyContent: 'center',
25
+ padding: 'space.025'
26
+ });
27
+ var dropdownWrapperStyles = xcss({
28
+ padding: 'space.075'
21
29
  });
22
30
  export var ClearIndicator = function ClearIndicator(props) {
23
31
  return jsx(components.ClearIndicator, _objectSpread(_objectSpread({}, props), {}, {
@@ -27,15 +35,22 @@ export var ClearIndicator = function ClearIndicator(props) {
27
35
  }), jsx(Pressable, {
28
36
  xcss: iconContainerStyles,
29
37
  tabIndex: -1
30
- }, jsx(SelectClearIcon, {
31
- size: "small",
32
- label: "clear"
38
+ }, jsx(CrossIcon, {
39
+ label: "clear",
40
+ color: "currentColor",
41
+ LEGACY_size: "small",
42
+ LEGACY_margin: "var(--ds-space-negative-025, -0.125rem)"
33
43
  })));
34
44
  };
35
45
  export var DropdownIndicator = function DropdownIndicator(props) {
36
- return jsx(components.DropdownIndicator, props, jsx(DownIcon, {
37
- label: "open"
38
- }));
46
+ return jsx(components.DropdownIndicator, props, jsx(Inline, {
47
+ as: "span",
48
+ xcss: dropdownWrapperStyles
49
+ }, jsx(DownIcon, {
50
+ color: "currentColor",
51
+ label: "open",
52
+ LEGACY_margin: "var(--ds-space-negative-075, -0.375rem)"
53
+ })));
39
54
  };
40
55
  export var LoadingIndicator = function LoadingIndicator(props) {
41
56
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
@@ -18,11 +18,11 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
18
18
  * @jsx jsx
19
19
  */
20
20
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
21
- import { css, jsx } from '@emotion/react';
22
21
  import { Component } from 'react';
23
- import RadioIcon from '@atlaskit/icon/glyph/radio';
22
+ import { css, jsx } from '@emotion/react';
24
23
  import CheckboxIcon from '@atlaskit/icon/glyph/checkbox';
25
- import { B300, B400, B75, N20A, N0, N100, N20, N30, N70 } from '@atlaskit/theme/colors';
24
+ import RadioIcon from '@atlaskit/icon/glyph/radio';
25
+ import { B300, B400, B75, N0, N100, N20, N20A, N30, N70 } from '@atlaskit/theme/colors';
26
26
  var getPrimitiveStyles = function getPrimitiveStyles(props) {
27
27
  var cx = props.cx,
28
28
  className = props.className,
@@ -125,25 +125,23 @@ var getBorderColor = function getBorderColor(_ref3) {
125
125
  return "var(--ds-border-input, ".concat(N100, ")");
126
126
  };
127
127
  var baseIconStyles = css({
128
- alignItems: 'center',
129
128
  display: 'flex ',
129
+ alignItems: 'center',
130
130
  flexShrink: 0,
131
131
  paddingInlineEnd: "var(--ds-space-050, 4px)",
132
- // Here we are adding a border to the Checkbox and Radio SVG icons
133
- // This is an a11y fix for Select only for now but it may be rolled
134
- // into the `@atlaskit/icon` package's Checkbox and Radio SVGs later
135
- // 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
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-unsafe-selectors
136
133
  '& svg rect, & svg circle:first-of-type': {
137
- strokeWidth: "var(--ds-border-width, 1px)",
138
- strokeLinejoin: 'round'
134
+ strokeLinejoin: 'round',
135
+ strokeWidth: "var(--ds-border-width, 1px)"
139
136
  }
140
137
  });
141
138
  var baseOptionStyles = css({
142
- textOverflow: 'ellipsis',
143
- overflowX: 'hidden',
144
139
  flexGrow: 1,
140
+ overflowX: 'hidden',
141
+ textOverflow: 'ellipsis',
145
142
  whiteSpace: 'nowrap'
146
143
  });
144
+ // eslint-disable-next-line @repo/internal/react/no-class-components
147
145
  var ControlOption = /*#__PURE__*/function (_Component) {
148
146
  _inherits(ControlOption, _Component);
149
147
  var _super = _createSuper(ControlOption);
@@ -234,13 +232,27 @@ var ControlOption = /*#__PURE__*/function (_Component) {
234
232
  }]);
235
233
  return ControlOption;
236
234
  }(Component);
237
- export var CheckboxOption = function CheckboxOption(props) {
235
+ /**
236
+ * __Checkbox option__
237
+ */
238
+ export var CheckboxOption = function CheckboxOption(props
239
+ // TODO https://product-fabric.atlassian.net/browse/DSP-20768
240
+ // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
241
+ ) {
238
242
  return jsx(ControlOption, _extends({
239
243
  Icon: CheckboxIcon
240
244
  }, props));
241
245
  };
246
+
247
+ /**
248
+ * __Radio option__
249
+ */
242
250
  export var RadioOption = function RadioOption(props) {
243
- return jsx(ControlOption, _extends({
244
- Icon: RadioIcon
245
- }, props));
251
+ return (
252
+ // TODO https://product-fabric.atlassian.net/browse/DSP-20769
253
+ // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
254
+ jsx(ControlOption, _extends({
255
+ Icon: RadioIcon
256
+ }, props))
257
+ );
246
258
  };
@@ -1,6 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  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; }
3
3
  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; }
4
+ import { fg } from '@atlaskit/platform-feature-flags';
4
5
  import { B100, B400, B50, G400, N0, N100, N20, N200, N30, N300, N40, N500, N70, N800, R400, R75 } from '@atlaskit/theme/colors';
5
6
  export default function baseStyles(validationState) {
6
7
  var isCompact = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
@@ -217,7 +218,7 @@ export default function baseStyles(validationState) {
217
218
  backgroundColor = "var(--ds-background-selected, ".concat(N40, ")");
218
219
  color = "var(--ds-text-selected, hsl(0, 0%, 20%))";
219
220
  } else {
220
- backgroundColor = "var(--ds-background-neutral, ".concat(N40, ")");
221
+ backgroundColor = fg('platform-component-visual-refresh') ? "var(--ds-background-neutral-subtle-hovered, #091E420F)" : "var(--ds-background-neutral, ".concat(N40, ")");
221
222
  color = "var(--ds-text, hsl(0, 0%, 20%))";
222
223
  }
223
224
  return _objectSpread(_objectSpread({}, css), {}, {
@@ -229,6 +230,13 @@ export default function baseStyles(validationState) {
229
230
  border: isFocused ? '1px solid transparent' : 'none'
230
231
  },
231
232
  color: color
233
+ }, fg('platform-component-visual-refresh') && {
234
+ borderRadius: "var(--ds-border-radius-100, 4px)",
235
+ // Hardcode this color for visual refresh as there is no token color yet
236
+ borderColor: '#B7B9BE',
237
+ borderWidth: "var(--ds-border-width, 1px)",
238
+ borderStyle: 'solid',
239
+ backgroundColor: "var(--ds-background-input, #FFFFFF)"
232
240
  });
233
241
  },
234
242
  multiValueLabel: function multiValueLabel(css, _ref8) {
@@ -238,6 +246,11 @@ export default function baseStyles(validationState) {
238
246
  padding: "var(--ds-space-025, 2px)",
239
247
  color: isDisabled ? "var(--ds-text-disabled, ".concat(N70, ")") : 'inherit',
240
248
  paddingRight: "var(--ds-space-025, 2px)"
249
+ }, fg('platform-component-visual-refresh') && {
250
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
251
+ paddingTop: 0,
252
+ paddingBottom: 0,
253
+ paddingLeft: "var(--ds-space-050, 4px)"
241
254
  });
242
255
  },
243
256
  multiValueRemove: function multiValueRemove(css, _ref9) {
@@ -257,6 +270,26 @@ export default function baseStyles(validationState) {
257
270
  backgroundColor: "var(--ds-background-danger-pressed, ".concat(R75, ")"),
258
271
  fill: "var(--ds-text-danger, #000)"
259
272
  }
273
+ }, fg('platform-component-visual-refresh') && {
274
+ backgroundColor: "var(--ds-background-neutral-subtle, #00000000)",
275
+ border: 'none',
276
+ alignItems: 'center',
277
+ justifyContent: 'center',
278
+ alignSelf: 'center',
279
+ appearance: 'none',
280
+ borderRadius: "var(--ds-border-radius, 4px)",
281
+ color: "var(--ds-text, #172B4D)",
282
+ padding: "var(--ds-space-025, 2px)",
283
+ marginRight: "var(--ds-space-025, 2px)",
284
+ ':focus-visible': {
285
+ outlineOffset: "var(--ds-space-negative-025, -2px)"
286
+ },
287
+ ':hover': {
288
+ backgroundColor: "var(--ds-background-neutral-subtle-hovered, #091E420F)"
289
+ },
290
+ ':active': {
291
+ backgroundColor: "var(--ds-background-neutral-subtle-pressed, #091E4224)"
292
+ }
260
293
  });
261
294
  },
262
295
  groupHeading: function groupHeading(css) {
@@ -18,6 +18,10 @@ export interface PopupSelectProps<Option = OptionType, IsMulti extends boolean =
18
18
  * Defines whether the menu should close when selected. The default is `true`.
19
19
  */
20
20
  closeMenuOnSelect?: boolean;
21
+ /**
22
+ * Defines whether the menu should be closed by pressing the Tab key. The default is `true`.
23
+ */
24
+ shouldCloseMenuOnTab?: boolean;
21
25
  /**
22
26
  * The footer content shown at the bottom of the popup, underneath the select options.
23
27
  */
@@ -118,6 +122,7 @@ export default class PopupSelect<Option = OptionType, IsMulti extends boolean =
118
122
  popperWrapperId: string;
119
123
  static defaultProps: {
120
124
  closeMenuOnSelect: boolean;
125
+ shouldCloseMenuOnTab: boolean;
121
126
  components: {};
122
127
  maxMenuHeight: number;
123
128
  maxMenuWidth: number;
@@ -5,5 +5,11 @@
5
5
  import { jsx } from '@emotion/react';
6
6
  import { type MultiValueRemoveProps } from '../types';
7
7
  export { ClearIndicator, DropdownIndicator, LoadingIndicator } from './indicators';
8
+ /**
9
+ * __Multi value remove__
10
+ *
11
+ * The icon used to remove individual selections from a multi-select.
12
+ *
13
+ */
8
14
  export declare const MultiValueRemove: (props: MultiValueRemoveProps<any>) => jsx.JSX.Element;
9
15
  export declare const IndicatorSeparator: null;
@@ -1,9 +1,11 @@
1
1
  /// <reference types="react" />
2
- /**
3
- * @jsxRuntime classic
4
- * @jsx jsx
5
- */
6
2
  import { jsx } from '@emotion/react';
7
3
  import { type OptionProps, type OptionType } from '../types';
4
+ /**
5
+ * __Checkbox option__
6
+ */
8
7
  export declare const CheckboxOption: <OptionT extends OptionType>(props: OptionProps<OptionT, true>) => JSX.Element;
8
+ /**
9
+ * __Radio option__
10
+ */
9
11
  export declare const RadioOption: <OptionT extends OptionType>(props: OptionProps<OptionT, false>) => jsx.JSX.Element;
@@ -18,6 +18,10 @@ export interface PopupSelectProps<Option = OptionType, IsMulti extends boolean =
18
18
  * Defines whether the menu should close when selected. The default is `true`.
19
19
  */
20
20
  closeMenuOnSelect?: boolean;
21
+ /**
22
+ * Defines whether the menu should be closed by pressing the Tab key. The default is `true`.
23
+ */
24
+ shouldCloseMenuOnTab?: boolean;
21
25
  /**
22
26
  * The footer content shown at the bottom of the popup, underneath the select options.
23
27
  */
@@ -118,6 +122,7 @@ export default class PopupSelect<Option = OptionType, IsMulti extends boolean =
118
122
  popperWrapperId: string;
119
123
  static defaultProps: {
120
124
  closeMenuOnSelect: boolean;
125
+ shouldCloseMenuOnTab: boolean;
121
126
  components: {};
122
127
  maxMenuHeight: number;
123
128
  maxMenuWidth: number;
@@ -5,5 +5,11 @@
5
5
  import { jsx } from '@emotion/react';
6
6
  import { type MultiValueRemoveProps } from '../types';
7
7
  export { ClearIndicator, DropdownIndicator, LoadingIndicator } from './indicators';
8
+ /**
9
+ * __Multi value remove__
10
+ *
11
+ * The icon used to remove individual selections from a multi-select.
12
+ *
13
+ */
8
14
  export declare const MultiValueRemove: (props: MultiValueRemoveProps<any>) => jsx.JSX.Element;
9
15
  export declare const IndicatorSeparator: null;
@@ -1,9 +1,11 @@
1
1
  /// <reference types="react" />
2
- /**
3
- * @jsxRuntime classic
4
- * @jsx jsx
5
- */
6
2
  import { jsx } from '@emotion/react';
7
3
  import { type OptionProps, type OptionType } from '../types';
4
+ /**
5
+ * __Checkbox option__
6
+ */
8
7
  export declare const CheckboxOption: <OptionT extends OptionType>(props: OptionProps<OptionT, true>) => JSX.Element;
8
+ /**
9
+ * __Radio option__
10
+ */
9
11
  export declare const RadioOption: <OptionT extends OptionType>(props: OptionProps<OptionT, false>) => jsx.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/select",
3
- "version": "17.15.1",
3
+ "version": "17.16.0",
4
4
  "description": "Select allows users to make a single selection or multiple selections from a list of options.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -24,10 +24,6 @@
24
24
  "atlaskit:src": "src/index.tsx",
25
25
  "atlassian": {
26
26
  "team": "Design System Team",
27
- "releaseModel": "continuous",
28
- "productPushConsumption": [
29
- "jira"
30
- ],
31
27
  "website": {
32
28
  "name": "Select",
33
29
  "category": "Components"
@@ -43,9 +39,9 @@
43
39
  },
44
40
  "dependencies": {
45
41
  "@atlaskit/analytics-next": "^10.1.0",
46
- "@atlaskit/icon": "^22.14.0",
42
+ "@atlaskit/icon": "^22.16.0",
47
43
  "@atlaskit/platform-feature-flags": "^0.3.0",
48
- "@atlaskit/primitives": "^12.0.0",
44
+ "@atlaskit/primitives": "^12.1.0",
49
45
  "@atlaskit/spinner": "^16.3.0",
50
46
  "@atlaskit/theme": "^13.0.0",
51
47
  "@atlaskit/tokens": "^1.59.0",
@@ -69,7 +65,7 @@
69
65
  "@af/accessibility-testing": "*",
70
66
  "@af/integration-testing": "*",
71
67
  "@af/visual-regression": "*",
72
- "@atlaskit/checkbox": "^13.7.0",
68
+ "@atlaskit/checkbox": "^14.0.0",
73
69
  "@atlaskit/ds-lib": "^2.5.0",
74
70
  "@atlaskit/modal-dialog": "^12.15.0",
75
71
  "@atlaskit/radio": "^6.5.0",
@@ -84,7 +80,6 @@
84
80
  "jscodeshift": "^0.13.0",
85
81
  "react-dom": "^16.8.0",
86
82
  "react-select-event": "^5.5.0",
87
- "react-test-renderer": "^16.8.0",
88
83
  "react-value": "^0.2.0",
89
84
  "typescript": "~5.4.2",
90
85
  "wait-for-expect": "^1.2.0"
@@ -106,6 +101,12 @@
106
101
  "platform-feature-flags": {
107
102
  "platform-design-system-dsp-19701-no-node-resolver": {
108
103
  "type": "boolean"
104
+ },
105
+ "platform-component-visual-refresh": {
106
+ "type": "boolean"
107
+ },
108
+ "tab-event-should-close-popupSelect": {
109
+ "type": "boolean"
109
110
  }
110
111
  },
111
112
  "homepage": "https://atlassian.design/components/select/"