emoji-picker-react 4.20.1 → 4.20.4

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.
Files changed (40) hide show
  1. package/README.md +5 -3
  2. package/dist/Stylesheet/stylesheet.d.ts +1 -1
  3. package/dist/dataUtils/emojiSelectors.d.ts +0 -2
  4. package/dist/emoji-picker-react.cjs.development.js +117 -161
  5. package/dist/emoji-picker-react.cjs.development.js.map +1 -1
  6. package/dist/emoji-picker-react.cjs.production.min.js +1 -1
  7. package/dist/emoji-picker-react.cjs.production.min.js.map +1 -1
  8. package/dist/emoji-picker-react.esm.js +82 -126
  9. package/dist/emoji-picker-react.esm.js.map +1 -1
  10. package/llms.txt +6 -3
  11. package/package.json +13 -6
  12. package/src/Stylesheet/stylesheet.tsx +1 -1
  13. package/src/components/Layout/Flex.tsx +1 -1
  14. package/src/components/Layout/Space.tsx +1 -1
  15. package/src/components/Reactions/BtnPlus.tsx +1 -1
  16. package/src/components/Reactions/Reactions.tsx +1 -1
  17. package/src/components/atoms/Button.tsx +1 -1
  18. package/src/components/body/Body.tsx +1 -1
  19. package/src/components/body/EmojiCategory.tsx +1 -1
  20. package/src/components/body/EmojiList.tsx +16 -17
  21. package/src/components/body/EmojiVariationPicker.tsx +2 -2
  22. package/src/components/body/MeasureEmoji.tsx +2 -4
  23. package/src/components/emoji/ClickableEmojiButton.tsx +1 -1
  24. package/src/components/emoji/Emoji.tsx +1 -1
  25. package/src/components/emoji/EmojiImg.tsx +1 -1
  26. package/src/components/emoji/NativeEmoji.tsx +1 -1
  27. package/src/components/footer/Preview.tsx +2 -2
  28. package/src/components/header/Header.tsx +1 -1
  29. package/src/components/header/Search/BtnClearSearch.tsx +1 -1
  30. package/src/components/header/Search/IcnSearch.tsx +1 -1
  31. package/src/components/header/Search/Search.tsx +1 -1
  32. package/src/components/header/SkinTonePicker/BtnSkinToneVariation.tsx +1 -1
  33. package/src/components/header/SkinTonePicker/SkinTonePicker.tsx +1 -1
  34. package/src/components/main/PickerMain.tsx +1 -1
  35. package/src/components/navigation/CategoryButton.tsx +1 -1
  36. package/src/components/navigation/CategoryNavigation.tsx +1 -1
  37. package/src/dataUtils/emojiSelectors.ts +4 -39
  38. package/src/dataUtils/suggested.ts +1 -1
  39. package/src/hooks/useMouseDownHandlers.ts +1 -1
  40. package/src/hooks/useOnFocus.ts +1 -1
package/README.md CHANGED
@@ -57,7 +57,7 @@ See [PROPS.md](PROPS.md) for the complete props reference.
57
57
 
58
58
  ## Styling
59
59
 
60
- No stylesheet import needed. All styles are scoped via [Flairup](https://github.com/ealush/flairup) — generated class names are hashed, so the picker's CSS won't leak into or clash with your app's styles.
60
+ No stylesheet import needed. All styles are scoped via [ShipStyles](https://github.com/ealush/shipstyles) — generated class names are hashed, so the picker's CSS won't leak into or clash with your app's styles.
61
61
 
62
62
  Restyle the picker by overriding [CSS variables](CSS_VARIABLES.md) on `.EmojiPickerReact`:
63
63
 
@@ -98,9 +98,11 @@ const Picker = dynamic(() => import('emoji-picker-react'));
98
98
 
99
99
  ## Troubleshooting
100
100
 
101
- ### `global is not defined` (Vite)
101
+ ### `global is not defined` (Vite, versions before 4.20)
102
102
 
103
- Add this to your HTML:
103
+ Since 4.20 the picker is SSR-safe and no longer references the Node-style
104
+ `global`. If you see `global is not defined`, upgrade to the latest version.
105
+ On older versions only, the workaround was adding this to your HTML:
104
106
 
105
107
  ```html
106
108
  <script>
@@ -1,5 +1,5 @@
1
- import { Styles } from 'flairup';
2
1
  import * as React from 'react';
2
+ import { Styles } from 'shipstyles';
3
3
  export declare const stylesheet: {
4
4
  create: <K extends string>(styles: Partial<{ [k in K]: Partial<{
5
5
  '.'?: string | string[] | undefined;
@@ -1,4 +1,3 @@
1
- import { Categories } from '../config/categoryConfig';
2
1
  import { CustomEmoji } from '../config/customEmojiConfig';
3
2
  import { EmojiStyle, SkinTones } from '../types/exposedTypes';
4
3
  import { DataEmoji, DataEmojis, WithName } from './DataTypes';
@@ -7,7 +6,6 @@ export declare function addedIn(emoji: DataEmoji): number;
7
6
  export declare function emojiName(emoji?: WithName): string;
8
7
  export declare function unifiedWithoutSkinTone(unified: string): string;
9
8
  export declare function emojiUnified(emoji: DataEmoji, skinTone?: string): string;
10
- export declare function useGetEmojisByCategory(): (Category: Categories) => DataEmojis;
11
9
  export declare function emojiUrlByUnified(unified: string, emojiStyle: EmojiStyle): string;
12
10
  export declare function emojiVariations(emoji: DataEmoji): string[];
13
11
  export declare function emojiHasVariations(emoji: DataEmoji): boolean;
@@ -6,7 +6,7 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
6
6
 
7
7
  var React = require('react');
8
8
  var React__default = _interopDefault(React);
9
- var flairup = require('flairup');
9
+ var shipstyles = require('shipstyles');
10
10
 
11
11
  function _arrayLikeToArray(r, a) {
12
12
  (null == a || a > r.length) && (a = r.length);
@@ -96,7 +96,7 @@ function asSelectors() {
96
96
  }).join('');
97
97
  }
98
98
 
99
- var stylesheet = /*#__PURE__*/flairup.createSheet('epr', null);
99
+ var stylesheet = /*#__PURE__*/shipstyles.createSheet('epr', null);
100
100
  var hidden = {
101
101
  display: 'none',
102
102
  opacity: '0',
@@ -26744,15 +26744,57 @@ var defaultEmojiData = {
26744
26744
  emojis: emojis
26745
26745
  };
26746
26746
 
26747
- function useIsMounted() {
26748
- var _React$useState = React.useState(false),
26749
- isMounted = _React$useState[0],
26750
- setIsMounted = _React$useState[1];
26751
- React.useEffect(function () {
26752
- setIsMounted(true);
26753
- }, []);
26754
- return isMounted;
26747
+ // Pure data helpers plus the legacy global registry. This module intentionally
26748
+ function unifiedWithoutSkinTone$1(unified) {
26749
+ var splat = unified.split('-');
26750
+ var _splat$splice = splat.splice(1, 1),
26751
+ skinTone = _splat$splice[0];
26752
+ if (skinTonesMapped[skinTone]) {
26753
+ return splat.join('-');
26754
+ }
26755
+ return unified;
26755
26756
  }
26757
+ function emojiUnified$1(emoji, skinTone) {
26758
+ var _emojiVariationUnifie;
26759
+ var unified = emoji[EmojiProperties.unified];
26760
+ if (!skinTone || !emojiHasVariations$1(emoji)) {
26761
+ return unified;
26762
+ }
26763
+ return (_emojiVariationUnifie = emojiVariationUnified$1(emoji, skinTone)) != null ? _emojiVariationUnifie : unified;
26764
+ }
26765
+ function emojiVariations$1(emoji) {
26766
+ var _emoji$EmojiPropertie2;
26767
+ return (_emoji$EmojiPropertie2 = emoji[EmojiProperties.variations]) != null ? _emoji$EmojiPropertie2 : [];
26768
+ }
26769
+ function emojiHasVariations$1(emoji) {
26770
+ return emojiVariations$1(emoji).length > 0;
26771
+ }
26772
+ function emojiVariationUnified$1(emoji, skinTone) {
26773
+ return skinTone ? emojiVariations$1(emoji).find(function (variation) {
26774
+ return variation.includes(skinTone);
26775
+ }) : emojiUnified$1(emoji);
26776
+ }
26777
+ function emojiByUnified(unified) {
26778
+ if (!unified) {
26779
+ return;
26780
+ }
26781
+ if (allEmojisByUnified[unified]) {
26782
+ return allEmojisByUnified[unified];
26783
+ }
26784
+ var withoutSkinTone = unifiedWithoutSkinTone$1(unified);
26785
+ return allEmojisByUnified[withoutSkinTone];
26786
+ }
26787
+ var allEmojis = /*#__PURE__*/Object.values(defaultEmojiData.emojis).flat();
26788
+ var allEmojisByUnified = {};
26789
+ allEmojis.reduce(function (allEmojis, Emoji) {
26790
+ allEmojis[emojiUnified$1(Emoji)] = Emoji;
26791
+ if (emojiHasVariations$1(Emoji)) {
26792
+ emojiVariations$1(Emoji).forEach(function (variation) {
26793
+ allEmojis[variation] = Emoji;
26794
+ });
26795
+ }
26796
+ return allEmojis;
26797
+ }, allEmojisByUnified);
26756
26798
 
26757
26799
  var SUGGESTED_LS_KEY = 'epr_suggested';
26758
26800
  function getSuggested(mode) {
@@ -26774,8 +26816,8 @@ function getSuggested(mode) {
26774
26816
  }
26775
26817
  function setSuggested(emoji, skinTone) {
26776
26818
  var recent = getSuggested();
26777
- var unified = emojiUnified$1(emoji, skinTone);
26778
- var originalUnified = emojiUnified$1(emoji);
26819
+ var unified = emojiUnified(emoji, skinTone);
26820
+ var originalUnified = emojiUnified(emoji);
26779
26821
  var existing = recent.find(function (_ref) {
26780
26822
  var u = _ref.unified;
26781
26823
  return u === unified;
@@ -26806,99 +26848,14 @@ function setSuggested(emoji, skinTone) {
26806
26848
  }
26807
26849
  }
26808
26850
 
26809
- function emojiNames$1(emoji) {
26810
- var _emoji$EmojiPropertie;
26811
- return (_emoji$EmojiPropertie = emoji[EmojiProperties.name]) != null ? _emoji$EmojiPropertie : [];
26812
- }
26813
- function emojiName$1(emoji) {
26814
- if (!emoji) {
26815
- return '';
26816
- }
26817
- var names = emojiNames$1(emoji);
26818
- return names[names.length - 1];
26819
- }
26820
- function unifiedWithoutSkinTone$1(unified) {
26821
- var splat = unified.split('-');
26822
- var _splat$splice = splat.splice(1, 1),
26823
- skinTone = _splat$splice[0];
26824
- if (skinTonesMapped[skinTone]) {
26825
- return splat.join('-');
26826
- }
26827
- return unified;
26828
- }
26829
- function emojiUnified$1(emoji, skinTone) {
26830
- var _emojiVariationUnifie;
26831
- var unified = emoji[EmojiProperties.unified];
26832
- if (!skinTone || !emojiHasVariations$1(emoji)) {
26833
- return unified;
26834
- }
26835
- return (_emojiVariationUnifie = emojiVariationUnified$1(emoji, skinTone)) != null ? _emojiVariationUnifie : unified;
26836
- }
26837
- function useGetEmojisByCategory() {
26838
- var suggestedEmojisModeConfig = useSuggestedEmojisModeConfig();
26839
- var _useUpdateSuggested = useUpdateSuggested(),
26840
- suggestedUpdated = _useUpdateSuggested[0];
26841
- // Suggestions come from localStorage, which doesn't exist during SSR.
26842
- // Read them only after mount so the first client render matches the server.
26843
- var isMounted = useIsMounted();
26844
- var suggested = React__default.useMemo(function () {
26845
- var _getSuggested;
26846
- if (!isMounted) {
26847
- return [];
26848
- }
26849
- var suggested = (_getSuggested = getSuggested(suggestedEmojisModeConfig)) != null ? _getSuggested : [];
26850
- return suggested.map(function (s) {
26851
- return emojiByUnified(s.unified);
26852
- }).filter(Boolean);
26853
- },
26854
- // eslint-disable-next-line react-hooks/exhaustive-deps
26855
- [isMounted, suggestedUpdated, suggestedEmojisModeConfig]);
26856
- return function getEmojisByCategory(category) {
26857
- var _emojis$emojis$catego;
26858
- if (category === exports.Categories.SUGGESTED) {
26859
- return suggested;
26860
- }
26861
- // @ts-ignore
26862
- return (_emojis$emojis$catego = defaultEmojiData.emojis[category]) != null ? _emojis$emojis$catego : [];
26863
- };
26864
- }
26865
- function emojiVariations$1(emoji) {
26866
- var _emoji$EmojiPropertie2;
26867
- return (_emoji$EmojiPropertie2 = emoji[EmojiProperties.variations]) != null ? _emoji$EmojiPropertie2 : [];
26868
- }
26869
- function emojiHasVariations$1(emoji) {
26870
- return emojiVariations$1(emoji).length > 0;
26871
- }
26872
- function emojiVariationUnified$1(emoji, skinTone) {
26873
- return skinTone ? emojiVariations$1(emoji).find(function (variation) {
26874
- return variation.includes(skinTone);
26875
- }) : emojiUnified$1(emoji);
26876
- }
26877
- function emojiByUnified(unified) {
26878
- if (!unified) {
26879
- return;
26880
- }
26881
- if (allEmojisByUnified[unified]) {
26882
- return allEmojisByUnified[unified];
26883
- }
26884
- var withoutSkinTone = unifiedWithoutSkinTone$1(unified);
26885
- return allEmojisByUnified[withoutSkinTone];
26886
- }
26887
- var allEmojis = /*#__PURE__*/Object.values(defaultEmojiData.emojis).flat();
26888
- var allEmojisByUnified = {};
26889
- allEmojis.reduce(function (allEmojis, Emoji) {
26890
- allEmojis[emojiUnified$1(Emoji)] = Emoji;
26891
- if (emojiHasVariations$1(Emoji)) {
26892
- emojiVariations$1(Emoji).forEach(function (variation) {
26893
- allEmojis[variation] = Emoji;
26894
- });
26895
- }
26896
- return allEmojis;
26897
- }, allEmojisByUnified);
26898
- function activeVariationFromUnified$1(unified) {
26899
- var _unified$split = unified.split('-'),
26900
- suspectedSkinTone = _unified$split[1];
26901
- return skinToneVariations.includes(suspectedSkinTone) ? suspectedSkinTone : null;
26851
+ function useIsMounted() {
26852
+ var _React$useState = React.useState(false),
26853
+ isMounted = _React$useState[0],
26854
+ setIsMounted = _React$useState[1];
26855
+ React.useEffect(function () {
26856
+ setIsMounted(true);
26857
+ }, []);
26858
+ return isMounted;
26902
26859
  }
26903
26860
 
26904
26861
  var PickerDataContext = /*#__PURE__*/React__default.createContext({
@@ -26968,7 +26925,7 @@ function PickerDataProvider(_ref) {
26968
26925
  function usePickerDataContext() {
26969
26926
  return React__default.useContext(PickerDataContext);
26970
26927
  }
26971
- function useGetEmojisByCategory$1() {
26928
+ function useGetEmojisByCategory() {
26972
26929
  var _usePickerDataContext = usePickerDataContext(),
26973
26930
  emojiData = _usePickerDataContext.emojiData,
26974
26931
  emojiByUnified = _usePickerDataContext.emojiByUnified;
@@ -28340,7 +28297,7 @@ function useOnFocus() {
28340
28297
  if (!emoji) {
28341
28298
  return;
28342
28299
  }
28343
- if (emojiHasVariations$1(emoji)) {
28300
+ if (emojiHasVariations(emoji)) {
28344
28301
  preloadEmoji(getEmojiUrl, emoji, emojiStyle);
28345
28302
  }
28346
28303
  }
@@ -28370,7 +28327,7 @@ function PickerRootElement(_ref2) {
28370
28327
  height = _ref3.height,
28371
28328
  styleProps = _objectWithoutPropertiesLoose(_ref3, _excluded$1);
28372
28329
  return React.createElement("aside", {
28373
- className: flairup.cx(styles.main, styles.baseVariables, theme === exports.Theme.DARK && styles.darkTheme, theme === exports.Theme.AUTO && styles.autoThemeDark, (_cx = {}, _cx[ClassNames.searchActive] = searchModeActive, _cx), reactionsMode && styles.reactionsMenu, className),
28330
+ className: shipstyles.cx(styles.main, styles.baseVariables, theme === exports.Theme.DARK && styles.darkTheme, theme === exports.Theme.AUTO && styles.autoThemeDark, (_cx = {}, _cx[ClassNames.searchActive] = searchModeActive, _cx), reactionsMode && styles.reactionsMenu, className),
28374
28331
  ref: PickerMainRef,
28375
28332
  style: _extends({}, styleProps, !reactionsMode && {
28376
28333
  height: height,
@@ -28817,7 +28774,7 @@ function useMouseDownHandlers(ContainerRef, mouseEventSource) {
28817
28774
  if (!emoji || !unified) {
28818
28775
  return;
28819
28776
  }
28820
- var skinToneToUse = activeVariationFromUnified$1(unified) || activeSkinTone;
28777
+ var skinToneToUse = activeVariationFromUnified(unified) || activeSkinTone;
28821
28778
  updateSuggested();
28822
28779
  setSuggested(emoji, skinToneToUse);
28823
28780
  onEmojiClick(emojiClickOutput(emoji, skinToneToUse, activeEmojiStyle, getEmojiUrl), event);
@@ -28828,7 +28785,7 @@ function useMouseDownHandlers(ContainerRef, mouseEventSource) {
28828
28785
  }
28829
28786
  var _emojiFromEvent2 = emojiFromEvent(event, emojiByUnified),
28830
28787
  emoji = _emojiFromEvent2[0];
28831
- if (!emoji || !emojiHasVariations$1(emoji)) {
28788
+ if (!emoji || !emojiHasVariations(emoji)) {
28832
28789
  return;
28833
28790
  }
28834
28791
  mouseDownTimerRef.current = setTimeout(function () {
@@ -28894,9 +28851,9 @@ function emojiFromEvent(event, lookupEmojiByUnified) {
28894
28851
  return [emoji, unified != null ? unified : resolvedUnified];
28895
28852
  }
28896
28853
  function emojiClickOutput(emoji, activeSkinTone, activeEmojiStyle, getEmojiUrl) {
28897
- var names = emojiNames$1(emoji);
28854
+ var names = emojiNames(emoji);
28898
28855
  if (isCustomEmoji(emoji)) {
28899
- var _unified = emojiUnified$1(emoji);
28856
+ var _unified = emojiUnified(emoji);
28900
28857
  return {
28901
28858
  activeSkinTone: activeSkinTone,
28902
28859
  emoji: _unified,
@@ -28910,7 +28867,7 @@ function emojiClickOutput(emoji, activeSkinTone, activeEmojiStyle, getEmojiUrl)
28910
28867
  unifiedWithoutSkinTone: _unified
28911
28868
  };
28912
28869
  }
28913
- var unified = emojiUnified$1(emoji, activeSkinTone);
28870
+ var unified = emojiUnified(emoji, activeSkinTone);
28914
28871
  return {
28915
28872
  activeSkinTone: activeSkinTone,
28916
28873
  emoji: parseNativeEmoji(unified),
@@ -28924,7 +28881,7 @@ function emojiClickOutput(emoji, activeSkinTone, activeEmojiStyle, getEmojiUrl)
28924
28881
  isCustom: false,
28925
28882
  names: names,
28926
28883
  unified: unified,
28927
- unifiedWithoutSkinTone: emojiUnified$1(emoji)
28884
+ unifiedWithoutSkinTone: emojiUnified(emoji)
28928
28885
  };
28929
28886
  }
28930
28887
 
@@ -28932,7 +28889,7 @@ function Button(props) {
28932
28889
  return React.createElement("button", Object.assign({
28933
28890
  type: "button"
28934
28891
  }, props, {
28935
- className: flairup.cx(styles$1.button, props.className)
28892
+ className: shipstyles.cx(styles$1.button, props.className)
28936
28893
  }), props.children);
28937
28894
  }
28938
28895
  var styles$1 = /*#__PURE__*/stylesheet.create({
@@ -28965,7 +28922,7 @@ function ClickableEmojiButton(_ref) {
28965
28922
  noBackground = _ref$noBackground === void 0 ? false : _ref$noBackground,
28966
28923
  style = _ref.style;
28967
28924
  return React.createElement(Button, {
28968
- className: flairup.cx(styles$2.emoji, hidden && commonStyles.hidden, hiddenOnSearch && commonInteractionStyles.hiddenOnSearch, (_cx = {}, _cx[ClassNames.visible] = !hidden && !hiddenOnSearch, _cx), !!(hasVariations && showVariations) && styles$2.hasVariations, noBackground && styles$2.noBackground, className),
28925
+ className: shipstyles.cx(styles$2.emoji, hidden && commonStyles.hidden, hiddenOnSearch && commonInteractionStyles.hiddenOnSearch, (_cx = {}, _cx[ClassNames.visible] = !hidden && !hiddenOnSearch, _cx), !!(hasVariations && showVariations) && styles$2.hasVariations, noBackground && styles$2.noBackground, className),
28969
28926
  "data-unified": unified,
28970
28927
  "aria-label": getAriaLabel(emojiNames),
28971
28928
  "data-full-name": emojiNames,
@@ -29053,7 +29010,7 @@ function EmojiImg(_ref) {
29053
29010
  return React.createElement("img", {
29054
29011
  src: imgUrl,
29055
29012
  alt: emojiName,
29056
- className: flairup.cx(styles$3.emojiImag, emojiStyles.external, emojiStyles.common, className),
29013
+ className: shipstyles.cx(styles$3.emojiImag, emojiStyles.external, emojiStyles.common, className),
29057
29014
  loading: lazyLoad ? 'lazy' : 'eager',
29058
29015
  onError: onError,
29059
29016
  style: style
@@ -29075,7 +29032,7 @@ function NativeEmoji(_ref) {
29075
29032
  style = _ref.style,
29076
29033
  className = _ref.className;
29077
29034
  return React.createElement("span", {
29078
- className: flairup.cx(
29035
+ className: shipstyles.cx(
29079
29036
  // Order matters: cx() lets the later class win same-property
29080
29037
  // conflicts, so the zeroing reset must come first and the real
29081
29038
  // font-size last — otherwise the emoji renders at 0px.
@@ -29166,13 +29123,13 @@ function ClickableEmoji(_ref) {
29166
29123
  _ref$noBackground = _ref.noBackground,
29167
29124
  noBackground = _ref$noBackground === void 0 ? false : _ref$noBackground,
29168
29125
  style = _ref.style;
29169
- var hasVariations = emojiHasVariations$1(emoji);
29126
+ var hasVariations = emojiHasVariations(emoji);
29170
29127
  return React.createElement(ClickableEmojiButton, {
29171
29128
  hasVariations: hasVariations,
29172
29129
  showVariations: showVariations,
29173
29130
  hidden: hidden,
29174
29131
  hiddenOnSearch: hiddenOnSearch,
29175
- emojiNames: emojiNames$1(emoji),
29132
+ emojiNames: emojiNames(emoji),
29176
29133
  unified: unified,
29177
29134
  noBackground: noBackground,
29178
29135
  style: style
@@ -29196,7 +29153,7 @@ function BtnPlus() {
29196
29153
  "aria-label": "Show all Emojis",
29197
29154
  title: "Show all Emojis",
29198
29155
  tabIndex: 0,
29199
- className: flairup.cx(styles$5.plusSign),
29156
+ className: shipstyles.cx(styles$5.plusSign),
29200
29157
  onClick: function onClick() {
29201
29158
  return setReactionsMode(false);
29202
29159
  }
@@ -29263,7 +29220,7 @@ function Reactions() {
29263
29220
  return null;
29264
29221
  }
29265
29222
  return React.createElement("ul", {
29266
- className: flairup.cx(styles$6.list, !reactionsOpen && commonStyles.hidden),
29223
+ className: shipstyles.cx(styles$6.list, !reactionsOpen && commonStyles.hidden),
29267
29224
  ref: ReactionsRef,
29268
29225
  "aria-label": "Reactions"
29269
29226
  }, reactions.map(function (reaction) {
@@ -29278,7 +29235,7 @@ function Reactions() {
29278
29235
  emojiStyle: emojiStyle,
29279
29236
  unified: reaction,
29280
29237
  showVariations: false,
29281
- className: flairup.cx(styles$6.emojiButton),
29238
+ className: shipstyles.cx(styles$6.emojiButton),
29282
29239
  noBackground: true,
29283
29240
  getEmojiUrl: getEmojiUrl
29284
29241
  }));
@@ -29521,13 +29478,13 @@ function EmojiCategory(_ref) {
29521
29478
  var category = categoryFromCategoryConfig(categoryConfig);
29522
29479
  var categoryName = categoryNameFromCategoryConfig(categoryConfig);
29523
29480
  return React.createElement("li", {
29524
- className: flairup.cx(styles$7.category, hidden && commonStyles.hidden, hiddenOnSearch && commonInteractionStyles.hiddenOnSearch),
29481
+ className: shipstyles.cx(styles$7.category, hidden && commonStyles.hidden, hiddenOnSearch && commonInteractionStyles.hiddenOnSearch),
29525
29482
  "data-name": category,
29526
29483
  "aria-label": categoryName
29527
29484
  }, React.createElement("h2", {
29528
- className: flairup.cx(styles$7.label)
29485
+ className: shipstyles.cx(styles$7.label)
29529
29486
  }, categoryName), React.createElement("div", {
29530
- className: flairup.cx(styles$7.categoryContent),
29487
+ className: shipstyles.cx(styles$7.categoryContent),
29531
29488
  style: {
29532
29489
  height: height
29533
29490
  }
@@ -29595,7 +29552,7 @@ function MeasureEmoji() {
29595
29552
  }
29596
29553
  var firstCategory = categories[0];
29597
29554
  var dummyEmoji = getEmojisByCategory(categoryFromCategoryConfig(firstCategory))[0];
29598
- var unified = dummyEmoji ? emojiUnified$1(dummyEmoji, activeSkinTone) : '';
29555
+ var unified = dummyEmoji ? emojiUnified(dummyEmoji, activeSkinTone) : '';
29599
29556
  if (!dummyEmoji) {
29600
29557
  return null;
29601
29558
  }
@@ -29629,11 +29586,11 @@ function EmojiList(_ref) {
29629
29586
  categoryHeights = _React$useState[0],
29630
29587
  setCategoryHeights = _React$useState[1];
29631
29588
  var EmojiListRef = useEmojiListRef();
29632
- var getEmojisByCategory = useGetEmojisByCategory$1();
29589
+ var getEmojisByCategory = useGetEmojisByCategory();
29633
29590
  var labelHeight = getLabelHeight(EmojiListRef.current);
29634
29591
  var topOffset = 0;
29635
29592
  return React.createElement("ul", {
29636
- className: flairup.cx(styles$8.emojiList),
29593
+ className: shipstyles.cx(styles$8.emojiList),
29637
29594
  ref: EmojiListRef
29638
29595
  }, React.createElement(MeasureEmoji, null), categories.map(function (categoryConfig) {
29639
29596
  var category = categoryFromCategoryConfig(categoryConfig);
@@ -29642,9 +29599,8 @@ function EmojiList(_ref) {
29642
29599
  if (categoryHeight) {
29643
29600
  topOffset += categoryHeight + labelHeight;
29644
29601
  }
29645
- return React.createElement(React.Suspense, {
29646
- key: category
29647
- }, React.createElement(RenderCategory, {
29602
+ return React.createElement(RenderCategory, {
29603
+ key: category,
29648
29604
  categoryEmojis: getEmojisByCategory(category),
29649
29605
  categoryConfig: categoryConfig,
29650
29606
  topOffset: currentOffset,
@@ -29657,7 +29613,7 @@ function EmojiList(_ref) {
29657
29613
  }
29658
29614
  },
29659
29615
  scrollTop: scrollTop
29660
- }));
29616
+ });
29661
29617
  }));
29662
29618
  }
29663
29619
  function RenderCategory(_ref2) {
@@ -29716,7 +29672,7 @@ function EmojiVariationPicker() {
29716
29672
  var getPointerStyle = usePointerStyle(VariationPickerRef);
29717
29673
  var getEmojiUrl = useGetEmojiUrlConfig();
29718
29674
  var button = buttonFromTarget(AnchoredEmojiRef.current);
29719
- var visible = Boolean(emoji && button && emojiHasVariations$1(emoji) && button.classList.contains(ClassNames.emojiHasVariations));
29675
+ var visible = Boolean(emoji && button && emojiHasVariations(emoji) && button.classList.contains(ClassNames.emojiHasVariations));
29720
29676
  React.useEffect(function () {
29721
29677
  if (!visible) {
29722
29678
  return;
@@ -29732,11 +29688,11 @@ function EmojiVariationPicker() {
29732
29688
  }
29733
29689
  return React.createElement("div", {
29734
29690
  ref: VariationPickerRef,
29735
- className: flairup.cx(styles$9.variationPicker, getMenuDirection() === Direction.Down && styles$9.pointingUp, visible && styles$9.visible),
29691
+ className: shipstyles.cx(styles$9.variationPicker, getMenuDirection() === Direction.Down && styles$9.pointingUp, visible && styles$9.visible),
29736
29692
  style: {
29737
29693
  top: top
29738
29694
  }
29739
- }, visible && emoji ? [emojiUnified$1(emoji)].concat(emojiVariations$1(emoji)).slice(0, 6).map(function (unified) {
29695
+ }, visible && emoji ? [emojiUnified(emoji)].concat(emojiVariations(emoji)).slice(0, 6).map(function (unified) {
29740
29696
  return React.createElement(ClickableEmoji, {
29741
29697
  key: unified,
29742
29698
  emoji: emoji,
@@ -29746,7 +29702,7 @@ function EmojiVariationPicker() {
29746
29702
  getEmojiUrl: getEmojiUrl
29747
29703
  });
29748
29704
  }) : null, React.createElement("div", {
29749
- className: flairup.cx(styles$9.pointer),
29705
+ className: shipstyles.cx(styles$9.pointer),
29750
29706
  style: pointerStyle
29751
29707
  }));
29752
29708
  }
@@ -29865,7 +29821,7 @@ function Body() {
29865
29821
  useMouseDownHandlers(BodyRef, MOUSE_EVENT_SOURCE.PICKER);
29866
29822
  useOnMouseMove();
29867
29823
  return React.createElement("div", {
29868
- className: flairup.cx(styles$a.body, commonInteractionStyles.hiddenOnReactions),
29824
+ className: shipstyles.cx(styles$a.body, commonInteractionStyles.hiddenOnReactions),
29869
29825
  ref: BodyRef
29870
29826
  }, React.createElement(EmojiVariationPicker, null), React.createElement(EmojiList, {
29871
29827
  scrollTop: scrollTop
@@ -29992,7 +29948,7 @@ function Flex(_ref) {
29992
29948
  direction = _ref$direction === void 0 ? FlexDirection.ROW : _ref$direction;
29993
29949
  return React.createElement("div", {
29994
29950
  style: _extends({}, style),
29995
- className: flairup.cx(styles$b.flex, className, styles$b[direction])
29951
+ className: shipstyles.cx(styles$b.flex, className, styles$b[direction])
29996
29952
  }, children);
29997
29953
  }
29998
29954
  var styles$b = /*#__PURE__*/stylesheet.create((_stylesheet$create = {
@@ -30013,7 +29969,7 @@ function Space(_ref) {
30013
29969
  style: _extends({
30014
29970
  flex: 1
30015
29971
  }, style),
30016
- className: flairup.cx(className)
29972
+ className: shipstyles.cx(className)
30017
29973
  });
30018
29974
  }
30019
29975
 
@@ -30051,7 +30007,7 @@ function BtnSkinToneVariation(_ref) {
30051
30007
  return React.createElement(Button, {
30052
30008
  style: style,
30053
30009
  onClick: onClick,
30054
- className: flairup.cx("epr-tone-" + skinToneVariation, styles$c.tone, !isOpen && styles$c.closedTone, isActive && styles$c.active),
30010
+ className: shipstyles.cx("epr-tone-" + skinToneVariation, styles$c.tone, !isOpen && styles$c.closedTone, isActive && styles$c.active),
30055
30011
  "aria-pressed": isActive,
30056
30012
  "aria-label": "Skin tone " + skinTonesNamed[skinToneVariation]
30057
30013
  });
@@ -30143,7 +30099,7 @@ function SkinTonePicker(_ref) {
30143
30099
  var expandedSize = isOpen ? fullWidth : ITEM_SIZE + 'px';
30144
30100
  var vertical = direction === SkinTonePickerDirection.VERTICAL;
30145
30101
  return React.createElement(Relative, {
30146
- className: flairup.cx(styles$d.skinTones, vertical && styles$d.vertical, isOpen && styles$d.open, vertical && isOpen && styles$d.verticalShadow),
30102
+ className: shipstyles.cx(styles$d.skinTones, vertical && styles$d.vertical, isOpen && styles$d.open, vertical && isOpen && styles$d.verticalShadow),
30147
30103
  style: vertical ? {
30148
30104
  flexBasis: expandedSize,
30149
30105
  height: expandedSize
@@ -30151,7 +30107,7 @@ function SkinTonePicker(_ref) {
30151
30107
  flexBasis: expandedSize
30152
30108
  }
30153
30109
  }, React.createElement("div", {
30154
- className: flairup.cx(styles$d.select),
30110
+ className: shipstyles.cx(styles$d.select),
30155
30111
  ref: SkinTonePickerRef
30156
30112
  }, skinToneVariations.map(function (skinToneVariation, i) {
30157
30113
  var active = skinToneVariation === activeSkinTone;
@@ -30160,7 +30116,7 @@ function SkinTonePicker(_ref) {
30160
30116
  skinToneVariation: skinToneVariation,
30161
30117
  isOpen: isOpen,
30162
30118
  style: {
30163
- transform: flairup.cx(vertical ? "translateY(-" + i * (isOpen ? ITEM_SIZE : 0) + "px)" : "translateX(-" + i * (isOpen ? ITEM_SIZE : 0) + "px)", isOpen && active && 'scale(1.3)')
30119
+ transform: shipstyles.cx(vertical ? "translateY(-" + i * (isOpen ? ITEM_SIZE : 0) + "px)" : "translateX(-" + i * (isOpen ? ITEM_SIZE : 0) + "px)", isOpen && active && 'scale(1.3)')
30164
30120
  },
30165
30121
  isActive: active,
30166
30122
  onClick: function onClick() {
@@ -30228,7 +30184,7 @@ function Preview() {
30228
30184
  return null;
30229
30185
  }
30230
30186
  return React.createElement(Flex, {
30231
- className: flairup.cx(styles$e.preview, commonInteractionStyles.hiddenOnReactions, reactionsOpen && styles$e.hideOnReactions)
30187
+ className: shipstyles.cx(styles$e.preview, commonInteractionStyles.hiddenOnReactions, reactionsOpen && styles$e.hideOnReactions)
30232
30188
  }, React.createElement(PreviewBody, null), React.createElement(Space, null), isSkinToneInPreview ? React.createElement(SkinTonePickerMenu, null) : null);
30233
30189
  }
30234
30190
  function PreviewBody() {
@@ -30252,24 +30208,24 @@ function PreviewBody() {
30252
30208
  if (!defaultEmoji) {
30253
30209
  return null;
30254
30210
  }
30255
- var defaultText = variationPickerEmoji ? emojiName$1(variationPickerEmoji) : previewConfig.defaultCaption;
30211
+ var defaultText = variationPickerEmoji ? emojiName(variationPickerEmoji) : previewConfig.defaultCaption;
30256
30212
  return React.createElement(React.Fragment, null, React.createElement("div", null, show ? React.createElement(ViewOnlyEmoji, {
30257
30213
  unified: previewEmoji == null ? void 0 : previewEmoji.unified,
30258
30214
  emoji: emoji,
30259
30215
  emojiStyle: emojiStyle,
30260
30216
  size: 45,
30261
30217
  getEmojiUrl: getEmojiUrl,
30262
- className: flairup.cx(styles$e.emoji)
30218
+ className: shipstyles.cx(styles$e.emoji)
30263
30219
  }) : defaultEmoji ? React.createElement(ViewOnlyEmoji, {
30264
- unified: emojiUnified$1(defaultEmoji),
30220
+ unified: emojiUnified(defaultEmoji),
30265
30221
  emoji: defaultEmoji,
30266
30222
  emojiStyle: emojiStyle,
30267
30223
  size: 45,
30268
30224
  getEmojiUrl: getEmojiUrl,
30269
- className: flairup.cx(styles$e.emoji)
30225
+ className: shipstyles.cx(styles$e.emoji)
30270
30226
  }) : null), React.createElement("div", {
30271
- className: flairup.cx(styles$e.label)
30272
- }, show ? emojiName$1(emoji) : defaultText));
30227
+ className: shipstyles.cx(styles$e.label)
30228
+ }, show ? emojiName(emoji) : defaultText));
30273
30229
  }
30274
30230
  }
30275
30231
  var styles$e = /*#__PURE__*/stylesheet.create({
@@ -30398,7 +30354,7 @@ function CategoryButton(_ref) {
30398
30354
  var hasCustomIcon = icon != null;
30399
30355
  return React.createElement(Button, {
30400
30356
  tabIndex: allowNavigation ? 0 : -1,
30401
- className: flairup.cx(styles$f.catBtn, commonInteractionStyles.categoryBtn, hasCustomIcon ? styles$f.customIcon : "epr-icn-" + category, (_cx = {}, _cx[ClassNames.active] = isActiveCategory, _cx)),
30357
+ className: shipstyles.cx(styles$f.catBtn, commonInteractionStyles.categoryBtn, hasCustomIcon ? styles$f.customIcon : "epr-icn-" + category, (_cx = {}, _cx[ClassNames.active] = isActiveCategory, _cx)),
30402
30358
  onClick: onClick,
30403
30359
  "aria-label": categoryNameFromCategoryConfig(categoryConfig),
30404
30360
  "aria-selected": isActiveCategory,
@@ -30502,7 +30458,7 @@ function CategoryNavigation() {
30502
30458
  var CategoryNavigationRef = useCategoryNavigationRef();
30503
30459
  var hideCustomCategory = useShouldHideCustomEmojis();
30504
30460
  return React.createElement("div", {
30505
- className: flairup.cx(styles$g.nav),
30461
+ className: shipstyles.cx(styles$g.nav),
30506
30462
  role: "tablist",
30507
30463
  "aria-label": "Category navigation",
30508
30464
  id: "epr-category-nav-id",
@@ -30560,12 +30516,12 @@ function BtnClearSearch() {
30560
30516
  var clearSearch = useClearSearch();
30561
30517
  var searchClearButtonLabel = useSearchClearButtonLabelConfig();
30562
30518
  return React.createElement(Button, {
30563
- className: flairup.cx(styles$h.btnClearSearch, commonInteractionStyles.visibleOnSearchOnly),
30519
+ className: shipstyles.cx(styles$h.btnClearSearch, commonInteractionStyles.visibleOnSearchOnly),
30564
30520
  onClick: clearSearch,
30565
30521
  "aria-label": searchClearButtonLabel,
30566
30522
  title: searchClearButtonLabel
30567
30523
  }, React.createElement("div", {
30568
- className: flairup.cx(styles$h.icnClearnSearch)
30524
+ className: shipstyles.cx(styles$h.icnClearnSearch)
30569
30525
  }));
30570
30526
  }
30571
30527
  var HoverDark = {
@@ -30619,7 +30575,7 @@ var SVGMagnifier = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZG
30619
30575
 
30620
30576
  function IcnSearch() {
30621
30577
  return React.createElement("div", {
30622
- className: flairup.cx(styles$i.icnSearch)
30578
+ className: shipstyles.cx(styles$i.icnSearch)
30623
30579
  });
30624
30580
  }
30625
30581
  var styles$i = /*#__PURE__*/stylesheet.create(/*#__PURE__*/_extends({
@@ -30648,7 +30604,7 @@ function SearchContainer() {
30648
30604
  return null;
30649
30605
  }
30650
30606
  return React.createElement(Flex, {
30651
- className: flairup.cx(styles$j.overlay)
30607
+ className: shipstyles.cx(styles$j.overlay)
30652
30608
  }, React.createElement(Search, null), isSkinToneInSearch ? React.createElement(SkinTonePicker, null) : null);
30653
30609
  }
30654
30610
  function Search() {
@@ -30663,13 +30619,13 @@ function Search() {
30663
30619
  var input = SearchInputRef == null ? void 0 : SearchInputRef.current;
30664
30620
  var value = input == null ? void 0 : input.value;
30665
30621
  return React.createElement(Relative, {
30666
- className: flairup.cx(styles$j.searchContainer)
30622
+ className: shipstyles.cx(styles$j.searchContainer)
30667
30623
  }, React.createElement("input", {
30668
30624
  // eslint-disable-next-line jsx-a11y/no-autofocus
30669
30625
  autoFocus: autoFocus,
30670
30626
  "aria-label": 'Type to search for an emoji',
30671
30627
  onFocus: closeAllOpenToggles,
30672
- className: flairup.cx(styles$j.search),
30628
+ className: shipstyles.cx(styles$j.search),
30673
30629
  type: "text",
30674
30630
  "aria-controls": "epr-search-id",
30675
30631
  placeholder: placeholder,
@@ -30680,7 +30636,7 @@ function Search() {
30680
30636
  ref: SearchInputRef
30681
30637
  }), searchTerm ? React.createElement("div", {
30682
30638
  role: "status",
30683
- className: flairup.cx('epr-status-search-results', styles$j.visuallyHidden),
30639
+ className: shipstyles.cx('epr-status-search-results', styles$j.visuallyHidden),
30684
30640
  "aria-live": "polite",
30685
30641
  id: "epr-search-id",
30686
30642
  "aria-atomic": "true"
@@ -30769,7 +30725,7 @@ var styles$j = /*#__PURE__*/stylesheet.create(/*#__PURE__*/_extends({
30769
30725
 
30770
30726
  function Header() {
30771
30727
  return React.createElement(Relative, {
30772
- className: flairup.cx('epr-header', commonInteractionStyles.hiddenOnReactions)
30728
+ className: shipstyles.cx('epr-header', commonInteractionStyles.hiddenOnReactions)
30773
30729
  }, React.createElement(SearchContainer, null), React.createElement(CategoryNavigation, null));
30774
30730
  }
30775
30731