@aloudata/aloudata-design 2.0.0-beta.6 → 2.0.0-beta.8
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/dist/Avatar/component/Avatar/index.js +9 -7
- package/dist/Avatar/style/index.less +8 -1
- package/dist/Button/style/variables.less +7 -4
- package/dist/Checkbox/index.js +10 -4
- package/dist/Checkbox/style/index.less +12 -0
- package/dist/Checkbox/type.d.ts +11 -0
- package/dist/Empty/style/index.less +1 -1
- package/dist/Form/style/index.less +12 -6
- package/dist/Icon/components/CloseCircleLightLine.d.ts +11 -0
- package/dist/Icon/components/CloseCircleLightLine.js +35 -0
- package/dist/Icon/components/User.d.ts +11 -0
- package/dist/Icon/components/User.js +41 -0
- package/dist/Icon/components/UserGroup.d.ts +11 -0
- package/dist/Icon/components/UserGroup.js +39 -0
- package/dist/Icon/index.d.ts +3 -0
- package/dist/Icon/index.js +4 -1
- package/dist/Icon/svg/Close-Circle-light-line.svg +5 -0
- package/dist/Icon/svg/check-circle-light-line.svg +1 -1
- package/dist/Icon/svg/information-circle-light-line.svg +1 -1
- package/dist/Icon/svg/user.svg +4 -0
- package/dist/Icon/svg/userGroup.svg +7 -0
- package/dist/InputNumber/style/index.less +12 -9
- package/dist/MemberPicker/components/MultipleOption.js +2 -0
- package/dist/MemberPicker/components/NickLabel.d.ts +2 -0
- package/dist/MemberPicker/components/NickLabel.js +8 -2
- package/dist/MemberPicker/components/Panel.js +2 -2
- package/dist/MemberPicker/components/SelectedMemberTags.js +4 -1
- package/dist/MemberPicker/components/SingleOption.js +1 -0
- package/dist/MemberPicker/style/index.less +30 -25
- package/dist/Navigator/style/index.less +1 -1
- package/dist/Popconfirm/index.js +2 -2
- package/dist/Popconfirm/style/index.less +47 -9
- package/dist/Spin/index.js +2 -3
- package/dist/Table/index.js +11 -2
- package/dist/Table/style/index.less +12 -6
- package/dist/Table/types.d.ts +1 -0
- package/dist/Tabs/index.d.ts +5 -0
- package/dist/Tabs/index.js +5 -2
- package/dist/Tabs/style/index.less +8 -0
- package/dist/TextLink/index.js +1 -1
- package/dist/TextLink/style/index.less +5 -0
- package/dist/TextLink/style/type.less +2 -2
- package/dist/Tree/Tree.js +1 -1
- package/dist/Tree/style/index.less +5 -5
- package/dist/Tree/style/mixin.less +3 -5
- package/dist/Tree/style/reset.less +15 -0
- package/dist/ald.min.css +1 -1
- package/dist/notification/demo/footer.d.ts +3 -0
- package/dist/notification/demo/footer.js +44 -0
- package/dist/notification/index.js +77 -48
- package/dist/notification/style/index.less +49 -11
- package/dist/style/themes/default/index.less +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { App, Button, notification, Space, TextLink } from "../..";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export default (function () {
|
|
4
|
+
var notices = function notices(type) {
|
|
5
|
+
notification[type]({
|
|
6
|
+
message: 'Notification Message',
|
|
7
|
+
description: 'description,description,description,description,description,description,description,description',
|
|
8
|
+
style: {
|
|
9
|
+
width: 360,
|
|
10
|
+
maxHeight: 500,
|
|
11
|
+
overflow: 'auto'
|
|
12
|
+
},
|
|
13
|
+
footer: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
14
|
+
type: "text",
|
|
15
|
+
onClick: function onClick() {
|
|
16
|
+
return console.log('Dismiss');
|
|
17
|
+
}
|
|
18
|
+
}, "Dismiss"), /*#__PURE__*/React.createElement(TextLink, {
|
|
19
|
+
onClick: function onClick() {
|
|
20
|
+
return console.log('Confirm');
|
|
21
|
+
}
|
|
22
|
+
}, "Confirm"))
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
return /*#__PURE__*/React.createElement(App, null, /*#__PURE__*/React.createElement(Space, {
|
|
26
|
+
direction: "vertical"
|
|
27
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
28
|
+
onClick: function onClick() {
|
|
29
|
+
return notices('success');
|
|
30
|
+
}
|
|
31
|
+
}, "Notification success with message\u3001description"), /*#__PURE__*/React.createElement(Button, {
|
|
32
|
+
onClick: function onClick() {
|
|
33
|
+
return notices('error');
|
|
34
|
+
}
|
|
35
|
+
}, "Notification error with message\u3001description"), /*#__PURE__*/React.createElement(Button, {
|
|
36
|
+
onClick: function onClick() {
|
|
37
|
+
return notices('warning');
|
|
38
|
+
}
|
|
39
|
+
}, "Notification warning with message\u3001description"), /*#__PURE__*/React.createElement(Button, {
|
|
40
|
+
onClick: function onClick() {
|
|
41
|
+
return notices('info');
|
|
42
|
+
}
|
|
43
|
+
}, "Notification info with message\u3001description")));
|
|
44
|
+
});
|
|
@@ -1,65 +1,58 @@
|
|
|
1
|
-
var _excluded = ["icon", "closeIcon"],
|
|
2
|
-
_excluded2 = ["icon", "closeIcon"],
|
|
3
|
-
_excluded3 = ["icon", "closeIcon"],
|
|
4
|
-
_excluded4 = ["icon", "closeIcon"];
|
|
5
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
var _excluded = ["icon", "closeIcon", "description", "footer"],
|
|
3
|
+
_excluded2 = ["icon", "closeIcon", "description", "footer"],
|
|
4
|
+
_excluded3 = ["icon", "closeIcon", "description", "footer"],
|
|
5
|
+
_excluded4 = ["icon", "closeIcon", "description", "footer"];
|
|
8
6
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9
7
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10
8
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
9
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
12
10
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
11
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
12
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
13
13
|
import { notification as AntdNotification } from 'antd';
|
|
14
14
|
import classnames from 'classnames';
|
|
15
15
|
import React from 'react';
|
|
16
|
-
import {
|
|
16
|
+
import { AttentionTriangleLightLine, CheckCircleLightLine, CloseCircleLightLine, CloseLLine, InformationCircleLightLine } from "../Icon";
|
|
17
17
|
import theme from "../style/themes/default/themeColor.module.less";
|
|
18
18
|
var iconMap = {
|
|
19
|
-
info: /*#__PURE__*/React.createElement(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
info: /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
className: "ald-notification-notice-icon-success"
|
|
21
|
+
}, /*#__PURE__*/React.createElement(InformationCircleLightLine, {
|
|
22
|
+
color: "#22C55E",
|
|
23
|
+
size: 24
|
|
24
|
+
})),
|
|
25
|
+
success: /*#__PURE__*/React.createElement("div", {
|
|
26
|
+
className: "ald-notification-notice-icon-success"
|
|
27
|
+
}, /*#__PURE__*/React.createElement(CheckCircleLightLine, {
|
|
25
28
|
color: 'var(--global-colors-green-600)',
|
|
26
29
|
size: 24
|
|
27
|
-
}),
|
|
28
|
-
error: /*#__PURE__*/React.createElement(
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
})),
|
|
31
|
+
error: /*#__PURE__*/React.createElement("div", {
|
|
32
|
+
className: "ald-notification-notice-icon-error"
|
|
33
|
+
}, /*#__PURE__*/React.createElement(CloseCircleLightLine, {
|
|
34
|
+
color: "#EF4444",
|
|
31
35
|
size: 24
|
|
32
|
-
}),
|
|
33
|
-
warning: /*#__PURE__*/React.createElement(
|
|
36
|
+
})),
|
|
37
|
+
warning: /*#__PURE__*/React.createElement("div", {
|
|
38
|
+
className: "ald-notification-notice-icon-warning"
|
|
39
|
+
}, /*#__PURE__*/React.createElement(AttentionTriangleLightLine, {
|
|
34
40
|
color: "#FFB01F",
|
|
35
|
-
fill: "#FFFFFF",
|
|
36
41
|
size: 24
|
|
37
|
-
})
|
|
42
|
+
}))
|
|
38
43
|
};
|
|
39
44
|
var closeX = /*#__PURE__*/React.createElement(CloseLLine, {
|
|
40
45
|
size: 20,
|
|
41
46
|
color: "#171717"
|
|
42
47
|
});
|
|
43
|
-
var getSDefaultStyle = function getSDefaultStyle(
|
|
44
|
-
return
|
|
45
|
-
padding: '
|
|
46
|
-
|
|
47
|
-
border: '1px solid',
|
|
48
|
+
var getSDefaultStyle = function getSDefaultStyle() {
|
|
49
|
+
return {
|
|
50
|
+
padding: '24px',
|
|
51
|
+
border: '1px solid #D1D5DB',
|
|
48
52
|
borderRadius: '2px',
|
|
49
|
-
boxShadow: theme.SHADOW_LG
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
borderColor: '#E98B8B'
|
|
53
|
-
}), type === 'success' && {
|
|
54
|
-
background: '#E8F9F0',
|
|
55
|
-
borderColor: '#73D8A6'
|
|
56
|
-
}), type === 'warning' && {
|
|
57
|
-
background: '#FFFAF0',
|
|
58
|
-
borderColor: '#FFD180'
|
|
59
|
-
}), type === 'info' && {
|
|
60
|
-
background: '#F0F6FF',
|
|
61
|
-
borderColor: '#84AADF'
|
|
62
|
-
});
|
|
53
|
+
boxShadow: theme.SHADOW_LG,
|
|
54
|
+
background: '#FFF'
|
|
55
|
+
};
|
|
63
56
|
};
|
|
64
57
|
var notification = {
|
|
65
58
|
open: function open(config) {
|
|
@@ -70,12 +63,21 @@ var notification = {
|
|
|
70
63
|
icon = _config$icon === void 0 ? iconMap.success : _config$icon,
|
|
71
64
|
_config$closeIcon = config.closeIcon,
|
|
72
65
|
closeIcon = _config$closeIcon === void 0 ? closeX : _config$closeIcon,
|
|
66
|
+
description = config.description,
|
|
67
|
+
footer = config.footer,
|
|
73
68
|
rest = _objectWithoutProperties(config, _excluded);
|
|
74
69
|
return AntdNotification.success(_objectSpread(_objectSpread({}, rest), {}, {
|
|
75
|
-
style: Object.assign({}, getSDefaultStyle(
|
|
70
|
+
style: Object.assign({}, getSDefaultStyle(), config.style),
|
|
76
71
|
className: classnames('ald-notification-notice', config.className),
|
|
77
72
|
icon: icon,
|
|
78
|
-
closeIcon: closeIcon
|
|
73
|
+
closeIcon: closeIcon,
|
|
74
|
+
description: /*#__PURE__*/React.createElement("div", {
|
|
75
|
+
className: "ald-notification-content"
|
|
76
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
77
|
+
className: 'ald-notification-desc'
|
|
78
|
+
}, description), footer && /*#__PURE__*/React.createElement("div", {
|
|
79
|
+
className: 'ald-notification-footer'
|
|
80
|
+
}, footer))
|
|
79
81
|
}));
|
|
80
82
|
},
|
|
81
83
|
error: function error(config) {
|
|
@@ -83,12 +85,21 @@ var notification = {
|
|
|
83
85
|
icon = _config$icon2 === void 0 ? iconMap.error : _config$icon2,
|
|
84
86
|
_config$closeIcon2 = config.closeIcon,
|
|
85
87
|
closeIcon = _config$closeIcon2 === void 0 ? closeX : _config$closeIcon2,
|
|
88
|
+
description = config.description,
|
|
89
|
+
footer = config.footer,
|
|
86
90
|
rest = _objectWithoutProperties(config, _excluded2);
|
|
87
91
|
return AntdNotification.error(_objectSpread(_objectSpread({}, rest), {}, {
|
|
88
92
|
className: classnames('ald-notification-notice', config.className),
|
|
89
|
-
style: Object.assign(getSDefaultStyle(
|
|
93
|
+
style: Object.assign(getSDefaultStyle(), config.style),
|
|
90
94
|
icon: icon,
|
|
91
|
-
closeIcon: closeIcon
|
|
95
|
+
closeIcon: closeIcon,
|
|
96
|
+
description: /*#__PURE__*/React.createElement("div", {
|
|
97
|
+
className: "ald-notification-content"
|
|
98
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
99
|
+
className: 'ald-notification-desc'
|
|
100
|
+
}, description), footer && /*#__PURE__*/React.createElement("div", {
|
|
101
|
+
className: 'ald-notification-footer'
|
|
102
|
+
}, footer))
|
|
92
103
|
}));
|
|
93
104
|
},
|
|
94
105
|
warning: function warning(config) {
|
|
@@ -96,12 +107,21 @@ var notification = {
|
|
|
96
107
|
icon = _config$icon3 === void 0 ? iconMap.warning : _config$icon3,
|
|
97
108
|
_config$closeIcon3 = config.closeIcon,
|
|
98
109
|
closeIcon = _config$closeIcon3 === void 0 ? closeX : _config$closeIcon3,
|
|
110
|
+
description = config.description,
|
|
111
|
+
footer = config.footer,
|
|
99
112
|
rest = _objectWithoutProperties(config, _excluded3);
|
|
100
113
|
return AntdNotification.warning(_objectSpread(_objectSpread({}, rest), {}, {
|
|
101
114
|
className: classnames('ald-notification-notice', config.className),
|
|
102
|
-
style: Object.assign(getSDefaultStyle(
|
|
115
|
+
style: Object.assign(getSDefaultStyle(), config.style),
|
|
103
116
|
icon: icon,
|
|
104
|
-
closeIcon: closeIcon
|
|
117
|
+
closeIcon: closeIcon,
|
|
118
|
+
description: /*#__PURE__*/React.createElement("div", {
|
|
119
|
+
className: "ald-notification-content"
|
|
120
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
121
|
+
className: 'ald-notification-desc'
|
|
122
|
+
}, description), footer && /*#__PURE__*/React.createElement("div", {
|
|
123
|
+
className: 'ald-notification-footer'
|
|
124
|
+
}, footer))
|
|
105
125
|
}));
|
|
106
126
|
},
|
|
107
127
|
info: function info(config) {
|
|
@@ -109,12 +129,21 @@ var notification = {
|
|
|
109
129
|
icon = _config$icon4 === void 0 ? iconMap.info : _config$icon4,
|
|
110
130
|
_config$closeIcon4 = config.closeIcon,
|
|
111
131
|
closeIcon = _config$closeIcon4 === void 0 ? closeX : _config$closeIcon4,
|
|
132
|
+
description = config.description,
|
|
133
|
+
footer = config.footer,
|
|
112
134
|
rest = _objectWithoutProperties(config, _excluded4);
|
|
113
135
|
return AntdNotification.info(_objectSpread(_objectSpread({}, rest), {}, {
|
|
114
136
|
className: classnames('ald-notification-notice', config.className),
|
|
115
|
-
style: Object.assign(getSDefaultStyle(
|
|
137
|
+
style: Object.assign(getSDefaultStyle(), config.style),
|
|
116
138
|
icon: icon,
|
|
117
|
-
closeIcon: closeIcon
|
|
139
|
+
closeIcon: closeIcon,
|
|
140
|
+
description: /*#__PURE__*/React.createElement("div", {
|
|
141
|
+
className: "ald-notification-content"
|
|
142
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
143
|
+
className: 'ald-notification-desc'
|
|
144
|
+
}, description), footer && /*#__PURE__*/React.createElement("div", {
|
|
145
|
+
className: 'ald-notification-footer'
|
|
146
|
+
}, footer))
|
|
118
147
|
}));
|
|
119
148
|
},
|
|
120
149
|
destroy: function destroy(key) {
|
|
@@ -2,29 +2,40 @@
|
|
|
2
2
|
|
|
3
3
|
.ald-notification-notice.ant-notification-notice {
|
|
4
4
|
.ant-notification-notice-icon {
|
|
5
|
-
top:
|
|
5
|
+
top: 24px;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
.ant-notification-notice-message {
|
|
9
9
|
margin-inline-start: 28px;
|
|
10
10
|
padding-inline-end: 28px;
|
|
11
|
-
margin-bottom:
|
|
12
|
-
margin-left:
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
margin-bottom: 8px !important;
|
|
12
|
+
margin-left: 56px !important;
|
|
13
|
+
color: var(--alias-colors-text-strong, #111827);
|
|
14
|
+
font-size: 18px;
|
|
15
|
+
font-weight: 600;
|
|
16
|
+
line-height: 28px; /* 155.556% */
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
.ant-notification-notice-description {
|
|
18
20
|
margin-inline-start: 28px;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
padding-inline-end: 28px;
|
|
22
|
+
margin-bottom: 8px !important;
|
|
23
|
+
margin-left: 56px !important;
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
gap: 16px;
|
|
27
|
+
|
|
28
|
+
.ald-notification-desc {
|
|
29
|
+
color: var(--alias-colors-text-subtle, #4b5563);
|
|
30
|
+
font-size: 14px;
|
|
31
|
+
font-weight: 400;
|
|
32
|
+
line-height: 20px; /* 142.857% */
|
|
33
|
+
}
|
|
23
34
|
}
|
|
24
35
|
|
|
25
36
|
.ant-notification-notice-close {
|
|
26
|
-
top:
|
|
27
|
-
right:
|
|
37
|
+
top: 24px;
|
|
38
|
+
right: 24px;
|
|
28
39
|
width: fit-content;
|
|
29
40
|
height: fit-content;
|
|
30
41
|
|
|
@@ -33,3 +44,30 @@
|
|
|
33
44
|
}
|
|
34
45
|
}
|
|
35
46
|
}
|
|
47
|
+
|
|
48
|
+
.ald-notification-notice-icon-success,
|
|
49
|
+
.ald-notification-notice-icon-error,
|
|
50
|
+
.ald-notification-notice-icon-warning,
|
|
51
|
+
.ald-notification-notice-icon-info {
|
|
52
|
+
display: grid;
|
|
53
|
+
place-items: center;
|
|
54
|
+
width: 40px;
|
|
55
|
+
height: 40px;
|
|
56
|
+
border-radius: 20px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.ald-notification-notice-icon-success {
|
|
60
|
+
background: var(--alias-colors-bg-accent-green-subtle-default, #dcfce7);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.ald-notification-notice-icon-error {
|
|
64
|
+
background: var(--alias-colors-bg-accent-red-subtle-default, #fee2e2);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.ald-notification-notice-icon-warning {
|
|
68
|
+
background: var(--alias-colors-bg-accent-yellow-subtle-default, #fef9c3);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.ald-notification-notice-icon-info {
|
|
72
|
+
background: var(--alias-colors-bg-accent-blue-subtle-default, #d4e7fd);
|
|
73
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
@import './default.less';
|
|
3
3
|
/* stylelint-disable-next-line at-rule-no-unknown */
|
|
4
4
|
@font-family:inter, -apple-system, PingFang SC, BlinkMacSystemFont,"Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji","Segoe UI Emoji", "Segoe UI Symbol";
|
|
5
|
-
@ald-prefix:
|
|
5
|
+
@ald-prefix: ald;
|
|
6
6
|
@error-color: #d64343;
|
|
7
7
|
// large
|
|
8
8
|
@font-size-large: 16px;
|