@atlaskit/select 15.2.2 → 15.2.6

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.
@@ -13,11 +13,9 @@ var _constants = require("@atlaskit/theme/constants");
13
13
 
14
14
  var _colors = require("@atlaskit/theme/colors");
15
15
 
16
- var _tokens = require("@atlaskit/tokens");
16
+ 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; }
17
17
 
18
- 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
-
20
- 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; }
18
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
21
19
 
22
20
  var BORDER_WIDTH = 2;
23
21
  var ICON_PADDING = 2;
@@ -37,37 +35,37 @@ function baseStyles(validationState, isCompact) {
37
35
  },
38
36
  input: function input(css) {
39
37
  return _objectSpread(_objectSpread({}, css), {}, {
40
- color: (0, _tokens.token)('color.text.highEmphasis', 'hsl(0, 0%, 20%)')
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 ? (0, _tokens.token)('color.border.focus', _colors.B100) : (0, _tokens.token)('color.border.neutral', _colors.N20);
47
- var backgroundColor = isFocused ? (0, _tokens.token)('color.background.default', _colors.N0) : (0, _tokens.token)('color.background.subtleNeutral.resting', _colors.N20);
48
- var backgroundColorHover = isFocused ? (0, _tokens.token)('color.background.default', _colors.N0) : (0, _tokens.token)('color.background.default', _colors.N30);
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 = (0, _tokens.token)('color.background.subtleNeutral.resting', _colors.N20);
52
- borderColor = (0, _tokens.token)('color.background.disabled', _colors.N20);
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 = (0, _tokens.token)('color.iconBorder.danger', _colors.R400);
54
+ borderColor = "var(--ds-iconBorder-danger, ".concat(_colors.R400, ")");
57
55
  }
58
56
 
59
57
  if (validationState === 'success') {
60
- borderColor = (0, _tokens.token)('color.iconBorder.success', _colors.G400);
58
+ borderColor = "var(--ds-iconBorder-success, ".concat(_colors.G400, ")");
61
59
  }
62
60
 
63
- var borderColorHover = isFocused ? (0, _tokens.token)('color.border.focus', _colors.B100) : (0, _tokens.token)('color.border.neutral', _colors.N30);
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 = (0, _tokens.token)('color.iconBorder.danger', _colors.R400);
64
+ borderColorHover = "var(--ds-iconBorder-danger, ".concat(_colors.R400, ")");
67
65
  }
68
66
 
69
67
  if (validationState === 'success') {
70
- borderColorHover = (0, _tokens.token)('color.iconBorder.success', _colors.G400);
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: (0, _tokens.token)('color.text.lowEmphasis', _colors.N70),
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: (0, _tokens.token)('color.text.mediumEmphasis', _colors.N500)
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 = (0, _tokens.token)('color.text.mediumEmphasis', _colors.N500);
135
+ var color = "var(--ds-text-mediumEmphasis, ".concat(_colors.N500, ")");
138
136
 
139
137
  if (isDisabled) {
140
- color = (0, _tokens.token)('color.text.disabled', _colors.N70);
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: (0, _tokens.token)('color.text.mediumEmphasis', _colors.N200)
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 = (0, _tokens.token)('color.text.highEmphasis', _colors.N800);
161
+ var color = "var(--ds-text-highEmphasis, ".concat(_colors.N800, ")");
164
162
 
165
163
  if (isDisabled) {
166
- color = (0, _tokens.token)('color.text.disabled', _colors.N70);
164
+ color = "var(--ds-text-disabled, ".concat(_colors.N70, ")");
167
165
  } else if (isSelected) {
168
- color = (0, _tokens.token)('color.text.selected', _colors.B400);
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 = (0, _tokens.token)('color.background.selected.hover', _colors.B50);
175
+ backgroundColor = "var(--ds-background-selected-hover, ".concat(_colors.B50, ")");
178
176
  } else if (isSelected) {
179
- backgroundColor = (0, _tokens.token)('color.background.selected.resting', _colors.B50);
177
+ backgroundColor = "var(--ds-background-selected-resting, ".concat(_colors.B50, ")");
180
178
  } else if (isFocused) {
181
- backgroundColor = (0, _tokens.token)('color.background.transparentNeutral.hover', _colors.N20);
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((0, _tokens.token)('color.text.selected', _colors.B400));
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 ? (0, _tokens.token)('color.background.selected.pressed', _colors.N20) : (0, _tokens.token)('color.background.transparentNeutral.pressed', _colors.N30) : undefined
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 ? (0, _tokens.token)('color.text.disabled', _colors.N300) : (0, _tokens.token)('color.text.lowEmphasis', _colors.N300)
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 ? (0, _tokens.token)('color.text.disabled', _colors.N70) : (0, _tokens.token)('color.text.highEmphasis', _colors.N800),
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: (0, _tokens.token)('color.background.overlay', 'white'),
220
- boxShadow: (0, _tokens.token)('shadow.overlay', '0 0 0 1px hsl(0deg 0% 0% / 10%), 0 4px 11px hsl(0deg 0% 0% / 10%)')
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 ? (0, _tokens.token)('color.background.selected.resting', _colors.N40) : (0, _tokens.token)('color.background.transparentNeutral.hover', _colors.N40),
234
- boxShadow: isFocused ? "0 0 0 2px ".concat((0, _tokens.token)('color.background.default', 'transparent'), ", 0 0 0 4px ").concat((0, _tokens.token)('color.border.focus', 'transparent')) : 'none',
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 ? (0, _tokens.token)('color.text.selected', 'hsl(0, 0%, 20%)') : (0, _tokens.token)('color.text.highEmphasis', 'hsl(0, 0%, 20%)'),
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 && (0, _tokens.token)('color.background.selected.resting', _colors.R75),
253
- fill: isFocused ? (0, _tokens.token)('color.text.selected', '#000') : (0, _tokens.token)('color.text.highEmphasis', '#000'),
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: (0, _tokens.token)('color.background.subtleDanger.hover', _colors.R75),
259
- fill: (0, _tokens.token)('color.text.danger', '#000')
256
+ backgroundColor: "var(--ds-background-subtleDanger-hover, ".concat(_colors.R75, ")"),
257
+ fill: "var(--ds-text-danger, #000)"
260
258
  },
261
259
  ':active': {
262
- backgroundColor: (0, _tokens.token)('color.background.subtleDanger.pressed', _colors.R75),
263
- fill: (0, _tokens.token)('color.text.danger', '#000')
260
+ backgroundColor: "var(--ds-background-subtleDanger-pressed, ".concat(_colors.R75, ")"),
261
+ fill: "var(--ds-text-danger, #000)"
264
262
  }
265
263
  });
266
264
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/select",
3
- "version": "15.2.2",
3
+ "version": "15.2.6",
4
4
  "sideEffects": false
5
5
  }
@@ -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: token('color.text.lowEmphasis', N80)
59
+ color: `var(--ds-text-lowEmphasis, ${N80})`
61
60
  })
62
61
  }));
63
62
 
@@ -183,6 +182,10 @@ export default class PopupSelect extends PureComponent {
183
182
  this.focusTrap.deactivate();
184
183
  }
185
184
 
185
+ if (this.targetRef != null) {
186
+ this.targetRef.focus();
187
+ }
188
+
186
189
  if (typeof window === 'undefined') {
187
190
  return;
188
191
  }
@@ -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: token('color.background.overlay', 'white'),
17
+ backgroundColor: "var(--ds-background-overlay, white)",
19
18
  borderRadius: 4,
20
- boxShadow: token('shadow.overlay', `0 0 0 1px ${N40A}, 0 4px 11px ${N40A}`),
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()
@@ -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.2";
5
+ const packageVersion = "15.2.6";
6
6
  export const SelectWithoutAnalytics = createSelect(Select);
7
7
  const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
8
8
  export default withAnalyticsContext({
@@ -9,7 +9,6 @@ import CheckboxIcon from '@atlaskit/icon/glyph/checkbox';
9
9
  import { themed } from '@atlaskit/theme/components';
10
10
  import { gridSize } from '@atlaskit/theme/constants';
11
11
  import { B100, B200, B300, B400, B75, DN200, DN10, DN30, N20A, N0, N100, N20, N30, N70 } from '@atlaskit/theme/colors';
12
- import { token } from '@atlaskit/tokens';
13
12
 
14
13
  const getPrimitiveStyles = props => {
15
14
  const {
@@ -22,15 +21,15 @@ const getPrimitiveStyles = props => {
22
21
  } = props;
23
22
  const styles = {
24
23
  alignItems: 'center',
25
- backgroundColor: isFocused ? token('color.background.transparentNeutral.hover', N20) : 'transparent',
26
- color: isDisabled ? token('color.text.disabled', 'inherit') : 'inherit',
24
+ backgroundColor: isFocused ? `var(--ds-background-transparentNeutral-hover, ${N20})` : 'transparent',
25
+ color: isDisabled ? "var(--ds-text-disabled, inherit)" : 'inherit',
27
26
  display: 'flex ',
28
27
  paddingBottom: 4,
29
28
  paddingLeft: `${gridSize() * 2}px`,
30
29
  paddingTop: 4,
31
- boxShadow: isFocused ? `inset 2px 0px 0px ${token('color.text.selected', B400)};` : '',
30
+ boxShadow: isFocused ? `inset 2px 0px 0px ${`var(--ds-text-selected, ${B400})`};` : '',
32
31
  ':active': {
33
- backgroundColor: token('color.background.transparentNeutral.pressed', N30)
32
+ backgroundColor: `var(--ds-background-transparentNeutral-pressed, ${N30})`
34
33
  },
35
34
  '@media screen and (-ms-high-contrast: active)': {
36
35
  borderLeft: isFocused ? '2px solid transparent' : ''
@@ -51,8 +50,8 @@ const getPrimitiveStyles = props => {
51
50
 
52
51
 
53
52
  const backgroundColor = themed({
54
- light: token('color.background.subtleNeutral.resting', N0),
55
- dark: token('color.background.subtleNeutral.resting', DN10)
53
+ light: `var(--ds-background-subtleNeutral-resting, ${N0})`,
54
+ dark: `var(--ds-background-subtleNeutral-resting, ${DN10})`
56
55
  });
57
56
  const transparent = themed({
58
57
  light: 'transparent',
@@ -71,38 +70,38 @@ const getPrimaryColor = ({
71
70
 
72
71
  if (isDisabled && isSelected) {
73
72
  color = themed({
74
- light: token('color.background.disabled', B75),
75
- dark: token('color.background.disabled', DN200)
73
+ light: `var(--ds-background-disabled, ${B75})`,
74
+ dark: `var(--ds-background-disabled, ${DN200})`
76
75
  });
77
76
  } else if (isDisabled) {
78
77
  color = themed({
79
- light: token('color.background.disabled', N20A),
80
- dark: token('color.background.disabled', DN10)
78
+ light: `var(--ds-background-disabled, ${N20A})`,
79
+ dark: `var(--ds-background-disabled, ${DN10})`
81
80
  });
82
81
  } else if (isSelected && isActive) {
83
82
  color = themed({
84
- light: token('color.background.boldBrand.pressed', B75),
85
- dark: token('color.background.boldBrand.pressed', B200)
83
+ light: `var(--ds-background-boldBrand-pressed, ${B75})`,
84
+ dark: `var(--ds-background-boldBrand-pressed, ${B200})`
86
85
  });
87
86
  } else if (isActive) {
88
87
  color = themed({
89
- light: token('color.background.subtleBrand.pressed', B75),
90
- dark: token('color.background.subtleBrand.pressed', B200)
88
+ light: `var(--ds-background-subtleBrand-pressed, ${B75})`,
89
+ dark: `var(--ds-background-subtleBrand-pressed, ${B200})`
91
90
  });
92
91
  } else if (isFocused && isSelected) {
93
92
  color = themed({
94
- light: token('color.background.boldBrand.hover', B300),
95
- dark: token('color.background.boldBrand.hover', B75)
93
+ light: `var(--ds-background-boldBrand-hover, ${B300})`,
94
+ dark: `var(--ds-background-boldBrand-hover, ${B75})`
96
95
  });
97
96
  } else if (isFocused) {
98
97
  color = themed({
99
- light: token('color.background.default', N0),
100
- dark: token('color.background.default', DN30)
98
+ light: `var(--ds-background-default, ${N0})`,
99
+ dark: `var(--ds-background-default, ${DN30})`
101
100
  });
102
101
  } else if (isSelected) {
103
102
  color = themed({
104
- light: token('color.background.boldBrand.resting', B400),
105
- dark: token('color.background.boldBrand.resting', B100)
103
+ light: `var(--ds-background-boldBrand-resting, ${B400})`,
104
+ dark: `var(--ds-background-boldBrand-resting, ${B100})`
106
105
  });
107
106
  }
108
107
 
@@ -117,19 +116,19 @@ const getSecondaryColor = ({
117
116
  ...rest
118
117
  }) => {
119
118
  let color = themed({
120
- light: token('color.background.default', N0),
121
- dark: token('color.background.default', DN10)
119
+ light: `var(--ds-background-default, ${N0})`,
120
+ dark: `var(--ds-background-default, ${DN10})`
122
121
  });
123
122
 
124
123
  if (isDisabled && isSelected) {
125
124
  color = themed({
126
- light: token('color.text.disabled', N70),
127
- dark: token('color.text.disabled', DN10)
125
+ light: `var(--ds-text-disabled, ${N70})`,
126
+ dark: `var(--ds-text-disabled, ${DN10})`
128
127
  });
129
128
  } else if (isActive && isSelected && !isDisabled) {
130
129
  color = themed({
131
- light: token('color.background.default', B400),
132
- dark: token('color.background.default', DN10)
130
+ light: `var(--ds-background-default, ${B400})`,
131
+ dark: `var(--ds-background-default, ${DN10})`
133
132
  });
134
133
  } else if (!isSelected) {
135
134
  color = transparent;
@@ -147,22 +146,22 @@ const getBorderColor = ({
147
146
  ...rest
148
147
  }) => {
149
148
  if (isDisabled && isSelected) {
150
- return token('color.background.disabled', B400);
149
+ return `var(--ds-background-disabled, ${B400})`;
151
150
  } else if (isDisabled) {
152
- return token('color.background.disabled', N100);
151
+ return `var(--ds-background-disabled, ${N100})`;
153
152
  } else if (isSelected && isActive) {
154
- return token('color.background.boldBrand.pressed', B400);
153
+ return `var(--ds-background-boldBrand-pressed, ${B400})`;
155
154
  } else if (isActive) {
156
- return token('color.background.boldBrand.resting', B400);
155
+ return `var(--ds-background-boldBrand-resting, ${B400})`;
157
156
  } else if (isFocused && isSelected) {
158
- return token('color.background.boldBrand.hover', B400);
157
+ return `var(--ds-background-boldBrand-hover, ${B400})`;
159
158
  } else if (isFocused) {
160
- return token('color.border.neutral', N100);
159
+ return `var(--ds-border-neutral, ${N100})`;
161
160
  } else if (isSelected) {
162
- return token('color.background.boldBrand.resting', B400);
161
+ return `var(--ds-background-boldBrand-resting, ${B400})`;
163
162
  }
164
163
 
165
- return token('color.border.neutral', N100);
164
+ return `var(--ds-border-neutral, ${N100})`;
166
165
  };
167
166
 
168
167
  class ControlOption extends Component {