emoji-picker-react 4.0.8 → 4.1.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/README.md +13 -4
- package/dist/components/context/PickerContext.d.ts +1 -0
- package/dist/config/config.d.ts +1 -0
- package/dist/config/useConfig.d.ts +1 -0
- package/dist/dataUtils/DataTypes.d.ts +1 -0
- package/dist/dataUtils/emojiSelectors.d.ts +1 -0
- package/dist/emoji-picker-react.cjs.development.js +3758 -1855
- package/dist/emoji-picker-react.cjs.development.js.map +1 -1
- package/dist/emoji-picker-react.cjs.production.min.js +1 -1
- package/dist/emoji-picker-react.cjs.production.min.js.map +1 -1
- package/dist/emoji-picker-react.esm.js +3759 -1856
- package/dist/emoji-picker-react.esm.js.map +1 -1
- package/dist/hooks/useDisallowedEmojis.d.ts +1 -0
- package/package.json +5 -5
- package/src/components/body/EmojiList.tsx +14 -6
- package/src/components/context/PickerContext.tsx +16 -3
- package/src/config/config.ts +9 -7
- package/src/config/useConfig.ts +6 -1
- package/src/data/emojis.json +1 -1
- package/src/dataUtils/DataTypes.ts +1 -0
- package/src/dataUtils/emojiSelectors.ts +8 -3
- package/src/hooks/useDisallowedEmojis.ts +33 -0
- package/src/types/exposedTypes.ts +5 -5
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
\*\*\*\*# Emoji Picker React (v4) | [Live Demo](https://codesandbox.io/s/emoji-picker-react-4-z2gkzp)
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|
|
|
@@ -56,6 +56,7 @@ The following props are accepted by them picker:
|
|
|
56
56
|
| suggestedEmojisMode | string | `frequent` | Controls the suggested emojis mode. Possible values are `frequent` and `recent`. |
|
|
57
57
|
| skinTonesDisabled | boolean | `false` | Controls whether the skin tones are disabled or not. |
|
|
58
58
|
| `width` | number | `350` | Controls the width of the picker. |
|
|
59
|
+
| emojiVersion | `string` | - | Allows displaying emojis up to a certain version for compatibility. |
|
|
59
60
|
| `height` | number | `450` | Controls the height of the picker. |
|
|
60
61
|
|
|
61
62
|
## Full details
|
|
@@ -139,12 +140,12 @@ import { SkinTones } from 'emoji-picker-react';
|
|
|
139
140
|
[
|
|
140
141
|
{
|
|
141
142
|
category: 'suggested',
|
|
142
|
-
name: 'Recently Used'
|
|
143
|
+
name: 'Recently Used',
|
|
143
144
|
},
|
|
144
145
|
{
|
|
145
146
|
category: 'smileys_people',
|
|
146
|
-
name: 'Faces...'
|
|
147
|
-
}
|
|
147
|
+
name: 'Faces...',
|
|
148
|
+
},
|
|
148
149
|
];
|
|
149
150
|
```
|
|
150
151
|
|
|
@@ -155,6 +156,14 @@ import { SkinTones } from 'emoji-picker-react';
|
|
|
155
156
|
import { SuggestionMode } from 'emoji-picker-react';
|
|
156
157
|
```
|
|
157
158
|
|
|
159
|
+
- `emojiVersion`: `string` - Allows displaying emojis up to a certain version for compatibility. The passed version will be parsed as a float and each emoji will be tested against it. Common values are:
|
|
160
|
+
- `"0.6"`
|
|
161
|
+
- `"1.0"`
|
|
162
|
+
- `"2.0"`
|
|
163
|
+
- `"3.0"`
|
|
164
|
+
- `"4.0"`
|
|
165
|
+
- `"5.0"`
|
|
166
|
+
|
|
158
167
|
# Customization
|
|
159
168
|
|
|
160
169
|
## Custom Picker Width and Height
|
|
@@ -16,6 +16,7 @@ export declare function useEmojisThatFailedToLoadState(): ReactState<Set<string>
|
|
|
16
16
|
export declare function useIsPastInitialLoad(): boolean;
|
|
17
17
|
export declare function useEmojiVariationPickerState(): ReactState<DataEmoji | null>;
|
|
18
18
|
export declare function useSkinToneFanOpenState(): ReactState<boolean>;
|
|
19
|
+
export declare function useDisallowedEmojisRef(): React.MutableRefObject<Record<string, boolean>>;
|
|
19
20
|
export declare function useUpdateSuggested(): [number, () => void];
|
|
20
21
|
export declare type FilterState = Record<string, FilterDict>;
|
|
21
22
|
export {};
|
package/dist/config/config.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { CategoriesConfig } from './categoryConfig';
|
|
|
3
3
|
export declare function mergeConfig(userConfig?: PickerConfig): PickerConfigInternal;
|
|
4
4
|
export declare function basePickerConfig(): PickerConfigInternal;
|
|
5
5
|
export declare type PickerConfigInternal = {
|
|
6
|
+
emojiVersion: string | null;
|
|
6
7
|
searchPlaceHolder: string;
|
|
7
8
|
defaultSkinTone: SkinTones;
|
|
8
9
|
skinTonesDisabled: boolean;
|
|
@@ -2,6 +2,7 @@ import { Categories } from '../config/categoryConfig';
|
|
|
2
2
|
import { EmojiStyle, SkinTones } from '../types/exposedTypes';
|
|
3
3
|
import { DataEmoji, DataEmojis } from './DataTypes';
|
|
4
4
|
export declare function emojiNames(emoji: DataEmoji): string[];
|
|
5
|
+
export declare function addedIn(emoji: DataEmoji): number;
|
|
5
6
|
export declare function emojiName(emoji: DataEmoji): string;
|
|
6
7
|
export declare function unifiedWithoutSkinTone(unified: string): string;
|
|
7
8
|
export declare function emojiUrl(emojiStyle: EmojiStyle, emoji: DataEmoji, skinTone?: string): string;
|