-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.d.ts
67 lines (61 loc) · 1.77 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import { Emoji } from 'unicode-emoji';
export type EmojiGroupKey = 'search' | 'face-emotion' | 'food-drink' | 'animals-nature' | 'activities-events' | 'person-people' | 'travel-places' | 'objects' | 'symbols' | 'flags';
export type EmojiPickerTranslation = {
'search'?: {
emoji?: string,
title?: string,
inputPlaceholder?: string,
},
'face-emotion'?: {
emoji?: string,
title?: string,
},
'food-drink'?: {
emoji?: string,
title?: string,
},
'animals-nature'?: {
emoji?: string,
title?: string,
},
'activities-events'?: {
emoji?: string,
title?: string,
},
'person-people'?: {
emoji?: string,
title?: string,
},
'travel-places'?: {
emoji?: string,
title?: string,
},
'objects'?: {
emoji?: string,
title?: string,
},
'symbols'?: {
emoji?: string,
title?: string,
},
'flags'?: {
emoji?: string,
title?: string,
},
};
export type EmojiPickEvent = CustomEvent<Emoji>;
export interface EmojiPickerEventMap extends HTMLElementEventMap {
'emoji-pick': EmojiPickEvent;
}
export class EmojiPickerElement extends HTMLElement {
public selectGroup(groupKey: EmojiGroupKey): void;
public searchEmoji(query: string): void;
public setTranslation(translation: EmojiPickerTranslation): void;
public addEventListener<K extends keyof EmojiPickerEventMap>(type: K, listener: (this: EmojiPickerElement, ev: EmojiPickerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
public removeEventListener<K extends keyof EmojiPickerEventMap>(type: K, listener: (this: EmojiPickerElement, ev: EmojiPickerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
}
declare global {
interface HTMLElementTagNameMap {
'unicode-emoji-picker': EmojiPickerElement;
}
}