emoji-picker-react 4.20.2 → 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 (33) hide show
  1. package/README.md +1 -1
  2. package/dist/Stylesheet/stylesheet.d.ts +1 -1
  3. package/dist/emoji-picker-react.cjs.development.js +37 -37
  4. package/dist/emoji-picker-react.cjs.development.js.map +1 -1
  5. package/dist/emoji-picker-react.cjs.production.min.js +1 -1
  6. package/dist/emoji-picker-react.cjs.production.min.js.map +1 -1
  7. package/dist/emoji-picker-react.esm.js +1 -1
  8. package/dist/emoji-picker-react.esm.js.map +1 -1
  9. package/llms.txt +1 -1
  10. package/package.json +8 -2
  11. package/src/Stylesheet/stylesheet.tsx +1 -1
  12. package/src/components/Layout/Flex.tsx +1 -1
  13. package/src/components/Layout/Space.tsx +1 -1
  14. package/src/components/Reactions/BtnPlus.tsx +1 -1
  15. package/src/components/Reactions/Reactions.tsx +1 -1
  16. package/src/components/atoms/Button.tsx +1 -1
  17. package/src/components/body/Body.tsx +1 -1
  18. package/src/components/body/EmojiCategory.tsx +1 -1
  19. package/src/components/body/EmojiList.tsx +1 -1
  20. package/src/components/body/EmojiVariationPicker.tsx +1 -1
  21. package/src/components/emoji/ClickableEmojiButton.tsx +1 -1
  22. package/src/components/emoji/EmojiImg.tsx +1 -1
  23. package/src/components/emoji/NativeEmoji.tsx +1 -1
  24. package/src/components/footer/Preview.tsx +1 -1
  25. package/src/components/header/Header.tsx +1 -1
  26. package/src/components/header/Search/BtnClearSearch.tsx +1 -1
  27. package/src/components/header/Search/IcnSearch.tsx +1 -1
  28. package/src/components/header/Search/Search.tsx +1 -1
  29. package/src/components/header/SkinTonePicker/BtnSkinToneVariation.tsx +1 -1
  30. package/src/components/header/SkinTonePicker/SkinTonePicker.tsx +1 -1
  31. package/src/components/main/PickerMain.tsx +1 -1
  32. package/src/components/navigation/CategoryButton.tsx +1 -1
  33. package/src/components/navigation/CategoryNavigation.tsx +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
 
@@ -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;
@@ -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',
@@ -28327,7 +28327,7 @@ function PickerRootElement(_ref2) {
28327
28327
  height = _ref3.height,
28328
28328
  styleProps = _objectWithoutPropertiesLoose(_ref3, _excluded$1);
28329
28329
  return React.createElement("aside", {
28330
- 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),
28331
28331
  ref: PickerMainRef,
28332
28332
  style: _extends({}, styleProps, !reactionsMode && {
28333
28333
  height: height,
@@ -28889,7 +28889,7 @@ function Button(props) {
28889
28889
  return React.createElement("button", Object.assign({
28890
28890
  type: "button"
28891
28891
  }, props, {
28892
- className: flairup.cx(styles$1.button, props.className)
28892
+ className: shipstyles.cx(styles$1.button, props.className)
28893
28893
  }), props.children);
28894
28894
  }
28895
28895
  var styles$1 = /*#__PURE__*/stylesheet.create({
@@ -28922,7 +28922,7 @@ function ClickableEmojiButton(_ref) {
28922
28922
  noBackground = _ref$noBackground === void 0 ? false : _ref$noBackground,
28923
28923
  style = _ref.style;
28924
28924
  return React.createElement(Button, {
28925
- 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),
28926
28926
  "data-unified": unified,
28927
28927
  "aria-label": getAriaLabel(emojiNames),
28928
28928
  "data-full-name": emojiNames,
@@ -29010,7 +29010,7 @@ function EmojiImg(_ref) {
29010
29010
  return React.createElement("img", {
29011
29011
  src: imgUrl,
29012
29012
  alt: emojiName,
29013
- className: flairup.cx(styles$3.emojiImag, emojiStyles.external, emojiStyles.common, className),
29013
+ className: shipstyles.cx(styles$3.emojiImag, emojiStyles.external, emojiStyles.common, className),
29014
29014
  loading: lazyLoad ? 'lazy' : 'eager',
29015
29015
  onError: onError,
29016
29016
  style: style
@@ -29032,7 +29032,7 @@ function NativeEmoji(_ref) {
29032
29032
  style = _ref.style,
29033
29033
  className = _ref.className;
29034
29034
  return React.createElement("span", {
29035
- className: flairup.cx(
29035
+ className: shipstyles.cx(
29036
29036
  // Order matters: cx() lets the later class win same-property
29037
29037
  // conflicts, so the zeroing reset must come first and the real
29038
29038
  // font-size last — otherwise the emoji renders at 0px.
@@ -29153,7 +29153,7 @@ function BtnPlus() {
29153
29153
  "aria-label": "Show all Emojis",
29154
29154
  title: "Show all Emojis",
29155
29155
  tabIndex: 0,
29156
- className: flairup.cx(styles$5.plusSign),
29156
+ className: shipstyles.cx(styles$5.plusSign),
29157
29157
  onClick: function onClick() {
29158
29158
  return setReactionsMode(false);
29159
29159
  }
@@ -29220,7 +29220,7 @@ function Reactions() {
29220
29220
  return null;
29221
29221
  }
29222
29222
  return React.createElement("ul", {
29223
- className: flairup.cx(styles$6.list, !reactionsOpen && commonStyles.hidden),
29223
+ className: shipstyles.cx(styles$6.list, !reactionsOpen && commonStyles.hidden),
29224
29224
  ref: ReactionsRef,
29225
29225
  "aria-label": "Reactions"
29226
29226
  }, reactions.map(function (reaction) {
@@ -29235,7 +29235,7 @@ function Reactions() {
29235
29235
  emojiStyle: emojiStyle,
29236
29236
  unified: reaction,
29237
29237
  showVariations: false,
29238
- className: flairup.cx(styles$6.emojiButton),
29238
+ className: shipstyles.cx(styles$6.emojiButton),
29239
29239
  noBackground: true,
29240
29240
  getEmojiUrl: getEmojiUrl
29241
29241
  }));
@@ -29478,13 +29478,13 @@ function EmojiCategory(_ref) {
29478
29478
  var category = categoryFromCategoryConfig(categoryConfig);
29479
29479
  var categoryName = categoryNameFromCategoryConfig(categoryConfig);
29480
29480
  return React.createElement("li", {
29481
- 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),
29482
29482
  "data-name": category,
29483
29483
  "aria-label": categoryName
29484
29484
  }, React.createElement("h2", {
29485
- className: flairup.cx(styles$7.label)
29485
+ className: shipstyles.cx(styles$7.label)
29486
29486
  }, categoryName), React.createElement("div", {
29487
- className: flairup.cx(styles$7.categoryContent),
29487
+ className: shipstyles.cx(styles$7.categoryContent),
29488
29488
  style: {
29489
29489
  height: height
29490
29490
  }
@@ -29590,7 +29590,7 @@ function EmojiList(_ref) {
29590
29590
  var labelHeight = getLabelHeight(EmojiListRef.current);
29591
29591
  var topOffset = 0;
29592
29592
  return React.createElement("ul", {
29593
- className: flairup.cx(styles$8.emojiList),
29593
+ className: shipstyles.cx(styles$8.emojiList),
29594
29594
  ref: EmojiListRef
29595
29595
  }, React.createElement(MeasureEmoji, null), categories.map(function (categoryConfig) {
29596
29596
  var category = categoryFromCategoryConfig(categoryConfig);
@@ -29688,7 +29688,7 @@ function EmojiVariationPicker() {
29688
29688
  }
29689
29689
  return React.createElement("div", {
29690
29690
  ref: VariationPickerRef,
29691
- 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),
29692
29692
  style: {
29693
29693
  top: top
29694
29694
  }
@@ -29702,7 +29702,7 @@ function EmojiVariationPicker() {
29702
29702
  getEmojiUrl: getEmojiUrl
29703
29703
  });
29704
29704
  }) : null, React.createElement("div", {
29705
- className: flairup.cx(styles$9.pointer),
29705
+ className: shipstyles.cx(styles$9.pointer),
29706
29706
  style: pointerStyle
29707
29707
  }));
29708
29708
  }
@@ -29821,7 +29821,7 @@ function Body() {
29821
29821
  useMouseDownHandlers(BodyRef, MOUSE_EVENT_SOURCE.PICKER);
29822
29822
  useOnMouseMove();
29823
29823
  return React.createElement("div", {
29824
- className: flairup.cx(styles$a.body, commonInteractionStyles.hiddenOnReactions),
29824
+ className: shipstyles.cx(styles$a.body, commonInteractionStyles.hiddenOnReactions),
29825
29825
  ref: BodyRef
29826
29826
  }, React.createElement(EmojiVariationPicker, null), React.createElement(EmojiList, {
29827
29827
  scrollTop: scrollTop
@@ -29948,7 +29948,7 @@ function Flex(_ref) {
29948
29948
  direction = _ref$direction === void 0 ? FlexDirection.ROW : _ref$direction;
29949
29949
  return React.createElement("div", {
29950
29950
  style: _extends({}, style),
29951
- className: flairup.cx(styles$b.flex, className, styles$b[direction])
29951
+ className: shipstyles.cx(styles$b.flex, className, styles$b[direction])
29952
29952
  }, children);
29953
29953
  }
29954
29954
  var styles$b = /*#__PURE__*/stylesheet.create((_stylesheet$create = {
@@ -29969,7 +29969,7 @@ function Space(_ref) {
29969
29969
  style: _extends({
29970
29970
  flex: 1
29971
29971
  }, style),
29972
- className: flairup.cx(className)
29972
+ className: shipstyles.cx(className)
29973
29973
  });
29974
29974
  }
29975
29975
 
@@ -30007,7 +30007,7 @@ function BtnSkinToneVariation(_ref) {
30007
30007
  return React.createElement(Button, {
30008
30008
  style: style,
30009
30009
  onClick: onClick,
30010
- 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),
30011
30011
  "aria-pressed": isActive,
30012
30012
  "aria-label": "Skin tone " + skinTonesNamed[skinToneVariation]
30013
30013
  });
@@ -30099,7 +30099,7 @@ function SkinTonePicker(_ref) {
30099
30099
  var expandedSize = isOpen ? fullWidth : ITEM_SIZE + 'px';
30100
30100
  var vertical = direction === SkinTonePickerDirection.VERTICAL;
30101
30101
  return React.createElement(Relative, {
30102
- 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),
30103
30103
  style: vertical ? {
30104
30104
  flexBasis: expandedSize,
30105
30105
  height: expandedSize
@@ -30107,7 +30107,7 @@ function SkinTonePicker(_ref) {
30107
30107
  flexBasis: expandedSize
30108
30108
  }
30109
30109
  }, React.createElement("div", {
30110
- className: flairup.cx(styles$d.select),
30110
+ className: shipstyles.cx(styles$d.select),
30111
30111
  ref: SkinTonePickerRef
30112
30112
  }, skinToneVariations.map(function (skinToneVariation, i) {
30113
30113
  var active = skinToneVariation === activeSkinTone;
@@ -30116,7 +30116,7 @@ function SkinTonePicker(_ref) {
30116
30116
  skinToneVariation: skinToneVariation,
30117
30117
  isOpen: isOpen,
30118
30118
  style: {
30119
- 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)')
30120
30120
  },
30121
30121
  isActive: active,
30122
30122
  onClick: function onClick() {
@@ -30184,7 +30184,7 @@ function Preview() {
30184
30184
  return null;
30185
30185
  }
30186
30186
  return React.createElement(Flex, {
30187
- 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)
30188
30188
  }, React.createElement(PreviewBody, null), React.createElement(Space, null), isSkinToneInPreview ? React.createElement(SkinTonePickerMenu, null) : null);
30189
30189
  }
30190
30190
  function PreviewBody() {
@@ -30215,16 +30215,16 @@ function PreviewBody() {
30215
30215
  emojiStyle: emojiStyle,
30216
30216
  size: 45,
30217
30217
  getEmojiUrl: getEmojiUrl,
30218
- className: flairup.cx(styles$e.emoji)
30218
+ className: shipstyles.cx(styles$e.emoji)
30219
30219
  }) : defaultEmoji ? React.createElement(ViewOnlyEmoji, {
30220
30220
  unified: emojiUnified(defaultEmoji),
30221
30221
  emoji: defaultEmoji,
30222
30222
  emojiStyle: emojiStyle,
30223
30223
  size: 45,
30224
30224
  getEmojiUrl: getEmojiUrl,
30225
- className: flairup.cx(styles$e.emoji)
30225
+ className: shipstyles.cx(styles$e.emoji)
30226
30226
  }) : null), React.createElement("div", {
30227
- className: flairup.cx(styles$e.label)
30227
+ className: shipstyles.cx(styles$e.label)
30228
30228
  }, show ? emojiName(emoji) : defaultText));
30229
30229
  }
30230
30230
  }
@@ -30354,7 +30354,7 @@ function CategoryButton(_ref) {
30354
30354
  var hasCustomIcon = icon != null;
30355
30355
  return React.createElement(Button, {
30356
30356
  tabIndex: allowNavigation ? 0 : -1,
30357
- 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)),
30358
30358
  onClick: onClick,
30359
30359
  "aria-label": categoryNameFromCategoryConfig(categoryConfig),
30360
30360
  "aria-selected": isActiveCategory,
@@ -30458,7 +30458,7 @@ function CategoryNavigation() {
30458
30458
  var CategoryNavigationRef = useCategoryNavigationRef();
30459
30459
  var hideCustomCategory = useShouldHideCustomEmojis();
30460
30460
  return React.createElement("div", {
30461
- className: flairup.cx(styles$g.nav),
30461
+ className: shipstyles.cx(styles$g.nav),
30462
30462
  role: "tablist",
30463
30463
  "aria-label": "Category navigation",
30464
30464
  id: "epr-category-nav-id",
@@ -30516,12 +30516,12 @@ function BtnClearSearch() {
30516
30516
  var clearSearch = useClearSearch();
30517
30517
  var searchClearButtonLabel = useSearchClearButtonLabelConfig();
30518
30518
  return React.createElement(Button, {
30519
- className: flairup.cx(styles$h.btnClearSearch, commonInteractionStyles.visibleOnSearchOnly),
30519
+ className: shipstyles.cx(styles$h.btnClearSearch, commonInteractionStyles.visibleOnSearchOnly),
30520
30520
  onClick: clearSearch,
30521
30521
  "aria-label": searchClearButtonLabel,
30522
30522
  title: searchClearButtonLabel
30523
30523
  }, React.createElement("div", {
30524
- className: flairup.cx(styles$h.icnClearnSearch)
30524
+ className: shipstyles.cx(styles$h.icnClearnSearch)
30525
30525
  }));
30526
30526
  }
30527
30527
  var HoverDark = {
@@ -30575,7 +30575,7 @@ var SVGMagnifier = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZG
30575
30575
 
30576
30576
  function IcnSearch() {
30577
30577
  return React.createElement("div", {
30578
- className: flairup.cx(styles$i.icnSearch)
30578
+ className: shipstyles.cx(styles$i.icnSearch)
30579
30579
  });
30580
30580
  }
30581
30581
  var styles$i = /*#__PURE__*/stylesheet.create(/*#__PURE__*/_extends({
@@ -30604,7 +30604,7 @@ function SearchContainer() {
30604
30604
  return null;
30605
30605
  }
30606
30606
  return React.createElement(Flex, {
30607
- className: flairup.cx(styles$j.overlay)
30607
+ className: shipstyles.cx(styles$j.overlay)
30608
30608
  }, React.createElement(Search, null), isSkinToneInSearch ? React.createElement(SkinTonePicker, null) : null);
30609
30609
  }
30610
30610
  function Search() {
@@ -30619,13 +30619,13 @@ function Search() {
30619
30619
  var input = SearchInputRef == null ? void 0 : SearchInputRef.current;
30620
30620
  var value = input == null ? void 0 : input.value;
30621
30621
  return React.createElement(Relative, {
30622
- className: flairup.cx(styles$j.searchContainer)
30622
+ className: shipstyles.cx(styles$j.searchContainer)
30623
30623
  }, React.createElement("input", {
30624
30624
  // eslint-disable-next-line jsx-a11y/no-autofocus
30625
30625
  autoFocus: autoFocus,
30626
30626
  "aria-label": 'Type to search for an emoji',
30627
30627
  onFocus: closeAllOpenToggles,
30628
- className: flairup.cx(styles$j.search),
30628
+ className: shipstyles.cx(styles$j.search),
30629
30629
  type: "text",
30630
30630
  "aria-controls": "epr-search-id",
30631
30631
  placeholder: placeholder,
@@ -30636,7 +30636,7 @@ function Search() {
30636
30636
  ref: SearchInputRef
30637
30637
  }), searchTerm ? React.createElement("div", {
30638
30638
  role: "status",
30639
- className: flairup.cx('epr-status-search-results', styles$j.visuallyHidden),
30639
+ className: shipstyles.cx('epr-status-search-results', styles$j.visuallyHidden),
30640
30640
  "aria-live": "polite",
30641
30641
  id: "epr-search-id",
30642
30642
  "aria-atomic": "true"
@@ -30725,7 +30725,7 @@ var styles$j = /*#__PURE__*/stylesheet.create(/*#__PURE__*/_extends({
30725
30725
 
30726
30726
  function Header() {
30727
30727
  return React.createElement(Relative, {
30728
- className: flairup.cx('epr-header', commonInteractionStyles.hiddenOnReactions)
30728
+ className: shipstyles.cx('epr-header', commonInteractionStyles.hiddenOnReactions)
30729
30729
  }, React.createElement(SearchContainer, null), React.createElement(CategoryNavigation, null));
30730
30730
  }
30731
30731