@atlaskit/onboarding 10.3.0 → 10.3.4
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 +28 -0
- package/dist/cjs/components/animation.js +2 -2
- package/dist/cjs/components/card.js +4 -3
- package/dist/cjs/components/index.js +4 -4
- package/dist/cjs/components/modal.js +5 -2
- package/dist/cjs/components/spotlight-card.js +8 -8
- package/dist/cjs/components/spotlight-dialog.js +6 -4
- package/dist/cjs/components/spotlight-inner.js +2 -2
- package/dist/cjs/components/spotlight-manager.js +3 -3
- package/dist/cjs/components/spotlight.js +3 -1
- package/dist/cjs/components/theme.js +56 -55
- package/dist/cjs/index.js +6 -6
- package/dist/cjs/styled/blanket.js +4 -6
- package/dist/cjs/styled/dialog.js +3 -3
- package/dist/cjs/styled/modal.js +1 -1
- package/dist/cjs/styled/target.js +21 -10
- package/dist/cjs/utils/use-element-box.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/spotlight-card.js +3 -4
- package/dist/es2019/components/spotlight-dialog.js +1 -1
- package/dist/es2019/components/theme.js +49 -50
- package/dist/es2019/styled/blanket.js +2 -3
- package/dist/es2019/styled/target.js +10 -4
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/animation.js +2 -2
- package/dist/esm/components/card.js +4 -2
- package/dist/esm/components/modal.js +4 -2
- package/dist/esm/components/spotlight-card.js +7 -7
- package/dist/esm/components/spotlight-dialog.js +5 -4
- package/dist/esm/components/spotlight-inner.js +2 -2
- package/dist/esm/components/spotlight-manager.js +2 -2
- package/dist/esm/components/spotlight.js +2 -1
- package/dist/esm/components/theme.js +55 -54
- package/dist/esm/styled/blanket.js +4 -5
- package/dist/esm/styled/dialog.js +2 -1
- package/dist/esm/styled/target.js +19 -9
- package/dist/esm/version.json +1 -1
- package/dist/types/components/modal.d.ts +2 -2
- package/dist/types/styled/target.d.ts +3 -0
- package/package.json +10 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @atlaskit/onboarding
|
|
2
2
|
|
|
3
|
+
## 10.3.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`19d72473dfb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19d72473dfb) - The no-unsafe-design-token-usage eslint rule now respects the new token naming conventions when auto-fixing by correctly formatting token ids.
|
|
8
|
+
- [`19d72473dfb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19d72473dfb) - The no-unsafe-design-token-usage eslint rule now respects the new token naming conventions when auto-fixing by correctly formatting token ids.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 10.3.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
17
|
+
## 10.3.2
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [`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.
|
|
22
|
+
|
|
23
|
+
## 10.3.1
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- [`3fced6aa641`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3fced6aa641) - Bumped `react-focus-lock` to version `^2.2.1`.
|
|
28
|
+
- [`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.
|
|
29
|
+
- Updated dependencies
|
|
30
|
+
|
|
3
31
|
## 10.3.0
|
|
4
32
|
|
|
5
33
|
### Minor 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);
|
|
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]
|
|
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
|
-
|
|
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,
|
|
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,
|
|
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, "
|
|
44
|
+
Object.defineProperty(exports, "modalButtonTheme", {
|
|
45
45
|
enumerable: true,
|
|
46
46
|
get: function get() {
|
|
47
|
-
return
|
|
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, "
|
|
56
|
+
Object.defineProperty(exports, "useSpotlight", {
|
|
57
57
|
enumerable: true,
|
|
58
58
|
get: function get() {
|
|
59
|
-
return
|
|
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,
|
|
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,
|
|
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)({
|
|
@@ -29,15 +29,15 @@ 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
|
-
|
|
34
32
|
var _card = _interopRequireDefault(require("./card"));
|
|
35
33
|
|
|
36
34
|
var _theme2 = require("./theme");
|
|
37
35
|
|
|
38
|
-
|
|
36
|
+
var _excluded = ["container"];
|
|
37
|
+
|
|
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
39
|
|
|
40
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
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; }
|
|
41
41
|
|
|
42
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); }; }
|
|
43
43
|
|
|
@@ -84,15 +84,15 @@ var SpotlightCard = /*#__PURE__*/function (_React$Component) {
|
|
|
84
84
|
theme: function theme(parent) {
|
|
85
85
|
var _parent = parent({}),
|
|
86
86
|
container = _parent.container,
|
|
87
|
-
others = (0, _objectWithoutProperties2.default)(_parent,
|
|
87
|
+
others = (0, _objectWithoutProperties2.default)(_parent, _excluded);
|
|
88
88
|
|
|
89
89
|
return _theme(function () {
|
|
90
90
|
return _objectSpread(_objectSpread({}, others), {}, {
|
|
91
91
|
container: _objectSpread({
|
|
92
|
-
background: (
|
|
93
|
-
color: (
|
|
92
|
+
background: "var(--ds-background-discovery-bold, ".concat(_colors.P300, ")"),
|
|
93
|
+
color: "var(--ds-text-inverse, ".concat(_colors.N0, ")"),
|
|
94
94
|
width: "".concat(Math.min(Math.max(width, 160), 600), "px"),
|
|
95
|
-
boxShadow: isFlat ? undefined : (
|
|
95
|
+
boxShadow: isFlat ? undefined : "var(--ds-shadow-raised, ".concat("0 4px 8px -2px ".concat(_colors.N50A, ", 0 0 1px ").concat(_colors.N60A), ")")
|
|
96
96
|
}, container)
|
|
97
97
|
});
|
|
98
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);
|
|
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]
|
|
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.3.
|
|
57
|
+
var packageVersion = "10.3.4";
|
|
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,
|
|
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);
|
|
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]
|
|
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.
|
|
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);
|
|
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]
|
|
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,
|
|
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.
|
|
10
|
+
exports.spotlightButtonTheme = exports.modalButtonTheme = void 0;
|
|
11
11
|
|
|
12
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
13
|
|
|
@@ -17,39 +17,40 @@ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
|
17
17
|
|
|
18
18
|
var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _excluded = ["buttonStyles"],
|
|
21
|
+
_excluded2 = ["buttonStyles"];
|
|
21
22
|
|
|
22
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); }
|
|
23
24
|
|
|
24
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; }
|
|
25
26
|
|
|
26
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
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; }
|
|
27
28
|
|
|
28
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
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; }
|
|
29
30
|
|
|
30
31
|
var spotlightTheme = {
|
|
31
32
|
default: {
|
|
32
33
|
background: {
|
|
33
|
-
default: (
|
|
34
|
-
hover: (
|
|
35
|
-
active: (
|
|
36
|
-
disabled: (
|
|
37
|
-
selected: (
|
|
38
|
-
focus: (
|
|
34
|
+
default: "var(--ds-background-neutral, ".concat(colors.P400, ")"),
|
|
35
|
+
hover: "var(--ds-background-neutral-hovered, ".concat(colors.P200, ")"),
|
|
36
|
+
active: "var(--ds-background-neutral-pressed, ".concat(colors.P500, ")"),
|
|
37
|
+
disabled: "var(--ds-background-disabled, ".concat(colors.P400, ")"),
|
|
38
|
+
selected: "var(--ds-background-neutral-pressed, ".concat(colors.R500, ")"),
|
|
39
|
+
focus: "var(--ds-background-neutral, ".concat(colors.P400, ")")
|
|
39
40
|
},
|
|
40
41
|
boxShadow: {
|
|
41
|
-
focus: "0 0 0 2px ".concat((
|
|
42
|
+
focus: "0 0 0 2px ".concat("var(--ds-icon-discovery, ".concat(colors.P100, ")"))
|
|
42
43
|
},
|
|
43
44
|
color: {
|
|
44
|
-
default: (
|
|
45
|
-
hover: (
|
|
46
|
-
active: (
|
|
45
|
+
default: "var(--ds-text-inverse, ".concat(colors.N0, ")"),
|
|
46
|
+
hover: "var(--ds-text-inverse, ".concat(colors.N0, ")"),
|
|
47
|
+
active: "var(--ds-text-inverse, ".concat(colors.N0, ")"),
|
|
47
48
|
disabled: {
|
|
48
|
-
light: (
|
|
49
|
-
dark: (
|
|
49
|
+
light: "var(--ds-text-disabled, ".concat(colors.N0, ")"),
|
|
50
|
+
dark: "var(--ds-text-disabled, ".concat(colors.DN30, ")")
|
|
50
51
|
},
|
|
51
|
-
selected: (
|
|
52
|
-
focus: (
|
|
52
|
+
selected: "var(--ds-text-inverse, ".concat(colors.N0, ")"),
|
|
53
|
+
focus: "var(--ds-text-inverse, ".concat(colors.N0, ")")
|
|
53
54
|
},
|
|
54
55
|
outline: {
|
|
55
56
|
focus: 'none'
|
|
@@ -58,28 +59,28 @@ var spotlightTheme = {
|
|
|
58
59
|
subtle: {
|
|
59
60
|
background: {
|
|
60
61
|
default: 'none',
|
|
61
|
-
hover: (
|
|
62
|
-
active: (
|
|
62
|
+
hover: "var(--ds-background-neutral-hovered, ".concat(colors.P200, ")"),
|
|
63
|
+
active: "var(--ds-background-neutral-pressed, ".concat(colors.P500, ")"),
|
|
63
64
|
disabled: 'none',
|
|
64
65
|
selected: {
|
|
65
|
-
light: (
|
|
66
|
-
dark: (
|
|
66
|
+
light: "var(--ds-background-brand-hovered, ".concat(colors.N700, ")"),
|
|
67
|
+
dark: "var(--ds-background-brand-hovered, ".concat(colors.DN0, ")")
|
|
67
68
|
},
|
|
68
69
|
focusSelected: {
|
|
69
|
-
light: (
|
|
70
|
-
dark: (
|
|
70
|
+
light: "var(--ds-background-brand-hovered, ".concat(colors.N700, ")"),
|
|
71
|
+
dark: "var(--ds-background-brand-hovered, ".concat(colors.DN0, ")")
|
|
71
72
|
}
|
|
72
73
|
},
|
|
73
74
|
boxShadow: {
|
|
74
|
-
focus: "0 0 0 2px ".concat((
|
|
75
|
+
focus: "0 0 0 2px ".concat("var(--ds-icon-discovery, ".concat(colors.P100, ")"))
|
|
75
76
|
},
|
|
76
77
|
color: {
|
|
77
|
-
default: (
|
|
78
|
-
hover: (
|
|
79
|
-
active: (
|
|
80
|
-
disabled: (
|
|
81
|
-
selected: (
|
|
82
|
-
focus: (
|
|
78
|
+
default: "var(--ds-text-inverse, ".concat(colors.N0, ")"),
|
|
79
|
+
hover: "var(--ds-text-inverse, ".concat(colors.N0, ")"),
|
|
80
|
+
active: "var(--ds-text-inverse, ".concat(colors.N0, ")"),
|
|
81
|
+
disabled: "var(--ds-text-disabled, ".concat(colors.N0, ")"),
|
|
82
|
+
selected: "var(--ds-text-inverse, ".concat(colors.N0, ")"),
|
|
83
|
+
focus: "var(--ds-text-inverse, ".concat(colors.N0, ")")
|
|
83
84
|
},
|
|
84
85
|
outline: {
|
|
85
86
|
focus: 'none'
|
|
@@ -87,51 +88,51 @@ var spotlightTheme = {
|
|
|
87
88
|
},
|
|
88
89
|
'subtle-link': {
|
|
89
90
|
textDecoration: {
|
|
90
|
-
hover: "underline ".concat((
|
|
91
|
+
hover: "underline ".concat("var(--ds-text-discovery, ".concat(colors.P75, ")"))
|
|
91
92
|
},
|
|
92
93
|
textDecorationLine: {
|
|
93
94
|
active: 'none'
|
|
94
95
|
},
|
|
95
96
|
boxShadow: {
|
|
96
|
-
focus: "0 0 0 2px ".concat((
|
|
97
|
+
focus: "0 0 0 2px ".concat("var(--ds-icon-discovery, ".concat(colors.P100, ")"))
|
|
97
98
|
},
|
|
98
99
|
color: {
|
|
99
|
-
default: (
|
|
100
|
-
hover: (
|
|
101
|
-
active: (
|
|
102
|
-
disabled: (
|
|
103
|
-
selected: (
|
|
104
|
-
focus: (
|
|
100
|
+
default: "var(--ds-text-inverse, ".concat(colors.N0, ")"),
|
|
101
|
+
hover: "var(--ds-text-inverse, ".concat(colors.P75, ")"),
|
|
102
|
+
active: "var(--ds-text-inverse, ".concat(colors.P100, ")"),
|
|
103
|
+
disabled: "var(--ds-text-discovery, ".concat(colors.P500, ")"),
|
|
104
|
+
selected: "var(--ds-text-brand, ".concat(colors.N0, ")"),
|
|
105
|
+
focus: "var(--ds-text-inverse, ".concat(colors.N0, ")")
|
|
105
106
|
}
|
|
106
107
|
}
|
|
107
108
|
};
|
|
108
109
|
var modalTheme = {
|
|
109
110
|
primary: {
|
|
110
111
|
background: {
|
|
111
|
-
default: (
|
|
112
|
-
hover: (
|
|
113
|
-
active: (
|
|
112
|
+
default: "var(--ds-background-discovery-bold, ".concat(colors.P400, ")"),
|
|
113
|
+
hover: "var(--ds-background-discovery-bold-hovered, ".concat(colors.P200, ")"),
|
|
114
|
+
active: "var(--ds-background-discovery-bold-pressed, ".concat(colors.P500, ")"),
|
|
114
115
|
disabled: {
|
|
115
|
-
light: (
|
|
116
|
-
dark: (
|
|
116
|
+
light: "var(--ds-background-disabled, ".concat(colors.N30, ")"),
|
|
117
|
+
dark: "var(--ds-background-disabled, ".concat(colors.DN70, ")")
|
|
117
118
|
},
|
|
118
|
-
selected: (
|
|
119
|
-
focus: (
|
|
119
|
+
selected: "var(--ds-background-brand-hovered, ".concat(colors.R500, ")"),
|
|
120
|
+
focus: "var(--ds-background-discovery-bold-hovered, ".concat(colors.P400, ")")
|
|
120
121
|
},
|
|
121
122
|
boxShadow: {
|
|
122
123
|
focus: {
|
|
123
|
-
light: "0 0 0 2px ".concat((
|
|
124
|
-
dark: "0 0 0 2px ".concat((
|
|
124
|
+
light: "0 0 0 2px ".concat("var(--ds-icon-discovery, ".concat(colors.P100, ")")),
|
|
125
|
+
dark: "0 0 0 2px ".concat("var(--ds-icon-discovery, ".concat(colors.P100, ")"))
|
|
125
126
|
}
|
|
126
127
|
},
|
|
127
128
|
color: {
|
|
128
|
-
default: (
|
|
129
|
+
default: "var(--ds-text-inverse, ".concat(colors.N0, ")"),
|
|
129
130
|
disabled: {
|
|
130
|
-
light: (
|
|
131
|
-
dark: (
|
|
131
|
+
light: "var(--ds-text-disabled, ".concat(colors.N0, ")"),
|
|
132
|
+
dark: "var(--ds-text-disabled, ".concat(colors.DN30, ")")
|
|
132
133
|
},
|
|
133
|
-
selected: (
|
|
134
|
-
focus: (
|
|
134
|
+
selected: "var(--ds-text-brand, ".concat(colors.N0, ")"),
|
|
135
|
+
focus: "var(--ds-text-inverse, ".concat(colors.N0, ")")
|
|
135
136
|
}
|
|
136
137
|
}
|
|
137
138
|
};
|
|
@@ -168,7 +169,7 @@ function extract(newTheme, _ref) {
|
|
|
168
169
|
var spotlightButtonTheme = function spotlightButtonTheme(current, themeProps) {
|
|
169
170
|
var _current = current(themeProps),
|
|
170
171
|
buttonStyles = _current.buttonStyles,
|
|
171
|
-
rest = (0, _objectWithoutProperties2.default)(_current,
|
|
172
|
+
rest = (0, _objectWithoutProperties2.default)(_current, _excluded);
|
|
172
173
|
|
|
173
174
|
return _objectSpread({
|
|
174
175
|
buttonStyles: _objectSpread(_objectSpread({}, buttonStyles), extract(spotlightTheme, themeProps))
|
|
@@ -180,7 +181,7 @@ exports.spotlightButtonTheme = spotlightButtonTheme;
|
|
|
180
181
|
var modalButtonTheme = function modalButtonTheme(current, themeProps) {
|
|
181
182
|
var _current2 = current(themeProps),
|
|
182
183
|
buttonStyles = _current2.buttonStyles,
|
|
183
|
-
rest = (0, _objectWithoutProperties2.default)(_current2,
|
|
184
|
+
rest = (0, _objectWithoutProperties2.default)(_current2, _excluded2);
|
|
184
185
|
|
|
185
186
|
return _objectSpread({
|
|
186
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
|
|
|
@@ -17,15 +17,13 @@ var _components = require("@atlaskit/theme/components");
|
|
|
17
17
|
|
|
18
18
|
var _constants = require("@atlaskit/theme/constants");
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
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; }
|
|
21
21
|
|
|
22
|
-
function
|
|
23
|
-
|
|
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; }
|
|
22
|
+
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; }
|
|
25
23
|
|
|
26
24
|
var backgroundColor = (0, _components.themed)({
|
|
27
|
-
light: (
|
|
28
|
-
dark: (
|
|
25
|
+
light: "var(--ds-blanket, ".concat(_colors.N100A, ")"),
|
|
26
|
+
dark: "var(--ds-blanket, ".concat(_colors.DN90A, ")")
|
|
29
27
|
}); // IE11 and Edge: z-index needed because fixed position calculates z-index relative
|
|
30
28
|
// to body instead of nearest stacking context (Portal in our case).
|
|
31
29
|
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.DialogImage = exports.DialogActionItemContainer = exports.DialogActionItem = void 0;
|
|
9
9
|
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
|
|
@@ -15,7 +15,7 @@ var _core = require("@emotion/core");
|
|
|
15
15
|
|
|
16
16
|
var _constants = require("@atlaskit/theme/constants");
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
var _excluded = ["alt"];
|
|
19
19
|
var gridSize = (0, _constants.gridSize)();
|
|
20
20
|
var imageStyles = (0, _core.css)({
|
|
21
21
|
maxWidth: '100%',
|
|
@@ -42,7 +42,7 @@ var actionItemStyles = (0, _core.css)({
|
|
|
42
42
|
|
|
43
43
|
var DialogImage = function DialogImage(_ref) {
|
|
44
44
|
var alt = _ref.alt,
|
|
45
|
-
props = (0, _objectWithoutProperties2.default)(_ref,
|
|
45
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
46
46
|
return (0, _core.jsx)("img", (0, _extends2.default)({
|
|
47
47
|
css: imageStyles,
|
|
48
48
|
alt: alt
|
package/dist/cjs/styled/modal.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.ModalImage = exports.ModalHeading = exports.ModalBody = exports.ModalActionItem = exports.ModalActionContainer = void 0;
|
|
7
7
|
|
|
8
8
|
var _core = require("@emotion/core");
|
|
9
9
|
|