@atlaskit/onboarding 10.2.6 → 10.3.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/onboarding
2
2
 
3
+ ## 10.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`50081f13de7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/50081f13de7) - Instrumented `@atlaskit/onboarding` with the new theming package, `@atlaskit/tokens`.
8
+
9
+ New tokens will be visible only in applications configured to use the new Tokens API (currently in alpha). These changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode users should expect no visual or breaking changes.
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 10.2.6
4
16
 
5
17
  ### Patch Changes
@@ -29,6 +29,8 @@ var _customThemeButton = require("@atlaskit/button/custom-theme-button");
29
29
 
30
30
  var _colors = require("@atlaskit/theme/colors");
31
31
 
32
+ var _tokens = require("@atlaskit/tokens");
33
+
32
34
  var _card = _interopRequireDefault(require("./card"));
33
35
 
34
36
  var _theme2 = require("./theme");
@@ -87,10 +89,10 @@ var SpotlightCard = /*#__PURE__*/function (_React$Component) {
87
89
  return _theme(function () {
88
90
  return _objectSpread(_objectSpread({}, others), {}, {
89
91
  container: _objectSpread({
90
- background: _colors.P300,
91
- color: _colors.N0,
92
+ background: (0, _tokens.token)('color.background.boldDiscovery.resting', _colors.P300),
93
+ color: (0, _tokens.token)('color.text.onBold', _colors.N0),
92
94
  width: "".concat(Math.min(Math.max(width, 160), 600), "px"),
93
- boxShadow: isFlat ? undefined : "0 4px 8px -2px ".concat(_colors.N50A, ", 0 0 1px ").concat(_colors.N60A)
95
+ boxShadow: isFlat ? undefined : (0, _tokens.token)('shadow.card', "0 4px 8px -2px ".concat(_colors.N50A, ", 0 0 1px ").concat(_colors.N60A))
94
96
  }, container)
95
97
  });
96
98
  }, {});
@@ -52,7 +52,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
52
52
  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; } }
53
53
 
54
54
  var packageName = "@atlaskit/onboarding";
55
- var packageVersion = "10.2.6";
55
+ var packageVersion = "10.3.0";
56
56
 
57
57
  var SpotlightDialog = /*#__PURE__*/function (_Component) {
58
58
  (0, _inherits2.default)(SpotlightDialog, _Component);
@@ -17,6 +17,8 @@ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
17
17
 
18
18
  var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
19
19
 
20
+ var _tokens = require("@atlaskit/tokens");
21
+
20
22
  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); }
21
23
 
22
24
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -28,234 +30,108 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
28
30
  var spotlightTheme = {
29
31
  default: {
30
32
  background: {
31
- default: {
32
- light: colors.P400,
33
- dark: colors.P400
34
- },
35
- hover: {
36
- light: colors.P200,
37
- dark: colors.P200
38
- },
39
- active: {
40
- light: colors.P500,
41
- dark: colors.P500
42
- },
43
- disabled: {
44
- light: colors.P400,
45
- dark: colors.P400
46
- },
47
- selected: {
48
- light: colors.R500,
49
- dark: colors.R500
50
- },
51
- focus: {
52
- light: colors.P400,
53
- dark: colors.P400
54
- }
33
+ default: (0, _tokens.token)('color.background.subtleNeutral.resting', colors.P400),
34
+ hover: (0, _tokens.token)('color.background.subtleNeutral.hover', colors.P200),
35
+ active: (0, _tokens.token)('color.background.subtleNeutral.pressed', colors.P500),
36
+ disabled: (0, _tokens.token)('color.background.disabled', colors.P400),
37
+ selected: (0, _tokens.token)('color.background.subtleNeutral.pressed', colors.R500),
38
+ focus: (0, _tokens.token)('color.background.subtleNeutral.resting', colors.P400)
55
39
  },
56
40
  boxShadow: {
57
- focus: {
58
- light: "".concat(colors.P100, " 0 0 0 2px"),
59
- dark: "".concat(colors.P100, " 0 0 0 2px")
60
- }
41
+ focus: "0 0 0 2px ".concat((0, _tokens.token)('color.iconBorder.discovery', colors.P100))
61
42
  },
62
43
  color: {
63
- default: {
64
- light: colors.N0,
65
- dark: colors.N0
66
- },
67
- hover: {
68
- light: colors.N0,
69
- dark: colors.N0
70
- },
71
- active: {
72
- light: colors.N0,
73
- dark: colors.N0
74
- },
44
+ default: (0, _tokens.token)('color.text.onBold', colors.N0),
45
+ hover: (0, _tokens.token)('color.text.onBold', colors.N0),
46
+ active: (0, _tokens.token)('color.text.onBold', colors.N0),
75
47
  disabled: {
76
- light: colors.N0,
77
- dark: colors.DN30
78
- },
79
- selected: {
80
- light: colors.N0,
81
- dark: colors.N0
48
+ light: (0, _tokens.token)('color.text.disabled', colors.N0),
49
+ dark: (0, _tokens.token)('color.text.disabled', colors.DN30)
82
50
  },
83
- focus: {
84
- light: colors.N0,
85
- dark: colors.N0
86
- }
51
+ selected: (0, _tokens.token)('color.text.onBold', colors.N0),
52
+ focus: (0, _tokens.token)('color.text.onBold', colors.N0)
87
53
  },
88
54
  outline: {
89
- focus: {
90
- light: 'none',
91
- dark: 'none'
92
- }
55
+ focus: 'none'
93
56
  }
94
57
  },
95
58
  subtle: {
96
59
  background: {
97
- default: {
98
- light: 'none',
99
- dark: 'none'
100
- },
101
- hover: {
102
- light: colors.P200,
103
- dark: colors.P200
104
- },
105
- active: {
106
- light: colors.P500,
107
- dark: colors.P500
108
- },
109
- disabled: {
110
- light: 'none',
111
- dark: 'none'
112
- },
60
+ default: 'none',
61
+ hover: (0, _tokens.token)('color.background.subtleNeutral.hover', colors.P200),
62
+ active: (0, _tokens.token)('color.background.subtleNeutral.pressed', colors.P500),
63
+ disabled: 'none',
113
64
  selected: {
114
- light: colors.N700,
115
- dark: colors.DN0
65
+ light: (0, _tokens.token)('color.background.selected.hover', colors.N700),
66
+ dark: (0, _tokens.token)('color.background.selected.hover', colors.DN0)
116
67
  },
117
68
  focusSelected: {
118
- light: colors.N700,
119
- dark: colors.DN0
69
+ light: (0, _tokens.token)('color.background.selected.hover', colors.N700),
70
+ dark: (0, _tokens.token)('color.background.selected.hover', colors.DN0)
120
71
  }
121
72
  },
122
73
  boxShadow: {
123
- focus: {
124
- light: "".concat(colors.P100, " 0 0 0 2px"),
125
- dark: "".concat(colors.P100, " 0 0 0 2px")
126
- }
74
+ focus: "0 0 0 2px ".concat((0, _tokens.token)('color.iconBorder.discovery', colors.P100))
127
75
  },
128
76
  color: {
129
- default: {
130
- light: colors.N0,
131
- dark: colors.N0
132
- },
133
- hover: {
134
- light: colors.N0,
135
- dark: colors.N0
136
- },
137
- active: {
138
- light: colors.N0,
139
- dark: colors.N0
140
- },
141
- disabled: {
142
- light: colors.N0,
143
- dark: colors.N0
144
- },
145
- selected: {
146
- light: colors.N0,
147
- dark: colors.N0
148
- },
149
- focus: {
150
- light: colors.N0,
151
- dark: colors.N0
152
- }
77
+ default: (0, _tokens.token)('color.text.onBold', colors.N0),
78
+ hover: (0, _tokens.token)('color.text.onBold', colors.N0),
79
+ active: (0, _tokens.token)('color.text.onBold', colors.N0),
80
+ disabled: (0, _tokens.token)('color.text.disabled', colors.N0),
81
+ selected: (0, _tokens.token)('color.text.onBold', colors.N0),
82
+ focus: (0, _tokens.token)('color.text.onBold', colors.N0)
153
83
  },
154
84
  outline: {
155
- focus: {
156
- light: 'none',
157
- dark: 'none'
158
- }
85
+ focus: 'none'
159
86
  }
160
87
  },
161
88
  'subtle-link': {
162
89
  textDecoration: {
163
- hover: {
164
- light: "underline ".concat(colors.P75),
165
- dark: "underline ".concat(colors.P75)
166
- }
90
+ hover: "underline ".concat((0, _tokens.token)('color.text.discovery', colors.P75))
167
91
  },
168
92
  textDecorationLine: {
169
- active: {
170
- light: 'none',
171
- dark: 'none'
172
- }
93
+ active: 'none'
173
94
  },
174
95
  boxShadow: {
175
- focus: {
176
- light: "".concat(colors.P100, " 0 0 0 2px"),
177
- dark: "".concat(colors.P100, " 0 0 0 2px")
178
- }
96
+ focus: "0 0 0 2px ".concat((0, _tokens.token)('color.iconBorder.discovery', colors.P100))
179
97
  },
180
98
  color: {
181
- default: {
182
- light: colors.N0,
183
- dark: colors.N0
184
- },
185
- hover: {
186
- light: colors.P75,
187
- dark: colors.P75
188
- },
189
- active: {
190
- light: colors.P100,
191
- dark: colors.P100
192
- },
193
- disabled: {
194
- light: colors.P500,
195
- dark: colors.P500
196
- },
197
- selected: {
198
- light: colors.N0,
199
- dark: colors.N0
200
- },
201
- focus: {
202
- light: colors.N0,
203
- dark: colors.N0
204
- }
99
+ default: (0, _tokens.token)('color.text.onBold', colors.N0),
100
+ hover: (0, _tokens.token)('color.text.onBold', colors.P75),
101
+ active: (0, _tokens.token)('color.text.onBold', colors.P100),
102
+ disabled: (0, _tokens.token)('color.text.discovery', colors.P500),
103
+ selected: (0, _tokens.token)('color.text.selected', colors.N0),
104
+ focus: (0, _tokens.token)('color.text.onBold', colors.N0)
205
105
  }
206
106
  }
207
107
  };
208
108
  var modalTheme = {
209
109
  primary: {
210
110
  background: {
211
- default: {
212
- light: colors.P400,
213
- dark: colors.P400
214
- },
215
- hover: {
216
- light: colors.P200,
217
- dark: colors.P200
218
- },
219
- active: {
220
- light: colors.P500,
221
- dark: colors.P500
222
- },
111
+ default: (0, _tokens.token)('color.background.boldDiscovery.resting', colors.P400),
112
+ hover: (0, _tokens.token)('color.background.boldDiscovery.hover', colors.P200),
113
+ active: (0, _tokens.token)('color.background.boldDiscovery.pressed', colors.P500),
223
114
  disabled: {
224
- light: colors.N30,
225
- dark: colors.DN70
226
- },
227
- selected: {
228
- light: colors.R500,
229
- dark: colors.R500
115
+ light: (0, _tokens.token)('color.background.disabled', colors.N30),
116
+ dark: (0, _tokens.token)('color.background.disabled', colors.DN70)
230
117
  },
231
- focus: {
232
- light: colors.P400,
233
- dark: colors.P400
234
- }
118
+ selected: (0, _tokens.token)('color.background.selected.hover', colors.R500),
119
+ focus: (0, _tokens.token)('color.background.boldDiscovery.hover', colors.P400)
235
120
  },
236
121
  boxShadow: {
237
122
  focus: {
238
- light: "".concat(colors.P100, " 0 0 0 2px"),
239
- dark: "".concat(colors.P100, " 0 0 0 2px")
123
+ light: "0 0 0 2px ".concat((0, _tokens.token)('color.iconBorder.discovery', colors.P100)),
124
+ dark: "0 0 0 2px ".concat((0, _tokens.token)('color.iconBorder.discovery', colors.P100))
240
125
  }
241
126
  },
242
127
  color: {
243
- default: {
244
- light: colors.N0,
245
- dark: colors.N0
246
- },
128
+ default: (0, _tokens.token)('color.text.onBold', colors.N0),
247
129
  disabled: {
248
- light: colors.N0,
249
- dark: colors.DN30
130
+ light: (0, _tokens.token)('color.text.disabled', colors.N0),
131
+ dark: (0, _tokens.token)('color.text.disabled', colors.DN30)
250
132
  },
251
- selected: {
252
- light: colors.N0,
253
- dark: colors.N0
254
- },
255
- focus: {
256
- light: colors.N0,
257
- dark: colors.N0
258
- }
133
+ selected: (0, _tokens.token)('color.text.selected', colors.N0),
134
+ focus: (0, _tokens.token)('color.text.onBold', colors.N0)
259
135
  }
260
136
  }
261
137
  };
@@ -17,13 +17,15 @@ var _components = require("@atlaskit/theme/components");
17
17
 
18
18
  var _constants = require("@atlaskit/theme/constants");
19
19
 
20
+ var _tokens = require("@atlaskit/tokens");
21
+
20
22
  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; }
21
23
 
22
24
  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; }
23
25
 
24
26
  var backgroundColor = (0, _components.themed)({
25
- light: _colors.N100A,
26
- dark: _colors.DN90A
27
+ light: (0, _tokens.token)('color.background.blanket', _colors.N100A),
28
+ dark: (0, _tokens.token)('color.background.blanket', _colors.DN90A)
27
29
  }); // IE11 and Edge: z-index needed because fixed position calculates z-index relative
28
30
  // to body instead of nearest stacking context (Portal in our case).
29
31
 
@@ -19,13 +19,15 @@ var _colors = require("@atlaskit/theme/colors");
19
19
 
20
20
  var _constants = require("@atlaskit/theme/constants");
21
21
 
22
+ var _tokens = require("@atlaskit/tokens");
23
+
22
24
  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; }
23
25
 
24
26
  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; }
25
27
 
26
28
  // NOTE:
27
29
  // Pulse color "rgb(101, 84, 192)" derived from "colors.P300"
28
- var baseShadow = "0 0 0 2px ".concat(_colors.P300);
30
+ var baseShadow = (0, _tokens.token)('shadow.overlay', "0 0 0 2px ".concat(_colors.P300));
29
31
  var easing = 'cubic-bezier(0.55, 0.055, 0.675, 0.19)';
30
32
  var pulseKeyframes = (0, _core.keyframes)({
31
33
  '0%, 33%': {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/onboarding",
3
- "version": "10.2.6",
3
+ "version": "10.3.0",
4
4
  "sideEffects": false
5
5
  }
@@ -3,6 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import React from 'react';
4
4
  import { Theme as ButtonTheme } from '@atlaskit/button/custom-theme-button';
5
5
  import { N0, N50A, N60A, P300 } from '@atlaskit/theme/colors';
6
+ import { token } from '@atlaskit/tokens';
6
7
  import Card from './card';
7
8
  import { spotlightButtonTheme } from './theme';
8
9
 
@@ -41,11 +42,10 @@ class SpotlightCard extends React.Component {
41
42
  } = parent({});
42
43
  return theme(() => ({ ...others,
43
44
  container: {
44
- background: P300,
45
- color: N0,
45
+ background: token('color.background.boldDiscovery.resting', P300),
46
+ color: token('color.text.onBold', N0),
46
47
  width: `${Math.min(Math.max(width, 160), 600)}px`,
47
- boxShadow: isFlat ? undefined : `0 4px 8px -2px ${N50A}, 0 0 1px ${N60A}`,
48
- // AK-5598
48
+ boxShadow: isFlat ? undefined : token('shadow.card', `0 4px 8px -2px ${N50A}, 0 0 1px ${N60A}`),
49
49
  ...container
50
50
  }
51
51
  }), {});
@@ -7,7 +7,7 @@ import { DialogImage } from '../styled/dialog';
7
7
  import SpotlightCard from './spotlight-card';
8
8
  import ValueChanged from './value-changed';
9
9
  const packageName = "@atlaskit/onboarding";
10
- const packageVersion = "10.2.6";
10
+ const packageVersion = "10.3.0";
11
11
 
12
12
  class SpotlightDialog extends Component {
13
13
  constructor(...args) {
@@ -1,235 +1,110 @@
1
1
  import * as colors from '@atlaskit/theme/colors';
2
+ import { token } from '@atlaskit/tokens';
2
3
  const spotlightTheme = {
3
4
  default: {
4
5
  background: {
5
- default: {
6
- light: colors.P400,
7
- dark: colors.P400
8
- },
9
- hover: {
10
- light: colors.P200,
11
- dark: colors.P200
12
- },
13
- active: {
14
- light: colors.P500,
15
- dark: colors.P500
16
- },
17
- disabled: {
18
- light: colors.P400,
19
- dark: colors.P400
20
- },
21
- selected: {
22
- light: colors.R500,
23
- dark: colors.R500
24
- },
25
- focus: {
26
- light: colors.P400,
27
- dark: colors.P400
28
- }
6
+ default: token('color.background.subtleNeutral.resting', colors.P400),
7
+ hover: token('color.background.subtleNeutral.hover', colors.P200),
8
+ active: token('color.background.subtleNeutral.pressed', colors.P500),
9
+ disabled: token('color.background.disabled', colors.P400),
10
+ selected: token('color.background.subtleNeutral.pressed', colors.R500),
11
+ focus: token('color.background.subtleNeutral.resting', colors.P400)
29
12
  },
30
13
  boxShadow: {
31
- focus: {
32
- light: `${colors.P100} 0 0 0 2px`,
33
- dark: `${colors.P100} 0 0 0 2px`
34
- }
14
+ focus: `0 0 0 2px ${token('color.iconBorder.discovery', colors.P100)}`
35
15
  },
36
16
  color: {
37
- default: {
38
- light: colors.N0,
39
- dark: colors.N0
40
- },
41
- hover: {
42
- light: colors.N0,
43
- dark: colors.N0
44
- },
45
- active: {
46
- light: colors.N0,
47
- dark: colors.N0
48
- },
17
+ default: token('color.text.onBold', colors.N0),
18
+ hover: token('color.text.onBold', colors.N0),
19
+ active: token('color.text.onBold', colors.N0),
49
20
  disabled: {
50
- light: colors.N0,
51
- dark: colors.DN30
52
- },
53
- selected: {
54
- light: colors.N0,
55
- dark: colors.N0
21
+ light: token('color.text.disabled', colors.N0),
22
+ dark: token('color.text.disabled', colors.DN30)
56
23
  },
57
- focus: {
58
- light: colors.N0,
59
- dark: colors.N0
60
- }
24
+ selected: token('color.text.onBold', colors.N0),
25
+ focus: token('color.text.onBold', colors.N0)
61
26
  },
62
27
  outline: {
63
- focus: {
64
- light: 'none',
65
- dark: 'none'
66
- }
28
+ focus: 'none'
67
29
  }
68
30
  },
69
31
  subtle: {
70
32
  background: {
71
- default: {
72
- light: 'none',
73
- dark: 'none'
74
- },
75
- hover: {
76
- light: colors.P200,
77
- dark: colors.P200
78
- },
79
- active: {
80
- light: colors.P500,
81
- dark: colors.P500
82
- },
83
- disabled: {
84
- light: 'none',
85
- dark: 'none'
86
- },
33
+ default: 'none',
34
+ hover: token('color.background.subtleNeutral.hover', colors.P200),
35
+ active: token('color.background.subtleNeutral.pressed', colors.P500),
36
+ disabled: 'none',
87
37
  selected: {
88
- light: colors.N700,
89
- dark: colors.DN0
38
+ light: token('color.background.selected.hover', colors.N700),
39
+ dark: token('color.background.selected.hover', colors.DN0)
90
40
  },
91
41
  focusSelected: {
92
- light: colors.N700,
93
- dark: colors.DN0
42
+ light: token('color.background.selected.hover', colors.N700),
43
+ dark: token('color.background.selected.hover', colors.DN0)
94
44
  }
95
45
  },
96
46
  boxShadow: {
97
- focus: {
98
- light: `${colors.P100} 0 0 0 2px`,
99
- dark: `${colors.P100} 0 0 0 2px`
100
- }
47
+ focus: `0 0 0 2px ${token('color.iconBorder.discovery', colors.P100)}`
101
48
  },
102
49
  color: {
103
- default: {
104
- light: colors.N0,
105
- dark: colors.N0
106
- },
107
- hover: {
108
- light: colors.N0,
109
- dark: colors.N0
110
- },
111
- active: {
112
- light: colors.N0,
113
- dark: colors.N0
114
- },
115
- disabled: {
116
- light: colors.N0,
117
- dark: colors.N0
118
- },
119
- selected: {
120
- light: colors.N0,
121
- dark: colors.N0
122
- },
123
- focus: {
124
- light: colors.N0,
125
- dark: colors.N0
126
- }
50
+ default: token('color.text.onBold', colors.N0),
51
+ hover: token('color.text.onBold', colors.N0),
52
+ active: token('color.text.onBold', colors.N0),
53
+ disabled: token('color.text.disabled', colors.N0),
54
+ selected: token('color.text.onBold', colors.N0),
55
+ focus: token('color.text.onBold', colors.N0)
127
56
  },
128
57
  outline: {
129
- focus: {
130
- light: 'none',
131
- dark: 'none'
132
- }
58
+ focus: 'none'
133
59
  }
134
60
  },
135
61
  'subtle-link': {
136
62
  textDecoration: {
137
- hover: {
138
- light: `underline ${colors.P75}`,
139
- dark: `underline ${colors.P75}`
140
- }
63
+ hover: `underline ${token('color.text.discovery', colors.P75)}`
141
64
  },
142
65
  textDecorationLine: {
143
- active: {
144
- light: 'none',
145
- dark: 'none'
146
- }
66
+ active: 'none'
147
67
  },
148
68
  boxShadow: {
149
- focus: {
150
- light: `${colors.P100} 0 0 0 2px`,
151
- dark: `${colors.P100} 0 0 0 2px`
152
- }
69
+ focus: `0 0 0 2px ${token('color.iconBorder.discovery', colors.P100)}`
153
70
  },
154
71
  color: {
155
- default: {
156
- light: colors.N0,
157
- dark: colors.N0
158
- },
159
- hover: {
160
- light: colors.P75,
161
- dark: colors.P75
162
- },
163
- active: {
164
- light: colors.P100,
165
- dark: colors.P100
166
- },
167
- disabled: {
168
- light: colors.P500,
169
- dark: colors.P500
170
- },
171
- selected: {
172
- light: colors.N0,
173
- dark: colors.N0
174
- },
175
- focus: {
176
- light: colors.N0,
177
- dark: colors.N0
178
- }
72
+ default: token('color.text.onBold', colors.N0),
73
+ hover: token('color.text.onBold', colors.P75),
74
+ active: token('color.text.onBold', colors.P100),
75
+ disabled: token('color.text.discovery', colors.P500),
76
+ selected: token('color.text.selected', colors.N0),
77
+ focus: token('color.text.onBold', colors.N0)
179
78
  }
180
79
  }
181
80
  };
182
81
  const modalTheme = {
183
82
  primary: {
184
83
  background: {
185
- default: {
186
- light: colors.P400,
187
- dark: colors.P400
188
- },
189
- hover: {
190
- light: colors.P200,
191
- dark: colors.P200
192
- },
193
- active: {
194
- light: colors.P500,
195
- dark: colors.P500
196
- },
84
+ default: token('color.background.boldDiscovery.resting', colors.P400),
85
+ hover: token('color.background.boldDiscovery.hover', colors.P200),
86
+ active: token('color.background.boldDiscovery.pressed', colors.P500),
197
87
  disabled: {
198
- light: colors.N30,
199
- dark: colors.DN70
200
- },
201
- selected: {
202
- light: colors.R500,
203
- dark: colors.R500
88
+ light: token('color.background.disabled', colors.N30),
89
+ dark: token('color.background.disabled', colors.DN70)
204
90
  },
205
- focus: {
206
- light: colors.P400,
207
- dark: colors.P400
208
- }
91
+ selected: token('color.background.selected.hover', colors.R500),
92
+ focus: token('color.background.boldDiscovery.hover', colors.P400)
209
93
  },
210
94
  boxShadow: {
211
95
  focus: {
212
- light: `${colors.P100} 0 0 0 2px`,
213
- dark: `${colors.P100} 0 0 0 2px`
96
+ light: `0 0 0 2px ${token('color.iconBorder.discovery', colors.P100)}`,
97
+ dark: `0 0 0 2px ${token('color.iconBorder.discovery', colors.P100)}`
214
98
  }
215
99
  },
216
100
  color: {
217
- default: {
218
- light: colors.N0,
219
- dark: colors.N0
220
- },
101
+ default: token('color.text.onBold', colors.N0),
221
102
  disabled: {
222
- light: colors.N0,
223
- dark: colors.DN30
103
+ light: token('color.text.disabled', colors.N0),
104
+ dark: token('color.text.disabled', colors.DN30)
224
105
  },
225
- selected: {
226
- light: colors.N0,
227
- dark: colors.N0
228
- },
229
- focus: {
230
- light: colors.N0,
231
- dark: colors.N0
232
- }
106
+ selected: token('color.text.selected', colors.N0),
107
+ focus: token('color.text.onBold', colors.N0)
233
108
  }
234
109
  }
235
110
  };
@@ -3,9 +3,10 @@ import { css, jsx } from '@emotion/core';
3
3
  import { DN90A, N100A } from '@atlaskit/theme/colors';
4
4
  import { themed, useGlobalTheme } from '@atlaskit/theme/components';
5
5
  import { layers } from '@atlaskit/theme/constants';
6
+ import { token } from '@atlaskit/tokens';
6
7
  const backgroundColor = themed({
7
- light: N100A,
8
- dark: DN90A
8
+ light: token('color.background.blanket', N100A),
9
+ dark: token('color.background.blanket', DN90A)
9
10
  }); // IE11 and Edge: z-index needed because fixed position calculates z-index relative
10
11
  // to body instead of nearest stacking context (Portal in our case).
11
12
 
@@ -4,9 +4,10 @@ import _extends from "@babel/runtime/helpers/extends";
4
4
  import { css, jsx, keyframes } from '@emotion/core';
5
5
  import { P300 } from '@atlaskit/theme/colors';
6
6
  import { layers } from '@atlaskit/theme/constants';
7
+ import { token } from '@atlaskit/tokens';
7
8
  // NOTE:
8
9
  // Pulse color "rgb(101, 84, 192)" derived from "colors.P300"
9
- const baseShadow = `0 0 0 2px ${P300}`;
10
+ const baseShadow = token('shadow.overlay', `0 0 0 2px ${P300}`);
10
11
  const easing = 'cubic-bezier(0.55, 0.055, 0.675, 0.19)';
11
12
  const pulseKeyframes = keyframes({
12
13
  '0%, 33%': {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/onboarding",
3
- "version": "10.2.6",
3
+ "version": "10.3.0",
4
4
  "sideEffects": false
5
5
  }
@@ -18,6 +18,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
18
18
  import React from 'react';
19
19
  import { Theme as ButtonTheme } from '@atlaskit/button/custom-theme-button';
20
20
  import { N0, N50A, N60A, P300 } from '@atlaskit/theme/colors';
21
+ import { token } from '@atlaskit/tokens';
21
22
  import Card from './card';
22
23
  import { spotlightButtonTheme } from './theme';
23
24
 
@@ -68,10 +69,10 @@ var SpotlightCard = /*#__PURE__*/function (_React$Component) {
68
69
  return _theme(function () {
69
70
  return _objectSpread(_objectSpread({}, others), {}, {
70
71
  container: _objectSpread({
71
- background: P300,
72
- color: N0,
72
+ background: token('color.background.boldDiscovery.resting', P300),
73
+ color: token('color.text.onBold', N0),
73
74
  width: "".concat(Math.min(Math.max(width, 160), 600), "px"),
74
- boxShadow: isFlat ? undefined : "0 4px 8px -2px ".concat(N50A, ", 0 0 1px ").concat(N60A)
75
+ boxShadow: isFlat ? undefined : token('shadow.card', "0 4px 8px -2px ".concat(N50A, ", 0 0 1px ").concat(N60A))
75
76
  }, container)
76
77
  });
77
78
  }, {});
@@ -23,7 +23,7 @@ import { DialogImage } from '../styled/dialog';
23
23
  import SpotlightCard from './spotlight-card';
24
24
  import ValueChanged from './value-changed';
25
25
  var packageName = "@atlaskit/onboarding";
26
- var packageVersion = "10.2.6";
26
+ var packageVersion = "10.3.0";
27
27
 
28
28
  var SpotlightDialog = /*#__PURE__*/function (_Component) {
29
29
  _inherits(SpotlightDialog, _Component);
@@ -7,237 +7,112 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
7
7
  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) { _defineProperty(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; }
8
8
 
9
9
  import * as colors from '@atlaskit/theme/colors';
10
+ import { token } from '@atlaskit/tokens';
10
11
  var spotlightTheme = {
11
12
  default: {
12
13
  background: {
13
- default: {
14
- light: colors.P400,
15
- dark: colors.P400
16
- },
17
- hover: {
18
- light: colors.P200,
19
- dark: colors.P200
20
- },
21
- active: {
22
- light: colors.P500,
23
- dark: colors.P500
24
- },
25
- disabled: {
26
- light: colors.P400,
27
- dark: colors.P400
28
- },
29
- selected: {
30
- light: colors.R500,
31
- dark: colors.R500
32
- },
33
- focus: {
34
- light: colors.P400,
35
- dark: colors.P400
36
- }
14
+ default: token('color.background.subtleNeutral.resting', colors.P400),
15
+ hover: token('color.background.subtleNeutral.hover', colors.P200),
16
+ active: token('color.background.subtleNeutral.pressed', colors.P500),
17
+ disabled: token('color.background.disabled', colors.P400),
18
+ selected: token('color.background.subtleNeutral.pressed', colors.R500),
19
+ focus: token('color.background.subtleNeutral.resting', colors.P400)
37
20
  },
38
21
  boxShadow: {
39
- focus: {
40
- light: "".concat(colors.P100, " 0 0 0 2px"),
41
- dark: "".concat(colors.P100, " 0 0 0 2px")
42
- }
22
+ focus: "0 0 0 2px ".concat(token('color.iconBorder.discovery', colors.P100))
43
23
  },
44
24
  color: {
45
- default: {
46
- light: colors.N0,
47
- dark: colors.N0
48
- },
49
- hover: {
50
- light: colors.N0,
51
- dark: colors.N0
52
- },
53
- active: {
54
- light: colors.N0,
55
- dark: colors.N0
56
- },
25
+ default: token('color.text.onBold', colors.N0),
26
+ hover: token('color.text.onBold', colors.N0),
27
+ active: token('color.text.onBold', colors.N0),
57
28
  disabled: {
58
- light: colors.N0,
59
- dark: colors.DN30
60
- },
61
- selected: {
62
- light: colors.N0,
63
- dark: colors.N0
29
+ light: token('color.text.disabled', colors.N0),
30
+ dark: token('color.text.disabled', colors.DN30)
64
31
  },
65
- focus: {
66
- light: colors.N0,
67
- dark: colors.N0
68
- }
32
+ selected: token('color.text.onBold', colors.N0),
33
+ focus: token('color.text.onBold', colors.N0)
69
34
  },
70
35
  outline: {
71
- focus: {
72
- light: 'none',
73
- dark: 'none'
74
- }
36
+ focus: 'none'
75
37
  }
76
38
  },
77
39
  subtle: {
78
40
  background: {
79
- default: {
80
- light: 'none',
81
- dark: 'none'
82
- },
83
- hover: {
84
- light: colors.P200,
85
- dark: colors.P200
86
- },
87
- active: {
88
- light: colors.P500,
89
- dark: colors.P500
90
- },
91
- disabled: {
92
- light: 'none',
93
- dark: 'none'
94
- },
41
+ default: 'none',
42
+ hover: token('color.background.subtleNeutral.hover', colors.P200),
43
+ active: token('color.background.subtleNeutral.pressed', colors.P500),
44
+ disabled: 'none',
95
45
  selected: {
96
- light: colors.N700,
97
- dark: colors.DN0
46
+ light: token('color.background.selected.hover', colors.N700),
47
+ dark: token('color.background.selected.hover', colors.DN0)
98
48
  },
99
49
  focusSelected: {
100
- light: colors.N700,
101
- dark: colors.DN0
50
+ light: token('color.background.selected.hover', colors.N700),
51
+ dark: token('color.background.selected.hover', colors.DN0)
102
52
  }
103
53
  },
104
54
  boxShadow: {
105
- focus: {
106
- light: "".concat(colors.P100, " 0 0 0 2px"),
107
- dark: "".concat(colors.P100, " 0 0 0 2px")
108
- }
55
+ focus: "0 0 0 2px ".concat(token('color.iconBorder.discovery', colors.P100))
109
56
  },
110
57
  color: {
111
- default: {
112
- light: colors.N0,
113
- dark: colors.N0
114
- },
115
- hover: {
116
- light: colors.N0,
117
- dark: colors.N0
118
- },
119
- active: {
120
- light: colors.N0,
121
- dark: colors.N0
122
- },
123
- disabled: {
124
- light: colors.N0,
125
- dark: colors.N0
126
- },
127
- selected: {
128
- light: colors.N0,
129
- dark: colors.N0
130
- },
131
- focus: {
132
- light: colors.N0,
133
- dark: colors.N0
134
- }
58
+ default: token('color.text.onBold', colors.N0),
59
+ hover: token('color.text.onBold', colors.N0),
60
+ active: token('color.text.onBold', colors.N0),
61
+ disabled: token('color.text.disabled', colors.N0),
62
+ selected: token('color.text.onBold', colors.N0),
63
+ focus: token('color.text.onBold', colors.N0)
135
64
  },
136
65
  outline: {
137
- focus: {
138
- light: 'none',
139
- dark: 'none'
140
- }
66
+ focus: 'none'
141
67
  }
142
68
  },
143
69
  'subtle-link': {
144
70
  textDecoration: {
145
- hover: {
146
- light: "underline ".concat(colors.P75),
147
- dark: "underline ".concat(colors.P75)
148
- }
71
+ hover: "underline ".concat(token('color.text.discovery', colors.P75))
149
72
  },
150
73
  textDecorationLine: {
151
- active: {
152
- light: 'none',
153
- dark: 'none'
154
- }
74
+ active: 'none'
155
75
  },
156
76
  boxShadow: {
157
- focus: {
158
- light: "".concat(colors.P100, " 0 0 0 2px"),
159
- dark: "".concat(colors.P100, " 0 0 0 2px")
160
- }
77
+ focus: "0 0 0 2px ".concat(token('color.iconBorder.discovery', colors.P100))
161
78
  },
162
79
  color: {
163
- default: {
164
- light: colors.N0,
165
- dark: colors.N0
166
- },
167
- hover: {
168
- light: colors.P75,
169
- dark: colors.P75
170
- },
171
- active: {
172
- light: colors.P100,
173
- dark: colors.P100
174
- },
175
- disabled: {
176
- light: colors.P500,
177
- dark: colors.P500
178
- },
179
- selected: {
180
- light: colors.N0,
181
- dark: colors.N0
182
- },
183
- focus: {
184
- light: colors.N0,
185
- dark: colors.N0
186
- }
80
+ default: token('color.text.onBold', colors.N0),
81
+ hover: token('color.text.onBold', colors.P75),
82
+ active: token('color.text.onBold', colors.P100),
83
+ disabled: token('color.text.discovery', colors.P500),
84
+ selected: token('color.text.selected', colors.N0),
85
+ focus: token('color.text.onBold', colors.N0)
187
86
  }
188
87
  }
189
88
  };
190
89
  var modalTheme = {
191
90
  primary: {
192
91
  background: {
193
- default: {
194
- light: colors.P400,
195
- dark: colors.P400
196
- },
197
- hover: {
198
- light: colors.P200,
199
- dark: colors.P200
200
- },
201
- active: {
202
- light: colors.P500,
203
- dark: colors.P500
204
- },
92
+ default: token('color.background.boldDiscovery.resting', colors.P400),
93
+ hover: token('color.background.boldDiscovery.hover', colors.P200),
94
+ active: token('color.background.boldDiscovery.pressed', colors.P500),
205
95
  disabled: {
206
- light: colors.N30,
207
- dark: colors.DN70
208
- },
209
- selected: {
210
- light: colors.R500,
211
- dark: colors.R500
96
+ light: token('color.background.disabled', colors.N30),
97
+ dark: token('color.background.disabled', colors.DN70)
212
98
  },
213
- focus: {
214
- light: colors.P400,
215
- dark: colors.P400
216
- }
99
+ selected: token('color.background.selected.hover', colors.R500),
100
+ focus: token('color.background.boldDiscovery.hover', colors.P400)
217
101
  },
218
102
  boxShadow: {
219
103
  focus: {
220
- light: "".concat(colors.P100, " 0 0 0 2px"),
221
- dark: "".concat(colors.P100, " 0 0 0 2px")
104
+ light: "0 0 0 2px ".concat(token('color.iconBorder.discovery', colors.P100)),
105
+ dark: "0 0 0 2px ".concat(token('color.iconBorder.discovery', colors.P100))
222
106
  }
223
107
  },
224
108
  color: {
225
- default: {
226
- light: colors.N0,
227
- dark: colors.N0
228
- },
109
+ default: token('color.text.onBold', colors.N0),
229
110
  disabled: {
230
- light: colors.N0,
231
- dark: colors.DN30
111
+ light: token('color.text.disabled', colors.N0),
112
+ dark: token('color.text.disabled', colors.DN30)
232
113
  },
233
- selected: {
234
- light: colors.N0,
235
- dark: colors.N0
236
- },
237
- focus: {
238
- light: colors.N0,
239
- dark: colors.N0
240
- }
114
+ selected: token('color.text.selected', colors.N0),
115
+ focus: token('color.text.onBold', colors.N0)
241
116
  }
242
117
  }
243
118
  };
@@ -9,9 +9,10 @@ import { css, jsx } from '@emotion/core';
9
9
  import { DN90A, N100A } from '@atlaskit/theme/colors';
10
10
  import { themed, useGlobalTheme } from '@atlaskit/theme/components';
11
11
  import { layers } from '@atlaskit/theme/constants';
12
+ import { token } from '@atlaskit/tokens';
12
13
  var backgroundColor = themed({
13
- light: N100A,
14
- dark: DN90A
14
+ light: token('color.background.blanket', N100A),
15
+ dark: token('color.background.blanket', DN90A)
15
16
  }); // IE11 and Edge: z-index needed because fixed position calculates z-index relative
16
17
  // to body instead of nearest stacking context (Portal in our case).
17
18
 
@@ -10,9 +10,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
10
10
  import { css, jsx, keyframes } from '@emotion/core';
11
11
  import { P300 } from '@atlaskit/theme/colors';
12
12
  import { layers } from '@atlaskit/theme/constants';
13
+ import { token } from '@atlaskit/tokens';
13
14
  // NOTE:
14
15
  // Pulse color "rgb(101, 84, 192)" derived from "colors.P300"
15
- var baseShadow = "0 0 0 2px ".concat(P300);
16
+ var baseShadow = token('shadow.overlay', "0 0 0 2px ".concat(P300));
16
17
  var easing = 'cubic-bezier(0.55, 0.055, 0.675, 0.19)';
17
18
  var pulseKeyframes = keyframes({
18
19
  '0%, 33%': {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/onboarding",
3
- "version": "10.2.6",
3
+ "version": "10.3.0",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/onboarding",
3
- "version": "10.2.6",
3
+ "version": "10.3.0",
4
4
  "description": "An onboarding spotlight introduces new features to users through focused messages or multi-step tours.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -27,10 +27,11 @@
27
27
  "dependencies": {
28
28
  "@atlaskit/analytics-next": "^8.0.0",
29
29
  "@atlaskit/button": "^16.0.0",
30
- "@atlaskit/modal-dialog": "^12.0.0",
30
+ "@atlaskit/modal-dialog": "^12.1.0",
31
31
  "@atlaskit/popper": "^5.0.0",
32
32
  "@atlaskit/portal": "^4.0.0",
33
33
  "@atlaskit/theme": "^12.0.0",
34
+ "@atlaskit/tokens": "^0.3.0",
34
35
  "@babel/runtime": "^7.0.0",
35
36
  "@emotion/core": "^10.0.9",
36
37
  "exenv": "^1.2.2",
@@ -69,7 +70,7 @@
69
70
  },
70
71
  "@repo/internal": {
71
72
  "analytics": "analytics-next",
72
- "theming": "new-theming-api",
73
+ "theming": "tokens",
73
74
  "styling": "emotion",
74
75
  "design-system": "v1",
75
76
  "deprecation": "no-deprecated-imports"