@alifd/chat 0.1.13 → 0.1.15-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/button/index.d.ts +1 -9
- package/es/calendar/index.d.ts +23 -0
- package/es/calendar/index.js +33 -0
- package/es/calendar/style.d.ts +2 -0
- package/es/calendar/style.js +2 -0
- package/es/calendar/types.d.ts +123 -0
- package/es/calendar/types.js +1 -0
- package/es/card/index.d.ts +1 -5
- package/es/card/view/card.d.ts +1 -4
- package/es/date-picker/index.d.ts +24 -0
- package/es/date-picker/index.js +33 -0
- package/es/date-picker/style.d.ts +3 -0
- package/es/date-picker/style.js +3 -0
- package/es/date-picker/types.d.ts +123 -0
- package/es/date-picker/types.js +1 -0
- package/es/feedback/index.d.ts +1 -6
- package/es/float-button/index.d.ts +4 -26
- package/es/float-button/view/backtop.d.ts +1 -9
- package/es/float-button/view/drawer.d.ts +1 -4
- package/es/float-button/view/float-button.d.ts +1 -9
- package/es/float-button/view/inner-drawer.d.ts +1 -4
- package/es/index.d.ts +5 -0
- package/es/index.js +6 -1
- package/es/input/index.d.ts +24 -0
- package/es/input/index.js +33 -0
- package/es/input/style.d.ts +2 -0
- package/es/input/style.js +2 -0
- package/es/input/types.d.ts +518 -0
- package/es/input/types.js +1 -0
- package/es/person-picker/index.d.ts +24 -0
- package/es/person-picker/index.js +66 -0
- package/es/person-picker/style.d.ts +2 -0
- package/es/person-picker/style.js +2 -0
- package/es/person-picker/types.d.ts +20 -0
- package/es/person-picker/types.js +1 -0
- package/es/tab/index.d.ts +1 -8
- package/es/tag/index.d.ts +1 -9
- package/es/text/index.d.ts +1 -7
- package/es/time-picker/index.d.ts +23 -0
- package/es/time-picker/index.js +79 -0
- package/es/time-picker/style.d.ts +2 -0
- package/es/time-picker/style.js +2 -0
- package/es/time-picker/types.d.ts +20 -0
- package/es/time-picker/types.js +1 -0
- package/es/utils/dingtalk.d.ts +4 -0
- package/es/utils/dingtalk.js +53 -0
- package/lib/button/index.d.ts +1 -9
- package/lib/calendar/index.d.ts +23 -0
- package/lib/calendar/index.js +35 -0
- package/{es/button → lib/calendar}/main.scss +1 -1
- package/lib/calendar/style.d.ts +2 -0
- package/lib/calendar/style.js +4 -0
- package/lib/calendar/types.d.ts +123 -0
- package/lib/calendar/types.js +2 -0
- package/lib/card/index.d.ts +1 -5
- package/lib/card/view/card.d.ts +1 -4
- package/lib/date-picker/index.d.ts +24 -0
- package/lib/date-picker/index.js +35 -0
- package/lib/date-picker/main.scss +6 -0
- package/lib/date-picker/style.d.ts +3 -0
- package/lib/date-picker/style.js +5 -0
- package/lib/date-picker/types.d.ts +123 -0
- package/lib/date-picker/types.js +2 -0
- package/lib/feedback/index.d.ts +1 -6
- package/lib/float-button/index.d.ts +4 -26
- package/lib/float-button/view/backtop.d.ts +1 -9
- package/lib/float-button/view/drawer.d.ts +1 -4
- package/lib/float-button/view/float-button.d.ts +1 -9
- package/lib/float-button/view/inner-drawer.d.ts +1 -4
- package/lib/index.d.ts +4 -0
- package/lib/index.js +10 -2
- package/lib/input/index.d.ts +24 -0
- package/lib/input/index.js +35 -0
- package/lib/input/main.scss +5 -0
- package/lib/input/style.d.ts +2 -0
- package/lib/input/style.js +4 -0
- package/lib/input/types.d.ts +518 -0
- package/lib/input/types.js +2 -0
- package/lib/tab/index.d.ts +1 -8
- package/lib/tag/index.d.ts +1 -9
- package/lib/text/index.d.ts +1 -7
- package/lib/time-picker/index.d.ts +23 -0
- package/lib/time-picker/index.js +81 -0
- package/lib/time-picker/main.scss +6 -0
- package/lib/time-picker/style.d.ts +2 -0
- package/lib/time-picker/style.js +4 -0
- package/lib/time-picker/types.d.ts +20 -0
- package/lib/time-picker/types.js +2 -0
- package/lib/utils/dingtalk.d.ts +4 -0
- package/lib/utils/dingtalk.js +60 -0
- package/package.json +39 -1
- package/es/card/main.scss +0 -141
- package/es/core/variables.scss +0 -35
- package/es/feedback/main.scss +0 -45
- package/es/float-button/main.scss +0 -97
- package/es/tab/main.scss +0 -10
- package/es/tag/main.scss +0 -9
- package/es/text/main.scss +0 -19
package/es/button/index.d.ts
CHANGED
|
@@ -20,13 +20,5 @@
|
|
|
20
20
|
import React from 'react';
|
|
21
21
|
import type { ButtonProps } from './types';
|
|
22
22
|
export * from './types';
|
|
23
|
-
declare const _default: {
|
|
24
|
-
new (props: ButtonProps & React.RefAttributes<import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/button").ButtonProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/button/view/button").default>> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, context?: unknown): import("@alifd/next/types/config-provider/types").ConfiguredComponent<ButtonProps & React.RefAttributes<import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/button").ButtonProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/button/view/button").default>> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/button").ButtonProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/button/view/button").default>>;
|
|
25
|
-
contextType?: React.Context<any> | undefined;
|
|
26
|
-
} & {
|
|
27
|
-
displayName: string;
|
|
28
|
-
defaultProps: Partial<ButtonProps & React.RefAttributes<import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/button").ButtonProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/button/view/button").default>>> | undefined;
|
|
29
|
-
propTypes: React.WeakValidationMap<ButtonProps & React.RefAttributes<import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/button").ButtonProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/button/view/button").default>>> | undefined;
|
|
30
|
-
$$typeof: symbol;
|
|
31
|
-
};
|
|
23
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<ButtonProps & React.RefAttributes<import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/button").ButtonProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/button/view/button").default>>, keyof ButtonProps | "key"> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/button").ButtonProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/button/view/button").default>, {}>;
|
|
32
24
|
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @component 日历
|
|
3
|
+
* @en Button
|
|
4
|
+
* @type 通用 - General
|
|
5
|
+
* @remarks 同 Next Button,按钮用于开始一个即时操作。- Same as Next.Button, Button used to trigger an action.
|
|
6
|
+
* @when 标记一个(或封装一组)操作命令,响应用户点击行为,触发相应的业务逻辑。- Buttons are used for emphasizing important functions on your page.
|
|
7
|
+
* @others
|
|
8
|
+
* ## 无障碍键盘操作指南
|
|
9
|
+
* | 按键 | 说明 |
|
|
10
|
+
* | :---- | :---------- |
|
|
11
|
+
* | Enter | 触发 onClick 事件 |
|
|
12
|
+
* | SPACE | 触发 onClick 事件 |
|
|
13
|
+
* @othersEn
|
|
14
|
+
* ## ARIA and KeyBoard
|
|
15
|
+
* | KeyBoard | Description |
|
|
16
|
+
* | :---------- | :------------------------------ |
|
|
17
|
+
* | Enter | Trigger the onClick event |
|
|
18
|
+
* | SPACE | Trigger the onClick event |
|
|
19
|
+
*/
|
|
20
|
+
import React from 'react';
|
|
21
|
+
export * from './types';
|
|
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/button").ButtonProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/button/view/button").default>>, string | number | symbol> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/button").ButtonProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/button/view/button").default>, {}>;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @component 日历
|
|
3
|
+
* @en Button
|
|
4
|
+
* @type 通用 - General
|
|
5
|
+
* @remarks 同 Next Button,按钮用于开始一个即时操作。- Same as Next.Button, Button used to trigger an action.
|
|
6
|
+
* @when 标记一个(或封装一组)操作命令,响应用户点击行为,触发相应的业务逻辑。- Buttons are used for emphasizing important functions on your page.
|
|
7
|
+
* @others
|
|
8
|
+
* ## 无障碍键盘操作指南
|
|
9
|
+
* | 按键 | 说明 |
|
|
10
|
+
* | :---- | :---------- |
|
|
11
|
+
* | Enter | 触发 onClick 事件 |
|
|
12
|
+
* | SPACE | 触发 onClick 事件 |
|
|
13
|
+
* @othersEn
|
|
14
|
+
* ## ARIA and KeyBoard
|
|
15
|
+
* | KeyBoard | Description |
|
|
16
|
+
* | :---------- | :------------------------------ |
|
|
17
|
+
* | Enter | Trigger the onClick event |
|
|
18
|
+
* | SPACE | Trigger the onClick event |
|
|
19
|
+
*/
|
|
20
|
+
import { __rest } from "tslib";
|
|
21
|
+
import React, { forwardRef } from 'react';
|
|
22
|
+
import { Button as NextCalendar, ConfigProvider } from '@alifd/next';
|
|
23
|
+
import cs from 'classnames';
|
|
24
|
+
import { PREFIX_DEFAULT, assignSubComponent } from '../utils';
|
|
25
|
+
const Calendar = forwardRef((_a, ref) => {
|
|
26
|
+
var { className, size = 'small' } = _a, props = __rest(_a, ["className", "size"]);
|
|
27
|
+
return (React.createElement(NextCalendar, Object.assign({}, props, { className: cs(`${PREFIX_DEFAULT}calendar`, className), size: size, ref: ref })));
|
|
28
|
+
});
|
|
29
|
+
const CalendarWithSub = assignSubComponent(Calendar, {
|
|
30
|
+
displayName: 'Calendar',
|
|
31
|
+
});
|
|
32
|
+
export * from './types';
|
|
33
|
+
export default ConfigProvider.config(CalendarWithSub);
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* 按钮类型
|
|
4
|
+
* @api
|
|
5
|
+
*/
|
|
6
|
+
export type ButtonSize = 'small' | 'medium' | 'large';
|
|
7
|
+
/**
|
|
8
|
+
* @api Button.Group
|
|
9
|
+
*/
|
|
10
|
+
export interface GroupProps extends React.HTMLAttributes<HTMLElement> {
|
|
11
|
+
/**
|
|
12
|
+
* 统一设置 Button 组件的按钮大小
|
|
13
|
+
*/
|
|
14
|
+
size?: ButtonSize;
|
|
15
|
+
}
|
|
16
|
+
type HTMLAttributesWeak = Omit<React.ButtonHTMLAttributes<HTMLElement>, 'type' | 'onClick'>;
|
|
17
|
+
/**
|
|
18
|
+
* @api Button
|
|
19
|
+
*/
|
|
20
|
+
export interface ButtonProps extends HTMLAttributesWeak {
|
|
21
|
+
/**
|
|
22
|
+
* 按钮的类型
|
|
23
|
+
* @en Typeo of button
|
|
24
|
+
* @defaultValue 'normal'
|
|
25
|
+
*/
|
|
26
|
+
type?: 'primary' | 'secondary' | 'normal';
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated use `warning` `text` `ghost` insteaded
|
|
29
|
+
* @skip
|
|
30
|
+
*/
|
|
31
|
+
shape?: 'warning' | 'text' | 'ghost';
|
|
32
|
+
/**
|
|
33
|
+
* 按钮的尺寸
|
|
34
|
+
* @en Size of button
|
|
35
|
+
* @defaultValue 'medium'
|
|
36
|
+
*/
|
|
37
|
+
size?: ButtonSize;
|
|
38
|
+
/**
|
|
39
|
+
* 按钮中可配置的 Icon
|
|
40
|
+
* @en Available icons in button
|
|
41
|
+
* @example
|
|
42
|
+
* \{ loading: <Icon type="loading"/> \}
|
|
43
|
+
*/
|
|
44
|
+
icons?: {
|
|
45
|
+
loading?: React.ReactNode;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* 按钮中 Icon 的尺寸
|
|
49
|
+
* @en Size of icon in button
|
|
50
|
+
* @defaultValue 默认根据 size 自动映射,映射规则:
|
|
51
|
+
* size:large -\> `small`
|
|
52
|
+
* size:medium -\> `xs`
|
|
53
|
+
* size:small -\> `xs`
|
|
54
|
+
*/
|
|
55
|
+
iconSize?: number | 'xxs' | 'xs' | 'small' | 'medium' | 'large' | 'xl' | 'xxl' | 'xxxl' | 'inherit';
|
|
56
|
+
/**
|
|
57
|
+
* button 标签的 type 值
|
|
58
|
+
* @en Original html type for button element
|
|
59
|
+
* @defaultValue 'button'
|
|
60
|
+
* @remarks 仅当 component = 'button' 时使用
|
|
61
|
+
*/
|
|
62
|
+
htmlType?: 'submit' | 'reset' | 'button';
|
|
63
|
+
/**
|
|
64
|
+
* 最终渲染的 jsx 标签标签类型
|
|
65
|
+
* @en The jsx tag to be rendered
|
|
66
|
+
* @remarks 直接去掉原先的 ReactNode 类型,因为即使传递了非法类型运行时也会报错,不如在类型提示阶段就将错误抛出
|
|
67
|
+
*/
|
|
68
|
+
component?: 'button' | 'a' | React.ComponentType<unknown>;
|
|
69
|
+
/**
|
|
70
|
+
* 设置按钮的载入状态
|
|
71
|
+
* @en Loading state of a button
|
|
72
|
+
* @defaultValue false
|
|
73
|
+
*/
|
|
74
|
+
loading?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* 是否为幽灵按钮
|
|
77
|
+
* @en Setting ghost button
|
|
78
|
+
* @defaultValue false
|
|
79
|
+
*/
|
|
80
|
+
ghost?: true | false | 'light' | 'dark';
|
|
81
|
+
/**
|
|
82
|
+
* 是否为文本按钮
|
|
83
|
+
* @en Is text button
|
|
84
|
+
* @defaultValue false
|
|
85
|
+
*/
|
|
86
|
+
text?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* 是否为警告按钮
|
|
89
|
+
* @en Is warning button
|
|
90
|
+
* @defaultValue false
|
|
91
|
+
*/
|
|
92
|
+
warning?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* 是否禁用
|
|
95
|
+
* @en Is disabled
|
|
96
|
+
* @defaultValue false
|
|
97
|
+
*/
|
|
98
|
+
disabled?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* 点击按钮的回调
|
|
101
|
+
* @en Callback of click event
|
|
102
|
+
*/
|
|
103
|
+
onClick?: React.MouseEventHandler;
|
|
104
|
+
/**
|
|
105
|
+
* 'a' 标签的 href 属性
|
|
106
|
+
* @remarks 仅在 component = 'a' 时使用
|
|
107
|
+
* @skip
|
|
108
|
+
*/
|
|
109
|
+
href?: string;
|
|
110
|
+
/**
|
|
111
|
+
* 'a' 标签的 target 属性
|
|
112
|
+
* @remarks 仅在 component = 'a' 时使用
|
|
113
|
+
* @skip
|
|
114
|
+
*/
|
|
115
|
+
target?: string;
|
|
116
|
+
/**
|
|
117
|
+
* 'ReactRouterLink' 组件的 to 属性
|
|
118
|
+
* @remarks 仅在 component 支持 to 属性时使用
|
|
119
|
+
* @skip
|
|
120
|
+
*/
|
|
121
|
+
to?: string;
|
|
122
|
+
}
|
|
123
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/card/index.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import Collapsable from './view/collapsable';
|
|
3
|
-
declare const CardWithSub: {
|
|
4
|
-
new (props: import("./types").CardProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, context?: unknown): import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("./types").CardProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, unknown>;
|
|
5
|
-
contextType?: import("react").Context<any> | undefined;
|
|
6
|
-
} & {} & {
|
|
2
|
+
declare const CardWithSub: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<import("./types").CardProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, undefined, {}> & {
|
|
7
3
|
Collapsable: typeof Collapsable;
|
|
8
4
|
};
|
|
9
5
|
export * from './types';
|
package/es/card/view/card.d.ts
CHANGED
|
@@ -2,8 +2,5 @@ import React from 'react';
|
|
|
2
2
|
import type { CardProps } from '../types';
|
|
3
3
|
export declare function useCardInner({ prefix, innerClassName, title, titleAlign, titleLine, footer, footerAlign, footerLine, components, children, }: CardProps): React.JSX.Element;
|
|
4
4
|
export declare function useCardOuter(props: CardProps): React.JSX.Element;
|
|
5
|
-
declare const _default: {
|
|
6
|
-
new (props: CardProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, context?: unknown): import("@alifd/next/types/config-provider/types").ConfiguredComponent<CardProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, unknown>;
|
|
7
|
-
contextType?: React.Context<any> | undefined;
|
|
8
|
-
} & {};
|
|
5
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<CardProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, undefined, {}>;
|
|
9
6
|
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @component 日期选择器
|
|
3
|
+
* @en DatePicker
|
|
4
|
+
* @type 通用 - General
|
|
5
|
+
* @remarks 同 Next DatePicker,按钮用于开始一个即时操作。- Same as Next.Button, Button used to trigger an action.
|
|
6
|
+
* @when 标记一个(或封装一组)操作命令,响应用户点击行为,触发相应的业务逻辑。- Buttons are used for emphasizing important functions on your page.
|
|
7
|
+
* @others
|
|
8
|
+
* ## 无障碍键盘操作指南
|
|
9
|
+
* | 按键 | 说明 |
|
|
10
|
+
* | :---- | :---------- |
|
|
11
|
+
* | Enter | 触发 onClick 事件 |
|
|
12
|
+
* | SPACE | 触发 onClick 事件 |
|
|
13
|
+
* @othersEn
|
|
14
|
+
* ## ARIA and KeyBoard
|
|
15
|
+
* | KeyBoard | Description |
|
|
16
|
+
* | :---------- | :------------------------------ |
|
|
17
|
+
* | Enter | Trigger the onClick event |
|
|
18
|
+
* | SPACE | Trigger the onClick event |
|
|
19
|
+
*/
|
|
20
|
+
import React from 'react';
|
|
21
|
+
import { DatePicker as NextDatePicker } from '@alifd/next';
|
|
22
|
+
export * from './types';
|
|
23
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<Pick<any, string | number | symbol> & React.RefAttributes<NextDatePicker>, string | number | symbol> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, NextDatePicker, {}>;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @component 日期选择器
|
|
3
|
+
* @en DatePicker
|
|
4
|
+
* @type 通用 - General
|
|
5
|
+
* @remarks 同 Next DatePicker,按钮用于开始一个即时操作。- Same as Next.Button, Button used to trigger an action.
|
|
6
|
+
* @when 标记一个(或封装一组)操作命令,响应用户点击行为,触发相应的业务逻辑。- Buttons are used for emphasizing important functions on your page.
|
|
7
|
+
* @others
|
|
8
|
+
* ## 无障碍键盘操作指南
|
|
9
|
+
* | 按键 | 说明 |
|
|
10
|
+
* | :---- | :---------- |
|
|
11
|
+
* | Enter | 触发 onClick 事件 |
|
|
12
|
+
* | SPACE | 触发 onClick 事件 |
|
|
13
|
+
* @othersEn
|
|
14
|
+
* ## ARIA and KeyBoard
|
|
15
|
+
* | KeyBoard | Description |
|
|
16
|
+
* | :---------- | :------------------------------ |
|
|
17
|
+
* | Enter | Trigger the onClick event |
|
|
18
|
+
* | SPACE | Trigger the onClick event |
|
|
19
|
+
*/
|
|
20
|
+
import { __rest } from "tslib";
|
|
21
|
+
import React, { forwardRef } from 'react';
|
|
22
|
+
import { DatePicker as NextDatePicker, ConfigProvider } from '@alifd/next';
|
|
23
|
+
import cs from 'classnames';
|
|
24
|
+
import { PREFIX_DEFAULT, assignSubComponent } from '../utils';
|
|
25
|
+
const DatePicker = forwardRef((_a, ref) => {
|
|
26
|
+
var { className, size = 'small' } = _a, props = __rest(_a, ["className", "size"]);
|
|
27
|
+
return (React.createElement(NextDatePicker, Object.assign({}, props, { className: cs(`${PREFIX_DEFAULT}date-picker`, className), size: size, ref: ref })));
|
|
28
|
+
});
|
|
29
|
+
const DatePickerWithSub = assignSubComponent(DatePicker, {
|
|
30
|
+
displayName: 'DatePicker',
|
|
31
|
+
});
|
|
32
|
+
export * from './types';
|
|
33
|
+
export default ConfigProvider.config(DatePickerWithSub);
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* 按钮类型
|
|
4
|
+
* @api
|
|
5
|
+
*/
|
|
6
|
+
export type ButtonSize = 'small' | 'medium' | 'large';
|
|
7
|
+
/**
|
|
8
|
+
* @api Button.Group
|
|
9
|
+
*/
|
|
10
|
+
export interface GroupProps extends React.HTMLAttributes<HTMLElement> {
|
|
11
|
+
/**
|
|
12
|
+
* 统一设置 Button 组件的按钮大小
|
|
13
|
+
*/
|
|
14
|
+
size?: ButtonSize;
|
|
15
|
+
}
|
|
16
|
+
type HTMLAttributesWeak = Omit<React.ButtonHTMLAttributes<HTMLElement>, 'type' | 'onClick'>;
|
|
17
|
+
/**
|
|
18
|
+
* @api Button
|
|
19
|
+
*/
|
|
20
|
+
export interface ButtonProps extends HTMLAttributesWeak {
|
|
21
|
+
/**
|
|
22
|
+
* 按钮的类型
|
|
23
|
+
* @en Typeo of button
|
|
24
|
+
* @defaultValue 'normal'
|
|
25
|
+
*/
|
|
26
|
+
type?: 'primary' | 'secondary' | 'normal';
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated use `warning` `text` `ghost` insteaded
|
|
29
|
+
* @skip
|
|
30
|
+
*/
|
|
31
|
+
shape?: 'warning' | 'text' | 'ghost';
|
|
32
|
+
/**
|
|
33
|
+
* 按钮的尺寸
|
|
34
|
+
* @en Size of button
|
|
35
|
+
* @defaultValue 'medium'
|
|
36
|
+
*/
|
|
37
|
+
size?: ButtonSize;
|
|
38
|
+
/**
|
|
39
|
+
* 按钮中可配置的 Icon
|
|
40
|
+
* @en Available icons in button
|
|
41
|
+
* @example
|
|
42
|
+
* \{ loading: <Icon type="loading"/> \}
|
|
43
|
+
*/
|
|
44
|
+
icons?: {
|
|
45
|
+
loading?: React.ReactNode;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* 按钮中 Icon 的尺寸
|
|
49
|
+
* @en Size of icon in button
|
|
50
|
+
* @defaultValue 默认根据 size 自动映射,映射规则:
|
|
51
|
+
* size:large -\> `small`
|
|
52
|
+
* size:medium -\> `xs`
|
|
53
|
+
* size:small -\> `xs`
|
|
54
|
+
*/
|
|
55
|
+
iconSize?: number | 'xxs' | 'xs' | 'small' | 'medium' | 'large' | 'xl' | 'xxl' | 'xxxl' | 'inherit';
|
|
56
|
+
/**
|
|
57
|
+
* button 标签的 type 值
|
|
58
|
+
* @en Original html type for button element
|
|
59
|
+
* @defaultValue 'button'
|
|
60
|
+
* @remarks 仅当 component = 'button' 时使用
|
|
61
|
+
*/
|
|
62
|
+
htmlType?: 'submit' | 'reset' | 'button';
|
|
63
|
+
/**
|
|
64
|
+
* 最终渲染的 jsx 标签标签类型
|
|
65
|
+
* @en The jsx tag to be rendered
|
|
66
|
+
* @remarks 直接去掉原先的 ReactNode 类型,因为即使传递了非法类型运行时也会报错,不如在类型提示阶段就将错误抛出
|
|
67
|
+
*/
|
|
68
|
+
component?: 'button' | 'a' | React.ComponentType<unknown>;
|
|
69
|
+
/**
|
|
70
|
+
* 设置按钮的载入状态
|
|
71
|
+
* @en Loading state of a button
|
|
72
|
+
* @defaultValue false
|
|
73
|
+
*/
|
|
74
|
+
loading?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* 是否为幽灵按钮
|
|
77
|
+
* @en Setting ghost button
|
|
78
|
+
* @defaultValue false
|
|
79
|
+
*/
|
|
80
|
+
ghost?: true | false | 'light' | 'dark';
|
|
81
|
+
/**
|
|
82
|
+
* 是否为文本按钮
|
|
83
|
+
* @en Is text button
|
|
84
|
+
* @defaultValue false
|
|
85
|
+
*/
|
|
86
|
+
text?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* 是否为警告按钮
|
|
89
|
+
* @en Is warning button
|
|
90
|
+
* @defaultValue false
|
|
91
|
+
*/
|
|
92
|
+
warning?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* 是否禁用
|
|
95
|
+
* @en Is disabled
|
|
96
|
+
* @defaultValue false
|
|
97
|
+
*/
|
|
98
|
+
disabled?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* 点击按钮的回调
|
|
101
|
+
* @en Callback of click event
|
|
102
|
+
*/
|
|
103
|
+
onClick?: React.MouseEventHandler;
|
|
104
|
+
/**
|
|
105
|
+
* 'a' 标签的 href 属性
|
|
106
|
+
* @remarks 仅在 component = 'a' 时使用
|
|
107
|
+
* @skip
|
|
108
|
+
*/
|
|
109
|
+
href?: string;
|
|
110
|
+
/**
|
|
111
|
+
* 'a' 标签的 target 属性
|
|
112
|
+
* @remarks 仅在 component = 'a' 时使用
|
|
113
|
+
* @skip
|
|
114
|
+
*/
|
|
115
|
+
target?: string;
|
|
116
|
+
/**
|
|
117
|
+
* 'ReactRouterLink' 组件的 to 属性
|
|
118
|
+
* @remarks 仅在 component 支持 to 属性时使用
|
|
119
|
+
* @skip
|
|
120
|
+
*/
|
|
121
|
+
to?: string;
|
|
122
|
+
}
|
|
123
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/feedback/index.d.ts
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { FeedbackProps } from './types';
|
|
3
2
|
import Good from './view/good';
|
|
4
3
|
export * from './types';
|
|
5
|
-
declare const _default: {
|
|
6
|
-
new (props: FeedbackProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, context?: unknown): import("@alifd/next/types/config-provider/types").ConfiguredComponent<FeedbackProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, unknown>;
|
|
7
|
-
contextType?: React.Context<any> | undefined;
|
|
8
|
-
} & {
|
|
9
|
-
displayName: string;
|
|
4
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<FeedbackProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, undefined, {}> & {
|
|
10
5
|
Good: typeof Good;
|
|
11
6
|
};
|
|
12
7
|
export default _default;
|
|
@@ -1,30 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare const FloatButtonWithSub: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
displayName: string | undefined;
|
|
7
|
-
defaultProps: Partial<import("./types").FloatButtonProps & import("react").RefAttributes<import("./types").FloatButtonRef>> | undefined;
|
|
8
|
-
propTypes: import("react").WeakValidationMap<import("./types").FloatButtonProps & import("react").RefAttributes<import("./types").FloatButtonRef>> | undefined;
|
|
9
|
-
$$typeof: symbol;
|
|
10
|
-
} & {
|
|
11
|
-
Backtop: {
|
|
12
|
-
new (props: import("./types").BacktopProps & import("react").RefAttributes<import("./types").BacktopRef> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, context?: unknown): import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("./types").BacktopProps & import("react").RefAttributes<import("./types").BacktopRef> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("./types").BacktopRef>;
|
|
13
|
-
contextType?: import("react").Context<any> | undefined;
|
|
14
|
-
} & {
|
|
15
|
-
displayName: string | undefined;
|
|
16
|
-
defaultProps: Partial<import("./types").BacktopProps & import("react").RefAttributes<import("./types").BacktopRef>> | undefined;
|
|
17
|
-
propTypes: import("react").WeakValidationMap<import("./types").BacktopProps & import("react").RefAttributes<import("./types").BacktopRef>> | undefined;
|
|
18
|
-
$$typeof: symbol;
|
|
19
|
-
};
|
|
20
|
-
Drawer: {
|
|
21
|
-
new (props: import("./types").FloatButtonDrawerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, context?: unknown): import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("./types").FloatButtonDrawerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, unknown>;
|
|
22
|
-
contextType?: import("react").Context<any> | undefined;
|
|
23
|
-
} & {};
|
|
24
|
-
InnerDrawer: {
|
|
25
|
-
new (props: import("./types").FloatButtonInnerDrawerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, context?: unknown): import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("./types").FloatButtonInnerDrawerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, unknown>;
|
|
26
|
-
contextType?: import("react").Context<any> | undefined;
|
|
27
|
-
} & {};
|
|
2
|
+
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
|
+
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
|
+
Drawer: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<import("./types").FloatButtonDrawerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, undefined, {}>;
|
|
5
|
+
InnerDrawer: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<import("./types").FloatButtonInnerDrawerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, undefined, {}>;
|
|
28
6
|
};
|
|
29
7
|
export type { BacktopRef, BacktopProps, FloatButtonRef, FloatButtonProps, FloatButtonDrawerProps, FloatButtonInnerDrawerProps, Edge, Margin, Position, RequiredParts, ScreenRatioPosition, Size, TriggerType, } from './types';
|
|
30
8
|
export default FloatButtonWithSub;
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { BacktopProps, BacktopRef } from '../types';
|
|
3
|
-
declare const _default: {
|
|
4
|
-
new (props: BacktopProps & React.RefAttributes<BacktopRef> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, context?: unknown): import("@alifd/next/types/config-provider/types").ConfiguredComponent<BacktopProps & React.RefAttributes<BacktopRef> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, BacktopRef>;
|
|
5
|
-
contextType?: React.Context<any> | undefined;
|
|
6
|
-
} & {
|
|
7
|
-
displayName: string | undefined;
|
|
8
|
-
defaultProps: Partial<BacktopProps & React.RefAttributes<BacktopRef>> | undefined;
|
|
9
|
-
propTypes: React.WeakValidationMap<BacktopProps & React.RefAttributes<BacktopRef>> | undefined;
|
|
10
|
-
$$typeof: symbol;
|
|
11
|
-
};
|
|
3
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<BacktopProps & React.RefAttributes<BacktopRef>, "key" | keyof BacktopProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, BacktopRef, {}>;
|
|
12
4
|
export default _default;
|
|
@@ -6,8 +6,5 @@ export interface DrawerProps extends Omit<NextDrawerProps, 'triggerType' | 'cont
|
|
|
6
6
|
triggerType?: TriggerType | TriggerType[];
|
|
7
7
|
}
|
|
8
8
|
export declare function Drawer({ prefix, children, trigger, triggerType, visible, onVisibleChange, ...rests }: DrawerProps): React.JSX.Element;
|
|
9
|
-
declare const _default: {
|
|
10
|
-
new (props: FloatButtonDrawerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, context?: unknown): import("@alifd/next/types/config-provider/types").ConfiguredComponent<FloatButtonDrawerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, unknown>;
|
|
11
|
-
contextType?: React.Context<any> | undefined;
|
|
12
|
-
} & {};
|
|
9
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<FloatButtonDrawerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, undefined, {}>;
|
|
13
10
|
export default _default;
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { FloatButtonProps, FloatButtonRef } from '../types';
|
|
3
|
-
declare const _default: {
|
|
4
|
-
new (props: FloatButtonProps & React.RefAttributes<FloatButtonRef> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, context?: unknown): import("@alifd/next/types/config-provider/types").ConfiguredComponent<FloatButtonProps & React.RefAttributes<FloatButtonRef> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, FloatButtonRef>;
|
|
5
|
-
contextType?: React.Context<any> | undefined;
|
|
6
|
-
} & {
|
|
7
|
-
displayName: string | undefined;
|
|
8
|
-
defaultProps: Partial<FloatButtonProps & React.RefAttributes<FloatButtonRef>> | undefined;
|
|
9
|
-
propTypes: React.WeakValidationMap<FloatButtonProps & React.RefAttributes<FloatButtonRef>> | undefined;
|
|
10
|
-
$$typeof: symbol;
|
|
11
|
-
};
|
|
3
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<FloatButtonProps & React.RefAttributes<FloatButtonRef>, "key" | keyof FloatButtonProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, FloatButtonRef, {}>;
|
|
12
4
|
export default _default;
|
|
@@ -19,8 +19,5 @@ export interface InnerDrawerProps {
|
|
|
19
19
|
afterClose?: () => void;
|
|
20
20
|
}
|
|
21
21
|
export declare function InnerDrawer({ className, prefix, target, children, trigger, triggerType, visible, onVisibleChange, closable, title, cache, width, beforeOpen, beforeClose, afterOpen, afterClose, }: InnerDrawerProps): React.JSX.Element;
|
|
22
|
-
declare const _default: {
|
|
23
|
-
new (props: FloatButtonInnerDrawerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, context?: unknown): import("@alifd/next/types/config-provider/types").ConfiguredComponent<FloatButtonInnerDrawerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, unknown>;
|
|
24
|
-
contextType?: React.Context<any> | undefined;
|
|
25
|
-
} & {};
|
|
22
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<FloatButtonInnerDrawerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, undefined, {}>;
|
|
26
23
|
export default _default;
|
package/es/index.d.ts
CHANGED
|
@@ -5,4 +5,9 @@ export { default as FloatButton } from './float-button';
|
|
|
5
5
|
export { default as Text } from './text';
|
|
6
6
|
export { default as Tag } from './tag';
|
|
7
7
|
export { default as Tab } from './tab';
|
|
8
|
+
export { default as Input } from './input';
|
|
9
|
+
export { default as DatePicker } from './date-picker';
|
|
10
|
+
export { default as TimePicker } from './time-picker';
|
|
11
|
+
export { default as PersonPicker } from './person-picker';
|
|
12
|
+
export { default as Calendar } from './calendar';
|
|
8
13
|
export declare const version: string;
|
package/es/index.js
CHANGED
|
@@ -5,4 +5,9 @@ export { default as FloatButton } from './float-button';
|
|
|
5
5
|
export { default as Text } from './text';
|
|
6
6
|
export { default as Tag } from './tag';
|
|
7
7
|
export { default as Tab } from './tab';
|
|
8
|
-
export
|
|
8
|
+
export { default as Input } from './input';
|
|
9
|
+
export { default as DatePicker } from './date-picker';
|
|
10
|
+
export { default as TimePicker } from './time-picker';
|
|
11
|
+
export { default as PersonPicker } from './person-picker';
|
|
12
|
+
export { default as Calendar } from './calendar';
|
|
13
|
+
export const version = __CHAT_VERSION__;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @component 输入框
|
|
3
|
+
* @en Input
|
|
4
|
+
* @type 通用 - General
|
|
5
|
+
* @remarks 同 Next Input,按钮用于开始一个即时操作。- Same as Next.Input, Input used to trigger an action.
|
|
6
|
+
* @when 标记一个(或封装一组)操作命令,响应用户点击行为,触发相应的业务逻辑。- Inputs are used for emphasizing important functions on your page.
|
|
7
|
+
* @others
|
|
8
|
+
* ## 无障碍键盘操作指南
|
|
9
|
+
* | 按键 | 说明 |
|
|
10
|
+
* | :---- | :---------- |
|
|
11
|
+
* | Enter | 触发 onClick 事件 |
|
|
12
|
+
* | SPACE | 触发 onClick 事件 |
|
|
13
|
+
* @othersEn
|
|
14
|
+
* ## ARIA and KeyBoard
|
|
15
|
+
* | KeyBoard | Description |
|
|
16
|
+
* | :---------- | :------------------------------ |
|
|
17
|
+
* | Enter | Trigger the onClick event |
|
|
18
|
+
* | SPACE | Trigger the onClick event |
|
|
19
|
+
*/
|
|
20
|
+
import React from 'react';
|
|
21
|
+
import { Input as NextInput } from '@alifd/next';
|
|
22
|
+
export * from './types';
|
|
23
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<Pick<any, string | number | symbol> & React.RefAttributes<NextInput>, string | number | symbol> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, NextInput, {}>;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @component 输入框
|
|
3
|
+
* @en Input
|
|
4
|
+
* @type 通用 - General
|
|
5
|
+
* @remarks 同 Next Input,按钮用于开始一个即时操作。- Same as Next.Input, Input used to trigger an action.
|
|
6
|
+
* @when 标记一个(或封装一组)操作命令,响应用户点击行为,触发相应的业务逻辑。- Inputs are used for emphasizing important functions on your page.
|
|
7
|
+
* @others
|
|
8
|
+
* ## 无障碍键盘操作指南
|
|
9
|
+
* | 按键 | 说明 |
|
|
10
|
+
* | :---- | :---------- |
|
|
11
|
+
* | Enter | 触发 onClick 事件 |
|
|
12
|
+
* | SPACE | 触发 onClick 事件 |
|
|
13
|
+
* @othersEn
|
|
14
|
+
* ## ARIA and KeyBoard
|
|
15
|
+
* | KeyBoard | Description |
|
|
16
|
+
* | :---------- | :------------------------------ |
|
|
17
|
+
* | Enter | Trigger the onClick event |
|
|
18
|
+
* | SPACE | Trigger the onClick event |
|
|
19
|
+
*/
|
|
20
|
+
import { __rest } from "tslib";
|
|
21
|
+
import React, { forwardRef } from 'react';
|
|
22
|
+
import { Input as NextInput, ConfigProvider } from '@alifd/next';
|
|
23
|
+
import cs from 'classnames';
|
|
24
|
+
import { PREFIX_DEFAULT, assignSubComponent } from '../utils';
|
|
25
|
+
const Input = forwardRef((_a, ref) => {
|
|
26
|
+
var { className, size = 'small' } = _a, props = __rest(_a, ["className", "size"]);
|
|
27
|
+
return (React.createElement(NextInput, Object.assign({}, props, { className: cs(`${PREFIX_DEFAULT}input`, className), size: size, ref: ref })));
|
|
28
|
+
});
|
|
29
|
+
const InputWithSub = assignSubComponent(Input, {
|
|
30
|
+
displayName: 'Input',
|
|
31
|
+
});
|
|
32
|
+
export * from './types';
|
|
33
|
+
export default ConfigProvider.config(InputWithSub);
|