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