emoji-picker-react 4.4.6 → 4.4.8

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.
@@ -17094,14 +17094,14 @@ function PickerContextProvider(_ref) {
17094
17094
  activeSkinTone: activeSkinTone,
17095
17095
  disallowClickRef: disallowClickRef,
17096
17096
  disallowMouseRef: disallowMouseRef,
17097
+ disallowedEmojisRef: disallowedEmojisRef,
17097
17098
  emojiVariationPickerState: emojiVariationPickerState,
17098
17099
  emojisThatFailedToLoadState: emojisThatFailedToLoadState,
17099
17100
  filterRef: filterRef,
17100
17101
  isPastInitialLoad: isPastInitialLoad,
17101
17102
  searchTerm: searchTerm,
17102
17103
  skinToneFanOpenState: skinToneFanOpenState,
17103
- suggestedUpdateState: suggestedUpdateState,
17104
- disallowedEmojisRef: disallowedEmojisRef
17104
+ suggestedUpdateState: suggestedUpdateState
17105
17105
  }
17106
17106
  }, children);
17107
17107
  }
@@ -17680,12 +17680,10 @@ function useSetVariationPicker() {
17680
17680
  var _emojiFromElement = emojiFromElement(element),
17681
17681
  emoji = _emojiFromElement[0];
17682
17682
 
17683
- if (!emoji) {
17684
- return;
17683
+ if (emoji) {
17684
+ setAnchoredEmojiRef(element);
17685
+ setEmojiVariationPicker(emoji);
17685
17686
  }
17686
-
17687
- setAnchoredEmojiRef(element);
17688
- setEmojiVariationPicker(emoji);
17689
17687
  };
17690
17688
  }
17691
17689
 
@@ -18327,7 +18325,8 @@ function RenderCategory(_ref) {
18327
18325
  activeSkinTone = _useActiveSkinToneSta[0];
18328
18326
 
18329
18327
  var isEmojiDisallowed = useIsEmojiDisallowed();
18330
- var getEmojiUrl = useGetEmojiUrlConfig(); // Small trick to defer the rendering of all emoji categories until the first category is visible
18328
+ var getEmojiUrl = useGetEmojiUrlConfig();
18329
+ var showVariations = !useSkinTonesDisabledConfig(); // Small trick to defer the rendering of all emoji categories until the first category is visible
18331
18330
  // This way the user gets to actually see something and not wait for the whole picker to render.
18332
18331
 
18333
18332
  var emojisToPush = !isPastInitialLoad && index > 1 ? [] : emojisByCategory(category);
@@ -18351,6 +18350,7 @@ function RenderCategory(_ref) {
18351
18350
  }
18352
18351
 
18353
18352
  return createElement(ClickableEmoji, {
18353
+ showVariations: showVariations,
18354
18354
  key: unified,
18355
18355
  emoji: emoji,
18356
18356
  unified: unified,
@@ -18527,10 +18527,6 @@ function EmojiVariationPicker() {
18527
18527
  pointerStyle = getPointerStyle();
18528
18528
  }
18529
18529
 
18530
- if (!emoji) {
18531
- return null;
18532
- }
18533
-
18534
18530
  return createElement("div", {
18535
18531
  ref: VariationPickerRef,
18536
18532
  className: clsx(ClassNames.variationPicker, {
@@ -18540,7 +18536,7 @@ function EmojiVariationPicker() {
18540
18536
  style: {
18541
18537
  top: top
18542
18538
  }
18543
- }, visible ? [emojiUnified(emoji)].concat(emojiVariations(emoji)).slice(0, 6).map(function (unified) {
18539
+ }, visible && emoji ? [emojiUnified(emoji)].concat(emojiVariations(emoji)).slice(0, 6).map(function (unified) {
18544
18540
  return createElement(ClickableEmoji, {
18545
18541
  key: unified,
18546
18542
  emoji: emoji,