@alifd/chat 0.3.33-beta.3 → 0.3.33-beta.5
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/drawer/index.js +1 -1
- package/es/icon/index.js +1 -1
- package/es/index.js +1 -1
- package/es/tool-status/index.js +12 -13
- package/es/tool-status/main.scss +21 -8
- package/es/tool-status/types.d.ts +4 -0
- package/lib/drawer/index.js +1 -1
- package/lib/icon/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/tool-status/index.js +12 -13
- package/lib/tool-status/main.scss +21 -8
- package/lib/tool-status/types.d.ts +4 -0
- package/package.json +1 -1
package/es/drawer/index.js
CHANGED
|
@@ -17,7 +17,7 @@ const Drawer = forwardRef((_a, ref) => {
|
|
|
17
17
|
"border-bottom:": "1px solid var(--40gmM)"
|
|
18
18
|
};
|
|
19
19
|
return (React.createElement(NextDrawer, Object.assign({}, props, { v2: true, ref: ref, placement: placement, headerStyle: Object.assign(Object.assign({}, defaultHeaderStyle), headerStyle), className: cs(`${PREFIX_DEFAULT}drawer ${placement}`, className) }),
|
|
20
|
-
|
|
20
|
+
children,
|
|
21
21
|
footer && footer.length && React.createElement("div", { className: cs('draw-footer', footerClassName) }, footer)));
|
|
22
22
|
});
|
|
23
23
|
const DrawerWithSub = assignSubComponent(Drawer, {
|
package/es/icon/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import { PREFIX_DEFAULT, assignSubComponent } from '../utils';
|
|
|
14
14
|
const CustomIcon = NextIcon.createFromIconfontCN({
|
|
15
15
|
scriptUrl: '//at.alicdn.com/t/c/font_3504203_7pbik9jgwl8.js',
|
|
16
16
|
});
|
|
17
|
-
const CustomIconList = ['icon-xiangxiaxianxing', 'icon-xiangxiaxianxing-copy', 'icon-cross', 'icon-fuzhi2'];
|
|
17
|
+
const CustomIconList = ['icon-check', 'icon-xiangxiaxianxing', 'icon-xiangxiaxianxing-copy', 'icon-cross', 'icon-cross1', 'icon-fuzhi2'];
|
|
18
18
|
const TypeMap = {
|
|
19
19
|
'arrow-up': 'icon-xiangxiaxianxing-copy',
|
|
20
20
|
'arrow-down': 'icon-xiangxiaxianxing',
|
package/es/index.js
CHANGED
|
@@ -32,4 +32,4 @@ export { default as CheckboxGroup } from './checkbox-group';
|
|
|
32
32
|
export { default as Select } from './select';
|
|
33
33
|
export { default as Flip } from './flip';
|
|
34
34
|
export { default as ToolStatus } from './tool-status';
|
|
35
|
-
export const version = '0.3.33-beta.
|
|
35
|
+
export const version = '0.3.33-beta.5';
|
package/es/tool-status/index.js
CHANGED
|
@@ -7,29 +7,28 @@
|
|
|
7
7
|
import React, { forwardRef } from 'react';
|
|
8
8
|
import { ConfigProvider } from '@alifd/next';
|
|
9
9
|
import Icon from '../icon';
|
|
10
|
-
import Button from '../button';
|
|
11
10
|
import cs from 'classnames';
|
|
12
11
|
import { PREFIX_DEFAULT } from '../utils';
|
|
13
|
-
const SUCCESS_ICON = 'success'
|
|
14
|
-
const ERROR_ICON = 'error'
|
|
12
|
+
const SUCCESS_ICON = 'icon-check'; //'success'
|
|
13
|
+
const ERROR_ICON = 'icon-cross1'; //'error'
|
|
15
14
|
const LOADING_ICON = 'loading';
|
|
16
15
|
const ToolStatus = forwardRef((props, ref) => {
|
|
17
|
-
const { useText = '使用', name, className, selected = false, status, onToolClick, authInfo } = props;
|
|
16
|
+
const { useText = '使用', name, className, selected = false, status, onToolClick, authInfo, fullWidth } = props;
|
|
18
17
|
const handleClick = (event) => {
|
|
19
18
|
event.stopPropagation();
|
|
20
19
|
onToolClick === null || onToolClick === void 0 ? void 0 : onToolClick(props);
|
|
21
20
|
};
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
let csName = selected ? 'selected' : '';
|
|
22
|
+
csName = fullWidth ? `${csName} full-width` : `${csName}`;
|
|
23
|
+
return (React.createElement("div", { className: cs(`${PREFIX_DEFAULT}tool-status ${csName} ${status}`, className), ref: ref, onClick: (e) => {
|
|
24
24
|
handleClick(e);
|
|
25
25
|
} },
|
|
26
|
-
React.createElement(Icon, { size: '
|
|
27
|
-
authInfo && status === 'auth' && React.createElement("div", { className: '
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} }, authInfo === null || authInfo === void 0 ? void 0 : authInfo.content)),
|
|
26
|
+
React.createElement(Icon, { size: 'xs', type: status === 'failed' ? ERROR_ICON : status === 'completed' ? SUCCESS_ICON : LOADING_ICON }),
|
|
27
|
+
authInfo && status === 'auth' && React.createElement("div", { className: 'next-btn-text next-btn-primary', onClick: (event) => {
|
|
28
|
+
var _a;
|
|
29
|
+
event.stopPropagation();
|
|
30
|
+
(_a = authInfo === null || authInfo === void 0 ? void 0 : authInfo.onAuthClick) === null || _a === void 0 ? void 0 : _a.call(authInfo, props);
|
|
31
|
+
} }, authInfo === null || authInfo === void 0 ? void 0 : authInfo.content),
|
|
33
32
|
React.createElement("div", { className: 'content-use-tips' }, useText),
|
|
34
33
|
React.createElement("div", { className: 'content-name' }, name)));
|
|
35
34
|
});
|
package/es/tool-status/main.scss
CHANGED
|
@@ -3,19 +3,29 @@
|
|
|
3
3
|
.#{$prefix}tool-status {
|
|
4
4
|
width: fit-content;
|
|
5
5
|
transition: width 0.3s ease-in-out;
|
|
6
|
-
background-color: $color-fill1-1;//$color-brand1-1;
|
|
7
6
|
padding: $s-1 $s-3;
|
|
8
7
|
border-radius: $s-4;
|
|
9
8
|
box-sizing: border-box;
|
|
10
|
-
border: solid 1px $color-
|
|
9
|
+
border: solid 1px $color-line1-2;
|
|
11
10
|
align-items: center;
|
|
12
11
|
display: flex;
|
|
12
|
+
background-color: transparent;
|
|
13
|
+
font-size: $font-size-caption;
|
|
13
14
|
i {
|
|
14
|
-
margin-right: $s-
|
|
15
|
+
margin-right: $s-1;
|
|
16
|
+
height: $s-4;
|
|
17
|
+
}
|
|
18
|
+
.next-icon.next-small:before {
|
|
19
|
+
// height: $s-4;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&.full-width {
|
|
23
|
+
width: 100%;
|
|
15
24
|
}
|
|
16
25
|
|
|
17
26
|
&.selected {
|
|
18
27
|
background-color: $color-fill1-2;
|
|
28
|
+
border: solid 1px transparent;
|
|
19
29
|
}
|
|
20
30
|
|
|
21
31
|
&.completed {
|
|
@@ -36,20 +46,23 @@
|
|
|
36
46
|
}
|
|
37
47
|
}
|
|
38
48
|
|
|
39
|
-
.
|
|
49
|
+
.next-btn-text.next-btn-primary{
|
|
50
|
+
line-height: $s-4;
|
|
51
|
+
font-size: $font-size-caption;
|
|
52
|
+
cursor: pointer;
|
|
40
53
|
margin-right: $s-1;
|
|
41
|
-
button {
|
|
42
|
-
font-size: $font-size-body-2 !important;
|
|
43
|
-
}
|
|
44
54
|
}
|
|
45
55
|
|
|
56
|
+
|
|
46
57
|
.content-use-tips {
|
|
47
|
-
color: $color-text1-
|
|
58
|
+
color: $color-text1-3;
|
|
48
59
|
margin-right: $s-1;
|
|
60
|
+
line-height: $s-4;
|
|
49
61
|
}
|
|
50
62
|
|
|
51
63
|
.content-name {
|
|
52
64
|
color: $color-text1-4;
|
|
65
|
+
line-height: $s-4;
|
|
53
66
|
}
|
|
54
67
|
|
|
55
68
|
}
|
package/lib/drawer/index.js
CHANGED
|
@@ -19,7 +19,7 @@ const Drawer = (0, react_1.forwardRef)((_a, ref) => {
|
|
|
19
19
|
"border-bottom:": "1px solid var(--40gmM)"
|
|
20
20
|
};
|
|
21
21
|
return (react_1.default.createElement(next_1.Drawer, Object.assign({}, props, { v2: true, ref: ref, placement: placement, headerStyle: Object.assign(Object.assign({}, defaultHeaderStyle), headerStyle), className: (0, classnames_1.default)(`${utils_1.PREFIX_DEFAULT}drawer ${placement}`, className) }),
|
|
22
|
-
|
|
22
|
+
children,
|
|
23
23
|
footer && footer.length && react_1.default.createElement("div", { className: (0, classnames_1.default)('draw-footer', footerClassName) }, footer)));
|
|
24
24
|
});
|
|
25
25
|
const DrawerWithSub = (0, utils_1.assignSubComponent)(Drawer, {
|
package/lib/icon/index.js
CHANGED
|
@@ -17,7 +17,7 @@ const utils_1 = require("../utils");
|
|
|
17
17
|
const CustomIcon = next_1.Icon.createFromIconfontCN({
|
|
18
18
|
scriptUrl: '//at.alicdn.com/t/c/font_3504203_7pbik9jgwl8.js',
|
|
19
19
|
});
|
|
20
|
-
const CustomIconList = ['icon-xiangxiaxianxing', 'icon-xiangxiaxianxing-copy', 'icon-cross', 'icon-fuzhi2'];
|
|
20
|
+
const CustomIconList = ['icon-check', 'icon-xiangxiaxianxing', 'icon-xiangxiaxianxing-copy', 'icon-cross', 'icon-cross1', 'icon-fuzhi2'];
|
|
21
21
|
const TypeMap = {
|
|
22
22
|
'arrow-up': 'icon-xiangxiaxianxing-copy',
|
|
23
23
|
'arrow-down': 'icon-xiangxiaxianxing',
|
package/lib/index.js
CHANGED
|
@@ -70,4 +70,4 @@ var flip_1 = require("./flip");
|
|
|
70
70
|
Object.defineProperty(exports, "Flip", { enumerable: true, get: function () { return tslib_1.__importDefault(flip_1).default; } });
|
|
71
71
|
var tool_status_1 = require("./tool-status");
|
|
72
72
|
Object.defineProperty(exports, "ToolStatus", { enumerable: true, get: function () { return tslib_1.__importDefault(tool_status_1).default; } });
|
|
73
|
-
exports.version = '0.3.33-beta.
|
|
73
|
+
exports.version = '0.3.33-beta.5';
|
package/lib/tool-status/index.js
CHANGED
|
@@ -10,29 +10,28 @@ const tslib_1 = require("tslib");
|
|
|
10
10
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
11
11
|
const next_1 = require("@alifd/next");
|
|
12
12
|
const icon_1 = tslib_1.__importDefault(require("../icon"));
|
|
13
|
-
const button_1 = tslib_1.__importDefault(require("../button"));
|
|
14
13
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
15
14
|
const utils_1 = require("../utils");
|
|
16
|
-
const SUCCESS_ICON = 'success'
|
|
17
|
-
const ERROR_ICON = 'error'
|
|
15
|
+
const SUCCESS_ICON = 'icon-check'; //'success'
|
|
16
|
+
const ERROR_ICON = 'icon-cross1'; //'error'
|
|
18
17
|
const LOADING_ICON = 'loading';
|
|
19
18
|
const ToolStatus = (0, react_1.forwardRef)((props, ref) => {
|
|
20
|
-
const { useText = '使用', name, className, selected = false, status, onToolClick, authInfo } = props;
|
|
19
|
+
const { useText = '使用', name, className, selected = false, status, onToolClick, authInfo, fullWidth } = props;
|
|
21
20
|
const handleClick = (event) => {
|
|
22
21
|
event.stopPropagation();
|
|
23
22
|
onToolClick === null || onToolClick === void 0 ? void 0 : onToolClick(props);
|
|
24
23
|
};
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
let csName = selected ? 'selected' : '';
|
|
25
|
+
csName = fullWidth ? `${csName} full-width` : `${csName}`;
|
|
26
|
+
return (react_1.default.createElement("div", { className: (0, classnames_1.default)(`${utils_1.PREFIX_DEFAULT}tool-status ${csName} ${status}`, className), ref: ref, onClick: (e) => {
|
|
27
27
|
handleClick(e);
|
|
28
28
|
} },
|
|
29
|
-
react_1.default.createElement(icon_1.default, { size: '
|
|
30
|
-
authInfo && status === 'auth' && react_1.default.createElement("div", { className: '
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
} }, authInfo === null || authInfo === void 0 ? void 0 : authInfo.content)),
|
|
29
|
+
react_1.default.createElement(icon_1.default, { size: 'xs', type: status === 'failed' ? ERROR_ICON : status === 'completed' ? SUCCESS_ICON : LOADING_ICON }),
|
|
30
|
+
authInfo && status === 'auth' && react_1.default.createElement("div", { className: 'next-btn-text next-btn-primary', onClick: (event) => {
|
|
31
|
+
var _a;
|
|
32
|
+
event.stopPropagation();
|
|
33
|
+
(_a = authInfo === null || authInfo === void 0 ? void 0 : authInfo.onAuthClick) === null || _a === void 0 ? void 0 : _a.call(authInfo, props);
|
|
34
|
+
} }, authInfo === null || authInfo === void 0 ? void 0 : authInfo.content),
|
|
36
35
|
react_1.default.createElement("div", { className: 'content-use-tips' }, useText),
|
|
37
36
|
react_1.default.createElement("div", { className: 'content-name' }, name)));
|
|
38
37
|
});
|
|
@@ -3,19 +3,29 @@
|
|
|
3
3
|
.#{$prefix}tool-status {
|
|
4
4
|
width: fit-content;
|
|
5
5
|
transition: width 0.3s ease-in-out;
|
|
6
|
-
background-color: $color-fill1-1;//$color-brand1-1;
|
|
7
6
|
padding: $s-1 $s-3;
|
|
8
7
|
border-radius: $s-4;
|
|
9
8
|
box-sizing: border-box;
|
|
10
|
-
border: solid 1px $color-
|
|
9
|
+
border: solid 1px $color-line1-2;
|
|
11
10
|
align-items: center;
|
|
12
11
|
display: flex;
|
|
12
|
+
background-color: transparent;
|
|
13
|
+
font-size: $font-size-caption;
|
|
13
14
|
i {
|
|
14
|
-
margin-right: $s-
|
|
15
|
+
margin-right: $s-1;
|
|
16
|
+
height: $s-4;
|
|
17
|
+
}
|
|
18
|
+
.next-icon.next-small:before {
|
|
19
|
+
// height: $s-4;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&.full-width {
|
|
23
|
+
width: 100%;
|
|
15
24
|
}
|
|
16
25
|
|
|
17
26
|
&.selected {
|
|
18
27
|
background-color: $color-fill1-2;
|
|
28
|
+
border: solid 1px transparent;
|
|
19
29
|
}
|
|
20
30
|
|
|
21
31
|
&.completed {
|
|
@@ -36,20 +46,23 @@
|
|
|
36
46
|
}
|
|
37
47
|
}
|
|
38
48
|
|
|
39
|
-
.
|
|
49
|
+
.next-btn-text.next-btn-primary{
|
|
50
|
+
line-height: $s-4;
|
|
51
|
+
font-size: $font-size-caption;
|
|
52
|
+
cursor: pointer;
|
|
40
53
|
margin-right: $s-1;
|
|
41
|
-
button {
|
|
42
|
-
font-size: $font-size-body-2 !important;
|
|
43
|
-
}
|
|
44
54
|
}
|
|
45
55
|
|
|
56
|
+
|
|
46
57
|
.content-use-tips {
|
|
47
|
-
color: $color-text1-
|
|
58
|
+
color: $color-text1-3;
|
|
48
59
|
margin-right: $s-1;
|
|
60
|
+
line-height: $s-4;
|
|
49
61
|
}
|
|
50
62
|
|
|
51
63
|
.content-name {
|
|
52
64
|
color: $color-text1-4;
|
|
65
|
+
line-height: $s-4;
|
|
53
66
|
}
|
|
54
67
|
|
|
55
68
|
}
|