@alifd/chat 0.1.12-beta.0 → 0.1.13-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/{lib/calendar → es/button}/main.scss +1 -1
- package/es/card/main.scss +141 -0
- package/es/card/view/collapsable.d.ts +1 -1
- package/es/core/variables.scss +35 -0
- package/es/feedback/main.scss +45 -0
- package/es/float-button/main.scss +97 -0
- package/es/index.d.ts +1 -5
- package/es/index.js +2 -6
- package/es/message/index.d.ts +22 -0
- package/es/message/index.js +30 -0
- package/{lib/date-picker → es/message}/main.scss +0 -4
- package/es/message/style.d.ts +2 -0
- package/es/message/style.js +2 -0
- package/es/message/types.d.ts +195 -0
- package/es/tab/main.scss +10 -0
- package/es/tag/index.d.ts +1769 -2
- package/es/tag/index.js +2 -2
- package/es/tag/main.scss +9 -0
- package/es/text/main.scss +19 -0
- package/lib/card/view/collapsable.d.ts +1 -1
- package/lib/index.d.ts +1 -4
- package/lib/index.js +4 -10
- package/lib/message/index.d.ts +22 -0
- package/lib/message/index.js +32 -0
- package/lib/{time-picker → message}/main.scss +0 -4
- package/lib/message/style.d.ts +2 -0
- package/lib/{input → message}/style.js +1 -1
- package/lib/message/types.d.ts +195 -0
- package/lib/tag/index.d.ts +1769 -2
- package/lib/tag/index.js +2 -2
- package/package.json +13 -39
- package/es/calendar/index.d.ts +0 -23
- package/es/calendar/index.js +0 -33
- package/es/calendar/style.d.ts +0 -2
- package/es/calendar/style.js +0 -2
- package/es/calendar/types.d.ts +0 -123
- package/es/date-picker/index.d.ts +0 -24
- package/es/date-picker/index.js +0 -33
- package/es/date-picker/style.d.ts +0 -3
- package/es/date-picker/style.js +0 -3
- package/es/date-picker/types.d.ts +0 -123
- package/es/date-picker/types.js +0 -1
- package/es/input/index.d.ts +0 -24
- package/es/input/index.js +0 -33
- package/es/input/style.d.ts +0 -2
- package/es/input/style.js +0 -2
- package/es/input/types.d.ts +0 -518
- package/es/input/types.js +0 -1
- package/es/person-picker/index.d.ts +0 -24
- package/es/person-picker/index.js +0 -66
- package/es/person-picker/style.d.ts +0 -2
- package/es/person-picker/style.js +0 -2
- package/es/person-picker/types.d.ts +0 -20
- package/es/person-picker/types.js +0 -1
- package/es/time-picker/index.d.ts +0 -23
- package/es/time-picker/index.js +0 -79
- package/es/time-picker/style.d.ts +0 -2
- package/es/time-picker/style.js +0 -2
- package/es/time-picker/types.d.ts +0 -20
- package/es/time-picker/types.js +0 -1
- package/es/utils/dingtalk.d.ts +0 -4
- package/es/utils/dingtalk.js +0 -53
- package/lib/calendar/index.d.ts +0 -23
- package/lib/calendar/index.js +0 -35
- package/lib/calendar/style.d.ts +0 -2
- package/lib/calendar/style.js +0 -4
- package/lib/calendar/types.d.ts +0 -123
- package/lib/date-picker/index.d.ts +0 -24
- package/lib/date-picker/index.js +0 -35
- package/lib/date-picker/style.d.ts +0 -3
- package/lib/date-picker/style.js +0 -5
- package/lib/date-picker/types.d.ts +0 -123
- package/lib/date-picker/types.js +0 -2
- package/lib/input/index.d.ts +0 -24
- package/lib/input/index.js +0 -35
- package/lib/input/main.scss +0 -5
- package/lib/input/style.d.ts +0 -2
- package/lib/input/types.d.ts +0 -518
- package/lib/input/types.js +0 -2
- package/lib/time-picker/index.d.ts +0 -23
- package/lib/time-picker/index.js +0 -81
- package/lib/time-picker/style.d.ts +0 -2
- package/lib/time-picker/style.js +0 -4
- package/lib/time-picker/types.d.ts +0 -20
- package/lib/time-picker/types.js +0 -2
- package/lib/utils/dingtalk.d.ts +0 -4
- package/lib/utils/dingtalk.js +0 -60
- /package/es/{calendar → message}/types.js +0 -0
- /package/lib/{calendar → message}/types.js +0 -0
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'
|
|
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
|
|
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.
|
|
3
|
+
"version": "0.1.13-beta.0",
|
|
4
4
|
"description": "A configurable component library for chat built on React.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -118,45 +118,21 @@
|
|
|
118
118
|
"import": "./es/text/style.js",
|
|
119
119
|
"require": "./lib/text/style.js"
|
|
120
120
|
},
|
|
121
|
-
"./input": {
|
|
122
|
-
"import": "./es/input/index.js",
|
|
123
|
-
"require": "./lib/input/index.js"
|
|
124
|
-
},
|
|
125
|
-
"./input/style": {
|
|
126
|
-
"import": "./es/input/style.js",
|
|
127
|
-
"require": "./lib/input/style.js"
|
|
128
|
-
},
|
|
129
|
-
"./input/style.js": {
|
|
130
|
-
"import": "./es/input/style.js",
|
|
131
|
-
"require": "./lib/input/style.js"
|
|
132
|
-
},
|
|
133
|
-
"./date-picker": {
|
|
134
|
-
"import": "./es/date-picker/index.js",
|
|
135
|
-
"require": "./lib/date-picker/index.js"
|
|
136
|
-
},
|
|
137
|
-
"./date-picker/style": {
|
|
138
|
-
"import": "./es/date-picker/style.js",
|
|
139
|
-
"require": "./lib/date-picker/style.js"
|
|
140
|
-
},
|
|
141
|
-
"./date-picker/style.js": {
|
|
142
|
-
"import": "./es/date-picker/style.js",
|
|
143
|
-
"require": "./lib/date-picker/style.js"
|
|
144
|
-
},
|
|
145
|
-
"./time-picker": {
|
|
146
|
-
"import": "./es/time-picker/index.js",
|
|
147
|
-
"require": "./lib/time-picker/index.js"
|
|
148
|
-
},
|
|
149
|
-
"./time-picker/style": {
|
|
150
|
-
"import": "./es/time-picker/style.js",
|
|
151
|
-
"require": "./lib/time-picker/style.js"
|
|
152
|
-
},
|
|
153
|
-
"./time-picker/style.js": {
|
|
154
|
-
"import": "./es/time-picker/style.js",
|
|
155
|
-
"require": "./lib/time-picker/style.js"
|
|
156
|
-
},
|
|
157
121
|
"./utils": {
|
|
158
122
|
"import": "./es/utils/index.js",
|
|
159
123
|
"require": "./lib/utils/index.js"
|
|
124
|
+
},
|
|
125
|
+
"./message": {
|
|
126
|
+
"import": "./es/message/index.js",
|
|
127
|
+
"require": "./lib/message/index.js"
|
|
128
|
+
},
|
|
129
|
+
"./message/style": {
|
|
130
|
+
"import": "./es/message/style.js",
|
|
131
|
+
"require": "./lib/message/style.js"
|
|
132
|
+
},
|
|
133
|
+
"./message/style.js": {
|
|
134
|
+
"import": "./es/message/style.js",
|
|
135
|
+
"require": "./lib/message/style.js"
|
|
160
136
|
}
|
|
161
137
|
},
|
|
162
138
|
"files": [
|
|
@@ -225,8 +201,6 @@
|
|
|
225
201
|
"react-dom": ">=16.0.0"
|
|
226
202
|
},
|
|
227
203
|
"dependencies": {
|
|
228
|
-
"@ali/dingtalk-jsapi": "^3.0.33",
|
|
229
|
-
"dingtalk-jsapi": "^3.0.33",
|
|
230
204
|
"hoist-non-react-statics": "^3.3.2",
|
|
231
205
|
"tslib": "^2.6.2"
|
|
232
206
|
},
|
package/es/calendar/index.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
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;
|
package/es/calendar/index.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
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);
|
package/es/calendar/style.d.ts
DELETED
package/es/calendar/style.js
DELETED
package/es/calendar/types.d.ts
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,24 +0,0 @@
|
|
|
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;
|
package/es/date-picker/index.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
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);
|
package/es/date-picker/style.js
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
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 {};
|
package/es/date-picker/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/es/input/index.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
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;
|
package/es/input/index.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
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);
|
package/es/input/style.d.ts
DELETED
package/es/input/style.js
DELETED