easemob-chat-uikit 1.0.0-beta

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 (132) hide show
  1. package/ChatUI.esm.js +33277 -0
  2. package/ChatUI.iife.js +33298 -0
  3. package/ChatUI.umd.js +33299 -0
  4. package/README.md +484 -0
  5. package/button/style/mixin.scss +224 -0
  6. package/button/style/style.scss +28 -0
  7. package/chat.png +0 -0
  8. package/manifest.json +25 -0
  9. package/package.json +29 -0
  10. package/robots.txt +3 -0
  11. package/style/color/color.scss +75 -0
  12. package/style/core/base.scss +10 -0
  13. package/style/core/index.scss +3 -0
  14. package/style/core/motion/fade.scss +35 -0
  15. package/style/core/motion/zoom.scss +179 -0
  16. package/style/core/motion.scss +17 -0
  17. package/style/index.scss +3 -0
  18. package/style/mixin/index.scss +1 -0
  19. package/style/mixin/motion.scss +31 -0
  20. package/style/themes/dark.scss +93 -0
  21. package/style/themes/default.scss +286 -0
  22. package/style.css +16102 -0
  23. package/style.scss +2 -0
  24. package/types/ChatUI.d.ts +2 -0
  25. package/types/module/audioMessage/AudioMessage.d.ts +12 -0
  26. package/types/module/audioMessage/AudioPlayer.d.ts +12 -0
  27. package/types/module/audioMessage/index.d.ts +3 -0
  28. package/types/module/baseMessage/BaseMessage.d.ts +18 -0
  29. package/types/module/baseMessage/index.d.ts +3 -0
  30. package/types/module/button/Button.d.ts +19 -0
  31. package/types/module/button/index.d.ts +2 -0
  32. package/types/module/chat/Chat.d.ts +25 -0
  33. package/types/module/chat/MessageList.d.ts +10 -0
  34. package/types/module/chat/index.d.ts +3 -0
  35. package/types/module/contactList/ContactGroup.d.ts +12 -0
  36. package/types/module/contactList/ContactItem.d.ts +15 -0
  37. package/types/module/contactList/ContactList.d.ts +22 -0
  38. package/types/module/contactList/index.d.ts +3 -0
  39. package/types/module/conversation/ConversationItem.d.ts +17 -0
  40. package/types/module/conversation/ConversationList.d.ts +34 -0
  41. package/types/module/conversation/index.d.ts +3 -0
  42. package/types/module/empty/Empty.d.ts +9 -0
  43. package/types/module/empty/index.d.ts +3 -0
  44. package/types/module/fileMessage/FileMessage.d.ts +13 -0
  45. package/types/module/fileMessage/index.d.ts +2 -0
  46. package/types/module/header/Header.d.ts +22 -0
  47. package/types/module/header/index.d.ts +3 -0
  48. package/types/module/hooks/chat.d.ts +2 -0
  49. package/types/module/hooks/dom.d.ts +9 -0
  50. package/types/module/hooks/useAddress.d.ts +14 -0
  51. package/types/module/hooks/useClient.d.ts +2 -0
  52. package/types/module/hooks/useConversation.d.ts +3 -0
  53. package/types/module/hooks/useHistoryMsg.d.ts +6 -0
  54. package/types/module/imageMessage/ImageMessage.d.ts +18 -0
  55. package/types/module/imageMessage/index.d.ts +4 -0
  56. package/types/module/index.d.ts +22 -0
  57. package/types/module/messageEditor/MessageEditor.d.ts +17 -0
  58. package/types/module/messageEditor/emoji/Emoji.d.ts +14 -0
  59. package/types/module/messageEditor/emoji/emojiConfig.d.ts +54 -0
  60. package/types/module/messageEditor/emoji/index.d.ts +3 -0
  61. package/types/module/messageEditor/index.d.ts +3 -0
  62. package/types/module/messageEditor/moreAction/MoreAction.d.ts +13 -0
  63. package/types/module/messageEditor/moreAction/index.d.ts +2 -0
  64. package/types/module/messageEditor/recorder/Recorder.d.ts +11 -0
  65. package/types/module/messageEditor/recorder/index.d.ts +2 -0
  66. package/types/module/messageEditor/recorder/recorderFun.d.ts +9 -0
  67. package/types/module/messageEditor/textarea/Textarea.d.ts +9 -0
  68. package/types/module/messageEditor/textarea/index.d.ts +2 -0
  69. package/types/module/messageEditor/textarea/util.d.ts +1 -0
  70. package/types/module/messageStatus/MessageStatus.d.ts +9 -0
  71. package/types/module/noticeMessage/NoticeMessage.d.ts +13 -0
  72. package/types/module/noticeMessage/index.d.ts +3 -0
  73. package/types/module/react-app-env.d.ts +62 -0
  74. package/types/module/store/AddressStore.d.ts +13 -0
  75. package/types/module/store/ConversationStore.d.ts +35 -0
  76. package/types/module/store/MessageStore.d.ts +28 -0
  77. package/types/module/store/Provider.d.ts +22 -0
  78. package/types/module/store/agoraChatConfig.d.ts +3 -0
  79. package/types/module/store/index.d.ts +24 -0
  80. package/types/module/store/rootContext.d.ts +15 -0
  81. package/types/module/textMessage/TextMessage.d.ts +28 -0
  82. package/types/module/textMessage/index.d.ts +2 -0
  83. package/types/module/types/messageType.d.ts +164 -0
  84. package/types/module/utils/download.d.ts +2 -0
  85. package/types/module/utils/index.d.ts +6 -0
  86. package/types/module/videoMessage/VideoMessage.d.ts +10 -0
  87. package/types/module/videoMessage/index.d.ts +3 -0
  88. package/types/src/_utils/motion.d.ts +2 -0
  89. package/types/src/_utils/placements.d.ts +17 -0
  90. package/types/src/_utils/reactNode.d.ts +8 -0
  91. package/types/src/_utils/ref.d.ts +3 -0
  92. package/types/src/_utils/styleChecker.d.ts +2 -0
  93. package/types/src/_utils/type.d.ts +1 -0
  94. package/types/src/_utils/warning.d.ts +5 -0
  95. package/types/src/avatar/Avatar.d.ts +20 -0
  96. package/types/src/avatar/Group.d.ts +11 -0
  97. package/types/src/avatar/index.d.ts +2 -0
  98. package/types/src/badge/Badge.d.ts +21 -0
  99. package/types/src/badge/ScrollNumber.d.ts +18 -0
  100. package/types/src/badge/SingleNumber.d.ts +13 -0
  101. package/types/src/badge/index.d.ts +2 -0
  102. package/types/src/button/Button.d.ts +19 -0
  103. package/types/src/button/index.d.ts +2 -0
  104. package/types/src/checkbox/Checkbox.d.ts +11 -0
  105. package/types/src/checkbox/index.d.ts +2 -0
  106. package/types/src/config/index.d.ts +8 -0
  107. package/types/src/dropdown/Dropdown.d.ts +9 -0
  108. package/types/src/dropdown/MenuItem.d.ts +9 -0
  109. package/types/src/dropdown/MenuWrap.d.ts +9 -0
  110. package/types/src/dropdown/index.d.ts +2 -0
  111. package/types/src/entry.d.ts +13 -0
  112. package/types/src/icon/Icon.d.ts +14 -0
  113. package/types/src/icon/const.d.ts +27 -0
  114. package/types/src/icon/index.d.ts +3 -0
  115. package/types/src/input/Input.d.ts +2 -0
  116. package/types/src/input/Search.d.ts +11 -0
  117. package/types/src/list/List.d.ts +23 -0
  118. package/types/src/list/index.d.ts +2 -0
  119. package/types/src/modal/Content.d.ts +36 -0
  120. package/types/src/modal/Dialog.d.ts +43 -0
  121. package/types/src/modal/Mast.d.ts +9 -0
  122. package/types/src/modal/MemoChildren.d.ts +7 -0
  123. package/types/src/modal/Modal.d.ts +57 -0
  124. package/types/src/modal/index.d.ts +2 -0
  125. package/types/src/modal/util.d.ts +5 -0
  126. package/types/src/popover/Popover.d.ts +7 -0
  127. package/types/src/popover/index.d.ts +2 -0
  128. package/types/src/svg.d.ts +6 -0
  129. package/types/src/switch/Switch.d.ts +9 -0
  130. package/types/src/switch/index.d.ts +2 -0
  131. package/types/src/tooltip/Tooltip.d.ts +49 -0
  132. package/uikit.png +0 -0
@@ -0,0 +1,62 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="react" />
3
+ /// <reference types="react-dom" />
4
+
5
+ declare namespace NodeJS {
6
+ interface ProcessEnv {
7
+ readonly NODE_ENV: 'development' | 'production' | 'test';
8
+ readonly PUBLIC_URL: string;
9
+ }
10
+ }
11
+
12
+ declare module '*.avif' {
13
+ const src: string;
14
+ }
15
+
16
+ declare module '*.bmp' {
17
+ const src: string;
18
+ }
19
+
20
+ declare module '*.gif' {
21
+ const src: string;
22
+ }
23
+
24
+ declare module '*.jpg' {
25
+ const src: string;
26
+ }
27
+
28
+ declare module '*.jpeg' {
29
+ const src: string;
30
+ }
31
+
32
+ declare module '*.png' {
33
+ const src: string;
34
+ }
35
+
36
+ declare module '*.webp' {
37
+ const src: string;
38
+ }
39
+
40
+ declare module '*.svg' {
41
+ import * as React from 'react';
42
+
43
+ // export const ReactComponent: React.FunctionComponent<
44
+ // React.SVGProps<SVGSVGElement> & { title?: string }
45
+ // >;
46
+
47
+ const src: string;
48
+ }
49
+
50
+ declare module '*.module.css' {
51
+ const classes: { readonly [key: string]: string };
52
+ }
53
+
54
+ declare module '*.module.scss' {
55
+ const classes: { readonly [key: string]: string };
56
+ }
57
+
58
+ declare module '*.module.sass' {
59
+ const classes: { readonly [key: string]: string };
60
+ }
61
+
62
+ declare module 'react-sticky';
@@ -0,0 +1,13 @@
1
+ declare class AddressStore {
2
+ rootStore: any;
3
+ contacts: any[];
4
+ groups: any[];
5
+ chatroom: any[];
6
+ searchList: any[];
7
+ constructor(rootStore: any);
8
+ setContacts(contacts: any): void;
9
+ setGroups(groups: any): void;
10
+ setChatroom(chatroom: any): void;
11
+ setSearchList(searchList: any): void;
12
+ }
13
+ export default AddressStore;
@@ -0,0 +1,35 @@
1
+ import { ChatType } from '../types/messageType';
2
+ import { AgoraChat } from 'agora-chat';
3
+ export interface Conversation {
4
+ chatType: ChatType;
5
+ conversationId: string;
6
+ lastMessage: AgoraChat.MessageBody;
7
+ unreadCount: number;
8
+ name?: string;
9
+ }
10
+ export interface CurrentConversation {
11
+ conversationId: string;
12
+ chatType: ChatType;
13
+ name?: string;
14
+ unreadCount?: number;
15
+ }
16
+ export interface ById {
17
+ [key: string]: Conversation;
18
+ }
19
+ declare class ConversationStore {
20
+ rootStore: any;
21
+ currentCvs: CurrentConversation;
22
+ conversationList: Conversation[];
23
+ searchList: Conversation[];
24
+ byId: ById;
25
+ constructor(rootStore: any);
26
+ setCurrentCvs(currentCvs: CurrentConversation): void;
27
+ setConversation(conversations: Conversation[]): void;
28
+ addConversation(conversation: Conversation): void;
29
+ setSearchList(conversations: Conversation[]): void;
30
+ deleteConversation(conversation: CurrentConversation): void;
31
+ modifyConversation(conversation: Conversation): void;
32
+ topConversation(conversation: Conversation): void;
33
+ getConversation(chatType: ChatType, cvsId: string): undefined;
34
+ }
35
+ export default ConversationStore;
@@ -0,0 +1,28 @@
1
+ import { AgoraChat } from 'agora-chat';
2
+ import { CurrentConversation } from './ConversationStore';
3
+ declare class MessageStore {
4
+ rootStore: any;
5
+ message: {
6
+ singleChat: {
7
+ [key: string]: AgoraChat.MessageBody[];
8
+ };
9
+ groupChat: {
10
+ [key: string]: AgoraChat.MessageBody[];
11
+ };
12
+ byId: {
13
+ [key: string]: AgoraChat.MessageBody;
14
+ };
15
+ };
16
+ currentCVS: CurrentConversation;
17
+ constructor(rootStore: any);
18
+ get currentCvsMsgs(): AgoraChat.MessageBody[];
19
+ setCurrentCVS(currentCVS: CurrentConversation): void;
20
+ sendMessage(message: AgoraChat.MessageBody): void;
21
+ receiveMessage(message: AgoraChat.MessageBody): void;
22
+ modifyMessage(id: string, message: AgoraChat.MessageBody): void;
23
+ sendChannelAck(cvs: CurrentConversation): any;
24
+ updateMessageStatus(msgId: string, status: string): void;
25
+ addHistoryMsgs(cvs: CurrentConversation, msgs: any): void;
26
+ clearMessage(cvs: CurrentConversation): void;
27
+ }
28
+ export default MessageStore;
@@ -0,0 +1,22 @@
1
+ import React, { ReactNode } from 'react';
2
+ export interface ProviderProps {
3
+ initConfig: {
4
+ appKey: string;
5
+ userId?: string;
6
+ password?: string;
7
+ };
8
+ local?: {
9
+ fallbackLng?: string;
10
+ lng: 'zh' | 'en';
11
+ resources?: {
12
+ [key: string]: {
13
+ translation: {
14
+ [key: string]: string;
15
+ };
16
+ };
17
+ };
18
+ };
19
+ children?: ReactNode;
20
+ }
21
+ declare const _default: React.NamedExoticComponent<ProviderProps>;
22
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { AgoraChat } from 'agora-chat';
2
+ declare const client: AgoraChat.Connection;
3
+ export default client;
@@ -0,0 +1,24 @@
1
+ import MessageStore from './MessageStore';
2
+ import ConversationStore from './ConversationStore';
3
+ import AddressStore from './AddressStore';
4
+ import { AgoraChat } from 'agora-chat';
5
+ export interface InitConfig {
6
+ appKey: string;
7
+ }
8
+ export declare class RootStore {
9
+ messageStore: MessageStore;
10
+ conversationStore: ConversationStore;
11
+ addressStore: AddressStore;
12
+ client: AgoraChat.Connection;
13
+ loginState: boolean;
14
+ initConfig: {
15
+ appKey: string;
16
+ };
17
+ constructor();
18
+ setClient(client: AgoraChat.Connection): void;
19
+ setLoginState(state: boolean): void;
20
+ setInitConfig(initConfig: InitConfig): void;
21
+ }
22
+ export declare function getStore(): RootStore;
23
+ declare const store2: RootStore;
24
+ export default store2;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { AgoraChat } from 'agora-chat';
3
+ import { RootStore } from './index';
4
+ export interface RootConsumerProps {
5
+ rootStore: RootStore;
6
+ client: AgoraChat.Connection;
7
+ }
8
+ export interface ContextProps {
9
+ rootStore: RootStore;
10
+ initConfig: any;
11
+ client: any;
12
+ }
13
+ export declare const RootContext: React.Context<ContextProps>;
14
+ export declare const RootConsumer: React.Consumer<ContextProps>;
15
+ export declare const RootProvider: React.Provider<ContextProps>;
@@ -0,0 +1,28 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { MessageStatusProps } from '../messageStatus/MessageStatus';
3
+ export interface TextMessage {
4
+ from: string;
5
+ to: string;
6
+ time: number;
7
+ msg: string;
8
+ chatType: 'singleChat' | 'groupChat' | 'chatRoom';
9
+ status: MessageStatusProps['status'];
10
+ bySelf: boolean;
11
+ }
12
+ export interface TextMessageProps {
13
+ textMessage: TextMessage;
14
+ bubbleType?: 'primary' | 'secondly' | 'none';
15
+ showCheck?: boolean;
16
+ status?: 'received' | 'read' | 'sent' | 'sending';
17
+ avatar?: ReactNode;
18
+ position?: 'left' | 'right';
19
+ prefix?: string;
20
+ type?: 'primary' | 'default';
21
+ shape?: 'ground' | 'square';
22
+ arrow?: boolean;
23
+ nickName?: string;
24
+ className?: string;
25
+ children?: string;
26
+ style?: React.CSSProperties;
27
+ }
28
+ export declare const TextMessage: (props: TextMessageProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { TextMessage } from './TextMessage';
2
+ export default TextMessage;
@@ -0,0 +1,164 @@
1
+ export declare type ChatType = 'singleChat' | 'groupChat';
2
+ export declare type MessageStatus = 'received' | 'read' | 'unread' | 'sent' | 'failed' | 'sending' | 'default';
3
+ export interface FileObj {
4
+ url: string;
5
+ filename: string;
6
+ filetype: string;
7
+ data: File;
8
+ }
9
+ declare type MessagePriority = 'high' | 'normal' | 'low';
10
+ interface Reaction {
11
+ /** 消息 Reaction,最大长度 128 字符。 */
12
+ reaction: string;
13
+ /** 该 Reaction 的数量。 */
14
+ count: number;
15
+ /** 更新 Reaction 的操作。Reaction 更新后会触发 onReactionChange 回调。*/
16
+ op?: {
17
+ operator: string;
18
+ reactionType: 'create' | 'delete';
19
+ }[];
20
+ /** 添加 Reaction 的用户 ID。 */
21
+ userList: string[];
22
+ /** 当前用户是否添加过此 reaction。
23
+ * - `true`:是;
24
+ * - `false`:否。
25
+ */
26
+ isAddedBySelf?: boolean;
27
+ }
28
+ interface LastMessage {
29
+ /** 消息 ID */
30
+ id: string;
31
+ /** 发送方的用户 ID */
32
+ from: string;
33
+ /** 接收方的用户 ID */
34
+ to: string;
35
+ /** 消息发送的 Unix 时间戳,单位为毫秒。 */
36
+ timestamp: number;
37
+ /** 消息内容。 */
38
+ payload: any;
39
+ }
40
+ interface ChatThreadOverview {
41
+ /** 子区 ID。 */
42
+ id: string;
43
+ /** 子区所属群组的 ID。 */
44
+ parentId: string;
45
+ /** 子区名称。 */
46
+ name: string;
47
+ /** 子区的最新一条消息。 */
48
+ lastMessage: LastMessage;
49
+ /** 子区创建的 Unix 时间戳,单位为毫秒。 */
50
+ createTimestamp: number;
51
+ /** 子区概览信息更新的 Unix 时间戳,单位为毫秒。 */
52
+ updateTimestamp: number;
53
+ /** 子区的回复消息数量。 */
54
+ messageCount: number;
55
+ }
56
+ declare enum ONLINESTATETYPE {
57
+ /** 离线消息。 */
58
+ OFFLINE = 0,
59
+ /** 在线消息。 */
60
+ ONLINE = 1,
61
+ /** 未知状态。 */
62
+ UNKNOWN = 2,
63
+ /** 未启用消息在线状态。 */
64
+ NONE = 3
65
+ }
66
+ interface BaseMessage {
67
+ id: string;
68
+ to: string;
69
+ from: string;
70
+ chatType: ChatType;
71
+ time: number;
72
+ ext?: {
73
+ [key: string]: any;
74
+ };
75
+ msgConfig?: {
76
+ allowGroupAck?: boolean;
77
+ languages?: string[];
78
+ };
79
+ isChatThread?: boolean;
80
+ priority?: MessagePriority;
81
+ reactions?: Reaction;
82
+ chatThreadOverview?: ChatThreadOverview;
83
+ onlineState?: ONLINESTATETYPE;
84
+ status: MessageStatus;
85
+ bySelf: boolean;
86
+ }
87
+ export interface FileMessageType extends BaseMessage {
88
+ type: 'file';
89
+ file: FileObj;
90
+ filename: string;
91
+ file_length: number;
92
+ url: string;
93
+ body?: {
94
+ url: string;
95
+ type: string;
96
+ filename: string;
97
+ };
98
+ }
99
+ export interface TextMessageType extends BaseMessage {
100
+ type: 'txt';
101
+ msg: string;
102
+ }
103
+ export interface CustomMessageType extends BaseMessage {
104
+ type: 'custom';
105
+ customEvent: string;
106
+ customExts: {
107
+ [key: string]: any;
108
+ };
109
+ }
110
+ export interface ImageMessageType extends BaseMessage {
111
+ type: 'image';
112
+ file: FileObj;
113
+ width?: number;
114
+ height?: number;
115
+ file_length?: number;
116
+ fileInputId?: string;
117
+ thumb?: string;
118
+ thumb_secret?: string;
119
+ secret?: string;
120
+ url: string;
121
+ body?: {
122
+ url: string;
123
+ type: string;
124
+ filename: string;
125
+ };
126
+ }
127
+ export interface AudioMessageType extends BaseMessage {
128
+ type: 'audio';
129
+ filename: string;
130
+ length: number;
131
+ file_length: number;
132
+ url?: string;
133
+ secret?: string;
134
+ filetype?: string;
135
+ body?: {
136
+ url: string;
137
+ type: string;
138
+ filename: string;
139
+ };
140
+ file: {
141
+ url: string;
142
+ filename: string;
143
+ filetype: 'audio';
144
+ data: Blob;
145
+ length: number;
146
+ duration: number;
147
+ };
148
+ }
149
+ export interface VideoMessageType extends BaseMessage {
150
+ type: 'video';
151
+ file: object;
152
+ filename: string;
153
+ length: number;
154
+ file_length: number;
155
+ url?: string;
156
+ secret?: string;
157
+ filetype?: string;
158
+ body?: {
159
+ url: string;
160
+ type: string;
161
+ filename: string;
162
+ };
163
+ }
164
+ export {};
@@ -0,0 +1,2 @@
1
+ export default download;
2
+ declare function download(data: any, strFileName: any, strMimeType: any): any;
@@ -0,0 +1,6 @@
1
+ import { ChatType } from '../types/messageType';
2
+ export declare function getConversationTime(time: number): string | undefined;
3
+ export declare function parseChannel(channelId: string): {
4
+ chatType: ChatType;
5
+ conversationId: string;
6
+ };
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import type { VideoMessageType } from '../types/messageType';
3
+ export interface VideoMessageProps {
4
+ videoMessage: VideoMessageType;
5
+ prefix?: string;
6
+ style?: React.CSSProperties;
7
+ status?: 'received' | 'read' | 'sent' | 'sending';
8
+ }
9
+ declare const VideoMessage: (props: VideoMessageProps) => JSX.Element;
10
+ export { VideoMessage };
@@ -0,0 +1,3 @@
1
+ import { VideoMessage } from './VideoMessage';
2
+ export type { VideoMessageProps } from './VideoMessage';
3
+ export default VideoMessage;
@@ -0,0 +1,2 @@
1
+ declare const getTransitionName: (rootPrefixCls: string, motion: string, transitionName?: string) => string;
2
+ export { getTransitionName };
@@ -0,0 +1,17 @@
1
+ import type { BuildInPlacements } from 'rc-trigger';
2
+ export interface AdjustOverflow {
3
+ adjustX?: 0 | 1;
4
+ adjustY?: 0 | 1;
5
+ }
6
+ export interface PlacementsConfig {
7
+ arrowWidth?: number;
8
+ horizontalArrowShift?: number;
9
+ verticalArrowShift?: number;
10
+ arrowPointAtCenter?: boolean;
11
+ autoAdjustOverflow?: boolean | AdjustOverflow;
12
+ }
13
+ export declare function getOverflowOptions(autoAdjustOverflow?: boolean | AdjustOverflow): {
14
+ adjustX: number;
15
+ adjustY: number;
16
+ };
17
+ export default function getPlacements(config: PlacementsConfig): BuildInPlacements;
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ export declare const isValidElement: typeof React.isValidElement;
3
+ export declare function isFragment(child: React.ReactElement): boolean;
4
+ declare type AnyObject = Record<PropertyKey, any>;
5
+ declare type RenderProps = AnyObject | ((originProps: AnyObject) => AnyObject | void);
6
+ export declare function replaceElement(element: React.ReactNode, replacement: React.ReactNode, props?: RenderProps): React.ReactNode;
7
+ export declare function cloneElement(element: React.ReactNode, props?: RenderProps): React.ReactElement;
8
+ export {};
@@ -0,0 +1,3 @@
1
+ import type * as React from 'react';
2
+ export declare function fillRef<T>(ref: React.Ref<T>, node: T): void;
3
+ export declare function composeRef<T>(...refs: React.Ref<T>[]): React.Ref<T>;
@@ -0,0 +1,2 @@
1
+ export declare const canUseDom: () => boolean;
2
+ export declare const canUseDocElement: () => false | HTMLElement;
@@ -0,0 +1 @@
1
+ export declare const tuple: <T extends string[]>(...args: T) => T;
@@ -0,0 +1,5 @@
1
+ export declare function noop(): void;
2
+ export declare function rcWarning(valid: boolean, message: string): void;
3
+ declare type Warning = (valid: boolean, component: string, message?: string) => void;
4
+ declare let warning: Warning;
5
+ export default warning;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ export interface AvatarProps {
3
+ size?: 'large' | 'small' | 'default' | number;
4
+ shape?: 'circle' | 'square';
5
+ src?: React.ReactNode;
6
+ icon?: React.ReactNode;
7
+ style?: React.CSSProperties;
8
+ prefixCls?: string;
9
+ className?: string;
10
+ children?: React.ReactNode;
11
+ alt?: string;
12
+ draggable?: boolean;
13
+ crossOrigin?: '' | 'anonymous' | 'use-credentials';
14
+ srcSet?: string;
15
+ onClick?: (e?: React.MouseEvent<HTMLElement>) => void;
16
+ onError?: () => boolean;
17
+ }
18
+ export declare const InternalAvatar: (props: any, ref: any) => JSX.Element;
19
+ declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
20
+ export default Avatar;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ export interface GroupProps {
3
+ className?: string;
4
+ children?: React.ReactNode;
5
+ style?: React.CSSProperties;
6
+ prefixCls?: string;
7
+ size: 'large' | 'small' | 'default' | number;
8
+ shape: 'circle' | 'square';
9
+ }
10
+ declare const Group: React.FC<GroupProps>;
11
+ export default Group;
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ export interface BadgeProps {
3
+ /** Number to show in badge */
4
+ count?: React.ReactNode;
5
+ /** Max count to show */
6
+ overflowCount?: number;
7
+ /** Whether to show red dot without number */
8
+ dot?: boolean;
9
+ showZero?: boolean;
10
+ style?: React.CSSProperties;
11
+ className?: string;
12
+ text?: React.ReactNode;
13
+ size?: 'default' | 'small';
14
+ offset?: [number | string, number | string];
15
+ title?: string;
16
+ children?: React.ReactNode;
17
+ scrollNumberPrefixCls?: string;
18
+ prefixCls?: string;
19
+ color?: string;
20
+ }
21
+ export declare const Badge: ({ count, overflowCount, dot, showZero, style, className, text, size, offset, title, children, color, scrollNumberPrefixCls, prefixCls, ...restProps }: BadgeProps) => JSX.Element;
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ export interface ScrollNumberProps {
3
+ prefixCls?: string;
4
+ className?: string;
5
+ motionClassName?: string;
6
+ count?: string | number | null;
7
+ children?: React.ReactElement<HTMLElement>;
8
+ component?: string;
9
+ style?: React.CSSProperties;
10
+ title?: string | number | null;
11
+ show: boolean;
12
+ }
13
+ export interface ScrollNumberState {
14
+ animateStarted?: boolean;
15
+ count?: string | number | null;
16
+ }
17
+ declare const ScrollNumber: React.FC<ScrollNumberProps>;
18
+ export default ScrollNumber;
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ export interface UnitNumberProps {
3
+ prefixCls: string;
4
+ value: string | number;
5
+ offset?: number;
6
+ current?: boolean;
7
+ }
8
+ export interface SingleNumberProps {
9
+ prefixCls: string;
10
+ value: string;
11
+ count: number;
12
+ }
13
+ export default function SingleNumber(props: SingleNumberProps): JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { Badge } from './Badge';
2
+ export default Badge;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ declare const buttonShapes: ["circle", "round", "default"];
3
+ export declare type ButtonShape = typeof buttonShapes[number];
4
+ declare const buttonSizes: ["small", "medium", "large"];
5
+ export declare type buttonSize = typeof buttonSizes[number];
6
+ declare const buttonTypes: ["primary", "default", "ghost", "text"];
7
+ export declare type ButtonType = typeof buttonTypes[number];
8
+ export interface ButtonProps {
9
+ className?: string;
10
+ children?: React.ReactNode;
11
+ type?: ButtonType;
12
+ shape?: ButtonShape;
13
+ size?: buttonSize;
14
+ disabled?: boolean;
15
+ icon?: React.ReactNode;
16
+ onClick?: React.MouseEventHandler<HTMLElement>;
17
+ }
18
+ export declare const Button: ({ className, type, size, shape, disabled, icon, children, onClick, }: ButtonProps) => JSX.Element;
19
+ export {};
@@ -0,0 +1,2 @@
1
+ import { Button } from './Button';
2
+ export default Button;
@@ -0,0 +1,11 @@
1
+ import React, { ChangeEvent, ReactElement } from 'react';
2
+ export interface CheckboxProps {
3
+ id?: string;
4
+ className?: string;
5
+ checked?: boolean;
6
+ disabled?: boolean;
7
+ children?: React.ReactNode;
8
+ onChange?(e: ChangeEvent<HTMLInputElement>): void;
9
+ }
10
+ declare const Checkbox: ({ id, checked, disabled, children, className, onChange, }: CheckboxProps) => ReactElement;
11
+ export { Checkbox };
@@ -0,0 +1,2 @@
1
+ import { Checkbox } from './Checkbox';
2
+ export default Checkbox;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export interface ConfigConsumerProps {
3
+ getPrefixCls: (suffixCls?: string, customizePrefixCls?: string) => string;
4
+ iconPrefixCls?: any;
5
+ }
6
+ export declare const ConfigContext: React.Context<ConfigConsumerProps>;
7
+ export declare const ConfigConsumer: React.Consumer<ConfigConsumerProps>;
8
+ export declare const ConfigProvider: React.Provider<ConfigConsumerProps>;
@@ -0,0 +1,9 @@
1
+ import { ReactElement } from 'react';
2
+ export interface DropdownProps {
3
+ className?: string;
4
+ children: ReactElement;
5
+ menu: ReactElement[];
6
+ isOpen?: boolean;
7
+ }
8
+ declare const Dropdown: ({ children, className, menu, isOpen }: DropdownProps) => JSX.Element;
9
+ export { Dropdown };
@@ -0,0 +1,9 @@
1
+ import { ReactElement, MouseEvent } from 'react';
2
+ export interface MenuItemProps {
3
+ className?: string;
4
+ disabled?: boolean;
5
+ children?: ReactElement;
6
+ onClick: (e: MouseEvent) => void;
7
+ }
8
+ declare const MenuItem: ({ className, disabled, children, onClick, }: MenuItemProps) => JSX.Element;
9
+ export { MenuItem };