@atlaskit/spotlight 0.0.3 → 0.0.5
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 +13 -0
- package/dist/cjs/index.js +29 -1
- package/dist/cjs/ui/actions/index.compiled.css +1 -0
- package/dist/cjs/ui/actions/index.js +34 -0
- package/dist/cjs/ui/footer/index.compiled.css +3 -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 +5 -1
- package/dist/es2019/ui/actions/index.compiled.css +1 -0
- package/dist/es2019/ui/actions/index.js +27 -0
- package/dist/es2019/ui/footer/index.compiled.css +3 -0
- package/dist/es2019/ui/footer/index.js +26 -0
- package/dist/es2019/ui/header/index.js +2 -2
- 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 +5 -1
- package/dist/esm/ui/actions/index.compiled.css +1 -0
- package/dist/esm/ui/actions/index.js +26 -0
- package/dist/esm/ui/footer/index.compiled.css +3 -0
- package/dist/esm/ui/footer/index.js +25 -0
- package/dist/esm/ui/header/index.js +2 -2
- 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 +4 -0
- package/dist/types/ui/actions/index.d.ts +20 -0
- package/dist/types/ui/footer/index.d.ts +20 -0
- package/dist/types/ui/header/index.d.ts +1 -1
- 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 +4 -0
- package/dist/types-ts4.5/ui/actions/index.d.ts +20 -0
- package/dist/types-ts4.5/ui/footer/index.d.ts +20 -0
- package/dist/types-ts4.5/ui/header/index.d.ts +1 -1
- 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 +8 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/spotlight
|
|
2
2
|
|
|
3
|
+
## 0.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`d63550f8e338a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d63550f8e338a) -
|
|
8
|
+
Create Footer, Actions, PrimaryAction, SecondaryAction components.
|
|
9
|
+
|
|
10
|
+
## 0.0.4
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 0.0.3
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -9,6 +9,18 @@ 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, "SpotlightFooter", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _footer.SpotlightFooter;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
12
24
|
Object.defineProperty(exports, "SpotlightHeader", {
|
|
13
25
|
enumerable: true,
|
|
14
26
|
get: function get() {
|
|
@@ -21,6 +33,22 @@ Object.defineProperty(exports, "SpotlightHeadline", {
|
|
|
21
33
|
return _headline.SpotlightHeadline;
|
|
22
34
|
}
|
|
23
35
|
});
|
|
36
|
+
Object.defineProperty(exports, "SpotlightPrimaryAction", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function get() {
|
|
39
|
+
return _primaryAction.SpotlightPrimaryAction;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "SpotlightSecondaryAction", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function get() {
|
|
45
|
+
return _secondaryAction.SpotlightSecondaryAction;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
24
48
|
var _spotlight = require("./ui/spotlight");
|
|
25
49
|
var _header = require("./ui/header");
|
|
26
|
-
var _headline = require("./ui/headline");
|
|
50
|
+
var _headline = require("./ui/headline");
|
|
51
|
+
var _footer = require("./ui/footer");
|
|
52
|
+
var _actions = require("./ui/actions");
|
|
53
|
+
var _primaryAction = require("./ui/primary-action");
|
|
54
|
+
var _secondaryAction = require("./ui/secondary-action");
|
|
@@ -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,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: "_18zrpxbi _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,7 @@
|
|
|
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';
|
|
@@ -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,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: "_18zrpxbi _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
|
+
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
2
|
import "./index.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
-
import React, { forwardRef } from
|
|
5
|
-
import { Flex } from
|
|
4
|
+
import React, { forwardRef } from 'react';
|
|
5
|
+
import { Flex } from '@atlaskit/primitives/compiled';
|
|
6
6
|
const styles = {
|
|
7
7
|
root: "_bozgpxbi _y4tiutpp _1q51utpp _85i5utpp"
|
|
8
8
|
};
|
|
@@ -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,7 @@
|
|
|
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';
|
|
@@ -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,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: "_18zrpxbi _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
|
+
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
2
|
import "./index.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
-
import React, { forwardRef } from
|
|
5
|
-
import { Flex } from
|
|
4
|
+
import React, { forwardRef } from 'react';
|
|
5
|
+
import { Flex } from '@atlaskit/primitives/compiled';
|
|
6
6
|
var styles = {
|
|
7
7
|
root: "_bozgpxbi _y4tiutpp _1q51utpp _85i5utpp"
|
|
8
8
|
};
|
|
@@ -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,7 @@
|
|
|
1
1
|
export { Spotlight, type SpotlightProps } from './ui/spotlight';
|
|
2
2
|
export { SpotlightHeader, type SpotlightHeaderProps } from './ui/header';
|
|
3
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';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { type ReactNode } from "react";
|
|
2
|
+
export interface SpotlighActionsProps {
|
|
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<SpotlighActionsProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -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 PrimaryActionProps {
|
|
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<PrimaryActionProps & 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 SecondaryActionProps {
|
|
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<SecondaryActionProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export { Spotlight, type SpotlightProps } from './ui/spotlight';
|
|
2
2
|
export { SpotlightHeader, type SpotlightHeaderProps } from './ui/header';
|
|
3
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';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { type ReactNode } from "react";
|
|
2
|
+
export interface SpotlighActionsProps {
|
|
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<SpotlighActionsProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -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 PrimaryActionProps {
|
|
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<PrimaryActionProps & 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 SecondaryActionProps {
|
|
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<SecondaryActionProps & 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.5",
|
|
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,10 +29,11 @@
|
|
|
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",
|
|
34
35
|
"@atlaskit/primitives": "^14.11.0",
|
|
35
|
-
"@atlaskit/tokens": "^
|
|
36
|
+
"@atlaskit/tokens": "^6.0.0",
|
|
36
37
|
"@babel/runtime": "^7.0.0",
|
|
37
38
|
"@compiled/react": "^0.18.3"
|
|
38
39
|
},
|
|
@@ -48,6 +49,11 @@
|
|
|
48
49
|
"react-dom": "^18.2.0",
|
|
49
50
|
"typescript": "~5.4.2"
|
|
50
51
|
},
|
|
52
|
+
"platform-feature-flags": {
|
|
53
|
+
"platform-component-visual-refresh": {
|
|
54
|
+
"type": "boolean"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
51
57
|
"techstack": {
|
|
52
58
|
"@atlassian/frontend": {
|
|
53
59
|
"code-structure": [
|