@atlaskit/spotlight 0.0.10 → 0.0.11
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 +8 -0
- package/dist/cjs/index.js +7 -0
- package/dist/cjs/ui/media/index.compiled.css +2 -0
- package/dist/cjs/ui/media/index.js +31 -0
- package/dist/cjs/ui/spotlight/caret/index.compiled.css +6 -2
- package/dist/cjs/ui/spotlight/caret/index.js +13 -2
- package/dist/cjs/ui/spotlight/index.compiled.css +5 -5
- package/dist/cjs/ui/spotlight/index.js +8 -8
- package/dist/es2019/index.js +1 -0
- package/dist/es2019/ui/media/index.compiled.css +2 -0
- package/dist/es2019/ui/media/index.js +24 -0
- package/dist/es2019/ui/popover-content/index.js +1 -1
- package/dist/es2019/ui/spotlight/caret/index.compiled.css +6 -2
- package/dist/es2019/ui/spotlight/caret/index.js +15 -3
- package/dist/es2019/ui/spotlight/index.compiled.css +5 -5
- package/dist/es2019/ui/spotlight/index.js +8 -8
- package/dist/esm/index.js +1 -0
- package/dist/esm/ui/media/index.compiled.css +2 -0
- package/dist/esm/ui/media/index.js +23 -0
- package/dist/esm/ui/popover-content/index.js +1 -1
- package/dist/esm/ui/spotlight/caret/index.compiled.css +6 -2
- package/dist/esm/ui/spotlight/caret/index.js +14 -3
- package/dist/esm/ui/spotlight/index.compiled.css +5 -5
- package/dist/esm/ui/spotlight/index.js +8 -8
- package/dist/types/index.d.ts +1 -0
- package/dist/types/ui/body/index.d.ts +1 -1
- package/dist/types/ui/media/index.d.ts +21 -0
- package/dist/types/ui/popover-content/index.d.ts +1 -1
- package/dist/types-ts4.5/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/body/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/media/index.d.ts +21 -0
- package/dist/types-ts4.5/ui/popover-content/index.d.ts +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/spotlight
|
|
2
2
|
|
|
3
|
+
## 0.0.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#200012](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/200012)
|
|
8
|
+
[`fa829c42fc74f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fa829c42fc74f) -
|
|
9
|
+
Create SpotlightMedia component.
|
|
10
|
+
|
|
3
11
|
## 0.0.10
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -69,6 +69,12 @@ Object.defineProperty(exports, "SpotlightHeadline", {
|
|
|
69
69
|
return _headline.SpotlightHeadline;
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
|
+
Object.defineProperty(exports, "SpotlightMedia", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function get() {
|
|
75
|
+
return _media.SpotlightMedia;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
72
78
|
Object.defineProperty(exports, "SpotlightPrimaryAction", {
|
|
73
79
|
enumerable: true,
|
|
74
80
|
get: function get() {
|
|
@@ -103,6 +109,7 @@ var _primaryAction = require("./ui/primary-action");
|
|
|
103
109
|
var _secondaryAction = require("./ui/secondary-action");
|
|
104
110
|
var _controls = require("./ui/controls");
|
|
105
111
|
var _dismissControl = require("./ui/dismiss-control");
|
|
112
|
+
var _media = require("./ui/media");
|
|
106
113
|
var _popoverProvider = require("./ui/popover-provider");
|
|
107
114
|
var _popoverContent = require("./ui/popover-content");
|
|
108
115
|
var _popoverTarget = require("./ui/popover-target");
|
|
@@ -0,0 +1,31 @@
|
|
|
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.SpotlightMedia = 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: "_1bsbaq3k _4t3ihcro"
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* __SpotlightMedia__
|
|
19
|
+
*
|
|
20
|
+
* `SpotlightMedia` is optional in a `Spotlight`.
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
var SpotlightMedia = exports.SpotlightMedia = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
24
|
+
var children = _ref.children,
|
|
25
|
+
testId = _ref.testId;
|
|
26
|
+
return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
27
|
+
ref: ref,
|
|
28
|
+
xcss: styles.root,
|
|
29
|
+
testId: testId
|
|
30
|
+
}, children);
|
|
31
|
+
});
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
.
|
|
2
|
-
.
|
|
1
|
+
._13lit94y{border-top-left-radius:1px}
|
|
2
|
+
._1bsbo7ao{width:15px}
|
|
3
|
+
._1o0zt94y{border-bottom-right-radius:1px}
|
|
4
|
+
._4t3io7ao{height:15px}
|
|
3
5
|
._bfhkcdhy{background-color:var(--ds-background-neutral-bold,#44546f)}
|
|
6
|
+
._mrkbt94y{border-bottom-left-radius:1px}
|
|
7
|
+
._qrwqt94y{border-top-right-radius:1px}
|
|
4
8
|
._t9ecjyd4{transform:rotate(45deg)}
|
|
@@ -10,9 +10,18 @@ require("./index.compiled.css");
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var React = _react;
|
|
12
12
|
var _runtime = require("@compiled/react/runtime");
|
|
13
|
+
var _context = require("../../../controllers/context");
|
|
13
14
|
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
15
|
var styles = {
|
|
15
|
-
root: "
|
|
16
|
+
root: "_1bsbo7ao _4t3io7ao _t9ecjyd4 _bfhkcdhy",
|
|
17
|
+
'top-start': "_1o0zt94y",
|
|
18
|
+
'top-end': "_1o0zt94y",
|
|
19
|
+
'bottom-start': "_13lit94y",
|
|
20
|
+
'bottom-end': "_13lit94y",
|
|
21
|
+
'right-start': "_mrkbt94y",
|
|
22
|
+
'right-end': "_mrkbt94y",
|
|
23
|
+
'left-start': "_qrwqt94y",
|
|
24
|
+
'left-end': "_qrwqt94y"
|
|
16
25
|
};
|
|
17
26
|
/**
|
|
18
27
|
* __Caret__
|
|
@@ -22,9 +31,11 @@ var styles = {
|
|
|
22
31
|
*/
|
|
23
32
|
var Caret = exports.Caret = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
24
33
|
var testId = _ref.testId;
|
|
34
|
+
var _useContext = (0, _react.useContext)(_context.SpotlightContext),
|
|
35
|
+
placement = _useContext.placement;
|
|
25
36
|
return /*#__PURE__*/React.createElement("div", {
|
|
26
37
|
"data-testid": testId,
|
|
27
38
|
ref: ref,
|
|
28
|
-
className: (0, _runtime.ax)([styles.root])
|
|
39
|
+
className: (0, _runtime.ax)([styles.root, styles[placement]])
|
|
29
40
|
});
|
|
30
41
|
});
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
._2rkopd34{border-radius:var(--ds-border-radius-200,8px)}
|
|
3
3
|
._zulppxbi{gap:var(--ds-space-200,1pc)}
|
|
4
|
-
._1rjcutpp{padding-block:var(--ds-space-150,9pt)}.
|
|
5
|
-
.
|
|
4
|
+
._1rjcutpp{padding-block:var(--ds-space-150,9pt)}._154i12x7{top:var(--ds-space-075,6px)}
|
|
5
|
+
._154imgjw{top:var(--ds-space-negative-200,-1pc)}
|
|
6
6
|
._1bsbaq3k{width:295px}
|
|
7
7
|
._1e0c1txw{display:flex}
|
|
8
|
+
._1ltv12x7{left:var(--ds-space-075,6px)}
|
|
8
9
|
._1ltvmgjw{left:var(--ds-space-negative-200,-1pc)}
|
|
9
|
-
.
|
|
10
|
+
._1xi212x7{right:var(--ds-space-075,6px)}
|
|
10
11
|
._1xi2mgjw{right:var(--ds-space-negative-200,-1pc)}
|
|
11
|
-
._1xi2u2gc{right:var(--ds-space-100,8px)}
|
|
12
12
|
._2lx21bp4{flex-direction:column}
|
|
13
|
+
._94n512x7{bottom:var(--ds-space-075,6px)}
|
|
13
14
|
._94n5mgjw{bottom:var(--ds-space-negative-200,-1pc)}
|
|
14
|
-
._94n5u2gc{bottom:var(--ds-space-100,8px)}
|
|
15
15
|
._kqswh2mm{position:relative}
|
|
16
16
|
._kqswstnw{position:absolute}
|
|
@@ -20,14 +20,14 @@ var styles = {
|
|
|
20
20
|
card: "_2rkopd34 _zulppxbi _1rjcutpp _kqswstnw _1bsbaq3k _1e0c1txw _2lx21bp4"
|
|
21
21
|
};
|
|
22
22
|
var placementStyles = {
|
|
23
|
-
'top-start': "
|
|
24
|
-
'top-end': "
|
|
25
|
-
'right-start': "
|
|
26
|
-
'right-end': "
|
|
27
|
-
'bottom-start': "
|
|
28
|
-
'bottom-end': "
|
|
29
|
-
'left-start': "
|
|
30
|
-
'left-end': "
|
|
23
|
+
'top-start': "_94n512x7 _1xi2mgjw",
|
|
24
|
+
'top-end': "_94n512x7 _1ltvmgjw",
|
|
25
|
+
'right-start': "_1ltv12x7 _94n5mgjw",
|
|
26
|
+
'right-end': "_1ltv12x7 _154imgjw",
|
|
27
|
+
'bottom-start': "_154i12x7 _1xi2mgjw",
|
|
28
|
+
'bottom-end': "_154i12x7 _1ltvmgjw",
|
|
29
|
+
'left-start': "_1xi212x7 _94n5mgjw",
|
|
30
|
+
'left-end': "_1xi212x7 _154imgjw"
|
|
31
31
|
};
|
|
32
32
|
/**
|
|
33
33
|
* __Spotlight__
|
package/dist/es2019/index.js
CHANGED
|
@@ -8,6 +8,7 @@ export { SpotlightPrimaryAction } from './ui/primary-action';
|
|
|
8
8
|
export { SpotlightSecondaryAction } from './ui/secondary-action';
|
|
9
9
|
export { SpotlightControls } from './ui/controls';
|
|
10
10
|
export { SpotlightDismissControl } from './ui/dismiss-control';
|
|
11
|
+
export { SpotlightMedia } from './ui/media';
|
|
11
12
|
export { PopoverProvider } from './ui/popover-provider';
|
|
12
13
|
export { PopoverContent } from './ui/popover-content';
|
|
13
14
|
export { PopoverTarget } from './ui/popover-target';
|
|
@@ -0,0 +1,24 @@
|
|
|
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 { Box } from '@atlaskit/primitives/compiled';
|
|
6
|
+
const styles = {
|
|
7
|
+
root: "_1bsbaq3k _4t3ihcro"
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* __SpotlightMedia__
|
|
11
|
+
*
|
|
12
|
+
* `SpotlightMedia` is optional in a `Spotlight`.
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
export const SpotlightMedia = /*#__PURE__*/forwardRef(({
|
|
16
|
+
children,
|
|
17
|
+
testId
|
|
18
|
+
}, ref) => {
|
|
19
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
20
|
+
ref: ref,
|
|
21
|
+
xcss: styles.root,
|
|
22
|
+
testId: testId
|
|
23
|
+
}, children);
|
|
24
|
+
});
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import "./index.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { useContext, useEffect } from
|
|
5
|
+
import { useContext, useEffect } from 'react';
|
|
6
6
|
import { Popper } from '@atlaskit/popper';
|
|
7
7
|
import { SpotlightContext } from '../../controllers/context';
|
|
8
8
|
const styles = {
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
.
|
|
2
|
-
.
|
|
1
|
+
._13lit94y{border-top-left-radius:1px}
|
|
2
|
+
._1bsbo7ao{width:15px}
|
|
3
|
+
._1o0zt94y{border-bottom-right-radius:1px}
|
|
4
|
+
._4t3io7ao{height:15px}
|
|
3
5
|
._bfhkcdhy{background-color:var(--ds-background-neutral-bold,#44546f)}
|
|
6
|
+
._mrkbt94y{border-bottom-left-radius:1px}
|
|
7
|
+
._qrwqt94y{border-top-right-radius:1px}
|
|
4
8
|
._t9ecjyd4{transform:rotate(45deg)}
|
|
@@ -2,9 +2,18 @@
|
|
|
2
2
|
import "./index.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { forwardRef } from 'react';
|
|
5
|
+
import { forwardRef, useContext } from 'react';
|
|
6
|
+
import { SpotlightContext } from '../../../controllers/context';
|
|
6
7
|
const styles = {
|
|
7
|
-
root: "
|
|
8
|
+
root: "_1bsbo7ao _4t3io7ao _t9ecjyd4 _bfhkcdhy",
|
|
9
|
+
'top-start': "_1o0zt94y",
|
|
10
|
+
'top-end': "_1o0zt94y",
|
|
11
|
+
'bottom-start': "_13lit94y",
|
|
12
|
+
'bottom-end': "_13lit94y",
|
|
13
|
+
'right-start': "_mrkbt94y",
|
|
14
|
+
'right-end': "_mrkbt94y",
|
|
15
|
+
'left-start': "_qrwqt94y",
|
|
16
|
+
'left-end': "_qrwqt94y"
|
|
8
17
|
};
|
|
9
18
|
/**
|
|
10
19
|
* __Caret__
|
|
@@ -15,9 +24,12 @@ const styles = {
|
|
|
15
24
|
export const Caret = /*#__PURE__*/forwardRef(({
|
|
16
25
|
testId
|
|
17
26
|
}, ref) => {
|
|
27
|
+
const {
|
|
28
|
+
placement
|
|
29
|
+
} = useContext(SpotlightContext);
|
|
18
30
|
return /*#__PURE__*/React.createElement("div", {
|
|
19
31
|
"data-testid": testId,
|
|
20
32
|
ref: ref,
|
|
21
|
-
className: ax([styles.root])
|
|
33
|
+
className: ax([styles.root, styles[placement]])
|
|
22
34
|
});
|
|
23
35
|
});
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
._2rkopd34{border-radius:var(--ds-border-radius-200,8px)}
|
|
3
3
|
._zulppxbi{gap:var(--ds-space-200,1pc)}
|
|
4
|
-
._1rjcutpp{padding-block:var(--ds-space-150,9pt)}.
|
|
5
|
-
.
|
|
4
|
+
._1rjcutpp{padding-block:var(--ds-space-150,9pt)}._154i12x7{top:var(--ds-space-075,6px)}
|
|
5
|
+
._154imgjw{top:var(--ds-space-negative-200,-1pc)}
|
|
6
6
|
._1bsbaq3k{width:295px}
|
|
7
7
|
._1e0c1txw{display:flex}
|
|
8
|
+
._1ltv12x7{left:var(--ds-space-075,6px)}
|
|
8
9
|
._1ltvmgjw{left:var(--ds-space-negative-200,-1pc)}
|
|
9
|
-
.
|
|
10
|
+
._1xi212x7{right:var(--ds-space-075,6px)}
|
|
10
11
|
._1xi2mgjw{right:var(--ds-space-negative-200,-1pc)}
|
|
11
|
-
._1xi2u2gc{right:var(--ds-space-100,8px)}
|
|
12
12
|
._2lx21bp4{flex-direction:column}
|
|
13
|
+
._94n512x7{bottom:var(--ds-space-075,6px)}
|
|
13
14
|
._94n5mgjw{bottom:var(--ds-space-negative-200,-1pc)}
|
|
14
|
-
._94n5u2gc{bottom:var(--ds-space-100,8px)}
|
|
15
15
|
._kqswh2mm{position:relative}
|
|
16
16
|
._kqswstnw{position:absolute}
|
|
@@ -12,14 +12,14 @@ const styles = {
|
|
|
12
12
|
card: "_2rkopd34 _zulppxbi _1rjcutpp _kqswstnw _1bsbaq3k _1e0c1txw _2lx21bp4"
|
|
13
13
|
};
|
|
14
14
|
const placementStyles = {
|
|
15
|
-
'top-start': "
|
|
16
|
-
'top-end': "
|
|
17
|
-
'right-start': "
|
|
18
|
-
'right-end': "
|
|
19
|
-
'bottom-start': "
|
|
20
|
-
'bottom-end': "
|
|
21
|
-
'left-start': "
|
|
22
|
-
'left-end': "
|
|
15
|
+
'top-start': "_94n512x7 _1xi2mgjw",
|
|
16
|
+
'top-end': "_94n512x7 _1ltvmgjw",
|
|
17
|
+
'right-start': "_1ltv12x7 _94n5mgjw",
|
|
18
|
+
'right-end': "_1ltv12x7 _154imgjw",
|
|
19
|
+
'bottom-start': "_154i12x7 _1xi2mgjw",
|
|
20
|
+
'bottom-end': "_154i12x7 _1ltvmgjw",
|
|
21
|
+
'left-start': "_1xi212x7 _94n5mgjw",
|
|
22
|
+
'left-end': "_1xi212x7 _154imgjw"
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
25
25
|
* __Spotlight__
|
package/dist/esm/index.js
CHANGED
|
@@ -8,6 +8,7 @@ export { SpotlightPrimaryAction } from './ui/primary-action';
|
|
|
8
8
|
export { SpotlightSecondaryAction } from './ui/secondary-action';
|
|
9
9
|
export { SpotlightControls } from './ui/controls';
|
|
10
10
|
export { SpotlightDismissControl } from './ui/dismiss-control';
|
|
11
|
+
export { SpotlightMedia } from './ui/media';
|
|
11
12
|
export { PopoverProvider } from './ui/popover-provider';
|
|
12
13
|
export { PopoverContent } from './ui/popover-content';
|
|
13
14
|
export { PopoverTarget } from './ui/popover-target';
|
|
@@ -0,0 +1,23 @@
|
|
|
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 { Box } from '@atlaskit/primitives/compiled';
|
|
6
|
+
var styles = {
|
|
7
|
+
root: "_1bsbaq3k _4t3ihcro"
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* __SpotlightMedia__
|
|
11
|
+
*
|
|
12
|
+
* `SpotlightMedia` is optional in a `Spotlight`.
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
export var SpotlightMedia = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
16
|
+
var children = _ref.children,
|
|
17
|
+
testId = _ref.testId;
|
|
18
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
19
|
+
ref: ref,
|
|
20
|
+
xcss: styles.root,
|
|
21
|
+
testId: testId
|
|
22
|
+
}, children);
|
|
23
|
+
});
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import "./index.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { useContext, useEffect } from
|
|
5
|
+
import { useContext, useEffect } from 'react';
|
|
6
6
|
import { Popper } from '@atlaskit/popper';
|
|
7
7
|
import { SpotlightContext } from '../../controllers/context';
|
|
8
8
|
var styles = {
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
.
|
|
2
|
-
.
|
|
1
|
+
._13lit94y{border-top-left-radius:1px}
|
|
2
|
+
._1bsbo7ao{width:15px}
|
|
3
|
+
._1o0zt94y{border-bottom-right-radius:1px}
|
|
4
|
+
._4t3io7ao{height:15px}
|
|
3
5
|
._bfhkcdhy{background-color:var(--ds-background-neutral-bold,#44546f)}
|
|
6
|
+
._mrkbt94y{border-bottom-left-radius:1px}
|
|
7
|
+
._qrwqt94y{border-top-right-radius:1px}
|
|
4
8
|
._t9ecjyd4{transform:rotate(45deg)}
|
|
@@ -2,9 +2,18 @@
|
|
|
2
2
|
import "./index.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { forwardRef } from 'react';
|
|
5
|
+
import { forwardRef, useContext } from 'react';
|
|
6
|
+
import { SpotlightContext } from '../../../controllers/context';
|
|
6
7
|
var styles = {
|
|
7
|
-
root: "
|
|
8
|
+
root: "_1bsbo7ao _4t3io7ao _t9ecjyd4 _bfhkcdhy",
|
|
9
|
+
'top-start': "_1o0zt94y",
|
|
10
|
+
'top-end': "_1o0zt94y",
|
|
11
|
+
'bottom-start': "_13lit94y",
|
|
12
|
+
'bottom-end': "_13lit94y",
|
|
13
|
+
'right-start': "_mrkbt94y",
|
|
14
|
+
'right-end': "_mrkbt94y",
|
|
15
|
+
'left-start': "_qrwqt94y",
|
|
16
|
+
'left-end': "_qrwqt94y"
|
|
8
17
|
};
|
|
9
18
|
/**
|
|
10
19
|
* __Caret__
|
|
@@ -14,9 +23,11 @@ var styles = {
|
|
|
14
23
|
*/
|
|
15
24
|
export var Caret = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
16
25
|
var testId = _ref.testId;
|
|
26
|
+
var _useContext = useContext(SpotlightContext),
|
|
27
|
+
placement = _useContext.placement;
|
|
17
28
|
return /*#__PURE__*/React.createElement("div", {
|
|
18
29
|
"data-testid": testId,
|
|
19
30
|
ref: ref,
|
|
20
|
-
className: ax([styles.root])
|
|
31
|
+
className: ax([styles.root, styles[placement]])
|
|
21
32
|
});
|
|
22
33
|
});
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
._2rkopd34{border-radius:var(--ds-border-radius-200,8px)}
|
|
3
3
|
._zulppxbi{gap:var(--ds-space-200,1pc)}
|
|
4
|
-
._1rjcutpp{padding-block:var(--ds-space-150,9pt)}.
|
|
5
|
-
.
|
|
4
|
+
._1rjcutpp{padding-block:var(--ds-space-150,9pt)}._154i12x7{top:var(--ds-space-075,6px)}
|
|
5
|
+
._154imgjw{top:var(--ds-space-negative-200,-1pc)}
|
|
6
6
|
._1bsbaq3k{width:295px}
|
|
7
7
|
._1e0c1txw{display:flex}
|
|
8
|
+
._1ltv12x7{left:var(--ds-space-075,6px)}
|
|
8
9
|
._1ltvmgjw{left:var(--ds-space-negative-200,-1pc)}
|
|
9
|
-
.
|
|
10
|
+
._1xi212x7{right:var(--ds-space-075,6px)}
|
|
10
11
|
._1xi2mgjw{right:var(--ds-space-negative-200,-1pc)}
|
|
11
|
-
._1xi2u2gc{right:var(--ds-space-100,8px)}
|
|
12
12
|
._2lx21bp4{flex-direction:column}
|
|
13
|
+
._94n512x7{bottom:var(--ds-space-075,6px)}
|
|
13
14
|
._94n5mgjw{bottom:var(--ds-space-negative-200,-1pc)}
|
|
14
|
-
._94n5u2gc{bottom:var(--ds-space-100,8px)}
|
|
15
15
|
._kqswh2mm{position:relative}
|
|
16
16
|
._kqswstnw{position:absolute}
|
|
@@ -12,14 +12,14 @@ var styles = {
|
|
|
12
12
|
card: "_2rkopd34 _zulppxbi _1rjcutpp _kqswstnw _1bsbaq3k _1e0c1txw _2lx21bp4"
|
|
13
13
|
};
|
|
14
14
|
var placementStyles = {
|
|
15
|
-
'top-start': "
|
|
16
|
-
'top-end': "
|
|
17
|
-
'right-start': "
|
|
18
|
-
'right-end': "
|
|
19
|
-
'bottom-start': "
|
|
20
|
-
'bottom-end': "
|
|
21
|
-
'left-start': "
|
|
22
|
-
'left-end': "
|
|
15
|
+
'top-start': "_94n512x7 _1xi2mgjw",
|
|
16
|
+
'top-end': "_94n512x7 _1ltvmgjw",
|
|
17
|
+
'right-start': "_1ltv12x7 _94n5mgjw",
|
|
18
|
+
'right-end': "_1ltv12x7 _154imgjw",
|
|
19
|
+
'bottom-start': "_154i12x7 _1xi2mgjw",
|
|
20
|
+
'bottom-end': "_154i12x7 _1ltvmgjw",
|
|
21
|
+
'left-start': "_1xi212x7 _94n5mgjw",
|
|
22
|
+
'left-end': "_1xi212x7 _154imgjw"
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
25
25
|
* __Spotlight__
|
package/dist/types/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export { SpotlightPrimaryAction, type SpotlightPrimaryActionProps } from './ui/p
|
|
|
8
8
|
export { SpotlightSecondaryAction, type SpotlightSecondaryActionProps, } from './ui/secondary-action';
|
|
9
9
|
export { SpotlightControls, type SpotlightControlsProps } from './ui/controls';
|
|
10
10
|
export { SpotlightDismissControl, type SpotlightDismissControlProps } from './ui/dismiss-control';
|
|
11
|
+
export { SpotlightMedia, type SpotlightMediaProps } from './ui/media';
|
|
11
12
|
export { PopoverProvider } from './ui/popover-provider';
|
|
12
13
|
export { PopoverContent } from './ui/popover-content';
|
|
13
14
|
export { PopoverTarget } from './ui/popover-target';
|
|
@@ -18,4 +18,4 @@ export interface SpotlightBodyProps {
|
|
|
18
18
|
* `SpotlightBody` is required in a `Spotlight`. The content should be brief and direct to elaborate on the intent.
|
|
19
19
|
*
|
|
20
20
|
*/
|
|
21
|
-
export declare const SpotlightBody: React.ForwardRefExoticComponent<SpotlightBodyProps & React.RefAttributes<
|
|
21
|
+
export declare const SpotlightBody: React.ForwardRefExoticComponent<SpotlightBodyProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
export interface SpotlightMediaProps {
|
|
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
|
+
* Textual content is required for all spotlights. It should be brief and direct
|
|
11
|
+
* to quickly elaborate on the intent.
|
|
12
|
+
*/
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* __SpotlightMedia__
|
|
17
|
+
*
|
|
18
|
+
* `SpotlightMedia` is optional in a `Spotlight`.
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
export declare const SpotlightMedia: React.ForwardRefExoticComponent<SpotlightMediaProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -8,6 +8,7 @@ export { SpotlightPrimaryAction, type SpotlightPrimaryActionProps } from './ui/p
|
|
|
8
8
|
export { SpotlightSecondaryAction, type SpotlightSecondaryActionProps, } from './ui/secondary-action';
|
|
9
9
|
export { SpotlightControls, type SpotlightControlsProps } from './ui/controls';
|
|
10
10
|
export { SpotlightDismissControl, type SpotlightDismissControlProps } from './ui/dismiss-control';
|
|
11
|
+
export { SpotlightMedia, type SpotlightMediaProps } from './ui/media';
|
|
11
12
|
export { PopoverProvider } from './ui/popover-provider';
|
|
12
13
|
export { PopoverContent } from './ui/popover-content';
|
|
13
14
|
export { PopoverTarget } from './ui/popover-target';
|
|
@@ -18,4 +18,4 @@ export interface SpotlightBodyProps {
|
|
|
18
18
|
* `SpotlightBody` is required in a `Spotlight`. The content should be brief and direct to elaborate on the intent.
|
|
19
19
|
*
|
|
20
20
|
*/
|
|
21
|
-
export declare const SpotlightBody: React.ForwardRefExoticComponent<SpotlightBodyProps & React.RefAttributes<
|
|
21
|
+
export declare const SpotlightBody: React.ForwardRefExoticComponent<SpotlightBodyProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
export interface SpotlightMediaProps {
|
|
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
|
+
* Textual content is required for all spotlights. It should be brief and direct
|
|
11
|
+
* to quickly elaborate on the intent.
|
|
12
|
+
*/
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* __SpotlightMedia__
|
|
17
|
+
*
|
|
18
|
+
* `SpotlightMedia` is optional in a `Spotlight`.
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
export declare const SpotlightMedia: React.ForwardRefExoticComponent<SpotlightMediaProps & React.RefAttributes<HTMLDivElement>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/spotlight",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
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",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"@atlaskit/css": "^0.12.0",
|
|
34
34
|
"@atlaskit/heading": "^5.2.0",
|
|
35
35
|
"@atlaskit/icon": "^27.11.0",
|
|
36
|
+
"@atlaskit/image": "^3.0.0",
|
|
36
37
|
"@atlaskit/popper": "^7.1.0",
|
|
37
38
|
"@atlaskit/primitives": "^14.11.0",
|
|
38
39
|
"@atlaskit/tokens": "^6.0.0",
|