@alifd/chat 0.1.15 → 0.2.0-beta.0
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/es/balloon/index.d.ts +7 -0
- package/es/balloon/index.js +7 -0
- package/es/balloon/style.d.ts +1 -0
- package/es/balloon/style.js +1 -0
- package/es/balloon/types.d.ts +219 -0
- package/es/balloon/types.js +1 -0
- package/es/card-loading/index.d.ts +11 -0
- package/es/card-loading/index.js +18 -0
- package/es/card-loading/main.scss +5 -0
- package/es/card-loading/style.d.ts +2 -0
- package/es/card-loading/style.js +2 -0
- package/es/card-loading/types.d.ts +10 -0
- package/es/card-loading/types.js +1 -0
- package/es/feedback/types.d.ts +8 -0
- package/es/float-button/hooks/useAutoHide.d.ts +0 -1
- package/es/float-button/hooks/useDragable.d.ts +0 -1
- package/es/float-button/index.d.ts +0 -1
- package/es/icon/index.d.ts +1 -2
- package/es/icon/main.scss +1 -1
- package/es/icon/style.d.ts +1 -1
- package/es/icon/style.js +1 -1
- package/es/index.d.ts +3 -0
- package/es/index.js +4 -1
- package/es/input/index.d.ts +1 -2
- package/es/list/index.d.ts +8 -0
- package/es/list/index.js +8 -0
- package/es/list/style.d.ts +1 -0
- package/es/list/style.js +1 -0
- package/es/list/types.d.ts +93 -0
- package/es/list/types.js +1 -0
- package/es/message/index.d.ts +63 -10
- package/es/message/main.scss +1 -1
- package/es/message/style.d.ts +1 -1
- package/es/message/style.js +1 -1
- package/es/person-picker/index.d.ts +377 -2
- package/es/person-picker/index.js +2 -2
- package/es/tab/main.scss +2 -3
- package/es/tag/index.d.ts +18 -18
- package/es/tag/main.scss +1 -1
- package/lib/balloon/index.d.ts +7 -0
- package/lib/balloon/index.js +11 -0
- package/lib/balloon/style.d.ts +1 -0
- package/lib/balloon/style.js +3 -0
- package/lib/balloon/types.d.ts +219 -0
- package/lib/balloon/types.js +2 -0
- package/lib/card/view/card.js +2 -3
- package/lib/card-loading/index.d.ts +11 -0
- package/lib/card-loading/index.js +21 -0
- package/lib/card-loading/main.scss +5 -0
- package/lib/card-loading/style.d.ts +2 -0
- package/lib/card-loading/style.js +4 -0
- package/lib/card-loading/types.d.ts +10 -0
- package/lib/card-loading/types.js +2 -0
- package/lib/feedback/types.d.ts +8 -0
- package/lib/float-button/hooks/useAutoAlign.js +1 -2
- package/lib/float-button/hooks/useAutoHide.d.ts +0 -1
- package/lib/float-button/hooks/useAutoHide.js +1 -2
- package/lib/float-button/hooks/useDragable.d.ts +0 -1
- package/lib/float-button/hooks/useDragable.js +1 -2
- package/lib/float-button/hooks/useNestleEdge.js +1 -2
- package/lib/float-button/hooks/useTriggerType.js +1 -2
- package/lib/float-button/index.d.ts +0 -1
- package/lib/float-button/util.js +4 -5
- package/lib/float-button/view/balloon.js +1 -2
- package/lib/float-button/view/drawer.js +1 -2
- package/lib/float-button/view/inner-drawer.js +1 -2
- package/lib/icon/index.d.ts +1 -2
- package/lib/icon/main.scss +1 -1
- package/lib/icon/style.d.ts +1 -1
- package/lib/icon/style.js +1 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.js +22 -18
- package/lib/input/index.d.ts +1 -2
- package/lib/list/index.d.ts +8 -0
- package/lib/list/index.js +12 -0
- package/lib/list/style.d.ts +1 -0
- package/lib/list/style.js +3 -0
- package/lib/list/types.d.ts +93 -0
- package/lib/list/types.js +2 -0
- package/lib/message/index.d.ts +63 -10
- package/lib/message/main.scss +1 -1
- package/lib/message/style.d.ts +1 -1
- package/lib/message/style.js +1 -1
- package/lib/person-picker/index.d.ts +377 -2
- package/lib/person-picker/index.js +2 -2
- package/lib/tab/main.scss +2 -3
- package/lib/tag/index.d.ts +18 -18
- package/lib/tag/main.scss +1 -1
- package/lib/utils/common.js +1 -2
- package/lib/utils/dingtalk.js +3 -4
- package/lib/utils/func.js +2 -3
- package/lib/utils/hooks/useControlable.js +1 -2
- package/lib/utils/hooks/useDebounce.js +1 -2
- package/lib/utils/hooks/useThrottle.js +1 -2
- package/package.json +55 -5
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @component 气泡提示
|
|
3
|
+
* @en Balloon
|
|
4
|
+
* @type 反馈 - Feedback
|
|
5
|
+
* @when 当用户与被说明对象(文字,图片,输入框等)发生交互行为的 action 开始时,即刻跟随动作出现一种辅助或帮助的提示信息。其中 Balloon.Tooltip 是简化版本,主要用于 hover 时显示简单文案。 - Balloon is used when you hope to show auxiliary or help message during users' interacting with the illustrated object (text, picture, input box, etc.). Particularly, Balloon.Tooltip is a simplified Balloon for displaying tip when hovered. If you want the content to be clickable, use `<Balloon.Tootip delay={100} />`
|
|
6
|
+
*/
|
|
7
|
+
export { Balloon as default } from '@alifd/next';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @component 气泡提示
|
|
3
|
+
* @en Balloon
|
|
4
|
+
* @type 反馈 - Feedback
|
|
5
|
+
* @when 当用户与被说明对象(文字,图片,输入框等)发生交互行为的 action 开始时,即刻跟随动作出现一种辅助或帮助的提示信息。其中 Balloon.Tooltip 是简化版本,主要用于 hover 时显示简单文案。 - Balloon is used when you hope to show auxiliary or help message during users' interacting with the illustrated object (text, picture, input box, etc.). Particularly, Balloon.Tooltip is a simplified Balloon for displaying tip when hovered. If you want the content to be clickable, use `<Balloon.Tootip delay={100} />`
|
|
6
|
+
*/
|
|
7
|
+
export { Balloon as default } from '@alifd/next';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@alifd/next/lib/balloon/style2';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@alifd/next/lib/balloon/style2';
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type CommonProps } from '@alifd/next';
|
|
3
|
+
/**
|
|
4
|
+
* @api Balloon.Tooltip
|
|
5
|
+
* @order 1
|
|
6
|
+
*/
|
|
7
|
+
export interface TooltipProps extends React.HTMLAttributes<HTMLElement>, CommonProps {
|
|
8
|
+
/**
|
|
9
|
+
* 样式类名的品牌前缀
|
|
10
|
+
*/
|
|
11
|
+
prefix?: string;
|
|
12
|
+
/**
|
|
13
|
+
* 自定义类名
|
|
14
|
+
*/
|
|
15
|
+
className?: string;
|
|
16
|
+
/**
|
|
17
|
+
* 自定义内联样式
|
|
18
|
+
*/
|
|
19
|
+
style?: React.CSSProperties;
|
|
20
|
+
/**
|
|
21
|
+
* tooltip 的内容
|
|
22
|
+
*/
|
|
23
|
+
children?: any;
|
|
24
|
+
/**
|
|
25
|
+
* 弹出层位置
|
|
26
|
+
*/
|
|
27
|
+
align?: 't' | 'r' | 'b' | 'l' | 'tl' | 'tr' | 'bl' | 'br' | 'lt' | 'lb' | 'rt' | 'rb';
|
|
28
|
+
/**
|
|
29
|
+
* 触发元素
|
|
30
|
+
*/
|
|
31
|
+
trigger?: any;
|
|
32
|
+
/**
|
|
33
|
+
* 触发行为
|
|
34
|
+
* 鼠标悬浮,鼠标点击 ('hover', 'click') 或者它们组成的数组,如 ['hover', 'click'], 强烈不建议使用'focus',若有复杂交互,推荐使用 triggerType 为 click 的 Balloon 组件
|
|
35
|
+
*/
|
|
36
|
+
triggerType?: string | Array<string>;
|
|
37
|
+
/**
|
|
38
|
+
* 弹层组件 style,透传给 Popup
|
|
39
|
+
*/
|
|
40
|
+
popupStyle?: React.CSSProperties;
|
|
41
|
+
/**
|
|
42
|
+
* 弹层组件 className,透传给 Popup
|
|
43
|
+
*/
|
|
44
|
+
popupClassName?: string;
|
|
45
|
+
/**
|
|
46
|
+
* 弹层在触发以后的延时显示,单位毫秒 ms
|
|
47
|
+
*/
|
|
48
|
+
delay?: number;
|
|
49
|
+
/**
|
|
50
|
+
* 鼠标放置后的延时显示,单位毫秒 ms
|
|
51
|
+
*/
|
|
52
|
+
mouseEnterDelay: number;
|
|
53
|
+
/**
|
|
54
|
+
* 鼠标离开后的延时显示,单位毫秒 ms
|
|
55
|
+
*/
|
|
56
|
+
mouseLeaveDelay: number;
|
|
57
|
+
/**
|
|
58
|
+
* 是否 pure render
|
|
59
|
+
*/
|
|
60
|
+
pure?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* 指定浮层渲染的父节点,可以为节点 id 的字符串,也可以返回节点的函数。
|
|
63
|
+
*/
|
|
64
|
+
popupContainer?: string | HTMLElement | ((target: HTMLElement) => HTMLElement);
|
|
65
|
+
/**
|
|
66
|
+
* 弹层 id, 传入值才会支持无障碍
|
|
67
|
+
*/
|
|
68
|
+
id?: string;
|
|
69
|
+
followTrigger?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* 开启 v2
|
|
72
|
+
*/
|
|
73
|
+
v2?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* [v2] 箭头是否指向目标元素的中心
|
|
76
|
+
*/
|
|
77
|
+
arrowPointToCenter?: boolean;
|
|
78
|
+
}
|
|
79
|
+
interface HTMLAttributesWeak extends React.HTMLAttributes<HTMLElement> {
|
|
80
|
+
title?: any;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* @api Balloon
|
|
84
|
+
* @order 0
|
|
85
|
+
*/
|
|
86
|
+
export interface BalloonProps extends HTMLAttributesWeak, CommonProps {
|
|
87
|
+
/**
|
|
88
|
+
* 自定义类名
|
|
89
|
+
*/
|
|
90
|
+
className?: string;
|
|
91
|
+
/**
|
|
92
|
+
* 自定义内敛样式
|
|
93
|
+
*/
|
|
94
|
+
style?: React.CSSProperties;
|
|
95
|
+
/**
|
|
96
|
+
* 浮层的内容
|
|
97
|
+
*/
|
|
98
|
+
children?: any;
|
|
99
|
+
title?: React.ReactNode;
|
|
100
|
+
/**
|
|
101
|
+
* 样式类型
|
|
102
|
+
*/
|
|
103
|
+
type?: 'normal' | 'primary';
|
|
104
|
+
/**
|
|
105
|
+
* 弹层当前显示的状态
|
|
106
|
+
*/
|
|
107
|
+
visible?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* 弹层默认显示的状态
|
|
110
|
+
*/
|
|
111
|
+
defaultVisible?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* 弹层在显示和隐藏触发的事件
|
|
114
|
+
*/
|
|
115
|
+
onVisibleChange?: (visible: boolean, type: string) => void;
|
|
116
|
+
/**
|
|
117
|
+
* 弹出层对齐方式
|
|
118
|
+
*/
|
|
119
|
+
alignEdge?: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* 是否显示关闭按钮
|
|
122
|
+
*/
|
|
123
|
+
closable?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* 弹出层位置
|
|
126
|
+
*/
|
|
127
|
+
align?: 't' | 'r' | 'b' | 'l' | 'tl' | 'tr' | 'bl' | 'br' | 'lt' | 'lb' | 'rt' | 'rb';
|
|
128
|
+
/**
|
|
129
|
+
* 弹层相对于 trigger 的定位的微调
|
|
130
|
+
*/
|
|
131
|
+
offset?: Array<number>;
|
|
132
|
+
/**
|
|
133
|
+
* 触发元素
|
|
134
|
+
*/
|
|
135
|
+
trigger?: any;
|
|
136
|
+
/**
|
|
137
|
+
* 触发行为
|
|
138
|
+
* 鼠标悬浮,鼠标点击 ('hover','click') 或者它们组成的数组,如 ['hover', 'click'], 强烈不建议使用'focus',若弹窗内容有复杂交互请使用 click
|
|
139
|
+
*/
|
|
140
|
+
triggerType?: string | Array<string>;
|
|
141
|
+
/**
|
|
142
|
+
* 任何 visible 为 false 时会触发的事件
|
|
143
|
+
*/
|
|
144
|
+
onClose?: () => void;
|
|
145
|
+
/**
|
|
146
|
+
* 是否进行自动位置调整
|
|
147
|
+
*/
|
|
148
|
+
needAdjust?: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* 弹层在触发以后的延时显示,单位毫秒 ms
|
|
151
|
+
*/
|
|
152
|
+
delay?: number;
|
|
153
|
+
/**
|
|
154
|
+
* 鼠标放置后的延时显示,单位毫秒 ms
|
|
155
|
+
*/
|
|
156
|
+
mouseEnterDelay: number;
|
|
157
|
+
/**
|
|
158
|
+
* 鼠标离开后的延时显示,单位毫秒 ms
|
|
159
|
+
*/
|
|
160
|
+
mouseLeaveDelay: number;
|
|
161
|
+
/**
|
|
162
|
+
* 浮层关闭后触发的事件,如果有动画,则在动画结束后触发
|
|
163
|
+
*/
|
|
164
|
+
afterClose?: () => void;
|
|
165
|
+
/**
|
|
166
|
+
* 强制更新定位信息
|
|
167
|
+
*/
|
|
168
|
+
shouldUpdatePosition?: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* 弹层出现后是否自动 focus 到内部第一个元素
|
|
171
|
+
*/
|
|
172
|
+
autoFocus?: boolean;
|
|
173
|
+
/**
|
|
174
|
+
* 安全节点:对于 triggetType 为 click 的浮层,会在点击除了浮层外的其它区域时关闭浮层.safeNode 用于添加不触发关闭的节点,值可以是 dom 节点的 id 或者是节点的 dom 对象
|
|
175
|
+
*/
|
|
176
|
+
safeNode?: any;
|
|
177
|
+
/**
|
|
178
|
+
* 用来指定 safeNode 节点的 id,和 safeNode 配合使用
|
|
179
|
+
*/
|
|
180
|
+
safeId?: string;
|
|
181
|
+
/**
|
|
182
|
+
* 配置动画的播放方式
|
|
183
|
+
*/
|
|
184
|
+
animation?: any | boolean;
|
|
185
|
+
/**
|
|
186
|
+
* 弹层的 dom 节点关闭时是否删除
|
|
187
|
+
*/
|
|
188
|
+
cache?: boolean;
|
|
189
|
+
/**
|
|
190
|
+
* 指定浮层渲染的父节点,可以为节点 id 的字符串,也可以返回节点的函数。
|
|
191
|
+
*/
|
|
192
|
+
popupContainer?: string | HTMLElement | ((target: HTMLElement) => HTMLElement);
|
|
193
|
+
/**
|
|
194
|
+
* 弹层组件 style,透传给 Popup
|
|
195
|
+
*/
|
|
196
|
+
popupStyle?: React.CSSProperties;
|
|
197
|
+
/**
|
|
198
|
+
* 弹层组件 className,透传给 Popup
|
|
199
|
+
*/
|
|
200
|
+
popupClassName?: string;
|
|
201
|
+
/**
|
|
202
|
+
* 弹层 id, 传入值才会支持无障碍
|
|
203
|
+
*/
|
|
204
|
+
id?: string;
|
|
205
|
+
followTrigger?: boolean;
|
|
206
|
+
/**
|
|
207
|
+
* 开启 v2
|
|
208
|
+
*/
|
|
209
|
+
v2?: boolean;
|
|
210
|
+
/**
|
|
211
|
+
* [v2] 箭头是否指向目标元素的中心
|
|
212
|
+
*/
|
|
213
|
+
arrowPointToCenter?: boolean;
|
|
214
|
+
/**
|
|
215
|
+
* [v2] 是否进行自动位置调整,默认自动开启
|
|
216
|
+
*/
|
|
217
|
+
autoAdjust?: boolean;
|
|
218
|
+
}
|
|
219
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @component CardLoading
|
|
3
|
+
* @en CardLoading
|
|
4
|
+
* @type 通用 - General
|
|
5
|
+
* @when CardLoading
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import type { CardLoadingRef, CardLoadingProps } from './types';
|
|
9
|
+
export * from './types';
|
|
10
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<CardLoadingProps & React.RefAttributes<CardLoadingRef>, "key" | keyof CardLoadingProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, CardLoadingRef, {}>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @component CardLoading
|
|
3
|
+
* @en CardLoading
|
|
4
|
+
* @type 通用 - General
|
|
5
|
+
* @when CardLoading
|
|
6
|
+
*/
|
|
7
|
+
import React, { forwardRef } from 'react';
|
|
8
|
+
import { ConfigProvider } from '@alifd/next';
|
|
9
|
+
import cs from 'classnames';
|
|
10
|
+
import { PREFIX_DEFAULT, assignSubComponent } from '../utils';
|
|
11
|
+
const CardLoading = forwardRef(({ className }, ref) => {
|
|
12
|
+
return (React.createElement("div", { className: cs(`${PREFIX_DEFAULT}card-loading`, className) }, "\u5361\u7247\u52A0\u8F7D\u4E2D"));
|
|
13
|
+
});
|
|
14
|
+
const CardLoadingWithSub = assignSubComponent(CardLoading, {
|
|
15
|
+
displayName: 'CardLoading',
|
|
16
|
+
});
|
|
17
|
+
export * from './types';
|
|
18
|
+
export default ConfigProvider.config(CardLoadingWithSub);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import { type CommonProps } from '@alifd/next';
|
|
3
|
+
export interface CardLoadingRef {
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* @api CardLoading
|
|
7
|
+
*/
|
|
8
|
+
export interface CardLoadingProps extends React.HTMLAttributes<HTMLElement>, CommonProps {
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/feedback/types.d.ts
CHANGED
|
@@ -47,6 +47,14 @@ export interface FeedbackProps extends HTMLAttributesWeek {
|
|
|
47
47
|
* @defaultValue 'hoz'
|
|
48
48
|
*/
|
|
49
49
|
direction?: 'ver' | 'hoz';
|
|
50
|
+
/**
|
|
51
|
+
* 是否需要分享按钮
|
|
52
|
+
*/
|
|
53
|
+
needShare?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* 是否需要分享按钮
|
|
56
|
+
*/
|
|
57
|
+
onShareClick?: () => void;
|
|
50
58
|
}
|
|
51
59
|
/**
|
|
52
60
|
* @api Feedback.Good
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
declare const FloatButtonWithSub: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<import("./types").FloatButtonProps & import("react").RefAttributes<import("./types").FloatButtonRef>, "key" | keyof import("./types").FloatButtonProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("./types").FloatButtonRef, {}> & {
|
|
3
2
|
Backtop: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<import("./types").BacktopProps & import("react").RefAttributes<import("./types").BacktopRef>, "key" | keyof import("./types").BacktopProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("./types").BacktopRef, {}>;
|
|
4
3
|
Drawer: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<import("./types").FloatButtonDrawerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, undefined, {}>;
|
package/es/icon/index.d.ts
CHANGED
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
* @when Icon
|
|
7
7
|
*/
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import { Icon as NextIcon } from '@alifd/next';
|
|
10
9
|
import type { IconProps } from '@alifd/next/types/icon';
|
|
11
10
|
export * from './types';
|
|
12
|
-
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<IconProps & React.RefAttributes<
|
|
11
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<IconProps & React.RefAttributes<import("@alifd/next/types/config-provider/types").ConfiguredComponent<IconProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/icon/icon").default>>, "key" | keyof IconProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<IconProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/icon/icon").default>, {}>;
|
|
13
12
|
export default _default;
|
package/es/icon/main.scss
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import "../core/variables.scss";
|
|
1
|
+
@import "../core/variables.scss";
|
package/es/icon/style.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '@alifd/next/lib/
|
|
1
|
+
import '@alifd/next/lib/button/style2';
|
|
2
2
|
import './main.scss';
|
package/es/icon/style.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '@alifd/next/lib/
|
|
1
|
+
import '@alifd/next/lib/button/style2';
|
|
2
2
|
import './main.scss';
|
package/es/index.d.ts
CHANGED
|
@@ -11,4 +11,7 @@ export { default as TimePicker } from './time-picker';
|
|
|
11
11
|
export { default as PersonPicker } from './person-picker';
|
|
12
12
|
export { default as Message } from './message';
|
|
13
13
|
export { default as Icon } from './icon';
|
|
14
|
+
export { default as Balloon } from './balloon';
|
|
15
|
+
export { default as List } from './list';
|
|
16
|
+
export { default as CardLoading } from './card-loading';
|
|
14
17
|
export declare const version: string;
|
package/es/index.js
CHANGED
|
@@ -11,4 +11,7 @@ export { default as TimePicker } from './time-picker';
|
|
|
11
11
|
export { default as PersonPicker } from './person-picker';
|
|
12
12
|
export { default as Message } from './message';
|
|
13
13
|
export { default as Icon } from './icon';
|
|
14
|
-
export
|
|
14
|
+
export { default as Balloon } from './balloon';
|
|
15
|
+
export { default as List } from './list';
|
|
16
|
+
export { default as CardLoading } from './card-loading';
|
|
17
|
+
export const version = '0.2.0-beta.0';
|
package/es/input/index.d.ts
CHANGED
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
* | SPACE | Trigger the onClick event |
|
|
19
19
|
*/
|
|
20
20
|
import React from 'react';
|
|
21
|
-
import { Input as NextInput } from '@alifd/next';
|
|
22
21
|
export * from './types';
|
|
23
|
-
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<Pick<any, string | number | symbol> & React.RefAttributes<
|
|
22
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<Pick<any, string | number | symbol> & React.RefAttributes<import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/input").InputProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/input/input").default<import("@alifd/next/types/input").InputProps>> & Pick<import("@alifd/next/types/input/input").default<import("@alifd/next/types/input").InputProps>, "focus" | "getInputNode">>, string | number | symbol> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/input").InputProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/input/input").default<import("@alifd/next/types/input").InputProps>> & Pick<import("@alifd/next/types/input/input").default<import("@alifd/next/types/input").InputProps>, "focus" | "getInputNode">, {}>;
|
|
24
23
|
export default _default;
|
package/es/list/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@alifd/next/lib/list/style2';
|
package/es/list/style.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@alifd/next/lib/list/style2';
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
3
|
+
import type { LoadingProps } from '@alifd/next/types/loading';
|
|
4
|
+
import { type CommonProps } from '@alifd/next';
|
|
5
|
+
type HTMLAttributesWeak = Omit<React.HTMLAttributes<HTMLElement>, 'title'>;
|
|
6
|
+
/**
|
|
7
|
+
* @api List
|
|
8
|
+
*/
|
|
9
|
+
export interface ListProps extends React.HTMLAttributes<HTMLElement>, CommonProps {
|
|
10
|
+
/**
|
|
11
|
+
* 列表头部
|
|
12
|
+
* @en List header
|
|
13
|
+
*/
|
|
14
|
+
header?: ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* 列表尾部
|
|
17
|
+
* @en List footer
|
|
18
|
+
*/
|
|
19
|
+
footer?: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* 列表尺寸
|
|
22
|
+
* @en List size
|
|
23
|
+
* @defaultValue 'medium'
|
|
24
|
+
*/
|
|
25
|
+
size?: 'medium' | 'small';
|
|
26
|
+
/**
|
|
27
|
+
* 是否显示分割线
|
|
28
|
+
* @en Whether to show the divider
|
|
29
|
+
* @defaultValue true
|
|
30
|
+
*/
|
|
31
|
+
divider?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* children
|
|
34
|
+
*/
|
|
35
|
+
children?: ReactNode;
|
|
36
|
+
/**
|
|
37
|
+
* 列表项数据源
|
|
38
|
+
* @en List item data source
|
|
39
|
+
*/
|
|
40
|
+
dataSource?: unknown[];
|
|
41
|
+
/**
|
|
42
|
+
* 当使用 dataSource 时,可以用 renderItem 自定义渲染列表项
|
|
43
|
+
* @param current - 当前遍历的项 - The current item
|
|
44
|
+
* @param index - 当前遍历的项的索引 - The index of the current item
|
|
45
|
+
* @returns - 自定义渲染的 ReactElement - The ReactElement be customized
|
|
46
|
+
*/
|
|
47
|
+
renderItem?: (current: unknown, index: number) => ReactElement;
|
|
48
|
+
/**
|
|
49
|
+
* loading 状态控制
|
|
50
|
+
* @en Loading state control
|
|
51
|
+
* @defaultValue false
|
|
52
|
+
*/
|
|
53
|
+
loading?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* 自定义 Loading 组件
|
|
56
|
+
* @en Custom Loading component
|
|
57
|
+
* @param props - 透传 props - Pass through props
|
|
58
|
+
* @returns - 自定义的 Loading 组件 - Custom Loading component
|
|
59
|
+
* @remarks 请务必透传 props, 使用方式:loadingComponent=\{props =\> \<Loading \{...props\}/\>\}
|
|
60
|
+
*/
|
|
61
|
+
loadingComponent?: (props: LoadingProps) => ReactElement;
|
|
62
|
+
/**
|
|
63
|
+
* 当列表为空时显示的内容
|
|
64
|
+
* @en The content displayed when the list is empty
|
|
65
|
+
*/
|
|
66
|
+
emptyContent?: ReactNode;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* @api List.Item
|
|
70
|
+
*/
|
|
71
|
+
export interface ListItemProps extends HTMLAttributesWeak, CommonProps {
|
|
72
|
+
/**
|
|
73
|
+
* 列表元素的标题
|
|
74
|
+
* @en The title of the list item
|
|
75
|
+
*/
|
|
76
|
+
title?: ReactNode;
|
|
77
|
+
/**
|
|
78
|
+
* 列表元素的描述内容
|
|
79
|
+
* @en The description of the list item
|
|
80
|
+
*/
|
|
81
|
+
description?: ReactNode;
|
|
82
|
+
/**
|
|
83
|
+
* 列表元素的头像 / 图标 / 图片内容
|
|
84
|
+
* @en The avatar / icon / image content of the list item
|
|
85
|
+
*/
|
|
86
|
+
media?: ReactNode;
|
|
87
|
+
/**
|
|
88
|
+
* 额外内容
|
|
89
|
+
* @en Extra content
|
|
90
|
+
*/
|
|
91
|
+
extra?: ReactNode;
|
|
92
|
+
}
|
|
93
|
+
export {};
|
package/es/list/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/message/index.d.ts
CHANGED
|
@@ -6,17 +6,70 @@
|
|
|
6
6
|
* @when Message
|
|
7
7
|
*/
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import { Message as NextMessage } from '@alifd/next';
|
|
10
9
|
import type { MessageProps } from './types';
|
|
11
10
|
export * from './types';
|
|
12
|
-
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<MessageProps & React.RefAttributes<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<MessageProps & React.RefAttributes<import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/message").MessageProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/message").MessageProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, {
|
|
12
|
+
state: {
|
|
13
|
+
visible: boolean | undefined;
|
|
14
|
+
};
|
|
15
|
+
onClose: () => void;
|
|
16
|
+
render(): import("react").JSX.Element | null;
|
|
17
|
+
context: any;
|
|
18
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("@alifd/next/types/message").MessageProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
19
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
20
|
+
readonly props: Readonly<import("@alifd/next/types/message").MessageProps> & Readonly<{
|
|
21
|
+
children?: import("react").ReactNode;
|
|
22
|
+
}>;
|
|
23
|
+
refs: {
|
|
24
|
+
[key: string]: import("react").ReactInstance;
|
|
25
|
+
};
|
|
26
|
+
componentDidMount?(): void;
|
|
27
|
+
shouldComponentUpdate?(nextProps: Readonly<import("@alifd/next/types/message").MessageProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
28
|
+
componentWillUnmount?(): void;
|
|
29
|
+
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
30
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<import("@alifd/next/types/message").MessageProps>, prevState: Readonly<{}>): any;
|
|
31
|
+
componentDidUpdate?(prevProps: Readonly<import("@alifd/next/types/message").MessageProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
32
|
+
componentWillMount?(): void;
|
|
33
|
+
UNSAFE_componentWillMount?(): void;
|
|
34
|
+
componentWillReceiveProps?(nextProps: Readonly<import("@alifd/next/types/message").MessageProps>, nextContext: any): void;
|
|
35
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("@alifd/next/types/message").MessageProps>, nextContext: any): void;
|
|
36
|
+
componentWillUpdate?(nextProps: Readonly<import("@alifd/next/types/message").MessageProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
37
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<import("@alifd/next/types/message").MessageProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
38
|
+
}>>>, "key" | keyof MessageProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/message").MessageProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/message").MessageProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, {
|
|
39
|
+
state: {
|
|
40
|
+
visible: boolean | undefined;
|
|
41
|
+
};
|
|
42
|
+
onClose: () => void;
|
|
43
|
+
render(): import("react").JSX.Element | null;
|
|
44
|
+
context: any;
|
|
45
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("@alifd/next/types/message").MessageProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
46
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
47
|
+
readonly props: Readonly<import("@alifd/next/types/message").MessageProps> & Readonly<{
|
|
48
|
+
children?: import("react").ReactNode;
|
|
49
|
+
}>;
|
|
50
|
+
refs: {
|
|
51
|
+
[key: string]: import("react").ReactInstance;
|
|
52
|
+
};
|
|
53
|
+
componentDidMount?(): void;
|
|
54
|
+
shouldComponentUpdate?(nextProps: Readonly<import("@alifd/next/types/message").MessageProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
55
|
+
componentWillUnmount?(): void;
|
|
56
|
+
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
57
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<import("@alifd/next/types/message").MessageProps>, prevState: Readonly<{}>): any;
|
|
58
|
+
componentDidUpdate?(prevProps: Readonly<import("@alifd/next/types/message").MessageProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
59
|
+
componentWillMount?(): void;
|
|
60
|
+
UNSAFE_componentWillMount?(): void;
|
|
61
|
+
componentWillReceiveProps?(nextProps: Readonly<import("@alifd/next/types/message").MessageProps>, nextContext: any): void;
|
|
62
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("@alifd/next/types/message").MessageProps>, nextContext: any): void;
|
|
63
|
+
componentWillUpdate?(nextProps: Readonly<import("@alifd/next/types/message").MessageProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
64
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<import("@alifd/next/types/message").MessageProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
65
|
+
}>>, {}> & {
|
|
66
|
+
loading: (config: import("@alifd/next/types/message/types").OpenProps) => void;
|
|
67
|
+
warning: (config: import("@alifd/next/types/message/types").OpenProps) => void;
|
|
68
|
+
error: (config: import("@alifd/next/types/message/types").OpenProps) => void;
|
|
69
|
+
help: (config: import("@alifd/next/types/message/types").OpenProps) => void;
|
|
70
|
+
hide: () => void;
|
|
71
|
+
show: (config: import("@alifd/next/types/message/types").OpenProps) => void;
|
|
72
|
+
success: (config: import("@alifd/next/types/message/types").OpenProps) => void;
|
|
73
|
+
notice: (config: import("@alifd/next/types/message/types").OpenProps) => void;
|
|
21
74
|
};
|
|
22
75
|
export default _default;
|
package/es/message/main.scss
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
@import '@alifd/next/variables.scss';
|
|
2
|
-
@import "../core/variables.scss";
|
|
2
|
+
@import "../core/variables.scss";
|
package/es/message/style.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '@alifd/next/lib/message/
|
|
1
|
+
import '@alifd/next/lib/message/style2';
|
|
2
2
|
import './main.scss';
|
package/es/message/style.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '@alifd/next/lib/message/
|
|
1
|
+
import '@alifd/next/lib/message/style2';
|
|
2
2
|
import './main.scss';
|