@atlaskit/reactions 30.0.8 → 31.0.0

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.
Files changed (41) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/cjs/analytics/index.js +1 -1
  3. package/dist/cjs/components/ReactionPicker.js +3 -1
  4. package/dist/cjs/components/ReactionSummaryButton.compiled.css +0 -1
  5. package/dist/cjs/components/ReactionSummaryButton.js +4 -8
  6. package/dist/cjs/components/ReactionSummaryView.js +10 -6
  7. package/dist/cjs/components/ReactionSummaryViewEmojiPicker.js +6 -4
  8. package/dist/cjs/components/Reactions.js +9 -6
  9. package/dist/cjs/components/Trigger.compiled.css +4 -0
  10. package/dist/cjs/components/Trigger.js +16 -6
  11. package/dist/es2019/analytics/index.js +1 -1
  12. package/dist/es2019/components/ReactionPicker.js +3 -1
  13. package/dist/es2019/components/ReactionSummaryButton.compiled.css +0 -1
  14. package/dist/es2019/components/ReactionSummaryButton.js +4 -7
  15. package/dist/es2019/components/ReactionSummaryView.js +11 -7
  16. package/dist/es2019/components/ReactionSummaryViewEmojiPicker.js +6 -4
  17. package/dist/es2019/components/Reactions.js +9 -6
  18. package/dist/es2019/components/Trigger.compiled.css +4 -0
  19. package/dist/es2019/components/Trigger.js +13 -5
  20. package/dist/esm/analytics/index.js +1 -1
  21. package/dist/esm/components/ReactionPicker.js +3 -1
  22. package/dist/esm/components/ReactionSummaryButton.compiled.css +0 -1
  23. package/dist/esm/components/ReactionSummaryButton.js +4 -8
  24. package/dist/esm/components/ReactionSummaryView.js +11 -7
  25. package/dist/esm/components/ReactionSummaryViewEmojiPicker.js +6 -4
  26. package/dist/esm/components/Reactions.js +9 -6
  27. package/dist/esm/components/Trigger.compiled.css +4 -0
  28. package/dist/esm/components/Trigger.js +15 -5
  29. package/dist/types/components/ReactionPicker.d.ts +4 -0
  30. package/dist/types/components/ReactionSummaryButton.d.ts +0 -4
  31. package/dist/types/components/ReactionSummaryView.d.ts +2 -2
  32. package/dist/types/components/ReactionSummaryViewEmojiPicker.d.ts +1 -1
  33. package/dist/types/components/Reactions.d.ts +6 -2
  34. package/dist/types/components/Trigger.d.ts +9 -0
  35. package/dist/types-ts4.5/components/ReactionPicker.d.ts +4 -0
  36. package/dist/types-ts4.5/components/ReactionSummaryButton.d.ts +0 -4
  37. package/dist/types-ts4.5/components/ReactionSummaryView.d.ts +2 -2
  38. package/dist/types-ts4.5/components/ReactionSummaryViewEmojiPicker.d.ts +1 -1
  39. package/dist/types-ts4.5/components/Reactions.d.ts +6 -2
  40. package/dist/types-ts4.5/components/Trigger.d.ts +9 -0
  41. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @atlaskit/reactions
2
2
 
3
+ ## 31.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#140004](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/140004)
8
+ [`45db426b36675`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/45db426b36675) -
9
+ [ux] Updated summary view tray to include reactions picker with new design as part of byline
10
+ reactions changes. Also cleaned up compact styles as it was no longer being used, as well as fixed
11
+ a prop not being spelled correctly.
12
+
3
13
  ## 30.0.8
4
14
 
5
15
  ### 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 = "30.0.8";
14
+ var packageVersion = "31.0.0";
15
15
  /**
16
16
  * TODO: move to utility package?
17
17
  * A random sampling function
@@ -75,6 +75,7 @@ var ReactionPicker = exports.ReactionPicker = /*#__PURE__*/_react.default.memo(f
75
75
  _props$showRoundTrigg = props.showRoundTrigger,
76
76
  showRoundTrigger = _props$showRoundTrigg === void 0 ? false : _props$showRoundTrigg,
77
77
  reactionPickerTriggerIcon = props.reactionPickerTriggerIcon,
78
+ reactionPickerTriggerText = props.reactionPickerTriggerText,
78
79
  reactionPickerPlacement = props.reactionPickerPlacement,
79
80
  reactionsPickerPreventOverflowOptions = props.reactionsPickerPreventOverflowOptions;
80
81
  var _useState = (0, _react.useState)(null),
@@ -247,7 +248,8 @@ var ReactionPicker = exports.ReactionPicker = /*#__PURE__*/_react.default.memo(f
247
248
  showAddReactionText: showAddReactionText,
248
249
  subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
249
250
  showRoundTrigger: showRoundTrigger,
250
- reactionPickerTriggerIcon: reactionPickerTriggerIcon
251
+ reactionPickerTriggerIcon: reactionPickerTriggerIcon,
252
+ reactionPickerTriggerText: reactionPickerTriggerText
251
253
  })
252
254
  );
253
255
  }), settings.isOpen && /*#__PURE__*/_react.default.createElement(PopperWrapper, {
@@ -1,7 +1,6 @@
1
1
  ._19bvu2gc{padding-left:var(--ds-space-100,8px)}
2
2
  ._8hrz1nam{transform-origin:center center 0}
3
3
  ._ca0q1b66{padding-top:var(--ds-space-050,4px)}
4
- ._ca0qv77o{padding-top:var(--ds-space-025,2px)}
5
4
  ._kqswh2mm{position:relative}
6
5
  ._n3td1b66{padding-bottom:var(--ds-space-050,4px)}
7
6
  ._u5f31b66{padding-right:var(--ds-space-050,4px)}
@@ -24,7 +24,6 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
24
24
  var styles = {
25
25
  emoji: "_8hrz1nam",
26
26
  button: "_ca0q1b66 _u5f31b66 _n3td1b66 _19bvu2gc",
27
- compactPadding: "_ca0qv77o",
28
27
  container: "_kqswh2mm"
29
28
  };
30
29
  /**
@@ -49,8 +48,6 @@ var ReactionSummaryButton = exports.ReactionSummaryButton = /*#__PURE__*/(0, _re
49
48
  showOpaqueBackground = _ref$showOpaqueBackgr === void 0 ? false : _ref$showOpaqueBackgr,
50
49
  _ref$subtleReactionsS = _ref.subtleReactionsSummaryAndPicker,
51
50
  subtleReactionsSummaryAndPicker = _ref$subtleReactionsS === void 0 ? false : _ref$subtleReactionsS,
52
- _ref$useCompactStyles = _ref.useCompactStyles,
53
- useCompactStyles = _ref$useCompactStyles === void 0 ? false : _ref$useCompactStyles,
54
51
  _ref$useButtonAlignme = _ref.useButtonAlignmentStyling,
55
52
  useButtonAlignmentStyling = _ref$useButtonAlignme === void 0 ? false : _ref$useButtonAlignme;
56
53
  var intl = (0, _reactIntlNext.useIntl)();
@@ -78,12 +75,11 @@ var ReactionSummaryButton = exports.ReactionSummaryButton = /*#__PURE__*/(0, _re
78
75
  onClick: onClick,
79
76
  testId: RENDER_SUMMARY_BUTTON_TESTID,
80
77
  ariaLabel: intl.formatMessage(_i18n.messages.summary),
81
- useCompactStyles: useCompactStyles,
82
78
  showSubtleStyle: subtleReactionsSummaryAndPicker,
83
79
  showOpaqueBackground: showOpaqueBackground
84
80
  }, /*#__PURE__*/React.createElement(_compiled.Inline, {
85
81
  space: "space.050",
86
- xcss: (0, _react2.cx)(styles.button, useCompactStyles && styles.compactPadding),
82
+ xcss: (0, _react2.cx)(styles.button),
87
83
  testId: "reaction-summary-wrapper"
88
84
  }, topReactions.map(function (reaction) {
89
85
  return /*#__PURE__*/React.createElement(_compiled.Box, {
@@ -100,11 +96,11 @@ var ReactionSummaryButton = exports.ReactionSummaryButton = /*#__PURE__*/(0, _re
100
96
  id: reaction.emojiId,
101
97
  shortName: ''
102
98
  },
103
- fitToHeight: useCompactStyles ? 12 : 16
99
+ fitToHeight: 16
104
100
  }));
105
101
  })), /*#__PURE__*/React.createElement(_Counter.Counter, {
106
102
  value: totalReactionsCount,
107
- useDarkerFont: useCompactStyles || useButtonAlignmentStyling,
108
- useUpdatedStyles: !useCompactStyles && useButtonAlignmentStyling
103
+ useDarkerFont: useButtonAlignmentStyling,
104
+ useUpdatedStyles: useButtonAlignmentStyling
109
105
  })));
110
106
  });
@@ -56,7 +56,8 @@ var ReactionSummaryView = exports.ReactionSummaryView = function ReactionSummary
56
56
  tooltipContent = _ref.tooltipContent,
57
57
  reactionPickerTriggerIcon = _ref.reactionPickerTriggerIcon,
58
58
  onOpen = _ref.onOpen,
59
- useButtonAlignmentStyling = _ref.useButtonAlignmentStyling;
59
+ useButtonAlignmentStyling = _ref.useButtonAlignmentStyling,
60
+ reactionPickerTriggerText = _ref.reactionPickerTriggerText;
60
61
  var _useState = (0, _react.useState)(false),
61
62
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
62
63
  isSummaryPopupOpen = _useState2[0],
@@ -70,9 +71,10 @@ var ReactionSummaryView = exports.ReactionSummaryView = function ReactionSummary
70
71
  return /*#__PURE__*/React.createElement(_popup.default, {
71
72
  placement: placement,
72
73
  content: function content() {
73
- return /*#__PURE__*/React.createElement(_compiled.Inline, {
74
+ return /*#__PURE__*/React.createElement(_compiled.Box, {
75
+ testId: RENDER_SUMMARY_VIEW_POPUP_TESTID
76
+ }, /*#__PURE__*/React.createElement(_compiled.Inline, {
74
77
  xcss: styles.summaryPopup,
75
- testId: RENDER_SUMMARY_VIEW_POPUP_TESTID,
76
78
  space: "space.025",
77
79
  shouldWrap: true,
78
80
  alignBlock: "center"
@@ -90,15 +92,18 @@ var ReactionSummaryView = exports.ReactionSummaryView = function ReactionSummary
90
92
  handleOpenReactionsDialog: handleOpenReactionsDialog,
91
93
  isViewOnly: isViewOnly
92
94
  });
93
- }), allowSelectFromSummaryView && /*#__PURE__*/React.createElement(_ReactionSummaryViewEmojiPicker.ReactionSummaryViewEmojiPicker, {
95
+ })), allowSelectFromSummaryView && /*#__PURE__*/React.createElement(_compiled.Flex, {
96
+ justifyContent: "center"
97
+ }, /*#__PURE__*/React.createElement(_ReactionSummaryViewEmojiPicker.ReactionSummaryViewEmojiPicker, {
94
98
  emojiProvider: emojiProvider,
95
99
  disabled: disabled,
96
100
  onSelection: onSelection,
97
101
  emojiPickerSize: emojiPickerSize,
98
102
  tooltipContent: tooltipContent,
99
103
  reactionPickerTriggerIcon: reactionPickerTriggerIcon,
104
+ reactionPickerTriggerText: reactionPickerTriggerText,
100
105
  onOpen: onOpen
101
- }));
106
+ })));
102
107
  },
103
108
  isOpen: isSummaryPopupOpen,
104
109
  onClose: handlePopupClose,
@@ -109,7 +114,6 @@ var ReactionSummaryView = exports.ReactionSummaryView = function ReactionSummary
109
114
  onClick: handleSummaryClick,
110
115
  showOpaqueBackground: showOpaqueBackground,
111
116
  subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
112
- useCompactStyles: allowSelectFromSummaryView,
113
117
  useButtonAlignmentStyling: useButtonAlignmentStyling
114
118
  }));
115
119
  }
@@ -22,7 +22,8 @@ var ReactionSummaryViewEmojiPicker = exports.ReactionSummaryViewEmojiPicker = fu
22
22
  disabled = _ref.disabled,
23
23
  reactionPickerTriggerIcon = _ref.reactionPickerTriggerIcon,
24
24
  tooltipContent = _ref.tooltipContent,
25
- onOpen = _ref.onOpen;
25
+ onOpen = _ref.onOpen,
26
+ reactionPickerTriggerText = _ref.reactionPickerTriggerText;
26
27
  var _useState = (0, _react.useState)(false),
27
28
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
28
29
  isOpen = _useState2[0],
@@ -86,9 +87,10 @@ var ReactionSummaryViewEmojiPicker = exports.ReactionSummaryViewEmojiPicker = fu
86
87
  disabled: disabled,
87
88
  reactionPickerTriggerIcon: reactionPickerTriggerIcon,
88
89
  tooltipContent: tooltipContent,
89
- showAddReactionText: false,
90
- subtleReactionsSummaryAndPicker: true,
91
- onClick: handleClick
90
+ onClick: handleClick,
91
+ showAddReactionText: true,
92
+ reactionPickerTriggerText: reactionPickerTriggerText,
93
+ fullWidthSummaryViewReactionPickerTrigger: true
92
94
  }));
93
95
  }
94
96
  });
@@ -137,12 +137,13 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
137
137
  _ref$noRelativeContai = _ref.noRelativeContainer,
138
138
  noRelativeContainer = _ref$noRelativeContai === void 0 ? false : _ref$noRelativeContai,
139
139
  showSubtleDefaultReactions = _ref.showSubtleDefaultReactions,
140
- reactionPickerTriggerToolipContent = _ref.reactionPickerTriggerToolipContent,
140
+ reactionPickerTriggerTooltipContent = _ref.reactionPickerTriggerTooltipContent,
141
141
  reactionPickerTriggerIcon = _ref.reactionPickerTriggerIcon,
142
142
  _ref$allowSelectFromS = _ref.allowSelectFromSummaryView,
143
143
  allowSelectFromSummaryView = _ref$allowSelectFromS === void 0 ? false : _ref$allowSelectFromS,
144
144
  _ref$useButtonAlignme = _ref.useButtonAlignmentStyling,
145
- useButtonAlignmentStyling = _ref$useButtonAlignme === void 0 ? false : _ref$useButtonAlignme;
145
+ useButtonAlignmentStyling = _ref$useButtonAlignme === void 0 ? false : _ref$useButtonAlignme,
146
+ reactionPickerTriggerText = _ref.reactionPickerTriggerText;
146
147
  var _useState = (0, _react.useState)(''),
147
148
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
148
149
  selectedEmojiId = _useState2[0],
@@ -320,10 +321,11 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
320
321
  allowSelectFromSummaryView: allowSelectFromSummaryView,
321
322
  disabled: status !== _types.ReactionStatus.ready,
322
323
  reactionPickerTriggerIcon: reactionPickerTriggerIcon,
323
- tooltipContent: getTooltip(status, errorMessage, reactionPickerTriggerToolipContent),
324
+ tooltipContent: getTooltip(status, errorMessage, reactionPickerTriggerTooltipContent),
324
325
  emojiPickerSize: emojiPickerSize,
325
326
  onOpen: handlePickerOpen,
326
- useButtonAlignmentStyling: useButtonAlignmentStyling
327
+ useButtonAlignmentStyling: useButtonAlignmentStyling,
328
+ reactionPickerTriggerText: reactionPickerTriggerText
327
329
  })) : memorizedReactions.map(function (reaction) {
328
330
  return /*#__PURE__*/_react.default.createElement(_Reaction.Reaction, {
329
331
  key: reaction.emojiId,
@@ -340,7 +342,7 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
340
342
  isViewOnly: isViewOnly,
341
343
  showSubtleStyle: showSubtleDefaultReactions && reactions.length === 0
342
344
  });
343
- })), isViewOnly || allowSelectFromSummaryView ? null : /*#__PURE__*/_react.default.createElement(_ReactionPicker.ReactionPicker, {
345
+ })), isViewOnly || !onlyRenderPicker && shouldShowSummaryView && allowSelectFromSummaryView ? null : /*#__PURE__*/_react.default.createElement(_ReactionPicker.ReactionPicker, {
344
346
  emojiProvider: emojiProvider,
345
347
  allowAllEmojis: allowAllEmojis,
346
348
  pickerQuickReactionEmojiIds: pickerQuickReactionEmojiIds,
@@ -349,13 +351,14 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
349
351
  onOpen: handlePickerOpen,
350
352
  onCancel: handleOnCancel,
351
353
  onShowMore: handleOnMore,
352
- tooltipContent: getTooltip(status, errorMessage, reactionPickerTriggerToolipContent),
354
+ tooltipContent: getTooltip(status, errorMessage, reactionPickerTriggerTooltipContent),
353
355
  emojiPickerSize: emojiPickerSize,
354
356
  miniMode: miniMode,
355
357
  showOpaqueBackground: showOpaqueBackground,
356
358
  showAddReactionText: showAddReactionText,
357
359
  subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
358
360
  reactionPickerTriggerIcon: reactionPickerTriggerIcon,
361
+ reactionPickerTriggerText: reactionPickerTriggerText,
359
362
  className: (0, _runtime.ax)(["_1e0c1o8l _19pk1b66"])
360
363
  }), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalTransition, null, !!selectedEmojiId && /*#__PURE__*/_react.default.createElement(_segment.default, {
361
364
  name: "reactions-dialog"
@@ -8,8 +8,10 @@
8
8
  ._1h6dmuej{border-color:var(--ds-border,#091e4224)}
9
9
  ._18u01b66{margin-left:var(--ds-space-050,4px)}
10
10
  ._19bv1b66{padding-left:var(--ds-space-050,4px)}
11
+ ._19bvu2gc{padding-left:var(--ds-space-100,8px)}
11
12
  ._19bvze3t{padding-left:var(--ds-space-0,0)}
12
13
  ._1bah1h6o{justify-content:center}
14
+ ._1bsb1osq{width:100%}
13
15
  ._1bsbviql{width:2rem}
14
16
  ._1e0c1txw{display:flex}
15
17
  ._1ul9146b{min-width:110px}
@@ -24,9 +26,11 @@
24
26
  ._ca0q1b66{padding-top:var(--ds-space-050,4px)}
25
27
  ._ca0qze3t{padding-top:var(--ds-space-0,0)}
26
28
  ._n3td1b66{padding-bottom:var(--ds-space-050,4px)}
29
+ ._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
27
30
  ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
28
31
  ._syaz1gjq{color:var(--ds-text-subtle,#44546f)}
29
32
  ._u5f31b66{padding-right:var(--ds-space-050,4px)}
33
+ ._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
30
34
  ._u5f3ze3t{padding-right:var(--ds-space-0,0)}
31
35
  ._irr3108i:hover{background-color:var(--ds-surface-hovered,#f1f2f4)}
32
36
  ._irr3166n:hover{background-color:var(--ds-background-neutral-subtle-hovered,#091e420f)}
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.Trigger = exports.RENDER_TRIGGER_BUTTON_TESTID = exports.RENDER_TOOLTIP_TRIGGER_TESTID = void 0;
8
+ exports.Trigger = exports.RENDER_TRIGGER_CONTAINER_TESTID = exports.RENDER_TRIGGER_BUTTON_TESTID = exports.RENDER_TOOLTIP_TRIGGER_TESTID = void 0;
9
9
  require("./Trigger.compiled.css");
10
10
  var _runtime = require("@compiled/react/runtime");
11
11
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
@@ -25,7 +25,9 @@ var styles = {
25
25
  transparentEnabledTrigger: "_1h6dmuej _bfhksm61 _irr3166n _1di61dty",
26
26
  opaqueEnabledTrigger: "_1h6dmuej _bfhkvuon _irr3108i _1di61ji5",
27
27
  disabledTrigger: "_1h6d13gt _bfhksyzs",
28
- miniMode: "_2rkoglpi _1dqoglyw _1ul91tcg _ca0q1b66 _u5f31b66 _n3td1b66 _19bv1b66"
28
+ miniMode: "_2rkoglpi _1dqoglyw _1ul91tcg _ca0q1b66 _u5f31b66 _n3td1b66 _19bv1b66",
29
+ fullWidthSummaryViewReactionPickerTrigger: "_1bsb1osq _19bvu2gc _u5f3u2gc _n3tdu2gc",
30
+ fullWidth: "_1bsb1osq"
29
31
  };
30
32
 
31
33
  /**
@@ -33,6 +35,7 @@ var styles = {
33
35
  */
34
36
  var RENDER_TOOLTIP_TRIGGER_TESTID = exports.RENDER_TOOLTIP_TRIGGER_TESTID = 'render-tooltip-trigger';
35
37
  var RENDER_TRIGGER_BUTTON_TESTID = exports.RENDER_TRIGGER_BUTTON_TESTID = 'render-trigger-button';
38
+ var RENDER_TRIGGER_CONTAINER_TESTID = exports.RENDER_TRIGGER_CONTAINER_TESTID = 'render-trigger-container';
36
39
  var i18n = (0, _reactIntlNext.defineMessages)({
37
40
  addReaction: {
38
41
  id: 'reaction-picker-trigger.add.reaction.message',
@@ -65,18 +68,25 @@ var Trigger = exports.Trigger = /*#__PURE__*/_react2.default.forwardRef(function
65
68
  subtleReactionsSummaryAndPicker = _props$subtleReaction === void 0 ? false : _props$subtleReaction,
66
69
  _props$showRoundTrigg = props.showRoundTrigger,
67
70
  showRoundTrigger = _props$showRoundTrigg === void 0 ? false : _props$showRoundTrigg,
68
- reactionPickerTriggerIcon = props.reactionPickerTriggerIcon;
71
+ reactionPickerTriggerIcon = props.reactionPickerTriggerIcon,
72
+ _props$reactionPicker = props.reactionPickerTriggerText,
73
+ reactionPickerTriggerText = _props$reactionPicker === void 0 ? formatMessage(i18n.addReaction) : _props$reactionPicker,
74
+ _props$fullWidthSumma = props.fullWidthSummaryViewReactionPickerTrigger,
75
+ fullWidthSummaryViewReactionPickerTrigger = _props$fullWidthSumma === void 0 ? false : _props$fullWidthSumma;
69
76
  var handleMouseDown = function handleMouseDown(e, analyticsEvent) {
70
77
  if (onClick && !disabled) {
71
78
  onClick(e, analyticsEvent);
72
79
  }
73
80
  };
74
- return /*#__PURE__*/_react2.default.createElement(_tooltip.default, {
81
+ return /*#__PURE__*/_react2.default.createElement(_compiled.Box, {
82
+ xcss: (0, _react.cx)(fullWidthSummaryViewReactionPickerTrigger && styles.fullWidthSummaryViewReactionPickerTrigger),
83
+ testId: RENDER_TRIGGER_CONTAINER_TESTID
84
+ }, /*#__PURE__*/_react2.default.createElement(_tooltip.default, {
75
85
  testId: RENDER_TOOLTIP_TRIGGER_TESTID,
76
86
  content: tooltipContent
77
87
  }, /*#__PURE__*/_react2.default.createElement(_compiled.Pressable, (0, _extends2.default)({
78
88
  testId: RENDER_TRIGGER_BUTTON_TESTID,
79
- xcss: (0, _react.cx)(styles.trigger, subtleReactionsSummaryAndPicker && styles.subtleTrigger, showAddReactionText && styles.expandedTrigger, disabled ? styles.disabledTrigger : showOpaqueBackground ? styles.opaqueEnabledTrigger : styles.transparentEnabledTrigger, miniMode && styles.miniMode,
89
+ xcss: (0, _react.cx)(styles.trigger, fullWidthSummaryViewReactionPickerTrigger && styles.fullWidth, subtleReactionsSummaryAndPicker && styles.subtleTrigger, showAddReactionText && styles.expandedTrigger, disabled ? styles.disabledTrigger : showOpaqueBackground ? styles.opaqueEnabledTrigger : styles.transparentEnabledTrigger, miniMode && styles.miniMode,
80
90
  // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
81
91
  (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') && styles.triggerStylesRefresh, showRoundTrigger && styles.roundTrigger),
82
92
  style: {
@@ -98,5 +108,5 @@ var Trigger = exports.Trigger = /*#__PURE__*/_react2.default.forwardRef(function
98
108
  label: "Add reaction"
99
109
  }), showAddReactionText && /*#__PURE__*/_react2.default.createElement(_compiled.Box, {
100
110
  xcss: (0, _react.cx)(addReactionStyles.addReactionMessage)
101
- }, formatMessage(i18n.addReaction))));
111
+ }, reactionPickerTriggerText))));
102
112
  });
@@ -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 = "30.0.8";
4
+ const packageVersion = "31.0.0";
5
5
  /**
6
6
  * TODO: move to utility package?
7
7
  * A random sampling function
@@ -55,6 +55,7 @@ export const ReactionPicker = /*#__PURE__*/React.memo(props => {
55
55
  showAddReactionText = false,
56
56
  showRoundTrigger = false,
57
57
  reactionPickerTriggerIcon,
58
+ reactionPickerTriggerText,
58
59
  reactionPickerPlacement,
59
60
  reactionsPickerPreventOverflowOptions
60
61
  } = props;
@@ -222,7 +223,8 @@ export const ReactionPicker = /*#__PURE__*/React.memo(props => {
222
223
  showAddReactionText: showAddReactionText,
223
224
  subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
224
225
  showRoundTrigger: showRoundTrigger,
225
- reactionPickerTriggerIcon: reactionPickerTriggerIcon
226
+ reactionPickerTriggerIcon: reactionPickerTriggerIcon,
227
+ reactionPickerTriggerText: reactionPickerTriggerText
226
228
  })), settings.isOpen && /*#__PURE__*/React.createElement(PopperWrapper, {
227
229
  settings: settings,
228
230
  popperModifiers: popperModifiers
@@ -1,7 +1,6 @@
1
1
  ._19bvu2gc{padding-left:var(--ds-space-100,8px)}
2
2
  ._8hrz1nam{transform-origin:center center 0}
3
3
  ._ca0q1b66{padding-top:var(--ds-space-050,4px)}
4
- ._ca0qv77o{padding-top:var(--ds-space-025,2px)}
5
4
  ._kqswh2mm{position:relative}
6
5
  ._n3td1b66{padding-bottom:var(--ds-space-050,4px)}
7
6
  ._u5f31b66{padding-right:var(--ds-space-050,4px)}
@@ -13,7 +13,6 @@ import { cx } from '@compiled/react';
13
13
  const styles = {
14
14
  emoji: "_8hrz1nam",
15
15
  button: "_ca0q1b66 _u5f31b66 _n3td1b66 _19bvu2gc",
16
- compactPadding: "_ca0qv77o",
17
16
  container: "_kqswh2mm"
18
17
  };
19
18
  /**
@@ -34,7 +33,6 @@ export const ReactionSummaryButton = /*#__PURE__*/forwardRef(({
34
33
  onClick,
35
34
  showOpaqueBackground = false,
36
35
  subtleReactionsSummaryAndPicker = false,
37
- useCompactStyles = false,
38
36
  useButtonAlignmentStyling = false
39
37
  }, ref) => {
40
38
  const intl = useIntl();
@@ -58,12 +56,11 @@ export const ReactionSummaryButton = /*#__PURE__*/forwardRef(({
58
56
  onClick: onClick,
59
57
  testId: RENDER_SUMMARY_BUTTON_TESTID,
60
58
  ariaLabel: intl.formatMessage(messages.summary),
61
- useCompactStyles: useCompactStyles,
62
59
  showSubtleStyle: subtleReactionsSummaryAndPicker,
63
60
  showOpaqueBackground: showOpaqueBackground
64
61
  }, /*#__PURE__*/React.createElement(Inline, {
65
62
  space: "space.050",
66
- xcss: cx(styles.button, useCompactStyles && styles.compactPadding),
63
+ xcss: cx(styles.button),
67
64
  testId: "reaction-summary-wrapper"
68
65
  }, topReactions.map(reaction => /*#__PURE__*/React.createElement(Box, {
69
66
  xcss: styles.emoji,
@@ -79,10 +76,10 @@ export const ReactionSummaryButton = /*#__PURE__*/forwardRef(({
79
76
  id: reaction.emojiId,
80
77
  shortName: ''
81
78
  },
82
- fitToHeight: useCompactStyles ? 12 : 16
79
+ fitToHeight: 16
83
80
  })))), /*#__PURE__*/React.createElement(Counter, {
84
81
  value: totalReactionsCount,
85
- useDarkerFont: useCompactStyles || useButtonAlignmentStyling,
86
- useUpdatedStyles: !useCompactStyles && useButtonAlignmentStyling
82
+ useDarkerFont: useButtonAlignmentStyling,
83
+ useUpdatedStyles: useButtonAlignmentStyling
87
84
  })));
88
85
  });
@@ -8,7 +8,7 @@ import Popup from '@atlaskit/popup';
8
8
  import { Reaction } from './Reaction';
9
9
  import { ReactionSummaryViewEmojiPicker } from './ReactionSummaryViewEmojiPicker';
10
10
  import { ReactionSummaryButton } from './ReactionSummaryButton';
11
- import { Inline } from '@atlaskit/primitives/compiled';
11
+ import { Box, Flex, Inline } from '@atlaskit/primitives/compiled';
12
12
  const styles = {
13
13
  summaryPopup: "_ca0q1b66 _u5f3u2gc _n3tdu2gc _19bvu2gc _p12foiq5"
14
14
  };
@@ -38,16 +38,18 @@ export const ReactionSummaryView = ({
38
38
  tooltipContent,
39
39
  reactionPickerTriggerIcon,
40
40
  onOpen,
41
- useButtonAlignmentStyling
41
+ useButtonAlignmentStyling,
42
+ reactionPickerTriggerText
42
43
  }) => {
43
44
  const [isSummaryPopupOpen, setSummaryPopupOpen] = useState(false);
44
45
  const handlePopupClose = useCallback(() => setSummaryPopupOpen(false), []);
45
46
  const handleSummaryClick = useCallback(() => setSummaryPopupOpen(!isSummaryPopupOpen), [isSummaryPopupOpen]);
46
47
  return /*#__PURE__*/React.createElement(Popup, {
47
48
  placement: placement,
48
- content: () => /*#__PURE__*/React.createElement(Inline, {
49
+ content: () => /*#__PURE__*/React.createElement(Box, {
50
+ testId: RENDER_SUMMARY_VIEW_POPUP_TESTID
51
+ }, /*#__PURE__*/React.createElement(Inline, {
49
52
  xcss: styles.summaryPopup,
50
- testId: RENDER_SUMMARY_VIEW_POPUP_TESTID,
51
53
  space: "space.025",
52
54
  shouldWrap: true,
53
55
  alignBlock: "center"
@@ -63,15 +65,18 @@ export const ReactionSummaryView = ({
63
65
  allowUserDialog: allowUserDialog,
64
66
  handleOpenReactionsDialog: handleOpenReactionsDialog,
65
67
  isViewOnly: isViewOnly
66
- })), allowSelectFromSummaryView && /*#__PURE__*/React.createElement(ReactionSummaryViewEmojiPicker, {
68
+ }))), allowSelectFromSummaryView && /*#__PURE__*/React.createElement(Flex, {
69
+ justifyContent: "center"
70
+ }, /*#__PURE__*/React.createElement(ReactionSummaryViewEmojiPicker, {
67
71
  emojiProvider: emojiProvider,
68
72
  disabled: disabled,
69
73
  onSelection: onSelection,
70
74
  emojiPickerSize: emojiPickerSize,
71
75
  tooltipContent: tooltipContent,
72
76
  reactionPickerTriggerIcon: reactionPickerTriggerIcon,
77
+ reactionPickerTriggerText: reactionPickerTriggerText,
73
78
  onOpen: onOpen
74
- })),
79
+ }))),
75
80
  isOpen: isSummaryPopupOpen,
76
81
  onClose: handlePopupClose,
77
82
  trigger: triggerProps => /*#__PURE__*/React.createElement(ReactionSummaryButton, _extends({}, triggerProps, {
@@ -80,7 +85,6 @@ export const ReactionSummaryView = ({
80
85
  onClick: handleSummaryClick,
81
86
  showOpaqueBackground: showOpaqueBackground,
82
87
  subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
83
- useCompactStyles: allowSelectFromSummaryView,
84
88
  useButtonAlignmentStyling: useButtonAlignmentStyling
85
89
  }))
86
90
  });
@@ -11,7 +11,8 @@ export const ReactionSummaryViewEmojiPicker = ({
11
11
  disabled,
12
12
  reactionPickerTriggerIcon,
13
13
  tooltipContent,
14
- onOpen
14
+ onOpen,
15
+ reactionPickerTriggerText
15
16
  }) => {
16
17
  const [isOpen, setIsOpen] = useState(false);
17
18
  const handleClick = () => {
@@ -66,9 +67,10 @@ export const ReactionSummaryViewEmojiPicker = ({
66
67
  disabled: disabled,
67
68
  reactionPickerTriggerIcon: reactionPickerTriggerIcon,
68
69
  tooltipContent: tooltipContent,
69
- showAddReactionText: false,
70
- subtleReactionsSummaryAndPicker: true,
71
- onClick: handleClick
70
+ onClick: handleClick,
71
+ showAddReactionText: true,
72
+ reactionPickerTriggerText: reactionPickerTriggerText,
73
+ fullWidthSummaryViewReactionPickerTrigger: true
72
74
  }))
73
75
  });
74
76
  };
@@ -103,10 +103,11 @@ export const Reactions = /*#__PURE__*/React.memo(({
103
103
  noWrap = false,
104
104
  noRelativeContainer = false,
105
105
  showSubtleDefaultReactions,
106
- reactionPickerTriggerToolipContent,
106
+ reactionPickerTriggerTooltipContent,
107
107
  reactionPickerTriggerIcon,
108
108
  allowSelectFromSummaryView = false,
109
- useButtonAlignmentStyling = false
109
+ useButtonAlignmentStyling = false,
110
+ reactionPickerTriggerText
110
111
  }) => {
111
112
  const [selectedEmojiId, setSelectedEmojiId] = useState('');
112
113
  const {
@@ -271,10 +272,11 @@ export const Reactions = /*#__PURE__*/React.memo(({
271
272
  allowSelectFromSummaryView: allowSelectFromSummaryView,
272
273
  disabled: status !== ReactionStatus.ready,
273
274
  reactionPickerTriggerIcon: reactionPickerTriggerIcon,
274
- tooltipContent: getTooltip(status, errorMessage, reactionPickerTriggerToolipContent),
275
+ tooltipContent: getTooltip(status, errorMessage, reactionPickerTriggerTooltipContent),
275
276
  emojiPickerSize: emojiPickerSize,
276
277
  onOpen: handlePickerOpen,
277
- useButtonAlignmentStyling: useButtonAlignmentStyling
278
+ useButtonAlignmentStyling: useButtonAlignmentStyling,
279
+ reactionPickerTriggerText: reactionPickerTriggerText
278
280
  })) : memorizedReactions.map(reaction => /*#__PURE__*/React.createElement(Reaction, {
279
281
  key: reaction.emojiId,
280
282
  reaction: reaction,
@@ -289,7 +291,7 @@ export const Reactions = /*#__PURE__*/React.memo(({
289
291
  handleOpenReactionsDialog: handleOpenReactionsDialog,
290
292
  isViewOnly: isViewOnly,
291
293
  showSubtleStyle: showSubtleDefaultReactions && reactions.length === 0
292
- }))), isViewOnly || allowSelectFromSummaryView ? null : /*#__PURE__*/React.createElement(ReactionPicker, {
294
+ }))), isViewOnly || !onlyRenderPicker && shouldShowSummaryView && allowSelectFromSummaryView ? null : /*#__PURE__*/React.createElement(ReactionPicker, {
293
295
  emojiProvider: emojiProvider,
294
296
  allowAllEmojis: allowAllEmojis,
295
297
  pickerQuickReactionEmojiIds: pickerQuickReactionEmojiIds,
@@ -298,13 +300,14 @@ export const Reactions = /*#__PURE__*/React.memo(({
298
300
  onOpen: handlePickerOpen,
299
301
  onCancel: handleOnCancel,
300
302
  onShowMore: handleOnMore,
301
- tooltipContent: getTooltip(status, errorMessage, reactionPickerTriggerToolipContent),
303
+ tooltipContent: getTooltip(status, errorMessage, reactionPickerTriggerTooltipContent),
302
304
  emojiPickerSize: emojiPickerSize,
303
305
  miniMode: miniMode,
304
306
  showOpaqueBackground: showOpaqueBackground,
305
307
  showAddReactionText: showAddReactionText,
306
308
  subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
307
309
  reactionPickerTriggerIcon: reactionPickerTriggerIcon,
310
+ reactionPickerTriggerText: reactionPickerTriggerText,
308
311
  className: ax(["_1e0c1o8l _19pk1b66"])
309
312
  }), /*#__PURE__*/React.createElement(ModalTransition, null, !!selectedEmojiId && /*#__PURE__*/React.createElement(UFOSegment, {
310
313
  name: "reactions-dialog"
@@ -8,8 +8,10 @@
8
8
  ._1h6dmuej{border-color:var(--ds-border,#091e4224)}
9
9
  ._18u01b66{margin-left:var(--ds-space-050,4px)}
10
10
  ._19bv1b66{padding-left:var(--ds-space-050,4px)}
11
+ ._19bvu2gc{padding-left:var(--ds-space-100,8px)}
11
12
  ._19bvze3t{padding-left:var(--ds-space-0,0)}
12
13
  ._1bah1h6o{justify-content:center}
14
+ ._1bsb1osq{width:100%}
13
15
  ._1bsbviql{width:2rem}
14
16
  ._1e0c1txw{display:flex}
15
17
  ._1ul9146b{min-width:110px}
@@ -24,9 +26,11 @@
24
26
  ._ca0q1b66{padding-top:var(--ds-space-050,4px)}
25
27
  ._ca0qze3t{padding-top:var(--ds-space-0,0)}
26
28
  ._n3td1b66{padding-bottom:var(--ds-space-050,4px)}
29
+ ._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
27
30
  ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
28
31
  ._syaz1gjq{color:var(--ds-text-subtle,#44546f)}
29
32
  ._u5f31b66{padding-right:var(--ds-space-050,4px)}
33
+ ._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
30
34
  ._u5f3ze3t{padding-right:var(--ds-space-0,0)}
31
35
  ._irr3108i:hover{background-color:var(--ds-surface-hovered,#f1f2f4)}
32
36
  ._irr3166n:hover{background-color:var(--ds-background-neutral-subtle-hovered,#091e420f)}
@@ -18,7 +18,9 @@ const styles = {
18
18
  transparentEnabledTrigger: "_1h6dmuej _bfhksm61 _irr3166n _1di61dty",
19
19
  opaqueEnabledTrigger: "_1h6dmuej _bfhkvuon _irr3108i _1di61ji5",
20
20
  disabledTrigger: "_1h6d13gt _bfhksyzs",
21
- miniMode: "_2rkoglpi _1dqoglyw _1ul91tcg _ca0q1b66 _u5f31b66 _n3td1b66 _19bv1b66"
21
+ miniMode: "_2rkoglpi _1dqoglyw _1ul91tcg _ca0q1b66 _u5f31b66 _n3td1b66 _19bv1b66",
22
+ fullWidthSummaryViewReactionPickerTrigger: "_1bsb1osq _19bvu2gc _u5f3u2gc _n3tdu2gc",
23
+ fullWidth: "_1bsb1osq"
22
24
  };
23
25
 
24
26
  /**
@@ -26,6 +28,7 @@ const styles = {
26
28
  */
27
29
  export const RENDER_TOOLTIP_TRIGGER_TESTID = 'render-tooltip-trigger';
28
30
  export const RENDER_TRIGGER_BUTTON_TESTID = 'render-trigger-button';
31
+ export const RENDER_TRIGGER_CONTAINER_TESTID = 'render-trigger-container';
29
32
  const i18n = defineMessages({
30
33
  addReaction: {
31
34
  id: 'reaction-picker-trigger.add.reaction.message',
@@ -54,19 +57,24 @@ export const Trigger = /*#__PURE__*/React.forwardRef((props, ref) => {
54
57
  showAddReactionText = false,
55
58
  subtleReactionsSummaryAndPicker = false,
56
59
  showRoundTrigger = false,
57
- reactionPickerTriggerIcon
60
+ reactionPickerTriggerIcon,
61
+ reactionPickerTriggerText = formatMessage(i18n.addReaction),
62
+ fullWidthSummaryViewReactionPickerTrigger = false
58
63
  } = props;
59
64
  const handleMouseDown = (e, analyticsEvent) => {
60
65
  if (onClick && !disabled) {
61
66
  onClick(e, analyticsEvent);
62
67
  }
63
68
  };
64
- return /*#__PURE__*/React.createElement(Tooltip, {
69
+ return /*#__PURE__*/React.createElement(Box, {
70
+ xcss: cx(fullWidthSummaryViewReactionPickerTrigger && styles.fullWidthSummaryViewReactionPickerTrigger),
71
+ testId: RENDER_TRIGGER_CONTAINER_TESTID
72
+ }, /*#__PURE__*/React.createElement(Tooltip, {
65
73
  testId: RENDER_TOOLTIP_TRIGGER_TESTID,
66
74
  content: tooltipContent
67
75
  }, /*#__PURE__*/React.createElement(Pressable, _extends({
68
76
  testId: RENDER_TRIGGER_BUTTON_TESTID,
69
- xcss: cx(styles.trigger, subtleReactionsSummaryAndPicker && styles.subtleTrigger, showAddReactionText && styles.expandedTrigger, disabled ? styles.disabledTrigger : showOpaqueBackground ? styles.opaqueEnabledTrigger : styles.transparentEnabledTrigger, miniMode && styles.miniMode,
77
+ xcss: cx(styles.trigger, fullWidthSummaryViewReactionPickerTrigger && styles.fullWidth, subtleReactionsSummaryAndPicker && styles.subtleTrigger, showAddReactionText && styles.expandedTrigger, disabled ? styles.disabledTrigger : showOpaqueBackground ? styles.opaqueEnabledTrigger : styles.transparentEnabledTrigger, miniMode && styles.miniMode,
70
78
  // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
71
79
  fg('platform-component-visual-refresh') && styles.triggerStylesRefresh, showRoundTrigger && styles.roundTrigger),
72
80
  style: {
@@ -88,5 +96,5 @@ export const Trigger = /*#__PURE__*/React.forwardRef((props, ref) => {
88
96
  label: "Add reaction"
89
97
  }), showAddReactionText && /*#__PURE__*/React.createElement(Box, {
90
98
  xcss: cx(addReactionStyles.addReactionMessage)
91
- }, formatMessage(i18n.addReaction))));
99
+ }, reactionPickerTriggerText))));
92
100
  });
@@ -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 = "30.0.8";
7
+ var packageVersion = "31.0.0";
8
8
  /**
9
9
  * TODO: move to utility package?
10
10
  * A random sampling function
@@ -66,6 +66,7 @@ export var ReactionPicker = /*#__PURE__*/React.memo(function (props) {
66
66
  _props$showRoundTrigg = props.showRoundTrigger,
67
67
  showRoundTrigger = _props$showRoundTrigg === void 0 ? false : _props$showRoundTrigg,
68
68
  reactionPickerTriggerIcon = props.reactionPickerTriggerIcon,
69
+ reactionPickerTriggerText = props.reactionPickerTriggerText,
69
70
  reactionPickerPlacement = props.reactionPickerPlacement,
70
71
  reactionsPickerPreventOverflowOptions = props.reactionsPickerPreventOverflowOptions;
71
72
  var _useState = useState(null),
@@ -238,7 +239,8 @@ export var ReactionPicker = /*#__PURE__*/React.memo(function (props) {
238
239
  showAddReactionText: showAddReactionText,
239
240
  subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
240
241
  showRoundTrigger: showRoundTrigger,
241
- reactionPickerTriggerIcon: reactionPickerTriggerIcon
242
+ reactionPickerTriggerIcon: reactionPickerTriggerIcon,
243
+ reactionPickerTriggerText: reactionPickerTriggerText
242
244
  })
243
245
  );
244
246
  }), settings.isOpen && /*#__PURE__*/React.createElement(PopperWrapper, {
@@ -1,7 +1,6 @@
1
1
  ._19bvu2gc{padding-left:var(--ds-space-100,8px)}
2
2
  ._8hrz1nam{transform-origin:center center 0}
3
3
  ._ca0q1b66{padding-top:var(--ds-space-050,4px)}
4
- ._ca0qv77o{padding-top:var(--ds-space-025,2px)}
5
4
  ._kqswh2mm{position:relative}
6
5
  ._n3td1b66{padding-bottom:var(--ds-space-050,4px)}
7
6
  ._u5f31b66{padding-right:var(--ds-space-050,4px)}
@@ -14,7 +14,6 @@ import { cx } from '@compiled/react';
14
14
  var styles = {
15
15
  emoji: "_8hrz1nam",
16
16
  button: "_ca0q1b66 _u5f31b66 _n3td1b66 _19bvu2gc",
17
- compactPadding: "_ca0qv77o",
18
17
  container: "_kqswh2mm"
19
18
  };
20
19
  /**
@@ -39,8 +38,6 @@ export var ReactionSummaryButton = /*#__PURE__*/forwardRef(function (_ref, ref)
39
38
  showOpaqueBackground = _ref$showOpaqueBackgr === void 0 ? false : _ref$showOpaqueBackgr,
40
39
  _ref$subtleReactionsS = _ref.subtleReactionsSummaryAndPicker,
41
40
  subtleReactionsSummaryAndPicker = _ref$subtleReactionsS === void 0 ? false : _ref$subtleReactionsS,
42
- _ref$useCompactStyles = _ref.useCompactStyles,
43
- useCompactStyles = _ref$useCompactStyles === void 0 ? false : _ref$useCompactStyles,
44
41
  _ref$useButtonAlignme = _ref.useButtonAlignmentStyling,
45
42
  useButtonAlignmentStyling = _ref$useButtonAlignme === void 0 ? false : _ref$useButtonAlignme;
46
43
  var intl = useIntl();
@@ -68,12 +65,11 @@ export var ReactionSummaryButton = /*#__PURE__*/forwardRef(function (_ref, ref)
68
65
  onClick: onClick,
69
66
  testId: RENDER_SUMMARY_BUTTON_TESTID,
70
67
  ariaLabel: intl.formatMessage(messages.summary),
71
- useCompactStyles: useCompactStyles,
72
68
  showSubtleStyle: subtleReactionsSummaryAndPicker,
73
69
  showOpaqueBackground: showOpaqueBackground
74
70
  }, /*#__PURE__*/React.createElement(Inline, {
75
71
  space: "space.050",
76
- xcss: cx(styles.button, useCompactStyles && styles.compactPadding),
72
+ xcss: cx(styles.button),
77
73
  testId: "reaction-summary-wrapper"
78
74
  }, topReactions.map(function (reaction) {
79
75
  return /*#__PURE__*/React.createElement(Box, {
@@ -90,11 +86,11 @@ export var ReactionSummaryButton = /*#__PURE__*/forwardRef(function (_ref, ref)
90
86
  id: reaction.emojiId,
91
87
  shortName: ''
92
88
  },
93
- fitToHeight: useCompactStyles ? 12 : 16
89
+ fitToHeight: 16
94
90
  }));
95
91
  })), /*#__PURE__*/React.createElement(Counter, {
96
92
  value: totalReactionsCount,
97
- useDarkerFont: useCompactStyles || useButtonAlignmentStyling,
98
- useUpdatedStyles: !useCompactStyles && useButtonAlignmentStyling
93
+ useDarkerFont: useButtonAlignmentStyling,
94
+ useUpdatedStyles: useButtonAlignmentStyling
99
95
  })));
100
96
  });
@@ -9,7 +9,7 @@ import Popup from '@atlaskit/popup';
9
9
  import { Reaction } from './Reaction';
10
10
  import { ReactionSummaryViewEmojiPicker } from './ReactionSummaryViewEmojiPicker';
11
11
  import { ReactionSummaryButton } from './ReactionSummaryButton';
12
- import { Inline } from '@atlaskit/primitives/compiled';
12
+ import { Box, Flex, Inline } from '@atlaskit/primitives/compiled';
13
13
  var styles = {
14
14
  summaryPopup: "_ca0q1b66 _u5f3u2gc _n3tdu2gc _19bvu2gc _p12foiq5"
15
15
  };
@@ -46,7 +46,8 @@ export var ReactionSummaryView = function ReactionSummaryView(_ref) {
46
46
  tooltipContent = _ref.tooltipContent,
47
47
  reactionPickerTriggerIcon = _ref.reactionPickerTriggerIcon,
48
48
  onOpen = _ref.onOpen,
49
- useButtonAlignmentStyling = _ref.useButtonAlignmentStyling;
49
+ useButtonAlignmentStyling = _ref.useButtonAlignmentStyling,
50
+ reactionPickerTriggerText = _ref.reactionPickerTriggerText;
50
51
  var _useState = useState(false),
51
52
  _useState2 = _slicedToArray(_useState, 2),
52
53
  isSummaryPopupOpen = _useState2[0],
@@ -60,9 +61,10 @@ export var ReactionSummaryView = function ReactionSummaryView(_ref) {
60
61
  return /*#__PURE__*/React.createElement(Popup, {
61
62
  placement: placement,
62
63
  content: function content() {
63
- return /*#__PURE__*/React.createElement(Inline, {
64
+ return /*#__PURE__*/React.createElement(Box, {
65
+ testId: RENDER_SUMMARY_VIEW_POPUP_TESTID
66
+ }, /*#__PURE__*/React.createElement(Inline, {
64
67
  xcss: styles.summaryPopup,
65
- testId: RENDER_SUMMARY_VIEW_POPUP_TESTID,
66
68
  space: "space.025",
67
69
  shouldWrap: true,
68
70
  alignBlock: "center"
@@ -80,15 +82,18 @@ export var ReactionSummaryView = function ReactionSummaryView(_ref) {
80
82
  handleOpenReactionsDialog: handleOpenReactionsDialog,
81
83
  isViewOnly: isViewOnly
82
84
  });
83
- }), allowSelectFromSummaryView && /*#__PURE__*/React.createElement(ReactionSummaryViewEmojiPicker, {
85
+ })), allowSelectFromSummaryView && /*#__PURE__*/React.createElement(Flex, {
86
+ justifyContent: "center"
87
+ }, /*#__PURE__*/React.createElement(ReactionSummaryViewEmojiPicker, {
84
88
  emojiProvider: emojiProvider,
85
89
  disabled: disabled,
86
90
  onSelection: onSelection,
87
91
  emojiPickerSize: emojiPickerSize,
88
92
  tooltipContent: tooltipContent,
89
93
  reactionPickerTriggerIcon: reactionPickerTriggerIcon,
94
+ reactionPickerTriggerText: reactionPickerTriggerText,
90
95
  onOpen: onOpen
91
- }));
96
+ })));
92
97
  },
93
98
  isOpen: isSummaryPopupOpen,
94
99
  onClose: handlePopupClose,
@@ -99,7 +104,6 @@ export var ReactionSummaryView = function ReactionSummaryView(_ref) {
99
104
  onClick: handleSummaryClick,
100
105
  showOpaqueBackground: showOpaqueBackground,
101
106
  subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
102
- useCompactStyles: allowSelectFromSummaryView,
103
107
  useButtonAlignmentStyling: useButtonAlignmentStyling
104
108
  }));
105
109
  }
@@ -12,7 +12,8 @@ export var ReactionSummaryViewEmojiPicker = function ReactionSummaryViewEmojiPic
12
12
  disabled = _ref.disabled,
13
13
  reactionPickerTriggerIcon = _ref.reactionPickerTriggerIcon,
14
14
  tooltipContent = _ref.tooltipContent,
15
- onOpen = _ref.onOpen;
15
+ onOpen = _ref.onOpen,
16
+ reactionPickerTriggerText = _ref.reactionPickerTriggerText;
16
17
  var _useState = useState(false),
17
18
  _useState2 = _slicedToArray(_useState, 2),
18
19
  isOpen = _useState2[0],
@@ -76,9 +77,10 @@ export var ReactionSummaryViewEmojiPicker = function ReactionSummaryViewEmojiPic
76
77
  disabled: disabled,
77
78
  reactionPickerTriggerIcon: reactionPickerTriggerIcon,
78
79
  tooltipContent: tooltipContent,
79
- showAddReactionText: false,
80
- subtleReactionsSummaryAndPicker: true,
81
- onClick: handleClick
80
+ onClick: handleClick,
81
+ showAddReactionText: true,
82
+ reactionPickerTriggerText: reactionPickerTriggerText,
83
+ fullWidthSummaryViewReactionPickerTrigger: true
82
84
  }));
83
85
  }
84
86
  });
@@ -125,12 +125,13 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
125
125
  _ref$noRelativeContai = _ref.noRelativeContainer,
126
126
  noRelativeContainer = _ref$noRelativeContai === void 0 ? false : _ref$noRelativeContai,
127
127
  showSubtleDefaultReactions = _ref.showSubtleDefaultReactions,
128
- reactionPickerTriggerToolipContent = _ref.reactionPickerTriggerToolipContent,
128
+ reactionPickerTriggerTooltipContent = _ref.reactionPickerTriggerTooltipContent,
129
129
  reactionPickerTriggerIcon = _ref.reactionPickerTriggerIcon,
130
130
  _ref$allowSelectFromS = _ref.allowSelectFromSummaryView,
131
131
  allowSelectFromSummaryView = _ref$allowSelectFromS === void 0 ? false : _ref$allowSelectFromS,
132
132
  _ref$useButtonAlignme = _ref.useButtonAlignmentStyling,
133
- useButtonAlignmentStyling = _ref$useButtonAlignme === void 0 ? false : _ref$useButtonAlignme;
133
+ useButtonAlignmentStyling = _ref$useButtonAlignme === void 0 ? false : _ref$useButtonAlignme,
134
+ reactionPickerTriggerText = _ref.reactionPickerTriggerText;
134
135
  var _useState = useState(''),
135
136
  _useState2 = _slicedToArray(_useState, 2),
136
137
  selectedEmojiId = _useState2[0],
@@ -308,10 +309,11 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
308
309
  allowSelectFromSummaryView: allowSelectFromSummaryView,
309
310
  disabled: status !== ReactionStatus.ready,
310
311
  reactionPickerTriggerIcon: reactionPickerTriggerIcon,
311
- tooltipContent: getTooltip(status, errorMessage, reactionPickerTriggerToolipContent),
312
+ tooltipContent: getTooltip(status, errorMessage, reactionPickerTriggerTooltipContent),
312
313
  emojiPickerSize: emojiPickerSize,
313
314
  onOpen: handlePickerOpen,
314
- useButtonAlignmentStyling: useButtonAlignmentStyling
315
+ useButtonAlignmentStyling: useButtonAlignmentStyling,
316
+ reactionPickerTriggerText: reactionPickerTriggerText
315
317
  })) : memorizedReactions.map(function (reaction) {
316
318
  return /*#__PURE__*/React.createElement(Reaction, {
317
319
  key: reaction.emojiId,
@@ -328,7 +330,7 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
328
330
  isViewOnly: isViewOnly,
329
331
  showSubtleStyle: showSubtleDefaultReactions && reactions.length === 0
330
332
  });
331
- })), isViewOnly || allowSelectFromSummaryView ? null : /*#__PURE__*/React.createElement(ReactionPicker, {
333
+ })), isViewOnly || !onlyRenderPicker && shouldShowSummaryView && allowSelectFromSummaryView ? null : /*#__PURE__*/React.createElement(ReactionPicker, {
332
334
  emojiProvider: emojiProvider,
333
335
  allowAllEmojis: allowAllEmojis,
334
336
  pickerQuickReactionEmojiIds: pickerQuickReactionEmojiIds,
@@ -337,13 +339,14 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
337
339
  onOpen: handlePickerOpen,
338
340
  onCancel: handleOnCancel,
339
341
  onShowMore: handleOnMore,
340
- tooltipContent: getTooltip(status, errorMessage, reactionPickerTriggerToolipContent),
342
+ tooltipContent: getTooltip(status, errorMessage, reactionPickerTriggerTooltipContent),
341
343
  emojiPickerSize: emojiPickerSize,
342
344
  miniMode: miniMode,
343
345
  showOpaqueBackground: showOpaqueBackground,
344
346
  showAddReactionText: showAddReactionText,
345
347
  subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
346
348
  reactionPickerTriggerIcon: reactionPickerTriggerIcon,
349
+ reactionPickerTriggerText: reactionPickerTriggerText,
347
350
  className: ax(["_1e0c1o8l _19pk1b66"])
348
351
  }), /*#__PURE__*/React.createElement(ModalTransition, null, !!selectedEmojiId && /*#__PURE__*/React.createElement(UFOSegment, {
349
352
  name: "reactions-dialog"
@@ -8,8 +8,10 @@
8
8
  ._1h6dmuej{border-color:var(--ds-border,#091e4224)}
9
9
  ._18u01b66{margin-left:var(--ds-space-050,4px)}
10
10
  ._19bv1b66{padding-left:var(--ds-space-050,4px)}
11
+ ._19bvu2gc{padding-left:var(--ds-space-100,8px)}
11
12
  ._19bvze3t{padding-left:var(--ds-space-0,0)}
12
13
  ._1bah1h6o{justify-content:center}
14
+ ._1bsb1osq{width:100%}
13
15
  ._1bsbviql{width:2rem}
14
16
  ._1e0c1txw{display:flex}
15
17
  ._1ul9146b{min-width:110px}
@@ -24,9 +26,11 @@
24
26
  ._ca0q1b66{padding-top:var(--ds-space-050,4px)}
25
27
  ._ca0qze3t{padding-top:var(--ds-space-0,0)}
26
28
  ._n3td1b66{padding-bottom:var(--ds-space-050,4px)}
29
+ ._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
27
30
  ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
28
31
  ._syaz1gjq{color:var(--ds-text-subtle,#44546f)}
29
32
  ._u5f31b66{padding-right:var(--ds-space-050,4px)}
33
+ ._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
30
34
  ._u5f3ze3t{padding-right:var(--ds-space-0,0)}
31
35
  ._irr3108i:hover{background-color:var(--ds-surface-hovered,#f1f2f4)}
32
36
  ._irr3166n:hover{background-color:var(--ds-background-neutral-subtle-hovered,#091e420f)}
@@ -18,7 +18,9 @@ var styles = {
18
18
  transparentEnabledTrigger: "_1h6dmuej _bfhksm61 _irr3166n _1di61dty",
19
19
  opaqueEnabledTrigger: "_1h6dmuej _bfhkvuon _irr3108i _1di61ji5",
20
20
  disabledTrigger: "_1h6d13gt _bfhksyzs",
21
- miniMode: "_2rkoglpi _1dqoglyw _1ul91tcg _ca0q1b66 _u5f31b66 _n3td1b66 _19bv1b66"
21
+ miniMode: "_2rkoglpi _1dqoglyw _1ul91tcg _ca0q1b66 _u5f31b66 _n3td1b66 _19bv1b66",
22
+ fullWidthSummaryViewReactionPickerTrigger: "_1bsb1osq _19bvu2gc _u5f3u2gc _n3tdu2gc",
23
+ fullWidth: "_1bsb1osq"
22
24
  };
23
25
 
24
26
  /**
@@ -26,6 +28,7 @@ var styles = {
26
28
  */
27
29
  export var RENDER_TOOLTIP_TRIGGER_TESTID = 'render-tooltip-trigger';
28
30
  export var RENDER_TRIGGER_BUTTON_TESTID = 'render-trigger-button';
31
+ export var RENDER_TRIGGER_CONTAINER_TESTID = 'render-trigger-container';
29
32
  var i18n = defineMessages({
30
33
  addReaction: {
31
34
  id: 'reaction-picker-trigger.add.reaction.message',
@@ -58,18 +61,25 @@ export var Trigger = /*#__PURE__*/React.forwardRef(function (props, ref) {
58
61
  subtleReactionsSummaryAndPicker = _props$subtleReaction === void 0 ? false : _props$subtleReaction,
59
62
  _props$showRoundTrigg = props.showRoundTrigger,
60
63
  showRoundTrigger = _props$showRoundTrigg === void 0 ? false : _props$showRoundTrigg,
61
- reactionPickerTriggerIcon = props.reactionPickerTriggerIcon;
64
+ reactionPickerTriggerIcon = props.reactionPickerTriggerIcon,
65
+ _props$reactionPicker = props.reactionPickerTriggerText,
66
+ reactionPickerTriggerText = _props$reactionPicker === void 0 ? formatMessage(i18n.addReaction) : _props$reactionPicker,
67
+ _props$fullWidthSumma = props.fullWidthSummaryViewReactionPickerTrigger,
68
+ fullWidthSummaryViewReactionPickerTrigger = _props$fullWidthSumma === void 0 ? false : _props$fullWidthSumma;
62
69
  var handleMouseDown = function handleMouseDown(e, analyticsEvent) {
63
70
  if (onClick && !disabled) {
64
71
  onClick(e, analyticsEvent);
65
72
  }
66
73
  };
67
- return /*#__PURE__*/React.createElement(Tooltip, {
74
+ return /*#__PURE__*/React.createElement(Box, {
75
+ xcss: cx(fullWidthSummaryViewReactionPickerTrigger && styles.fullWidthSummaryViewReactionPickerTrigger),
76
+ testId: RENDER_TRIGGER_CONTAINER_TESTID
77
+ }, /*#__PURE__*/React.createElement(Tooltip, {
68
78
  testId: RENDER_TOOLTIP_TRIGGER_TESTID,
69
79
  content: tooltipContent
70
80
  }, /*#__PURE__*/React.createElement(Pressable, _extends({
71
81
  testId: RENDER_TRIGGER_BUTTON_TESTID,
72
- xcss: cx(styles.trigger, subtleReactionsSummaryAndPicker && styles.subtleTrigger, showAddReactionText && styles.expandedTrigger, disabled ? styles.disabledTrigger : showOpaqueBackground ? styles.opaqueEnabledTrigger : styles.transparentEnabledTrigger, miniMode && styles.miniMode,
82
+ xcss: cx(styles.trigger, fullWidthSummaryViewReactionPickerTrigger && styles.fullWidth, subtleReactionsSummaryAndPicker && styles.subtleTrigger, showAddReactionText && styles.expandedTrigger, disabled ? styles.disabledTrigger : showOpaqueBackground ? styles.opaqueEnabledTrigger : styles.transparentEnabledTrigger, miniMode && styles.miniMode,
73
83
  // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
74
84
  fg('platform-component-visual-refresh') && styles.triggerStylesRefresh, showRoundTrigger && styles.roundTrigger),
75
85
  style: {
@@ -91,5 +101,5 @@ export var Trigger = /*#__PURE__*/React.forwardRef(function (props, ref) {
91
101
  label: "Add reaction"
92
102
  }), showAddReactionText && /*#__PURE__*/React.createElement(Box, {
93
103
  xcss: cx(addReactionStyles.addReactionMessage)
94
- }, formatMessage(i18n.addReaction))));
104
+ }, reactionPickerTriggerText))));
95
105
  });
@@ -84,6 +84,10 @@ export interface ReactionPickerProps extends Pick<SelectorProps, 'pickerQuickRea
84
84
  * Optional prop for controlling icon inside Trigger
85
85
  */
86
86
  reactionPickerTriggerIcon?: React.ReactNode;
87
+ /**
88
+ * Optional prop for controlling text of the trigger button
89
+ */
90
+ reactionPickerTriggerText?: string;
87
91
  }
88
92
  /**
89
93
  * Picker component for adding reactions
@@ -17,10 +17,6 @@ interface ReactionSummaryButtonProps extends Pick<ReactionsProps, 'emojiProvider
17
17
  * Optional prop for applying subtle styling to reaction summary button
18
18
  */
19
19
  subtleReactionsSummaryAndPicker?: boolean;
20
- /**
21
- * Optional prop to apply compact styling
22
- */
23
- useCompactStyles?: boolean;
24
20
  }
25
21
  /**
26
22
  * Test id for summary reaction wrapper button
@@ -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' | 'useButtonAlignmentStyling'>, Pick<TriggerProps, 'tooltipContent' | 'reactionPickerTriggerIcon' | 'disabled'> {
10
+ interface ReactionSummaryViewProps extends Pick<ReactionsProps, 'emojiProvider' | 'reactions' | 'flash' | 'particleEffectByEmoji' | 'allowUserDialog' | 'allowSelectFromSummaryView' | 'emojiPickerSize' | 'useButtonAlignmentStyling' | 'reactionPickerTriggerText'>, 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, useButtonAlignmentStyling, }: ReactionSummaryViewProps) => 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, reactionPickerTriggerText, }: ReactionSummaryViewProps) => JSX.Element;
58
58
  export {};
@@ -2,5 +2,5 @@ import React from 'react';
2
2
  import { type ReactionPickerProps } from './ReactionPicker';
3
3
  interface ReactionSummaryViewEmojiPickerProps extends ReactionPickerProps {
4
4
  }
5
- export declare const ReactionSummaryViewEmojiPicker: ({ emojiProvider, onSelection, emojiPickerSize, disabled, reactionPickerTriggerIcon, tooltipContent, onOpen, }: ReactionSummaryViewEmojiPickerProps) => React.JSX.Element;
5
+ export declare const ReactionSummaryViewEmojiPicker: ({ emojiProvider, onSelection, emojiPickerSize, disabled, reactionPickerTriggerIcon, tooltipContent, onOpen, reactionPickerTriggerText, }: ReactionSummaryViewEmojiPickerProps) => React.JSX.Element;
6
6
  export {};
@@ -152,11 +152,15 @@ export interface ReactionsProps extends Pick<ReactionPickerProps, 'allowAllEmoji
152
152
  /**
153
153
  * Optional prop for controlling tooltip content of the trigger button
154
154
  */
155
- reactionPickerTriggerToolipContent?: string;
155
+ reactionPickerTriggerTooltipContent?: string;
156
156
  /**
157
157
  * Optional prop for controlling if we can select emojis and display UI via summary view picker
158
158
  */
159
159
  allowSelectFromSummaryView?: boolean;
160
+ /**
161
+ * Optional prop for controlling text of the trigger button
162
+ */
163
+ reactionPickerTriggerText?: string;
160
164
  }
161
165
  export interface OpenReactionsDialogOptions {
162
166
  emojiId?: string;
@@ -169,4 +173,4 @@ export declare function getTooltip(status: ReactionStatus, errorMessage?: string
169
173
  /**
170
174
  * Renders list of reactions
171
175
  */
172
- 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, isViewOnly, noWrap, noRelativeContainer, showSubtleDefaultReactions, reactionPickerTriggerToolipContent, reactionPickerTriggerIcon, allowSelectFromSummaryView, useButtonAlignmentStyling, }: ReactionsProps) => JSX.Element>;
176
+ 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, isViewOnly, noWrap, noRelativeContainer, showSubtleDefaultReactions, reactionPickerTriggerTooltipContent, reactionPickerTriggerIcon, allowSelectFromSummaryView, useButtonAlignmentStyling, reactionPickerTriggerText, }: ReactionsProps) => JSX.Element>;
@@ -10,6 +10,7 @@ import React from 'react';
10
10
  */
11
11
  export declare const RENDER_TOOLTIP_TRIGGER_TESTID = "render-tooltip-trigger";
12
12
  export declare const RENDER_TRIGGER_BUTTON_TESTID = "render-trigger-button";
13
+ export declare const RENDER_TRIGGER_CONTAINER_TESTID = "render-trigger-container";
13
14
  export interface TriggerProps {
14
15
  /**
15
16
  * Optional Event handler when the button to open the picker is clicked
@@ -57,6 +58,14 @@ export interface TriggerProps {
57
58
  * Optional prop for controlling if reaction picker is opened
58
59
  */
59
60
  isSelected?: boolean;
61
+ /**
62
+ * Optional prop for controlling text inside Trigger
63
+ */
64
+ reactionPickerTriggerText?: string;
65
+ /**
66
+ * Optional prop for controlling if the summary view reaction picker trigger should be full width
67
+ */
68
+ fullWidthSummaryViewReactionPickerTrigger?: boolean;
60
69
  }
61
70
  /**
62
71
  * Render an emoji button to open the reactions select picker
@@ -84,6 +84,10 @@ export interface ReactionPickerProps extends Pick<SelectorProps, 'pickerQuickRea
84
84
  * Optional prop for controlling icon inside Trigger
85
85
  */
86
86
  reactionPickerTriggerIcon?: React.ReactNode;
87
+ /**
88
+ * Optional prop for controlling text of the trigger button
89
+ */
90
+ reactionPickerTriggerText?: string;
87
91
  }
88
92
  /**
89
93
  * Picker component for adding reactions
@@ -17,10 +17,6 @@ interface ReactionSummaryButtonProps extends Pick<ReactionsProps, 'emojiProvider
17
17
  * Optional prop for applying subtle styling to reaction summary button
18
18
  */
19
19
  subtleReactionsSummaryAndPicker?: boolean;
20
- /**
21
- * Optional prop to apply compact styling
22
- */
23
- useCompactStyles?: boolean;
24
20
  }
25
21
  /**
26
22
  * Test id for summary reaction wrapper button
@@ -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' | 'useButtonAlignmentStyling'>, Pick<TriggerProps, 'tooltipContent' | 'reactionPickerTriggerIcon' | 'disabled'> {
10
+ interface ReactionSummaryViewProps extends Pick<ReactionsProps, 'emojiProvider' | 'reactions' | 'flash' | 'particleEffectByEmoji' | 'allowUserDialog' | 'allowSelectFromSummaryView' | 'emojiPickerSize' | 'useButtonAlignmentStyling' | 'reactionPickerTriggerText'>, 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, useButtonAlignmentStyling, }: ReactionSummaryViewProps) => 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, reactionPickerTriggerText, }: ReactionSummaryViewProps) => JSX.Element;
58
58
  export {};
@@ -2,5 +2,5 @@ import React from 'react';
2
2
  import { type ReactionPickerProps } from './ReactionPicker';
3
3
  interface ReactionSummaryViewEmojiPickerProps extends ReactionPickerProps {
4
4
  }
5
- export declare const ReactionSummaryViewEmojiPicker: ({ emojiProvider, onSelection, emojiPickerSize, disabled, reactionPickerTriggerIcon, tooltipContent, onOpen, }: ReactionSummaryViewEmojiPickerProps) => React.JSX.Element;
5
+ export declare const ReactionSummaryViewEmojiPicker: ({ emojiProvider, onSelection, emojiPickerSize, disabled, reactionPickerTriggerIcon, tooltipContent, onOpen, reactionPickerTriggerText, }: ReactionSummaryViewEmojiPickerProps) => React.JSX.Element;
6
6
  export {};
@@ -152,11 +152,15 @@ export interface ReactionsProps extends Pick<ReactionPickerProps, 'allowAllEmoji
152
152
  /**
153
153
  * Optional prop for controlling tooltip content of the trigger button
154
154
  */
155
- reactionPickerTriggerToolipContent?: string;
155
+ reactionPickerTriggerTooltipContent?: string;
156
156
  /**
157
157
  * Optional prop for controlling if we can select emojis and display UI via summary view picker
158
158
  */
159
159
  allowSelectFromSummaryView?: boolean;
160
+ /**
161
+ * Optional prop for controlling text of the trigger button
162
+ */
163
+ reactionPickerTriggerText?: string;
160
164
  }
161
165
  export interface OpenReactionsDialogOptions {
162
166
  emojiId?: string;
@@ -169,4 +173,4 @@ export declare function getTooltip(status: ReactionStatus, errorMessage?: string
169
173
  /**
170
174
  * Renders list of reactions
171
175
  */
172
- 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, isViewOnly, noWrap, noRelativeContainer, showSubtleDefaultReactions, reactionPickerTriggerToolipContent, reactionPickerTriggerIcon, allowSelectFromSummaryView, useButtonAlignmentStyling, }: ReactionsProps) => JSX.Element>;
176
+ 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, isViewOnly, noWrap, noRelativeContainer, showSubtleDefaultReactions, reactionPickerTriggerTooltipContent, reactionPickerTriggerIcon, allowSelectFromSummaryView, useButtonAlignmentStyling, reactionPickerTriggerText, }: ReactionsProps) => JSX.Element>;
@@ -10,6 +10,7 @@ import React from 'react';
10
10
  */
11
11
  export declare const RENDER_TOOLTIP_TRIGGER_TESTID = "render-tooltip-trigger";
12
12
  export declare const RENDER_TRIGGER_BUTTON_TESTID = "render-trigger-button";
13
+ export declare const RENDER_TRIGGER_CONTAINER_TESTID = "render-trigger-container";
13
14
  export interface TriggerProps {
14
15
  /**
15
16
  * Optional Event handler when the button to open the picker is clicked
@@ -57,6 +58,14 @@ export interface TriggerProps {
57
58
  * Optional prop for controlling if reaction picker is opened
58
59
  */
59
60
  isSelected?: boolean;
61
+ /**
62
+ * Optional prop for controlling text inside Trigger
63
+ */
64
+ reactionPickerTriggerText?: string;
65
+ /**
66
+ * Optional prop for controlling if the summary view reaction picker trigger should be full width
67
+ */
68
+ fullWidthSummaryViewReactionPickerTrigger?: boolean;
60
69
  }
61
70
  /**
62
71
  * Render an emoji button to open the reactions select picker
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/reactions",
3
- "version": "30.0.8",
3
+ "version": "31.0.0",
4
4
  "description": "Reactions component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"