@atlaskit/reactions 31.5.0 → 31.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/components/FlashAnimation.compiled.css +6 -3
- package/dist/cjs/components/FlashAnimation.js +4 -2
- package/dist/cjs/components/ReactionPicker.js +5 -2
- package/dist/cjs/components/Reactions.js +4 -1
- package/dist/cjs/components/Selector.compiled.css +7 -3
- package/dist/cjs/components/Selector.js +1 -4
- package/dist/cjs/components/Trigger.compiled.css +1 -0
- package/dist/cjs/components/Trigger.js +37 -27
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/components/FlashAnimation.compiled.css +4 -2
- package/dist/es2019/components/FlashAnimation.js +1 -1
- package/dist/es2019/components/ReactionPicker.js +4 -2
- package/dist/es2019/components/Reactions.js +3 -1
- package/dist/es2019/components/Selector.compiled.css +5 -2
- package/dist/es2019/components/Selector.js +1 -1
- package/dist/es2019/components/Trigger.compiled.css +1 -0
- package/dist/es2019/components/Trigger.js +16 -9
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/components/FlashAnimation.compiled.css +6 -3
- package/dist/esm/components/FlashAnimation.js +4 -2
- package/dist/esm/components/ReactionPicker.js +5 -2
- package/dist/esm/components/Reactions.js +4 -1
- package/dist/esm/components/Selector.compiled.css +7 -3
- package/dist/esm/components/Selector.js +1 -4
- package/dist/esm/components/Trigger.compiled.css +1 -0
- package/dist/esm/components/Trigger.js +36 -26
- package/dist/types/components/ReactionPicker.d.ts +4 -0
- package/dist/types/components/Reactions.d.ts +5 -1
- package/dist/types/components/Trigger.d.ts +5 -0
- package/dist/types-ts4.5/components/ReactionPicker.d.ts +4 -0
- package/dist/types-ts4.5/components/Reactions.d.ts +5 -1
- package/dist/types-ts4.5/components/Trigger.d.ts +5 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/reactions
|
|
2
2
|
|
|
3
|
+
## 31.5.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#148201](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/148201)
|
|
8
|
+
[`8e811f1840de7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8e811f1840de7) -
|
|
9
|
+
Either actively or pre-emptively fixes a bug with keyframe animations in CJS and ESM distribution
|
|
10
|
+
targets for packages using Compiled CSS-in-JS. This may not affect this package, but the change
|
|
11
|
+
was made so a future migration does not accidentally break it.
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 31.5.1
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [#145524](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/145524)
|
|
19
|
+
[`c667c355bfcf6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c667c355bfcf6) -
|
|
20
|
+
Adding property to wrap button in list item when true
|
|
21
|
+
|
|
3
22
|
## 31.5.0
|
|
4
23
|
|
|
5
24
|
### Minor 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 = "31.5.
|
|
14
|
+
var packageVersion = "31.5.2";
|
|
15
15
|
/**
|
|
16
16
|
* TODO: move to utility package?
|
|
17
17
|
* A random sampling function
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
.
|
|
3
|
-
._4t3i1osq{height:100%}
|
|
1
|
+
._1bsb1osq{width:100%}
|
|
2
|
+
._1pgl1ytf{animation-timing-function:ease-in-out}
|
|
3
|
+
._4t3i1osq{height:100%}
|
|
4
|
+
._5sagolkx{animation-duration:var(--_gwerdd)}
|
|
5
|
+
._j7hq1x5b{animation-name:kfhns1k}
|
|
6
|
+
@keyframes kfhns1k{20%{border-color:var(--_8ijx7f);background-color:var(--_17s7zfd)}75%{border-color:var(--_8ijx7f);background-color:var(--_17s7zfd)}to{border-color:var(--_8ijx7f);background-color:var(--_17s7zfd)}0%{background-color:transparent}}
|
|
@@ -26,10 +26,12 @@ var RENDER_FLASHANIMATION_TESTID = exports.RENDER_FLASHANIMATION_TESTID = 'flash
|
|
|
26
26
|
var FlashAnimation = exports.FlashAnimation = function FlashAnimation(props) {
|
|
27
27
|
return /*#__PURE__*/React.createElement("div", {
|
|
28
28
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
29
|
-
className: (0, _runtime.ax)(["_1bsb1osq _4t3i1osq", props.flash && "
|
|
29
|
+
className: (0, _runtime.ax)(["_1bsb1osq _4t3i1osq", props.flash && "", props.flash && "_j7hq1x5b _5sagolkx _1pgl1ytf", props.className]),
|
|
30
30
|
"data-testid": RENDER_FLASHANIMATION_TESTID,
|
|
31
31
|
style: {
|
|
32
|
-
"--
|
|
32
|
+
"--_17s7zfd": (0, _runtime.ix)("var(--ds-background-selected-pressed, ".concat(_colors.B75, ")")),
|
|
33
|
+
"--_8ijx7f": (0, _runtime.ix)("var(--ds-border-selected, ".concat(_colors.B300, ")")),
|
|
34
|
+
"--_gwerdd": (0, _runtime.ix)("".concat(flashTime, "ms"))
|
|
33
35
|
}
|
|
34
36
|
}, props.children);
|
|
35
37
|
};
|
|
@@ -77,7 +77,9 @@ var ReactionPicker = exports.ReactionPicker = /*#__PURE__*/_react.default.memo(f
|
|
|
77
77
|
reactionPickerTriggerIcon = props.reactionPickerTriggerIcon,
|
|
78
78
|
reactionPickerTriggerText = props.reactionPickerTriggerText,
|
|
79
79
|
reactionPickerPlacement = props.reactionPickerPlacement,
|
|
80
|
-
reactionsPickerPreventOverflowOptions = props.reactionsPickerPreventOverflowOptions
|
|
80
|
+
reactionsPickerPreventOverflowOptions = props.reactionsPickerPreventOverflowOptions,
|
|
81
|
+
_props$isListItem = props.isListItem,
|
|
82
|
+
isListItem = _props$isListItem === void 0 ? false : _props$isListItem;
|
|
81
83
|
var _useState = (0, _react.useState)(null),
|
|
82
84
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
83
85
|
triggerRef = _useState2[0],
|
|
@@ -249,7 +251,8 @@ var ReactionPicker = exports.ReactionPicker = /*#__PURE__*/_react.default.memo(f
|
|
|
249
251
|
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
|
|
250
252
|
showRoundTrigger: showRoundTrigger,
|
|
251
253
|
reactionPickerTriggerIcon: reactionPickerTriggerIcon,
|
|
252
|
-
reactionPickerTriggerText: reactionPickerTriggerText
|
|
254
|
+
reactionPickerTriggerText: reactionPickerTriggerText,
|
|
255
|
+
isListItem: isListItem
|
|
253
256
|
})
|
|
254
257
|
);
|
|
255
258
|
}), settings.isOpen && /*#__PURE__*/_react.default.createElement(PopperWrapper, {
|
|
@@ -144,7 +144,9 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
|
|
|
144
144
|
useButtonAlignmentStyling = _ref$useButtonAlignme === void 0 ? false : _ref$useButtonAlignme,
|
|
145
145
|
reactionPickerTriggerText = _ref.reactionPickerTriggerText,
|
|
146
146
|
_ref$hoverableSummary = _ref.hoverableSummaryView,
|
|
147
|
-
hoverableSummaryView = _ref$hoverableSummary === void 0 ? false : _ref$hoverableSummary
|
|
147
|
+
hoverableSummaryView = _ref$hoverableSummary === void 0 ? false : _ref$hoverableSummary,
|
|
148
|
+
_ref$isListItem = _ref.isListItem,
|
|
149
|
+
isListItem = _ref$isListItem === void 0 ? false : _ref$isListItem;
|
|
148
150
|
var _useState = (0, _react.useState)(''),
|
|
149
151
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
150
152
|
selectedEmojiId = _useState2[0],
|
|
@@ -361,6 +363,7 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
|
|
|
361
363
|
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
|
|
362
364
|
reactionPickerTriggerIcon: reactionPickerTriggerIcon,
|
|
363
365
|
reactionPickerTriggerText: reactionPickerTriggerText,
|
|
366
|
+
isListItem: isListItem,
|
|
364
367
|
className: (0, _runtime.ax)(["_1e0c1o8l _19pk1b66"])
|
|
365
368
|
}), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalTransition, null, !!selectedEmojiId && /*#__PURE__*/_react.default.createElement(_segment.default, {
|
|
366
369
|
name: "reactions-dialog"
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
._y44vlcmg{animation:var(--_1m4wxxu)}._12l2u2gc{margin-inline-end:var(--ds-space-100,8px)}
|
|
1
|
+
._12l2u2gc{margin-inline-end:var(--ds-space-100,8px)}
|
|
3
2
|
._19bv1b66{padding-left:var(--ds-space-050,4px)}
|
|
4
3
|
._1e0c1o8l{display:inline-block}
|
|
4
|
+
._1o51q7pw{animation-fill-mode:forwards}
|
|
5
5
|
._1p3lnqa1{border-left-style:solid}
|
|
6
|
+
._1pgl1ytf{animation-timing-function:ease-in-out}
|
|
6
7
|
._4t3i1tcg{height:24px}
|
|
8
|
+
._5sag6ebc{animation-duration:.15s}
|
|
7
9
|
._5wramuej{border-left-color:var(--ds-border,#091e4224)}
|
|
8
10
|
._ahbq1b66{margin-inline-start:var(--ds-space-050,4px)}
|
|
9
11
|
._ca0q1b66{padding-top:var(--ds-space-050,4px)}
|
|
12
|
+
._j7hqordv{animation-name:k12q5x3s}
|
|
10
13
|
._n3td1b66{padding-bottom:var(--ds-space-050,4px)}
|
|
11
14
|
._t6vde4h9{border-left-width:var(--ds-border-width,1px)}
|
|
12
15
|
._tzy4idpf{opacity:0}
|
|
13
|
-
._u5f31b66{padding-right:var(--ds-space-050,4px)}
|
|
16
|
+
._u5f31b66{padding-right:var(--ds-space-050,4px)}
|
|
17
|
+
@keyframes k12q5x3s{0%{opacity:1;transform:scale(.5)}75%{transform:scale(1.25)}to{opacity:1;transform:scale(1)}}
|
|
@@ -34,10 +34,7 @@ var Reveal = function Reveal(_ref) {
|
|
|
34
34
|
testId = _ref.testId;
|
|
35
35
|
return /*#__PURE__*/React.createElement("div", {
|
|
36
36
|
"data-testid": testId,
|
|
37
|
-
className: (0, _runtime.ax)(["
|
|
38
|
-
style: {
|
|
39
|
-
"--_1m4wxxu": (0, _runtime.ix)("".concat(revealAnimation, " 150ms ease-in-out forwards"))
|
|
40
|
-
}
|
|
37
|
+
className: (0, _runtime.ax)(["_j7hqordv _5sag6ebc _1pgl1ytf _1o51q7pw _tzy4idpf"])
|
|
41
38
|
}, children);
|
|
42
39
|
};
|
|
43
40
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
._11c8dcr7{font:var(--ds-font-body-UNSAFE_small,normal 400 9pt/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
2
2
|
._2rko14q2{border-radius:var(--ds-border-radius-circle,2002pc)}
|
|
3
3
|
._2rkoglpi{border-radius:var(--ds-border-radius,4px)}
|
|
4
|
+
._qtt8glyw{list-style:none}
|
|
4
5
|
._189ee4h9{border-width:var(--ds-border-width,1px)}
|
|
5
6
|
._1dqoglyw{border-style:none}
|
|
6
7
|
._1dqonqa1{border-style:solid}
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.Trigger = exports.RENDER_TRIGGER_CONTAINER_TESTID = exports.RENDER_TRIGGER_BUTTON_TESTID = exports.RENDER_TOOLTIP_TRIGGER_TESTID = void 0;
|
|
8
|
+
exports.Trigger = exports.RENDER_TRIGGER_CONTAINER_TESTID = exports.RENDER_TRIGGER_BUTTON_TESTID = exports.RENDER_TOOLTIP_TRIGGER_TESTID = exports.RENDER_LIST_ITEM_WRAPPER_TESTID = void 0;
|
|
9
9
|
require("./Trigger.compiled.css");
|
|
10
10
|
var _runtime = require("@compiled/react/runtime");
|
|
11
11
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
@@ -36,6 +36,7 @@ var styles = {
|
|
|
36
36
|
var RENDER_TOOLTIP_TRIGGER_TESTID = exports.RENDER_TOOLTIP_TRIGGER_TESTID = 'render-tooltip-trigger';
|
|
37
37
|
var RENDER_TRIGGER_BUTTON_TESTID = exports.RENDER_TRIGGER_BUTTON_TESTID = 'render-trigger-button';
|
|
38
38
|
var RENDER_TRIGGER_CONTAINER_TESTID = exports.RENDER_TRIGGER_CONTAINER_TESTID = 'render-trigger-container';
|
|
39
|
+
var RENDER_LIST_ITEM_WRAPPER_TESTID = exports.RENDER_LIST_ITEM_WRAPPER_TESTID = 'render-list-item-wrapper';
|
|
39
40
|
var i18n = (0, _reactIntlNext.defineMessages)({
|
|
40
41
|
addReaction: {
|
|
41
42
|
id: 'reaction-picker-trigger.add.reaction.message',
|
|
@@ -46,6 +47,7 @@ var i18n = (0, _reactIntlNext.defineMessages)({
|
|
|
46
47
|
var addReactionStyles = {
|
|
47
48
|
addReactionMessage: "_11c8dcr7 _syaz1gjq _18u01b66"
|
|
48
49
|
};
|
|
50
|
+
var noMarkerListStyle = null;
|
|
49
51
|
|
|
50
52
|
/**
|
|
51
53
|
* Render an emoji button to open the reactions select picker
|
|
@@ -72,41 +74,49 @@ var Trigger = exports.Trigger = /*#__PURE__*/_react2.default.forwardRef(function
|
|
|
72
74
|
_props$reactionPicker = props.reactionPickerTriggerText,
|
|
73
75
|
reactionPickerTriggerText = _props$reactionPicker === void 0 ? formatMessage(i18n.addReaction) : _props$reactionPicker,
|
|
74
76
|
_props$fullWidthSumma = props.fullWidthSummaryViewReactionPickerTrigger,
|
|
75
|
-
fullWidthSummaryViewReactionPickerTrigger = _props$fullWidthSumma === void 0 ? false : _props$fullWidthSumma
|
|
77
|
+
fullWidthSummaryViewReactionPickerTrigger = _props$fullWidthSumma === void 0 ? false : _props$fullWidthSumma,
|
|
78
|
+
_props$isListItem = props.isListItem,
|
|
79
|
+
isListItem = _props$isListItem === void 0 ? false : _props$isListItem;
|
|
76
80
|
var handleMouseDown = function handleMouseDown(e, analyticsEvent) {
|
|
77
81
|
if (onClick && !disabled) {
|
|
78
82
|
onClick(e, analyticsEvent);
|
|
79
83
|
}
|
|
80
84
|
};
|
|
85
|
+
var renderPressableButton = function renderPressableButton() {
|
|
86
|
+
return /*#__PURE__*/_react2.default.createElement(_compiled.Pressable, (0, _extends2.default)({
|
|
87
|
+
testId: RENDER_TRIGGER_BUTTON_TESTID,
|
|
88
|
+
xcss: (0, _react.cx)(styles.trigger, fullWidthSummaryViewReactionPickerTrigger && styles.fullWidth, subtleReactionsSummaryAndPicker && styles.subtleTrigger, showAddReactionText && styles.expandedTrigger, disabled ? styles.disabledTrigger : showOpaqueBackground ? styles.opaqueEnabledTrigger : styles.transparentEnabledTrigger, miniMode && styles.miniMode,
|
|
89
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
90
|
+
(0, _platformFeatureFlags.fg)('platform-component-visual-refresh') && styles.triggerStylesRefresh, showRoundTrigger && styles.roundTrigger),
|
|
91
|
+
style: {
|
|
92
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/design-system/use-tokens-typography
|
|
93
|
+
lineHeight: '16px'
|
|
94
|
+
},
|
|
95
|
+
onClick: handleMouseDown,
|
|
96
|
+
isDisabled: disabled,
|
|
97
|
+
ref: ref,
|
|
98
|
+
"data-subtle": subtleReactionsSummaryAndPicker,
|
|
99
|
+
"data-mini-mode": miniMode
|
|
100
|
+
}, ariaAttributes), !!reactionPickerTriggerIcon ? reactionPickerTriggerIcon :
|
|
101
|
+
/*#__PURE__*/
|
|
102
|
+
// TODO: https://product-fabric.atlassian.net/browse/DSP-21007
|
|
103
|
+
_react2.default.createElement(_emojiAdd.default, {
|
|
104
|
+
testId: "emoji-add-icon",
|
|
105
|
+
color: disabled ? "var(--ds-icon-disabled, #091E424F)" : "var(--ds-icon, #44546F)",
|
|
106
|
+
LEGACY_size: "small",
|
|
107
|
+
label: "Add reaction"
|
|
108
|
+
}), showAddReactionText && /*#__PURE__*/_react2.default.createElement(_compiled.Box, {
|
|
109
|
+
xcss: (0, _react.cx)(addReactionStyles.addReactionMessage)
|
|
110
|
+
}, reactionPickerTriggerText));
|
|
111
|
+
};
|
|
81
112
|
return /*#__PURE__*/_react2.default.createElement(_compiled.Box, {
|
|
82
113
|
xcss: (0, _react.cx)(fullWidthSummaryViewReactionPickerTrigger && styles.fullWidthSummaryViewReactionPickerTrigger),
|
|
83
114
|
testId: RENDER_TRIGGER_CONTAINER_TESTID
|
|
84
115
|
}, /*#__PURE__*/_react2.default.createElement(_tooltip.default, {
|
|
85
116
|
testId: RENDER_TOOLTIP_TRIGGER_TESTID,
|
|
86
117
|
content: tooltipContent
|
|
87
|
-
}, /*#__PURE__*/_react2.default.createElement(
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
(0, _platformFeatureFlags.fg)('platform-component-visual-refresh') && styles.triggerStylesRefresh, showRoundTrigger && styles.roundTrigger),
|
|
92
|
-
style: {
|
|
93
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/design-system/use-tokens-typography
|
|
94
|
-
lineHeight: '16px'
|
|
95
|
-
},
|
|
96
|
-
onClick: handleMouseDown,
|
|
97
|
-
isDisabled: disabled,
|
|
98
|
-
ref: ref,
|
|
99
|
-
"data-subtle": subtleReactionsSummaryAndPicker,
|
|
100
|
-
"data-mini-mode": miniMode
|
|
101
|
-
}, ariaAttributes), !!reactionPickerTriggerIcon ? reactionPickerTriggerIcon :
|
|
102
|
-
/*#__PURE__*/
|
|
103
|
-
// TODO: https://product-fabric.atlassian.net/browse/DSP-21007
|
|
104
|
-
_react2.default.createElement(_emojiAdd.default, {
|
|
105
|
-
testId: "emoji-add-icon",
|
|
106
|
-
color: disabled ? "var(--ds-icon-disabled, #091E424F)" : "var(--ds-icon, #44546F)",
|
|
107
|
-
LEGACY_size: "small",
|
|
108
|
-
label: "Add reaction"
|
|
109
|
-
}), showAddReactionText && /*#__PURE__*/_react2.default.createElement(_compiled.Box, {
|
|
110
|
-
xcss: (0, _react.cx)(addReactionStyles.addReactionMessage)
|
|
111
|
-
}, reactionPickerTriggerText))));
|
|
118
|
+
}, isListItem ? /*#__PURE__*/_react2.default.createElement("li", {
|
|
119
|
+
"data-testid": RENDER_LIST_ITEM_WRAPPER_TESTID,
|
|
120
|
+
className: (0, _runtime.ax)(["_qtt8glyw"])
|
|
121
|
+
}, renderPressableButton()) : renderPressableButton()));
|
|
112
122
|
});
|
|
@@ -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 = "31.5.
|
|
4
|
+
const packageVersion = "31.5.2";
|
|
5
5
|
/**
|
|
6
6
|
* TODO: move to utility package?
|
|
7
7
|
* A random sampling function
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
.
|
|
1
|
+
._1bsb1osq{width:100%}
|
|
2
|
+
._1pgl1ytf{animation-timing-function:ease-in-out}
|
|
3
3
|
._4t3i1osq{height:100%}
|
|
4
|
+
._5sagpwmj{animation-duration:.7s}
|
|
5
|
+
._j7hqdjji{animation-name:k1qrjcqm}
|
|
4
6
|
@keyframes k1qrjcqm{20%{border-color:var(--ds-border-selected,#0065ff);background-color:var(--ds-background-selected-pressed,#b3d4ff)}75%{border-color:var(--ds-border-selected,#0065ff);background-color:var(--ds-background-selected-pressed,#b3d4ff)}to{border-color:var(--ds-border-selected,#0065ff);background-color:var(--ds-background-selected-pressed,#b3d4ff)}0%{background-color:transparent}}
|
|
@@ -16,6 +16,6 @@ export const RENDER_FLASHANIMATION_TESTID = 'flash-animation';
|
|
|
16
16
|
*/
|
|
17
17
|
export const FlashAnimation = props => /*#__PURE__*/React.createElement("div", {
|
|
18
18
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
19
|
-
className: ax(["_1bsb1osq _4t3i1osq", props.flash && "", props.flash && "
|
|
19
|
+
className: ax(["_1bsb1osq _4t3i1osq", props.flash && "", props.flash && "_j7hqdjji _5sagpwmj _1pgl1ytf", props.className]),
|
|
20
20
|
"data-testid": RENDER_FLASHANIMATION_TESTID
|
|
21
21
|
}, props.children);
|
|
@@ -57,7 +57,8 @@ export const ReactionPicker = /*#__PURE__*/React.memo(props => {
|
|
|
57
57
|
reactionPickerTriggerIcon,
|
|
58
58
|
reactionPickerTriggerText,
|
|
59
59
|
reactionPickerPlacement,
|
|
60
|
-
reactionsPickerPreventOverflowOptions
|
|
60
|
+
reactionsPickerPreventOverflowOptions,
|
|
61
|
+
isListItem = false
|
|
61
62
|
} = props;
|
|
62
63
|
const [triggerRef, setTriggerRef] = useState(null);
|
|
63
64
|
|
|
@@ -224,7 +225,8 @@ export const ReactionPicker = /*#__PURE__*/React.memo(props => {
|
|
|
224
225
|
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
|
|
225
226
|
showRoundTrigger: showRoundTrigger,
|
|
226
227
|
reactionPickerTriggerIcon: reactionPickerTriggerIcon,
|
|
227
|
-
reactionPickerTriggerText: reactionPickerTriggerText
|
|
228
|
+
reactionPickerTriggerText: reactionPickerTriggerText,
|
|
229
|
+
isListItem: isListItem
|
|
228
230
|
})), settings.isOpen && /*#__PURE__*/React.createElement(PopperWrapper, {
|
|
229
231
|
settings: settings,
|
|
230
232
|
popperModifiers: popperModifiers
|
|
@@ -107,7 +107,8 @@ export const Reactions = /*#__PURE__*/React.memo(({
|
|
|
107
107
|
allowSelectFromSummaryView = false,
|
|
108
108
|
useButtonAlignmentStyling = false,
|
|
109
109
|
reactionPickerTriggerText,
|
|
110
|
-
hoverableSummaryView = false
|
|
110
|
+
hoverableSummaryView = false,
|
|
111
|
+
isListItem = false
|
|
111
112
|
}) => {
|
|
112
113
|
const [selectedEmojiId, setSelectedEmojiId] = useState('');
|
|
113
114
|
const {
|
|
@@ -309,6 +310,7 @@ export const Reactions = /*#__PURE__*/React.memo(({
|
|
|
309
310
|
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
|
|
310
311
|
reactionPickerTriggerIcon: reactionPickerTriggerIcon,
|
|
311
312
|
reactionPickerTriggerText: reactionPickerTriggerText,
|
|
313
|
+
isListItem: isListItem,
|
|
312
314
|
className: ax(["_1e0c1o8l _19pk1b66"])
|
|
313
315
|
}), /*#__PURE__*/React.createElement(ModalTransition, null, !!selectedEmojiId && /*#__PURE__*/React.createElement(UFOSegment, {
|
|
314
316
|
name: "reactions-dialog"
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
._y44v8out{animation:k12q5x3s .15s ease-in-out forwards}._12l2u2gc{margin-inline-end:var(--ds-space-100,8px)}
|
|
1
|
+
._12l2u2gc{margin-inline-end:var(--ds-space-100,8px)}
|
|
3
2
|
._19bv1b66{padding-left:var(--ds-space-050,4px)}
|
|
4
3
|
._1e0c1o8l{display:inline-block}
|
|
4
|
+
._1o51q7pw{animation-fill-mode:forwards}
|
|
5
5
|
._1p3lnqa1{border-left-style:solid}
|
|
6
|
+
._1pgl1ytf{animation-timing-function:ease-in-out}
|
|
6
7
|
._4t3i1tcg{height:24px}
|
|
8
|
+
._5sag6ebc{animation-duration:.15s}
|
|
7
9
|
._5wramuej{border-left-color:var(--ds-border,#091e4224)}
|
|
8
10
|
._ahbq1b66{margin-inline-start:var(--ds-space-050,4px)}
|
|
9
11
|
._ca0q1b66{padding-top:var(--ds-space-050,4px)}
|
|
12
|
+
._j7hqordv{animation-name:k12q5x3s}
|
|
10
13
|
._n3td1b66{padding-bottom:var(--ds-space-050,4px)}
|
|
11
14
|
._t6vde4h9{border-left-width:var(--ds-border-width,1px)}
|
|
12
15
|
._tzy4idpf{opacity:0}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
._11c8dcr7{font:var(--ds-font-body-UNSAFE_small,normal 400 9pt/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
2
2
|
._2rko14q2{border-radius:var(--ds-border-radius-circle,2002pc)}
|
|
3
3
|
._2rkoglpi{border-radius:var(--ds-border-radius,4px)}
|
|
4
|
+
._qtt8glyw{list-style:none}
|
|
4
5
|
._189ee4h9{border-width:var(--ds-border-width,1px)}
|
|
5
6
|
._1dqoglyw{border-style:none}
|
|
6
7
|
._1dqonqa1{border-style:solid}
|
|
@@ -29,6 +29,7 @@ const styles = {
|
|
|
29
29
|
export const RENDER_TOOLTIP_TRIGGER_TESTID = 'render-tooltip-trigger';
|
|
30
30
|
export const RENDER_TRIGGER_BUTTON_TESTID = 'render-trigger-button';
|
|
31
31
|
export const RENDER_TRIGGER_CONTAINER_TESTID = 'render-trigger-container';
|
|
32
|
+
export const RENDER_LIST_ITEM_WRAPPER_TESTID = 'render-list-item-wrapper';
|
|
32
33
|
const i18n = defineMessages({
|
|
33
34
|
addReaction: {
|
|
34
35
|
id: 'reaction-picker-trigger.add.reaction.message',
|
|
@@ -39,6 +40,7 @@ const i18n = defineMessages({
|
|
|
39
40
|
const addReactionStyles = {
|
|
40
41
|
addReactionMessage: "_11c8dcr7 _syaz1gjq _18u01b66"
|
|
41
42
|
};
|
|
43
|
+
const noMarkerListStyle = null;
|
|
42
44
|
|
|
43
45
|
/**
|
|
44
46
|
* Render an emoji button to open the reactions select picker
|
|
@@ -59,20 +61,15 @@ export const Trigger = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
59
61
|
showRoundTrigger = false,
|
|
60
62
|
reactionPickerTriggerIcon,
|
|
61
63
|
reactionPickerTriggerText = formatMessage(i18n.addReaction),
|
|
62
|
-
fullWidthSummaryViewReactionPickerTrigger = false
|
|
64
|
+
fullWidthSummaryViewReactionPickerTrigger = false,
|
|
65
|
+
isListItem = false
|
|
63
66
|
} = props;
|
|
64
67
|
const handleMouseDown = (e, analyticsEvent) => {
|
|
65
68
|
if (onClick && !disabled) {
|
|
66
69
|
onClick(e, analyticsEvent);
|
|
67
70
|
}
|
|
68
71
|
};
|
|
69
|
-
|
|
70
|
-
xcss: cx(fullWidthSummaryViewReactionPickerTrigger && styles.fullWidthSummaryViewReactionPickerTrigger),
|
|
71
|
-
testId: RENDER_TRIGGER_CONTAINER_TESTID
|
|
72
|
-
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
73
|
-
testId: RENDER_TOOLTIP_TRIGGER_TESTID,
|
|
74
|
-
content: tooltipContent
|
|
75
|
-
}, /*#__PURE__*/React.createElement(Pressable, _extends({
|
|
72
|
+
const renderPressableButton = () => /*#__PURE__*/React.createElement(Pressable, _extends({
|
|
76
73
|
testId: RENDER_TRIGGER_BUTTON_TESTID,
|
|
77
74
|
xcss: cx(styles.trigger, fullWidthSummaryViewReactionPickerTrigger && styles.fullWidth, subtleReactionsSummaryAndPicker && styles.subtleTrigger, showAddReactionText && styles.expandedTrigger, disabled ? styles.disabledTrigger : showOpaqueBackground ? styles.opaqueEnabledTrigger : styles.transparentEnabledTrigger, miniMode && styles.miniMode,
|
|
78
75
|
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
@@ -96,5 +93,15 @@ export const Trigger = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
96
93
|
label: "Add reaction"
|
|
97
94
|
}), showAddReactionText && /*#__PURE__*/React.createElement(Box, {
|
|
98
95
|
xcss: cx(addReactionStyles.addReactionMessage)
|
|
99
|
-
}, reactionPickerTriggerText))
|
|
96
|
+
}, reactionPickerTriggerText));
|
|
97
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
98
|
+
xcss: cx(fullWidthSummaryViewReactionPickerTrigger && styles.fullWidthSummaryViewReactionPickerTrigger),
|
|
99
|
+
testId: RENDER_TRIGGER_CONTAINER_TESTID
|
|
100
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
101
|
+
testId: RENDER_TOOLTIP_TRIGGER_TESTID,
|
|
102
|
+
content: tooltipContent
|
|
103
|
+
}, isListItem ? /*#__PURE__*/React.createElement("li", {
|
|
104
|
+
"data-testid": RENDER_LIST_ITEM_WRAPPER_TESTID,
|
|
105
|
+
className: ax(["_qtt8glyw"])
|
|
106
|
+
}, renderPressableButton()) : renderPressableButton()));
|
|
100
107
|
});
|
|
@@ -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 = "31.5.
|
|
7
|
+
var packageVersion = "31.5.2";
|
|
8
8
|
/**
|
|
9
9
|
* TODO: move to utility package?
|
|
10
10
|
* A random sampling function
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
.
|
|
3
|
-
._4t3i1osq{height:100%}
|
|
1
|
+
._1bsb1osq{width:100%}
|
|
2
|
+
._1pgl1ytf{animation-timing-function:ease-in-out}
|
|
3
|
+
._4t3i1osq{height:100%}
|
|
4
|
+
._5sagolkx{animation-duration:var(--_gwerdd)}
|
|
5
|
+
._j7hq1x5b{animation-name:kfhns1k}
|
|
6
|
+
@keyframes kfhns1k{20%{border-color:var(--_8ijx7f);background-color:var(--_17s7zfd)}75%{border-color:var(--_8ijx7f);background-color:var(--_17s7zfd)}to{border-color:var(--_8ijx7f);background-color:var(--_17s7zfd)}0%{background-color:transparent}}
|
|
@@ -17,10 +17,12 @@ export var RENDER_FLASHANIMATION_TESTID = 'flash-animation';
|
|
|
17
17
|
export var FlashAnimation = function FlashAnimation(props) {
|
|
18
18
|
return /*#__PURE__*/React.createElement("div", {
|
|
19
19
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
20
|
-
className: ax(["_1bsb1osq _4t3i1osq", props.flash && "
|
|
20
|
+
className: ax(["_1bsb1osq _4t3i1osq", props.flash && "", props.flash && "_j7hq1x5b _5sagolkx _1pgl1ytf", props.className]),
|
|
21
21
|
"data-testid": RENDER_FLASHANIMATION_TESTID,
|
|
22
22
|
style: {
|
|
23
|
-
"--
|
|
23
|
+
"--_17s7zfd": ix("var(--ds-background-selected-pressed, ".concat(B75, ")")),
|
|
24
|
+
"--_8ijx7f": ix("var(--ds-border-selected, ".concat(B300, ")")),
|
|
25
|
+
"--_gwerdd": ix("".concat(flashTime, "ms"))
|
|
24
26
|
}
|
|
25
27
|
}, props.children);
|
|
26
28
|
};
|
|
@@ -68,7 +68,9 @@ export var ReactionPicker = /*#__PURE__*/React.memo(function (props) {
|
|
|
68
68
|
reactionPickerTriggerIcon = props.reactionPickerTriggerIcon,
|
|
69
69
|
reactionPickerTriggerText = props.reactionPickerTriggerText,
|
|
70
70
|
reactionPickerPlacement = props.reactionPickerPlacement,
|
|
71
|
-
reactionsPickerPreventOverflowOptions = props.reactionsPickerPreventOverflowOptions
|
|
71
|
+
reactionsPickerPreventOverflowOptions = props.reactionsPickerPreventOverflowOptions,
|
|
72
|
+
_props$isListItem = props.isListItem,
|
|
73
|
+
isListItem = _props$isListItem === void 0 ? false : _props$isListItem;
|
|
72
74
|
var _useState = useState(null),
|
|
73
75
|
_useState2 = _slicedToArray(_useState, 2),
|
|
74
76
|
triggerRef = _useState2[0],
|
|
@@ -240,7 +242,8 @@ export var ReactionPicker = /*#__PURE__*/React.memo(function (props) {
|
|
|
240
242
|
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
|
|
241
243
|
showRoundTrigger: showRoundTrigger,
|
|
242
244
|
reactionPickerTriggerIcon: reactionPickerTriggerIcon,
|
|
243
|
-
reactionPickerTriggerText: reactionPickerTriggerText
|
|
245
|
+
reactionPickerTriggerText: reactionPickerTriggerText,
|
|
246
|
+
isListItem: isListItem
|
|
244
247
|
})
|
|
245
248
|
);
|
|
246
249
|
}), settings.isOpen && /*#__PURE__*/React.createElement(PopperWrapper, {
|
|
@@ -132,7 +132,9 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
132
132
|
useButtonAlignmentStyling = _ref$useButtonAlignme === void 0 ? false : _ref$useButtonAlignme,
|
|
133
133
|
reactionPickerTriggerText = _ref.reactionPickerTriggerText,
|
|
134
134
|
_ref$hoverableSummary = _ref.hoverableSummaryView,
|
|
135
|
-
hoverableSummaryView = _ref$hoverableSummary === void 0 ? false : _ref$hoverableSummary
|
|
135
|
+
hoverableSummaryView = _ref$hoverableSummary === void 0 ? false : _ref$hoverableSummary,
|
|
136
|
+
_ref$isListItem = _ref.isListItem,
|
|
137
|
+
isListItem = _ref$isListItem === void 0 ? false : _ref$isListItem;
|
|
136
138
|
var _useState = useState(''),
|
|
137
139
|
_useState2 = _slicedToArray(_useState, 2),
|
|
138
140
|
selectedEmojiId = _useState2[0],
|
|
@@ -349,6 +351,7 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
349
351
|
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
|
|
350
352
|
reactionPickerTriggerIcon: reactionPickerTriggerIcon,
|
|
351
353
|
reactionPickerTriggerText: reactionPickerTriggerText,
|
|
354
|
+
isListItem: isListItem,
|
|
352
355
|
className: ax(["_1e0c1o8l _19pk1b66"])
|
|
353
356
|
}), /*#__PURE__*/React.createElement(ModalTransition, null, !!selectedEmojiId && /*#__PURE__*/React.createElement(UFOSegment, {
|
|
354
357
|
name: "reactions-dialog"
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
._y44vlcmg{animation:var(--_1m4wxxu)}._12l2u2gc{margin-inline-end:var(--ds-space-100,8px)}
|
|
1
|
+
._12l2u2gc{margin-inline-end:var(--ds-space-100,8px)}
|
|
3
2
|
._19bv1b66{padding-left:var(--ds-space-050,4px)}
|
|
4
3
|
._1e0c1o8l{display:inline-block}
|
|
4
|
+
._1o51q7pw{animation-fill-mode:forwards}
|
|
5
5
|
._1p3lnqa1{border-left-style:solid}
|
|
6
|
+
._1pgl1ytf{animation-timing-function:ease-in-out}
|
|
6
7
|
._4t3i1tcg{height:24px}
|
|
8
|
+
._5sag6ebc{animation-duration:.15s}
|
|
7
9
|
._5wramuej{border-left-color:var(--ds-border,#091e4224)}
|
|
8
10
|
._ahbq1b66{margin-inline-start:var(--ds-space-050,4px)}
|
|
9
11
|
._ca0q1b66{padding-top:var(--ds-space-050,4px)}
|
|
12
|
+
._j7hqordv{animation-name:k12q5x3s}
|
|
10
13
|
._n3td1b66{padding-bottom:var(--ds-space-050,4px)}
|
|
11
14
|
._t6vde4h9{border-left-width:var(--ds-border-width,1px)}
|
|
12
15
|
._tzy4idpf{opacity:0}
|
|
13
|
-
._u5f31b66{padding-right:var(--ds-space-050,4px)}
|
|
16
|
+
._u5f31b66{padding-right:var(--ds-space-050,4px)}
|
|
17
|
+
@keyframes k12q5x3s{0%{opacity:1;transform:scale(.5)}75%{transform:scale(1.25)}to{opacity:1;transform:scale(1)}}
|
|
@@ -24,10 +24,7 @@ var Reveal = function Reveal(_ref) {
|
|
|
24
24
|
testId = _ref.testId;
|
|
25
25
|
return /*#__PURE__*/React.createElement("div", {
|
|
26
26
|
"data-testid": testId,
|
|
27
|
-
className: ax(["
|
|
28
|
-
style: {
|
|
29
|
-
"--_1m4wxxu": ix("".concat(revealAnimation, " 150ms ease-in-out forwards"))
|
|
30
|
-
}
|
|
27
|
+
className: ax(["_j7hqordv _5sag6ebc _1pgl1ytf _1o51q7pw _tzy4idpf"])
|
|
31
28
|
}, children);
|
|
32
29
|
};
|
|
33
30
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
._11c8dcr7{font:var(--ds-font-body-UNSAFE_small,normal 400 9pt/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
2
2
|
._2rko14q2{border-radius:var(--ds-border-radius-circle,2002pc)}
|
|
3
3
|
._2rkoglpi{border-radius:var(--ds-border-radius,4px)}
|
|
4
|
+
._qtt8glyw{list-style:none}
|
|
4
5
|
._189ee4h9{border-width:var(--ds-border-width,1px)}
|
|
5
6
|
._1dqoglyw{border-style:none}
|
|
6
7
|
._1dqonqa1{border-style:solid}
|
|
@@ -29,6 +29,7 @@ var styles = {
|
|
|
29
29
|
export var RENDER_TOOLTIP_TRIGGER_TESTID = 'render-tooltip-trigger';
|
|
30
30
|
export var RENDER_TRIGGER_BUTTON_TESTID = 'render-trigger-button';
|
|
31
31
|
export var RENDER_TRIGGER_CONTAINER_TESTID = 'render-trigger-container';
|
|
32
|
+
export var RENDER_LIST_ITEM_WRAPPER_TESTID = 'render-list-item-wrapper';
|
|
32
33
|
var i18n = defineMessages({
|
|
33
34
|
addReaction: {
|
|
34
35
|
id: 'reaction-picker-trigger.add.reaction.message',
|
|
@@ -39,6 +40,7 @@ var i18n = defineMessages({
|
|
|
39
40
|
var addReactionStyles = {
|
|
40
41
|
addReactionMessage: "_11c8dcr7 _syaz1gjq _18u01b66"
|
|
41
42
|
};
|
|
43
|
+
var noMarkerListStyle = null;
|
|
42
44
|
|
|
43
45
|
/**
|
|
44
46
|
* Render an emoji button to open the reactions select picker
|
|
@@ -65,41 +67,49 @@ export var Trigger = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
65
67
|
_props$reactionPicker = props.reactionPickerTriggerText,
|
|
66
68
|
reactionPickerTriggerText = _props$reactionPicker === void 0 ? formatMessage(i18n.addReaction) : _props$reactionPicker,
|
|
67
69
|
_props$fullWidthSumma = props.fullWidthSummaryViewReactionPickerTrigger,
|
|
68
|
-
fullWidthSummaryViewReactionPickerTrigger = _props$fullWidthSumma === void 0 ? false : _props$fullWidthSumma
|
|
70
|
+
fullWidthSummaryViewReactionPickerTrigger = _props$fullWidthSumma === void 0 ? false : _props$fullWidthSumma,
|
|
71
|
+
_props$isListItem = props.isListItem,
|
|
72
|
+
isListItem = _props$isListItem === void 0 ? false : _props$isListItem;
|
|
69
73
|
var handleMouseDown = function handleMouseDown(e, analyticsEvent) {
|
|
70
74
|
if (onClick && !disabled) {
|
|
71
75
|
onClick(e, analyticsEvent);
|
|
72
76
|
}
|
|
73
77
|
};
|
|
78
|
+
var renderPressableButton = function renderPressableButton() {
|
|
79
|
+
return /*#__PURE__*/React.createElement(Pressable, _extends({
|
|
80
|
+
testId: RENDER_TRIGGER_BUTTON_TESTID,
|
|
81
|
+
xcss: cx(styles.trigger, fullWidthSummaryViewReactionPickerTrigger && styles.fullWidth, subtleReactionsSummaryAndPicker && styles.subtleTrigger, showAddReactionText && styles.expandedTrigger, disabled ? styles.disabledTrigger : showOpaqueBackground ? styles.opaqueEnabledTrigger : styles.transparentEnabledTrigger, miniMode && styles.miniMode,
|
|
82
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
83
|
+
fg('platform-component-visual-refresh') && styles.triggerStylesRefresh, showRoundTrigger && styles.roundTrigger),
|
|
84
|
+
style: {
|
|
85
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/design-system/use-tokens-typography
|
|
86
|
+
lineHeight: '16px'
|
|
87
|
+
},
|
|
88
|
+
onClick: handleMouseDown,
|
|
89
|
+
isDisabled: disabled,
|
|
90
|
+
ref: ref,
|
|
91
|
+
"data-subtle": subtleReactionsSummaryAndPicker,
|
|
92
|
+
"data-mini-mode": miniMode
|
|
93
|
+
}, ariaAttributes), !!reactionPickerTriggerIcon ? reactionPickerTriggerIcon :
|
|
94
|
+
/*#__PURE__*/
|
|
95
|
+
// TODO: https://product-fabric.atlassian.net/browse/DSP-21007
|
|
96
|
+
React.createElement(EmojiAddIcon, {
|
|
97
|
+
testId: "emoji-add-icon",
|
|
98
|
+
color: disabled ? "var(--ds-icon-disabled, #091E424F)" : "var(--ds-icon, #44546F)",
|
|
99
|
+
LEGACY_size: "small",
|
|
100
|
+
label: "Add reaction"
|
|
101
|
+
}), showAddReactionText && /*#__PURE__*/React.createElement(Box, {
|
|
102
|
+
xcss: cx(addReactionStyles.addReactionMessage)
|
|
103
|
+
}, reactionPickerTriggerText));
|
|
104
|
+
};
|
|
74
105
|
return /*#__PURE__*/React.createElement(Box, {
|
|
75
106
|
xcss: cx(fullWidthSummaryViewReactionPickerTrigger && styles.fullWidthSummaryViewReactionPickerTrigger),
|
|
76
107
|
testId: RENDER_TRIGGER_CONTAINER_TESTID
|
|
77
108
|
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
78
109
|
testId: RENDER_TOOLTIP_TRIGGER_TESTID,
|
|
79
110
|
content: tooltipContent
|
|
80
|
-
}, /*#__PURE__*/React.createElement(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
fg('platform-component-visual-refresh') && styles.triggerStylesRefresh, showRoundTrigger && styles.roundTrigger),
|
|
85
|
-
style: {
|
|
86
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/design-system/use-tokens-typography
|
|
87
|
-
lineHeight: '16px'
|
|
88
|
-
},
|
|
89
|
-
onClick: handleMouseDown,
|
|
90
|
-
isDisabled: disabled,
|
|
91
|
-
ref: ref,
|
|
92
|
-
"data-subtle": subtleReactionsSummaryAndPicker,
|
|
93
|
-
"data-mini-mode": miniMode
|
|
94
|
-
}, ariaAttributes), !!reactionPickerTriggerIcon ? reactionPickerTriggerIcon :
|
|
95
|
-
/*#__PURE__*/
|
|
96
|
-
// TODO: https://product-fabric.atlassian.net/browse/DSP-21007
|
|
97
|
-
React.createElement(EmojiAddIcon, {
|
|
98
|
-
testId: "emoji-add-icon",
|
|
99
|
-
color: disabled ? "var(--ds-icon-disabled, #091E424F)" : "var(--ds-icon, #44546F)",
|
|
100
|
-
LEGACY_size: "small",
|
|
101
|
-
label: "Add reaction"
|
|
102
|
-
}), showAddReactionText && /*#__PURE__*/React.createElement(Box, {
|
|
103
|
-
xcss: cx(addReactionStyles.addReactionMessage)
|
|
104
|
-
}, reactionPickerTriggerText))));
|
|
111
|
+
}, isListItem ? /*#__PURE__*/React.createElement("li", {
|
|
112
|
+
"data-testid": RENDER_LIST_ITEM_WRAPPER_TESTID,
|
|
113
|
+
className: ax(["_qtt8glyw"])
|
|
114
|
+
}, renderPressableButton()) : renderPressableButton()));
|
|
105
115
|
});
|
|
@@ -88,6 +88,10 @@ export interface ReactionPickerProps extends Pick<SelectorProps, 'pickerQuickRea
|
|
|
88
88
|
* Optional prop for controlling text of the trigger button
|
|
89
89
|
*/
|
|
90
90
|
reactionPickerTriggerText?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Optional prop to say if the reactions component is in a list
|
|
93
|
+
*/
|
|
94
|
+
isListItem?: boolean;
|
|
91
95
|
}
|
|
92
96
|
/**
|
|
93
97
|
* Picker component for adding reactions
|
|
@@ -165,6 +165,10 @@ export interface ReactionsProps extends Pick<ReactionPickerProps, 'allowAllEmoji
|
|
|
165
165
|
* Optional prop for controlling if the summary view is hoverable
|
|
166
166
|
*/
|
|
167
167
|
hoverableSummaryView?: boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Optional prop to say if the reactions component is in a list
|
|
170
|
+
*/
|
|
171
|
+
isListItem?: boolean;
|
|
168
172
|
}
|
|
169
173
|
export interface OpenReactionsDialogOptions {
|
|
170
174
|
emojiId?: string;
|
|
@@ -177,4 +181,4 @@ export declare function getTooltip(status: ReactionStatus, errorMessage?: string
|
|
|
177
181
|
/**
|
|
178
182
|
* Renders list of reactions
|
|
179
183
|
*/
|
|
180
|
-
export declare const Reactions: React.MemoExoticComponent<({ flash, particleEffectByEmoji, status, errorMessage, loadReaction, quickReactionEmojis, pickerQuickReactionEmojiIds, getReactionDetails, onSelection, reactions, emojiProvider, allowAllEmojis, onReactionClick, allowUserDialog, onDialogOpenCallback, onDialogCloseCallback, onDialogSelectReactionCallback, onDialogPageChangeCallback, emojiPickerSize, miniMode, summaryViewEnabled, summaryViewThreshold, summaryViewPlacement, showOpaqueBackground, subtleReactionsSummaryAndPicker, showAddReactionText, hideDefaultReactions, ProfileCardWrapper, onlyRenderPicker, isViewOnly, noWrap, noRelativeContainer, showSubtleDefaultReactions, reactionPickerTriggerTooltipContent, reactionPickerTriggerIcon, allowSelectFromSummaryView, useButtonAlignmentStyling, reactionPickerTriggerText, hoverableSummaryView, }: ReactionsProps) => JSX.Element>;
|
|
184
|
+
export declare const Reactions: React.MemoExoticComponent<({ flash, particleEffectByEmoji, status, errorMessage, loadReaction, quickReactionEmojis, pickerQuickReactionEmojiIds, getReactionDetails, onSelection, reactions, emojiProvider, allowAllEmojis, onReactionClick, allowUserDialog, onDialogOpenCallback, onDialogCloseCallback, onDialogSelectReactionCallback, onDialogPageChangeCallback, emojiPickerSize, miniMode, summaryViewEnabled, summaryViewThreshold, summaryViewPlacement, showOpaqueBackground, subtleReactionsSummaryAndPicker, showAddReactionText, hideDefaultReactions, ProfileCardWrapper, onlyRenderPicker, isViewOnly, noWrap, noRelativeContainer, showSubtleDefaultReactions, reactionPickerTriggerTooltipContent, reactionPickerTriggerIcon, allowSelectFromSummaryView, useButtonAlignmentStyling, reactionPickerTriggerText, hoverableSummaryView, isListItem, }: ReactionsProps) => JSX.Element>;
|
|
@@ -11,6 +11,7 @@ import React from 'react';
|
|
|
11
11
|
export declare const RENDER_TOOLTIP_TRIGGER_TESTID = "render-tooltip-trigger";
|
|
12
12
|
export declare const RENDER_TRIGGER_BUTTON_TESTID = "render-trigger-button";
|
|
13
13
|
export declare const RENDER_TRIGGER_CONTAINER_TESTID = "render-trigger-container";
|
|
14
|
+
export declare const RENDER_LIST_ITEM_WRAPPER_TESTID = "render-list-item-wrapper";
|
|
14
15
|
export interface TriggerProps {
|
|
15
16
|
/**
|
|
16
17
|
* Optional Event handler when the button to open the picker is clicked
|
|
@@ -66,6 +67,10 @@ export interface TriggerProps {
|
|
|
66
67
|
* Optional prop for controlling if the summary view reaction picker trigger should be full width
|
|
67
68
|
*/
|
|
68
69
|
fullWidthSummaryViewReactionPickerTrigger?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Optional prop to say if the reactions component is in a list
|
|
72
|
+
*/
|
|
73
|
+
isListItem?: boolean;
|
|
69
74
|
}
|
|
70
75
|
/**
|
|
71
76
|
* Render an emoji button to open the reactions select picker
|
|
@@ -88,6 +88,10 @@ export interface ReactionPickerProps extends Pick<SelectorProps, 'pickerQuickRea
|
|
|
88
88
|
* Optional prop for controlling text of the trigger button
|
|
89
89
|
*/
|
|
90
90
|
reactionPickerTriggerText?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Optional prop to say if the reactions component is in a list
|
|
93
|
+
*/
|
|
94
|
+
isListItem?: boolean;
|
|
91
95
|
}
|
|
92
96
|
/**
|
|
93
97
|
* Picker component for adding reactions
|
|
@@ -165,6 +165,10 @@ export interface ReactionsProps extends Pick<ReactionPickerProps, 'allowAllEmoji
|
|
|
165
165
|
* Optional prop for controlling if the summary view is hoverable
|
|
166
166
|
*/
|
|
167
167
|
hoverableSummaryView?: boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Optional prop to say if the reactions component is in a list
|
|
170
|
+
*/
|
|
171
|
+
isListItem?: boolean;
|
|
168
172
|
}
|
|
169
173
|
export interface OpenReactionsDialogOptions {
|
|
170
174
|
emojiId?: string;
|
|
@@ -177,4 +181,4 @@ export declare function getTooltip(status: ReactionStatus, errorMessage?: string
|
|
|
177
181
|
/**
|
|
178
182
|
* Renders list of reactions
|
|
179
183
|
*/
|
|
180
|
-
export declare const Reactions: React.MemoExoticComponent<({ flash, particleEffectByEmoji, status, errorMessage, loadReaction, quickReactionEmojis, pickerQuickReactionEmojiIds, getReactionDetails, onSelection, reactions, emojiProvider, allowAllEmojis, onReactionClick, allowUserDialog, onDialogOpenCallback, onDialogCloseCallback, onDialogSelectReactionCallback, onDialogPageChangeCallback, emojiPickerSize, miniMode, summaryViewEnabled, summaryViewThreshold, summaryViewPlacement, showOpaqueBackground, subtleReactionsSummaryAndPicker, showAddReactionText, hideDefaultReactions, ProfileCardWrapper, onlyRenderPicker, isViewOnly, noWrap, noRelativeContainer, showSubtleDefaultReactions, reactionPickerTriggerTooltipContent, reactionPickerTriggerIcon, allowSelectFromSummaryView, useButtonAlignmentStyling, reactionPickerTriggerText, hoverableSummaryView, }: ReactionsProps) => JSX.Element>;
|
|
184
|
+
export declare const Reactions: React.MemoExoticComponent<({ flash, particleEffectByEmoji, status, errorMessage, loadReaction, quickReactionEmojis, pickerQuickReactionEmojiIds, getReactionDetails, onSelection, reactions, emojiProvider, allowAllEmojis, onReactionClick, allowUserDialog, onDialogOpenCallback, onDialogCloseCallback, onDialogSelectReactionCallback, onDialogPageChangeCallback, emojiPickerSize, miniMode, summaryViewEnabled, summaryViewThreshold, summaryViewPlacement, showOpaqueBackground, subtleReactionsSummaryAndPicker, showAddReactionText, hideDefaultReactions, ProfileCardWrapper, onlyRenderPicker, isViewOnly, noWrap, noRelativeContainer, showSubtleDefaultReactions, reactionPickerTriggerTooltipContent, reactionPickerTriggerIcon, allowSelectFromSummaryView, useButtonAlignmentStyling, reactionPickerTriggerText, hoverableSummaryView, isListItem, }: ReactionsProps) => JSX.Element>;
|
|
@@ -11,6 +11,7 @@ import React from 'react';
|
|
|
11
11
|
export declare const RENDER_TOOLTIP_TRIGGER_TESTID = "render-tooltip-trigger";
|
|
12
12
|
export declare const RENDER_TRIGGER_BUTTON_TESTID = "render-trigger-button";
|
|
13
13
|
export declare const RENDER_TRIGGER_CONTAINER_TESTID = "render-trigger-container";
|
|
14
|
+
export declare const RENDER_LIST_ITEM_WRAPPER_TESTID = "render-list-item-wrapper";
|
|
14
15
|
export interface TriggerProps {
|
|
15
16
|
/**
|
|
16
17
|
* Optional Event handler when the button to open the picker is clicked
|
|
@@ -66,6 +67,10 @@ export interface TriggerProps {
|
|
|
66
67
|
* Optional prop for controlling if the summary view reaction picker trigger should be full width
|
|
67
68
|
*/
|
|
68
69
|
fullWidthSummaryViewReactionPickerTrigger?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Optional prop to say if the reactions component is in a list
|
|
72
|
+
*/
|
|
73
|
+
isListItem?: boolean;
|
|
69
74
|
}
|
|
70
75
|
/**
|
|
71
76
|
* Render an emoji button to open the reactions select picker
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/reactions",
|
|
3
|
-
"version": "31.5.
|
|
3
|
+
"version": "31.5.2",
|
|
4
4
|
"description": "Reactions component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@atlaskit/popper": "^7.0.0",
|
|
49
49
|
"@atlaskit/popup": "^4.1.0",
|
|
50
50
|
"@atlaskit/primitives": "^14.4.0",
|
|
51
|
-
"@atlaskit/react-ufo": "^3.
|
|
51
|
+
"@atlaskit/react-ufo": "^3.9.0",
|
|
52
52
|
"@atlaskit/spinner": "^18.0.0",
|
|
53
53
|
"@atlaskit/tabs": "^18.0.0",
|
|
54
54
|
"@atlaskit/theme": "^18.0.0",
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@af/visual-regression": "
|
|
70
|
-
"@atlaskit/editor-test-helpers": "
|
|
71
|
-
"@atlaskit/elements-test-helpers": "
|
|
69
|
+
"@af/visual-regression": "workspace:^",
|
|
70
|
+
"@atlaskit/editor-test-helpers": "workspace:^",
|
|
71
|
+
"@atlaskit/elements-test-helpers": "workspace:^",
|
|
72
72
|
"@atlaskit/util-data-test": "^18.0.0",
|
|
73
73
|
"@atlassian/feature-flags-test-utils": "^0.3.0",
|
|
74
74
|
"@testing-library/dom": "^10.1.0",
|