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,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { Styles } from 'flairup';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
export declare const stylesheet: {
|
|
4
4
|
create: <K extends string>(styles: Partial<{ [k in K]: Partial<Partial<CSSStyleDeclaration> & Partial<{
|
|
5
5
|
'.'?: string | string[] | undefined;
|
|
@@ -9,7 +9,7 @@ export declare const stylesheet: {
|
|
|
9
9
|
isApplied: () => boolean;
|
|
10
10
|
};
|
|
11
11
|
export declare const commonStyles: Record<never, Set<string>>;
|
|
12
|
-
export declare
|
|
12
|
+
export declare const PickerStyleTag: React.NamedExoticComponent<object>;
|
|
13
13
|
export declare const commonInteractionStyles: Record<never, Set<string>>;
|
|
14
14
|
export declare function darkMode(key: string, value: Styles): {
|
|
15
15
|
'.epr-dark-theme': {
|
|
@@ -110,19 +110,7 @@ function asSelectors() {
|
|
|
110
110
|
}).join('');
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
var
|
|
114
|
-
function useIsEverMounted() {
|
|
115
|
-
var _React$useState = React.useState(isEverMounted),
|
|
116
|
-
isMounted = _React$useState[0],
|
|
117
|
-
setIsMounted = _React$useState[1];
|
|
118
|
-
React.useEffect(function () {
|
|
119
|
-
setIsMounted(true);
|
|
120
|
-
isEverMounted = true;
|
|
121
|
-
}, []);
|
|
122
|
-
return isMounted || isEverMounted;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
var stylesheet = /*#__PURE__*/flairup.createSheet('epr');
|
|
113
|
+
var stylesheet = /*#__PURE__*/flairup.createSheet('epr', null);
|
|
126
114
|
var hidden = {
|
|
127
115
|
display: 'none',
|
|
128
116
|
opacity: '0',
|
|
@@ -135,18 +123,14 @@ var commonStyles = /*#__PURE__*/stylesheet.create({
|
|
|
135
123
|
'.': ClassNames.hidden
|
|
136
124
|
}, hidden)
|
|
137
125
|
});
|
|
138
|
-
function PickerStyleTag() {
|
|
139
|
-
var isMounted = useIsEverMounted();
|
|
140
|
-
if (stylesheet.isApplied() && isMounted) {
|
|
141
|
-
return null;
|
|
142
|
-
}
|
|
126
|
+
var PickerStyleTag = /*#__PURE__*/React.memo(function PickerStyleTag() {
|
|
143
127
|
return React.createElement("style", {
|
|
144
128
|
suppressHydrationWarning: true,
|
|
145
129
|
dangerouslySetInnerHTML: {
|
|
146
130
|
__html: stylesheet.getStyle()
|
|
147
131
|
}
|
|
148
132
|
});
|
|
149
|
-
}
|
|
133
|
+
});
|
|
150
134
|
var commonInteractionStyles = /*#__PURE__*/stylesheet.create({
|
|
151
135
|
'.epr-main': {
|
|
152
136
|
':has(input:not(:placeholder-shown))': {
|
|
@@ -18525,6 +18509,18 @@ var styles$6 = /*#__PURE__*/stylesheet.create({
|
|
|
18525
18509
|
}
|
|
18526
18510
|
});
|
|
18527
18511
|
|
|
18512
|
+
var isEverMounted = false;
|
|
18513
|
+
function useIsEverMounted() {
|
|
18514
|
+
var _React$useState = React.useState(isEverMounted),
|
|
18515
|
+
isMounted = _React$useState[0],
|
|
18516
|
+
setIsMounted = _React$useState[1];
|
|
18517
|
+
React.useEffect(function () {
|
|
18518
|
+
setIsMounted(true);
|
|
18519
|
+
isEverMounted = true;
|
|
18520
|
+
}, []);
|
|
18521
|
+
return isMounted || isEverMounted;
|
|
18522
|
+
}
|
|
18523
|
+
|
|
18528
18524
|
function Suggested(_ref) {
|
|
18529
18525
|
var categoryConfig = _ref.categoryConfig;
|
|
18530
18526
|
var _useUpdateSuggested = useUpdateSuggested(),
|
|
@@ -19423,7 +19419,7 @@ var DarkInactivePosition = {
|
|
|
19423
19419
|
}
|
|
19424
19420
|
}
|
|
19425
19421
|
};
|
|
19426
|
-
var styles$e = /*#__PURE__*/stylesheet.create({
|
|
19422
|
+
var styles$e = /*#__PURE__*/stylesheet.create( /*#__PURE__*/_extends({
|
|
19427
19423
|
catBtn: {
|
|
19428
19424
|
'.': 'epr-cat-btn',
|
|
19429
19425
|
display: 'inline-block',
|
|
@@ -19476,16 +19472,11 @@ var styles$e = /*#__PURE__*/stylesheet.create({
|
|
|
19476
19472
|
'&.epr-icn-travel_places': {
|
|
19477
19473
|
backgroundPositionX: 'calc(var(--epr-category-navigation-button-size) * -3)'
|
|
19478
19474
|
}
|
|
19479
|
-
}
|
|
19480
|
-
|
|
19481
|
-
|
|
19482
|
-
}, DarkInactivePosition)
|
|
19483
|
-
|
|
19484
|
-
catBtn: {
|
|
19485
|
-
'@media (prefers-color-scheme: dark)': DarkPositionY
|
|
19486
|
-
}
|
|
19487
|
-
}, DarkInactivePosition)
|
|
19488
|
-
});
|
|
19475
|
+
}
|
|
19476
|
+
}, /*#__PURE__*/darkMode('catBtn', DarkPositionY), {
|
|
19477
|
+
'.epr-dark-theme': /*#__PURE__*/_extends({}, DarkInactivePosition),
|
|
19478
|
+
'.epr-auto-theme': /*#__PURE__*/_extends({}, DarkInactivePosition)
|
|
19479
|
+
}));
|
|
19489
19480
|
|
|
19490
19481
|
function CategoryNavigation() {
|
|
19491
19482
|
var _useState = React.useState(null),
|
|
@@ -19567,7 +19558,7 @@ var HoverDark = {
|
|
|
19567
19558
|
}
|
|
19568
19559
|
}
|
|
19569
19560
|
};
|
|
19570
|
-
var styles$g = /*#__PURE__*/stylesheet.create({
|
|
19561
|
+
var styles$g = /*#__PURE__*/stylesheet.create( /*#__PURE__*/_extends({
|
|
19571
19562
|
btnClearSearch: {
|
|
19572
19563
|
'.': 'epr-btn-clear-search',
|
|
19573
19564
|
position: 'absolute',
|
|
@@ -19602,24 +19593,10 @@ var styles$g = /*#__PURE__*/stylesheet.create({
|
|
|
19602
19593
|
':focus': {
|
|
19603
19594
|
backgroundPositionY: '-20px'
|
|
19604
19595
|
}
|
|
19605
|
-
},
|
|
19606
|
-
'.epr-dark-theme': {
|
|
19607
|
-
icnClearnSearch: {
|
|
19608
|
-
backgroundPositionY: '-40px'
|
|
19609
|
-
},
|
|
19610
|
-
btnClearSearch: HoverDark
|
|
19611
|
-
},
|
|
19612
|
-
'.epr-auto-theme': {
|
|
19613
|
-
icnClearnSearch: {
|
|
19614
|
-
'@media (prefers-color-scheme: dark)': {
|
|
19615
|
-
backgroundPositionY: '-40px'
|
|
19616
|
-
}
|
|
19617
|
-
},
|
|
19618
|
-
btnClearSearch: {
|
|
19619
|
-
'@media (prefers-color-scheme: dark)': HoverDark
|
|
19620
|
-
}
|
|
19621
19596
|
}
|
|
19622
|
-
}
|
|
19597
|
+
}, /*#__PURE__*/darkMode('icnClearnSearch', {
|
|
19598
|
+
backgroundPositionY: '-40px'
|
|
19599
|
+
}), /*#__PURE__*/darkMode('btnClearSearch', HoverDark)));
|
|
19623
19600
|
|
|
19624
19601
|
var SCOPE = /*#__PURE__*/asSelectors(ClassNames.emojiPicker) + " " + /*#__PURE__*/asSelectors(ClassNames.emojiList);
|
|
19625
19602
|
var EMOJI_BUTTON = /*#__PURE__*/['button', asSelectors(ClassNames.emoji)].join('');
|
|
@@ -19715,7 +19692,7 @@ function Search() {
|
|
|
19715
19692
|
"aria-atomic": "true"
|
|
19716
19693
|
}, statusSearchResults) : null, React.createElement(IcnSearch, null), React.createElement(BtnClearSearch, null));
|
|
19717
19694
|
}
|
|
19718
|
-
var styles$i = /*#__PURE__*/stylesheet.create({
|
|
19695
|
+
var styles$i = /*#__PURE__*/stylesheet.create( /*#__PURE__*/_extends({
|
|
19719
19696
|
overlay: {
|
|
19720
19697
|
padding: 'var(--epr-header-padding)',
|
|
19721
19698
|
zIndex: 'var(--epr-header-overlay-z-index)'
|
|
@@ -19787,33 +19764,14 @@ var styles$i = /*#__PURE__*/stylesheet.create({
|
|
|
19787
19764
|
':focus': {
|
|
19788
19765
|
backgroundPositionY: '-20px'
|
|
19789
19766
|
}
|
|
19790
|
-
},
|
|
19791
|
-
'.epr-dark-theme': {
|
|
19792
|
-
icnClearnSearch: {
|
|
19793
|
-
backgroundPositionY: '-40px'
|
|
19794
|
-
},
|
|
19795
|
-
btnClearSearch: {
|
|
19796
|
-
':hover > .epr-icn-clear-search': {
|
|
19797
|
-
backgroundPositionY: '-60px'
|
|
19798
|
-
}
|
|
19799
|
-
}
|
|
19800
|
-
},
|
|
19801
|
-
'.epr-auto-theme': {
|
|
19802
|
-
icnClearnSearch: {
|
|
19803
|
-
'@media (prefers-color-scheme: dark)': {
|
|
19804
|
-
backgroundPositionY: '-40px'
|
|
19805
|
-
}
|
|
19806
|
-
},
|
|
19807
|
-
btnClearSearch: {
|
|
19808
|
-
'@media (prefers-color-scheme: dark)': {
|
|
19809
|
-
// @ts-ignore
|
|
19810
|
-
':hover > .epr-icn-clear-search': {
|
|
19811
|
-
backgroundPositionY: '-60px'
|
|
19812
|
-
}
|
|
19813
|
-
}
|
|
19814
|
-
}
|
|
19815
19767
|
}
|
|
19816
|
-
}
|
|
19768
|
+
}, /*#__PURE__*/darkMode('icnClearnSearch', {
|
|
19769
|
+
backgroundPositionY: '-40px'
|
|
19770
|
+
}), /*#__PURE__*/darkMode('btnClearSearch', {
|
|
19771
|
+
':hover > .epr-icn-clear-search': {
|
|
19772
|
+
backgroundPositionY: '-60px'
|
|
19773
|
+
}
|
|
19774
|
+
})));
|
|
19817
19775
|
|
|
19818
19776
|
function Header() {
|
|
19819
19777
|
return React.createElement(Relative, {
|