@atlaskit/reactions 21.3.2 → 21.3.3
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 +6 -0
- package/dist/cjs/components/ReactionTooltip.js +3 -14
- package/dist/cjs/components/Reactions.js +3 -3
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/ReactionTooltip.js +2 -6
- package/dist/es2019/components/Reactions.js +3 -3
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/ReactionTooltip.js +2 -7
- package/dist/esm/components/Reactions.js +3 -3
- package/dist/esm/version.json +1 -1
- package/dist/types/components/ReactionTooltip.d.ts +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/reactions
|
|
2
2
|
|
|
3
|
+
## 21.3.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`7f1dd280229`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7f1dd280229) - Fix styling issue in the reaction emoji while hovering on it for the first time
|
|
8
|
+
|
|
3
9
|
## 21.3.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
@@ -11,12 +9,12 @@ exports.ReactionTooltip = void 0;
|
|
|
11
9
|
|
|
12
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
11
|
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
|
+
|
|
14
14
|
var _core = require("@emotion/core");
|
|
15
15
|
|
|
16
16
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
17
17
|
|
|
18
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
19
|
-
|
|
20
18
|
var _reactIntlNext = require("react-intl-next");
|
|
21
19
|
|
|
22
20
|
var _tokens = require("@atlaskit/tokens");
|
|
@@ -25,10 +23,6 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
25
23
|
|
|
26
24
|
var _i18n = require("./i18n");
|
|
27
25
|
|
|
28
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
29
|
-
|
|
30
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
31
|
-
|
|
32
26
|
/** @jsx jsx */
|
|
33
27
|
var verticalMargin = 5;
|
|
34
28
|
var tooltipStyle = (0, _core.css)({
|
|
@@ -64,12 +58,7 @@ var ReactionTooltip = function ReactionTooltip(_ref) {
|
|
|
64
58
|
var emojiName = _ref.emojiName,
|
|
65
59
|
children = _ref.children,
|
|
66
60
|
users = _ref.reaction.users;
|
|
67
|
-
|
|
68
|
-
if (!users || users.length === 0) {
|
|
69
|
-
return (0, _core.jsx)(_react.Fragment, null, _react.default.Children.only(children));
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
var content = (0, _core.jsx)("div", {
|
|
61
|
+
var content = !users || users.length === 0 ? null : (0, _core.jsx)("div", {
|
|
73
62
|
css: tooltipStyle
|
|
74
63
|
}, (0, _core.jsx)("ul", null, emojiName ? (0, _core.jsx)("li", {
|
|
75
64
|
css: emojiNameStyle
|
|
@@ -50,7 +50,7 @@ var reactionStyle = (0, _core.css)({
|
|
|
50
50
|
// top margin of 2px to allow spacing between rows when wrapped (paired with top margin in reactionsStyle)
|
|
51
51
|
margin: '2px 4px 0 4px'
|
|
52
52
|
});
|
|
53
|
-
var
|
|
53
|
+
var wrapperStyle = (0, _core.css)({
|
|
54
54
|
display: 'flex',
|
|
55
55
|
flexWrap: 'wrap',
|
|
56
56
|
position: 'relative',
|
|
@@ -58,7 +58,7 @@ var reactionsStyle = (0, _core.css)({
|
|
|
58
58
|
borderRadius: '15px',
|
|
59
59
|
// To allow to row spacing of 2px on wrap, and 0px on first row
|
|
60
60
|
marginTop: '-2px',
|
|
61
|
-
'
|
|
61
|
+
'> :first-of-type > :first-child': {
|
|
62
62
|
marginLeft: 0
|
|
63
63
|
}
|
|
64
64
|
});
|
|
@@ -177,7 +177,7 @@ var ReactionsWithoutAnalytics = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
177
177
|
key: "render",
|
|
178
178
|
value: function render() {
|
|
179
179
|
return (0, _core.jsx)("div", {
|
|
180
|
-
css:
|
|
180
|
+
css: wrapperStyle
|
|
181
181
|
}, this.props.reactions.map(this.renderReaction), this.renderPicker());
|
|
182
182
|
}
|
|
183
183
|
}]);
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
|
+
import React from 'react';
|
|
4
5
|
import { jsx, css } from '@emotion/core';
|
|
5
6
|
import Tooltip from '@atlaskit/tooltip';
|
|
6
|
-
import React, { Fragment } from 'react';
|
|
7
7
|
import { FormattedMessage } from 'react-intl-next';
|
|
8
8
|
import { token } from '@atlaskit/tokens';
|
|
9
9
|
import { N90 } from '@atlaskit/theme/colors';
|
|
@@ -44,11 +44,7 @@ export const ReactionTooltip = ({
|
|
|
44
44
|
users
|
|
45
45
|
}
|
|
46
46
|
}) => {
|
|
47
|
-
|
|
48
|
-
return jsx(Fragment, null, React.Children.only(children));
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
const content = jsx("div", {
|
|
47
|
+
const content = !users || users.length === 0 ? null : jsx("div", {
|
|
52
48
|
css: tooltipStyle
|
|
53
49
|
}, jsx("ul", null, emojiName ? jsx("li", {
|
|
54
50
|
css: emojiNameStyle
|
|
@@ -16,7 +16,7 @@ const reactionStyle = css({
|
|
|
16
16
|
// top margin of 2px to allow spacing between rows when wrapped (paired with top margin in reactionsStyle)
|
|
17
17
|
margin: '2px 4px 0 4px'
|
|
18
18
|
});
|
|
19
|
-
const
|
|
19
|
+
const wrapperStyle = css({
|
|
20
20
|
display: 'flex',
|
|
21
21
|
flexWrap: 'wrap',
|
|
22
22
|
position: 'relative',
|
|
@@ -24,7 +24,7 @@ const reactionsStyle = css({
|
|
|
24
24
|
borderRadius: '15px',
|
|
25
25
|
// To allow to row spacing of 2px on wrap, and 0px on first row
|
|
26
26
|
marginTop: '-2px',
|
|
27
|
-
'
|
|
27
|
+
'> :first-of-type > :first-child': {
|
|
28
28
|
marginLeft: 0
|
|
29
29
|
}
|
|
30
30
|
});
|
|
@@ -134,7 +134,7 @@ export class ReactionsWithoutAnalytics extends React.PureComponent {
|
|
|
134
134
|
|
|
135
135
|
render() {
|
|
136
136
|
return jsx("div", {
|
|
137
|
-
css:
|
|
137
|
+
css: wrapperStyle
|
|
138
138
|
}, this.props.reactions.map(this.renderReaction), this.renderPicker());
|
|
139
139
|
}
|
|
140
140
|
|
package/dist/es2019/version.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
|
+
import React from 'react';
|
|
4
5
|
import { jsx, css } from '@emotion/core';
|
|
5
6
|
import Tooltip from '@atlaskit/tooltip';
|
|
6
|
-
import React, { Fragment } from 'react';
|
|
7
7
|
import { FormattedMessage } from 'react-intl-next';
|
|
8
8
|
import { token } from '@atlaskit/tokens';
|
|
9
9
|
import { N90 } from '@atlaskit/theme/colors';
|
|
@@ -41,12 +41,7 @@ export var ReactionTooltip = function ReactionTooltip(_ref) {
|
|
|
41
41
|
var emojiName = _ref.emojiName,
|
|
42
42
|
children = _ref.children,
|
|
43
43
|
users = _ref.reaction.users;
|
|
44
|
-
|
|
45
|
-
if (!users || users.length === 0) {
|
|
46
|
-
return jsx(Fragment, null, React.Children.only(children));
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
var content = jsx("div", {
|
|
44
|
+
var content = !users || users.length === 0 ? null : jsx("div", {
|
|
50
45
|
css: tooltipStyle
|
|
51
46
|
}, jsx("ul", null, emojiName ? jsx("li", {
|
|
52
47
|
css: emojiNameStyle
|
|
@@ -26,7 +26,7 @@ var reactionStyle = css({
|
|
|
26
26
|
// top margin of 2px to allow spacing between rows when wrapped (paired with top margin in reactionsStyle)
|
|
27
27
|
margin: '2px 4px 0 4px'
|
|
28
28
|
});
|
|
29
|
-
var
|
|
29
|
+
var wrapperStyle = css({
|
|
30
30
|
display: 'flex',
|
|
31
31
|
flexWrap: 'wrap',
|
|
32
32
|
position: 'relative',
|
|
@@ -34,7 +34,7 @@ var reactionsStyle = css({
|
|
|
34
34
|
borderRadius: '15px',
|
|
35
35
|
// To allow to row spacing of 2px on wrap, and 0px on first row
|
|
36
36
|
marginTop: '-2px',
|
|
37
|
-
'
|
|
37
|
+
'> :first-of-type > :first-child': {
|
|
38
38
|
marginLeft: 0
|
|
39
39
|
}
|
|
40
40
|
});
|
|
@@ -162,7 +162,7 @@ export var ReactionsWithoutAnalytics = /*#__PURE__*/function (_React$PureCompone
|
|
|
162
162
|
key: "render",
|
|
163
163
|
value: function render() {
|
|
164
164
|
return jsx("div", {
|
|
165
|
-
css:
|
|
165
|
+
css: wrapperStyle
|
|
166
166
|
}, this.props.reactions.map(this.renderReaction), this.renderPicker());
|
|
167
167
|
}
|
|
168
168
|
}]);
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/reactions",
|
|
3
|
-
"version": "21.3.
|
|
3
|
+
"version": "21.3.3",
|
|
4
4
|
"description": "Reactions component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@atlaskit/editor-test-helpers": "^17.0.0",
|
|
54
54
|
"@atlaskit/elements-test-helpers": "^0.7.0",
|
|
55
55
|
"@atlaskit/tooltip": "^17.5.0",
|
|
56
|
-
"@atlaskit/util-data-test": "^17.
|
|
56
|
+
"@atlaskit/util-data-test": "^17.3.0",
|
|
57
57
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
58
58
|
"@atlassian/ufo": "^0.1.0",
|
|
59
59
|
"@types/webpack-dev-server": "^3.11.2",
|