emoji-picker-react 4.9.3 → 4.10.0

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.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.9.3",
2
+ "version": "4.10.0",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -64,6 +64,8 @@
64
64
  ],
65
65
  "devDependencies": {
66
66
  "@babel/core": "^7.18.10",
67
+ "@babel/preset-react": "^7.24.1",
68
+ "@babel/preset-typescript": "^7.24.1",
67
69
  "@size-limit/preset-small-lib": "^8.0.1",
68
70
  "@storybook/addon-essentials": "^8.1.1",
69
71
  "@storybook/addon-info": "^5.3.21",
@@ -98,11 +100,9 @@
98
100
  "tiny-invariant": "^1.2.0",
99
101
  "tsdx": "^0.14.1",
100
102
  "tslib": "^2.4.0",
101
- "typescript": "^4.7.4",
102
- "@babel/preset-react": "^7.24.1",
103
- "@babel/preset-typescript": "^7.24.1"
103
+ "typescript": "^4.7.4"
104
104
  },
105
105
  "dependencies": {
106
- "flairup": "0.0.38"
106
+ "flairup": "0.0.39"
107
107
  }
108
108
  }
@@ -65,7 +65,6 @@ export const commonInteractionStyles = stylesheet.create({
65
65
  opacity: '1',
66
66
  backgroundPositionY: 'var(--epr-category-navigation-button-size)'
67
67
  },
68
- // @ts-ignore
69
68
  '&.epr-active': {
70
69
  opacity: '1',
71
70
  backgroundPositionY: 'var(--epr-category-navigation-button-size)'
@@ -47,7 +47,6 @@ const styles = stylesheet.create({
47
47
  ':hover': {
48
48
  color: 'var(--epr-highlight-color)',
49
49
  backgroundColor: 'var(--epr-hover-bg-color-reduced-opacity)',
50
- // @ts-ignore
51
50
  ':after': {
52
51
  backgroundPositionY: '-20px'
53
52
  }
@@ -55,7 +54,6 @@ const styles = stylesheet.create({
55
54
  ':focus': {
56
55
  color: 'var(--epr-highlight-color)',
57
56
  backgroundColor: 'var(--epr-hover-bg-color-reduced-opacity)',
58
- // @ts-ignore
59
57
  ':after': {
60
58
  backgroundPositionY: '-40px'
61
59
  }
@@ -64,7 +64,7 @@ const styles = stylesheet.create({
64
64
  label: {
65
65
  '.': ClassNames.label,
66
66
  alignItems: 'center',
67
- // @ts-expect-error - backdropFilter is a valid CSS property
67
+ // @ts-ignore - backdropFilter is not recognized.
68
68
  backdropFilter: 'blur(3px)',
69
69
  backgroundColor: 'var(--epr-category-label-bg-color)',
70
70
  color: 'var(--epr-category-label-text-color)',
@@ -57,7 +57,6 @@ const styles = stylesheet.create({
57
57
  ':focus': {
58
58
  boxShadow: '0 0 0 3px var(--epr-focus-bg-color)'
59
59
  },
60
- // @ts-ignore
61
60
  '&.epr-tone-neutral': {
62
61
  backgroundColor: '#ffd225'
63
62
  },
@@ -4,7 +4,10 @@ import * as React from 'react';
4
4
 
5
5
  import { ClassNames } from '../../../DomUtils/classNames';
6
6
  import { stylesheet } from '../../../Stylesheet/stylesheet';
7
- import {useOnSkinToneChangeConfig, useSkinTonesDisabledConfig} from '../../../config/useConfig';
7
+ import {
8
+ useOnSkinToneChangeConfig,
9
+ useSkinTonesDisabledConfig
10
+ } from '../../../config/useConfig';
8
11
  import skinToneVariations from '../../../data/skinToneVariations';
9
12
  import { useCloseAllOpenToggles } from '../../../hooks/useCloseAllOpenToggles';
10
13
  import { useFocusSearchInput } from '../../../hooks/useFocus';
@@ -133,10 +136,9 @@ const styles = stylesheet.create({
133
136
  boxShadow: '0px 0 7px var(--epr-picker-border-color)'
134
137
  },
135
138
  open: {
136
- // @ts-ignore
139
+ // @ts-ignore - backdropFilter is not recognized.
137
140
  backdropFilter: 'blur(5px)',
138
141
  background: 'var(--epr-skin-tone-picker-menu-color)',
139
- // @ts-ignore
140
142
  '.epr-active:after': {
141
143
  content: '',
142
144
  position: 'absolute',
@@ -153,7 +155,6 @@ const styles = stylesheet.create({
153
155
  position: 'relative',
154
156
  width: 'var(--epr-skin-tone-size)',
155
157
  height: 'var(--epr-skin-tone-size)',
156
- // @ts-ignore
157
158
  '> button': {
158
159
  width: 'var(--epr-skin-tone-size)',
159
160
  display: 'block',
@@ -112,7 +112,6 @@ const styles = stylesheet.create({
112
112
  backgroundColor: 'var(--epr-bg-color)',
113
113
  overflow: 'hidden',
114
114
  transition: 'all 0.3s ease-in-out, background-color 0.1s ease-in-out',
115
- // @ts-expect-error - need to work on this
116
115
  '*': {
117
116
  boxSizing: 'border-box',
118
117
  fontFamily: 'sans-serif'
@@ -227,7 +226,7 @@ const styles = stylesheet.create({
227
226
  height: '50px',
228
227
  display: 'inline-flex',
229
228
  backgroundColor: 'var(--epr-reactions-bg-color)',
230
- // @ts-expect-error - need to work on this
229
+ // @ts-ignore - backdropFilter is not recognized.
231
230
  backdropFilter: 'blur(8px)',
232
231
  '--': {
233
232
  '--epr-picker-border-radius': '50px'
@@ -88,7 +88,6 @@ const styles = stylesheet.create({
88
88
  border: '2px solid var(--epr-category-icon-active-color)',
89
89
  borderRadius: '50%'
90
90
  },
91
- // @ts-ignore
92
91
  '&.epr-icn-suggested': {
93
92
  backgroundPositionX:
94
93
  'calc(var(--epr-category-navigation-button-size) * -8)'
@@ -48,6 +48,10 @@ export function mergeConfig(
48
48
  suggestionMode: config.suggestedEmojisMode
49
49
  });
50
50
 
51
+ config.hiddenEmojis.forEach(emoji => {
52
+ config.unicodeToHide.add(emoji);
53
+ });
54
+
51
55
  setCustomEmojis(config.customEmojis ?? []);
52
56
 
53
57
  const skinTonePickerLocation = config.searchDisabled
@@ -90,7 +94,8 @@ export function basePickerConfig(): PickerConfigInternal {
90
94
  reactionsDefaultOpen: false,
91
95
  reactions: DEFAULT_REACTIONS,
92
96
  open: true,
93
- allowExpandReactions: true
97
+ allowExpandReactions: true,
98
+ hiddenEmojis: []
94
99
  };
95
100
  }
96
101
 
@@ -120,6 +125,7 @@ export type PickerConfigInternal = {
120
125
  reactions: string[];
121
126
  open: boolean;
122
127
  allowExpandReactions: boolean;
128
+ hiddenEmojis: string[];
123
129
  };
124
130
 
125
131
  export type PreviewConfig = {