@atlaskit/emoji 71.2.0 → 71.2.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 +16 -0
- package/dist/cjs/components/common/Emoji.js +7 -13
- package/dist/cjs/components/picker/EmojiPickerComponent.js +1 -1
- package/dist/cjs/components/picker/EmojiPickerList.js +3 -1
- package/dist/cjs/util/analytics/analytics.js +1 -1
- package/dist/es2019/components/common/Emoji.js +7 -13
- package/dist/es2019/components/picker/EmojiPickerComponent.js +1 -1
- package/dist/es2019/components/picker/EmojiPickerList.js +3 -2
- package/dist/es2019/util/analytics/analytics.js +1 -1
- package/dist/esm/components/common/Emoji.js +7 -13
- package/dist/esm/components/picker/EmojiPickerComponent.js +1 -1
- package/dist/esm/components/picker/EmojiPickerList.js +3 -1
- package/dist/esm/util/analytics/analytics.js +1 -1
- package/dist/types/components/picker/EmojiPickerList.d.ts +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/emoji
|
|
2
2
|
|
|
3
|
+
## 71.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`deb7c88f3baed`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/deb7c88f3baed) -
|
|
8
|
+
Update unicode emoji sizing so renderer typography can control text emoji scale.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 71.2.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`6fbfacbeddc94`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6fbfacbeddc94) -
|
|
16
|
+
Ensure scroll to Your uploads on clicking uploads category
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 71.2.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
|
@@ -281,11 +281,11 @@ var UnicodeEmojiImage = function UnicodeEmojiImage(props) {
|
|
|
281
281
|
});
|
|
282
282
|
};
|
|
283
283
|
var UnicodeEmoji = exports.UnicodeEmoji = function UnicodeEmoji(props) {
|
|
284
|
-
var _props$fitToHeight;
|
|
285
284
|
var emoji = props.emoji,
|
|
286
285
|
selected = props.selected,
|
|
287
286
|
selectOnHover = props.selectOnHover,
|
|
288
287
|
className = props.className,
|
|
288
|
+
fitToHeight = props.fitToHeight,
|
|
289
289
|
_props$renderUnicodeE = props.renderUnicodeEmojiAsImage,
|
|
290
290
|
renderUnicodeEmojiAsImage = _props$renderUnicodeE === void 0 ? true : _props$renderUnicodeE;
|
|
291
291
|
if (renderUnicodeEmojiAsImage) {
|
|
@@ -293,20 +293,14 @@ var UnicodeEmoji = exports.UnicodeEmoji = function UnicodeEmoji(props) {
|
|
|
293
293
|
}
|
|
294
294
|
var classes = "".concat(_styles.emojiNodeStyles, " ").concat(selected ? _styles.commonSelectedStyles : '', " ").concat(selectOnHover ? _styles.selectOnHoverStyles : '', " ").concat(className ? className : '');
|
|
295
295
|
var emojiText = emoji.representation.unicodeEmoji;
|
|
296
|
-
var
|
|
296
|
+
var defaultSize = "".concat(fitToHeight !== null && fitToHeight !== void 0 ? fitToHeight : _constants.defaultEmojiHeight, "px");
|
|
297
|
+
var emojiSize = "var(--emoji-common-unicode-size, ".concat(defaultSize, ")");
|
|
297
298
|
var style = {
|
|
298
|
-
display: 'inline-
|
|
299
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
300
|
-
fontSize: "max(1em, ".concat(size, "px)"),
|
|
301
|
-
width: "max(1em, ".concat(size, "px)"),
|
|
302
|
-
height: "max(1em, ".concat(size, "px)"),
|
|
303
|
-
textAlign: 'center',
|
|
304
|
-
alignContent: 'center',
|
|
305
|
-
alignSelf: 'center',
|
|
299
|
+
display: 'inline-flex',
|
|
306
300
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
301
|
+
fontSize: emojiSize,
|
|
302
|
+
alignItems: 'center',
|
|
303
|
+
aspectRatio: '1/1'
|
|
310
304
|
};
|
|
311
305
|
return (
|
|
312
306
|
/*#__PURE__*/
|
|
@@ -390,7 +390,7 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
390
390
|
if (isTeamojiExperimentEnabled) {
|
|
391
391
|
isProgrammaticScroll.current = true;
|
|
392
392
|
}
|
|
393
|
-
emojiPickerList.current.reveal(categoryId);
|
|
393
|
+
emojiPickerList.current.reveal(categoryId, isTeamojiExperimentEnabled);
|
|
394
394
|
if (isTeamojiExperimentEnabled) {
|
|
395
395
|
// Clear the flag after the scroll animation has settled.
|
|
396
396
|
setTimeout(function () {
|
|
@@ -380,7 +380,9 @@ var EmojiPickerVirtualListInternal = exports.EmojiPickerVirtualListInternal = /*
|
|
|
380
380
|
(0, _react.useImperativeHandle)(ref, function () {
|
|
381
381
|
return {
|
|
382
382
|
reveal: function reveal(category) {
|
|
383
|
-
var
|
|
383
|
+
var _categoryTracker$getR;
|
|
384
|
+
var preferYourUploads = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
385
|
+
var row = preferYourUploads && category === _constants.customCategory ? (_categoryTracker$getR = categoryTracker.getRow(_constants.yourUploadsCategory)) !== null && _categoryTracker$getR !== void 0 ? _categoryTracker$getR : categoryTracker.getRow(category) : categoryTracker.getRow(category);
|
|
384
386
|
(0, _utils.scrollToRow)(listRef, row);
|
|
385
387
|
},
|
|
386
388
|
scrollToBottom: function scrollToBottom() {
|
|
@@ -20,7 +20,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
20
20
|
actionSubjectId: actionSubjectId,
|
|
21
21
|
attributes: _objectSpread({
|
|
22
22
|
packageName: "@atlaskit/emoji",
|
|
23
|
-
packageVersion: "71.2.
|
|
23
|
+
packageVersion: "71.2.1"
|
|
24
24
|
}, attributes)
|
|
25
25
|
};
|
|
26
26
|
};
|
|
@@ -256,12 +256,12 @@ const UnicodeEmojiImage = props => {
|
|
|
256
256
|
});
|
|
257
257
|
};
|
|
258
258
|
export const UnicodeEmoji = props => {
|
|
259
|
-
var _props$fitToHeight;
|
|
260
259
|
const {
|
|
261
260
|
emoji,
|
|
262
261
|
selected,
|
|
263
262
|
selectOnHover,
|
|
264
263
|
className,
|
|
264
|
+
fitToHeight,
|
|
265
265
|
renderUnicodeEmojiAsImage = true
|
|
266
266
|
} = props;
|
|
267
267
|
if (renderUnicodeEmojiAsImage) {
|
|
@@ -269,20 +269,14 @@ export const UnicodeEmoji = props => {
|
|
|
269
269
|
}
|
|
270
270
|
const classes = `${emojiNodeStyles} ${selected ? commonSelectedStyles : ''} ${selectOnHover ? selectOnHoverStyles : ''} ${className ? className : ''}`;
|
|
271
271
|
const emojiText = emoji.representation.unicodeEmoji;
|
|
272
|
-
const
|
|
272
|
+
const defaultSize = `${fitToHeight !== null && fitToHeight !== void 0 ? fitToHeight : defaultEmojiHeight}px`;
|
|
273
|
+
const emojiSize = `var(--emoji-common-unicode-size, ${defaultSize})`;
|
|
273
274
|
const style = {
|
|
274
|
-
display: 'inline-
|
|
275
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
276
|
-
fontSize: `max(1em, ${size}px)`,
|
|
277
|
-
width: `max(1em, ${size}px)`,
|
|
278
|
-
height: `max(1em, ${size}px)`,
|
|
279
|
-
textAlign: 'center',
|
|
280
|
-
alignContent: 'center',
|
|
281
|
-
alignSelf: 'center',
|
|
275
|
+
display: 'inline-flex',
|
|
282
276
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
277
|
+
fontSize: emojiSize,
|
|
278
|
+
alignItems: 'center',
|
|
279
|
+
aspectRatio: '1/1'
|
|
286
280
|
};
|
|
287
281
|
return (
|
|
288
282
|
/*#__PURE__*/
|
|
@@ -331,7 +331,7 @@ const EmojiPickerComponent = ({
|
|
|
331
331
|
if (isTeamojiExperimentEnabled) {
|
|
332
332
|
isProgrammaticScroll.current = true;
|
|
333
333
|
}
|
|
334
|
-
emojiPickerList.current.reveal(categoryId);
|
|
334
|
+
emojiPickerList.current.reveal(categoryId, isTeamojiExperimentEnabled);
|
|
335
335
|
if (isTeamojiExperimentEnabled) {
|
|
336
336
|
// Clear the flag after the scroll animation has settled.
|
|
337
337
|
setTimeout(() => {
|
|
@@ -340,8 +340,9 @@ export const EmojiPickerVirtualListInternal = /*#__PURE__*/React.forwardRef((pro
|
|
|
340
340
|
*/
|
|
341
341
|
useImperativeHandle(ref, () => {
|
|
342
342
|
return {
|
|
343
|
-
reveal(category) {
|
|
344
|
-
|
|
343
|
+
reveal(category, preferYourUploads = false) {
|
|
344
|
+
var _categoryTracker$getR;
|
|
345
|
+
const row = preferYourUploads && category === customCategory ? (_categoryTracker$getR = categoryTracker.getRow(yourUploadsCategory)) !== null && _categoryTracker$getR !== void 0 ? _categoryTracker$getR : categoryTracker.getRow(category) : categoryTracker.getRow(category);
|
|
345
346
|
scrollToRow(listRef, row);
|
|
346
347
|
},
|
|
347
348
|
scrollToBottom() {
|
|
@@ -272,11 +272,11 @@ var UnicodeEmojiImage = function UnicodeEmojiImage(props) {
|
|
|
272
272
|
});
|
|
273
273
|
};
|
|
274
274
|
export var UnicodeEmoji = function UnicodeEmoji(props) {
|
|
275
|
-
var _props$fitToHeight;
|
|
276
275
|
var emoji = props.emoji,
|
|
277
276
|
selected = props.selected,
|
|
278
277
|
selectOnHover = props.selectOnHover,
|
|
279
278
|
className = props.className,
|
|
279
|
+
fitToHeight = props.fitToHeight,
|
|
280
280
|
_props$renderUnicodeE = props.renderUnicodeEmojiAsImage,
|
|
281
281
|
renderUnicodeEmojiAsImage = _props$renderUnicodeE === void 0 ? true : _props$renderUnicodeE;
|
|
282
282
|
if (renderUnicodeEmojiAsImage) {
|
|
@@ -284,20 +284,14 @@ export var UnicodeEmoji = function UnicodeEmoji(props) {
|
|
|
284
284
|
}
|
|
285
285
|
var classes = "".concat(emojiNodeStyles, " ").concat(selected ? commonSelectedStyles : '', " ").concat(selectOnHover ? selectOnHoverStyles : '', " ").concat(className ? className : '');
|
|
286
286
|
var emojiText = emoji.representation.unicodeEmoji;
|
|
287
|
-
var
|
|
287
|
+
var defaultSize = "".concat(fitToHeight !== null && fitToHeight !== void 0 ? fitToHeight : defaultEmojiHeight, "px");
|
|
288
|
+
var emojiSize = "var(--emoji-common-unicode-size, ".concat(defaultSize, ")");
|
|
288
289
|
var style = {
|
|
289
|
-
display: 'inline-
|
|
290
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
291
|
-
fontSize: "max(1em, ".concat(size, "px)"),
|
|
292
|
-
width: "max(1em, ".concat(size, "px)"),
|
|
293
|
-
height: "max(1em, ".concat(size, "px)"),
|
|
294
|
-
textAlign: 'center',
|
|
295
|
-
alignContent: 'center',
|
|
296
|
-
alignSelf: 'center',
|
|
290
|
+
display: 'inline-flex',
|
|
297
291
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
292
|
+
fontSize: emojiSize,
|
|
293
|
+
alignItems: 'center',
|
|
294
|
+
aspectRatio: '1/1'
|
|
301
295
|
};
|
|
302
296
|
return (
|
|
303
297
|
/*#__PURE__*/
|
|
@@ -381,7 +381,7 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
381
381
|
if (isTeamojiExperimentEnabled) {
|
|
382
382
|
isProgrammaticScroll.current = true;
|
|
383
383
|
}
|
|
384
|
-
emojiPickerList.current.reveal(categoryId);
|
|
384
|
+
emojiPickerList.current.reveal(categoryId, isTeamojiExperimentEnabled);
|
|
385
385
|
if (isTeamojiExperimentEnabled) {
|
|
386
386
|
// Clear the flag after the scroll animation has settled.
|
|
387
387
|
setTimeout(function () {
|
|
@@ -372,7 +372,9 @@ export var EmojiPickerVirtualListInternal = /*#__PURE__*/React.forwardRef(functi
|
|
|
372
372
|
useImperativeHandle(ref, function () {
|
|
373
373
|
return {
|
|
374
374
|
reveal: function reveal(category) {
|
|
375
|
-
var
|
|
375
|
+
var _categoryTracker$getR;
|
|
376
|
+
var preferYourUploads = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
377
|
+
var row = preferYourUploads && category === customCategory ? (_categoryTracker$getR = categoryTracker.getRow(yourUploadsCategory)) !== null && _categoryTracker$getR !== void 0 ? _categoryTracker$getR : categoryTracker.getRow(category) : categoryTracker.getRow(category);
|
|
376
378
|
_scrollToRow(listRef, row);
|
|
377
379
|
},
|
|
378
380
|
scrollToBottom: function scrollToBottom() {
|
|
@@ -14,7 +14,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
14
14
|
actionSubjectId: actionSubjectId,
|
|
15
15
|
attributes: _objectSpread({
|
|
16
16
|
packageName: "@atlaskit/emoji",
|
|
17
|
-
packageVersion: "71.2.
|
|
17
|
+
packageVersion: "71.2.1"
|
|
18
18
|
}, attributes)
|
|
19
19
|
};
|
|
20
20
|
};
|
|
@@ -45,7 +45,7 @@ export interface Props {
|
|
|
45
45
|
export interface State {
|
|
46
46
|
}
|
|
47
47
|
export type PickerListRef = {
|
|
48
|
-
reveal: (category: CategoryId) => void;
|
|
48
|
+
reveal: (category: CategoryId, preferYourUploads?: boolean) => void;
|
|
49
49
|
scrollToBottom: () => void;
|
|
50
50
|
scrollToRecentlyUploaded: (uploadedEmoji: EmojiDescription) => void;
|
|
51
51
|
scrollToRow: (index?: number) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/emoji",
|
|
3
|
-
"version": "71.2.
|
|
3
|
+
"version": "71.2.2",
|
|
4
4
|
"description": "Fabric emoji React components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@atlaskit/afm-i18n-platform-elements-emoji": "2.158.0",
|
|
33
33
|
"@atlaskit/analytics-next": "^12.0.0",
|
|
34
34
|
"@atlaskit/browser-apis": "^1.0.0",
|
|
35
|
-
"@atlaskit/button": "^24.
|
|
35
|
+
"@atlaskit/button": "^24.1.0",
|
|
36
36
|
"@atlaskit/css": "^1.0.0",
|
|
37
37
|
"@atlaskit/feature-gate-js-client": "^6.0.0",
|
|
38
38
|
"@atlaskit/form": "^16.0.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@atlaskit/radio": "^9.0.0",
|
|
49
49
|
"@atlaskit/spinner": "^20.0.0",
|
|
50
50
|
"@atlaskit/textfield": "^9.0.0",
|
|
51
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
51
|
+
"@atlaskit/tmp-editor-statsig": "^108.4.0",
|
|
52
52
|
"@atlaskit/tokens": "^14.0.0",
|
|
53
53
|
"@atlaskit/tooltip": "^23.0.0",
|
|
54
54
|
"@atlaskit/ufo": "^1.0.0",
|