@aloudata/aloudata-design 0.4.8-beta.1 → 0.4.8-beta.10
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/Button/index.js +5 -5
- package/dist/Button/style/index.less +48 -44
- package/dist/Button/style/variables.less +13 -13
- package/dist/Checkbox/style/index.less +7 -3
- package/dist/Empty/image/SearchSmall.js +5 -0
- package/dist/Empty/style/index.less +11 -0
- package/dist/Icon/icons.js +32 -0
- package/dist/Input/style/index.less +45 -30
- package/dist/Menu/style/index.less +73 -2
- package/dist/Modal/index.js +28 -15
- package/dist/Modal/style/index.less +23 -6
- package/dist/Radio/components/Group/index.js +7 -4
- package/dist/Radio/components/Radio/index.js +9 -6
- package/dist/Radio/interface/radioGroup.d.ts +6 -1
- package/dist/Radio/style/index.less +152 -46
- package/dist/Select/components/MultipleOption.d.ts +1 -0
- package/dist/Select/components/MultipleOption.js +7 -3
- package/dist/Select/components/SingleOption.d.ts +1 -0
- package/dist/Select/components/SingleOption.js +6 -2
- package/dist/Select/index.js +70 -9
- package/dist/Select/style/index.less +7 -3
- package/dist/Select/style/multiple.less +13 -2
- package/dist/Select/style/single.less +12 -1
- package/dist/Table/style/index.less +9 -7
- package/dist/Tabs/index.d.ts +15 -0
- package/dist/Tabs/index.js +37 -6
- package/dist/Tabs/style/index.less +38 -1
- package/dist/notification/demo/index.js +24 -7
- package/dist/notification/index.d.ts +9 -1
- package/dist/notification/index.js +148 -1
- package/dist/notification/style/index.less +28 -0
- package/dist/style/themes/default/index.less +25 -25
- package/package.json +3 -3
|
@@ -1,2 +1,149 @@
|
|
|
1
|
-
|
|
1
|
+
var _excluded = ["icon", "className", "style", "closeIcon"],
|
|
2
|
+
_excluded2 = ["icon", "className", "style", "closeIcon"],
|
|
3
|
+
_excluded3 = ["icon", "className", "style", "closeIcon"],
|
|
4
|
+
_excluded4 = ["icon", "className", "style", "closeIcon"];
|
|
5
|
+
|
|
6
|
+
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; }
|
|
7
|
+
|
|
8
|
+
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; }
|
|
9
|
+
|
|
10
|
+
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; }
|
|
11
|
+
|
|
12
|
+
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; }
|
|
13
|
+
|
|
14
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
+
|
|
16
|
+
import { AlertTriangleDuotone, CancelCircleDuotone, CheckCircleDuotone, CloseMLine, InfoCircleLine } from '@aloudata/icons-react';
|
|
17
|
+
import { notification as AntdNotification } from 'antd';
|
|
18
|
+
import classnames from 'classnames';
|
|
19
|
+
import React from 'react';
|
|
20
|
+
import theme from "../style/themes/default/themeColor.module.less";
|
|
21
|
+
var iconMap = {
|
|
22
|
+
info: /*#__PURE__*/React.createElement(InfoCircleLine, {
|
|
23
|
+
fill: theme.B40,
|
|
24
|
+
size: 20
|
|
25
|
+
}),
|
|
26
|
+
success: /*#__PURE__*/React.createElement(CheckCircleDuotone, {
|
|
27
|
+
fill: [theme.SA40, theme.ND0],
|
|
28
|
+
theme: "multi-color",
|
|
29
|
+
size: 20
|
|
30
|
+
}),
|
|
31
|
+
error: /*#__PURE__*/React.createElement(CancelCircleDuotone, {
|
|
32
|
+
fill: [theme.SC40, theme.ND0],
|
|
33
|
+
size: 20,
|
|
34
|
+
theme: "multi-color"
|
|
35
|
+
}),
|
|
36
|
+
warning: /*#__PURE__*/React.createElement(AlertTriangleDuotone, {
|
|
37
|
+
fill: [theme.SB40, theme.ND0],
|
|
38
|
+
theme: "multi-color",
|
|
39
|
+
size: 20
|
|
40
|
+
})
|
|
41
|
+
};
|
|
42
|
+
var closeX = /*#__PURE__*/React.createElement(CloseMLine, {
|
|
43
|
+
size: 20,
|
|
44
|
+
fill: theme.NL40
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
var getSDefaultStyle = function getSDefaultStyle(type) {
|
|
48
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
49
|
+
padding: '16px 24px',
|
|
50
|
+
background: theme.SC95,
|
|
51
|
+
border: '1px solid',
|
|
52
|
+
borderRadius: '4px',
|
|
53
|
+
boxShadow: theme.SHADOW_LG
|
|
54
|
+
}, type === 'error' && {
|
|
55
|
+
background: theme.SC95,
|
|
56
|
+
borderColor: theme.SC60
|
|
57
|
+
}), type === 'success' && {
|
|
58
|
+
background: theme.SA95,
|
|
59
|
+
borderColor: theme.SA60
|
|
60
|
+
}), type === 'warning' && {
|
|
61
|
+
background: theme.SB95,
|
|
62
|
+
borderColor: theme.SB60
|
|
63
|
+
}), type === 'info' && {
|
|
64
|
+
background: theme.B95,
|
|
65
|
+
borderColor: theme.B60
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
var notification = {
|
|
70
|
+
open: function open(config) {
|
|
71
|
+
return AntdNotification.open(config);
|
|
72
|
+
},
|
|
73
|
+
success: function success(config) {
|
|
74
|
+
var _config$icon = config.icon,
|
|
75
|
+
icon = _config$icon === void 0 ? iconMap.success : _config$icon,
|
|
76
|
+
_config$className = config.className,
|
|
77
|
+
className = _config$className === void 0 ? classnames('ald-notification-notice', config.className) : _config$className,
|
|
78
|
+
_config$style = config.style,
|
|
79
|
+
style = _config$style === void 0 ? Object.assign(getSDefaultStyle('success'), config.style) : _config$style,
|
|
80
|
+
_config$closeIcon = config.closeIcon,
|
|
81
|
+
closeIcon = _config$closeIcon === void 0 ? closeX : _config$closeIcon,
|
|
82
|
+
rest = _objectWithoutProperties(config, _excluded);
|
|
83
|
+
|
|
84
|
+
return AntdNotification.success(_objectSpread({
|
|
85
|
+
icon: icon,
|
|
86
|
+
style: style,
|
|
87
|
+
className: className,
|
|
88
|
+
closeIcon: closeIcon
|
|
89
|
+
}, rest));
|
|
90
|
+
},
|
|
91
|
+
error: function error(config) {
|
|
92
|
+
var _config$icon2 = config.icon,
|
|
93
|
+
icon = _config$icon2 === void 0 ? iconMap.error : _config$icon2,
|
|
94
|
+
_config$className2 = config.className,
|
|
95
|
+
className = _config$className2 === void 0 ? classnames('ald-notification-notice', config.className) : _config$className2,
|
|
96
|
+
_config$style2 = config.style,
|
|
97
|
+
style = _config$style2 === void 0 ? Object.assign(getSDefaultStyle('error'), config.style) : _config$style2,
|
|
98
|
+
_config$closeIcon2 = config.closeIcon,
|
|
99
|
+
closeIcon = _config$closeIcon2 === void 0 ? closeX : _config$closeIcon2,
|
|
100
|
+
rest = _objectWithoutProperties(config, _excluded2);
|
|
101
|
+
|
|
102
|
+
return AntdNotification.error(_objectSpread({
|
|
103
|
+
icon: icon,
|
|
104
|
+
style: style,
|
|
105
|
+
className: className,
|
|
106
|
+
closeIcon: closeIcon
|
|
107
|
+
}, rest));
|
|
108
|
+
},
|
|
109
|
+
warning: function warning(config) {
|
|
110
|
+
var _config$icon3 = config.icon,
|
|
111
|
+
icon = _config$icon3 === void 0 ? iconMap.warning : _config$icon3,
|
|
112
|
+
_config$className3 = config.className,
|
|
113
|
+
className = _config$className3 === void 0 ? classnames('ald-notification-notice', config.className) : _config$className3,
|
|
114
|
+
_config$style3 = config.style,
|
|
115
|
+
style = _config$style3 === void 0 ? Object.assign(getSDefaultStyle('warning'), config.style) : _config$style3,
|
|
116
|
+
_config$closeIcon3 = config.closeIcon,
|
|
117
|
+
closeIcon = _config$closeIcon3 === void 0 ? closeX : _config$closeIcon3,
|
|
118
|
+
rest = _objectWithoutProperties(config, _excluded3);
|
|
119
|
+
|
|
120
|
+
return AntdNotification.warning(_objectSpread({
|
|
121
|
+
icon: icon,
|
|
122
|
+
style: style,
|
|
123
|
+
className: className,
|
|
124
|
+
closeIcon: closeIcon
|
|
125
|
+
}, rest));
|
|
126
|
+
},
|
|
127
|
+
info: function info(config) {
|
|
128
|
+
var _config$icon4 = config.icon,
|
|
129
|
+
icon = _config$icon4 === void 0 ? iconMap.info : _config$icon4,
|
|
130
|
+
_config$className4 = config.className,
|
|
131
|
+
className = _config$className4 === void 0 ? classnames('ald-notification-notice', config.className) : _config$className4,
|
|
132
|
+
_config$style4 = config.style,
|
|
133
|
+
style = _config$style4 === void 0 ? Object.assign(getSDefaultStyle('info'), config.style) : _config$style4,
|
|
134
|
+
_config$closeIcon4 = config.closeIcon,
|
|
135
|
+
closeIcon = _config$closeIcon4 === void 0 ? closeX : _config$closeIcon4,
|
|
136
|
+
rest = _objectWithoutProperties(config, _excluded4);
|
|
137
|
+
|
|
138
|
+
return AntdNotification.info(_objectSpread({
|
|
139
|
+
icon: icon,
|
|
140
|
+
style: style,
|
|
141
|
+
className: className,
|
|
142
|
+
closeIcon: closeIcon
|
|
143
|
+
}, rest));
|
|
144
|
+
},
|
|
145
|
+
destroy: function destroy(key) {
|
|
146
|
+
return AntdNotification.destroy(key);
|
|
147
|
+
}
|
|
148
|
+
};
|
|
2
149
|
export default notification;
|
|
@@ -1 +1,29 @@
|
|
|
1
1
|
@import '../../style/index.less';
|
|
2
|
+
|
|
3
|
+
.ald-notification-notice.ant-notification-notice {
|
|
4
|
+
.ant-notification-notice-icon {
|
|
5
|
+
top: 18px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.ant-notification-notice-message {
|
|
9
|
+
margin-inline-start: 28px;
|
|
10
|
+
padding-inline-end: 28px;
|
|
11
|
+
margin-bottom: 4px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ant-notification-notice-description {
|
|
15
|
+
margin-inline-start: 28px;
|
|
16
|
+
font-weight: 400;
|
|
17
|
+
font-size: 13px;
|
|
18
|
+
line-height: 20px;
|
|
19
|
+
color: @NL40;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.ant-notification-notice-close {
|
|
23
|
+
top: 17px;
|
|
24
|
+
|
|
25
|
+
&:hover{
|
|
26
|
+
background:none;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
@import './themeColor.module.less';
|
|
2
|
-
|
|
2
|
+
/* stylelint-disable-next-line at-rule-no-unknown */
|
|
3
|
+
@font-family:inter, -apple-system, PingFang SC, BlinkMacSystemFont,"Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji","Segoe UI Emoji", "Segoe UI Symbol";
|
|
3
4
|
@ald-prefix: ant;
|
|
4
5
|
|
|
5
|
-
|
|
6
6
|
// base 不分大小写情况
|
|
7
7
|
@border-radius-base: 8px;
|
|
8
|
-
@line-height-base:20px;
|
|
9
|
-
@font-size-base:14px;
|
|
8
|
+
@line-height-base: 20px;
|
|
9
|
+
@font-size-base: 14px;
|
|
10
10
|
|
|
11
11
|
// large
|
|
12
|
-
@font-size-large:16px;
|
|
13
|
-
@line-height-large:24px;
|
|
14
|
-
@padding-top-large:6px;
|
|
15
|
-
@padding-bottom-large:6px;
|
|
16
|
-
@padding-left-large:12px;
|
|
17
|
-
@padding-right-large:12px;
|
|
18
|
-
@border-radius-large:
|
|
12
|
+
@font-size-large: 16px;
|
|
13
|
+
@line-height-large: 24px;
|
|
14
|
+
@padding-top-large: 6px;
|
|
15
|
+
@padding-bottom-large: 6px;
|
|
16
|
+
@padding-left-large: 12px;
|
|
17
|
+
@padding-right-large: 12px;
|
|
18
|
+
@border-radius-large: 6px;
|
|
19
19
|
|
|
20
20
|
// middle
|
|
21
|
-
@font-size-middle:
|
|
22
|
-
@line-height-middle:20px;
|
|
23
|
-
@padding-top-middle:6px;
|
|
24
|
-
@padding-bottom-middle:6px;
|
|
25
|
-
@padding-left-middle:12px;
|
|
26
|
-
@padding-right-middle:12px;
|
|
27
|
-
@border-radius-middle:
|
|
21
|
+
@font-size-middle: 13px;
|
|
22
|
+
@line-height-middle: 20px;
|
|
23
|
+
@padding-top-middle: 6px;
|
|
24
|
+
@padding-bottom-middle: 6px;
|
|
25
|
+
@padding-left-middle: 12px;
|
|
26
|
+
@padding-right-middle: 12px;
|
|
27
|
+
@border-radius-middle: 4px;
|
|
28
28
|
|
|
29
29
|
// small
|
|
30
|
-
@font-size-small:12px;
|
|
31
|
-
@line-height-small:16px;
|
|
32
|
-
@padding-top-small:6px;
|
|
33
|
-
@padding-bottom-small:6px;
|
|
34
|
-
@padding-left-small:8px;
|
|
35
|
-
@padding-right-small:8px;
|
|
36
|
-
@border-radius-small:4px;
|
|
30
|
+
@font-size-small: 12px;
|
|
31
|
+
@line-height-small: 16px;
|
|
32
|
+
@padding-top-small: 6px;
|
|
33
|
+
@padding-bottom-small: 6px;
|
|
34
|
+
@padding-left-small: 8px;
|
|
35
|
+
@padding-right-small: 8px;
|
|
36
|
+
@border-radius-small: 4px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aloudata/aloudata-design",
|
|
3
|
-
"version": "0.4.8-beta.
|
|
3
|
+
"version": "0.4.8-beta.10",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
]
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@aloudata/icons-react": "0.1.
|
|
54
|
-
"@aloudata/icons-svg": "0.1.
|
|
53
|
+
"@aloudata/icons-react": "0.1.7",
|
|
54
|
+
"@aloudata/icons-svg": "0.1.7",
|
|
55
55
|
"antd": "5.2.0",
|
|
56
56
|
"memoize-one": "^6.0.0",
|
|
57
57
|
"rc-menu": "^9.8.0",
|