emoji-picker-react 4.7.9 → 4.7.11
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/dist/Stylesheet/stylesheet.d.ts +2 -2
- package/dist/emoji-picker-react.cjs.development.js +33 -75
- 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 +34 -76
- package/dist/emoji-picker-react.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/Stylesheet/stylesheet.tsx +3 -10
- package/src/components/header/Search/BtnClearSearch.tsx +5 -16
- package/src/components/header/Search/Search.tsx +8 -25
- package/src/components/navigation/CategoryButton.tsx +2 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React__default, { useState, useEffect,
|
|
1
|
+
import React__default, { memo, createElement, useState, useEffect, createContext, useContext, useRef, useMemo, useCallback, createRef, Fragment, Component } from 'react';
|
|
2
2
|
import { createSheet, cx } from 'flairup';
|
|
3
3
|
|
|
4
4
|
function _extends() {
|
|
@@ -103,19 +103,7 @@ function asSelectors() {
|
|
|
103
103
|
}).join('');
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
var
|
|
107
|
-
function useIsEverMounted() {
|
|
108
|
-
var _React$useState = useState(isEverMounted),
|
|
109
|
-
isMounted = _React$useState[0],
|
|
110
|
-
setIsMounted = _React$useState[1];
|
|
111
|
-
useEffect(function () {
|
|
112
|
-
setIsMounted(true);
|
|
113
|
-
isEverMounted = true;
|
|
114
|
-
}, []);
|
|
115
|
-
return isMounted || isEverMounted;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
var stylesheet = /*#__PURE__*/createSheet('epr');
|
|
106
|
+
var stylesheet = /*#__PURE__*/createSheet('epr', null);
|
|
119
107
|
var hidden = {
|
|
120
108
|
display: 'none',
|
|
121
109
|
opacity: '0',
|
|
@@ -128,18 +116,14 @@ var commonStyles = /*#__PURE__*/stylesheet.create({
|
|
|
128
116
|
'.': ClassNames.hidden
|
|
129
117
|
}, hidden)
|
|
130
118
|
});
|
|
131
|
-
function PickerStyleTag() {
|
|
132
|
-
var isMounted = useIsEverMounted();
|
|
133
|
-
if (stylesheet.isApplied() && isMounted) {
|
|
134
|
-
return null;
|
|
135
|
-
}
|
|
119
|
+
var PickerStyleTag = /*#__PURE__*/memo(function PickerStyleTag() {
|
|
136
120
|
return createElement("style", {
|
|
137
121
|
suppressHydrationWarning: true,
|
|
138
122
|
dangerouslySetInnerHTML: {
|
|
139
123
|
__html: stylesheet.getStyle()
|
|
140
124
|
}
|
|
141
125
|
});
|
|
142
|
-
}
|
|
126
|
+
});
|
|
143
127
|
var commonInteractionStyles = /*#__PURE__*/stylesheet.create({
|
|
144
128
|
'.epr-main': {
|
|
145
129
|
':has(input:not(:placeholder-shown))': {
|
|
@@ -18524,6 +18508,18 @@ var styles$6 = /*#__PURE__*/stylesheet.create({
|
|
|
18524
18508
|
}
|
|
18525
18509
|
});
|
|
18526
18510
|
|
|
18511
|
+
var isEverMounted = false;
|
|
18512
|
+
function useIsEverMounted() {
|
|
18513
|
+
var _React$useState = useState(isEverMounted),
|
|
18514
|
+
isMounted = _React$useState[0],
|
|
18515
|
+
setIsMounted = _React$useState[1];
|
|
18516
|
+
useEffect(function () {
|
|
18517
|
+
setIsMounted(true);
|
|
18518
|
+
isEverMounted = true;
|
|
18519
|
+
}, []);
|
|
18520
|
+
return isMounted || isEverMounted;
|
|
18521
|
+
}
|
|
18522
|
+
|
|
18527
18523
|
function Suggested(_ref) {
|
|
18528
18524
|
var categoryConfig = _ref.categoryConfig;
|
|
18529
18525
|
var _useUpdateSuggested = useUpdateSuggested(),
|
|
@@ -19422,7 +19418,7 @@ var DarkInactivePosition = {
|
|
|
19422
19418
|
}
|
|
19423
19419
|
}
|
|
19424
19420
|
};
|
|
19425
|
-
var styles$e = /*#__PURE__*/stylesheet.create({
|
|
19421
|
+
var styles$e = /*#__PURE__*/stylesheet.create( /*#__PURE__*/_extends({
|
|
19426
19422
|
catBtn: {
|
|
19427
19423
|
'.': 'epr-cat-btn',
|
|
19428
19424
|
display: 'inline-block',
|
|
@@ -19475,16 +19471,11 @@ var styles$e = /*#__PURE__*/stylesheet.create({
|
|
|
19475
19471
|
'&.epr-icn-travel_places': {
|
|
19476
19472
|
backgroundPositionX: 'calc(var(--epr-category-navigation-button-size) * -3)'
|
|
19477
19473
|
}
|
|
19478
|
-
}
|
|
19479
|
-
|
|
19480
|
-
|
|
19481
|
-
}, DarkInactivePosition)
|
|
19482
|
-
|
|
19483
|
-
catBtn: {
|
|
19484
|
-
'@media (prefers-color-scheme: dark)': DarkPositionY
|
|
19485
|
-
}
|
|
19486
|
-
}, DarkInactivePosition)
|
|
19487
|
-
});
|
|
19474
|
+
}
|
|
19475
|
+
}, /*#__PURE__*/darkMode('catBtn', DarkPositionY), {
|
|
19476
|
+
'.epr-dark-theme': /*#__PURE__*/_extends({}, DarkInactivePosition),
|
|
19477
|
+
'.epr-auto-theme': /*#__PURE__*/_extends({}, DarkInactivePosition)
|
|
19478
|
+
}));
|
|
19488
19479
|
|
|
19489
19480
|
function CategoryNavigation() {
|
|
19490
19481
|
var _useState = useState(null),
|
|
@@ -19566,7 +19557,7 @@ var HoverDark = {
|
|
|
19566
19557
|
}
|
|
19567
19558
|
}
|
|
19568
19559
|
};
|
|
19569
|
-
var styles$g = /*#__PURE__*/stylesheet.create({
|
|
19560
|
+
var styles$g = /*#__PURE__*/stylesheet.create( /*#__PURE__*/_extends({
|
|
19570
19561
|
btnClearSearch: {
|
|
19571
19562
|
'.': 'epr-btn-clear-search',
|
|
19572
19563
|
position: 'absolute',
|
|
@@ -19601,24 +19592,10 @@ var styles$g = /*#__PURE__*/stylesheet.create({
|
|
|
19601
19592
|
':focus': {
|
|
19602
19593
|
backgroundPositionY: '-20px'
|
|
19603
19594
|
}
|
|
19604
|
-
},
|
|
19605
|
-
'.epr-dark-theme': {
|
|
19606
|
-
icnClearnSearch: {
|
|
19607
|
-
backgroundPositionY: '-40px'
|
|
19608
|
-
},
|
|
19609
|
-
btnClearSearch: HoverDark
|
|
19610
|
-
},
|
|
19611
|
-
'.epr-auto-theme': {
|
|
19612
|
-
icnClearnSearch: {
|
|
19613
|
-
'@media (prefers-color-scheme: dark)': {
|
|
19614
|
-
backgroundPositionY: '-40px'
|
|
19615
|
-
}
|
|
19616
|
-
},
|
|
19617
|
-
btnClearSearch: {
|
|
19618
|
-
'@media (prefers-color-scheme: dark)': HoverDark
|
|
19619
|
-
}
|
|
19620
19595
|
}
|
|
19621
|
-
}
|
|
19596
|
+
}, /*#__PURE__*/darkMode('icnClearnSearch', {
|
|
19597
|
+
backgroundPositionY: '-40px'
|
|
19598
|
+
}), /*#__PURE__*/darkMode('btnClearSearch', HoverDark)));
|
|
19622
19599
|
|
|
19623
19600
|
var SCOPE = /*#__PURE__*/asSelectors(ClassNames.emojiPicker) + " " + /*#__PURE__*/asSelectors(ClassNames.emojiList);
|
|
19624
19601
|
var EMOJI_BUTTON = /*#__PURE__*/['button', asSelectors(ClassNames.emoji)].join('');
|
|
@@ -19714,7 +19691,7 @@ function Search() {
|
|
|
19714
19691
|
"aria-atomic": "true"
|
|
19715
19692
|
}, statusSearchResults) : null, createElement(IcnSearch, null), createElement(BtnClearSearch, null));
|
|
19716
19693
|
}
|
|
19717
|
-
var styles$i = /*#__PURE__*/stylesheet.create({
|
|
19694
|
+
var styles$i = /*#__PURE__*/stylesheet.create( /*#__PURE__*/_extends({
|
|
19718
19695
|
overlay: {
|
|
19719
19696
|
padding: 'var(--epr-header-padding)',
|
|
19720
19697
|
zIndex: 'var(--epr-header-overlay-z-index)'
|
|
@@ -19786,33 +19763,14 @@ var styles$i = /*#__PURE__*/stylesheet.create({
|
|
|
19786
19763
|
':focus': {
|
|
19787
19764
|
backgroundPositionY: '-20px'
|
|
19788
19765
|
}
|
|
19789
|
-
},
|
|
19790
|
-
'.epr-dark-theme': {
|
|
19791
|
-
icnClearnSearch: {
|
|
19792
|
-
backgroundPositionY: '-40px'
|
|
19793
|
-
},
|
|
19794
|
-
btnClearSearch: {
|
|
19795
|
-
':hover > .epr-icn-clear-search': {
|
|
19796
|
-
backgroundPositionY: '-60px'
|
|
19797
|
-
}
|
|
19798
|
-
}
|
|
19799
|
-
},
|
|
19800
|
-
'.epr-auto-theme': {
|
|
19801
|
-
icnClearnSearch: {
|
|
19802
|
-
'@media (prefers-color-scheme: dark)': {
|
|
19803
|
-
backgroundPositionY: '-40px'
|
|
19804
|
-
}
|
|
19805
|
-
},
|
|
19806
|
-
btnClearSearch: {
|
|
19807
|
-
'@media (prefers-color-scheme: dark)': {
|
|
19808
|
-
// @ts-ignore
|
|
19809
|
-
':hover > .epr-icn-clear-search': {
|
|
19810
|
-
backgroundPositionY: '-60px'
|
|
19811
|
-
}
|
|
19812
|
-
}
|
|
19813
|
-
}
|
|
19814
19766
|
}
|
|
19815
|
-
}
|
|
19767
|
+
}, /*#__PURE__*/darkMode('icnClearnSearch', {
|
|
19768
|
+
backgroundPositionY: '-40px'
|
|
19769
|
+
}), /*#__PURE__*/darkMode('btnClearSearch', {
|
|
19770
|
+
':hover > .epr-icn-clear-search': {
|
|
19771
|
+
backgroundPositionY: '-60px'
|
|
19772
|
+
}
|
|
19773
|
+
})));
|
|
19816
19774
|
|
|
19817
19775
|
function Header() {
|
|
19818
19776
|
return createElement(Relative, {
|