@atlaskit/react-select 3.13.8 → 3.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/cjs/compiled/components/containers.js +1 -1
  3. package/dist/cjs/components/containers.compiled.css +6 -6
  4. package/dist/cjs/components/containers.js +3 -3
  5. package/dist/cjs/components/control.js +1 -1
  6. package/dist/cjs/components/group.js +1 -1
  7. package/dist/cjs/components/indicators.js +1 -1
  8. package/dist/cjs/components/input.js +1 -1
  9. package/dist/cjs/components/internal/a11y-text.js +1 -1
  10. package/dist/cjs/components/internal/dummy-input.js +1 -1
  11. package/dist/cjs/components/internal/required-input.js +1 -1
  12. package/dist/cjs/components/menu.js +1 -1
  13. package/dist/cjs/components/multi-value.compiled.css +36 -1
  14. package/dist/cjs/components/multi-value.js +115 -3
  15. package/dist/cjs/components/option.js +1 -1
  16. package/dist/cjs/components/placeholder.js +1 -1
  17. package/dist/cjs/components/single-value.js +1 -1
  18. package/dist/es2019/compiled/components/containers.js +1 -1
  19. package/dist/es2019/components/containers.compiled.css +6 -6
  20. package/dist/es2019/components/containers.js +3 -3
  21. package/dist/es2019/components/control.js +1 -1
  22. package/dist/es2019/components/group.js +1 -1
  23. package/dist/es2019/components/indicators.js +1 -1
  24. package/dist/es2019/components/input.js +1 -1
  25. package/dist/es2019/components/internal/a11y-text.js +1 -1
  26. package/dist/es2019/components/internal/dummy-input.js +1 -1
  27. package/dist/es2019/components/internal/required-input.js +1 -1
  28. package/dist/es2019/components/menu.js +1 -1
  29. package/dist/es2019/components/multi-value.compiled.css +36 -1
  30. package/dist/es2019/components/multi-value.js +117 -3
  31. package/dist/es2019/components/option.js +1 -1
  32. package/dist/es2019/components/placeholder.js +1 -1
  33. package/dist/es2019/components/single-value.js +1 -1
  34. package/dist/esm/compiled/components/containers.js +1 -1
  35. package/dist/esm/components/containers.compiled.css +6 -6
  36. package/dist/esm/components/containers.js +3 -3
  37. package/dist/esm/components/control.js +1 -1
  38. package/dist/esm/components/group.js +1 -1
  39. package/dist/esm/components/indicators.js +1 -1
  40. package/dist/esm/components/input.js +1 -1
  41. package/dist/esm/components/internal/a11y-text.js +1 -1
  42. package/dist/esm/components/internal/dummy-input.js +1 -1
  43. package/dist/esm/components/internal/required-input.js +1 -1
  44. package/dist/esm/components/menu.js +1 -1
  45. package/dist/esm/components/multi-value.compiled.css +36 -1
  46. package/dist/esm/components/multi-value.js +115 -3
  47. package/dist/esm/components/option.js +1 -1
  48. package/dist/esm/components/placeholder.js +1 -1
  49. package/dist/esm/components/single-value.js +1 -1
  50. package/package.json +9 -5
@@ -1,11 +1,47 @@
1
- /* multi-value.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* multi-value.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./multi-value.compiled.css";
4
4
  import * as React from 'react';
5
5
  import { ax, ix } from "@compiled/react/runtime";
6
6
  import { cx } from '@compiled/react';
7
7
  import CrossIcon from '@atlaskit/icon/core/cross';
8
+ import { fg } from '@atlaskit/platform-feature-flags';
9
+ import Tag from '@atlaskit/tag';
8
10
  import { getStyleProps } from '../utils';
11
+ // Tag wrapper: Tag has built-in margin; cancel the inline margin so we control spacing
12
+ const tagMarginToken = "var(--ds-space-050, 4px)";
13
+ const multiValueTagWrapperStyles = {
14
+ root: "_1e0c1txw _1ul9ze3t _1pfhv77o _12l21b66 _6rthv77o _p12f1osq",
15
+ inner: "_195g8ily"
16
+ };
17
+
18
+ // Tag-like color styles
19
+ const tagLikeColorStyles = {
20
+ gray: "_119b8yml",
21
+ blue: "_119b1w55",
22
+ green: "_119b1crs",
23
+ red: "_119b16y8",
24
+ yellow: "_119bfeiv",
25
+ purple: "_119b1hqq",
26
+ lime: "_119bnf89",
27
+ magenta: "_119buwd0",
28
+ orange: "_119b1b2s",
29
+ teal: "_119b1h3o"
30
+ };
31
+
32
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-important-styles, @atlaskit/ui-styling-standard/no-unsafe-values -- match TagNew border color logic
33
+ const tagLikeBorderFilterStyles = null;
34
+
35
+ // Tag-like styles for custom content values (not plain text) when FF is on.
36
+ // Mirrors the TagNew component's visual appearance (padding, margins, sizing, colors).
37
+ // The container uses tag-like styling while Label/Remove sub-components are preserved
38
+ // so custom overrides (e.g. custom aria-labels, rendering objects as data) continue to work.
39
+ const multiValueTagLikeStyles = {
40
+ root: "_1reo15vq _18m915vq _2rko12b0 _11c8wadc _1mouv77o _195gv77o _1dqonqa1 _189ee4h9 _1e0c116y _vchhusvi _kqswh2mm _4cvr1h6o _1ul9idpf _p12ff6dh _4t3i1k92 _bfhksm61 _syazi7uo _80om73ad _3yq3glyw",
41
+ labelWrapper: "_16jlidpf _1o9zkb7n _i0dl1wug _1reo15vq _18m915vq _11c8wadc _1e0c1txw _4cvr1h6o _1ul9ze3t _1tkeidpf _2a9v1kw7",
42
+ disabled: "_syaz1gmx _bfhki8nm",
43
+ focused: "_syaz1wum _bfhk1dpa _16qs7ex6 _1aewe4h9 _6up51j28 _1xdnnqa1"
44
+ };
9
45
  const multiValueStyles = {
10
46
  root: "_2rko12b0 _1h6d14je _1dqonqa1 _189ee4h9 _1e0c1txw _1ul9ze3t _1pfhv77o _12l2v77o _6rthv77o _ahbqv77o _bfhk1j9a _p12f1osq _syazjpor _3yq3glyw",
11
47
  disabled: "_syaz1gmx _bfhki8nm",
@@ -73,6 +109,13 @@ export function MultiValueRemove({
73
109
  size: "small"
74
110
  })));
75
111
  }
112
+ const getMultiValueLabelText = (children, data) => {
113
+ if (typeof children === 'string') {
114
+ return children;
115
+ }
116
+ const label = data === null || data === void 0 ? void 0 : data.label;
117
+ return typeof label === 'string' ? label : '';
118
+ };
76
119
  const MultiValue = props => {
77
120
  const {
78
121
  children,
@@ -90,7 +133,9 @@ const MultiValue = props => {
90
133
  Label,
91
134
  Remove
92
135
  } = components;
93
- const ariaLabel = typeof children === 'string' ? children : data.label;
136
+ const labelText = getMultiValueLabelText(children, data);
137
+ const isPlainLabel = typeof children === 'string';
138
+ const ffTagUplifts = fg('platform-dst-lozenge-tag-badge-visual-uplifts');
94
139
  const {
95
140
  css: containerCss,
96
141
  className: containerClassName
@@ -110,6 +155,75 @@ const MultiValue = props => {
110
155
  } = getStyleProps(props, 'multiValueRemove', {
111
156
  'multi-value__remove': true
112
157
  });
158
+ const hasCustomLabel = Label !== MultiValueLabel;
159
+ if (ffTagUplifts && isPlainLabel && !hasCustomLabel) {
160
+ const {
161
+ elemBefore,
162
+ color: tagColor
163
+ } = data !== null && data !== void 0 ? data : {};
164
+ return /*#__PURE__*/React.createElement("div", _extends({}, innerProps, {
165
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
166
+ className: ax([multiValueTagWrapperStyles.root, cx(props.className, containerClassName, props.xcss, '-multiValue')])
167
+ }), /*#__PURE__*/React.createElement("div", {
168
+ className: ax([multiValueTagWrapperStyles.inner])
169
+ }, /*#__PURE__*/React.createElement(Tag, {
170
+ text: labelText,
171
+ isRemovable: !isDisabled,
172
+ removeButtonLabel: `${labelText}, remove`,
173
+ onBeforeRemoveAction: () => {
174
+ var _removeProps$onClick;
175
+ (_removeProps$onClick = removeProps.onClick) === null || _removeProps$onClick === void 0 ? void 0 : _removeProps$onClick.call(removeProps, {});
176
+ return false;
177
+ },
178
+ color: tagColor !== null && tagColor !== void 0 ? tagColor : 'gray',
179
+ elemBefore: elemBefore
180
+ })));
181
+ }
182
+
183
+ // FF on + custom content or custom Label/Remove → tag-like container styling with the provided
184
+ // Label and Remove components so custom overrides continue to work.
185
+ if (ffTagUplifts) {
186
+ const colorKey = data === null || data === void 0 ? void 0 : data.color;
187
+ return /*#__PURE__*/React.createElement("div", _extends({
188
+ "data-multi-value-tag-like": "true"
189
+ }, innerProps, {
190
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- custom styles.multiValue overrides (e.g. colored borders) must be preserved
191
+ style: containerCss
192
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
193
+ ,
194
+ className: ax([multiValueTagLikeStyles.root, tagLikeColorStyles.gray, colorKey === 'blue' && tagLikeColorStyles.blue, colorKey === 'green' && tagLikeColorStyles.green, colorKey === 'red' && tagLikeColorStyles.red, colorKey === 'yellow' && tagLikeColorStyles.yellow, colorKey === 'purple' && tagLikeColorStyles.purple, colorKey === 'lime' && tagLikeColorStyles.lime, colorKey === 'magenta' && tagLikeColorStyles.magenta, colorKey === 'orange' && tagLikeColorStyles.orange, colorKey === 'teal' && tagLikeColorStyles.teal, "_1h6dpryq _1k671038 _13muu67f _oe6mmko7 _u8p61h4e _hg5mr3uz _1easrqqc", isDisabled && multiValueTagLikeStyles.disabled, isFocused && multiValueTagLikeStyles.focused, cx(props.className, containerClassName, props.xcss, '-multiValue')])
195
+ }), /*#__PURE__*/React.createElement("div", {
196
+ className: ax([multiValueTagLikeStyles.labelWrapper])
197
+ }, /*#__PURE__*/React.createElement(Label, {
198
+ data: data,
199
+ innerProps: {
200
+ style: labelCss,
201
+ className: labelClassName
202
+ }
203
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
204
+ ,
205
+ className: labelClassName,
206
+ hasEllipsis: cropWithEllipsis || cropWithEllipsis === undefined,
207
+ selectProps: selectProps
208
+ }, children)), /*#__PURE__*/React.createElement(Remove, {
209
+ data: data,
210
+ innerProps: {
211
+ style: removeCss,
212
+ className: removeClassName,
213
+ role: 'button',
214
+ tabIndex: -1,
215
+ 'aria-label': `${labelText || 'option'}, remove`,
216
+ ...removeProps
217
+ }
218
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
219
+ ,
220
+ className: removeClassName,
221
+ isDisabled: isDisabled,
222
+ selectProps: selectProps
223
+ }));
224
+ }
225
+
226
+ // FF off → default styles
113
227
  return /*#__PURE__*/React.createElement(Container, {
114
228
  data: data,
115
229
  innerProps: {
@@ -141,7 +255,7 @@ const MultiValue = props => {
141
255
  className: removeClassName,
142
256
  role: 'button',
143
257
  tabIndex: -1,
144
- 'aria-label': `${ariaLabel || 'option'}, remove`,
258
+ 'aria-label': `${labelText || 'option'}, remove`,
145
259
  ...removeProps
146
260
  }
147
261
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
@@ -1,4 +1,4 @@
1
- /* option.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* option.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./option.compiled.css";
4
4
  import * as React from 'react';
@@ -1,4 +1,4 @@
1
- /* placeholder.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* placeholder.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./placeholder.compiled.css";
4
4
  import * as React from 'react';
@@ -1,4 +1,4 @@
1
- /* single-value.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* single-value.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./single-value.compiled.css";
4
4
  import * as React from 'react';
@@ -1,4 +1,4 @@
1
- /* containers.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* containers.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./containers.compiled.css";
4
4
  import * as React from 'react';
@@ -1,25 +1,25 @@
1
1
  ._11c81d4k{font:var(--ds-font-body-large,normal 400 1pc/24px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
2
2
  ._16jlkb7n{flex-grow:1}
3
3
  ._18m915vq{overflow-y:hidden}
4
- ._19bv12x7{padding-left:var(--ds-space-075,6px)}
5
4
  ._1e0c11p5{display:grid}
6
5
  ._1e0c1txw{display:flex}
7
6
  ._1eim1xrj{direction:rtl}
8
7
  ._1n261g80{flex-wrap:wrap}
9
8
  ._1o9zidpf{flex-shrink:0}
10
9
  ._1o9zkb7n{flex-shrink:1}
10
+ ._1q51v77o{padding-block-start:var(--ds-space-025,2px)}
11
+ ._1q51ze3t{padding-block-start:var(--ds-space-0,0)}
11
12
  ._1reo15vq{overflow-x:hidden}
12
13
  ._1wpz1fhb{align-self:stretch}
13
14
  ._4cvr1h6o{align-items:center}
14
15
  ._80om13gf{cursor:not-allowed}
16
+ ._85i5v77o{padding-block-end:var(--ds-space-025,2px)}
17
+ ._85i5ze3t{padding-block-end:var(--ds-space-0,0)}
15
18
  ._8am5i4x0{-webkit-overflow-scrolling:touch}
16
- ._ca0qv77o{padding-top:var(--ds-space-025,2px)}
17
- ._ca0qze3t{padding-top:var(--ds-space-0,0)}
19
+ ._bozg12x7{padding-inline-start:var(--ds-space-075,6px)}
18
20
  ._i0dlf1ug{flex-basis:0%}
19
21
  ._kqswh2mm{position:relative}
20
22
  ._lcxv1rj4{pointer-events:all}
21
- ._n3tdv77o{padding-bottom:var(--ds-space-025,2px)}
22
- ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
23
- ._u5f312x7{padding-right:var(--ds-space-075,6px)}
23
+ ._y4ti12x7{padding-inline-end:var(--ds-space-075,6px)}
24
24
  ._y4ti1b66{padding-inline-end:var(--ds-space-050,4px)}
25
25
  @media (min-width:30rem){._1tn2fhey{font:var(--ds-font-body,normal 400 14px/20px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}}
@@ -1,4 +1,4 @@
1
- /* containers.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* containers.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./containers.compiled.css";
4
4
  import * as React from 'react';
@@ -49,9 +49,9 @@ export var valueContainerCSS = function valueContainerCSS() {
49
49
  return {};
50
50
  };
51
51
  var valueContainerStyles = {
52
- default: "_16jlkb7n _1o9zkb7n _i0dlf1ug _1reo15vq _18m915vq _4cvr1h6o _1e0c11p5 _1n261g80 _8am5i4x0 _kqswh2mm _ca0qv77o _u5f312x7 _n3tdv77o _19bv12x7",
52
+ default: "_16jlkb7n _1o9zkb7n _i0dlf1ug _1reo15vq _18m915vq _4cvr1h6o _1e0c11p5 _1n261g80 _8am5i4x0 _kqswh2mm _1q51v77o _y4ti12x7 _85i5v77o _bozg12x7",
53
53
  flex: "_1e0c1txw",
54
- compact: "_ca0qze3t _u5f312x7 _n3tdze3t _19bv12x7"
54
+ compact: "_1q51ze3t _y4ti12x7 _85i5ze3t _bozg12x7"
55
55
  };
56
56
 
57
57
  // eslint-disable-next-line @repo/internal/react/require-jsdoc
@@ -1,4 +1,4 @@
1
- /* control.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* control.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./control.compiled.css";
4
4
  import * as React from 'react';
@@ -1,4 +1,4 @@
1
- /* group.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* group.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  import _extends from "@babel/runtime/helpers/extends";
4
4
  var _excluded = ["data"];
@@ -1,4 +1,4 @@
1
- /* indicators.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* indicators.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  import _extends from "@babel/runtime/helpers/extends";
@@ -1,4 +1,4 @@
1
- /* input.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* input.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  var _excluded = ["innerRef", "isDisabled", "isHidden", "inputClassName", "testId"];
@@ -1,4 +1,4 @@
1
- /* a11y-text.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* a11y-text.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./a11y-text.compiled.css";
4
4
  import * as React from 'react';
@@ -1,4 +1,4 @@
1
- /* dummy-input.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* dummy-input.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  var _excluded = ["innerRef"];
@@ -1,4 +1,4 @@
1
- /* required-input.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* required-input.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./required-input.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* menu.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* menu.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  import _extends from "@babel/runtime/helpers/extends";
4
4
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
@@ -1,48 +1,83 @@
1
+
1
2
  ._11c8fhey{font:var(--ds-font-body,normal 400 14px/20px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
3
+ ._11c8wadc{font:var(--ds-font-body-small,normal 400 9pt/1pc "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
2
4
  ._19itglyw{border:none}
5
+ ._2a9v1kw7 *{font:inherit}
3
6
  ._2rko12b0{border-radius:var(--ds-radius-small,4px)}
4
7
  ._2rkolb4i{border-radius:var(--ds-radius-xsmall,2px)}
5
8
  ._189ee4h9{border-width:var(--ds-border-width,1px)}
9
+ ._195g8ily{margin-inline:calc(var(--ds-space-050, 4px)*-1)}
10
+ ._195gv77o{margin-inline:var(--ds-space-025,2px)}
6
11
  ._1dqonqa1{border-style:solid}
7
12
  ._1h6d14je{border-color:#b7b9be}
13
+ ._1h6dpryq{border-color:color-mix(in oklch,var(--tag-border-token) 100%,var(--cm-border-color) var(--cm-border-value))}
14
+ ._1mouv77o{margin-block:var(--ds-space-025,2px)}._119b16y8{--tag-border-token:var(--ds-border-accent-red,#e2483d)}
15
+ ._119b1b2s{--tag-border-token:var(--ds-border-accent-orange,#e06c00)}
16
+ ._119b1crs{--tag-border-token:var(--ds-border-accent-green,#22a06b)}
17
+ ._119b1h3o{--tag-border-token:var(--ds-border-accent-teal,#2898bd)}
18
+ ._119b1hqq{--tag-border-token:var(--ds-border-accent-purple,#af59e1)}
19
+ ._119b1w55{--tag-border-token:var(--ds-border-accent-blue,#357de8)}
20
+ ._119b8yml{--tag-border-token:var(--ds-border-accent-gray,#7d818a)}
21
+ ._119bfeiv{--tag-border-token:var(--ds-border-accent-yellow,#b38600)}
22
+ ._119bnf89{--tag-border-token:var(--ds-border-accent-lime,#6a9a23)}
23
+ ._119buwd0{--tag-border-token:var(--ds-border-accent-magenta,#cd519d)}
24
+ ._12l21b66{margin-inline-end:var(--ds-space-050,4px)}
8
25
  ._12l2v77o{margin-inline-end:var(--ds-space-025,2px)}
26
+ ._13muu67f{--cm-border-color:#fff}
27
+ ._16jlidpf{flex-grow:0}
9
28
  ._16qs7ex6{box-shadow:0 0 0 2px var(--ds-surface,transparent),0 0 0 4px var(--ds-border-focused,transparent)}
10
29
  ._18m915vq{overflow-y:hidden}
11
30
  ._1bah1h6o{justify-content:center}
12
31
  ._1bto1l2s{text-overflow:ellipsis}
32
+ ._1e0c116y{display:inline-flex}
13
33
  ._1e0c1kw7{display:inherit}
14
34
  ._1e0c1txw{display:flex}
15
35
  ._1e0cglyw{display:none}
36
+ ._1k671038{--border-l-factor:1.33}
37
+ ._1o9zkb7n{flex-shrink:1}
16
38
  ._1pfhv77o{margin-block-start:var(--ds-space-025,2px)}
17
39
  ._1q51v77o{padding-block-start:var(--ds-space-025,2px)}
18
40
  ._1reo15vq{overflow-x:hidden}
41
+ ._1tkeidpf{min-height:0}
42
+ ._1ul9idpf{min-width:0}
19
43
  ._1ul9ze3t{min-width:var(--ds-space-0,0)}
20
44
  ._1wpz1h6o{align-self:center}
21
45
  ._4cvr1h6o{align-items:center}
46
+ ._4t3i1k92{height:1.25rem}
22
47
  ._6rthv77o{margin-block-end:var(--ds-space-025,2px)}
48
+ ._80om73ad{cursor:default}
23
49
  ._85i5v77o{padding-block-end:var(--ds-space-025,2px)}
24
50
  ._ahbqv77o{margin-inline-start:var(--ds-space-025,2px)}
25
51
  ._bfhk15s3{background-color:var(--ds-background-selected,#e9f2fe)}
52
+ ._bfhk1dpa{background-color:var(--ds-background-neutral-subtle-hovered,#0515240f)}
26
53
  ._bfhk1j9a{background-color:var(--ds-background-input,#fff)}
27
54
  ._bfhkb1q9{background-color:var(--ds-UNSAFE-transparent,transparent)}
28
55
  ._bfhki8nm{background-color:var(--ds-background-neutral,#0515240f)}
29
56
  ._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
30
57
  ._bozg1b66{padding-inline-start:var(--ds-space-050,4px)}
31
58
  ._bozgv77o{padding-inline-start:var(--ds-space-025,2px)}
59
+ ._i0dl1wug{flex-basis:auto}
60
+ ._kqswh2mm{position:relative}
32
61
  ._lswu1dx5{fill:var(--ds-text,#000)}
33
62
  ._lswu1rrc{fill:var(--ds-text-selected,#000)}
34
63
  ._o5721q9c{white-space:nowrap}
64
+ ._oe6mmko7{--cm-border-value:45%}
35
65
  ._p12f1osq{max-width:100%}
66
+ ._p12ff6dh{max-width:11.25rem}
36
67
  ._r06hglyw{-webkit-appearance:none;appearance:none}
37
68
  ._syaz1gmx{color:var(--ds-text-disabled,#080f214a)}
38
69
  ._syaz1kw7{color:inherit}
39
70
  ._syaz1wum{color:var(--ds-text-selected,#333)}
40
71
  ._syazi7uo{color:var(--ds-text,#292a2e)}
41
72
  ._syazjpor{color:var(--ds-text,#333)}
73
+ ._vchhusvi{box-sizing:border-box}
42
74
  ._y4tiv77o{padding-inline-end:var(--ds-space-025,2px)}
75
+ [data-color-mode=dark] ._hg5mr3uz{--cm-border-color:#000}
76
+ [data-color-mode=dark] ._u8p61h4e{--border-l-factor:0.7}
43
77
  ._1ah312gs:focus-visible{outline-offset:-2px}
44
78
  ._13br1jjn:hover{fill:var(--ds-text-danger,#000)}
45
79
  ._irr31dpa:hover{background-color:var(--ds-background-neutral-subtle-hovered,#0515240f)}
46
80
  ._1di6fcek:active{background-color:var(--ds-background-neutral-subtle-pressed,#0b120e24)}
47
81
  ._i5f81jjn:active{fill:var(--ds-text-danger,#000)}
48
- @media screen and (-ms-high-contrast:active){._1aewe4h9{border-width:var(--ds-border-width,1px)}._6up51j28{border-color:transparent}._1xdnnqa1{border-style:solid}._3yq3glyw{border:none}}
82
+ @media screen and (-ms-high-contrast:active){._1aewe4h9{border-width:var(--ds-border-width,1px)}._6up51j28{border-color:transparent}._1xdnnqa1{border-style:solid}._3yq3glyw{border:none}}
83
+ @supports (color:oklch(from white l c h)){._1easrqqc{border-color:oklch(from var(--tag-border-token) calc(l * var(--border-l-factor)) c h)}}
@@ -1,4 +1,4 @@
1
- /* multi-value.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* multi-value.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _extends from "@babel/runtime/helpers/extends";
4
4
  import "./multi-value.compiled.css";
@@ -8,7 +8,43 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
8
8
  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; }
9
9
  import { cx } from '@compiled/react';
10
10
  import CrossIcon from '@atlaskit/icon/core/cross';
11
+ import { fg } from '@atlaskit/platform-feature-flags';
12
+ import Tag from '@atlaskit/tag';
11
13
  import { getStyleProps } from '../utils';
14
+ // Tag wrapper: Tag has built-in margin; cancel the inline margin so we control spacing
15
+ var tagMarginToken = "var(--ds-space-050, 4px)";
16
+ var multiValueTagWrapperStyles = {
17
+ root: "_1e0c1txw _1ul9ze3t _1pfhv77o _12l21b66 _6rthv77o _p12f1osq",
18
+ inner: "_195g8ily"
19
+ };
20
+
21
+ // Tag-like color styles
22
+ var tagLikeColorStyles = {
23
+ gray: "_119b8yml",
24
+ blue: "_119b1w55",
25
+ green: "_119b1crs",
26
+ red: "_119b16y8",
27
+ yellow: "_119bfeiv",
28
+ purple: "_119b1hqq",
29
+ lime: "_119bnf89",
30
+ magenta: "_119buwd0",
31
+ orange: "_119b1b2s",
32
+ teal: "_119b1h3o"
33
+ };
34
+
35
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-important-styles, @atlaskit/ui-styling-standard/no-unsafe-values -- match TagNew border color logic
36
+ var tagLikeBorderFilterStyles = null;
37
+
38
+ // Tag-like styles for custom content values (not plain text) when FF is on.
39
+ // Mirrors the TagNew component's visual appearance (padding, margins, sizing, colors).
40
+ // The container uses tag-like styling while Label/Remove sub-components are preserved
41
+ // so custom overrides (e.g. custom aria-labels, rendering objects as data) continue to work.
42
+ var multiValueTagLikeStyles = {
43
+ root: "_1reo15vq _18m915vq _2rko12b0 _11c8wadc _1mouv77o _195gv77o _1dqonqa1 _189ee4h9 _1e0c116y _vchhusvi _kqswh2mm _4cvr1h6o _1ul9idpf _p12ff6dh _4t3i1k92 _bfhksm61 _syazi7uo _80om73ad _3yq3glyw",
44
+ labelWrapper: "_16jlidpf _1o9zkb7n _i0dl1wug _1reo15vq _18m915vq _11c8wadc _1e0c1txw _4cvr1h6o _1ul9ze3t _1tkeidpf _2a9v1kw7",
45
+ disabled: "_syaz1gmx _bfhki8nm",
46
+ focused: "_syaz1wum _bfhk1dpa _16qs7ex6 _1aewe4h9 _6up51j28 _1xdnnqa1"
47
+ };
12
48
  var multiValueStyles = {
13
49
  root: "_2rko12b0 _1h6d14je _1dqonqa1 _189ee4h9 _1e0c1txw _1ul9ze3t _1pfhv77o _12l2v77o _6rthv77o _ahbqv77o _bfhk1j9a _p12f1osq _syazjpor _3yq3glyw",
14
50
  disabled: "_syaz1gmx _bfhki8nm",
@@ -79,6 +115,13 @@ export function MultiValueRemove(_ref3) {
79
115
  size: "small"
80
116
  })));
81
117
  }
118
+ var getMultiValueLabelText = function getMultiValueLabelText(children, data) {
119
+ if (typeof children === 'string') {
120
+ return children;
121
+ }
122
+ var label = data === null || data === void 0 ? void 0 : data.label;
123
+ return typeof label === 'string' ? label : '';
124
+ };
82
125
  var MultiValue = function MultiValue(props) {
83
126
  var children = props.children,
84
127
  components = props.components,
@@ -92,7 +135,9 @@ var MultiValue = function MultiValue(props) {
92
135
  var Container = components.Container,
93
136
  Label = components.Label,
94
137
  Remove = components.Remove;
95
- var ariaLabel = typeof children === 'string' ? children : data.label;
138
+ var labelText = getMultiValueLabelText(children, data);
139
+ var isPlainLabel = typeof children === 'string';
140
+ var ffTagUplifts = fg('platform-dst-lozenge-tag-badge-visual-uplifts');
96
141
  var _getStyleProps = getStyleProps(props, 'multiValue', {
97
142
  'multi-value': true,
98
143
  'multi-value--is-disabled': isDisabled
@@ -109,6 +154,73 @@ var MultiValue = function MultiValue(props) {
109
154
  }),
110
155
  removeCss = _getStyleProps3.css,
111
156
  removeClassName = _getStyleProps3.className;
157
+ var hasCustomLabel = Label !== MultiValueLabel;
158
+ if (ffTagUplifts && isPlainLabel && !hasCustomLabel) {
159
+ var _ref4 = data !== null && data !== void 0 ? data : {},
160
+ elemBefore = _ref4.elemBefore,
161
+ tagColor = _ref4.color;
162
+ return /*#__PURE__*/React.createElement("div", _extends({}, innerProps, {
163
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
164
+ className: ax([multiValueTagWrapperStyles.root, cx(props.className, containerClassName, props.xcss, '-multiValue')])
165
+ }), /*#__PURE__*/React.createElement("div", {
166
+ className: ax([multiValueTagWrapperStyles.inner])
167
+ }, /*#__PURE__*/React.createElement(Tag, {
168
+ text: labelText,
169
+ isRemovable: !isDisabled,
170
+ removeButtonLabel: "".concat(labelText, ", remove"),
171
+ onBeforeRemoveAction: function onBeforeRemoveAction() {
172
+ var _removeProps$onClick;
173
+ (_removeProps$onClick = removeProps.onClick) === null || _removeProps$onClick === void 0 || _removeProps$onClick.call(removeProps, {});
174
+ return false;
175
+ },
176
+ color: tagColor !== null && tagColor !== void 0 ? tagColor : 'gray',
177
+ elemBefore: elemBefore
178
+ })));
179
+ }
180
+
181
+ // FF on + custom content or custom Label/Remove → tag-like container styling with the provided
182
+ // Label and Remove components so custom overrides continue to work.
183
+ if (ffTagUplifts) {
184
+ var colorKey = data === null || data === void 0 ? void 0 : data.color;
185
+ return /*#__PURE__*/React.createElement("div", _extends({
186
+ "data-multi-value-tag-like": "true"
187
+ }, innerProps, {
188
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- custom styles.multiValue overrides (e.g. colored borders) must be preserved
189
+ style: containerCss
190
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
191
+ ,
192
+ className: ax([multiValueTagLikeStyles.root, tagLikeColorStyles.gray, colorKey === 'blue' && tagLikeColorStyles.blue, colorKey === 'green' && tagLikeColorStyles.green, colorKey === 'red' && tagLikeColorStyles.red, colorKey === 'yellow' && tagLikeColorStyles.yellow, colorKey === 'purple' && tagLikeColorStyles.purple, colorKey === 'lime' && tagLikeColorStyles.lime, colorKey === 'magenta' && tagLikeColorStyles.magenta, colorKey === 'orange' && tagLikeColorStyles.orange, colorKey === 'teal' && tagLikeColorStyles.teal, "_1h6dpryq _1k671038 _13muu67f _oe6mmko7 _u8p61h4e _hg5mr3uz _1easrqqc", isDisabled && multiValueTagLikeStyles.disabled, isFocused && multiValueTagLikeStyles.focused, cx(props.className, containerClassName, props.xcss, '-multiValue')])
193
+ }), /*#__PURE__*/React.createElement("div", {
194
+ className: ax([multiValueTagLikeStyles.labelWrapper])
195
+ }, /*#__PURE__*/React.createElement(Label, {
196
+ data: data,
197
+ innerProps: {
198
+ style: labelCss,
199
+ className: labelClassName
200
+ }
201
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
202
+ ,
203
+ className: labelClassName,
204
+ hasEllipsis: cropWithEllipsis || cropWithEllipsis === undefined,
205
+ selectProps: selectProps
206
+ }, children)), /*#__PURE__*/React.createElement(Remove, {
207
+ data: data,
208
+ innerProps: _objectSpread({
209
+ style: removeCss,
210
+ className: removeClassName,
211
+ role: 'button',
212
+ tabIndex: -1,
213
+ 'aria-label': "".concat(labelText || 'option', ", remove")
214
+ }, removeProps)
215
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
216
+ ,
217
+ className: removeClassName,
218
+ isDisabled: isDisabled,
219
+ selectProps: selectProps
220
+ }));
221
+ }
222
+
223
+ // FF off → default styles
112
224
  return /*#__PURE__*/React.createElement(Container, {
113
225
  data: data,
114
226
  innerProps: _objectSpread({
@@ -139,7 +251,7 @@ var MultiValue = function MultiValue(props) {
139
251
  className: removeClassName,
140
252
  role: 'button',
141
253
  tabIndex: -1,
142
- 'aria-label': "".concat(ariaLabel || 'option', ", remove")
254
+ 'aria-label': "".concat(labelText || 'option', ", remove")
143
255
  }, removeProps)
144
256
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
145
257
  ,
@@ -1,4 +1,4 @@
1
- /* option.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* option.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./option.compiled.css";
4
4
  import * as React from 'react';
@@ -1,4 +1,4 @@
1
- /* placeholder.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* placeholder.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./placeholder.compiled.css";
4
4
  import * as React from 'react';
@@ -1,4 +1,4 @@
1
- /* single-value.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* single-value.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./single-value.compiled.css";
4
4
  import * as React from 'react';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-select",
3
- "version": "3.13.8",
3
+ "version": "3.14.0",
4
4
  "description": "A forked version of react-select to only be used in atlaskit/select",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -20,15 +20,16 @@
20
20
  ],
21
21
  "atlaskit:src": "src/index.tsx",
22
22
  "dependencies": {
23
- "@atlaskit/ds-lib": "^5.3.0",
23
+ "@atlaskit/ds-lib": "^5.4.0",
24
24
  "@atlaskit/icon": "^32.0.0",
25
25
  "@atlaskit/layering": "^3.6.0",
26
26
  "@atlaskit/platform-feature-flags": "^1.1.0",
27
27
  "@atlaskit/primitives": "^18.0.0",
28
28
  "@atlaskit/spinner": "^19.0.0",
29
- "@atlaskit/tokens": "^11.0.0",
29
+ "@atlaskit/tag": "^14.5.0",
30
+ "@atlaskit/tokens": "^11.1.0",
30
31
  "@babel/runtime": "^7.0.0",
31
- "@compiled/react": "^0.18.6",
32
+ "@compiled/react": "^0.20.0",
32
33
  "@floating-ui/dom": "^1.0.1",
33
34
  "memoize-one": "^6.0.0",
34
35
  "use-isomorphic-layout-effect": "^1.1.2"
@@ -40,7 +41,7 @@
40
41
  "devDependencies": {
41
42
  "@af/accessibility-testing": "workspace:^",
42
43
  "@atlaskit/checkbox": "^17.3.0",
43
- "@atlaskit/form": "^15.3.0",
44
+ "@atlaskit/form": "^15.4.0",
44
45
  "@atlassian/feature-flags-test-utils": "^1.0.0",
45
46
  "@testing-library/react": "^16.3.0",
46
47
  "@testing-library/user-event": "^14.4.3",
@@ -61,6 +62,9 @@
61
62
  },
62
63
  "platform-dst-shape-theme-default": {
63
64
  "type": "boolean"
65
+ },
66
+ "platform-dst-lozenge-tag-badge-visual-uplifts": {
67
+ "type": "boolean"
64
68
  }
65
69
  },
66
70
  "techstack": {