@atlaskit/spotlight 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/cjs/index.js +43 -1
- package/dist/cjs/ui/actions/index.compiled.css +1 -0
- package/dist/cjs/ui/actions/index.js +34 -0
- package/dist/cjs/ui/controls/index.js +25 -0
- package/dist/cjs/ui/dismiss-control/index.js +29 -0
- package/dist/cjs/ui/footer/index.compiled.css +4 -0
- package/dist/cjs/ui/footer/index.js +33 -0
- package/dist/cjs/ui/primary-action/index.js +30 -0
- package/dist/cjs/ui/secondary-action/index.js +33 -0
- package/dist/es2019/index.js +7 -1
- package/dist/es2019/ui/actions/index.compiled.css +1 -0
- package/dist/es2019/ui/actions/index.js +27 -0
- package/dist/es2019/ui/controls/index.js +18 -0
- package/dist/es2019/ui/dismiss-control/index.js +21 -0
- package/dist/es2019/ui/footer/index.compiled.css +4 -0
- package/dist/es2019/ui/footer/index.js +26 -0
- package/dist/es2019/ui/primary-action/index.js +22 -0
- package/dist/es2019/ui/secondary-action/index.js +25 -0
- package/dist/esm/index.js +7 -1
- package/dist/esm/ui/actions/index.compiled.css +1 -0
- package/dist/esm/ui/actions/index.js +26 -0
- package/dist/esm/ui/controls/index.js +17 -0
- package/dist/esm/ui/dismiss-control/index.js +20 -0
- package/dist/esm/ui/footer/index.compiled.css +4 -0
- package/dist/esm/ui/footer/index.js +25 -0
- package/dist/esm/ui/primary-action/index.js +21 -0
- package/dist/esm/ui/secondary-action/index.js +24 -0
- package/dist/types/index.d.ts +7 -1
- package/dist/types/ui/actions/index.d.ts +20 -0
- package/dist/types/ui/controls/index.d.ts +19 -0
- package/dist/types/ui/dismiss-control/index.d.ts +16 -0
- package/dist/types/ui/footer/index.d.ts +20 -0
- package/dist/types/ui/primary-action/index.d.ts +26 -0
- package/dist/types/ui/secondary-action/index.d.ts +26 -0
- package/dist/types-ts4.5/index.d.ts +7 -1
- package/dist/types-ts4.5/ui/actions/index.d.ts +20 -0
- package/dist/types-ts4.5/ui/controls/index.d.ts +19 -0
- package/dist/types-ts4.5/ui/dismiss-control/index.d.ts +16 -0
- package/dist/types-ts4.5/ui/footer/index.d.ts +20 -0
- package/dist/types-ts4.5/ui/primary-action/index.d.ts +26 -0
- package/dist/types-ts4.5/ui/secondary-action/index.d.ts +26 -0
- package/package.json +9 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/spotlight
|
|
2
2
|
|
|
3
|
+
## 0.0.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`11c7c29e7cff4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/11c7c29e7cff4) -
|
|
8
|
+
Create Controls, and DismissControl components.
|
|
9
|
+
|
|
10
|
+
## 0.0.5
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [`d63550f8e338a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d63550f8e338a) -
|
|
15
|
+
Create Footer, Actions, PrimaryAction, SecondaryAction components.
|
|
16
|
+
|
|
3
17
|
## 0.0.4
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -9,6 +9,30 @@ Object.defineProperty(exports, "Spotlight", {
|
|
|
9
9
|
return _spotlight.Spotlight;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
+
Object.defineProperty(exports, "SpotlightActions", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _actions.SpotlightActions;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "SpotlightControls", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _controls.SpotlightControls;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "SpotlightDismissControl", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function get() {
|
|
27
|
+
return _dismissControl.SpotlightDismissControl;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "SpotlightFooter", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function get() {
|
|
33
|
+
return _footer.SpotlightFooter;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
12
36
|
Object.defineProperty(exports, "SpotlightHeader", {
|
|
13
37
|
enumerable: true,
|
|
14
38
|
get: function get() {
|
|
@@ -21,6 +45,24 @@ Object.defineProperty(exports, "SpotlightHeadline", {
|
|
|
21
45
|
return _headline.SpotlightHeadline;
|
|
22
46
|
}
|
|
23
47
|
});
|
|
48
|
+
Object.defineProperty(exports, "SpotlightPrimaryAction", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function get() {
|
|
51
|
+
return _primaryAction.SpotlightPrimaryAction;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "SpotlightSecondaryAction", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function get() {
|
|
57
|
+
return _secondaryAction.SpotlightSecondaryAction;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
24
60
|
var _spotlight = require("./ui/spotlight");
|
|
25
61
|
var _header = require("./ui/header");
|
|
26
|
-
var _headline = require("./ui/headline");
|
|
62
|
+
var _headline = require("./ui/headline");
|
|
63
|
+
var _footer = require("./ui/footer");
|
|
64
|
+
var _actions = require("./ui/actions");
|
|
65
|
+
var _primaryAction = require("./ui/primary-action");
|
|
66
|
+
var _secondaryAction = require("./ui/secondary-action");
|
|
67
|
+
var _controls = require("./ui/controls");
|
|
68
|
+
var _dismissControl = require("./ui/dismiss-control");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._1bsb1osq{width:100%}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.SpotlightActions = void 0;
|
|
9
|
+
require("./index.compiled.css");
|
|
10
|
+
var _runtime = require("@compiled/react/runtime");
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _compiled = require("@atlaskit/primitives/compiled");
|
|
13
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
14
|
+
var styles = {
|
|
15
|
+
root: "_1bsb1osq"
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* __Spotlight actions__
|
|
19
|
+
*
|
|
20
|
+
* `SpotlightActions` groups `SpotlightAction` components.
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
var SpotlightActions = exports.SpotlightActions = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
24
|
+
var children = _ref.children,
|
|
25
|
+
testId = _ref.testId;
|
|
26
|
+
return /*#__PURE__*/_react.default.createElement(_compiled.Flex, {
|
|
27
|
+
ref: ref,
|
|
28
|
+
testId: testId,
|
|
29
|
+
xcss: styles.root,
|
|
30
|
+
role: "group",
|
|
31
|
+
justifyContent: "end",
|
|
32
|
+
gap: "space.050"
|
|
33
|
+
}, children);
|
|
34
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.SpotlightControls = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _compiled = require("@atlaskit/primitives/compiled");
|
|
10
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
11
|
+
/**
|
|
12
|
+
* __Spotlight controls__
|
|
13
|
+
*
|
|
14
|
+
* `SpotlightControls` groups spotlight control components.
|
|
15
|
+
*/
|
|
16
|
+
var SpotlightControls = exports.SpotlightControls = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
17
|
+
var testId = _ref.testId,
|
|
18
|
+
children = _ref.children;
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement(_compiled.Flex, {
|
|
20
|
+
testId: testId,
|
|
21
|
+
ref: ref,
|
|
22
|
+
gap: "space.100",
|
|
23
|
+
role: "group"
|
|
24
|
+
}, children);
|
|
25
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.SpotlightDismissControl = void 0;
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _new = require("@atlaskit/button/new");
|
|
11
|
+
var _cross = _interopRequireDefault(require("@atlaskit/icon/core/cross"));
|
|
12
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
13
|
+
/**
|
|
14
|
+
* __SpotlightDismissControl__
|
|
15
|
+
*
|
|
16
|
+
* SpotlightDismissControl allows the user to close the `Spotlight`.
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
var SpotlightDismissControl = exports.SpotlightDismissControl = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
20
|
+
var testId = _ref.testId;
|
|
21
|
+
return /*#__PURE__*/_react.default.createElement(_new.IconButton, {
|
|
22
|
+
testId: testId,
|
|
23
|
+
ref: ref,
|
|
24
|
+
appearance: "default",
|
|
25
|
+
spacing: "compact",
|
|
26
|
+
icon: _cross.default,
|
|
27
|
+
label: "Close"
|
|
28
|
+
});
|
|
29
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.SpotlightFooter = void 0;
|
|
9
|
+
require("./index.compiled.css");
|
|
10
|
+
var _runtime = require("@compiled/react/runtime");
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _compiled = require("@atlaskit/primitives/compiled");
|
|
13
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
14
|
+
var styles = {
|
|
15
|
+
root: "_bozgpxbi _y4tiutpp _85i5utpp _1bsb1osq"
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* __SpotlightFooter__
|
|
19
|
+
*
|
|
20
|
+
* `SpotlightFooter` is intended to display the `SpotlightActions` and `SpotLightStepCount` components.
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
var SpotlightFooter = exports.SpotlightFooter = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
24
|
+
var children = _ref.children,
|
|
25
|
+
testId = _ref.testId;
|
|
26
|
+
return /*#__PURE__*/_react.default.createElement(_compiled.Flex, {
|
|
27
|
+
ref: ref,
|
|
28
|
+
testId: testId,
|
|
29
|
+
xcss: styles.root,
|
|
30
|
+
alignItems: "center",
|
|
31
|
+
justifyContent: "space-between"
|
|
32
|
+
}, children);
|
|
33
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.SpotlightPrimaryAction = void 0;
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
11
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
12
|
+
/**
|
|
13
|
+
* __Spotlight primary action__
|
|
14
|
+
*
|
|
15
|
+
* `SpotlightPrimaryAction` is required for all `Spotlight` components. It should be used to dismiss the spotlight
|
|
16
|
+
* for single step spotlights, or to show the next step on multi step spotlight tours.
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
var SpotlightPrimaryAction = exports.SpotlightPrimaryAction = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
20
|
+
var onClick = _ref.onClick,
|
|
21
|
+
children = _ref.children,
|
|
22
|
+
testId = _ref.testId;
|
|
23
|
+
return /*#__PURE__*/_react.default.createElement(_new.default, {
|
|
24
|
+
ref: ref,
|
|
25
|
+
spacing: "compact",
|
|
26
|
+
testId: testId,
|
|
27
|
+
appearance: "primary",
|
|
28
|
+
onClick: onClick
|
|
29
|
+
}, children);
|
|
30
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.SpotlightSecondaryAction = void 0;
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
11
|
+
var _compiled = require("@atlaskit/primitives/compiled");
|
|
12
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
13
|
+
/**
|
|
14
|
+
* __Spotlight secondary action__
|
|
15
|
+
*
|
|
16
|
+
* `SpotlightSecondaryAction` is not required for all `Spotlight` components. It should supplement the SpotlightPrimaryAction.
|
|
17
|
+
* It is intended to be used to go back to the previous step in multi step spotlight tours, or other similar actions.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
var SpotlightSecondaryAction = exports.SpotlightSecondaryAction = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
21
|
+
var onClick = _ref.onClick,
|
|
22
|
+
children = _ref.children,
|
|
23
|
+
testId = _ref.testId;
|
|
24
|
+
return /*#__PURE__*/_react.default.createElement(_new.default, {
|
|
25
|
+
ref: ref,
|
|
26
|
+
spacing: "compact",
|
|
27
|
+
testId: testId,
|
|
28
|
+
appearance: "subtle",
|
|
29
|
+
onClick: onClick
|
|
30
|
+
}, /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
31
|
+
as: "span"
|
|
32
|
+
}, children));
|
|
33
|
+
});
|
package/dist/es2019/index.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
export { Spotlight } from './ui/spotlight';
|
|
2
2
|
export { SpotlightHeader } from './ui/header';
|
|
3
|
-
export { SpotlightHeadline } from './ui/headline';
|
|
3
|
+
export { SpotlightHeadline } from './ui/headline';
|
|
4
|
+
export { SpotlightFooter } from './ui/footer';
|
|
5
|
+
export { SpotlightActions } from './ui/actions';
|
|
6
|
+
export { SpotlightPrimaryAction } from './ui/primary-action';
|
|
7
|
+
export { SpotlightSecondaryAction } from './ui/secondary-action';
|
|
8
|
+
export { SpotlightControls } from './ui/controls';
|
|
9
|
+
export { SpotlightDismissControl } from './ui/dismiss-control';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._1bsb1osq{width:100%}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import "./index.compiled.css";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
+
import React, { forwardRef } from 'react';
|
|
5
|
+
import { Flex } from '@atlaskit/primitives/compiled';
|
|
6
|
+
const styles = {
|
|
7
|
+
root: "_1bsb1osq"
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* __Spotlight actions__
|
|
11
|
+
*
|
|
12
|
+
* `SpotlightActions` groups `SpotlightAction` components.
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
export const SpotlightActions = /*#__PURE__*/forwardRef(({
|
|
16
|
+
children,
|
|
17
|
+
testId
|
|
18
|
+
}, ref) => {
|
|
19
|
+
return /*#__PURE__*/React.createElement(Flex, {
|
|
20
|
+
ref: ref,
|
|
21
|
+
testId: testId,
|
|
22
|
+
xcss: styles.root,
|
|
23
|
+
role: "group",
|
|
24
|
+
justifyContent: "end",
|
|
25
|
+
gap: "space.050"
|
|
26
|
+
}, children);
|
|
27
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
|
+
import { Flex } from "@atlaskit/primitives/compiled";
|
|
3
|
+
/**
|
|
4
|
+
* __Spotlight controls__
|
|
5
|
+
*
|
|
6
|
+
* `SpotlightControls` groups spotlight control components.
|
|
7
|
+
*/
|
|
8
|
+
export const SpotlightControls = /*#__PURE__*/forwardRef(({
|
|
9
|
+
testId,
|
|
10
|
+
children
|
|
11
|
+
}, ref) => {
|
|
12
|
+
return /*#__PURE__*/React.createElement(Flex, {
|
|
13
|
+
testId: testId,
|
|
14
|
+
ref: ref,
|
|
15
|
+
gap: "space.100",
|
|
16
|
+
role: "group"
|
|
17
|
+
}, children);
|
|
18
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
|
+
import { IconButton } from '@atlaskit/button/new';
|
|
3
|
+
import CrossIcon from '@atlaskit/icon/core/cross';
|
|
4
|
+
/**
|
|
5
|
+
* __SpotlightDismissControl__
|
|
6
|
+
*
|
|
7
|
+
* SpotlightDismissControl allows the user to close the `Spotlight`.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export const SpotlightDismissControl = /*#__PURE__*/forwardRef(({
|
|
11
|
+
testId
|
|
12
|
+
}, ref) => {
|
|
13
|
+
return /*#__PURE__*/React.createElement(IconButton, {
|
|
14
|
+
testId: testId,
|
|
15
|
+
ref: ref,
|
|
16
|
+
appearance: "default",
|
|
17
|
+
spacing: "compact",
|
|
18
|
+
icon: CrossIcon,
|
|
19
|
+
label: "Close"
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import "./index.compiled.css";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
+
import React, { forwardRef } from 'react';
|
|
5
|
+
import { Flex } from '@atlaskit/primitives/compiled';
|
|
6
|
+
const styles = {
|
|
7
|
+
root: "_bozgpxbi _y4tiutpp _85i5utpp _1bsb1osq"
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* __SpotlightFooter__
|
|
11
|
+
*
|
|
12
|
+
* `SpotlightFooter` is intended to display the `SpotlightActions` and `SpotLightStepCount` components.
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
export const SpotlightFooter = /*#__PURE__*/forwardRef(({
|
|
16
|
+
children,
|
|
17
|
+
testId
|
|
18
|
+
}, ref) => {
|
|
19
|
+
return /*#__PURE__*/React.createElement(Flex, {
|
|
20
|
+
ref: ref,
|
|
21
|
+
testId: testId,
|
|
22
|
+
xcss: styles.root,
|
|
23
|
+
alignItems: "center",
|
|
24
|
+
justifyContent: "space-between"
|
|
25
|
+
}, children);
|
|
26
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
import Button from '@atlaskit/button/new';
|
|
3
|
+
/**
|
|
4
|
+
* __Spotlight primary action__
|
|
5
|
+
*
|
|
6
|
+
* `SpotlightPrimaryAction` is required for all `Spotlight` components. It should be used to dismiss the spotlight
|
|
7
|
+
* for single step spotlights, or to show the next step on multi step spotlight tours.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export const SpotlightPrimaryAction = /*#__PURE__*/forwardRef(({
|
|
11
|
+
onClick,
|
|
12
|
+
children,
|
|
13
|
+
testId
|
|
14
|
+
}, ref) => {
|
|
15
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
16
|
+
ref: ref,
|
|
17
|
+
spacing: "compact",
|
|
18
|
+
testId: testId,
|
|
19
|
+
appearance: "primary",
|
|
20
|
+
onClick: onClick
|
|
21
|
+
}, children);
|
|
22
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
import Button from '@atlaskit/button/new';
|
|
3
|
+
import { Text } from '@atlaskit/primitives/compiled';
|
|
4
|
+
/**
|
|
5
|
+
* __Spotlight secondary action__
|
|
6
|
+
*
|
|
7
|
+
* `SpotlightSecondaryAction` is not required for all `Spotlight` components. It should supplement the SpotlightPrimaryAction.
|
|
8
|
+
* It is intended to be used to go back to the previous step in multi step spotlight tours, or other similar actions.
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
export const SpotlightSecondaryAction = /*#__PURE__*/forwardRef(({
|
|
12
|
+
onClick,
|
|
13
|
+
children,
|
|
14
|
+
testId
|
|
15
|
+
}, ref) => {
|
|
16
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
17
|
+
ref: ref,
|
|
18
|
+
spacing: "compact",
|
|
19
|
+
testId: testId,
|
|
20
|
+
appearance: "subtle",
|
|
21
|
+
onClick: onClick
|
|
22
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
23
|
+
as: "span"
|
|
24
|
+
}, children));
|
|
25
|
+
});
|
package/dist/esm/index.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
export { Spotlight } from './ui/spotlight';
|
|
2
2
|
export { SpotlightHeader } from './ui/header';
|
|
3
|
-
export { SpotlightHeadline } from './ui/headline';
|
|
3
|
+
export { SpotlightHeadline } from './ui/headline';
|
|
4
|
+
export { SpotlightFooter } from './ui/footer';
|
|
5
|
+
export { SpotlightActions } from './ui/actions';
|
|
6
|
+
export { SpotlightPrimaryAction } from './ui/primary-action';
|
|
7
|
+
export { SpotlightSecondaryAction } from './ui/secondary-action';
|
|
8
|
+
export { SpotlightControls } from './ui/controls';
|
|
9
|
+
export { SpotlightDismissControl } from './ui/dismiss-control';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._1bsb1osq{width:100%}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import "./index.compiled.css";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
+
import React, { forwardRef } from 'react';
|
|
5
|
+
import { Flex } from '@atlaskit/primitives/compiled';
|
|
6
|
+
var styles = {
|
|
7
|
+
root: "_1bsb1osq"
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* __Spotlight actions__
|
|
11
|
+
*
|
|
12
|
+
* `SpotlightActions` groups `SpotlightAction` components.
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
export var SpotlightActions = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
16
|
+
var children = _ref.children,
|
|
17
|
+
testId = _ref.testId;
|
|
18
|
+
return /*#__PURE__*/React.createElement(Flex, {
|
|
19
|
+
ref: ref,
|
|
20
|
+
testId: testId,
|
|
21
|
+
xcss: styles.root,
|
|
22
|
+
role: "group",
|
|
23
|
+
justifyContent: "end",
|
|
24
|
+
gap: "space.050"
|
|
25
|
+
}, children);
|
|
26
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
|
+
import { Flex } from "@atlaskit/primitives/compiled";
|
|
3
|
+
/**
|
|
4
|
+
* __Spotlight controls__
|
|
5
|
+
*
|
|
6
|
+
* `SpotlightControls` groups spotlight control components.
|
|
7
|
+
*/
|
|
8
|
+
export var SpotlightControls = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
9
|
+
var testId = _ref.testId,
|
|
10
|
+
children = _ref.children;
|
|
11
|
+
return /*#__PURE__*/React.createElement(Flex, {
|
|
12
|
+
testId: testId,
|
|
13
|
+
ref: ref,
|
|
14
|
+
gap: "space.100",
|
|
15
|
+
role: "group"
|
|
16
|
+
}, children);
|
|
17
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
|
+
import { IconButton } from '@atlaskit/button/new';
|
|
3
|
+
import CrossIcon from '@atlaskit/icon/core/cross';
|
|
4
|
+
/**
|
|
5
|
+
* __SpotlightDismissControl__
|
|
6
|
+
*
|
|
7
|
+
* SpotlightDismissControl allows the user to close the `Spotlight`.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export var SpotlightDismissControl = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
11
|
+
var testId = _ref.testId;
|
|
12
|
+
return /*#__PURE__*/React.createElement(IconButton, {
|
|
13
|
+
testId: testId,
|
|
14
|
+
ref: ref,
|
|
15
|
+
appearance: "default",
|
|
16
|
+
spacing: "compact",
|
|
17
|
+
icon: CrossIcon,
|
|
18
|
+
label: "Close"
|
|
19
|
+
});
|
|
20
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import "./index.compiled.css";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
+
import React, { forwardRef } from 'react';
|
|
5
|
+
import { Flex } from '@atlaskit/primitives/compiled';
|
|
6
|
+
var styles = {
|
|
7
|
+
root: "_bozgpxbi _y4tiutpp _85i5utpp _1bsb1osq"
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* __SpotlightFooter__
|
|
11
|
+
*
|
|
12
|
+
* `SpotlightFooter` is intended to display the `SpotlightActions` and `SpotLightStepCount` components.
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
export var SpotlightFooter = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
16
|
+
var children = _ref.children,
|
|
17
|
+
testId = _ref.testId;
|
|
18
|
+
return /*#__PURE__*/React.createElement(Flex, {
|
|
19
|
+
ref: ref,
|
|
20
|
+
testId: testId,
|
|
21
|
+
xcss: styles.root,
|
|
22
|
+
alignItems: "center",
|
|
23
|
+
justifyContent: "space-between"
|
|
24
|
+
}, children);
|
|
25
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
import Button from '@atlaskit/button/new';
|
|
3
|
+
/**
|
|
4
|
+
* __Spotlight primary action__
|
|
5
|
+
*
|
|
6
|
+
* `SpotlightPrimaryAction` is required for all `Spotlight` components. It should be used to dismiss the spotlight
|
|
7
|
+
* for single step spotlights, or to show the next step on multi step spotlight tours.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export var SpotlightPrimaryAction = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
11
|
+
var onClick = _ref.onClick,
|
|
12
|
+
children = _ref.children,
|
|
13
|
+
testId = _ref.testId;
|
|
14
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
15
|
+
ref: ref,
|
|
16
|
+
spacing: "compact",
|
|
17
|
+
testId: testId,
|
|
18
|
+
appearance: "primary",
|
|
19
|
+
onClick: onClick
|
|
20
|
+
}, children);
|
|
21
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
import Button from '@atlaskit/button/new';
|
|
3
|
+
import { Text } from '@atlaskit/primitives/compiled';
|
|
4
|
+
/**
|
|
5
|
+
* __Spotlight secondary action__
|
|
6
|
+
*
|
|
7
|
+
* `SpotlightSecondaryAction` is not required for all `Spotlight` components. It should supplement the SpotlightPrimaryAction.
|
|
8
|
+
* It is intended to be used to go back to the previous step in multi step spotlight tours, or other similar actions.
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
export var SpotlightSecondaryAction = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
12
|
+
var onClick = _ref.onClick,
|
|
13
|
+
children = _ref.children,
|
|
14
|
+
testId = _ref.testId;
|
|
15
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
16
|
+
ref: ref,
|
|
17
|
+
spacing: "compact",
|
|
18
|
+
testId: testId,
|
|
19
|
+
appearance: "subtle",
|
|
20
|
+
onClick: onClick
|
|
21
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
22
|
+
as: "span"
|
|
23
|
+
}, children));
|
|
24
|
+
});
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
export { Spotlight, type SpotlightProps } from './ui/spotlight';
|
|
2
2
|
export { SpotlightHeader, type SpotlightHeaderProps } from './ui/header';
|
|
3
|
-
export { SpotlightHeadline } from './ui/headline';
|
|
3
|
+
export { SpotlightHeadline, type SpotlightHeadlineProps } from './ui/headline';
|
|
4
|
+
export { SpotlightFooter, type SpotlightFooterProps } from './ui/footer';
|
|
5
|
+
export { SpotlightActions, type SpotlightActionsProps } from './ui/actions';
|
|
6
|
+
export { SpotlightPrimaryAction, type SpotlightPrimaryActionProps } from './ui/primary-action';
|
|
7
|
+
export { SpotlightSecondaryAction, type SpotlightSecondaryActionProps } from './ui/secondary-action';
|
|
8
|
+
export { SpotlightControls, type SpotlightControlsProps } from './ui/controls';
|
|
9
|
+
export { SpotlightDismissControl, type SpotlightDismissControlProps } from './ui/dismiss-control';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
export interface SpotlightActionsProps {
|
|
3
|
+
/**
|
|
4
|
+
* A `testId` prop is provided for specified elements, which is a unique
|
|
5
|
+
* string that appears as a data attribute `data-testid` in the rendered code,
|
|
6
|
+
* serving as a hook for automated tests
|
|
7
|
+
*/
|
|
8
|
+
testId?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Elements to be rendered inside the `SpotlightActions`.
|
|
11
|
+
*/
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* __Spotlight actions__
|
|
16
|
+
*
|
|
17
|
+
* `SpotlightActions` groups `SpotlightAction` components.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
export declare const SpotlightActions: React.ForwardRefExoticComponent<SpotlightActionsProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { type ReactNode } from "react";
|
|
2
|
+
export interface SpotlightControlsProps {
|
|
3
|
+
/**
|
|
4
|
+
* A `testId` prop is provided for specified elements, which is a unique
|
|
5
|
+
* string that appears as a data attribute `data-testid` in the rendered code,
|
|
6
|
+
* serving as a hook for automated tests
|
|
7
|
+
*/
|
|
8
|
+
testId?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Elements to be rendered inside the `SpotlightFooter`.
|
|
11
|
+
*/
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* __Spotlight controls__
|
|
16
|
+
*
|
|
17
|
+
* `SpotlightControls` groups spotlight control components.
|
|
18
|
+
*/
|
|
19
|
+
export declare const SpotlightControls: React.ForwardRefExoticComponent<SpotlightControlsProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface SpotlightDismissControlProps {
|
|
3
|
+
/**
|
|
4
|
+
* A `testId` prop is provided for specified elements, which is a unique
|
|
5
|
+
* string that appears as a data attribute `data-testid` in the rendered code,
|
|
6
|
+
* serving as a hook for automated tests
|
|
7
|
+
*/
|
|
8
|
+
testId?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* __SpotlightDismissControl__
|
|
12
|
+
*
|
|
13
|
+
* SpotlightDismissControl allows the user to close the `Spotlight`.
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
export declare const SpotlightDismissControl: React.ForwardRefExoticComponent<SpotlightDismissControlProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
export interface SpotlightFooterProps {
|
|
3
|
+
/**
|
|
4
|
+
* A `testId` prop is provided for specified elements, which is a unique
|
|
5
|
+
* string that appears as a data attribute `data-testid` in the rendered code,
|
|
6
|
+
* serving as a hook for automated tests
|
|
7
|
+
*/
|
|
8
|
+
testId?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Elements to be rendered inside the `SpotlightFooter`.
|
|
11
|
+
*/
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* __SpotlightFooter__
|
|
16
|
+
*
|
|
17
|
+
* `SpotlightFooter` is intended to display the `SpotlightActions` and `SpotLightStepCount` components.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
export declare const SpotlightFooter: React.ForwardRefExoticComponent<SpotlightFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
import { type ButtonProps } from '@atlaskit/button/new';
|
|
3
|
+
export interface SpotlightPrimaryActionProps {
|
|
4
|
+
/**
|
|
5
|
+
* A `testId` prop is provided for specified elements, which is a unique
|
|
6
|
+
* string that appears as a data attribute `data-testid` in the rendered code,
|
|
7
|
+
* serving as a hook for automated tests
|
|
8
|
+
*/
|
|
9
|
+
testId?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Text to be rendered inside the `SpotlightActions`.
|
|
12
|
+
*/
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* The action to take when the button is clicked.
|
|
16
|
+
*/
|
|
17
|
+
onClick?: ButtonProps['onClick'];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* __Spotlight primary action__
|
|
21
|
+
*
|
|
22
|
+
* `SpotlightPrimaryAction` is required for all `Spotlight` components. It should be used to dismiss the spotlight
|
|
23
|
+
* for single step spotlights, or to show the next step on multi step spotlight tours.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
export declare const SpotlightPrimaryAction: React.ForwardRefExoticComponent<SpotlightPrimaryActionProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
import { type ButtonProps } from '@atlaskit/button/new';
|
|
3
|
+
export interface SpotlightSecondaryActionProps {
|
|
4
|
+
/**
|
|
5
|
+
* A `testId` prop is provided for specified elements, which is a unique
|
|
6
|
+
* string that appears as a data attribute `data-testid` in the rendered code,
|
|
7
|
+
* serving as a hook for automated tests
|
|
8
|
+
*/
|
|
9
|
+
testId?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Text to be rendered inside the `SpotlightActions`.
|
|
12
|
+
*/
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* The action to take when the button is clicked.
|
|
16
|
+
*/
|
|
17
|
+
onClick?: ButtonProps['onClick'];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* __Spotlight secondary action__
|
|
21
|
+
*
|
|
22
|
+
* `SpotlightSecondaryAction` is not required for all `Spotlight` components. It should supplement the SpotlightPrimaryAction.
|
|
23
|
+
* It is intended to be used to go back to the previous step in multi step spotlight tours, or other similar actions.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
export declare const SpotlightSecondaryAction: React.ForwardRefExoticComponent<SpotlightSecondaryActionProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
export { Spotlight, type SpotlightProps } from './ui/spotlight';
|
|
2
2
|
export { SpotlightHeader, type SpotlightHeaderProps } from './ui/header';
|
|
3
|
-
export { SpotlightHeadline } from './ui/headline';
|
|
3
|
+
export { SpotlightHeadline, type SpotlightHeadlineProps } from './ui/headline';
|
|
4
|
+
export { SpotlightFooter, type SpotlightFooterProps } from './ui/footer';
|
|
5
|
+
export { SpotlightActions, type SpotlightActionsProps } from './ui/actions';
|
|
6
|
+
export { SpotlightPrimaryAction, type SpotlightPrimaryActionProps } from './ui/primary-action';
|
|
7
|
+
export { SpotlightSecondaryAction, type SpotlightSecondaryActionProps } from './ui/secondary-action';
|
|
8
|
+
export { SpotlightControls, type SpotlightControlsProps } from './ui/controls';
|
|
9
|
+
export { SpotlightDismissControl, type SpotlightDismissControlProps } from './ui/dismiss-control';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
export interface SpotlightActionsProps {
|
|
3
|
+
/**
|
|
4
|
+
* A `testId` prop is provided for specified elements, which is a unique
|
|
5
|
+
* string that appears as a data attribute `data-testid` in the rendered code,
|
|
6
|
+
* serving as a hook for automated tests
|
|
7
|
+
*/
|
|
8
|
+
testId?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Elements to be rendered inside the `SpotlightActions`.
|
|
11
|
+
*/
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* __Spotlight actions__
|
|
16
|
+
*
|
|
17
|
+
* `SpotlightActions` groups `SpotlightAction` components.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
export declare const SpotlightActions: React.ForwardRefExoticComponent<SpotlightActionsProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { type ReactNode } from "react";
|
|
2
|
+
export interface SpotlightControlsProps {
|
|
3
|
+
/**
|
|
4
|
+
* A `testId` prop is provided for specified elements, which is a unique
|
|
5
|
+
* string that appears as a data attribute `data-testid` in the rendered code,
|
|
6
|
+
* serving as a hook for automated tests
|
|
7
|
+
*/
|
|
8
|
+
testId?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Elements to be rendered inside the `SpotlightFooter`.
|
|
11
|
+
*/
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* __Spotlight controls__
|
|
16
|
+
*
|
|
17
|
+
* `SpotlightControls` groups spotlight control components.
|
|
18
|
+
*/
|
|
19
|
+
export declare const SpotlightControls: React.ForwardRefExoticComponent<SpotlightControlsProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface SpotlightDismissControlProps {
|
|
3
|
+
/**
|
|
4
|
+
* A `testId` prop is provided for specified elements, which is a unique
|
|
5
|
+
* string that appears as a data attribute `data-testid` in the rendered code,
|
|
6
|
+
* serving as a hook for automated tests
|
|
7
|
+
*/
|
|
8
|
+
testId?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* __SpotlightDismissControl__
|
|
12
|
+
*
|
|
13
|
+
* SpotlightDismissControl allows the user to close the `Spotlight`.
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
export declare const SpotlightDismissControl: React.ForwardRefExoticComponent<SpotlightDismissControlProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
export interface SpotlightFooterProps {
|
|
3
|
+
/**
|
|
4
|
+
* A `testId` prop is provided for specified elements, which is a unique
|
|
5
|
+
* string that appears as a data attribute `data-testid` in the rendered code,
|
|
6
|
+
* serving as a hook for automated tests
|
|
7
|
+
*/
|
|
8
|
+
testId?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Elements to be rendered inside the `SpotlightFooter`.
|
|
11
|
+
*/
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* __SpotlightFooter__
|
|
16
|
+
*
|
|
17
|
+
* `SpotlightFooter` is intended to display the `SpotlightActions` and `SpotLightStepCount` components.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
export declare const SpotlightFooter: React.ForwardRefExoticComponent<SpotlightFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
import { type ButtonProps } from '@atlaskit/button/new';
|
|
3
|
+
export interface SpotlightPrimaryActionProps {
|
|
4
|
+
/**
|
|
5
|
+
* A `testId` prop is provided for specified elements, which is a unique
|
|
6
|
+
* string that appears as a data attribute `data-testid` in the rendered code,
|
|
7
|
+
* serving as a hook for automated tests
|
|
8
|
+
*/
|
|
9
|
+
testId?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Text to be rendered inside the `SpotlightActions`.
|
|
12
|
+
*/
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* The action to take when the button is clicked.
|
|
16
|
+
*/
|
|
17
|
+
onClick?: ButtonProps['onClick'];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* __Spotlight primary action__
|
|
21
|
+
*
|
|
22
|
+
* `SpotlightPrimaryAction` is required for all `Spotlight` components. It should be used to dismiss the spotlight
|
|
23
|
+
* for single step spotlights, or to show the next step on multi step spotlight tours.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
export declare const SpotlightPrimaryAction: React.ForwardRefExoticComponent<SpotlightPrimaryActionProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
import { type ButtonProps } from '@atlaskit/button/new';
|
|
3
|
+
export interface SpotlightSecondaryActionProps {
|
|
4
|
+
/**
|
|
5
|
+
* A `testId` prop is provided for specified elements, which is a unique
|
|
6
|
+
* string that appears as a data attribute `data-testid` in the rendered code,
|
|
7
|
+
* serving as a hook for automated tests
|
|
8
|
+
*/
|
|
9
|
+
testId?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Text to be rendered inside the `SpotlightActions`.
|
|
12
|
+
*/
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* The action to take when the button is clicked.
|
|
16
|
+
*/
|
|
17
|
+
onClick?: ButtonProps['onClick'];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* __Spotlight secondary action__
|
|
21
|
+
*
|
|
22
|
+
* `SpotlightSecondaryAction` is not required for all `Spotlight` components. It should supplement the SpotlightPrimaryAction.
|
|
23
|
+
* It is intended to be used to go back to the previous step in multi step spotlight tours, or other similar actions.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
export declare const SpotlightSecondaryAction: React.ForwardRefExoticComponent<SpotlightSecondaryActionProps & React.RefAttributes<HTMLButtonElement>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/spotlight",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "A spotlight introduces users to various points of interest across Atlassian through focused messages or multi-step tours.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,8 +29,10 @@
|
|
|
29
29
|
".": "./src/index.tsx"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
+
"@atlaskit/button": "^23.3.0",
|
|
32
33
|
"@atlaskit/css": "^0.12.0",
|
|
33
34
|
"@atlaskit/heading": "^5.2.0",
|
|
35
|
+
"@atlaskit/icon": "^27.9.0",
|
|
34
36
|
"@atlaskit/primitives": "^14.11.0",
|
|
35
37
|
"@atlaskit/tokens": "^6.0.0",
|
|
36
38
|
"@babel/runtime": "^7.0.0",
|
|
@@ -45,8 +47,12 @@
|
|
|
45
47
|
"@atlaskit/ssr": "workspace:^",
|
|
46
48
|
"@atlaskit/visual-regression": "workspace:^",
|
|
47
49
|
"@testing-library/react": "^13.4.0",
|
|
48
|
-
"react-dom": "^18.2.0"
|
|
49
|
-
|
|
50
|
+
"react-dom": "^18.2.0"
|
|
51
|
+
},
|
|
52
|
+
"platform-feature-flags": {
|
|
53
|
+
"platform-component-visual-refresh": {
|
|
54
|
+
"type": "boolean"
|
|
55
|
+
}
|
|
50
56
|
},
|
|
51
57
|
"techstack": {
|
|
52
58
|
"@atlassian/frontend": {
|