emoji-picker-react 4.6.2 → 4.6.3

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.6.2",
2
+ "version": "4.6.3",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -98,6 +98,6 @@
98
98
  "typescript": "^4.7.4"
99
99
  },
100
100
  "dependencies": {
101
- "flairup": "0.0.7"
101
+ "flairup": "0.0.12"
102
102
  }
103
103
  }
@@ -28,7 +28,7 @@ export function Body() {
28
28
  const styles = stylesheet.create({
29
29
  body: {
30
30
  '.': ClassNames.scrollBody,
31
- flex: 1,
31
+ flex: '1',
32
32
  overflowY: 'scroll',
33
33
  overflowX: 'hidden',
34
34
  position: 'relative'
@@ -1,6 +1,8 @@
1
+ import { cx } from 'flairup';
1
2
  import * as React from 'react';
2
3
 
3
4
  import { ClassNames } from '../../DomUtils/classNames';
5
+ import { stylesheet } from '../../Stylesheet/stylesheet';
4
6
  import {
5
7
  Categories,
6
8
  CategoryConfig,
@@ -25,14 +27,12 @@ import { ClickableEmoji } from '../emoji/Emoji';
25
27
  import { EmojiCategory } from './EmojiCategory';
26
28
  import { Suggested } from './Suggested';
27
29
 
28
- import './EmojiList.css';
29
-
30
30
  export function EmojiList() {
31
31
  const categories = useCategoriesConfig();
32
32
  const renderdCategoriesCountRef = React.useRef(0);
33
33
 
34
34
  return (
35
- <ul className={ClassNames.emojiList}>
35
+ <ul className={cx(styles.emojiList)}>
36
36
  {categories.map(categoryConfig => {
37
37
  const category = categoryFromCategoryConfig(categoryConfig);
38
38
 
@@ -124,3 +124,12 @@ function RenderCategory({
124
124
  </EmojiCategory>
125
125
  );
126
126
  }
127
+
128
+ const styles = stylesheet.create({
129
+ emojiList: {
130
+ '.': ClassNames.emojiList,
131
+ listStyle: 'none',
132
+ margin: '0',
133
+ padding: '0'
134
+ }
135
+ });
@@ -2,6 +2,7 @@ import { cx } from 'flairup';
2
2
  import * as React from 'react';
3
3
 
4
4
  import { ClassNames } from '../../DomUtils/classNames';
5
+ import { stylesheet } from '../../Stylesheet/stylesheet';
5
6
  import {
6
7
  useClassNameConfig,
7
8
  useStyleConfig,
@@ -14,8 +15,6 @@ import { Theme } from '../../types/exposedTypes';
14
15
  import { usePickerMainRef } from '../context/ElementRefContext';
15
16
  import { PickerContextProvider } from '../context/PickerContext';
16
17
 
17
- import './PickerMain.css';
18
-
19
18
  type Props = Readonly<{
20
19
  children: React.ReactNode;
21
20
  }>;
@@ -47,8 +46,7 @@ function PickerRootElement({ children }: RootProps) {
47
46
  return (
48
47
  <aside
49
48
  className={cx(
50
- ClassNames.emojiPicker,
51
- 'epr-main',
49
+ styles.main,
52
50
  {
53
51
  [ClassNames.searchActive]: searchModeActive,
54
52
  [ClassNames.darkTheme]: theme === Theme.DARK,
@@ -63,3 +61,16 @@ function PickerRootElement({ children }: RootProps) {
63
61
  </aside>
64
62
  );
65
63
  }
64
+
65
+ const styles = stylesheet.create({
66
+ main: {
67
+ '.': ['epr-main', ClassNames.emojiPicker],
68
+ position: 'relative',
69
+ display: 'flex',
70
+ flexDirection: 'column',
71
+ borderWidth: '1px',
72
+ borderStyle: 'solid',
73
+ borderRadius: 'var(--epr-picker-border-radius)',
74
+ borderColor: 'var(--epr-picker-border-color)'
75
+ }
76
+ });
@@ -1,5 +0,0 @@
1
- .EmojiPickerReact ul.epr-emoji-list {
2
- list-style: none;
3
- padding: 0;
4
- margin: 0;
5
- }
@@ -1,9 +0,0 @@
1
- aside.EmojiPickerReact.epr-main {
2
- position: relative;
3
- display: flex;
4
- flex-direction: column;
5
- border-width: 1px;
6
- border-style: solid;
7
- border-radius: var(--epr-picker-border-radius);
8
- border-color: var(--epr-picker-border-color);
9
- }