@atlaskit/reactions 24.6.0 → 24.8.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 (45) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/cjs/analytics/index.js +1 -1
  3. package/dist/cjs/components/ReactionDialog/ReactionView.js +76 -58
  4. package/dist/cjs/components/ReactionDialog/ReactionsDialog.js +42 -81
  5. package/dist/cjs/components/ReactionDialog/ReactionsDialogHeader.js +205 -0
  6. package/dist/cjs/components/ReactionDialog/ReactionsList.js +12 -97
  7. package/dist/cjs/components/ReactionDialog/styles.js +4 -76
  8. package/dist/cjs/components/ReactionSummary/ReactionSummaryView.js +11 -4
  9. package/dist/cjs/components/Reactions/Reactions.js +23 -16
  10. package/dist/cjs/components/Reactions/styles.js +1 -12
  11. package/dist/es2019/analytics/index.js +1 -1
  12. package/dist/es2019/components/ReactionDialog/ReactionView.js +78 -60
  13. package/dist/es2019/components/ReactionDialog/ReactionsDialog.js +30 -64
  14. package/dist/es2019/components/ReactionDialog/ReactionsDialogHeader.js +188 -0
  15. package/dist/es2019/components/ReactionDialog/ReactionsList.js +12 -83
  16. package/dist/es2019/components/ReactionDialog/styles.js +4 -72
  17. package/dist/es2019/components/ReactionSummary/ReactionSummaryView.js +12 -5
  18. package/dist/es2019/components/Reactions/Reactions.js +20 -16
  19. package/dist/es2019/components/Reactions/styles.js +0 -11
  20. package/dist/esm/analytics/index.js +1 -1
  21. package/dist/esm/components/ReactionDialog/ReactionView.js +79 -61
  22. package/dist/esm/components/ReactionDialog/ReactionsDialog.js +44 -82
  23. package/dist/esm/components/ReactionDialog/ReactionsDialogHeader.js +196 -0
  24. package/dist/esm/components/ReactionDialog/ReactionsList.js +11 -91
  25. package/dist/esm/components/ReactionDialog/styles.js +4 -76
  26. package/dist/esm/components/ReactionSummary/ReactionSummaryView.js +12 -5
  27. package/dist/esm/components/Reactions/Reactions.js +23 -17
  28. package/dist/esm/components/Reactions/styles.js +0 -11
  29. package/dist/types/components/ReactionDialog/ReactionsDialogHeader.d.ts +15 -0
  30. package/dist/types/components/ReactionDialog/ReactionsList.d.ts +7 -7
  31. package/dist/types/components/ReactionDialog/styles.d.ts +0 -3
  32. package/dist/types/components/ReactionPicker/RepositionOnUpdate.d.ts +1 -1
  33. package/dist/types/components/ReactionSummary/ReactionSummaryView.d.ts +2 -2
  34. package/dist/types/components/Reactions/styles.d.ts +0 -1
  35. package/dist/types/containers/ConnectedReactionPicker/ConnectedReactionPicker.d.ts +1 -1
  36. package/dist/types/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts +1 -1
  37. package/dist/types-ts4.5/components/ReactionDialog/ReactionsDialogHeader.d.ts +15 -0
  38. package/dist/types-ts4.5/components/ReactionDialog/ReactionsList.d.ts +7 -7
  39. package/dist/types-ts4.5/components/ReactionDialog/styles.d.ts +0 -3
  40. package/dist/types-ts4.5/components/ReactionPicker/RepositionOnUpdate.d.ts +1 -1
  41. package/dist/types-ts4.5/components/ReactionSummary/ReactionSummaryView.d.ts +2 -2
  42. package/dist/types-ts4.5/components/Reactions/styles.d.ts +0 -1
  43. package/dist/types-ts4.5/containers/ConnectedReactionPicker/ConnectedReactionPicker.d.ts +1 -1
  44. package/dist/types-ts4.5/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts +1 -1
  45. package/package.json +6 -3
@@ -1,106 +1,26 @@
1
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
1
  /**
3
2
  * @jsxRuntime classic
4
3
  * @jsx jsx
5
4
  */
6
- import { useCallback, useState, useEffect } from 'react';
7
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
6
  import { jsx } from '@emotion/react';
9
- import { ResourcedEmoji } from '@atlaskit/emoji/element';
10
- import Tabs, { Tab, TabList } from '@atlaskit/tabs';
11
- import { useThemeObserver } from '@atlaskit/tokens';
12
- import { Box, Flex, xcss } from '@atlaskit/primitives';
13
- import { Counter } from '../Counter';
14
- import { customTabWrapper, customTabListStyles } from './styles';
15
7
  import { ReactionView } from './ReactionView';
16
- var emojiStyles = xcss({
17
- minWidth: '36px'
18
- });
19
8
  export var ReactionsList = function ReactionsList(_ref) {
20
9
  var reactions = _ref.reactions,
21
- initialEmojiId = _ref.initialEmojiId,
10
+ selectedEmojiId = _ref.selectedEmojiId,
22
11
  emojiProvider = _ref.emojiProvider,
23
- onReactionChanged = _ref.onReactionChanged,
24
12
  ProfileCardWrapper = _ref.ProfileCardWrapper;
25
- var _useState = useState(function () {
26
- // Calculate this only on initialize the List of Tabs and each Reactions View collection
27
- return {
28
- index: reactions.findIndex(function (reaction) {
29
- return reaction.emojiId === initialEmojiId;
30
- }),
31
- id: initialEmojiId
32
- };
33
- }),
34
- _useState2 = _slicedToArray(_useState, 2),
35
- selectedEmoji = _useState2[0],
36
- setSelectedEmoji = _useState2[1];
37
- var _useThemeObserver = useThemeObserver(),
38
- colorMode = _useThemeObserver.colorMode;
39
- useEffect(function () {
40
- // select first emoji when navigating to a new page
41
- var currentPageEmojis = reactions.map(function (reaction) {
42
- return reaction.emojiId;
43
- });
44
- if (!currentPageEmojis.includes(selectedEmoji.id)) {
45
- setSelectedEmoji({
46
- index: 0,
47
- id: initialEmojiId
13
+ return jsx("div", null, reactions.map(function (reaction) {
14
+ if (reaction.emojiId === selectedEmojiId) {
15
+ return jsx(ReactionView, {
16
+ key: reaction.emojiId,
17
+ reaction: reaction,
18
+ selectedEmojiId: selectedEmojiId,
19
+ emojiProvider: emojiProvider,
20
+ ProfileCardWrapper: ProfileCardWrapper
48
21
  });
22
+ } else {
23
+ return null;
49
24
  }
50
- // eslint-disable-next-line react-hooks/exhaustive-deps
51
- }, [reactions, initialEmojiId]);
52
- var onTabChange = useCallback(function (index, analyticsEvent) {
53
- if (index === selectedEmoji.index) {
54
- return;
55
- }
56
- var emojiId = reactions[index].emojiId;
57
- setSelectedEmoji({
58
- index: index,
59
- id: emojiId
60
- });
61
- onReactionChanged(emojiId, analyticsEvent);
62
- }, [selectedEmoji.index, reactions, onReactionChanged]);
63
- return jsx(Tabs, {
64
- id: "reactions-dialog-tabs",
65
- onChange: onTabChange,
66
- selected: selectedEmoji.index
67
- }, jsx("div", {
68
- css: customTabListStyles,
69
- id: "reactions-dialog-tabs-list"
70
- }, jsx(TabList, null, reactions.map(function (reaction) {
71
- var emojiId = {
72
- id: reaction.emojiId,
73
- shortName: ''
74
- };
75
- return jsx("div", {
76
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
77
- css: customTabWrapper((emojiId === null || emojiId === void 0 ? void 0 : emojiId.id) === selectedEmoji.id, selectedEmoji.id, colorMode)
78
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
79
- ,
80
- className: "reaction-elements",
81
- key: reaction.emojiId,
82
- "data-testid": emojiId === null || emojiId === void 0 ? void 0 : emojiId.id
83
- }, jsx(Tab, null, jsx(Flex, {
84
- justifyContent: "center",
85
- alignItems: "center",
86
- direction: "row"
87
- }, jsx(Box, {
88
- xcss: emojiStyles
89
- }, jsx(ResourcedEmoji, {
90
- emojiProvider: emojiProvider,
91
- emojiId: emojiId,
92
- fitToHeight: 16,
93
- showTooltip: true
94
- })), jsx(Counter, {
95
- value: reaction.count
96
- }))));
97
- }))), reactions.map(function (reaction) {
98
- return jsx(ReactionView, {
99
- key: reaction.emojiId,
100
- reaction: reaction,
101
- selectedEmojiId: selectedEmoji.id,
102
- emojiProvider: emojiProvider,
103
- ProfileCardWrapper: ProfileCardWrapper
104
- });
105
25
  }));
106
26
  };
@@ -4,10 +4,7 @@
4
4
  */
5
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
6
  import { css } from '@emotion/react';
7
- import { N500, N800 } from '@atlaskit/theme/colors';
8
- var REACTIONS_CONTAINER_WIDTH = 48;
9
- var REACTION_CONTAINER_HEIGHT = 40;
10
-
7
+ import { N500 } from '@atlaskit/theme/colors';
11
8
  /*Reactions Container. Using pseudo Element :after to set border since with onClick of Reaction to higlight the
12
9
  border blue below the reaction. Setting Border Width based on number of reactions to make sure it shows up
13
10
  in case the container overflows */
@@ -32,55 +29,6 @@ export var containerStyle = function containerStyle(reactionsBorderWidth) {
32
29
  }
33
30
  });
34
31
  };
35
- var containerEdgeAngle = {
36
- rightEdge: 270,
37
- leftEdge: 90
38
- };
39
- var fadedCss = function fadedCss(edge, theme) {
40
- return css({
41
- content: '""',
42
- position: 'absolute',
43
- left: '0px',
44
- top: '0px',
45
- width: "".concat(REACTIONS_CONTAINER_WIDTH, "px"),
46
- height: "".concat(REACTION_CONTAINER_HEIGHT, "px"),
47
- zIndex: 0,
48
- background:
49
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
50
- theme === 'dark' ? "linear-gradient(".concat(containerEdgeAngle[edge], "deg, rgba(34, 39, 43, 0.95) 40.23%, rgba(34, 39, 43, 0.55) 58.33%, rgba(34, 39, 43, 0) 77.49%)") : "linear-gradient(".concat(containerEdgeAngle[edge], "deg, rgba(255, 255, 255, 0.95) 40.23%, rgba(255, 255, 255, 0.55) 58.33%, rgba(255, 255, 255, 0) 77.49%)")
51
- });
52
- };
53
- export var customTabWrapper = function customTabWrapper(isSelected, selectedEmojiId, theme) {
54
- return css({
55
- flexShrink: 0,
56
- display: 'flex',
57
- flexDirection: 'column',
58
- textAlign: 'center',
59
- alignItems: 'center',
60
- justifyContent: 'center',
61
- minWidth: "".concat(REACTIONS_CONTAINER_WIDTH, "px"),
62
- boxSizing: 'border-box',
63
- position: 'relative',
64
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
65
- '> div': {
66
- minWidth: "".concat(REACTIONS_CONTAINER_WIDTH, "px"),
67
- minHeight: "".concat(REACTION_CONTAINER_HEIGHT, "px"),
68
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
69
- padding: '0px !important',
70
- alignItems: 'center',
71
- justifyContent: 'center'
72
- },
73
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
74
- '& > span': {
75
- minHeight: '16px',
76
- minWidth: '16px'
77
- },
78
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
79
- '&.disabled:after': fadedCss('rightEdge', theme),
80
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
81
- '&.disabled + &.disabled:after': fadedCss('leftEdge', theme)
82
- });
83
- };
84
32
 
85
33
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
86
34
  export var navigationContainerStyle = css({
@@ -94,26 +42,6 @@ export var navigationContainerStyle = css({
94
42
  }
95
43
  });
96
44
 
97
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
98
- export var reactionViewStyle = css({
99
- marginTop: "var(--ds-space-300, 24px)",
100
- display: 'flex',
101
- flexDirection: 'column',
102
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
103
- p: {
104
- margin: 0,
105
- color: "".concat("var(--ds-text, ".concat(N800, ")")),
106
- font: "var(--ds-font-body-large, normal 400 16px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
107
- fontWeight: "var(--ds-font-weight-semibold, 600)",
108
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
109
- lineHeight: '20px',
110
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
111
- '> span': {
112
- marginRight: "var(--ds-space-100, 8px)"
113
- }
114
- }
115
- });
116
-
117
45
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
118
46
  export var userListStyle = css({
119
47
  listStyle: 'none',
@@ -131,7 +59,7 @@ export var userListStyle = css({
131
59
  export var userStyle = css({
132
60
  display: 'flex',
133
61
  alignItems: 'center',
134
- padding: "var(--ds-space-100, 8px)".concat(" 0px ", "var(--ds-space-100, 8px)", " 0px"),
62
+ padding: "var(--ds-space-050, 4px)".concat(" 0px ", "var(--ds-space-050, 4px)", " 0px"),
135
63
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
136
64
  '> span': {
137
65
  marginLeft: "var(--ds-space-200, 16px)"
@@ -142,7 +70,6 @@ export var userStyle = css({
142
70
  export var customTabListStyles = css({
143
71
  overflow: 'auto',
144
72
  display: 'flex',
145
- paddingBottom: "var(--ds-space-050, 4px)",
146
73
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
147
74
  'div[role=tablist]': {
148
75
  flexGrow: 1,
@@ -156,5 +83,6 @@ export var centerSpinner = css({
156
83
  display: 'flex',
157
84
  justifyContent: 'center',
158
85
  alignItems: 'center',
159
- height: '100%'
86
+ height: '100%',
87
+ marginTop: "var(--ds-space-300, 24px)"
160
88
  });
@@ -3,7 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import React, { useCallback, useState } from 'react';
4
4
  import { FormattedMessage } from 'react-intl-next';
5
5
  import Popup from '@atlaskit/popup';
6
- import { Inline, Text, xcss } from '@atlaskit/primitives';
6
+ import { Box, Inline, Text, xcss } from '@atlaskit/primitives';
7
7
  import Button from '@atlaskit/button/new';
8
8
  import { Reaction } from '../Reaction';
9
9
  import { ReactionSummaryButton } from './ReactionSummaryButton';
@@ -13,6 +13,9 @@ var summaryPopupStyles = xcss({
13
13
  paddingTop: 'space.050',
14
14
  maxWidth: '325px'
15
15
  });
16
+ var viewAllButtonStyling = xcss({
17
+ marginTop: 'space.050'
18
+ });
16
19
 
17
20
  /**
18
21
  * Test id for the Reactions summary view popup
@@ -54,7 +57,8 @@ export var ReactionSummaryView = function ReactionSummaryView(_ref) {
54
57
  xcss: summaryPopupStyles,
55
58
  testId: RENDER_SUMMARY_VIEW_POPUP_TESTID,
56
59
  space: "space.025",
57
- shouldWrap: true
60
+ shouldWrap: true,
61
+ alignBlock: "center"
58
62
  }, reactions.map(function (reaction) {
59
63
  return /*#__PURE__*/React.createElement(Reaction, {
60
64
  key: reaction.emojiId,
@@ -66,15 +70,18 @@ export var ReactionSummaryView = function ReactionSummaryView(_ref) {
66
70
  flash: flash[reaction.emojiId],
67
71
  showParticleEffect: particleEffectByEmoji[reaction.emojiId]
68
72
  });
69
- }), allowUserDialog && /*#__PURE__*/React.createElement(Button, {
73
+ }), allowUserDialog && /*#__PURE__*/React.createElement(Box, {
74
+ xcss: viewAllButtonStyling
75
+ }, /*#__PURE__*/React.createElement(Button, {
70
76
  appearance: "subtle",
71
77
  onClick: function onClick() {
72
78
  return handleOpenReactionsDialog === null || handleOpenReactionsDialog === void 0 ? void 0 : handleOpenReactionsDialog(reactions[0].emojiId);
73
- }
79
+ },
80
+ spacing: "compact"
74
81
  }, /*#__PURE__*/React.createElement(Text, {
75
82
  color: "color.text.subtlest",
76
83
  weight: "medium"
77
- }, /*#__PURE__*/React.createElement(FormattedMessage, messages.seeWhoReacted))));
84
+ }, /*#__PURE__*/React.createElement(FormattedMessage, messages.seeWhoReacted)))));
78
85
  },
79
86
  isOpen: isSummaryPopupOpen,
80
87
  onClose: handlePopupClose,
@@ -1,3 +1,4 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
1
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
3
  /**
3
4
  * @jsxRuntime classic
@@ -9,8 +10,10 @@ import { jsx } from '@emotion/react';
9
10
  import { FormattedMessage } from 'react-intl-next';
10
11
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
11
12
  import { ModalTransition } from '@atlaskit/modal-dialog';
12
- import Button from '@atlaskit/button/standard-button';
13
+ import Button from '@atlaskit/button/new';
13
14
  import Tooltip from '@atlaskit/tooltip';
15
+ import { Box, xcss } from '@atlaskit/primitives';
16
+ import { fg } from '@atlaskit/platform-feature-flags';
14
17
  import { createAndFireSafe, createPickerButtonClickedEvent, createPickerCancelledEvent, createPickerMoreClickedEvent, createReactionsRenderedEvent, createReactionSelectionEvent, isSampled } from '../../analytics';
15
18
  import { SAMPLING_RATE_REACTIONS_RENDERED_EXP } from '../../shared/constants';
16
19
  import { messages } from '../../shared/i18n';
@@ -20,7 +23,10 @@ import { Reaction } from '../Reaction';
20
23
  import { ReactionsDialog } from '../ReactionDialog';
21
24
  import { ReactionPicker } from '../ReactionPicker';
22
25
  import { ReactionSummaryView } from '../ReactionSummary/';
23
- import { reactionPickerStyle, seeWhoReactedStyle, wrapperStyle } from './styles';
26
+ import { reactionPickerStyle, wrapperStyle } from './styles';
27
+ var tooltipStyle = xcss({
28
+ paddingLeft: 'space.050'
29
+ });
24
30
 
25
31
  /**
26
32
  * Set of all available UFO experiences relating to reactions dialog
@@ -136,7 +142,8 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
136
142
  if (status !== ReactionStatus.ready) {
137
143
  renderTime.current = Date.now();
138
144
  } else {
139
- if (isSampled(SAMPLING_RATE_REACTIONS_RENDERED_EXP)) {
145
+ var isSSR = process.env.REACT_SSR && fg('platform_fix_analytics_error');
146
+ if (isSampled(SAMPLING_RATE_REACTIONS_RENDERED_EXP) && !isSSR) {
140
147
  var _renderTime$current;
141
148
  createAndFireSafe(createAnalyticsEvent, createReactionsRenderedEvent, (_renderTime$current = renderTime.current) !== null && _renderTime$current !== void 0 ? _renderTime$current : Date.now() //renderTime.current can be null during unit test cases
142
149
  );
@@ -227,6 +234,7 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
227
234
  // ufo selected reaction inside the modal dialog
228
235
  ufoExperiences.selectedReactionChangeInsideDialog.start();
229
236
  handleReactionMouseEnter(emojiId);
237
+ setSelectedEmojiId(emojiId);
230
238
  if (analyticsEvent) {
231
239
  onDialogSelectReactionCallback(emojiId, analyticsEvent);
232
240
  }
@@ -304,7 +312,7 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
304
312
  showOpaqueBackground: showOpaqueBackground,
305
313
  subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
306
314
  handleOpenReactionsDialog: handleOpenReactionsDialog,
307
- allowUserDialog: allowUserDialog
315
+ allowUserDialog: allowUserDialog && hasEmojiWithFivePlusReactions
308
316
  })) : memorizedReactions.map(function (reaction) {
309
317
  return jsx(Reaction, {
310
318
  key: reaction.emojiId,
@@ -335,21 +343,19 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
335
343
  showOpaqueBackground: showOpaqueBackground,
336
344
  showAddReactionText: showAddReactionText,
337
345
  subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker
338
- }), allowUserDialog && hasEmojiWithFivePlusReactions && !shouldShowSummaryView && jsx(Tooltip, {
346
+ }), allowUserDialog && hasEmojiWithFivePlusReactions && !shouldShowSummaryView && jsx(Box, {
347
+ xcss: tooltipStyle
348
+ }, jsx(Tooltip, {
339
349
  content: jsx(FormattedMessage, messages.seeWhoReactedTooltip),
340
350
  hideTooltipOnClick: true
341
- }, jsx(Button
342
- // TODO: (from codemod) "link" and "subtle-link" appearances are only available in LinkButton, please either provide a href prop then migrate to LinkButton, or remove the appearance from the default button.
343
- // https://product-fabric.atlassian.net/browse/DSP-18982
344
- , {
345
- appearance: "subtle-link",
346
- onClick: handleOpenAllReactionsDialog
347
- // TODO: (from codemod) Buttons with "component", "css" or "style" prop can't be automatically migrated with codemods. Please migrate it manually.
348
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
349
- ,
350
- css: seeWhoReactedStyle,
351
- testId: RENDER_VIEWALL_REACTED_USERS_DIALOG
352
- }, jsx(FormattedMessage, messages.seeWhoReacted))), jsx(ModalTransition, null, !!selectedEmojiId && jsx(ReactionsDialog, {
351
+ }, function (tooltipProps) {
352
+ return jsx(Button, _extends({}, tooltipProps, {
353
+ appearance: "subtle",
354
+ spacing: "compact",
355
+ onClick: handleOpenAllReactionsDialog,
356
+ testId: RENDER_VIEWALL_REACTED_USERS_DIALOG
357
+ }), jsx(FormattedMessage, messages.seeWhoReacted));
358
+ })), jsx(ModalTransition, null, !!selectedEmojiId && jsx(ReactionsDialog, {
353
359
  selectedEmojiId: selectedEmojiId,
354
360
  reactions: memorizedReactions,
355
361
  emojiProvider: emojiProvider,
@@ -10,17 +10,6 @@ export var reactionPickerStyle = css({
10
10
  marginTop: "var(--ds-space-050, 4px)"
11
11
  });
12
12
 
13
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
14
- export var seeWhoReactedStyle = css({
15
- height: '24px',
16
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
17
- lineHeight: '24px',
18
- paddingLeft: 0,
19
- paddingRight: 0,
20
- marginTop: "var(--ds-space-050, 4px)",
21
- marginLeft: "var(--ds-space-050, 4px)"
22
- });
23
-
24
13
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
25
14
  export var wrapperStyle = css({
26
15
  display: 'flex',
@@ -0,0 +1,15 @@
1
+ import { jsx } from '@emotion/react';
2
+ import { type EmojiProvider } from '@atlaskit/emoji/resource';
3
+ import { type ReactionSummary } from '../../types';
4
+ interface ReactionsDialogModalHeaderProps {
5
+ totalReactionsCount: number;
6
+ handlePreviousPage: () => void;
7
+ handleNextPage: () => void;
8
+ currentPage: number;
9
+ maxPages: number;
10
+ emojiProvider: Promise<EmojiProvider>;
11
+ selectedEmojiId: string;
12
+ currentReactions: ReactionSummary[];
13
+ }
14
+ export declare const ReactionsDialogHeader: ({ totalReactionsCount, handlePreviousPage, handleNextPage, currentPage, maxPages, currentReactions, emojiProvider, selectedEmojiId, }: ReactionsDialogModalHeaderProps) => jsx.JSX.Element;
15
+ export {};
@@ -1,6 +1,10 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
1
5
  import { jsx } from '@emotion/react';
2
6
  import { type EmojiProvider } from '@atlaskit/emoji/resource';
3
- import { type onDialogSelectReactionChange, type ReactionSummary, type ProfileCardWrapper } from '../../types';
7
+ import { type ReactionSummary, type ProfileCardWrapper } from '../../types';
4
8
  export interface ReactionsListProps {
5
9
  /**
6
10
  * Sorted list of reactions to render in list
@@ -9,18 +13,14 @@ export interface ReactionsListProps {
9
13
  /**
10
14
  * Current emoji selected in the reactions dialog
11
15
  */
12
- initialEmojiId: string;
16
+ selectedEmojiId: string;
13
17
  /**
14
18
  * Provider for loading emojis
15
19
  */
16
20
  emojiProvider: Promise<EmojiProvider>;
17
- /**
18
- * Function to handle clicking on an emoji from the list
19
- */
20
- onReactionChanged: onDialogSelectReactionChange;
21
21
  /**
22
22
  * A functional component from Confluence to show a profile card on hover
23
23
  */
24
24
  ProfileCardWrapper?: ProfileCardWrapper;
25
25
  }
26
- export declare const ReactionsList: ({ reactions, initialEmojiId, emojiProvider, onReactionChanged, ProfileCardWrapper, }: ReactionsListProps) => jsx.JSX.Element;
26
+ export declare const ReactionsList: ({ reactions, selectedEmojiId, emojiProvider, ProfileCardWrapper, }: ReactionsListProps) => jsx.JSX.Element;
@@ -1,8 +1,5 @@
1
- import { type ThemeColorModes } from '@atlaskit/tokens';
2
1
  export declare const containerStyle: (reactionsBorderWidth: number) => import("@emotion/react").SerializedStyles;
3
- export declare const customTabWrapper: (isSelected: boolean, selectedEmojiId: string, theme?: ThemeColorModes) => import("@emotion/react").SerializedStyles;
4
2
  export declare const navigationContainerStyle: import("@emotion/react").SerializedStyles;
5
- export declare const reactionViewStyle: import("@emotion/react").SerializedStyles;
6
3
  export declare const userListStyle: import("@emotion/react").SerializedStyles;
7
4
  export declare const userStyle: import("@emotion/react").SerializedStyles;
8
5
  export declare const customTabListStyles: import("@emotion/react").SerializedStyles;
@@ -10,4 +10,4 @@ export type RepositionOnUpdateProps = {
10
10
  showFullPicker: boolean;
11
11
  };
12
12
  };
13
- export declare const RepositionOnUpdate: ({ children, update, settings, }: React.PropsWithChildren<RepositionOnUpdateProps>) => JSX.Element;
13
+ export declare const RepositionOnUpdate: ({ children, update, settings, }: React.PropsWithChildren<RepositionOnUpdateProps>) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { type Placement } from '@atlaskit/popper';
3
3
  import { type ReactionClick, type ReactionFocused, type ReactionMouseEnter } from '../../types';
4
4
  import { type ReactionsProps } from '../Reactions';
@@ -36,5 +36,5 @@ interface ReactionSummaryViewProps extends Pick<ReactionsProps, 'emojiProvider'
36
36
  */
37
37
  handleOpenReactionsDialog?: (emojiId: string) => void;
38
38
  }
39
- export declare const ReactionSummaryView: ({ emojiProvider, reactions, flash, particleEffectByEmoji, placement, onReactionClick, onReactionFocused, onReactionMouseEnter, showOpaqueBackground, subtleReactionsSummaryAndPicker, handleOpenReactionsDialog, allowUserDialog, }: ReactionSummaryViewProps) => JSX.Element;
39
+ export declare const ReactionSummaryView: ({ emojiProvider, reactions, flash, particleEffectByEmoji, placement, onReactionClick, onReactionFocused, onReactionMouseEnter, showOpaqueBackground, subtleReactionsSummaryAndPicker, handleOpenReactionsDialog, allowUserDialog, }: ReactionSummaryViewProps) => React.JSX.Element;
40
40
  export {};
@@ -1,3 +1,2 @@
1
1
  export declare const reactionPickerStyle: import("@emotion/react").SerializedStyles;
2
- export declare const seeWhoReactedStyle: import("@emotion/react").SerializedStyles;
3
2
  export declare const wrapperStyle: import("@emotion/react").SerializedStyles;
@@ -20,4 +20,4 @@ export interface ConnectedReactionPickerProps extends Omit<ReactionPickerProps,
20
20
  /**
21
21
  * Reaction Picker component
22
22
  */
23
- export declare const ConnectedReactionPicker: (props: React.PropsWithChildren<ConnectedReactionPickerProps>) => JSX.Element;
23
+ export declare const ConnectedReactionPicker: (props: React.PropsWithChildren<ConnectedReactionPickerProps>) => React.JSX.Element;
@@ -53,4 +53,4 @@ export declare const mapDispatchToPropsHelper: (actions: Actions, containerAri:
53
53
  getReactionDetails: (emojiId: string) => void;
54
54
  onSelection: (emojiId: string) => void;
55
55
  };
56
- export declare const ConnectedReactionsView: (props: React.PropsWithChildren<ConnectedReactionsViewProps>) => JSX.Element;
56
+ export declare const ConnectedReactionsView: (props: React.PropsWithChildren<ConnectedReactionsViewProps>) => React.JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { jsx } from '@emotion/react';
2
+ import { type EmojiProvider } from '@atlaskit/emoji/resource';
3
+ import { type ReactionSummary } from '../../types';
4
+ interface ReactionsDialogModalHeaderProps {
5
+ totalReactionsCount: number;
6
+ handlePreviousPage: () => void;
7
+ handleNextPage: () => void;
8
+ currentPage: number;
9
+ maxPages: number;
10
+ emojiProvider: Promise<EmojiProvider>;
11
+ selectedEmojiId: string;
12
+ currentReactions: ReactionSummary[];
13
+ }
14
+ export declare const ReactionsDialogHeader: ({ totalReactionsCount, handlePreviousPage, handleNextPage, currentPage, maxPages, currentReactions, emojiProvider, selectedEmojiId, }: ReactionsDialogModalHeaderProps) => jsx.JSX.Element;
15
+ export {};
@@ -1,6 +1,10 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
1
5
  import { jsx } from '@emotion/react';
2
6
  import { type EmojiProvider } from '@atlaskit/emoji/resource';
3
- import { type onDialogSelectReactionChange, type ReactionSummary, type ProfileCardWrapper } from '../../types';
7
+ import { type ReactionSummary, type ProfileCardWrapper } from '../../types';
4
8
  export interface ReactionsListProps {
5
9
  /**
6
10
  * Sorted list of reactions to render in list
@@ -9,18 +13,14 @@ export interface ReactionsListProps {
9
13
  /**
10
14
  * Current emoji selected in the reactions dialog
11
15
  */
12
- initialEmojiId: string;
16
+ selectedEmojiId: string;
13
17
  /**
14
18
  * Provider for loading emojis
15
19
  */
16
20
  emojiProvider: Promise<EmojiProvider>;
17
- /**
18
- * Function to handle clicking on an emoji from the list
19
- */
20
- onReactionChanged: onDialogSelectReactionChange;
21
21
  /**
22
22
  * A functional component from Confluence to show a profile card on hover
23
23
  */
24
24
  ProfileCardWrapper?: ProfileCardWrapper;
25
25
  }
26
- export declare const ReactionsList: ({ reactions, initialEmojiId, emojiProvider, onReactionChanged, ProfileCardWrapper, }: ReactionsListProps) => jsx.JSX.Element;
26
+ export declare const ReactionsList: ({ reactions, selectedEmojiId, emojiProvider, ProfileCardWrapper, }: ReactionsListProps) => jsx.JSX.Element;
@@ -1,8 +1,5 @@
1
- import { type ThemeColorModes } from '@atlaskit/tokens';
2
1
  export declare const containerStyle: (reactionsBorderWidth: number) => import("@emotion/react").SerializedStyles;
3
- export declare const customTabWrapper: (isSelected: boolean, selectedEmojiId: string, theme?: ThemeColorModes) => import("@emotion/react").SerializedStyles;
4
2
  export declare const navigationContainerStyle: import("@emotion/react").SerializedStyles;
5
- export declare const reactionViewStyle: import("@emotion/react").SerializedStyles;
6
3
  export declare const userListStyle: import("@emotion/react").SerializedStyles;
7
4
  export declare const userStyle: import("@emotion/react").SerializedStyles;
8
5
  export declare const customTabListStyles: import("@emotion/react").SerializedStyles;
@@ -10,4 +10,4 @@ export type RepositionOnUpdateProps = {
10
10
  showFullPicker: boolean;
11
11
  };
12
12
  };
13
- export declare const RepositionOnUpdate: ({ children, update, settings, }: React.PropsWithChildren<RepositionOnUpdateProps>) => JSX.Element;
13
+ export declare const RepositionOnUpdate: ({ children, update, settings, }: React.PropsWithChildren<RepositionOnUpdateProps>) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { type Placement } from '@atlaskit/popper';
3
3
  import { type ReactionClick, type ReactionFocused, type ReactionMouseEnter } from '../../types';
4
4
  import { type ReactionsProps } from '../Reactions';
@@ -36,5 +36,5 @@ interface ReactionSummaryViewProps extends Pick<ReactionsProps, 'emojiProvider'
36
36
  */
37
37
  handleOpenReactionsDialog?: (emojiId: string) => void;
38
38
  }
39
- export declare const ReactionSummaryView: ({ emojiProvider, reactions, flash, particleEffectByEmoji, placement, onReactionClick, onReactionFocused, onReactionMouseEnter, showOpaqueBackground, subtleReactionsSummaryAndPicker, handleOpenReactionsDialog, allowUserDialog, }: ReactionSummaryViewProps) => JSX.Element;
39
+ export declare const ReactionSummaryView: ({ emojiProvider, reactions, flash, particleEffectByEmoji, placement, onReactionClick, onReactionFocused, onReactionMouseEnter, showOpaqueBackground, subtleReactionsSummaryAndPicker, handleOpenReactionsDialog, allowUserDialog, }: ReactionSummaryViewProps) => React.JSX.Element;
40
40
  export {};
@@ -1,3 +1,2 @@
1
1
  export declare const reactionPickerStyle: import("@emotion/react").SerializedStyles;
2
- export declare const seeWhoReactedStyle: import("@emotion/react").SerializedStyles;
3
2
  export declare const wrapperStyle: import("@emotion/react").SerializedStyles;
@@ -20,4 +20,4 @@ export interface ConnectedReactionPickerProps extends Omit<ReactionPickerProps,
20
20
  /**
21
21
  * Reaction Picker component
22
22
  */
23
- export declare const ConnectedReactionPicker: (props: React.PropsWithChildren<ConnectedReactionPickerProps>) => JSX.Element;
23
+ export declare const ConnectedReactionPicker: (props: React.PropsWithChildren<ConnectedReactionPickerProps>) => React.JSX.Element;
@@ -53,4 +53,4 @@ export declare const mapDispatchToPropsHelper: (actions: Actions, containerAri:
53
53
  getReactionDetails: (emojiId: string) => void;
54
54
  onSelection: (emojiId: string) => void;
55
55
  };
56
- export declare const ConnectedReactionsView: (props: React.PropsWithChildren<ConnectedReactionsViewProps>) => JSX.Element;
56
+ export declare const ConnectedReactionsView: (props: React.PropsWithChildren<ConnectedReactionsViewProps>) => React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/reactions",
3
- "version": "24.6.0",
3
+ "version": "24.8.0",
4
4
  "description": "Reactions component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -36,10 +36,10 @@
36
36
  "@atlaskit/analytics-namespaced-context": "^6.13.0",
37
37
  "@atlaskit/analytics-next": "^10.3.0",
38
38
  "@atlaskit/avatar": "^21.18.0",
39
- "@atlaskit/button": "^20.4.0",
39
+ "@atlaskit/button": "^20.5.0",
40
40
  "@atlaskit/emoji": "^67.13.0",
41
41
  "@atlaskit/heading": "^4.1.0",
42
- "@atlaskit/icon": "^23.6.0",
42
+ "@atlaskit/icon": "^23.7.0",
43
43
  "@atlaskit/modal-dialog": "^12.20.0",
44
44
  "@atlaskit/motion": "^1.10.0",
45
45
  "@atlaskit/platform-feature-flags": "^1.0.0",
@@ -114,6 +114,9 @@
114
114
  "platform-feature-flags": {
115
115
  "platform-component-visual-refresh": {
116
116
  "type": "boolean"
117
+ },
118
+ "platform_fix_analytics_error": {
119
+ "type": "boolean"
117
120
  }
118
121
  }
119
122
  }