emoji-picker-react 4.6.15 → 4.7.0

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.
Files changed (33) hide show
  1. package/README.md +37 -12
  2. package/dist/components/Reactions/BtnPlus.d.ts +2 -0
  3. package/dist/components/Reactions/DEFAULT_REACTIONS.d.ts +1 -0
  4. package/dist/components/Reactions/Reactions.d.ts +2 -0
  5. package/dist/components/context/ElementRefContext.d.ts +1 -0
  6. package/dist/components/context/PickerContext.d.ts +1 -0
  7. package/dist/components/emoji/ClickableEmojiButton.d.ts +2 -1
  8. package/dist/components/emoji/Emoji.d.ts +2 -1
  9. package/dist/config/config.d.ts +2 -0
  10. package/dist/config/useConfig.d.ts +2 -0
  11. package/dist/emoji-picker-react.cjs.development.js +931 -725
  12. package/dist/emoji-picker-react.cjs.development.js.map +1 -1
  13. package/dist/emoji-picker-react.cjs.production.min.js +1 -1
  14. package/dist/emoji-picker-react.cjs.production.min.js.map +1 -1
  15. package/dist/emoji-picker-react.esm.js +932 -726
  16. package/dist/emoji-picker-react.esm.js.map +1 -1
  17. package/package.json +5 -2
  18. package/src/EmojiPickerReact.tsx +28 -3
  19. package/src/Stylesheet/stylesheet.tsx +14 -2
  20. package/src/components/Reactions/BtnPlus.tsx +78 -0
  21. package/src/components/Reactions/DEFAULT_REACTIONS.ts +9 -0
  22. package/src/components/Reactions/Reactions.tsx +62 -0
  23. package/src/components/Reactions/svg/plus.svg +17 -0
  24. package/src/components/body/Body.tsx +8 -2
  25. package/src/components/context/ElementRefContext.tsx +10 -2
  26. package/src/components/context/PickerContext.tsx +16 -3
  27. package/src/components/emoji/ClickableEmojiButton.tsx +8 -2
  28. package/src/components/emoji/Emoji.tsx +4 -1
  29. package/src/components/footer/Preview.tsx +7 -2
  30. package/src/components/header/Header.tsx +5 -1
  31. package/src/components/main/PickerMain.tsx +27 -2
  32. package/src/config/config.ts +7 -2
  33. package/src/config/useConfig.ts +16 -3
@@ -1,38 +1,6 @@
1
- import React__default, { useState, useEffect, createElement, useRef, createContext, createRef, useContext, useMemo, useCallback, Fragment, memo, Component } from 'react';
1
+ import React__default, { useState, useEffect, createElement, createContext, useContext, useRef, useMemo, useCallback, createRef, Fragment, memo, Component } from 'react';
2
2
  import { createSheet, cx } from 'flairup';
3
3
 
4
- var ClassNames;
5
- (function (ClassNames) {
6
- ClassNames["hiddenOnSearch"] = "epr-hidden-on-search";
7
- ClassNames["searchActive"] = "epr-search-active";
8
- ClassNames["hidden"] = "epr-hidden";
9
- ClassNames["visible"] = "epr-visible";
10
- ClassNames["active"] = "epr-active";
11
- ClassNames["emoji"] = "epr-emoji";
12
- ClassNames["category"] = "epr-emoji-category";
13
- ClassNames["label"] = "epr-emoji-category-label";
14
- ClassNames["categoryContent"] = "epr-emoji-category-content";
15
- ClassNames["emojiHasVariations"] = "epr-emoji-has-variations";
16
- ClassNames["scrollBody"] = "epr-body";
17
- ClassNames["emojiList"] = "epr-emoji-list";
18
- ClassNames["external"] = "__EmojiPicker__";
19
- ClassNames["emojiPicker"] = "EmojiPickerReact";
20
- ClassNames["open"] = "epr-open";
21
- ClassNames["vertical"] = "epr-vertical";
22
- ClassNames["horizontal"] = "epr-horizontal";
23
- ClassNames["variationPicker"] = "epr-emoji-variation-picker";
24
- ClassNames["darkTheme"] = "epr-dark-theme";
25
- ClassNames["autoTheme"] = "epr-auto-theme";
26
- })(ClassNames || (ClassNames = {}));
27
- function asSelectors() {
28
- for (var _len = arguments.length, classNames = new Array(_len), _key = 0; _key < _len; _key++) {
29
- classNames[_key] = arguments[_key];
30
- }
31
- return classNames.map(function (c) {
32
- return "." + c;
33
- }).join('');
34
- }
35
-
36
4
  function _extends() {
37
5
  _extends = Object.assign ? Object.assign.bind() : function (target) {
38
6
  for (var i = 1; i < arguments.length; i++) {
@@ -103,6 +71,38 @@ function _createForOfIteratorHelperLoose(o, allowArrayLike) {
103
71
  throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
104
72
  }
105
73
 
74
+ var ClassNames;
75
+ (function (ClassNames) {
76
+ ClassNames["hiddenOnSearch"] = "epr-hidden-on-search";
77
+ ClassNames["searchActive"] = "epr-search-active";
78
+ ClassNames["hidden"] = "epr-hidden";
79
+ ClassNames["visible"] = "epr-visible";
80
+ ClassNames["active"] = "epr-active";
81
+ ClassNames["emoji"] = "epr-emoji";
82
+ ClassNames["category"] = "epr-emoji-category";
83
+ ClassNames["label"] = "epr-emoji-category-label";
84
+ ClassNames["categoryContent"] = "epr-emoji-category-content";
85
+ ClassNames["emojiHasVariations"] = "epr-emoji-has-variations";
86
+ ClassNames["scrollBody"] = "epr-body";
87
+ ClassNames["emojiList"] = "epr-emoji-list";
88
+ ClassNames["external"] = "__EmojiPicker__";
89
+ ClassNames["emojiPicker"] = "EmojiPickerReact";
90
+ ClassNames["open"] = "epr-open";
91
+ ClassNames["vertical"] = "epr-vertical";
92
+ ClassNames["horizontal"] = "epr-horizontal";
93
+ ClassNames["variationPicker"] = "epr-emoji-variation-picker";
94
+ ClassNames["darkTheme"] = "epr-dark-theme";
95
+ ClassNames["autoTheme"] = "epr-auto-theme";
96
+ })(ClassNames || (ClassNames = {}));
97
+ function asSelectors() {
98
+ for (var _len = arguments.length, classNames = new Array(_len), _key = 0; _key < _len; _key++) {
99
+ classNames[_key] = arguments[_key];
100
+ }
101
+ return classNames.map(function (c) {
102
+ return "." + c;
103
+ }).join('');
104
+ }
105
+
106
106
  function useIsMounted() {
107
107
  var _React$useState = useState(false),
108
108
  isMounted = _React$useState[0],
@@ -118,7 +118,8 @@ var hidden = {
118
118
  display: 'none',
119
119
  opacity: '0',
120
120
  pointerEvents: 'none',
121
- visibility: 'hidden'
121
+ visibility: 'hidden',
122
+ overflow: 'hidden'
122
123
  };
123
124
  var commonStyles = /*#__PURE__*/stylesheet.create({
124
125
  hidden: /*#__PURE__*/_extends({
@@ -154,6 +155,18 @@ var commonInteractionStyles = /*#__PURE__*/stylesheet.create({
154
155
  visibleOnSearchOnly: hidden
155
156
  }
156
157
  },
158
+ hiddenOnReactions: {
159
+ transition: 'all 0.5s ease-in-out'
160
+ },
161
+ '.epr-reactions': {
162
+ hiddenOnReactions: {
163
+ height: '0px',
164
+ width: '0px',
165
+ opacity: '0',
166
+ pointerEvents: 'none',
167
+ overflow: 'hidden'
168
+ }
169
+ },
157
170
  '.EmojiPickerReact:not(.epr-search-active)': {
158
171
  categoryBtn: {
159
172
  ':hover': {
@@ -172,93 +185,8 @@ var commonInteractionStyles = /*#__PURE__*/stylesheet.create({
172
185
  }
173
186
  });
174
187
 
175
- function focusElement(element) {
176
- if (!element) {
177
- return;
178
- }
179
- requestAnimationFrame(function () {
180
- element.focus();
181
- });
182
- }
183
- function focusPrevElementSibling(element) {
184
- if (!element) return;
185
- var prev = element.previousElementSibling;
186
- focusElement(prev);
187
- }
188
- function focusNextElementSibling(element) {
189
- if (!element) return;
190
- var next = element.nextElementSibling;
191
- focusElement(next);
192
- }
193
- function focusFirstElementChild(element) {
194
- if (!element) return;
195
- var first = element.firstElementChild;
196
- focusElement(first);
197
- }
198
-
199
- function ElementRefContextProvider(_ref) {
200
- var children = _ref.children;
201
- var PickerMainRef = useRef(null);
202
- var AnchoredEmojiRef = useRef(null);
203
- var BodyRef = useRef(null);
204
- var SearchInputRef = useRef(null);
205
- var SkinTonePickerRef = useRef(null);
206
- var CategoryNavigationRef = useRef(null);
207
- var VariationPickerRef = useRef(null);
208
- return createElement(ElementRefContext.Provider, {
209
- value: {
210
- AnchoredEmojiRef: AnchoredEmojiRef,
211
- BodyRef: BodyRef,
212
- CategoryNavigationRef: CategoryNavigationRef,
213
- PickerMainRef: PickerMainRef,
214
- SearchInputRef: SearchInputRef,
215
- SkinTonePickerRef: SkinTonePickerRef,
216
- VariationPickerRef: VariationPickerRef
217
- }
218
- }, children);
219
- }
220
- var ElementRefContext = /*#__PURE__*/createContext({
221
- AnchoredEmojiRef: /*#__PURE__*/createRef(),
222
- BodyRef: /*#__PURE__*/createRef(),
223
- CategoryNavigationRef: /*#__PURE__*/createRef(),
224
- PickerMainRef: /*#__PURE__*/createRef(),
225
- SearchInputRef: /*#__PURE__*/createRef(),
226
- SkinTonePickerRef: /*#__PURE__*/createRef(),
227
- VariationPickerRef: /*#__PURE__*/createRef()
228
- });
229
- function useElementRef() {
230
- return useContext(ElementRefContext);
231
- }
232
- function usePickerMainRef() {
233
- return useElementRef()['PickerMainRef'];
234
- }
235
- function useAnchoredEmojiRef() {
236
- return useElementRef()['AnchoredEmojiRef'];
237
- }
238
- function useSetAnchoredEmojiRef() {
239
- var AnchoredEmojiRef = useAnchoredEmojiRef();
240
- return function (target) {
241
- if (target === null && AnchoredEmojiRef.current !== null) {
242
- focusElement(AnchoredEmojiRef.current);
243
- }
244
- AnchoredEmojiRef.current = target;
245
- };
246
- }
247
- function useBodyRef() {
248
- return useElementRef()['BodyRef'];
249
- }
250
- function useSearchInputRef() {
251
- return useElementRef()['SearchInputRef'];
252
- }
253
- function useSkinTonePickerRef() {
254
- return useElementRef()['SkinTonePickerRef'];
255
- }
256
- function useCategoryNavigationRef() {
257
- return useElementRef()['CategoryNavigationRef'];
258
- }
259
- function useVariationPickerRef() {
260
- return useElementRef()['VariationPickerRef'];
261
- }
188
+ var DEFAULT_REACTIONS = ['1f44d', '2764-fe0f', '1f603', '1f622', '1f64f', '1f44e', '1f621' // 😡
189
+ ];
262
190
 
263
191
  var SuggestionMode;
264
192
  (function (SuggestionMode) {
@@ -16909,7 +16837,9 @@ function basePickerConfig() {
16909
16837
  suggestedEmojisMode: SuggestionMode.FREQUENT,
16910
16838
  theme: Theme.LIGHT,
16911
16839
  unicodeToHide: new Set(KNOWN_FAILING_EMOJIS),
16912
- width: 350
16840
+ width: 350,
16841
+ reactionsDefaultOpen: false,
16842
+ reactions: DEFAULT_REACTIONS
16913
16843
  };
16914
16844
  }
16915
16845
  var basePreviewConfig = {
@@ -17044,29 +16974,39 @@ function useStyleConfig() {
17044
16974
  width: getDimension(width)
17045
16975
  }, style);
17046
16976
  }
17047
- function useEmojiVersionConfig() {
16977
+ function useReactionsOpenConfig() {
17048
16978
  var _usePickerConfig14 = usePickerConfig(),
17049
- emojiVersion = _usePickerConfig14.emojiVersion;
16979
+ reactionsDefaultOpen = _usePickerConfig14.reactionsDefaultOpen;
16980
+ return reactionsDefaultOpen;
16981
+ }
16982
+ function useEmojiVersionConfig() {
16983
+ var _usePickerConfig15 = usePickerConfig(),
16984
+ emojiVersion = _usePickerConfig15.emojiVersion;
17050
16985
  return emojiVersion;
17051
16986
  }
17052
16987
  function useSearchDisabledConfig() {
17053
- var _usePickerConfig15 = usePickerConfig(),
17054
- searchDisabled = _usePickerConfig15.searchDisabled;
16988
+ var _usePickerConfig16 = usePickerConfig(),
16989
+ searchDisabled = _usePickerConfig16.searchDisabled;
17055
16990
  return searchDisabled;
17056
16991
  }
17057
16992
  function useSkinTonePickerLocationConfig() {
17058
- var _usePickerConfig16 = usePickerConfig(),
17059
- skinTonePickerLocation = _usePickerConfig16.skinTonePickerLocation;
16993
+ var _usePickerConfig17 = usePickerConfig(),
16994
+ skinTonePickerLocation = _usePickerConfig17.skinTonePickerLocation;
17060
16995
  return skinTonePickerLocation;
17061
16996
  }
17062
16997
  function useUnicodeToHide() {
17063
- var _usePickerConfig17 = usePickerConfig(),
17064
- unicodeToHide = _usePickerConfig17.unicodeToHide;
16998
+ var _usePickerConfig18 = usePickerConfig(),
16999
+ unicodeToHide = _usePickerConfig18.unicodeToHide;
17065
17000
  return unicodeToHide;
17066
17001
  }
17002
+ function useReactionsConfig() {
17003
+ var _usePickerConfig19 = usePickerConfig(),
17004
+ reactions = _usePickerConfig19.reactions;
17005
+ return reactions;
17006
+ }
17067
17007
  function useGetEmojiUrlConfig() {
17068
- var _usePickerConfig18 = usePickerConfig(),
17069
- getEmojiUrl = _usePickerConfig18.getEmojiUrl;
17008
+ var _usePickerConfig20 = usePickerConfig(),
17009
+ getEmojiUrl = _usePickerConfig20.getEmojiUrl;
17070
17010
  return getEmojiUrl;
17071
17011
  }
17072
17012
  function getDimension(dimensionConfig) {
@@ -17081,270 +17021,50 @@ function useSearchResultsConfig(searchResultsCount) {
17081
17021
  return SEARCH_RESULTS_NO_RESULTS_FOUND;
17082
17022
  }
17083
17023
 
17084
- function useDebouncedState(initialValue, delay) {
17085
- if (delay === void 0) {
17086
- delay = 0;
17087
- }
17088
- var _useState = useState(initialValue),
17089
- state = _useState[0],
17090
- setState = _useState[1];
17091
- var timer = useRef(null);
17092
- function debouncedSetState(value) {
17093
- return new Promise(function (resolve) {
17094
- var _window;
17095
- if (timer.current) {
17096
- clearTimeout(timer.current);
17097
- }
17098
- timer.current = (_window = window) == null ? void 0 : _window.setTimeout(function () {
17099
- setState(value);
17100
- resolve(value);
17101
- }, delay);
17102
- });
17024
+ function elementCountInRow(parent, element) {
17025
+ if (!parent || !element) {
17026
+ return 0;
17103
17027
  }
17104
- return [state, debouncedSetState];
17028
+ var parentWidth = parent.getBoundingClientRect().width;
17029
+ var elementWidth = element.getBoundingClientRect().width;
17030
+ return Math.floor(parentWidth / elementWidth);
17105
17031
  }
17106
-
17107
- function useIsUnicodeHidden() {
17108
- var unicodeToHide = useUnicodeToHide();
17109
- return function (emojiUnified) {
17110
- return unicodeToHide.has(emojiUnified);
17111
- };
17032
+ function elementIndexInRow(parent, element) {
17033
+ if (!parent || !element) {
17034
+ return 0;
17035
+ }
17036
+ var elementWidth = element.getBoundingClientRect().width;
17037
+ var elementLeft = element.getBoundingClientRect().left;
17038
+ var parentLeft = parent.getBoundingClientRect().left;
17039
+ return Math.floor((elementLeft - parentLeft) / elementWidth);
17112
17040
  }
17113
-
17114
- function useDisallowedEmojis() {
17115
- var DisallowedEmojisRef = useRef({});
17116
- var emojiVersionConfig = useEmojiVersionConfig();
17117
- return useMemo(function () {
17118
- var emojiVersion = parseFloat("" + emojiVersionConfig);
17119
- if (!emojiVersionConfig || Number.isNaN(emojiVersion)) {
17120
- return DisallowedEmojisRef.current;
17121
- }
17122
- return allEmojis.reduce(function (disallowedEmojis, emoji) {
17123
- if (addedInNewerVersion(emoji, emojiVersion)) {
17124
- disallowedEmojis[emojiUnified(emoji)] = true;
17125
- }
17126
- return disallowedEmojis;
17127
- }, DisallowedEmojisRef.current);
17128
- }, [emojiVersionConfig]);
17041
+ function rowNumber(parent, element) {
17042
+ if (!parent || !element) {
17043
+ return 0;
17044
+ }
17045
+ var elementHeight = element.getBoundingClientRect().height;
17046
+ var elementTop = element.getBoundingClientRect().top;
17047
+ var parentTop = parent.getBoundingClientRect().top;
17048
+ return Math.round((elementTop - parentTop) / elementHeight);
17129
17049
  }
17130
- function useIsEmojiDisallowed() {
17131
- var disallowedEmojis = useDisallowedEmojis();
17132
- var isUnicodeHidden = useIsUnicodeHidden();
17133
- return function isEmojiDisallowed(emoji) {
17134
- var unified = unifiedWithoutSkinTone(emojiUnified(emoji));
17135
- return Boolean(disallowedEmojis[unified] || isUnicodeHidden(unified));
17136
- };
17050
+ function hasNextRow(parent, element) {
17051
+ if (!parent || !element) {
17052
+ return false;
17053
+ }
17054
+ var elementHeight = element.getBoundingClientRect().height;
17055
+ var elementTop = element.getBoundingClientRect().top;
17056
+ var parentTop = parent.getBoundingClientRect().top;
17057
+ var parentHeight = parent.getBoundingClientRect().height;
17058
+ return Math.round(elementTop - parentTop + elementHeight) < parentHeight;
17137
17059
  }
17138
- function addedInNewerVersion(emoji, supportedLevel) {
17139
- return addedIn(emoji) > supportedLevel;
17140
- }
17141
-
17142
- function useMarkInitialLoad(dispatch) {
17143
- useEffect(function () {
17144
- dispatch(true);
17145
- }, [dispatch]);
17146
- }
17147
-
17148
- function PickerContextProvider(_ref) {
17149
- var children = _ref.children;
17150
- var disallowedEmojis = useDisallowedEmojis();
17151
- var defaultSkinTone = useDefaultSkinToneConfig();
17152
- // Initialize the filter with the inititial dictionary
17153
- var filterRef = useRef(alphaNumericEmojiIndex);
17154
- var disallowClickRef = useRef(false);
17155
- var disallowMouseRef = useRef(false);
17156
- var disallowedEmojisRef = useRef(disallowedEmojis);
17157
- var suggestedUpdateState = useDebouncedState(Date.now(), 200);
17158
- var searchTerm = useDebouncedState('', 100);
17159
- var skinToneFanOpenState = useState(false);
17160
- var activeSkinTone = useState(defaultSkinTone);
17161
- var activeCategoryState = useState(null);
17162
- var emojisThatFailedToLoadState = useState(new Set());
17163
- var emojiVariationPickerState = useState(null);
17164
- var _useState = useState(false),
17165
- isPastInitialLoad = _useState[0],
17166
- setIsPastInitialLoad = _useState[1];
17167
- useMarkInitialLoad(setIsPastInitialLoad);
17168
- return createElement(PickerContext.Provider, {
17169
- value: {
17170
- activeCategoryState: activeCategoryState,
17171
- activeSkinTone: activeSkinTone,
17172
- disallowClickRef: disallowClickRef,
17173
- disallowMouseRef: disallowMouseRef,
17174
- disallowedEmojisRef: disallowedEmojisRef,
17175
- emojiVariationPickerState: emojiVariationPickerState,
17176
- emojisThatFailedToLoadState: emojisThatFailedToLoadState,
17177
- filterRef: filterRef,
17178
- isPastInitialLoad: isPastInitialLoad,
17179
- searchTerm: searchTerm,
17180
- skinToneFanOpenState: skinToneFanOpenState,
17181
- suggestedUpdateState: suggestedUpdateState
17182
- }
17183
- }, children);
17184
- }
17185
- var PickerContext = /*#__PURE__*/createContext({
17186
- activeCategoryState: [null, function () {}],
17187
- activeSkinTone: [SkinTones.NEUTRAL, function () {}],
17188
- disallowClickRef: {
17189
- current: false
17190
- },
17191
- disallowMouseRef: {
17192
- current: false
17193
- },
17194
- disallowedEmojisRef: {
17195
- current: {}
17196
- },
17197
- emojiVariationPickerState: [null, function () {}],
17198
- emojisThatFailedToLoadState: [/*#__PURE__*/new Set(), function () {}],
17199
- filterRef: {
17200
- current: {}
17201
- },
17202
- isPastInitialLoad: true,
17203
- searchTerm: ['', function () {
17204
- return new Promise(function () {
17205
- return undefined;
17206
- });
17207
- }],
17208
- skinToneFanOpenState: [false, function () {}],
17209
- suggestedUpdateState: [/*#__PURE__*/Date.now(), function () {}]
17210
- });
17211
- function useFilterRef() {
17212
- var _React$useContext = useContext(PickerContext),
17213
- filterRef = _React$useContext.filterRef;
17214
- return filterRef;
17215
- }
17216
- function useDisallowClickRef() {
17217
- var _React$useContext2 = useContext(PickerContext),
17218
- disallowClickRef = _React$useContext2.disallowClickRef;
17219
- return disallowClickRef;
17220
- }
17221
- function useDisallowMouseRef() {
17222
- var _React$useContext3 = useContext(PickerContext),
17223
- disallowMouseRef = _React$useContext3.disallowMouseRef;
17224
- return disallowMouseRef;
17225
- }
17226
- function useSearchTermState() {
17227
- var _React$useContext4 = useContext(PickerContext),
17228
- searchTerm = _React$useContext4.searchTerm;
17229
- return searchTerm;
17230
- }
17231
- function useActiveSkinToneState() {
17232
- var _React$useContext5 = useContext(PickerContext),
17233
- activeSkinTone = _React$useContext5.activeSkinTone;
17234
- return activeSkinTone;
17235
- }
17236
- function useEmojisThatFailedToLoadState() {
17237
- var _React$useContext6 = useContext(PickerContext),
17238
- emojisThatFailedToLoadState = _React$useContext6.emojisThatFailedToLoadState;
17239
- return emojisThatFailedToLoadState;
17240
- }
17241
- function useIsPastInitialLoad() {
17242
- var _React$useContext7 = useContext(PickerContext),
17243
- isPastInitialLoad = _React$useContext7.isPastInitialLoad;
17244
- return isPastInitialLoad;
17245
- }
17246
- function useEmojiVariationPickerState() {
17247
- var _React$useContext8 = useContext(PickerContext),
17248
- emojiVariationPickerState = _React$useContext8.emojiVariationPickerState;
17249
- return emojiVariationPickerState;
17250
- }
17251
- function useSkinToneFanOpenState() {
17252
- var _React$useContext9 = useContext(PickerContext),
17253
- skinToneFanOpenState = _React$useContext9.skinToneFanOpenState;
17254
- return skinToneFanOpenState;
17255
- }
17256
- function useUpdateSuggested() {
17257
- var _React$useContext11 = useContext(PickerContext),
17258
- suggestedUpdateState = _React$useContext11.suggestedUpdateState;
17259
- var suggestedUpdated = suggestedUpdateState[0],
17260
- setsuggestedUpdate = suggestedUpdateState[1];
17261
- return [suggestedUpdated, function updateSuggested() {
17262
- setsuggestedUpdate(Date.now());
17263
- }];
17264
- }
17265
-
17266
- function useDisallowMouseMove() {
17267
- var DisallowMouseRef = useDisallowMouseRef();
17268
- return function disallowMouseMove() {
17269
- DisallowMouseRef.current = true;
17270
- };
17271
- }
17272
- function useAllowMouseMove() {
17273
- var DisallowMouseRef = useDisallowMouseRef();
17274
- return function allowMouseMove() {
17275
- DisallowMouseRef.current = false;
17276
- };
17277
- }
17278
- function useIsMouseDisallowed() {
17279
- var DisallowMouseRef = useDisallowMouseRef();
17280
- return function isMouseDisallowed() {
17281
- return DisallowMouseRef.current;
17282
- };
17283
- }
17284
- function useOnMouseMove() {
17285
- var BodyRef = useBodyRef();
17286
- var allowMouseMove = useAllowMouseMove();
17287
- var isMouseDisallowed = useIsMouseDisallowed();
17288
- useEffect(function () {
17289
- var bodyRef = BodyRef.current;
17290
- bodyRef == null ? void 0 : bodyRef.addEventListener('mousemove', onMouseMove, {
17291
- passive: true
17292
- });
17293
- function onMouseMove() {
17294
- if (isMouseDisallowed()) {
17295
- allowMouseMove();
17296
- }
17297
- }
17298
- return function () {
17299
- bodyRef == null ? void 0 : bodyRef.removeEventListener('mousemove', onMouseMove);
17300
- };
17301
- }, [BodyRef, allowMouseMove, isMouseDisallowed]);
17302
- }
17303
-
17304
- function elementCountInRow(parent, element) {
17305
- if (!parent || !element) {
17306
- return 0;
17307
- }
17308
- var parentWidth = parent.getBoundingClientRect().width;
17309
- var elementWidth = element.getBoundingClientRect().width;
17310
- return Math.floor(parentWidth / elementWidth);
17311
- }
17312
- function elementIndexInRow(parent, element) {
17313
- if (!parent || !element) {
17314
- return 0;
17315
- }
17316
- var elementWidth = element.getBoundingClientRect().width;
17317
- var elementLeft = element.getBoundingClientRect().left;
17318
- var parentLeft = parent.getBoundingClientRect().left;
17319
- return Math.floor((elementLeft - parentLeft) / elementWidth);
17320
- }
17321
- function rowNumber(parent, element) {
17322
- if (!parent || !element) {
17323
- return 0;
17324
- }
17325
- var elementHeight = element.getBoundingClientRect().height;
17326
- var elementTop = element.getBoundingClientRect().top;
17327
- var parentTop = parent.getBoundingClientRect().top;
17328
- return Math.round((elementTop - parentTop) / elementHeight);
17329
- }
17330
- function hasNextRow(parent, element) {
17331
- if (!parent || !element) {
17332
- return false;
17333
- }
17334
- var elementHeight = element.getBoundingClientRect().height;
17335
- var elementTop = element.getBoundingClientRect().top;
17336
- var parentTop = parent.getBoundingClientRect().top;
17337
- var parentHeight = parent.getBoundingClientRect().height;
17338
- return Math.round(elementTop - parentTop + elementHeight) < parentHeight;
17339
- }
17340
- function getRowElements(elements, row, elementsInRow) {
17341
- if (row === -1) {
17342
- var lastRow = Math.floor((elements.length - 1) / elementsInRow);
17343
- var firstElementIndex = lastRow * elementsInRow;
17344
- var lastElementIndex = elements.length - 1;
17345
- return elements.slice(firstElementIndex, lastElementIndex + 1);
17346
- }
17347
- return elements.slice(row * elementsInRow, (row + 1) * elementsInRow);
17060
+ function getRowElements(elements, row, elementsInRow) {
17061
+ if (row === -1) {
17062
+ var lastRow = Math.floor((elements.length - 1) / elementsInRow);
17063
+ var firstElementIndex = lastRow * elementsInRow;
17064
+ var lastElementIndex = elements.length - 1;
17065
+ return elements.slice(firstElementIndex, lastElementIndex + 1);
17066
+ }
17067
+ return elements.slice(row * elementsInRow, (row + 1) * elementsInRow);
17348
17068
  }
17349
17069
  function getNextRowElements(allElements, currentRow, elementsInRow) {
17350
17070
  var nextRow = currentRow + 1;
@@ -17579,42 +17299,233 @@ function closestCategoryContent(element) {
17579
17299
  return element.closest(asSelectors(ClassNames.categoryContent));
17580
17300
  }
17581
17301
 
17582
- function parseNativeEmoji(unified) {
17583
- return unified.split('-').map(function (hex) {
17584
- return String.fromCodePoint(parseInt(hex, 16));
17585
- }).join('');
17302
+ function useDebouncedState(initialValue, delay) {
17303
+ if (delay === void 0) {
17304
+ delay = 0;
17305
+ }
17306
+ var _useState = useState(initialValue),
17307
+ state = _useState[0],
17308
+ setState = _useState[1];
17309
+ var timer = useRef(null);
17310
+ function debouncedSetState(value) {
17311
+ return new Promise(function (resolve) {
17312
+ var _window;
17313
+ if (timer.current) {
17314
+ clearTimeout(timer.current);
17315
+ }
17316
+ timer.current = (_window = window) == null ? void 0 : _window.setTimeout(function () {
17317
+ setState(value);
17318
+ resolve(value);
17319
+ }, delay);
17320
+ });
17321
+ }
17322
+ return [state, debouncedSetState];
17586
17323
  }
17587
17324
 
17588
- var SUGGESTED_LS_KEY = 'epr_suggested';
17589
- function getSuggested(mode) {
17590
- try {
17591
- var _window, _window$localStorage$, _window2;
17592
- if (!((_window = window) != null && _window.localStorage)) {
17593
- return [];
17594
- }
17595
- var recent = JSON.parse((_window$localStorage$ = (_window2 = window) == null ? void 0 : _window2.localStorage.getItem(SUGGESTED_LS_KEY)) != null ? _window$localStorage$ : '[]');
17596
- if (mode === SuggestionMode.FREQUENT) {
17597
- return recent.sort(function (a, b) {
17598
- return b.count - a.count;
17599
- });
17600
- }
17601
- return recent;
17602
- } catch (_unused) {
17603
- return [];
17604
- }
17325
+ function useIsUnicodeHidden() {
17326
+ var unicodeToHide = useUnicodeToHide();
17327
+ return function (emojiUnified) {
17328
+ return unicodeToHide.has(emojiUnified);
17329
+ };
17605
17330
  }
17606
- function setSuggested(emoji, skinTone) {
17607
- var recent = getSuggested();
17608
- var unified = emojiUnified(emoji, skinTone);
17609
- var originalUnified = emojiUnified(emoji);
17610
- var existing = recent.find(function (_ref) {
17611
- var u = _ref.unified;
17612
- return u === unified;
17613
- });
17614
- var nextList;
17615
- if (existing) {
17616
- nextList = [existing].concat(recent.filter(function (i) {
17617
- return i !== existing;
17331
+
17332
+ function useDisallowedEmojis() {
17333
+ var DisallowedEmojisRef = useRef({});
17334
+ var emojiVersionConfig = useEmojiVersionConfig();
17335
+ return useMemo(function () {
17336
+ var emojiVersion = parseFloat("" + emojiVersionConfig);
17337
+ if (!emojiVersionConfig || Number.isNaN(emojiVersion)) {
17338
+ return DisallowedEmojisRef.current;
17339
+ }
17340
+ return allEmojis.reduce(function (disallowedEmojis, emoji) {
17341
+ if (addedInNewerVersion(emoji, emojiVersion)) {
17342
+ disallowedEmojis[emojiUnified(emoji)] = true;
17343
+ }
17344
+ return disallowedEmojis;
17345
+ }, DisallowedEmojisRef.current);
17346
+ }, [emojiVersionConfig]);
17347
+ }
17348
+ function useIsEmojiDisallowed() {
17349
+ var disallowedEmojis = useDisallowedEmojis();
17350
+ var isUnicodeHidden = useIsUnicodeHidden();
17351
+ return function isEmojiDisallowed(emoji) {
17352
+ var unified = unifiedWithoutSkinTone(emojiUnified(emoji));
17353
+ return Boolean(disallowedEmojis[unified] || isUnicodeHidden(unified));
17354
+ };
17355
+ }
17356
+ function addedInNewerVersion(emoji, supportedLevel) {
17357
+ return addedIn(emoji) > supportedLevel;
17358
+ }
17359
+
17360
+ function useMarkInitialLoad(dispatch) {
17361
+ useEffect(function () {
17362
+ dispatch(true);
17363
+ }, [dispatch]);
17364
+ }
17365
+
17366
+ function PickerContextProvider(_ref) {
17367
+ var children = _ref.children;
17368
+ var disallowedEmojis = useDisallowedEmojis();
17369
+ var defaultSkinTone = useDefaultSkinToneConfig();
17370
+ var reactionsDefaultOpen = useReactionsOpenConfig();
17371
+ // Initialize the filter with the inititial dictionary
17372
+ var filterRef = useRef(alphaNumericEmojiIndex);
17373
+ var disallowClickRef = useRef(false);
17374
+ var disallowMouseRef = useRef(false);
17375
+ var disallowedEmojisRef = useRef(disallowedEmojis);
17376
+ var suggestedUpdateState = useDebouncedState(Date.now(), 200);
17377
+ var searchTerm = useDebouncedState('', 100);
17378
+ var skinToneFanOpenState = useState(false);
17379
+ var activeSkinTone = useState(defaultSkinTone);
17380
+ var activeCategoryState = useState(null);
17381
+ var emojisThatFailedToLoadState = useState(new Set());
17382
+ var emojiVariationPickerState = useState(null);
17383
+ var reactionsModeState = useState(reactionsDefaultOpen);
17384
+ var _useState = useState(false),
17385
+ isPastInitialLoad = _useState[0],
17386
+ setIsPastInitialLoad = _useState[1];
17387
+ useMarkInitialLoad(setIsPastInitialLoad);
17388
+ return createElement(PickerContext.Provider, {
17389
+ value: {
17390
+ activeCategoryState: activeCategoryState,
17391
+ activeSkinTone: activeSkinTone,
17392
+ disallowClickRef: disallowClickRef,
17393
+ disallowMouseRef: disallowMouseRef,
17394
+ disallowedEmojisRef: disallowedEmojisRef,
17395
+ emojiVariationPickerState: emojiVariationPickerState,
17396
+ emojisThatFailedToLoadState: emojisThatFailedToLoadState,
17397
+ filterRef: filterRef,
17398
+ isPastInitialLoad: isPastInitialLoad,
17399
+ searchTerm: searchTerm,
17400
+ skinToneFanOpenState: skinToneFanOpenState,
17401
+ suggestedUpdateState: suggestedUpdateState,
17402
+ reactionsModeState: reactionsModeState
17403
+ }
17404
+ }, children);
17405
+ }
17406
+ var PickerContext = /*#__PURE__*/createContext({
17407
+ activeCategoryState: [null, function () {}],
17408
+ activeSkinTone: [SkinTones.NEUTRAL, function () {}],
17409
+ disallowClickRef: {
17410
+ current: false
17411
+ },
17412
+ disallowMouseRef: {
17413
+ current: false
17414
+ },
17415
+ disallowedEmojisRef: {
17416
+ current: {}
17417
+ },
17418
+ emojiVariationPickerState: [null, function () {}],
17419
+ emojisThatFailedToLoadState: [/*#__PURE__*/new Set(), function () {}],
17420
+ filterRef: {
17421
+ current: {}
17422
+ },
17423
+ isPastInitialLoad: true,
17424
+ searchTerm: ['', function () {
17425
+ return new Promise(function () {
17426
+ return undefined;
17427
+ });
17428
+ }],
17429
+ skinToneFanOpenState: [false, function () {}],
17430
+ suggestedUpdateState: [/*#__PURE__*/Date.now(), function () {}],
17431
+ reactionsModeState: [false, function () {}]
17432
+ });
17433
+ function useFilterRef() {
17434
+ var _React$useContext = useContext(PickerContext),
17435
+ filterRef = _React$useContext.filterRef;
17436
+ return filterRef;
17437
+ }
17438
+ function useDisallowClickRef() {
17439
+ var _React$useContext2 = useContext(PickerContext),
17440
+ disallowClickRef = _React$useContext2.disallowClickRef;
17441
+ return disallowClickRef;
17442
+ }
17443
+ function useDisallowMouseRef() {
17444
+ var _React$useContext3 = useContext(PickerContext),
17445
+ disallowMouseRef = _React$useContext3.disallowMouseRef;
17446
+ return disallowMouseRef;
17447
+ }
17448
+ function useReactionsModeState() {
17449
+ var _React$useContext4 = useContext(PickerContext),
17450
+ reactionsModeState = _React$useContext4.reactionsModeState;
17451
+ return reactionsModeState;
17452
+ }
17453
+ function useSearchTermState() {
17454
+ var _React$useContext5 = useContext(PickerContext),
17455
+ searchTerm = _React$useContext5.searchTerm;
17456
+ return searchTerm;
17457
+ }
17458
+ function useActiveSkinToneState() {
17459
+ var _React$useContext6 = useContext(PickerContext),
17460
+ activeSkinTone = _React$useContext6.activeSkinTone;
17461
+ return activeSkinTone;
17462
+ }
17463
+ function useEmojisThatFailedToLoadState() {
17464
+ var _React$useContext7 = useContext(PickerContext),
17465
+ emojisThatFailedToLoadState = _React$useContext7.emojisThatFailedToLoadState;
17466
+ return emojisThatFailedToLoadState;
17467
+ }
17468
+ function useIsPastInitialLoad() {
17469
+ var _React$useContext8 = useContext(PickerContext),
17470
+ isPastInitialLoad = _React$useContext8.isPastInitialLoad;
17471
+ return isPastInitialLoad;
17472
+ }
17473
+ function useEmojiVariationPickerState() {
17474
+ var _React$useContext9 = useContext(PickerContext),
17475
+ emojiVariationPickerState = _React$useContext9.emojiVariationPickerState;
17476
+ return emojiVariationPickerState;
17477
+ }
17478
+ function useSkinToneFanOpenState() {
17479
+ var _React$useContext10 = useContext(PickerContext),
17480
+ skinToneFanOpenState = _React$useContext10.skinToneFanOpenState;
17481
+ return skinToneFanOpenState;
17482
+ }
17483
+ function useUpdateSuggested() {
17484
+ var _React$useContext12 = useContext(PickerContext),
17485
+ suggestedUpdateState = _React$useContext12.suggestedUpdateState;
17486
+ var suggestedUpdated = suggestedUpdateState[0],
17487
+ setsuggestedUpdate = suggestedUpdateState[1];
17488
+ return [suggestedUpdated, function updateSuggested() {
17489
+ setsuggestedUpdate(Date.now());
17490
+ }];
17491
+ }
17492
+
17493
+ function parseNativeEmoji(unified) {
17494
+ return unified.split('-').map(function (hex) {
17495
+ return String.fromCodePoint(parseInt(hex, 16));
17496
+ }).join('');
17497
+ }
17498
+
17499
+ var SUGGESTED_LS_KEY = 'epr_suggested';
17500
+ function getSuggested(mode) {
17501
+ try {
17502
+ var _window, _window$localStorage$, _window2;
17503
+ if (!((_window = window) != null && _window.localStorage)) {
17504
+ return [];
17505
+ }
17506
+ var recent = JSON.parse((_window$localStorage$ = (_window2 = window) == null ? void 0 : _window2.localStorage.getItem(SUGGESTED_LS_KEY)) != null ? _window$localStorage$ : '[]');
17507
+ if (mode === SuggestionMode.FREQUENT) {
17508
+ return recent.sort(function (a, b) {
17509
+ return b.count - a.count;
17510
+ });
17511
+ }
17512
+ return recent;
17513
+ } catch (_unused) {
17514
+ return [];
17515
+ }
17516
+ }
17517
+ function setSuggested(emoji, skinTone) {
17518
+ var recent = getSuggested();
17519
+ var unified = emojiUnified(emoji, skinTone);
17520
+ var originalUnified = emojiUnified(emoji);
17521
+ var existing = recent.find(function (_ref) {
17522
+ var u = _ref.unified;
17523
+ return u === unified;
17524
+ });
17525
+ var nextList;
17526
+ if (existing) {
17527
+ nextList = [existing].concat(recent.filter(function (i) {
17528
+ return i !== existing;
17618
17529
  }));
17619
17530
  } else {
17620
17531
  existing = {
@@ -17669,46 +17580,140 @@ function useHasOpenToggles() {
17669
17580
  };
17670
17581
  }
17671
17582
 
17672
- function useSetVariationPicker() {
17673
- var setAnchoredEmojiRef = useSetAnchoredEmojiRef();
17674
- var _useEmojiVariationPic = useEmojiVariationPickerState(),
17675
- setEmojiVariationPicker = _useEmojiVariationPic[1];
17676
- return function setVariationPicker(element) {
17677
- var _emojiFromElement = emojiFromElement(element),
17678
- emoji = _emojiFromElement[0];
17679
- if (emoji) {
17680
- setAnchoredEmojiRef(element);
17681
- setEmojiVariationPicker(emoji);
17682
- }
17683
- };
17583
+ function focusElement(element) {
17584
+ if (!element) {
17585
+ return;
17586
+ }
17587
+ requestAnimationFrame(function () {
17588
+ element.focus();
17589
+ });
17590
+ }
17591
+ function focusPrevElementSibling(element) {
17592
+ if (!element) return;
17593
+ var prev = element.previousElementSibling;
17594
+ focusElement(prev);
17595
+ }
17596
+ function focusNextElementSibling(element) {
17597
+ if (!element) return;
17598
+ var next = element.nextElementSibling;
17599
+ focusElement(next);
17600
+ }
17601
+ function focusFirstElementChild(element) {
17602
+ if (!element) return;
17603
+ var first = element.firstElementChild;
17604
+ focusElement(first);
17684
17605
  }
17685
17606
 
17686
- function useMouseDownHandlers(BodyRef) {
17687
- var mouseDownTimerRef = useRef();
17688
- var setVariationPicker = useSetVariationPicker();
17689
- var disallowClickRef = useDisallowClickRef();
17690
- var _useEmojiVariationPic = useEmojiVariationPickerState(),
17691
- setEmojiVariationPicker = _useEmojiVariationPic[1];
17692
- var closeAllOpenToggles = useCloseAllOpenToggles();
17693
- var _useActiveSkinToneSta = useActiveSkinToneState(),
17694
- activeSkinTone = _useActiveSkinToneSta[0];
17695
- var onEmojiClick = useOnEmojiClickConfig();
17696
- var _useUpdateSuggested = useUpdateSuggested(),
17697
- updateSuggested = _useUpdateSuggested[1];
17698
- var getEmojiUrl = useGetEmojiUrlConfig();
17699
- var activeEmojiStyle = useEmojiStyleConfig();
17700
- var onClick = useCallback(function onClick(event) {
17701
- if (disallowClickRef.current) {
17702
- return;
17703
- }
17704
- closeAllOpenToggles();
17705
- var _emojiFromEvent = emojiFromEvent(event),
17706
- emoji = _emojiFromEvent[0],
17707
- unified = _emojiFromEvent[1];
17708
- if (!emoji || !unified) {
17709
- return;
17607
+ function ElementRefContextProvider(_ref) {
17608
+ var children = _ref.children;
17609
+ var PickerMainRef = useRef(null);
17610
+ var AnchoredEmojiRef = useRef(null);
17611
+ var BodyRef = useRef(null);
17612
+ var SearchInputRef = useRef(null);
17613
+ var SkinTonePickerRef = useRef(null);
17614
+ var CategoryNavigationRef = useRef(null);
17615
+ var VariationPickerRef = useRef(null);
17616
+ var ReactionsRef = useRef(null);
17617
+ return createElement(ElementRefContext.Provider, {
17618
+ value: {
17619
+ AnchoredEmojiRef: AnchoredEmojiRef,
17620
+ BodyRef: BodyRef,
17621
+ CategoryNavigationRef: CategoryNavigationRef,
17622
+ PickerMainRef: PickerMainRef,
17623
+ SearchInputRef: SearchInputRef,
17624
+ SkinTonePickerRef: SkinTonePickerRef,
17625
+ VariationPickerRef: VariationPickerRef,
17626
+ ReactionsRef: ReactionsRef
17710
17627
  }
17711
- var skinToneToUse = activeVariationFromUnified(unified) || activeSkinTone;
17628
+ }, children);
17629
+ }
17630
+ var ElementRefContext = /*#__PURE__*/createContext({
17631
+ AnchoredEmojiRef: /*#__PURE__*/createRef(),
17632
+ BodyRef: /*#__PURE__*/createRef(),
17633
+ CategoryNavigationRef: /*#__PURE__*/createRef(),
17634
+ PickerMainRef: /*#__PURE__*/createRef(),
17635
+ SearchInputRef: /*#__PURE__*/createRef(),
17636
+ SkinTonePickerRef: /*#__PURE__*/createRef(),
17637
+ VariationPickerRef: /*#__PURE__*/createRef(),
17638
+ ReactionsRef: /*#__PURE__*/createRef()
17639
+ });
17640
+ function useElementRef() {
17641
+ return useContext(ElementRefContext);
17642
+ }
17643
+ function usePickerMainRef() {
17644
+ return useElementRef()['PickerMainRef'];
17645
+ }
17646
+ function useAnchoredEmojiRef() {
17647
+ return useElementRef()['AnchoredEmojiRef'];
17648
+ }
17649
+ function useSetAnchoredEmojiRef() {
17650
+ var AnchoredEmojiRef = useAnchoredEmojiRef();
17651
+ return function (target) {
17652
+ if (target === null && AnchoredEmojiRef.current !== null) {
17653
+ focusElement(AnchoredEmojiRef.current);
17654
+ }
17655
+ AnchoredEmojiRef.current = target;
17656
+ };
17657
+ }
17658
+ function useBodyRef() {
17659
+ return useElementRef()['BodyRef'];
17660
+ }
17661
+ function useReactionsRef() {
17662
+ return useElementRef()['ReactionsRef'];
17663
+ }
17664
+ function useSearchInputRef() {
17665
+ return useElementRef()['SearchInputRef'];
17666
+ }
17667
+ function useSkinTonePickerRef() {
17668
+ return useElementRef()['SkinTonePickerRef'];
17669
+ }
17670
+ function useCategoryNavigationRef() {
17671
+ return useElementRef()['CategoryNavigationRef'];
17672
+ }
17673
+ function useVariationPickerRef() {
17674
+ return useElementRef()['VariationPickerRef'];
17675
+ }
17676
+
17677
+ function useSetVariationPicker() {
17678
+ var setAnchoredEmojiRef = useSetAnchoredEmojiRef();
17679
+ var _useEmojiVariationPic = useEmojiVariationPickerState(),
17680
+ setEmojiVariationPicker = _useEmojiVariationPic[1];
17681
+ return function setVariationPicker(element) {
17682
+ var _emojiFromElement = emojiFromElement(element),
17683
+ emoji = _emojiFromElement[0];
17684
+ if (emoji) {
17685
+ setAnchoredEmojiRef(element);
17686
+ setEmojiVariationPicker(emoji);
17687
+ }
17688
+ };
17689
+ }
17690
+
17691
+ function useMouseDownHandlers(BodyRef) {
17692
+ var mouseDownTimerRef = useRef();
17693
+ var setVariationPicker = useSetVariationPicker();
17694
+ var disallowClickRef = useDisallowClickRef();
17695
+ var _useEmojiVariationPic = useEmojiVariationPickerState(),
17696
+ setEmojiVariationPicker = _useEmojiVariationPic[1];
17697
+ var closeAllOpenToggles = useCloseAllOpenToggles();
17698
+ var _useActiveSkinToneSta = useActiveSkinToneState(),
17699
+ activeSkinTone = _useActiveSkinToneSta[0];
17700
+ var onEmojiClick = useOnEmojiClickConfig();
17701
+ var _useUpdateSuggested = useUpdateSuggested(),
17702
+ updateSuggested = _useUpdateSuggested[1];
17703
+ var getEmojiUrl = useGetEmojiUrlConfig();
17704
+ var activeEmojiStyle = useEmojiStyleConfig();
17705
+ var onClick = useCallback(function onClick(event) {
17706
+ if (disallowClickRef.current) {
17707
+ return;
17708
+ }
17709
+ closeAllOpenToggles();
17710
+ var _emojiFromEvent = emojiFromEvent(event),
17711
+ emoji = _emojiFromEvent[0],
17712
+ unified = _emojiFromEvent[1];
17713
+ if (!emoji || !unified) {
17714
+ return;
17715
+ }
17716
+ var skinToneToUse = activeVariationFromUnified(unified) || activeSkinTone;
17712
17717
  updateSuggested();
17713
17718
  setSuggested(emoji, skinToneToUse);
17714
17719
  onEmojiClick(emojiClickOutput(emoji, skinToneToUse, activeEmojiStyle, getEmojiUrl), event);
@@ -17809,6 +17814,391 @@ function emojiClickOutput(emoji, activeSkinTone, activeEmojiStyle, getEmojiUrl)
17809
17814
  };
17810
17815
  }
17811
17816
 
17817
+ function Button(props) {
17818
+ return createElement("button", Object.assign({
17819
+ type: "button"
17820
+ }, props, {
17821
+ className: cx(styles.button, props.className)
17822
+ }), props.children);
17823
+ }
17824
+ var styles = /*#__PURE__*/stylesheet.create({
17825
+ button: {
17826
+ '.': 'epr-btn',
17827
+ cursor: 'pointer',
17828
+ border: '0',
17829
+ background: 'none',
17830
+ outline: 'none'
17831
+ }
17832
+ });
17833
+
17834
+ function ClickableEmojiButton(_ref) {
17835
+ var _cx;
17836
+ var emojiNames = _ref.emojiNames,
17837
+ unified = _ref.unified,
17838
+ hidden = _ref.hidden,
17839
+ hiddenOnSearch = _ref.hiddenOnSearch,
17840
+ _ref$showVariations = _ref.showVariations,
17841
+ showVariations = _ref$showVariations === void 0 ? true : _ref$showVariations,
17842
+ hasVariations = _ref.hasVariations,
17843
+ children = _ref.children,
17844
+ _ref$round = _ref.round,
17845
+ round = _ref$round === void 0 ? false : _ref$round;
17846
+ return createElement(Button, {
17847
+ className: cx(styles$1.emoji, hidden && commonStyles.hidden, hiddenOnSearch && commonInteractionStyles.hiddenOnSearch, (_cx = {}, _cx[ClassNames.visible] = !hidden && !hiddenOnSearch, _cx), !!(hasVariations && showVariations) && styles$1.hasVariations, round && styles$1.round),
17848
+ "data-unified": unified,
17849
+ "aria-label": emojiNames[0],
17850
+ "data-full-name": emojiNames
17851
+ }, children);
17852
+ }
17853
+ var styles$1 = /*#__PURE__*/stylesheet.create({
17854
+ emoji: {
17855
+ '.': ClassNames.emoji,
17856
+ position: 'relative',
17857
+ width: 'var(--epr-emoji-fullsize)',
17858
+ height: 'var(--epr-emoji-fullsize)',
17859
+ boxSizing: 'border-box',
17860
+ display: 'flex',
17861
+ alignItems: 'center',
17862
+ justifyContent: 'center',
17863
+ maxWidth: 'var(--epr-emoji-fullsize)',
17864
+ maxHeight: 'var(--epr-emoji-fullsize)',
17865
+ borderRadius: '8px',
17866
+ overflow: 'hidden',
17867
+ transition: 'background-color 0.2s',
17868
+ ':hover': {
17869
+ backgroundColor: 'var(--epr-emoji-hover-color)'
17870
+ },
17871
+ ':focus': {
17872
+ backgroundColor: 'var(--epr-focus-bg-color)'
17873
+ }
17874
+ },
17875
+ round: {
17876
+ borderRadius: '50%'
17877
+ },
17878
+ hasVariations: {
17879
+ '.': ClassNames.emojiHasVariations,
17880
+ ':after': {
17881
+ content: '',
17882
+ display: 'block',
17883
+ width: '0',
17884
+ height: '0',
17885
+ right: '0px',
17886
+ bottom: '1px',
17887
+ position: 'absolute',
17888
+ borderLeft: '4px solid transparent',
17889
+ borderRight: '4px solid transparent',
17890
+ transform: 'rotate(135deg)',
17891
+ borderBottom: '4px solid var(--epr-emoji-variation-indicator-color)',
17892
+ zIndex: 'var(--epr-emoji-variations-indictator-z-index)'
17893
+ },
17894
+ ':hover:after': {
17895
+ borderBottom: '4px solid var(--epr-emoji-variation-indicator-color-hover)'
17896
+ }
17897
+ }
17898
+ });
17899
+
17900
+ var emojiStyles = /*#__PURE__*/stylesheet.create({
17901
+ external: {
17902
+ '.': ClassNames.external,
17903
+ fontSize: '0'
17904
+ },
17905
+ common: {
17906
+ alignSelf: 'center',
17907
+ justifySelf: 'center',
17908
+ display: 'block'
17909
+ }
17910
+ });
17911
+
17912
+ function EmojiImg(_ref) {
17913
+ var emojiName = _ref.emojiName,
17914
+ style = _ref.style,
17915
+ _ref$lazyLoad = _ref.lazyLoad,
17916
+ lazyLoad = _ref$lazyLoad === void 0 ? false : _ref$lazyLoad,
17917
+ imgUrl = _ref.imgUrl,
17918
+ onError = _ref.onError,
17919
+ className = _ref.className;
17920
+ return createElement("img", {
17921
+ src: imgUrl,
17922
+ alt: emojiName,
17923
+ className: cx(styles$2.emojiImag, emojiStyles.external, emojiStyles.common, className),
17924
+ loading: lazyLoad ? 'lazy' : 'eager',
17925
+ onError: onError,
17926
+ style: style
17927
+ });
17928
+ }
17929
+ var styles$2 = /*#__PURE__*/stylesheet.create({
17930
+ emojiImag: {
17931
+ '.': 'epr-emoji-img',
17932
+ maxWidth: 'var(--epr-emoji-fullsize)',
17933
+ maxHeight: 'var(--epr-emoji-fullsize)',
17934
+ minWidth: 'var(--epr-emoji-fullsize)',
17935
+ minHeight: 'var(--epr-emoji-fullsize)',
17936
+ padding: 'var(--epr-emoji-padding)'
17937
+ }
17938
+ });
17939
+
17940
+ function NativeEmoji(_ref) {
17941
+ var unified = _ref.unified,
17942
+ style = _ref.style,
17943
+ className = _ref.className;
17944
+ return createElement("span", {
17945
+ className: cx(styles$3.nativeEmoji, emojiStyles.common, emojiStyles.external, className),
17946
+ "data-unified": unified,
17947
+ style: style
17948
+ }, parseNativeEmoji(unified));
17949
+ }
17950
+ var styles$3 = /*#__PURE__*/stylesheet.create({
17951
+ nativeEmoji: {
17952
+ '.': 'epr-emoji-native',
17953
+ fontFamily: '"Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "EmojiOne Color", "Android Emoji"!important',
17954
+ position: 'relative',
17955
+ lineHeight: '100%',
17956
+ fontSize: 'var(--epr-emoji-size)',
17957
+ textAlign: 'center',
17958
+ alignSelf: 'center',
17959
+ justifySelf: 'center',
17960
+ letterSpacing: '0',
17961
+ padding: 'var(--epr-emoji-padding)'
17962
+ }
17963
+ });
17964
+
17965
+ function ViewOnlyEmoji(_ref) {
17966
+ var emoji = _ref.emoji,
17967
+ unified = _ref.unified,
17968
+ emojiStyle = _ref.emojiStyle,
17969
+ size = _ref.size,
17970
+ lazyLoad = _ref.lazyLoad,
17971
+ _ref$getEmojiUrl = _ref.getEmojiUrl,
17972
+ getEmojiUrl = _ref$getEmojiUrl === void 0 ? emojiUrlByUnified : _ref$getEmojiUrl,
17973
+ className = _ref.className;
17974
+ var _useEmojisThatFailedT = useEmojisThatFailedToLoadState(),
17975
+ setEmojisThatFailedToLoad = _useEmojisThatFailedT[1];
17976
+ var style = {};
17977
+ if (size) {
17978
+ style.width = style.height = style.fontSize = size + "px";
17979
+ }
17980
+ var emojiToRender = emoji ? emoji : emojiByUnified(unified);
17981
+ if (!emojiToRender) {
17982
+ return null;
17983
+ }
17984
+ if (isCustomEmoji(emojiToRender)) {
17985
+ return createElement(EmojiImg, {
17986
+ style: style,
17987
+ emojiName: unified,
17988
+ emojiStyle: EmojiStyle.NATIVE,
17989
+ lazyLoad: lazyLoad,
17990
+ imgUrl: emojiToRender.imgUrl,
17991
+ onError: onError,
17992
+ className: className
17993
+ });
17994
+ }
17995
+ return createElement(Fragment, null, emojiStyle === EmojiStyle.NATIVE ? createElement(NativeEmoji, {
17996
+ unified: unified,
17997
+ style: style,
17998
+ className: className
17999
+ }) : createElement(EmojiImg, {
18000
+ style: style,
18001
+ emojiName: emojiName(emojiToRender),
18002
+ emojiStyle: emojiStyle,
18003
+ lazyLoad: lazyLoad,
18004
+ imgUrl: getEmojiUrl(unified, emojiStyle),
18005
+ onError: onError,
18006
+ className: className
18007
+ }));
18008
+ function onError() {
18009
+ setEmojisThatFailedToLoad(function (prev) {
18010
+ return new Set(prev).add(unified);
18011
+ });
18012
+ }
18013
+ }
18014
+
18015
+ function ClickableEmoji(_ref) {
18016
+ var emoji = _ref.emoji,
18017
+ unified = _ref.unified,
18018
+ hidden = _ref.hidden,
18019
+ hiddenOnSearch = _ref.hiddenOnSearch,
18020
+ emojiStyle = _ref.emojiStyle,
18021
+ _ref$showVariations = _ref.showVariations,
18022
+ showVariations = _ref$showVariations === void 0 ? true : _ref$showVariations,
18023
+ size = _ref.size,
18024
+ lazyLoad = _ref.lazyLoad,
18025
+ getEmojiUrl = _ref.getEmojiUrl,
18026
+ _ref$round = _ref.round,
18027
+ round = _ref$round === void 0 ? false : _ref$round;
18028
+ var hasVariations = emojiHasVariations(emoji);
18029
+ return createElement(ClickableEmojiButton, {
18030
+ hasVariations: hasVariations,
18031
+ showVariations: showVariations,
18032
+ hidden: hidden,
18033
+ hiddenOnSearch: hiddenOnSearch,
18034
+ emojiNames: emojiNames(emoji),
18035
+ unified: unified,
18036
+ round: round
18037
+ }, createElement(ViewOnlyEmoji, {
18038
+ unified: unified,
18039
+ emoji: emoji,
18040
+ size: size,
18041
+ emojiStyle: emojiStyle,
18042
+ lazyLoad: lazyLoad,
18043
+ getEmojiUrl: getEmojiUrl
18044
+ }));
18045
+ }
18046
+
18047
+ var Plus = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI4LjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjgwcHgiIHZpZXdCb3g9IjAgMCAyMCA4MCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMjAgODAiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8cGF0aCBmaWxsPSIjODY4Njg2IiBkPSJNNS43LDEwLjRjMCwwLjEsMC4xLDAuMywwLjIsMC40QzYsMTAuOSw2LjEsMTEsNi4zLDExaDMuNHYzLjRjMCwwLjEsMC4xLDAuMywwLjIsMC40CgljMC4xLDAuMSwwLjIsMC4yLDAuNCwwLjJjMC4zLDAsMC41LTAuMiwwLjUtMC41di0zLjRoMy40YzAuMywwLDAuNS0wLjIsMC41LTAuNXMtMC4yLTAuNS0wLjUtMC41aC0zLjRWNi43YzAtMC4zLTAuMi0wLjUtMC41LTAuNQoJQzkuOCw2LDkuNiw2LjIsOS42LDYuNXYzLjRINi4yQzUuOSw5LjksNS43LDEwLjEsNS43LDEwLjRMNS43LDEwLjR6Ii8+CjxwYXRoIGZpbGw9IiMzMzcxQjciIGQ9Ik01LjcsMzAuNGMwLDAuMSwwLjEsMC4zLDAuMiwwLjRTNi4xLDMxLDYuMywzMWgzLjR2My40YzAsMC4xLDAuMSwwLjMsMC4yLDAuNGMwLjEsMC4xLDAuMiwwLjIsMC40LDAuMgoJYzAuMywwLDAuNS0wLjIsMC41LTAuNXYtMy40aDMuNGMwLjMsMCwwLjUtMC4yLDAuNS0wLjVzLTAuMi0wLjUtMC41LTAuNWgtMy40di0zLjRjMC0wLjMtMC4yLTAuNS0wLjUtMC41cy0wLjUsMC4yLTAuNSwwLjV2My40SDYuMgoJQzUuOSwyOS45LDUuNywzMC4xLDUuNywzMC40TDUuNywzMC40eiIvPgo8cGF0aCBmaWxsPSIjQzBDMEJGIiBkPSJNNS43LDUwLjRjMCwwLjEsMC4xLDAuMywwLjIsMC40QzYsNTAuOSw2LjEsNTEsNi4zLDUxaDMuNHYzLjRjMCwwLjEsMC4xLDAuMywwLjIsMC40CgljMC4xLDAuMSwwLjIsMC4yLDAuNCwwLjJjMC4zLDAsMC41LTAuMiwwLjUtMC41di0zLjRoMy40YzAuMywwLDAuNS0wLjIsMC41LTAuNXMtMC4yLTAuNS0wLjUtMC41aC0zLjR2LTMuNGMwLTAuMy0wLjItMC41LTAuNS0wLjUKCXMtMC41LDAuMi0wLjUsMC41djMuNEg2LjJDNS45LDQ5LjksNS43LDUwLjEsNS43LDUwLjRMNS43LDUwLjR6Ii8+CjxwYXRoIGZpbGw9IiM2QUE5REQiIGQ9Ik01LjcsNzAuNGMwLDAuMSwwLjEsMC4zLDAuMiwwLjRTNi4xLDcxLDYuMyw3MWgzLjR2My40YzAsMC4xLDAuMSwwLjMsMC4yLDAuNGMwLjEsMC4xLDAuMiwwLjIsMC40LDAuMgoJYzAuMywwLDAuNS0wLjIsMC41LTAuNXYtMy40aDMuNGMwLjMsMCwwLjUtMC4yLDAuNS0wLjVzLTAuMi0wLjUtMC41LTAuNWgtMy40di0zLjRjMC0wLjMtMC4yLTAuNS0wLjUtMC41cy0wLjUsMC4yLTAuNSwwLjV2My40SDYuNAoJQzUuOSw2OS45LDUuNyw3MC4xLDUuNyw3MC40TDUuNyw3MC40eiIvPgo8L3N2Zz4=';
18048
+
18049
+ function BtnPlus() {
18050
+ var _useReactionsModeStat = useReactionsModeState(),
18051
+ setReactionsMode = _useReactionsModeStat[1];
18052
+ return createElement(Button, {
18053
+ "aria-label": "Show all Emojis",
18054
+ title: "Show all Emojis",
18055
+ tabIndex: 0,
18056
+ className: cx(styles$4.plusSign),
18057
+ onClick: function onClick() {
18058
+ return setReactionsMode(false);
18059
+ }
18060
+ });
18061
+ }
18062
+ var styles$4 = /*#__PURE__*/stylesheet.create({
18063
+ plusSign: {
18064
+ fontSize: '20px',
18065
+ padding: '18px',
18066
+ color: 'var(--epr-text-color)',
18067
+ borderRadius: '50%',
18068
+ textAlign: 'center',
18069
+ lineHeight: '100%',
18070
+ width: '20px',
18071
+ height: '20px',
18072
+ display: 'flex',
18073
+ justifyContent: 'center',
18074
+ alignItems: 'center',
18075
+ transition: 'background-color 0.1s ease-in-out',
18076
+ ':after': {
18077
+ content: '',
18078
+ minWidth: '20px',
18079
+ minHeight: '20px',
18080
+ backgroundImage: "url(" + Plus + ")",
18081
+ backgroundColor: 'transparent',
18082
+ backgroundRepeat: 'no-repeat',
18083
+ backgroundSize: '20px',
18084
+ backgroundPositionY: '0'
18085
+ },
18086
+ ':hover': {
18087
+ color: 'var(--epr-highlight-color)',
18088
+ backgroundColor: 'var(--epr-hover-bg-color)',
18089
+ // @ts-ignore
18090
+ ':after': {
18091
+ backgroundPositionY: '-20px'
18092
+ }
18093
+ },
18094
+ ':focus': {
18095
+ color: 'var(--epr-highlight-color)',
18096
+ backgroundColor: 'var(--epr-hover-bg-color)',
18097
+ // @ts-ignore
18098
+ ':after': {
18099
+ backgroundPositionY: '-40px'
18100
+ }
18101
+ }
18102
+ },
18103
+ '.epr-dark-theme': {
18104
+ plusSign: {
18105
+ ':after': {
18106
+ backgroundPositionY: '-40px'
18107
+ },
18108
+ ':hover:after': {
18109
+ backgroundPositionY: '-60px'
18110
+ }
18111
+ }
18112
+ },
18113
+ '.epr-auto-theme': {
18114
+ plusSign: {
18115
+ '@media (prefers-color-scheme: dark)': {
18116
+ ':after': {
18117
+ backgroundPositionY: '-40px'
18118
+ },
18119
+ ':hover:after': {
18120
+ backgroundPositionY: '-60px'
18121
+ }
18122
+ }
18123
+ }
18124
+ }
18125
+ });
18126
+
18127
+ function Reactions() {
18128
+ var _useReactionsModeStat = useReactionsModeState(),
18129
+ reactionsOpen = _useReactionsModeStat[0];
18130
+ var ReactionsRef = useReactionsRef();
18131
+ var reactions = useReactionsConfig();
18132
+ useMouseDownHandlers(ReactionsRef);
18133
+ var emojiStyle = useEmojiStyleConfig();
18134
+ if (!reactionsOpen) {
18135
+ return null;
18136
+ }
18137
+ return createElement("ul", {
18138
+ className: cx(styles$5.list, !reactionsOpen && commonStyles.hidden),
18139
+ ref: ReactionsRef
18140
+ }, reactions.map(function (reaction) {
18141
+ return createElement("li", {
18142
+ key: reaction
18143
+ }, createElement(ClickableEmoji, {
18144
+ emoji: emojiByUnified(reaction),
18145
+ emojiStyle: emojiStyle,
18146
+ unified: reaction,
18147
+ showVariations: false,
18148
+ round: true
18149
+ }));
18150
+ }), createElement("li", null, createElement(BtnPlus, null)));
18151
+ }
18152
+ var styles$5 = /*#__PURE__*/stylesheet.create({
18153
+ list: {
18154
+ listStyle: 'none',
18155
+ margin: '0',
18156
+ padding: '0 5px',
18157
+ display: 'flex',
18158
+ justifyContent: 'space-between',
18159
+ alignItems: 'center',
18160
+ height: '100%'
18161
+ }
18162
+ });
18163
+
18164
+ function useDisallowMouseMove() {
18165
+ var DisallowMouseRef = useDisallowMouseRef();
18166
+ return function disallowMouseMove() {
18167
+ DisallowMouseRef.current = true;
18168
+ };
18169
+ }
18170
+ function useAllowMouseMove() {
18171
+ var DisallowMouseRef = useDisallowMouseRef();
18172
+ return function allowMouseMove() {
18173
+ DisallowMouseRef.current = false;
18174
+ };
18175
+ }
18176
+ function useIsMouseDisallowed() {
18177
+ var DisallowMouseRef = useDisallowMouseRef();
18178
+ return function isMouseDisallowed() {
18179
+ return DisallowMouseRef.current;
18180
+ };
18181
+ }
18182
+ function useOnMouseMove() {
18183
+ var BodyRef = useBodyRef();
18184
+ var allowMouseMove = useAllowMouseMove();
18185
+ var isMouseDisallowed = useIsMouseDisallowed();
18186
+ useEffect(function () {
18187
+ var bodyRef = BodyRef.current;
18188
+ bodyRef == null ? void 0 : bodyRef.addEventListener('mousemove', onMouseMove, {
18189
+ passive: true
18190
+ });
18191
+ function onMouseMove() {
18192
+ if (isMouseDisallowed()) {
18193
+ allowMouseMove();
18194
+ }
18195
+ }
18196
+ return function () {
18197
+ bodyRef == null ? void 0 : bodyRef.removeEventListener('mousemove', onMouseMove);
18198
+ };
18199
+ }, [BodyRef, allowMouseMove, isMouseDisallowed]);
18200
+ }
18201
+
17812
18202
  function useOnScroll(BodyRef) {
17813
18203
  var closeAllOpenToggles = useCloseAllOpenToggles();
17814
18204
  useEffect(function () {
@@ -18052,228 +18442,6 @@ function useIsEmojiHidden() {
18052
18442
  };
18053
18443
  }
18054
18444
 
18055
- function Button(props) {
18056
- return createElement("button", Object.assign({
18057
- type: "button"
18058
- }, props, {
18059
- className: cx(styles.button, props.className)
18060
- }), props.children);
18061
- }
18062
- var styles = /*#__PURE__*/stylesheet.create({
18063
- button: {
18064
- '.': 'epr-btn',
18065
- cursor: 'pointer',
18066
- border: '0',
18067
- background: 'none',
18068
- outline: 'none'
18069
- }
18070
- });
18071
-
18072
- function ClickableEmojiButton(_ref) {
18073
- var _cx;
18074
- var emojiNames = _ref.emojiNames,
18075
- unified = _ref.unified,
18076
- hidden = _ref.hidden,
18077
- hiddenOnSearch = _ref.hiddenOnSearch,
18078
- _ref$showVariations = _ref.showVariations,
18079
- showVariations = _ref$showVariations === void 0 ? true : _ref$showVariations,
18080
- hasVariations = _ref.hasVariations,
18081
- children = _ref.children;
18082
- return createElement(Button, {
18083
- className: cx(styles$1.emoji, hidden && commonStyles.hidden, hiddenOnSearch && commonInteractionStyles.hiddenOnSearch, (_cx = {}, _cx[ClassNames.visible] = !hidden && !hiddenOnSearch, _cx), !!(hasVariations && showVariations) && styles$1.hasVariations),
18084
- "data-unified": unified,
18085
- "aria-label": emojiNames[0],
18086
- "data-full-name": emojiNames
18087
- }, children);
18088
- }
18089
- var styles$1 = /*#__PURE__*/stylesheet.create({
18090
- emoji: {
18091
- '.': ClassNames.emoji,
18092
- position: 'relative',
18093
- width: 'var(--epr-emoji-fullsize)',
18094
- height: 'var(--epr-emoji-fullsize)',
18095
- boxSizing: 'border-box',
18096
- display: 'flex',
18097
- alignItems: 'center',
18098
- justifyContent: 'center',
18099
- maxWidth: 'var(--epr-emoji-fullsize)',
18100
- maxHeight: 'var(--epr-emoji-fullsize)',
18101
- borderRadius: '8px',
18102
- overflow: 'hidden',
18103
- transition: 'background-color 0.2s',
18104
- ':hover': {
18105
- backgroundColor: 'var(--epr-emoji-hover-color)'
18106
- },
18107
- ':focus': {
18108
- backgroundColor: 'var(--epr-focus-bg-color)'
18109
- }
18110
- },
18111
- hasVariations: {
18112
- '.': ClassNames.emojiHasVariations,
18113
- ':after': {
18114
- content: '',
18115
- display: 'block',
18116
- width: '0',
18117
- height: '0',
18118
- right: '0px',
18119
- bottom: '1px',
18120
- position: 'absolute',
18121
- borderLeft: '4px solid transparent',
18122
- borderRight: '4px solid transparent',
18123
- transform: 'rotate(135deg)',
18124
- borderBottom: '4px solid var(--epr-emoji-variation-indicator-color)',
18125
- zIndex: 'var(--epr-emoji-variations-indictator-z-index)'
18126
- },
18127
- ':hover:after': {
18128
- borderBottom: '4px solid var(--epr-emoji-variation-indicator-color-hover)'
18129
- }
18130
- }
18131
- });
18132
-
18133
- var emojiStyles = /*#__PURE__*/stylesheet.create({
18134
- external: {
18135
- '.': ClassNames.external,
18136
- fontSize: '0'
18137
- },
18138
- common: {
18139
- alignSelf: 'center',
18140
- justifySelf: 'center',
18141
- display: 'block'
18142
- }
18143
- });
18144
-
18145
- function EmojiImg(_ref) {
18146
- var emojiName = _ref.emojiName,
18147
- style = _ref.style,
18148
- _ref$lazyLoad = _ref.lazyLoad,
18149
- lazyLoad = _ref$lazyLoad === void 0 ? false : _ref$lazyLoad,
18150
- imgUrl = _ref.imgUrl,
18151
- onError = _ref.onError,
18152
- className = _ref.className;
18153
- return createElement("img", {
18154
- src: imgUrl,
18155
- alt: emojiName,
18156
- className: cx(styles$2.emojiImag, emojiStyles.external, emojiStyles.common, className),
18157
- loading: lazyLoad ? 'lazy' : 'eager',
18158
- onError: onError,
18159
- style: style
18160
- });
18161
- }
18162
- var styles$2 = /*#__PURE__*/stylesheet.create({
18163
- emojiImag: {
18164
- '.': 'epr-emoji-img',
18165
- maxWidth: 'var(--epr-emoji-fullsize)',
18166
- maxHeight: 'var(--epr-emoji-fullsize)',
18167
- minWidth: 'var(--epr-emoji-fullsize)',
18168
- minHeight: 'var(--epr-emoji-fullsize)',
18169
- padding: 'var(--epr-emoji-padding)'
18170
- }
18171
- });
18172
-
18173
- function NativeEmoji(_ref) {
18174
- var unified = _ref.unified,
18175
- style = _ref.style,
18176
- className = _ref.className;
18177
- return createElement("span", {
18178
- className: cx(styles$3.nativeEmoji, emojiStyles.common, emojiStyles.external, className),
18179
- "data-unified": unified,
18180
- style: style
18181
- }, parseNativeEmoji(unified));
18182
- }
18183
- var styles$3 = /*#__PURE__*/stylesheet.create({
18184
- nativeEmoji: {
18185
- '.': 'epr-emoji-native',
18186
- fontFamily: '"Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "EmojiOne Color", "Android Emoji"!important',
18187
- position: 'relative',
18188
- lineHeight: '100%',
18189
- fontSize: 'var(--epr-emoji-size)',
18190
- textAlign: 'center',
18191
- alignSelf: 'center',
18192
- justifySelf: 'center',
18193
- letterSpacing: '0',
18194
- padding: 'var(--epr-emoji-padding)'
18195
- }
18196
- });
18197
-
18198
- function ViewOnlyEmoji(_ref) {
18199
- var emoji = _ref.emoji,
18200
- unified = _ref.unified,
18201
- emojiStyle = _ref.emojiStyle,
18202
- size = _ref.size,
18203
- lazyLoad = _ref.lazyLoad,
18204
- _ref$getEmojiUrl = _ref.getEmojiUrl,
18205
- getEmojiUrl = _ref$getEmojiUrl === void 0 ? emojiUrlByUnified : _ref$getEmojiUrl,
18206
- className = _ref.className;
18207
- var _useEmojisThatFailedT = useEmojisThatFailedToLoadState(),
18208
- setEmojisThatFailedToLoad = _useEmojisThatFailedT[1];
18209
- var style = {};
18210
- if (size) {
18211
- style.width = style.height = style.fontSize = size + "px";
18212
- }
18213
- var emojiToRender = emoji ? emoji : emojiByUnified(unified);
18214
- if (!emojiToRender) {
18215
- return null;
18216
- }
18217
- if (isCustomEmoji(emojiToRender)) {
18218
- return createElement(EmojiImg, {
18219
- style: style,
18220
- emojiName: unified,
18221
- emojiStyle: EmojiStyle.NATIVE,
18222
- lazyLoad: lazyLoad,
18223
- imgUrl: emojiToRender.imgUrl,
18224
- onError: onError,
18225
- className: className
18226
- });
18227
- }
18228
- return createElement(Fragment, null, emojiStyle === EmojiStyle.NATIVE ? createElement(NativeEmoji, {
18229
- unified: unified,
18230
- style: style,
18231
- className: className
18232
- }) : createElement(EmojiImg, {
18233
- style: style,
18234
- emojiName: emojiName(emojiToRender),
18235
- emojiStyle: emojiStyle,
18236
- lazyLoad: lazyLoad,
18237
- imgUrl: getEmojiUrl(unified, emojiStyle),
18238
- onError: onError,
18239
- className: className
18240
- }));
18241
- function onError() {
18242
- setEmojisThatFailedToLoad(function (prev) {
18243
- return new Set(prev).add(unified);
18244
- });
18245
- }
18246
- }
18247
-
18248
- function ClickableEmoji(_ref) {
18249
- var emoji = _ref.emoji,
18250
- unified = _ref.unified,
18251
- hidden = _ref.hidden,
18252
- hiddenOnSearch = _ref.hiddenOnSearch,
18253
- emojiStyle = _ref.emojiStyle,
18254
- _ref$showVariations = _ref.showVariations,
18255
- showVariations = _ref$showVariations === void 0 ? true : _ref$showVariations,
18256
- size = _ref.size,
18257
- lazyLoad = _ref.lazyLoad,
18258
- getEmojiUrl = _ref.getEmojiUrl;
18259
- var hasVariations = emojiHasVariations(emoji);
18260
- return createElement(ClickableEmojiButton, {
18261
- hasVariations: hasVariations,
18262
- showVariations: showVariations,
18263
- hidden: hidden,
18264
- hiddenOnSearch: hiddenOnSearch,
18265
- emojiNames: emojiNames(emoji),
18266
- unified: unified
18267
- }, createElement(ViewOnlyEmoji, {
18268
- unified: unified,
18269
- emoji: emoji,
18270
- size: size,
18271
- emojiStyle: emojiStyle,
18272
- lazyLoad: lazyLoad,
18273
- getEmojiUrl: getEmojiUrl
18274
- }));
18275
- }
18276
-
18277
18445
  function EmojiCategory(_ref) {
18278
18446
  var categoryConfig = _ref.categoryConfig,
18279
18447
  children = _ref.children,
@@ -18282,16 +18450,16 @@ function EmojiCategory(_ref) {
18282
18450
  var category = categoryFromCategoryConfig(categoryConfig);
18283
18451
  var categoryName = categoryNameFromCategoryConfig(categoryConfig);
18284
18452
  return createElement("li", {
18285
- className: cx(styles$4.category, hidden && commonStyles.hidden, hiddenOnSearch && commonInteractionStyles.hiddenOnSearch),
18453
+ className: cx(styles$6.category, hidden && commonStyles.hidden, hiddenOnSearch && commonInteractionStyles.hiddenOnSearch),
18286
18454
  "data-name": category,
18287
18455
  "aria-label": categoryName
18288
18456
  }, createElement("h2", {
18289
- className: cx(styles$4.label)
18457
+ className: cx(styles$6.label)
18290
18458
  }, categoryName), createElement("div", {
18291
- className: cx(styles$4.categoryContent)
18459
+ className: cx(styles$6.categoryContent)
18292
18460
  }, children));
18293
18461
  }
18294
- var styles$4 = /*#__PURE__*/stylesheet.create({
18462
+ var styles$6 = /*#__PURE__*/stylesheet.create({
18295
18463
  category: {
18296
18464
  '.': ClassNames.category,
18297
18465
  ':not(:has(.epr-visible))': {
@@ -18369,7 +18537,7 @@ function EmojiList() {
18369
18537
  var categories = useCategoriesConfig();
18370
18538
  var renderdCategoriesCountRef = useRef(0);
18371
18539
  return createElement("ul", {
18372
- className: cx(styles$5.emojiList)
18540
+ className: cx(styles$7.emojiList)
18373
18541
  }, categories.map(function (categoryConfig) {
18374
18542
  var category = categoryFromCategoryConfig(categoryConfig);
18375
18543
  if (category === Categories.SUGGESTED) {
@@ -18438,7 +18606,7 @@ function RenderCategory(_ref) {
18438
18606
  hidden: hiddenCounter === emojis.length
18439
18607
  }, emojis);
18440
18608
  }
18441
- var styles$5 = /*#__PURE__*/stylesheet.create({
18609
+ var styles$7 = /*#__PURE__*/stylesheet.create({
18442
18610
  emojiList: {
18443
18611
  '.': ClassNames.emojiList,
18444
18612
  listStyle: 'none',
@@ -18577,7 +18745,7 @@ function EmojiVariationPicker() {
18577
18745
  }
18578
18746
  return createElement("div", {
18579
18747
  ref: VariationPickerRef,
18580
- className: cx(styles$6.variationPicker, getMenuDirection() === Direction.Down && styles$6.pointingUp, visible && styles$6.visible),
18748
+ className: cx(styles$8.variationPicker, getMenuDirection() === Direction.Down && styles$8.pointingUp, visible && styles$8.visible),
18581
18749
  style: {
18582
18750
  top: top
18583
18751
  }
@@ -18591,7 +18759,7 @@ function EmojiVariationPicker() {
18591
18759
  getEmojiUrl: getEmojiUrl
18592
18760
  });
18593
18761
  }) : null, createElement("div", {
18594
- className: cx(styles$6.pointer),
18762
+ className: cx(styles$8.pointer),
18595
18763
  style: pointerStyle
18596
18764
  }));
18597
18765
  }
@@ -18647,7 +18815,7 @@ function useVariationPickerTop(VariationPickerRef) {
18647
18815
  return emojiOffsetTop - height;
18648
18816
  }
18649
18817
  }
18650
- var styles$6 = /*#__PURE__*/stylesheet.create({
18818
+ var styles$8 = /*#__PURE__*/stylesheet.create({
18651
18819
  variationPicker: {
18652
18820
  '.': ClassNames.variationPicker,
18653
18821
  position: 'absolute',
@@ -18720,11 +18888,11 @@ function Body() {
18720
18888
  useMouseDownHandlers(BodyRef);
18721
18889
  useOnMouseMove();
18722
18890
  return createElement("div", {
18723
- className: cx(styles$7.body),
18891
+ className: cx(styles$9.body, commonInteractionStyles.hiddenOnReactions),
18724
18892
  ref: BodyRef
18725
18893
  }, createElement(EmojiVariationPicker, null), createElement(EmojiList, null));
18726
18894
  }
18727
- var styles$7 = /*#__PURE__*/stylesheet.create({
18895
+ var styles$9 = /*#__PURE__*/stylesheet.create({
18728
18896
  body: {
18729
18897
  '.': ClassNames.scrollBody,
18730
18898
  flex: '1',
@@ -18824,10 +18992,10 @@ function Flex(_ref) {
18824
18992
  direction = _ref$direction === void 0 ? FlexDirection.ROW : _ref$direction;
18825
18993
  return createElement("div", {
18826
18994
  style: _extends({}, style),
18827
- className: cx(styles$8.flex, className, styles$8[direction])
18995
+ className: cx(styles$a.flex, className, styles$a[direction])
18828
18996
  }, children);
18829
18997
  }
18830
- var styles$8 = /*#__PURE__*/stylesheet.create((_stylesheet$create = {
18998
+ var styles$a = /*#__PURE__*/stylesheet.create((_stylesheet$create = {
18831
18999
  flex: {
18832
19000
  display: 'flex'
18833
19001
  }
@@ -18883,13 +19051,13 @@ function BtnSkinToneVariation(_ref) {
18883
19051
  return createElement(Button, {
18884
19052
  style: style,
18885
19053
  onClick: onClick,
18886
- className: cx("epr-tone-" + skinToneVariation, styles$9.tone, !isOpen && styles$9.closedTone, isActive && styles$9.active),
19054
+ className: cx("epr-tone-" + skinToneVariation, styles$b.tone, !isOpen && styles$b.closedTone, isActive && styles$b.active),
18887
19055
  tabIndex: isOpen ? 0 : -1,
18888
19056
  "aria-pressed": isActive,
18889
19057
  "aria-label": "Skin tone " + skinTonesNamed[skinToneVariation]
18890
19058
  });
18891
19059
  }
18892
- var styles$9 = /*#__PURE__*/stylesheet.create({
19060
+ var styles$b = /*#__PURE__*/stylesheet.create({
18893
19061
  closedTone: {
18894
19062
  opacity: '0',
18895
19063
  zIndex: '0'
@@ -18965,7 +19133,7 @@ function SkinTonePicker(_ref) {
18965
19133
  var expandedSize = isOpen ? fullWidth : ITEM_SIZE + 'px';
18966
19134
  var vertical = direction === SkinTonePickerDirection.VERTICAL;
18967
19135
  return createElement(Relative, {
18968
- className: cx(styles$a.skinTones, vertical && styles$a.vertical, isOpen && styles$a.open, vertical && isOpen && styles$a.verticalShadow),
19136
+ className: cx(styles$c.skinTones, vertical && styles$c.vertical, isOpen && styles$c.open, vertical && isOpen && styles$c.verticalShadow),
18969
19137
  style: vertical ? {
18970
19138
  flexBasis: expandedSize,
18971
19139
  height: expandedSize
@@ -18973,7 +19141,7 @@ function SkinTonePicker(_ref) {
18973
19141
  flexBasis: expandedSize
18974
19142
  }
18975
19143
  }, createElement("div", {
18976
- className: cx(styles$a.select),
19144
+ className: cx(styles$c.select),
18977
19145
  ref: SkinTonePickerRef
18978
19146
  }, skinToneVariations.map(function (skinToneVariation, i) {
18979
19147
  var active = skinToneVariation === activeSkinTone;
@@ -19002,7 +19170,7 @@ var SkinTonePickerDirection;
19002
19170
  SkinTonePickerDirection["VERTICAL"] = "epr-vertical";
19003
19171
  SkinTonePickerDirection["HORIZONTAL"] = "epr-horizontal";
19004
19172
  })(SkinTonePickerDirection || (SkinTonePickerDirection = {}));
19005
- var styles$a = /*#__PURE__*/stylesheet.create({
19173
+ var styles$c = /*#__PURE__*/stylesheet.create({
19006
19174
  skinTones: {
19007
19175
  '.': 'epr-skin-tones',
19008
19176
  '--': {
@@ -19068,7 +19236,7 @@ function Preview() {
19068
19236
  return null;
19069
19237
  }
19070
19238
  return createElement(Flex, {
19071
- className: cx(styles$b.preview)
19239
+ className: cx(styles$d.preview, commonInteractionStyles.hiddenOnReactions)
19072
19240
  }, createElement(PreviewBody, null), createElement(Space, null), isSkinToneInPreview ? createElement(SkinTonePickerMenu, null) : null);
19073
19241
  }
19074
19242
  function PreviewBody() {
@@ -19097,20 +19265,20 @@ function PreviewBody() {
19097
19265
  emojiStyle: emojiStyle,
19098
19266
  size: 45,
19099
19267
  getEmojiUrl: getEmojiUrl,
19100
- className: cx(styles$b.emoji)
19268
+ className: cx(styles$d.emoji)
19101
19269
  }) : defaultEmoji ? createElement(ViewOnlyEmoji, {
19102
19270
  unified: emojiUnified(defaultEmoji),
19103
19271
  emoji: defaultEmoji,
19104
19272
  emojiStyle: emojiStyle,
19105
19273
  size: 45,
19106
19274
  getEmojiUrl: getEmojiUrl,
19107
- className: cx(styles$b.emoji)
19275
+ className: cx(styles$d.emoji)
19108
19276
  }) : null), createElement("div", {
19109
- className: cx(styles$b.label)
19277
+ className: cx(styles$d.label)
19110
19278
  }, show ? emojiName(emoji) : defaultText));
19111
19279
  }
19112
19280
  }
19113
- var styles$b = /*#__PURE__*/stylesheet.create({
19281
+ var styles$d = /*#__PURE__*/stylesheet.create({
19114
19282
  preview: {
19115
19283
  alignItems: 'center',
19116
19284
  borderTop: '1px solid var(--epr-preview-border-color)',
@@ -19214,7 +19382,7 @@ function CategoryButton(_ref) {
19214
19382
  onClick = _ref.onClick;
19215
19383
  return createElement(Button, {
19216
19384
  tabIndex: allowNavigation ? 0 : -1,
19217
- className: cx(styles$c.catBtn, commonInteractionStyles.categoryBtn, "epr-icn-" + category, (_cx = {}, _cx[ClassNames.active] = isActiveCategory, _cx)),
19385
+ className: cx(styles$e.catBtn, commonInteractionStyles.categoryBtn, "epr-icn-" + category, (_cx = {}, _cx[ClassNames.active] = isActiveCategory, _cx)),
19218
19386
  onClick: onClick,
19219
19387
  "aria-label": categoryNameFromCategoryConfig(categoryConfig),
19220
19388
  "aria-selected": isActiveCategory,
@@ -19236,7 +19404,7 @@ var DarkInactivePosition = {
19236
19404
  }
19237
19405
  }
19238
19406
  };
19239
- var styles$c = /*#__PURE__*/stylesheet.create({
19407
+ var styles$e = /*#__PURE__*/stylesheet.create({
19240
19408
  catBtn: {
19241
19409
  '.': 'epr-cat-btn',
19242
19410
  display: 'inline-block',
@@ -19311,7 +19479,7 @@ function CategoryNavigation() {
19311
19479
  var CategoryNavigationRef = useCategoryNavigationRef();
19312
19480
  var hideCustomCategory = useShouldHideCustomEmojis();
19313
19481
  return createElement("div", {
19314
- className: cx(styles$d.nav),
19482
+ className: cx(styles$f.nav),
19315
19483
  role: "tablist",
19316
19484
  "aria-label": "Category navigation",
19317
19485
  id: "epr-category-nav-id",
@@ -19336,7 +19504,7 @@ function CategoryNavigation() {
19336
19504
  });
19337
19505
  }));
19338
19506
  }
19339
- var styles$d = /*#__PURE__*/stylesheet.create({
19507
+ var styles$f = /*#__PURE__*/stylesheet.create({
19340
19508
  nav: {
19341
19509
  '.': 'epr-category-nav',
19342
19510
  display: 'flex',
@@ -19365,12 +19533,12 @@ var SVGTimes = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz
19365
19533
  function BtnClearSearch() {
19366
19534
  var clearSearch = useClearSearch();
19367
19535
  return createElement(Button, {
19368
- className: cx(styles$e.btnClearSearch, commonInteractionStyles.visibleOnSearchOnly),
19536
+ className: cx(styles$g.btnClearSearch, commonInteractionStyles.visibleOnSearchOnly),
19369
19537
  onClick: clearSearch,
19370
19538
  "aria-label": "Clear",
19371
19539
  title: "Clear"
19372
19540
  }, createElement("div", {
19373
- className: cx(styles$e.icnClearnSearch)
19541
+ className: cx(styles$g.icnClearnSearch)
19374
19542
  }));
19375
19543
  }
19376
19544
  var HoverDark = {
@@ -19380,7 +19548,7 @@ var HoverDark = {
19380
19548
  }
19381
19549
  }
19382
19550
  };
19383
- var styles$e = /*#__PURE__*/stylesheet.create({
19551
+ var styles$g = /*#__PURE__*/stylesheet.create({
19384
19552
  btnClearSearch: {
19385
19553
  '.': 'epr-btn-clear-search',
19386
19554
  position: 'absolute',
@@ -19453,10 +19621,10 @@ var SVGMagnifier = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZG
19453
19621
 
19454
19622
  function IcnSearch() {
19455
19623
  return createElement("div", {
19456
- className: cx(styles$f.icnSearch)
19624
+ className: cx(styles$h.icnSearch)
19457
19625
  });
19458
19626
  }
19459
- var styles$f = /*#__PURE__*/stylesheet.create({
19627
+ var styles$h = /*#__PURE__*/stylesheet.create({
19460
19628
  icnSearch: {
19461
19629
  '.': 'epr-icn-search',
19462
19630
  content: '',
@@ -19492,7 +19660,7 @@ function SearchContainer() {
19492
19660
  return null;
19493
19661
  }
19494
19662
  return createElement(Flex, {
19495
- className: cx(styles$g.overlay)
19663
+ className: cx(styles$i.overlay)
19496
19664
  }, createElement(Search, null), isSkinToneInSearch ? createElement(SkinTonePicker, null) : null);
19497
19665
  }
19498
19666
  function Search() {
@@ -19510,7 +19678,7 @@ function Search() {
19510
19678
  var input = SearchInputRef == null ? void 0 : SearchInputRef.current;
19511
19679
  var value = input == null ? void 0 : input.value;
19512
19680
  return createElement(Relative, {
19513
- className: cx(styles$g.searchContainer)
19681
+ className: cx(styles$i.searchContainer)
19514
19682
  }, createElement(CssSearch, {
19515
19683
  value: value
19516
19684
  }), createElement("input", {
@@ -19518,7 +19686,7 @@ function Search() {
19518
19686
  autoFocus: autoFocus,
19519
19687
  "aria-label": 'Type to search for an emoji',
19520
19688
  onFocus: closeAllOpenToggles,
19521
- className: cx(styles$g.search),
19689
+ className: cx(styles$i.search),
19522
19690
  type: "text",
19523
19691
  "aria-controls": "epr-search-id",
19524
19692
  placeholder: placeholder,
@@ -19532,13 +19700,13 @@ function Search() {
19532
19700
  ref: SearchInputRef
19533
19701
  }), searchTerm ? createElement("div", {
19534
19702
  role: "status",
19535
- className: cx('epr-status-search-results', styles$g.visuallyHidden),
19703
+ className: cx('epr-status-search-results', styles$i.visuallyHidden),
19536
19704
  "aria-live": "polite",
19537
19705
  id: "epr-search-id",
19538
19706
  "aria-atomic": "true"
19539
19707
  }, statusSearchResults) : null, createElement(IcnSearch, null), createElement(BtnClearSearch, null));
19540
19708
  }
19541
- var styles$g = /*#__PURE__*/stylesheet.create({
19709
+ var styles$i = /*#__PURE__*/stylesheet.create({
19542
19710
  overlay: {
19543
19711
  padding: 'var(--epr-header-padding)',
19544
19712
  zIndex: 'var(--epr-header-overlay-z-index)'
@@ -19640,7 +19808,7 @@ var styles$g = /*#__PURE__*/stylesheet.create({
19640
19808
 
19641
19809
  function Header() {
19642
19810
  return createElement(Relative, {
19643
- className: "epr-header"
19811
+ className: cx('epr-header', commonInteractionStyles.hiddenOnReactions)
19644
19812
  }, createElement(SearchContainer, null), createElement(CategoryNavigation, null));
19645
19813
  }
19646
19814
 
@@ -20045,6 +20213,7 @@ function useOnFocus() {
20045
20213
  }, [BodyRef, emojiStyle, getEmojiUrl]);
20046
20214
  }
20047
20215
 
20216
+ var _excluded$1 = ["width", "height"];
20048
20217
  function PickerMain(_ref) {
20049
20218
  var children = _ref.children;
20050
20219
  return createElement(PickerContextProvider, null, createElement(PickerStyleTag, null), createElement(PickerRootElement, null, children));
@@ -20052,6 +20221,8 @@ function PickerMain(_ref) {
20052
20221
  function PickerRootElement(_ref2) {
20053
20222
  var _cx;
20054
20223
  var children = _ref2.children;
20224
+ var _useReactionsModeStat = useReactionsModeState(),
20225
+ reactionsMode = _useReactionsModeStat[0];
20055
20226
  var theme = useThemeConfig();
20056
20227
  var searchModeActive = useIsSearchMode();
20057
20228
  var PickerMainRef = usePickerMainRef();
@@ -20059,10 +20230,17 @@ function PickerRootElement(_ref2) {
20059
20230
  var style = useStyleConfig();
20060
20231
  useKeyboardNavigation();
20061
20232
  useOnFocus();
20233
+ var _ref3 = style || {},
20234
+ width = _ref3.width,
20235
+ height = _ref3.height,
20236
+ styleProps = _objectWithoutPropertiesLoose(_ref3, _excluded$1);
20062
20237
  return createElement("aside", {
20063
- className: cx(styles$h.main, styles$h.baseVariables, theme === Theme.DARK && styles$h.darkTheme, theme === Theme.AUTO && styles$h.autoThemeDark, (_cx = {}, _cx[ClassNames.searchActive] = searchModeActive, _cx), className),
20238
+ className: cx(styles$j.main, styles$j.baseVariables, theme === Theme.DARK && styles$j.darkTheme, theme === Theme.AUTO && styles$j.autoThemeDark, (_cx = {}, _cx[ClassNames.searchActive] = searchModeActive, _cx), reactionsMode && styles$j.reactionsMenu, className),
20064
20239
  ref: PickerMainRef,
20065
- style: style
20240
+ style: _extends({}, styleProps, !reactionsMode && {
20241
+ height: height,
20242
+ width: width
20243
+ })
20066
20244
  }, children);
20067
20245
  }
20068
20246
  var DarkTheme = {
@@ -20075,12 +20253,13 @@ var DarkTheme = {
20075
20253
  '--epr-category-label-bg-color': 'var(--epr-dark-category-label-bg-color)',
20076
20254
  '--epr-picker-border-color': 'var(--epr-dark-picker-border-color)',
20077
20255
  '--epr-bg-color': 'var(--epr-dark-bg-color)',
20256
+ '--epr-reactions-bg-color': 'var(--epr-dark-reactions-bg-color)',
20078
20257
  '--epr-search-input-bg-color-active': 'var(--epr-dark-search-input-bg-color-active)',
20079
20258
  '--epr-emoji-variation-indicator-color': 'var(--epr-dark-emoji-variation-indicator-color)',
20080
20259
  '--epr-category-icon-active-color': 'var(--epr-dark-category-icon-active-color)',
20081
20260
  '--epr-skin-tone-picker-menu-color': 'var(--epr-dark-skin-tone-picker-menu-color)'
20082
20261
  };
20083
- var styles$h = /*#__PURE__*/stylesheet.create({
20262
+ var styles$j = /*#__PURE__*/stylesheet.create({
20084
20263
  main: {
20085
20264
  '.': ['epr-main', ClassNames.emojiPicker],
20086
20265
  position: 'relative',
@@ -20092,6 +20271,7 @@ var styles$h = /*#__PURE__*/stylesheet.create({
20092
20271
  borderColor: 'var(--epr-picker-border-color)',
20093
20272
  backgroundColor: 'var(--epr-bg-color)',
20094
20273
  overflow: 'hidden',
20274
+ transition: 'all 0.3s ease-in-out, background-color 0.1s ease-in-out',
20095
20275
  // @ts-expect-error - need to work on this
20096
20276
  '*': {
20097
20277
  boxSizing: 'border-box',
@@ -20107,6 +20287,7 @@ var styles$h = /*#__PURE__*/stylesheet.create({
20107
20287
  '--epr-search-input-bg-color': '#f6f6f6',
20108
20288
  '--epr-picker-border-color': '#e7e7e7',
20109
20289
  '--epr-bg-color': '#fff',
20290
+ '--epr-reactions-bg-color': '#ffffff90',
20110
20291
  '--epr-category-icon-active-color': '#6aa8de',
20111
20292
  '--epr-skin-tone-picker-menu-color': '#ffffff95',
20112
20293
  '--epr-horizontal-padding': '10px',
@@ -20167,6 +20348,7 @@ var styles$h = /*#__PURE__*/stylesheet.create({
20167
20348
  '--epr-dark-category-label-bg-color': '#222222e6',
20168
20349
  '--epr-dark-picker-border-color': '#151617',
20169
20350
  '--epr-dark-bg-color': '#222222',
20351
+ '--epr-dark-reactions-bg-color': '#22222290',
20170
20352
  '--epr-dark-search-input-bg-color-active': 'var(--epr-dark)',
20171
20353
  '--epr-dark-emoji-variation-indicator-color': '#444',
20172
20354
  '--epr-dark-category-icon-active-color': '#3271b7',
@@ -20182,18 +20364,42 @@ var styles$h = /*#__PURE__*/stylesheet.create({
20182
20364
  darkTheme: {
20183
20365
  '.': ClassNames.darkTheme,
20184
20366
  '--': DarkTheme
20367
+ },
20368
+ reactionsMenu: {
20369
+ '.': 'epr-reactions',
20370
+ height: '50px',
20371
+ display: 'inline-flex',
20372
+ backgroundColor: 'var(--epr-reactions-bg-color)',
20373
+ // @ts-expect-error - need to work on this
20374
+ backdropFilter: 'blur(8px)',
20375
+ '--': {
20376
+ '--epr-picker-border-radius': '50px'
20377
+ }
20185
20378
  }
20186
20379
  });
20187
20380
 
20188
20381
  function EmojiPicker(props) {
20189
- return createElement(ElementRefContextProvider, null, createElement(PickerConfigProvider, Object.assign({}, props), createElement(PickerMain, null, createElement(Header, null), createElement(Body, null), createElement(Preview, null))));
20382
+ return createElement(ElementRefContextProvider, null, createElement(PickerConfigProvider, Object.assign({}, props), createElement(PickerMain, null, createElement(ContentControl, null))));
20383
+ }
20384
+ function ContentControl() {
20385
+ var _useReactionsModeStat = useReactionsModeState(),
20386
+ reactionsDefaultOpen = _useReactionsModeStat[0];
20387
+ var _React$useState = useState(!reactionsDefaultOpen),
20388
+ renderAll = _React$useState[0],
20389
+ setRenderAll = _React$useState[1];
20390
+ useEffect(function () {
20391
+ if (!renderAll) {
20392
+ setRenderAll(true);
20393
+ }
20394
+ }, []);
20395
+ return createElement(Fragment, null, createElement(Reactions, null), renderAll ? createElement(Fragment, null, createElement(Header, null), createElement(Body, null), createElement(Preview, null)) : null);
20190
20396
  }
20191
20397
  // eslint-disable-next-line complexity
20192
20398
  var EmojiPickerReact = /*#__PURE__*/memo(EmojiPicker, function (prev, next) {
20193
20399
  var _prev$customEmojis, _next$customEmojis;
20194
20400
  var prevCustomEmojis = (_prev$customEmojis = prev.customEmojis) != null ? _prev$customEmojis : [];
20195
20401
  var nextCustomEmojis = (_next$customEmojis = next.customEmojis) != null ? _next$customEmojis : [];
20196
- return prev.emojiVersion === next.emojiVersion && prev.searchPlaceHolder === next.searchPlaceHolder && prev.searchPlaceholder === next.searchPlaceholder && prev.defaultSkinTone === next.defaultSkinTone && prev.skinTonesDisabled === next.skinTonesDisabled && prev.autoFocusSearch === next.autoFocusSearch && prev.emojiStyle === next.emojiStyle && prev.theme === next.theme && prev.suggestedEmojisMode === next.suggestedEmojisMode && prev.lazyLoadEmojis === next.lazyLoadEmojis && prev.className === next.className && prev.height === next.height && prev.width === next.width && prev.style === next.style && prev.searchDisabled === next.searchDisabled && prev.skinTonePickerLocation === next.skinTonePickerLocation && prevCustomEmojis.length === nextCustomEmojis.length;
20402
+ return prev.emojiVersion === next.emojiVersion && prev.reactionsDefaultOpen === next.reactionsDefaultOpen && prev.searchPlaceHolder === next.searchPlaceHolder && prev.searchPlaceholder === next.searchPlaceholder && prev.defaultSkinTone === next.defaultSkinTone && prev.skinTonesDisabled === next.skinTonesDisabled && prev.autoFocusSearch === next.autoFocusSearch && prev.emojiStyle === next.emojiStyle && prev.theme === next.theme && prev.suggestedEmojisMode === next.suggestedEmojisMode && prev.lazyLoadEmojis === next.lazyLoadEmojis && prev.className === next.className && prev.height === next.height && prev.width === next.width && prev.style === next.style && prev.searchDisabled === next.searchDisabled && prev.skinTonePickerLocation === next.skinTonePickerLocation && prevCustomEmojis.length === nextCustomEmojis.length;
20197
20403
  });
20198
20404
 
20199
20405
  var ErrorBoundary = /*#__PURE__*/function (_React$Component) {