@atlaskit/onboarding 10.2.6 → 10.3.3

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.
Files changed (40) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/cjs/components/animation.js +2 -2
  3. package/dist/cjs/components/card.js +4 -3
  4. package/dist/cjs/components/index.js +4 -4
  5. package/dist/cjs/components/modal.js +5 -2
  6. package/dist/cjs/components/spotlight-card.js +8 -6
  7. package/dist/cjs/components/spotlight-dialog.js +6 -4
  8. package/dist/cjs/components/spotlight-inner.js +2 -2
  9. package/dist/cjs/components/spotlight-manager.js +3 -3
  10. package/dist/cjs/components/spotlight.js +3 -1
  11. package/dist/cjs/components/theme.js +62 -185
  12. package/dist/cjs/index.js +6 -6
  13. package/dist/cjs/styled/blanket.js +4 -4
  14. package/dist/cjs/styled/dialog.js +3 -3
  15. package/dist/cjs/styled/modal.js +1 -1
  16. package/dist/cjs/styled/target.js +22 -9
  17. package/dist/cjs/utils/use-element-box.js +1 -1
  18. package/dist/cjs/version.json +1 -1
  19. package/dist/es2019/components/spotlight-card.js +3 -4
  20. package/dist/es2019/components/spotlight-dialog.js +1 -1
  21. package/dist/es2019/components/theme.js +54 -180
  22. package/dist/es2019/styled/blanket.js +2 -2
  23. package/dist/es2019/styled/target.js +10 -3
  24. package/dist/es2019/version.json +1 -1
  25. package/dist/esm/components/animation.js +2 -2
  26. package/dist/esm/components/card.js +4 -2
  27. package/dist/esm/components/modal.js +4 -2
  28. package/dist/esm/components/spotlight-card.js +7 -6
  29. package/dist/esm/components/spotlight-dialog.js +5 -4
  30. package/dist/esm/components/spotlight-inner.js +2 -2
  31. package/dist/esm/components/spotlight-manager.js +2 -2
  32. package/dist/esm/components/spotlight.js +2 -1
  33. package/dist/esm/components/theme.js +60 -184
  34. package/dist/esm/styled/blanket.js +4 -4
  35. package/dist/esm/styled/dialog.js +2 -1
  36. package/dist/esm/styled/target.js +19 -8
  37. package/dist/esm/version.json +1 -1
  38. package/dist/types/components/modal.d.ts +2 -2
  39. package/dist/types/styled/target.d.ts +3 -0
  40. package/package.json +11 -9
package/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # @atlaskit/onboarding
2
2
 
3
+ ## 10.3.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 10.3.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [`9a5740d1ec3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9a5740d1ec3) - [ux] The `pulse` prop now works correctly for `<SpotlightPulse />`. Previously, it was applying the pulse to the `SpotlightPulse` target regardless of the `pulse` value. Now it checks the value of `pulse` and applies the animation accordingly.
14
+
15
+ ## 10.3.1
16
+
17
+ ### Patch Changes
18
+
19
+ - [`3fced6aa641`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3fced6aa641) - Bumped `react-focus-lock` to version `^2.2.1`.
20
+ - [`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.
21
+ - Updated dependencies
22
+
23
+ ## 10.3.0
24
+
25
+ ### Minor Changes
26
+
27
+ - [`50081f13de7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/50081f13de7) - Instrumented `@atlaskit/onboarding` with the new theming package, `@atlaskit/tokens`.
28
+
29
+ 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.
30
+
31
+ ### Patch Changes
32
+
33
+ - Updated dependencies
34
+
3
35
  ## 10.2.6
4
36
 
5
37
  ### Patch Changes
@@ -13,9 +13,9 @@ var _react = _interopRequireDefault(require("react"));
13
13
 
14
14
  var _reactTransitionGroup = require("react-transition-group");
15
15
 
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; }
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 _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; }
19
19
 
20
20
  var duration = {
21
21
  enter: 0,
@@ -25,7 +25,8 @@ var _typography = require("@atlaskit/theme/typography");
25
25
 
26
26
  var _dialog = require("../styled/dialog");
27
27
 
28
- /** @jsx jsx */
28
+ var _excluded = ["children", "theme"],
29
+ _excluded2 = ["text", "key"];
29
30
  var gridSize = (0, _constants.gridSize)(); // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
30
31
 
31
32
  var lightH600Styles = (0, _core.css)((0, _typography.h600)({
@@ -43,7 +44,7 @@ var darkH600Styles = (0, _core.css)((0, _typography.h600)({
43
44
  var Container = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
44
45
  var children = _ref.children,
45
46
  theme = _ref.theme,
46
- props = (0, _objectWithoutProperties2.default)(_ref, ["children", "theme"]);
47
+ props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
47
48
  return (// eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
48
49
  (0, _core.jsx)("div", (0, _extends2.default)({
49
50
  css: theme,
@@ -146,7 +147,7 @@ var Card = /*#__PURE__*/_react.default.forwardRef(function (_ref4, ref) {
146
147
  }, heading), headingAfterElement) : null, children, actions.length > 0 || actionsBeforeElement ? (0, _core.jsx)(Footer, null, actionsBeforeElement || (0, _core.jsx)("span", null), (0, _core.jsx)(_dialog.DialogActionItemContainer, null, actions.map(function (_ref6, idx) {
147
148
  var text = _ref6.text,
148
149
  key = _ref6.key,
149
- rest = (0, _objectWithoutProperties2.default)(_ref6, ["text", "key"]);
150
+ rest = (0, _objectWithoutProperties2.default)(_ref6, _excluded2);
150
151
  return (0, _core.jsx)(_dialog.DialogActionItem, {
151
152
  key: key || (typeof text === 'string' ? text : "".concat(idx))
152
153
  }, (0, _core.jsx)(_customThemeButton.default, rest, text));
@@ -41,10 +41,10 @@ Object.defineProperty(exports, "SpotlightTransition", {
41
41
  return _spotlightTransition.default;
42
42
  }
43
43
  });
44
- Object.defineProperty(exports, "useSpotlight", {
44
+ Object.defineProperty(exports, "modalButtonTheme", {
45
45
  enumerable: true,
46
46
  get: function get() {
47
- return _useSpotlight.default;
47
+ return _theme.modalButtonTheme;
48
48
  }
49
49
  });
50
50
  Object.defineProperty(exports, "spotlightButtonTheme", {
@@ -53,10 +53,10 @@ Object.defineProperty(exports, "spotlightButtonTheme", {
53
53
  return _theme.spotlightButtonTheme;
54
54
  }
55
55
  });
56
- Object.defineProperty(exports, "modalButtonTheme", {
56
+ Object.defineProperty(exports, "useSpotlight", {
57
57
  enumerable: true,
58
58
  get: function get() {
59
- return _theme.modalButtonTheme;
59
+ return _useSpotlight.default;
60
60
  }
61
61
  });
62
62
 
@@ -39,6 +39,9 @@ var _modal = require("../styled/modal");
39
39
 
40
40
  var _theme = require("./theme");
41
41
 
42
+ var _excluded = ["text", "key"],
43
+ _excluded2 = ["actions", "children", "heading"];
44
+
42
45
  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); }
43
46
 
44
47
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(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; }
@@ -100,7 +103,7 @@ var OnboardingModal = /*#__PURE__*/function (_Component) {
100
103
  }, actionList.map(function (_ref, idx) {
101
104
  var text = _ref.text,
102
105
  key = _ref.key,
103
- rest = (0, _objectWithoutProperties2.default)(_ref, ["text", "key"]);
106
+ rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
104
107
  var variant = idx ? 'subtle-link' : 'primary';
105
108
  return (0, _core.jsx)(_modal.ModalActionItem, {
106
109
  key: key || (typeof text === 'string' ? text : "".concat(idx))
@@ -123,7 +126,7 @@ var OnboardingModal = /*#__PURE__*/function (_Component) {
123
126
  actions = _this$props.actions,
124
127
  children = _this$props.children,
125
128
  heading = _this$props.heading,
126
- props = (0, _objectWithoutProperties2.default)(_this$props, ["actions", "children", "heading"]);
129
+ props = (0, _objectWithoutProperties2.default)(_this$props, _excluded2);
127
130
  var Header = this.headerComponent(this.props);
128
131
  var Footer = this.footerComponent(this.props);
129
132
  return (0, _core.jsx)(_modalDialog.default, (0, _extends2.default)({
@@ -33,9 +33,11 @@ var _card = _interopRequireDefault(require("./card"));
33
33
 
34
34
  var _theme2 = require("./theme");
35
35
 
36
- 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; }
36
+ var _excluded = ["container"];
37
37
 
38
- 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; }
38
+ 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; }
39
+
40
+ 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; }
39
41
 
40
42
  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); }; }
41
43
 
@@ -82,15 +84,15 @@ var SpotlightCard = /*#__PURE__*/function (_React$Component) {
82
84
  theme: function theme(parent) {
83
85
  var _parent = parent({}),
84
86
  container = _parent.container,
85
- others = (0, _objectWithoutProperties2.default)(_parent, ["container"]);
87
+ others = (0, _objectWithoutProperties2.default)(_parent, _excluded);
86
88
 
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: "var(--ds-background-boldDiscovery-resting, ".concat(_colors.P300, ")"),
93
+ color: "var(--ds-text-onBold, ".concat(_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 : "var(--ds-card, ".concat("0 4px 8px -2px ".concat(_colors.N50A, ", 0 0 1px ").concat(_colors.N60A), ")")
94
96
  }, container)
95
97
  });
96
98
  }, {});
@@ -39,20 +39,22 @@ var _spotlightCard = _interopRequireDefault(require("./spotlight-card"));
39
39
 
40
40
  var _valueChanged = _interopRequireDefault(require("./value-changed"));
41
41
 
42
+ var _excluded = ["container"];
43
+
42
44
  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); }
43
45
 
44
46
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(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; }
45
47
 
46
- 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; }
48
+ 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; }
47
49
 
48
- 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; }
50
+ 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; }
49
51
 
50
52
  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); }; }
51
53
 
52
54
  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
55
 
54
56
  var packageName = "@atlaskit/onboarding";
55
- var packageVersion = "10.2.6";
57
+ var packageVersion = "10.3.3";
56
58
 
57
59
  var SpotlightDialog = /*#__PURE__*/function (_Component) {
58
60
  (0, _inherits2.default)(SpotlightDialog, _Component);
@@ -159,7 +161,7 @@ var SpotlightDialog = /*#__PURE__*/function (_Component) {
159
161
  theme: function theme(parent) {
160
162
  var _parent = parent({}),
161
163
  container = _parent.container,
162
- others = (0, _objectWithoutProperties2.default)(_parent, ["container"]);
164
+ others = (0, _objectWithoutProperties2.default)(_parent, _excluded);
163
165
 
164
166
  return _objectSpread(_objectSpread({}, others), {}, {
165
167
  container: _objectSpread(_objectSpread(_objectSpread({}, container), style), animationStyles)
@@ -47,9 +47,9 @@ var _spotlightDialog = _interopRequireDefault(require("./spotlight-dialog"));
47
47
 
48
48
  var _spotlightTransition = require("./spotlight-transition");
49
49
 
50
- 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; }
50
+ 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; }
51
51
 
52
- 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; }
52
+ 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; }
53
53
 
54
54
  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); }; }
55
55
 
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
7
7
  Object.defineProperty(exports, "__esModule", {
8
8
  value: true
9
9
  });
10
- exports.default = exports.SpotlightConsumer = exports.SpotlightContext = exports.TargetConsumer = void 0;
10
+ exports.default = exports.TargetConsumer = exports.SpotlightContext = exports.SpotlightConsumer = void 0;
11
11
 
12
12
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
13
13
 
@@ -39,9 +39,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
39
39
 
40
40
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(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; }
41
41
 
42
- 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; }
42
+ 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; }
43
43
 
44
- 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; }
44
+ 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; }
45
45
 
46
46
  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
47
 
@@ -17,6 +17,8 @@ var _spotlightInner = _interopRequireDefault(require("./spotlight-inner"));
17
17
 
18
18
  var _spotlightManager = require("./spotlight-manager");
19
19
 
20
+ var _excluded = ["dialogWidth", "pulse", "testId", "targetNode", "target"];
21
+
20
22
  /**
21
23
  * __Spotlight__
22
24
  *
@@ -35,7 +37,7 @@ var Spotlight = function Spotlight(_ref) {
35
37
  testId = _ref$testId === void 0 ? 'spotlight' : _ref$testId,
36
38
  targetNode = _ref.targetNode,
37
39
  target = _ref.target,
38
- rest = (0, _objectWithoutProperties2.default)(_ref, ["dialogWidth", "pulse", "testId", "targetNode", "target"]);
40
+ rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
39
41
  return /*#__PURE__*/_react.default.createElement(_spotlightManager.SpotlightConsumer, null, function (_ref2) {
40
42
  var opened = _ref2.opened,
41
43
  closed = _ref2.closed,
@@ -7,7 +7,7 @@ var _typeof3 = require("@babel/runtime/helpers/typeof");
7
7
  Object.defineProperty(exports, "__esModule", {
8
8
  value: true
9
9
  });
10
- exports.modalButtonTheme = exports.spotlightButtonTheme = void 0;
10
+ exports.spotlightButtonTheme = exports.modalButtonTheme = void 0;
11
11
 
12
12
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
13
13
 
@@ -17,245 +17,122 @@ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
17
17
 
18
18
  var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
19
19
 
20
+ var _excluded = ["buttonStyles"],
21
+ _excluded2 = ["buttonStyles"];
22
+
20
23
  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
24
 
22
25
  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; }
23
26
 
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; }
27
+ 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; }
25
28
 
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; }
29
+ 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; }
27
30
 
28
31
  var spotlightTheme = {
29
32
  default: {
30
33
  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
- }
34
+ default: "var(--ds-background-subtleNeutral-resting, ".concat(colors.P400, ")"),
35
+ hover: "var(--ds-background-subtleNeutral-hover, ".concat(colors.P200, ")"),
36
+ active: "var(--ds-background-subtleNeutral-pressed, ".concat(colors.P500, ")"),
37
+ disabled: "var(--ds-background-disabled, ".concat(colors.P400, ")"),
38
+ selected: "var(--ds-background-subtleNeutral-pressed, ".concat(colors.R500, ")"),
39
+ focus: "var(--ds-background-subtleNeutral-resting, ".concat(colors.P400, ")")
55
40
  },
56
41
  boxShadow: {
57
- focus: {
58
- light: "".concat(colors.P100, " 0 0 0 2px"),
59
- dark: "".concat(colors.P100, " 0 0 0 2px")
60
- }
42
+ focus: "0 0 0 2px ".concat("var(--ds-iconBorder-discovery, ".concat(colors.P100, ")"))
61
43
  },
62
44
  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
- },
45
+ default: "var(--ds-text-onBold, ".concat(colors.N0, ")"),
46
+ hover: "var(--ds-text-onBold, ".concat(colors.N0, ")"),
47
+ active: "var(--ds-text-onBold, ".concat(colors.N0, ")"),
75
48
  disabled: {
76
- light: colors.N0,
77
- dark: colors.DN30
78
- },
79
- selected: {
80
- light: colors.N0,
81
- dark: colors.N0
49
+ light: "var(--ds-text-disabled, ".concat(colors.N0, ")"),
50
+ dark: "var(--ds-text-disabled, ".concat(colors.DN30, ")")
82
51
  },
83
- focus: {
84
- light: colors.N0,
85
- dark: colors.N0
86
- }
52
+ selected: "var(--ds-text-onBold, ".concat(colors.N0, ")"),
53
+ focus: "var(--ds-text-onBold, ".concat(colors.N0, ")")
87
54
  },
88
55
  outline: {
89
- focus: {
90
- light: 'none',
91
- dark: 'none'
92
- }
56
+ focus: 'none'
93
57
  }
94
58
  },
95
59
  subtle: {
96
60
  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
- },
61
+ default: 'none',
62
+ hover: "var(--ds-background-subtleNeutral-hover, ".concat(colors.P200, ")"),
63
+ active: "var(--ds-background-subtleNeutral-pressed, ".concat(colors.P500, ")"),
64
+ disabled: 'none',
113
65
  selected: {
114
- light: colors.N700,
115
- dark: colors.DN0
66
+ light: "var(--ds-background-selected-hover, ".concat(colors.N700, ")"),
67
+ dark: "var(--ds-background-selected-hover, ".concat(colors.DN0, ")")
116
68
  },
117
69
  focusSelected: {
118
- light: colors.N700,
119
- dark: colors.DN0
70
+ light: "var(--ds-background-selected-hover, ".concat(colors.N700, ")"),
71
+ dark: "var(--ds-background-selected-hover, ".concat(colors.DN0, ")")
120
72
  }
121
73
  },
122
74
  boxShadow: {
123
- focus: {
124
- light: "".concat(colors.P100, " 0 0 0 2px"),
125
- dark: "".concat(colors.P100, " 0 0 0 2px")
126
- }
75
+ focus: "0 0 0 2px ".concat("var(--ds-iconBorder-discovery, ".concat(colors.P100, ")"))
127
76
  },
128
77
  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
- }
78
+ default: "var(--ds-text-onBold, ".concat(colors.N0, ")"),
79
+ hover: "var(--ds-text-onBold, ".concat(colors.N0, ")"),
80
+ active: "var(--ds-text-onBold, ".concat(colors.N0, ")"),
81
+ disabled: "var(--ds-text-disabled, ".concat(colors.N0, ")"),
82
+ selected: "var(--ds-text-onBold, ".concat(colors.N0, ")"),
83
+ focus: "var(--ds-text-onBold, ".concat(colors.N0, ")")
153
84
  },
154
85
  outline: {
155
- focus: {
156
- light: 'none',
157
- dark: 'none'
158
- }
86
+ focus: 'none'
159
87
  }
160
88
  },
161
89
  'subtle-link': {
162
90
  textDecoration: {
163
- hover: {
164
- light: "underline ".concat(colors.P75),
165
- dark: "underline ".concat(colors.P75)
166
- }
91
+ hover: "underline ".concat("var(--ds-text-discovery, ".concat(colors.P75, ")"))
167
92
  },
168
93
  textDecorationLine: {
169
- active: {
170
- light: 'none',
171
- dark: 'none'
172
- }
94
+ active: 'none'
173
95
  },
174
96
  boxShadow: {
175
- focus: {
176
- light: "".concat(colors.P100, " 0 0 0 2px"),
177
- dark: "".concat(colors.P100, " 0 0 0 2px")
178
- }
97
+ focus: "0 0 0 2px ".concat("var(--ds-iconBorder-discovery, ".concat(colors.P100, ")"))
179
98
  },
180
99
  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
- }
100
+ default: "var(--ds-text-onBold, ".concat(colors.N0, ")"),
101
+ hover: "var(--ds-text-onBold, ".concat(colors.P75, ")"),
102
+ active: "var(--ds-text-onBold, ".concat(colors.P100, ")"),
103
+ disabled: "var(--ds-text-discovery, ".concat(colors.P500, ")"),
104
+ selected: "var(--ds-text-selected, ".concat(colors.N0, ")"),
105
+ focus: "var(--ds-text-onBold, ".concat(colors.N0, ")")
205
106
  }
206
107
  }
207
108
  };
208
109
  var modalTheme = {
209
110
  primary: {
210
111
  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
- },
112
+ default: "var(--ds-background-boldDiscovery-resting, ".concat(colors.P400, ")"),
113
+ hover: "var(--ds-background-boldDiscovery-hover, ".concat(colors.P200, ")"),
114
+ active: "var(--ds-background-boldDiscovery-pressed, ".concat(colors.P500, ")"),
223
115
  disabled: {
224
- light: colors.N30,
225
- dark: colors.DN70
226
- },
227
- selected: {
228
- light: colors.R500,
229
- dark: colors.R500
116
+ light: "var(--ds-background-disabled, ".concat(colors.N30, ")"),
117
+ dark: "var(--ds-background-disabled, ".concat(colors.DN70, ")")
230
118
  },
231
- focus: {
232
- light: colors.P400,
233
- dark: colors.P400
234
- }
119
+ selected: "var(--ds-background-selected-hover, ".concat(colors.R500, ")"),
120
+ focus: "var(--ds-background-boldDiscovery-hover, ".concat(colors.P400, ")")
235
121
  },
236
122
  boxShadow: {
237
123
  focus: {
238
- light: "".concat(colors.P100, " 0 0 0 2px"),
239
- dark: "".concat(colors.P100, " 0 0 0 2px")
124
+ light: "0 0 0 2px ".concat("var(--ds-iconBorder-discovery, ".concat(colors.P100, ")")),
125
+ dark: "0 0 0 2px ".concat("var(--ds-iconBorder-discovery, ".concat(colors.P100, ")"))
240
126
  }
241
127
  },
242
128
  color: {
243
- default: {
244
- light: colors.N0,
245
- dark: colors.N0
246
- },
129
+ default: "var(--ds-text-onBold, ".concat(colors.N0, ")"),
247
130
  disabled: {
248
- light: colors.N0,
249
- dark: colors.DN30
131
+ light: "var(--ds-text-disabled, ".concat(colors.N0, ")"),
132
+ dark: "var(--ds-text-disabled, ".concat(colors.DN30, ")")
250
133
  },
251
- selected: {
252
- light: colors.N0,
253
- dark: colors.N0
254
- },
255
- focus: {
256
- light: colors.N0,
257
- dark: colors.N0
258
- }
134
+ selected: "var(--ds-text-selected, ".concat(colors.N0, ")"),
135
+ focus: "var(--ds-text-onBold, ".concat(colors.N0, ")")
259
136
  }
260
137
  }
261
138
  };
@@ -292,7 +169,7 @@ function extract(newTheme, _ref) {
292
169
  var spotlightButtonTheme = function spotlightButtonTheme(current, themeProps) {
293
170
  var _current = current(themeProps),
294
171
  buttonStyles = _current.buttonStyles,
295
- rest = (0, _objectWithoutProperties2.default)(_current, ["buttonStyles"]);
172
+ rest = (0, _objectWithoutProperties2.default)(_current, _excluded);
296
173
 
297
174
  return _objectSpread({
298
175
  buttonStyles: _objectSpread(_objectSpread({}, buttonStyles), extract(spotlightTheme, themeProps))
@@ -304,7 +181,7 @@ exports.spotlightButtonTheme = spotlightButtonTheme;
304
181
  var modalButtonTheme = function modalButtonTheme(current, themeProps) {
305
182
  var _current2 = current(themeProps),
306
183
  buttonStyles = _current2.buttonStyles,
307
- rest = (0, _objectWithoutProperties2.default)(_current2, ["buttonStyles"]);
184
+ rest = (0, _objectWithoutProperties2.default)(_current2, _excluded2);
308
185
 
309
186
  return _objectSpread({
310
187
  buttonStyles: _objectSpread(_objectSpread({}, buttonStyles), extract(modalTheme, themeProps))
package/dist/cjs/index.js CHANGED
@@ -27,6 +27,12 @@ Object.defineProperty(exports, "SpotlightManager", {
27
27
  return _components.SpotlightManager;
28
28
  }
29
29
  });
30
+ Object.defineProperty(exports, "SpotlightPulse", {
31
+ enumerable: true,
32
+ get: function get() {
33
+ return _target.Pulse;
34
+ }
35
+ });
30
36
  Object.defineProperty(exports, "SpotlightTarget", {
31
37
  enumerable: true,
32
38
  get: function get() {
@@ -57,12 +63,6 @@ Object.defineProperty(exports, "useSpotlight", {
57
63
  return _components.useSpotlight;
58
64
  }
59
65
  });
60
- Object.defineProperty(exports, "SpotlightPulse", {
61
- enumerable: true,
62
- get: function get() {
63
- return _target.Pulse;
64
- }
65
- });
66
66
 
67
67
  var _components = require("./components");
68
68