emoji-picker-react 4.14.2 → 4.15.1

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.
@@ -18865,7 +18865,6 @@ var styles = /*#__PURE__*/stylesheet.create({
18865
18865
  '--epr-horizontal-padding': '10px',
18866
18866
  '--epr-picker-border-radius': '8px',
18867
18867
  /* Header */
18868
- '--epr-search-border-color': 'var(--epr-highlight-color)',
18869
18868
  '--epr-header-padding': '15px var(--epr-horizontal-padding)',
18870
18869
  /* Skin Tone Picker */
18871
18870
  '--epr-active-skin-tone-indicator-border-color': 'var(--epr-highlight-color)',
@@ -18878,6 +18877,8 @@ var styles = /*#__PURE__*/stylesheet.create({
18878
18877
  '--epr-search-input-text-color': 'var(--epr-text-color)',
18879
18878
  '--epr-search-input-placeholder-color': 'var(--epr-text-color)',
18880
18879
  '--epr-search-bar-inner-padding': 'var(--epr-horizontal-padding)',
18880
+ '--epr-search-border-color': 'var(--epr-search-input-bg-color)',
18881
+ '--epr-search-border-color-active': 'var(--epr-highlight-color)',
18881
18882
  /* Category Navigation */
18882
18883
  '--epr-category-navigation-button-size': '30px',
18883
18884
  /* Variation Picker */
@@ -20649,6 +20650,7 @@ function useActiveCategoryScrollDetection(_ref) {
20649
20650
  var BodyRef = useBodyRef();
20650
20651
  useEffect(function () {
20651
20652
  var visibleCategories = new Map();
20653
+ var intersectingCategories = new Map();
20652
20654
  var bodyRef = BodyRef.current;
20653
20655
  var observer = new IntersectionObserver(function (entries) {
20654
20656
  if (!bodyRef) {
@@ -20661,17 +20663,20 @@ function useActiveCategoryScrollDetection(_ref) {
20661
20663
  continue;
20662
20664
  }
20663
20665
  visibleCategories.set(_id, entry.intersectionRatio);
20666
+ intersectingCategories.set(_id, entry.isIntersecting);
20664
20667
  }
20665
20668
  var ratios = Array.from(visibleCategories);
20666
- setVisibleCategories(ratios.filter(function (_ref2) {
20667
- var ratio = _ref2[1];
20668
- return ratio > 0;
20669
+ var visibleCats = ratios.filter(function (_ref2) {
20670
+ var id = _ref2[0],
20671
+ ratio = _ref2[1];
20672
+ return ratio > 0 || intersectingCategories.get(id);
20669
20673
  }).map(function (_ref3) {
20670
20674
  var id = _ref3[0];
20671
20675
  return id;
20672
- }));
20676
+ });
20677
+ setVisibleCategories(visibleCats);
20673
20678
  var lastCategory = ratios[ratios.length - 1];
20674
- if (lastCategory[1] == 1) {
20679
+ if ((lastCategory == null ? void 0 : lastCategory[1]) == 1) {
20675
20680
  return setActiveCategory(lastCategory[0]);
20676
20681
  }
20677
20682
  for (var _i = 0, _ratios = ratios; _i < _ratios.length; _i++) {
@@ -20684,11 +20689,15 @@ function useActiveCategoryScrollDetection(_ref) {
20684
20689
  }
20685
20690
  }
20686
20691
  }, {
20692
+ root: bodyRef,
20687
20693
  threshold: [0, 1]
20688
20694
  });
20689
20695
  bodyRef == null ? void 0 : bodyRef.querySelectorAll(asSelectors(ClassNames.category)).forEach(function (el) {
20690
20696
  observer.observe(el);
20691
20697
  });
20698
+ return function () {
20699
+ observer.disconnect();
20700
+ };
20692
20701
  }, [BodyRef, setActiveCategory, setVisibleCategories]);
20693
20702
  }
20694
20703
 
@@ -21034,11 +21043,11 @@ var styles$j = /*#__PURE__*/stylesheet.create( /*#__PURE__*/_extends({
21034
21043
  padding: 'var(--epr-search-input-padding)',
21035
21044
  height: 'var(--epr-search-input-height)',
21036
21045
  backgroundColor: 'var(--epr-search-input-bg-color)',
21037
- border: '1px solid var(--epr-search-input-bg-color)',
21046
+ border: '1px solid var(--epr-search-border-color)',
21038
21047
  width: '100%',
21039
21048
  ':focus': {
21040
21049
  backgroundColor: 'var(--epr-search-input-bg-color-active)',
21041
- border: '1px solid var(--epr-search-border-color)'
21050
+ border: '1px solid var(--epr-search-border-color-active)'
21042
21051
  },
21043
21052
  '::placeholder': {
21044
21053
  color: 'var(--epr-search-input-placeholder-color)'
@@ -21194,5 +21203,5 @@ function EmojiPicker$1(props) {
21194
21203
  }
21195
21204
 
21196
21205
  export default EmojiPicker$1;
21197
- export { Categories, ExportedEmoji as Emoji, EmojiStyle, SkinTonePickerLocation, SkinTones, SuggestionMode, Theme };
21206
+ export { Categories, ExportedEmoji as Emoji, EmojiStyle, SkinTonePickerLocation, SkinTones, SuggestionMode, Theme, emojiByUnified };
21198
21207
  //# sourceMappingURL=emoji-picker-react.esm.js.map