@aloudata/aloudata-design 0.3.4 → 0.4.0-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/es/Icon/icons.json +688 -120
- package/es/Radio/components/Group/index.js +9 -7
- package/es/Radio/components/Radio/index.js +5 -5
- package/es/Radio/interface/radio.d.ts +1 -1
- package/es/Radio/interface/radioGroup.d.ts +3 -3
- package/es/Select/style/variables.less.d.ts +94 -4
- package/es/Table/Table.js +7 -5
- package/es/Table/components/Empty/index.js +1 -2
- package/es/Table/components/Loading/index.js +2 -3
- package/es/Table/components/TableBodyRowList/index.js +3 -1
- package/es/Table/interface.d.ts +1 -0
- package/es/Table/style/index.less +14 -9
- package/es/Table/style/variable.less +5 -0
- package/es/Table/style/variable.less.d.ts +7 -0
- package/es/Tabs/index.js +2 -2
- package/es/style/themes/default/themeColor.module.less +328 -104
- package/es/style/themes/default/themeColor.module.less.d.ts +94 -4
- package/lib/Icon/icons.json +688 -120
- package/lib/Radio/components/Group/index.js +9 -7
- package/lib/Radio/components/Radio/index.js +5 -5
- package/lib/Radio/interface/radio.d.ts +1 -1
- package/lib/Radio/interface/radioGroup.d.ts +3 -3
- package/lib/Select/style/variables.less.d.ts +94 -4
- package/lib/Table/Table.js +7 -5
- package/lib/Table/components/Empty/index.js +1 -3
- package/lib/Table/components/Loading/index.js +2 -4
- package/lib/Table/components/TableBodyRowList/index.js +3 -1
- package/lib/Table/interface.d.ts +1 -0
- package/lib/Table/style/index.less +14 -9
- package/lib/Table/style/variable.less +5 -0
- package/lib/Table/style/variable.less.d.ts +7 -0
- package/lib/Tabs/index.js +2 -2
- package/lib/style/themes/default/themeColor.module.less +328 -104
- package/lib/style/themes/default/themeColor.module.less.d.ts +94 -4
- package/package.json +2 -2
|
@@ -54,16 +54,18 @@ function RadioGroup(props) {
|
|
|
54
54
|
}),
|
|
55
55
|
_useMergedState2 = _slicedToArray(_useMergedState, 2),
|
|
56
56
|
value = _useMergedState2[0],
|
|
57
|
-
setValue = _useMergedState2[1];
|
|
57
|
+
setValue = _useMergedState2[1]; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
var val = ev.target.value;
|
|
62
|
-
|
|
59
|
+
|
|
60
|
+
var onRadioChange = function onRadioChange(selectedValue) {
|
|
61
|
+
var lastValue = value; // const val = ev.target.value;
|
|
62
|
+
// console.log(selectValue);
|
|
63
|
+
|
|
64
|
+
setValue(selectedValue);
|
|
63
65
|
var onChange = props.onChange;
|
|
64
66
|
|
|
65
|
-
if (onChange &&
|
|
66
|
-
onChange(
|
|
67
|
+
if (onChange && selectedValue !== lastValue) {
|
|
68
|
+
onChange(selectedValue);
|
|
67
69
|
}
|
|
68
70
|
};
|
|
69
71
|
|
|
@@ -30,8 +30,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
30
30
|
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; }
|
|
31
31
|
|
|
32
32
|
function Radio(props) {
|
|
33
|
-
var _props$value;
|
|
34
|
-
|
|
35
33
|
var groupContext = (0, _react.useContext)(_Group.RadioGroupContext);
|
|
36
34
|
var labelRef = (0, _react.useRef)(null);
|
|
37
35
|
var id = (0, _useId.getUUID)().toString();
|
|
@@ -87,9 +85,11 @@ function Radio(props) {
|
|
|
87
85
|
}
|
|
88
86
|
}, [groupContext.sliderRef, radioProps.checked]);
|
|
89
87
|
|
|
90
|
-
var onChange = function onChange(
|
|
88
|
+
var onChange = function onChange() {
|
|
91
89
|
if (groupContext === null || groupContext === void 0 ? void 0 : groupContext.onChange) {
|
|
92
|
-
|
|
90
|
+
// console.log(e);
|
|
91
|
+
// input事件的value会被toString,所以此处进行一个覆盖
|
|
92
|
+
groupContext.onChange(props.value);
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
95
|
|
|
@@ -105,7 +105,7 @@ function Radio(props) {
|
|
|
105
105
|
className: "ald-radio-input",
|
|
106
106
|
checked: radioProps.checked,
|
|
107
107
|
disabled: radioProps.disabled,
|
|
108
|
-
value:
|
|
108
|
+
value: props.value,
|
|
109
109
|
onChange: onChange
|
|
110
110
|
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
111
111
|
className: "ald-radio-inner"
|
|
@@ -12,7 +12,7 @@ export interface IRadioGroupProps {
|
|
|
12
12
|
* @description 按钮组的默认选项,按钮组为非受控组件请勿使用value设置默认值
|
|
13
13
|
* @default -
|
|
14
14
|
*/
|
|
15
|
-
defaultValue?:
|
|
15
|
+
defaultValue?: any;
|
|
16
16
|
/**
|
|
17
17
|
* @description 设置按钮组的大小,有'large' | 'middle'('default') | 'small
|
|
18
18
|
* @default 'middle'
|
|
@@ -22,12 +22,12 @@ export interface IRadioGroupProps {
|
|
|
22
22
|
* @description 当按钮组为受控组件时,设置按钮组的当前选中的值
|
|
23
23
|
* @default -
|
|
24
24
|
*/
|
|
25
|
-
value?:
|
|
25
|
+
value?: any;
|
|
26
26
|
/**
|
|
27
27
|
* @description 当按钮组选中值变化时的回调函数
|
|
28
28
|
* @default -
|
|
29
29
|
*/
|
|
30
|
-
onChange?: (
|
|
30
|
+
onChange?: (selectedValue: any) => void;
|
|
31
31
|
/**
|
|
32
32
|
* @description 设置按钮组的类型 'radio' | 'button' | 'iconButton'
|
|
33
33
|
* @default 'radio'
|
|
@@ -25,9 +25,6 @@ interface CssExports {
|
|
|
25
25
|
'BG90': string;
|
|
26
26
|
'BG95': string;
|
|
27
27
|
'BG97': string;
|
|
28
|
-
'BLACK': string;
|
|
29
|
-
'IMAGE_HOLDER': string;
|
|
30
|
-
'MATE': string;
|
|
31
28
|
'ND0': string;
|
|
32
29
|
'ND10': string;
|
|
33
30
|
'ND20': string;
|
|
@@ -93,8 +90,101 @@ interface CssExports {
|
|
|
93
90
|
'SELECTOR_PADDING_HORIZONTAL_MIDDLE': string;
|
|
94
91
|
'SELECTOR_PADDING_HORIZONTAL_MINI': string;
|
|
95
92
|
'SELECTOR_PADDING_HORIZONTAL_SMALL': string;
|
|
93
|
+
'SHADOW_BODY_TOP_LEFT': string;
|
|
96
94
|
'SHADOW_L': string;
|
|
97
|
-
'
|
|
95
|
+
'SHADOW_LG': string;
|
|
96
|
+
'SHADOW_MD': string;
|
|
97
|
+
'SHADOW_SM': string;
|
|
98
|
+
'SHADOW_XL': string;
|
|
99
|
+
'SHADOW_XS': string;
|
|
100
|
+
'TA10': string;
|
|
101
|
+
'TA20': string;
|
|
102
|
+
'TA30': string;
|
|
103
|
+
'TA40': string;
|
|
104
|
+
'TA50': string;
|
|
105
|
+
'TA60': string;
|
|
106
|
+
'TA70': string;
|
|
107
|
+
'TA80': string;
|
|
108
|
+
'TA90': string;
|
|
109
|
+
'TA95': string;
|
|
110
|
+
'TA98': string;
|
|
111
|
+
'TB10': string;
|
|
112
|
+
'TB20': string;
|
|
113
|
+
'TB30': string;
|
|
114
|
+
'TB40': string;
|
|
115
|
+
'TB50': string;
|
|
116
|
+
'TB60': string;
|
|
117
|
+
'TB70': string;
|
|
118
|
+
'TB80': string;
|
|
119
|
+
'TB90': string;
|
|
120
|
+
'TB95': string;
|
|
121
|
+
'TB98': string;
|
|
122
|
+
'TC10': string;
|
|
123
|
+
'TC20': string;
|
|
124
|
+
'TC30': string;
|
|
125
|
+
'TC40': string;
|
|
126
|
+
'TC50': string;
|
|
127
|
+
'TC60': string;
|
|
128
|
+
'TC70': string;
|
|
129
|
+
'TC80': string;
|
|
130
|
+
'TC90': string;
|
|
131
|
+
'TC95': string;
|
|
132
|
+
'TC98': string;
|
|
133
|
+
'TD10': string;
|
|
134
|
+
'TD20': string;
|
|
135
|
+
'TD30': string;
|
|
136
|
+
'TD40': string;
|
|
137
|
+
'TD50': string;
|
|
138
|
+
'TD60': string;
|
|
139
|
+
'TD70': string;
|
|
140
|
+
'TD80': string;
|
|
141
|
+
'TD90': string;
|
|
142
|
+
'TD95': string;
|
|
143
|
+
'TD98': string;
|
|
144
|
+
'TE10': string;
|
|
145
|
+
'TE20': string;
|
|
146
|
+
'TE30': string;
|
|
147
|
+
'TE40': string;
|
|
148
|
+
'TE50': string;
|
|
149
|
+
'TE60': string;
|
|
150
|
+
'TE70': string;
|
|
151
|
+
'TE80': string;
|
|
152
|
+
'TE90': string;
|
|
153
|
+
'TE95': string;
|
|
154
|
+
'TE98': string;
|
|
155
|
+
'TF10': string;
|
|
156
|
+
'TF20': string;
|
|
157
|
+
'TF30': string;
|
|
158
|
+
'TF40': string;
|
|
159
|
+
'TF50': string;
|
|
160
|
+
'TF60': string;
|
|
161
|
+
'TF70': string;
|
|
162
|
+
'TF80': string;
|
|
163
|
+
'TF90': string;
|
|
164
|
+
'TF95': string;
|
|
165
|
+
'TF98': string;
|
|
166
|
+
'TG10': string;
|
|
167
|
+
'TG20': string;
|
|
168
|
+
'TG30': string;
|
|
169
|
+
'TG40': string;
|
|
170
|
+
'TG50': string;
|
|
171
|
+
'TG60': string;
|
|
172
|
+
'TG70': string;
|
|
173
|
+
'TG80': string;
|
|
174
|
+
'TG90': string;
|
|
175
|
+
'TG95': string;
|
|
176
|
+
'TG98': string;
|
|
177
|
+
'TH10': string;
|
|
178
|
+
'TH20': string;
|
|
179
|
+
'TH30': string;
|
|
180
|
+
'TH40': string;
|
|
181
|
+
'TH50': string;
|
|
182
|
+
'TH60': string;
|
|
183
|
+
'TH70': string;
|
|
184
|
+
'TH80': string;
|
|
185
|
+
'TH90': string;
|
|
186
|
+
'TH95': string;
|
|
187
|
+
'TH98': string;
|
|
98
188
|
}
|
|
99
189
|
export const cssExports: CssExports;
|
|
100
190
|
export default cssExports;
|
package/lib/Table/Table.js
CHANGED
|
@@ -57,14 +57,15 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
57
57
|
|
|
58
58
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
59
59
|
|
|
60
|
-
var
|
|
60
|
+
var tableHeadRowHeight = 44;
|
|
61
61
|
var SCROLLBAR_SIZE = 15;
|
|
62
62
|
var ZERO = 0;
|
|
63
63
|
|
|
64
64
|
function Table(props, ref) {
|
|
65
65
|
var _classnames3;
|
|
66
66
|
|
|
67
|
-
var
|
|
67
|
+
var tableKey = props.key,
|
|
68
|
+
columns = props.columns,
|
|
68
69
|
data = props.data,
|
|
69
70
|
onRowSelected = props.onRowSelected,
|
|
70
71
|
loadMore = props.loadMore,
|
|
@@ -357,7 +358,7 @@ function Table(props, ref) {
|
|
|
357
358
|
style: {
|
|
358
359
|
overflow: 'overlay',
|
|
359
360
|
overflowX: tableClientWidth + SCROLLBAR_SIZE > columnsTotalWidthRef.current ? 'hidden' : 'unset',
|
|
360
|
-
height: tableClientHeight -
|
|
361
|
+
height: tableClientHeight - tableHeadRowHeight
|
|
361
362
|
},
|
|
362
363
|
ref: tableBodyRef,
|
|
363
364
|
onScroll: onBodyScroll
|
|
@@ -365,12 +366,12 @@ function Table(props, ref) {
|
|
|
365
366
|
};
|
|
366
367
|
|
|
367
368
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
368
|
-
className: (0, _classnames4.default)("".concat(prefixCls, "-inner-wrap"), _defineProperty({}, "".concat(prefixCls, "-innerScroll"), height))
|
|
369
|
+
className: (0, _classnames4.default)("".concat(prefixCls, "-inner-wrap"), _defineProperty({}, "".concat(prefixCls, "-innerScroll"), !!height))
|
|
369
370
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
370
371
|
ref: tableHeadRef,
|
|
371
372
|
className: "".concat(prefixCls, "-tableHeadScrollWrap")
|
|
372
373
|
}, tableHeadNode), /*#__PURE__*/_react.default.createElement("div", Object.assign({}, getTableBodyProps(), {
|
|
373
|
-
className: (0, _classnames4.default)("".concat(prefixCls, "-tbody"), _defineProperty({}, "".concat(prefixCls, "-tbody-innerScroll"), height))
|
|
374
|
+
className: (0, _classnames4.default)("".concat(prefixCls, "-tbody"), _defineProperty({}, "".concat(prefixCls, "-tbody-innerScroll"), !!height))
|
|
374
375
|
}), renderNoHeightTableBody()));
|
|
375
376
|
};
|
|
376
377
|
|
|
@@ -382,6 +383,7 @@ function Table(props, ref) {
|
|
|
382
383
|
setTableClientHeight(clientHeight);
|
|
383
384
|
}
|
|
384
385
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
386
|
+
key: tableKey,
|
|
385
387
|
className: prefixCls,
|
|
386
388
|
ref: tableRef,
|
|
387
389
|
style: {
|
|
@@ -7,8 +7,6 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
-
|
|
12
10
|
var _usePrefixCls = _interopRequireDefault(require("../../../_utils/hooks/usePrefixCls"));
|
|
13
11
|
|
|
14
12
|
var _Empty = _interopRequireDefault(require("../../../Empty"));
|
|
@@ -18,7 +16,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
18
16
|
function LoadingNode() {
|
|
19
17
|
var prefixCls = (0, _usePrefixCls.default)('', 'ald-table');
|
|
20
18
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
21
|
-
className:
|
|
19
|
+
className: "".concat(prefixCls, "-empty-icon")
|
|
22
20
|
}, /*#__PURE__*/_react.default.createElement(_Empty.default, {
|
|
23
21
|
title: "No Data",
|
|
24
22
|
size: "large",
|
|
@@ -11,8 +11,6 @@ var _LoadingLine2 = _interopRequireDefault(require("@aloudata/icons-react/es/ico
|
|
|
11
11
|
|
|
12
12
|
var _react = _interopRequireDefault(require("react"));
|
|
13
13
|
|
|
14
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
-
|
|
16
14
|
var _usePrefixCls = _interopRequireDefault(require("../../../_utils/hooks/usePrefixCls"));
|
|
17
15
|
|
|
18
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -20,12 +18,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
20
18
|
function LoadingNode() {
|
|
21
19
|
var prefixCls = (0, _usePrefixCls.default)('', 'ald-table');
|
|
22
20
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
23
|
-
className:
|
|
21
|
+
className: "".concat(prefixCls, "-loading")
|
|
24
22
|
}, /*#__PURE__*/_react.default.createElement(_LoadingLine2.default, {
|
|
25
23
|
size: 16,
|
|
26
24
|
fill: "currentColor",
|
|
27
25
|
spin: true,
|
|
28
|
-
className:
|
|
26
|
+
className: "".concat(prefixCls, "-loading-icon")
|
|
29
27
|
}), "Loading");
|
|
30
28
|
}
|
|
31
29
|
|
|
@@ -99,7 +99,9 @@ function TableBodyRowList(props) {
|
|
|
99
99
|
style: {
|
|
100
100
|
width: (0, _utils.getValidWidthByNumber)(currentRenderWidth)
|
|
101
101
|
}
|
|
102
|
-
}), /*#__PURE__*/_react.default.createElement(
|
|
102
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
103
|
+
className: (0, _classnames2.default)("".concat(prefixCls, "-cell-container"))
|
|
104
|
+
}, cell.render('Cell')));
|
|
103
105
|
}));
|
|
104
106
|
}));
|
|
105
107
|
}
|
package/lib/Table/interface.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
/* stylelint-disable property-no-unknown */
|
|
2
|
+
|
|
1
3
|
@import '../../style/index.less';
|
|
2
4
|
@import '../../Empty/style/index.less';
|
|
3
5
|
@import '../../message/style/index.less';
|
|
4
|
-
|
|
5
|
-
@ald-iconfont-css-prefix: anticon;
|
|
6
|
-
@table-head-row-height: 48px;
|
|
7
|
-
@table-body-row-height: 68px;
|
|
6
|
+
@import './variable.less';
|
|
8
7
|
|
|
9
8
|
.ald-table {
|
|
10
9
|
display: flex;
|
|
@@ -26,6 +25,7 @@
|
|
|
26
25
|
|
|
27
26
|
&-inner-wrap {
|
|
28
27
|
width: 100%;
|
|
28
|
+
height: 100%;
|
|
29
29
|
overflow-x: overlay;
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
padding: 14px 24px;
|
|
74
74
|
color: @NL50;
|
|
75
75
|
line-height: 20px;
|
|
76
|
-
background-color: @
|
|
76
|
+
background-color: @BG95;
|
|
77
77
|
|
|
78
78
|
.ald-table-cell-content {
|
|
79
79
|
overflow: hidden;
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
z-index: 1;
|
|
89
89
|
display: inline-block;
|
|
90
90
|
width: 12px;
|
|
91
|
-
height:
|
|
91
|
+
height: 14px;
|
|
92
92
|
transform: translateY(-50%);
|
|
93
93
|
touch-action: none;
|
|
94
94
|
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
display: block;
|
|
97
97
|
width: 1px;
|
|
98
98
|
height: 100%;
|
|
99
|
-
background-color: @
|
|
99
|
+
background-color: @BG70;
|
|
100
100
|
content: '';
|
|
101
101
|
}
|
|
102
102
|
}
|
|
@@ -122,8 +122,13 @@
|
|
|
122
122
|
height: @table-body-row-height;
|
|
123
123
|
|
|
124
124
|
.ald-table-cell {
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
display: flex;
|
|
126
|
+
align-items: center;
|
|
127
|
+
padding-left: 24px;
|
|
128
|
+
|
|
129
|
+
.ald-table-cell-container {
|
|
130
|
+
width: 100%;
|
|
131
|
+
}
|
|
127
132
|
}
|
|
128
133
|
|
|
129
134
|
&:hover {
|
package/lib/Tabs/index.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.default = Tabs;
|
|
|
7
7
|
|
|
8
8
|
require("@aloudata/icons-react/styles/index.less");
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _MoreFill2 = _interopRequireDefault(require("@aloudata/icons-react/es/icons/MoreFill"));
|
|
11
11
|
|
|
12
12
|
require("antd/es/tabs/style");
|
|
13
13
|
|
|
@@ -49,7 +49,7 @@ function Tabs(props) {
|
|
|
49
49
|
return /*#__PURE__*/_react.default.createElement(_tabs.default, Object.assign({
|
|
50
50
|
moreIcon: /*#__PURE__*/_react.default.createElement("div", {
|
|
51
51
|
className: "ald-tabs-moreIcon"
|
|
52
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
52
|
+
}, /*#__PURE__*/_react.default.createElement(_MoreFill2.default, {
|
|
53
53
|
color: "currentColor"
|
|
54
54
|
})),
|
|
55
55
|
tabBarGutter: 24,
|