@atlaskit/reactions 22.10.1 → 22.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/components/Counter/Counter.js +4 -1
- package/dist/cjs/components/Counter/styles.js +4 -1
- package/dist/cjs/components/EmojiButton/EmojiButton.js +4 -1
- package/dist/cjs/components/FlashAnimation/FlashAnimation.js +4 -1
- package/dist/cjs/components/FlashAnimation/styles.js +4 -1
- package/dist/cjs/components/Reaction/Reaction.js +18 -3
- package/dist/cjs/components/Reaction/ReactionButton.js +4 -1
- package/dist/cjs/components/Reaction/styles.js +4 -1
- package/dist/cjs/components/ReactionDialog/ReactionView.js +4 -1
- package/dist/cjs/components/ReactionDialog/ReactionsDialog.js +4 -1
- package/dist/cjs/components/ReactionDialog/ReactionsList.js +4 -1
- package/dist/cjs/components/ReactionDialog/styles.js +4 -1
- package/dist/cjs/components/ReactionParticleEffect/ReactionParticleEffect.js +4 -1
- package/dist/cjs/components/ReactionPicker/ReactionPicker.js +9 -3
- package/dist/cjs/components/ReactionPicker/styles.js +4 -1
- package/dist/cjs/components/ReactionSummary/ReactionSummaryButton.js +14 -10
- package/dist/cjs/components/ReactionSummary/ReactionSummaryView.js +5 -2
- package/dist/cjs/components/ReactionTooltip/ReactionTooltip.js +4 -1
- package/dist/cjs/components/ReactionTooltip/styles.js +4 -1
- package/dist/cjs/components/Reactions/Reactions.js +13 -5
- package/dist/cjs/components/Reactions/styles.js +4 -1
- package/dist/cjs/components/Selector/Selector.js +4 -1
- package/dist/cjs/components/Selector/styles.js +4 -1
- package/dist/cjs/components/ShowMore/ShowMore.js +4 -1
- package/dist/cjs/components/Trigger/Trigger.js +19 -4
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/components/Counter/Counter.js +4 -1
- package/dist/es2019/components/Counter/styles.js +4 -1
- package/dist/es2019/components/EmojiButton/EmojiButton.js +4 -1
- package/dist/es2019/components/FlashAnimation/FlashAnimation.js +4 -1
- package/dist/es2019/components/FlashAnimation/styles.js +4 -1
- package/dist/es2019/components/Reaction/Reaction.js +17 -3
- package/dist/es2019/components/Reaction/ReactionButton.js +4 -1
- package/dist/es2019/components/Reaction/styles.js +4 -1
- package/dist/es2019/components/ReactionDialog/ReactionView.js +4 -1
- package/dist/es2019/components/ReactionDialog/ReactionsDialog.js +4 -1
- package/dist/es2019/components/ReactionDialog/ReactionsList.js +4 -1
- package/dist/es2019/components/ReactionDialog/styles.js +4 -1
- package/dist/es2019/components/ReactionParticleEffect/ReactionParticleEffect.js +4 -1
- package/dist/es2019/components/ReactionPicker/ReactionPicker.js +8 -3
- package/dist/es2019/components/ReactionPicker/styles.js +4 -1
- package/dist/es2019/components/ReactionSummary/ReactionSummaryButton.js +13 -10
- package/dist/es2019/components/ReactionSummary/ReactionSummaryView.js +4 -2
- package/dist/es2019/components/ReactionTooltip/ReactionTooltip.js +4 -1
- package/dist/es2019/components/ReactionTooltip/styles.js +4 -1
- package/dist/es2019/components/Reactions/Reactions.js +12 -5
- package/dist/es2019/components/Reactions/styles.js +4 -1
- package/dist/es2019/components/Selector/Selector.js +4 -1
- package/dist/es2019/components/Selector/styles.js +4 -1
- package/dist/es2019/components/ShowMore/ShowMore.js +4 -1
- package/dist/es2019/components/Trigger/Trigger.js +18 -4
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/components/Counter/Counter.js +4 -1
- package/dist/esm/components/Counter/styles.js +4 -1
- package/dist/esm/components/EmojiButton/EmojiButton.js +4 -1
- package/dist/esm/components/FlashAnimation/FlashAnimation.js +4 -1
- package/dist/esm/components/FlashAnimation/styles.js +4 -1
- package/dist/esm/components/Reaction/Reaction.js +18 -3
- package/dist/esm/components/Reaction/ReactionButton.js +4 -1
- package/dist/esm/components/Reaction/styles.js +4 -1
- package/dist/esm/components/ReactionDialog/ReactionView.js +4 -1
- package/dist/esm/components/ReactionDialog/ReactionsDialog.js +4 -1
- package/dist/esm/components/ReactionDialog/ReactionsList.js +4 -1
- package/dist/esm/components/ReactionDialog/styles.js +4 -1
- package/dist/esm/components/ReactionParticleEffect/ReactionParticleEffect.js +4 -1
- package/dist/esm/components/ReactionPicker/ReactionPicker.js +9 -3
- package/dist/esm/components/ReactionPicker/styles.js +4 -1
- package/dist/esm/components/ReactionSummary/ReactionSummaryButton.js +14 -10
- package/dist/esm/components/ReactionSummary/ReactionSummaryView.js +5 -2
- package/dist/esm/components/ReactionTooltip/ReactionTooltip.js +4 -1
- package/dist/esm/components/ReactionTooltip/styles.js +4 -1
- package/dist/esm/components/Reactions/Reactions.js +13 -5
- package/dist/esm/components/Reactions/styles.js +4 -1
- package/dist/esm/components/Selector/Selector.js +4 -1
- package/dist/esm/components/Selector/styles.js +4 -1
- package/dist/esm/components/ShowMore/ShowMore.js +4 -1
- package/dist/esm/components/Trigger/Trigger.js +19 -4
- package/dist/types/components/FlashAnimation/FlashAnimation.d.ts +4 -1
- package/dist/types/components/FlashAnimation/styles.d.ts +4 -1
- package/dist/types/components/Reaction/Reaction.d.ts +5 -1
- package/dist/types/components/Reaction/ReactionButton.d.ts +4 -1
- package/dist/types/components/ReactionParticleEffect/ReactionParticleEffect.d.ts +4 -1
- package/dist/types/components/ReactionPicker/ReactionPicker.d.ts +8 -1
- package/dist/types/components/ReactionSummary/ReactionSummaryButton.d.ts +4 -0
- package/dist/types/components/ReactionSummary/ReactionSummaryView.d.ts +5 -1
- package/dist/types/components/ReactionTooltip/ReactionTooltip.d.ts +4 -1
- package/dist/types/components/Reactions/Reactions.d.ts +9 -2
- package/dist/types/components/Selector/Selector.d.ts +4 -1
- package/dist/types/components/Selector/styles.d.ts +4 -1
- package/dist/types/components/ShowMore/ShowMore.d.ts +4 -1
- package/dist/types/components/Trigger/Trigger.d.ts +8 -1
- package/dist/types-ts4.5/components/FlashAnimation/FlashAnimation.d.ts +4 -1
- package/dist/types-ts4.5/components/FlashAnimation/styles.d.ts +4 -1
- package/dist/types-ts4.5/components/Reaction/Reaction.d.ts +5 -1
- package/dist/types-ts4.5/components/Reaction/ReactionButton.d.ts +4 -1
- package/dist/types-ts4.5/components/ReactionParticleEffect/ReactionParticleEffect.d.ts +4 -1
- package/dist/types-ts4.5/components/ReactionPicker/ReactionPicker.d.ts +8 -1
- package/dist/types-ts4.5/components/ReactionSummary/ReactionSummaryButton.d.ts +4 -0
- package/dist/types-ts4.5/components/ReactionSummary/ReactionSummaryView.d.ts +5 -1
- package/dist/types-ts4.5/components/ReactionTooltip/ReactionTooltip.d.ts +4 -1
- package/dist/types-ts4.5/components/Reactions/Reactions.d.ts +9 -2
- package/dist/types-ts4.5/components/Selector/Selector.d.ts +4 -1
- package/dist/types-ts4.5/components/Selector/styles.d.ts +4 -1
- package/dist/types-ts4.5/components/ShowMore/ShowMore.d.ts +4 -1
- package/dist/types-ts4.5/components/Trigger/Trigger.d.ts +8 -1
- package/package.json +7 -7
|
@@ -16,6 +16,15 @@ var buttonStyle = xcss({
|
|
|
16
16
|
paddingBottom: 'space.050',
|
|
17
17
|
paddingLeft: 'space.100'
|
|
18
18
|
});
|
|
19
|
+
var opaqueBackgroundStyles = xcss({
|
|
20
|
+
backgroundColor: 'elevation.surface',
|
|
21
|
+
':hover': {
|
|
22
|
+
backgroundColor: 'elevation.surface.hovered'
|
|
23
|
+
},
|
|
24
|
+
':active': {
|
|
25
|
+
backgroundColor: 'elevation.surface.pressed'
|
|
26
|
+
}
|
|
27
|
+
});
|
|
19
28
|
var containerStyle = xcss({
|
|
20
29
|
position: 'relative'
|
|
21
30
|
});
|
|
@@ -36,7 +45,9 @@ export var ReactionSummaryButton = /*#__PURE__*/forwardRef(function (_ref, ref)
|
|
|
36
45
|
reactions = _ref$reactions === void 0 ? [] : _ref$reactions,
|
|
37
46
|
_ref$emojisToShow = _ref.emojisToShow,
|
|
38
47
|
emojisToShow = _ref$emojisToShow === void 0 ? 3 : _ref$emojisToShow,
|
|
39
|
-
onClick = _ref.onClick
|
|
48
|
+
onClick = _ref.onClick,
|
|
49
|
+
_ref$showOpaqueBackgr = _ref.showOpaqueBackground,
|
|
50
|
+
showOpaqueBackground = _ref$showOpaqueBackgr === void 0 ? false : _ref$showOpaqueBackgr;
|
|
40
51
|
var intl = useIntl();
|
|
41
52
|
|
|
42
53
|
// Helper function to sort reactions by count and return top N
|
|
@@ -53,6 +64,7 @@ export var ReactionSummaryButton = /*#__PURE__*/forwardRef(function (_ref, ref)
|
|
|
53
64
|
var topReactions = useMemo(function () {
|
|
54
65
|
return getTopReactions(reactions, emojisToShow);
|
|
55
66
|
}, [emojisToShow, reactions]);
|
|
67
|
+
var buttonStyles = showOpaqueBackground ? [opaqueBackgroundStyles] : [];
|
|
56
68
|
return /*#__PURE__*/React.createElement(Box, {
|
|
57
69
|
xcss: containerStyle,
|
|
58
70
|
ref: ref
|
|
@@ -60,15 +72,7 @@ export var ReactionSummaryButton = /*#__PURE__*/forwardRef(function (_ref, ref)
|
|
|
60
72
|
onClick: onClick,
|
|
61
73
|
testId: RENDER_SUMMARY_BUTTON_TESTID,
|
|
62
74
|
ariaLabel: intl.formatMessage(messages.summary),
|
|
63
|
-
additionalStyles:
|
|
64
|
-
backgroundColor: 'elevation.surface',
|
|
65
|
-
':hover': {
|
|
66
|
-
backgroundColor: 'elevation.surface.hovered'
|
|
67
|
-
},
|
|
68
|
-
':active': {
|
|
69
|
-
backgroundColor: 'elevation.surface.pressed'
|
|
70
|
-
}
|
|
71
|
-
})]
|
|
75
|
+
additionalStyles: buttonStyles
|
|
72
76
|
}, /*#__PURE__*/React.createElement(Inline, {
|
|
73
77
|
space: "space.050",
|
|
74
78
|
xcss: buttonStyle
|
|
@@ -28,7 +28,9 @@ export var ReactionSummaryView = function ReactionSummaryView(_ref) {
|
|
|
28
28
|
placement = _ref$placement === void 0 ? 'auto-start' : _ref$placement,
|
|
29
29
|
onReactionClick = _ref.onReactionClick,
|
|
30
30
|
onReactionFocused = _ref.onReactionFocused,
|
|
31
|
-
onReactionMouseEnter = _ref.onReactionMouseEnter
|
|
31
|
+
onReactionMouseEnter = _ref.onReactionMouseEnter,
|
|
32
|
+
_ref$showOpaqueBackgr = _ref.showOpaqueBackground,
|
|
33
|
+
showOpaqueBackground = _ref$showOpaqueBackgr === void 0 ? false : _ref$showOpaqueBackgr;
|
|
32
34
|
var _useState = useState(false),
|
|
33
35
|
_useState2 = _slicedToArray(_useState, 2),
|
|
34
36
|
isSummaryPopupOpen = _useState2[0],
|
|
@@ -68,7 +70,8 @@ export var ReactionSummaryView = function ReactionSummaryView(_ref) {
|
|
|
68
70
|
return /*#__PURE__*/React.createElement(ReactionSummaryButton, _extends({}, triggerProps, {
|
|
69
71
|
emojiProvider: emojiProvider,
|
|
70
72
|
reactions: reactions,
|
|
71
|
-
onClick: handleSummaryClick
|
|
73
|
+
onClick: handleSummaryClick,
|
|
74
|
+
showOpaqueBackground: showOpaqueBackground
|
|
72
75
|
}));
|
|
73
76
|
}
|
|
74
77
|
});
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
3
6
|
import React from 'react';
|
|
4
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
8
|
import { jsx } from '@emotion/react';
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
3
6
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
4
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
8
|
import { jsx } from '@emotion/react';
|
|
@@ -106,7 +109,9 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
106
109
|
summaryViewEnabled = _ref$summaryViewEnabl === void 0 ? false : _ref$summaryViewEnabl,
|
|
107
110
|
_ref$summaryViewThres = _ref.summaryViewThreshold,
|
|
108
111
|
summaryViewThreshold = _ref$summaryViewThres === void 0 ? 3 : _ref$summaryViewThres,
|
|
109
|
-
summaryViewPlacement = _ref.summaryViewPlacement
|
|
112
|
+
summaryViewPlacement = _ref.summaryViewPlacement,
|
|
113
|
+
_ref$showOpaqueBackgr = _ref.showOpaqueBackground,
|
|
114
|
+
showOpaqueBackground = _ref$showOpaqueBackgr === void 0 ? false : _ref$showOpaqueBackgr;
|
|
110
115
|
var _useState = useState(),
|
|
111
116
|
_useState2 = _slicedToArray(_useState, 2),
|
|
112
117
|
selectedEmojiId = _useState2[0],
|
|
@@ -277,7 +282,8 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
277
282
|
onReactionClick: onReactionClick,
|
|
278
283
|
onReactionFocused: handleReactionFocused,
|
|
279
284
|
onReactionMouseEnter: handleReactionMouseEnter,
|
|
280
|
-
placement: summaryViewPlacement
|
|
285
|
+
placement: summaryViewPlacement,
|
|
286
|
+
showOpaqueBackground: showOpaqueBackground
|
|
281
287
|
})) : memorizedReactions.map(function (reaction) {
|
|
282
288
|
return jsx(Reaction, {
|
|
283
289
|
key: reaction.emojiId,
|
|
@@ -289,7 +295,8 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
289
295
|
flash: flash[reaction.emojiId],
|
|
290
296
|
handleUserListClick: handleOpenReactionsDialog,
|
|
291
297
|
allowUserDialog: allowUserDialog,
|
|
292
|
-
showParticleEffect: particleEffectByEmoji[reaction.emojiId]
|
|
298
|
+
showParticleEffect: particleEffectByEmoji[reaction.emojiId],
|
|
299
|
+
showOpaqueBackground: showOpaqueBackground
|
|
293
300
|
});
|
|
294
301
|
}), jsx(ReactionPicker
|
|
295
302
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
@@ -305,7 +312,8 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
305
312
|
onShowMore: handleOnMore,
|
|
306
313
|
tooltipContent: getTooltip(status, errorMessage),
|
|
307
314
|
emojiPickerSize: emojiPickerSize,
|
|
308
|
-
miniMode: miniMode
|
|
315
|
+
miniMode: miniMode,
|
|
316
|
+
showOpaqueBackground: showOpaqueBackground
|
|
309
317
|
}), allowUserDialog && reactions.length > 0 && jsx(Tooltip, {
|
|
310
318
|
content: jsx(FormattedMessage, messages.seeWhoReactedTooltip),
|
|
311
319
|
hideTooltipOnClick: true
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
2
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
6
|
import { css } from '@emotion/react';
|
|
4
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
3
6
|
import React from 'react';
|
|
4
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
8
|
import { jsx } from '@emotion/react';
|
|
@@ -24,7 +27,7 @@ var triggerStyles = xcss({
|
|
|
24
27
|
alignItems: 'center',
|
|
25
28
|
lineHeight: '16px'
|
|
26
29
|
});
|
|
27
|
-
var
|
|
30
|
+
var transparentEnabledTriggerStyles = xcss({
|
|
28
31
|
borderColor: 'color.border',
|
|
29
32
|
backgroundColor: 'color.background.neutral.subtle',
|
|
30
33
|
':hover': {
|
|
@@ -34,6 +37,16 @@ var enabledTriggerStyles = xcss({
|
|
|
34
37
|
backgroundColor: 'color.background.neutral.subtle.pressed'
|
|
35
38
|
}
|
|
36
39
|
});
|
|
40
|
+
var opaqueEnabledTriggerStyles = xcss({
|
|
41
|
+
borderColor: 'color.border',
|
|
42
|
+
backgroundColor: 'elevation.surface',
|
|
43
|
+
':hover': {
|
|
44
|
+
backgroundColor: 'elevation.surface.hovered'
|
|
45
|
+
},
|
|
46
|
+
':active': {
|
|
47
|
+
backgroundColor: 'elevation.surface.pressed'
|
|
48
|
+
}
|
|
49
|
+
});
|
|
37
50
|
var disabledTriggerStyles = xcss({
|
|
38
51
|
borderColor: 'color.border.disabled',
|
|
39
52
|
backgroundColor: 'color.background.disabled'
|
|
@@ -55,7 +68,9 @@ export var Trigger = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
55
68
|
_props$disabled = props.disabled,
|
|
56
69
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
57
70
|
_props$ariaAttributes = props.ariaAttributes,
|
|
58
|
-
ariaAttributes = _props$ariaAttributes === void 0 ? {} : _props$ariaAttributes
|
|
71
|
+
ariaAttributes = _props$ariaAttributes === void 0 ? {} : _props$ariaAttributes,
|
|
72
|
+
_props$showOpaqueBack = props.showOpaqueBackground,
|
|
73
|
+
showOpaqueBackground = _props$showOpaqueBack === void 0 ? false : _props$showOpaqueBack;
|
|
59
74
|
var handleMouseDown = function handleMouseDown(e, analyticsEvent) {
|
|
60
75
|
if (onClick && !disabled) {
|
|
61
76
|
onClick(e, analyticsEvent);
|
|
@@ -66,7 +81,7 @@ export var Trigger = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
66
81
|
content: tooltipContent
|
|
67
82
|
}, jsx(Pressable, _extends({
|
|
68
83
|
testId: RENDER_TRIGGER_BUTTON_TESTID,
|
|
69
|
-
xcss: [triggerStyles, disabled ? disabledTriggerStyles :
|
|
84
|
+
xcss: [triggerStyles, disabled ? disabledTriggerStyles : showOpaqueBackground ? opaqueEnabledTriggerStyles : transparentEnabledTriggerStyles, miniMode && miniModeStyles],
|
|
70
85
|
onClick: handleMouseDown,
|
|
71
86
|
isDisabled: disabled,
|
|
72
87
|
ref: ref
|
|
@@ -40,8 +40,12 @@ export interface ReactionProps extends Pick<ReactionTooltipProps, 'allowUserDial
|
|
|
40
40
|
* Optional function when the user wants to see more users in a modal
|
|
41
41
|
*/
|
|
42
42
|
handleUserListClick?: (emojiId: string) => void;
|
|
43
|
+
/**
|
|
44
|
+
* Optional prop for using an opaque button background instead of a transparent background
|
|
45
|
+
*/
|
|
46
|
+
showOpaqueBackground?: boolean;
|
|
43
47
|
}
|
|
44
48
|
/**
|
|
45
49
|
* Render an emoji reaction button
|
|
46
50
|
*/
|
|
47
|
-
export declare const Reaction: ({ emojiProvider, onClick, reaction, onMouseEnter, onFocused, flash, showParticleEffect, handleUserListClick, allowUserDialog, }: ReactionProps) => jsx.JSX.Element;
|
|
51
|
+
export declare const Reaction: ({ emojiProvider, onClick, reaction, onMouseEnter, onFocused, flash, showParticleEffect, handleUserListClick, allowUserDialog, showOpaqueBackground, }: ReactionProps) => jsx.JSX.Element;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
2
5
|
import React from 'react';
|
|
3
6
|
import { jsx } from '@emotion/react';
|
|
4
7
|
import { type PickerSize } from '@atlaskit/emoji/types';
|
|
@@ -53,6 +56,10 @@ export interface ReactionPickerProps extends Pick<SelectorProps, 'pickerQuickRea
|
|
|
53
56
|
* Optional emoji picker size to control the size of emoji picker
|
|
54
57
|
*/
|
|
55
58
|
emojiPickerSize?: PickerSize;
|
|
59
|
+
/**
|
|
60
|
+
* Optional prop for using an opaque button background instead of a transparent background
|
|
61
|
+
*/
|
|
62
|
+
showOpaqueBackground?: boolean;
|
|
56
63
|
}
|
|
57
64
|
/**
|
|
58
65
|
* Picker component for adding reactions
|
|
@@ -9,6 +9,10 @@ interface ReactionSummaryButtonProps extends Pick<ReactionsProps, 'emojiProvider
|
|
|
9
9
|
* The number of emojis to show in the summary button
|
|
10
10
|
*/
|
|
11
11
|
emojisToShow?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Optional prop for using an opaque button background instead of a transparent background
|
|
14
|
+
*/
|
|
15
|
+
showOpaqueBackground?: boolean;
|
|
12
16
|
}
|
|
13
17
|
/**
|
|
14
18
|
* Test id for summary reaction wrapper button
|
|
@@ -28,6 +28,10 @@ interface ReactionSummaryViewProps extends Pick<ReactionsProps, 'emojiProvider'
|
|
|
28
28
|
* Optional event when focused a reaction inside the summary
|
|
29
29
|
*/
|
|
30
30
|
onReactionFocused?: ReactionFocused;
|
|
31
|
+
/**
|
|
32
|
+
* Optional prop for using an opaque button background instead of a transparent background
|
|
33
|
+
*/
|
|
34
|
+
showOpaqueBackground?: boolean;
|
|
31
35
|
}
|
|
32
|
-
export declare const ReactionSummaryView: ({ emojiProvider, reactions, flash, particleEffectByEmoji, handleOpenReactionsDialog, allowUserDialog, placement, onReactionClick, onReactionFocused, onReactionMouseEnter, }: ReactionSummaryViewProps) => JSX.Element;
|
|
36
|
+
export declare const ReactionSummaryView: ({ emojiProvider, reactions, flash, particleEffectByEmoji, handleOpenReactionsDialog, allowUserDialog, placement, onReactionClick, onReactionFocused, onReactionMouseEnter, showOpaqueBackground, }: ReactionSummaryViewProps) => JSX.Element;
|
|
33
37
|
export {};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
2
5
|
import React from 'react';
|
|
3
6
|
import { jsx } from '@emotion/react';
|
|
4
7
|
import { type OnCloseHandler } from '@atlaskit/modal-dialog';
|
|
@@ -107,6 +110,10 @@ export interface ReactionsProps extends Pick<ReactionPickerProps, 'allowAllEmoji
|
|
|
107
110
|
* Optional prop to change the placement of the summary popup reaction list
|
|
108
111
|
*/
|
|
109
112
|
summaryViewPlacement?: Placement;
|
|
113
|
+
/**
|
|
114
|
+
* Optional prop for using an opaque button background instead of a transparent background
|
|
115
|
+
*/
|
|
116
|
+
showOpaqueBackground?: boolean;
|
|
110
117
|
}
|
|
111
118
|
/**
|
|
112
119
|
* Get content of the tooltip
|
|
@@ -115,4 +122,4 @@ export declare function getTooltip(status: ReactionStatus, errorMessage?: string
|
|
|
115
122
|
/**
|
|
116
123
|
* Renders list of reactions
|
|
117
124
|
*/
|
|
118
|
-
export declare const Reactions: React.MemoExoticComponent<({ flash, particleEffectByEmoji, status, errorMessage, loadReaction, quickReactionEmojis, pickerQuickReactionEmojiIds, getReactionDetails, onReactionHover, onSelection, reactions, emojiProvider, allowAllEmojis, onReactionClick, allowUserDialog, onDialogOpenCallback, onDialogCloseCallback, onDialogSelectReactionCallback, emojiPickerSize, miniMode, summaryViewEnabled, summaryViewThreshold, summaryViewPlacement, }: ReactionsProps) => jsx.JSX.Element>;
|
|
125
|
+
export declare const Reactions: React.MemoExoticComponent<({ flash, particleEffectByEmoji, status, errorMessage, loadReaction, quickReactionEmojis, pickerQuickReactionEmojiIds, getReactionDetails, onReactionHover, onSelection, reactions, emojiProvider, allowAllEmojis, onReactionClick, allowUserDialog, onDialogOpenCallback, onDialogCloseCallback, onDialogSelectReactionCallback, emojiPickerSize, miniMode, summaryViewEnabled, summaryViewThreshold, summaryViewPlacement, showOpaqueBackground, }: ReactionsProps) => jsx.JSX.Element>;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
2
5
|
import React, { type AriaAttributes } from 'react';
|
|
3
6
|
import { type AnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
7
|
/**
|
|
@@ -29,6 +32,10 @@ export interface TriggerProps {
|
|
|
29
32
|
* Aria accessibility attributes that will be added to the button
|
|
30
33
|
*/
|
|
31
34
|
ariaAttributes?: AriaAttributes;
|
|
35
|
+
/**
|
|
36
|
+
* Optional prop for using an opaque button background instead of a transparent background
|
|
37
|
+
*/
|
|
38
|
+
showOpaqueBackground?: boolean;
|
|
32
39
|
}
|
|
33
40
|
/**
|
|
34
41
|
* Render an emoji button to open the reactions select picker
|
|
@@ -40,8 +40,12 @@ export interface ReactionProps extends Pick<ReactionTooltipProps, 'allowUserDial
|
|
|
40
40
|
* Optional function when the user wants to see more users in a modal
|
|
41
41
|
*/
|
|
42
42
|
handleUserListClick?: (emojiId: string) => void;
|
|
43
|
+
/**
|
|
44
|
+
* Optional prop for using an opaque button background instead of a transparent background
|
|
45
|
+
*/
|
|
46
|
+
showOpaqueBackground?: boolean;
|
|
43
47
|
}
|
|
44
48
|
/**
|
|
45
49
|
* Render an emoji reaction button
|
|
46
50
|
*/
|
|
47
|
-
export declare const Reaction: ({ emojiProvider, onClick, reaction, onMouseEnter, onFocused, flash, showParticleEffect, handleUserListClick, allowUserDialog, }: ReactionProps) => jsx.JSX.Element;
|
|
51
|
+
export declare const Reaction: ({ emojiProvider, onClick, reaction, onMouseEnter, onFocused, flash, showParticleEffect, handleUserListClick, allowUserDialog, showOpaqueBackground, }: ReactionProps) => jsx.JSX.Element;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
2
5
|
import React from 'react';
|
|
3
6
|
import { jsx } from '@emotion/react';
|
|
4
7
|
import { type PickerSize } from '@atlaskit/emoji/types';
|
|
@@ -53,6 +56,10 @@ export interface ReactionPickerProps extends Pick<SelectorProps, 'pickerQuickRea
|
|
|
53
56
|
* Optional emoji picker size to control the size of emoji picker
|
|
54
57
|
*/
|
|
55
58
|
emojiPickerSize?: PickerSize;
|
|
59
|
+
/**
|
|
60
|
+
* Optional prop for using an opaque button background instead of a transparent background
|
|
61
|
+
*/
|
|
62
|
+
showOpaqueBackground?: boolean;
|
|
56
63
|
}
|
|
57
64
|
/**
|
|
58
65
|
* Picker component for adding reactions
|
|
@@ -9,6 +9,10 @@ interface ReactionSummaryButtonProps extends Pick<ReactionsProps, 'emojiProvider
|
|
|
9
9
|
* The number of emojis to show in the summary button
|
|
10
10
|
*/
|
|
11
11
|
emojisToShow?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Optional prop for using an opaque button background instead of a transparent background
|
|
14
|
+
*/
|
|
15
|
+
showOpaqueBackground?: boolean;
|
|
12
16
|
}
|
|
13
17
|
/**
|
|
14
18
|
* Test id for summary reaction wrapper button
|
|
@@ -28,6 +28,10 @@ interface ReactionSummaryViewProps extends Pick<ReactionsProps, 'emojiProvider'
|
|
|
28
28
|
* Optional event when focused a reaction inside the summary
|
|
29
29
|
*/
|
|
30
30
|
onReactionFocused?: ReactionFocused;
|
|
31
|
+
/**
|
|
32
|
+
* Optional prop for using an opaque button background instead of a transparent background
|
|
33
|
+
*/
|
|
34
|
+
showOpaqueBackground?: boolean;
|
|
31
35
|
}
|
|
32
|
-
export declare const ReactionSummaryView: ({ emojiProvider, reactions, flash, particleEffectByEmoji, handleOpenReactionsDialog, allowUserDialog, placement, onReactionClick, onReactionFocused, onReactionMouseEnter, }: ReactionSummaryViewProps) => JSX.Element;
|
|
36
|
+
export declare const ReactionSummaryView: ({ emojiProvider, reactions, flash, particleEffectByEmoji, handleOpenReactionsDialog, allowUserDialog, placement, onReactionClick, onReactionFocused, onReactionMouseEnter, showOpaqueBackground, }: ReactionSummaryViewProps) => JSX.Element;
|
|
33
37
|
export {};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
2
5
|
import React from 'react';
|
|
3
6
|
import { jsx } from '@emotion/react';
|
|
4
7
|
import { type OnCloseHandler } from '@atlaskit/modal-dialog';
|
|
@@ -107,6 +110,10 @@ export interface ReactionsProps extends Pick<ReactionPickerProps, 'allowAllEmoji
|
|
|
107
110
|
* Optional prop to change the placement of the summary popup reaction list
|
|
108
111
|
*/
|
|
109
112
|
summaryViewPlacement?: Placement;
|
|
113
|
+
/**
|
|
114
|
+
* Optional prop for using an opaque button background instead of a transparent background
|
|
115
|
+
*/
|
|
116
|
+
showOpaqueBackground?: boolean;
|
|
110
117
|
}
|
|
111
118
|
/**
|
|
112
119
|
* Get content of the tooltip
|
|
@@ -115,4 +122,4 @@ export declare function getTooltip(status: ReactionStatus, errorMessage?: string
|
|
|
115
122
|
/**
|
|
116
123
|
* Renders list of reactions
|
|
117
124
|
*/
|
|
118
|
-
export declare const Reactions: React.MemoExoticComponent<({ flash, particleEffectByEmoji, status, errorMessage, loadReaction, quickReactionEmojis, pickerQuickReactionEmojiIds, getReactionDetails, onReactionHover, onSelection, reactions, emojiProvider, allowAllEmojis, onReactionClick, allowUserDialog, onDialogOpenCallback, onDialogCloseCallback, onDialogSelectReactionCallback, emojiPickerSize, miniMode, summaryViewEnabled, summaryViewThreshold, summaryViewPlacement, }: ReactionsProps) => jsx.JSX.Element>;
|
|
125
|
+
export declare const Reactions: React.MemoExoticComponent<({ flash, particleEffectByEmoji, status, errorMessage, loadReaction, quickReactionEmojis, pickerQuickReactionEmojiIds, getReactionDetails, onReactionHover, onSelection, reactions, emojiProvider, allowAllEmojis, onReactionClick, allowUserDialog, onDialogOpenCallback, onDialogCloseCallback, onDialogSelectReactionCallback, emojiPickerSize, miniMode, summaryViewEnabled, summaryViewThreshold, summaryViewPlacement, showOpaqueBackground, }: ReactionsProps) => jsx.JSX.Element>;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
2
5
|
import React, { type AriaAttributes } from 'react';
|
|
3
6
|
import { type AnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
7
|
/**
|
|
@@ -29,6 +32,10 @@ export interface TriggerProps {
|
|
|
29
32
|
* Aria accessibility attributes that will be added to the button
|
|
30
33
|
*/
|
|
31
34
|
ariaAttributes?: AriaAttributes;
|
|
35
|
+
/**
|
|
36
|
+
* Optional prop for using an opaque button background instead of a transparent background
|
|
37
|
+
*/
|
|
38
|
+
showOpaqueBackground?: boolean;
|
|
32
39
|
}
|
|
33
40
|
/**
|
|
34
41
|
* Render an emoji button to open the reactions select picker
|