emoji-picker-react 4.0.0-rc.34 → 4.0.0-rc.35

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/README.md CHANGED
@@ -55,6 +55,8 @@ The following props are accepted by them picker:
55
55
  | searchPlaceholder | string | `Search` | Controls the placeholder of the search input. |
56
56
  | suggestedEmojisMode | string | `frequent` | Controls the suggested emojis mode. Possible values are `frequent` and `recent`. |
57
57
  | skinTonesDisabled | boolean | `false` | Controls whether the skin tones are disabled or not. |
58
+ | `width` | number | `350` | Controls the width of the picker. |
59
+ | `height` | number | `450` | Controls the height of the picker. |
58
60
 
59
61
  ## Full details
60
62
 
@@ -155,14 +157,22 @@ import { SkinTones } from 'emoji-picker-react';
155
157
 
156
158
  # Customization
157
159
 
160
+ ## Custom Picker Width and Height
161
+
162
+ To customize the dimensions of the picker, use the `height` and `width` props:
163
+
164
+ ```jsx
165
+ <EmojiPicker height={500} width={400} />
166
+ ```
167
+
168
+ ## CSS Variables
169
+
158
170
  The picker can be customized via css variables. The root selector for the picker is `.EmojiPickerReact`, when overriding, make sure to provide a more specific selector.
159
171
 
160
172
  In dark mode, the specific selector is `.EmojiPickerReact.epr-dark-theme`.
161
173
 
162
174
  The list of possible variables is quite extensive, but the main ones you may want to override are:
163
175
 
164
- - `--epr-picker-width`: The width of the picker.
165
- - `--epr-picker-height`: The height of the picker.
166
176
  - `--epr-emoji-size`: The size of the emojis.
167
177
  - `--epr-emoji-gap`: The space between emojis.
168
178
 
@@ -1,12 +1,10 @@
1
1
  /// <reference types="react" />
2
- import { EmojiRef } from '../../DomUtils/emojiElementRef';
3
2
  import { DataEmoji } from '../../dataUtils/DataTypes';
4
3
  import { EmojiStyle } from '../../types/exposedTypes';
5
4
  import './Emoji.css';
6
5
  declare type ClickableEmojiProps = Readonly<BaseProps & {
7
6
  hidden?: boolean;
8
7
  showVariations?: boolean;
9
- emojiRef?: EmojiRef;
10
8
  hiddenOnSearch?: boolean;
11
9
  emoji: DataEmoji;
12
10
  }>;
@@ -17,6 +15,6 @@ declare type BaseProps = {
17
15
  size?: number;
18
16
  lazyLoad?: boolean;
19
17
  };
20
- export declare function ClickableEmoji({ emoji, unified, hidden, hiddenOnSearch, emojiStyle, showVariations, size, emojiRef, lazyLoad }: ClickableEmojiProps): JSX.Element;
18
+ export declare function ClickableEmoji({ emoji, unified, hidden, hiddenOnSearch, emojiStyle, showVariations, size, lazyLoad }: ClickableEmojiProps): JSX.Element;
21
19
  export declare function ViewOnlyEmoji({ emoji, unified, emojiStyle, size, lazyLoad }: BaseProps): JSX.Element;
22
20
  export {};
@@ -14,6 +14,8 @@ export declare type PickerConfigInternal = {
14
14
  suggestedEmojisMode: SuggestionMode;
15
15
  lazyLoadEmojis: boolean;
16
16
  previewConfig: PreviewConfig;
17
+ height: number;
18
+ width: number;
17
19
  };
18
20
  export declare type PreviewConfig = {
19
21
  defaultEmoji: string;
@@ -12,3 +12,7 @@ export declare function usePreviewConfig(): PreviewConfig;
12
12
  export declare function useThemeConfig(): Theme;
13
13
  export declare function useSuggestedEmojisModeConfig(): SuggestionMode;
14
14
  export declare function useLazyLoadEmojisConfig(): boolean;
15
+ export declare function usePickerSizeConfig(): {
16
+ height: number;
17
+ width: number;
18
+ };
@@ -9,5 +9,5 @@
9
9
  .EmojiPickerReact .epr-search-container{display:block;flex:1;min-width:0}.EmojiPickerReact .epr-search-container input.epr-search{background-color:var(--epr-search-input-bg-color);border:1px solid var(--epr-search-input-bg-color);border-radius:var(--epr-search-input-border-radius);color:var(--epr-search-input-text-color);height:var(--epr-search-input-height);outline:none;padding:var(--epr-search-input-padding);transition:all .2s ease-in-out;width:100%}.EmojiPickerReact .epr-search-container button.epr-btn-clear-search{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='80' xml:space='preserve'%3E%3Cpath fill='%23868686' d='M6.98 13.59a.53.53 0 0 0 .74 0l2.42-2.42 2.43 2.43a.53.53 0 0 0 .74 0c.21-.21.21-.54 0-.75l-2.43-2.43L13.32 8c.21-.21.21-.54 0-.75a.525.525 0 0 0-.75 0l-2.42 2.42-2.41-2.4a.525.525 0 0 0-.75 0c-.21.21-.21.54 0 .75l2.41 2.41-2.42 2.42c-.21.2-.21.54 0 .74z'/%3E%3Cpath fill='%23868686' d='M10.15 18.43c4.41 0 8-3.59 8-8s-3.59-8-8-8-8 3.59-8 8 3.59 8 8 8zm0-14.94c3.83 0 6.94 3.11 6.94 6.94 0 3.83-3.11 6.94-6.94 6.94-3.83 0-6.94-3.11-6.94-6.94 0-3.83 3.12-6.94 6.94-6.94z'/%3E%3Cpath fill='%233371B7' d='M6.98 33.59a.53.53 0 0 0 .74 0l2.42-2.42 2.43 2.43a.53.53 0 0 0 .74 0c.21-.21.21-.54 0-.75l-2.43-2.43L13.32 28c.21-.21.21-.54 0-.75a.525.525 0 0 0-.75 0l-2.42 2.42-2.41-2.41a.525.525 0 0 0-.75 0c-.21.21-.21.54 0 .75l2.41 2.41-2.42 2.42c-.21.21-.21.55 0 .75z'/%3E%3Cpath fill='%233371B7' d='M10.15 38.43c4.41 0 8-3.59 8-8s-3.59-8-8-8-8 3.59-8 8 3.59 8 8 8zm0-14.94c3.83 0 6.94 3.11 6.94 6.94 0 3.83-3.11 6.94-6.94 6.94-3.83 0-6.94-3.11-6.94-6.94 0-3.83 3.12-6.94 6.94-6.94z'/%3E%3Cpath fill='%23C0C0BF' d='M6.98 53.59a.53.53 0 0 0 .74 0l2.42-2.42 2.43 2.43a.53.53 0 0 0 .74 0c.21-.21.21-.54 0-.75l-2.43-2.43L13.32 48c.21-.21.21-.54 0-.75a.525.525 0 0 0-.75 0l-2.42 2.42-2.41-2.41a.525.525 0 0 0-.75 0c-.21.21-.21.54 0 .75l2.41 2.41-2.42 2.42c-.21.21-.21.55 0 .75z'/%3E%3Cpath fill='%23C0C0BF' d='M10.15 58.43c4.41 0 8-3.59 8-8s-3.59-8-8-8-8 3.59-8 8 3.59 8 8 8zm0-14.94c3.83 0 6.94 3.11 6.94 6.94 0 3.83-3.11 6.94-6.94 6.94-3.83 0-6.94-3.11-6.94-6.94 0-3.83 3.12-6.94 6.94-6.94z'/%3E%3Cpath fill='%236AA9DD' d='M6.98 73.59a.53.53 0 0 0 .74 0l2.42-2.42 2.43 2.43a.53.53 0 0 0 .74 0c.21-.21.21-.54 0-.75l-2.43-2.43L13.32 68c.21-.21.21-.54 0-.75a.525.525 0 0 0-.75 0l-2.42 2.42-2.41-2.41a.525.525 0 0 0-.75 0c-.21.21-.21.54 0 .75l2.41 2.41-2.42 2.42c-.21.21-.21.55 0 .75z'/%3E%3Cpath fill='%236AA9DD' d='M10.15 78.43c4.41 0 8-3.59 8-8s-3.59-8-8-8-8 3.59-8 8 3.59 8 8 8zm0-14.94c3.83 0 6.94 3.11 6.94 6.94 0 3.83-3.11 6.94-6.94 6.94-3.83 0-6.94-3.11-6.94-6.94 0-3.83 3.12-6.94 6.94-6.94z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:20px;height:20px;position:absolute;right:var(--epr-search-bar-inner-padding);top:50%;transform:translateY(-50%);width:20px}.EmojiPickerReact .epr-search-container button.epr-btn-clear-search:hover{background-position-y:-20px}.EmojiPickerReact..epr-dark-theme .epr-search-container button.epr-btn-clear-search{background-position-y:-40px}.EmojiPickerReact..epr-dark-theme .epr-search-container button.epr-btn-clear-search:hover{background-position-y:-60px}.EmojiPickerReact .epr-search-container .epr-icn-search{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='40' xml:space='preserve'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' fill='%23868686' d='M12 8.81c0 2.08-1.68 3.76-3.76 3.76s-3.76-1.68-3.76-3.76 1.68-3.76 3.76-3.76S12 6.73 12 8.81zm-.77 3.91c-.83.64-1.87 1.01-2.99 1.01-2.72 0-4.92-2.2-4.92-4.92 0-2.72 2.2-4.92 4.92-4.92 2.72 0 4.92 2.2 4.92 4.92 0 1.13-.38 2.16-1.01 2.99l3.94 3.93c.25.25.25.66 0 .92-.25.25-.66.25-.92 0l-3.94-3.93z'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' fill='%23C0C0BF' d='M12 28.81c0 2.08-1.68 3.76-3.76 3.76s-3.76-1.68-3.76-3.76 1.68-3.76 3.76-3.76S12 26.73 12 28.81zm-.77 3.91c-.83.64-1.87 1.01-2.99 1.01-2.72 0-4.92-2.2-4.92-4.92 0-2.72 2.2-4.92 4.92-4.92 2.72 0 4.92 2.2 4.92 4.92 0 1.13-.38 2.16-1.01 2.99l3.94 3.93c.25.25.25.66 0 .92-.25.25-.66.25-.92 0l-3.94-3.93z'/%3E%3C/svg%3E");background-position:0 0;background-repeat:no-repeat;background-size:20px;content:"";height:20px;left:var(--epr-search-bar-inner-padding);position:absolute;top:50%;transform:translateY(-50%);width:20px}.EmojiPickerReact.epr-dark-theme .epr-search-container .epr-icn-search{background-position-y:-20px}.EmojiPickerReact .epr-search-container input.epr-search::-moz-placeholder{color:var(--epr-search-input-placeholder-color)}.EmojiPickerReact .epr-search-container input.epr-search::placeholder{color:var(--epr-search-input-placeholder-color)}.EmojiPickerReact .epr-search-container input.epr-search:focus{background-color:var(--epr-search-input-bg-color-active);border:1px solid var(--epr-search-border-color)}
10
10
  .EmojiPickerReact .epr-skin-tones{--epr-skin-tone-size:16px;align-items:center;display:flex;flex-basis:30px;justify-content:flex-end;transition:all .3s ease-in-out}.EmojiPickerReact .epr-skin-tones.open{flex-basis:170px}.EmojiPickerReact .epr-skin-tone-select{height:var(--epr-skin-tone-size);position:relative;width:var(--epr-skin-tone-size)}.EmojiPickerReact .epr-skin-tones.open .epr-tone{transition:transform .3s ease-in-out,opacity .3s ease-in-out}.EmojiPickerReact .epr-skin-tones:not(.open) .epr-tone{opacity:0;z-index:0}.EmojiPickerReact .epr-skin-tones .epr-tone{border-radius:4px;box-shadow:0 0 0 0 var(--epr-active-skin-hover-color);cursor:pointer;display:block;height:var(--epr-skin-tone-size);position:absolute;right:0;transition:transform .3s ease-in-out,opacity .5s ease-in-out;width:var(--epr-skin-tone-size);z-index:1}.EmojiPickerReact .epr-skin-tones .epr-tone:hover{box-shadow:0 0 0 5px var(--epr-active-skin-hover-color)}.EmojiPickerReact .epr-skin-tones .epr-tone:focus{box-shadow:0 0 0 5px var(--epr-focus-bg-color)}.EmojiPickerReact .epr-skin-tones.open .epr-skin-tone-select .epr-tone.epr-active:after{border:1px solid var(--epr-active-skin-tone-indicator-border-color);border-radius:5px;bottom:-2px;content:"";left:-2px;position:absolute;right:-2px;top:-2px}.EmojiPickerReact .epr-skin-tones .epr-tone.epr-active{opacity:1;z-index:1}.EmojiPickerReact .epr-skin-tones .epr-tone.epr-tone-neutral{background-color:#ffd225}.EmojiPickerReact .epr-skin-tones .epr-tone.epr-tone-1f3fb{background-color:#ffdfbd}.EmojiPickerReact .epr-skin-tones .epr-tone.epr-tone-1f3fc{background-color:#e9c197}.EmojiPickerReact .epr-skin-tones .epr-tone.epr-tone-1f3fd{background-color:#c88e62}.EmojiPickerReact .epr-skin-tones .epr-tone.epr-tone-1f3fe{background-color:#a86637}.EmojiPickerReact .epr-skin-tones .epr-tone.epr-tone-1f3ff{background-color:#60463a}
11
11
  .EmojiPickerReact .epr-header .epr-header-overlay{padding:var(--epr-header-padding);z-index:var(--epr-header-overlay-z-index)}
12
- aside.EmojiPickerReact.epr-main{border-color:var(--epr-picker-border-color);border-radius:var(--epr-picker-border-radius);border-style:solid;border-width:1px;display:flex;flex-direction:column;height:var(--epr-picker-height);position:relative;width:var(--epr-picker-width)}
13
- .EmojiPickerReact{--epr-highlight-color:#007aeb;--epr-hover-bg-color:#f1f8ff;--epr-focus-bg-color:#e0f0ff;--epr-text-color:#858585;--epr-search-input-bg-color:#f6f6f6;--epr-picker-border-color:#e7e7e7;--epr-bg-color:#fff;--epr-category-icon-active-color:#6aa8de;--epr-horizontal-padding:10px;--epr-picker-width:350px;--epr-picker-height:450px;--epr-picker-border-radius:8px;--epr-search-border-color:var(--epr-highlight-color);--epr-header-padding:15px var(--epr-horizontal-padding);--epr-active-skin-tone-indicator-border-color:var(--epr-highlight-color);--epr-active-skin-hover-color:var(--epr-hover-bg-color);--epr-search-input-bg-color-active:var(--epr-search-input-bg-color);--epr-search-input-padding:0 30px;--epr-search-input-border-radius:8px;--epr-search-input-height:40px;--epr-search-input-text-color:var(--epr-text-color);--epr-search-input-placeholder-color:var(--epr-text-color);--epr-search-bar-inner-padding:var(--epr-horizontal-padding);--epr-category-navigation-button-size:30px;--epr-emoji-variation-picker-height:45px;--epr-emoji-variation-picker-bg-color:var(--epr-bg-color);--epr-preview-height:70px;--epr-preview-text-size:14px;--epr-preview-text-padding:0 var(--epr-horizontal-padding);--epr-preview-border-color:var(--epr-picker-border-color);--epr-preview-text-color:var(--epr-text-color);--epr-category-padding:0 var(--epr-horizontal-padding);--epr-category-label-bg-color:#ffffffe6;--epr-category-label-text-color:var(--epr-text-color);--epr-category-label-padding:0 var(--epr-horizontal-padding);--epr-category-label-height:40px;--epr-emoji-size:30px;--epr-emoji-padding:5px;--epr-emoji-fullsize:calc(var(--epr-emoji-size) + var(--epr-emoji-padding)*2);--epr-emoji-hover-color:var(--epr-hover-bg-color);--epr-emoji-variation-indicator-color:var(--epr-picker-border-color);--epr-emoji-variation-indicator-color-hover:var(--epr-text-color);--epr-header-overlay-z-index:3;--epr-emoji-variations-indictator-z-index:1;--epr-category-label-z-index:2;--epr-skin-variation-picker-z-index:5}.EmojiPickerReact.epr-dark-theme{--epr-dark:#000;--epr-emoji-variation-picker-bg-color:var(--epr-dark);--epr-highlight-color:silver;--epr-text-color:var(--epr-highlight-color);--epr-hover-bg-color:#363636f6;--epr-focus-bg-color:#474747;--epr-search-input-bg-color:#333;--epr-category-label-bg-color:#222222e6;--epr-picker-border-color:#151617;--epr-bg-color:#222;--epr-search-input-bg-color-active:var(--epr-dark);--epr-emoji-variation-indicator-color:#444;--epr-category-icon-active-color:#3271b7}.EmojiPickerReact{background-color:var(--epr-bg-color);overflow:hidden}.EmojiPickerReact .epr-hidden,.EmojiPickerReact.epr-search-active .epr-hidden-on-search,.EmojiPickerReact:not(.epr-search-active) .epr-visible-on-search-only{display:none!important;opacity:0!important;pointer-events:none!important;visibility:hidden!important}aside.EmojiPickerReact.epr-main:has(input:not(:-moz-placeholder-shown)) .epr-hidden-on-search{display:none!important;opacity:0!important;pointer-events:none!important;visibility:hidden!important}aside.EmojiPickerReact.epr-main:has(input:not(:placeholder-shown)) .epr-hidden-on-search{display:none!important;opacity:0!important;pointer-events:none!important;visibility:hidden!important}aside.EmojiPickerReact.epr-main:has(input:-moz-placeholder-shown) .epr-visible-on-search-only{display:none!important;opacity:0!important;pointer-events:none!important;visibility:hidden!important}aside.EmojiPickerReact.epr-main:has(input:placeholder-shown) .epr-visible-on-search-only{display:none!important;opacity:0!important;pointer-events:none!important;visibility:hidden!important}.EmojiPickerReact *{box-sizing:border-box;font-family:sans-serif}.EmojiPickerReact button{background:none;border:0;cursor:pointer;outline:none}
12
+ aside.EmojiPickerReact.epr-main{border-color:var(--epr-picker-border-color);border-radius:var(--epr-picker-border-radius);border-style:solid;border-width:1px;display:flex;flex-direction:column;position:relative}
13
+ .EmojiPickerReact{--epr-highlight-color:#007aeb;--epr-hover-bg-color:#f1f8ff;--epr-focus-bg-color:#e0f0ff;--epr-text-color:#858585;--epr-search-input-bg-color:#f6f6f6;--epr-picker-border-color:#e7e7e7;--epr-bg-color:#fff;--epr-category-icon-active-color:#6aa8de;--epr-horizontal-padding:10px;--epr-picker-border-radius:8px;--epr-search-border-color:var(--epr-highlight-color);--epr-header-padding:15px var(--epr-horizontal-padding);--epr-active-skin-tone-indicator-border-color:var(--epr-highlight-color);--epr-active-skin-hover-color:var(--epr-hover-bg-color);--epr-search-input-bg-color-active:var(--epr-search-input-bg-color);--epr-search-input-padding:0 30px;--epr-search-input-border-radius:8px;--epr-search-input-height:40px;--epr-search-input-text-color:var(--epr-text-color);--epr-search-input-placeholder-color:var(--epr-text-color);--epr-search-bar-inner-padding:var(--epr-horizontal-padding);--epr-category-navigation-button-size:30px;--epr-emoji-variation-picker-height:45px;--epr-emoji-variation-picker-bg-color:var(--epr-bg-color);--epr-preview-height:70px;--epr-preview-text-size:14px;--epr-preview-text-padding:0 var(--epr-horizontal-padding);--epr-preview-border-color:var(--epr-picker-border-color);--epr-preview-text-color:var(--epr-text-color);--epr-category-padding:0 var(--epr-horizontal-padding);--epr-category-label-bg-color:#ffffffe6;--epr-category-label-text-color:var(--epr-text-color);--epr-category-label-padding:0 var(--epr-horizontal-padding);--epr-category-label-height:40px;--epr-emoji-size:30px;--epr-emoji-padding:5px;--epr-emoji-fullsize:calc(var(--epr-emoji-size) + var(--epr-emoji-padding)*2);--epr-emoji-hover-color:var(--epr-hover-bg-color);--epr-emoji-variation-indicator-color:var(--epr-picker-border-color);--epr-emoji-variation-indicator-color-hover:var(--epr-text-color);--epr-header-overlay-z-index:3;--epr-emoji-variations-indictator-z-index:1;--epr-category-label-z-index:2;--epr-skin-variation-picker-z-index:5}.EmojiPickerReact.epr-dark-theme{--epr-dark:#000;--epr-emoji-variation-picker-bg-color:var(--epr-dark);--epr-highlight-color:silver;--epr-text-color:var(--epr-highlight-color);--epr-hover-bg-color:#363636f6;--epr-focus-bg-color:#474747;--epr-search-input-bg-color:#333;--epr-category-label-bg-color:#222222e6;--epr-picker-border-color:#151617;--epr-bg-color:#222;--epr-search-input-bg-color-active:var(--epr-dark);--epr-emoji-variation-indicator-color:#444;--epr-category-icon-active-color:#3271b7}.EmojiPickerReact{background-color:var(--epr-bg-color);overflow:hidden}.EmojiPickerReact .epr-hidden,.EmojiPickerReact.epr-search-active .epr-hidden-on-search,.EmojiPickerReact:not(.epr-search-active) .epr-visible-on-search-only{display:none!important;opacity:0!important;pointer-events:none!important;visibility:hidden!important}aside.EmojiPickerReact.epr-main:has(input:not(:-moz-placeholder-shown)) .epr-hidden-on-search{display:none!important;opacity:0!important;pointer-events:none!important;visibility:hidden!important}aside.EmojiPickerReact.epr-main:has(input:not(:placeholder-shown)) .epr-hidden-on-search{display:none!important;opacity:0!important;pointer-events:none!important;visibility:hidden!important}aside.EmojiPickerReact.epr-main:has(input:-moz-placeholder-shown) .epr-visible-on-search-only{display:none!important;opacity:0!important;pointer-events:none!important;visibility:hidden!important}aside.EmojiPickerReact.epr-main:has(input:placeholder-shown) .epr-visible-on-search-only{display:none!important;opacity:0!important;pointer-events:none!important;visibility:hidden!important}.EmojiPickerReact *{box-sizing:border-box;font-family:sans-serif}.EmojiPickerReact button{background:none;border:0;cursor:pointer;outline:none}
@@ -320,6 +320,8 @@ function basePickerConfig() {
320
320
  emoji, // @ts-ignore
321
321
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
322
322
  event) {},
323
+ height: 450,
324
+ width: 350,
323
325
  previewConfig: _extends({}, basePreviewConfig),
324
326
  searchPlaceHolder: 'Search',
325
327
  skinTonesDisabled: false,
@@ -417,6 +419,16 @@ function useLazyLoadEmojisConfig() {
417
419
 
418
420
  return lazyLoadEmojis;
419
421
  }
422
+ function usePickerSizeConfig() {
423
+ var _usePickerConfig12 = usePickerConfig(),
424
+ height = _usePickerConfig12.height,
425
+ width = _usePickerConfig12.width;
426
+
427
+ return {
428
+ height: height,
429
+ width: width
430
+ };
431
+ }
420
432
 
421
433
  var CDN_URL_APPLE = 'https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/';
422
434
  var CDN_URL_FACEBOOK = 'https://cdn.jsdelivr.net/npm/emoji-datasource-facebook/img/facebook/64/';
@@ -15293,7 +15305,7 @@ function hasNextRow(parent, element) {
15293
15305
 
15294
15306
  function getRowElements(elements, row, elementsInRow) {
15295
15307
  if (row === -1) {
15296
- var lastRow = Math.floor(elements.length / elementsInRow);
15308
+ var lastRow = Math.floor((elements.length - 1) / elementsInRow);
15297
15309
  var firstElementIndex = lastRow * elementsInRow;
15298
15310
  var lastElementIndex = elements.length - 1;
15299
15311
  return elements.slice(firstElementIndex, lastElementIndex + 1);
@@ -15753,11 +15765,11 @@ function visibleEmojiOneRowUp(element) {
15753
15765
  return null;
15754
15766
  }
15755
15767
 
15756
- return getElementInRow(allVisibleEmojis(categoryContent), -1, // last row
15768
+ return getElementInRow(allVisibleEmojis(prevVisibleCategory), -1, // last row
15757
15769
  countInRow, indexInRow);
15758
15770
  }
15759
15771
 
15760
- return getElementInPrevRow(allVisibleEmojis(category), row, countInRow, indexInRow);
15772
+ return getElementInPrevRow(allVisibleEmojis(categoryContent), row, countInRow, indexInRow);
15761
15773
  }
15762
15774
 
15763
15775
  function visibleEmojiOneRowDown(element) {
@@ -15953,36 +15965,6 @@ function useOnScroll(BodyRef) {
15953
15965
  }, [BodyRef, closeAllOpenToggles]);
15954
15966
  }
15955
15967
 
15956
- var emojiRef = {};
15957
- function getEmojiRef(unified) {
15958
- emojiRef[unified] = emojiRef[unified] || {
15959
- current: null
15960
- };
15961
- return emojiRef[unified];
15962
- }
15963
- function iterateEmojiRef(callback) {
15964
- for (var unified in emojiRef) {
15965
- if (!emojiRef[unified] || emojiRef[unified].current === null) {
15966
- continue;
15967
- }
15968
-
15969
- callback(emojiRef[unified].current, unified);
15970
- }
15971
- }
15972
- function hideEmojiOnSearch(unified) {
15973
- hideElementOnSearch(getEmojiRef(unified).current);
15974
- }
15975
- function hideElementOnSearch(element) {
15976
- if (!element) return;
15977
- element.classList.add(ClassNames.hiddenOnSearch);
15978
- element.classList.remove(ClassNames.visible);
15979
- }
15980
- function showElementOnSearch(element) {
15981
- if (!element) return;
15982
- element.classList.remove(ClassNames.hiddenOnSearch);
15983
- element.classList.add(ClassNames.visible);
15984
- }
15985
-
15986
15968
  function scrollTo(root, top) {
15987
15969
  if (top === void 0) {
15988
15970
  top = 0;
@@ -16087,9 +16069,7 @@ function useApplySearch() {
16087
16069
  setSearchTerm = _useSearchTermState2[1];
16088
16070
 
16089
16071
  var PickerMainRef = usePickerMainRef();
16090
- var applyFilterToDom = useApplyFilterToDom();
16091
16072
  return function applySearch(searchTerm) {
16092
- applyFilterToDom(searchTerm);
16093
16073
  requestAnimationFrame(function () {
16094
16074
  setSearchTerm(searchTerm).then(function () {
16095
16075
  scrollTo(PickerMainRef.current, 0);
@@ -16098,31 +16078,6 @@ function useApplySearch() {
16098
16078
  };
16099
16079
  }
16100
16080
 
16101
- function useApplyFilterToDom() {
16102
- // This function is the farthest from being "React" as it can be
16103
- // It performs DOM manipulation and is not a pure function
16104
- // But it is the most performant way to do it, at least 5 times faster than
16105
- // react re-rendering. The reason I trust it to work correctly is because we
16106
- // eventually do update the state, which keeps the DOM in sync - after the fact
16107
- var PickerMainRef = usePickerMainRef();
16108
- var filterRef = useFilterRef();
16109
- return function applyFilterToDom(searchTerm) {
16110
- requestAnimationFrame(function () {
16111
- var _PickerMainRef$curren;
16112
-
16113
- (_PickerMainRef$curren = PickerMainRef.current) == null ? void 0 : _PickerMainRef$curren.classList.toggle(ClassNames.searchActive, !!searchTerm);
16114
- iterateEmojiRef(function (element, unified) {
16115
- if (isEmojiFilteredBySearchTerm(unified, filterRef.current, searchTerm)) {
16116
- hideElementOnSearch(element);
16117
- return;
16118
- }
16119
-
16120
- showElementOnSearch(element);
16121
- });
16122
- });
16123
- };
16124
- }
16125
-
16126
16081
  function filterEmojiObjectByKeyword(emojis, keyword) {
16127
16082
  var filtered = {};
16128
16083
 
@@ -16131,8 +16086,6 @@ function filterEmojiObjectByKeyword(emojis, keyword) {
16131
16086
 
16132
16087
  if (hasMatch(emoji, keyword)) {
16133
16088
  filtered[unified] = emoji;
16134
- } else {
16135
- hideEmojiOnSearch(unified);
16136
16089
  }
16137
16090
  }
16138
16091
 
@@ -16221,15 +16174,13 @@ function ClickableEmoji(_ref) {
16221
16174
  _ref$showVariations = _ref.showVariations,
16222
16175
  showVariations = _ref$showVariations === void 0 ? true : _ref$showVariations,
16223
16176
  size = _ref.size,
16224
- emojiRef = _ref.emojiRef,
16225
16177
  lazyLoad = _ref.lazyLoad;
16226
16178
  var hasVariations = emojiHasVariations(emoji);
16227
16179
  return React.createElement("button", {
16228
- className: clsx(ClassNames.emoji, (_clsx = {}, _clsx[ClassNames.hidden] = hidden, _clsx[ClassNames.hiddenOnSearch] = hiddenOnSearch, _clsx[ClassNames.visible] = !hidden, _clsx[ClassNames.emojiHasVariatios] = hasVariations && showVariations, _clsx)),
16180
+ className: clsx(ClassNames.emoji, (_clsx = {}, _clsx[ClassNames.hidden] = hidden, _clsx[ClassNames.hiddenOnSearch] = hiddenOnSearch, _clsx[ClassNames.visible] = !hidden && !hiddenOnSearch, _clsx[ClassNames.emojiHasVariatios] = hasVariations && showVariations, _clsx)),
16229
16181
  "data-unified": unified,
16230
- // @ts-ignore - let's ignore the fact this is not a real react ref, ok?
16231
- ref: emojiRef,
16232
- "aria-label": emojiName(emoji)
16182
+ "aria-label": emojiName(emoji),
16183
+ "data-full-name": emojiNames(emoji)
16233
16184
  }, React.createElement(ViewOnlyEmoji, {
16234
16185
  unified: unified,
16235
16186
  emoji: emoji,
@@ -16402,8 +16353,6 @@ function RenderCategory(_ref) {
16402
16353
  filteredOut = _isEmojiHidden.filteredOut,
16403
16354
  hidden = _isEmojiHidden.hidden;
16404
16355
 
16405
- var emojiRef = getEmojiRef(emojiUnified(emoji));
16406
-
16407
16356
  if (hidden) {
16408
16357
  hiddenCounter++;
16409
16358
  }
@@ -16415,7 +16364,6 @@ function RenderCategory(_ref) {
16415
16364
  hidden: failedToLoad,
16416
16365
  hiddenOnSearch: filteredOut,
16417
16366
  emojiStyle: emojiStyle,
16418
- emojiRef: emojiRef,
16419
16367
  lazyLoad: lazyLoadEmojis
16420
16368
  });
16421
16369
  });
@@ -16863,7 +16811,7 @@ function Search() {
16863
16811
 
16864
16812
  function CssSearch(_ref) {
16865
16813
  var value = _ref.value;
16866
- return value ? React.createElement("style", null, "\n .EmojiPickerReact button.epr-emoji:not([aria-label*=\"" + value + "\"]) {\n display: none;\n }\n ") : null;
16814
+ return value ? React.createElement("style", null, "\n .EmojiPickerReact button.epr-emoji:not([data-full-name*=\"" + value + "\"]) {\n display: none;\n }\n ") : null;
16867
16815
  }
16868
16816
 
16869
16817
  function useFocusSearchInput() {
@@ -17423,11 +17371,21 @@ function PickerRootElement(_ref2) {
17423
17371
  var theme = useThemeConfig();
17424
17372
  var searchModeActive = useIsSearchMode();
17425
17373
  var PickerMainRef = usePickerMainRef();
17374
+
17375
+ var _usePickerSizeConfig = usePickerSizeConfig(),
17376
+ height = _usePickerSizeConfig.height,
17377
+ width = _usePickerSizeConfig.width;
17378
+
17426
17379
  useKeyboardNavigation();
17427
17380
  useOnFocus();
17381
+ var style = {
17382
+ height: height + "px",
17383
+ width: width + "px"
17384
+ };
17428
17385
  return React.createElement("aside", {
17429
17386
  className: clsx('EmojiPickerReact', 'epr-main', (_clsx = {}, _clsx[ClassNames.searchActive] = searchModeActive, _clsx['epr-dark-theme'] = theme === exports.Theme.DARK, _clsx)),
17430
- ref: PickerMainRef
17387
+ ref: PickerMainRef,
17388
+ style: style
17431
17389
  }, children);
17432
17390
  }
17433
17391