@aloudata/aloudata-design 2.6.3 → 2.7.1
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/Badge/index.d.ts +18 -3
- package/dist/Badge/index.js +45 -2
- package/dist/Badge/style/index.less +23 -0
- package/dist/Form/style/index.less +9 -3
- package/dist/OverflowCount/index.d.ts +28 -0
- package/dist/OverflowCount/index.js +77 -0
- package/dist/OverflowCount/style/index.d.ts +2 -0
- package/dist/OverflowCount/style/index.js +2 -0
- package/dist/OverflowCount/style/index.less +51 -0
- package/dist/Switch/style/index.less +4 -0
- package/dist/Table/style/index.less +48 -51
- package/dist/Tabs/style/index.less +1 -1
- package/dist/Tag/index.d.ts +37 -3
- package/dist/Tag/index.js +82 -2
- package/dist/Tag/style/index.less +66 -0
- package/dist/ald.min.css +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -0
- package/dist/index.less +1 -0
- package/dist/style/index.less +2 -0
- package/package.json +2 -1
package/dist/Badge/index.d.ts
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
export
|
|
3
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface BadgeProps {
|
|
3
|
+
/**
|
|
4
|
+
* 展示的文本内容
|
|
5
|
+
*/
|
|
6
|
+
count: string | number;
|
|
7
|
+
/**
|
|
8
|
+
* 状态
|
|
9
|
+
*/
|
|
10
|
+
status?: 'success' | 'error' | 'default' | 'info' | 'warning';
|
|
11
|
+
/**
|
|
12
|
+
* 大小
|
|
13
|
+
*/
|
|
14
|
+
size?: 'default' | 'large';
|
|
15
|
+
className?: string;
|
|
16
|
+
onClick?: React.MouseEventHandler;
|
|
17
|
+
}
|
|
18
|
+
export default function Badge(props: BadgeProps): React.JSX.Element;
|
package/dist/Badge/index.js
CHANGED
|
@@ -1,2 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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); }
|
|
2
|
+
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; }
|
|
3
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
4
|
+
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); }
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
export default function Badge(props) {
|
|
8
|
+
var _classNames;
|
|
9
|
+
var count = props.count,
|
|
10
|
+
_props$status = props.status,
|
|
11
|
+
status = _props$status === void 0 ? 'default' : _props$status,
|
|
12
|
+
size = props.size,
|
|
13
|
+
className = props.className,
|
|
14
|
+
onClick = props.onClick;
|
|
15
|
+
var status2ColorMap = {
|
|
16
|
+
success: {
|
|
17
|
+
color: '#15803D',
|
|
18
|
+
backgroundColor: '#BBF7D0'
|
|
19
|
+
},
|
|
20
|
+
error: {
|
|
21
|
+
color: '#B91C1C',
|
|
22
|
+
backgroundColor: '#FECACA'
|
|
23
|
+
},
|
|
24
|
+
default: {
|
|
25
|
+
color: '#374151',
|
|
26
|
+
backgroundColor: '#E5E7EB'
|
|
27
|
+
},
|
|
28
|
+
info: {
|
|
29
|
+
color: '#0F59B1',
|
|
30
|
+
backgroundColor: '#A9CFFB'
|
|
31
|
+
},
|
|
32
|
+
warning: {
|
|
33
|
+
color: '#A16207',
|
|
34
|
+
backgroundColor: '#FEF08A'
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
38
|
+
className: classNames('ald-badge', (_classNames = {}, _defineProperty(_classNames, 'ald-badge-large', size === 'large'), _defineProperty(_classNames, 'ald-badge-clickable', typeof onClick === 'function'), _classNames), className),
|
|
39
|
+
style: {
|
|
40
|
+
color: status2ColorMap[status].color,
|
|
41
|
+
backgroundColor: status2ColorMap[status].backgroundColor
|
|
42
|
+
},
|
|
43
|
+
onClick: onClick
|
|
44
|
+
}, count);
|
|
45
|
+
}
|
|
@@ -1 +1,24 @@
|
|
|
1
1
|
@import '../../style/index.less';
|
|
2
|
+
|
|
3
|
+
.ald-badge {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
padding: var(--alias-padding-25, 2px) var(--alias-padding-75, 6px);
|
|
6
|
+
align-items: center;
|
|
7
|
+
min-width: 20px;
|
|
8
|
+
height: 20px;
|
|
9
|
+
border-radius: 99px;
|
|
10
|
+
font-size: 12px;
|
|
11
|
+
line-height: 16px;
|
|
12
|
+
font-weight: 500;
|
|
13
|
+
|
|
14
|
+
&.ald-badge-large {
|
|
15
|
+
font-size: 14px;
|
|
16
|
+
line-height: 20px;
|
|
17
|
+
min-width: 24px;
|
|
18
|
+
height: 24px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&.ald-badge-clickable {
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
.ant-form {
|
|
4
4
|
&.ant-form {
|
|
5
5
|
font-size: 14px;
|
|
6
|
+
|
|
7
|
+
&.ant-form-vertical {
|
|
8
|
+
.ant-form-item {
|
|
9
|
+
.ant-form-item-label label {
|
|
10
|
+
font-size: 12px;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
6
14
|
}
|
|
7
15
|
|
|
8
16
|
.ant-form-item {
|
|
@@ -33,9 +41,7 @@
|
|
|
33
41
|
margin-left: var(--alias-spacing-25, 2px);
|
|
34
42
|
}
|
|
35
43
|
|
|
36
|
-
&.ant-form-item-required
|
|
37
|
-
.ant-form-item-required-mark-optional
|
|
38
|
-
)::before {
|
|
44
|
+
&.ant-form-item-required::before {
|
|
39
45
|
width: 8px;
|
|
40
46
|
margin-right: var(--alias-spacing-25, 2px);
|
|
41
47
|
color: var(--alias-colors-text-danger, #b91c1c);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BadgeProps } from '../Badge';
|
|
3
|
+
interface OverflowCountProps<T> {
|
|
4
|
+
/**
|
|
5
|
+
* 数据
|
|
6
|
+
*/
|
|
7
|
+
data: T[];
|
|
8
|
+
/**
|
|
9
|
+
* 渲染单条数据的方法
|
|
10
|
+
*/
|
|
11
|
+
renderItem: (item: T) => React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* 徽标样式
|
|
14
|
+
*/
|
|
15
|
+
badge?: Omit<BadgeProps, 'count'>;
|
|
16
|
+
/**
|
|
17
|
+
* 浮窗样式
|
|
18
|
+
*/
|
|
19
|
+
popupClassName?: string;
|
|
20
|
+
/**
|
|
21
|
+
* 后缀元素
|
|
22
|
+
*/
|
|
23
|
+
suffix?: React.ReactNode;
|
|
24
|
+
size?: 'small' | 'default';
|
|
25
|
+
}
|
|
26
|
+
declare function OverflowCount<T = unknown>(props: OverflowCountProps<T>): React.JSX.Element;
|
|
27
|
+
export default OverflowCount;
|
|
28
|
+
export declare function prefixCls(className: string): string;
|
|
@@ -0,0 +1,77 @@
|
|
|
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); }
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
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; }
|
|
4
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
5
|
+
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); }
|
|
6
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
7
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
8
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
9
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
10
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
11
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
+
import classNames from 'classnames';
|
|
13
|
+
import Overflow from 'rc-overflow';
|
|
14
|
+
import React, { useCallback, useState } from 'react';
|
|
15
|
+
import Badge from "../Badge";
|
|
16
|
+
import Popover from "../Popover";
|
|
17
|
+
function OverflowCount(props) {
|
|
18
|
+
var data = props.data,
|
|
19
|
+
propsRenderItem = props.renderItem,
|
|
20
|
+
_props$popupClassName = props.popupClassName,
|
|
21
|
+
popupClassName = _props$popupClassName === void 0 ? '' : _props$popupClassName,
|
|
22
|
+
badge = props.badge,
|
|
23
|
+
size = props.size,
|
|
24
|
+
suffix = props.suffix;
|
|
25
|
+
var _useState = useState(false),
|
|
26
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
27
|
+
isPopupOpen = _useState2[0],
|
|
28
|
+
setIsPopupOpen = _useState2[1];
|
|
29
|
+
var itemClassName = classNames(prefixCls('item'), _defineProperty({}, prefixCls('item-small'), size === 'small'));
|
|
30
|
+
var renderItem = useCallback(function (item) {
|
|
31
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
32
|
+
className: itemClassName
|
|
33
|
+
}, propsRenderItem(item));
|
|
34
|
+
}, [propsRenderItem, itemClassName]);
|
|
35
|
+
var renderRest = useCallback(function (omittedItems) {
|
|
36
|
+
var itemNodes = omittedItems.map(function (item, index) {
|
|
37
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
38
|
+
key: index,
|
|
39
|
+
className: itemClassName
|
|
40
|
+
}, propsRenderItem(item));
|
|
41
|
+
});
|
|
42
|
+
if (omittedItems.length === 0) {
|
|
43
|
+
// 因为没有其他 api 监听超过的量的变化,只能在 render 阶段处理
|
|
44
|
+
setIsPopupOpen(false);
|
|
45
|
+
}
|
|
46
|
+
return /*#__PURE__*/React.createElement(Popover, {
|
|
47
|
+
content: /*#__PURE__*/React.createElement("div", {
|
|
48
|
+
className: classNames(prefixCls('popup-container'), _defineProperty({}, prefixCls('popup-container-small'), size === 'small'), popupClassName)
|
|
49
|
+
}, itemNodes),
|
|
50
|
+
trigger: 'hover',
|
|
51
|
+
open: isPopupOpen,
|
|
52
|
+
onOpenChange: function onOpenChange(open) {
|
|
53
|
+
return setIsPopupOpen(open);
|
|
54
|
+
}
|
|
55
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
56
|
+
className: prefixCls('rest-btn')
|
|
57
|
+
}, /*#__PURE__*/React.createElement(Badge, _extends({
|
|
58
|
+
count: "+".concat(omittedItems.length),
|
|
59
|
+
status: "info"
|
|
60
|
+
}, badge))));
|
|
61
|
+
}, [badge, popupClassName, propsRenderItem, itemClassName, size, isPopupOpen]);
|
|
62
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
63
|
+
className: classNames(prefixCls('container'))
|
|
64
|
+
}, /*#__PURE__*/React.createElement(Overflow, {
|
|
65
|
+
data: data,
|
|
66
|
+
renderItem: renderItem,
|
|
67
|
+
renderRest: renderRest,
|
|
68
|
+
maxCount: "responsive",
|
|
69
|
+
className: prefixCls('overflow'),
|
|
70
|
+
suffix: suffix
|
|
71
|
+
}));
|
|
72
|
+
}
|
|
73
|
+
export default OverflowCount;
|
|
74
|
+
var ALD_PREFIX = 'ald-overflow-count';
|
|
75
|
+
export function prefixCls(className) {
|
|
76
|
+
return "".concat(ALD_PREFIX, "-").concat(className);
|
|
77
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
@import '../../style/index.less';
|
|
2
|
+
@import '../../Badge/style/index.less';
|
|
3
|
+
@import '../../Popover/style/index.less';
|
|
4
|
+
|
|
5
|
+
.ald-overflow-count-container {
|
|
6
|
+
width: 100%;
|
|
7
|
+
|
|
8
|
+
.ald-overflow-count-overflow {
|
|
9
|
+
display: flex;
|
|
10
|
+
position: relative;
|
|
11
|
+
flex-wrap: wrap;
|
|
12
|
+
max-width: 100%;
|
|
13
|
+
align-items: center;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.ald-overflow-count-rest-btn {
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.rc-overflow-item,
|
|
23
|
+
.rc-overflow-item-rest,
|
|
24
|
+
.rc-overflow-item-suffix {
|
|
25
|
+
display: flex;
|
|
26
|
+
height: 100%;
|
|
27
|
+
align-items: center;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.ald-overflow-count-item {
|
|
32
|
+
padding-right: 6px;
|
|
33
|
+
|
|
34
|
+
&.ald-overflow-count-small {
|
|
35
|
+
padding-right: 4px;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.ald-overflow-count-popup-container {
|
|
40
|
+
width: 360px;
|
|
41
|
+
max-height: 300px;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
overflow-y: auto;
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-wrap: wrap;
|
|
46
|
+
row-gap: 6px;
|
|
47
|
+
|
|
48
|
+
&.ald-overflow-count-popup-container-small {
|
|
49
|
+
row-gap: 4px;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -6,27 +6,24 @@
|
|
|
6
6
|
|
|
7
7
|
@header-height: 40px;
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
.@{ald}container {
|
|
9
|
+
.ald-table-container {
|
|
12
10
|
display: flex;
|
|
13
11
|
flex-direction: column;
|
|
14
12
|
width: 100%;
|
|
15
13
|
}
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
.ald-table-main {
|
|
18
16
|
width: 100%;
|
|
19
17
|
font-size: 13px;
|
|
20
18
|
line-height: 20px;
|
|
21
19
|
background: #fff;
|
|
22
|
-
color: var(--alias-colors-text-subtle, #4b5563);
|
|
23
20
|
|
|
24
|
-
|
|
21
|
+
.ald-table-content {
|
|
25
22
|
display: flex;
|
|
26
23
|
flex-direction: column;
|
|
27
24
|
border-spacing: 0;
|
|
28
25
|
|
|
29
|
-
|
|
26
|
+
.ald-table-spin {
|
|
30
27
|
position: absolute;
|
|
31
28
|
top: 0;
|
|
32
29
|
left: 0;
|
|
@@ -40,7 +37,7 @@
|
|
|
40
37
|
}
|
|
41
38
|
}
|
|
42
39
|
|
|
43
|
-
|
|
40
|
+
.ald-table-spin-mask {
|
|
44
41
|
position: absolute;
|
|
45
42
|
top: 0;
|
|
46
43
|
left: 0;
|
|
@@ -52,7 +49,7 @@
|
|
|
52
49
|
}
|
|
53
50
|
}
|
|
54
51
|
|
|
55
|
-
|
|
52
|
+
.ald-table-resizer {
|
|
56
53
|
position: absolute;
|
|
57
54
|
right: 0;
|
|
58
55
|
top: 0;
|
|
@@ -76,36 +73,36 @@
|
|
|
76
73
|
}
|
|
77
74
|
}
|
|
78
75
|
|
|
79
|
-
|
|
76
|
+
.ald-table-overflow-x {
|
|
80
77
|
overflow-x: hidden;
|
|
81
78
|
}
|
|
82
79
|
|
|
83
|
-
|
|
80
|
+
.ald-table-tr {
|
|
84
81
|
display: flex;
|
|
85
82
|
}
|
|
86
83
|
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
.ald-table-th,
|
|
85
|
+
.ald-table-td {
|
|
89
86
|
position: relative;
|
|
90
87
|
border-bottom: 1px solid var(--alias-colors-border-subtle, #f3f4f6);
|
|
91
88
|
flex: 0 0 auto;
|
|
92
89
|
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
&.ald-table-fixed-left,
|
|
91
|
+
&.ald-table-fixed-right {
|
|
95
92
|
position: sticky;
|
|
96
93
|
z-index: 2;
|
|
97
94
|
}
|
|
98
95
|
}
|
|
99
96
|
|
|
100
|
-
|
|
101
|
-
|
|
97
|
+
.ald-table-no-border-tr {
|
|
98
|
+
.ald-table-td {
|
|
102
99
|
border-bottom: none;
|
|
103
100
|
}
|
|
104
101
|
}
|
|
105
102
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
.ald-table-td {
|
|
104
|
+
&.ald-table-fixed-left,
|
|
105
|
+
&.ald-table-fixed-right {
|
|
109
106
|
background-color: #fff;
|
|
110
107
|
}
|
|
111
108
|
}
|
|
@@ -140,23 +137,23 @@
|
|
|
140
137
|
}
|
|
141
138
|
}
|
|
142
139
|
|
|
143
|
-
|
|
144
|
-
|
|
140
|
+
&.ald-table-ping-left {
|
|
141
|
+
.ald-table-fixed-left {
|
|
145
142
|
.fixed-left-shadow();
|
|
146
143
|
}
|
|
147
144
|
}
|
|
148
145
|
|
|
149
|
-
|
|
150
|
-
|
|
146
|
+
&.ald-table-ping-right {
|
|
147
|
+
.ald-table-fixed-right {
|
|
151
148
|
.fixed-right-shadow();
|
|
152
149
|
}
|
|
153
150
|
}
|
|
154
151
|
|
|
155
|
-
|
|
152
|
+
.ald-table-th {
|
|
156
153
|
background: var(--alias-colors-bg-skeleton-strong, #f3f4f6);
|
|
157
154
|
}
|
|
158
155
|
|
|
159
|
-
|
|
156
|
+
.ald-table-th-default {
|
|
160
157
|
font-weight: 500;
|
|
161
158
|
line-height: 16px;
|
|
162
159
|
padding: @td-padding-size;
|
|
@@ -168,9 +165,9 @@
|
|
|
168
165
|
color: var(--alias-colors-text-subtle, #4b5563);
|
|
169
166
|
}
|
|
170
167
|
|
|
171
|
-
|
|
168
|
+
.ald-table-td-default {
|
|
172
169
|
line-height: 20px;
|
|
173
|
-
padding
|
|
170
|
+
padding: 0 @td-padding-size;
|
|
174
171
|
display: flex;
|
|
175
172
|
align-items: center;
|
|
176
173
|
height: 100%;
|
|
@@ -179,27 +176,27 @@
|
|
|
179
176
|
overflow: hidden;
|
|
180
177
|
}
|
|
181
178
|
|
|
182
|
-
|
|
179
|
+
.ald-table-td-ellipsis-content {
|
|
183
180
|
overflow: hidden;
|
|
184
181
|
text-overflow: ellipsis;
|
|
185
182
|
white-space: nowrap;
|
|
186
183
|
}
|
|
187
184
|
|
|
188
|
-
|
|
185
|
+
.ald-table-sticky {
|
|
189
186
|
position: sticky;
|
|
190
187
|
top: 0;
|
|
191
188
|
// 需要大于 Spin 的 z-index,Spin 的 z-index 为4
|
|
192
189
|
z-index: 5;
|
|
193
190
|
}
|
|
194
191
|
|
|
195
|
-
|
|
192
|
+
.ald-table-body {
|
|
196
193
|
min-height: 96px;
|
|
197
194
|
|
|
198
|
-
|
|
199
|
-
|
|
195
|
+
.ald-table-tr {
|
|
196
|
+
&.ald-table-row-hover:hover {
|
|
200
197
|
cursor: pointer;
|
|
201
198
|
|
|
202
|
-
|
|
199
|
+
.ald-table-td {
|
|
203
200
|
background-color: var(
|
|
204
201
|
--alias-colors-bg-interaction-hover,
|
|
205
202
|
rgba(0, 0, 0, 0.05)
|
|
@@ -212,21 +209,21 @@
|
|
|
212
209
|
@td-padding-size: 16px;
|
|
213
210
|
|
|
214
211
|
/** Tree Table **/
|
|
215
|
-
|
|
212
|
+
.ald-table-expandable-td {
|
|
216
213
|
display: flex;
|
|
217
214
|
width: 100%;
|
|
218
215
|
align-items: center;
|
|
219
216
|
padding-left: @td-padding-size;
|
|
220
217
|
|
|
221
|
-
|
|
218
|
+
.ald-table-indent-list {
|
|
222
219
|
display: flex;
|
|
223
220
|
}
|
|
224
221
|
|
|
225
|
-
|
|
222
|
+
.ald-table-indent-item {
|
|
226
223
|
width: 10px;
|
|
227
224
|
}
|
|
228
225
|
|
|
229
|
-
|
|
226
|
+
.ald-table-expand-btn {
|
|
230
227
|
width: 16px;
|
|
231
228
|
cursor: pointer;
|
|
232
229
|
margin-right: 6px;
|
|
@@ -235,13 +232,13 @@
|
|
|
235
232
|
align-items: center;
|
|
236
233
|
}
|
|
237
234
|
|
|
238
|
-
|
|
235
|
+
.ald-table-td-default {
|
|
239
236
|
padding-left: 0;
|
|
240
237
|
}
|
|
241
238
|
}
|
|
242
239
|
}
|
|
243
240
|
|
|
244
|
-
|
|
241
|
+
.ald-table-align {
|
|
245
242
|
&-left {
|
|
246
243
|
text-align: left;
|
|
247
244
|
justify-content: left;
|
|
@@ -258,34 +255,34 @@
|
|
|
258
255
|
}
|
|
259
256
|
}
|
|
260
257
|
|
|
261
|
-
|
|
258
|
+
.ald-table-pagination {
|
|
262
259
|
padding-top: 16px;
|
|
263
260
|
display: flex;
|
|
264
261
|
justify-content: end;
|
|
265
262
|
border-top: 1px solid var(--alias-colors-border-default, #e5e7eb);
|
|
266
263
|
}
|
|
267
264
|
|
|
268
|
-
|
|
265
|
+
.ald-table-loading {
|
|
269
266
|
position: absolute;
|
|
270
267
|
top: 50%;
|
|
271
268
|
left: 50%;
|
|
272
269
|
transform: translate(-50%, -50%);
|
|
273
270
|
|
|
274
|
-
|
|
271
|
+
.ald-table-loading-inner {
|
|
275
272
|
width: 100%;
|
|
276
273
|
}
|
|
277
274
|
}
|
|
278
275
|
|
|
279
|
-
|
|
276
|
+
.ald-table-overflow-hidden {
|
|
280
277
|
overflow: hidden;
|
|
281
278
|
height: 100%;
|
|
282
279
|
}
|
|
283
280
|
|
|
284
|
-
|
|
281
|
+
.ald-table-header {
|
|
285
282
|
background-color: #fff;
|
|
286
283
|
}
|
|
287
284
|
|
|
288
|
-
|
|
285
|
+
.ald-table-header-scroll-placeholder {
|
|
289
286
|
height: @header-height;
|
|
290
287
|
position: sticky;
|
|
291
288
|
right: 0;
|
|
@@ -294,24 +291,24 @@
|
|
|
294
291
|
flex: 0 0 auto;
|
|
295
292
|
}
|
|
296
293
|
|
|
297
|
-
|
|
294
|
+
.ald-table-body-scroll {
|
|
298
295
|
overflow: auto;
|
|
299
296
|
height: 100%;
|
|
300
297
|
|
|
301
|
-
|
|
298
|
+
&.ald-table-scroll-y {
|
|
302
299
|
overflow-y: scroll;
|
|
303
300
|
}
|
|
304
301
|
|
|
305
|
-
|
|
302
|
+
&.ald-table-scroll-hidden {
|
|
306
303
|
overflow: hidden;
|
|
307
304
|
}
|
|
308
305
|
}
|
|
309
306
|
|
|
310
|
-
|
|
307
|
+
.ald-table-empty {
|
|
311
308
|
margin-top: 80px;
|
|
312
309
|
overflow: hidden;
|
|
313
310
|
|
|
314
|
-
|
|
311
|
+
&.ald-table-empty-small {
|
|
315
312
|
margin-top: 20px;
|
|
316
313
|
}
|
|
317
314
|
}
|
package/dist/Tag/index.d.ts
CHANGED
|
@@ -1,3 +1,37 @@
|
|
|
1
|
-
import
|
|
2
|
-
export
|
|
3
|
-
|
|
1
|
+
import React, { MouseEventHandler } from 'react';
|
|
2
|
+
export interface TagProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
onClick?: MouseEventHandler;
|
|
5
|
+
/**
|
|
6
|
+
* 是否可关闭
|
|
7
|
+
*/
|
|
8
|
+
closable?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* 关闭回调
|
|
11
|
+
*/
|
|
12
|
+
onClose?: MouseEventHandler;
|
|
13
|
+
status?: 'default' | 'info' | 'success' | 'warning' | 'error';
|
|
14
|
+
/**
|
|
15
|
+
* 自定义颜色
|
|
16
|
+
*/
|
|
17
|
+
color?: string;
|
|
18
|
+
/**
|
|
19
|
+
* icon 图标
|
|
20
|
+
*/
|
|
21
|
+
icon?: React.ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* 大小
|
|
24
|
+
*/
|
|
25
|
+
size?: 'large' | 'default' | 'small';
|
|
26
|
+
/**
|
|
27
|
+
* 风格,填充、默认、线框
|
|
28
|
+
*/
|
|
29
|
+
mode?: 'fill' | 'default' | 'border';
|
|
30
|
+
/**
|
|
31
|
+
* 是否禁用
|
|
32
|
+
*/
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
className?: string;
|
|
35
|
+
}
|
|
36
|
+
export default function Tag(props: TagProps): React.JSX.Element;
|
|
37
|
+
export declare function prefixCls(className: string): string;
|