@alifd/chat 0.1.15-beta.0 → 0.1.15-beta.2
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/core/variables.scss +35 -0
- package/es/date-picker/index.d.ts +2 -2
- package/es/date-picker/index.js +2 -2
- package/es/date-picker/main.scss +6 -0
- package/es/date-picker/style.d.ts +1 -3
- package/es/date-picker/style.js +1 -3
- package/es/feedback/main.scss +45 -0
- package/es/float-button/main.scss +97 -0
- package/es/index.d.ts +0 -1
- package/es/index.js +1 -2
- package/es/input/main.scss +5 -0
- package/es/input/style.d.ts +0 -1
- package/es/input/style.js +0 -1
- package/es/person-picker/index.js +5 -31
- package/es/person-picker/main.scss +5 -0
- package/es/person-picker/style.d.ts +0 -1
- package/es/person-picker/style.js +0 -1
- package/es/tab/main.scss +10 -0
- package/es/tag/main.scss +9 -0
- package/es/text/main.scss +19 -0
- package/es/time-picker/index.js +3 -3
- package/es/time-picker/main.scss +6 -0
- package/es/time-picker/style.d.ts +1 -2
- package/es/time-picker/style.js +1 -2
- package/lib/date-picker/index.d.ts +2 -2
- package/lib/date-picker/index.js +1 -1
- package/lib/date-picker/main.scss +1 -1
- package/lib/date-picker/style.d.ts +1 -3
- package/lib/date-picker/style.js +1 -3
- package/lib/index.d.ts +1 -1
- package/lib/index.js +4 -4
- package/lib/input/style.d.ts +0 -1
- package/lib/input/style.js +0 -1
- package/{es/calendar → lib/person-picker}/index.d.ts +4 -3
- package/lib/person-picker/index.js +42 -0
- package/lib/person-picker/main.scss +5 -0
- package/lib/person-picker/style.d.ts +1 -0
- package/lib/{calendar → person-picker}/style.js +1 -2
- package/lib/person-picker/types.d.ts +20 -0
- package/lib/time-picker/index.js +2 -2
- package/lib/time-picker/main.scss +1 -1
- package/lib/time-picker/style.d.ts +1 -2
- package/lib/time-picker/style.js +1 -2
- package/package.json +15 -1
- 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/calendar/types.js +0 -1
- 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/types.d.ts +0 -123
- /package/lib/{calendar → person-picker}/types.js +0 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
@import '../core/variables.scss';
|
|
2
|
+
|
|
3
|
+
@mixin size($shadow, $corner, $padding, $fontSize, $headFontSize) {
|
|
4
|
+
$verPadding: $padding * 0.5;
|
|
5
|
+
box-shadow: $shadow;
|
|
6
|
+
border-radius: $corner;
|
|
7
|
+
font-size: $fontSize;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
|
|
10
|
+
.#{$prefix}card {
|
|
11
|
+
&-header {
|
|
12
|
+
font-size: $headFontSize;
|
|
13
|
+
&-title {
|
|
14
|
+
padding: $verPadding $padding;
|
|
15
|
+
}
|
|
16
|
+
&-extras {
|
|
17
|
+
padding: $verPadding $padding $verPadding 0;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
&-content {
|
|
21
|
+
padding: 0 $padding;
|
|
22
|
+
|
|
23
|
+
&--gap-top {
|
|
24
|
+
margin-top: $verPadding;
|
|
25
|
+
}
|
|
26
|
+
&--gap-bottom {
|
|
27
|
+
margin-bottom: $verPadding;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
&-footer {
|
|
31
|
+
padding: $verPadding $padding;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.#{$prefix}card {
|
|
37
|
+
color: $color-text1-3;
|
|
38
|
+
|
|
39
|
+
&-inner {
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
background-color: #fff;
|
|
43
|
+
@include size(
|
|
44
|
+
$shadow-2,
|
|
45
|
+
$size-base * 3,
|
|
46
|
+
$size-base * 4,
|
|
47
|
+
$font-size-body-1,
|
|
48
|
+
$font-size-subhead
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
&-header {
|
|
52
|
+
flex: none;
|
|
53
|
+
display: flex;
|
|
54
|
+
|
|
55
|
+
&-title {
|
|
56
|
+
font-weight: 500;
|
|
57
|
+
flex: 1;
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
text-overflow: ellipsis;
|
|
60
|
+
white-space: nowrap;
|
|
61
|
+
word-break: break-all;
|
|
62
|
+
}
|
|
63
|
+
&-extras {
|
|
64
|
+
flex: none;
|
|
65
|
+
}
|
|
66
|
+
&--line {
|
|
67
|
+
border-bottom: 1px solid $color-line1-0;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
&-footer {
|
|
71
|
+
flex: none;
|
|
72
|
+
|
|
73
|
+
&--line {
|
|
74
|
+
border-top: 1px solid $color-line1-0;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&--medium {
|
|
79
|
+
.#{$prefix}card-inner {
|
|
80
|
+
@include size(
|
|
81
|
+
$shadow-2,
|
|
82
|
+
$size-base * 3,
|
|
83
|
+
$size-base * 4,
|
|
84
|
+
$font-size-body-1,
|
|
85
|
+
$font-size-subhead
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
&.#{$prefix}card--no-padding {
|
|
90
|
+
.#{$prefix}card {
|
|
91
|
+
&-header,
|
|
92
|
+
&-content,
|
|
93
|
+
&-footer {
|
|
94
|
+
padding: 0;
|
|
95
|
+
margin: 0;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@keyframes fade-in {
|
|
101
|
+
0% {
|
|
102
|
+
opacity: 0;
|
|
103
|
+
}
|
|
104
|
+
100% {
|
|
105
|
+
opacity: 1;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&-collapsable {
|
|
110
|
+
&-inner {
|
|
111
|
+
}
|
|
112
|
+
&-inner--popup {
|
|
113
|
+
position: absolute;
|
|
114
|
+
left: 0;
|
|
115
|
+
top: 0;
|
|
116
|
+
width: 100%;
|
|
117
|
+
height: auto;
|
|
118
|
+
z-index: 999;
|
|
119
|
+
opacity: 0;
|
|
120
|
+
animation-timing-function: ease-out;
|
|
121
|
+
animation-duration: 0.3s;
|
|
122
|
+
animation-name: fade-in;
|
|
123
|
+
animation-iteration-count: 1;
|
|
124
|
+
animation-fill-mode: forwards;
|
|
125
|
+
}
|
|
126
|
+
&--visible {
|
|
127
|
+
position: relative;
|
|
128
|
+
.#{$prefix}card-collapsable-inner {
|
|
129
|
+
transition: opacity 0.5s ease-in;
|
|
130
|
+
opacity: 0;
|
|
131
|
+
pointer-events: none;
|
|
132
|
+
|
|
133
|
+
&--popup {
|
|
134
|
+
transition: none;
|
|
135
|
+
opacity: 1;
|
|
136
|
+
pointer-events: all;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
$prefix: 'ct-' !default;
|
|
2
|
+
|
|
3
|
+
$color-brand1-6: var(--color-brand1-6, #5584ff) !default;
|
|
4
|
+
$size-base: 4px !default;
|
|
5
|
+
$shadow-1: 1px 1px 4px 0px rgba(0, 0, 0, 0.16) !default;
|
|
6
|
+
$shadow-2: 2px 4px 16px 0px rgba(0, 0, 0, 0.12) !default;
|
|
7
|
+
|
|
8
|
+
$font-size-headline: var(--font-size-headline, 24px) !default;
|
|
9
|
+
$font-size-title: var(--font-size-title, 20px) !default;
|
|
10
|
+
$font-size-subhead: var(--font-size-subhead, 16px) !default;
|
|
11
|
+
$font-size-body-2: var(--font-size-body-2, 14px) !default;
|
|
12
|
+
$font-size-body-1: var(--font-size-body-1, 14px) !default;
|
|
13
|
+
$font-size-caption: var(--font-size-caption, 12px) !default;
|
|
14
|
+
|
|
15
|
+
/// 禁用
|
|
16
|
+
$color-text1-1: var(--color-text1-1, #cccccc) !default;
|
|
17
|
+
/// 水印/提示
|
|
18
|
+
$color-text1-2: var(--color-text1-2, #999999) !default;
|
|
19
|
+
/// 正文/标题
|
|
20
|
+
$color-text1-3: var(--color-text1-3, #666666) !default;
|
|
21
|
+
/// 正文/标题
|
|
22
|
+
$color-text1-4: var(--color-text1-4, #333333) !default;
|
|
23
|
+
|
|
24
|
+
/// 很浅
|
|
25
|
+
$color-line1-0: var(--color-line1-0, #f1f3f6) !default;
|
|
26
|
+
/// 浅
|
|
27
|
+
$color-line1-1: var(--color-line1-1, #e6e7eb) !default;
|
|
28
|
+
/// 常规
|
|
29
|
+
$color-line1-2: var(--color-line1-2, #dcdee3) !default;
|
|
30
|
+
/// 深
|
|
31
|
+
$color-line1-3: var(--color-line1-3, #c4c6cf) !default;
|
|
32
|
+
/// 重
|
|
33
|
+
$color-line1-4: var(--color-line1-4, #a0a2ad) !default;
|
|
34
|
+
|
|
35
|
+
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* | SPACE | Trigger the onClick event |
|
|
19
19
|
*/
|
|
20
20
|
import React from 'react';
|
|
21
|
-
import {
|
|
21
|
+
import { DatePicker2 as NextDatePicker2 } from '@alifd/next';
|
|
22
22
|
export * from './types';
|
|
23
|
-
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<Pick<any, string | number | symbol> & React.RefAttributes<
|
|
23
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<Pick<any, string | number | symbol> & React.RefAttributes<NextDatePicker2>, string | number | symbol> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, NextDatePicker2, {}>;
|
|
24
24
|
export default _default;
|
package/es/date-picker/index.js
CHANGED
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import { __rest } from "tslib";
|
|
21
21
|
import React, { forwardRef } from 'react';
|
|
22
|
-
import {
|
|
22
|
+
import { DatePicker2 as NextDatePicker2, ConfigProvider } from '@alifd/next';
|
|
23
23
|
import cs from 'classnames';
|
|
24
24
|
import { PREFIX_DEFAULT, assignSubComponent } from '../utils';
|
|
25
25
|
const DatePicker = forwardRef((_a, ref) => {
|
|
26
26
|
var { className, size = 'small' } = _a, props = __rest(_a, ["className", "size"]);
|
|
27
|
-
return (React.createElement(
|
|
27
|
+
return (React.createElement(NextDatePicker2, Object.assign({}, props, { className: cs(`${PREFIX_DEFAULT}date-picker2`, className), size: size, ref: ref })));
|
|
28
28
|
});
|
|
29
29
|
const DatePickerWithSub = assignSubComponent(DatePicker, {
|
|
30
30
|
displayName: 'DatePicker',
|
package/es/date-picker/style.js
CHANGED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
@import '../core/variables.scss';
|
|
2
|
+
|
|
3
|
+
.#{$prefix}feedback {
|
|
4
|
+
display: inline-block;
|
|
5
|
+
|
|
6
|
+
&-inner {
|
|
7
|
+
padding: 0 4px;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: row;
|
|
10
|
+
button:first-child {
|
|
11
|
+
margin-right: 16px;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
&-item {
|
|
15
|
+
background-color: transparent;
|
|
16
|
+
outline: 0;
|
|
17
|
+
border: 0;
|
|
18
|
+
display: inline-flex;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
align-items: center;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
color: $color-line1-3;
|
|
23
|
+
font-size: inherit;
|
|
24
|
+
padding: 0px;
|
|
25
|
+
transition:
|
|
26
|
+
color 0.15s,
|
|
27
|
+
opacity 0.15s;
|
|
28
|
+
|
|
29
|
+
&--active {
|
|
30
|
+
color: $color-brand1-6;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&:hover {
|
|
34
|
+
opacity: 0.8;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&-icon {
|
|
38
|
+
line-height: 1;
|
|
39
|
+
|
|
40
|
+
&--bad {
|
|
41
|
+
transform: rotateX(180deg);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
@import '../core/variables.scss';
|
|
2
|
+
|
|
3
|
+
.#{$prefix}float-button {
|
|
4
|
+
position: fixed;
|
|
5
|
+
z-index: 1001;
|
|
6
|
+
|
|
7
|
+
&-backtop {
|
|
8
|
+
transition:
|
|
9
|
+
opacity 0.2s,
|
|
10
|
+
transform 0.2s;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
|
|
13
|
+
&--hidden {
|
|
14
|
+
opacity: 0;
|
|
15
|
+
transform: scale(0);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&-inner-drawer {
|
|
20
|
+
flex: 1;
|
|
21
|
+
overflow: hidden;
|
|
22
|
+
box-shadow: $shadow-2;
|
|
23
|
+
border-radius: $size-base * 2;
|
|
24
|
+
|
|
25
|
+
&-outer {
|
|
26
|
+
display: flex;
|
|
27
|
+
}
|
|
28
|
+
&-inner-start {
|
|
29
|
+
flex: 1;
|
|
30
|
+
}
|
|
31
|
+
&-inner-end {
|
|
32
|
+
flex: none;
|
|
33
|
+
transition:
|
|
34
|
+
width 0.3s,
|
|
35
|
+
opacity 0.3s;
|
|
36
|
+
display: flex;
|
|
37
|
+
width: 0;
|
|
38
|
+
opacity: 0;
|
|
39
|
+
}
|
|
40
|
+
&-inner {
|
|
41
|
+
width: 100%;
|
|
42
|
+
height: 100%;
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
position: relative;
|
|
46
|
+
|
|
47
|
+
&--has-title {
|
|
48
|
+
.#{$prefix}float-button-inner-drawer {
|
|
49
|
+
&-header {
|
|
50
|
+
margin: $size-base * 2 $size-base * 3;
|
|
51
|
+
}
|
|
52
|
+
&-body {
|
|
53
|
+
margin-top: 0;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
&--has-close {
|
|
58
|
+
.#{$prefix}float-button-inner-drawer {
|
|
59
|
+
&-header-title {
|
|
60
|
+
margin-right: $size-base * 2;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
&-header {
|
|
66
|
+
flex: none;
|
|
67
|
+
&-title {
|
|
68
|
+
font-size: $font-size-subhead;
|
|
69
|
+
line-height: 1.5;
|
|
70
|
+
}
|
|
71
|
+
&-close {
|
|
72
|
+
position: absolute;
|
|
73
|
+
right: $size-base * 2;
|
|
74
|
+
top: $size-base * 2;
|
|
75
|
+
color: $color-text1-2;
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
transition: color 0.15s;
|
|
78
|
+
outline: 0;
|
|
79
|
+
border: 0;
|
|
80
|
+
padding: 0;
|
|
81
|
+
align-self: flex-start;
|
|
82
|
+
background-color: transparent;
|
|
83
|
+
|
|
84
|
+
&:hover {
|
|
85
|
+
color: $color-text1-4;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
&-body {
|
|
90
|
+
flex: 1;
|
|
91
|
+
margin: $size-base * 2 $size-base * 3;
|
|
92
|
+
}
|
|
93
|
+
&-footer {
|
|
94
|
+
flex: none;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
package/es/index.d.ts
CHANGED
|
@@ -9,5 +9,4 @@ 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 Calendar } from './calendar';
|
|
13
12
|
export declare const version: string;
|
package/es/index.js
CHANGED
|
@@ -9,5 +9,4 @@ 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
|
|
13
|
-
export const version = __CHAT_VERSION__;
|
|
12
|
+
export const version = '0.1.15-beta.2';
|
package/es/input/style.d.ts
CHANGED
package/es/input/style.js
CHANGED
|
@@ -18,46 +18,20 @@ import { __rest } from "tslib";
|
|
|
18
18
|
* | Enter | Trigger the onClick event |
|
|
19
19
|
* | SPACE | Trigger the onClick event |
|
|
20
20
|
*/
|
|
21
|
-
import React, { forwardRef
|
|
21
|
+
import React, { forwardRef } from 'react';
|
|
22
22
|
import { Select as NextSelect, Tag as NextTag, Avatar as NextAvatar, Icon as NextIcon, ConfigProvider } from '@alifd/next';
|
|
23
23
|
import cs from 'classnames';
|
|
24
24
|
import { PREFIX_DEFAULT, assignSubComponent } from '../utils';
|
|
25
|
-
import { userPicker, addZeroInWorkNo } from '../utils/dingtalk';
|
|
26
25
|
const PersonPicker = forwardRef((_a, ref) => {
|
|
27
|
-
var { className, size = 'small',
|
|
28
|
-
const userRef = useRef([]);
|
|
29
|
-
// 用户选择器回调
|
|
30
|
-
const handleUserPickerSuccess = (selectedUsers) => {
|
|
31
|
-
let userWorkNos = selectedUsers.map((u) => u.emplId);
|
|
32
|
-
const { loginWorkNo } = window.g_config;
|
|
33
|
-
const validWorkNo = loginWorkNo ? addZeroInWorkNo(loginWorkNo) : '';
|
|
34
|
-
// 钉钉的工号是补0的ID
|
|
35
|
-
if (userWorkNos.includes(validWorkNo)) {
|
|
36
|
-
// 如果包含自己,就把自己放到第一个
|
|
37
|
-
userWorkNos = [validWorkNo, ...userWorkNos.filter((u) => u !== validWorkNo)];
|
|
38
|
-
}
|
|
39
|
-
setSearchParams(Object.assign(Object.assign({}, allParams), { user: userWorkNos.join(',') }));
|
|
40
|
-
// 更新引用,以便于其他操作
|
|
41
|
-
userRef.current = userWorkNos;
|
|
42
|
-
};
|
|
43
|
-
// 处理用户选择的Click事件
|
|
44
|
-
const handleUserClick = () => {
|
|
45
|
-
const validPickedUsers = initialUser.map(addZeroInWorkNo);
|
|
46
|
-
userPicker({
|
|
47
|
-
pickedUsers: validPickedUsers, // 已选用户
|
|
48
|
-
onSuccess: handleUserPickerSuccess,
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
// 用户标签渲染
|
|
26
|
+
var { className, size = 'small', value, onUserChange, onUserPick } = _a, props = __rest(_a, ["className", "size", "value", "onUserChange", "onUserPick"]);
|
|
52
27
|
const tagRender = (selectItem) => {
|
|
53
28
|
const { label, value, onClose } = selectItem;
|
|
54
|
-
|
|
55
|
-
return (isUserSelected && (React.createElement(NextTag.Closeable, { onClose: onClose, className: "h-6 px-1 mt-1 mr-1" },
|
|
29
|
+
return React.createElement(NextTag.Closeable, { onClose: onClose, className: "h-6 px-1 mt-1 mr-1" },
|
|
56
30
|
React.createElement("div", { className: "flex items-center" },
|
|
57
31
|
React.createElement(NextAvatar, { className: "mr-0.5 scale-75", shape: "square", size: "small", src: `//work.alibaba-inc.com/photo/${value}.80x80.jpg` }),
|
|
58
|
-
React.createElement("span", { className: "text-xs" }, label)))
|
|
32
|
+
React.createElement("span", { className: "text-xs" }, label)));
|
|
59
33
|
};
|
|
60
|
-
return (React.createElement(NextSelect, Object.assign({}, props, { className: cs(`${PREFIX_DEFAULT}person-picker`, className), mode: "multiple", itemRender: tagRender, options: [], hasArrow: false, onClick:
|
|
34
|
+
return (React.createElement(NextSelect, Object.assign({}, props, { className: cs(`${PREFIX_DEFAULT}person-picker`, className), mode: "multiple", itemRender: tagRender, options: [], hasArrow: false, visible: false, onClick: onUserPick, onChange: (selectedValues) => onUserChange(selectedValues), innerAfter: React.createElement(NextIcon, { type: "add" }), size: size, ref: ref })));
|
|
61
35
|
});
|
|
62
36
|
const PersonPickerWithSub = assignSubComponent(PersonPicker, {
|
|
63
37
|
displayName: 'PersonPicker',
|
package/es/tab/main.scss
ADDED
package/es/tag/main.scss
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@import '../core/variables.scss';
|
|
2
|
+
|
|
3
|
+
.#{$prefix}text {
|
|
4
|
+
display: inline-block;
|
|
5
|
+
|
|
6
|
+
&-inner {
|
|
7
|
+
}
|
|
8
|
+
&-trigger {
|
|
9
|
+
line-height: 1;
|
|
10
|
+
|
|
11
|
+
& &-btn {
|
|
12
|
+
font-size: inherit;
|
|
13
|
+
line-height: inherit;
|
|
14
|
+
height: auto;
|
|
15
|
+
vertical-align: baseline;
|
|
16
|
+
margin-left: 12px;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
package/es/time-picker/index.js
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import { __rest } from "tslib";
|
|
21
21
|
import React, { forwardRef } from 'react';
|
|
22
|
-
import {
|
|
22
|
+
import { TimePicker2 as NextTimePicker2, Select as NextSelect, ConfigProvider } from '@alifd/next';
|
|
23
23
|
import cs from 'classnames';
|
|
24
24
|
import dayjs from 'dayjs';
|
|
25
25
|
import { PREFIX_DEFAULT, assignSubComponent } from '../utils';
|
|
@@ -66,10 +66,10 @@ const TimePicker = forwardRef((_a, ref) => {
|
|
|
66
66
|
};
|
|
67
67
|
if (mode === 'dingtalk') {
|
|
68
68
|
const { format, hourStep, minuteStep, secondStep } = props, otherProps = __rest(props, ["format", "hourStep", "minuteStep", "secondStep"]);
|
|
69
|
-
return (React.createElement(NextSelect, Object.assign({}, otherProps, { className: cs(`${PREFIX_DEFAULT}time-
|
|
69
|
+
return (React.createElement(NextSelect, Object.assign({}, otherProps, { className: cs(`${PREFIX_DEFAULT}time-picker2`, className), value: formatSelectValue(), size: size, ref: ref }), getTimeArray().map((time, index) => (React.createElement(NextSelect.Option, { value: time.value, key: index }, time.label)))));
|
|
70
70
|
}
|
|
71
71
|
else {
|
|
72
|
-
return (React.createElement(
|
|
72
|
+
return (React.createElement(NextTimePicker2, Object.assign({}, props, { className: cs(`${PREFIX_DEFAULT}time-picker2`, className), size: size, ref: ref })));
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
75
|
const TimePickerWithSub = assignSubComponent(TimePicker, {
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import '@alifd/next/lib/time-
|
|
2
|
-
import './main.scss';
|
|
1
|
+
import '@alifd/next/lib/time-picker2/style';
|
package/es/time-picker/style.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import '@alifd/next/lib/time-
|
|
2
|
-
import './main.scss';
|
|
1
|
+
import '@alifd/next/lib/time-picker2/style';
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* | SPACE | Trigger the onClick event |
|
|
19
19
|
*/
|
|
20
20
|
import React from 'react';
|
|
21
|
-
import {
|
|
21
|
+
import { DatePicker2 as NextDatePicker2 } from '@alifd/next';
|
|
22
22
|
export * from './types';
|
|
23
|
-
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<Pick<any, string | number | symbol> & React.RefAttributes<
|
|
23
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<Pick<any, string | number | symbol> & React.RefAttributes<NextDatePicker2>, string | number | symbol> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, NextDatePicker2, {}>;
|
|
24
24
|
export default _default;
|
package/lib/date-picker/index.js
CHANGED
|
@@ -26,7 +26,7 @@ const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
|
26
26
|
const utils_1 = require("../utils");
|
|
27
27
|
const DatePicker = (0, react_1.forwardRef)((_a, ref) => {
|
|
28
28
|
var { className, size = 'small' } = _a, props = tslib_1.__rest(_a, ["className", "size"]);
|
|
29
|
-
return (react_1.default.createElement(next_1.
|
|
29
|
+
return (react_1.default.createElement(next_1.DatePicker2, Object.assign({}, props, { className: (0, classnames_1.default)(`${utils_1.PREFIX_DEFAULT}date-picker2`, className), size: size, ref: ref })));
|
|
30
30
|
});
|
|
31
31
|
const DatePickerWithSub = (0, utils_1.assignSubComponent)(DatePicker, {
|
|
32
32
|
displayName: 'DatePicker',
|
package/lib/date-picker/style.js
CHANGED
package/lib/index.d.ts
CHANGED
|
@@ -8,5 +8,5 @@ export { default as Tab } from './tab';
|
|
|
8
8
|
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
|
-
export { default as
|
|
11
|
+
export { default as PersonPicker } from './person-picker';
|
|
12
12
|
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.
|
|
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;
|
|
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");
|
|
@@ -24,6 +24,6 @@ var date_picker_1 = require("./date-picker");
|
|
|
24
24
|
Object.defineProperty(exports, "DatePicker", { enumerable: true, get: function () { return __importDefault(date_picker_1).default; } });
|
|
25
25
|
var time_picker_1 = require("./time-picker");
|
|
26
26
|
Object.defineProperty(exports, "TimePicker", { enumerable: true, get: function () { return __importDefault(time_picker_1).default; } });
|
|
27
|
-
var
|
|
28
|
-
Object.defineProperty(exports, "
|
|
29
|
-
exports.version = '0.1.
|
|
27
|
+
var person_picker_1 = require("./person-picker");
|
|
28
|
+
Object.defineProperty(exports, "PersonPicker", { enumerable: true, get: function () { return __importDefault(person_picker_1).default; } });
|
|
29
|
+
exports.version = '0.1.15-beta.2';
|
package/lib/input/style.d.ts
CHANGED
package/lib/input/style.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @component
|
|
3
|
-
* @en
|
|
2
|
+
* @component 人员选择
|
|
3
|
+
* @en PersonSelect
|
|
4
4
|
* @type 通用 - General
|
|
5
5
|
* @remarks 同 Next Button,按钮用于开始一个即时操作。- Same as Next.Button, Button used to trigger an action.
|
|
6
6
|
* @when 标记一个(或封装一组)操作命令,响应用户点击行为,触发相应的业务逻辑。- Buttons are used for emphasizing important functions on your page.
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
* | SPACE | Trigger the onClick event |
|
|
19
19
|
*/
|
|
20
20
|
import React from 'react';
|
|
21
|
+
import { Select as NextSelect } from '@alifd/next';
|
|
21
22
|
export * from './types';
|
|
22
|
-
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<Pick<any, string | number | symbol> & React.RefAttributes<
|
|
23
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<Pick<any, string | number | symbol> & React.RefAttributes<NextSelect>, string | number | symbol> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, NextSelect, {}>;
|
|
23
24
|
export default _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
/**
|
|
5
|
+
* @component 人员选择
|
|
6
|
+
* @en PersonSelect
|
|
7
|
+
* @type 通用 - General
|
|
8
|
+
* @remarks 同 Next Button,按钮用于开始一个即时操作。- Same as Next.Button, Button used to trigger an action.
|
|
9
|
+
* @when 标记一个(或封装一组)操作命令,响应用户点击行为,触发相应的业务逻辑。- Buttons are used for emphasizing important functions on your page.
|
|
10
|
+
* @others
|
|
11
|
+
* ## 无障碍键盘操作指南
|
|
12
|
+
* | 按键 | 说明 |
|
|
13
|
+
* | :---- | :---------- |
|
|
14
|
+
* | Enter | 触发 onClick 事件 |
|
|
15
|
+
* | SPACE | 触发 onClick 事件 |
|
|
16
|
+
* @othersEn
|
|
17
|
+
* ## ARIA and KeyBoard
|
|
18
|
+
* | KeyBoard | Description |
|
|
19
|
+
* | :---------- | :------------------------------ |
|
|
20
|
+
* | Enter | Trigger the onClick event |
|
|
21
|
+
* | SPACE | Trigger the onClick event |
|
|
22
|
+
*/
|
|
23
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
24
|
+
const next_1 = require("@alifd/next");
|
|
25
|
+
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
26
|
+
const utils_1 = require("../utils");
|
|
27
|
+
const PersonPicker = (0, react_1.forwardRef)((_a, ref) => {
|
|
28
|
+
var { className, size = 'small', value, onUserChange, onUserPick } = _a, props = tslib_1.__rest(_a, ["className", "size", "value", "onUserChange", "onUserPick"]);
|
|
29
|
+
const tagRender = (selectItem) => {
|
|
30
|
+
const { label, value, onClose } = selectItem;
|
|
31
|
+
return react_1.default.createElement(next_1.Tag.Closeable, { onClose: onClose, className: "h-6 px-1 mt-1 mr-1" },
|
|
32
|
+
react_1.default.createElement("div", { className: "flex items-center" },
|
|
33
|
+
react_1.default.createElement(next_1.Avatar, { className: "mr-0.5 scale-75", shape: "square", size: "small", src: `//work.alibaba-inc.com/photo/${value}.80x80.jpg` }),
|
|
34
|
+
react_1.default.createElement("span", { className: "text-xs" }, label)));
|
|
35
|
+
};
|
|
36
|
+
return (react_1.default.createElement(next_1.Select, Object.assign({}, props, { className: (0, classnames_1.default)(`${utils_1.PREFIX_DEFAULT}person-picker`, className), mode: "multiple", itemRender: tagRender, options: [], hasArrow: false, visible: false, onClick: onUserPick, onChange: (selectedValues) => onUserChange(selectedValues), innerAfter: react_1.default.createElement(next_1.Icon, { type: "add" }), size: size, ref: ref })));
|
|
37
|
+
});
|
|
38
|
+
const PersonPickerWithSub = (0, utils_1.assignSubComponent)(PersonPicker, {
|
|
39
|
+
displayName: 'PersonPicker',
|
|
40
|
+
});
|
|
41
|
+
tslib_1.__exportStar(require("./types"), exports);
|
|
42
|
+
exports.default = next_1.ConfigProvider.config(PersonPickerWithSub);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@alifd/next/lib/select/style';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
type HTMLAttributesWeak = Omit<React.ButtonHTMLAttributes<HTMLElement>, 'type' | 'onClick'>;
|
|
3
|
+
/**
|
|
4
|
+
* @api TimePicker
|
|
5
|
+
*/
|
|
6
|
+
export interface TimePickerProps extends HTMLAttributesWeak {
|
|
7
|
+
/**
|
|
8
|
+
* 采用模式
|
|
9
|
+
* @en mode of time-picker
|
|
10
|
+
* @defaultValue 'normal'
|
|
11
|
+
*/
|
|
12
|
+
mode?: 'normal' | 'dingtalk';
|
|
13
|
+
/**
|
|
14
|
+
* 时间选择器其他属性
|
|
15
|
+
* @en key of time-picker
|
|
16
|
+
* @defaultValue 'medium'
|
|
17
|
+
*/
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
package/lib/time-picker/index.js
CHANGED
|
@@ -68,10 +68,10 @@ const TimePicker = (0, react_1.forwardRef)((_a, ref) => {
|
|
|
68
68
|
};
|
|
69
69
|
if (mode === 'dingtalk') {
|
|
70
70
|
const { format, hourStep, minuteStep, secondStep } = props, otherProps = tslib_1.__rest(props, ["format", "hourStep", "minuteStep", "secondStep"]);
|
|
71
|
-
return (react_1.default.createElement(next_1.Select, Object.assign({}, otherProps, { className: (0, classnames_1.default)(`${utils_1.PREFIX_DEFAULT}time-
|
|
71
|
+
return (react_1.default.createElement(next_1.Select, Object.assign({}, otherProps, { className: (0, classnames_1.default)(`${utils_1.PREFIX_DEFAULT}time-picker2`, className), value: formatSelectValue(), size: size, ref: ref }), getTimeArray().map((time, index) => (react_1.default.createElement(next_1.Select.Option, { value: time.value, key: index }, time.label)))));
|
|
72
72
|
}
|
|
73
73
|
else {
|
|
74
|
-
return (react_1.default.createElement(next_1.
|
|
74
|
+
return (react_1.default.createElement(next_1.TimePicker2, Object.assign({}, props, { className: (0, classnames_1.default)(`${utils_1.PREFIX_DEFAULT}time-picker2`, className), size: size, ref: ref })));
|
|
75
75
|
}
|
|
76
76
|
});
|
|
77
77
|
const TimePickerWithSub = (0, utils_1.assignSubComponent)(TimePicker, {
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import '@alifd/next/lib/time-
|
|
2
|
-
import './main.scss';
|
|
1
|
+
import '@alifd/next/lib/time-picker2/style';
|
package/lib/time-picker/style.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alifd/chat",
|
|
3
|
-
"version": "0.1.15-beta.
|
|
3
|
+
"version": "0.1.15-beta.2",
|
|
4
4
|
"description": "A configurable component library for chat built on React.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -157,6 +157,18 @@
|
|
|
157
157
|
"./utils": {
|
|
158
158
|
"import": "./es/utils/index.js",
|
|
159
159
|
"require": "./lib/utils/index.js"
|
|
160
|
+
},
|
|
161
|
+
"./person-picker": {
|
|
162
|
+
"import": "./es/person-picker/index.js",
|
|
163
|
+
"require": "./lib/person-picker/index.js"
|
|
164
|
+
},
|
|
165
|
+
"./person-picker/style": {
|
|
166
|
+
"import": "./es/person-picker/style.js",
|
|
167
|
+
"require": "./lib/person-picker/style.js"
|
|
168
|
+
},
|
|
169
|
+
"./person-picker/style.js": {
|
|
170
|
+
"import": "./es/person-picker/style.js",
|
|
171
|
+
"require": "./lib/person-picker/style.js"
|
|
160
172
|
}
|
|
161
173
|
},
|
|
162
174
|
"files": [
|
|
@@ -226,8 +238,10 @@
|
|
|
226
238
|
},
|
|
227
239
|
"dependencies": {
|
|
228
240
|
"@ali/dingtalk-jsapi": "^3.0.33",
|
|
241
|
+
"dd-icons": "^1.6.20",
|
|
229
242
|
"dingtalk-jsapi": "^3.0.33",
|
|
230
243
|
"hoist-non-react-statics": "^3.3.2",
|
|
244
|
+
"ice": "^3.7.100",
|
|
231
245
|
"tslib": "^2.6.2"
|
|
232
246
|
},
|
|
233
247
|
"sideEffects": [
|
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 {};
|
package/es/calendar/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/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/lib/calendar/index.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @component 日历
|
|
4
|
-
* @en Button
|
|
5
|
-
* @type 通用 - General
|
|
6
|
-
* @remarks 同 Next Button,按钮用于开始一个即时操作。- Same as Next.Button, Button used to trigger an action.
|
|
7
|
-
* @when 标记一个(或封装一组)操作命令,响应用户点击行为,触发相应的业务逻辑。- Buttons are used for emphasizing important functions on your page.
|
|
8
|
-
* @others
|
|
9
|
-
* ## 无障碍键盘操作指南
|
|
10
|
-
* | 按键 | 说明 |
|
|
11
|
-
* | :---- | :---------- |
|
|
12
|
-
* | Enter | 触发 onClick 事件 |
|
|
13
|
-
* | SPACE | 触发 onClick 事件 |
|
|
14
|
-
* @othersEn
|
|
15
|
-
* ## ARIA and KeyBoard
|
|
16
|
-
* | KeyBoard | Description |
|
|
17
|
-
* | :---------- | :------------------------------ |
|
|
18
|
-
* | Enter | Trigger the onClick event |
|
|
19
|
-
* | SPACE | Trigger the onClick event |
|
|
20
|
-
*/
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
const tslib_1 = require("tslib");
|
|
23
|
-
const react_1 = tslib_1.__importStar(require("react"));
|
|
24
|
-
const next_1 = require("@alifd/next");
|
|
25
|
-
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
26
|
-
const utils_1 = require("../utils");
|
|
27
|
-
const Calendar = (0, react_1.forwardRef)((_a, ref) => {
|
|
28
|
-
var { className, size = 'small' } = _a, props = tslib_1.__rest(_a, ["className", "size"]);
|
|
29
|
-
return (react_1.default.createElement(next_1.Button, Object.assign({}, props, { className: (0, classnames_1.default)(`${utils_1.PREFIX_DEFAULT}calendar`, className), size: size, ref: ref })));
|
|
30
|
-
});
|
|
31
|
-
const CalendarWithSub = (0, utils_1.assignSubComponent)(Calendar, {
|
|
32
|
-
displayName: 'Calendar',
|
|
33
|
-
});
|
|
34
|
-
tslib_1.__exportStar(require("./types"), exports);
|
|
35
|
-
exports.default = next_1.ConfigProvider.config(CalendarWithSub);
|
package/lib/calendar/style.d.ts
DELETED
package/lib/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 {};
|
|
File without changes
|