@atlaskit/reactions 35.11.9 → 35.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md ADDED
@@ -0,0 +1,19 @@
1
+ # Reactions Package
2
+
3
+ ## Scope
4
+
5
+ This guide applies to work under `platform/packages/elements/reactions/**`.
6
+
7
+ This package is a shared platform for interacting with Reactions and is used by multiple products.
8
+
9
+ ## Coding standards
10
+
11
+ - ⛔ ** Avoid adding product specific behaviour to the components **. As this is a platform
12
+ component we should prefer that users of the platform component control how the components behave.
13
+ - A11Y fixes should be made in a platform component manner
14
+
15
+ ## Feature gating
16
+
17
+ - Changes should be behind a feature gate/experiment
18
+ - Target apps for the gate/experiment should include: `confluence_web`, `jira_web`, `atlas_web`,
19
+ `mercury_frontend_web`, `post-office_web`
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/reactions
2
2
 
3
+ ## 35.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`499c637d02e3b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/499c637d02e3b) -
8
+ [ux] Add semantic list markup to the reaction summary when the
9
+ `platform_a11y_reactions_hover_selector_list` experiment is enabled.
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 35.11.10
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies
20
+
3
21
  ## 35.11.9
4
22
 
5
23
  ### Patch Changes
@@ -11,7 +11,7 @@ var _analyticsGasTypes = require("@atlaskit/analytics-gas-types");
11
11
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
12
12
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } // eslint-disable-next-line @typescript-eslint/consistent-type-imports
13
13
  var packageName = "@atlaskit/reactions";
14
- var packageVersion = "35.11.8";
14
+ var packageVersion = "35.11.10";
15
15
  /**
16
16
  * TODO: move to utility package?
17
17
  * A random sampling function
@@ -22,7 +22,6 @@ var _analytics = require("../analytics");
22
22
  var _Counter = require("./Counter");
23
23
  var _ReactionParticleEffect = require("./ReactionParticleEffect");
24
24
  var _ReactionTooltip = require("./ReactionTooltip");
25
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
26
25
  var _i18n = require("../shared/i18n");
27
26
  var _utils = require("../shared/utils");
28
27
  var _constants = require("../shared/constants");
@@ -63,7 +62,8 @@ var Reaction = exports.Reaction = function Reaction(_ref) {
63
62
  _ref$isViewOnly = _ref.isViewOnly,
64
63
  isViewOnly = _ref$isViewOnly === void 0 ? false : _ref$isViewOnly,
65
64
  showSubtleStyle = _ref.showSubtleStyle,
66
- optimisticImageURL = _ref.optimisticImageURL;
65
+ optimisticImageURL = _ref.optimisticImageURL,
66
+ rootElement = _ref.rootElement;
67
67
  var intl = (0, _reactIntl.useIntl)();
68
68
  var hoverStart = (0, _react.useRef)();
69
69
  var focusStart = (0, _react.useRef)();
@@ -160,8 +160,8 @@ var Reaction = exports.Reaction = function Reaction(_ref) {
160
160
  });
161
161
  }
162
162
  return /*#__PURE__*/React.createElement(_compiled.Box, {
163
- xcss: (0, _css.cx)(styles.container, (0, _platformFeatureFlags.fg)('jfp_a11y_team_comment_actions_semantic') ? styles.listItem : undefined),
164
- as: (0, _platformFeatureFlags.fg)('jfp_a11y_team_comment_actions_semantic') ? 'li' : undefined
163
+ xcss: (0, _css.cx)(styles.container, rootElement === 'li' ? styles.listItem : undefined),
164
+ as: rootElement
165
165
  }, showParticleEffect && /*#__PURE__*/React.createElement(_ReactionParticleEffect.ReactionParticleEffect, {
166
166
  emojiId: emojiId,
167
167
  emojiProvider: emojiProvider,
@@ -1,5 +1,10 @@
1
+ ._18u0ze3t{margin-left:var(--ds-space-0,0)}
1
2
  ._19bvu2gc{padding-left:var(--ds-space-100,8px)}
3
+ ._19pkze3t{margin-top:var(--ds-space-0,0)}
4
+ ._2hwxze3t{margin-right:var(--ds-space-0,0)}
5
+ ._2mzuglyw{list-style-type:none}
2
6
  ._ca0q1b66{padding-top:var(--ds-space-050,4px)}
3
7
  ._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
8
+ ._otyrze3t{margin-bottom:var(--ds-space-0,0)}
4
9
  ._p12foiq5{max-width:325px}
5
10
  ._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
@@ -16,6 +16,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
16
16
  var _popup = _interopRequireDefault(require("@atlaskit/popup"));
17
17
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
18
18
  var _picker = require("@atlaskit/emoji/picker");
19
+ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
19
20
  var _useDelayedState3 = require("../hooks/useDelayedState");
20
21
  var _Reaction = require("./Reaction");
21
22
  var _Trigger = require("./Trigger");
@@ -24,7 +25,8 @@ var _ufo = require("../ufo");
24
25
  var _compiled = require("@atlaskit/primitives/compiled");
25
26
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
26
27
  var styles = {
27
- summaryPopup: "_ca0q1b66 _u5f3u2gc _n3tdu2gc _19bvu2gc _p12foiq5"
28
+ summaryPopup: "_ca0q1b66 _u5f3u2gc _n3tdu2gc _19bvu2gc _p12foiq5",
29
+ summaryList: "_ca0q1b66 _u5f3u2gc _n3tdu2gc _19bvu2gc _19pkze3t _2hwxze3t _otyrze3t _18u0ze3t _p12foiq5 _2mzuglyw"
28
30
  };
29
31
 
30
32
  /**
@@ -186,6 +188,7 @@ var ReactionSummaryView = exports.ReactionSummaryView = function ReactionSummary
186
188
  setSummaryPopupOpen(false);
187
189
  }
188
190
  }, [hoverableSummaryView, isSummaryViewButtonHovered, setIsHoveringSummaryView, setSummaryPopupOpen, isSummaryViewButtonClicked]);
191
+ var shouldRenderReactionSummaryList = (0, _isExperimentEnabled.isExperimentEnabled)('platform_a11y_reactions_hover_selector_list');
189
192
  return /*#__PURE__*/React.createElement(_popup.default, {
190
193
  placement: placement,
191
194
  content: function content(_ref2) {
@@ -213,13 +216,15 @@ var ReactionSummaryView = exports.ReactionSummaryView = function ReactionSummary
213
216
  reactionPickerTriggerText: reactionPickerTriggerText,
214
217
  fullWidthSummaryViewReactionPickerTrigger: true
215
218
  })), /*#__PURE__*/React.createElement(_compiled.Inline, {
216
- xcss: styles.summaryPopup,
219
+ as: shouldRenderReactionSummaryList ? 'ul' : undefined,
220
+ xcss: shouldRenderReactionSummaryList ? styles.summaryList : styles.summaryPopup,
217
221
  space: "space.025",
218
222
  shouldWrap: true,
219
223
  alignBlock: "center"
220
224
  }, reactions.map(function (reaction) {
221
225
  return /*#__PURE__*/React.createElement(_Reaction.Reaction, {
222
226
  key: reaction.emojiId,
227
+ rootElement: shouldRenderReactionSummaryList ? 'li' : undefined,
223
228
  reaction: reaction,
224
229
  emojiProvider: emojiProvider,
225
230
  onClick: onReactionClick,
@@ -378,6 +378,7 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
378
378
  }, memorizedReactions.map(function (reaction) {
379
379
  return /*#__PURE__*/_react.default.createElement(_Reaction.Reaction, {
380
380
  key: reaction.emojiId,
381
+ rootElement: "li",
381
382
  reaction: reaction,
382
383
  emojiProvider: emojiProvider,
383
384
  onClick: onReactionClick,
@@ -2,7 +2,7 @@
2
2
  import { createAndFireEvent } from '@atlaskit/analytics-next';
3
3
  import { UI_EVENT_TYPE, OPERATIONAL_EVENT_TYPE } from '@atlaskit/analytics-gas-types';
4
4
  const packageName = "@atlaskit/reactions";
5
- const packageVersion = "35.11.8";
5
+ const packageVersion = "35.11.10";
6
6
  /**
7
7
  * TODO: move to utility package?
8
8
  * A random sampling function
@@ -11,7 +11,6 @@ import { createAndFireSafe, createReactionClickedEvent, createReactionFocusedEve
11
11
  import { Counter } from './Counter';
12
12
  import { ReactionParticleEffect } from './ReactionParticleEffect';
13
13
  import { ReactionTooltip } from './ReactionTooltip';
14
- import { fg } from '@atlaskit/platform-feature-flags';
15
14
  import { messages } from '../shared/i18n';
16
15
  import { isLeftClick } from '../shared/utils';
17
16
  import { RESOURCED_EMOJI_COMPACT_HEIGHT } from '../shared/constants';
@@ -45,7 +44,8 @@ export const Reaction = ({
45
44
  handleOpenReactionsDialog,
46
45
  isViewOnly = false,
47
46
  showSubtleStyle,
48
- optimisticImageURL
47
+ optimisticImageURL,
48
+ rootElement
49
49
  }) => {
50
50
  const intl = useIntl();
51
51
  const hoverStart = useRef();
@@ -127,8 +127,8 @@ export const Reaction = ({
127
127
  });
128
128
  }
129
129
  return /*#__PURE__*/React.createElement(Box, {
130
- xcss: cx(styles.container, fg('jfp_a11y_team_comment_actions_semantic') ? styles.listItem : undefined),
131
- as: fg('jfp_a11y_team_comment_actions_semantic') ? 'li' : undefined
130
+ xcss: cx(styles.container, rootElement === 'li' ? styles.listItem : undefined),
131
+ as: rootElement
132
132
  }, showParticleEffect && /*#__PURE__*/React.createElement(ReactionParticleEffect, {
133
133
  emojiId: emojiId,
134
134
  emojiProvider: emojiProvider,
@@ -1,5 +1,10 @@
1
+ ._18u0ze3t{margin-left:var(--ds-space-0,0)}
1
2
  ._19bvu2gc{padding-left:var(--ds-space-100,8px)}
3
+ ._19pkze3t{margin-top:var(--ds-space-0,0)}
4
+ ._2hwxze3t{margin-right:var(--ds-space-0,0)}
5
+ ._2mzuglyw{list-style-type:none}
2
6
  ._ca0q1b66{padding-top:var(--ds-space-050,4px)}
3
7
  ._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
8
+ ._otyrze3t{margin-bottom:var(--ds-space-0,0)}
4
9
  ._p12foiq5{max-width:325px}
5
10
  ._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
@@ -7,6 +7,7 @@ import { useCallback, useState } from 'react';
7
7
  import Popup from '@atlaskit/popup';
8
8
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
9
9
  import { EmojiPicker } from '@atlaskit/emoji/picker';
10
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
10
11
  import { useDelayedState } from '../hooks/useDelayedState';
11
12
  import { Reaction } from './Reaction';
12
13
  import { Trigger as EmojiPickerTrigger } from './Trigger';
@@ -14,7 +15,8 @@ import { ReactionSummaryButton } from './ReactionSummaryButton';
14
15
  import { PickerRender } from '../ufo';
15
16
  import { Box, Flex, Inline } from '@atlaskit/primitives/compiled';
16
17
  const styles = {
17
- summaryPopup: "_ca0q1b66 _u5f3u2gc _n3tdu2gc _19bvu2gc _p12foiq5"
18
+ summaryPopup: "_ca0q1b66 _u5f3u2gc _n3tdu2gc _19bvu2gc _p12foiq5",
19
+ summaryList: "_ca0q1b66 _u5f3u2gc _n3tdu2gc _19bvu2gc _19pkze3t _2hwxze3t _otyrze3t _18u0ze3t _p12foiq5 _2mzuglyw"
18
20
  };
19
21
 
20
22
  /**
@@ -153,6 +155,7 @@ export const ReactionSummaryView = ({
153
155
  setSummaryPopupOpen(false);
154
156
  }
155
157
  }, [hoverableSummaryView, isSummaryViewButtonHovered, setIsHoveringSummaryView, setSummaryPopupOpen, isSummaryViewButtonClicked]);
158
+ const shouldRenderReactionSummaryList = isExperimentEnabled('platform_a11y_reactions_hover_selector_list');
156
159
  return /*#__PURE__*/React.createElement(Popup, {
157
160
  placement: placement,
158
161
  content: ({
@@ -180,23 +183,27 @@ export const ReactionSummaryView = ({
180
183
  reactionPickerTriggerText: reactionPickerTriggerText,
181
184
  fullWidthSummaryViewReactionPickerTrigger: true
182
185
  })), /*#__PURE__*/React.createElement(Inline, {
183
- xcss: styles.summaryPopup,
186
+ as: shouldRenderReactionSummaryList ? 'ul' : undefined,
187
+ xcss: shouldRenderReactionSummaryList ? styles.summaryList : styles.summaryPopup,
184
188
  space: "space.025",
185
189
  shouldWrap: true,
186
190
  alignBlock: "center"
187
- }, reactions.map(reaction => /*#__PURE__*/React.createElement(Reaction, {
188
- key: reaction.emojiId,
189
- reaction: reaction,
190
- emojiProvider: emojiProvider,
191
- onClick: onReactionClick,
192
- onFocused: onReactionFocused,
193
- onMouseEnter: onReactionMouseEnter,
194
- flash: flash[reaction.emojiId],
195
- showParticleEffect: particleEffectByEmoji[reaction.emojiId],
196
- allowUserDialog: allowUserDialog,
197
- handleOpenReactionsDialog: handleOpenReactionsDialog,
198
- isViewOnly: isViewOnly
199
- })))),
191
+ }, reactions.map(reaction => {
192
+ return /*#__PURE__*/React.createElement(Reaction, {
193
+ key: reaction.emojiId,
194
+ rootElement: shouldRenderReactionSummaryList ? 'li' : undefined,
195
+ reaction: reaction,
196
+ emojiProvider: emojiProvider,
197
+ onClick: onReactionClick,
198
+ onFocused: onReactionFocused,
199
+ onMouseEnter: onReactionMouseEnter,
200
+ flash: flash[reaction.emojiId],
201
+ showParticleEffect: particleEffectByEmoji[reaction.emojiId],
202
+ allowUserDialog: allowUserDialog,
203
+ handleOpenReactionsDialog: handleOpenReactionsDialog,
204
+ isViewOnly: isViewOnly
205
+ });
206
+ }))),
200
207
  isOpen: isSummaryPopupOpen || isEmojiPickerOpen,
201
208
  onClose: handlePopupClose,
202
209
  shouldRenderToParent: expValEquals('a11y-fixes-week4-may-2026', 'isEnabled', true),
@@ -321,6 +321,7 @@ export const Reactions = /*#__PURE__*/React.memo(({
321
321
  className: ax(["_qtt8glyw _19pkidpf _2hwxidpf _otyridpf _18u0idpf _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1e0c1txw _1n261g80 _4cvr1h6o _kqswh2mm"])
322
322
  }, memorizedReactions.map(reaction => /*#__PURE__*/React.createElement(Reaction, {
323
323
  key: reaction.emojiId,
324
+ rootElement: "li",
324
325
  reaction: reaction,
325
326
  emojiProvider: emojiProvider,
326
327
  onClick: onReactionClick,
@@ -5,7 +5,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
5
5
  import { createAndFireEvent } from '@atlaskit/analytics-next';
6
6
  import { UI_EVENT_TYPE, OPERATIONAL_EVENT_TYPE } from '@atlaskit/analytics-gas-types';
7
7
  var packageName = "@atlaskit/reactions";
8
- var packageVersion = "35.11.8";
8
+ var packageVersion = "35.11.10";
9
9
  /**
10
10
  * TODO: move to utility package?
11
11
  * A random sampling function
@@ -14,7 +14,6 @@ import { createAndFireSafe, createReactionClickedEvent, createReactionFocusedEve
14
14
  import { Counter } from './Counter';
15
15
  import { ReactionParticleEffect } from './ReactionParticleEffect';
16
16
  import { ReactionTooltip } from './ReactionTooltip';
17
- import { fg } from '@atlaskit/platform-feature-flags';
18
17
  import { messages } from '../shared/i18n';
19
18
  import { isLeftClick } from '../shared/utils';
20
19
  import { RESOURCED_EMOJI_COMPACT_HEIGHT } from '../shared/constants';
@@ -54,7 +53,8 @@ export var Reaction = function Reaction(_ref) {
54
53
  _ref$isViewOnly = _ref.isViewOnly,
55
54
  isViewOnly = _ref$isViewOnly === void 0 ? false : _ref$isViewOnly,
56
55
  showSubtleStyle = _ref.showSubtleStyle,
57
- optimisticImageURL = _ref.optimisticImageURL;
56
+ optimisticImageURL = _ref.optimisticImageURL,
57
+ rootElement = _ref.rootElement;
58
58
  var intl = useIntl();
59
59
  var hoverStart = useRef();
60
60
  var focusStart = useRef();
@@ -151,8 +151,8 @@ export var Reaction = function Reaction(_ref) {
151
151
  });
152
152
  }
153
153
  return /*#__PURE__*/React.createElement(Box, {
154
- xcss: cx(styles.container, fg('jfp_a11y_team_comment_actions_semantic') ? styles.listItem : undefined),
155
- as: fg('jfp_a11y_team_comment_actions_semantic') ? 'li' : undefined
154
+ xcss: cx(styles.container, rootElement === 'li' ? styles.listItem : undefined),
155
+ as: rootElement
156
156
  }, showParticleEffect && /*#__PURE__*/React.createElement(ReactionParticleEffect, {
157
157
  emojiId: emojiId,
158
158
  emojiProvider: emojiProvider,
@@ -1,5 +1,10 @@
1
+ ._18u0ze3t{margin-left:var(--ds-space-0,0)}
1
2
  ._19bvu2gc{padding-left:var(--ds-space-100,8px)}
3
+ ._19pkze3t{margin-top:var(--ds-space-0,0)}
4
+ ._2hwxze3t{margin-right:var(--ds-space-0,0)}
5
+ ._2mzuglyw{list-style-type:none}
2
6
  ._ca0q1b66{padding-top:var(--ds-space-050,4px)}
3
7
  ._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
8
+ ._otyrze3t{margin-bottom:var(--ds-space-0,0)}
4
9
  ._p12foiq5{max-width:325px}
5
10
  ._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
@@ -8,6 +8,7 @@ import { useCallback, useState } from 'react';
8
8
  import Popup from '@atlaskit/popup';
9
9
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
10
10
  import { EmojiPicker } from '@atlaskit/emoji/picker';
11
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
11
12
  import { useDelayedState } from '../hooks/useDelayedState';
12
13
  import { Reaction } from './Reaction';
13
14
  import { Trigger as EmojiPickerTrigger } from './Trigger';
@@ -15,7 +16,8 @@ import { ReactionSummaryButton } from './ReactionSummaryButton';
15
16
  import { PickerRender } from '../ufo';
16
17
  import { Box, Flex, Inline } from '@atlaskit/primitives/compiled';
17
18
  var styles = {
18
- summaryPopup: "_ca0q1b66 _u5f3u2gc _n3tdu2gc _19bvu2gc _p12foiq5"
19
+ summaryPopup: "_ca0q1b66 _u5f3u2gc _n3tdu2gc _19bvu2gc _p12foiq5",
20
+ summaryList: "_ca0q1b66 _u5f3u2gc _n3tdu2gc _19bvu2gc _19pkze3t _2hwxze3t _otyrze3t _18u0ze3t _p12foiq5 _2mzuglyw"
19
21
  };
20
22
 
21
23
  /**
@@ -177,6 +179,7 @@ export var ReactionSummaryView = function ReactionSummaryView(_ref) {
177
179
  setSummaryPopupOpen(false);
178
180
  }
179
181
  }, [hoverableSummaryView, isSummaryViewButtonHovered, setIsHoveringSummaryView, setSummaryPopupOpen, isSummaryViewButtonClicked]);
182
+ var shouldRenderReactionSummaryList = isExperimentEnabled('platform_a11y_reactions_hover_selector_list');
180
183
  return /*#__PURE__*/React.createElement(Popup, {
181
184
  placement: placement,
182
185
  content: function content(_ref2) {
@@ -204,13 +207,15 @@ export var ReactionSummaryView = function ReactionSummaryView(_ref) {
204
207
  reactionPickerTriggerText: reactionPickerTriggerText,
205
208
  fullWidthSummaryViewReactionPickerTrigger: true
206
209
  })), /*#__PURE__*/React.createElement(Inline, {
207
- xcss: styles.summaryPopup,
210
+ as: shouldRenderReactionSummaryList ? 'ul' : undefined,
211
+ xcss: shouldRenderReactionSummaryList ? styles.summaryList : styles.summaryPopup,
208
212
  space: "space.025",
209
213
  shouldWrap: true,
210
214
  alignBlock: "center"
211
215
  }, reactions.map(function (reaction) {
212
216
  return /*#__PURE__*/React.createElement(Reaction, {
213
217
  key: reaction.emojiId,
218
+ rootElement: shouldRenderReactionSummaryList ? 'li' : undefined,
214
219
  reaction: reaction,
215
220
  emojiProvider: emojiProvider,
216
221
  onClick: onReactionClick,
@@ -367,6 +367,7 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
367
367
  }, memorizedReactions.map(function (reaction) {
368
368
  return /*#__PURE__*/React.createElement(Reaction, {
369
369
  key: reaction.emojiId,
370
+ rootElement: "li",
370
371
  reaction: reaction,
371
372
  emojiProvider: emojiProvider,
372
373
  onClick: onReactionClick,
@@ -39,10 +39,19 @@ export interface ReactionProps {
39
39
  * Optional event when the mouse cursor hovers over the reaction
40
40
  */
41
41
  onMouseEnter?: ReactionMouseEnter;
42
+ /**
43
+ * Optional URL to optimistically render the emoji image before the catalogue arrives.
44
+ * When provided, the emoji will render immediately without waiting for the emoji provider to resolve.
45
+ */
46
+ optimisticImageURL?: string;
42
47
  /**
43
48
  * Data for the reaction
44
49
  */
45
50
  reaction: ReactionSummary;
51
+ /**
52
+ * The HTML element used for the reaction root
53
+ */
54
+ rootElement?: 'div' | 'li';
46
55
  /**
47
56
  * Optional prop for using an opaque button background instead of a transparent background
48
57
  */
@@ -55,13 +64,8 @@ export interface ReactionProps {
55
64
  * Optional prop for controlling if the reaction displayed is a default one and should not have a border
56
65
  */
57
66
  showSubtleStyle?: boolean;
58
- /**
59
- * Optional URL to optimistically render the emoji image before the catalogue arrives.
60
- * When provided, the emoji will render immediately without waiting for the emoji provider to resolve.
61
- */
62
- optimisticImageURL?: string;
63
67
  }
64
68
  /**
65
69
  * Render an emoji reaction button
66
70
  */
67
- export declare const Reaction: ({ emojiProvider, onClick, reaction, onMouseEnter, onFocused, flash, showParticleEffect, showOpaqueBackground, allowUserDialog, handleOpenReactionsDialog, isViewOnly, showSubtleStyle, optimisticImageURL, }: ReactionProps) => JSX.Element;
71
+ export declare const Reaction: ({ emojiProvider, onClick, reaction, onMouseEnter, onFocused, flash, showParticleEffect, showOpaqueBackground, allowUserDialog, handleOpenReactionsDialog, isViewOnly, showSubtleStyle, optimisticImageURL, rootElement, }: ReactionProps) => JSX.Element;
@@ -52,6 +52,10 @@ export interface ReactionsProps extends Pick<ReactionPickerProps, 'allowAllEmoji
52
52
  * Optional emoji reactions list to show custom animation or render as standard (key => emoji string "id", value => true/false to show custom animation)
53
53
  */
54
54
  flash?: Record<string, boolean>;
55
+ /**
56
+ * Optional function to get an optimistic image URL for a reaction emoji, used to render immediately without waiting for the catalogue.
57
+ */
58
+ getOptimisticImageURL?: (emojiId: string) => string;
55
59
  /**
56
60
  * Optional event to get reaction details for an emoji
57
61
  * @param emojiId current reaction emoji id
@@ -171,10 +175,6 @@ export interface ReactionsProps extends Pick<ReactionPickerProps, 'allowAllEmoji
171
175
  * Optional prop to optimistically render the image URL for a given emoji id. Typically used in SSR before the emoji Provider resolves & the real image is loaded.
172
176
  */
173
177
  summaryGetOptimisticImageURL?: (emojiId: string) => string;
174
- /**
175
- * Optional function to get an optimistic image URL for a reaction emoji, used to render immediately without waiting for the catalogue.
176
- */
177
- getOptimisticImageURL?: (emojiId: string) => string;
178
178
  /**
179
179
  * Enables a summary view for displaying reactions. If enabled and the number of reactions meets or exceeds the summaryViewThreshold, reactions will be shown in a more aggregated format.
180
180
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/reactions",
3
- "version": "35.11.9",
3
+ "version": "35.12.0",
4
4
  "description": "Reactions component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -42,7 +42,7 @@
42
42
  "@atlaskit/heading": "^7.0.0",
43
43
  "@atlaskit/icon": "^37.3.0",
44
44
  "@atlaskit/link": "^5.0.0",
45
- "@atlaskit/modal-dialog": "^16.2.0",
45
+ "@atlaskit/modal-dialog": "^16.3.0",
46
46
  "@atlaskit/motion": "^8.0.0",
47
47
  "@atlaskit/platform-feature-experiments": "^0.3.0",
48
48
  "@atlaskit/platform-feature-flags": "^2.1.0",
@@ -54,8 +54,8 @@
54
54
  "@atlaskit/react-ufo": "^7.3.0",
55
55
  "@atlaskit/spinner": "^20.1.0",
56
56
  "@atlaskit/tabs": "^20.1.0",
57
- "@atlaskit/theme": "^26.1.0",
58
- "@atlaskit/tmp-editor-statsig": "^140.0.0",
57
+ "@atlaskit/theme": "^27.0.0",
58
+ "@atlaskit/tmp-editor-statsig": "^141.1.0",
59
59
  "@atlaskit/tokens": "^16.3.0",
60
60
  "@atlaskit/tooltip": "^24.0.0",
61
61
  "@atlaskit/ufo": "^1.0.0",
package/tsconfig.json CHANGED
@@ -1,19 +1,7 @@
1
1
  {
2
- "extends": "../../../tsconfig.json",
3
- "include": [
4
- "./*.docs.tsx",
5
- "./package.json",
6
- "./src/**/*.ts",
7
- "./src/**/*.tsx",
8
- "./docs/**/*.ts",
9
- "./docs/**/*.tsx",
10
- "./examples/**/*.ts",
11
- "./examples/**/*.tsx",
12
- "**/stories.ts",
13
- "**/stories.tsx",
14
- "**/stories/*.ts",
15
- "**/stories/*.tsx",
16
- "**/stories/**/*.ts",
17
- "**/stories/**/*.tsx"
18
- ]
2
+ "extends": "./tsconfig.dev.json",
3
+ "compilerOptions": {
4
+ "disableReferencedProjectLoad": true,
5
+ "disableSolutionSearching": true
6
+ }
19
7
  }