@atlaskit/reactions 22.10.1 → 22.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/analytics/index.js +1 -1
  3. package/dist/cjs/components/Counter/Counter.js +4 -1
  4. package/dist/cjs/components/Counter/styles.js +4 -1
  5. package/dist/cjs/components/EmojiButton/EmojiButton.js +4 -1
  6. package/dist/cjs/components/FlashAnimation/FlashAnimation.js +4 -1
  7. package/dist/cjs/components/FlashAnimation/styles.js +4 -1
  8. package/dist/cjs/components/Reaction/Reaction.js +18 -3
  9. package/dist/cjs/components/Reaction/ReactionButton.js +4 -1
  10. package/dist/cjs/components/Reaction/styles.js +4 -1
  11. package/dist/cjs/components/ReactionDialog/ReactionView.js +4 -1
  12. package/dist/cjs/components/ReactionDialog/ReactionsDialog.js +4 -1
  13. package/dist/cjs/components/ReactionDialog/ReactionsList.js +4 -1
  14. package/dist/cjs/components/ReactionDialog/styles.js +4 -1
  15. package/dist/cjs/components/ReactionParticleEffect/ReactionParticleEffect.js +4 -1
  16. package/dist/cjs/components/ReactionPicker/ReactionPicker.js +9 -3
  17. package/dist/cjs/components/ReactionPicker/styles.js +4 -1
  18. package/dist/cjs/components/ReactionSummary/ReactionSummaryButton.js +14 -10
  19. package/dist/cjs/components/ReactionSummary/ReactionSummaryView.js +5 -2
  20. package/dist/cjs/components/ReactionTooltip/ReactionTooltip.js +4 -1
  21. package/dist/cjs/components/ReactionTooltip/styles.js +4 -1
  22. package/dist/cjs/components/Reactions/Reactions.js +13 -5
  23. package/dist/cjs/components/Reactions/styles.js +4 -1
  24. package/dist/cjs/components/Selector/Selector.js +4 -1
  25. package/dist/cjs/components/Selector/styles.js +4 -1
  26. package/dist/cjs/components/ShowMore/ShowMore.js +4 -1
  27. package/dist/cjs/components/Trigger/Trigger.js +19 -4
  28. package/dist/es2019/analytics/index.js +1 -1
  29. package/dist/es2019/components/Counter/Counter.js +4 -1
  30. package/dist/es2019/components/Counter/styles.js +4 -1
  31. package/dist/es2019/components/EmojiButton/EmojiButton.js +4 -1
  32. package/dist/es2019/components/FlashAnimation/FlashAnimation.js +4 -1
  33. package/dist/es2019/components/FlashAnimation/styles.js +4 -1
  34. package/dist/es2019/components/Reaction/Reaction.js +17 -3
  35. package/dist/es2019/components/Reaction/ReactionButton.js +4 -1
  36. package/dist/es2019/components/Reaction/styles.js +4 -1
  37. package/dist/es2019/components/ReactionDialog/ReactionView.js +4 -1
  38. package/dist/es2019/components/ReactionDialog/ReactionsDialog.js +4 -1
  39. package/dist/es2019/components/ReactionDialog/ReactionsList.js +4 -1
  40. package/dist/es2019/components/ReactionDialog/styles.js +4 -1
  41. package/dist/es2019/components/ReactionParticleEffect/ReactionParticleEffect.js +4 -1
  42. package/dist/es2019/components/ReactionPicker/ReactionPicker.js +8 -3
  43. package/dist/es2019/components/ReactionPicker/styles.js +4 -1
  44. package/dist/es2019/components/ReactionSummary/ReactionSummaryButton.js +13 -10
  45. package/dist/es2019/components/ReactionSummary/ReactionSummaryView.js +4 -2
  46. package/dist/es2019/components/ReactionTooltip/ReactionTooltip.js +4 -1
  47. package/dist/es2019/components/ReactionTooltip/styles.js +4 -1
  48. package/dist/es2019/components/Reactions/Reactions.js +12 -5
  49. package/dist/es2019/components/Reactions/styles.js +4 -1
  50. package/dist/es2019/components/Selector/Selector.js +4 -1
  51. package/dist/es2019/components/Selector/styles.js +4 -1
  52. package/dist/es2019/components/ShowMore/ShowMore.js +4 -1
  53. package/dist/es2019/components/Trigger/Trigger.js +18 -4
  54. package/dist/esm/analytics/index.js +1 -1
  55. package/dist/esm/components/Counter/Counter.js +4 -1
  56. package/dist/esm/components/Counter/styles.js +4 -1
  57. package/dist/esm/components/EmojiButton/EmojiButton.js +4 -1
  58. package/dist/esm/components/FlashAnimation/FlashAnimation.js +4 -1
  59. package/dist/esm/components/FlashAnimation/styles.js +4 -1
  60. package/dist/esm/components/Reaction/Reaction.js +18 -3
  61. package/dist/esm/components/Reaction/ReactionButton.js +4 -1
  62. package/dist/esm/components/Reaction/styles.js +4 -1
  63. package/dist/esm/components/ReactionDialog/ReactionView.js +4 -1
  64. package/dist/esm/components/ReactionDialog/ReactionsDialog.js +4 -1
  65. package/dist/esm/components/ReactionDialog/ReactionsList.js +4 -1
  66. package/dist/esm/components/ReactionDialog/styles.js +4 -1
  67. package/dist/esm/components/ReactionParticleEffect/ReactionParticleEffect.js +4 -1
  68. package/dist/esm/components/ReactionPicker/ReactionPicker.js +9 -3
  69. package/dist/esm/components/ReactionPicker/styles.js +4 -1
  70. package/dist/esm/components/ReactionSummary/ReactionSummaryButton.js +14 -10
  71. package/dist/esm/components/ReactionSummary/ReactionSummaryView.js +5 -2
  72. package/dist/esm/components/ReactionTooltip/ReactionTooltip.js +4 -1
  73. package/dist/esm/components/ReactionTooltip/styles.js +4 -1
  74. package/dist/esm/components/Reactions/Reactions.js +13 -5
  75. package/dist/esm/components/Reactions/styles.js +4 -1
  76. package/dist/esm/components/Selector/Selector.js +4 -1
  77. package/dist/esm/components/Selector/styles.js +4 -1
  78. package/dist/esm/components/ShowMore/ShowMore.js +4 -1
  79. package/dist/esm/components/Trigger/Trigger.js +19 -4
  80. package/dist/types/components/FlashAnimation/FlashAnimation.d.ts +4 -1
  81. package/dist/types/components/FlashAnimation/styles.d.ts +4 -1
  82. package/dist/types/components/Reaction/Reaction.d.ts +5 -1
  83. package/dist/types/components/Reaction/ReactionButton.d.ts +4 -1
  84. package/dist/types/components/ReactionParticleEffect/ReactionParticleEffect.d.ts +4 -1
  85. package/dist/types/components/ReactionPicker/ReactionPicker.d.ts +8 -1
  86. package/dist/types/components/ReactionSummary/ReactionSummaryButton.d.ts +4 -0
  87. package/dist/types/components/ReactionSummary/ReactionSummaryView.d.ts +5 -1
  88. package/dist/types/components/ReactionTooltip/ReactionTooltip.d.ts +4 -1
  89. package/dist/types/components/Reactions/Reactions.d.ts +9 -2
  90. package/dist/types/components/Selector/Selector.d.ts +4 -1
  91. package/dist/types/components/Selector/styles.d.ts +4 -1
  92. package/dist/types/components/ShowMore/ShowMore.d.ts +4 -1
  93. package/dist/types/components/Trigger/Trigger.d.ts +8 -1
  94. package/dist/types-ts4.5/components/FlashAnimation/FlashAnimation.d.ts +4 -1
  95. package/dist/types-ts4.5/components/FlashAnimation/styles.d.ts +4 -1
  96. package/dist/types-ts4.5/components/Reaction/Reaction.d.ts +5 -1
  97. package/dist/types-ts4.5/components/Reaction/ReactionButton.d.ts +4 -1
  98. package/dist/types-ts4.5/components/ReactionParticleEffect/ReactionParticleEffect.d.ts +4 -1
  99. package/dist/types-ts4.5/components/ReactionPicker/ReactionPicker.d.ts +8 -1
  100. package/dist/types-ts4.5/components/ReactionSummary/ReactionSummaryButton.d.ts +4 -0
  101. package/dist/types-ts4.5/components/ReactionSummary/ReactionSummaryView.d.ts +5 -1
  102. package/dist/types-ts4.5/components/ReactionTooltip/ReactionTooltip.d.ts +4 -1
  103. package/dist/types-ts4.5/components/Reactions/Reactions.d.ts +9 -2
  104. package/dist/types-ts4.5/components/Selector/Selector.d.ts +4 -1
  105. package/dist/types-ts4.5/components/Selector/styles.d.ts +4 -1
  106. package/dist/types-ts4.5/components/ShowMore/ShowMore.d.ts +4 -1
  107. package/dist/types-ts4.5/components/Trigger/Trigger.d.ts +8 -1
  108. package/package.json +7 -7
@@ -1,4 +1,7 @@
1
- /** @jsx jsx */
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
2
5
  import React, { useCallback, useEffect, useRef, useState } from 'react';
3
6
  import { useIntl } from 'react-intl-next';
4
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -32,6 +35,15 @@ const reactedStyles = xcss({
32
35
  backgroundColor: 'color.background.selected.pressed'
33
36
  }
34
37
  });
38
+ const opaqueBackgroundStyles = xcss({
39
+ backgroundColor: 'elevation.surface',
40
+ ':hover': {
41
+ backgroundColor: 'elevation.surface.hovered'
42
+ },
43
+ ':active': {
44
+ backgroundColor: 'elevation.surface.pressed'
45
+ }
46
+ });
35
47
 
36
48
  /**
37
49
  * Render an emoji reaction button
@@ -45,7 +57,8 @@ export const Reaction = ({
45
57
  flash = false,
46
58
  showParticleEffect = false,
47
59
  handleUserListClick = () => {},
48
- allowUserDialog
60
+ allowUserDialog,
61
+ showOpaqueBackground = false
49
62
  }) => {
50
63
  const intl = useIntl();
51
64
  const hoverStart = useRef();
@@ -104,6 +117,7 @@ export const Reaction = ({
104
117
  handleUserListClick(emojiId);
105
118
  setIsTooltipEnabled(false);
106
119
  };
120
+ const buttonStyles = showOpaqueBackground ? [opaqueBackgroundStyles] : [];
107
121
  return jsx(Box, {
108
122
  xcss: containerStyles
109
123
  }, showParticleEffect && jsx(ReactionParticleEffect, {
@@ -118,7 +132,7 @@ export const Reaction = ({
118
132
  }, jsx(ReactionButton, {
119
133
  onClick: handleClick,
120
134
  flash: flash,
121
- additionalStyles: reaction.reacted ? [reactedStyles] : [],
135
+ additionalStyles: reaction.reacted ? [reactedStyles] : buttonStyles,
122
136
  ariaLabel: intl.formatMessage(messages.reactWithEmoji, {
123
137
  emoji: emojiName
124
138
  }),
@@ -1,5 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- /** @jsx jsx */
2
+ /**
3
+ * @jsxRuntime classic
4
+ * @jsx jsx
5
+ */
3
6
  import React from 'react';
4
7
  import { Pressable, xcss } from '@atlaskit/primitives';
5
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -1,4 +1,7 @@
1
- /** @jsx jsx */
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
2
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
6
  import { css } from '@emotion/react';
4
7
  import { B50, B75, B300, N20, N40, N400, B100 } from '@atlaskit/theme/colors';
@@ -1,5 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- /** @jsx jsx */
2
+ /**
3
+ * @jsxRuntime classic
4
+ * @jsx jsx
5
+ */
3
6
  import { useEffect, useState, useMemo } from 'react';
4
7
  import { useIntl } from 'react-intl-next';
5
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -1,4 +1,7 @@
1
- /** @jsx jsx */
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
2
5
  import { useEffect, useState, useRef, useCallback, useMemo } from 'react';
3
6
  import { useIntl } from 'react-intl-next';
4
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -1,4 +1,7 @@
1
- /** @jsx jsx */
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
2
5
  import { useCallback, useState } from 'react';
3
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
7
  import { jsx } from '@emotion/react';
@@ -1,4 +1,7 @@
1
- /** @jsx jsx */
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
2
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
6
  import { css } from '@emotion/react';
4
7
  import { B400, N500, N800 } from '@atlaskit/theme/colors';
@@ -1,4 +1,7 @@
1
- /** @jsx jsx */
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
2
5
  import { ResourcedEmoji } from '@atlaskit/emoji';
3
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
7
  import { jsx } from '@emotion/react';
@@ -1,4 +1,7 @@
1
- /** @jsx jsx */
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
2
5
  import React, { useCallback, useLayoutEffect, useRef, useState } from 'react';
3
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
7
  import { jsx } from '@emotion/react';
@@ -72,7 +75,8 @@ export const ReactionPicker = /*#__PURE__*/React.memo(props => {
72
75
  onOpen = () => {},
73
76
  onCancel = () => {},
74
77
  tooltipContent = jsx(FormattedMessage, messages.addReaction),
75
- emojiPickerSize
78
+ emojiPickerSize,
79
+ showOpaqueBackground = false
76
80
  } = props;
77
81
  const [triggerRef, setTriggerRef] = useState(null);
78
82
 
@@ -197,7 +201,8 @@ export const ReactionPicker = /*#__PURE__*/React.memo(props => {
197
201
  onClick: onTriggerClick,
198
202
  miniMode: miniMode,
199
203
  disabled: disabled,
200
- tooltipContent: settings.isOpen ? null : tooltipContent
204
+ tooltipContent: settings.isOpen ? null : tooltipContent,
205
+ showOpaqueBackground: showOpaqueBackground
201
206
  })), settings.isOpen && jsx(PopperWrapper, {
202
207
  settings: settings
203
208
  }, settings.showFullPicker ? jsx(EmojiPicker, {
@@ -1,4 +1,7 @@
1
- /** @jsx jsx */
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
2
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
6
  import { css } from '@emotion/react';
4
7
  import { borderRadius } from '@atlaskit/theme/constants';
@@ -15,6 +15,15 @@ const buttonStyle = xcss({
15
15
  paddingBottom: 'space.050',
16
16
  paddingLeft: 'space.100'
17
17
  });
18
+ const opaqueBackgroundStyles = xcss({
19
+ backgroundColor: 'elevation.surface',
20
+ ':hover': {
21
+ backgroundColor: 'elevation.surface.hovered'
22
+ },
23
+ ':active': {
24
+ backgroundColor: 'elevation.surface.pressed'
25
+ }
26
+ });
18
27
  const containerStyle = xcss({
19
28
  position: 'relative'
20
29
  });
@@ -33,7 +42,8 @@ export const ReactionSummaryButton = /*#__PURE__*/forwardRef(({
33
42
  emojiProvider,
34
43
  reactions = [],
35
44
  emojisToShow = 3,
36
- onClick
45
+ onClick,
46
+ showOpaqueBackground = false
37
47
  }, ref) => {
38
48
  const intl = useIntl();
39
49
 
@@ -47,6 +57,7 @@ export const ReactionSummaryButton = /*#__PURE__*/forwardRef(({
47
57
  }, 0);
48
58
  }, [reactions]);
49
59
  const topReactions = useMemo(() => getTopReactions(reactions, emojisToShow), [emojisToShow, reactions]);
60
+ const buttonStyles = showOpaqueBackground ? [opaqueBackgroundStyles] : [];
50
61
  return /*#__PURE__*/React.createElement(Box, {
51
62
  xcss: containerStyle,
52
63
  ref: ref
@@ -54,15 +65,7 @@ export const ReactionSummaryButton = /*#__PURE__*/forwardRef(({
54
65
  onClick: onClick,
55
66
  testId: RENDER_SUMMARY_BUTTON_TESTID,
56
67
  ariaLabel: intl.formatMessage(messages.summary),
57
- additionalStyles: [xcss({
58
- backgroundColor: 'elevation.surface',
59
- ':hover': {
60
- backgroundColor: 'elevation.surface.hovered'
61
- },
62
- ':active': {
63
- backgroundColor: 'elevation.surface.pressed'
64
- }
65
- })]
68
+ additionalStyles: buttonStyles
66
69
  }, /*#__PURE__*/React.createElement(Inline, {
67
70
  space: "space.050",
68
71
  xcss: buttonStyle
@@ -23,7 +23,8 @@ export const ReactionSummaryView = ({
23
23
  placement = 'auto-start',
24
24
  onReactionClick,
25
25
  onReactionFocused,
26
- onReactionMouseEnter
26
+ onReactionMouseEnter,
27
+ showOpaqueBackground = false
27
28
  }) => {
28
29
  const [isSummaryPopupOpen, setSummaryPopupOpen] = useState(false);
29
30
  const handlePopupClose = useCallback(() => setSummaryPopupOpen(false), []);
@@ -52,7 +53,8 @@ export const ReactionSummaryView = ({
52
53
  trigger: triggerProps => /*#__PURE__*/React.createElement(ReactionSummaryButton, _extends({}, triggerProps, {
53
54
  emojiProvider: emojiProvider,
54
55
  reactions: reactions,
55
- onClick: handleSummaryClick
56
+ onClick: handleSummaryClick,
57
+ showOpaqueBackground: showOpaqueBackground
56
58
  }))
57
59
  });
58
60
  };
@@ -1,5 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- /** @jsx jsx */
2
+ /**
3
+ * @jsxRuntime classic
4
+ * @jsx jsx
5
+ */
3
6
  import React from 'react';
4
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
5
8
  import { jsx } from '@emotion/react';
@@ -1,4 +1,7 @@
1
- /** @jsx jsx */
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
2
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
6
  import { css } from '@emotion/react';
4
7
  import { N90, N800, N0 } from '@atlaskit/theme/colors';
@@ -1,4 +1,7 @@
1
- /** @jsx jsx */
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
2
5
  import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
3
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
7
  import { jsx } from '@emotion/react';
@@ -93,7 +96,8 @@ export const Reactions = /*#__PURE__*/React.memo(({
93
96
  miniMode = false,
94
97
  summaryViewEnabled = false,
95
98
  summaryViewThreshold = 3,
96
- summaryViewPlacement
99
+ summaryViewPlacement,
100
+ showOpaqueBackground = false
97
101
  }) => {
98
102
  const [selectedEmojiId, setSelectedEmojiId] = useState();
99
103
  const {
@@ -259,7 +263,8 @@ export const Reactions = /*#__PURE__*/React.memo(({
259
263
  onReactionClick: onReactionClick,
260
264
  onReactionFocused: handleReactionFocused,
261
265
  onReactionMouseEnter: handleReactionMouseEnter,
262
- placement: summaryViewPlacement
266
+ placement: summaryViewPlacement,
267
+ showOpaqueBackground: showOpaqueBackground
263
268
  })) : memorizedReactions.map(reaction => jsx(Reaction, {
264
269
  key: reaction.emojiId,
265
270
  reaction: reaction,
@@ -270,7 +275,8 @@ export const Reactions = /*#__PURE__*/React.memo(({
270
275
  flash: flash[reaction.emojiId],
271
276
  handleUserListClick: handleOpenReactionsDialog,
272
277
  allowUserDialog: allowUserDialog,
273
- showParticleEffect: particleEffectByEmoji[reaction.emojiId]
278
+ showParticleEffect: particleEffectByEmoji[reaction.emojiId],
279
+ showOpaqueBackground: showOpaqueBackground
274
280
  })), jsx(ReactionPicker
275
281
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
276
282
  , {
@@ -285,7 +291,8 @@ export const Reactions = /*#__PURE__*/React.memo(({
285
291
  onShowMore: handleOnMore,
286
292
  tooltipContent: getTooltip(status, errorMessage),
287
293
  emojiPickerSize: emojiPickerSize,
288
- miniMode: miniMode
294
+ miniMode: miniMode,
295
+ showOpaqueBackground: showOpaqueBackground
289
296
  }), allowUserDialog && reactions.length > 0 && jsx(Tooltip, {
290
297
  content: jsx(FormattedMessage, messages.seeWhoReactedTooltip),
291
298
  hideTooltipOnClick: true
@@ -1,4 +1,7 @@
1
- /** @jsx jsx */
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
2
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
6
  import { css } from '@emotion/react';
4
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
@@ -1,4 +1,7 @@
1
- /** @jsx jsx */
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
2
5
  import React, { Fragment } from 'react';
3
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
7
  import { jsx } from '@emotion/react';
@@ -1,4 +1,7 @@
1
- /** @jsx jsx */
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
2
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
6
  import { css, keyframes } from '@emotion/react';
4
7
 
@@ -1,4 +1,7 @@
1
- /** @jsx jsx */
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
2
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
6
  import { jsx } from '@emotion/react';
4
7
  import { FormattedMessage } from 'react-intl-next';
@@ -1,5 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- /** @jsx jsx */
2
+ /**
3
+ * @jsxRuntime classic
4
+ * @jsx jsx
5
+ */
3
6
  import React from 'react';
4
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
5
8
  import { jsx } from '@emotion/react';
@@ -24,7 +27,7 @@ const triggerStyles = xcss({
24
27
  alignItems: 'center',
25
28
  lineHeight: '16px'
26
29
  });
27
- const enabledTriggerStyles = xcss({
30
+ const transparentEnabledTriggerStyles = xcss({
28
31
  borderColor: 'color.border',
29
32
  backgroundColor: 'color.background.neutral.subtle',
30
33
  ':hover': {
@@ -34,6 +37,16 @@ const enabledTriggerStyles = xcss({
34
37
  backgroundColor: 'color.background.neutral.subtle.pressed'
35
38
  }
36
39
  });
40
+ const opaqueEnabledTriggerStyles = xcss({
41
+ borderColor: 'color.border',
42
+ backgroundColor: 'elevation.surface',
43
+ ':hover': {
44
+ backgroundColor: 'elevation.surface.hovered'
45
+ },
46
+ ':active': {
47
+ backgroundColor: 'elevation.surface.pressed'
48
+ }
49
+ });
37
50
  const disabledTriggerStyles = xcss({
38
51
  borderColor: 'color.border.disabled',
39
52
  backgroundColor: 'color.background.disabled'
@@ -54,7 +67,8 @@ export const Trigger = /*#__PURE__*/React.forwardRef((props, ref) => {
54
67
  miniMode,
55
68
  tooltipContent,
56
69
  disabled = false,
57
- ariaAttributes = {}
70
+ ariaAttributes = {},
71
+ showOpaqueBackground = false
58
72
  } = props;
59
73
  const handleMouseDown = (e, analyticsEvent) => {
60
74
  if (onClick && !disabled) {
@@ -66,7 +80,7 @@ export const Trigger = /*#__PURE__*/React.forwardRef((props, ref) => {
66
80
  content: tooltipContent
67
81
  }, jsx(Pressable, _extends({
68
82
  testId: RENDER_TRIGGER_BUTTON_TESTID,
69
- xcss: [triggerStyles, disabled ? disabledTriggerStyles : enabledTriggerStyles, miniMode && miniModeStyles],
83
+ xcss: [triggerStyles, disabled ? disabledTriggerStyles : showOpaqueBackground ? opaqueEnabledTriggerStyles : transparentEnabledTriggerStyles, miniMode && miniModeStyles],
70
84
  onClick: handleMouseDown,
71
85
  isDisabled: disabled,
72
86
  ref: ref
@@ -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 = "22.10.1";
7
+ var packageVersion = "22.10.3";
8
8
  /**
9
9
  * TODO: move to utility package?
10
10
  * A random sampling function
@@ -1,4 +1,7 @@
1
- /** @jsx jsx */
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
2
5
  import { useEffect, useMemo, useRef } from 'react';
3
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
7
  import { jsx, css } from '@emotion/react';
@@ -1,4 +1,7 @@
1
- /** @jsx jsx */
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
2
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
6
  import { css } from '@emotion/react';
4
7
  import { N90, B400 } from '@atlaskit/theme/colors';
@@ -1,4 +1,7 @@
1
- /** @jsx jsx */
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
2
5
  import React from 'react';
3
6
  import { useIntl } from 'react-intl-next';
4
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -1,4 +1,7 @@
1
- /** @jsx jsx */
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
2
5
 
3
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
7
  import { jsx } from '@emotion/react';
@@ -1,4 +1,7 @@
1
- /** @jsx jsx */
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
2
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
6
  import { css, keyframes } from '@emotion/react';
4
7
  import { B75, B300 } from '@atlaskit/theme/colors';
@@ -1,7 +1,10 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _regeneratorRuntime from "@babel/runtime/regenerator";
4
- /** @jsx jsx */
4
+ /**
5
+ * @jsxRuntime classic
6
+ * @jsx jsx
7
+ */
5
8
  import React, { useCallback, useEffect, useRef, useState } from 'react';
6
9
  import { useIntl } from 'react-intl-next';
7
10
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -35,6 +38,15 @@ var reactedStyles = xcss({
35
38
  backgroundColor: 'color.background.selected.pressed'
36
39
  }
37
40
  });
41
+ var opaqueBackgroundStyles = xcss({
42
+ backgroundColor: 'elevation.surface',
43
+ ':hover': {
44
+ backgroundColor: 'elevation.surface.hovered'
45
+ },
46
+ ':active': {
47
+ backgroundColor: 'elevation.surface.pressed'
48
+ }
49
+ });
38
50
 
39
51
  /**
40
52
  * Render an emoji reaction button
@@ -53,7 +65,9 @@ export var Reaction = function Reaction(_ref) {
53
65
  showParticleEffect = _ref$showParticleEffe === void 0 ? false : _ref$showParticleEffe,
54
66
  _ref$handleUserListCl = _ref.handleUserListClick,
55
67
  handleUserListClick = _ref$handleUserListCl === void 0 ? function () {} : _ref$handleUserListCl,
56
- allowUserDialog = _ref.allowUserDialog;
68
+ allowUserDialog = _ref.allowUserDialog,
69
+ _ref$showOpaqueBackgr = _ref.showOpaqueBackground,
70
+ showOpaqueBackground = _ref$showOpaqueBackgr === void 0 ? false : _ref$showOpaqueBackgr;
57
71
  var intl = useIntl();
58
72
  var hoverStart = useRef();
59
73
  var focusStart = useRef();
@@ -129,6 +143,7 @@ export var Reaction = function Reaction(_ref) {
129
143
  handleUserListClick(emojiId);
130
144
  setIsTooltipEnabled(false);
131
145
  };
146
+ var buttonStyles = showOpaqueBackground ? [opaqueBackgroundStyles] : [];
132
147
  return jsx(Box, {
133
148
  xcss: containerStyles
134
149
  }, showParticleEffect && jsx(ReactionParticleEffect, {
@@ -143,7 +158,7 @@ export var Reaction = function Reaction(_ref) {
143
158
  }, jsx(ReactionButton, {
144
159
  onClick: handleClick,
145
160
  flash: flash,
146
- additionalStyles: reaction.reacted ? [reactedStyles] : [],
161
+ additionalStyles: reaction.reacted ? [reactedStyles] : buttonStyles,
147
162
  ariaLabel: intl.formatMessage(messages.reactWithEmoji, {
148
163
  emoji: emojiName
149
164
  }),
@@ -1,6 +1,9 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
- /** @jsx jsx */
3
+ /**
4
+ * @jsxRuntime classic
5
+ * @jsx jsx
6
+ */
4
7
  import React from 'react';
5
8
  import { Pressable, xcss } from '@atlaskit/primitives';
6
9
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -1,4 +1,7 @@
1
- /** @jsx jsx */
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
2
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
6
  import { css } from '@emotion/react';
4
7
  import { B50, B75, B300, N20, N40, N400, B100 } from '@atlaskit/theme/colors';
@@ -2,7 +2,10 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import _regeneratorRuntime from "@babel/runtime/regenerator";
5
- /** @jsx jsx */
5
+ /**
6
+ * @jsxRuntime classic
7
+ * @jsx jsx
8
+ */
6
9
  import { useEffect, useState, useMemo } from 'react';
7
10
  import { useIntl } from 'react-intl-next';
8
11
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -1,5 +1,8 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
- /** @jsx jsx */
2
+ /**
3
+ * @jsxRuntime classic
4
+ * @jsx jsx
5
+ */
3
6
  import { useEffect, useState, useRef, useCallback, useMemo } from 'react';
4
7
  import { useIntl } from 'react-intl-next';
5
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -1,5 +1,8 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
- /** @jsx jsx */
2
+ /**
3
+ * @jsxRuntime classic
4
+ * @jsx jsx
5
+ */
3
6
  import { useCallback, useState } from 'react';
4
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
5
8
  import { jsx } from '@emotion/react';
@@ -1,4 +1,7 @@
1
- /** @jsx jsx */
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
2
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
6
  import { css } from '@emotion/react';
4
7
  import { B400, N500, N800 } from '@atlaskit/theme/colors';
@@ -1,5 +1,8 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
- /** @jsx jsx */
2
+ /**
3
+ * @jsxRuntime classic
4
+ * @jsx jsx
5
+ */
3
6
  import { ResourcedEmoji } from '@atlaskit/emoji';
4
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
5
8
  import { jsx } from '@emotion/react';
@@ -2,7 +2,10 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  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; }
4
4
  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) { _defineProperty(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; }
5
- /** @jsx jsx */
5
+ /**
6
+ * @jsxRuntime classic
7
+ * @jsx jsx
8
+ */
6
9
  import React, { useCallback, useLayoutEffect, useRef, useState } from 'react';
7
10
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
11
  import { jsx } from '@emotion/react';
@@ -79,7 +82,9 @@ export var ReactionPicker = /*#__PURE__*/React.memo(function (props) {
79
82
  onCancel = _props$onCancel === void 0 ? function () {} : _props$onCancel,
80
83
  _props$tooltipContent = props.tooltipContent,
81
84
  tooltipContent = _props$tooltipContent === void 0 ? jsx(FormattedMessage, messages.addReaction) : _props$tooltipContent,
82
- emojiPickerSize = props.emojiPickerSize;
85
+ emojiPickerSize = props.emojiPickerSize,
86
+ _props$showOpaqueBack = props.showOpaqueBackground,
87
+ showOpaqueBackground = _props$showOpaqueBack === void 0 ? false : _props$showOpaqueBack;
83
88
  var _useState = useState(null),
84
89
  _useState2 = _slicedToArray(_useState, 2),
85
90
  triggerRef = _useState2[0],
@@ -210,7 +215,8 @@ export var ReactionPicker = /*#__PURE__*/React.memo(function (props) {
210
215
  onClick: onTriggerClick,
211
216
  miniMode: miniMode,
212
217
  disabled: disabled,
213
- tooltipContent: settings.isOpen ? null : tooltipContent
218
+ tooltipContent: settings.isOpen ? null : tooltipContent,
219
+ showOpaqueBackground: showOpaqueBackground
214
220
  })
215
221
  );
216
222
  }), settings.isOpen && jsx(PopperWrapper, {
@@ -1,4 +1,7 @@
1
- /** @jsx jsx */
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
2
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
6
  import { css } from '@emotion/react';
4
7
  import { borderRadius } from '@atlaskit/theme/constants';