@atlaskit/emoji 72.5.19 → 73.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 +27 -0
- package/dist/cjs/api/EmojiResource.js +0 -28
- package/dist/cjs/api/EmojiUtils.js +1 -8
- package/dist/cjs/api/denormaliseEmojiServiceResponse.js +2 -2
- package/dist/cjs/api/denormaliseSkinEmoji.js +2 -2
- package/dist/cjs/api/media/SiteEmojiResource.js +3 -3
- package/dist/cjs/components/common/CachingMediaEmoji.js +1 -2
- package/dist/cjs/components/common/Emoji.js +4 -17
- package/dist/cjs/components/common/EmojiPreviewComponent.js +1 -4
- package/dist/cjs/components/common/EmojiRadioButton.js +1 -4
- package/dist/cjs/components/common/EmojiUploadPicker.js +5 -4
- package/dist/cjs/components/common/ResourcedEmojiComponent.js +4 -39
- package/dist/cjs/components/common/TonePreviewButton.js +2 -6
- package/dist/cjs/components/picker/CategorySelector.js +3 -3
- package/dist/cjs/components/picker/EmojiPickerEmojiRow.js +0 -3
- package/dist/cjs/util/analytics/createEvent.js +1 -1
- package/dist/cjs/util/type-helpers.js +0 -7
- package/dist/es2019/api/EmojiResource.js +0 -28
- package/dist/es2019/api/EmojiUtils.js +1 -5
- package/dist/es2019/api/denormaliseEmojiServiceResponse.js +2 -2
- package/dist/es2019/api/denormaliseSkinEmoji.js +2 -2
- package/dist/es2019/api/media/SiteEmojiResource.js +1 -1
- package/dist/es2019/components/common/CachingMediaEmoji.js +1 -2
- package/dist/es2019/components/common/Emoji.js +3 -16
- package/dist/es2019/components/common/EmojiPreviewComponent.js +1 -4
- package/dist/es2019/components/common/EmojiRadioButton.js +1 -4
- package/dist/es2019/components/common/EmojiUploadPicker.js +2 -2
- package/dist/es2019/components/common/ResourcedEmojiComponent.js +4 -38
- package/dist/es2019/components/common/TonePreviewButton.js +2 -6
- package/dist/es2019/components/picker/CategorySelector.js +1 -1
- package/dist/es2019/components/picker/EmojiPickerEmojiRow.js +0 -3
- package/dist/es2019/util/analytics/createEvent.js +1 -1
- package/dist/es2019/util/type-helpers.js +0 -4
- package/dist/esm/api/EmojiResource.js +0 -28
- package/dist/esm/api/EmojiUtils.js +1 -5
- package/dist/esm/api/denormaliseEmojiServiceResponse.js +2 -2
- package/dist/esm/api/denormaliseSkinEmoji.js +2 -2
- package/dist/esm/api/media/SiteEmojiResource.js +1 -1
- package/dist/esm/components/common/CachingMediaEmoji.js +1 -2
- package/dist/esm/components/common/Emoji.js +4 -17
- package/dist/esm/components/common/EmojiPreviewComponent.js +1 -4
- package/dist/esm/components/common/EmojiRadioButton.js +1 -4
- package/dist/esm/components/common/EmojiUploadPicker.js +2 -2
- package/dist/esm/components/common/ResourcedEmojiComponent.js +5 -40
- package/dist/esm/components/common/TonePreviewButton.js +2 -6
- package/dist/esm/components/picker/CategorySelector.js +1 -1
- package/dist/esm/components/picker/EmojiPickerEmojiRow.js +0 -3
- package/dist/esm/util/analytics/createEvent.js +1 -1
- package/dist/esm/util/type-helpers.js +0 -4
- package/dist/types/api/EmojiResource.d.ts +0 -6
- package/dist/types/api/EmojiUtils.d.ts +0 -4
- package/dist/types/api/calculateScale.d.ts +1 -1
- package/dist/types/api/media/SiteEmojiResource.d.ts +1 -1
- package/dist/types/components/common/Emoji.d.ts +1 -7
- package/dist/types/components/common/ResourcedEmojiComponent.d.ts +1 -6
- package/dist/types/types.d.ts +1 -15
- package/dist/types/util/type-helpers.d.ts +0 -4
- package/package.json +4 -4
- package/dist/cjs/api/denormaliseStandardRepresentation.js +0 -17
- package/dist/cjs/components/common/UnicodeEmoji.js +0 -137
- package/dist/cjs/util/emojiIdToEmoji.js +0 -119
- package/dist/cjs/util/is-unicode-representation.js +0 -9
- package/dist/cjs/util/renderUnicodeEmojiToImagePath.js +0 -56
- package/dist/es2019/api/denormaliseStandardRepresentation.js +0 -11
- package/dist/es2019/components/common/UnicodeEmoji.js +0 -125
- package/dist/es2019/util/emojiIdToEmoji.js +0 -93
- package/dist/es2019/util/is-unicode-representation.js +0 -1
- package/dist/es2019/util/renderUnicodeEmojiToImagePath.js +0 -24
- package/dist/esm/api/denormaliseStandardRepresentation.js +0 -11
- package/dist/esm/components/common/UnicodeEmoji.js +0 -128
- package/dist/esm/util/emojiIdToEmoji.js +0 -113
- package/dist/esm/util/is-unicode-representation.js +0 -3
- package/dist/esm/util/renderUnicodeEmojiToImagePath.js +0 -49
- package/dist/types/api/denormaliseStandardRepresentation.d.ts +0 -2
- package/dist/types/components/common/UnicodeEmoji.d.ts +0 -6
- package/dist/types/util/emojiIdToEmoji.d.ts +0 -16
- package/dist/types/util/is-unicode-representation.d.ts +0 -2
- package/dist/types/util/renderUnicodeEmojiToImagePath.d.ts +0 -1
- package/emoji-id-to-emoji/package.json +0 -10
- package/unicode-emoji-image/package.json +0 -10
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import { getMediaClient } from '@atlaskit/media-client-react/get-media-client';
|
|
3
|
-
import { utils as serviceUtils } from '@atlaskit/util-service-support';
|
|
3
|
+
import { utils as serviceUtils } from '@atlaskit/util-service-support/constants';
|
|
4
4
|
import { buildEmojiDescriptionWithAltRepresentation } from '../../util/build-emoji-description-with-alt-representation';
|
|
5
5
|
import { convertImageToMediaRepresentation } from '../../util/convert-image-to-media-representation';
|
|
6
6
|
import { isLoadedMediaEmoji } from '../../util/is-loaded-media-emoji';
|
|
@@ -74,11 +74,10 @@ export const CachingMediaEmoji = props => {
|
|
|
74
74
|
onLoadError: handleLoadError
|
|
75
75
|
}));
|
|
76
76
|
}
|
|
77
|
-
const imageRepresentation = representation && 'height' in representation ? representation : undefined;
|
|
78
77
|
return /*#__PURE__*/React.createElement(EmojiPlaceholder, {
|
|
79
78
|
size: fitToHeight || placeholderSize,
|
|
80
79
|
shortName: shortName,
|
|
81
80
|
showTooltip: showTooltip,
|
|
82
|
-
representation:
|
|
81
|
+
representation: representation
|
|
83
82
|
});
|
|
84
83
|
};
|
|
@@ -7,28 +7,21 @@ import { IntlContext } from 'react-intl';
|
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
8
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
9
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
10
|
-
import {
|
|
10
|
+
import { UfoEmojiTimings } from '../../types';
|
|
11
11
|
import { hasUfoMarked } from '../../util/analytics/hasUfoMarked';
|
|
12
12
|
import { sampledUfoRenderedEmoji } from '../../util/analytics/sampledUfoRenderedEmoji';
|
|
13
13
|
import { ufoExperiences } from '../../util/analytics/ufoExperiences';
|
|
14
14
|
import { useSampledUFOComponentExperience } from '../../util/analytics/useSampledUFOComponentExperience';
|
|
15
15
|
import { deleteEmojiLabel, EMOJI_KEYBOARD_KEYS_SUPPORTED, KeyboardKeys, SAMPLING_RATE_EMOJI_RENDERED_EXP } from '../../util/constants';
|
|
16
16
|
import { isSpriteRepresentation } from '../../util/is-sprite-representation';
|
|
17
|
-
import { isUnicodeRepresentation } from '../../util/is-unicode-representation';
|
|
18
17
|
import { leftClick } from '../../util/left-click';
|
|
19
18
|
import { toEmojiId } from '../../util/to-emoji-id';
|
|
20
19
|
import { messages } from '../i18n';
|
|
21
20
|
import { handleDelete } from './handleDelete';
|
|
22
21
|
import { ImageEmoji } from './ImageEmoji';
|
|
23
22
|
import { SpriteEmoji } from './SpriteEmoji';
|
|
24
|
-
import { UnicodeEmoji } from './UnicodeEmoji';
|
|
25
23
|
const emojiSpriteContainer = null;
|
|
26
24
|
const emojiImageContainer = null;
|
|
27
|
-
|
|
28
|
-
// Unicode emojis render as text inside a <span>, not an <img>, so they do not need
|
|
29
|
-
// borderRadius (which would clip a background on hover) or the img { display: block } rule.
|
|
30
|
-
const emojiUnicodeContainer = null;
|
|
31
|
-
export const unicodeEmojiCanvasSize = 128;
|
|
32
25
|
const handleMouseDown = (props, event) => {
|
|
33
26
|
// Clicked emoji delete button
|
|
34
27
|
if (event.target instanceof Element && event.target.getAttribute('aria-label') === deleteEmojiLabel) {
|
|
@@ -103,7 +96,6 @@ export const EmojiNodeWrapper = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
103
96
|
children,
|
|
104
97
|
type,
|
|
105
98
|
editorEmoji,
|
|
106
|
-
renderUnicodeEmojiAsImage,
|
|
107
99
|
isDecorative,
|
|
108
100
|
...other
|
|
109
101
|
} = props;
|
|
@@ -129,7 +121,7 @@ export const EmojiNodeWrapper = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
129
121
|
"data-emoji-type": type,
|
|
130
122
|
tabIndex: shouldBeInteractive ? tabIndex || 0 : undefined,
|
|
131
123
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
132
|
-
className: ax([type === 'sprite' ? "_19pk1n1a _2hwxidpf _otyr1n1a _18u0idpf _1e0c1o8l _jr50g2xd _ylp71o8l _pkaxgktf _1hdcgktf _109tnkob _tn8j1dpa _3naf1dpa _nt751r31 _49pcglyw _1hvw1o36 _7ehi1y54 _491113zc" :
|
|
124
|
+
className: ax([type === 'sprite' ? "_19pk1n1a _2hwxidpf _otyr1n1a _18u0idpf _1e0c1o8l _jr50g2xd _ylp71o8l _pkaxgktf _1hdcgktf _109tnkob _tn8j1dpa _3naf1dpa _nt751r31 _49pcglyw _1hvw1o36 _7ehi1y54 _491113zc" : "_2rkofajl _19pk1n1a _2hwxidpf _otyr1n1a _18u0idpf _bfhk1j28 _1e0c1o8l _s7n4nkob _v4pn1ule _tn8j1dpa _3naf1dpa _160jewfl _1theewfl _1kogh2mm _qyp0ewfl _nt751r31 _49pcglyw _1hvw1o36 _7ehi1y54 _491113zc", className]),
|
|
133
125
|
onKeyDown: event => handleKeyDown(props, event),
|
|
134
126
|
onMouseDown: event => {
|
|
135
127
|
handleMouseDown(props, event);
|
|
@@ -169,14 +161,9 @@ export const Emoji = props => {
|
|
|
169
161
|
if (!hasUfoMarked(ufoExp, UfoEmojiTimings.MOUNTED_END)) {
|
|
170
162
|
ufoExp.mark(UfoEmojiTimings.MOUNTED_END);
|
|
171
163
|
}
|
|
172
|
-
if (emoji.type === ProviderTypes.STANDARD || isUnicodeRepresentation(emoji.representation)) {
|
|
173
|
-
expValEquals('platform_use_unicode_emojis', 'isEnabled', true);
|
|
174
|
-
}
|
|
175
164
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
176
165
|
}, []);
|
|
177
|
-
|
|
178
|
-
return /*#__PURE__*/React.createElement(UnicodeEmoji, props);
|
|
179
|
-
}
|
|
166
|
+
|
|
180
167
|
// TODO: We always prefer render as image as having accessibility issues with sprite representation
|
|
181
168
|
if (isSpriteRepresentation(emoji.representation)) {
|
|
182
169
|
return /*#__PURE__*/React.createElement(SpriteEmoji, props);
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import "./EmojiPreviewComponent.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
6
5
|
import CachingEmoji from './CachingEmoji';
|
|
7
6
|
const emojiName = null;
|
|
8
7
|
const emojiShortName = null;
|
|
@@ -12,15 +11,13 @@ const previewText = null;
|
|
|
12
11
|
export const EmojiPreviewComponent = ({
|
|
13
12
|
emoji
|
|
14
13
|
}) => {
|
|
15
|
-
const fitToHeight = expValEqualsNoExposure('platform_use_unicode_emojis', 'isEnabled', true) ? 32 : undefined;
|
|
16
14
|
return /*#__PURE__*/React.createElement("div", {
|
|
17
15
|
className: ax(["_ca0q19bv _u5f319bv _n3td19bv _19bv19bv _1e0c1txw _2lx2vrvc _1n261q9c _4t3izwfg _4cvr1h6o"])
|
|
18
16
|
}, /*#__PURE__*/React.createElement("span", {
|
|
19
17
|
className: ax(["_1e0c1o8l _1bsbzwfg _12s6idpf _1e4didpf _1dvqidpf _vwlxidpf _1gdiidpf _1f45idpf _pdfdidpf _mwo3idpf _5ilezwfg _boltzwfg _1pc7zwfg _u5wqzwfg _w7981kw7 _1vqe1kw7 _1l4xidpf _1l79idpf _118didpf _1pa4idpf _1pglh2mm _1vjf1ssb _1h6o1ssb _8fp6dbra _1os4zwfg _1e7azwfg _7mh21ule"])
|
|
20
18
|
}, /*#__PURE__*/React.createElement(CachingEmoji, {
|
|
21
19
|
key: emoji.id || emoji.shortName,
|
|
22
|
-
emoji: emoji
|
|
23
|
-
fitToHeight: fitToHeight
|
|
20
|
+
emoji: emoji
|
|
24
21
|
})), /*#__PURE__*/React.createElement("div", {
|
|
25
22
|
className: ax(["_1e0c1txw _2lx21bp4 _1wpz1h6o _19pk1i6y _18u019bv _p12f3sup _1bsb3sup _16jlkb7n _1o9zkb7n"])
|
|
26
23
|
}, emoji.name && /*#__PURE__*/React.createElement("div", {
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import "./EmojiRadioButton.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { memo, forwardRef } from 'react';
|
|
5
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
6
5
|
import VisuallyHidden from '@atlaskit/visually-hidden/visually-hidden';
|
|
7
6
|
import { TONESELECTOR_KEYBOARD_KEYS_SUPPORTED } from '../../util/constants';
|
|
8
7
|
import { isTeamoji26RefreshEmojiPickerEnabledNoExposure } from '../../util/teamoji26RefreshEmojiPicker';
|
|
@@ -37,7 +36,6 @@ export const EmojiRadioButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
37
36
|
ariaLabelText,
|
|
38
37
|
defaultChecked
|
|
39
38
|
} = props;
|
|
40
|
-
const fitToHeight = expValEqualsNoExposure('platform_use_unicode_emojis', 'isEnabled', true) ? 24 : undefined;
|
|
41
39
|
return /*#__PURE__*/React.createElement("label", {
|
|
42
40
|
className: ax(["_19itidpf _2rkofajl _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _bfhk1j28 _80omtlke _kqswh2mm _1e0c1o8l _lev4idpf _1cx6idpf _tyukidpf _2ewlidpf _11bcidpf _dqozglyw _1at812x7 _1cjo12x7 _1yg612x7 _hjaq12x7 _hlt21tcg _1s3c1tcg _1i911tcg _1ye71tcg"])
|
|
43
41
|
}, /*#__PURE__*/React.createElement(VisuallyHidden, null, ariaLabelText), /*#__PURE__*/React.createElement("input", {
|
|
@@ -57,8 +55,7 @@ export const EmojiRadioButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
57
55
|
emoji: emoji,
|
|
58
56
|
selectOnHover: selectOnHover,
|
|
59
57
|
shouldBeInteractive: false,
|
|
60
|
-
"aria-hidden": true
|
|
61
|
-
fitToHeight: fitToHeight
|
|
58
|
+
"aria-hidden": true
|
|
62
59
|
}));
|
|
63
60
|
});
|
|
64
61
|
const _default_1 = /*#__PURE__*/memo(EmojiRadioButton);
|
|
@@ -10,8 +10,8 @@ import Button from '@atlaskit/button/default/button';
|
|
|
10
10
|
import AkButton from '@atlaskit/button/standard-button';
|
|
11
11
|
import CrossIcon from '@atlaskit/icon/core/cross';
|
|
12
12
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
13
|
+
import { Box } from '@atlaskit/primitives/compiled/box';
|
|
14
|
+
import { Text } from '@atlaskit/primitives/compiled/text';
|
|
15
15
|
import TextField from '@atlaskit/textfield/text-field';
|
|
16
16
|
import * as ImageUtil from '../../util/image';
|
|
17
17
|
import debug from '../../util/logger';
|
|
@@ -3,13 +3,11 @@ import "./ResourcedEmojiComponent.compiled.css";
|
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useCallback, useEffect, useLayoutEffect, useMemo, useState } from 'react';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
6
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
7
6
|
import { EmojiCommonProvider } from '../../context/EmojiCommonProvider';
|
|
8
7
|
import { UfoEmojiTimings } from '../../types';
|
|
9
8
|
import { hasUfoMarked } from '../../util/analytics/hasUfoMarked';
|
|
10
9
|
import { sampledUfoRenderedEmoji } from '../../util/analytics/sampledUfoRenderedEmoji';
|
|
11
10
|
import { defaultEmojiHeight } from '../../util/constants';
|
|
12
|
-
import { emojiIdToEmoji } from '../../util/emojiIdToEmoji';
|
|
13
11
|
import { isImageRepresentation } from '../../util/is-image-representation';
|
|
14
12
|
import { isMediaRepresentation } from '../../util/is-media-representation';
|
|
15
13
|
import { isPromise } from '../../util/is-promise';
|
|
@@ -33,7 +31,6 @@ export const ResourcedEmojiComponent = ({
|
|
|
33
31
|
optimistic = false,
|
|
34
32
|
optimisticImageURL = undefined,
|
|
35
33
|
editorEmoji,
|
|
36
|
-
renderUnicodeEmojiAsImage = true,
|
|
37
34
|
pageTitleEmoji = false,
|
|
38
35
|
placeholderXcss,
|
|
39
36
|
onEmojiLoadSuccess,
|
|
@@ -60,15 +57,7 @@ export const ResourcedEmojiComponent = ({
|
|
|
60
57
|
}
|
|
61
58
|
});
|
|
62
59
|
}
|
|
63
|
-
const
|
|
64
|
-
const normalizedEmojiId = useUnicodeEmojis ? {
|
|
65
|
-
...emojiId,
|
|
66
|
-
id: emojiId.id || undefined
|
|
67
|
-
} : emojiId;
|
|
68
|
-
// A shortName-only optimistic request can resolve without an emoji before the catalogue loads.
|
|
69
|
-
// Use the non-optimistic path so it waits for the catalogue and tokenizes custom emoji media.
|
|
70
|
-
const shouldFetchOptimistically = useUnicodeEmojis ? optimisticFetch && Boolean(emojiId.id) : optimisticFetch;
|
|
71
|
-
const foundEmoji = _emojiProvider.fetchByEmojiId(normalizedEmojiId, shouldFetchOptimistically, fg('platform_bitbucket_fix_shortname_and_ordering') ? emojiProviderLookupOrder : undefined);
|
|
60
|
+
const foundEmoji = _emojiProvider.fetchByEmojiId(emojiId, optimisticFetch, fg('platform_bitbucket_fix_shortname_and_ordering') ? emojiProviderLookupOrder : undefined);
|
|
72
61
|
sampledUfoRenderedEmoji(emojiId).mark(UfoEmojiTimings.METADATA_START);
|
|
73
62
|
if (isPromise(foundEmoji)) {
|
|
74
63
|
setLoaded(false);
|
|
@@ -146,36 +135,14 @@ export const ResourcedEmojiComponent = ({
|
|
|
146
135
|
});
|
|
147
136
|
}, [emojiProvider]);
|
|
148
137
|
const emojiRenderState = useMemo(() => {
|
|
149
|
-
if (!emoji && !loaded && !optimisticImageURL
|
|
138
|
+
if (!emoji && !loaded && !optimisticImageURL) {
|
|
150
139
|
return ResourcedEmojiComponentRenderStatesEnum.INITIAL;
|
|
151
140
|
} else if (!emoji && loaded || imageLoadError) {
|
|
152
141
|
return ResourcedEmojiComponentRenderStatesEnum.FALLBACK;
|
|
153
142
|
}
|
|
154
143
|
return ResourcedEmojiComponentRenderStatesEnum.EMOJI;
|
|
155
|
-
}, [emoji, loaded, optimisticImageURL, imageLoadError
|
|
144
|
+
}, [emoji, loaded, optimisticImageURL, imageLoadError]);
|
|
156
145
|
const optimisticEmojiDescription = useMemo(() => {
|
|
157
|
-
// For STANDARD emojis, use native unicode character instead of optimistic image.
|
|
158
|
-
if (expValEqualsNoExposure('platform_use_unicode_emojis', 'isEnabled', true)) {
|
|
159
|
-
const resolvedId = id || (emoji === null || emoji === void 0 ? void 0 : emoji.id);
|
|
160
|
-
if (!resolvedId) return undefined;
|
|
161
|
-
const unicodeEmoji = emojiIdToEmoji(resolvedId);
|
|
162
|
-
if (unicodeEmoji) {
|
|
163
|
-
return {
|
|
164
|
-
...(emoji !== null && emoji !== void 0 ? emoji : {
|
|
165
|
-
id,
|
|
166
|
-
shortName,
|
|
167
|
-
fallback,
|
|
168
|
-
type: 'STANDARD',
|
|
169
|
-
category: '',
|
|
170
|
-
searchable: true
|
|
171
|
-
}),
|
|
172
|
-
representation: {
|
|
173
|
-
unicodeEmoji
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
146
|
// reduce blast radius by targeting page title
|
|
180
147
|
if (pageTitleEmoji && optimisticImageURL && fg('platform_emoji_prevent_img_src_changing')) {
|
|
181
148
|
return {
|
|
@@ -280,8 +247,7 @@ export const ResourcedEmojiComponent = ({
|
|
|
280
247
|
showTooltip: showTooltip,
|
|
281
248
|
fitToHeight: fitToHeight,
|
|
282
249
|
autoWidth: autoWidth,
|
|
283
|
-
editorEmoji: editorEmoji
|
|
284
|
-
renderUnicodeEmojiAsImage: renderUnicodeEmojiAsImage
|
|
250
|
+
editorEmoji: editorEmoji
|
|
285
251
|
})));
|
|
286
252
|
};
|
|
287
253
|
export default ResourcedEmojiComponent;
|
|
@@ -3,7 +3,6 @@ import "./TonePreviewButton.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { forwardRef, memo } from 'react';
|
|
6
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
7
6
|
import { isTeamoji26RefreshEmojiPickerEnabledNoExposure } from '../../util/teamoji26RefreshEmojiPicker';
|
|
8
7
|
import Emoji from './Emoji';
|
|
9
8
|
export const tonePreviewTestId = 'tone-preview';
|
|
@@ -22,7 +21,6 @@ export const TonePreviewButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
22
21
|
onSelected,
|
|
23
22
|
isVisible = true
|
|
24
23
|
} = props;
|
|
25
|
-
const fitToHeight = expValEqualsNoExposure('platform_use_unicode_emojis', 'isEnabled', true) ? 24 : undefined;
|
|
26
24
|
return isTeamoji26RefreshEmojiPickerEnabledNoExposure() ? /*#__PURE__*/React.createElement("button", {
|
|
27
25
|
ref: ref,
|
|
28
26
|
onClick: onSelected,
|
|
@@ -42,8 +40,7 @@ export const TonePreviewButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
42
40
|
emoji: emoji,
|
|
43
41
|
selectOnHover: selectOnHover,
|
|
44
42
|
shouldBeInteractive: false,
|
|
45
|
-
"aria-hidden": true
|
|
46
|
-
fitToHeight: fitToHeight
|
|
43
|
+
"aria-hidden": true
|
|
47
44
|
})) : /*#__PURE__*/React.createElement("button", {
|
|
48
45
|
ref: ref,
|
|
49
46
|
onClick: onSelected,
|
|
@@ -63,8 +60,7 @@ export const TonePreviewButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
63
60
|
emoji: emoji,
|
|
64
61
|
selectOnHover: selectOnHover,
|
|
65
62
|
shouldBeInteractive: false,
|
|
66
|
-
"aria-hidden": true
|
|
67
|
-
fitToHeight: fitToHeight
|
|
63
|
+
"aria-hidden": true
|
|
68
64
|
}));
|
|
69
65
|
});
|
|
70
66
|
const _default_1 = /*#__PURE__*/memo(TonePreviewButton);
|
|
@@ -5,7 +5,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
5
5
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
6
6
|
import { useIntl } from 'react-intl';
|
|
7
7
|
import { cx } from '@atlaskit/css';
|
|
8
|
-
import { Pressable } from '@atlaskit/primitives/compiled';
|
|
8
|
+
import { Pressable } from '@atlaskit/primitives/compiled/pressable';
|
|
9
9
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
10
10
|
import { usePrevious } from '../../hooks/usePrevious';
|
|
11
11
|
import { CATEGORYSELECTOR_KEYBOARD_KEYS_SUPPORTED, defaultCategories, KeyboardKeys } from '../../util/constants';
|
|
@@ -4,7 +4,6 @@ import * as React from 'react';
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { memo } from 'react';
|
|
6
6
|
import { useIntl } from 'react-intl';
|
|
7
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
8
7
|
import { useEmojiPickerListContext } from '../../hooks/useEmojiPickerListContext';
|
|
9
8
|
import { isTeamoji26RefreshEmojiPickerEnabledNoExposure } from '../../util/teamoji26RefreshEmojiPicker';
|
|
10
9
|
import CachingEmoji from '../common/CachingEmoji';
|
|
@@ -30,7 +29,6 @@ const EmojiPickerEmojiRow = ({
|
|
|
30
29
|
const {
|
|
31
30
|
formatMessage
|
|
32
31
|
} = useIntl();
|
|
33
|
-
const fitToHeight = expValEqualsNoExposure('platform_use_unicode_emojis', 'isEnabled', true) ? 24 : undefined;
|
|
34
32
|
const preventFocusOnMouseDown = isTeamoji26RefreshEmojiPickerEnabledNoExposure();
|
|
35
33
|
const handleFocus = index => (emojiId, emoji, event) => {
|
|
36
34
|
setEmojisFocus({
|
|
@@ -66,7 +64,6 @@ const EmojiPickerEmojiRow = ({
|
|
|
66
64
|
tabIndex: focus ? 0 : -1,
|
|
67
65
|
"aria-roledescription": formatMessage(messages.emojiButtonRoleDescription),
|
|
68
66
|
shouldBeInteractive: true,
|
|
69
|
-
fitToHeight: fitToHeight,
|
|
70
67
|
preventFocusOnMouseDown: preventFocusOnMouseDown
|
|
71
68
|
}));
|
|
72
69
|
}));
|
|
@@ -16,10 +16,6 @@ export { isImageRepresentation } from './is-image-representation';
|
|
|
16
16
|
* @deprecated Use `import { isMediaRepresentation } from '@atlaskit/emoji/type-helpers'` instead.
|
|
17
17
|
*/
|
|
18
18
|
export { isMediaRepresentation } from './is-media-representation';
|
|
19
|
-
/**
|
|
20
|
-
* @deprecated Use `import { isUnicodeRepresentation } from '@atlaskit/emoji/type-helpers'` instead.
|
|
21
|
-
*/
|
|
22
|
-
export { isUnicodeRepresentation } from './is-unicode-representation';
|
|
23
19
|
/**
|
|
24
20
|
* @deprecated Use `import { isPromise } from '@atlaskit/emoji/type-helpers'` instead.
|
|
25
21
|
*/
|
|
@@ -607,34 +607,6 @@ export var EmojiResource = /*#__PURE__*/function (_AbstractResource) {
|
|
|
607
607
|
return _this6.findById(id);
|
|
608
608
|
}, undefined);
|
|
609
609
|
}
|
|
610
|
-
|
|
611
|
-
/**
|
|
612
|
-
* Synchronously reads the emoji type from the local cache for the given emojiId.
|
|
613
|
-
* Returns `undefined` when the emoji is not in the cache or no repository is initialised.
|
|
614
|
-
* This is a pure cache read — no network requests are made.
|
|
615
|
-
*/
|
|
616
|
-
}, {
|
|
617
|
-
key: "getCachedEmojiType",
|
|
618
|
-
value: function getCachedEmojiType(emojiId) {
|
|
619
|
-
if (!this.isRepositoryAvailable(this.emojiRepository)) {
|
|
620
|
-
return undefined;
|
|
621
|
-
}
|
|
622
|
-
var id = emojiId.id,
|
|
623
|
-
shortName = emojiId.shortName;
|
|
624
|
-
if (id) {
|
|
625
|
-
var emoji = this.emojiRepository.findById(id);
|
|
626
|
-
if (emoji) {
|
|
627
|
-
return emoji.type;
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
if (shortName) {
|
|
631
|
-
var _result = this.emojiRepository.findByShortName(shortName);
|
|
632
|
-
if (_result && !('then' in _result)) {
|
|
633
|
-
return _result.type;
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
return undefined;
|
|
637
|
-
}
|
|
638
610
|
}, {
|
|
639
611
|
key: "findInCategory",
|
|
640
612
|
value: function findInCategory(categoryId) {
|
|
@@ -39,8 +39,4 @@ export { shouldUseAltRepresentation } from './shouldUseAltRepresentation';
|
|
|
39
39
|
/**
|
|
40
40
|
* @deprecated Use `import { calculateScale } from '@atlaskit/emoji/emoji-utils'` instead.
|
|
41
41
|
*/
|
|
42
|
-
export { calculateScale } from './calculateScale';
|
|
43
|
-
/**
|
|
44
|
-
* @deprecated Use `import { denormaliseStandardRepresentation } from '@atlaskit/emoji/emoji-utils'` instead.
|
|
45
|
-
*/
|
|
46
|
-
export { denormaliseStandardRepresentation } from './denormaliseStandardRepresentation';
|
|
42
|
+
export { calculateScale } from './calculateScale';
|
|
@@ -5,8 +5,8 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
5
5
|
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) { _defineProperty(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; }
|
|
6
6
|
import { buildEmojiDescriptionWithAltRepresentation } from '../util/build-emoji-description-with-alt-representation';
|
|
7
7
|
import { denormaliseServiceAltRepresentation } from './denormaliseServiceAltRepresentation';
|
|
8
|
+
import { denormaliseServiceRepresentation } from './denormaliseServiceRepresentation';
|
|
8
9
|
import { denormaliseSkinEmoji } from './denormaliseSkinEmoji';
|
|
9
|
-
import { denormaliseStandardRepresentation } from './denormaliseStandardRepresentation';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Denormalised an emoji response (emojis + sprite references) into an array of
|
|
@@ -14,7 +14,7 @@ import { denormaliseStandardRepresentation } from './denormaliseStandardRepresen
|
|
|
14
14
|
*/
|
|
15
15
|
export var denormaliseEmojiServiceResponse = function denormaliseEmojiServiceResponse(emojiData) {
|
|
16
16
|
var emojis = emojiData.emojis.map(function (emoji) {
|
|
17
|
-
var newRepresentation =
|
|
17
|
+
var newRepresentation = denormaliseServiceRepresentation(emoji.representation, emojiData.meta);
|
|
18
18
|
var altRepresentation = denormaliseServiceAltRepresentation(emoji.altRepresentations, emojiData.meta);
|
|
19
19
|
var newSkinVariations = denormaliseSkinEmoji(emoji, emojiData.meta);
|
|
20
20
|
|
|
@@ -4,7 +4,7 @@ var _excluded = ["representation", "altRepresentations"];
|
|
|
4
4
|
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; }
|
|
5
5
|
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) { _defineProperty(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; }
|
|
6
6
|
import { denormaliseServiceAltRepresentation } from './denormaliseServiceAltRepresentation';
|
|
7
|
-
import {
|
|
7
|
+
import { denormaliseServiceRepresentation } from './denormaliseServiceRepresentation';
|
|
8
8
|
export var denormaliseSkinEmoji = function denormaliseSkinEmoji(emoji, meta) {
|
|
9
9
|
if (!emoji.skinVariations) {
|
|
10
10
|
return [];
|
|
@@ -17,7 +17,7 @@ export var denormaliseSkinEmoji = function denormaliseSkinEmoji(emoji, meta) {
|
|
|
17
17
|
other = _objectWithoutProperties(skin, _excluded);
|
|
18
18
|
return _objectSpread({
|
|
19
19
|
baseId: baseId,
|
|
20
|
-
representation:
|
|
20
|
+
representation: denormaliseServiceRepresentation(skin.representation, meta),
|
|
21
21
|
altRepresentation: denormaliseServiceAltRepresentation(altRepresentations, meta)
|
|
22
22
|
}, other);
|
|
23
23
|
});
|
|
@@ -9,7 +9,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
9
9
|
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; }
|
|
10
10
|
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) { _defineProperty(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; }
|
|
11
11
|
import { getMediaClient } from '@atlaskit/media-client-react/get-media-client';
|
|
12
|
-
import { utils as serviceUtils } from '@atlaskit/util-service-support';
|
|
12
|
+
import { utils as serviceUtils } from '@atlaskit/util-service-support/constants';
|
|
13
13
|
import { buildEmojiDescriptionWithAltRepresentation } from '../../util/build-emoji-description-with-alt-representation';
|
|
14
14
|
import { convertImageToMediaRepresentation } from '../../util/convert-image-to-media-representation';
|
|
15
15
|
import { isLoadedMediaEmoji } from '../../util/is-loaded-media-emoji';
|
|
@@ -78,11 +78,10 @@ export var CachingMediaEmoji = function CachingMediaEmoji(props) {
|
|
|
78
78
|
onLoadError: handleLoadError
|
|
79
79
|
}));
|
|
80
80
|
}
|
|
81
|
-
var imageRepresentation = representation && 'height' in representation ? representation : undefined;
|
|
82
81
|
return /*#__PURE__*/React.createElement(EmojiPlaceholder, {
|
|
83
82
|
size: fitToHeight || placeholderSize,
|
|
84
83
|
shortName: shortName,
|
|
85
84
|
showTooltip: showTooltip,
|
|
86
|
-
representation:
|
|
85
|
+
representation: representation
|
|
87
86
|
});
|
|
88
87
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* Emoji.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["emoji", "fitToHeight", "selected", "selectOnHover", "className", "showTooltip", "showDelete", "shouldBeInteractive", "tabIndex", "onSelected", "onMouseMove", "onFocus", "onDelete", "onLoadError", "onLoadSuccess", "disableLazyLoad", "autoWidth", "children", "type", "editorEmoji", "
|
|
4
|
+
var _excluded = ["emoji", "fitToHeight", "selected", "selectOnHover", "className", "showTooltip", "showDelete", "shouldBeInteractive", "tabIndex", "onSelected", "onMouseMove", "onFocus", "onDelete", "onLoadError", "onLoadSuccess", "disableLazyLoad", "autoWidth", "children", "type", "editorEmoji", "isDecorative"];
|
|
5
5
|
import "./Emoji.compiled.css";
|
|
6
6
|
import { ax, ix } from "@compiled/react/runtime";
|
|
7
7
|
import React, { useEffect, useContext, forwardRef } from 'react';
|
|
@@ -9,28 +9,21 @@ import { IntlContext } from 'react-intl';
|
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
10
10
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
11
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
12
|
-
import {
|
|
12
|
+
import { UfoEmojiTimings } from '../../types';
|
|
13
13
|
import { hasUfoMarked } from '../../util/analytics/hasUfoMarked';
|
|
14
14
|
import { sampledUfoRenderedEmoji } from '../../util/analytics/sampledUfoRenderedEmoji';
|
|
15
15
|
import { ufoExperiences } from '../../util/analytics/ufoExperiences';
|
|
16
16
|
import { useSampledUFOComponentExperience } from '../../util/analytics/useSampledUFOComponentExperience';
|
|
17
17
|
import { deleteEmojiLabel, EMOJI_KEYBOARD_KEYS_SUPPORTED, KeyboardKeys, SAMPLING_RATE_EMOJI_RENDERED_EXP } from '../../util/constants';
|
|
18
18
|
import { isSpriteRepresentation } from '../../util/is-sprite-representation';
|
|
19
|
-
import { isUnicodeRepresentation } from '../../util/is-unicode-representation';
|
|
20
19
|
import { leftClick } from '../../util/left-click';
|
|
21
20
|
import { toEmojiId } from '../../util/to-emoji-id';
|
|
22
21
|
import { messages } from '../i18n';
|
|
23
22
|
import { handleDelete } from './handleDelete';
|
|
24
23
|
import { ImageEmoji } from './ImageEmoji';
|
|
25
24
|
import { SpriteEmoji } from './SpriteEmoji';
|
|
26
|
-
import { UnicodeEmoji } from './UnicodeEmoji';
|
|
27
25
|
var emojiSpriteContainer = null;
|
|
28
26
|
var emojiImageContainer = null;
|
|
29
|
-
|
|
30
|
-
// Unicode emojis render as text inside a <span>, not an <img>, so they do not need
|
|
31
|
-
// borderRadius (which would clip a background on hover) or the img { display: block } rule.
|
|
32
|
-
var emojiUnicodeContainer = null;
|
|
33
|
-
export var unicodeEmojiCanvasSize = 128;
|
|
34
27
|
var handleMouseDown = function handleMouseDown(props, event) {
|
|
35
28
|
// Clicked emoji delete button
|
|
36
29
|
if (event.target instanceof Element && event.target.getAttribute('aria-label') === deleteEmojiLabel) {
|
|
@@ -97,7 +90,6 @@ export var EmojiNodeWrapper = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
97
90
|
children = props.children,
|
|
98
91
|
type = props.type,
|
|
99
92
|
editorEmoji = props.editorEmoji,
|
|
100
|
-
renderUnicodeEmojiAsImage = props.renderUnicodeEmojiAsImage,
|
|
101
93
|
isDecorative = props.isDecorative,
|
|
102
94
|
other = _objectWithoutProperties(props, _excluded);
|
|
103
95
|
var intl = useContext(IntlContext);
|
|
@@ -122,7 +114,7 @@ export var EmojiNodeWrapper = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
122
114
|
"data-emoji-type": type,
|
|
123
115
|
tabIndex: shouldBeInteractive ? tabIndex || 0 : undefined,
|
|
124
116
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
125
|
-
className: ax([type === 'sprite' ? "_19pk1n1a _2hwxidpf _otyr1n1a _18u0idpf _1e0c1o8l _jr50g2xd _ylp71o8l _pkaxgktf _1hdcgktf _109tnkob _tn8j1dpa _3naf1dpa _nt751r31 _49pcglyw _1hvw1o36 _7ehi1y54 _491113zc" :
|
|
117
|
+
className: ax([type === 'sprite' ? "_19pk1n1a _2hwxidpf _otyr1n1a _18u0idpf _1e0c1o8l _jr50g2xd _ylp71o8l _pkaxgktf _1hdcgktf _109tnkob _tn8j1dpa _3naf1dpa _nt751r31 _49pcglyw _1hvw1o36 _7ehi1y54 _491113zc" : "_2rkofajl _19pk1n1a _2hwxidpf _otyr1n1a _18u0idpf _bfhk1j28 _1e0c1o8l _s7n4nkob _v4pn1ule _tn8j1dpa _3naf1dpa _160jewfl _1theewfl _1kogh2mm _qyp0ewfl _nt751r31 _49pcglyw _1hvw1o36 _7ehi1y54 _491113zc", className]),
|
|
126
118
|
onKeyDown: function onKeyDown(event) {
|
|
127
119
|
return handleKeyDown(props, event);
|
|
128
120
|
},
|
|
@@ -162,14 +154,9 @@ export var Emoji = function Emoji(props) {
|
|
|
162
154
|
if (!hasUfoMarked(ufoExp, UfoEmojiTimings.MOUNTED_END)) {
|
|
163
155
|
ufoExp.mark(UfoEmojiTimings.MOUNTED_END);
|
|
164
156
|
}
|
|
165
|
-
if (emoji.type === ProviderTypes.STANDARD || isUnicodeRepresentation(emoji.representation)) {
|
|
166
|
-
expValEquals('platform_use_unicode_emojis', 'isEnabled', true);
|
|
167
|
-
}
|
|
168
157
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
169
158
|
}, []);
|
|
170
|
-
|
|
171
|
-
return /*#__PURE__*/React.createElement(UnicodeEmoji, props);
|
|
172
|
-
}
|
|
159
|
+
|
|
173
160
|
// TODO: We always prefer render as image as having accessibility issues with sprite representation
|
|
174
161
|
if (isSpriteRepresentation(emoji.representation)) {
|
|
175
162
|
return /*#__PURE__*/React.createElement(SpriteEmoji, props);
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import "./EmojiPreviewComponent.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
6
5
|
import CachingEmoji from './CachingEmoji';
|
|
7
6
|
var emojiName = null;
|
|
8
7
|
var emojiShortName = null;
|
|
@@ -11,15 +10,13 @@ var previewImg = null;
|
|
|
11
10
|
var previewText = null;
|
|
12
11
|
export var EmojiPreviewComponent = function EmojiPreviewComponent(_ref) {
|
|
13
12
|
var emoji = _ref.emoji;
|
|
14
|
-
var fitToHeight = expValEqualsNoExposure('platform_use_unicode_emojis', 'isEnabled', true) ? 32 : undefined;
|
|
15
13
|
return /*#__PURE__*/React.createElement("div", {
|
|
16
14
|
className: ax(["_ca0q19bv _u5f319bv _n3td19bv _19bv19bv _1e0c1txw _2lx2vrvc _1n261q9c _4t3izwfg _4cvr1h6o"])
|
|
17
15
|
}, /*#__PURE__*/React.createElement("span", {
|
|
18
16
|
className: ax(["_1e0c1o8l _1bsbzwfg _12s6idpf _1e4didpf _1dvqidpf _vwlxidpf _1gdiidpf _1f45idpf _pdfdidpf _mwo3idpf _5ilezwfg _boltzwfg _1pc7zwfg _u5wqzwfg _w7981kw7 _1vqe1kw7 _1l4xidpf _1l79idpf _118didpf _1pa4idpf _1pglh2mm _1vjf1ssb _1h6o1ssb _8fp6dbra _1os4zwfg _1e7azwfg _7mh21ule"])
|
|
19
17
|
}, /*#__PURE__*/React.createElement(CachingEmoji, {
|
|
20
18
|
key: emoji.id || emoji.shortName,
|
|
21
|
-
emoji: emoji
|
|
22
|
-
fitToHeight: fitToHeight
|
|
19
|
+
emoji: emoji
|
|
23
20
|
})), /*#__PURE__*/React.createElement("div", {
|
|
24
21
|
className: ax(["_1e0c1txw _2lx21bp4 _1wpz1h6o _19pk1i6y _18u019bv _p12f3sup _1bsb3sup _16jlkb7n _1o9zkb7n"])
|
|
25
22
|
}, emoji.name && /*#__PURE__*/React.createElement("div", {
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import "./EmojiRadioButton.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { memo, forwardRef } from 'react';
|
|
5
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
6
5
|
import VisuallyHidden from '@atlaskit/visually-hidden/visually-hidden';
|
|
7
6
|
import { TONESELECTOR_KEYBOARD_KEYS_SUPPORTED } from '../../util/constants';
|
|
8
7
|
import { isTeamoji26RefreshEmojiPickerEnabledNoExposure } from '../../util/teamoji26RefreshEmojiPicker';
|
|
@@ -33,7 +32,6 @@ export var EmojiRadioButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
33
32
|
selectOnHover = props.selectOnHover,
|
|
34
33
|
ariaLabelText = props.ariaLabelText,
|
|
35
34
|
defaultChecked = props.defaultChecked;
|
|
36
|
-
var fitToHeight = expValEqualsNoExposure('platform_use_unicode_emojis', 'isEnabled', true) ? 24 : undefined;
|
|
37
35
|
return /*#__PURE__*/React.createElement("label", {
|
|
38
36
|
className: ax(["_19itidpf _2rkofajl _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _bfhk1j28 _80omtlke _kqswh2mm _1e0c1o8l _lev4idpf _1cx6idpf _tyukidpf _2ewlidpf _11bcidpf _dqozglyw _1at812x7 _1cjo12x7 _1yg612x7 _hjaq12x7 _hlt21tcg _1s3c1tcg _1i911tcg _1ye71tcg"])
|
|
39
37
|
}, /*#__PURE__*/React.createElement(VisuallyHidden, null, ariaLabelText), /*#__PURE__*/React.createElement("input", {
|
|
@@ -57,8 +55,7 @@ export var EmojiRadioButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
57
55
|
emoji: emoji,
|
|
58
56
|
selectOnHover: selectOnHover,
|
|
59
57
|
shouldBeInteractive: false,
|
|
60
|
-
"aria-hidden": true
|
|
61
|
-
fitToHeight: fitToHeight
|
|
58
|
+
"aria-hidden": true
|
|
62
59
|
}));
|
|
63
60
|
});
|
|
64
61
|
var _default_1 = /*#__PURE__*/memo(EmojiRadioButton);
|
|
@@ -13,8 +13,8 @@ import Button from '@atlaskit/button/default/button';
|
|
|
13
13
|
import AkButton from '@atlaskit/button/standard-button';
|
|
14
14
|
import CrossIcon from '@atlaskit/icon/core/cross';
|
|
15
15
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
16
|
+
import { Box } from '@atlaskit/primitives/compiled/box';
|
|
17
|
+
import { Text } from '@atlaskit/primitives/compiled/text';
|
|
18
18
|
import TextField from '@atlaskit/textfield/text-field';
|
|
19
19
|
import * as ImageUtil from '../../util/image';
|
|
20
20
|
import debug from '../../util/logger';
|