@atlaskit/reactions 21.8.1 → 22.0.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 +32 -0
- package/dist/cjs/MockReactionsClient.js +24 -16
- package/dist/cjs/analytics/analytics.js +9 -1
- package/dist/cjs/analytics/ufo.js +24 -2
- package/dist/cjs/components/Counter/Counter.js +16 -20
- package/dist/cjs/components/Reaction/Reaction.js +52 -18
- package/dist/cjs/components/Reaction/styles.js +8 -1
- package/dist/cjs/components/ReactionDialog/ReactionView.js +121 -0
- package/dist/cjs/components/ReactionDialog/ReactionsDialog.js +187 -0
- package/dist/cjs/components/ReactionDialog/ReactionsList.js +104 -0
- package/dist/cjs/components/ReactionDialog/index.js +13 -0
- package/dist/cjs/components/ReactionDialog/styles.js +202 -0
- package/dist/cjs/components/ReactionPicker/ReactionPicker.js +15 -20
- package/dist/cjs/components/ReactionTooltip/ReactionTooltip.js +26 -12
- package/dist/cjs/components/ReactionTooltip/styles.js +11 -2
- package/dist/cjs/components/Reactions/Reactions.js +166 -21
- package/dist/cjs/components/Reactions/styles.js +11 -6
- package/dist/cjs/components/Trigger/Trigger.js +1 -2
- package/dist/cjs/components/index.js +9 -1
- package/dist/cjs/containers/ConnectedReactionPicker/ConnectedReactionPicker.js +6 -2
- package/dist/cjs/containers/ConnectedReactionsView/ConnectedReactionsView.js +9 -4
- package/dist/cjs/shared/constants.js +62 -10
- package/dist/cjs/shared/i18n.js +40 -0
- package/dist/cjs/shared/utils.js +60 -2
- package/dist/cjs/types/reaction.js +13 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/MockReactionsClient.js +22 -14
- package/dist/es2019/analytics/analytics.js +3 -0
- package/dist/es2019/analytics/ufo.js +19 -0
- package/dist/es2019/components/Counter/Counter.js +16 -15
- package/dist/es2019/components/Reaction/Reaction.js +43 -18
- package/dist/es2019/components/Reaction/styles.js +9 -2
- package/dist/es2019/components/ReactionDialog/ReactionView.js +69 -0
- package/dist/es2019/components/ReactionDialog/ReactionsDialog.js +145 -0
- package/dist/es2019/components/ReactionDialog/ReactionsList.js +69 -0
- package/dist/es2019/components/ReactionDialog/index.js +1 -0
- package/dist/es2019/components/ReactionDialog/styles.js +169 -0
- package/dist/es2019/components/ReactionPicker/ReactionPicker.js +12 -20
- package/dist/es2019/components/ReactionTooltip/ReactionTooltip.js +22 -12
- package/dist/es2019/components/ReactionTooltip/styles.js +9 -1
- package/dist/es2019/components/Reactions/Reactions.js +146 -22
- package/dist/es2019/components/Reactions/styles.js +9 -5
- package/dist/es2019/components/Trigger/Trigger.js +1 -2
- package/dist/es2019/components/index.js +2 -1
- package/dist/es2019/containers/ConnectedReactionPicker/ConnectedReactionPicker.js +8 -2
- package/dist/es2019/containers/ConnectedReactionsView/ConnectedReactionsView.js +5 -4
- package/dist/es2019/shared/constants.js +55 -6
- package/dist/es2019/shared/i18n.js +43 -0
- package/dist/es2019/shared/utils.js +51 -0
- package/dist/es2019/types/reaction.js +13 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/MockReactionsClient.js +24 -13
- package/dist/esm/analytics/analytics.js +5 -0
- package/dist/esm/analytics/ufo.js +19 -0
- package/dist/esm/components/Counter/Counter.js +17 -17
- package/dist/esm/components/Reaction/Reaction.js +51 -19
- package/dist/esm/components/Reaction/styles.js +9 -2
- package/dist/esm/components/ReactionDialog/ReactionView.js +98 -0
- package/dist/esm/components/ReactionDialog/ReactionsDialog.js +161 -0
- package/dist/esm/components/ReactionDialog/ReactionsList.js +79 -0
- package/dist/esm/components/ReactionDialog/index.js +1 -0
- package/dist/esm/components/ReactionDialog/styles.js +177 -0
- package/dist/esm/components/ReactionPicker/ReactionPicker.js +15 -20
- package/dist/esm/components/ReactionTooltip/ReactionTooltip.js +26 -12
- package/dist/esm/components/ReactionTooltip/styles.js +9 -1
- package/dist/esm/components/Reactions/Reactions.js +158 -22
- package/dist/esm/components/Reactions/styles.js +9 -5
- package/dist/esm/components/Trigger/Trigger.js +1 -2
- package/dist/esm/components/index.js +2 -1
- package/dist/esm/containers/ConnectedReactionPicker/ConnectedReactionPicker.js +6 -2
- package/dist/esm/containers/ConnectedReactionsView/ConnectedReactionsView.js +8 -4
- package/dist/esm/shared/constants.js +57 -6
- package/dist/esm/shared/i18n.js +40 -0
- package/dist/esm/shared/utils.js +53 -0
- package/dist/esm/types/reaction.js +13 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/MockReactionsClient.d.ts +7 -3
- package/dist/types/analytics/analytics.d.ts +10 -0
- package/dist/types/analytics/ufo.d.ts +18 -2
- package/dist/types/components/Counter/Counter.d.ts +0 -1
- package/dist/types/components/Reaction/Reaction.d.ts +11 -1
- package/dist/types/components/ReactionDialog/ReactionView.d.ts +19 -0
- package/dist/types/components/ReactionDialog/ReactionsDialog.d.ts +32 -0
- package/dist/types/components/ReactionDialog/ReactionsList.d.ts +23 -0
- package/dist/types/components/ReactionDialog/index.d.ts +1 -0
- package/dist/types/components/ReactionDialog/styles.d.ts +11 -0
- package/dist/types/components/ReactionPicker/ReactionPicker.d.ts +5 -0
- package/dist/types/components/ReactionTooltip/ReactionTooltip.d.ts +12 -0
- package/dist/types/components/ReactionTooltip/styles.d.ts +1 -0
- package/dist/types/components/Reactions/Reactions.d.ts +45 -6
- package/dist/types/components/Reactions/styles.d.ts +1 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/containers/ConnectedReactionPicker/ConnectedReactionPicker.d.ts +0 -4
- package/dist/types/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts +2 -11
- package/dist/types/index.d.ts +1 -1
- package/dist/types/shared/constants.d.ts +11 -5
- package/dist/types/shared/i18n.d.ts +40 -0
- package/dist/types/shared/utils.d.ts +7 -0
- package/dist/types/types/User.d.ts +10 -0
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/types/reaction.d.ts +15 -2
- package/docs/0-intro.tsx +3 -0
- package/docs/5-graphql-support.tsx +153 -0
- package/package.json +9 -7
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.ReactionsDialog = exports.RENDER_MODAL_TESTID = void 0;
|
|
11
|
+
|
|
12
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
+
|
|
14
|
+
var _react = require("react");
|
|
15
|
+
|
|
16
|
+
var _reactIntlNext = require("react-intl-next");
|
|
17
|
+
|
|
18
|
+
var _react2 = require("@emotion/react");
|
|
19
|
+
|
|
20
|
+
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
21
|
+
|
|
22
|
+
var _modalDialog = _interopRequireWildcard(require("@atlaskit/modal-dialog"));
|
|
23
|
+
|
|
24
|
+
var _shared = require("../../shared");
|
|
25
|
+
|
|
26
|
+
var _ReactionsList = require("./ReactionsList");
|
|
27
|
+
|
|
28
|
+
var _styles = require("./styles");
|
|
29
|
+
|
|
30
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
|
+
|
|
32
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
33
|
+
|
|
34
|
+
/** @jsx jsx */
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Test id for the Reactions modal dialog
|
|
38
|
+
*/
|
|
39
|
+
var RENDER_MODAL_TESTID = 'render-reactions-modal';
|
|
40
|
+
exports.RENDER_MODAL_TESTID = RENDER_MODAL_TESTID;
|
|
41
|
+
|
|
42
|
+
var getDimensions = function getDimensions(container) {
|
|
43
|
+
return {
|
|
44
|
+
clientWidth: container === null || container === void 0 ? void 0 : container.clientWidth,
|
|
45
|
+
scrollWidth: container === null || container === void 0 ? void 0 : container.scrollWidth,
|
|
46
|
+
scrollLeft: container === null || container === void 0 ? void 0 : container.scrollLeft
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
var ReactionsDialog = function ReactionsDialog(_ref) {
|
|
51
|
+
var _ref$reactions = _ref.reactions,
|
|
52
|
+
reactions = _ref$reactions === void 0 ? [] : _ref$reactions,
|
|
53
|
+
_ref$handleCloseReact = _ref.handleCloseReactionsDialog,
|
|
54
|
+
handleCloseReactionsDialog = _ref$handleCloseReact === void 0 ? function () {} : _ref$handleCloseReact,
|
|
55
|
+
emojiProvider = _ref.emojiProvider,
|
|
56
|
+
selectedEmojiId = _ref.selectedEmojiId,
|
|
57
|
+
_ref$handleSelectReac = _ref.handleSelectReaction,
|
|
58
|
+
handleSelectReaction = _ref$handleSelectReac === void 0 ? function () {} : _ref$handleSelectReac;
|
|
59
|
+
|
|
60
|
+
var _useState = (0, _react.useState)(),
|
|
61
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
62
|
+
elementToScroll = _useState2[0],
|
|
63
|
+
setElementToScroll = _useState2[1];
|
|
64
|
+
|
|
65
|
+
var _useState3 = (0, _react.useState)(null),
|
|
66
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
67
|
+
reactionsContainerRef = _useState4[0],
|
|
68
|
+
setReactionsContainerRef = _useState4[1];
|
|
69
|
+
|
|
70
|
+
var reactionElementsRef = (0, _react.useRef)();
|
|
71
|
+
var observerRef = (0, _react.useRef)();
|
|
72
|
+
var intl = (0, _reactIntlNext.useIntl)();
|
|
73
|
+
var isSelectedEmojiViewed = (0, _react.useRef)(false);
|
|
74
|
+
var totalReactionsCount = (0, _react.useMemo)(function () {
|
|
75
|
+
return reactions.reduce(function (accum, current) {
|
|
76
|
+
return accum += current === null || current === void 0 ? void 0 : current.count;
|
|
77
|
+
}, 0);
|
|
78
|
+
}, [reactions]);
|
|
79
|
+
var sortedReactions = (0, _react.useMemo)(function () {
|
|
80
|
+
return reactions.sort(function (a, b) {
|
|
81
|
+
return (b === null || b === void 0 ? void 0 : b.count) - (a === null || a === void 0 ? void 0 : a.count);
|
|
82
|
+
});
|
|
83
|
+
}, [reactions]);
|
|
84
|
+
/* set Reactions Border Width , 9 Number of reactions to display*/
|
|
85
|
+
|
|
86
|
+
var reactionsBorderWidth = (0, _react.useMemo)(function () {
|
|
87
|
+
return Math.ceil(reactions.length / _shared.constants.NUMBER_OF_REACTIONS_TO_DISPLAY) * 100;
|
|
88
|
+
}, [reactions]);
|
|
89
|
+
/* Callback from IntersectionObserver to set/unset classNames based on visibility to toggle styles*/
|
|
90
|
+
|
|
91
|
+
var handleNavigation = (0, _react.useCallback)(function (entries) {
|
|
92
|
+
entries.forEach(function (entry, index) {
|
|
93
|
+
var _dataset;
|
|
94
|
+
|
|
95
|
+
var element = entry.target;
|
|
96
|
+
var emojiElement = element === null || element === void 0 ? void 0 : element.querySelector('[data-emoji-id]');
|
|
97
|
+
var emojiId = emojiElement === null || emojiElement === void 0 ? void 0 : (_dataset = emojiElement.dataset) === null || _dataset === void 0 ? void 0 : _dataset.emojiId;
|
|
98
|
+
|
|
99
|
+
if (entry.intersectionRatio < 1) {
|
|
100
|
+
element.classList.add('disabled');
|
|
101
|
+
/*Check if selectedEmoji (passed as props based on what user selects) is out of viewport */
|
|
102
|
+
|
|
103
|
+
if (emojiId === selectedEmojiId && !isSelectedEmojiViewed.current) {
|
|
104
|
+
setElementToScroll(emojiElement !== null && emojiElement !== void 0 ? emojiElement : undefined);
|
|
105
|
+
}
|
|
106
|
+
} else {
|
|
107
|
+
if (emojiId === selectedEmojiId && !isSelectedEmojiViewed.current) {
|
|
108
|
+
isSelectedEmojiViewed.current = true;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
element.classList.remove('disabled');
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
}, [selectedEmojiId]);
|
|
115
|
+
(0, _react.useEffect)(function () {
|
|
116
|
+
if (elementToScroll && !isSelectedEmojiViewed.current && reactionsContainerRef) {
|
|
117
|
+
isSelectedEmojiViewed.current = true;
|
|
118
|
+
var parentElement = elementToScroll.closest('.reaction-elements');
|
|
119
|
+
var reactionsList = document.querySelector('#reactions-dialog-tabs-list');
|
|
120
|
+
|
|
121
|
+
var _getDimensions = getDimensions(reactionsList),
|
|
122
|
+
clientWidth = _getDimensions.clientWidth;
|
|
123
|
+
|
|
124
|
+
var offsetLeft = parentElement === null || parentElement === void 0 ? void 0 : parentElement.offsetLeft;
|
|
125
|
+
/* which means emoji is not in viewport so scroll to it*/
|
|
126
|
+
|
|
127
|
+
if (reactionsList && offsetLeft > clientWidth) {
|
|
128
|
+
var scrollBy = Math.trunc(offsetLeft / clientWidth) * clientWidth;
|
|
129
|
+
reactionsList.scrollLeft += scrollBy;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}, [elementToScroll, reactionsContainerRef]);
|
|
133
|
+
/* Set up InterSectionObserver to observer reaction elements on navigating*/
|
|
134
|
+
|
|
135
|
+
(0, _react.useEffect)(function () {
|
|
136
|
+
if (reactionsContainerRef) {
|
|
137
|
+
var options = {
|
|
138
|
+
root: reactionsContainerRef,
|
|
139
|
+
rootMargin: '0px',
|
|
140
|
+
threshold: 1.0
|
|
141
|
+
};
|
|
142
|
+
observerRef.current = new IntersectionObserver(handleNavigation, options);
|
|
143
|
+
reactionElementsRef.current = reactionsContainerRef.querySelectorAll('.reaction-elements');
|
|
144
|
+
reactionElementsRef.current && reactionElementsRef.current.length > 0 && reactionElementsRef.current.forEach(function (child) {
|
|
145
|
+
var _observerRef$current;
|
|
146
|
+
|
|
147
|
+
observerRef === null || observerRef === void 0 ? void 0 : (_observerRef$current = observerRef.current) === null || _observerRef$current === void 0 ? void 0 : _observerRef$current.observe(child);
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
return function () {
|
|
152
|
+
if (observerRef.current) {
|
|
153
|
+
observerRef.current.disconnect();
|
|
154
|
+
observerRef.current = undefined;
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
}, [reactionsContainerRef, reactions, handleNavigation, selectedEmojiId]);
|
|
158
|
+
var setRef = (0, _react.useCallback)(function (node) {
|
|
159
|
+
if (!reactionsContainerRef) {
|
|
160
|
+
setReactionsContainerRef(node);
|
|
161
|
+
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
162
|
+
|
|
163
|
+
}, []);
|
|
164
|
+
return (0, _react2.jsx)(_modalDialog.default, {
|
|
165
|
+
onClose: handleCloseReactionsDialog,
|
|
166
|
+
height: 600,
|
|
167
|
+
testId: RENDER_MODAL_TESTID
|
|
168
|
+
}, (0, _react2.jsx)(_modalDialog.ModalHeader, null, (0, _react2.jsx)("div", {
|
|
169
|
+
css: _styles.titleStyle
|
|
170
|
+
}, (0, _react2.jsx)(_modalDialog.ModalTitle, null, intl.formatMessage(_shared.i18n.messages.reactionsCount, {
|
|
171
|
+
count: totalReactionsCount
|
|
172
|
+
})))), (0, _react2.jsx)(_modalDialog.ModalBody, null, (0, _react2.jsx)("div", {
|
|
173
|
+
css: (0, _styles.containerStyle)(reactionsBorderWidth),
|
|
174
|
+
ref: setRef
|
|
175
|
+
}, (0, _react2.jsx)(_ReactionsList.ReactionsList, {
|
|
176
|
+
initialEmojiId: selectedEmojiId,
|
|
177
|
+
reactions: sortedReactions,
|
|
178
|
+
emojiProvider: emojiProvider,
|
|
179
|
+
onReactionChanged: handleSelectReaction
|
|
180
|
+
}))), (0, _react2.jsx)(_modalDialog.ModalFooter, null, (0, _react2.jsx)(_standardButton.default, {
|
|
181
|
+
appearance: "primary",
|
|
182
|
+
onClick: handleCloseReactionsDialog,
|
|
183
|
+
autoFocus: true
|
|
184
|
+
}, intl.formatMessage(_shared.i18n.messages.closeReactionsDialog))));
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
exports.ReactionsDialog = ReactionsDialog;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.ReactionsList = void 0;
|
|
11
|
+
|
|
12
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
+
|
|
14
|
+
var _react = require("react");
|
|
15
|
+
|
|
16
|
+
var _react2 = require("@emotion/react");
|
|
17
|
+
|
|
18
|
+
var _element = require("@atlaskit/emoji/element");
|
|
19
|
+
|
|
20
|
+
var _tabs = _interopRequireWildcard(require("@atlaskit/tabs"));
|
|
21
|
+
|
|
22
|
+
var _tokens = require("@atlaskit/tokens");
|
|
23
|
+
|
|
24
|
+
var _Counter = require("../Counter");
|
|
25
|
+
|
|
26
|
+
var _styles = require("./styles");
|
|
27
|
+
|
|
28
|
+
var _ReactionView = require("./ReactionView");
|
|
29
|
+
|
|
30
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
|
+
|
|
32
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
33
|
+
|
|
34
|
+
/** @jsx jsx */
|
|
35
|
+
var ReactionsList = function ReactionsList(_ref) {
|
|
36
|
+
var reactions = _ref.reactions,
|
|
37
|
+
initialEmojiId = _ref.initialEmojiId,
|
|
38
|
+
emojiProvider = _ref.emojiProvider,
|
|
39
|
+
onReactionChanged = _ref.onReactionChanged;
|
|
40
|
+
|
|
41
|
+
var _useState = (0, _react.useState)(function () {
|
|
42
|
+
// Calculate this only on initialize the List of Tabs and each Reactions View collection
|
|
43
|
+
return {
|
|
44
|
+
index: reactions.findIndex(function (reaction) {
|
|
45
|
+
return reaction.emojiId === initialEmojiId;
|
|
46
|
+
}),
|
|
47
|
+
id: initialEmojiId
|
|
48
|
+
};
|
|
49
|
+
}),
|
|
50
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
51
|
+
selectedEmoji = _useState2[0],
|
|
52
|
+
setSelectedEmoji = _useState2[1];
|
|
53
|
+
|
|
54
|
+
var theme = (0, _tokens.useThemeObserver)();
|
|
55
|
+
var onTabChange = (0, _react.useCallback)(function (index, analyticsEvent) {
|
|
56
|
+
if (index === selectedEmoji.index) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
var emojiId = reactions[index].emojiId;
|
|
61
|
+
setSelectedEmoji({
|
|
62
|
+
index: index,
|
|
63
|
+
id: emojiId
|
|
64
|
+
});
|
|
65
|
+
onReactionChanged(emojiId, analyticsEvent);
|
|
66
|
+
}, [selectedEmoji.index, reactions, onReactionChanged]);
|
|
67
|
+
return (0, _react2.jsx)(_tabs.default, {
|
|
68
|
+
id: "reactions-dialog-tabs",
|
|
69
|
+
onChange: onTabChange,
|
|
70
|
+
selected: selectedEmoji.index
|
|
71
|
+
}, (0, _react2.jsx)("div", {
|
|
72
|
+
css: _styles.customTabListStyles,
|
|
73
|
+
id: "reactions-dialog-tabs-list"
|
|
74
|
+
}, (0, _react2.jsx)(_tabs.TabList, null, reactions.map(function (reaction) {
|
|
75
|
+
var emojiId = {
|
|
76
|
+
id: reaction.emojiId,
|
|
77
|
+
shortName: ''
|
|
78
|
+
};
|
|
79
|
+
return (0, _react2.jsx)("div", {
|
|
80
|
+
css: (0, _styles.customTabWrapper)((emojiId === null || emojiId === void 0 ? void 0 : emojiId.id) === selectedEmoji.id, selectedEmoji.id, theme),
|
|
81
|
+
className: "reaction-elements",
|
|
82
|
+
key: reaction.emojiId,
|
|
83
|
+
"data-testid": emojiId === null || emojiId === void 0 ? void 0 : emojiId.id
|
|
84
|
+
}, (0, _react2.jsx)(_tabs.Tab, null, (0, _react2.jsx)(_element.ResourcedEmoji, {
|
|
85
|
+
emojiProvider: emojiProvider,
|
|
86
|
+
emojiId: emojiId,
|
|
87
|
+
fitToHeight: 16,
|
|
88
|
+
showTooltip: true
|
|
89
|
+
}), (0, _react2.jsx)("div", {
|
|
90
|
+
css: (0, _styles.counterStyle)((emojiId === null || emojiId === void 0 ? void 0 : emojiId.id) === selectedEmoji.id)
|
|
91
|
+
}, (0, _react2.jsx)(_Counter.Counter, {
|
|
92
|
+
value: reaction.count
|
|
93
|
+
}))));
|
|
94
|
+
}))), reactions.map(function (reaction) {
|
|
95
|
+
return (0, _react2.jsx)(_ReactionView.ReactionView, {
|
|
96
|
+
key: reaction.emojiId,
|
|
97
|
+
reaction: reaction,
|
|
98
|
+
selectedEmojiId: selectedEmoji.id,
|
|
99
|
+
emojiProvider: emojiProvider
|
|
100
|
+
});
|
|
101
|
+
}));
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
exports.ReactionsList = ReactionsList;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "ReactionsDialog", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _ReactionsDialog.ReactionsDialog;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
var _ReactionsDialog = require("./ReactionsDialog");
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.userStyle = exports.userListStyle = exports.titleStyle = exports.reactionViewStyle = exports.navigationContainerStyle = exports.customTabWrapper = exports.customTabListStyles = exports.counterStyle = exports.containerStyle = exports.centerSpinner = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
|
+
|
|
10
|
+
var _colors = require("@atlaskit/theme/colors");
|
|
11
|
+
|
|
12
|
+
var _tokens = require("@atlaskit/tokens");
|
|
13
|
+
|
|
14
|
+
var _shared = require("../../shared");
|
|
15
|
+
|
|
16
|
+
/** @jsx jsx */
|
|
17
|
+
var REACTIONS_CONTAINER_WIDTH = 48;
|
|
18
|
+
var REACTION_RIGHT_MARGIN = 8;
|
|
19
|
+
/* we want to display around 9 reactions and show 10th one as faded so removing 2px from REACTIONS_CONTAINER_WIDTH*/
|
|
20
|
+
|
|
21
|
+
var CONTAINER_WIDTH = _shared.constants.NUMBER_OF_REACTIONS_TO_DISPLAY * (REACTIONS_CONTAINER_WIDTH + REACTION_RIGHT_MARGIN) + REACTIONS_CONTAINER_WIDTH - 2;
|
|
22
|
+
var REACTION_CONTAINER_HEIGHT = 48;
|
|
23
|
+
/*Reactions Container. Using pseudo Element :after to set border since with onClick of Reaction to higlight the
|
|
24
|
+
border blue below the reaction. Setting Border Width based on number of reactions to make sure it shows up
|
|
25
|
+
in case the container overflows */
|
|
26
|
+
|
|
27
|
+
var containerStyle = function containerStyle(reactionsBorderWidth) {
|
|
28
|
+
return (0, _react.css)({
|
|
29
|
+
overflow: 'hidden',
|
|
30
|
+
maxWidth: "".concat(CONTAINER_WIDTH, "px"),
|
|
31
|
+
height: '100%',
|
|
32
|
+
display: 'flex',
|
|
33
|
+
justifyContent: 'start',
|
|
34
|
+
position: 'relative',
|
|
35
|
+
scrollBehavior: 'smooth',
|
|
36
|
+
'&:after': {
|
|
37
|
+
content: '""',
|
|
38
|
+
zIndex: 0,
|
|
39
|
+
display: 'block',
|
|
40
|
+
minWidth: "".concat(reactionsBorderWidth, "%"),
|
|
41
|
+
bottom: '0px',
|
|
42
|
+
position: 'absolute'
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
exports.containerStyle = containerStyle;
|
|
48
|
+
var titleStyle = (0, _react.css)({
|
|
49
|
+
'& > h1': {
|
|
50
|
+
fontSize: '24px!important',
|
|
51
|
+
color: "".concat((0, _tokens.token)('color.text', _colors.N800))
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
exports.titleStyle = titleStyle;
|
|
55
|
+
var containerEdgeAngle = {
|
|
56
|
+
rightEdge: 270,
|
|
57
|
+
leftEdge: 90
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
var counterStyle = function counterStyle(isSelected) {
|
|
61
|
+
return (0, _react.css)({
|
|
62
|
+
display: 'flex',
|
|
63
|
+
alignSelf: 'center',
|
|
64
|
+
lineHeight: '14px',
|
|
65
|
+
fontSize: '11px',
|
|
66
|
+
fontWeight: isSelected ? 700 : 400,
|
|
67
|
+
paddingRight: '0px',
|
|
68
|
+
marginTop: '5px',
|
|
69
|
+
'> div': {
|
|
70
|
+
width: '100%',
|
|
71
|
+
padding: '0px!important',
|
|
72
|
+
//Counter component has its own styles overriding them to match designs
|
|
73
|
+
color: isSelected ? "".concat((0, _tokens.token)('color.text', _colors.B400), "!important") : "2px solid ".concat((0, _tokens.token)('color.text', _colors.N500), "!important")
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
exports.counterStyle = counterStyle;
|
|
79
|
+
|
|
80
|
+
var fadedCss = function fadedCss(edge, theme) {
|
|
81
|
+
return (0, _react.css)({
|
|
82
|
+
content: '""',
|
|
83
|
+
position: 'absolute',
|
|
84
|
+
left: '0px',
|
|
85
|
+
top: '0px',
|
|
86
|
+
width: "".concat(REACTIONS_CONTAINER_WIDTH, "px"),
|
|
87
|
+
height: "".concat(REACTION_CONTAINER_HEIGHT, "px"),
|
|
88
|
+
zIndex: 0,
|
|
89
|
+
background: theme === 'dark' || theme === 'legacy-dark' ? "linear-gradient(".concat(containerEdgeAngle[edge], "deg, rgba(34, 39, 43, 0.95) 40.23%, rgba(34, 39, 43, 0.55) 58.33%, rgba(34, 39, 43, 0) 77.49%)") : "linear-gradient(".concat(containerEdgeAngle[edge], "deg, rgba(255, 255, 255, 0.95) 40.23%, rgba(255, 255, 255, 0.55) 58.33%, rgba(255, 255, 255, 0) 77.49%)")
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
var customTabWrapper = function customTabWrapper(isSelected, selectedEmojiId, theme) {
|
|
94
|
+
return (0, _react.css)({
|
|
95
|
+
flexShrink: 0,
|
|
96
|
+
display: 'flex',
|
|
97
|
+
flexDirection: 'column',
|
|
98
|
+
textAlign: 'center',
|
|
99
|
+
alignItems: 'center',
|
|
100
|
+
justifyContent: 'center',
|
|
101
|
+
minWidth: "".concat(REACTIONS_CONTAINER_WIDTH, "px"),
|
|
102
|
+
minHeight: "".concat(REACTION_CONTAINER_HEIGHT, "px"),
|
|
103
|
+
marginRight: "".concat(REACTION_RIGHT_MARGIN, "px"),
|
|
104
|
+
boxSizing: 'border-box',
|
|
105
|
+
position: 'relative',
|
|
106
|
+
'> div': {
|
|
107
|
+
minWidth: "".concat(REACTIONS_CONTAINER_WIDTH, "px"),
|
|
108
|
+
minHeight: "".concat(REACTION_CONTAINER_HEIGHT, "px"),
|
|
109
|
+
padding: '0px !important',
|
|
110
|
+
alignItems: 'center',
|
|
111
|
+
justifyContent: 'center'
|
|
112
|
+
},
|
|
113
|
+
'& > span': {
|
|
114
|
+
minHeight: '16px',
|
|
115
|
+
minWidth: '16px'
|
|
116
|
+
},
|
|
117
|
+
'&.disabled:after': fadedCss('rightEdge', theme),
|
|
118
|
+
'&.disabled + &.disabled:after': fadedCss('leftEdge', theme),
|
|
119
|
+
'&:after': isSelected ? {
|
|
120
|
+
content: '""',
|
|
121
|
+
borderBottom: "2px solid ".concat((0, _tokens.token)('color.text', _colors.B400)),
|
|
122
|
+
width: "".concat(REACTIONS_CONTAINER_WIDTH, "px"),
|
|
123
|
+
bottom: '0px',
|
|
124
|
+
display: 'block',
|
|
125
|
+
position: 'absolute',
|
|
126
|
+
zIndex: 2
|
|
127
|
+
} : {
|
|
128
|
+
content: '""',
|
|
129
|
+
borderBottom: "2px solid transparent",
|
|
130
|
+
width: "".concat(REACTIONS_CONTAINER_WIDTH, "px"),
|
|
131
|
+
bottom: '0px',
|
|
132
|
+
display: 'block',
|
|
133
|
+
position: 'absolute',
|
|
134
|
+
zIndex: 1
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
exports.customTabWrapper = customTabWrapper;
|
|
140
|
+
var navigationContainerStyle = (0, _react.css)({
|
|
141
|
+
'> button': {
|
|
142
|
+
cursor: 'pointer'
|
|
143
|
+
},
|
|
144
|
+
'button:last-child': {
|
|
145
|
+
marginLeft: '16px'
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
exports.navigationContainerStyle = navigationContainerStyle;
|
|
149
|
+
var reactionViewStyle = (0, _react.css)({
|
|
150
|
+
marginTop: '24px',
|
|
151
|
+
display: 'flex',
|
|
152
|
+
flexDirection: 'column',
|
|
153
|
+
p: {
|
|
154
|
+
margin: 0,
|
|
155
|
+
color: "".concat((0, _tokens.token)('color.text', _colors.N800)),
|
|
156
|
+
textTransform: 'capitalize',
|
|
157
|
+
fontWeight: 600,
|
|
158
|
+
fontSize: 16,
|
|
159
|
+
lineHeight: '20px',
|
|
160
|
+
'> span': {
|
|
161
|
+
marginRight: 8
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
exports.reactionViewStyle = reactionViewStyle;
|
|
166
|
+
var userListStyle = (0, _react.css)({
|
|
167
|
+
listStyle: 'none',
|
|
168
|
+
marginTop: 16,
|
|
169
|
+
padding: 0,
|
|
170
|
+
textAlign: 'left',
|
|
171
|
+
li: {
|
|
172
|
+
color: "".concat((0, _tokens.token)('color.text', _colors.N500)),
|
|
173
|
+
fontSize: 14
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
exports.userListStyle = userListStyle;
|
|
177
|
+
var userStyle = (0, _react.css)({
|
|
178
|
+
display: 'flex',
|
|
179
|
+
alignItems: 'center',
|
|
180
|
+
padding: '8px 0px 8px 0px',
|
|
181
|
+
'> span': {
|
|
182
|
+
marginLeft: 16
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
exports.userStyle = userStyle;
|
|
186
|
+
var customTabListStyles = (0, _react.css)({
|
|
187
|
+
overflow: 'auto',
|
|
188
|
+
scrollBehavior: 'smooth',
|
|
189
|
+
display: 'flex',
|
|
190
|
+
paddingBottom: 4,
|
|
191
|
+
'div[role=tablist]': {
|
|
192
|
+
flexGrow: 1
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
exports.customTabListStyles = customTabListStyles;
|
|
196
|
+
var centerSpinner = (0, _react.css)({
|
|
197
|
+
display: 'flex',
|
|
198
|
+
justifyContent: 'center',
|
|
199
|
+
alignItems: 'center',
|
|
200
|
+
height: '100%'
|
|
201
|
+
});
|
|
202
|
+
exports.centerSpinner = centerSpinner;
|
|
@@ -94,11 +94,15 @@ var ReactionPicker = /*#__PURE__*/_react.default.memo(function (props) {
|
|
|
94
94
|
allowAllEmojis = props.allowAllEmojis,
|
|
95
95
|
disabled = props.disabled,
|
|
96
96
|
pickerQuickReactionEmojiIds = props.pickerQuickReactionEmojiIds,
|
|
97
|
-
onShowMore = props.onShowMore,
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
_props$onShowMore = props.onShowMore,
|
|
98
|
+
onShowMore = _props$onShowMore === void 0 ? function () {} : _props$onShowMore,
|
|
99
|
+
_props$onOpen = props.onOpen,
|
|
100
|
+
onOpen = _props$onOpen === void 0 ? function () {} : _props$onOpen,
|
|
101
|
+
_props$onCancel = props.onCancel,
|
|
102
|
+
onCancel = _props$onCancel === void 0 ? function () {} : _props$onCancel,
|
|
100
103
|
_props$tooltipContent = props.tooltipContent,
|
|
101
|
-
tooltipContent = _props$tooltipContent === void 0 ? (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _shared.i18n.messages.addReaction) : _props$tooltipContent
|
|
104
|
+
tooltipContent = _props$tooltipContent === void 0 ? (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _shared.i18n.messages.addReaction) : _props$tooltipContent,
|
|
105
|
+
emojiPickerSize = props.emojiPickerSize;
|
|
102
106
|
/**
|
|
103
107
|
* Container <div /> reference (used by custom hook to detect click outside)
|
|
104
108
|
*/
|
|
@@ -130,10 +134,7 @@ var ReactionPicker = /*#__PURE__*/_react.default.memo(function (props) {
|
|
|
130
134
|
|
|
131
135
|
|
|
132
136
|
(0, _hooks.useClickAway)(wrapperRef, function () {
|
|
133
|
-
|
|
134
|
-
onCancel();
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
+
onCancel();
|
|
137
138
|
close();
|
|
138
139
|
}, 'click', true);
|
|
139
140
|
/**
|
|
@@ -166,10 +167,7 @@ var ReactionPicker = /*#__PURE__*/_react.default.memo(function (props) {
|
|
|
166
167
|
isOpen: true,
|
|
167
168
|
showFullPicker: true
|
|
168
169
|
});
|
|
169
|
-
|
|
170
|
-
if (onShowMore) {
|
|
171
|
-
onShowMore();
|
|
172
|
-
}
|
|
170
|
+
onShowMore();
|
|
173
171
|
}, [onShowMore]);
|
|
174
172
|
/**
|
|
175
173
|
* Event callback when an emoji icon is selected
|
|
@@ -197,11 +195,7 @@ var ReactionPicker = /*#__PURE__*/_react.default.memo(function (props) {
|
|
|
197
195
|
isOpen: !settings.isOpen,
|
|
198
196
|
showFullPicker: !!allowAllEmojis && Array.isArray(pickerQuickReactionEmojiIds) && pickerQuickReactionEmojiIds.length === 0
|
|
199
197
|
});
|
|
200
|
-
|
|
201
|
-
if (onOpen) {
|
|
202
|
-
onOpen();
|
|
203
|
-
} // ufo reactions picker opened success
|
|
204
|
-
|
|
198
|
+
onOpen(); // ufo reactions picker opened success
|
|
205
199
|
|
|
206
200
|
_analytics.UFO.PickerRender.success();
|
|
207
201
|
};
|
|
@@ -221,7 +215,6 @@ var ReactionPicker = /*#__PURE__*/_react.default.memo(function (props) {
|
|
|
221
215
|
return (0, _react2.jsx)("div", {
|
|
222
216
|
className: wrapperClassName,
|
|
223
217
|
css: styles.pickerStyle,
|
|
224
|
-
ref: wrapperRef,
|
|
225
218
|
"data-testid": RENDER_REACTIONPICKER_TESTID
|
|
226
219
|
}, (0, _react2.jsx)(_popper.Manager, null, (0, _react2.jsx)(_popper.Reference, null, function (_ref) {
|
|
227
220
|
var popperRef = _ref.ref;
|
|
@@ -253,10 +246,12 @@ var ReactionPicker = /*#__PURE__*/_react.default.memo(function (props) {
|
|
|
253
246
|
}, style),
|
|
254
247
|
ref: ref
|
|
255
248
|
}, (0, _react2.jsx)("div", {
|
|
256
|
-
css: styles.popupStyle
|
|
249
|
+
css: styles.popupStyle,
|
|
250
|
+
ref: wrapperRef
|
|
257
251
|
}, settings.showFullPicker ? (0, _react2.jsx)(_picker.EmojiPicker, {
|
|
258
252
|
emojiProvider: emojiProvider,
|
|
259
|
-
onSelection: onEmojiSelected
|
|
253
|
+
onSelection: onEmojiSelected,
|
|
254
|
+
size: emojiPickerSize
|
|
260
255
|
}) : (0, _react2.jsx)("div", {
|
|
261
256
|
css: styles.contentStyle
|
|
262
257
|
}, (0, _react2.jsx)(_Selector.Selector, {
|
|
@@ -36,31 +36,45 @@ var RENDER_REACTIONTOOLTIP_TESTID = 'render-reactionTooltip';
|
|
|
36
36
|
exports.RENDER_REACTIONTOOLTIP_TESTID = RENDER_REACTIONTOOLTIP_TESTID;
|
|
37
37
|
|
|
38
38
|
var ReactionTooltip = function ReactionTooltip(_ref) {
|
|
39
|
-
var
|
|
40
|
-
|
|
39
|
+
var children = _ref.children,
|
|
40
|
+
emojiName = _ref.emojiName,
|
|
41
|
+
_ref$reaction = _ref.reaction,
|
|
42
|
+
_ref$reaction$users = _ref$reaction.users,
|
|
43
|
+
users = _ref$reaction$users === void 0 ? [] : _ref$reaction$users,
|
|
44
|
+
_ref$reaction$emojiId = _ref$reaction.emojiId,
|
|
45
|
+
emojiId = _ref$reaction$emojiId === void 0 ? '' : _ref$reaction$emojiId,
|
|
41
46
|
_ref$maxReactions = _ref.maxReactions,
|
|
42
47
|
maxReactions = _ref$maxReactions === void 0 ? _shared.constants.TOOLTIP_USERS_LIMIT : _ref$maxReactions,
|
|
43
|
-
|
|
44
|
-
|
|
48
|
+
handleUserListClick = _ref.handleUserListClick,
|
|
49
|
+
_ref$allowUserDialog = _ref.allowUserDialog,
|
|
50
|
+
allowUserDialog = _ref$allowUserDialog === void 0 ? false : _ref$allowUserDialog,
|
|
51
|
+
_ref$isEnabled = _ref.isEnabled,
|
|
52
|
+
isEnabled = _ref$isEnabled === void 0 ? true : _ref$isEnabled;
|
|
45
53
|
|
|
46
54
|
/**
|
|
47
55
|
* Render list of users in the tooltip box
|
|
48
56
|
*/
|
|
49
|
-
var content = !users || users.length === 0 ? null : (0, _react2.jsx)("div", {
|
|
50
|
-
css: styles.tooltipStyle
|
|
57
|
+
var content = !users || users.length === 0 || !isEnabled ? null : (0, _react2.jsx)("div", {
|
|
58
|
+
css: styles.tooltipStyle,
|
|
59
|
+
tabIndex: 0
|
|
51
60
|
}, (0, _react2.jsx)("ul", null, emojiName ? (0, _react2.jsx)("li", {
|
|
52
61
|
css: styles.emojiNameStyle
|
|
53
|
-
}, emojiName) : null, users.slice(0, maxReactions).map(function (user
|
|
62
|
+
}, emojiName) : null, users.slice(0, maxReactions).map(function (user) {
|
|
54
63
|
return (0, _react2.jsx)("li", {
|
|
55
|
-
key:
|
|
64
|
+
key: user.id
|
|
56
65
|
}, user.displayName);
|
|
57
|
-
}),
|
|
58
|
-
css: styles.footerStyle
|
|
59
|
-
|
|
66
|
+
}), (0, _react2.jsx)("li", {
|
|
67
|
+
css: allowUserDialog ? [styles.footerStyle, styles.underlineStyle] : styles.footerStyle,
|
|
68
|
+
onClick: function onClick() {
|
|
69
|
+
if (allowUserDialog && handleUserListClick) {
|
|
70
|
+
handleUserListClick(emojiId);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}, users.length > maxReactions ? (0, _react2.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _shared.i18n.messages.otherUsers, {
|
|
60
74
|
values: {
|
|
61
75
|
count: users.length - maxReactions
|
|
62
76
|
}
|
|
63
|
-
}))
|
|
77
|
+
})) : allowUserDialog && (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _shared.i18n.messages.moreInfo))));
|
|
64
78
|
return (0, _react2.jsx)(_tooltip.default, {
|
|
65
79
|
content: content,
|
|
66
80
|
position: "bottom",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.verticalMargin = exports.tooltipStyle = exports.footerStyle = exports.emojiNameStyle = void 0;
|
|
6
|
+
exports.verticalMargin = exports.underlineStyle = exports.tooltipStyle = exports.footerStyle = exports.emojiNameStyle = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = require("@emotion/react");
|
|
9
9
|
|
|
@@ -43,4 +43,13 @@ var footerStyle = (0, _react.css)({
|
|
|
43
43
|
color: (0, _tokens.token)('color.text.inverse', _colors.N90),
|
|
44
44
|
fontWeight: 300
|
|
45
45
|
});
|
|
46
|
-
exports.footerStyle = footerStyle;
|
|
46
|
+
exports.footerStyle = footerStyle;
|
|
47
|
+
var underlineStyle = (0, _react.css)({
|
|
48
|
+
cursor: 'pointer',
|
|
49
|
+
textDecoration: 'underline',
|
|
50
|
+
':hover': {
|
|
51
|
+
backgroundColor: (0, _tokens.token)('color.background.neutral.bold', _colors.N800),
|
|
52
|
+
color: (0, _tokens.token)('color.text.inverse', _colors.N0)
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
exports.underlineStyle = underlineStyle;
|