@atlaskit/select 15.2.4 → 15.2.5
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 +7 -0
- package/dist/cjs/PopupSelect/PopupSelect.js +1 -3
- package/dist/cjs/PopupSelect/components.js +2 -4
- package/dist/cjs/Select.js +1 -1
- package/dist/cjs/components/input-options.js +34 -36
- package/dist/cjs/styles.js +37 -39
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/PopupSelect/PopupSelect.js +1 -2
- package/dist/es2019/PopupSelect/components.js +2 -3
- package/dist/es2019/Select.js +1 -1
- package/dist/es2019/components/input-options.js +34 -35
- package/dist/es2019/styles.js +37 -38
- package/dist/es2019/version.json +1 -1
- package/dist/esm/PopupSelect/PopupSelect.js +1 -2
- package/dist/esm/PopupSelect/components.js +2 -3
- package/dist/esm/Select.js +1 -1
- package/dist/esm/components/input-options.js +34 -35
- package/dist/esm/styles.js +37 -38
- package/dist/esm/version.json +1 -1
- package/package.json +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/select
|
|
2
2
|
|
|
3
|
+
## 15.2.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`f460cc7c411`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f460cc7c411) - Builds for this package now pass through a tokens babel plugin, removing runtime invocations of the tokens() function and improving bundle size.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 15.2.4
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -45,8 +45,6 @@ var _objects = _interopRequireDefault(require("shallow-equal/objects"));
|
|
|
45
45
|
|
|
46
46
|
var _colors = require("@atlaskit/theme/colors");
|
|
47
47
|
|
|
48
|
-
var _tokens = require("@atlaskit/tokens");
|
|
49
|
-
|
|
50
48
|
var _components = require("./components");
|
|
51
49
|
|
|
52
50
|
var _styles = _interopRequireDefault(require("../styles"));
|
|
@@ -119,7 +117,7 @@ var PopupSelect = /*#__PURE__*/function (_PureComponent) {
|
|
|
119
117
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "defaultStyles", (0, _reactSelect.mergeStyles)((0, _styles.default)(_this.props.validationState, _this.props.spacing === 'compact'), {
|
|
120
118
|
groupHeading: function groupHeading(provided) {
|
|
121
119
|
return _objectSpread(_objectSpread({}, provided), {}, {
|
|
122
|
-
color: (
|
|
120
|
+
color: "var(--ds-text-lowEmphasis, ".concat(_colors.N80, ")")
|
|
123
121
|
});
|
|
124
122
|
}
|
|
125
123
|
}));
|
|
@@ -21,8 +21,6 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
21
21
|
|
|
22
22
|
var _colors = require("@atlaskit/theme/colors");
|
|
23
23
|
|
|
24
|
-
var _tokens = require("@atlaskit/tokens");
|
|
25
|
-
|
|
26
24
|
/** @jsx jsx */
|
|
27
25
|
var MenuDialog = function MenuDialog(_ref) {
|
|
28
26
|
var maxWidth = _ref.maxWidth,
|
|
@@ -32,9 +30,9 @@ var MenuDialog = function MenuDialog(_ref) {
|
|
|
32
30
|
style = _ref.style;
|
|
33
31
|
return (0, _core.jsx)("div", {
|
|
34
32
|
css: {
|
|
35
|
-
backgroundColor: (
|
|
33
|
+
backgroundColor: "var(--ds-background-overlay, white)",
|
|
36
34
|
borderRadius: 4,
|
|
37
|
-
boxShadow: (
|
|
35
|
+
boxShadow: "var(--ds-overlay, ".concat("0 0 0 1px ".concat(_colors.N40A, ", 0 4px 11px ").concat(_colors.N40A), ")"),
|
|
38
36
|
maxWidth: maxWidth,
|
|
39
37
|
minWidth: minWidth,
|
|
40
38
|
zIndex: _constants.layers.modal()
|
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.2.
|
|
17
|
+
var packageVersion = "15.2.5";
|
|
18
18
|
var SelectWithoutAnalytics = (0, _createSelect.default)(_reactSelect.default);
|
|
19
19
|
exports.SelectWithoutAnalytics = SelectWithoutAnalytics;
|
|
20
20
|
var createAndFireEventOnAtlaskit = (0, _analyticsNext.createAndFireEvent)('atlaskit');
|
|
@@ -41,8 +41,6 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
41
41
|
|
|
42
42
|
var _colors = require("@atlaskit/theme/colors");
|
|
43
43
|
|
|
44
|
-
var _tokens = require("@atlaskit/tokens");
|
|
45
|
-
|
|
46
44
|
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); }; }
|
|
47
45
|
|
|
48
46
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
@@ -60,15 +58,15 @@ var getPrimitiveStyles = function getPrimitiveStyles(props) {
|
|
|
60
58
|
isSelected = props.isSelected;
|
|
61
59
|
var styles = {
|
|
62
60
|
alignItems: 'center',
|
|
63
|
-
backgroundColor: isFocused ? (
|
|
64
|
-
color: isDisabled ? (
|
|
61
|
+
backgroundColor: isFocused ? "var(--ds-background-transparentNeutral-hover, ".concat(_colors.N20, ")") : 'transparent',
|
|
62
|
+
color: isDisabled ? "var(--ds-text-disabled, inherit)" : 'inherit',
|
|
65
63
|
display: 'flex ',
|
|
66
64
|
paddingBottom: 4,
|
|
67
65
|
paddingLeft: "".concat((0, _constants.gridSize)() * 2, "px"),
|
|
68
66
|
paddingTop: 4,
|
|
69
|
-
boxShadow: isFocused ? "inset 2px 0px 0px ".concat((
|
|
67
|
+
boxShadow: isFocused ? "inset 2px 0px 0px ".concat("var(--ds-text-selected, ".concat(_colors.B400, ")"), ";") : '',
|
|
70
68
|
':active': {
|
|
71
|
-
backgroundColor: (
|
|
69
|
+
backgroundColor: "var(--ds-background-transparentNeutral-pressed, ".concat(_colors.N30, ")")
|
|
72
70
|
},
|
|
73
71
|
'@media screen and (-ms-high-contrast: active)': {
|
|
74
72
|
borderLeft: isFocused ? '2px solid transparent' : ''
|
|
@@ -89,8 +87,8 @@ var getPrimitiveStyles = function getPrimitiveStyles(props) {
|
|
|
89
87
|
|
|
90
88
|
|
|
91
89
|
var backgroundColor = (0, _components.themed)({
|
|
92
|
-
light: (
|
|
93
|
-
dark: (
|
|
90
|
+
light: "var(--ds-background-subtleNeutral-resting, ".concat(_colors.N0, ")"),
|
|
91
|
+
dark: "var(--ds-background-subtleNeutral-resting, ".concat(_colors.DN10, ")")
|
|
94
92
|
});
|
|
95
93
|
var transparent = (0, _components.themed)({
|
|
96
94
|
light: 'transparent',
|
|
@@ -108,38 +106,38 @@ var getPrimaryColor = function getPrimaryColor(_ref) {
|
|
|
108
106
|
|
|
109
107
|
if (isDisabled && isSelected) {
|
|
110
108
|
color = (0, _components.themed)({
|
|
111
|
-
light: (
|
|
112
|
-
dark: (
|
|
109
|
+
light: "var(--ds-background-disabled, ".concat(_colors.B75, ")"),
|
|
110
|
+
dark: "var(--ds-background-disabled, ".concat(_colors.DN200, ")")
|
|
113
111
|
});
|
|
114
112
|
} else if (isDisabled) {
|
|
115
113
|
color = (0, _components.themed)({
|
|
116
|
-
light: (
|
|
117
|
-
dark: (
|
|
114
|
+
light: "var(--ds-background-disabled, ".concat(_colors.N20A, ")"),
|
|
115
|
+
dark: "var(--ds-background-disabled, ".concat(_colors.DN10, ")")
|
|
118
116
|
});
|
|
119
117
|
} else if (isSelected && isActive) {
|
|
120
118
|
color = (0, _components.themed)({
|
|
121
|
-
light: (
|
|
122
|
-
dark: (
|
|
119
|
+
light: "var(--ds-background-boldBrand-pressed, ".concat(_colors.B75, ")"),
|
|
120
|
+
dark: "var(--ds-background-boldBrand-pressed, ".concat(_colors.B200, ")")
|
|
123
121
|
});
|
|
124
122
|
} else if (isActive) {
|
|
125
123
|
color = (0, _components.themed)({
|
|
126
|
-
light: (
|
|
127
|
-
dark: (
|
|
124
|
+
light: "var(--ds-background-subtleBrand-pressed, ".concat(_colors.B75, ")"),
|
|
125
|
+
dark: "var(--ds-background-subtleBrand-pressed, ".concat(_colors.B200, ")")
|
|
128
126
|
});
|
|
129
127
|
} else if (isFocused && isSelected) {
|
|
130
128
|
color = (0, _components.themed)({
|
|
131
|
-
light: (
|
|
132
|
-
dark: (
|
|
129
|
+
light: "var(--ds-background-boldBrand-hover, ".concat(_colors.B300, ")"),
|
|
130
|
+
dark: "var(--ds-background-boldBrand-hover, ".concat(_colors.B75, ")")
|
|
133
131
|
});
|
|
134
132
|
} else if (isFocused) {
|
|
135
133
|
color = (0, _components.themed)({
|
|
136
|
-
light: (
|
|
137
|
-
dark: (
|
|
134
|
+
light: "var(--ds-background-default, ".concat(_colors.N0, ")"),
|
|
135
|
+
dark: "var(--ds-background-default, ".concat(_colors.DN30, ")")
|
|
138
136
|
});
|
|
139
137
|
} else if (isSelected) {
|
|
140
138
|
color = (0, _components.themed)({
|
|
141
|
-
light: (
|
|
142
|
-
dark: (
|
|
139
|
+
light: "var(--ds-background-boldBrand-resting, ".concat(_colors.B400, ")"),
|
|
140
|
+
dark: "var(--ds-background-boldBrand-resting, ".concat(_colors.B100, ")")
|
|
143
141
|
});
|
|
144
142
|
}
|
|
145
143
|
|
|
@@ -153,19 +151,19 @@ var getSecondaryColor = function getSecondaryColor(_ref2) {
|
|
|
153
151
|
isSelected = _ref2.isSelected,
|
|
154
152
|
rest = (0, _objectWithoutProperties2.default)(_ref2, ["isActive", "isDisabled", "isSelected"]);
|
|
155
153
|
var color = (0, _components.themed)({
|
|
156
|
-
light: (
|
|
157
|
-
dark: (
|
|
154
|
+
light: "var(--ds-background-default, ".concat(_colors.N0, ")"),
|
|
155
|
+
dark: "var(--ds-background-default, ".concat(_colors.DN10, ")")
|
|
158
156
|
});
|
|
159
157
|
|
|
160
158
|
if (isDisabled && isSelected) {
|
|
161
159
|
color = (0, _components.themed)({
|
|
162
|
-
light: (
|
|
163
|
-
dark: (
|
|
160
|
+
light: "var(--ds-text-disabled, ".concat(_colors.N70, ")"),
|
|
161
|
+
dark: "var(--ds-text-disabled, ".concat(_colors.DN10, ")")
|
|
164
162
|
});
|
|
165
163
|
} else if (isActive && isSelected && !isDisabled) {
|
|
166
164
|
color = (0, _components.themed)({
|
|
167
|
-
light: (
|
|
168
|
-
dark: (
|
|
165
|
+
light: "var(--ds-background-default, ".concat(_colors.B400, ")"),
|
|
166
|
+
dark: "var(--ds-background-default, ".concat(_colors.DN10, ")")
|
|
169
167
|
});
|
|
170
168
|
} else if (!isSelected) {
|
|
171
169
|
color = transparent;
|
|
@@ -183,22 +181,22 @@ var getBorderColor = function getBorderColor(_ref3) {
|
|
|
183
181
|
rest = (0, _objectWithoutProperties2.default)(_ref3, ["isActive", "isDisabled", "isFocused", "isSelected"]);
|
|
184
182
|
|
|
185
183
|
if (isDisabled && isSelected) {
|
|
186
|
-
return (
|
|
184
|
+
return "var(--ds-background-disabled, ".concat(_colors.B400, ")");
|
|
187
185
|
} else if (isDisabled) {
|
|
188
|
-
return (
|
|
186
|
+
return "var(--ds-background-disabled, ".concat(_colors.N100, ")");
|
|
189
187
|
} else if (isSelected && isActive) {
|
|
190
|
-
return (
|
|
188
|
+
return "var(--ds-background-boldBrand-pressed, ".concat(_colors.B400, ")");
|
|
191
189
|
} else if (isActive) {
|
|
192
|
-
return (
|
|
190
|
+
return "var(--ds-background-boldBrand-resting, ".concat(_colors.B400, ")");
|
|
193
191
|
} else if (isFocused && isSelected) {
|
|
194
|
-
return (
|
|
192
|
+
return "var(--ds-background-boldBrand-hover, ".concat(_colors.B400, ")");
|
|
195
193
|
} else if (isFocused) {
|
|
196
|
-
return (
|
|
194
|
+
return "var(--ds-border-neutral, ".concat(_colors.N100, ")");
|
|
197
195
|
} else if (isSelected) {
|
|
198
|
-
return (
|
|
196
|
+
return "var(--ds-background-boldBrand-resting, ".concat(_colors.B400, ")");
|
|
199
197
|
}
|
|
200
198
|
|
|
201
|
-
return (
|
|
199
|
+
return "var(--ds-border-neutral, ".concat(_colors.N100, ")");
|
|
202
200
|
};
|
|
203
201
|
|
|
204
202
|
var ControlOption = /*#__PURE__*/function (_Component) {
|
package/dist/cjs/styles.js
CHANGED
|
@@ -13,8 +13,6 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
13
13
|
|
|
14
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
15
|
|
|
16
|
-
var _tokens = require("@atlaskit/tokens");
|
|
17
|
-
|
|
18
16
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
19
17
|
|
|
20
18
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
@@ -37,37 +35,37 @@ function baseStyles(validationState, isCompact) {
|
|
|
37
35
|
},
|
|
38
36
|
input: function input(css) {
|
|
39
37
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
40
|
-
color: (
|
|
38
|
+
color: "var(--ds-text-highEmphasis, hsl(0, 0%, 20%))"
|
|
41
39
|
});
|
|
42
40
|
},
|
|
43
41
|
control: function control(css, _ref2) {
|
|
44
42
|
var isFocused = _ref2.isFocused,
|
|
45
43
|
isDisabled = _ref2.isDisabled;
|
|
46
|
-
var borderColor = isFocused ? (
|
|
47
|
-
var backgroundColor = isFocused ? (
|
|
48
|
-
var backgroundColorHover = isFocused ? (
|
|
44
|
+
var borderColor = isFocused ? "var(--ds-border-focus, ".concat(_colors.B100, ")") : "var(--ds-border-neutral, ".concat(_colors.N20, ")");
|
|
45
|
+
var backgroundColor = isFocused ? "var(--ds-background-default, ".concat(_colors.N0, ")") : "var(--ds-background-subtleNeutral-resting, ".concat(_colors.N20, ")");
|
|
46
|
+
var backgroundColorHover = isFocused ? "var(--ds-background-default, ".concat(_colors.N0, ")") : "var(--ds-background-default, ".concat(_colors.N30, ")");
|
|
49
47
|
|
|
50
48
|
if (isDisabled) {
|
|
51
|
-
backgroundColor = (
|
|
52
|
-
borderColor = (
|
|
49
|
+
backgroundColor = "var(--ds-background-subtleNeutral-resting, ".concat(_colors.N20, ")");
|
|
50
|
+
borderColor = "var(--ds-background-disabled, ".concat(_colors.N20, ")");
|
|
53
51
|
}
|
|
54
52
|
|
|
55
53
|
if (validationState === 'error') {
|
|
56
|
-
borderColor = (
|
|
54
|
+
borderColor = "var(--ds-iconBorder-danger, ".concat(_colors.R400, ")");
|
|
57
55
|
}
|
|
58
56
|
|
|
59
57
|
if (validationState === 'success') {
|
|
60
|
-
borderColor = (
|
|
58
|
+
borderColor = "var(--ds-iconBorder-success, ".concat(_colors.G400, ")");
|
|
61
59
|
}
|
|
62
60
|
|
|
63
|
-
var borderColorHover = isFocused ? (
|
|
61
|
+
var borderColorHover = isFocused ? "var(--ds-border-focus, ".concat(_colors.B100, ")") : "var(--ds-border-neutral, ".concat(_colors.N30, ")");
|
|
64
62
|
|
|
65
63
|
if (validationState === 'error') {
|
|
66
|
-
borderColorHover = (
|
|
64
|
+
borderColorHover = "var(--ds-iconBorder-danger, ".concat(_colors.R400, ")");
|
|
67
65
|
}
|
|
68
66
|
|
|
69
67
|
if (validationState === 'success') {
|
|
70
|
-
borderColorHover = (
|
|
68
|
+
borderColorHover = "var(--ds-iconBorder-success, ".concat(_colors.G400, ")");
|
|
71
69
|
}
|
|
72
70
|
|
|
73
71
|
var transitionDuration = '200ms';
|
|
@@ -116,13 +114,13 @@ function baseStyles(validationState, isCompact) {
|
|
|
116
114
|
},
|
|
117
115
|
clearIndicator: function clearIndicator(css) {
|
|
118
116
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
119
|
-
color: (
|
|
117
|
+
color: "var(--ds-text-lowEmphasis, ".concat(_colors.N70, ")"),
|
|
120
118
|
paddingLeft: ICON_PADDING,
|
|
121
119
|
paddingRight: ICON_PADDING,
|
|
122
120
|
paddingBottom: isCompact ? 0 : 6,
|
|
123
121
|
paddingTop: isCompact ? 0 : 6,
|
|
124
122
|
':hover': {
|
|
125
|
-
color: (
|
|
123
|
+
color: "var(--ds-text-mediumEmphasis, ".concat(_colors.N500, ")")
|
|
126
124
|
}
|
|
127
125
|
});
|
|
128
126
|
},
|
|
@@ -134,10 +132,10 @@ function baseStyles(validationState, isCompact) {
|
|
|
134
132
|
},
|
|
135
133
|
dropdownIndicator: function dropdownIndicator(css, _ref3) {
|
|
136
134
|
var isDisabled = _ref3.isDisabled;
|
|
137
|
-
var color = (
|
|
135
|
+
var color = "var(--ds-text-mediumEmphasis, ".concat(_colors.N500, ")");
|
|
138
136
|
|
|
139
137
|
if (isDisabled) {
|
|
140
|
-
color = (
|
|
138
|
+
color = "var(--ds-text-disabled, ".concat(_colors.N70, ")");
|
|
141
139
|
}
|
|
142
140
|
|
|
143
141
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
@@ -147,7 +145,7 @@ function baseStyles(validationState, isCompact) {
|
|
|
147
145
|
paddingBottom: isCompact ? 0 : 6,
|
|
148
146
|
paddingTop: isCompact ? 0 : 6,
|
|
149
147
|
':hover': {
|
|
150
|
-
color: (
|
|
148
|
+
color: "var(--ds-text-mediumEmphasis, ".concat(_colors.N200, ")")
|
|
151
149
|
}
|
|
152
150
|
});
|
|
153
151
|
},
|
|
@@ -160,12 +158,12 @@ function baseStyles(validationState, isCompact) {
|
|
|
160
158
|
var isFocused = _ref4.isFocused,
|
|
161
159
|
isSelected = _ref4.isSelected,
|
|
162
160
|
isDisabled = _ref4.isDisabled;
|
|
163
|
-
var color = (
|
|
161
|
+
var color = "var(--ds-text-highEmphasis, ".concat(_colors.N800, ")");
|
|
164
162
|
|
|
165
163
|
if (isDisabled) {
|
|
166
|
-
color = (
|
|
164
|
+
color = "var(--ds-text-disabled, ".concat(_colors.N70, ")");
|
|
167
165
|
} else if (isSelected) {
|
|
168
|
-
color = (
|
|
166
|
+
color = "var(--ds-text-selected, ".concat(_colors.B400, ")");
|
|
169
167
|
}
|
|
170
168
|
|
|
171
169
|
var boxShadow;
|
|
@@ -174,15 +172,15 @@ function baseStyles(validationState, isCompact) {
|
|
|
174
172
|
if (isDisabled) {
|
|
175
173
|
backgroundColor = undefined;
|
|
176
174
|
} else if (isSelected && isFocused) {
|
|
177
|
-
backgroundColor = (
|
|
175
|
+
backgroundColor = "var(--ds-background-selected-hover, ".concat(_colors.B50, ")");
|
|
178
176
|
} else if (isSelected) {
|
|
179
|
-
backgroundColor = (
|
|
177
|
+
backgroundColor = "var(--ds-background-selected-resting, ".concat(_colors.B50, ")");
|
|
180
178
|
} else if (isFocused) {
|
|
181
|
-
backgroundColor = (
|
|
179
|
+
backgroundColor = "var(--ds-background-transparentNeutral-hover, ".concat(_colors.N20, ")");
|
|
182
180
|
}
|
|
183
181
|
|
|
184
182
|
if (!isDisabled && (isFocused || isSelected)) {
|
|
185
|
-
boxShadow = "inset 2px 0px 0px ".concat((
|
|
183
|
+
boxShadow = "inset 2px 0px 0px ".concat("var(--ds-text-selected, ".concat(_colors.B400, ")"));
|
|
186
184
|
}
|
|
187
185
|
|
|
188
186
|
var cursor = isDisabled ? 'not-allowed' : undefined;
|
|
@@ -193,7 +191,7 @@ function baseStyles(validationState, isCompact) {
|
|
|
193
191
|
cursor: cursor,
|
|
194
192
|
boxShadow: boxShadow,
|
|
195
193
|
':active': {
|
|
196
|
-
backgroundColor: !isDisabled ? isSelected ? (
|
|
194
|
+
backgroundColor: !isDisabled ? isSelected ? "var(--ds-background-selected-pressed, ".concat(_colors.N20, ")") : "var(--ds-background-transparentNeutral-pressed, ".concat(_colors.N30, ")") : undefined
|
|
197
195
|
},
|
|
198
196
|
'@media screen and (-ms-high-contrast: active)': {
|
|
199
197
|
borderLeft: !isDisabled && (isFocused || isSelected) ? '2px solid transparent' : ''
|
|
@@ -203,21 +201,21 @@ function baseStyles(validationState, isCompact) {
|
|
|
203
201
|
placeholder: function placeholder(css, _ref5) {
|
|
204
202
|
var isDisabled = _ref5.isDisabled;
|
|
205
203
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
206
|
-
color: isDisabled ? (
|
|
204
|
+
color: isDisabled ? "var(--ds-text-disabled, ".concat(_colors.N300, ")") : "var(--ds-text-lowEmphasis, ".concat(_colors.N300, ")")
|
|
207
205
|
});
|
|
208
206
|
},
|
|
209
207
|
singleValue: function singleValue(css, _ref6) {
|
|
210
208
|
var isDisabled = _ref6.isDisabled;
|
|
211
209
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
212
|
-
color: isDisabled ? (
|
|
210
|
+
color: isDisabled ? "var(--ds-text-disabled, ".concat(_colors.N70, ")") : "var(--ds-text-highEmphasis, ".concat(_colors.N800, ")"),
|
|
213
211
|
lineHeight: "".concat((0, _constants.gridSize)() * 2, "px") // 16px
|
|
214
212
|
|
|
215
213
|
});
|
|
216
214
|
},
|
|
217
215
|
menu: function menu(css) {
|
|
218
216
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
219
|
-
backgroundColor: (
|
|
220
|
-
boxShadow: (
|
|
217
|
+
backgroundColor: "var(--ds-background-overlay, white)",
|
|
218
|
+
boxShadow: "var(--ds-overlay, 0 0 0 1px hsl(0deg 0% 0% / 10%), 0 4px 11px hsl(0deg 0% 0% / 10%))"
|
|
221
219
|
});
|
|
222
220
|
},
|
|
223
221
|
menuList: function menuList(css) {
|
|
@@ -230,8 +228,8 @@ function baseStyles(validationState, isCompact) {
|
|
|
230
228
|
var isFocused = _ref7.isFocused;
|
|
231
229
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
232
230
|
borderRadius: '2px',
|
|
233
|
-
backgroundColor: isFocused ? (
|
|
234
|
-
boxShadow: isFocused ? "0 0 0 2px ".concat((
|
|
231
|
+
backgroundColor: isFocused ? "var(--ds-background-selected-resting, ".concat(_colors.N40, ")") : "var(--ds-background-transparentNeutral-hover, ".concat(_colors.N40, ")"),
|
|
232
|
+
boxShadow: isFocused ? "0 0 0 2px ".concat("var(--ds-background-default, transparent)", ", 0 0 0 4px ").concat("var(--ds-border-focus, transparent)") : 'none',
|
|
235
233
|
maxWidth: '100%',
|
|
236
234
|
'@media screen and (-ms-high-contrast: active)': {
|
|
237
235
|
border: isFocused ? '1px solid transparent' : 'none'
|
|
@@ -242,25 +240,25 @@ function baseStyles(validationState, isCompact) {
|
|
|
242
240
|
var isFocused = _ref8.isFocused;
|
|
243
241
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
244
242
|
padding: '2px',
|
|
245
|
-
color: isFocused ? (
|
|
243
|
+
color: isFocused ? "var(--ds-text-selected, hsl(0, 0%, 20%))" : "var(--ds-text-highEmphasis, hsl(0, 0%, 20%))",
|
|
246
244
|
paddingRight: '2px'
|
|
247
245
|
});
|
|
248
246
|
},
|
|
249
247
|
multiValueRemove: function multiValueRemove(css, _ref9) {
|
|
250
248
|
var isFocused = _ref9.isFocused;
|
|
251
249
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
252
|
-
backgroundColor: isFocused && (
|
|
253
|
-
fill: isFocused ? (
|
|
250
|
+
backgroundColor: isFocused && "var(--ds-background-selected-resting, ".concat(_colors.R75, ")"),
|
|
251
|
+
fill: isFocused ? "var(--ds-text-selected, #000)" : "var(--ds-text-highEmphasis, #000)",
|
|
254
252
|
paddingLeft: '2px',
|
|
255
253
|
paddingRight: '2px',
|
|
256
254
|
borderRadius: '0px 2px 2px 0px',
|
|
257
255
|
':hover': {
|
|
258
|
-
backgroundColor: (
|
|
259
|
-
fill: (
|
|
256
|
+
backgroundColor: "var(--ds-background-subtleDanger-hover, ".concat(_colors.R75, ")"),
|
|
257
|
+
fill: "var(--ds-text-danger, #000)"
|
|
260
258
|
},
|
|
261
259
|
':active': {
|
|
262
|
-
backgroundColor: (
|
|
263
|
-
fill: (
|
|
260
|
+
backgroundColor: "var(--ds-background-subtleDanger-pressed, ".concat(_colors.R75, ")"),
|
|
261
|
+
fill: "var(--ds-text-danger, #000)"
|
|
264
262
|
}
|
|
265
263
|
});
|
|
266
264
|
}
|
package/dist/cjs/version.json
CHANGED
|
@@ -9,7 +9,6 @@ import { Manager, Reference, Popper } from 'react-popper';
|
|
|
9
9
|
import NodeResolver from 'react-node-resolver';
|
|
10
10
|
import shallowEqualObjects from 'shallow-equal/objects';
|
|
11
11
|
import { N80 } from '@atlaskit/theme/colors';
|
|
12
|
-
import { token } from '@atlaskit/tokens';
|
|
13
12
|
import { MenuDialog, DummyControl, defaultComponents } from './components';
|
|
14
13
|
import baseStyles from '../styles';
|
|
15
14
|
|
|
@@ -57,7 +56,7 @@ export default class PopupSelect extends PureComponent {
|
|
|
57
56
|
|
|
58
57
|
_defineProperty(this, "defaultStyles", mergeStyles(baseStyles(this.props.validationState, this.props.spacing === 'compact'), {
|
|
59
58
|
groupHeading: provided => ({ ...provided,
|
|
60
|
-
color:
|
|
59
|
+
color: `var(--ds-text-lowEmphasis, ${N80})`
|
|
61
60
|
})
|
|
62
61
|
}));
|
|
63
62
|
|
|
@@ -6,7 +6,6 @@ import { jsx } from '@emotion/core';
|
|
|
6
6
|
import SearchIcon from '@atlaskit/icon/glyph/editor/search';
|
|
7
7
|
import { layers } from '@atlaskit/theme/constants';
|
|
8
8
|
import { N40A } from '@atlaskit/theme/colors';
|
|
9
|
-
import { token } from '@atlaskit/tokens';
|
|
10
9
|
export const MenuDialog = ({
|
|
11
10
|
maxWidth,
|
|
12
11
|
minWidth,
|
|
@@ -15,9 +14,9 @@ export const MenuDialog = ({
|
|
|
15
14
|
style
|
|
16
15
|
}) => jsx("div", {
|
|
17
16
|
css: {
|
|
18
|
-
backgroundColor:
|
|
17
|
+
backgroundColor: "var(--ds-background-overlay, white)",
|
|
19
18
|
borderRadius: 4,
|
|
20
|
-
boxShadow:
|
|
19
|
+
boxShadow: `var(--ds-overlay, ${`0 0 0 1px ${N40A}, 0 4px 11px ${N40A}`})`,
|
|
21
20
|
maxWidth,
|
|
22
21
|
minWidth,
|
|
23
22
|
zIndex: layers.modal()
|
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.2.
|
|
5
|
+
const packageVersion = "15.2.5";
|
|
6
6
|
export const SelectWithoutAnalytics = createSelect(Select);
|
|
7
7
|
const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
|
|
8
8
|
export default withAnalyticsContext({
|