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.
package/README.md CHANGED
@@ -28,6 +28,15 @@ function App() {
28
28
  }
29
29
  ```
30
30
 
31
+ ## Shout Outs!
32
+
33
+
34
+ | Component Design 🎨 |
35
+ |:-:|
36
+ | <a href="https://pavelbolo.com" target="_blank">![317751726_1277528579755086_5320360926126813336_n copy](https://user-images.githubusercontent.com/11255103/205937426-a570b4a1-7243-4d3e-a7e5-ea04b61d940a.png)</a> |
37
+ | <a href="https://pavelbolo.com" target="_blank">Pavel Bolo</a> |
38
+
39
+
31
40
  ## Features
32
41
 
33
42
  - Custom click handler
@@ -263,3 +272,11 @@ For reference, if you only need to shim global, you can add
263
272
  window.global = window;
264
273
  </script>
265
274
  ```
275
+
276
+ # Other stuff I build
277
+
278
+ If you enjoy using emoji-picker-react, you may be interested in some of my other open source projects:
279
+
280
+ - [Vest](https://github.com/ealush/vest) - The best form validation framwork to date.
281
+ - [Context](https://github.com/ealush/vest/tree/latest/packages/context) - Context propagation library for JS Apps.
282
+ - [n4s](https://github.com/ealush/vest/tree/latest/packages/n4s) - enforce: fluent assertion library.
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import './EmojiVariationPicker.css';
3
- export declare function EmojiVariationPicker(): JSX.Element | null;
3
+ export declare function EmojiVariationPicker(): JSX.Element;
@@ -17088,14 +17088,14 @@ function PickerContextProvider(_ref) {
17088
17088
  activeSkinTone: activeSkinTone,
17089
17089
  disallowClickRef: disallowClickRef,
17090
17090
  disallowMouseRef: disallowMouseRef,
17091
+ disallowedEmojisRef: disallowedEmojisRef,
17091
17092
  emojiVariationPickerState: emojiVariationPickerState,
17092
17093
  emojisThatFailedToLoadState: emojisThatFailedToLoadState,
17093
17094
  filterRef: filterRef,
17094
17095
  isPastInitialLoad: isPastInitialLoad,
17095
17096
  searchTerm: searchTerm,
17096
17097
  skinToneFanOpenState: skinToneFanOpenState,
17097
- suggestedUpdateState: suggestedUpdateState,
17098
- disallowedEmojisRef: disallowedEmojisRef
17098
+ suggestedUpdateState: suggestedUpdateState
17099
17099
  }
17100
17100
  }, children);
17101
17101
  }
@@ -17674,12 +17674,10 @@ function useSetVariationPicker() {
17674
17674
  var _emojiFromElement = emojiFromElement(element),
17675
17675
  emoji = _emojiFromElement[0];
17676
17676
 
17677
- if (!emoji) {
17678
- return;
17677
+ if (emoji) {
17678
+ setAnchoredEmojiRef(element);
17679
+ setEmojiVariationPicker(emoji);
17679
17680
  }
17680
-
17681
- setAnchoredEmojiRef(element);
17682
- setEmojiVariationPicker(emoji);
17683
17681
  };
17684
17682
  }
17685
17683
 
@@ -18285,7 +18283,8 @@ function RenderCategory(_ref) {
18285
18283
  activeSkinTone = _useActiveSkinToneSta[0];
18286
18284
 
18287
18285
  var isEmojiDisallowed = useIsEmojiDisallowed();
18288
- var getEmojiUrl = useGetEmojiUrlConfig(); // Small trick to defer the rendering of all emoji categories until the first category is visible
18286
+ var getEmojiUrl = useGetEmojiUrlConfig();
18287
+ var showVariations = !useSkinTonesDisabledConfig(); // Small trick to defer the rendering of all emoji categories until the first category is visible
18289
18288
  // This way the user gets to actually see something and not wait for the whole picker to render.
18290
18289
 
18291
18290
  var emojisToPush = !isPastInitialLoad && index > 1 ? [] : emojisByCategory(category);
@@ -18309,6 +18308,7 @@ function RenderCategory(_ref) {
18309
18308
  }
18310
18309
 
18311
18310
  return React.createElement(ClickableEmoji, {
18311
+ showVariations: showVariations,
18312
18312
  key: unified,
18313
18313
  emoji: emoji,
18314
18314
  unified: unified,
@@ -18482,10 +18482,6 @@ function EmojiVariationPicker() {
18482
18482
  pointerStyle = getPointerStyle();
18483
18483
  }
18484
18484
 
18485
- if (!emoji) {
18486
- return null;
18487
- }
18488
-
18489
18485
  return React.createElement("div", {
18490
18486
  ref: VariationPickerRef,
18491
18487
  className: clsx(ClassNames.variationPicker, {
@@ -18495,7 +18491,7 @@ function EmojiVariationPicker() {
18495
18491
  style: {
18496
18492
  top: top
18497
18493
  }
18498
- }, visible ? [emojiUnified(emoji)].concat(emojiVariations(emoji)).slice(0, 6).map(function (unified) {
18494
+ }, visible && emoji ? [emojiUnified(emoji)].concat(emojiVariations(emoji)).slice(0, 6).map(function (unified) {
18499
18495
  return React.createElement(ClickableEmoji, {
18500
18496
  key: unified,
18501
18497
  emoji: emoji,