emoji-picker-react 4.0.4 → 4.0.6

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.
@@ -15577,14 +15577,12 @@ function parseNativeEmoji(unified) {
15577
15577
 
15578
15578
  var SUGGESTED_LS_KEY = 'epr_suggested';
15579
15579
  function getsuggested(mode) {
15580
- var _window;
15581
-
15582
- if (!((_window = window) != null && _window.localStorage)) {
15583
- return [];
15584
- }
15585
-
15586
15580
  try {
15587
- var _window$localStorage$, _window2;
15581
+ var _window, _window$localStorage$, _window2;
15582
+
15583
+ if (!((_window = window) != null && _window.localStorage)) {
15584
+ return [];
15585
+ }
15588
15586
 
15589
15587
  var recent = JSON.parse((_window$localStorage$ = (_window2 = window) == null ? void 0 : _window2.localStorage.getItem(SUGGESTED_LS_KEY)) != null ? _window$localStorage$ : '[]');
15590
15588
 
@@ -16073,7 +16071,7 @@ function useApplySearch() {
16073
16071
  var PickerMainRef = usePickerMainRef();
16074
16072
  return function applySearch(searchTerm) {
16075
16073
  requestAnimationFrame(function () {
16076
- setSearchTerm(searchTerm).then(function () {
16074
+ setSearchTerm(searchTerm.toLowerCase()).then(function () {
16077
16075
  scrollTo(PickerMainRef.current, 0);
16078
16076
  });
16079
16077
  });
@@ -16108,7 +16106,7 @@ function useIsEmojiFiltered() {
16108
16106
  searchTerm = _useSearchTermState3[0];
16109
16107
 
16110
16108
  return function (unified) {
16111
- return isEmojiFilteredBySearchTerm(unified, filter, searchTerm);
16109
+ return isEmojiFilteredBySearchTerm(unified, filter, searchTerm.toLowerCase());
16112
16110
  };
16113
16111
  }
16114
16112
 
@@ -16809,6 +16807,7 @@ function CategoryNavigation() {
16809
16807
 
16810
16808
  var category = categoryFromCategoryConfig(categoryConfig);
16811
16809
  return createElement("button", {
16810
+ type: "button",
16812
16811
  className: clsx('epr-cat-btn', "epr-icn-" + category, (_clsx = {}, _clsx[ClassNames.active] = category === activeCategory, _clsx)),
16813
16812
  key: category,
16814
16813
  onClick: function onClick() {
@@ -16864,13 +16863,14 @@ function Search() {
16864
16863
  className: "epr-icn-search"
16865
16864
  }), createElement("button", {
16866
16865
  className: clsx('epr-btn-clear-search', 'epr-visible-on-search-only'),
16867
- onClick: clearSearch
16866
+ onClick: clearSearch,
16867
+ type: "button"
16868
16868
  }));
16869
16869
  }
16870
16870
 
16871
16871
  function CssSearch(_ref) {
16872
16872
  var value = _ref.value;
16873
- return value ? createElement("style", null, "\n .EmojiPickerReact button.epr-emoji:not([data-full-name*=\"" + value + "\"]) {\n display: none;\n }\n ") : null;
16873
+ return value ? createElement("style", null, "\n .EmojiPickerReact button.epr-emoji:not([data-full-name*=\"" + value.toLowerCase() + "\"]) {\n display: none;\n }\n ") : null;
16874
16874
  }
16875
16875
 
16876
16876
  function useFocusSearchInput() {
@@ -16934,6 +16934,7 @@ function SkinTonePicker() {
16934
16934
 
16935
16935
  var active = skinToneVariation === activeSkinTone;
16936
16936
  return createElement("button", {
16937
+ type: "button",
16937
16938
  style: {
16938
16939
  transform: clsx("translateX(-" + i * (isOpen ? 28 : 0) + "px)", isOpen && active && 'scale(1.3)')
16939
16940
  },
@@ -17527,5 +17528,5 @@ function EmojiPicker$1(props) {
17527
17528
  }
17528
17529
 
17529
17530
  export default EmojiPicker$1;
17530
- export { Categories, ExportedEmoji as Emoji, EmojiStyle, SkinTones, Theme };
17531
+ export { Categories, ExportedEmoji as Emoji, EmojiStyle, SkinTones, SuggestionMode, Theme };
17531
17532
  //# sourceMappingURL=emoji-picker-react.esm.js.map