@atlaskit/reactions 27.1.0 → 27.1.2
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 +16 -0
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/components/Counter/Counter.js +3 -2
- package/dist/cjs/components/Counter/styles.js +6 -1
- package/dist/cjs/components/ReactionSummary/ReactionSummaryButton.js +11 -4
- package/dist/cjs/components/ReactionSummary/ReactionSummaryViewEmojiPicker.js +6 -7
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/components/Counter/Counter.js +4 -3
- package/dist/es2019/components/Counter/styles.js +5 -0
- package/dist/es2019/components/ReactionSummary/ReactionSummaryButton.js +11 -4
- package/dist/es2019/components/ReactionSummary/ReactionSummaryViewEmojiPicker.js +6 -7
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/components/Counter/Counter.js +4 -3
- package/dist/esm/components/Counter/styles.js +5 -0
- package/dist/esm/components/ReactionSummary/ReactionSummaryButton.js +11 -4
- package/dist/esm/components/ReactionSummary/ReactionSummaryViewEmojiPicker.js +6 -7
- package/dist/types/components/Counter/Counter.d.ts +5 -1
- package/dist/types/components/Counter/styles.d.ts +1 -0
- package/dist/types-ts4.5/components/Counter/Counter.d.ts +5 -1
- package/dist/types-ts4.5/components/Counter/styles.d.ts +1 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/reactions
|
|
2
2
|
|
|
3
|
+
## 27.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#125203](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/125203)
|
|
8
|
+
[`8b6c24cf0f169`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8b6c24cf0f169) -
|
|
9
|
+
[ux] Update emoji and button styling to smaller for compact style. Also update font color to match
|
|
10
|
+
other byline items.
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 27.1.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 27.1.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
|
@@ -11,7 +11,7 @@ var _analyticsGasTypes = require("@atlaskit/analytics-gas-types");
|
|
|
11
11
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
12
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
13
|
var packageName = "@atlaskit/reactions";
|
|
14
|
-
var packageVersion = "27.1.
|
|
14
|
+
var packageVersion = "27.1.2";
|
|
15
15
|
/**
|
|
16
16
|
* TODO: move to utility package?
|
|
17
17
|
* A random sampling function
|
|
@@ -43,7 +43,8 @@ var Counter = exports.Counter = function Counter(_ref) {
|
|
|
43
43
|
className = _ref.className,
|
|
44
44
|
value = _ref.value,
|
|
45
45
|
_ref$animationDuratio = _ref.animationDuration,
|
|
46
|
-
animationDuration = _ref$animationDuratio === void 0 ? 'medium' : _ref$animationDuratio
|
|
46
|
+
animationDuration = _ref$animationDuratio === void 0 ? 'medium' : _ref$animationDuratio,
|
|
47
|
+
useDarkerFont = _ref.useDarkerFont;
|
|
47
48
|
var getLabel = function getLabel(value) {
|
|
48
49
|
// Check if reached limit
|
|
49
50
|
if (limit && overLimitLabel && value >= limit) {
|
|
@@ -68,7 +69,7 @@ var Counter = exports.Counter = function Counter(_ref) {
|
|
|
68
69
|
"data-testid": RENDER_COMPONENT_WRAPPER
|
|
69
70
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
70
71
|
,
|
|
71
|
-
css: _styles.countStyle
|
|
72
|
+
css: useDarkerFont ? [_styles.countStyle, _styles.darkerFontStyle] : _styles.countStyle
|
|
72
73
|
}, (0, _react2.jsx)(_motion.ExitingPersistence, null, (0, _react2.jsx)(_motion.SlideIn, {
|
|
73
74
|
enterFrom: isIncreasing ? 'top' : 'bottom',
|
|
74
75
|
exitTo: isIncreasing ? 'top' : 'bottom',
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.highlightStyle = exports.counterLabelStyle = exports.countStyle = exports.containerStyle = void 0;
|
|
6
|
+
exports.highlightStyle = exports.darkerFontStyle = exports.counterLabelStyle = exports.countStyle = exports.containerStyle = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _colors = require("@atlaskit/theme/colors");
|
|
9
9
|
/**
|
|
@@ -37,4 +37,9 @@ var highlightStyle = exports.highlightStyle = (0, _react.css)({
|
|
|
37
37
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
38
38
|
var counterLabelStyle = exports.counterLabelStyle = (0, _react.css)({
|
|
39
39
|
fontVariantNumeric: 'tabular-nums'
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
43
|
+
var darkerFontStyle = exports.darkerFontStyle = (0, _react.css)({
|
|
44
|
+
color: "var(--ds-text-subtle, #44546F)"
|
|
40
45
|
});
|
|
@@ -28,7 +28,12 @@ var buttonStyle = (0, _primitives.xcss)({
|
|
|
28
28
|
paddingLeft: 'space.100'
|
|
29
29
|
});
|
|
30
30
|
var compactButtonStyle = (0, _primitives.xcss)({
|
|
31
|
-
height: '
|
|
31
|
+
height: '20px',
|
|
32
|
+
alignItems: 'center',
|
|
33
|
+
marginTop: 'space.075'
|
|
34
|
+
});
|
|
35
|
+
var compactPaddingStyles = (0, _primitives.xcss)({
|
|
36
|
+
paddingTop: 'space.025'
|
|
32
37
|
});
|
|
33
38
|
var opaqueBackgroundStyles = (0, _primitives.xcss)({
|
|
34
39
|
backgroundColor: 'elevation.surface',
|
|
@@ -100,7 +105,8 @@ var ReactionSummaryButton = exports.ReactionSummaryButton = /*#__PURE__*/(0, _re
|
|
|
100
105
|
additionalStyles: [].concat(buttonStyles, subtleSummaryStyles, compactButtonStyles)
|
|
101
106
|
}, /*#__PURE__*/_react.default.createElement(_primitives.Inline, {
|
|
102
107
|
space: "space.050",
|
|
103
|
-
xcss: buttonStyle
|
|
108
|
+
xcss: useCompactStyles ? [buttonStyle, compactPaddingStyles] : buttonStyle,
|
|
109
|
+
testId: "reaction-summary-wrapper"
|
|
104
110
|
}, topReactions.map(function (reaction) {
|
|
105
111
|
return /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
106
112
|
xcss: emojiStyle,
|
|
@@ -112,9 +118,10 @@ var ReactionSummaryButton = exports.ReactionSummaryButton = /*#__PURE__*/(0, _re
|
|
|
112
118
|
id: reaction.emojiId,
|
|
113
119
|
shortName: ''
|
|
114
120
|
},
|
|
115
|
-
fitToHeight: 16
|
|
121
|
+
fitToHeight: useCompactStyles ? 12 : 16
|
|
116
122
|
}));
|
|
117
123
|
})), /*#__PURE__*/_react.default.createElement(_Counter.Counter, {
|
|
118
|
-
value: totalReactionsCount
|
|
124
|
+
value: totalReactionsCount,
|
|
125
|
+
useDarkerFont: useCompactStyles
|
|
119
126
|
})));
|
|
120
127
|
});
|
|
@@ -20,7 +20,6 @@ var _Trigger = require("../Trigger");
|
|
|
20
20
|
|
|
21
21
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
22
22
|
|
|
23
|
-
;
|
|
24
23
|
var ReactionSummaryViewEmojiPicker = exports.ReactionSummaryViewEmojiPicker = function ReactionSummaryViewEmojiPicker(_ref) {
|
|
25
24
|
var emojiProvider = _ref.emojiProvider,
|
|
26
25
|
onSelection = _ref.onSelection,
|
|
@@ -46,9 +45,9 @@ var ReactionSummaryViewEmojiPicker = exports.ReactionSummaryViewEmojiPicker = fu
|
|
|
46
45
|
};
|
|
47
46
|
|
|
48
47
|
/**
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
* Event callback when the picker is closed
|
|
49
|
+
* @param _id Optional id if an emoji button was selected or undefined if was clicked outside the picker
|
|
50
|
+
*/
|
|
52
51
|
var close = (0, _react.useCallback)(function (_id) {
|
|
53
52
|
setIsOpen(false);
|
|
54
53
|
// ufo abort reaction experience
|
|
@@ -62,9 +61,9 @@ var ReactionSummaryViewEmojiPicker = exports.ReactionSummaryViewEmojiPicker = fu
|
|
|
62
61
|
}, [setIsOpen]);
|
|
63
62
|
|
|
64
63
|
/**
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
* Event callback when an emoji icon is selected
|
|
65
|
+
* @param item selected item
|
|
66
|
+
*/
|
|
68
67
|
var onEmojiSelected = (0, _react.useCallback)(function (item) {
|
|
69
68
|
// no emoji was selected
|
|
70
69
|
if (!item.id) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createAndFireEvent } from '@atlaskit/analytics-next';
|
|
2
2
|
import { UI_EVENT_TYPE, OPERATIONAL_EVENT_TYPE } from '@atlaskit/analytics-gas-types';
|
|
3
3
|
const packageName = "@atlaskit/reactions";
|
|
4
|
-
const packageVersion = "27.1.
|
|
4
|
+
const packageVersion = "27.1.2";
|
|
5
5
|
/**
|
|
6
6
|
* TODO: move to utility package?
|
|
7
7
|
* A random sampling function
|
|
@@ -9,7 +9,7 @@ import { SlideIn, ExitingPersistence } from '@atlaskit/motion';
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/design-system/no-banned-imports
|
|
10
10
|
|
|
11
11
|
import { formatLargeNumber } from '../../shared/utils';
|
|
12
|
-
import { containerStyle, counterLabelStyle, countStyle, highlightStyle } from './styles';
|
|
12
|
+
import { containerStyle, counterLabelStyle, countStyle, highlightStyle, darkerFontStyle } from './styles';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Test id for component top level div
|
|
@@ -34,7 +34,8 @@ export const Counter = ({
|
|
|
34
34
|
overLimitLabel,
|
|
35
35
|
className,
|
|
36
36
|
value,
|
|
37
|
-
animationDuration = 'medium'
|
|
37
|
+
animationDuration = 'medium',
|
|
38
|
+
useDarkerFont
|
|
38
39
|
}) => {
|
|
39
40
|
const getLabel = value => {
|
|
40
41
|
// Check if reached limit
|
|
@@ -60,7 +61,7 @@ export const Counter = ({
|
|
|
60
61
|
"data-testid": RENDER_COMPONENT_WRAPPER
|
|
61
62
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
62
63
|
,
|
|
63
|
-
css: countStyle
|
|
64
|
+
css: useDarkerFont ? [countStyle, darkerFontStyle] : countStyle
|
|
64
65
|
}, jsx(ExitingPersistence, null, jsx(SlideIn, {
|
|
65
66
|
enterFrom: isIncreasing ? 'top' : 'bottom',
|
|
66
67
|
exitTo: isIncreasing ? 'top' : 'bottom',
|
|
@@ -30,4 +30,9 @@ export const highlightStyle = css({
|
|
|
30
30
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
31
31
|
export const counterLabelStyle = css({
|
|
32
32
|
fontVariantNumeric: 'tabular-nums'
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
36
|
+
export const darkerFontStyle = css({
|
|
37
|
+
color: "var(--ds-text-subtle, #44546F)"
|
|
33
38
|
});
|
|
@@ -17,7 +17,12 @@ const buttonStyle = xcss({
|
|
|
17
17
|
paddingLeft: 'space.100'
|
|
18
18
|
});
|
|
19
19
|
const compactButtonStyle = xcss({
|
|
20
|
-
height: '
|
|
20
|
+
height: '20px',
|
|
21
|
+
alignItems: 'center',
|
|
22
|
+
marginTop: 'space.075'
|
|
23
|
+
});
|
|
24
|
+
const compactPaddingStyles = xcss({
|
|
25
|
+
paddingTop: 'space.025'
|
|
21
26
|
});
|
|
22
27
|
const opaqueBackgroundStyles = xcss({
|
|
23
28
|
backgroundColor: 'elevation.surface',
|
|
@@ -81,7 +86,8 @@ export const ReactionSummaryButton = /*#__PURE__*/forwardRef(({
|
|
|
81
86
|
additionalStyles: [...buttonStyles, ...subtleSummaryStyles, ...compactButtonStyles]
|
|
82
87
|
}, /*#__PURE__*/React.createElement(Inline, {
|
|
83
88
|
space: "space.050",
|
|
84
|
-
xcss: buttonStyle
|
|
89
|
+
xcss: useCompactStyles ? [buttonStyle, compactPaddingStyles] : buttonStyle,
|
|
90
|
+
testId: "reaction-summary-wrapper"
|
|
85
91
|
}, topReactions.map(reaction => /*#__PURE__*/React.createElement(Box, {
|
|
86
92
|
xcss: emojiStyle,
|
|
87
93
|
testId: RENDER_SUMMARY_EMOJI_TESTID
|
|
@@ -92,8 +98,9 @@ export const ReactionSummaryButton = /*#__PURE__*/forwardRef(({
|
|
|
92
98
|
id: reaction.emojiId,
|
|
93
99
|
shortName: ''
|
|
94
100
|
},
|
|
95
|
-
fitToHeight: 16
|
|
101
|
+
fitToHeight: useCompactStyles ? 12 : 16
|
|
96
102
|
})))), /*#__PURE__*/React.createElement(Counter, {
|
|
97
|
-
value: totalReactionsCount
|
|
103
|
+
value: totalReactionsCount,
|
|
104
|
+
useDarkerFont: useCompactStyles
|
|
98
105
|
})));
|
|
99
106
|
});
|
|
@@ -10,7 +10,6 @@ import { EmojiPicker } from '@atlaskit/emoji/picker';
|
|
|
10
10
|
import Popup from '@atlaskit/popup';
|
|
11
11
|
import { PickerRender } from '../../ufo';
|
|
12
12
|
import { Trigger } from '../Trigger';
|
|
13
|
-
;
|
|
14
13
|
export const ReactionSummaryViewEmojiPicker = ({
|
|
15
14
|
emojiProvider,
|
|
16
15
|
onSelection,
|
|
@@ -32,9 +31,9 @@ export const ReactionSummaryViewEmojiPicker = ({
|
|
|
32
31
|
};
|
|
33
32
|
|
|
34
33
|
/**
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
* Event callback when the picker is closed
|
|
35
|
+
* @param _id Optional id if an emoji button was selected or undefined if was clicked outside the picker
|
|
36
|
+
*/
|
|
38
37
|
const close = useCallback(_id => {
|
|
39
38
|
setIsOpen(false);
|
|
40
39
|
// ufo abort reaction experience
|
|
@@ -48,9 +47,9 @@ export const ReactionSummaryViewEmojiPicker = ({
|
|
|
48
47
|
}, [setIsOpen]);
|
|
49
48
|
|
|
50
49
|
/**
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
* Event callback when an emoji icon is selected
|
|
51
|
+
* @param item selected item
|
|
52
|
+
*/
|
|
54
53
|
const onEmojiSelected = useCallback(item => {
|
|
55
54
|
// no emoji was selected
|
|
56
55
|
if (!item.id) {
|
|
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import { createAndFireEvent } from '@atlaskit/analytics-next';
|
|
5
5
|
import { UI_EVENT_TYPE, OPERATIONAL_EVENT_TYPE } from '@atlaskit/analytics-gas-types';
|
|
6
6
|
var packageName = "@atlaskit/reactions";
|
|
7
|
-
var packageVersion = "27.1.
|
|
7
|
+
var packageVersion = "27.1.2";
|
|
8
8
|
/**
|
|
9
9
|
* TODO: move to utility package?
|
|
10
10
|
* A random sampling function
|
|
@@ -9,7 +9,7 @@ import { SlideIn, ExitingPersistence } from '@atlaskit/motion';
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/design-system/no-banned-imports
|
|
10
10
|
|
|
11
11
|
import { formatLargeNumber } from '../../shared/utils';
|
|
12
|
-
import { containerStyle, counterLabelStyle, countStyle, highlightStyle } from './styles';
|
|
12
|
+
import { containerStyle, counterLabelStyle, countStyle, highlightStyle, darkerFontStyle } from './styles';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Test id for component top level div
|
|
@@ -36,7 +36,8 @@ export var Counter = function Counter(_ref) {
|
|
|
36
36
|
className = _ref.className,
|
|
37
37
|
value = _ref.value,
|
|
38
38
|
_ref$animationDuratio = _ref.animationDuration,
|
|
39
|
-
animationDuration = _ref$animationDuratio === void 0 ? 'medium' : _ref$animationDuratio
|
|
39
|
+
animationDuration = _ref$animationDuratio === void 0 ? 'medium' : _ref$animationDuratio,
|
|
40
|
+
useDarkerFont = _ref.useDarkerFont;
|
|
40
41
|
var getLabel = function getLabel(value) {
|
|
41
42
|
// Check if reached limit
|
|
42
43
|
if (limit && overLimitLabel && value >= limit) {
|
|
@@ -61,7 +62,7 @@ export var Counter = function Counter(_ref) {
|
|
|
61
62
|
"data-testid": RENDER_COMPONENT_WRAPPER
|
|
62
63
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
63
64
|
,
|
|
64
|
-
css: countStyle
|
|
65
|
+
css: useDarkerFont ? [countStyle, darkerFontStyle] : countStyle
|
|
65
66
|
}, jsx(ExitingPersistence, null, jsx(SlideIn, {
|
|
66
67
|
enterFrom: isIncreasing ? 'top' : 'bottom',
|
|
67
68
|
exitTo: isIncreasing ? 'top' : 'bottom',
|
|
@@ -30,4 +30,9 @@ export var highlightStyle = css({
|
|
|
30
30
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
31
31
|
export var counterLabelStyle = css({
|
|
32
32
|
fontVariantNumeric: 'tabular-nums'
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
36
|
+
export var darkerFontStyle = css({
|
|
37
|
+
color: "var(--ds-text-subtle, #44546F)"
|
|
33
38
|
});
|
|
@@ -18,7 +18,12 @@ var buttonStyle = xcss({
|
|
|
18
18
|
paddingLeft: 'space.100'
|
|
19
19
|
});
|
|
20
20
|
var compactButtonStyle = xcss({
|
|
21
|
-
height: '
|
|
21
|
+
height: '20px',
|
|
22
|
+
alignItems: 'center',
|
|
23
|
+
marginTop: 'space.075'
|
|
24
|
+
});
|
|
25
|
+
var compactPaddingStyles = xcss({
|
|
26
|
+
paddingTop: 'space.025'
|
|
22
27
|
});
|
|
23
28
|
var opaqueBackgroundStyles = xcss({
|
|
24
29
|
backgroundColor: 'elevation.surface',
|
|
@@ -90,7 +95,8 @@ export var ReactionSummaryButton = /*#__PURE__*/forwardRef(function (_ref, ref)
|
|
|
90
95
|
additionalStyles: [].concat(buttonStyles, subtleSummaryStyles, compactButtonStyles)
|
|
91
96
|
}, /*#__PURE__*/React.createElement(Inline, {
|
|
92
97
|
space: "space.050",
|
|
93
|
-
xcss: buttonStyle
|
|
98
|
+
xcss: useCompactStyles ? [buttonStyle, compactPaddingStyles] : buttonStyle,
|
|
99
|
+
testId: "reaction-summary-wrapper"
|
|
94
100
|
}, topReactions.map(function (reaction) {
|
|
95
101
|
return /*#__PURE__*/React.createElement(Box, {
|
|
96
102
|
xcss: emojiStyle,
|
|
@@ -102,9 +108,10 @@ export var ReactionSummaryButton = /*#__PURE__*/forwardRef(function (_ref, ref)
|
|
|
102
108
|
id: reaction.emojiId,
|
|
103
109
|
shortName: ''
|
|
104
110
|
},
|
|
105
|
-
fitToHeight: 16
|
|
111
|
+
fitToHeight: useCompactStyles ? 12 : 16
|
|
106
112
|
}));
|
|
107
113
|
})), /*#__PURE__*/React.createElement(Counter, {
|
|
108
|
-
value: totalReactionsCount
|
|
114
|
+
value: totalReactionsCount,
|
|
115
|
+
useDarkerFont: useCompactStyles
|
|
109
116
|
})));
|
|
110
117
|
});
|
|
@@ -11,7 +11,6 @@ import { EmojiPicker } from '@atlaskit/emoji/picker';
|
|
|
11
11
|
import Popup from '@atlaskit/popup';
|
|
12
12
|
import { PickerRender } from '../../ufo';
|
|
13
13
|
import { Trigger } from '../Trigger';
|
|
14
|
-
;
|
|
15
14
|
export var ReactionSummaryViewEmojiPicker = function ReactionSummaryViewEmojiPicker(_ref) {
|
|
16
15
|
var emojiProvider = _ref.emojiProvider,
|
|
17
16
|
onSelection = _ref.onSelection,
|
|
@@ -37,9 +36,9 @@ export var ReactionSummaryViewEmojiPicker = function ReactionSummaryViewEmojiPic
|
|
|
37
36
|
};
|
|
38
37
|
|
|
39
38
|
/**
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
* Event callback when the picker is closed
|
|
40
|
+
* @param _id Optional id if an emoji button was selected or undefined if was clicked outside the picker
|
|
41
|
+
*/
|
|
43
42
|
var close = useCallback(function (_id) {
|
|
44
43
|
setIsOpen(false);
|
|
45
44
|
// ufo abort reaction experience
|
|
@@ -53,9 +52,9 @@ export var ReactionSummaryViewEmojiPicker = function ReactionSummaryViewEmojiPic
|
|
|
53
52
|
}, [setIsOpen]);
|
|
54
53
|
|
|
55
54
|
/**
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
* Event callback when an emoji icon is selected
|
|
56
|
+
* @param item selected item
|
|
57
|
+
*/
|
|
59
58
|
var onEmojiSelected = useCallback(function (item) {
|
|
60
59
|
// no emoji was selected
|
|
61
60
|
if (!item.id) {
|
|
@@ -37,8 +37,12 @@ export interface CounterProps {
|
|
|
37
37
|
* Duration of how long the motion will take (defaults to "medium" from '@atlaskit/motion')
|
|
38
38
|
*/
|
|
39
39
|
animationDuration?: Durations;
|
|
40
|
+
/**
|
|
41
|
+
* Optional prop to use a darker text color for the counter
|
|
42
|
+
*/
|
|
43
|
+
useDarkerFont?: boolean;
|
|
40
44
|
}
|
|
41
45
|
/**
|
|
42
46
|
* Display reaction count next to the emoji button
|
|
43
47
|
*/
|
|
44
|
-
export declare const Counter: ({ highlight, limit, overLimitLabel, className, value, animationDuration, }: CounterProps) => jsx.JSX.Element;
|
|
48
|
+
export declare const Counter: ({ highlight, limit, overLimitLabel, className, value, animationDuration, useDarkerFont, }: CounterProps) => jsx.JSX.Element;
|
|
@@ -2,3 +2,4 @@ export declare const countStyle: import("@emotion/react").SerializedStyles;
|
|
|
2
2
|
export declare const containerStyle: import("@emotion/react").SerializedStyles;
|
|
3
3
|
export declare const highlightStyle: import("@emotion/react").SerializedStyles;
|
|
4
4
|
export declare const counterLabelStyle: import("@emotion/react").SerializedStyles;
|
|
5
|
+
export declare const darkerFontStyle: import("@emotion/react").SerializedStyles;
|
|
@@ -37,8 +37,12 @@ export interface CounterProps {
|
|
|
37
37
|
* Duration of how long the motion will take (defaults to "medium" from '@atlaskit/motion')
|
|
38
38
|
*/
|
|
39
39
|
animationDuration?: Durations;
|
|
40
|
+
/**
|
|
41
|
+
* Optional prop to use a darker text color for the counter
|
|
42
|
+
*/
|
|
43
|
+
useDarkerFont?: boolean;
|
|
40
44
|
}
|
|
41
45
|
/**
|
|
42
46
|
* Display reaction count next to the emoji button
|
|
43
47
|
*/
|
|
44
|
-
export declare const Counter: ({ highlight, limit, overLimitLabel, className, value, animationDuration, }: CounterProps) => jsx.JSX.Element;
|
|
48
|
+
export declare const Counter: ({ highlight, limit, overLimitLabel, className, value, animationDuration, useDarkerFont, }: CounterProps) => jsx.JSX.Element;
|
|
@@ -2,3 +2,4 @@ export declare const countStyle: import("@emotion/react").SerializedStyles;
|
|
|
2
2
|
export declare const containerStyle: import("@emotion/react").SerializedStyles;
|
|
3
3
|
export declare const highlightStyle: import("@emotion/react").SerializedStyles;
|
|
4
4
|
export declare const counterLabelStyle: import("@emotion/react").SerializedStyles;
|
|
5
|
+
export declare const darkerFontStyle: import("@emotion/react").SerializedStyles;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/reactions",
|
|
3
|
-
"version": "27.1.
|
|
3
|
+
"version": "27.1.2",
|
|
4
4
|
"description": "Reactions component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@atlaskit/analytics-gas-types": "^5.1.0",
|
|
36
36
|
"@atlaskit/analytics-namespaced-context": "^7.0.0",
|
|
37
37
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
38
|
-
"@atlaskit/avatar": "^
|
|
38
|
+
"@atlaskit/avatar": "^25.0.0",
|
|
39
39
|
"@atlaskit/button": "^21.1.0",
|
|
40
40
|
"@atlaskit/emoji": "^68.0.0",
|
|
41
41
|
"@atlaskit/heading": "^5.1.0",
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
"@atlaskit/popper": "^7.0.0",
|
|
47
47
|
"@atlaskit/popup": "^2.0.0",
|
|
48
48
|
"@atlaskit/primitives": "^14.1.0",
|
|
49
|
-
"@atlaskit/react-ufo": "^3.
|
|
49
|
+
"@atlaskit/react-ufo": "^3.4.0",
|
|
50
50
|
"@atlaskit/spinner": "^18.0.0",
|
|
51
51
|
"@atlaskit/tabs": "^18.0.0",
|
|
52
52
|
"@atlaskit/theme": "^18.0.0",
|
|
53
|
-
"@atlaskit/tokens": "^4.
|
|
53
|
+
"@atlaskit/tokens": "^4.4.0",
|
|
54
54
|
"@atlaskit/tooltip": "^20.0.0",
|
|
55
55
|
"@atlaskit/ufo": "^0.4.0",
|
|
56
|
-
"@atlaskit/util-service-support": "^6.
|
|
56
|
+
"@atlaskit/util-service-support": "^6.3.0",
|
|
57
57
|
"@babel/runtime": "^7.0.0",
|
|
58
58
|
"@emotion/react": "^11.7.1",
|
|
59
59
|
"focus-trap": "^2.4.5"
|