@atlaskit/select 16.7.6 → 17.0.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 +10 -0
- package/dist/cjs/Select.js +1 -1
- package/dist/cjs/components/input-options.js +17 -64
- package/dist/es2019/Select.js +1 -1
- package/dist/es2019/components/input-options.js +15 -60
- package/dist/esm/Select.js +1 -1
- package/dist/esm/components/input-options.js +18 -65
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/select
|
|
2
2
|
|
|
3
|
+
## 17.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#41866](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41866) [`ed8b6957789`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ed8b6957789) - Removes any usage of deprecated legacy theming APIs. These have been superseeded by design tokens.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 16.7.6
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/dist/cjs/Select.js
CHANGED
|
@@ -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 = "
|
|
12
|
+
var packageVersion = "17.0.0";
|
|
13
13
|
var SelectWithoutAnalytics = exports.SelectWithoutAnalytics = (0, _createSelect.default)(_reactSelect.default);
|
|
14
14
|
var createAndFireEventOnAtlaskit = (0, _analyticsNext.createAndFireEvent)('atlaskit');
|
|
15
15
|
var _default = exports.default = (0, _analyticsNext.withAnalyticsContext)({
|
|
@@ -7,24 +7,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.RadioOption = exports.CheckboxOption = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
11
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
12
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
13
|
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
13
14
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
15
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
15
16
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
16
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
17
17
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
18
18
|
var _react = require("@emotion/react");
|
|
19
19
|
var _react2 = require("react");
|
|
20
20
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
21
21
|
var _radio = _interopRequireDefault(require("@atlaskit/icon/glyph/radio"));
|
|
22
22
|
var _checkbox = _interopRequireDefault(require("@atlaskit/icon/glyph/checkbox"));
|
|
23
|
-
var _components = require("@atlaskit/theme/components");
|
|
24
23
|
var _colors = require("@atlaskit/theme/colors");
|
|
25
|
-
var _excluded = ["
|
|
26
|
-
_excluded2 = ["isActive", "isDisabled", "isSelected"],
|
|
27
|
-
_excluded3 = ["getStyles", "Icon", "children", "innerProps", "innerRef"];
|
|
24
|
+
var _excluded = ["getStyles", "Icon", "children", "innerProps", "innerRef"];
|
|
28
25
|
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); }; }
|
|
29
26
|
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; } }
|
|
30
27
|
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; }
|
|
@@ -66,16 +63,6 @@ var getPrimitiveStyles = function getPrimitiveStyles(props) {
|
|
|
66
63
|
return [augmentedStyles, cx(bemClasses, className)];
|
|
67
64
|
};
|
|
68
65
|
|
|
69
|
-
// maintains function shape
|
|
70
|
-
var backgroundColor = (0, _components.themed)({
|
|
71
|
-
light: "var(--ds-background-neutral, ".concat(_colors.N0, ")"),
|
|
72
|
-
dark: "var(--ds-background-neutral, ".concat(_colors.DN10, ")")
|
|
73
|
-
});
|
|
74
|
-
var transparent = (0, _components.themed)({
|
|
75
|
-
light: 'transparent',
|
|
76
|
-
dark: 'transparent'
|
|
77
|
-
});
|
|
78
|
-
|
|
79
66
|
// state of the parent option
|
|
80
67
|
|
|
81
68
|
// the primary color represents the outer or background element
|
|
@@ -83,72 +70,38 @@ var getPrimaryColor = function getPrimaryColor(_ref) {
|
|
|
83
70
|
var isActive = _ref.isActive,
|
|
84
71
|
isDisabled = _ref.isDisabled,
|
|
85
72
|
isFocused = _ref.isFocused,
|
|
86
|
-
isSelected = _ref.isSelected
|
|
87
|
-
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
88
|
-
var color = backgroundColor;
|
|
73
|
+
isSelected = _ref.isSelected;
|
|
89
74
|
if (isDisabled && isSelected) {
|
|
90
|
-
|
|
91
|
-
light: "var(--ds-background-disabled, ".concat(_colors.B75, ")"),
|
|
92
|
-
dark: "var(--ds-background-disabled, ".concat(_colors.DN200, ")")
|
|
93
|
-
});
|
|
75
|
+
return "var(--ds-background-disabled, ".concat(_colors.B75, ")");
|
|
94
76
|
} else if (isDisabled) {
|
|
95
|
-
|
|
96
|
-
light: "var(--ds-background-disabled, ".concat(_colors.N20A, ")"),
|
|
97
|
-
dark: "var(--ds-background-disabled, ".concat(_colors.DN10, ")")
|
|
98
|
-
});
|
|
77
|
+
return "var(--ds-background-disabled, ".concat(_colors.N20A, ")");
|
|
99
78
|
} else if (isSelected && isActive) {
|
|
100
|
-
|
|
101
|
-
light: "var(--ds-background-selected-bold-pressed, ".concat(_colors.B75, ")"),
|
|
102
|
-
dark: "var(--ds-background-selected-bold-pressed, ".concat(_colors.B200, ")")
|
|
103
|
-
});
|
|
79
|
+
return "var(--ds-background-selected-bold-pressed, ".concat(_colors.B75, ")");
|
|
104
80
|
} else if (isActive) {
|
|
105
|
-
|
|
106
|
-
light: "var(--ds-background-selected-pressed, ".concat(_colors.B75, ")"),
|
|
107
|
-
dark: "var(--ds-background-selected-pressed, ".concat(_colors.B200, ")")
|
|
108
|
-
});
|
|
81
|
+
return "var(--ds-background-selected-pressed, ".concat(_colors.B75, ")");
|
|
109
82
|
} else if (isFocused && isSelected) {
|
|
110
|
-
|
|
111
|
-
light: "var(--ds-background-selected-bold-hovered, ".concat(_colors.B300, ")"),
|
|
112
|
-
dark: "var(--ds-background-selected-bold-hovered, ".concat(_colors.B75, ")")
|
|
113
|
-
});
|
|
83
|
+
return "var(--ds-background-selected-bold-hovered, ".concat(_colors.B300, ")");
|
|
114
84
|
} else if (isFocused) {
|
|
115
|
-
|
|
116
|
-
light: "var(--ds-surface, ".concat(_colors.N0, ")"),
|
|
117
|
-
dark: "var(--ds-surface, ".concat(_colors.DN30, ")")
|
|
118
|
-
});
|
|
85
|
+
return "var(--ds-surface, ".concat(_colors.N0, ")");
|
|
119
86
|
} else if (isSelected) {
|
|
120
|
-
|
|
121
|
-
light: "var(--ds-background-selected-bold, ".concat(_colors.B400, ")"),
|
|
122
|
-
dark: "var(--ds-background-selected-bold, ".concat(_colors.B100, ")")
|
|
123
|
-
});
|
|
87
|
+
return "var(--ds-background-selected-bold, ".concat(_colors.B400, ")");
|
|
124
88
|
}
|
|
125
|
-
return
|
|
89
|
+
return "var(--ds-background-neutral, ".concat(_colors.N0, ")");
|
|
126
90
|
};
|
|
127
91
|
|
|
128
92
|
// the secondary color represents the radio dot or checkmark
|
|
129
93
|
var getSecondaryColor = function getSecondaryColor(_ref2) {
|
|
130
94
|
var isActive = _ref2.isActive,
|
|
131
95
|
isDisabled = _ref2.isDisabled,
|
|
132
|
-
isSelected = _ref2.isSelected
|
|
133
|
-
rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
|
|
134
|
-
var color = (0, _components.themed)({
|
|
135
|
-
light: "var(--ds-surface, ".concat(_colors.N0, ")"),
|
|
136
|
-
dark: "var(--ds-surface, ".concat(_colors.DN10, ")")
|
|
137
|
-
});
|
|
96
|
+
isSelected = _ref2.isSelected;
|
|
138
97
|
if (isDisabled && isSelected) {
|
|
139
|
-
|
|
140
|
-
light: "var(--ds-text-disabled, ".concat(_colors.N70, ")"),
|
|
141
|
-
dark: "var(--ds-text-disabled, ".concat(_colors.DN10, ")")
|
|
142
|
-
});
|
|
98
|
+
return "var(--ds-text-disabled, ".concat(_colors.N70, ")");
|
|
143
99
|
} else if (isActive && isSelected && !isDisabled) {
|
|
144
|
-
|
|
145
|
-
light: "var(--ds-surface, ".concat(_colors.B400, ")"),
|
|
146
|
-
dark: "var(--ds-surface, ".concat(_colors.DN10, ")")
|
|
147
|
-
});
|
|
100
|
+
return "var(--ds-surface, ".concat(_colors.B400, ")");
|
|
148
101
|
} else if (!isSelected) {
|
|
149
|
-
|
|
102
|
+
return 'transparent';
|
|
150
103
|
}
|
|
151
|
-
return
|
|
104
|
+
return "var(--ds-surface, ".concat(_colors.N0, ")");
|
|
152
105
|
};
|
|
153
106
|
|
|
154
107
|
// the border color surrounds the checkbox/radio
|
|
@@ -233,7 +186,7 @@ var ControlOption = /*#__PURE__*/function (_Component) {
|
|
|
233
186
|
children = _this$props.children,
|
|
234
187
|
innerProps = _this$props.innerProps,
|
|
235
188
|
innerRef = _this$props.innerRef,
|
|
236
|
-
rest = (0, _objectWithoutProperties2.default)(_this$props,
|
|
189
|
+
rest = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
237
190
|
|
|
238
191
|
// prop assignment
|
|
239
192
|
var props = _objectSpread(_objectSpread({}, innerProps), {}, {
|
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 = "
|
|
5
|
+
const packageVersion = "17.0.0";
|
|
6
6
|
export const SelectWithoutAnalytics = createSelect(Select);
|
|
7
7
|
const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
|
|
8
8
|
export default withAnalyticsContext({
|
|
@@ -6,8 +6,7 @@ import { Component } from 'react';
|
|
|
6
6
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
7
7
|
import RadioIcon from '@atlaskit/icon/glyph/radio';
|
|
8
8
|
import CheckboxIcon from '@atlaskit/icon/glyph/checkbox';
|
|
9
|
-
import {
|
|
10
|
-
import { B100, B200, B300, B400, B75, DN200, DN10, DN30, N20A, N0, N100, N20, N30, N70 } from '@atlaskit/theme/colors';
|
|
9
|
+
import { B300, B400, B75, N20A, N0, N100, N20, N30, N70 } from '@atlaskit/theme/colors';
|
|
11
10
|
const getPrimitiveStyles = props => {
|
|
12
11
|
const {
|
|
13
12
|
cx,
|
|
@@ -50,16 +49,6 @@ const getPrimitiveStyles = props => {
|
|
|
50
49
|
return [augmentedStyles, cx(bemClasses, className)];
|
|
51
50
|
};
|
|
52
51
|
|
|
53
|
-
// maintains function shape
|
|
54
|
-
const backgroundColor = themed({
|
|
55
|
-
light: `var(--ds-background-neutral, ${N0})`,
|
|
56
|
-
dark: `var(--ds-background-neutral, ${DN10})`
|
|
57
|
-
});
|
|
58
|
-
const transparent = themed({
|
|
59
|
-
light: 'transparent',
|
|
60
|
-
dark: 'transparent'
|
|
61
|
-
});
|
|
62
|
-
|
|
63
52
|
// state of the parent option
|
|
64
53
|
|
|
65
54
|
// the primary color represents the outer or background element
|
|
@@ -67,74 +56,40 @@ const getPrimaryColor = ({
|
|
|
67
56
|
isActive,
|
|
68
57
|
isDisabled,
|
|
69
58
|
isFocused,
|
|
70
|
-
isSelected
|
|
71
|
-
...rest
|
|
59
|
+
isSelected
|
|
72
60
|
}) => {
|
|
73
|
-
let color = backgroundColor;
|
|
74
61
|
if (isDisabled && isSelected) {
|
|
75
|
-
|
|
76
|
-
light: `var(--ds-background-disabled, ${B75})`,
|
|
77
|
-
dark: `var(--ds-background-disabled, ${DN200})`
|
|
78
|
-
});
|
|
62
|
+
return `var(--ds-background-disabled, ${B75})`;
|
|
79
63
|
} else if (isDisabled) {
|
|
80
|
-
|
|
81
|
-
light: `var(--ds-background-disabled, ${N20A})`,
|
|
82
|
-
dark: `var(--ds-background-disabled, ${DN10})`
|
|
83
|
-
});
|
|
64
|
+
return `var(--ds-background-disabled, ${N20A})`;
|
|
84
65
|
} else if (isSelected && isActive) {
|
|
85
|
-
|
|
86
|
-
light: `var(--ds-background-selected-bold-pressed, ${B75})`,
|
|
87
|
-
dark: `var(--ds-background-selected-bold-pressed, ${B200})`
|
|
88
|
-
});
|
|
66
|
+
return `var(--ds-background-selected-bold-pressed, ${B75})`;
|
|
89
67
|
} else if (isActive) {
|
|
90
|
-
|
|
91
|
-
light: `var(--ds-background-selected-pressed, ${B75})`,
|
|
92
|
-
dark: `var(--ds-background-selected-pressed, ${B200})`
|
|
93
|
-
});
|
|
68
|
+
return `var(--ds-background-selected-pressed, ${B75})`;
|
|
94
69
|
} else if (isFocused && isSelected) {
|
|
95
|
-
|
|
96
|
-
light: `var(--ds-background-selected-bold-hovered, ${B300})`,
|
|
97
|
-
dark: `var(--ds-background-selected-bold-hovered, ${B75})`
|
|
98
|
-
});
|
|
70
|
+
return `var(--ds-background-selected-bold-hovered, ${B300})`;
|
|
99
71
|
} else if (isFocused) {
|
|
100
|
-
|
|
101
|
-
light: `var(--ds-surface, ${N0})`,
|
|
102
|
-
dark: `var(--ds-surface, ${DN30})`
|
|
103
|
-
});
|
|
72
|
+
return `var(--ds-surface, ${N0})`;
|
|
104
73
|
} else if (isSelected) {
|
|
105
|
-
|
|
106
|
-
light: `var(--ds-background-selected-bold, ${B400})`,
|
|
107
|
-
dark: `var(--ds-background-selected-bold, ${B100})`
|
|
108
|
-
});
|
|
74
|
+
return `var(--ds-background-selected-bold, ${B400})`;
|
|
109
75
|
}
|
|
110
|
-
return
|
|
76
|
+
return `var(--ds-background-neutral, ${N0})`;
|
|
111
77
|
};
|
|
112
78
|
|
|
113
79
|
// the secondary color represents the radio dot or checkmark
|
|
114
80
|
const getSecondaryColor = ({
|
|
115
81
|
isActive,
|
|
116
82
|
isDisabled,
|
|
117
|
-
isSelected
|
|
118
|
-
...rest
|
|
83
|
+
isSelected
|
|
119
84
|
}) => {
|
|
120
|
-
let color = themed({
|
|
121
|
-
light: `var(--ds-surface, ${N0})`,
|
|
122
|
-
dark: `var(--ds-surface, ${DN10})`
|
|
123
|
-
});
|
|
124
85
|
if (isDisabled && isSelected) {
|
|
125
|
-
|
|
126
|
-
light: `var(--ds-text-disabled, ${N70})`,
|
|
127
|
-
dark: `var(--ds-text-disabled, ${DN10})`
|
|
128
|
-
});
|
|
86
|
+
return `var(--ds-text-disabled, ${N70})`;
|
|
129
87
|
} else if (isActive && isSelected && !isDisabled) {
|
|
130
|
-
|
|
131
|
-
light: `var(--ds-surface, ${B400})`,
|
|
132
|
-
dark: `var(--ds-surface, ${DN10})`
|
|
133
|
-
});
|
|
88
|
+
return `var(--ds-surface, ${B400})`;
|
|
134
89
|
} else if (!isSelected) {
|
|
135
|
-
|
|
90
|
+
return 'transparent';
|
|
136
91
|
}
|
|
137
|
-
return
|
|
92
|
+
return `var(--ds-surface, ${N0})`;
|
|
138
93
|
};
|
|
139
94
|
|
|
140
95
|
// the border color surrounds the checkbox/radio
|
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 = "
|
|
5
|
+
var packageVersion = "17.0.0";
|
|
6
6
|
export var SelectWithoutAnalytics = createSelect(Select);
|
|
7
7
|
var createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
|
|
8
8
|
export default withAnalyticsContext({
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
4
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
5
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
6
|
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
6
7
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
8
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
9
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
9
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
10
10
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
11
|
-
var _excluded = ["
|
|
12
|
-
_excluded2 = ["isActive", "isDisabled", "isSelected"],
|
|
13
|
-
_excluded3 = ["getStyles", "Icon", "children", "innerProps", "innerRef"];
|
|
11
|
+
var _excluded = ["getStyles", "Icon", "children", "innerProps", "innerRef"];
|
|
14
12
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
15
13
|
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; } }
|
|
16
14
|
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; }
|
|
@@ -21,8 +19,7 @@ import { Component } from 'react';
|
|
|
21
19
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
22
20
|
import RadioIcon from '@atlaskit/icon/glyph/radio';
|
|
23
21
|
import CheckboxIcon from '@atlaskit/icon/glyph/checkbox';
|
|
24
|
-
import {
|
|
25
|
-
import { B100, B200, B300, B400, B75, DN200, DN10, DN30, N20A, N0, N100, N20, N30, N70 } from '@atlaskit/theme/colors';
|
|
22
|
+
import { B300, B400, B75, N20A, N0, N100, N20, N30, N70 } from '@atlaskit/theme/colors';
|
|
26
23
|
var getPrimitiveStyles = function getPrimitiveStyles(props) {
|
|
27
24
|
var cx = props.cx,
|
|
28
25
|
className = props.className,
|
|
@@ -60,16 +57,6 @@ var getPrimitiveStyles = function getPrimitiveStyles(props) {
|
|
|
60
57
|
return [augmentedStyles, cx(bemClasses, className)];
|
|
61
58
|
};
|
|
62
59
|
|
|
63
|
-
// maintains function shape
|
|
64
|
-
var backgroundColor = themed({
|
|
65
|
-
light: "var(--ds-background-neutral, ".concat(N0, ")"),
|
|
66
|
-
dark: "var(--ds-background-neutral, ".concat(DN10, ")")
|
|
67
|
-
});
|
|
68
|
-
var transparent = themed({
|
|
69
|
-
light: 'transparent',
|
|
70
|
-
dark: 'transparent'
|
|
71
|
-
});
|
|
72
|
-
|
|
73
60
|
// state of the parent option
|
|
74
61
|
|
|
75
62
|
// the primary color represents the outer or background element
|
|
@@ -77,72 +64,38 @@ var getPrimaryColor = function getPrimaryColor(_ref) {
|
|
|
77
64
|
var isActive = _ref.isActive,
|
|
78
65
|
isDisabled = _ref.isDisabled,
|
|
79
66
|
isFocused = _ref.isFocused,
|
|
80
|
-
isSelected = _ref.isSelected
|
|
81
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
82
|
-
var color = backgroundColor;
|
|
67
|
+
isSelected = _ref.isSelected;
|
|
83
68
|
if (isDisabled && isSelected) {
|
|
84
|
-
|
|
85
|
-
light: "var(--ds-background-disabled, ".concat(B75, ")"),
|
|
86
|
-
dark: "var(--ds-background-disabled, ".concat(DN200, ")")
|
|
87
|
-
});
|
|
69
|
+
return "var(--ds-background-disabled, ".concat(B75, ")");
|
|
88
70
|
} else if (isDisabled) {
|
|
89
|
-
|
|
90
|
-
light: "var(--ds-background-disabled, ".concat(N20A, ")"),
|
|
91
|
-
dark: "var(--ds-background-disabled, ".concat(DN10, ")")
|
|
92
|
-
});
|
|
71
|
+
return "var(--ds-background-disabled, ".concat(N20A, ")");
|
|
93
72
|
} else if (isSelected && isActive) {
|
|
94
|
-
|
|
95
|
-
light: "var(--ds-background-selected-bold-pressed, ".concat(B75, ")"),
|
|
96
|
-
dark: "var(--ds-background-selected-bold-pressed, ".concat(B200, ")")
|
|
97
|
-
});
|
|
73
|
+
return "var(--ds-background-selected-bold-pressed, ".concat(B75, ")");
|
|
98
74
|
} else if (isActive) {
|
|
99
|
-
|
|
100
|
-
light: "var(--ds-background-selected-pressed, ".concat(B75, ")"),
|
|
101
|
-
dark: "var(--ds-background-selected-pressed, ".concat(B200, ")")
|
|
102
|
-
});
|
|
75
|
+
return "var(--ds-background-selected-pressed, ".concat(B75, ")");
|
|
103
76
|
} else if (isFocused && isSelected) {
|
|
104
|
-
|
|
105
|
-
light: "var(--ds-background-selected-bold-hovered, ".concat(B300, ")"),
|
|
106
|
-
dark: "var(--ds-background-selected-bold-hovered, ".concat(B75, ")")
|
|
107
|
-
});
|
|
77
|
+
return "var(--ds-background-selected-bold-hovered, ".concat(B300, ")");
|
|
108
78
|
} else if (isFocused) {
|
|
109
|
-
|
|
110
|
-
light: "var(--ds-surface, ".concat(N0, ")"),
|
|
111
|
-
dark: "var(--ds-surface, ".concat(DN30, ")")
|
|
112
|
-
});
|
|
79
|
+
return "var(--ds-surface, ".concat(N0, ")");
|
|
113
80
|
} else if (isSelected) {
|
|
114
|
-
|
|
115
|
-
light: "var(--ds-background-selected-bold, ".concat(B400, ")"),
|
|
116
|
-
dark: "var(--ds-background-selected-bold, ".concat(B100, ")")
|
|
117
|
-
});
|
|
81
|
+
return "var(--ds-background-selected-bold, ".concat(B400, ")");
|
|
118
82
|
}
|
|
119
|
-
return
|
|
83
|
+
return "var(--ds-background-neutral, ".concat(N0, ")");
|
|
120
84
|
};
|
|
121
85
|
|
|
122
86
|
// the secondary color represents the radio dot or checkmark
|
|
123
87
|
var getSecondaryColor = function getSecondaryColor(_ref2) {
|
|
124
88
|
var isActive = _ref2.isActive,
|
|
125
89
|
isDisabled = _ref2.isDisabled,
|
|
126
|
-
isSelected = _ref2.isSelected
|
|
127
|
-
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
128
|
-
var color = themed({
|
|
129
|
-
light: "var(--ds-surface, ".concat(N0, ")"),
|
|
130
|
-
dark: "var(--ds-surface, ".concat(DN10, ")")
|
|
131
|
-
});
|
|
90
|
+
isSelected = _ref2.isSelected;
|
|
132
91
|
if (isDisabled && isSelected) {
|
|
133
|
-
|
|
134
|
-
light: "var(--ds-text-disabled, ".concat(N70, ")"),
|
|
135
|
-
dark: "var(--ds-text-disabled, ".concat(DN10, ")")
|
|
136
|
-
});
|
|
92
|
+
return "var(--ds-text-disabled, ".concat(N70, ")");
|
|
137
93
|
} else if (isActive && isSelected && !isDisabled) {
|
|
138
|
-
|
|
139
|
-
light: "var(--ds-surface, ".concat(B400, ")"),
|
|
140
|
-
dark: "var(--ds-surface, ".concat(DN10, ")")
|
|
141
|
-
});
|
|
94
|
+
return "var(--ds-surface, ".concat(B400, ")");
|
|
142
95
|
} else if (!isSelected) {
|
|
143
|
-
|
|
96
|
+
return 'transparent';
|
|
144
97
|
}
|
|
145
|
-
return
|
|
98
|
+
return "var(--ds-surface, ".concat(N0, ")");
|
|
146
99
|
};
|
|
147
100
|
|
|
148
101
|
// the border color surrounds the checkbox/radio
|
|
@@ -227,7 +180,7 @@ var ControlOption = /*#__PURE__*/function (_Component) {
|
|
|
227
180
|
children = _this$props.children,
|
|
228
181
|
innerProps = _this$props.innerProps,
|
|
229
182
|
innerRef = _this$props.innerRef,
|
|
230
|
-
rest = _objectWithoutProperties(_this$props,
|
|
183
|
+
rest = _objectWithoutProperties(_this$props, _excluded);
|
|
231
184
|
|
|
232
185
|
// prop assignment
|
|
233
186
|
var props = _objectSpread(_objectSpread({}, innerProps), {}, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/select",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.0.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/"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
42
42
|
"@atlaskit/icon": "^21.12.0",
|
|
43
43
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
44
|
-
"@atlaskit/spinner": "^
|
|
44
|
+
"@atlaskit/spinner": "^16.0.0",
|
|
45
45
|
"@atlaskit/theme": "^12.6.0",
|
|
46
46
|
"@atlaskit/tokens": "^1.28.0",
|
|
47
47
|
"@atlaskit/visually-hidden": "^1.2.0",
|