@atlaskit/select 17.15.2 → 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,13 @@
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
+
3
11
  ## 17.15.2
4
12
 
5
13
  ### Patch Changes
@@ -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.2";
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)({
@@ -29,6 +29,7 @@ var _reactSelect = require("react-select");
29
29
  var _selectClear = _interopRequireDefault(require("@atlaskit/icon/glyph/select-clear"));
30
30
  var _cross = _interopRequireDefault(require("@atlaskit/icon/utility/cross"));
31
31
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
32
+ var _primitives = require("@atlaskit/primitives");
32
33
  var _indicators = require("./indicators");
33
34
  /**
34
35
  * @jsxRuntime classic
@@ -42,6 +43,16 @@ var disabledStyles = (0, _react.css)({
42
43
  var enabledStyles = (0, _react.css)({
43
44
  display: 'inherit'
44
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
+ */
45
56
  var MultiValueRemove = exports.MultiValueRemove = function MultiValueRemove(props) {
46
57
  var isDisabled = props.selectProps.isDisabled;
47
58
  return (0, _react.jsx)(_reactSelect.components.MultiValueRemove, props, (0, _react.jsx)("div", {
@@ -51,11 +62,16 @@ var MultiValueRemove = exports.MultiValueRemove = function MultiValueRemove(prop
51
62
  // eslint-disable-next-line @atlaskit/design-system/ensure-icon-color
52
63
  (0, _react.jsx)(_cross.default, {
53
64
  label: "Clear"
54
- }) : (0, _react.jsx)(_selectClear.default, {
65
+ }) : (0, _react.jsx)(_primitives.Inline, {
66
+ xcss: iconWrapperStyles
67
+ }, (0, _react.jsx)(_cross.default, {
55
68
  label: "Clear",
56
- size: "small",
57
- primaryColor: "transparent",
58
- secondaryColor: "inherit"
59
- })));
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
+ }))));
60
76
  };
61
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
  };
@@ -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.2";
5
+ const packageVersion = "17.16.0";
6
6
  export const SelectWithoutAnalytics = createSelect(ReactSelect);
7
7
  const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
8
8
  const Select = withAnalyticsContext({
@@ -5,9 +5,10 @@
5
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
6
  import { css, jsx } from '@emotion/react';
7
7
  import { components } from 'react-select';
8
- import SelectClearIcon from '@atlaskit/icon/glyph/select-clear';
8
+ import LegacySelectClearIcon from '@atlaskit/icon/glyph/select-clear';
9
9
  import CrossIcon from '@atlaskit/icon/utility/cross';
10
10
  import { fg } from '@atlaskit/platform-feature-flags';
11
+ import { Inline, xcss } from '@atlaskit/primitives';
11
12
  export { ClearIndicator, DropdownIndicator, LoadingIndicator } from './indicators';
12
13
  const disabledStyles = css({
13
14
  display: 'none'
@@ -15,6 +16,16 @@ const disabledStyles = css({
15
16
  const enabledStyles = css({
16
17
  display: 'inherit'
17
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
+ */
18
29
  export const MultiValueRemove = props => {
19
30
  const {
20
31
  isDisabled
@@ -26,11 +37,16 @@ export const MultiValueRemove = props => {
26
37
  // eslint-disable-next-line @atlaskit/design-system/ensure-icon-color
27
38
  jsx(CrossIcon, {
28
39
  label: "Clear"
29
- }) : jsx(SelectClearIcon, {
40
+ }) : jsx(Inline, {
41
+ xcss: iconWrapperStyles
42
+ }, jsx(CrossIcon, {
30
43
  label: "Clear",
31
- size: "small",
32
- primaryColor: "transparent",
33
- secondaryColor: "inherit"
34
- })));
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
+ }))));
35
51
  };
36
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));
@@ -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.2";
5
+ var packageVersion = "17.16.0";
6
6
  export var SelectWithoutAnalytics = createSelect(ReactSelect);
7
7
  var createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
8
8
  var Select = withAnalyticsContext({
@@ -5,9 +5,10 @@
5
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
6
  import { css, jsx } from '@emotion/react';
7
7
  import { components } from 'react-select';
8
- import SelectClearIcon from '@atlaskit/icon/glyph/select-clear';
8
+ import LegacySelectClearIcon from '@atlaskit/icon/glyph/select-clear';
9
9
  import CrossIcon from '@atlaskit/icon/utility/cross';
10
10
  import { fg } from '@atlaskit/platform-feature-flags';
11
+ import { Inline, xcss } from '@atlaskit/primitives';
11
12
  export { ClearIndicator, DropdownIndicator, LoadingIndicator } from './indicators';
12
13
  var disabledStyles = css({
13
14
  display: 'none'
@@ -15,6 +16,16 @@ var disabledStyles = css({
15
16
  var enabledStyles = css({
16
17
  display: 'inherit'
17
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
+ */
18
29
  export var MultiValueRemove = function MultiValueRemove(props) {
19
30
  var isDisabled = props.selectProps.isDisabled;
20
31
  return jsx(components.MultiValueRemove, props, jsx("div", {
@@ -24,11 +35,16 @@ export var MultiValueRemove = function MultiValueRemove(props) {
24
35
  // eslint-disable-next-line @atlaskit/design-system/ensure-icon-color
25
36
  jsx(CrossIcon, {
26
37
  label: "Clear"
27
- }) : jsx(SelectClearIcon, {
38
+ }) : jsx(Inline, {
39
+ xcss: iconWrapperStyles
40
+ }, jsx(CrossIcon, {
28
41
  label: "Clear",
29
- size: "small",
30
- primaryColor: "transparent",
31
- secondaryColor: "inherit"
32
- })));
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
+ }))));
33
49
  };
34
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
  };
@@ -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;
@@ -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.2",
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/"
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@atlaskit/analytics-next": "^10.1.0",
42
- "@atlaskit/icon": "^22.15.0",
42
+ "@atlaskit/icon": "^22.16.0",
43
43
  "@atlaskit/platform-feature-flags": "^0.3.0",
44
44
  "@atlaskit/primitives": "^12.1.0",
45
45
  "@atlaskit/spinner": "^16.3.0",
@@ -65,7 +65,7 @@
65
65
  "@af/accessibility-testing": "*",
66
66
  "@af/integration-testing": "*",
67
67
  "@af/visual-regression": "*",
68
- "@atlaskit/checkbox": "^13.7.0",
68
+ "@atlaskit/checkbox": "^14.0.0",
69
69
  "@atlaskit/ds-lib": "^2.5.0",
70
70
  "@atlaskit/modal-dialog": "^12.15.0",
71
71
  "@atlaskit/radio": "^6.5.0",