shineout 1.8.0 → 1.8.4
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/css/AnimationList/AbsoluteList.js +1 -1
- package/css/Button/Button.js +1 -1
- package/css/Cascader/Result.js +3 -2
- package/css/Cascader/styles/cascader.css +9 -1
- package/css/Checkbox/Group.js +6 -3
- package/css/Checkbox/index.d.ts +1 -1
- package/css/DatePicker/Month.js +7 -1
- package/css/Datum/Tree.js +2 -1
- package/css/Menu/Item.js +9 -1
- package/css/Menu/Root.js +10 -4
- package/css/Modal/events.js +6 -3
- package/css/Rule/index.d.ts +26 -3
- package/css/Scroll/Scroll.js +31 -11
- package/css/Select/Result.js +5 -4
- package/css/Select/styles/select.css +8 -4
- package/css/Table/SeperateTable.js +14 -8
- package/css/Table/SimpleTable.js +13 -7
- package/css/Table/Table.js +3 -1
- package/css/Table/resizable.js +1 -1
- package/css/Table/styles/table.css +8 -8
- package/css/Textarea/index.d.ts +34 -23
- package/css/Tooltip/styles/tooltip.css +31 -31
- package/css/index.d.ts +1 -1
- package/css/index.js +1 -1
- package/dist/shineout.js +215 -149
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/dist/theme.antd.css +1 -1
- package/dist/theme.antd2.css +1 -1
- package/dist/theme.default.css +1 -1
- package/dist/theme.shineout.css +1 -1
- package/es/AnimationList/AbsoluteList.js +1 -1
- package/es/Button/Button.js +1 -1
- package/es/Cascader/Result.js +3 -2
- package/es/Cascader/styles/cascader.less +11 -1
- package/es/Checkbox/Group.js +6 -3
- package/es/Checkbox/index.d.ts +1 -1
- package/es/DatePicker/Month.js +7 -1
- package/es/Datum/Tree.js +2 -1
- package/es/Menu/Item.js +9 -1
- package/es/Menu/Root.js +9 -4
- package/es/Modal/events.js +6 -3
- package/es/Rule/index.d.ts +26 -3
- package/es/Scroll/Scroll.js +31 -11
- package/es/Select/Result.js +5 -4
- package/es/Select/styles/select.less +8 -3
- package/es/Table/SeperateTable.js +14 -8
- package/es/Table/SimpleTable.js +13 -7
- package/es/Table/Table.js +3 -1
- package/es/Table/resizable.js +1 -1
- package/es/Table/styles/table.less +1 -1
- package/es/Textarea/index.d.ts +34 -23
- package/es/Tooltip/styles/tooltip.less +7 -5
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/styles/themes/base.less +1 -1
- package/es/styles/themes/shineout.less +1 -1
- package/lib/AnimationList/AbsoluteList.js +1 -1
- package/lib/Button/Button.js +1 -1
- package/lib/Cascader/Result.js +3 -2
- package/lib/Cascader/styles/cascader.less +11 -1
- package/lib/Checkbox/Group.js +6 -3
- package/lib/Checkbox/index.d.ts +1 -1
- package/lib/DatePicker/Month.js +7 -1
- package/lib/Datum/Tree.js +2 -1
- package/lib/Menu/Item.js +9 -1
- package/lib/Menu/Root.js +10 -4
- package/lib/Modal/events.js +6 -3
- package/lib/Rule/index.d.ts +26 -3
- package/lib/Scroll/Scroll.js +31 -11
- package/lib/Select/Result.js +5 -4
- package/lib/Select/styles/select.less +8 -3
- package/lib/Table/SeperateTable.js +14 -8
- package/lib/Table/SimpleTable.js +13 -7
- package/lib/Table/Table.js +3 -1
- package/lib/Table/resizable.js +1 -1
- package/lib/Table/styles/table.less +1 -1
- package/lib/Textarea/index.d.ts +34 -23
- package/lib/Tooltip/styles/tooltip.less +7 -5
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/styles/themes/base.less +1 -1
- package/lib/styles/themes/shineout.less +1 -1
- package/package.json +1 -1
|
@@ -344,13 +344,17 @@ function (_PureComponent) {
|
|
|
344
344
|
|
|
345
345
|
|
|
346
346
|
if (treeColumnsName && changedByExpand) {
|
|
347
|
+
// Blank space may appear after clicking the top or bottom collapse button
|
|
347
348
|
if (fullHeight - this.lastScrollTop < (1 - this.lastScrollArgs[1]) * scrollHeight) {
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
349
|
+
if (fullHeight <= scrollHeight) {
|
|
350
|
+
index = 0;
|
|
351
|
+
} else {
|
|
352
|
+
this.tbody.style.marginTop = scrollHeight + "px";
|
|
353
|
+
(0, _translate.setTranslate)(this.tbody, "-" + offsetLeft + "px", "-" + fullHeight + "px");
|
|
354
|
+
this.lastScrollTop = fullHeight;
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
351
357
|
}
|
|
352
|
-
|
|
353
|
-
return;
|
|
354
358
|
}
|
|
355
359
|
|
|
356
360
|
if (index === 0) {
|
|
@@ -631,7 +635,8 @@ function (_PureComponent) {
|
|
|
631
635
|
rowHeight = _this$props7.rowHeight,
|
|
632
636
|
columnResizable = _this$props7.columnResizable,
|
|
633
637
|
innerScrollAttr = _this$props7.innerScrollAttr,
|
|
634
|
-
|
|
638
|
+
bordered = _this$props7.bordered,
|
|
639
|
+
others = (0, _objectWithoutPropertiesLoose2.default)(_this$props7, ["data", "rowsInView", "columns", "width", "fixed", "rowHeight", "columnResizable", "innerScrollAttr", "bordered"]);
|
|
635
640
|
var _this$state3 = this.state,
|
|
636
641
|
colgroup = _this$state3.colgroup,
|
|
637
642
|
scrollTop = _this$state3.scrollTop,
|
|
@@ -677,7 +682,7 @@ function (_PureComponent) {
|
|
|
677
682
|
height: prevHeight
|
|
678
683
|
}
|
|
679
684
|
}), _react.default.createElement("table", {
|
|
680
|
-
className: (0, _styles.tableClass)(!colgroup && minWidthSup && 'init'),
|
|
685
|
+
className: (0, _styles.tableClass)(!colgroup && minWidthSup && 'init', bordered && 'table-bordered'),
|
|
681
686
|
style: {
|
|
682
687
|
width: width
|
|
683
688
|
},
|
|
@@ -720,7 +725,8 @@ function (_PureComponent) {
|
|
|
720
725
|
style: {
|
|
721
726
|
width: width
|
|
722
727
|
},
|
|
723
|
-
ref: this.bindThead
|
|
728
|
+
ref: this.bindThead,
|
|
729
|
+
className: (0, _styles.tableClass)('table-bordered')
|
|
724
730
|
}, _react.default.createElement(_Colgroup.default, {
|
|
725
731
|
colgroup: colgroup,
|
|
726
732
|
columns: columns,
|
package/lib/Table/SimpleTable.js
CHANGED
|
@@ -166,7 +166,8 @@ function (_PureComponent) {
|
|
|
166
166
|
data = _this$props2.data,
|
|
167
167
|
onResize = _this$props2.onResize,
|
|
168
168
|
columnResizable = _this$props2.columnResizable,
|
|
169
|
-
sticky = _this$props2.sticky
|
|
169
|
+
sticky = _this$props2.sticky,
|
|
170
|
+
bordered = _this$props2.bordered;
|
|
170
171
|
var _this$state = this.state,
|
|
171
172
|
colgroup = _this$state.colgroup,
|
|
172
173
|
scrollAble = _this$state.scrollAble;
|
|
@@ -174,7 +175,8 @@ function (_PureComponent) {
|
|
|
174
175
|
var inner = _react.default.createElement("table", {
|
|
175
176
|
style: {
|
|
176
177
|
width: width
|
|
177
|
-
}
|
|
178
|
+
},
|
|
179
|
+
className: (0, _styles.tableClass)(bordered && 'table-bordered')
|
|
178
180
|
}, _react.default.createElement(_Colgroup.default, {
|
|
179
181
|
colgroup: colgroup,
|
|
180
182
|
columns: columns,
|
|
@@ -214,7 +216,8 @@ function (_PureComponent) {
|
|
|
214
216
|
width = _this$props3.width,
|
|
215
217
|
fixed = _this$props3.fixed,
|
|
216
218
|
columnResizable = _this$props3.columnResizable,
|
|
217
|
-
|
|
219
|
+
bordered = _this$props3.bordered,
|
|
220
|
+
others = (0, _objectWithoutPropertiesLoose2.default)(_this$props3, ["columns", "width", "fixed", "columnResizable", "bordered"]);
|
|
218
221
|
var _this$state2 = this.state,
|
|
219
222
|
colgroup = _this$state2.colgroup,
|
|
220
223
|
resize = _this$state2.resize;
|
|
@@ -230,7 +233,7 @@ function (_PureComponent) {
|
|
|
230
233
|
style: {
|
|
231
234
|
width: width
|
|
232
235
|
},
|
|
233
|
-
className: (0, _styles.tableClass)(!colgroup && minWidthSup && 'init')
|
|
236
|
+
className: (0, _styles.tableClass)(!colgroup && minWidthSup && 'init', bordered && 'table-bordered')
|
|
234
237
|
}, _react.default.createElement(_Colgroup.default, {
|
|
235
238
|
colgroup: colgroup,
|
|
236
239
|
columns: columns,
|
|
@@ -250,11 +253,13 @@ function (_PureComponent) {
|
|
|
250
253
|
columns = _this$props4.columns,
|
|
251
254
|
width = _this$props4.width,
|
|
252
255
|
children = _this$props4.children,
|
|
253
|
-
hideHeader = _this$props4.hideHeader
|
|
256
|
+
hideHeader = _this$props4.hideHeader,
|
|
257
|
+
bordered = _this$props4.bordered;
|
|
254
258
|
if (!columns || columns.length === 0) return _react.default.createElement("table", {
|
|
255
259
|
style: {
|
|
256
260
|
width: width
|
|
257
|
-
}
|
|
261
|
+
},
|
|
262
|
+
className: (0, _styles.tableClass)(bordered && 'table-bordered')
|
|
258
263
|
}, children);
|
|
259
264
|
return [hideHeader ? null : this.renderHeader(), this.renderBody(), children];
|
|
260
265
|
};
|
|
@@ -273,7 +278,8 @@ SimpleTable.propTypes = {
|
|
|
273
278
|
dataChangeResize: _propTypes.default.bool,
|
|
274
279
|
columnResizable: _propTypes.default.bool,
|
|
275
280
|
sticky: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.bool]),
|
|
276
|
-
hideHeader: _propTypes.default.bool
|
|
281
|
+
hideHeader: _propTypes.default.bool,
|
|
282
|
+
bordered: _propTypes.default.bool
|
|
277
283
|
};
|
|
278
284
|
SimpleTable.defaultProps = {
|
|
279
285
|
data: undefined,
|
package/lib/Table/Table.js
CHANGED
|
@@ -163,7 +163,9 @@ function (_Component) {
|
|
|
163
163
|
className: className,
|
|
164
164
|
ref: this.bindTable,
|
|
165
165
|
style: newStyle
|
|
166
|
-
}, events), _react.default.createElement(RenderTable,
|
|
166
|
+
}, events), _react.default.createElement(RenderTable, (0, _extends2.default)({}, props, {
|
|
167
|
+
bordered: bordered
|
|
168
|
+
})), loading && _react.default.createElement("div", {
|
|
167
169
|
className: (0, _styles.tableClass)('loading')
|
|
168
170
|
}, typeof loading === 'boolean' ? _react.default.createElement(_Spin.default, {
|
|
169
171
|
size: 40
|
package/lib/Table/resizable.js
CHANGED
|
@@ -79,7 +79,7 @@ var _default = function _default(Table) {
|
|
|
79
79
|
var onColumnResize = this.props.onColumnResize;
|
|
80
80
|
var changed = (0, _immer.default)(this.state, function (draft) {
|
|
81
81
|
var column = draft.columns[index];
|
|
82
|
-
draft.delta += parseFloat(width - (column.width || 0));
|
|
82
|
+
draft.delta += parseFloat(width - (column.width || colgroup[index] || 0));
|
|
83
83
|
colgroup[index] = width;
|
|
84
84
|
draft.columns.forEach(function (col, i) {
|
|
85
85
|
var w = colgroup[i];
|
package/lib/Textarea/index.d.ts
CHANGED
|
@@ -2,24 +2,24 @@ import * as React from 'react'
|
|
|
2
2
|
import { StandardProps, RegularAttributes, FormItemStandardProps } from '../@types/common'
|
|
3
3
|
|
|
4
4
|
export interface TextareaProps<Value> extends
|
|
5
|
-
StandardProps,
|
|
5
|
+
StandardProps,
|
|
6
6
|
FormItemStandardProps<Value>
|
|
7
7
|
{
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* show border bottom
|
|
11
|
-
*
|
|
11
|
+
*
|
|
12
12
|
* 仅仅展示下边框
|
|
13
|
-
*
|
|
13
|
+
*
|
|
14
14
|
* default: false
|
|
15
15
|
*/
|
|
16
16
|
underline?: boolean;
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Whether the height changes automatically with the content
|
|
20
|
-
*
|
|
20
|
+
*
|
|
21
21
|
* 高度是否随内容自动变化
|
|
22
|
-
*
|
|
22
|
+
*
|
|
23
23
|
* default: false
|
|
24
24
|
*/
|
|
25
25
|
autosize?: boolean;
|
|
@@ -27,76 +27,87 @@ FormItemStandardProps<Value>
|
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* User input triggers onChange and to check interval, unit: ms.
|
|
30
|
-
*
|
|
30
|
+
*
|
|
31
31
|
* 用户输入触发 onChange 和校验间隔时间,单位 毫秒。
|
|
32
|
-
*
|
|
32
|
+
*
|
|
33
33
|
* default: 400
|
|
34
34
|
*/
|
|
35
35
|
delay?: number;
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
* Infomation
|
|
39
|
-
*
|
|
39
|
+
*
|
|
40
40
|
* 提示信息
|
|
41
|
-
*
|
|
41
|
+
*
|
|
42
42
|
* default: -
|
|
43
43
|
*/
|
|
44
44
|
info?: ((value: string) => string) | number;
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
47
|
* The callback function for enter key
|
|
48
|
-
*
|
|
48
|
+
*
|
|
49
49
|
* 回车键回调函数
|
|
50
|
-
*
|
|
51
|
-
* default:
|
|
50
|
+
*
|
|
51
|
+
* default:
|
|
52
52
|
*/
|
|
53
53
|
onEnterPress?: (value: Value) => void;
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* The position where the message pops up
|
|
57
|
-
*
|
|
57
|
+
*
|
|
58
58
|
* 信息弹出位置
|
|
59
|
-
*
|
|
60
|
-
* default:
|
|
59
|
+
*
|
|
60
|
+
* default:
|
|
61
61
|
*/
|
|
62
62
|
popover?: RegularAttributes.Position;
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* The minimum row height. Same as native textarea rows property.
|
|
66
|
-
*
|
|
66
|
+
*
|
|
67
67
|
* 最小行高,同原生 textarea rows 属性
|
|
68
|
-
*
|
|
68
|
+
*
|
|
69
69
|
* default: 4
|
|
70
70
|
*/
|
|
71
71
|
rows?: number;
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* the maxHeight of the textarea, scroll bars appear after more than
|
|
75
|
-
*
|
|
75
|
+
*
|
|
76
76
|
* 输入框的最大高度, 超过之后会出现滚动条
|
|
77
|
-
*
|
|
77
|
+
*
|
|
78
78
|
* default: -
|
|
79
79
|
*/
|
|
80
80
|
maxHeight?: number | string;
|
|
81
81
|
|
|
82
82
|
/**
|
|
83
83
|
* When trim is true, blank characters are automatically deleted when lose focus。
|
|
84
|
-
*
|
|
84
|
+
*
|
|
85
85
|
* trim 为 true 时,失去焦点时会自动删除空白字符。
|
|
86
|
-
*
|
|
86
|
+
*
|
|
87
87
|
* default: false
|
|
88
88
|
*/
|
|
89
89
|
trim?: boolean;
|
|
90
90
|
|
|
91
91
|
/**
|
|
92
92
|
* support resize
|
|
93
|
-
*
|
|
93
|
+
*
|
|
94
94
|
* 是否可以伸缩高度
|
|
95
|
-
*
|
|
95
|
+
*
|
|
96
96
|
* default: false
|
|
97
97
|
*/
|
|
98
98
|
resize?: boolean;
|
|
99
99
|
|
|
100
|
+
/**
|
|
101
|
+
* disabled
|
|
102
|
+
*
|
|
103
|
+
* 禁用
|
|
104
|
+
*
|
|
105
|
+
* default: false
|
|
106
|
+
*/
|
|
107
|
+
disabled?: boolean;
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
100
111
|
}
|
|
101
112
|
|
|
102
113
|
declare class Textarea<Value = any> extends React.Component<TextareaProps<Value>, {}> {}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
@import '../../styles/themes/@{so-theme}.less';
|
|
3
3
|
@tooltip-prefix: ~'@{so-prefix}-tooltip';
|
|
4
4
|
|
|
5
|
+
@arrowOffset: (-@tooltip-arrow-width + 1px);
|
|
6
|
+
|
|
5
7
|
.@{tooltip-prefix} {
|
|
6
8
|
@keyframe-opacity: ~'@{tooltip-prefix}-kf-opacity';
|
|
7
9
|
@keyframe-top: ~'@{tooltip-prefix}-kf-top';
|
|
@@ -98,7 +100,7 @@
|
|
|
98
100
|
transform: translate(-50%, -100%);
|
|
99
101
|
|
|
100
102
|
.@{tooltip-prefix}-arrow {
|
|
101
|
-
|
|
103
|
+
bottom: @arrowOffset;
|
|
102
104
|
left: 50%;
|
|
103
105
|
border-top: @tooltip-arrow-width solid @tooltip-bg;
|
|
104
106
|
border-right: @tooltip-arrow-width solid transparent;
|
|
@@ -117,7 +119,7 @@
|
|
|
117
119
|
|
|
118
120
|
.@{tooltip-prefix}-arrow {
|
|
119
121
|
top: 50%;
|
|
120
|
-
|
|
122
|
+
left: @arrowOffset;
|
|
121
123
|
border-top: @tooltip-arrow-width solid transparent;
|
|
122
124
|
border-right: @tooltip-arrow-width solid @tooltip-bg;
|
|
123
125
|
border-bottom: @tooltip-arrow-width solid transparent;
|
|
@@ -135,7 +137,7 @@
|
|
|
135
137
|
|
|
136
138
|
.@{tooltip-prefix}-arrow {
|
|
137
139
|
top: 50%;
|
|
138
|
-
|
|
140
|
+
right: @arrowOffset;
|
|
139
141
|
border-top: @tooltip-arrow-width solid transparent;
|
|
140
142
|
border-bottom: @tooltip-arrow-width solid transparent;
|
|
141
143
|
border-left: @tooltip-arrow-width solid @tooltip-bg;
|
|
@@ -152,12 +154,12 @@
|
|
|
152
154
|
transform: translateX(-50%);
|
|
153
155
|
|
|
154
156
|
.@{tooltip-prefix}-arrow {
|
|
155
|
-
top:
|
|
157
|
+
top: @arrowOffset;
|
|
156
158
|
left: 50%;
|
|
157
159
|
border-right: @tooltip-arrow-width solid transparent;
|
|
158
160
|
border-bottom: @tooltip-arrow-width solid @tooltip-bg;
|
|
159
161
|
border-left: @tooltip-arrow-width solid transparent;
|
|
160
|
-
transform: translate(-50%,
|
|
162
|
+
transform: translate(-50%, 0);
|
|
161
163
|
}
|
|
162
164
|
}
|
|
163
165
|
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@import './bootstrap.less';
|
|
2
2
|
@import './cssvar.less';
|
|
3
3
|
|
|
4
|
-
@font-family-sans-serif:
|
|
4
|
+
@font-family-sans-serif: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Helvetica, PingFang SC, Hiragino KaKu Gothic Pro, Microsoft YaHei, Arial, sans-serif;
|
|
5
5
|
|
|
6
6
|
@colors-primary-value: #197AFA;
|
|
7
7
|
@colors-primary: var(--primary-color, @colors-primary-value);
|