@alifd/chat 0.1.15-beta.9 → 0.1.15

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.
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @component 标签
3
+ * @en Icon
4
+ * @type 通用 - General
5
+ * @remarks 同 Next Icon - Same as Next.Icon
6
+ * @when Icon
7
+ */
8
+ import React from 'react';
9
+ import { Icon as NextIcon } from '@alifd/next';
10
+ import type { IconProps } from '@alifd/next/types/icon';
11
+ export * from './types';
12
+ declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<IconProps & React.RefAttributes<NextIcon>, "key" | keyof IconProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, NextIcon, {}>;
13
+ export default _default;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @component 标签
3
+ * @en Icon
4
+ * @type 通用 - General
5
+ * @remarks 同 Next Icon - Same as Next.Icon
6
+ * @when Icon
7
+ */
8
+ import { __rest } from "tslib";
9
+ import React, { forwardRef } from 'react';
10
+ import { Icon as NextIcon, ConfigProvider } from '@alifd/next';
11
+ import cs from 'classnames';
12
+ import { PREFIX_DEFAULT, assignSubComponent } from '../utils';
13
+ const Icon = forwardRef((_a, ref) => {
14
+ var { className, size = 'small' } = _a, props = __rest(_a, ["className", "size"]);
15
+ return (React.createElement(NextIcon, Object.assign({}, props, { ref: ref, className: cs(`${PREFIX_DEFAULT}icon`, className), size: size })));
16
+ });
17
+ const IconWithSub = assignSubComponent(Icon, {
18
+ displayName: 'Icon',
19
+ });
20
+ export * from './types';
21
+ export default ConfigProvider.config(IconWithSub);
@@ -0,0 +1 @@
1
+ @import "../core/variables.scss";
@@ -0,0 +1,2 @@
1
+ import '@alifd/next/lib/icon/style';
2
+ import './main.scss';
@@ -0,0 +1,2 @@
1
+ import '@alifd/next/lib/icon/style';
2
+ import './main.scss';
@@ -0,0 +1,43 @@
1
+ import type * as React from 'react';
2
+ import { type CommonProps } from '@alifd/next';
3
+ export interface IconSvgProps extends React.SVGAttributes<SVGSVGElement>, CommonProps {
4
+ /**
5
+ * 指定显示哪种图标
6
+ * @en Type of icon
7
+ */
8
+ type?: string;
9
+ /**
10
+ * 指定图标大小
11
+ * @en Size of icon
12
+ * @defaultValue 'medium'
13
+ */
14
+ size?: number | 'xxs' | 'xs' | 'small' | 'medium' | 'large' | 'xl' | 'xxl' | 'xxxl' | 'inherit';
15
+ }
16
+ /**
17
+ * @api Icon
18
+ */
19
+ export interface IconProps extends React.HTMLAttributes<HTMLElement>, CommonProps {
20
+ /**
21
+ * 指定显示哪种图标
22
+ * @en Type of icon
23
+ */
24
+ type?: string;
25
+ /**
26
+ * 指定图标大小
27
+ * @en Size of icon
28
+ * @defaultValue 'medium'
29
+ */
30
+ size?: number | 'xxs' | 'xs' | 'small' | 'medium' | 'large' | 'xl' | 'xxl' | 'xxxl' | 'inherit';
31
+ }
32
+ export interface IconOptions {
33
+ /**
34
+ * 如果页面上已经有同 id 的标签,那么不会再加载这个图标库
35
+ * @en If there is already a tag with the same ID on the page, the icon library will not be loaded again
36
+ */
37
+ scriptUrl: string;
38
+ /**
39
+ * extra common props of icon-font
40
+ * @skip
41
+ */
42
+ extraCommonProps?: React.SVGAttributes<SVGSVGElement>;
43
+ }
@@ -0,0 +1 @@
1
+ export {};
package/es/index.d.ts CHANGED
@@ -9,4 +9,6 @@ export { default as Input } from './input';
9
9
  export { default as DatePicker } from './date-picker';
10
10
  export { default as TimePicker } from './time-picker';
11
11
  export { default as PersonPicker } from './person-picker';
12
+ export { default as Message } from './message';
13
+ export { default as Icon } from './icon';
12
14
  export declare const version: string;
package/es/index.js CHANGED
@@ -9,4 +9,6 @@ export { default as Input } from './input';
9
9
  export { default as DatePicker } from './date-picker';
10
10
  export { default as TimePicker } from './time-picker';
11
11
  export { default as PersonPicker } from './person-picker';
12
- export const version = '0.1.15-beta.9';
12
+ export { default as Message } from './message';
13
+ export { default as Icon } from './icon';
14
+ export const version = '0.1.15-beta.13';
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @component 标签
3
+ * @en Message
4
+ * @type 通用 - General
5
+ * @remarks 同 Next Message - Same as Next.Message
6
+ * @when Message
7
+ */
8
+ import React from 'react';
9
+ import { Message as NextMessage } from '@alifd/next';
10
+ import type { MessageProps } from './types';
11
+ export * from './types';
12
+ declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<MessageProps & React.RefAttributes<NextMessage>, "key" | keyof MessageProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, NextMessage, {}> & {
13
+ loading: typeof NextMessage.loading;
14
+ warning: typeof NextMessage.warning;
15
+ error: typeof NextMessage.error;
16
+ help: typeof NextMessage.help;
17
+ hide: typeof NextMessage.hide;
18
+ show: typeof NextMessage.show;
19
+ success: typeof NextMessage.success;
20
+ notice: typeof NextMessage.notice;
21
+ };
22
+ export default _default;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @component 标签
3
+ * @en Message
4
+ * @type 通用 - General
5
+ * @remarks 同 Next Message - Same as Next.Message
6
+ * @when Message
7
+ */
8
+ import { __rest } from "tslib";
9
+ import React, { forwardRef } from 'react';
10
+ import { Message as NextMessage, ConfigProvider } from '@alifd/next';
11
+ import cs from 'classnames';
12
+ import { PREFIX_DEFAULT, assignSubComponent } from '../utils';
13
+ const Message = forwardRef((_a, ref) => {
14
+ var { className } = _a, props = __rest(_a, ["className"]);
15
+ return (React.createElement(NextMessage, Object.assign({}, props, { ref: ref, className: cs(`${PREFIX_DEFAULT}message`, className) })));
16
+ });
17
+ const MessageWithSub = assignSubComponent(Message, {
18
+ show: NextMessage.show,
19
+ success: NextMessage.success,
20
+ warning: NextMessage.warning,
21
+ error: NextMessage.error,
22
+ notice: NextMessage.notice,
23
+ help: NextMessage.help,
24
+ loading: NextMessage.loading,
25
+ hide: NextMessage.hide,
26
+ });
27
+ export * from './types';
28
+ export default ConfigProvider.config(MessageWithSub, {
29
+ componentName: 'Message',
30
+ });
@@ -0,0 +1,2 @@
1
+ @import '@alifd/next/variables.scss';
2
+ @import "../core/variables.scss";
@@ -0,0 +1,2 @@
1
+ import '@alifd/next/lib/message/style';
2
+ import './main.scss';
@@ -0,0 +1,2 @@
1
+ import '@alifd/next/lib/message/style';
2
+ import './main.scss';
@@ -0,0 +1,195 @@
1
+ import type React from 'react';
2
+ import type { OverlayProps } from '@alifd/next/types/overlay';
3
+ import type { ConsumerState } from '@alifd/next/types/config-provider/consumer';
4
+ type HTMLAttributesWeak = Omit<React.HTMLAttributes<HTMLElement>, 'title'>;
5
+ /**
6
+ * @api Message
7
+ */
8
+ export interface MessageProps extends HTMLAttributesWeak {
9
+ /**
10
+ * 反馈类型
11
+ * @en type of message
12
+ * @defaultValue 'success'
13
+ */
14
+ type?: 'success' | 'warning' | 'error' | 'notice' | 'help' | 'loading';
15
+ /**
16
+ * 反馈外观
17
+ * @en shape of message
18
+ * @defaultValue 'inline'
19
+ */
20
+ shape?: 'inline' | 'addon' | 'toast';
21
+ /**
22
+ * 反馈大小
23
+ * @en size of message
24
+ * @defaultValue 'medium'
25
+ */
26
+ size?: 'medium' | 'large';
27
+ /**
28
+ * 标题
29
+ * @en title of message
30
+ */
31
+ title?: React.ReactNode;
32
+ /**
33
+ * 内容,非函数式调用下使用
34
+ * @en content of message
35
+ */
36
+ children?: React.ReactNode;
37
+ /**
38
+ * 默认是否显示
39
+ * @en whether the message is visible in default
40
+ * @defaultValue false
41
+ */
42
+ defaultVisible?: boolean;
43
+ /**
44
+ * 当前是否显示
45
+ * @en whether the message is visible currently
46
+ */
47
+ visible?: boolean;
48
+ /**
49
+ * 显示的图标类型,会覆盖内部设置的IconType,传false不显示图标
50
+ * @en type of icon, overriding the internally type of icon
51
+ */
52
+ iconType?: string | false;
53
+ /**
54
+ * 显示关闭按钮
55
+ * @en whether to show the close button
56
+ * @defaultValue false
57
+ */
58
+ closeable?: boolean;
59
+ /**
60
+ * 关闭按钮的回调
61
+ * @en callback function triggered when close
62
+ * @defaultValue () =\> \{\}
63
+ */
64
+ onClose?: () => void;
65
+ /**
66
+ * 关闭之后调用的函数
67
+ * @en callback function triggered after closed
68
+ * @defaultValue () =\> \{\}
69
+ */
70
+ afterClose?: () => void;
71
+ /**
72
+ * 是否开启展开收起动画
73
+ * @en whether to enable expand and collapse animation
74
+ * @defaultValue true
75
+ */
76
+ animation?: boolean;
77
+ }
78
+ /**
79
+ * @api Message.show
80
+ * @remarks Message.show(props) 提供一个单例的调用方式,配置参数如下(继承 Overlay 的配置):
81
+ *
82
+ * ```js
83
+ * Message.show({
84
+ * type: 'error',
85
+ * title: '错误',
86
+ * content: '请联系相关人员反馈!',
87
+ * hasMask: true
88
+ * });
89
+ * ```
90
+ * -
91
+ * `Message.show(props)` provides a singleton call with the following configuration parameters (inheriting `Overlay` configuration):
92
+ * ```js
93
+ * Message.show({
94
+ * type: 'error',
95
+ * title: 'Error',
96
+ * content: 'Please contact admin feedback!',
97
+ * hasMask: true
98
+ * });
99
+ * ```
100
+ */
101
+ export interface MessageQuickProps extends Omit<HTMLAttributesWeak, 'content'> {
102
+ /**
103
+ * 反馈类型
104
+ * @en type of message
105
+ * @defaultValue 'success'
106
+ */
107
+ type?: 'success' | 'warning' | 'error' | 'notice' | 'help' | 'loading';
108
+ /**
109
+ * 反馈大小
110
+ * @en size of message
111
+ * @defaultValue 'medium'
112
+ */
113
+ size?: 'medium' | 'large';
114
+ /**
115
+ * 标题
116
+ * @en title of message
117
+ */
118
+ title?: React.ReactNode;
119
+ /**
120
+ * 内容,函数式调用下使用
121
+ * @en content of message
122
+ */
123
+ content?: React.ReactNode;
124
+ /**
125
+ * 弹层对齐方式,详情见 Overlay align
126
+ * @en alignment reference Overlay
127
+ * @defaultValue 'tc tc'
128
+ */
129
+ align?: string | boolean;
130
+ /**
131
+ * 弹层相对于参照元素定位的微调
132
+ * @en offset after positioned
133
+ * @defaultValue [0, 0]
134
+ */
135
+ offset?: Array<number>;
136
+ /**
137
+ * 是否显示遮罩
138
+ * @en whether to have a mask
139
+ * @defaultValue false
140
+ */
141
+ hasMask?: boolean;
142
+ /**
143
+ * 显示持续时间,0表示一直存在,以毫秒为单位
144
+ * @en show duration, 0 means always present, in milliseconds
145
+ * @defaultValue 3000
146
+ */
147
+ duration?: number;
148
+ /**
149
+ * @skip
150
+ */
151
+ timeoutId?: string;
152
+ /**
153
+ * 显示关闭按钮
154
+ * @en whether to show the close button
155
+ * @defaultValue false
156
+ */
157
+ closeable?: boolean;
158
+ /**
159
+ * 关闭按钮的回调
160
+ * @en callback function triggered when close
161
+ * @defaultValue () =\> \{\}
162
+ */
163
+ onClose?: () => void;
164
+ /**
165
+ * 关闭之后调用的函数
166
+ * @en callback function triggered after closed
167
+ * @defaultValue () =\> \{\}
168
+ */
169
+ afterClose?: () => void;
170
+ /**
171
+ * 是否开启展开收起动画
172
+ * @en whether to enable expand and collapse animation
173
+ * @defaultValue true
174
+ */
175
+ animation?: boolean;
176
+ /**
177
+ * 透传到弹层组件的属性对象
178
+ * @en props of Overlay
179
+ */
180
+ overlayProps?: OverlayProps;
181
+ /**
182
+ * @skip
183
+ */
184
+ contextConfig?: ConsumerState;
185
+ }
186
+ export type OpenProps = string | React.ReactElement | MessageQuickProps;
187
+ export interface MessageWrapperItem extends MessageQuickProps {
188
+ timer?: ReturnType<typeof setTimeout>;
189
+ key: string;
190
+ }
191
+ export interface MessageWrapperProps {
192
+ prefix?: MessageQuickProps['prefix'];
193
+ dataSource: Array<MessageWrapperItem>;
194
+ }
195
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -19,7 +19,7 @@ import { __awaiter, __rest } from "tslib";
19
19
  * | SPACE | Trigger the onClick event |
20
20
  */
21
21
  import React, { useState, forwardRef, useEffect } from 'react';
22
- import { Select as NextSelect, Avatar as NextAvatar, ConfigProvider } from '@alifd/next';
22
+ import { Select as NextSelect, ConfigProvider } from '@alifd/next';
23
23
  import cs from 'classnames';
24
24
  import axios from 'axios';
25
25
  import { PREFIX_DEFAULT, assignSubComponent } from '../utils';
@@ -39,7 +39,7 @@ const PersonPicker = forwardRef((_a, ref) => {
39
39
  };
40
40
  const labelRender = (selectItem) => {
41
41
  return React.createElement("div", { className: "label-container" },
42
- React.createElement(NextAvatar, { className: "mr-2", shape: "square", size: "small", src: `https://work.alibaba-inc.com/photo/${selectItem.value}.20x20.jpg` }),
42
+ React.createElement("img", { style: { width: '20px', height: '20px', borderRadius: '4px' }, src: `https://work.alibaba-inc.com/photo/${selectItem.value}.20x20.jpg` }),
43
43
  React.createElement("span", { className: "label-text" }, selectItem.label));
44
44
  };
45
45
  const handleUserSearch = (keyword) => __awaiter(void 0, void 0, void 0, function* () {
package/es/tag/index.d.ts CHANGED
@@ -8,7 +8,7 @@
8
8
  import React from 'react';
9
9
  import type { TagProps } from '@alifd/next/types/tag';
10
10
  export type { TagProps } from '@alifd/next/types/tag';
11
- 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<(TagProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps) & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<TagProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, {
11
+ declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<TagProps & React.RefAttributes<import("@alifd/next/types/config-provider/types").ConfiguredComponent<(TagProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps) & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<TagProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, {
12
12
  __destroyed: boolean;
13
13
  tagNode: HTMLDivElement | null;
14
14
  componentWillUnmount(): void;
@@ -892,7 +892,7 @@ declare const _default: import("@alifd/next/types/config-provider/types").Config
892
892
  UNSAFE_componentWillUpdate?(nextProps: Readonly<TagProps>, nextState: Readonly<{
893
893
  visible: boolean;
894
894
  }>, nextContext: any): void;
895
- }>>>, string | number | symbol> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<(TagProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps) & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<TagProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, {
895
+ }>>>, "size" | "type" | "onClick" | "disabled" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "warning" | "key" | "locale" | "pure" | "device" | "rtl" | "errorBoundary" | "closable" | "onClose" | "afterClose" | "animation" | "afterAppear" | "_shape" | "closeArea"> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<(TagProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps) & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<TagProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, {
896
896
  __destroyed: boolean;
897
897
  tagNode: HTMLDivElement | null;
898
898
  componentWillUnmount(): void;
package/es/tag/index.js CHANGED
@@ -11,8 +11,8 @@ import { Tag as NextTag, ConfigProvider } from '@alifd/next';
11
11
  import cs from 'classnames';
12
12
  import { PREFIX_DEFAULT, assignSubComponent } from '../utils';
13
13
  const Tag = forwardRef((_a, ref) => {
14
- var { className, size = 'small', type = 'normal' } = _a, props = __rest(_a, ["className", "size", "type"]);
15
- return (React.createElement(NextTag, Object.assign({}, props, { ref: ref, className: cs(`${PREFIX_DEFAULT}tag`, className), size: size, type: type })));
14
+ var { className, size = 'small' } = _a, props = __rest(_a, ["className", "size"]);
15
+ return (React.createElement(NextTag, Object.assign({}, props, { ref: ref, className: cs(`${PREFIX_DEFAULT}tag`, className), size: size })));
16
16
  });
17
17
  // 暂时只开放 Tag 组件,其它子组件后续看需求
18
18
  const TagWithSub = assignSubComponent(Tag, {
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @component 标签
3
+ * @en Icon
4
+ * @type 通用 - General
5
+ * @remarks 同 Next Icon - Same as Next.Icon
6
+ * @when Icon
7
+ */
8
+ import React from 'react';
9
+ import { Icon as NextIcon } from '@alifd/next';
10
+ import type { IconProps } from '@alifd/next/types/icon';
11
+ export * from './types';
12
+ declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<IconProps & React.RefAttributes<NextIcon>, "key" | keyof IconProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, NextIcon, {}>;
13
+ export default _default;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ /**
3
+ * @component 标签
4
+ * @en Icon
5
+ * @type 通用 - General
6
+ * @remarks 同 Next Icon - Same as Next.Icon
7
+ * @when Icon
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ const tslib_1 = require("tslib");
11
+ const react_1 = tslib_1.__importStar(require("react"));
12
+ const next_1 = require("@alifd/next");
13
+ const classnames_1 = tslib_1.__importDefault(require("classnames"));
14
+ const utils_1 = require("../utils");
15
+ const Icon = (0, react_1.forwardRef)((_a, ref) => {
16
+ var { className, size = 'small' } = _a, props = tslib_1.__rest(_a, ["className", "size"]);
17
+ return (react_1.default.createElement(next_1.Icon, Object.assign({}, props, { ref: ref, className: (0, classnames_1.default)(`${utils_1.PREFIX_DEFAULT}icon`, className), size: size })));
18
+ });
19
+ const IconWithSub = (0, utils_1.assignSubComponent)(Icon, {
20
+ displayName: 'Icon',
21
+ });
22
+ tslib_1.__exportStar(require("./types"), exports);
23
+ exports.default = next_1.ConfigProvider.config(IconWithSub);
@@ -0,0 +1 @@
1
+ @import "../core/variables.scss";
@@ -0,0 +1,2 @@
1
+ import '@alifd/next/lib/icon/style';
2
+ import './main.scss';
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ require("@alifd/next/lib/icon/style");
4
+ require("./main.scss");
@@ -0,0 +1,43 @@
1
+ import type * as React from 'react';
2
+ import { type CommonProps } from '@alifd/next';
3
+ export interface IconSvgProps extends React.SVGAttributes<SVGSVGElement>, CommonProps {
4
+ /**
5
+ * 指定显示哪种图标
6
+ * @en Type of icon
7
+ */
8
+ type?: string;
9
+ /**
10
+ * 指定图标大小
11
+ * @en Size of icon
12
+ * @defaultValue 'medium'
13
+ */
14
+ size?: number | 'xxs' | 'xs' | 'small' | 'medium' | 'large' | 'xl' | 'xxl' | 'xxxl' | 'inherit';
15
+ }
16
+ /**
17
+ * @api Icon
18
+ */
19
+ export interface IconProps extends React.HTMLAttributes<HTMLElement>, CommonProps {
20
+ /**
21
+ * 指定显示哪种图标
22
+ * @en Type of icon
23
+ */
24
+ type?: string;
25
+ /**
26
+ * 指定图标大小
27
+ * @en Size of icon
28
+ * @defaultValue 'medium'
29
+ */
30
+ size?: number | 'xxs' | 'xs' | 'small' | 'medium' | 'large' | 'xl' | 'xxl' | 'xxxl' | 'inherit';
31
+ }
32
+ export interface IconOptions {
33
+ /**
34
+ * 如果页面上已经有同 id 的标签,那么不会再加载这个图标库
35
+ * @en If there is already a tag with the same ID on the page, the icon library will not be loaded again
36
+ */
37
+ scriptUrl: string;
38
+ /**
39
+ * extra common props of icon-font
40
+ * @skip
41
+ */
42
+ extraCommonProps?: React.SVGAttributes<SVGSVGElement>;
43
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/lib/index.d.ts CHANGED
@@ -9,4 +9,6 @@ export { default as Input } from './input';
9
9
  export { default as DatePicker } from './date-picker';
10
10
  export { default as TimePicker } from './time-picker';
11
11
  export { default as PersonPicker } from './person-picker';
12
+ export { default as Message } from './message';
13
+ export { default as Icon } from './icon';
12
14
  export declare const version: string;
package/lib/index.js CHANGED
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.version = exports.PersonPicker = exports.TimePicker = exports.DatePicker = exports.Input = exports.Tab = exports.Tag = exports.Text = exports.FloatButton = exports.Feedback = exports.Card = exports.Button = void 0;
6
+ exports.version = exports.Icon = exports.Message = exports.PersonPicker = exports.TimePicker = exports.DatePicker = exports.Input = exports.Tab = exports.Tag = exports.Text = exports.FloatButton = exports.Feedback = exports.Card = exports.Button = void 0;
7
7
  var button_1 = require("./button");
8
8
  Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return __importDefault(button_1).default; } });
9
9
  var card_1 = require("./card");
@@ -26,4 +26,8 @@ var time_picker_1 = require("./time-picker");
26
26
  Object.defineProperty(exports, "TimePicker", { enumerable: true, get: function () { return __importDefault(time_picker_1).default; } });
27
27
  var person_picker_1 = require("./person-picker");
28
28
  Object.defineProperty(exports, "PersonPicker", { enumerable: true, get: function () { return __importDefault(person_picker_1).default; } });
29
- exports.version = '0.1.15-beta.9';
29
+ var message_1 = require("./message");
30
+ Object.defineProperty(exports, "Message", { enumerable: true, get: function () { return __importDefault(message_1).default; } });
31
+ var icon_1 = require("./icon");
32
+ Object.defineProperty(exports, "Icon", { enumerable: true, get: function () { return __importDefault(icon_1).default; } });
33
+ exports.version = '0.1.15-beta.13';
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @component 标签
3
+ * @en Message
4
+ * @type 通用 - General
5
+ * @remarks 同 Next Message - Same as Next.Message
6
+ * @when Message
7
+ */
8
+ import React from 'react';
9
+ import { Message as NextMessage } from '@alifd/next';
10
+ import type { MessageProps } from './types';
11
+ export * from './types';
12
+ declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<MessageProps & React.RefAttributes<NextMessage>, "key" | keyof MessageProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, NextMessage, {}> & {
13
+ loading: typeof NextMessage.loading;
14
+ warning: typeof NextMessage.warning;
15
+ error: typeof NextMessage.error;
16
+ help: typeof NextMessage.help;
17
+ hide: typeof NextMessage.hide;
18
+ show: typeof NextMessage.show;
19
+ success: typeof NextMessage.success;
20
+ notice: typeof NextMessage.notice;
21
+ };
22
+ export default _default;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ /**
3
+ * @component 标签
4
+ * @en Message
5
+ * @type 通用 - General
6
+ * @remarks 同 Next Message - Same as Next.Message
7
+ * @when Message
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ const tslib_1 = require("tslib");
11
+ const react_1 = tslib_1.__importStar(require("react"));
12
+ const next_1 = require("@alifd/next");
13
+ const classnames_1 = tslib_1.__importDefault(require("classnames"));
14
+ const utils_1 = require("../utils");
15
+ const Message = (0, react_1.forwardRef)((_a, ref) => {
16
+ var { className } = _a, props = tslib_1.__rest(_a, ["className"]);
17
+ return (react_1.default.createElement(next_1.Message, Object.assign({}, props, { ref: ref, className: (0, classnames_1.default)(`${utils_1.PREFIX_DEFAULT}message`, className) })));
18
+ });
19
+ const MessageWithSub = (0, utils_1.assignSubComponent)(Message, {
20
+ show: next_1.Message.show,
21
+ success: next_1.Message.success,
22
+ warning: next_1.Message.warning,
23
+ error: next_1.Message.error,
24
+ notice: next_1.Message.notice,
25
+ help: next_1.Message.help,
26
+ loading: next_1.Message.loading,
27
+ hide: next_1.Message.hide,
28
+ });
29
+ tslib_1.__exportStar(require("./types"), exports);
30
+ exports.default = next_1.ConfigProvider.config(MessageWithSub, {
31
+ componentName: 'Message',
32
+ });
@@ -0,0 +1,2 @@
1
+ @import '@alifd/next/variables.scss';
2
+ @import "../core/variables.scss";
@@ -0,0 +1,2 @@
1
+ import '@alifd/next/lib/message/style';
2
+ import './main.scss';
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ require("@alifd/next/lib/message/style");
4
+ require("./main.scss");
@@ -0,0 +1,195 @@
1
+ import type React from 'react';
2
+ import type { OverlayProps } from '@alifd/next/types/overlay';
3
+ import type { ConsumerState } from '@alifd/next/types/config-provider/consumer';
4
+ type HTMLAttributesWeak = Omit<React.HTMLAttributes<HTMLElement>, 'title'>;
5
+ /**
6
+ * @api Message
7
+ */
8
+ export interface MessageProps extends HTMLAttributesWeak {
9
+ /**
10
+ * 反馈类型
11
+ * @en type of message
12
+ * @defaultValue 'success'
13
+ */
14
+ type?: 'success' | 'warning' | 'error' | 'notice' | 'help' | 'loading';
15
+ /**
16
+ * 反馈外观
17
+ * @en shape of message
18
+ * @defaultValue 'inline'
19
+ */
20
+ shape?: 'inline' | 'addon' | 'toast';
21
+ /**
22
+ * 反馈大小
23
+ * @en size of message
24
+ * @defaultValue 'medium'
25
+ */
26
+ size?: 'medium' | 'large';
27
+ /**
28
+ * 标题
29
+ * @en title of message
30
+ */
31
+ title?: React.ReactNode;
32
+ /**
33
+ * 内容,非函数式调用下使用
34
+ * @en content of message
35
+ */
36
+ children?: React.ReactNode;
37
+ /**
38
+ * 默认是否显示
39
+ * @en whether the message is visible in default
40
+ * @defaultValue false
41
+ */
42
+ defaultVisible?: boolean;
43
+ /**
44
+ * 当前是否显示
45
+ * @en whether the message is visible currently
46
+ */
47
+ visible?: boolean;
48
+ /**
49
+ * 显示的图标类型,会覆盖内部设置的IconType,传false不显示图标
50
+ * @en type of icon, overriding the internally type of icon
51
+ */
52
+ iconType?: string | false;
53
+ /**
54
+ * 显示关闭按钮
55
+ * @en whether to show the close button
56
+ * @defaultValue false
57
+ */
58
+ closeable?: boolean;
59
+ /**
60
+ * 关闭按钮的回调
61
+ * @en callback function triggered when close
62
+ * @defaultValue () =\> \{\}
63
+ */
64
+ onClose?: () => void;
65
+ /**
66
+ * 关闭之后调用的函数
67
+ * @en callback function triggered after closed
68
+ * @defaultValue () =\> \{\}
69
+ */
70
+ afterClose?: () => void;
71
+ /**
72
+ * 是否开启展开收起动画
73
+ * @en whether to enable expand and collapse animation
74
+ * @defaultValue true
75
+ */
76
+ animation?: boolean;
77
+ }
78
+ /**
79
+ * @api Message.show
80
+ * @remarks Message.show(props) 提供一个单例的调用方式,配置参数如下(继承 Overlay 的配置):
81
+ *
82
+ * ```js
83
+ * Message.show({
84
+ * type: 'error',
85
+ * title: '错误',
86
+ * content: '请联系相关人员反馈!',
87
+ * hasMask: true
88
+ * });
89
+ * ```
90
+ * -
91
+ * `Message.show(props)` provides a singleton call with the following configuration parameters (inheriting `Overlay` configuration):
92
+ * ```js
93
+ * Message.show({
94
+ * type: 'error',
95
+ * title: 'Error',
96
+ * content: 'Please contact admin feedback!',
97
+ * hasMask: true
98
+ * });
99
+ * ```
100
+ */
101
+ export interface MessageQuickProps extends Omit<HTMLAttributesWeak, 'content'> {
102
+ /**
103
+ * 反馈类型
104
+ * @en type of message
105
+ * @defaultValue 'success'
106
+ */
107
+ type?: 'success' | 'warning' | 'error' | 'notice' | 'help' | 'loading';
108
+ /**
109
+ * 反馈大小
110
+ * @en size of message
111
+ * @defaultValue 'medium'
112
+ */
113
+ size?: 'medium' | 'large';
114
+ /**
115
+ * 标题
116
+ * @en title of message
117
+ */
118
+ title?: React.ReactNode;
119
+ /**
120
+ * 内容,函数式调用下使用
121
+ * @en content of message
122
+ */
123
+ content?: React.ReactNode;
124
+ /**
125
+ * 弹层对齐方式,详情见 Overlay align
126
+ * @en alignment reference Overlay
127
+ * @defaultValue 'tc tc'
128
+ */
129
+ align?: string | boolean;
130
+ /**
131
+ * 弹层相对于参照元素定位的微调
132
+ * @en offset after positioned
133
+ * @defaultValue [0, 0]
134
+ */
135
+ offset?: Array<number>;
136
+ /**
137
+ * 是否显示遮罩
138
+ * @en whether to have a mask
139
+ * @defaultValue false
140
+ */
141
+ hasMask?: boolean;
142
+ /**
143
+ * 显示持续时间,0表示一直存在,以毫秒为单位
144
+ * @en show duration, 0 means always present, in milliseconds
145
+ * @defaultValue 3000
146
+ */
147
+ duration?: number;
148
+ /**
149
+ * @skip
150
+ */
151
+ timeoutId?: string;
152
+ /**
153
+ * 显示关闭按钮
154
+ * @en whether to show the close button
155
+ * @defaultValue false
156
+ */
157
+ closeable?: boolean;
158
+ /**
159
+ * 关闭按钮的回调
160
+ * @en callback function triggered when close
161
+ * @defaultValue () =\> \{\}
162
+ */
163
+ onClose?: () => void;
164
+ /**
165
+ * 关闭之后调用的函数
166
+ * @en callback function triggered after closed
167
+ * @defaultValue () =\> \{\}
168
+ */
169
+ afterClose?: () => void;
170
+ /**
171
+ * 是否开启展开收起动画
172
+ * @en whether to enable expand and collapse animation
173
+ * @defaultValue true
174
+ */
175
+ animation?: boolean;
176
+ /**
177
+ * 透传到弹层组件的属性对象
178
+ * @en props of Overlay
179
+ */
180
+ overlayProps?: OverlayProps;
181
+ /**
182
+ * @skip
183
+ */
184
+ contextConfig?: ConsumerState;
185
+ }
186
+ export type OpenProps = string | React.ReactElement | MessageQuickProps;
187
+ export interface MessageWrapperItem extends MessageQuickProps {
188
+ timer?: ReturnType<typeof setTimeout>;
189
+ key: string;
190
+ }
191
+ export interface MessageWrapperProps {
192
+ prefix?: MessageQuickProps['prefix'];
193
+ dataSource: Array<MessageWrapperItem>;
194
+ }
195
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -41,7 +41,7 @@ const PersonPicker = (0, react_1.forwardRef)((_a, ref) => {
41
41
  };
42
42
  const labelRender = (selectItem) => {
43
43
  return react_1.default.createElement("div", { className: "label-container" },
44
- react_1.default.createElement(next_1.Avatar, { className: "mr-2", shape: "square", size: "small", src: `https://work.alibaba-inc.com/photo/${selectItem.value}.20x20.jpg` }),
44
+ react_1.default.createElement("img", { style: { width: '20px', height: '20px', borderRadius: '4px' }, src: `https://work.alibaba-inc.com/photo/${selectItem.value}.20x20.jpg` }),
45
45
  react_1.default.createElement("span", { className: "label-text" }, selectItem.label));
46
46
  };
47
47
  const handleUserSearch = (keyword) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
@@ -8,7 +8,7 @@
8
8
  import React from 'react';
9
9
  import type { TagProps } from '@alifd/next/types/tag';
10
10
  export type { TagProps } from '@alifd/next/types/tag';
11
- 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<(TagProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps) & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<TagProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, {
11
+ declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<TagProps & React.RefAttributes<import("@alifd/next/types/config-provider/types").ConfiguredComponent<(TagProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps) & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<TagProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, {
12
12
  __destroyed: boolean;
13
13
  tagNode: HTMLDivElement | null;
14
14
  componentWillUnmount(): void;
@@ -892,7 +892,7 @@ declare const _default: import("@alifd/next/types/config-provider/types").Config
892
892
  UNSAFE_componentWillUpdate?(nextProps: Readonly<TagProps>, nextState: Readonly<{
893
893
  visible: boolean;
894
894
  }>, nextContext: any): void;
895
- }>>>, string | number | symbol> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<(TagProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps) & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<TagProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, {
895
+ }>>>, "size" | "type" | "onClick" | "disabled" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "warning" | "key" | "locale" | "pure" | "device" | "rtl" | "errorBoundary" | "closable" | "onClose" | "afterClose" | "animation" | "afterAppear" | "_shape" | "closeArea"> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<(TagProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps) & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<TagProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, {
896
896
  __destroyed: boolean;
897
897
  tagNode: HTMLDivElement | null;
898
898
  componentWillUnmount(): void;
package/lib/tag/index.js CHANGED
@@ -13,8 +13,8 @@ const next_1 = require("@alifd/next");
13
13
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
14
14
  const utils_1 = require("../utils");
15
15
  const Tag = (0, react_1.forwardRef)((_a, ref) => {
16
- var { className, size = 'small', type = 'normal' } = _a, props = tslib_1.__rest(_a, ["className", "size", "type"]);
17
- return (react_1.default.createElement(next_1.Tag, Object.assign({}, props, { ref: ref, className: (0, classnames_1.default)(`${utils_1.PREFIX_DEFAULT}tag`, className), size: size, type: type })));
16
+ var { className, size = 'small' } = _a, props = tslib_1.__rest(_a, ["className", "size"]);
17
+ return (react_1.default.createElement(next_1.Tag, Object.assign({}, props, { ref: ref, className: (0, classnames_1.default)(`${utils_1.PREFIX_DEFAULT}tag`, className), size: size })));
18
18
  });
19
19
  // 暂时只开放 Tag 组件,其它子组件后续看需求
20
20
  const TagWithSub = (0, utils_1.assignSubComponent)(Tag, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alifd/chat",
3
- "version": "0.1.15-beta.9",
3
+ "version": "0.1.15",
4
4
  "description": "A configurable component library for chat built on React.",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -169,6 +169,30 @@
169
169
  "./person-picker/style.js": {
170
170
  "import": "./es/person-picker/style.js",
171
171
  "require": "./lib/person-picker/style.js"
172
+ },
173
+ "./message": {
174
+ "import": "./es/message/index.js",
175
+ "require": "./lib/message/index.js"
176
+ },
177
+ "./message/style": {
178
+ "import": "./es/message/style.js",
179
+ "require": "./lib/message/style.js"
180
+ },
181
+ "./message/style.js": {
182
+ "import": "./es/message/style.js",
183
+ "require": "./lib/message/style.js"
184
+ },
185
+ "./icon": {
186
+ "import": "./es/icon/index.js",
187
+ "require": "./lib/icon/index.js"
188
+ },
189
+ "./icon/style": {
190
+ "import": "./es/icon/style.js",
191
+ "require": "./lib/icon/style.js"
192
+ },
193
+ "./icon/style.js": {
194
+ "import": "./es/icon/style.js",
195
+ "require": "./lib/icon/style.js"
172
196
  }
173
197
  },
174
198
  "files": [