emoji-picker-react 4.6.4 → 4.6.6-rc.1
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 +4 -3
- package/dist/components/Layout/Flex.d.ts +0 -1
- package/dist/components/body/EmojiCategory.d.ts +0 -1
- package/dist/components/footer/Preview.d.ts +0 -1
- package/dist/emoji-picker-react.cjs.development.css +2 -23
- package/dist/emoji-picker-react.cjs.development.js +925 -22
- 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 +935 -41
- package/dist/emoji-picker-react.esm.js.map +1 -1
- package/package.json +5 -3
- package/src/EmojiPickerReact.css +0 -169
- package/src/Stylesheet/stylesheet.ts +18 -0
- package/src/components/Layout/Flex.tsx +17 -2
- package/src/components/atoms/Button.tsx +17 -1
- package/src/components/body/EmojiCategory.tsx +45 -8
- package/src/components/emoji/ClickableEmojiButton.tsx +10 -6
- package/src/components/footer/Preview.tsx +22 -4
- package/src/components/main/PickerMain.tsx +128 -4
- package/src/components/navigation/CategoryNavigation.css +0 -55
- package/src/components/navigation/CategoryNavigation.tsx +50 -2
- package/src/svg.d.ts +4 -0
- package/src/components/Layout/Flex.css +0 -11
- package/src/components/body/EmojiCategory.css +0 -30
- package/src/components/footer/Preview.css +0 -16
|
@@ -16,6 +16,8 @@ import { useShouldHideCustomEmojis } from '../../hooks/useShouldHideCustomEmojis
|
|
|
16
16
|
import { isCustomCategory } from '../../typeRefinements/typeRefinements';
|
|
17
17
|
import { Button } from '../atoms/Button';
|
|
18
18
|
import { useCategoryNavigationRef } from '../context/ElementRefContext';
|
|
19
|
+
import { stylesheet } from '../../Stylesheet/stylesheet';
|
|
20
|
+
import IcnNav from './svg/CategoryNav.svg';
|
|
19
21
|
|
|
20
22
|
export function CategoryNavigation() {
|
|
21
23
|
const [activeCategory, setActiveCategory] = useState<string | null>(null);
|
|
@@ -29,7 +31,7 @@ export function CategoryNavigation() {
|
|
|
29
31
|
|
|
30
32
|
return (
|
|
31
33
|
<div
|
|
32
|
-
className=
|
|
34
|
+
className={cx(styles.nav)}
|
|
33
35
|
role="tablist"
|
|
34
36
|
aria-label="Category navigation"
|
|
35
37
|
id="epr-category-nav-id"
|
|
@@ -46,7 +48,7 @@ export function CategoryNavigation() {
|
|
|
46
48
|
return (
|
|
47
49
|
<Button
|
|
48
50
|
tabIndex={isSearchMode || isActiveCategory ? -1 : 0}
|
|
49
|
-
className={cx(
|
|
51
|
+
className={cx(styles.catBtn, `epr-icn-${category}`, {
|
|
50
52
|
[ClassNames.active]: isActiveCategory
|
|
51
53
|
})}
|
|
52
54
|
key={category}
|
|
@@ -64,3 +66,49 @@ export function CategoryNavigation() {
|
|
|
64
66
|
</div>
|
|
65
67
|
);
|
|
66
68
|
}
|
|
69
|
+
|
|
70
|
+
const styles = stylesheet.create({
|
|
71
|
+
nav: {
|
|
72
|
+
'.': 'epr-category-nav',
|
|
73
|
+
display: 'flex',
|
|
74
|
+
flexDirection: 'row',
|
|
75
|
+
justifyContent: 'space-around',
|
|
76
|
+
padding: 'var(--epr-header-padding)'
|
|
77
|
+
},
|
|
78
|
+
'.epr-search-active': {
|
|
79
|
+
nav: {
|
|
80
|
+
opacity: '0.3',
|
|
81
|
+
cursor: 'default',
|
|
82
|
+
pointerEvents: 'none'
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
'.epr-main:has(input:not(:placeholder-shown))': {
|
|
86
|
+
nav: {
|
|
87
|
+
opacity: '0.3',
|
|
88
|
+
cursor: 'default',
|
|
89
|
+
pointerEvents: 'none'
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
catBtn: {
|
|
93
|
+
'.': 'epr-cat-btn',
|
|
94
|
+
display: 'inline-block',
|
|
95
|
+
transition: 'opacity 0.2s ease-in-out',
|
|
96
|
+
position: 'relative',
|
|
97
|
+
height: 'var(--epr-category-navigation-button-size)',
|
|
98
|
+
width: 'var(--epr-category-navigation-button-size)',
|
|
99
|
+
backgroundSize: 'calc(var(--epr-category-navigation-button-size) * 10)',
|
|
100
|
+
outline: 'none',
|
|
101
|
+
backgroundImage: `url(${IcnNav})`,
|
|
102
|
+
backgroundPosition: '0 0',
|
|
103
|
+
':focus:before': {
|
|
104
|
+
content: '',
|
|
105
|
+
position: 'absolute',
|
|
106
|
+
top: '-2px',
|
|
107
|
+
left: '-2px',
|
|
108
|
+
right: '-2px',
|
|
109
|
+
bottom: '-2px',
|
|
110
|
+
border: '2px solid var(--epr-category-icon-active-color)',
|
|
111
|
+
borderRadius: '50%'
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
});
|
package/src/svg.d.ts
ADDED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
.EmojiPickerReact li.epr-emoji-category > .epr-emoji-category-content {
|
|
2
|
-
position: relative;
|
|
3
|
-
margin: var(--epr-category-padding);
|
|
4
|
-
display: grid;
|
|
5
|
-
grid-template-columns: repeat(auto-fill, var(--epr-emoji-fullsize));
|
|
6
|
-
grid-gap: 0;
|
|
7
|
-
justify-content: space-between;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.EmojiPickerReact li.epr-emoji-category:not(:has(.epr-visible)) {
|
|
11
|
-
display: none;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.EmojiPickerReact li.epr-emoji-category > .epr-emoji-category-label {
|
|
15
|
-
position: sticky;
|
|
16
|
-
top: 0;
|
|
17
|
-
width: 100%;
|
|
18
|
-
display: flex;
|
|
19
|
-
align-items: center;
|
|
20
|
-
font-weight: bold;
|
|
21
|
-
font-size: 16px;
|
|
22
|
-
margin: 0;
|
|
23
|
-
text-transform: capitalize;
|
|
24
|
-
backdrop-filter: blur(3px);
|
|
25
|
-
padding: var(--epr-category-label-padding);
|
|
26
|
-
background-color: var(--epr-category-label-bg-color);
|
|
27
|
-
color: var(--epr-category-label-text-color);
|
|
28
|
-
z-index: var(--epr-category-label-z-index);
|
|
29
|
-
height: var(--epr-category-label-height);
|
|
30
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
.EmojiPickerReact .epr-preview {
|
|
2
|
-
padding: 0 var(--epr-horizontal-padding);
|
|
3
|
-
z-index: 1;
|
|
4
|
-
align-items: center;
|
|
5
|
-
border-top: 1px solid var(--epr-preview-border-color);
|
|
6
|
-
height: var(--epr-preview-height);
|
|
7
|
-
position: relative;
|
|
8
|
-
z-index: var(--epr-preview-z-index);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.EmojiPickerReact .epr-preview .epr-preview-emoji-label {
|
|
12
|
-
text-transform: capitalize;
|
|
13
|
-
color: var(--epr-preview-text-color);
|
|
14
|
-
font-size: var(--epr-preview-text-size);
|
|
15
|
-
padding: var(--epr-preview-text-padding);
|
|
16
|
-
}
|