@atlaskit/reactions 27.1.2 → 27.1.4
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 +15 -0
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/components/Counter/Counter.js +5 -2
- package/dist/cjs/components/Counter/styles.js +6 -1
- package/dist/cjs/components/ReactionPicker/ReactionPicker.js +4 -2
- package/dist/cjs/components/ReactionSummary/ReactionSummaryButton.js +5 -2
- package/dist/cjs/components/ReactionSummary/ReactionSummaryView.js +4 -2
- package/dist/cjs/components/Reactions/Reactions.js +7 -3
- package/dist/cjs/components/Trigger/Trigger.js +6 -2
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/components/Counter/Counter.js +6 -3
- package/dist/es2019/components/Counter/styles.js +5 -0
- package/dist/es2019/components/ReactionPicker/ReactionPicker.js +4 -2
- package/dist/es2019/components/ReactionSummary/ReactionSummaryButton.js +4 -2
- package/dist/es2019/components/ReactionSummary/ReactionSummaryView.js +4 -2
- package/dist/es2019/components/Reactions/Reactions.js +6 -3
- package/dist/es2019/components/Trigger/Trigger.js +6 -2
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/components/Counter/Counter.js +6 -3
- package/dist/esm/components/Counter/styles.js +5 -0
- package/dist/esm/components/ReactionPicker/ReactionPicker.js +4 -2
- package/dist/esm/components/ReactionSummary/ReactionSummaryButton.js +5 -2
- package/dist/esm/components/ReactionSummary/ReactionSummaryView.js +4 -2
- package/dist/esm/components/Reactions/Reactions.js +7 -3
- package/dist/esm/components/Trigger/Trigger.js +6 -2
- package/dist/types/components/Counter/Counter.d.ts +5 -1
- package/dist/types/components/Counter/styles.d.ts +1 -0
- package/dist/types/components/ReactionPicker/ReactionPicker.d.ts +1 -0
- package/dist/types/components/ReactionSummary/ReactionSummaryButton.d.ts +1 -1
- package/dist/types/components/ReactionSummary/ReactionSummaryView.d.ts +2 -2
- package/dist/types/components/Reactions/Reactions.d.ts +5 -1
- package/dist/types/components/Trigger/Trigger.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/dist/types-ts4.5/components/ReactionPicker/ReactionPicker.d.ts +1 -0
- package/dist/types-ts4.5/components/ReactionSummary/ReactionSummaryButton.d.ts +1 -1
- package/dist/types-ts4.5/components/ReactionSummary/ReactionSummaryView.d.ts +2 -2
- package/dist/types-ts4.5/components/Reactions/Reactions.d.ts +5 -1
- package/dist/types-ts4.5/components/Trigger/Trigger.d.ts +1 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/reactions
|
|
2
2
|
|
|
3
|
+
## 27.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#126476](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/126476)
|
|
8
|
+
[`7f1dfd438c788`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7f1dfd438c788) -
|
|
9
|
+
[ux] Add new prop to control updated summary view styling to achieve byline alignment in product
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 27.1.3
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 27.1.2
|
|
4
19
|
|
|
5
20
|
### Patch 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.4";
|
|
15
15
|
/**
|
|
16
16
|
* TODO: move to utility package?
|
|
17
17
|
* A random sampling function
|
|
@@ -44,7 +44,8 @@ var Counter = exports.Counter = function Counter(_ref) {
|
|
|
44
44
|
value = _ref.value,
|
|
45
45
|
_ref$animationDuratio = _ref.animationDuration,
|
|
46
46
|
animationDuration = _ref$animationDuratio === void 0 ? 'medium' : _ref$animationDuratio,
|
|
47
|
-
useDarkerFont = _ref.useDarkerFont
|
|
47
|
+
useDarkerFont = _ref.useDarkerFont,
|
|
48
|
+
useUpdatedStyles = _ref.useUpdatedStyles;
|
|
48
49
|
var getLabel = function getLabel(value) {
|
|
49
50
|
// Check if reached limit
|
|
50
51
|
if (limit && overLimitLabel && value >= limit) {
|
|
@@ -63,13 +64,15 @@ var Counter = exports.Counter = function Counter(_ref) {
|
|
|
63
64
|
var isIncreasing = (0, _react.useMemo)(function () {
|
|
64
65
|
return lastValue.current ? lastValue.current < value : false;
|
|
65
66
|
}, [value]);
|
|
67
|
+
var fontStyles = useDarkerFont ? [_styles.darkerFontStyle] : [];
|
|
68
|
+
var additionalStyles = useUpdatedStyles ? [_styles.updatedStyles] : [];
|
|
66
69
|
return (0, _react2.jsx)("div", {
|
|
67
70
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
68
71
|
className: className,
|
|
69
72
|
"data-testid": RENDER_COMPONENT_WRAPPER
|
|
70
73
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
71
74
|
,
|
|
72
|
-
css:
|
|
75
|
+
css: [_styles.countStyle].concat(fontStyles, additionalStyles)
|
|
73
76
|
}, (0, _react2.jsx)(_motion.ExitingPersistence, null, (0, _react2.jsx)(_motion.SlideIn, {
|
|
74
77
|
enterFrom: isIncreasing ? 'top' : 'bottom',
|
|
75
78
|
exitTo: isIncreasing ? 'top' : 'bottom',
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.highlightStyle = exports.darkerFontStyle = exports.counterLabelStyle = exports.countStyle = exports.containerStyle = void 0;
|
|
6
|
+
exports.updatedStyles = 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
|
/**
|
|
@@ -42,4 +42,9 @@ var counterLabelStyle = exports.counterLabelStyle = (0, _react.css)({
|
|
|
42
42
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
43
43
|
var darkerFontStyle = exports.darkerFontStyle = (0, _react.css)({
|
|
44
44
|
color: "var(--ds-text-subtle, #44546F)"
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
48
|
+
var updatedStyles = exports.updatedStyles = (0, _react.css)({
|
|
49
|
+
marginTop: "var(--ds-space-050, 4px)"
|
|
45
50
|
});
|
|
@@ -100,7 +100,8 @@ var ReactionPicker = exports.ReactionPicker = /*#__PURE__*/_react.default.memo(f
|
|
|
100
100
|
showRoundTrigger = _props$showRoundTrigg === void 0 ? false : _props$showRoundTrigg,
|
|
101
101
|
_props$reactionPicker = props.reactionPickerAdditionalStyle,
|
|
102
102
|
reactionPickerAdditionalStyle = _props$reactionPicker === void 0 ? undefined : _props$reactionPicker,
|
|
103
|
-
reactionPickerTriggerIcon = props.reactionPickerTriggerIcon
|
|
103
|
+
reactionPickerTriggerIcon = props.reactionPickerTriggerIcon,
|
|
104
|
+
useButtonAlignmentStyling = props.useButtonAlignmentStyling;
|
|
104
105
|
var _useState = (0, _react.useState)(null),
|
|
105
106
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
106
107
|
triggerRef = _useState2[0],
|
|
@@ -256,7 +257,8 @@ var ReactionPicker = exports.ReactionPicker = /*#__PURE__*/_react.default.memo(f
|
|
|
256
257
|
showAddReactionText: showAddReactionText,
|
|
257
258
|
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
|
|
258
259
|
showRoundTrigger: showRoundTrigger,
|
|
259
|
-
reactionPickerTriggerIcon: reactionPickerTriggerIcon
|
|
260
|
+
reactionPickerTriggerIcon: reactionPickerTriggerIcon,
|
|
261
|
+
useButtonAlignmentStyling: useButtonAlignmentStyling
|
|
260
262
|
})
|
|
261
263
|
);
|
|
262
264
|
}), settings.isOpen && (0, _react2.jsx)(PopperWrapper, {
|
|
@@ -73,7 +73,9 @@ var ReactionSummaryButton = exports.ReactionSummaryButton = /*#__PURE__*/(0, _re
|
|
|
73
73
|
_ref$subtleReactionsS = _ref.subtleReactionsSummaryAndPicker,
|
|
74
74
|
subtleReactionsSummaryAndPicker = _ref$subtleReactionsS === void 0 ? false : _ref$subtleReactionsS,
|
|
75
75
|
_ref$useCompactStyles = _ref.useCompactStyles,
|
|
76
|
-
useCompactStyles = _ref$useCompactStyles === void 0 ? false : _ref$useCompactStyles
|
|
76
|
+
useCompactStyles = _ref$useCompactStyles === void 0 ? false : _ref$useCompactStyles,
|
|
77
|
+
_ref$useButtonAlignme = _ref.useButtonAlignmentStyling,
|
|
78
|
+
useButtonAlignmentStyling = _ref$useButtonAlignme === void 0 ? false : _ref$useButtonAlignme;
|
|
77
79
|
var intl = (0, _reactIntlNext.useIntl)();
|
|
78
80
|
|
|
79
81
|
// Helper function to sort reactions by count and return top N
|
|
@@ -122,6 +124,7 @@ var ReactionSummaryButton = exports.ReactionSummaryButton = /*#__PURE__*/(0, _re
|
|
|
122
124
|
}));
|
|
123
125
|
})), /*#__PURE__*/_react.default.createElement(_Counter.Counter, {
|
|
124
126
|
value: totalReactionsCount,
|
|
125
|
-
useDarkerFont: useCompactStyles
|
|
127
|
+
useDarkerFont: useCompactStyles || useButtonAlignmentStyling,
|
|
128
|
+
useUpdatedStyles: !useCompactStyles && useButtonAlignmentStyling
|
|
126
129
|
})));
|
|
127
130
|
});
|
|
@@ -53,7 +53,8 @@ var ReactionSummaryView = exports.ReactionSummaryView = function ReactionSummary
|
|
|
53
53
|
onSelection = _ref.onSelection,
|
|
54
54
|
tooltipContent = _ref.tooltipContent,
|
|
55
55
|
reactionPickerTriggerIcon = _ref.reactionPickerTriggerIcon,
|
|
56
|
-
onOpen = _ref.onOpen
|
|
56
|
+
onOpen = _ref.onOpen,
|
|
57
|
+
useButtonAlignmentStyling = _ref.useButtonAlignmentStyling;
|
|
57
58
|
var _useState = (0, _react.useState)(false),
|
|
58
59
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
59
60
|
isSummaryPopupOpen = _useState2[0],
|
|
@@ -106,7 +107,8 @@ var ReactionSummaryView = exports.ReactionSummaryView = function ReactionSummary
|
|
|
106
107
|
onClick: handleSummaryClick,
|
|
107
108
|
showOpaqueBackground: showOpaqueBackground,
|
|
108
109
|
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
|
|
109
|
-
useCompactStyles: allowSelectFromSummaryView
|
|
110
|
+
useCompactStyles: allowSelectFromSummaryView,
|
|
111
|
+
useButtonAlignmentStyling: useButtonAlignmentStyling
|
|
110
112
|
}));
|
|
111
113
|
}
|
|
112
114
|
});
|
|
@@ -163,7 +163,9 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
|
|
|
163
163
|
reactionPickerTriggerToolipContent = _ref.reactionPickerTriggerToolipContent,
|
|
164
164
|
reactionPickerTriggerIcon = _ref.reactionPickerTriggerIcon,
|
|
165
165
|
_ref$allowSelectFromS = _ref.allowSelectFromSummaryView,
|
|
166
|
-
allowSelectFromSummaryView = _ref$allowSelectFromS === void 0 ? false : _ref$allowSelectFromS
|
|
166
|
+
allowSelectFromSummaryView = _ref$allowSelectFromS === void 0 ? false : _ref$allowSelectFromS,
|
|
167
|
+
_ref$useButtonAlignme = _ref.useButtonAlignmentStyling,
|
|
168
|
+
useButtonAlignmentStyling = _ref$useButtonAlignme === void 0 ? false : _ref$useButtonAlignme;
|
|
167
169
|
var _useState = (0, _react.useState)(),
|
|
168
170
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
169
171
|
selectedEmojiId = _useState2[0],
|
|
@@ -343,7 +345,8 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
|
|
|
343
345
|
reactionPickerTriggerIcon: reactionPickerTriggerIcon,
|
|
344
346
|
tooltipContent: getTooltip(status, errorMessage, reactionPickerTriggerToolipContent),
|
|
345
347
|
emojiPickerSize: emojiPickerSize,
|
|
346
|
-
onOpen: handlePickerOpen
|
|
348
|
+
onOpen: handlePickerOpen,
|
|
349
|
+
useButtonAlignmentStyling: useButtonAlignmentStyling
|
|
347
350
|
})) : memorizedReactions.map(function (reaction) {
|
|
348
351
|
return (0, _react2.jsx)(_Reaction.Reaction, {
|
|
349
352
|
key: reaction.emojiId,
|
|
@@ -380,7 +383,8 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
|
|
|
380
383
|
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
|
|
381
384
|
showRoundTrigger: showRoundTrigger,
|
|
382
385
|
reactionPickerTriggerIcon: reactionPickerTriggerIcon,
|
|
383
|
-
reactionPickerAdditionalStyle: reactionPickerAdditionalStyle
|
|
386
|
+
reactionPickerAdditionalStyle: reactionPickerAdditionalStyle,
|
|
387
|
+
useButtonAlignmentStyling: useButtonAlignmentStyling
|
|
384
388
|
}), (0, _react2.jsx)(_modalDialog.ModalTransition, null, !!selectedEmojiId && (0, _react2.jsx)(_segment.default, {
|
|
385
389
|
name: "reactions-dialog"
|
|
386
390
|
}, (0, _react2.jsx)(_ReactionDialog.ReactionsDialog, {
|
|
@@ -95,6 +95,9 @@ var addReactionMessageStyles = (0, _primitives.xcss)({
|
|
|
95
95
|
color: 'color.text.subtle',
|
|
96
96
|
marginLeft: 'space.050'
|
|
97
97
|
});
|
|
98
|
+
var addReactionMarginStyles = (0, _primitives.xcss)({
|
|
99
|
+
marginTop: 'space.025'
|
|
100
|
+
});
|
|
98
101
|
|
|
99
102
|
/**
|
|
100
103
|
* Render an emoji button to open the reactions select picker
|
|
@@ -118,7 +121,8 @@ var Trigger = exports.Trigger = /*#__PURE__*/_react.default.forwardRef(function
|
|
|
118
121
|
_props$showRoundTrigg = props.showRoundTrigger,
|
|
119
122
|
showRoundTrigger = _props$showRoundTrigg === void 0 ? false : _props$showRoundTrigg,
|
|
120
123
|
selectionStyle = props.selectionStyle,
|
|
121
|
-
reactionPickerTriggerIcon = props.reactionPickerTriggerIcon
|
|
124
|
+
reactionPickerTriggerIcon = props.reactionPickerTriggerIcon,
|
|
125
|
+
useButtonAlignmentStyling = props.useButtonAlignmentStyling;
|
|
122
126
|
var handleMouseDown = function handleMouseDown(e, analyticsEvent) {
|
|
123
127
|
if (onClick && !disabled) {
|
|
124
128
|
onClick(e, analyticsEvent);
|
|
@@ -143,6 +147,6 @@ var Trigger = exports.Trigger = /*#__PURE__*/_react.default.forwardRef(function
|
|
|
143
147
|
LEGACY_size: "small",
|
|
144
148
|
label: "Add reaction"
|
|
145
149
|
}), showAddReactionText && (0, _react2.jsx)(_primitives.Box, {
|
|
146
|
-
xcss: addReactionMessageStyles
|
|
150
|
+
xcss: useButtonAlignmentStyling ? [addReactionMessageStyles, addReactionMarginStyles] : addReactionMessageStyles
|
|
147
151
|
}, formatMessage(i18n.addReaction))));
|
|
148
152
|
});
|
|
@@ -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.4";
|
|
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, darkerFontStyle } from './styles';
|
|
12
|
+
import { containerStyle, counterLabelStyle, countStyle, highlightStyle, darkerFontStyle, updatedStyles } from './styles';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Test id for component top level div
|
|
@@ -35,7 +35,8 @@ export const Counter = ({
|
|
|
35
35
|
className,
|
|
36
36
|
value,
|
|
37
37
|
animationDuration = 'medium',
|
|
38
|
-
useDarkerFont
|
|
38
|
+
useDarkerFont,
|
|
39
|
+
useUpdatedStyles
|
|
39
40
|
}) => {
|
|
40
41
|
const getLabel = value => {
|
|
41
42
|
// Check if reached limit
|
|
@@ -55,13 +56,15 @@ export const Counter = ({
|
|
|
55
56
|
const isIncreasing = useMemo(() => {
|
|
56
57
|
return lastValue.current ? lastValue.current < value : false;
|
|
57
58
|
}, [value]);
|
|
59
|
+
const fontStyles = useDarkerFont ? [darkerFontStyle] : [];
|
|
60
|
+
const additionalStyles = useUpdatedStyles ? [updatedStyles] : [];
|
|
58
61
|
return jsx("div", {
|
|
59
62
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
60
63
|
className: className,
|
|
61
64
|
"data-testid": RENDER_COMPONENT_WRAPPER
|
|
62
65
|
// 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
66
|
,
|
|
64
|
-
css:
|
|
67
|
+
css: [countStyle, ...fontStyles, ...additionalStyles]
|
|
65
68
|
}, jsx(ExitingPersistence, null, jsx(SlideIn, {
|
|
66
69
|
enterFrom: isIncreasing ? 'top' : 'bottom',
|
|
67
70
|
exitTo: isIncreasing ? 'top' : 'bottom',
|
|
@@ -35,4 +35,9 @@ export const counterLabelStyle = css({
|
|
|
35
35
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
36
36
|
export const darkerFontStyle = css({
|
|
37
37
|
color: "var(--ds-text-subtle, #44546F)"
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
41
|
+
export const updatedStyles = css({
|
|
42
|
+
marginTop: "var(--ds-space-050, 4px)"
|
|
38
43
|
});
|
|
@@ -81,7 +81,8 @@ export const ReactionPicker = /*#__PURE__*/React.memo(props => {
|
|
|
81
81
|
showAddReactionText = false,
|
|
82
82
|
showRoundTrigger = false,
|
|
83
83
|
reactionPickerAdditionalStyle = undefined,
|
|
84
|
-
reactionPickerTriggerIcon
|
|
84
|
+
reactionPickerTriggerIcon,
|
|
85
|
+
useButtonAlignmentStyling
|
|
85
86
|
} = props;
|
|
86
87
|
const [triggerRef, setTriggerRef] = useState(null);
|
|
87
88
|
|
|
@@ -228,7 +229,8 @@ export const ReactionPicker = /*#__PURE__*/React.memo(props => {
|
|
|
228
229
|
showAddReactionText: showAddReactionText,
|
|
229
230
|
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
|
|
230
231
|
showRoundTrigger: showRoundTrigger,
|
|
231
|
-
reactionPickerTriggerIcon: reactionPickerTriggerIcon
|
|
232
|
+
reactionPickerTriggerIcon: reactionPickerTriggerIcon,
|
|
233
|
+
useButtonAlignmentStyling: useButtonAlignmentStyling
|
|
232
234
|
})), settings.isOpen && jsx(PopperWrapper, {
|
|
233
235
|
settings: settings
|
|
234
236
|
}, settings.showFullPicker ? jsx(EmojiPicker, {
|
|
@@ -57,7 +57,8 @@ export const ReactionSummaryButton = /*#__PURE__*/forwardRef(({
|
|
|
57
57
|
onClick,
|
|
58
58
|
showOpaqueBackground = false,
|
|
59
59
|
subtleReactionsSummaryAndPicker = false,
|
|
60
|
-
useCompactStyles = false
|
|
60
|
+
useCompactStyles = false,
|
|
61
|
+
useButtonAlignmentStyling = false
|
|
61
62
|
}, ref) => {
|
|
62
63
|
const intl = useIntl();
|
|
63
64
|
|
|
@@ -101,6 +102,7 @@ export const ReactionSummaryButton = /*#__PURE__*/forwardRef(({
|
|
|
101
102
|
fitToHeight: useCompactStyles ? 12 : 16
|
|
102
103
|
})))), /*#__PURE__*/React.createElement(Counter, {
|
|
103
104
|
value: totalReactionsCount,
|
|
104
|
-
useDarkerFont: useCompactStyles
|
|
105
|
+
useDarkerFont: useCompactStyles || useButtonAlignmentStyling,
|
|
106
|
+
useUpdatedStyles: !useCompactStyles && useButtonAlignmentStyling
|
|
105
107
|
})));
|
|
106
108
|
});
|
|
@@ -35,7 +35,8 @@ export const ReactionSummaryView = ({
|
|
|
35
35
|
onSelection,
|
|
36
36
|
tooltipContent,
|
|
37
37
|
reactionPickerTriggerIcon,
|
|
38
|
-
onOpen
|
|
38
|
+
onOpen,
|
|
39
|
+
useButtonAlignmentStyling
|
|
39
40
|
}) => {
|
|
40
41
|
const [isSummaryPopupOpen, setSummaryPopupOpen] = useState(false);
|
|
41
42
|
const handlePopupClose = useCallback(() => setSummaryPopupOpen(false), []);
|
|
@@ -77,7 +78,8 @@ export const ReactionSummaryView = ({
|
|
|
77
78
|
onClick: handleSummaryClick,
|
|
78
79
|
showOpaqueBackground: showOpaqueBackground,
|
|
79
80
|
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
|
|
80
|
-
useCompactStyles: allowSelectFromSummaryView
|
|
81
|
+
useCompactStyles: allowSelectFromSummaryView,
|
|
82
|
+
useButtonAlignmentStyling: useButtonAlignmentStyling
|
|
81
83
|
}))
|
|
82
84
|
});
|
|
83
85
|
};
|
|
@@ -125,7 +125,8 @@ export const Reactions = /*#__PURE__*/React.memo(({
|
|
|
125
125
|
showSubtleDefaultReactions,
|
|
126
126
|
reactionPickerTriggerToolipContent,
|
|
127
127
|
reactionPickerTriggerIcon,
|
|
128
|
-
allowSelectFromSummaryView = false
|
|
128
|
+
allowSelectFromSummaryView = false,
|
|
129
|
+
useButtonAlignmentStyling = false
|
|
129
130
|
}) => {
|
|
130
131
|
const [selectedEmojiId, setSelectedEmojiId] = useState();
|
|
131
132
|
const {
|
|
@@ -292,7 +293,8 @@ export const Reactions = /*#__PURE__*/React.memo(({
|
|
|
292
293
|
reactionPickerTriggerIcon: reactionPickerTriggerIcon,
|
|
293
294
|
tooltipContent: getTooltip(status, errorMessage, reactionPickerTriggerToolipContent),
|
|
294
295
|
emojiPickerSize: emojiPickerSize,
|
|
295
|
-
onOpen: handlePickerOpen
|
|
296
|
+
onOpen: handlePickerOpen,
|
|
297
|
+
useButtonAlignmentStyling: useButtonAlignmentStyling
|
|
296
298
|
})) : memorizedReactions.map(reaction => jsx(Reaction, {
|
|
297
299
|
key: reaction.emojiId,
|
|
298
300
|
reaction: reaction,
|
|
@@ -327,7 +329,8 @@ export const Reactions = /*#__PURE__*/React.memo(({
|
|
|
327
329
|
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
|
|
328
330
|
showRoundTrigger: showRoundTrigger,
|
|
329
331
|
reactionPickerTriggerIcon: reactionPickerTriggerIcon,
|
|
330
|
-
reactionPickerAdditionalStyle: reactionPickerAdditionalStyle
|
|
332
|
+
reactionPickerAdditionalStyle: reactionPickerAdditionalStyle,
|
|
333
|
+
useButtonAlignmentStyling: useButtonAlignmentStyling
|
|
331
334
|
}), jsx(ModalTransition, null, !!selectedEmojiId && jsx(UFOSegment, {
|
|
332
335
|
name: "reactions-dialog"
|
|
333
336
|
}, jsx(ReactionsDialog, {
|
|
@@ -87,6 +87,9 @@ const addReactionMessageStyles = xcss({
|
|
|
87
87
|
color: 'color.text.subtle',
|
|
88
88
|
marginLeft: 'space.050'
|
|
89
89
|
});
|
|
90
|
+
const addReactionMarginStyles = xcss({
|
|
91
|
+
marginTop: 'space.025'
|
|
92
|
+
});
|
|
90
93
|
|
|
91
94
|
/**
|
|
92
95
|
* Render an emoji button to open the reactions select picker
|
|
@@ -106,7 +109,8 @@ export const Trigger = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
106
109
|
subtleReactionsSummaryAndPicker = false,
|
|
107
110
|
showRoundTrigger = false,
|
|
108
111
|
selectionStyle,
|
|
109
|
-
reactionPickerTriggerIcon
|
|
112
|
+
reactionPickerTriggerIcon,
|
|
113
|
+
useButtonAlignmentStyling
|
|
110
114
|
} = props;
|
|
111
115
|
const handleMouseDown = (e, analyticsEvent) => {
|
|
112
116
|
if (onClick && !disabled) {
|
|
@@ -132,6 +136,6 @@ export const Trigger = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
132
136
|
LEGACY_size: "small",
|
|
133
137
|
label: "Add reaction"
|
|
134
138
|
}), showAddReactionText && jsx(Box, {
|
|
135
|
-
xcss: addReactionMessageStyles
|
|
139
|
+
xcss: useButtonAlignmentStyling ? [addReactionMessageStyles, addReactionMarginStyles] : addReactionMessageStyles
|
|
136
140
|
}, formatMessage(i18n.addReaction))));
|
|
137
141
|
});
|
|
@@ -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.4";
|
|
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, darkerFontStyle } from './styles';
|
|
12
|
+
import { containerStyle, counterLabelStyle, countStyle, highlightStyle, darkerFontStyle, updatedStyles } from './styles';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Test id for component top level div
|
|
@@ -37,7 +37,8 @@ export var Counter = function Counter(_ref) {
|
|
|
37
37
|
value = _ref.value,
|
|
38
38
|
_ref$animationDuratio = _ref.animationDuration,
|
|
39
39
|
animationDuration = _ref$animationDuratio === void 0 ? 'medium' : _ref$animationDuratio,
|
|
40
|
-
useDarkerFont = _ref.useDarkerFont
|
|
40
|
+
useDarkerFont = _ref.useDarkerFont,
|
|
41
|
+
useUpdatedStyles = _ref.useUpdatedStyles;
|
|
41
42
|
var getLabel = function getLabel(value) {
|
|
42
43
|
// Check if reached limit
|
|
43
44
|
if (limit && overLimitLabel && value >= limit) {
|
|
@@ -56,13 +57,15 @@ export var Counter = function Counter(_ref) {
|
|
|
56
57
|
var isIncreasing = useMemo(function () {
|
|
57
58
|
return lastValue.current ? lastValue.current < value : false;
|
|
58
59
|
}, [value]);
|
|
60
|
+
var fontStyles = useDarkerFont ? [darkerFontStyle] : [];
|
|
61
|
+
var additionalStyles = useUpdatedStyles ? [updatedStyles] : [];
|
|
59
62
|
return jsx("div", {
|
|
60
63
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
61
64
|
className: className,
|
|
62
65
|
"data-testid": RENDER_COMPONENT_WRAPPER
|
|
63
66
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
64
67
|
,
|
|
65
|
-
css:
|
|
68
|
+
css: [countStyle].concat(fontStyles, additionalStyles)
|
|
66
69
|
}, jsx(ExitingPersistence, null, jsx(SlideIn, {
|
|
67
70
|
enterFrom: isIncreasing ? 'top' : 'bottom',
|
|
68
71
|
exitTo: isIncreasing ? 'top' : 'bottom',
|
|
@@ -35,4 +35,9 @@ export var counterLabelStyle = css({
|
|
|
35
35
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
36
36
|
export var darkerFontStyle = css({
|
|
37
37
|
color: "var(--ds-text-subtle, #44546F)"
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
41
|
+
export var updatedStyles = css({
|
|
42
|
+
marginTop: "var(--ds-space-050, 4px)"
|
|
38
43
|
});
|
|
@@ -93,7 +93,8 @@ export var ReactionPicker = /*#__PURE__*/React.memo(function (props) {
|
|
|
93
93
|
showRoundTrigger = _props$showRoundTrigg === void 0 ? false : _props$showRoundTrigg,
|
|
94
94
|
_props$reactionPicker = props.reactionPickerAdditionalStyle,
|
|
95
95
|
reactionPickerAdditionalStyle = _props$reactionPicker === void 0 ? undefined : _props$reactionPicker,
|
|
96
|
-
reactionPickerTriggerIcon = props.reactionPickerTriggerIcon
|
|
96
|
+
reactionPickerTriggerIcon = props.reactionPickerTriggerIcon,
|
|
97
|
+
useButtonAlignmentStyling = props.useButtonAlignmentStyling;
|
|
97
98
|
var _useState = useState(null),
|
|
98
99
|
_useState2 = _slicedToArray(_useState, 2),
|
|
99
100
|
triggerRef = _useState2[0],
|
|
@@ -249,7 +250,8 @@ export var ReactionPicker = /*#__PURE__*/React.memo(function (props) {
|
|
|
249
250
|
showAddReactionText: showAddReactionText,
|
|
250
251
|
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
|
|
251
252
|
showRoundTrigger: showRoundTrigger,
|
|
252
|
-
reactionPickerTriggerIcon: reactionPickerTriggerIcon
|
|
253
|
+
reactionPickerTriggerIcon: reactionPickerTriggerIcon,
|
|
254
|
+
useButtonAlignmentStyling: useButtonAlignmentStyling
|
|
253
255
|
})
|
|
254
256
|
);
|
|
255
257
|
}), settings.isOpen && jsx(PopperWrapper, {
|
|
@@ -63,7 +63,9 @@ export var ReactionSummaryButton = /*#__PURE__*/forwardRef(function (_ref, ref)
|
|
|
63
63
|
_ref$subtleReactionsS = _ref.subtleReactionsSummaryAndPicker,
|
|
64
64
|
subtleReactionsSummaryAndPicker = _ref$subtleReactionsS === void 0 ? false : _ref$subtleReactionsS,
|
|
65
65
|
_ref$useCompactStyles = _ref.useCompactStyles,
|
|
66
|
-
useCompactStyles = _ref$useCompactStyles === void 0 ? false : _ref$useCompactStyles
|
|
66
|
+
useCompactStyles = _ref$useCompactStyles === void 0 ? false : _ref$useCompactStyles,
|
|
67
|
+
_ref$useButtonAlignme = _ref.useButtonAlignmentStyling,
|
|
68
|
+
useButtonAlignmentStyling = _ref$useButtonAlignme === void 0 ? false : _ref$useButtonAlignme;
|
|
67
69
|
var intl = useIntl();
|
|
68
70
|
|
|
69
71
|
// Helper function to sort reactions by count and return top N
|
|
@@ -112,6 +114,7 @@ export var ReactionSummaryButton = /*#__PURE__*/forwardRef(function (_ref, ref)
|
|
|
112
114
|
}));
|
|
113
115
|
})), /*#__PURE__*/React.createElement(Counter, {
|
|
114
116
|
value: totalReactionsCount,
|
|
115
|
-
useDarkerFont: useCompactStyles
|
|
117
|
+
useDarkerFont: useCompactStyles || useButtonAlignmentStyling,
|
|
118
|
+
useUpdatedStyles: !useCompactStyles && useButtonAlignmentStyling
|
|
116
119
|
})));
|
|
117
120
|
});
|
|
@@ -43,7 +43,8 @@ export var ReactionSummaryView = function ReactionSummaryView(_ref) {
|
|
|
43
43
|
onSelection = _ref.onSelection,
|
|
44
44
|
tooltipContent = _ref.tooltipContent,
|
|
45
45
|
reactionPickerTriggerIcon = _ref.reactionPickerTriggerIcon,
|
|
46
|
-
onOpen = _ref.onOpen
|
|
46
|
+
onOpen = _ref.onOpen,
|
|
47
|
+
useButtonAlignmentStyling = _ref.useButtonAlignmentStyling;
|
|
47
48
|
var _useState = useState(false),
|
|
48
49
|
_useState2 = _slicedToArray(_useState, 2),
|
|
49
50
|
isSummaryPopupOpen = _useState2[0],
|
|
@@ -96,7 +97,8 @@ export var ReactionSummaryView = function ReactionSummaryView(_ref) {
|
|
|
96
97
|
onClick: handleSummaryClick,
|
|
97
98
|
showOpaqueBackground: showOpaqueBackground,
|
|
98
99
|
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
|
|
99
|
-
useCompactStyles: allowSelectFromSummaryView
|
|
100
|
+
useCompactStyles: allowSelectFromSummaryView,
|
|
101
|
+
useButtonAlignmentStyling: useButtonAlignmentStyling
|
|
100
102
|
}));
|
|
101
103
|
}
|
|
102
104
|
});
|
|
@@ -149,7 +149,9 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
149
149
|
reactionPickerTriggerToolipContent = _ref.reactionPickerTriggerToolipContent,
|
|
150
150
|
reactionPickerTriggerIcon = _ref.reactionPickerTriggerIcon,
|
|
151
151
|
_ref$allowSelectFromS = _ref.allowSelectFromSummaryView,
|
|
152
|
-
allowSelectFromSummaryView = _ref$allowSelectFromS === void 0 ? false : _ref$allowSelectFromS
|
|
152
|
+
allowSelectFromSummaryView = _ref$allowSelectFromS === void 0 ? false : _ref$allowSelectFromS,
|
|
153
|
+
_ref$useButtonAlignme = _ref.useButtonAlignmentStyling,
|
|
154
|
+
useButtonAlignmentStyling = _ref$useButtonAlignme === void 0 ? false : _ref$useButtonAlignme;
|
|
153
155
|
var _useState = useState(),
|
|
154
156
|
_useState2 = _slicedToArray(_useState, 2),
|
|
155
157
|
selectedEmojiId = _useState2[0],
|
|
@@ -329,7 +331,8 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
329
331
|
reactionPickerTriggerIcon: reactionPickerTriggerIcon,
|
|
330
332
|
tooltipContent: getTooltip(status, errorMessage, reactionPickerTriggerToolipContent),
|
|
331
333
|
emojiPickerSize: emojiPickerSize,
|
|
332
|
-
onOpen: handlePickerOpen
|
|
334
|
+
onOpen: handlePickerOpen,
|
|
335
|
+
useButtonAlignmentStyling: useButtonAlignmentStyling
|
|
333
336
|
})) : memorizedReactions.map(function (reaction) {
|
|
334
337
|
return jsx(Reaction, {
|
|
335
338
|
key: reaction.emojiId,
|
|
@@ -366,7 +369,8 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
366
369
|
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
|
|
367
370
|
showRoundTrigger: showRoundTrigger,
|
|
368
371
|
reactionPickerTriggerIcon: reactionPickerTriggerIcon,
|
|
369
|
-
reactionPickerAdditionalStyle: reactionPickerAdditionalStyle
|
|
372
|
+
reactionPickerAdditionalStyle: reactionPickerAdditionalStyle,
|
|
373
|
+
useButtonAlignmentStyling: useButtonAlignmentStyling
|
|
370
374
|
}), jsx(ModalTransition, null, !!selectedEmojiId && jsx(UFOSegment, {
|
|
371
375
|
name: "reactions-dialog"
|
|
372
376
|
}, jsx(ReactionsDialog, {
|
|
@@ -87,6 +87,9 @@ var addReactionMessageStyles = xcss({
|
|
|
87
87
|
color: 'color.text.subtle',
|
|
88
88
|
marginLeft: 'space.050'
|
|
89
89
|
});
|
|
90
|
+
var addReactionMarginStyles = xcss({
|
|
91
|
+
marginTop: 'space.025'
|
|
92
|
+
});
|
|
90
93
|
|
|
91
94
|
/**
|
|
92
95
|
* Render an emoji button to open the reactions select picker
|
|
@@ -110,7 +113,8 @@ export var Trigger = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
110
113
|
_props$showRoundTrigg = props.showRoundTrigger,
|
|
111
114
|
showRoundTrigger = _props$showRoundTrigg === void 0 ? false : _props$showRoundTrigg,
|
|
112
115
|
selectionStyle = props.selectionStyle,
|
|
113
|
-
reactionPickerTriggerIcon = props.reactionPickerTriggerIcon
|
|
116
|
+
reactionPickerTriggerIcon = props.reactionPickerTriggerIcon,
|
|
117
|
+
useButtonAlignmentStyling = props.useButtonAlignmentStyling;
|
|
114
118
|
var handleMouseDown = function handleMouseDown(e, analyticsEvent) {
|
|
115
119
|
if (onClick && !disabled) {
|
|
116
120
|
onClick(e, analyticsEvent);
|
|
@@ -135,6 +139,6 @@ export var Trigger = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
135
139
|
LEGACY_size: "small",
|
|
136
140
|
label: "Add reaction"
|
|
137
141
|
}), showAddReactionText && jsx(Box, {
|
|
138
|
-
xcss: addReactionMessageStyles
|
|
142
|
+
xcss: useButtonAlignmentStyling ? [addReactionMessageStyles, addReactionMarginStyles] : addReactionMessageStyles
|
|
139
143
|
}, formatMessage(i18n.addReaction))));
|
|
140
144
|
});
|
|
@@ -41,8 +41,12 @@ export interface CounterProps {
|
|
|
41
41
|
* Optional prop to use a darker text color for the counter
|
|
42
42
|
*/
|
|
43
43
|
useDarkerFont?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Optional prop to show updated styling for counter
|
|
46
|
+
*/
|
|
47
|
+
useUpdatedStyles?: boolean;
|
|
44
48
|
}
|
|
45
49
|
/**
|
|
46
50
|
* Display reaction count next to the emoji button
|
|
47
51
|
*/
|
|
48
|
-
export declare const Counter: ({ highlight, limit, overLimitLabel, className, value, animationDuration, useDarkerFont, }: CounterProps) => jsx.JSX.Element;
|
|
52
|
+
export declare const Counter: ({ highlight, limit, overLimitLabel, className, value, animationDuration, useDarkerFont, useUpdatedStyles, }: CounterProps) => jsx.JSX.Element;
|
|
@@ -3,3 +3,4 @@ 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
5
|
export declare const darkerFontStyle: import("@emotion/react").SerializedStyles;
|
|
6
|
+
export declare const updatedStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -81,6 +81,7 @@ export interface ReactionPickerProps extends Pick<SelectorProps, 'pickerQuickRea
|
|
|
81
81
|
* Optional prop for controlling icon inside Trigger
|
|
82
82
|
*/
|
|
83
83
|
reactionPickerTriggerIcon?: React.ReactNode;
|
|
84
|
+
useButtonAlignmentStyling?: boolean;
|
|
84
85
|
}
|
|
85
86
|
/**
|
|
86
87
|
* Picker component for adding reactions
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type ReactionsProps } from '../Reactions/Reactions';
|
|
3
|
-
interface ReactionSummaryButtonProps extends Pick<ReactionsProps, 'emojiProvider' | 'reactions'> {
|
|
3
|
+
interface ReactionSummaryButtonProps extends Pick<ReactionsProps, 'emojiProvider' | 'reactions' | 'useButtonAlignmentStyling'> {
|
|
4
4
|
/**
|
|
5
5
|
* event handler when the summary button is clicked to view all reactions
|
|
6
6
|
*/
|
|
@@ -7,7 +7,7 @@ import { type TriggerProps } from '../Trigger';
|
|
|
7
7
|
* Test id for the Reactions summary view popup
|
|
8
8
|
*/
|
|
9
9
|
export declare const RENDER_SUMMARY_VIEW_POPUP_TESTID = "render-summary-view-popup";
|
|
10
|
-
interface ReactionSummaryViewProps extends Pick<ReactionsProps, 'emojiProvider' | 'reactions' | 'flash' | 'particleEffectByEmoji' | 'allowUserDialog' | 'allowSelectFromSummaryView' | 'emojiPickerSize'>, Pick<TriggerProps, 'tooltipContent' | 'reactionPickerTriggerIcon' | 'disabled'> {
|
|
10
|
+
interface ReactionSummaryViewProps extends Pick<ReactionsProps, 'emojiProvider' | 'reactions' | 'flash' | 'particleEffectByEmoji' | 'allowUserDialog' | 'allowSelectFromSummaryView' | 'emojiPickerSize' | 'useButtonAlignmentStyling'>, Pick<TriggerProps, 'tooltipContent' | 'reactionPickerTriggerIcon' | 'disabled'> {
|
|
11
11
|
/**
|
|
12
12
|
* Optional prop to change the placement of the summary popup reaction list
|
|
13
13
|
*/
|
|
@@ -54,5 +54,5 @@ interface ReactionSummaryViewProps extends Pick<ReactionsProps, 'emojiProvider'
|
|
|
54
54
|
*/
|
|
55
55
|
onOpen?: () => void;
|
|
56
56
|
}
|
|
57
|
-
export declare const ReactionSummaryView: ({ emojiProvider, reactions, flash, particleEffectByEmoji, placement, onReactionClick, onReactionFocused, onReactionMouseEnter, showOpaqueBackground, subtleReactionsSummaryAndPicker, allowUserDialog, handleOpenReactionsDialog, isViewOnly, allowSelectFromSummaryView, disabled, emojiPickerSize, onSelection, tooltipContent, reactionPickerTriggerIcon, onOpen, }: ReactionSummaryViewProps) => React.JSX.Element;
|
|
57
|
+
export declare const ReactionSummaryView: ({ emojiProvider, reactions, flash, particleEffectByEmoji, placement, onReactionClick, onReactionFocused, onReactionMouseEnter, showOpaqueBackground, subtleReactionsSummaryAndPicker, allowUserDialog, handleOpenReactionsDialog, isViewOnly, allowSelectFromSummaryView, disabled, emojiPickerSize, onSelection, tooltipContent, reactionPickerTriggerIcon, onOpen, useButtonAlignmentStyling, }: ReactionSummaryViewProps) => React.JSX.Element;
|
|
58
58
|
export {};
|
|
@@ -106,6 +106,10 @@ export interface ReactionsProps extends Pick<ReactionPickerProps, 'allowAllEmoji
|
|
|
106
106
|
* Optional prop to change the placement of the summary popup reaction list
|
|
107
107
|
*/
|
|
108
108
|
summaryViewPlacement?: Placement;
|
|
109
|
+
/**
|
|
110
|
+
* Optional prop to change the style of the summary view
|
|
111
|
+
*/
|
|
112
|
+
useButtonAlignmentStyling?: boolean;
|
|
109
113
|
/**
|
|
110
114
|
* Optional prop for using an opaque button background instead of a transparent background
|
|
111
115
|
*/
|
|
@@ -175,4 +179,4 @@ export declare function getTooltip(status: ReactionStatus, errorMessage?: string
|
|
|
175
179
|
/**
|
|
176
180
|
* Renders list of reactions
|
|
177
181
|
*/
|
|
178
|
-
export declare const Reactions: React.MemoExoticComponent<({ flash, particleEffectByEmoji, status, errorMessage, loadReaction, quickReactionEmojis, pickerQuickReactionEmojiIds, getReactionDetails, onSelection, reactions, emojiProvider, allowAllEmojis, onReactionClick, allowUserDialog, onDialogOpenCallback, onDialogCloseCallback, onDialogSelectReactionCallback, onDialogPageChangeCallback, emojiPickerSize, miniMode, summaryViewEnabled, summaryViewThreshold, summaryViewPlacement, showOpaqueBackground, subtleReactionsSummaryAndPicker, showAddReactionText, hideDefaultReactions, ProfileCardWrapper, onlyRenderPicker, showRoundTrigger, isViewOnly, reactionPickerAdditionalStyle, noWrap, noRelativeContainer, showSubtleDefaultReactions, reactionPickerTriggerToolipContent, reactionPickerTriggerIcon, allowSelectFromSummaryView, }: ReactionsProps) => jsx.JSX.Element>;
|
|
182
|
+
export declare const Reactions: React.MemoExoticComponent<({ flash, particleEffectByEmoji, status, errorMessage, loadReaction, quickReactionEmojis, pickerQuickReactionEmojiIds, getReactionDetails, onSelection, reactions, emojiProvider, allowAllEmojis, onReactionClick, allowUserDialog, onDialogOpenCallback, onDialogCloseCallback, onDialogSelectReactionCallback, onDialogPageChangeCallback, emojiPickerSize, miniMode, summaryViewEnabled, summaryViewThreshold, summaryViewPlacement, showOpaqueBackground, subtleReactionsSummaryAndPicker, showAddReactionText, hideDefaultReactions, ProfileCardWrapper, onlyRenderPicker, showRoundTrigger, isViewOnly, reactionPickerAdditionalStyle, noWrap, noRelativeContainer, showSubtleDefaultReactions, reactionPickerTriggerToolipContent, reactionPickerTriggerIcon, allowSelectFromSummaryView, useButtonAlignmentStyling, }: ReactionsProps) => jsx.JSX.Element>;
|
|
@@ -41,8 +41,12 @@ export interface CounterProps {
|
|
|
41
41
|
* Optional prop to use a darker text color for the counter
|
|
42
42
|
*/
|
|
43
43
|
useDarkerFont?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Optional prop to show updated styling for counter
|
|
46
|
+
*/
|
|
47
|
+
useUpdatedStyles?: boolean;
|
|
44
48
|
}
|
|
45
49
|
/**
|
|
46
50
|
* Display reaction count next to the emoji button
|
|
47
51
|
*/
|
|
48
|
-
export declare const Counter: ({ highlight, limit, overLimitLabel, className, value, animationDuration, useDarkerFont, }: CounterProps) => jsx.JSX.Element;
|
|
52
|
+
export declare const Counter: ({ highlight, limit, overLimitLabel, className, value, animationDuration, useDarkerFont, useUpdatedStyles, }: CounterProps) => jsx.JSX.Element;
|
|
@@ -3,3 +3,4 @@ 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
5
|
export declare const darkerFontStyle: import("@emotion/react").SerializedStyles;
|
|
6
|
+
export declare const updatedStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -81,6 +81,7 @@ export interface ReactionPickerProps extends Pick<SelectorProps, 'pickerQuickRea
|
|
|
81
81
|
* Optional prop for controlling icon inside Trigger
|
|
82
82
|
*/
|
|
83
83
|
reactionPickerTriggerIcon?: React.ReactNode;
|
|
84
|
+
useButtonAlignmentStyling?: boolean;
|
|
84
85
|
}
|
|
85
86
|
/**
|
|
86
87
|
* Picker component for adding reactions
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type ReactionsProps } from '../Reactions/Reactions';
|
|
3
|
-
interface ReactionSummaryButtonProps extends Pick<ReactionsProps, 'emojiProvider' | 'reactions'> {
|
|
3
|
+
interface ReactionSummaryButtonProps extends Pick<ReactionsProps, 'emojiProvider' | 'reactions' | 'useButtonAlignmentStyling'> {
|
|
4
4
|
/**
|
|
5
5
|
* event handler when the summary button is clicked to view all reactions
|
|
6
6
|
*/
|
|
@@ -7,7 +7,7 @@ import { type TriggerProps } from '../Trigger';
|
|
|
7
7
|
* Test id for the Reactions summary view popup
|
|
8
8
|
*/
|
|
9
9
|
export declare const RENDER_SUMMARY_VIEW_POPUP_TESTID = "render-summary-view-popup";
|
|
10
|
-
interface ReactionSummaryViewProps extends Pick<ReactionsProps, 'emojiProvider' | 'reactions' | 'flash' | 'particleEffectByEmoji' | 'allowUserDialog' | 'allowSelectFromSummaryView' | 'emojiPickerSize'>, Pick<TriggerProps, 'tooltipContent' | 'reactionPickerTriggerIcon' | 'disabled'> {
|
|
10
|
+
interface ReactionSummaryViewProps extends Pick<ReactionsProps, 'emojiProvider' | 'reactions' | 'flash' | 'particleEffectByEmoji' | 'allowUserDialog' | 'allowSelectFromSummaryView' | 'emojiPickerSize' | 'useButtonAlignmentStyling'>, Pick<TriggerProps, 'tooltipContent' | 'reactionPickerTriggerIcon' | 'disabled'> {
|
|
11
11
|
/**
|
|
12
12
|
* Optional prop to change the placement of the summary popup reaction list
|
|
13
13
|
*/
|
|
@@ -54,5 +54,5 @@ interface ReactionSummaryViewProps extends Pick<ReactionsProps, 'emojiProvider'
|
|
|
54
54
|
*/
|
|
55
55
|
onOpen?: () => void;
|
|
56
56
|
}
|
|
57
|
-
export declare const ReactionSummaryView: ({ emojiProvider, reactions, flash, particleEffectByEmoji, placement, onReactionClick, onReactionFocused, onReactionMouseEnter, showOpaqueBackground, subtleReactionsSummaryAndPicker, allowUserDialog, handleOpenReactionsDialog, isViewOnly, allowSelectFromSummaryView, disabled, emojiPickerSize, onSelection, tooltipContent, reactionPickerTriggerIcon, onOpen, }: ReactionSummaryViewProps) => React.JSX.Element;
|
|
57
|
+
export declare const ReactionSummaryView: ({ emojiProvider, reactions, flash, particleEffectByEmoji, placement, onReactionClick, onReactionFocused, onReactionMouseEnter, showOpaqueBackground, subtleReactionsSummaryAndPicker, allowUserDialog, handleOpenReactionsDialog, isViewOnly, allowSelectFromSummaryView, disabled, emojiPickerSize, onSelection, tooltipContent, reactionPickerTriggerIcon, onOpen, useButtonAlignmentStyling, }: ReactionSummaryViewProps) => React.JSX.Element;
|
|
58
58
|
export {};
|
|
@@ -106,6 +106,10 @@ export interface ReactionsProps extends Pick<ReactionPickerProps, 'allowAllEmoji
|
|
|
106
106
|
* Optional prop to change the placement of the summary popup reaction list
|
|
107
107
|
*/
|
|
108
108
|
summaryViewPlacement?: Placement;
|
|
109
|
+
/**
|
|
110
|
+
* Optional prop to change the style of the summary view
|
|
111
|
+
*/
|
|
112
|
+
useButtonAlignmentStyling?: boolean;
|
|
109
113
|
/**
|
|
110
114
|
* Optional prop for using an opaque button background instead of a transparent background
|
|
111
115
|
*/
|
|
@@ -175,4 +179,4 @@ export declare function getTooltip(status: ReactionStatus, errorMessage?: string
|
|
|
175
179
|
/**
|
|
176
180
|
* Renders list of reactions
|
|
177
181
|
*/
|
|
178
|
-
export declare const Reactions: React.MemoExoticComponent<({ flash, particleEffectByEmoji, status, errorMessage, loadReaction, quickReactionEmojis, pickerQuickReactionEmojiIds, getReactionDetails, onSelection, reactions, emojiProvider, allowAllEmojis, onReactionClick, allowUserDialog, onDialogOpenCallback, onDialogCloseCallback, onDialogSelectReactionCallback, onDialogPageChangeCallback, emojiPickerSize, miniMode, summaryViewEnabled, summaryViewThreshold, summaryViewPlacement, showOpaqueBackground, subtleReactionsSummaryAndPicker, showAddReactionText, hideDefaultReactions, ProfileCardWrapper, onlyRenderPicker, showRoundTrigger, isViewOnly, reactionPickerAdditionalStyle, noWrap, noRelativeContainer, showSubtleDefaultReactions, reactionPickerTriggerToolipContent, reactionPickerTriggerIcon, allowSelectFromSummaryView, }: ReactionsProps) => jsx.JSX.Element>;
|
|
182
|
+
export declare const Reactions: React.MemoExoticComponent<({ flash, particleEffectByEmoji, status, errorMessage, loadReaction, quickReactionEmojis, pickerQuickReactionEmojiIds, getReactionDetails, onSelection, reactions, emojiProvider, allowAllEmojis, onReactionClick, allowUserDialog, onDialogOpenCallback, onDialogCloseCallback, onDialogSelectReactionCallback, onDialogPageChangeCallback, emojiPickerSize, miniMode, summaryViewEnabled, summaryViewThreshold, summaryViewPlacement, showOpaqueBackground, subtleReactionsSummaryAndPicker, showAddReactionText, hideDefaultReactions, ProfileCardWrapper, onlyRenderPicker, showRoundTrigger, isViewOnly, reactionPickerAdditionalStyle, noWrap, noRelativeContainer, showSubtleDefaultReactions, reactionPickerTriggerToolipContent, reactionPickerTriggerIcon, allowSelectFromSummaryView, useButtonAlignmentStyling, }: ReactionsProps) => jsx.JSX.Element>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/reactions",
|
|
3
|
-
"version": "27.1.
|
|
3
|
+
"version": "27.1.4",
|
|
4
4
|
"description": "Reactions component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"@atlaskit/button": "^21.1.0",
|
|
40
40
|
"@atlaskit/emoji": "^68.0.0",
|
|
41
41
|
"@atlaskit/heading": "^5.1.0",
|
|
42
|
-
"@atlaskit/icon": "^
|
|
43
|
-
"@atlaskit/modal-dialog": "^13.
|
|
42
|
+
"@atlaskit/icon": "^25.0.0",
|
|
43
|
+
"@atlaskit/modal-dialog": "^13.1.0",
|
|
44
44
|
"@atlaskit/motion": "^5.1.0",
|
|
45
45
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
46
46
|
"@atlaskit/popper": "^7.0.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
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.5.0",
|
|
54
54
|
"@atlaskit/tooltip": "^20.0.0",
|
|
55
55
|
"@atlaskit/ufo": "^0.4.0",
|
|
56
56
|
"@atlaskit/util-service-support": "^6.3.0",
|