@atlaskit/spotlight 0.0.13 → 0.0.14
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
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/spotlight
|
|
2
2
|
|
|
3
|
+
## 0.0.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`85a83a17c7d56`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/85a83a17c7d56) -
|
|
8
|
+
Tweak offset of caret positioning so as not to overlap the target component.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 0.0.13
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -17,6 +17,16 @@ var styles = {
|
|
|
17
17
|
visible: "_lcxv1wug _3um0ewfl",
|
|
18
18
|
hidden: "_lcxvglyw _3um015vq"
|
|
19
19
|
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The `transform: rotate(45deg);` styles used to rotate the `Caret` component result in the corners of
|
|
23
|
+
* the caret extending beyond the bounding box (by roughly 2px). So, apply an offset to ensure
|
|
24
|
+
* the caret points to the very edge of the target element.
|
|
25
|
+
*
|
|
26
|
+
* Note: `@atlaskit/popper` maps the offset to to the placement, so we only need to define `[0, 2]` and
|
|
27
|
+
* the offset will get correctly rotated depending on the placement.
|
|
28
|
+
*/
|
|
29
|
+
var offset = [0, 2];
|
|
20
30
|
/**
|
|
21
31
|
* The Spotlight card can be positioned in many different configurations, but the caret should always point to
|
|
22
32
|
* the center of the target element. `@atlaskit/popper` uses `'top' | 'right' | 'bottom' | 'left'` values for
|
|
@@ -51,7 +61,7 @@ var PopoverContent = exports.PopoverContent = function PopoverContent(_ref) {
|
|
|
51
61
|
setPlacement(placement);
|
|
52
62
|
}, [placement, setPlacement]);
|
|
53
63
|
return /*#__PURE__*/React.createElement(_popper.Popper, {
|
|
54
|
-
offset:
|
|
64
|
+
offset: offset,
|
|
55
65
|
placement: popperPlacementMap[placement]
|
|
56
66
|
}, function (_ref2) {
|
|
57
67
|
var ref = _ref2.ref,
|
|
@@ -9,6 +9,16 @@ const styles = {
|
|
|
9
9
|
visible: "_lcxv1wug _3um0ewfl",
|
|
10
10
|
hidden: "_lcxvglyw _3um015vq"
|
|
11
11
|
};
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The `transform: rotate(45deg);` styles used to rotate the `Caret` component result in the corners of
|
|
15
|
+
* the caret extending beyond the bounding box (by roughly 2px). So, apply an offset to ensure
|
|
16
|
+
* the caret points to the very edge of the target element.
|
|
17
|
+
*
|
|
18
|
+
* Note: `@atlaskit/popper` maps the offset to to the placement, so we only need to define `[0, 2]` and
|
|
19
|
+
* the offset will get correctly rotated depending on the placement.
|
|
20
|
+
*/
|
|
21
|
+
const offset = [0, 2];
|
|
12
22
|
/**
|
|
13
23
|
* The Spotlight card can be positioned in many different configurations, but the caret should always point to
|
|
14
24
|
* the center of the target element. `@atlaskit/popper` uses `'top' | 'right' | 'bottom' | 'left'` values for
|
|
@@ -44,7 +54,7 @@ export const PopoverContent = ({
|
|
|
44
54
|
setPlacement(placement);
|
|
45
55
|
}, [placement, setPlacement]);
|
|
46
56
|
return /*#__PURE__*/React.createElement(Popper, {
|
|
47
|
-
offset:
|
|
57
|
+
offset: offset,
|
|
48
58
|
placement: popperPlacementMap[placement]
|
|
49
59
|
}, ({
|
|
50
60
|
ref,
|
|
@@ -9,6 +9,16 @@ var styles = {
|
|
|
9
9
|
visible: "_lcxv1wug _3um0ewfl",
|
|
10
10
|
hidden: "_lcxvglyw _3um015vq"
|
|
11
11
|
};
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The `transform: rotate(45deg);` styles used to rotate the `Caret` component result in the corners of
|
|
15
|
+
* the caret extending beyond the bounding box (by roughly 2px). So, apply an offset to ensure
|
|
16
|
+
* the caret points to the very edge of the target element.
|
|
17
|
+
*
|
|
18
|
+
* Note: `@atlaskit/popper` maps the offset to to the placement, so we only need to define `[0, 2]` and
|
|
19
|
+
* the offset will get correctly rotated depending on the placement.
|
|
20
|
+
*/
|
|
21
|
+
var offset = [0, 2];
|
|
12
22
|
/**
|
|
13
23
|
* The Spotlight card can be positioned in many different configurations, but the caret should always point to
|
|
14
24
|
* the center of the target element. `@atlaskit/popper` uses `'top' | 'right' | 'bottom' | 'left'` values for
|
|
@@ -43,7 +53,7 @@ export var PopoverContent = function PopoverContent(_ref) {
|
|
|
43
53
|
setPlacement(placement);
|
|
44
54
|
}, [placement, setPlacement]);
|
|
45
55
|
return /*#__PURE__*/React.createElement(Popper, {
|
|
46
|
-
offset:
|
|
56
|
+
offset: offset,
|
|
47
57
|
placement: popperPlacementMap[placement]
|
|
48
58
|
}, function (_ref2) {
|
|
49
59
|
var ref = _ref2.ref,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/spotlight",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
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,7 +29,7 @@
|
|
|
29
29
|
".": "./src/index.tsx"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@atlaskit/button": "^23.
|
|
32
|
+
"@atlaskit/button": "^23.4.0",
|
|
33
33
|
"@atlaskit/css": "^0.12.0",
|
|
34
34
|
"@atlaskit/heading": "^5.2.0",
|
|
35
35
|
"@atlaskit/icon": "^27.12.0",
|