emoji-picker-react 4.5.14 → 4.5.16
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 -50
- package/dist/components/header/CssSearch.d.ts +4 -0
- package/dist/emoji-picker-react.cjs.development.js +23 -17
- 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 +23 -17
- package/dist/emoji-picker-react.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/header/CssSearch.tsx +45 -0
- package/src/components/header/Search.tsx +12 -42
package/README.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|
|
|
5
|
+
|
|
6
|
+
____
|
|
7
|
+
|
|
8
|
+
_If you enjoy using emoji-picker-react<br/>
|
|
9
|
+
You should also consider trying:<br/>
|
|
10
|
+
<img src="https://cdn.jsdelivr.net/gh/ealush/emoji-picker-react@custom_emojis_assets/vest.png" height="16"/> [Vest validation framework](https://vestjs.dev).<br/>_
|
|
11
|
+
|
|
12
|
+
____
|
|
13
|
+
|
|
5
14
|
## What to know before using
|
|
6
15
|
|
|
7
16
|
- This package assumes it runs in the browser. I have taken many steps to prevent it from failing on the server, but still, it is recommended to only render the component on the client. See troubleshooting section for more information.
|
|
@@ -219,48 +228,6 @@ imgUrl: URL for the emoji image
|
|
|
219
228
|
'https://cdn.jsdelivr.net/gh/ealush/emoji-picker-react@custom_emojis_assets/hat.png',
|
|
220
229
|
id: 'hat'
|
|
221
230
|
},
|
|
222
|
-
{
|
|
223
|
-
names: ['Kid'],
|
|
224
|
-
imgUrl:
|
|
225
|
-
'https://cdn.jsdelivr.net/gh/ealush/emoji-picker-react@custom_emojis_assets/kid.png',
|
|
226
|
-
id: 'kid'
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
names: ['Mic'],
|
|
230
|
-
imgUrl:
|
|
231
|
-
'https://cdn.jsdelivr.net/gh/ealush/emoji-picker-react@custom_emojis_assets/mic.png',
|
|
232
|
-
id: 'mic'
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
names: ['Moab', 'desert'],
|
|
236
|
-
imgUrl:
|
|
237
|
-
'https://cdn.jsdelivr.net/gh/ealush/emoji-picker-react@custom_emojis_assets/moab.png',
|
|
238
|
-
id: 'moab'
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
names: ['Potter', 'harry', 'harry potter'],
|
|
242
|
-
imgUrl:
|
|
243
|
-
'https://cdn.jsdelivr.net/gh/ealush/emoji-picker-react@custom_emojis_assets/potter.png',
|
|
244
|
-
id: 'potter'
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
names: ['Shroom', 'mushroom'],
|
|
248
|
-
imgUrl:
|
|
249
|
-
'https://cdn.jsdelivr.net/gh/ealush/emoji-picker-react@custom_emojis_assets/shroom.png',
|
|
250
|
-
id: 'shroom'
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
names: ['Smily'],
|
|
254
|
-
imgUrl:
|
|
255
|
-
'https://cdn.jsdelivr.net/gh/ealush/emoji-picker-react@custom_emojis_assets/smily.png',
|
|
256
|
-
id: 'smily'
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
names: ['Tabby', 'cat'],
|
|
260
|
-
imgUrl:
|
|
261
|
-
'https://cdn.jsdelivr.net/gh/ealush/emoji-picker-react@custom_emojis_assets/tabby.png',
|
|
262
|
-
id: 'tabby'
|
|
263
|
-
},
|
|
264
231
|
{
|
|
265
232
|
names: ['Vest'],
|
|
266
233
|
imgUrl:
|
|
@@ -334,6 +301,10 @@ export function MyApp() {
|
|
|
334
301
|
}
|
|
335
302
|
```
|
|
336
303
|
|
|
304
|
+
# How to Contribute?
|
|
305
|
+
|
|
306
|
+
Check out the [contributing documentation](https://github.com/ealush/emoji-picker-react/blob/master/CONTRIBUTING.md) to get information about contributing, reporting bugs, suggesting enhancements, and writing code changes to the project!
|
|
307
|
+
|
|
337
308
|
# Troubleshooting
|
|
338
309
|
|
|
339
310
|
## Error Boundary
|
|
@@ -364,11 +335,3 @@ For reference, if you only need to shim global, you can add
|
|
|
364
335
|
window.global = window;
|
|
365
336
|
</script>
|
|
366
337
|
```
|
|
367
|
-
|
|
368
|
-
# Other stuff I build
|
|
369
|
-
|
|
370
|
-
If you enjoy using emoji-picker-react, you may be interested in some of my other open source projects:
|
|
371
|
-
|
|
372
|
-
- [Vest](https://github.com/ealush/vest) - The best form validation framwork to date.
|
|
373
|
-
- [Context](https://github.com/ealush/vest/tree/latest/packages/context) - Context propagation library for JS Apps.
|
|
374
|
-
- [n4s](https://github.com/ealush/vest/tree/latest/packages/n4s) - enforce: fluent assertion library.
|
|
@@ -19225,6 +19225,24 @@ function CategoryNavigation() {
|
|
|
19225
19225
|
}));
|
|
19226
19226
|
}
|
|
19227
19227
|
|
|
19228
|
+
var SCOPE = /*#__PURE__*/asSelectors(ClassNames.emojiPicker) + " " + /*#__PURE__*/asSelectors(ClassNames.emojiList);
|
|
19229
|
+
var EMOJI_BUTTON = /*#__PURE__*/['button', asSelectors(ClassNames.emoji)].join('');
|
|
19230
|
+
var CATEGORY = /*#__PURE__*/asSelectors(ClassNames.category);
|
|
19231
|
+
function CssSearch(_ref) {
|
|
19232
|
+
var value = _ref.value;
|
|
19233
|
+
|
|
19234
|
+
if (!value) {
|
|
19235
|
+
return null;
|
|
19236
|
+
}
|
|
19237
|
+
|
|
19238
|
+
var q = genQuery(value);
|
|
19239
|
+
return React.createElement("style", null, "\n " + SCOPE + " " + EMOJI_BUTTON + " {\n display: none;\n }\n\n\n " + SCOPE + " " + q + " {\n display: flex;\n }\n\n " + SCOPE + " " + CATEGORY + ":not(:has(" + q + ")) {\n display: none;\n }\n ");
|
|
19240
|
+
}
|
|
19241
|
+
|
|
19242
|
+
function genQuery(value) {
|
|
19243
|
+
return [EMOJI_BUTTON, '[data-full-name*="', getNormalizedSearchTerm(value), '"]'].join('');
|
|
19244
|
+
}
|
|
19245
|
+
|
|
19228
19246
|
function SearchContainer() {
|
|
19229
19247
|
var searchDisabled = useSearchDisabledConfig();
|
|
19230
19248
|
var isSkinToneInSearch = useIsSkinToneInSearch();
|
|
@@ -19266,7 +19284,7 @@ function Search() {
|
|
|
19266
19284
|
onFocus: closeAllOpenToggles,
|
|
19267
19285
|
className: "epr-search",
|
|
19268
19286
|
type: "text",
|
|
19269
|
-
"aria-controls":
|
|
19287
|
+
"aria-controls": "epr-search-id",
|
|
19270
19288
|
placeholder: placeholder,
|
|
19271
19289
|
onChange: function onChange(event) {
|
|
19272
19290
|
setInc(inc + 1);
|
|
@@ -19278,11 +19296,11 @@ function Search() {
|
|
|
19278
19296
|
},
|
|
19279
19297
|
ref: SearchInputRef
|
|
19280
19298
|
}), searchTerm ? React.createElement("div", {
|
|
19281
|
-
role:
|
|
19299
|
+
role: "status",
|
|
19282
19300
|
className: clsx('epr-status-search-results', 'epr-status-visually-hidden'),
|
|
19283
|
-
"aria-live":
|
|
19284
|
-
id:
|
|
19285
|
-
"aria-atomic":
|
|
19301
|
+
"aria-live": "polite",
|
|
19302
|
+
id: "epr-search-id",
|
|
19303
|
+
"aria-atomic": "true"
|
|
19286
19304
|
}, statusSearchResults) : null, React.createElement("div", {
|
|
19287
19305
|
className: "epr-icn-search"
|
|
19288
19306
|
}), React.createElement(Button, {
|
|
@@ -19292,18 +19310,6 @@ function Search() {
|
|
|
19292
19310
|
className: "epr-icn-clear-search"
|
|
19293
19311
|
})));
|
|
19294
19312
|
}
|
|
19295
|
-
var CSS_SEARCH_SELECTOR = /*#__PURE__*/asSelectors(ClassNames.emojiPicker) + " " + /*#__PURE__*/asSelectors(ClassNames.emojiList);
|
|
19296
|
-
|
|
19297
|
-
function CssSearch(_ref) {
|
|
19298
|
-
var value = _ref.value;
|
|
19299
|
-
|
|
19300
|
-
if (!value) {
|
|
19301
|
-
return null;
|
|
19302
|
-
}
|
|
19303
|
-
|
|
19304
|
-
var searchQuery = "button[data-full-name*=\"" + getNormalizedSearchTerm(value) + "\"]";
|
|
19305
|
-
return React.createElement("style", null, "\n " + CSS_SEARCH_SELECTOR + " " + asSelectors(ClassNames.category) + ":not(:has(" + searchQuery + ")) {\n display: none;\n }\n\n " + CSS_SEARCH_SELECTOR + " button" + asSelectors(ClassNames.emoji) + ":not(" + searchQuery + ") {\n display: none;\n }\n ");
|
|
19306
|
-
}
|
|
19307
19313
|
|
|
19308
19314
|
function Header() {
|
|
19309
19315
|
return React.createElement(Relative, {
|