@atlaskit/reactions 25.2.1 → 25.4.1
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/CHANGELOG.md +24 -0
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/components/ReactionPicker/ReactionPicker.js +5 -2
- package/dist/cjs/components/Reactions/Reactions.js +8 -3
- package/dist/cjs/components/Selector/Selector.js +0 -6
- package/dist/cjs/components/Trigger/Trigger.js +9 -2
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/components/ReactionPicker/ReactionPicker.js +4 -2
- package/dist/es2019/components/Reactions/Reactions.js +6 -3
- package/dist/es2019/components/Selector/Selector.js +0 -6
- package/dist/es2019/components/Trigger/Trigger.js +8 -2
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/components/ReactionPicker/ReactionPicker.js +5 -2
- package/dist/esm/components/Reactions/Reactions.js +8 -3
- package/dist/esm/components/Selector/Selector.js +0 -6
- package/dist/esm/components/Trigger/Trigger.js +9 -2
- package/dist/types/components/ReactionPicker/ReactionPicker.d.ts +4 -0
- package/dist/types/components/Reactions/Reactions.d.ts +9 -1
- package/dist/types/components/Trigger/Trigger.d.ts +4 -0
- package/dist/types/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts +1 -1
- package/dist/types-ts4.5/components/ReactionPicker/ReactionPicker.d.ts +4 -0
- package/dist/types-ts4.5/components/Reactions/Reactions.d.ts +9 -1
- package/dist/types-ts4.5/components/Trigger/Trigger.d.ts +4 -0
- package/dist/types-ts4.5/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @atlaskit/reactions
|
|
2
2
|
|
|
3
|
+
## 25.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 25.4.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#115405](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/115405)
|
|
14
|
+
[`8f77c2c8c5307`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8f77c2c8c5307) -
|
|
15
|
+
[ux] Adds the isViewOnly prop to the reactions component, making the picker disabled and
|
|
16
|
+
preventing addition of new reactions
|
|
17
|
+
|
|
18
|
+
## 25.3.0
|
|
19
|
+
|
|
20
|
+
### Minor Changes
|
|
21
|
+
|
|
22
|
+
- [#114320](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/114320)
|
|
23
|
+
[`5ab40880ad189`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5ab40880ad189) -
|
|
24
|
+
[ux] Adds a new showRoundTrigger prop to the ReactionPicker component which is used in Trigger
|
|
25
|
+
component to display a round hover border around the trigger button.
|
|
26
|
+
|
|
3
27
|
## 25.2.1
|
|
4
28
|
|
|
5
29
|
### 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; }
|
|
13
13
|
var packageName = "@atlaskit/reactions";
|
|
14
|
-
var packageVersion = "25.
|
|
14
|
+
var packageVersion = "25.4.1";
|
|
15
15
|
/**
|
|
16
16
|
* TODO: move to utility package?
|
|
17
17
|
* A random sampling function
|
|
@@ -95,7 +95,9 @@ var ReactionPicker = exports.ReactionPicker = /*#__PURE__*/_react.default.memo(f
|
|
|
95
95
|
_props$subtleReaction = props.subtleReactionsSummaryAndPicker,
|
|
96
96
|
subtleReactionsSummaryAndPicker = _props$subtleReaction === void 0 ? false : _props$subtleReaction,
|
|
97
97
|
_props$showAddReactio = props.showAddReactionText,
|
|
98
|
-
showAddReactionText = _props$showAddReactio === void 0 ? false : _props$showAddReactio
|
|
98
|
+
showAddReactionText = _props$showAddReactio === void 0 ? false : _props$showAddReactio,
|
|
99
|
+
_props$showRoundTrigg = props.showRoundTrigger,
|
|
100
|
+
showRoundTrigger = _props$showRoundTrigg === void 0 ? false : _props$showRoundTrigg;
|
|
99
101
|
var _useState = (0, _react.useState)(null),
|
|
100
102
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
101
103
|
triggerRef = _useState2[0],
|
|
@@ -229,7 +231,8 @@ var ReactionPicker = exports.ReactionPicker = /*#__PURE__*/_react.default.memo(f
|
|
|
229
231
|
tooltipContent: settings.isOpen ? null : tooltipContent,
|
|
230
232
|
showOpaqueBackground: showOpaqueBackground,
|
|
231
233
|
showAddReactionText: showAddReactionText,
|
|
232
|
-
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker
|
|
234
|
+
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
|
|
235
|
+
showRoundTrigger: showRoundTrigger
|
|
233
236
|
})
|
|
234
237
|
);
|
|
235
238
|
}), settings.isOpen && (0, _react2.jsx)(PopperWrapper, {
|
|
@@ -148,7 +148,11 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
|
|
|
148
148
|
hideDefaultReactions = _ref$hideDefaultReact === void 0 ? false : _ref$hideDefaultReact,
|
|
149
149
|
ProfileCardWrapper = _ref.ProfileCardWrapper,
|
|
150
150
|
_ref$onlyRenderPicker = _ref.onlyRenderPicker,
|
|
151
|
-
onlyRenderPicker = _ref$onlyRenderPicker === void 0 ? false : _ref$onlyRenderPicker
|
|
151
|
+
onlyRenderPicker = _ref$onlyRenderPicker === void 0 ? false : _ref$onlyRenderPicker,
|
|
152
|
+
_ref$showRoundTrigger = _ref.showRoundTrigger,
|
|
153
|
+
showRoundTrigger = _ref$showRoundTrigger === void 0 ? false : _ref$showRoundTrigger,
|
|
154
|
+
_ref$isViewOnly = _ref.isViewOnly,
|
|
155
|
+
isViewOnly = _ref$isViewOnly === void 0 ? false : _ref$isViewOnly;
|
|
152
156
|
var _useState = (0, _react.useState)(),
|
|
153
157
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
154
158
|
selectedEmojiId = _useState2[0],
|
|
@@ -364,7 +368,7 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
|
|
|
364
368
|
}, (0, _react2.jsx)(_showMoreHorizontal.default, {
|
|
365
369
|
label: intl.formatMessage(_i18n.messages.seeWhoReacted)
|
|
366
370
|
})));
|
|
367
|
-
}))), (0, _react2.jsx)(_ReactionPicker.ReactionPicker
|
|
371
|
+
}))), !isViewOnly && (0, _react2.jsx)(_ReactionPicker.ReactionPicker
|
|
368
372
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
369
373
|
, {
|
|
370
374
|
css: _styles.reactionPickerStyle,
|
|
@@ -381,7 +385,8 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
|
|
|
381
385
|
miniMode: miniMode,
|
|
382
386
|
showOpaqueBackground: showOpaqueBackground,
|
|
383
387
|
showAddReactionText: showAddReactionText,
|
|
384
|
-
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker
|
|
388
|
+
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
|
|
389
|
+
showRoundTrigger: showRoundTrigger
|
|
385
390
|
}), (0, _react2.jsx)(_modalDialog.ModalTransition, null, !!selectedEmojiId && (0, _react2.jsx)(_ReactionDialog.ReactionsDialog, {
|
|
386
391
|
selectedEmojiId: selectedEmojiId,
|
|
387
392
|
reactions: sortedReactions,
|
|
@@ -46,18 +46,12 @@ var separatorStyles = (0, _primitives.xcss)({
|
|
|
46
46
|
});
|
|
47
47
|
var Reveal = function Reveal(_ref) {
|
|
48
48
|
var children = _ref.children,
|
|
49
|
-
delay = _ref.delay,
|
|
50
49
|
testId = _ref.testId;
|
|
51
50
|
return (0, _react2.jsx)("div", {
|
|
52
51
|
"data-testid": testId
|
|
53
52
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
54
53
|
,
|
|
55
54
|
css: _styles.revealStyle
|
|
56
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
57
|
-
,
|
|
58
|
-
style: delay ? {
|
|
59
|
-
animationDelay: "".concat(delay, "ms")
|
|
60
|
-
} : undefined
|
|
61
55
|
}, children);
|
|
62
56
|
};
|
|
63
57
|
|
|
@@ -55,6 +55,11 @@ var expandedTriggerStyles = (0, _primitives.xcss)({
|
|
|
55
55
|
var triggerStylesRefresh = (0, _primitives.xcss)({
|
|
56
56
|
borderRadius: 'border.radius'
|
|
57
57
|
});
|
|
58
|
+
var roundTriggerStyles = (0, _primitives.xcss)({
|
|
59
|
+
borderRadius: '50%',
|
|
60
|
+
height: '2rem',
|
|
61
|
+
width: '2rem'
|
|
62
|
+
});
|
|
58
63
|
var transparentEnabledTriggerStyles = (0, _primitives.xcss)({
|
|
59
64
|
borderColor: 'color.border',
|
|
60
65
|
backgroundColor: 'color.background.neutral.subtle',
|
|
@@ -109,7 +114,9 @@ var Trigger = exports.Trigger = /*#__PURE__*/_react.default.forwardRef(function
|
|
|
109
114
|
_props$showAddReactio = props.showAddReactionText,
|
|
110
115
|
showAddReactionText = _props$showAddReactio === void 0 ? false : _props$showAddReactio,
|
|
111
116
|
_props$subtleReaction = props.subtleReactionsSummaryAndPicker,
|
|
112
|
-
subtleReactionsSummaryAndPicker = _props$subtleReaction === void 0 ? false : _props$subtleReaction
|
|
117
|
+
subtleReactionsSummaryAndPicker = _props$subtleReaction === void 0 ? false : _props$subtleReaction,
|
|
118
|
+
_props$showRoundTrigg = props.showRoundTrigger,
|
|
119
|
+
showRoundTrigger = _props$showRoundTrigg === void 0 ? false : _props$showRoundTrigg;
|
|
113
120
|
var handleMouseDown = function handleMouseDown(e, analyticsEvent) {
|
|
114
121
|
if (onClick && !disabled) {
|
|
115
122
|
onClick(e, analyticsEvent);
|
|
@@ -120,7 +127,7 @@ var Trigger = exports.Trigger = /*#__PURE__*/_react.default.forwardRef(function
|
|
|
120
127
|
content: tooltipContent
|
|
121
128
|
}, (0, _react2.jsx)(_primitives.Pressable, (0, _extends2.default)({
|
|
122
129
|
testId: RENDER_TRIGGER_BUTTON_TESTID,
|
|
123
|
-
xcss: [triggerStyles, subtleReactionsSummaryAndPicker && subtleTriggerStyles, showAddReactionText && expandedTriggerStyles, disabled ? disabledTriggerStyles : showOpaqueBackground ? opaqueEnabledTriggerStyles : transparentEnabledTriggerStyles, miniMode && miniModeStyles, (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') && triggerStylesRefresh],
|
|
130
|
+
xcss: [triggerStyles, subtleReactionsSummaryAndPicker && subtleTriggerStyles, showAddReactionText && expandedTriggerStyles, disabled ? disabledTriggerStyles : showOpaqueBackground ? opaqueEnabledTriggerStyles : transparentEnabledTriggerStyles, miniMode && miniModeStyles, (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') && triggerStylesRefresh, showRoundTrigger && roundTriggerStyles],
|
|
124
131
|
onClick: handleMouseDown,
|
|
125
132
|
isDisabled: disabled,
|
|
126
133
|
ref: ref
|
|
@@ -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 = "25.
|
|
4
|
+
const packageVersion = "25.4.1";
|
|
5
5
|
/**
|
|
6
6
|
* TODO: move to utility package?
|
|
7
7
|
* A random sampling function
|
|
@@ -78,7 +78,8 @@ export const ReactionPicker = /*#__PURE__*/React.memo(props => {
|
|
|
78
78
|
emojiPickerSize,
|
|
79
79
|
showOpaqueBackground = false,
|
|
80
80
|
subtleReactionsSummaryAndPicker = false,
|
|
81
|
-
showAddReactionText = false
|
|
81
|
+
showAddReactionText = false,
|
|
82
|
+
showRoundTrigger = false
|
|
82
83
|
} = props;
|
|
83
84
|
const [triggerRef, setTriggerRef] = useState(null);
|
|
84
85
|
|
|
@@ -206,7 +207,8 @@ export const ReactionPicker = /*#__PURE__*/React.memo(props => {
|
|
|
206
207
|
tooltipContent: settings.isOpen ? null : tooltipContent,
|
|
207
208
|
showOpaqueBackground: showOpaqueBackground,
|
|
208
209
|
showAddReactionText: showAddReactionText,
|
|
209
|
-
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker
|
|
210
|
+
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
|
|
211
|
+
showRoundTrigger: showRoundTrigger
|
|
210
212
|
})), settings.isOpen && jsx(PopperWrapper, {
|
|
211
213
|
settings: settings
|
|
212
214
|
}, settings.showFullPicker ? jsx(EmojiPicker, {
|
|
@@ -115,7 +115,9 @@ export const Reactions = /*#__PURE__*/React.memo(({
|
|
|
115
115
|
showAddReactionText = false,
|
|
116
116
|
hideDefaultReactions = false,
|
|
117
117
|
ProfileCardWrapper,
|
|
118
|
-
onlyRenderPicker = false
|
|
118
|
+
onlyRenderPicker = false,
|
|
119
|
+
showRoundTrigger = false,
|
|
120
|
+
isViewOnly = false
|
|
119
121
|
}) => {
|
|
120
122
|
const [selectedEmojiId, setSelectedEmojiId] = useState();
|
|
121
123
|
const {
|
|
@@ -316,7 +318,7 @@ export const Reactions = /*#__PURE__*/React.memo(({
|
|
|
316
318
|
xcss: iconStyle
|
|
317
319
|
}, jsx(ShowMoreHorizontalIcon, {
|
|
318
320
|
label: intl.formatMessage(messages.seeWhoReacted)
|
|
319
|
-
})))))), jsx(ReactionPicker
|
|
321
|
+
})))))), !isViewOnly && jsx(ReactionPicker
|
|
320
322
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
321
323
|
, {
|
|
322
324
|
css: reactionPickerStyle,
|
|
@@ -333,7 +335,8 @@ export const Reactions = /*#__PURE__*/React.memo(({
|
|
|
333
335
|
miniMode: miniMode,
|
|
334
336
|
showOpaqueBackground: showOpaqueBackground,
|
|
335
337
|
showAddReactionText: showAddReactionText,
|
|
336
|
-
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker
|
|
338
|
+
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
|
|
339
|
+
showRoundTrigger: showRoundTrigger
|
|
337
340
|
}), jsx(ModalTransition, null, !!selectedEmojiId && jsx(ReactionsDialog, {
|
|
338
341
|
selectedEmojiId: selectedEmojiId,
|
|
339
342
|
reactions: sortedReactions,
|
|
@@ -35,7 +35,6 @@ const separatorStyles = xcss({
|
|
|
35
35
|
});
|
|
36
36
|
const Reveal = ({
|
|
37
37
|
children,
|
|
38
|
-
delay,
|
|
39
38
|
testId
|
|
40
39
|
}) => {
|
|
41
40
|
return jsx("div", {
|
|
@@ -43,11 +42,6 @@ const Reveal = ({
|
|
|
43
42
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
44
43
|
,
|
|
45
44
|
css: revealStyle
|
|
46
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
47
|
-
,
|
|
48
|
-
style: delay ? {
|
|
49
|
-
animationDelay: `${delay}ms`
|
|
50
|
-
} : undefined
|
|
51
45
|
}, children);
|
|
52
46
|
};
|
|
53
47
|
|
|
@@ -47,6 +47,11 @@ const expandedTriggerStyles = xcss({
|
|
|
47
47
|
const triggerStylesRefresh = xcss({
|
|
48
48
|
borderRadius: 'border.radius'
|
|
49
49
|
});
|
|
50
|
+
const roundTriggerStyles = xcss({
|
|
51
|
+
borderRadius: '50%',
|
|
52
|
+
height: '2rem',
|
|
53
|
+
width: '2rem'
|
|
54
|
+
});
|
|
50
55
|
const transparentEnabledTriggerStyles = xcss({
|
|
51
56
|
borderColor: 'color.border',
|
|
52
57
|
backgroundColor: 'color.background.neutral.subtle',
|
|
@@ -98,7 +103,8 @@ export const Trigger = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
98
103
|
ariaAttributes = {},
|
|
99
104
|
showOpaqueBackground = false,
|
|
100
105
|
showAddReactionText = false,
|
|
101
|
-
subtleReactionsSummaryAndPicker = false
|
|
106
|
+
subtleReactionsSummaryAndPicker = false,
|
|
107
|
+
showRoundTrigger = false
|
|
102
108
|
} = props;
|
|
103
109
|
const handleMouseDown = (e, analyticsEvent) => {
|
|
104
110
|
if (onClick && !disabled) {
|
|
@@ -110,7 +116,7 @@ export const Trigger = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
110
116
|
content: tooltipContent
|
|
111
117
|
}, jsx(Pressable, _extends({
|
|
112
118
|
testId: RENDER_TRIGGER_BUTTON_TESTID,
|
|
113
|
-
xcss: [triggerStyles, subtleReactionsSummaryAndPicker && subtleTriggerStyles, showAddReactionText && expandedTriggerStyles, disabled ? disabledTriggerStyles : showOpaqueBackground ? opaqueEnabledTriggerStyles : transparentEnabledTriggerStyles, miniMode && miniModeStyles, fg('platform-component-visual-refresh') && triggerStylesRefresh],
|
|
119
|
+
xcss: [triggerStyles, subtleReactionsSummaryAndPicker && subtleTriggerStyles, showAddReactionText && expandedTriggerStyles, disabled ? disabledTriggerStyles : showOpaqueBackground ? opaqueEnabledTriggerStyles : transparentEnabledTriggerStyles, miniMode && miniModeStyles, fg('platform-component-visual-refresh') && triggerStylesRefresh, showRoundTrigger && roundTriggerStyles],
|
|
114
120
|
onClick: handleMouseDown,
|
|
115
121
|
isDisabled: disabled,
|
|
116
122
|
ref: ref
|
|
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import { createAndFireEvent } from '@atlaskit/analytics-next';
|
|
5
5
|
import { UI_EVENT_TYPE, OPERATIONAL_EVENT_TYPE } from '@atlaskit/analytics-gas-types';
|
|
6
6
|
var packageName = "@atlaskit/reactions";
|
|
7
|
-
var packageVersion = "25.
|
|
7
|
+
var packageVersion = "25.4.1";
|
|
8
8
|
/**
|
|
9
9
|
* TODO: move to utility package?
|
|
10
10
|
* A random sampling function
|
|
@@ -88,7 +88,9 @@ export var ReactionPicker = /*#__PURE__*/React.memo(function (props) {
|
|
|
88
88
|
_props$subtleReaction = props.subtleReactionsSummaryAndPicker,
|
|
89
89
|
subtleReactionsSummaryAndPicker = _props$subtleReaction === void 0 ? false : _props$subtleReaction,
|
|
90
90
|
_props$showAddReactio = props.showAddReactionText,
|
|
91
|
-
showAddReactionText = _props$showAddReactio === void 0 ? false : _props$showAddReactio
|
|
91
|
+
showAddReactionText = _props$showAddReactio === void 0 ? false : _props$showAddReactio,
|
|
92
|
+
_props$showRoundTrigg = props.showRoundTrigger,
|
|
93
|
+
showRoundTrigger = _props$showRoundTrigg === void 0 ? false : _props$showRoundTrigg;
|
|
92
94
|
var _useState = useState(null),
|
|
93
95
|
_useState2 = _slicedToArray(_useState, 2),
|
|
94
96
|
triggerRef = _useState2[0],
|
|
@@ -222,7 +224,8 @@ export var ReactionPicker = /*#__PURE__*/React.memo(function (props) {
|
|
|
222
224
|
tooltipContent: settings.isOpen ? null : tooltipContent,
|
|
223
225
|
showOpaqueBackground: showOpaqueBackground,
|
|
224
226
|
showAddReactionText: showAddReactionText,
|
|
225
|
-
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker
|
|
227
|
+
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
|
|
228
|
+
showRoundTrigger: showRoundTrigger
|
|
226
229
|
})
|
|
227
230
|
);
|
|
228
231
|
}), settings.isOpen && jsx(PopperWrapper, {
|
|
@@ -135,7 +135,11 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
135
135
|
hideDefaultReactions = _ref$hideDefaultReact === void 0 ? false : _ref$hideDefaultReact,
|
|
136
136
|
ProfileCardWrapper = _ref.ProfileCardWrapper,
|
|
137
137
|
_ref$onlyRenderPicker = _ref.onlyRenderPicker,
|
|
138
|
-
onlyRenderPicker = _ref$onlyRenderPicker === void 0 ? false : _ref$onlyRenderPicker
|
|
138
|
+
onlyRenderPicker = _ref$onlyRenderPicker === void 0 ? false : _ref$onlyRenderPicker,
|
|
139
|
+
_ref$showRoundTrigger = _ref.showRoundTrigger,
|
|
140
|
+
showRoundTrigger = _ref$showRoundTrigger === void 0 ? false : _ref$showRoundTrigger,
|
|
141
|
+
_ref$isViewOnly = _ref.isViewOnly,
|
|
142
|
+
isViewOnly = _ref$isViewOnly === void 0 ? false : _ref$isViewOnly;
|
|
139
143
|
var _useState = useState(),
|
|
140
144
|
_useState2 = _slicedToArray(_useState, 2),
|
|
141
145
|
selectedEmojiId = _useState2[0],
|
|
@@ -351,7 +355,7 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
351
355
|
}, jsx(ShowMoreHorizontalIcon, {
|
|
352
356
|
label: intl.formatMessage(messages.seeWhoReacted)
|
|
353
357
|
})));
|
|
354
|
-
}))), jsx(ReactionPicker
|
|
358
|
+
}))), !isViewOnly && jsx(ReactionPicker
|
|
355
359
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
356
360
|
, {
|
|
357
361
|
css: reactionPickerStyle,
|
|
@@ -368,7 +372,8 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
368
372
|
miniMode: miniMode,
|
|
369
373
|
showOpaqueBackground: showOpaqueBackground,
|
|
370
374
|
showAddReactionText: showAddReactionText,
|
|
371
|
-
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker
|
|
375
|
+
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
|
|
376
|
+
showRoundTrigger: showRoundTrigger
|
|
372
377
|
}), jsx(ModalTransition, null, !!selectedEmojiId && jsx(ReactionsDialog, {
|
|
373
378
|
selectedEmojiId: selectedEmojiId,
|
|
374
379
|
reactions: sortedReactions,
|
|
@@ -35,18 +35,12 @@ var separatorStyles = xcss({
|
|
|
35
35
|
});
|
|
36
36
|
var Reveal = function Reveal(_ref) {
|
|
37
37
|
var children = _ref.children,
|
|
38
|
-
delay = _ref.delay,
|
|
39
38
|
testId = _ref.testId;
|
|
40
39
|
return jsx("div", {
|
|
41
40
|
"data-testid": testId
|
|
42
41
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
43
42
|
,
|
|
44
43
|
css: revealStyle
|
|
45
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
46
|
-
,
|
|
47
|
-
style: delay ? {
|
|
48
|
-
animationDelay: "".concat(delay, "ms")
|
|
49
|
-
} : undefined
|
|
50
44
|
}, children);
|
|
51
45
|
};
|
|
52
46
|
|
|
@@ -47,6 +47,11 @@ var expandedTriggerStyles = xcss({
|
|
|
47
47
|
var triggerStylesRefresh = xcss({
|
|
48
48
|
borderRadius: 'border.radius'
|
|
49
49
|
});
|
|
50
|
+
var roundTriggerStyles = xcss({
|
|
51
|
+
borderRadius: '50%',
|
|
52
|
+
height: '2rem',
|
|
53
|
+
width: '2rem'
|
|
54
|
+
});
|
|
50
55
|
var transparentEnabledTriggerStyles = xcss({
|
|
51
56
|
borderColor: 'color.border',
|
|
52
57
|
backgroundColor: 'color.background.neutral.subtle',
|
|
@@ -101,7 +106,9 @@ export var Trigger = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
101
106
|
_props$showAddReactio = props.showAddReactionText,
|
|
102
107
|
showAddReactionText = _props$showAddReactio === void 0 ? false : _props$showAddReactio,
|
|
103
108
|
_props$subtleReaction = props.subtleReactionsSummaryAndPicker,
|
|
104
|
-
subtleReactionsSummaryAndPicker = _props$subtleReaction === void 0 ? false : _props$subtleReaction
|
|
109
|
+
subtleReactionsSummaryAndPicker = _props$subtleReaction === void 0 ? false : _props$subtleReaction,
|
|
110
|
+
_props$showRoundTrigg = props.showRoundTrigger,
|
|
111
|
+
showRoundTrigger = _props$showRoundTrigg === void 0 ? false : _props$showRoundTrigg;
|
|
105
112
|
var handleMouseDown = function handleMouseDown(e, analyticsEvent) {
|
|
106
113
|
if (onClick && !disabled) {
|
|
107
114
|
onClick(e, analyticsEvent);
|
|
@@ -112,7 +119,7 @@ export var Trigger = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
112
119
|
content: tooltipContent
|
|
113
120
|
}, jsx(Pressable, _extends({
|
|
114
121
|
testId: RENDER_TRIGGER_BUTTON_TESTID,
|
|
115
|
-
xcss: [triggerStyles, subtleReactionsSummaryAndPicker && subtleTriggerStyles, showAddReactionText && expandedTriggerStyles, disabled ? disabledTriggerStyles : showOpaqueBackground ? opaqueEnabledTriggerStyles : transparentEnabledTriggerStyles, miniMode && miniModeStyles, fg('platform-component-visual-refresh') && triggerStylesRefresh],
|
|
122
|
+
xcss: [triggerStyles, subtleReactionsSummaryAndPicker && subtleTriggerStyles, showAddReactionText && expandedTriggerStyles, disabled ? disabledTriggerStyles : showOpaqueBackground ? opaqueEnabledTriggerStyles : transparentEnabledTriggerStyles, miniMode && miniModeStyles, fg('platform-component-visual-refresh') && triggerStylesRefresh, showRoundTrigger && roundTriggerStyles],
|
|
116
123
|
onClick: handleMouseDown,
|
|
117
124
|
isDisabled: disabled,
|
|
118
125
|
ref: ref
|
|
@@ -68,6 +68,10 @@ export interface ReactionPickerProps extends Pick<SelectorProps, 'pickerQuickRea
|
|
|
68
68
|
* Optional prop for displaying text to add a reaction
|
|
69
69
|
*/
|
|
70
70
|
showAddReactionText?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Optional prop for controlling if the picker hover border will be rounded
|
|
73
|
+
*/
|
|
74
|
+
showRoundTrigger?: boolean;
|
|
71
75
|
}
|
|
72
76
|
/**
|
|
73
77
|
* Picker component for adding reactions
|
|
@@ -143,6 +143,14 @@ export interface ReactionsProps extends Pick<ReactionPickerProps, 'allowAllEmoji
|
|
|
143
143
|
* Optional prop to hide the user reactions and only render the picker
|
|
144
144
|
*/
|
|
145
145
|
onlyRenderPicker?: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* Optional prop for controlling if the picker hover border will be rounded
|
|
148
|
+
*/
|
|
149
|
+
showRoundTrigger?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Optional prop for controlling if the reactions component is view only, disabling adding reactions
|
|
152
|
+
*/
|
|
153
|
+
isViewOnly?: boolean;
|
|
146
154
|
}
|
|
147
155
|
/**
|
|
148
156
|
* Get content of the tooltip
|
|
@@ -151,4 +159,4 @@ export declare function getTooltip(status: ReactionStatus, errorMessage?: string
|
|
|
151
159
|
/**
|
|
152
160
|
* Renders list of reactions
|
|
153
161
|
*/
|
|
154
|
-
export declare const Reactions: React.MemoExoticComponent<({ flash, particleEffectByEmoji, status, errorMessage, loadReaction, quickReactionEmojis, pickerQuickReactionEmojiIds, getReactionDetails, onReactionHover, onSelection, reactions, emojiProvider, allowAllEmojis, onReactionClick, allowUserDialog, onDialogOpenCallback, onDialogCloseCallback, onDialogSelectReactionCallback, onDialogPageChangeCallback, emojiPickerSize, miniMode, summaryViewEnabled, summaryViewThreshold, summaryViewPlacement, showOpaqueBackground, subtleReactionsSummaryAndPicker, showAddReactionText, hideDefaultReactions, ProfileCardWrapper, onlyRenderPicker, }: ReactionsProps) => jsx.JSX.Element>;
|
|
162
|
+
export declare const Reactions: React.MemoExoticComponent<({ flash, particleEffectByEmoji, status, errorMessage, loadReaction, quickReactionEmojis, pickerQuickReactionEmojiIds, getReactionDetails, onReactionHover, onSelection, reactions, emojiProvider, allowAllEmojis, onReactionClick, allowUserDialog, onDialogOpenCallback, onDialogCloseCallback, onDialogSelectReactionCallback, onDialogPageChangeCallback, emojiPickerSize, miniMode, summaryViewEnabled, summaryViewThreshold, summaryViewPlacement, showOpaqueBackground, subtleReactionsSummaryAndPicker, showAddReactionText, hideDefaultReactions, ProfileCardWrapper, onlyRenderPicker, showRoundTrigger, isViewOnly, }: ReactionsProps) => jsx.JSX.Element>;
|
|
@@ -44,6 +44,10 @@ export interface TriggerProps {
|
|
|
44
44
|
* Optional prop for applying subtle styling to reaction picker
|
|
45
45
|
*/
|
|
46
46
|
subtleReactionsSummaryAndPicker?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Optional prop for controlling if the picker hover border will be rounded
|
|
49
|
+
*/
|
|
50
|
+
showRoundTrigger?: boolean;
|
|
47
51
|
}
|
|
48
52
|
/**
|
|
49
53
|
* Render an emoji button to open the reactions select picker
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { type ReactionsProps, type ReactionPickerProps } from '../../components';
|
|
3
3
|
import { ReactionStatus, type Actions, type State, type StorePropInput } from '../../types';
|
|
4
4
|
import { type ReactionUpdateSuccess } from '../../types/reaction';
|
|
5
|
-
export interface ConnectedReactionsViewProps extends Pick<ReactionsProps, 'quickReactionEmojis' | 'onDialogOpenCallback' | 'onDialogCloseCallback' | 'onDialogSelectReactionCallback' | 'allowUserDialog' | 'allowAllEmojis' | 'emojiProvider' | 'emojiPickerSize' | 'miniMode' | 'summaryViewEnabled' | 'subtleReactionsSummaryAndPicker' | 'onlyRenderPicker'>, Pick<ReactionPickerProps, 'pickerQuickReactionEmojiIds'> {
|
|
5
|
+
export interface ConnectedReactionsViewProps extends Pick<ReactionsProps, 'quickReactionEmojis' | 'onDialogOpenCallback' | 'onDialogCloseCallback' | 'onDialogSelectReactionCallback' | 'allowUserDialog' | 'allowAllEmojis' | 'emojiProvider' | 'emojiPickerSize' | 'miniMode' | 'summaryViewEnabled' | 'subtleReactionsSummaryAndPicker' | 'onlyRenderPicker' | 'showRoundTrigger' | 'isViewOnly'>, Pick<ReactionPickerProps, 'pickerQuickReactionEmojiIds'> {
|
|
6
6
|
/**
|
|
7
7
|
* Wrapper id for reactions list
|
|
8
8
|
*/
|
|
@@ -68,6 +68,10 @@ export interface ReactionPickerProps extends Pick<SelectorProps, 'pickerQuickRea
|
|
|
68
68
|
* Optional prop for displaying text to add a reaction
|
|
69
69
|
*/
|
|
70
70
|
showAddReactionText?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Optional prop for controlling if the picker hover border will be rounded
|
|
73
|
+
*/
|
|
74
|
+
showRoundTrigger?: boolean;
|
|
71
75
|
}
|
|
72
76
|
/**
|
|
73
77
|
* Picker component for adding reactions
|
|
@@ -143,6 +143,14 @@ export interface ReactionsProps extends Pick<ReactionPickerProps, 'allowAllEmoji
|
|
|
143
143
|
* Optional prop to hide the user reactions and only render the picker
|
|
144
144
|
*/
|
|
145
145
|
onlyRenderPicker?: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* Optional prop for controlling if the picker hover border will be rounded
|
|
148
|
+
*/
|
|
149
|
+
showRoundTrigger?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Optional prop for controlling if the reactions component is view only, disabling adding reactions
|
|
152
|
+
*/
|
|
153
|
+
isViewOnly?: boolean;
|
|
146
154
|
}
|
|
147
155
|
/**
|
|
148
156
|
* Get content of the tooltip
|
|
@@ -151,4 +159,4 @@ export declare function getTooltip(status: ReactionStatus, errorMessage?: string
|
|
|
151
159
|
/**
|
|
152
160
|
* Renders list of reactions
|
|
153
161
|
*/
|
|
154
|
-
export declare const Reactions: React.MemoExoticComponent<({ flash, particleEffectByEmoji, status, errorMessage, loadReaction, quickReactionEmojis, pickerQuickReactionEmojiIds, getReactionDetails, onReactionHover, onSelection, reactions, emojiProvider, allowAllEmojis, onReactionClick, allowUserDialog, onDialogOpenCallback, onDialogCloseCallback, onDialogSelectReactionCallback, onDialogPageChangeCallback, emojiPickerSize, miniMode, summaryViewEnabled, summaryViewThreshold, summaryViewPlacement, showOpaqueBackground, subtleReactionsSummaryAndPicker, showAddReactionText, hideDefaultReactions, ProfileCardWrapper, onlyRenderPicker, }: ReactionsProps) => jsx.JSX.Element>;
|
|
162
|
+
export declare const Reactions: React.MemoExoticComponent<({ flash, particleEffectByEmoji, status, errorMessage, loadReaction, quickReactionEmojis, pickerQuickReactionEmojiIds, getReactionDetails, onReactionHover, onSelection, reactions, emojiProvider, allowAllEmojis, onReactionClick, allowUserDialog, onDialogOpenCallback, onDialogCloseCallback, onDialogSelectReactionCallback, onDialogPageChangeCallback, emojiPickerSize, miniMode, summaryViewEnabled, summaryViewThreshold, summaryViewPlacement, showOpaqueBackground, subtleReactionsSummaryAndPicker, showAddReactionText, hideDefaultReactions, ProfileCardWrapper, onlyRenderPicker, showRoundTrigger, isViewOnly, }: ReactionsProps) => jsx.JSX.Element>;
|
|
@@ -44,6 +44,10 @@ export interface TriggerProps {
|
|
|
44
44
|
* Optional prop for applying subtle styling to reaction picker
|
|
45
45
|
*/
|
|
46
46
|
subtleReactionsSummaryAndPicker?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Optional prop for controlling if the picker hover border will be rounded
|
|
49
|
+
*/
|
|
50
|
+
showRoundTrigger?: boolean;
|
|
47
51
|
}
|
|
48
52
|
/**
|
|
49
53
|
* Render an emoji button to open the reactions select picker
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { type ReactionsProps, type ReactionPickerProps } from '../../components';
|
|
3
3
|
import { ReactionStatus, type Actions, type State, type StorePropInput } from '../../types';
|
|
4
4
|
import { type ReactionUpdateSuccess } from '../../types/reaction';
|
|
5
|
-
export interface ConnectedReactionsViewProps extends Pick<ReactionsProps, 'quickReactionEmojis' | 'onDialogOpenCallback' | 'onDialogCloseCallback' | 'onDialogSelectReactionCallback' | 'allowUserDialog' | 'allowAllEmojis' | 'emojiProvider' | 'emojiPickerSize' | 'miniMode' | 'summaryViewEnabled' | 'subtleReactionsSummaryAndPicker' | 'onlyRenderPicker'>, Pick<ReactionPickerProps, 'pickerQuickReactionEmojiIds'> {
|
|
5
|
+
export interface ConnectedReactionsViewProps extends Pick<ReactionsProps, 'quickReactionEmojis' | 'onDialogOpenCallback' | 'onDialogCloseCallback' | 'onDialogSelectReactionCallback' | 'allowUserDialog' | 'allowAllEmojis' | 'emojiProvider' | 'emojiPickerSize' | 'miniMode' | 'summaryViewEnabled' | 'subtleReactionsSummaryAndPicker' | 'onlyRenderPicker' | 'showRoundTrigger' | 'isViewOnly'>, Pick<ReactionPickerProps, 'pickerQuickReactionEmojiIds'> {
|
|
6
6
|
/**
|
|
7
7
|
* Wrapper id for reactions list
|
|
8
8
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/reactions",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.4.1",
|
|
4
4
|
"description": "Reactions component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@atlaskit/analytics-gas-types": "^5.1.0",
|
|
36
|
-
"@atlaskit/analytics-namespaced-context": "^6.
|
|
36
|
+
"@atlaskit/analytics-namespaced-context": "^6.14.0",
|
|
37
37
|
"@atlaskit/analytics-next": "^10.3.0",
|
|
38
38
|
"@atlaskit/avatar": "^21.18.0",
|
|
39
39
|
"@atlaskit/button": "^20.5.0",
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
"@atlaskit/icon": "^23.9.0",
|
|
43
43
|
"@atlaskit/modal-dialog": "^12.20.0",
|
|
44
44
|
"@atlaskit/motion": "^3.0.0",
|
|
45
|
-
"@atlaskit/platform-feature-flags": "^1.
|
|
45
|
+
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
46
46
|
"@atlaskit/popper": "^6.4.0",
|
|
47
|
-
"@atlaskit/popup": "1.31.
|
|
47
|
+
"@atlaskit/popup": "1.31.3",
|
|
48
48
|
"@atlaskit/primitives": "^13.5.0",
|
|
49
49
|
"@atlaskit/spinner": "^17.1.0",
|
|
50
50
|
"@atlaskit/tabs": "^17.2.0",
|
|
51
|
-
"@atlaskit/theme": "^
|
|
51
|
+
"@atlaskit/theme": "^16.0.0",
|
|
52
52
|
"@atlaskit/tokens": "^3.3.0",
|
|
53
53
|
"@atlaskit/tooltip": "^19.1.0",
|
|
54
54
|
"@atlaskit/ufo": "^0.3.0",
|