emoji-picker-react 4.0.4 → 4.0.5

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.0.4",
2
+ "version": "4.0.5",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -48,6 +48,7 @@ export function Search() {
48
48
  <button
49
49
  className={clsx('epr-btn-clear-search', 'epr-visible-on-search-only')}
50
50
  onClick={clearSearch}
51
+ type="button"
51
52
  />
52
53
  </Relative>
53
54
  );
@@ -56,7 +57,7 @@ export function Search() {
56
57
  function CssSearch({ value }: { value: undefined | string }) {
57
58
  return value ? (
58
59
  <style>{`
59
- .EmojiPickerReact button.epr-emoji:not([data-full-name*="${value}"]) {
60
+ .EmojiPickerReact button.epr-emoji:not([data-full-name*="${value.toLowerCase()}"]) {
60
61
  display: none;
61
62
  }
62
63
  `}</style>
@@ -40,6 +40,7 @@ export function SkinTonePicker() {
40
40
  const active = skinToneVariation === activeSkinTone;
41
41
  return (
42
42
  <button
43
+ type="button"
43
44
  style={{
44
45
  transform: clsx(
45
46
  `translateX(-${i * (isOpen ? 28 : 0)}px)`,
@@ -27,6 +27,7 @@ export function CategoryNavigation() {
27
27
  const category = categoryFromCategoryConfig(categoryConfig);
28
28
  return (
29
29
  <button
30
+ type="button"
30
31
  className={clsx('epr-cat-btn', `epr-icn-${category}`, {
31
32
  [ClassNames.active]: category === activeCategory
32
33
  })}
@@ -96,7 +96,7 @@ function useApplySearch() {
96
96
 
97
97
  return function applySearch(searchTerm: string) {
98
98
  requestAnimationFrame(() => {
99
- setSearchTerm(searchTerm).then(() => {
99
+ setSearchTerm(searchTerm.toLowerCase()).then(() => {
100
100
  scrollTo(PickerMainRef.current, 0);
101
101
  });
102
102
  });
@@ -128,7 +128,8 @@ export function useIsEmojiFiltered(): (unified: string) => boolean {
128
128
  const { current: filter } = useFilterRef();
129
129
  const [searchTerm] = useSearchTermState();
130
130
 
131
- return unified => isEmojiFilteredBySearchTerm(unified, filter, searchTerm);
131
+ return unified =>
132
+ isEmojiFilteredBySearchTerm(unified, filter, searchTerm.toLowerCase());
132
133
  }
133
134
 
134
135
  function isEmojiFilteredBySearchTerm(