@atlaskit/reactions 22.7.1 → 22.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/CHANGELOG.md +1179 -1179
  2. package/afm-cc/tsconfig.json +3 -0
  3. package/dist/cjs/analytics/index.js +1 -1
  4. package/dist/cjs/components/Counter/Counter.js +18 -4
  5. package/dist/cjs/components/Counter/styles.js +8 -0
  6. package/dist/cjs/components/EmojiButton/EmojiButton.js +21 -5
  7. package/dist/cjs/components/FlashAnimation/FlashAnimation.js +6 -1
  8. package/dist/cjs/components/FlashAnimation/styles.js +8 -0
  9. package/dist/cjs/components/Reaction/Reaction.js +45 -8
  10. package/dist/cjs/components/Reaction/styles.js +12 -0
  11. package/dist/cjs/components/ReactionDialog/ReactionView.js +40 -28
  12. package/dist/cjs/components/ReactionDialog/ReactionsDialog.js +2 -0
  13. package/dist/cjs/components/ReactionDialog/ReactionsList.js +6 -1
  14. package/dist/cjs/components/ReactionDialog/styles.js +40 -1
  15. package/dist/cjs/components/ReactionParticleEffect/ReactionParticleEffect.js +20 -12
  16. package/dist/cjs/components/ReactionParticleEffect/styles.js +9 -0
  17. package/dist/cjs/components/ReactionPicker/ReactionPicker.js +19 -10
  18. package/dist/cjs/components/ReactionPicker/styles.js +13 -0
  19. package/dist/cjs/components/ReactionTooltip/ReactionTooltip.js +6 -1
  20. package/dist/cjs/components/ReactionTooltip/styles.js +12 -0
  21. package/dist/cjs/components/Reactions/Reactions.js +57 -44
  22. package/dist/cjs/components/Reactions/styles.js +7 -0
  23. package/dist/cjs/components/Selector/Selector.js +60 -31
  24. package/dist/cjs/components/Selector/styles.js +13 -20
  25. package/dist/cjs/components/ShowMore/ShowMore.js +13 -31
  26. package/dist/cjs/components/ShowMore/index.js +0 -6
  27. package/dist/cjs/components/Trigger/Trigger.js +6 -1
  28. package/dist/cjs/components/Trigger/styles.js +3 -1
  29. package/dist/es2019/analytics/index.js +1 -1
  30. package/dist/es2019/components/Counter/Counter.js +17 -4
  31. package/dist/es2019/components/Counter/styles.js +8 -0
  32. package/dist/es2019/components/EmojiButton/EmojiButton.js +20 -5
  33. package/dist/es2019/components/FlashAnimation/FlashAnimation.js +5 -1
  34. package/dist/es2019/components/FlashAnimation/styles.js +8 -0
  35. package/dist/es2019/components/Reaction/Reaction.js +45 -9
  36. package/dist/es2019/components/Reaction/styles.js +12 -0
  37. package/dist/es2019/components/ReactionDialog/ReactionView.js +39 -28
  38. package/dist/es2019/components/ReactionDialog/ReactionsDialog.js +1 -0
  39. package/dist/es2019/components/ReactionDialog/ReactionsList.js +5 -1
  40. package/dist/es2019/components/ReactionDialog/styles.js +40 -1
  41. package/dist/es2019/components/ReactionParticleEffect/ReactionParticleEffect.js +15 -9
  42. package/dist/es2019/components/ReactionParticleEffect/styles.js +9 -0
  43. package/dist/es2019/components/ReactionPicker/ReactionPicker.js +19 -9
  44. package/dist/es2019/components/ReactionPicker/styles.js +13 -0
  45. package/dist/es2019/components/ReactionTooltip/ReactionTooltip.js +5 -1
  46. package/dist/es2019/components/ReactionTooltip/styles.js +12 -0
  47. package/dist/es2019/components/Reactions/Reactions.js +55 -43
  48. package/dist/es2019/components/Reactions/styles.js +7 -0
  49. package/dist/es2019/components/Selector/Selector.js +55 -24
  50. package/dist/es2019/components/Selector/styles.js +12 -16
  51. package/dist/es2019/components/ShowMore/ShowMore.js +9 -25
  52. package/dist/es2019/components/ShowMore/index.js +1 -1
  53. package/dist/es2019/components/Trigger/Trigger.js +5 -1
  54. package/dist/es2019/components/Trigger/styles.js +5 -0
  55. package/dist/esm/analytics/index.js +1 -1
  56. package/dist/esm/components/Counter/Counter.js +17 -4
  57. package/dist/esm/components/Counter/styles.js +8 -0
  58. package/dist/esm/components/EmojiButton/EmojiButton.js +20 -5
  59. package/dist/esm/components/FlashAnimation/FlashAnimation.js +5 -1
  60. package/dist/esm/components/FlashAnimation/styles.js +8 -0
  61. package/dist/esm/components/Reaction/Reaction.js +45 -9
  62. package/dist/esm/components/Reaction/styles.js +12 -0
  63. package/dist/esm/components/ReactionDialog/ReactionView.js +39 -28
  64. package/dist/esm/components/ReactionDialog/ReactionsDialog.js +1 -0
  65. package/dist/esm/components/ReactionDialog/ReactionsList.js +5 -1
  66. package/dist/esm/components/ReactionDialog/styles.js +40 -1
  67. package/dist/esm/components/ReactionParticleEffect/ReactionParticleEffect.js +19 -12
  68. package/dist/esm/components/ReactionParticleEffect/styles.js +9 -0
  69. package/dist/esm/components/ReactionPicker/ReactionPicker.js +19 -9
  70. package/dist/esm/components/ReactionPicker/styles.js +13 -0
  71. package/dist/esm/components/ReactionTooltip/ReactionTooltip.js +5 -1
  72. package/dist/esm/components/ReactionTooltip/styles.js +12 -0
  73. package/dist/esm/components/Reactions/Reactions.js +56 -44
  74. package/dist/esm/components/Reactions/styles.js +7 -0
  75. package/dist/esm/components/Selector/Selector.js +61 -33
  76. package/dist/esm/components/Selector/styles.js +13 -19
  77. package/dist/esm/components/ShowMore/ShowMore.js +10 -28
  78. package/dist/esm/components/ShowMore/index.js +1 -1
  79. package/dist/esm/components/Trigger/Trigger.js +5 -1
  80. package/dist/esm/components/Trigger/styles.js +3 -0
  81. package/dist/types/components/EmojiButton/EmojiButton.d.ts +1 -1
  82. package/dist/types/components/Reaction/Reaction.d.ts +1 -5
  83. package/dist/types/components/ReactionDialog/ReactionView.d.ts +1 -1
  84. package/dist/types/components/ReactionTooltip/index.d.ts +1 -1
  85. package/dist/types/components/Selector/styles.d.ts +0 -7
  86. package/dist/types/components/ShowMore/ShowMore.d.ts +3 -21
  87. package/dist/types/components/ShowMore/index.d.ts +1 -1
  88. package/dist/types/containers/index.d.ts +1 -1
  89. package/dist/types/hooks/useFocusTrap.d.ts +1 -1
  90. package/dist/types-ts4.5/components/EmojiButton/EmojiButton.d.ts +1 -1
  91. package/dist/types-ts4.5/components/Reaction/Reaction.d.ts +1 -5
  92. package/dist/types-ts4.5/components/ReactionDialog/ReactionView.d.ts +1 -1
  93. package/dist/types-ts4.5/components/ReactionTooltip/index.d.ts +1 -1
  94. package/dist/types-ts4.5/components/Selector/styles.d.ts +0 -7
  95. package/dist/types-ts4.5/components/ShowMore/ShowMore.d.ts +3 -21
  96. package/dist/types-ts4.5/components/ShowMore/index.d.ts +1 -1
  97. package/dist/types-ts4.5/containers/index.d.ts +1 -1
  98. package/dist/types-ts4.5/hooks/useFocusTrap.d.ts +1 -1
  99. package/docs/0-intro.tsx +42 -48
  100. package/docs/1-connected-reaction-picker.tsx +25 -25
  101. package/docs/2-connected-reactions-view.tsx +25 -25
  102. package/docs/3-reactions-store.tsx +29 -30
  103. package/docs/4-reaction-service-client.tsx +5 -5
  104. package/docs/5-graphql-support.tsx +24 -26
  105. package/local-config-example.ts +3 -3
  106. package/package.json +109 -110
  107. package/report.api.md +241 -273
  108. package/dist/cjs/components/EmojiButton/styles.js +0 -23
  109. package/dist/cjs/components/ShowMore/styles.js +0 -36
  110. package/dist/es2019/components/EmojiButton/styles.js +0 -16
  111. package/dist/es2019/components/ShowMore/styles.js +0 -29
  112. package/dist/esm/components/EmojiButton/styles.js +0 -16
  113. package/dist/esm/components/ShowMore/styles.js +0 -29
  114. package/dist/types/components/EmojiButton/styles.d.ts +0 -1
  115. package/dist/types/components/ShowMore/styles.d.ts +0 -3
  116. package/dist/types-ts4.5/components/EmojiButton/styles.d.ts +0 -1
  117. package/dist/types-ts4.5/components/ShowMore/styles.d.ts +0 -3
@@ -4,51 +4,33 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.ShowMore = exports.RENDER_WRAPPER_TESTID = exports.RENDER_SHOWMORE_TESTID = void 0;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _react2 = require("@emotion/react");
7
+ exports.ShowMore = exports.RENDER_SHOWMORE_TESTID = void 0;
8
+ var _react = require("@emotion/react");
10
9
  var _reactIntlNext = require("react-intl-next");
10
+ var _new = require("@atlaskit/button/new");
11
11
  var _more = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/more"));
12
12
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
13
13
  var _i18n = require("../../shared/i18n");
14
- var _styles = require("./styles");
15
14
  /** @jsx jsx */
16
15
 
17
16
  /**
18
17
  * Test id for wrapper button
19
18
  */
20
19
  var RENDER_SHOWMORE_TESTID = exports.RENDER_SHOWMORE_TESTID = 'show-more-button';
21
- var RENDER_WRAPPER_TESTID = exports.RENDER_WRAPPER_TESTID = 'show-more-wrapper';
22
20
  /**
23
21
  * Show more custom emojis button
24
22
  */
25
23
  var ShowMore = exports.ShowMore = function ShowMore(_ref) {
26
- var onClick = _ref.onClick,
27
- _ref$style = _ref.style,
28
- style = _ref$style === void 0 ? {} : _ref$style,
29
- _ref$className = _ref.className,
30
- className = _ref$className === void 0 ? {} : _ref$className,
31
- buttonStyle = _ref.buttonStyle;
32
- return (0, _react2.jsx)("div", {
33
- className: className.container,
34
- css: _styles.moreEmojiContainerStyle,
35
- style: style.container,
36
- "data-testid": RENDER_WRAPPER_TESTID
37
- }, (0, _react2.jsx)("div", {
38
- css: _styles.separatorStyle
39
- }), (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _i18n.messages.moreEmoji, function (message) {
40
- return (0, _react2.jsx)(_tooltip.default, {
24
+ var onClick = _ref.onClick;
25
+ return (0, _react.jsx)(_reactIntlNext.FormattedMessage, _i18n.messages.moreEmoji, function (message) {
26
+ return (0, _react.jsx)(_tooltip.default, {
41
27
  content: message
42
- }, (0, _react2.jsx)("button", {
43
- className: className.button,
44
- css: [_styles.moreButtonStyle, buttonStyle],
45
- "aria-label": _i18n.messages.moreEmoji.defaultMessage,
46
- type: "button",
47
- style: style.button,
28
+ }, (0, _react.jsx)(_new.IconButton, {
29
+ label: _i18n.messages.moreEmoji.defaultMessage,
48
30
  onClick: onClick,
49
- "data-testid": RENDER_SHOWMORE_TESTID
50
- }, (0, _react2.jsx)(_more.default, {
51
- label: "More"
52
- })));
53
- }));
31
+ testId: RENDER_SHOWMORE_TESTID,
32
+ icon: _more.default,
33
+ appearance: "subtle"
34
+ }));
35
+ });
54
36
  };
@@ -9,12 +9,6 @@ Object.defineProperty(exports, "RENDER_SHOWMORE_TESTID", {
9
9
  return _ShowMore.RENDER_SHOWMORE_TESTID;
10
10
  }
11
11
  });
12
- Object.defineProperty(exports, "RENDER_WRAPPER_TESTID", {
13
- enumerable: true,
14
- get: function get() {
15
- return _ShowMore.RENDER_WRAPPER_TESTID;
16
- }
17
- });
18
12
  Object.defineProperty(exports, "ShowMore", {
19
13
  enumerable: true,
20
14
  get: function get() {
@@ -14,6 +14,8 @@ var _emojiAdd = _interopRequireDefault(require("@atlaskit/icon/glyph/emoji-add")
14
14
  var _styles = require("./styles");
15
15
  /** @jsx jsx */
16
16
 
17
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
18
+
17
19
  /**
18
20
  * Test id for the tooltip
19
21
  */
@@ -39,7 +41,10 @@ var Trigger = exports.Trigger = /*#__PURE__*/_react.default.forwardRef(function
39
41
  testId: RENDER_TOOLTIP_TRIGGER_TESTID,
40
42
  content: tooltipContent
41
43
  }, (0, _react2.jsx)(_standardButton.default, (0, _extends2.default)({
42
- testId: RENDER_TRIGGER_BUTTON_TESTID,
44
+ testId: RENDER_TRIGGER_BUTTON_TESTID
45
+ // TODO: (from codemod) Buttons with "component", "css" or "style" prop can't be automatically migrated with codemods. Please migrate it manually.
46
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
47
+ ,
43
48
  css: (0, _styles.triggerStyle)({
44
49
  miniMode: miniMode,
45
50
  disabled: disabled
@@ -10,7 +10,7 @@ var _react = require("@emotion/react");
10
10
  var _colors = require("@atlaskit/theme/colors");
11
11
  var _constants = require("@atlaskit/theme/constants");
12
12
  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; }
13
- 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; } /** @jsx jsx */
13
+ 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; } /** @jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
14
14
  var DISABLED_BUTTON_COLOR = exports.DISABLED_BUTTON_COLOR = "".concat("var(--ds-text-disabled, ".concat(_colors.N70, ")"), " !important");
15
15
  var triggerStyle = exports.triggerStyle = function triggerStyle(_ref) {
16
16
  var _ref$miniMode = _ref.miniMode,
@@ -22,6 +22,7 @@ var triggerStyle = exports.triggerStyle = function triggerStyle(_ref) {
22
22
  height: '24px',
23
23
  padding: 0,
24
24
  border: "1px solid ".concat("var(--ds-border, ".concat(_colors.N40, ")")),
25
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
25
26
  borderRadius: '20px',
26
27
  display: 'flex',
27
28
  justifyContent: 'center',
@@ -31,6 +32,7 @@ var triggerStyle = exports.triggerStyle = function triggerStyle(_ref) {
31
32
  minWidth: '24px',
32
33
  padding: "var(--ds-space-050, 4px)",
33
34
  border: 'none',
35
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
34
36
  borderRadius: "".concat((0, _constants.borderRadius)(), "px")
35
37
  }), disabled && {
36
38
  color: DISABLED_BUTTON_COLOR,
@@ -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 = "22.7.1";
4
+ const packageVersion = "22.7.2";
5
5
  /**
6
6
  * TODO: move to utility package?
7
7
  * A random sampling function
@@ -1,5 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { useEffect, useMemo, useRef } from 'react';
3
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
4
  import { jsx, css } from '@emotion/react';
4
5
  import { SlideIn, ExitingPersistence, mediumDurationMs } from '@atlaskit/motion';
5
6
  // eslint-disable-next-line @atlaskit/design-system/no-banned-imports
@@ -51,8 +52,11 @@ export const Counter = ({
51
52
  return lastValue.current ? lastValue.current < value : false;
52
53
  }, [value]);
53
54
  return jsx("div", {
55
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
54
56
  className: className,
55
- "data-testid": RENDER_COMPONENT_WRAPPER,
57
+ "data-testid": RENDER_COMPONENT_WRAPPER
58
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
59
+ ,
56
60
  css: countStyle
57
61
  }, jsx(ExitingPersistence, null, jsx(SlideIn, {
58
62
  enterFrom: isIncreasing ? 'top' : 'bottom',
@@ -62,13 +66,22 @@ export const Counter = ({
62
66
  }, (motion, direction) => {
63
67
  return jsx("div", {
64
68
  ref: motion.ref,
65
- css: [containerStyle, css({
69
+ css: [
70
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
71
+ containerStyle,
72
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
73
+ css({
74
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
66
75
  position: direction === 'exiting' ? 'absolute' : undefined
67
- })],
76
+ })]
77
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
78
+ ,
68
79
  className: motion.className,
69
80
  "data-testid": RENDER_COUNTER_TESTID
70
81
  }, jsx("span", {
71
- "data-testid": RENDER_LABEL_TESTID,
82
+ "data-testid": RENDER_LABEL_TESTID
83
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
84
+ ,
72
85
  css: highlight ? [counterLabelStyle, highlightStyle] : counterLabelStyle,
73
86
  key: value
74
87
  }, label));
@@ -1,6 +1,8 @@
1
1
  /** @jsx jsx */
2
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
3
  import { css } from '@emotion/react';
3
4
  import { N90, B400 } from '@atlaskit/theme/colors';
5
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
4
6
  export const countStyle = css({
5
7
  fontSize: 11,
6
8
  color: `var(--ds-text-subtlest, ${N90})`,
@@ -9,13 +11,19 @@ export const countStyle = css({
9
11
  padding: `${"var(--ds-space-050, 4px)"} ${"var(--ds-space-100, 8px)"} ${"var(--ds-space-050, 4px)"} 0`,
10
12
  lineHeight: '14px'
11
13
  });
14
+
15
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
12
16
  export const containerStyle = css({
13
17
  display: 'flex',
14
18
  flexDirection: 'column'
15
19
  });
20
+
21
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
16
22
  export const highlightStyle = css({
17
23
  color: `var(--ds-text-selected, ${B400})`
18
24
  });
25
+
26
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
19
27
  export const counterLabelStyle = css({
20
28
  fontVariantNumeric: 'tabular-nums'
21
29
  });
@@ -1,11 +1,27 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
3
  import { useIntl } from 'react-intl-next';
4
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
5
  import { jsx } from '@emotion/react';
5
6
  import { ResourcedEmoji } from '@atlaskit/emoji';
7
+ import { Pressable, xcss } from '@atlaskit/primitives';
6
8
  import { messages } from '../../shared/i18n';
7
9
  import { isLeftClick } from '../../shared/utils';
8
- import { emojiButtonStyle } from './styles';
10
+ const emojiButtonStyles = xcss({
11
+ outline: 'none',
12
+ display: 'flex',
13
+ backgroundColor: 'color.background.neutral.subtle',
14
+ border: 0,
15
+ borderRadius: 'border.radius',
16
+ margin: 'space.0',
17
+ padding: 'space.100',
18
+ // @ts-expect-error - Nested selectors not supported in XCSS
19
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
20
+ ':hover > span': {
21
+ transition: 'transform cubic-bezier(0.23, 1, 0.32, 1) 200ms',
22
+ transform: 'scale(1.33)'
23
+ }
24
+ });
9
25
  export const RENDER_BUTTON_TESTID = 'button-emoji-id';
10
26
  /**
11
27
  * custom button to render the custom emoji selector inside the reaction picker
@@ -22,14 +38,13 @@ export const EmojiButton = ({
22
38
  }
23
39
  };
24
40
  const intl = useIntl();
25
- return jsx("button", {
26
- "data-testid": RENDER_BUTTON_TESTID,
41
+ return jsx(Pressable, {
42
+ testId: RENDER_BUTTON_TESTID,
27
43
  onClick: onButtonClick,
28
44
  "aria-label": intl.formatMessage(messages.reactWithEmoji, {
29
45
  emoji: emojiId.shortName
30
46
  }),
31
- type: "button",
32
- css: emojiButtonStyle
47
+ xcss: emojiButtonStyles
33
48
  }, jsx(ResourcedEmoji, {
34
49
  emojiProvider: emojiProvider,
35
50
  emojiId: emojiId
@@ -1,5 +1,6 @@
1
1
  /** @jsx jsx */
2
2
 
3
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
4
  import { jsx } from '@emotion/react';
4
5
  import { containerStyle, flashStyle } from './styles';
5
6
  /**
@@ -11,7 +12,10 @@ export const RENDER_FLASHANIMATION_TESTID = 'flash-animation';
11
12
  * Flash animation background component. See Reaction component for usage.
12
13
  */
13
14
  export const FlashAnimation = props => jsx("div", {
14
- className: props.className,
15
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
16
+ className: props.className
17
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
18
+ ,
15
19
  css: [containerStyle, props.flash && flashStyle],
16
20
  "data-testid": RENDER_FLASHANIMATION_TESTID
17
21
  }, props.children);
@@ -1,7 +1,10 @@
1
1
  /** @jsx jsx */
2
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
3
  import { css, keyframes } from '@emotion/react';
3
4
  import { B75, B300 } from '@atlaskit/theme/colors';
4
5
  const flashTime = 700;
6
+
7
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-keyframes -- Ignored via go/DSP-18766
5
8
  export const flashAnimation = keyframes({
6
9
  '0%': {
7
10
  backgroundColor: 'transparent'
@@ -19,10 +22,15 @@ export const flashAnimation = keyframes({
19
22
  borderColor: `var(--ds-border-selected, ${B300})`
20
23
  }
21
24
  });
25
+
26
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
22
27
  export const containerStyle = css({
23
28
  width: '100%',
24
29
  height: '100%'
25
30
  });
31
+
32
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
26
33
  export const flashStyle = css({
34
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
27
35
  animation: `${flashAnimation} ${flashTime}ms ease-in-out`
28
36
  });
@@ -1,9 +1,11 @@
1
1
  /** @jsx jsx */
2
2
  import React, { useCallback, useEffect, useRef, useState } from 'react';
3
3
  import { useIntl } from 'react-intl-next';
4
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
5
  import { jsx } from '@emotion/react';
5
6
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
6
7
  import { ResourcedEmoji } from '@atlaskit/emoji';
8
+ import { Box, Pressable, xcss } from '@atlaskit/primitives';
7
9
  import { createAndFireSafe, createReactionClickedEvent, createReactionFocusedEvent, createReactionHoveredEvent } from '../../analytics';
8
10
  import { Counter } from '../Counter';
9
11
  import { FlashAnimation } from '../FlashAnimation';
@@ -11,11 +13,48 @@ import { ReactionParticleEffect } from '../ReactionParticleEffect';
11
13
  import { ReactionTooltip } from '../ReactionTooltip';
12
14
  import { messages } from '../../shared/i18n';
13
15
  import { isLeftClick } from '../../shared/utils';
14
- import { containerStyle, emojiStyle, emojiNoReactionStyle, flashStyle, reactedStyle, reactionStyle } from './styles';
16
+ import { emojiStyle, emojiNoReactionStyle, flashStyle } from './styles';
15
17
  /**
16
18
  * Test id for Reaction item wrapper div
17
19
  */
18
20
  export const RENDER_REACTION_TESTID = 'render_reaction_wrapper';
21
+ const containerStyles = xcss({
22
+ position: 'relative'
23
+ });
24
+ const reactionStyles = xcss({
25
+ display: 'flex',
26
+ flexDirection: 'row',
27
+ alignItems: 'flex-start',
28
+ minWidth: '36px',
29
+ height: '24px',
30
+ backgroundColor: 'color.background.neutral.subtle',
31
+ borderWidth: 'border.width',
32
+ borderStyle: 'solid',
33
+ borderColor: 'color.border',
34
+ borderRadius: 'border.radius.circle',
35
+ color: 'color.text.subtle',
36
+ marginBlockStart: 'space.050',
37
+ marginInlineEnd: 'space.050',
38
+ padding: 'space.0',
39
+ overflow: 'hidden',
40
+ ':hover': {
41
+ backgroundColor: 'color.background.neutral.subtle.hovered'
42
+ },
43
+ ':active': {
44
+ backgroundColor: 'color.background.neutral.subtle.pressed'
45
+ }
46
+ });
47
+ const reactedStyles = xcss({
48
+ backgroundColor: 'color.background.selected',
49
+ borderColor: 'color.border.selected',
50
+ ':hover': {
51
+ backgroundColor: 'color.background.selected.hovered'
52
+ },
53
+ ':active': {
54
+ backgroundColor: 'color.background.selected.pressed'
55
+ }
56
+ });
57
+
19
58
  /**
20
59
  * Render an emoji reaction button
21
60
  */
@@ -25,7 +64,6 @@ export const Reaction = ({
25
64
  reaction,
26
65
  onMouseEnter = () => {},
27
66
  onFocused = () => {},
28
- className,
29
67
  flash = false,
30
68
  showParticleEffect = false,
31
69
  handleUserListClick = () => {},
@@ -88,8 +126,8 @@ export const Reaction = ({
88
126
  handleUserListClick(emojiId);
89
127
  setIsTooltipEnabled(false);
90
128
  };
91
- return jsx("div", {
92
- css: containerStyle
129
+ return jsx(Box, {
130
+ xcss: containerStyles
93
131
  }, showParticleEffect && jsx(ReactionParticleEffect, {
94
132
  emojiId: emojiId,
95
133
  emojiProvider: emojiProvider
@@ -99,15 +137,13 @@ export const Reaction = ({
99
137
  handleUserListClick: handleOpenReactionsDialog,
100
138
  allowUserDialog: allowUserDialog,
101
139
  isEnabled: isTooltipEnabled
102
- }, jsx("button", {
103
- className: className,
104
- css: [reactionStyle, reaction.reacted && reactedStyle],
140
+ }, jsx(Pressable, {
141
+ xcss: [reactionStyles, reaction.reacted && reactedStyles],
105
142
  "aria-label": intl.formatMessage(messages.reactWithEmoji, {
106
143
  emoji: emojiName
107
144
  }),
108
- type: "button",
109
145
  "data-emoji-id": reaction.emojiId,
110
- "data-testid": RENDER_REACTION_TESTID,
146
+ testId: RENDER_REACTION_TESTID,
111
147
  onClick: handleClick,
112
148
  onMouseEnter: handleMouseEnter,
113
149
  onFocus: handleFocused,
@@ -1,4 +1,5 @@
1
1
  /** @jsx jsx */
2
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
3
  import { css } from '@emotion/react';
3
4
  import { B50, B75, B300, N20, N40, N400, B100 } from '@atlaskit/theme/colors';
4
5
  /**
@@ -12,14 +13,19 @@ const akHeight = 24;
12
13
  * of FlashAnimation b/c it otherwise throws off the flash styling
13
14
  */
14
15
 
16
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
15
17
  export const containerStyle = css({
16
18
  position: 'relative'
17
19
  });
20
+
21
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
18
22
  export const emojiStyle = css({
19
23
  transformOrigin: 'center center 0',
20
24
  lineHeight: '12px',
21
25
  padding: `${"var(--ds-space-050, 4px)"} ${"var(--ds-space-050, 4px)"} ${"var(--ds-space-050, 4px)"} ${"var(--ds-space-100, 8px)"}`
22
26
  });
27
+
28
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
23
29
  export const reactionStyle = css({
24
30
  display: 'flex',
25
31
  flexDirection: 'row',
@@ -47,6 +53,8 @@ export const reactionStyle = css({
47
53
  },
48
54
  overflow: 'hidden'
49
55
  });
56
+
57
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
50
58
  export const reactedStyle = css({
51
59
  backgroundColor: `var(--ds-background-selected, ${B50})`,
52
60
  borderColor: `var(--ds-border-selected, ${B300})`,
@@ -56,13 +64,17 @@ export const reactedStyle = css({
56
64
  });
57
65
  export const flashHeight = akHeight - 2; // height without the 1px border
58
66
 
67
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
59
68
  export const flashStyle = css({
60
69
  display: 'flex',
61
70
  flexDirection: 'row',
62
71
  alignItems: 'center',
63
72
  borderRadius: '10px',
73
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
64
74
  height: `${flashHeight}px`
65
75
  });
76
+
77
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
66
78
  export const emojiNoReactionStyle = css({
67
79
  padding: `${"var(--ds-space-050, 4px)"} ${"var(--ds-space-025, 2px)"} ${"var(--ds-space-050, 4px)"} 10px`
68
80
  });
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  /** @jsx jsx */
3
3
  import { useEffect, useState, useMemo } from 'react';
4
4
  import { useIntl } from 'react-intl-next';
5
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
5
6
  import { jsx } from '@emotion/react';
6
7
  import { ResourcedEmoji } from '@atlaskit/emoji/element';
7
8
  import Avatar from '@atlaskit/avatar/Avatar';
@@ -34,32 +35,42 @@ export const ReactionView = ({
34
35
  return ((_reactionObj$users = reactionObj.users) === null || _reactionObj$users === void 0 ? void 0 : _reactionObj$users.sort((a, b) => a.displayName.localeCompare(b.displayName))) || [];
35
36
  }, [reaction]);
36
37
  const tabPanelAttributes = useTabPanel();
37
- return jsx("div", _extends({
38
- css: reactionViewStyle
39
- }, tabPanelAttributes), jsx("p", null, jsx(ResourcedEmoji, {
40
- emojiProvider: emojiProvider,
41
- emojiId: {
42
- id: selectedEmojiId,
43
- shortName: ''
44
- },
45
- fitToHeight: 24
46
- }), intl.formatMessage(messages.emojiName, {
47
- emojiName
48
- })), alphabeticalNames.length === 0 ? jsx("div", {
49
- css: centerSpinner
50
- }, jsx(Spinner, {
51
- size: "large"
52
- })) : jsx("ul", {
53
- css: userListStyle
54
- }, alphabeticalNames.map(user => {
55
- var _user$profilePicture;
56
- const profile = (_user$profilePicture = user.profilePicture) === null || _user$profilePicture === void 0 ? void 0 : _user$profilePicture.path;
57
- return jsx("li", {
58
- css: userStyle,
59
- key: user.id
60
- }, jsx(Avatar, {
61
- size: "large",
62
- src: profile
63
- }), jsx("span", null, user.displayName));
64
- })));
38
+ return (
39
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
40
+ jsx("div", _extends({
41
+ css: reactionViewStyle
42
+ }, tabPanelAttributes), jsx("p", null, jsx(ResourcedEmoji, {
43
+ emojiProvider: emojiProvider,
44
+ emojiId: {
45
+ id: selectedEmojiId,
46
+ shortName: ''
47
+ },
48
+ fitToHeight: 24
49
+ }), intl.formatMessage(messages.emojiName, {
50
+ emojiName
51
+ })), alphabeticalNames.length === 0 ?
52
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
53
+ jsx("div", {
54
+ css: centerSpinner
55
+ }, jsx(Spinner, {
56
+ size: "large"
57
+ })) :
58
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
59
+ jsx("ul", {
60
+ css: userListStyle
61
+ }, alphabeticalNames.map(user => {
62
+ var _user$profilePicture;
63
+ const profile = (_user$profilePicture = user.profilePicture) === null || _user$profilePicture === void 0 ? void 0 : _user$profilePicture.path;
64
+ return (
65
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
66
+ jsx("li", {
67
+ css: userStyle,
68
+ key: user.id
69
+ }, jsx(Avatar, {
70
+ size: "large",
71
+ src: profile
72
+ }), jsx("span", null, user.displayName))
73
+ );
74
+ })))
75
+ );
65
76
  };
@@ -1,6 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import { useEffect, useState, useRef, useCallback, useMemo } from 'react';
3
3
  import { useIntl } from 'react-intl-next';
4
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
5
  import { jsx } from '@emotion/react';
5
6
  import Button from '@atlaskit/button/new';
6
7
  import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle } from '@atlaskit/modal-dialog';
@@ -1,5 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { useCallback, useState } from 'react';
3
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
4
  import { jsx } from '@emotion/react';
4
5
  import { ResourcedEmoji } from '@atlaskit/emoji/element';
5
6
  import Tabs, { Tab, TabList } from '@atlaskit/tabs';
@@ -47,7 +48,10 @@ export const ReactionsList = ({
47
48
  shortName: ''
48
49
  };
49
50
  return jsx("div", {
50
- css: customTabWrapper((emojiId === null || emojiId === void 0 ? void 0 : emojiId.id) === selectedEmoji.id, selectedEmoji.id, colorMode),
51
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
52
+ css: customTabWrapper((emojiId === null || emojiId === void 0 ? void 0 : emojiId.id) === selectedEmoji.id, selectedEmoji.id, colorMode)
53
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
54
+ ,
51
55
  className: "reaction-elements",
52
56
  key: reaction.emojiId,
53
57
  "data-testid": emojiId === null || emojiId === void 0 ? void 0 : emojiId.id