@atlaskit/select 15.5.0 → 15.6.2
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 +18 -0
- package/dist/cjs/PopupSelect/PopupSelect.js +1 -1
- package/dist/cjs/Select.js +1 -1
- package/dist/cjs/createSelect.js +3 -2
- package/dist/cjs/styles.js +19 -14
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/PopupSelect/PopupSelect.js +1 -1
- package/dist/es2019/Select.js +1 -1
- package/dist/es2019/createSelect.js +2 -1
- package/dist/es2019/styles.js +19 -14
- package/dist/es2019/version.json +1 -1
- package/dist/esm/PopupSelect/PopupSelect.js +1 -1
- package/dist/esm/Select.js +1 -1
- package/dist/esm/createSelect.js +3 -2
- package/dist/esm/styles.js +19 -14
- package/dist/esm/version.json +1 -1
- package/dist/types/styles.d.ts +1 -1
- package/dist/types/types.d.ts +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/select
|
|
2
2
|
|
|
3
|
+
## 15.6.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`.
|
|
8
|
+
|
|
9
|
+
## 15.6.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`d9f112c7b09`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d9f112c7b09) - Reverts change to multiSelect's remove behaviour when using tokens, fixing issue with a pointer-events: none style
|
|
14
|
+
|
|
15
|
+
## 15.6.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- [`68cc8008851`](https://bitbucket.org/atlassian/atlassian-frontend/commits/68cc8008851) - [ux] Introduces appearance prop to component, with 'default', 'subtle' and 'none' variants
|
|
20
|
+
|
|
3
21
|
## 15.5.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
|
@@ -121,7 +121,7 @@ var PopupSelect = /*#__PURE__*/function (_PureComponent) {
|
|
|
121
121
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "targetRef", null);
|
|
122
122
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "unbindWindowClick", null);
|
|
123
123
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "unbindWindowKeydown", null);
|
|
124
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "defaultStyles", (0, _reactSelect.mergeStyles)((0, _styles.default)(_this.props.validationState, _this.props.spacing === 'compact'), {
|
|
124
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "defaultStyles", (0, _reactSelect.mergeStyles)((0, _styles.default)(_this.props.validationState, _this.props.spacing === 'compact', 'default'), {
|
|
125
125
|
groupHeading: function groupHeading(provided) {
|
|
126
126
|
return _objectSpread(_objectSpread({}, provided), {}, {
|
|
127
127
|
color: "var(--ds-text-subtlest, ".concat(_colors.N80, ")")
|
package/dist/cjs/Select.js
CHANGED
|
@@ -14,7 +14,7 @@ var _analyticsNext = require("@atlaskit/analytics-next");
|
|
|
14
14
|
var _createSelect = _interopRequireDefault(require("./createSelect"));
|
|
15
15
|
|
|
16
16
|
var packageName = "@atlaskit/select";
|
|
17
|
-
var packageVersion = "15.
|
|
17
|
+
var packageVersion = "15.6.2";
|
|
18
18
|
var SelectWithoutAnalytics = (0, _createSelect.default)(_reactSelect.default);
|
|
19
19
|
exports.SelectWithoutAnalytics = SelectWithoutAnalytics;
|
|
20
20
|
var createAndFireEventOnAtlaskit = (0, _analyticsNext.createAndFireEvent)('atlaskit');
|
package/dist/cjs/createSelect.js
CHANGED
|
@@ -41,7 +41,7 @@ var defaultComponents = _interopRequireWildcard(require("./components"));
|
|
|
41
41
|
|
|
42
42
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
43
43
|
|
|
44
|
-
var _excluded = ["styles", "validationState", "spacing", "isMulti"];
|
|
44
|
+
var _excluded = ["styles", "validationState", "spacing", "isMulti", "appearance"];
|
|
45
45
|
|
|
46
46
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
47
47
|
|
|
@@ -119,6 +119,7 @@ function createSelect(WrappedComponent) {
|
|
|
119
119
|
validationState = _this$props.validationState,
|
|
120
120
|
spacing = _this$props.spacing,
|
|
121
121
|
isMulti = _this$props.isMulti,
|
|
122
|
+
appearance = _this$props.appearance,
|
|
122
123
|
props = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
123
124
|
var isCompact = spacing === 'compact'; // props must be spread first to stop `components` being overridden
|
|
124
125
|
|
|
@@ -128,7 +129,7 @@ function createSelect(WrappedComponent) {
|
|
|
128
129
|
"aria-live": "assertive"
|
|
129
130
|
}, props, {
|
|
130
131
|
components: this.components,
|
|
131
|
-
styles: (0, _reactSelect.mergeStyles)((0, _styles.default)(validationState, isCompact), styles)
|
|
132
|
+
styles: (0, _reactSelect.mergeStyles)((0, _styles.default)(validationState, isCompact, this.props.appearance || 'default'), styles)
|
|
132
133
|
}));
|
|
133
134
|
}
|
|
134
135
|
}]);
|
package/dist/cjs/styles.js
CHANGED
|
@@ -21,7 +21,7 @@ var BORDER_WIDTH = 2;
|
|
|
21
21
|
var ICON_PADDING = 2;
|
|
22
22
|
var paddingExcludingBorder = (0, _constants.gridSize)() - BORDER_WIDTH;
|
|
23
23
|
|
|
24
|
-
function baseStyles(validationState, isCompact) {
|
|
24
|
+
function baseStyles(validationState, isCompact, appearance) {
|
|
25
25
|
return {
|
|
26
26
|
container: function container(css, _ref) {
|
|
27
27
|
var isDisabled = _ref.isDisabled;
|
|
@@ -69,6 +69,20 @@ function baseStyles(validationState, isCompact) {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
var transitionDuration = '200ms';
|
|
72
|
+
|
|
73
|
+
if (appearance === 'subtle') {
|
|
74
|
+
borderColor = isFocused ? "var(--ds-border-focused, ".concat(_colors.B100, ")") : 'transparent';
|
|
75
|
+
backgroundColor = isFocused ? "var(--ds-surface, ".concat(_colors.N0, ")") : 'transparent';
|
|
76
|
+
backgroundColorHover = isFocused ? "var(--ds-surface, ".concat(_colors.N0, ")") : "var(--ds-surface, ".concat(_colors.N30, ")");
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (appearance === 'none') {
|
|
80
|
+
borderColor = 'transparent';
|
|
81
|
+
backgroundColor = 'transparent';
|
|
82
|
+
backgroundColorHover = 'transparent';
|
|
83
|
+
borderColorHover = 'transparent';
|
|
84
|
+
}
|
|
85
|
+
|
|
72
86
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
73
87
|
// Turn pointer events off when disabled - this makes it so hover etc don't work.
|
|
74
88
|
pointerEvents: isDisabled ? 'none' : undefined,
|
|
@@ -234,16 +248,7 @@ function baseStyles(validationState, isCompact) {
|
|
|
234
248
|
'@media screen and (-ms-high-contrast: active)': {
|
|
235
249
|
border: isFocused ? '1px solid transparent' : 'none'
|
|
236
250
|
},
|
|
237
|
-
|
|
238
|
-
color: isFocused ? "var(--ds-text-selected, hsl(0, 0%, 20%))" : "var(--ds-text, hsl(0, 0%, 20%))",
|
|
239
|
-
':hover': {
|
|
240
|
-
backgroundColor: "var(--ds-background-danger-hovered, ".concat(_colors.N40, ")"),
|
|
241
|
-
color: "var(--ds-text-danger, inherit)"
|
|
242
|
-
},
|
|
243
|
-
':active': {
|
|
244
|
-
backgroundColor: "var(--ds-background-danger-pressed, ".concat(_colors.N40, ")"),
|
|
245
|
-
color: "var(--ds-text-danger, inherit)"
|
|
246
|
-
}
|
|
251
|
+
color: isFocused ? "var(--ds-text-selected, hsl(0, 0%, 20%))" : "var(--ds-text, hsl(0, 0%, 20%))"
|
|
247
252
|
});
|
|
248
253
|
},
|
|
249
254
|
multiValueLabel: function multiValueLabel(css, _ref8) {
|
|
@@ -257,18 +262,18 @@ function baseStyles(validationState, isCompact) {
|
|
|
257
262
|
multiValueRemove: function multiValueRemove(css, _ref9) {
|
|
258
263
|
var isFocused = _ref9.isFocused;
|
|
259
264
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
260
|
-
pointerEvents: 'auto',
|
|
261
265
|
backgroundColor: isFocused && "var(--ds-UNSAFE_util-transparent, ".concat(_colors.R75, ")"),
|
|
262
266
|
fill: isFocused ? "var(--ds-text-selected, #000)" : "var(--ds-text, #000)",
|
|
263
267
|
paddingLeft: '2px',
|
|
264
268
|
paddingRight: '2px',
|
|
265
269
|
borderRadius: '0px 2px 2px 0px',
|
|
270
|
+
// DSP-6470 we should style like Tag once we have the :has selector
|
|
266
271
|
':hover': {
|
|
267
|
-
backgroundColor: "var(--ds-
|
|
272
|
+
backgroundColor: "var(--ds-background-danger-hovered, ".concat(_colors.R75, ")"),
|
|
268
273
|
fill: "var(--ds-text-danger, #000)"
|
|
269
274
|
},
|
|
270
275
|
':active': {
|
|
271
|
-
backgroundColor: "var(--ds-
|
|
276
|
+
backgroundColor: "var(--ds-background-danger-pressed, ".concat(_colors.R75, ")"),
|
|
272
277
|
fill: "var(--ds-text-danger, #000)"
|
|
273
278
|
}
|
|
274
279
|
});
|
package/dist/cjs/version.json
CHANGED
|
@@ -59,7 +59,7 @@ export default class PopupSelect extends PureComponent {
|
|
|
59
59
|
|
|
60
60
|
_defineProperty(this, "unbindWindowKeydown", null);
|
|
61
61
|
|
|
62
|
-
_defineProperty(this, "defaultStyles", mergeStyles(baseStyles(this.props.validationState, this.props.spacing === 'compact'), {
|
|
62
|
+
_defineProperty(this, "defaultStyles", mergeStyles(baseStyles(this.props.validationState, this.props.spacing === 'compact', 'default'), {
|
|
63
63
|
groupHeading: provided => ({ ...provided,
|
|
64
64
|
color: `var(--ds-text-subtlest, ${N80})`
|
|
65
65
|
})
|
package/dist/es2019/Select.js
CHANGED
|
@@ -2,7 +2,7 @@ import Select 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 = "15.
|
|
5
|
+
const packageVersion = "15.6.2";
|
|
6
6
|
export const SelectWithoutAnalytics = createSelect(Select);
|
|
7
7
|
const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
|
|
8
8
|
export default withAnalyticsContext({
|
|
@@ -64,6 +64,7 @@ export default function createSelect(WrappedComponent) {
|
|
|
64
64
|
validationState,
|
|
65
65
|
spacing,
|
|
66
66
|
isMulti,
|
|
67
|
+
appearance,
|
|
67
68
|
...props
|
|
68
69
|
} = this.props;
|
|
69
70
|
const isCompact = spacing === 'compact'; // props must be spread first to stop `components` being overridden
|
|
@@ -74,7 +75,7 @@ export default function createSelect(WrappedComponent) {
|
|
|
74
75
|
"aria-live": "assertive"
|
|
75
76
|
}, props, {
|
|
76
77
|
components: this.components,
|
|
77
|
-
styles: mergeStyles(baseStyles(validationState, isCompact), styles)
|
|
78
|
+
styles: mergeStyles(baseStyles(validationState, isCompact, this.props.appearance || 'default'), styles)
|
|
78
79
|
}));
|
|
79
80
|
}
|
|
80
81
|
|
package/dist/es2019/styles.js
CHANGED
|
@@ -3,7 +3,7 @@ import { B100, B400, B50, G400, N0, N20, N200, N30, N300, N40, N500, N70, N800,
|
|
|
3
3
|
const BORDER_WIDTH = 2;
|
|
4
4
|
const ICON_PADDING = 2;
|
|
5
5
|
const paddingExcludingBorder = gridSize() - BORDER_WIDTH;
|
|
6
|
-
export default function baseStyles(validationState, isCompact) {
|
|
6
|
+
export default function baseStyles(validationState, isCompact, appearance) {
|
|
7
7
|
return {
|
|
8
8
|
container: (css, {
|
|
9
9
|
isDisabled
|
|
@@ -49,6 +49,20 @@ export default function baseStyles(validationState, isCompact) {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
const transitionDuration = '200ms';
|
|
52
|
+
|
|
53
|
+
if (appearance === 'subtle') {
|
|
54
|
+
borderColor = isFocused ? `var(--ds-border-focused, ${B100})` : 'transparent';
|
|
55
|
+
backgroundColor = isFocused ? `var(--ds-surface, ${N0})` : 'transparent';
|
|
56
|
+
backgroundColorHover = isFocused ? `var(--ds-surface, ${N0})` : `var(--ds-surface, ${N30})`;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (appearance === 'none') {
|
|
60
|
+
borderColor = 'transparent';
|
|
61
|
+
backgroundColor = 'transparent';
|
|
62
|
+
backgroundColorHover = 'transparent';
|
|
63
|
+
borderColorHover = 'transparent';
|
|
64
|
+
}
|
|
65
|
+
|
|
52
66
|
return { ...css,
|
|
53
67
|
// Turn pointer events off when disabled - this makes it so hover etc don't work.
|
|
54
68
|
pointerEvents: isDisabled ? 'none' : undefined,
|
|
@@ -203,16 +217,7 @@ export default function baseStyles(validationState, isCompact) {
|
|
|
203
217
|
'@media screen and (-ms-high-contrast: active)': {
|
|
204
218
|
border: isFocused ? '1px solid transparent' : 'none'
|
|
205
219
|
},
|
|
206
|
-
|
|
207
|
-
color: isFocused ? "var(--ds-text-selected, hsl(0, 0%, 20%))" : "var(--ds-text, hsl(0, 0%, 20%))",
|
|
208
|
-
':hover': {
|
|
209
|
-
backgroundColor: `var(--ds-background-danger-hovered, ${N40})`,
|
|
210
|
-
color: "var(--ds-text-danger, inherit)"
|
|
211
|
-
},
|
|
212
|
-
':active': {
|
|
213
|
-
backgroundColor: `var(--ds-background-danger-pressed, ${N40})`,
|
|
214
|
-
color: "var(--ds-text-danger, inherit)"
|
|
215
|
-
}
|
|
220
|
+
color: isFocused ? "var(--ds-text-selected, hsl(0, 0%, 20%))" : "var(--ds-text, hsl(0, 0%, 20%))"
|
|
216
221
|
}),
|
|
217
222
|
multiValueLabel: (css, {
|
|
218
223
|
isFocused
|
|
@@ -225,18 +230,18 @@ export default function baseStyles(validationState, isCompact) {
|
|
|
225
230
|
// @ts-ignore: missing in @types/react-select
|
|
226
231
|
isFocused
|
|
227
232
|
}) => ({ ...css,
|
|
228
|
-
pointerEvents: 'auto',
|
|
229
233
|
backgroundColor: isFocused && `var(--ds-UNSAFE_util-transparent, ${R75})`,
|
|
230
234
|
fill: isFocused ? "var(--ds-text-selected, #000)" : "var(--ds-text, #000)",
|
|
231
235
|
paddingLeft: '2px',
|
|
232
236
|
paddingRight: '2px',
|
|
233
237
|
borderRadius: '0px 2px 2px 0px',
|
|
238
|
+
// DSP-6470 we should style like Tag once we have the :has selector
|
|
234
239
|
':hover': {
|
|
235
|
-
backgroundColor: `var(--ds-
|
|
240
|
+
backgroundColor: `var(--ds-background-danger-hovered, ${R75})`,
|
|
236
241
|
fill: "var(--ds-text-danger, #000)"
|
|
237
242
|
},
|
|
238
243
|
':active': {
|
|
239
|
-
backgroundColor: `var(--ds-
|
|
244
|
+
backgroundColor: `var(--ds-background-danger-pressed, ${R75})`,
|
|
240
245
|
fill: "var(--ds-text-danger, #000)"
|
|
241
246
|
}
|
|
242
247
|
})
|
package/dist/es2019/version.json
CHANGED
|
@@ -92,7 +92,7 @@ var PopupSelect = /*#__PURE__*/function (_PureComponent) {
|
|
|
92
92
|
|
|
93
93
|
_defineProperty(_assertThisInitialized(_this), "unbindWindowKeydown", null);
|
|
94
94
|
|
|
95
|
-
_defineProperty(_assertThisInitialized(_this), "defaultStyles", mergeStyles(baseStyles(_this.props.validationState, _this.props.spacing === 'compact'), {
|
|
95
|
+
_defineProperty(_assertThisInitialized(_this), "defaultStyles", mergeStyles(baseStyles(_this.props.validationState, _this.props.spacing === 'compact', 'default'), {
|
|
96
96
|
groupHeading: function groupHeading(provided) {
|
|
97
97
|
return _objectSpread(_objectSpread({}, provided), {}, {
|
|
98
98
|
color: "var(--ds-text-subtlest, ".concat(N80, ")")
|
package/dist/esm/Select.js
CHANGED
|
@@ -2,7 +2,7 @@ import Select 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 = "15.
|
|
5
|
+
var packageVersion = "15.6.2";
|
|
6
6
|
export var SelectWithoutAnalytics = createSelect(Select);
|
|
7
7
|
var createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
|
|
8
8
|
export default withAnalyticsContext({
|
package/dist/esm/createSelect.js
CHANGED
|
@@ -8,7 +8,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
8
8
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
9
9
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
10
10
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
11
|
-
var _excluded = ["styles", "validationState", "spacing", "isMulti"];
|
|
11
|
+
var _excluded = ["styles", "validationState", "spacing", "isMulti", "appearance"];
|
|
12
12
|
|
|
13
13
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
14
14
|
|
|
@@ -94,6 +94,7 @@ export default function createSelect(WrappedComponent) {
|
|
|
94
94
|
validationState = _this$props.validationState,
|
|
95
95
|
spacing = _this$props.spacing,
|
|
96
96
|
isMulti = _this$props.isMulti,
|
|
97
|
+
appearance = _this$props.appearance,
|
|
97
98
|
props = _objectWithoutProperties(_this$props, _excluded);
|
|
98
99
|
|
|
99
100
|
var isCompact = spacing === 'compact'; // props must be spread first to stop `components` being overridden
|
|
@@ -104,7 +105,7 @@ export default function createSelect(WrappedComponent) {
|
|
|
104
105
|
"aria-live": "assertive"
|
|
105
106
|
}, props, {
|
|
106
107
|
components: this.components,
|
|
107
|
-
styles: mergeStyles(baseStyles(validationState, isCompact), styles)
|
|
108
|
+
styles: mergeStyles(baseStyles(validationState, isCompact, this.props.appearance || 'default'), styles)
|
|
108
109
|
}));
|
|
109
110
|
}
|
|
110
111
|
}]);
|
package/dist/esm/styles.js
CHANGED
|
@@ -9,7 +9,7 @@ import { B100, B400, B50, G400, N0, N20, N200, N30, N300, N40, N500, N70, N800,
|
|
|
9
9
|
var BORDER_WIDTH = 2;
|
|
10
10
|
var ICON_PADDING = 2;
|
|
11
11
|
var paddingExcludingBorder = gridSize() - BORDER_WIDTH;
|
|
12
|
-
export default function baseStyles(validationState, isCompact) {
|
|
12
|
+
export default function baseStyles(validationState, isCompact, appearance) {
|
|
13
13
|
return {
|
|
14
14
|
container: function container(css, _ref) {
|
|
15
15
|
var isDisabled = _ref.isDisabled;
|
|
@@ -57,6 +57,20 @@ export default function baseStyles(validationState, isCompact) {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
var transitionDuration = '200ms';
|
|
60
|
+
|
|
61
|
+
if (appearance === 'subtle') {
|
|
62
|
+
borderColor = isFocused ? "var(--ds-border-focused, ".concat(B100, ")") : 'transparent';
|
|
63
|
+
backgroundColor = isFocused ? "var(--ds-surface, ".concat(N0, ")") : 'transparent';
|
|
64
|
+
backgroundColorHover = isFocused ? "var(--ds-surface, ".concat(N0, ")") : "var(--ds-surface, ".concat(N30, ")");
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (appearance === 'none') {
|
|
68
|
+
borderColor = 'transparent';
|
|
69
|
+
backgroundColor = 'transparent';
|
|
70
|
+
backgroundColorHover = 'transparent';
|
|
71
|
+
borderColorHover = 'transparent';
|
|
72
|
+
}
|
|
73
|
+
|
|
60
74
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
61
75
|
// Turn pointer events off when disabled - this makes it so hover etc don't work.
|
|
62
76
|
pointerEvents: isDisabled ? 'none' : undefined,
|
|
@@ -222,16 +236,7 @@ export default function baseStyles(validationState, isCompact) {
|
|
|
222
236
|
'@media screen and (-ms-high-contrast: active)': {
|
|
223
237
|
border: isFocused ? '1px solid transparent' : 'none'
|
|
224
238
|
},
|
|
225
|
-
|
|
226
|
-
color: isFocused ? "var(--ds-text-selected, hsl(0, 0%, 20%))" : "var(--ds-text, hsl(0, 0%, 20%))",
|
|
227
|
-
':hover': {
|
|
228
|
-
backgroundColor: "var(--ds-background-danger-hovered, ".concat(N40, ")"),
|
|
229
|
-
color: "var(--ds-text-danger, inherit)"
|
|
230
|
-
},
|
|
231
|
-
':active': {
|
|
232
|
-
backgroundColor: "var(--ds-background-danger-pressed, ".concat(N40, ")"),
|
|
233
|
-
color: "var(--ds-text-danger, inherit)"
|
|
234
|
-
}
|
|
239
|
+
color: isFocused ? "var(--ds-text-selected, hsl(0, 0%, 20%))" : "var(--ds-text, hsl(0, 0%, 20%))"
|
|
235
240
|
});
|
|
236
241
|
},
|
|
237
242
|
multiValueLabel: function multiValueLabel(css, _ref8) {
|
|
@@ -245,18 +250,18 @@ export default function baseStyles(validationState, isCompact) {
|
|
|
245
250
|
multiValueRemove: function multiValueRemove(css, _ref9) {
|
|
246
251
|
var isFocused = _ref9.isFocused;
|
|
247
252
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
248
|
-
pointerEvents: 'auto',
|
|
249
253
|
backgroundColor: isFocused && "var(--ds-UNSAFE_util-transparent, ".concat(R75, ")"),
|
|
250
254
|
fill: isFocused ? "var(--ds-text-selected, #000)" : "var(--ds-text, #000)",
|
|
251
255
|
paddingLeft: '2px',
|
|
252
256
|
paddingRight: '2px',
|
|
253
257
|
borderRadius: '0px 2px 2px 0px',
|
|
258
|
+
// DSP-6470 we should style like Tag once we have the :has selector
|
|
254
259
|
':hover': {
|
|
255
|
-
backgroundColor: "var(--ds-
|
|
260
|
+
backgroundColor: "var(--ds-background-danger-hovered, ".concat(R75, ")"),
|
|
256
261
|
fill: "var(--ds-text-danger, #000)"
|
|
257
262
|
},
|
|
258
263
|
':active': {
|
|
259
|
-
backgroundColor: "var(--ds-
|
|
264
|
+
backgroundColor: "var(--ds-background-danger-pressed, ".concat(R75, ")"),
|
|
260
265
|
fill: "var(--ds-text-danger, #000)"
|
|
261
266
|
}
|
|
262
267
|
});
|
package/dist/esm/version.json
CHANGED
package/dist/types/styles.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { StylesConfig, ValidationState } from './types';
|
|
2
|
-
export default function baseStyles<Option, IsMulti extends boolean>(validationState: ValidationState, isCompact: boolean): StylesConfig<Option, IsMulti>;
|
|
2
|
+
export default function baseStyles<Option, IsMulti extends boolean>(validationState: ValidationState, isCompact: boolean, appearance: 'default' | 'subtle' | 'none'): StylesConfig<Option, IsMulti>;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export interface OptionProps<Option = OptionType, IsMulti extends boolean = fals
|
|
|
25
25
|
export interface SelectProps<OptionType, IsMulti extends boolean = false> extends ReactSelectProps<OptionType, IsMulti>, WithAnalyticsEventsProps {
|
|
26
26
|
spacing?: 'compact' | 'default';
|
|
27
27
|
validationState?: ValidationState;
|
|
28
|
+
appearance?: 'default' | 'subtle' | 'none';
|
|
28
29
|
}
|
|
29
30
|
export declare type ActionMeta<Option = OptionType> = RSActionMeta<Option>;
|
|
30
31
|
export declare type InputActionMeta = RSInputActionMeta;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/select",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.6.2",
|
|
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/"
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"jscodeshift": "^0.13.0",
|
|
72
72
|
"react-dom": "^16.8.0",
|
|
73
73
|
"react-value": "^0.2.0",
|
|
74
|
-
"typescript": "4.
|
|
74
|
+
"typescript": "4.3.5",
|
|
75
75
|
"wait-for-expect": "^1.2.0"
|
|
76
76
|
},
|
|
77
77
|
"techstack": {
|