@atlaskit/reactions 22.7.1 → 22.7.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 (117) hide show
  1. package/CHANGELOG.md +1185 -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 +14 -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 +10 -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 +11 -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
@@ -1,11 +1,12 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  /** @jsx jsx */
3
3
  import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
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 { FormattedMessage } from 'react-intl-next';
6
7
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
7
8
  import { ModalTransition } from '@atlaskit/modal-dialog';
8
- import Button from '@atlaskit/button';
9
+ import Button from '@atlaskit/button/standard-button';
9
10
  import Tooltip from '@atlaskit/tooltip';
10
11
  import { createAndFireSafe, createPickerButtonClickedEvent, createPickerCancelledEvent, createPickerMoreClickedEvent, createReactionsRenderedEvent, createReactionSelectionEvent, isSampled } from '../../analytics';
11
12
  import { SAMPLING_RATE_REACTIONS_RENDERED_EXP } from '../../shared/constants';
@@ -247,48 +248,59 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
247
248
  });
248
249
  return reactions.concat(items);
249
250
  }, [quickReactionEmojis, reactions]);
250
- return jsx("div", {
251
- css: wrapperStyle,
252
- "data-testid": RENDER_REACTIONS_TESTID
253
- }, memorizedReactions.map(function (reaction) {
254
- return jsx(Reaction, {
255
- key: reaction.emojiId,
256
- reaction: reaction,
251
+ return (
252
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
253
+ jsx("div", {
254
+ css: wrapperStyle,
255
+ "data-testid": RENDER_REACTIONS_TESTID
256
+ }, memorizedReactions.map(function (reaction) {
257
+ return jsx(Reaction, {
258
+ key: reaction.emojiId,
259
+ reaction: reaction,
260
+ emojiProvider: emojiProvider,
261
+ onClick: onReactionClick,
262
+ onMouseEnter: handleReactionMouseEnter,
263
+ onFocused: handleReactionFocused,
264
+ flash: flash[reaction.emojiId],
265
+ handleUserListClick: handleOpenReactionsDialog,
266
+ allowUserDialog: allowUserDialog,
267
+ showParticleEffect: particleEffectByEmoji[reaction.emojiId]
268
+ });
269
+ }), jsx(ReactionPicker
270
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
271
+ , {
272
+ css: reactionPickerStyle,
257
273
  emojiProvider: emojiProvider,
258
- onClick: onReactionClick,
259
- onMouseEnter: handleReactionMouseEnter,
260
- onFocused: handleReactionFocused,
261
- flash: flash[reaction.emojiId],
262
- handleUserListClick: handleOpenReactionsDialog,
263
- allowUserDialog: allowUserDialog,
264
- showParticleEffect: particleEffectByEmoji[reaction.emojiId]
265
- });
266
- }), jsx(ReactionPicker, {
267
- css: reactionPickerStyle,
268
- emojiProvider: emojiProvider,
269
- allowAllEmojis: allowAllEmojis,
270
- pickerQuickReactionEmojiIds: pickerQuickReactionEmojiIds,
271
- disabled: status !== ReactionStatus.ready,
272
- onSelection: handleOnSelection,
273
- onOpen: handlePickerOpen,
274
- onCancel: handleOnCancel,
275
- onShowMore: handleOnMore,
276
- tooltipContent: getTooltip(status, errorMessage),
277
- emojiPickerSize: emojiPickerSize,
278
- miniMode: miniMode
279
- }), allowUserDialog && reactions.length > 0 && jsx(Tooltip, {
280
- content: jsx(FormattedMessage, messages.seeWhoReactedTooltip),
281
- hideTooltipOnClick: true
282
- }, jsx(Button, {
283
- appearance: "subtle-link",
284
- onClick: handleOpenAllReactionsDialog,
285
- css: seeWhoReactedStyle,
286
- testId: RENDER_VIEWALL_REACTED_USERS_DIALOG
287
- }, jsx(FormattedMessage, messages.seeWhoReacted))), jsx(ModalTransition, null, !!selectedEmojiId && jsx(ReactionsDialog, {
288
- selectedEmojiId: selectedEmojiId,
289
- reactions: memorizedReactions,
290
- emojiProvider: emojiProvider,
291
- handleCloseReactionsDialog: handleCloseReactionsDialog,
292
- handleSelectReaction: handleSelectReactionInDialog
293
- })));
274
+ allowAllEmojis: allowAllEmojis,
275
+ pickerQuickReactionEmojiIds: pickerQuickReactionEmojiIds,
276
+ disabled: status !== ReactionStatus.ready,
277
+ onSelection: handleOnSelection,
278
+ onOpen: handlePickerOpen,
279
+ onCancel: handleOnCancel,
280
+ onShowMore: handleOnMore,
281
+ tooltipContent: getTooltip(status, errorMessage),
282
+ emojiPickerSize: emojiPickerSize,
283
+ miniMode: miniMode
284
+ }), allowUserDialog && reactions.length > 0 && jsx(Tooltip, {
285
+ content: jsx(FormattedMessage, messages.seeWhoReactedTooltip),
286
+ hideTooltipOnClick: true
287
+ }, jsx(Button
288
+ // 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.
289
+ // https://product-fabric.atlassian.net/browse/DSP-18982
290
+ , {
291
+ appearance: "subtle-link",
292
+ onClick: handleOpenAllReactionsDialog
293
+ // TODO: (from codemod) Buttons with "component", "css" or "style" prop can't be automatically migrated with codemods. Please migrate it manually.
294
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
295
+ ,
296
+ css: seeWhoReactedStyle,
297
+ testId: RENDER_VIEWALL_REACTED_USERS_DIALOG
298
+ }, jsx(FormattedMessage, messages.seeWhoReacted))), jsx(ModalTransition, null, !!selectedEmojiId && jsx(ReactionsDialog, {
299
+ selectedEmojiId: selectedEmojiId,
300
+ reactions: memorizedReactions,
301
+ emojiProvider: emojiProvider,
302
+ handleCloseReactionsDialog: handleCloseReactionsDialog,
303
+ handleSelectReaction: handleSelectReactionInDialog
304
+ })))
305
+ );
294
306
  });
@@ -1,9 +1,13 @@
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';
4
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
3
5
  export var reactionPickerStyle = css({
4
6
  display: 'inline-block',
5
7
  marginTop: "var(--ds-space-050, 4px)"
6
8
  });
9
+
10
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
7
11
  export var seeWhoReactedStyle = css({
8
12
  height: '24px',
9
13
  lineHeight: '24px',
@@ -12,6 +16,8 @@ export var seeWhoReactedStyle = css({
12
16
  marginTop: "var(--ds-space-050, 4px)",
13
17
  marginLeft: "var(--ds-space-050, 4px)"
14
18
  });
19
+
20
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
15
21
  export var wrapperStyle = css({
16
22
  display: 'flex',
17
23
  flexWrap: 'wrap',
@@ -19,6 +25,7 @@ export var wrapperStyle = css({
19
25
  alignItems: 'center',
20
26
  borderRadius: '15px',
21
27
  marginTop: "var(--ds-space-negative-050, -4px)",
28
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
22
29
  '> :first-of-type > :first-of-type': {
23
30
  marginLeft: 0
24
31
  }
@@ -1,27 +1,60 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  /** @jsx jsx */
3
- import React, { useEffect, useRef, useState } from 'react';
3
+ import React, { Fragment, useEffect, useRef, useState } from 'react';
4
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
5
  import { jsx } from '@emotion/react';
6
+ import { Box, Inline, xcss } from '@atlaskit/primitives';
5
7
  import Tooltip from '@atlaskit/tooltip';
6
8
  import { DefaultReactions } from '../../shared/constants';
7
9
  import { EmojiButton } from '../EmojiButton';
8
10
  import { ShowMore } from '../ShowMore';
9
- import { emojiStyle, revealStyle, selectorStyle } from './styles';
11
+ import { emojiStyle, revealStyle } from './styles';
10
12
 
11
13
  /**
12
14
  * Test id for wrapper Selector div
13
15
  */
14
16
  export var RENDER_SELECTOR_TESTID = 'render-selector';
17
+
18
+ /**
19
+ * Delay for each emoji reveal animation, in ms
20
+ */
21
+ var REVEAL_DELAY = 50;
22
+ var containerStyles = xcss({
23
+ padding: 'space.050'
24
+ });
25
+ var separatorStyles = xcss({
26
+ borderLeftColor: 'color.border',
27
+ borderLeftStyle: 'solid',
28
+ borderLeftWidth: 'border.width',
29
+ marginInlineStart: 'space.050',
30
+ marginInlineEnd: 'space.100',
31
+ height: '24px',
32
+ display: 'inline-block'
33
+ });
34
+ var Reveal = function Reveal(_ref) {
35
+ var children = _ref.children,
36
+ delay = _ref.delay;
37
+ return jsx("div", {
38
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
39
+ css: revealStyle
40
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
41
+ ,
42
+ style: delay ? {
43
+ animationDelay: "".concat(delay, "ms")
44
+ } : undefined
45
+ }, children);
46
+ };
47
+
15
48
  /**
16
49
  * Reactions picker panel part of the <ReactionPicker /> component
17
50
  */
18
- export var Selector = function Selector(_ref) {
19
- var emojiProvider = _ref.emojiProvider,
20
- onMoreClick = _ref.onMoreClick,
21
- onSelection = _ref.onSelection,
22
- showMore = _ref.showMore,
23
- _ref$pickerQuickReact = _ref.pickerQuickReactionEmojiIds,
24
- pickerQuickReactionEmojiIds = _ref$pickerQuickReact === void 0 ? DefaultReactions : _ref$pickerQuickReact;
51
+ export var Selector = function Selector(_ref2) {
52
+ var emojiProvider = _ref2.emojiProvider,
53
+ onMoreClick = _ref2.onMoreClick,
54
+ onSelection = _ref2.onSelection,
55
+ showMore = _ref2.showMore,
56
+ _ref2$pickerQuickReac = _ref2.pickerQuickReactionEmojiIds,
57
+ pickerQuickReactionEmojiIds = _ref2$pickerQuickReac === void 0 ? DefaultReactions : _ref2$pickerQuickReac;
25
58
  var _useState = useState(),
26
59
  _useState2 = _slicedToArray(_useState, 2),
27
60
  selection = _useState2[0],
@@ -54,16 +87,6 @@ export var Selector = function Selector(_ref) {
54
87
  setSelection(item);
55
88
  };
56
89
 
57
- /**
58
- * custom css styling for the emoji icon
59
- * @param index location of the emoji in the rendered list of items
60
- */
61
- var emojiStyleAnimation = function emojiStyleAnimation(index) {
62
- return {
63
- animationDelay: "".concat(index * 50, "ms")
64
- };
65
- };
66
-
67
90
  /**
68
91
  * Render the default emoji icon
69
92
  * @param emoji emoji item
@@ -71,11 +94,15 @@ export var Selector = function Selector(_ref) {
71
94
  */
72
95
  var renderEmoji = function renderEmoji(emoji, index) {
73
96
  var _emoji$id;
74
- return jsx("div", {
75
- key: (_emoji$id = emoji.id) !== null && _emoji$id !== void 0 ? _emoji$id : emoji.shortName,
76
- className: emoji === selection ? 'selected' : undefined,
77
- css: [emojiStyle, revealStyle],
78
- style: emojiStyleAnimation(index),
97
+ return jsx(Reveal, {
98
+ delay: index * REVEAL_DELAY,
99
+ key: (_emoji$id = emoji.id) !== null && _emoji$id !== void 0 ? _emoji$id : emoji.shortName
100
+ }, jsx("div", {
101
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
102
+ className: emoji === selection ? 'selected' : undefined
103
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
104
+ ,
105
+ css: emojiStyle,
79
106
  "data-testid": RENDER_SELECTOR_TESTID
80
107
  }, jsx(Tooltip, {
81
108
  content: emoji.shortName
@@ -83,16 +110,17 @@ export var Selector = function Selector(_ref) {
83
110
  emojiId: emoji,
84
111
  emojiProvider: emojiProvider,
85
112
  onClick: onSelected
86
- })));
113
+ }))));
87
114
  };
88
- return jsx("div", {
89
- css: selectorStyle
90
- }, pickerQuickReactionEmojiIds ? pickerQuickReactionEmojiIds.map(renderEmoji) : null, showMore ? jsx(ShowMore, {
115
+ return jsx(Inline, {
116
+ alignBlock: "center",
117
+ xcss: containerStyles
118
+ }, pickerQuickReactionEmojiIds ? pickerQuickReactionEmojiIds.map(renderEmoji) : null, showMore ? jsx(Fragment, null, jsx(Box, {
119
+ xcss: separatorStyles
120
+ }), jsx(Reveal, {
121
+ delay: DefaultReactions.length * REVEAL_DELAY
122
+ }, jsx(ShowMore, {
91
123
  key: "more",
92
- buttonStyle: revealStyle,
93
- style: {
94
- button: emojiStyleAnimation(DefaultReactions.length)
95
- },
96
124
  onClick: onMoreClick
97
- }) : null);
125
+ }))) : null);
98
126
  };
@@ -1,18 +1,18 @@
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
- export var selectorStyle = css({
4
- boxSizing: 'border-box',
5
- display: 'flex',
6
- padding: 0
7
- });
4
+
5
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
8
6
  export var emojiStyle = css({
9
7
  display: 'inline-block',
10
- opacity: 0,
8
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
11
9
  '&.selected': {
12
- transition: 'transform 200ms ease-in-out ',
10
+ transition: 'transform 200ms ease-in-out',
13
11
  transform: 'translateY(-48px) scale(2.667)'
14
12
  }
15
13
  });
14
+
15
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-keyframes -- Ignored via go/DSP-18766
16
16
  export var revealAnimation = keyframes({
17
17
  '0%': {
18
18
  opacity: 1,
@@ -26,16 +26,10 @@ export var revealAnimation = keyframes({
26
26
  transform: 'scale(1)'
27
27
  }
28
28
  });
29
- export var revealStyle = css({
30
- animation: "".concat(revealAnimation, " 150ms ease-in-out forwards")
31
- });
32
29
 
33
- /**
34
- * custom css styling for the emoji icon
35
- * @param index location of the emoji in the rendered list of items
36
- */
37
- export var emojiStyleAnimation = function emojiStyleAnimation(index) {
38
- return {
39
- animationDelay: "".concat(index * 50, "ms")
40
- };
41
- };
30
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
31
+ export var revealStyle = css({
32
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
33
+ animation: "".concat(revealAnimation, " 150ms ease-in-out forwards"),
34
+ opacity: 0
35
+ });
@@ -1,47 +1,30 @@
1
1
  /** @jsx jsx */
2
- import React from 'react';
2
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
3
  import { jsx } from '@emotion/react';
4
4
  import { FormattedMessage } from 'react-intl-next';
5
+ import { IconButton } from '@atlaskit/button/new';
5
6
  import EditorMoreIcon from '@atlaskit/icon/glyph/editor/more';
6
7
  import Tooltip from '@atlaskit/tooltip';
7
8
  import { messages } from '../../shared/i18n';
8
- import { moreButtonStyle, moreEmojiContainerStyle, separatorStyle } from './styles';
9
9
 
10
10
  /**
11
11
  * Test id for wrapper button
12
12
  */
13
13
  export var RENDER_SHOWMORE_TESTID = 'show-more-button';
14
- export var RENDER_WRAPPER_TESTID = 'show-more-wrapper';
15
14
  /**
16
15
  * Show more custom emojis button
17
16
  */
18
17
  export var ShowMore = function ShowMore(_ref) {
19
- var onClick = _ref.onClick,
20
- _ref$style = _ref.style,
21
- style = _ref$style === void 0 ? {} : _ref$style,
22
- _ref$className = _ref.className,
23
- className = _ref$className === void 0 ? {} : _ref$className,
24
- buttonStyle = _ref.buttonStyle;
25
- return jsx("div", {
26
- className: className.container,
27
- css: moreEmojiContainerStyle,
28
- style: style.container,
29
- "data-testid": RENDER_WRAPPER_TESTID
30
- }, jsx("div", {
31
- css: separatorStyle
32
- }), jsx(FormattedMessage, messages.moreEmoji, function (message) {
18
+ var onClick = _ref.onClick;
19
+ return jsx(FormattedMessage, messages.moreEmoji, function (message) {
33
20
  return jsx(Tooltip, {
34
21
  content: message
35
- }, jsx("button", {
36
- className: className.button,
37
- css: [moreButtonStyle, buttonStyle],
38
- "aria-label": messages.moreEmoji.defaultMessage,
39
- type: "button",
40
- style: style.button,
22
+ }, jsx(IconButton, {
23
+ label: messages.moreEmoji.defaultMessage,
41
24
  onClick: onClick,
42
- "data-testid": RENDER_SHOWMORE_TESTID
43
- }, jsx(EditorMoreIcon, {
44
- label: "More"
45
- })));
46
- }));
25
+ testId: RENDER_SHOWMORE_TESTID,
26
+ icon: EditorMoreIcon,
27
+ appearance: "subtle"
28
+ }));
29
+ });
47
30
  };
@@ -1 +1 @@
1
- export { ShowMore, RENDER_SHOWMORE_TESTID, RENDER_WRAPPER_TESTID } from './ShowMore';
1
+ export { ShowMore, RENDER_SHOWMORE_TESTID } from './ShowMore';
@@ -1,6 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  /** @jsx jsx */
3
3
  import React from 'react';
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/standard-button';
6
7
  import Tooltip from '@atlaskit/tooltip';
@@ -32,7 +33,10 @@ export var Trigger = /*#__PURE__*/React.forwardRef(function (props, ref) {
32
33
  testId: RENDER_TOOLTIP_TRIGGER_TESTID,
33
34
  content: tooltipContent
34
35
  }, jsx(Button, _extends({
35
- testId: RENDER_TRIGGER_BUTTON_TESTID,
36
+ testId: RENDER_TRIGGER_BUTTON_TESTID
37
+ // TODO: (from codemod) Buttons with "component", "css" or "style" prop can't be automatically migrated with codemods. Please migrate it manually.
38
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
39
+ ,
36
40
  css: triggerStyle({
37
41
  miniMode: miniMode,
38
42
  disabled: disabled
@@ -2,6 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  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; }
3
3
  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; }
4
4
  /** @jsx jsx */
5
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
5
6
  import { css } from '@emotion/react';
6
7
  import { N70, N20, N40, B100 } from '@atlaskit/theme/colors';
7
8
  import { borderRadius } from '@atlaskit/theme/constants';
@@ -16,6 +17,7 @@ export var triggerStyle = function triggerStyle(_ref) {
16
17
  height: '24px',
17
18
  padding: 0,
18
19
  border: "1px solid ".concat("var(--ds-border, ".concat(N40, ")")),
20
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
19
21
  borderRadius: '20px',
20
22
  display: 'flex',
21
23
  justifyContent: 'center',
@@ -25,6 +27,7 @@ export var triggerStyle = function triggerStyle(_ref) {
25
27
  minWidth: '24px',
26
28
  padding: "var(--ds-space-050, 4px)",
27
29
  border: 'none',
30
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
28
31
  borderRadius: "".concat(borderRadius(), "px")
29
32
  }), disabled && {
30
33
  color: DISABLED_BUTTON_COLOR,
@@ -18,4 +18,4 @@ export interface EmojiButtonProps {
18
18
  /**
19
19
  * custom button to render the custom emoji selector inside the reaction picker
20
20
  */
21
- export declare const EmojiButton: ({ emojiId, onClick, emojiProvider, }: EmojiButtonProps) => jsx.JSX.Element;
21
+ export declare const EmojiButton: ({ emojiId, onClick, emojiProvider }: EmojiButtonProps) => jsx.JSX.Element;
@@ -20,10 +20,6 @@ export interface ReactionProps extends Pick<ReactionTooltipProps, 'allowUserDial
20
20
  * event handler when the emoji button is clicked
21
21
  */
22
22
  onClick: ReactionClick;
23
- /**
24
- * Optional wrapper reaction <button /> class name
25
- */
26
- className?: string;
27
23
  /**
28
24
  * Optional event when the mouse cursor hovers over the reaction
29
25
  */
@@ -48,4 +44,4 @@ export interface ReactionProps extends Pick<ReactionTooltipProps, 'allowUserDial
48
44
  /**
49
45
  * Render an emoji reaction button
50
46
  */
51
- export declare const Reaction: ({ emojiProvider, onClick, reaction, onMouseEnter, onFocused, className, flash, showParticleEffect, handleUserListClick, allowUserDialog, }: ReactionProps) => jsx.JSX.Element;
47
+ export declare const Reaction: ({ emojiProvider, onClick, reaction, onMouseEnter, onFocused, flash, showParticleEffect, handleUserListClick, allowUserDialog, }: ReactionProps) => jsx.JSX.Element;
@@ -15,4 +15,4 @@ export interface ReactionViewProps {
15
15
  */
16
16
  emojiProvider: Promise<EmojiProvider>;
17
17
  }
18
- export declare const ReactionView: ({ selectedEmojiId, emojiProvider, reaction, }: ReactionViewProps) => jsx.JSX.Element;
18
+ export declare const ReactionView: ({ selectedEmojiId, emojiProvider, reaction }: ReactionViewProps) => jsx.JSX.Element;
@@ -1,2 +1,2 @@
1
- export { ReactionTooltip, RENDER_REACTIONTOOLTIP_TESTID, } from './ReactionTooltip';
1
+ export { ReactionTooltip, RENDER_REACTIONTOOLTIP_TESTID } from './ReactionTooltip';
2
2
  export type { ReactionTooltipProps } from './ReactionTooltip';
@@ -1,12 +1,5 @@
1
- /// <reference types="react" />
2
1
  /** @jsx jsx */
3
2
  import { keyframes } from '@emotion/react';
4
- export declare const selectorStyle: import("@emotion/react").SerializedStyles;
5
3
  export declare const emojiStyle: import("@emotion/react").SerializedStyles;
6
4
  export declare const revealAnimation: typeof keyframes;
7
5
  export declare const revealStyle: import("@emotion/react").SerializedStyles;
8
- /**
9
- * custom css styling for the emoji icon
10
- * @param index location of the emoji in the rendered list of items
11
- */
12
- export declare const emojiStyleAnimation: (index: number) => React.CSSProperties;
@@ -1,35 +1,17 @@
1
+ /// <reference types="react" />
1
2
  /** @jsx jsx */
2
- import React from 'react';
3
- import { jsx, type SerializedStyles } from '@emotion/react';
3
+ import { jsx } from '@emotion/react';
4
4
  /**
5
5
  * Test id for wrapper button
6
6
  */
7
7
  export declare const RENDER_SHOWMORE_TESTID = "show-more-button";
8
- export declare const RENDER_WRAPPER_TESTID = "show-more-wrapper";
9
- interface CommonProps<T> {
10
- container?: T;
11
- button?: T;
12
- }
13
8
  export interface ShowMoreProps {
14
9
  /**
15
10
  * Optional mouse click DOM event on showing more emoji icon
16
11
  */
17
12
  onClick?: React.MouseEventHandler<HTMLElement>;
18
- /**
19
- * Optional button css
20
- */
21
- buttonStyle?: SerializedStyles;
22
- /**
23
- * Optional custom styling for wrapper show more emoji button
24
- */
25
- style?: CommonProps<React.CSSProperties>;
26
- /**
27
- * Optional custom styling for wrapper show more emoji button
28
- */
29
- className?: CommonProps<string>;
30
13
  }
31
14
  /**
32
15
  * Show more custom emojis button
33
16
  */
34
- export declare const ShowMore: ({ onClick, style, className, buttonStyle, }: ShowMoreProps) => jsx.JSX.Element;
35
- export {};
17
+ export declare const ShowMore: ({ onClick }: ShowMoreProps) => jsx.JSX.Element;
@@ -1,2 +1,2 @@
1
- export { ShowMore, RENDER_SHOWMORE_TESTID, RENDER_WRAPPER_TESTID, } from './ShowMore';
1
+ export { ShowMore, RENDER_SHOWMORE_TESTID } from './ShowMore';
2
2
  export type { ShowMoreProps } from './ShowMore';
@@ -1,2 +1,2 @@
1
1
  export { ConnectedReactionPicker, type ConnectedReactionPickerProps, } from './ConnectedReactionPicker';
2
- export { ConnectedReactionsView, type ConnectedReactionsViewProps, } from './ConnectedReactionsView';
2
+ export { ConnectedReactionsView, type ConnectedReactionsViewProps } from './ConnectedReactionsView';
@@ -2,4 +2,4 @@ export type FocusManagerHook = {
2
2
  targetRef: HTMLDivElement | null;
3
3
  initialFocusRef: HTMLElement | null;
4
4
  };
5
- export declare const useFocusTrap: ({ targetRef, initialFocusRef, }: FocusManagerHook) => void;
5
+ export declare const useFocusTrap: ({ targetRef, initialFocusRef }: FocusManagerHook) => void;
@@ -18,4 +18,4 @@ export interface EmojiButtonProps {
18
18
  /**
19
19
  * custom button to render the custom emoji selector inside the reaction picker
20
20
  */
21
- export declare const EmojiButton: ({ emojiId, onClick, emojiProvider, }: EmojiButtonProps) => jsx.JSX.Element;
21
+ export declare const EmojiButton: ({ emojiId, onClick, emojiProvider }: EmojiButtonProps) => jsx.JSX.Element;
@@ -20,10 +20,6 @@ export interface ReactionProps extends Pick<ReactionTooltipProps, 'allowUserDial
20
20
  * event handler when the emoji button is clicked
21
21
  */
22
22
  onClick: ReactionClick;
23
- /**
24
- * Optional wrapper reaction <button /> class name
25
- */
26
- className?: string;
27
23
  /**
28
24
  * Optional event when the mouse cursor hovers over the reaction
29
25
  */
@@ -48,4 +44,4 @@ export interface ReactionProps extends Pick<ReactionTooltipProps, 'allowUserDial
48
44
  /**
49
45
  * Render an emoji reaction button
50
46
  */
51
- export declare const Reaction: ({ emojiProvider, onClick, reaction, onMouseEnter, onFocused, className, flash, showParticleEffect, handleUserListClick, allowUserDialog, }: ReactionProps) => jsx.JSX.Element;
47
+ export declare const Reaction: ({ emojiProvider, onClick, reaction, onMouseEnter, onFocused, flash, showParticleEffect, handleUserListClick, allowUserDialog, }: ReactionProps) => jsx.JSX.Element;
@@ -15,4 +15,4 @@ export interface ReactionViewProps {
15
15
  */
16
16
  emojiProvider: Promise<EmojiProvider>;
17
17
  }
18
- export declare const ReactionView: ({ selectedEmojiId, emojiProvider, reaction, }: ReactionViewProps) => jsx.JSX.Element;
18
+ export declare const ReactionView: ({ selectedEmojiId, emojiProvider, reaction }: ReactionViewProps) => jsx.JSX.Element;
@@ -1,2 +1,2 @@
1
- export { ReactionTooltip, RENDER_REACTIONTOOLTIP_TESTID, } from './ReactionTooltip';
1
+ export { ReactionTooltip, RENDER_REACTIONTOOLTIP_TESTID } from './ReactionTooltip';
2
2
  export type { ReactionTooltipProps } from './ReactionTooltip';
@@ -1,12 +1,5 @@
1
- /// <reference types="react" />
2
1
  /** @jsx jsx */
3
2
  import { keyframes } from '@emotion/react';
4
- export declare const selectorStyle: import("@emotion/react").SerializedStyles;
5
3
  export declare const emojiStyle: import("@emotion/react").SerializedStyles;
6
4
  export declare const revealAnimation: typeof keyframes;
7
5
  export declare const revealStyle: import("@emotion/react").SerializedStyles;
8
- /**
9
- * custom css styling for the emoji icon
10
- * @param index location of the emoji in the rendered list of items
11
- */
12
- export declare const emojiStyleAnimation: (index: number) => React.CSSProperties;
@@ -1,35 +1,17 @@
1
+ /// <reference types="react" />
1
2
  /** @jsx jsx */
2
- import React from 'react';
3
- import { jsx, type SerializedStyles } from '@emotion/react';
3
+ import { jsx } from '@emotion/react';
4
4
  /**
5
5
  * Test id for wrapper button
6
6
  */
7
7
  export declare const RENDER_SHOWMORE_TESTID = "show-more-button";
8
- export declare const RENDER_WRAPPER_TESTID = "show-more-wrapper";
9
- interface CommonProps<T> {
10
- container?: T;
11
- button?: T;
12
- }
13
8
  export interface ShowMoreProps {
14
9
  /**
15
10
  * Optional mouse click DOM event on showing more emoji icon
16
11
  */
17
12
  onClick?: React.MouseEventHandler<HTMLElement>;
18
- /**
19
- * Optional button css
20
- */
21
- buttonStyle?: SerializedStyles;
22
- /**
23
- * Optional custom styling for wrapper show more emoji button
24
- */
25
- style?: CommonProps<React.CSSProperties>;
26
- /**
27
- * Optional custom styling for wrapper show more emoji button
28
- */
29
- className?: CommonProps<string>;
30
13
  }
31
14
  /**
32
15
  * Show more custom emojis button
33
16
  */
34
- export declare const ShowMore: ({ onClick, style, className, buttonStyle, }: ShowMoreProps) => jsx.JSX.Element;
35
- export {};
17
+ export declare const ShowMore: ({ onClick }: ShowMoreProps) => jsx.JSX.Element;