emoji-picker-react 3.6.1 → 4.0.0-rc.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.
Files changed (135) hide show
  1. package/LICENSE +17 -20
  2. package/README.md +129 -168
  3. package/dist/DomUtils/categoryNameFromDom.d.ts +1 -0
  4. package/dist/DomUtils/scrollCategoryIntoView.d.ts +1 -0
  5. package/dist/DomUtils/scrollTo.d.ts +1 -0
  6. package/dist/DomUtils/selectors.d.ts +12 -0
  7. package/dist/components/Layout/Flex.d.ts +14 -0
  8. package/dist/components/Layout/Relative.d.ts +7 -0
  9. package/dist/components/body/Body.d.ts +3 -0
  10. package/dist/components/body/EmojiCategory.d.ts +10 -0
  11. package/dist/components/body/EmojiList.d.ts +3 -0
  12. package/dist/components/body/EmojiVariationPicker.d.ts +3 -0
  13. package/dist/components/body/RecentlyUsed.d.ts +7 -0
  14. package/dist/components/context/ElementRefContext.d.ts +17 -0
  15. package/dist/components/context/PickerConfigContext.d.ts +8 -0
  16. package/dist/components/context/PickerContext.d.ts +21 -0
  17. package/dist/components/emoji/Emoji.d.ts +14 -0
  18. package/dist/components/footer/Preview.d.ts +7 -0
  19. package/dist/components/header/Header.d.ts +3 -0
  20. package/dist/components/header/Search.d.ts +3 -0
  21. package/dist/components/header/SkinTonePicker.d.ts +3 -0
  22. package/dist/components/main/PickerMain.d.ts +7 -0
  23. package/dist/components/navigation/CategoryNavigation.d.ts +3 -0
  24. package/dist/config/categoryConfig.d.ts +21 -0
  25. package/dist/config/cdnUrls.d.ts +2 -0
  26. package/dist/config/config.d.ts +26 -0
  27. package/dist/config/useConfig.d.ts +11 -0
  28. package/dist/data/emojis.d.ts +40 -0
  29. package/dist/data/groups.d.ts +2 -0
  30. package/dist/data/skinToneVariations.d.ts +3 -0
  31. package/dist/dataUtils/DataTypes.d.ts +8 -0
  32. package/dist/dataUtils/alphaNumericEmojiIndex.d.ts +4 -0
  33. package/dist/dataUtils/asEmoji.d.ts +2 -0
  34. package/dist/dataUtils/emojiSelectors.d.ts +15 -0
  35. package/dist/dataUtils/parseNativeEmoji.d.ts +1 -0
  36. package/dist/dataUtils/recentlyUsed.d.ts +11 -0
  37. package/dist/emoji-picker-react.cjs.development.css +13 -0
  38. package/dist/emoji-picker-react.cjs.development.js +7419 -0
  39. package/dist/emoji-picker-react.cjs.development.js.map +1 -0
  40. package/dist/emoji-picker-react.cjs.production.min.js +2 -0
  41. package/dist/emoji-picker-react.cjs.production.min.js.map +1 -0
  42. package/dist/emoji-picker-react.esm.js +7485 -0
  43. package/dist/emoji-picker-react.esm.js.map +1 -0
  44. package/dist/hooks/preloadEmoji.d.ts +4 -0
  45. package/dist/hooks/useActiveCategoryScrollDetection.d.ts +2 -0
  46. package/dist/hooks/useCloseAllOpenToggles.d.ts +4 -0
  47. package/dist/hooks/useEmojiElements.d.ts +1 -0
  48. package/dist/hooks/useEmojiMouseEnter.d.ts +3 -0
  49. package/dist/hooks/useFilter.d.ts +8 -0
  50. package/dist/hooks/useInitialLoad.d.ts +2 -0
  51. package/dist/hooks/useIsEmojiHidden.d.ts +2 -0
  52. package/dist/hooks/useIsSearchMode.d.ts +1 -0
  53. package/dist/hooks/useMouseDownHandlers.d.ts +2 -0
  54. package/dist/hooks/useOnScroll.d.ts +2 -0
  55. package/dist/index.d.ts +7 -0
  56. package/dist/index.js +8 -3
  57. package/dist/types/exposedTypes.d.ts +28 -0
  58. package/package.json +72 -52
  59. package/src/DomUtils/categoryNameFromDom.ts +3 -0
  60. package/src/DomUtils/scrollCategoryIntoView.ts +18 -0
  61. package/src/DomUtils/scrollTo.ts +11 -0
  62. package/src/DomUtils/selectors.ts +93 -0
  63. package/src/EmojiPickerReact.css +85 -0
  64. package/src/components/Layout/Flex.css +11 -0
  65. package/src/components/Layout/Flex.tsx +28 -0
  66. package/src/components/Layout/Relative.tsx +14 -0
  67. package/src/components/body/Body.css +6 -0
  68. package/src/components/body/Body.tsx +24 -0
  69. package/src/components/body/EmojiCategory.css +38 -0
  70. package/src/components/body/EmojiCategory.tsx +27 -0
  71. package/src/components/body/EmojiList.css +5 -0
  72. package/src/components/body/EmojiList.tsx +101 -0
  73. package/src/components/body/EmojiVariationPicker.css +65 -0
  74. package/src/components/body/EmojiVariationPicker.tsx +154 -0
  75. package/src/components/body/RecentlyUsed.tsx +50 -0
  76. package/src/components/body/svg/triangle.svg +11 -0
  77. package/src/components/context/ElementRefContext.tsx +61 -0
  78. package/src/components/context/PickerConfigContext.tsx +29 -0
  79. package/src/components/context/PickerContext.tsx +139 -0
  80. package/src/components/emoji/Emoji.css +44 -0
  81. package/src/components/emoji/Emoji.tsx +104 -0
  82. package/src/components/footer/Preview.css +14 -0
  83. package/src/components/footer/Preview.tsx +80 -0
  84. package/src/components/header/Header.css +4 -0
  85. package/src/components/header/Header.tsx +21 -0
  86. package/src/components/header/Search.css +72 -0
  87. package/src/components/header/Search.tsx +36 -0
  88. package/src/components/header/SkinTonePicker.css +86 -0
  89. package/src/components/header/SkinTonePicker.tsx +55 -0
  90. package/src/components/header/svg/magnifier.svg +13 -0
  91. package/src/components/header/svg/times.svg +33 -0
  92. package/src/components/main/PickerMain.css +11 -0
  93. package/src/components/main/PickerMain.tsx +42 -0
  94. package/src/components/navigation/CategoryNavigation.css +82 -0
  95. package/src/components/navigation/CategoryNavigation.tsx +32 -0
  96. package/src/components/navigation/svg/CategoryNav.svg +508 -0
  97. package/src/config/categoryConfig.ts +107 -0
  98. package/src/config/cdnUrls.ts +24 -0
  99. package/src/config/config.ts +50 -0
  100. package/src/config/useConfig.ts +52 -0
  101. package/src/data/emojis.ts +5350 -0
  102. package/src/data/groups.ts +12 -0
  103. package/src/data/skinToneVariations.ts +12 -0
  104. package/src/dataUtils/DataTypes.ts +10 -0
  105. package/src/dataUtils/alphaNumericEmojiIndex.ts +23 -0
  106. package/src/dataUtils/asEmoji.ts +5 -0
  107. package/src/dataUtils/emojiSelectors.ts +94 -0
  108. package/src/dataUtils/parseNativeEmoji.ts +6 -0
  109. package/src/dataUtils/recentlyUsed.ts +61 -0
  110. package/src/hooks/preloadEmoji.ts +29 -0
  111. package/src/hooks/useActiveCategoryScrollDetection.ts +46 -0
  112. package/src/hooks/useCloseAllOpenToggles.ts +26 -0
  113. package/src/hooks/useEmojiElements.ts +7 -0
  114. package/src/hooks/useEmojiMouseEnter.ts +59 -0
  115. package/src/hooks/useFilter.ts +142 -0
  116. package/src/hooks/useInitialLoad.ts +9 -0
  117. package/src/hooks/useIsEmojiHidden.ts +16 -0
  118. package/src/hooks/useIsSearchMode.ts +7 -0
  119. package/src/hooks/useMouseDownHandlers.ts +160 -0
  120. package/src/hooks/useOnScroll.ts +28 -0
  121. package/src/index.tsx +27 -0
  122. package/src/types/exposedTypes.ts +31 -0
  123. package/.babelrc +0 -30
  124. package/.eslintrc.js +0 -37
  125. package/.github/workflows/npmpublish.yml +0 -30
  126. package/.prettierignore +0 -2
  127. package/.storybook/addons.js +0 -2
  128. package/.storybook/config.js +0 -9
  129. package/assets/captured.gif +0 -0
  130. package/dist/index.js.LICENSE.txt +0 -5
  131. package/dist/index.js.map +0 -1
  132. package/dist/main.css +0 -206
  133. package/dist/main.css.map +0 -1
  134. package/emoji-picker-react.d.ts +0 -45
  135. package/webpack.config.js +0 -52
package/dist/main.css DELETED
@@ -1,206 +0,0 @@
1
- .emoji-picker-react ul.skin-tones-list {
2
- padding: 0;
3
- margin: 0;
4
- list-style-type: none;
5
- position: absolute;
6
- top: 13px;
7
- right: 40px;
8
- }
9
-
10
- .emoji-picker-react ul.skin-tones-list li {
11
- background-color: currentColor;
12
- position: absolute;
13
- padding: 0;
14
- border-radius: 5px;
15
- overflow: hidden;
16
- transition: transform .3s ease;
17
- box-shadow: 0 0 3px currentColor;
18
- }
19
-
20
- .emoji-picker-react ul.skin-tones-list label {
21
- height: 10px;
22
- width: 10px;
23
- padding: 0;
24
- display: block;
25
- cursor: pointer;
26
- }
27
-
28
- .emoji-picker-react ul.skin-tones-list input {
29
- height: 0;
30
- width: 0;
31
- opacity: 0;
32
- visibility: hidden;
33
- display: none;
34
- }
35
-
36
- .emoji-picker-react ul.skin-tones-list li.tneutral { color: #ffe082; }
37
- .emoji-picker-react ul.skin-tones-list li.t1f3fb { color: #ffe0b2; }
38
- .emoji-picker-react ul.skin-tones-list li.t1f3fc { color: #ffccbc; }
39
- .emoji-picker-react ul.skin-tones-list li.t1f3fe { color: #795548; }
40
- .emoji-picker-react ul.skin-tones-list li.t1f3ff { color: #5d4037; }
41
- .emoji-picker-react ul.skin-tones-list li.t1f3fd { color: #ca7e55; }
42
-
43
- .emoji-picker-react .emoji-categories button {
44
- height: 40px;
45
- width: 20px;
46
- padding: 5px 0;
47
- background-repeat: no-repeat;
48
- background-size: 20px;
49
- background-position: 50% 50%;
50
- cursor: pointer;
51
- opacity: .5;
52
- transition: opacity .1s;
53
- }
54
-
55
-
56
- .emoji-picker-react .emoji-categories {
57
- padding: 0 15px;
58
- display: flex;
59
- justify-content: space-between;
60
- box-sizing: border-box;
61
- }
62
-
63
- .emoji-picker-react .emoji-categories.inactive button,
64
- .emoji-picker-react .emoji-categories.inactive button.active,
65
- .emoji-picker-react .emoji-categories.inactive button:hover {
66
- opacity: .4;
67
- cursor: default;
68
- }
69
-
70
- .emoji-picker-react .emoji-categories button.active {
71
- opacity: 1;
72
- }
73
-
74
- .emoji-picker-react .emoji-categories button:hover {
75
- opacity: .7;
76
- }
77
-
78
- .emoji-picker-react .emoji {
79
- position: relative;
80
- }
81
-
82
- .emoji-picker-react .emoji.has-skin-variation:before {
83
- content: '';
84
- display: block;
85
- height: 5px;
86
- width: 5px;
87
- background: #070B17;
88
- position: absolute;
89
- top: 0;
90
- right: 0;
91
- border-radius: 0 5px 0 0;
92
- }
93
-
94
- .emoji-picker-react .emoji button {
95
- color: inherit;
96
- height: 35px;
97
- width: 35px;
98
- border-radius: 5px;
99
- background-size: 20px 20px;
100
- background-position: 50% 50%;
101
- background-repeat: no-repeat;
102
- transition: .1s background;
103
- }
104
-
105
- .emoji-picker-react .emoji button:hover {
106
- background-color: currentColor;
107
- }
108
-
109
- .emoji-picker-react .emoji-group {
110
- clear: both;
111
- padding: 0 15px;
112
- list-style: none;
113
- margin: 0;
114
- display: flex;
115
- flex-flow: row wrap;
116
- justify-content: space-between;
117
- }
118
-
119
- .emoji-picker-react .emoji-group:before {
120
- content: attr(data-name);
121
- color: #aaa;
122
- font-size: 14px;
123
- position: sticky;
124
- background: rgba(255,255,255,0.95);
125
- width: 100%;
126
- z-index: 1;
127
- top: 0;
128
- text-transform: uppercase;
129
- line-height: 45px;
130
- font-weight: 700;
131
- }
132
-
133
- .emoji-picker-react .emoji-group:after {
134
- content: '';
135
- flex: 1000;
136
- order: 99999;
137
- flex-basis: 25px;
138
- }
139
-
140
- .emoji-picker-react .emoji-scroll-wrapper {
141
- overflow-y: scroll;
142
- position: relative;
143
- height: 100%;
144
- box-sizing: border-box;
145
- }
146
-
147
- .emoji-picker-react input.emoji-search {
148
- width: calc(100% - 30px);
149
- margin-left: 15px;
150
- outline: none;
151
- box-shadow: none;
152
- padding: 10px;
153
- box-sizing: border-box;
154
- border: 1px solid #efefef;
155
- border-radius: 3px;
156
- transition: border .1s;
157
- }
158
-
159
- .emoji-picker-react input.emoji-search:focus {
160
- border: 1px solid #D6D6D6;
161
- }
162
-
163
- aside.emoji-picker-react {
164
- background: #fff;
165
- display: flex;
166
- flex-direction: column;
167
- height: 320px;
168
- width: 280px;
169
- font-family: font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", Times, Symbola, Aegyptus, Code2000, Code2001, Code2002, Musica, serif, LastResort;
170
- border: 1px solid #efefef;
171
- border-radius: 5px;
172
- box-sizing: border-box;
173
- box-shadow: 0 5px 10px #efefef;
174
- overflow: hidden;
175
- position: relative;
176
- }
177
-
178
- aside.emoji-picker-react .content-wrapper-epr {
179
- overflow: hidden;
180
- position: relative;
181
- }
182
-
183
- aside.emoji-picker-react .content-wrapper-epr:before {
184
- content: attr(data-name);
185
- color: #aaa;
186
- font-size: 11px;
187
- display: block;
188
- position: absolute;
189
- right: 15px;
190
- z-index: 10;
191
- line-height: 45px;
192
- max-height: 45px;
193
- overflow: hidden;
194
- max-width: 100px;
195
- text-overflow: ellipsis;
196
- text-align: right;
197
- }
198
-
199
- aside.emoji-picker-react button {
200
- border: none;
201
- cursor: pointer;
202
- outline: none;
203
- }
204
-
205
-
206
- /*# sourceMappingURL=main.css.map*/
package/dist/main.css.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["webpack://EmojiPicker/./src/components/SkinTones/style.css","webpack://EmojiPicker/./src/components/VariationsMenu/style.css","webpack://EmojiPicker/./src/components/CategoriesNav/style.css","webpack://EmojiPicker/./src/components/Emoji/style.css","webpack://EmojiPicker/./src/components/EmojiList/style.css","webpack://EmojiPicker/./src/components/Search/style.css","webpack://EmojiPicker/./src/style.css"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oDAAoD,gBAAgB;AACpE,mDAAmD,gBAAgB;AACnE,mDAAmD,gBAAgB;AACnE,mDAAmD,gBAAgB;AACnE,mDAAmD,gBAAgB;AACnE,mDAAmD,gBAAgB;;ACxCnE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;ACjCA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA","file":"main.css","sourcesContent":[".emoji-picker-react ul.skin-tones-list {\n padding: 0;\n margin: 0;\n list-style-type: none;\n position: absolute;\n top: 13px;\n right: 40px;\n}\n\n.emoji-picker-react ul.skin-tones-list li {\n background-color: currentColor;\n position: absolute;\n padding: 0;\n border-radius: 5px;\n overflow: hidden;\n transition: transform .3s ease;\n box-shadow: 0 0 3px currentColor;\n}\n\n.emoji-picker-react ul.skin-tones-list label {\n height: 10px;\n width: 10px;\n padding: 0;\n display: block;\n cursor: pointer;\n}\n\n.emoji-picker-react ul.skin-tones-list input {\n height: 0;\n width: 0;\n opacity: 0;\n visibility: hidden;\n display: none;\n}\n\n.emoji-picker-react ul.skin-tones-list li.tneutral { color: #ffe082; }\n.emoji-picker-react ul.skin-tones-list li.t1f3fb { color: #ffe0b2; }\n.emoji-picker-react ul.skin-tones-list li.t1f3fc { color: #ffccbc; }\n.emoji-picker-react ul.skin-tones-list li.t1f3fe { color: #795548; }\n.emoji-picker-react ul.skin-tones-list li.t1f3ff { color: #5d4037; }\n.emoji-picker-react ul.skin-tones-list li.t1f3fd { color: #ca7e55; }\n",".emoji-picker-react .variations-wrapper {\n position: relative;\n}\n\n.emoji-picker-react .variations-list {\n background: #F4F4F4;\n border-bottom: 1px solid #efefef;\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n z-index: 10;\n margin: 0;\n padding: 0;\n display: flex;\n justify-content: space-evenly;\n list-style-type: none;\n}\n\n.emoji-picker-react .variations-list button {\n height: 35px;\n width: 35px;\n background-size: 20px 20px;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-color: transparent;\n border-radius: 5px;\n transition: background .1s;\n}\n\n.emoji-picker-react .variations-list button:hover {\n background-color: #DBDBDB;\n}\n",".emoji-picker-react .emoji-categories button {\n height: 40px;\n width: 20px;\n padding: 5px 0;\n background-repeat: no-repeat;\n background-size: 20px;\n background-position: 50% 50%;\n cursor: pointer;\n opacity: .5;\n transition: opacity .1s;\n}\n\n\n.emoji-picker-react .emoji-categories {\n padding: 0 15px;\n display: flex;\n justify-content: space-between;\n box-sizing: border-box;\n}\n\n.emoji-picker-react .emoji-categories.inactive button,\n.emoji-picker-react .emoji-categories.inactive button.active,\n.emoji-picker-react .emoji-categories.inactive button:hover {\n opacity: .4;\n cursor: default;\n}\n\n.emoji-picker-react .emoji-categories button.active {\n opacity: 1;\n}\n\n.emoji-picker-react .emoji-categories button:hover {\n opacity: .7;\n}\n",".emoji-picker-react .emoji {\n position: relative;\n}\n\n.emoji-picker-react .emoji.has-skin-variation:before {\n content: '';\n display: block;\n height: 5px;\n width: 5px;\n background: #070B17;\n position: absolute;\n top: 0;\n right: 0;\n border-radius: 0 5px 0 0;\n}\n\n.emoji-picker-react .emoji button {\n color: inherit;\n height: 35px;\n width: 35px;\n border-radius: 5px;\n background-size: 20px 20px;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n transition: .1s background;\n}\n\n.emoji-picker-react .emoji button:hover {\n background-color: currentColor;\n}\n",".emoji-picker-react .emoji-group {\n clear: both;\n padding: 0 15px;\n list-style: none;\n margin: 0;\n display: flex;\n flex-flow: row wrap;\n justify-content: space-between;\n}\n\n.emoji-picker-react .emoji-group:before {\n content: attr(data-name);\n color: #aaa;\n font-size: 14px;\n position: sticky;\n background: rgba(255,255,255,0.95);\n width: 100%;\n z-index: 1;\n top: 0;\n text-transform: uppercase;\n line-height: 45px;\n font-weight: 700;\n}\n\n.emoji-picker-react .emoji-group:after {\n content: '';\n flex: 1000;\n order: 99999;\n flex-basis: 25px;\n}\n\n.emoji-picker-react .emoji-scroll-wrapper {\n overflow-y: scroll;\n position: relative;\n height: 100%;\n box-sizing: border-box;\n}\n",".emoji-picker-react input.emoji-search {\n width: calc(100% - 30px);\n margin-left: 15px;\n outline: none;\n box-shadow: none;\n padding: 10px;\n box-sizing: border-box;\n border: 1px solid #efefef;\n border-radius: 3px;\n transition: border .1s;\n}\n\n.emoji-picker-react input.emoji-search:focus {\n border: 1px solid #D6D6D6;\n}\n","aside.emoji-picker-react {\n background: #fff;\n display: flex;\n flex-direction: column;\n height: 320px;\n width: 280px;\n font-family: sans-serif;\n border: 1px solid #efefef;\n border-radius: 5px;\n box-sizing: border-box;\n box-shadow: 0 5px 10px #efefef;\n overflow: hidden;\n position: relative;\n}\n\naside.emoji-picker-react .content-wrapper-epr {\n overflow: hidden;\n position: relative;\n}\n\naside.emoji-picker-react .content-wrapper-epr:before {\n content: attr(data-name);\n color: #aaa;\n font-size: 11px;\n display: block;\n position: absolute;\n right: 15px;\n z-index: 10;\n line-height: 45px;\n max-height: 45px;\n overflow: hidden;\n max-width: 100px;\n text-overflow: ellipsis;\n text-align: right;\n}\n\naside.emoji-picker-react button {\n border: none;\n cursor: pointer;\n outline: none;\n}\n"],"sourceRoot":""}
@@ -1,45 +0,0 @@
1
- declare module 'emoji-picker-react' {
2
- import * as React from 'react';
3
-
4
- export const SKIN_TONE_NEUTRAL = 'neutral';
5
- export const SKIN_TONE_LIGHT = '1f3fb';
6
- export const SKIN_TONE_MEDIUM_LIGHT = '1f3fc';
7
- export const SKIN_TONE_MEDIUM = '1f3fe';
8
- export const SKIN_TONE_MEDIUM_DARK = '1f3ff';
9
- export const SKIN_TONE_DARK = '1f3fd';
10
-
11
- export type SkinTones =
12
- | typeof SKIN_TONE_NEUTRAL
13
- | typeof SKIN_TONE_LIGHT
14
- | typeof SKIN_TONE_MEDIUM_LIGHT
15
- | typeof SKIN_TONE_MEDIUM
16
- | typeof SKIN_TONE_MEDIUM_DARK
17
- | typeof SKIN_TONE_DARK;
18
-
19
- export interface IEmojiData {
20
- unified: string;
21
- originalUnified: string;
22
- names: Array<string>;
23
- emoji: string;
24
- activeSkinTone: SkinTones;
25
- }
26
-
27
- export interface IEmojiPickerProps {
28
- onEmojiClick: (event: React.MouseEvent, data: IEmojiData) => void;
29
- emojiUrl?: string;
30
- preload?: boolean;
31
- skinTone?: SkinTones;
32
- disableAutoFocus?: boolean;
33
- disableSearchBar?: boolean;
34
- disableSkinTonePicker?: boolean;
35
- pickerStyle?: { [property: string]: string };
36
- groupNames?: Record<string, string>;
37
- groupVisibility?: Record<string, boolean>;
38
- native?: boolean;
39
- searchPlaceholder?: string
40
- }
41
-
42
- const EmojiPicker: React.FC<IEmojiPickerProps>;
43
-
44
- export default EmojiPicker;
45
- }
package/webpack.config.js DELETED
@@ -1,52 +0,0 @@
1
- const path = require('path'),
2
- webpack = require('webpack'),
3
- TerserPlugin = require('terser-webpack-plugin'),
4
- MiniCssExtractPlugin = require('mini-css-extract-plugin');
5
-
6
- require('./lib/preBuild');
7
-
8
- module.exports = {
9
- mode: 'production',
10
- entry: './src/index.js',
11
- devtool: 'source-map',
12
- externals: {
13
- react: 'react',
14
- },
15
- target: 'node',
16
- output: {
17
- path: path.join(__dirname, 'dist'),
18
- filename: 'index.js',
19
- library: 'EmojiPicker',
20
- libraryTarget: 'umd',
21
- },
22
- module: {
23
- rules: [
24
- {
25
- test: /\.svg/,
26
- loaders: ['svg-url-loader'],
27
- },
28
- {
29
- test: /\.css$/,
30
- loaders: ['style-loader', 'css-loader'],
31
- include: path.resolve(__dirname, '../'),
32
- },
33
- {
34
- test: /\.(js|jsx)$/,
35
- exclude: /node_modules/,
36
- use: ['babel-loader'],
37
- },
38
- ],
39
- },
40
- plugins: [
41
- new MiniCssExtractPlugin(),
42
- new webpack.DefinePlugin({
43
- DEFAULT_EMOJI_URL: JSON.stringify(
44
- 'https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64'
45
- ),
46
- }),
47
- ],
48
- optimization: {
49
- minimize: true,
50
- minimizer: [new TerserPlugin()],
51
- },
52
- };