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