shineout 1.8.5 → 1.8.7
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/Alert/index.d.ts +15 -15
- package/css/Alert/styles/alert.css +8 -4
- package/css/Cascader/Result.js +3 -1
- package/css/DataList/List.js +6 -3
- package/css/EditableArea/EditableArea.js +1 -2
- package/css/Modal/Panel.js +2 -3
- package/css/Modal/styles/modal.css +6 -0
- package/css/Popover/Confirm.js +1 -1
- package/css/Popover/Content.js +22 -0
- package/css/Popover/Panel.js +5 -3
- package/css/Popover/index.d.ts +9 -2
- package/css/Popover/index.js +3 -0
- package/css/Popover/styles/popover.css +0 -3
- package/css/Select/Result.js +3 -1
- package/css/Table/SimpleTable.js +2 -1
- package/css/TreeSelect/Result.js +3 -1
- package/css/TreeSelect/TreeSelect.js +5 -2
- package/css/icons/index.js +2 -1
- package/css/index.d.ts +1 -1
- package/css/index.js +1 -1
- package/css/utils/dom/element.js +3 -3
- package/css/utils/proptypes.js +1 -1
- package/css/utils/validate/index.js +6 -1
- package/dist/shineout.js +129 -71
- 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/Alert/index.d.ts +15 -15
- package/es/Alert/styles/alert.less +2 -1
- package/es/Cascader/Result.js +3 -1
- package/es/DataList/List.js +6 -3
- package/es/EditableArea/EditableArea.js +1 -2
- package/es/Modal/Panel.js +2 -3
- package/es/Modal/styles/modal.less +12 -0
- package/es/Popover/Confirm.js +1 -1
- package/es/Popover/Content.js +12 -0
- package/es/Popover/Panel.js +5 -3
- package/es/Popover/index.d.ts +9 -2
- package/es/Popover/index.js +2 -0
- package/es/Popover/styles/popover.less +0 -4
- package/es/Select/Result.js +3 -1
- package/es/Table/SimpleTable.js +2 -1
- package/es/TreeSelect/Result.js +3 -1
- package/es/TreeSelect/TreeSelect.js +5 -2
- package/es/icons/index.js +2 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/utils/dom/element.js +3 -3
- package/es/utils/proptypes.js +1 -1
- package/es/utils/validate/index.js +5 -1
- package/lib/Alert/index.d.ts +15 -15
- package/lib/Alert/styles/alert.less +2 -1
- package/lib/Cascader/Result.js +3 -1
- package/lib/DataList/List.js +6 -3
- package/lib/EditableArea/EditableArea.js +1 -2
- package/lib/Modal/Panel.js +2 -3
- package/lib/Modal/styles/modal.less +12 -0
- package/lib/Popover/Confirm.js +1 -1
- package/lib/Popover/Content.js +22 -0
- package/lib/Popover/Panel.js +5 -3
- package/lib/Popover/index.d.ts +9 -2
- package/lib/Popover/index.js +3 -0
- package/lib/Popover/styles/popover.less +0 -4
- package/lib/Select/Result.js +3 -1
- package/lib/Table/SimpleTable.js +2 -1
- package/lib/TreeSelect/Result.js +3 -1
- package/lib/TreeSelect/TreeSelect.js +5 -2
- package/lib/icons/index.js +2 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/utils/dom/element.js +3 -3
- package/lib/utils/proptypes.js +1 -1
- package/lib/utils/validate/index.js +6 -1
- package/package.json +1 -1
package/es/Alert/index.d.ts
CHANGED
|
@@ -5,59 +5,59 @@ export interface AlertProps extends StandardProps {
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Content, text or react component
|
|
8
|
-
*
|
|
8
|
+
*
|
|
9
9
|
* 内容,文字或react组件
|
|
10
|
-
*
|
|
10
|
+
*
|
|
11
11
|
* default: -
|
|
12
12
|
*/
|
|
13
13
|
children?: React.ReactNode;
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* When the type is true, the status icon is displayed according to the type property. If you need to display a custom icon, pass in ReactElement.
|
|
17
|
-
*
|
|
17
|
+
*
|
|
18
18
|
* 为true时,根据type属性显示状态图标。如果需要显示自定义图标,传入ReactElement。
|
|
19
|
-
*
|
|
19
|
+
*
|
|
20
20
|
* default: -
|
|
21
21
|
*/
|
|
22
22
|
icon?: React.ReactElement | boolean;
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* The size for icon
|
|
26
|
-
*
|
|
26
|
+
*
|
|
27
27
|
* icon 的尺寸
|
|
28
|
-
*
|
|
28
|
+
*
|
|
29
29
|
* default: 14
|
|
30
30
|
*/
|
|
31
31
|
iconSize?: number;
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* When onClose is empty, no close is displayed. If you need to close and do not need to handle callbacks, set it true.
|
|
35
|
-
*
|
|
35
|
+
*
|
|
36
36
|
* 当 onClose 为空时,不显示关闭。如果需要关闭又不需要处理回调,设置为true即可
|
|
37
|
-
*
|
|
37
|
+
*
|
|
38
38
|
* default: -
|
|
39
39
|
*/
|
|
40
40
|
onClose?: (() => void) | boolean;
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* types
|
|
44
|
-
*
|
|
44
|
+
*
|
|
45
45
|
* 类型
|
|
46
|
-
*
|
|
46
|
+
*
|
|
47
47
|
* default: *warning*
|
|
48
|
-
*
|
|
48
|
+
*
|
|
49
49
|
*/
|
|
50
|
-
type?: 'success' | 'info' | 'warning' | 'danger' | 'error';
|
|
50
|
+
type?: 'success' | 'info' | 'warning' | 'danger' | 'error' | 'confirmwarning';
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
53
|
* show close button
|
|
54
|
-
*
|
|
54
|
+
*
|
|
55
55
|
* 是否隐藏关闭按钮
|
|
56
|
-
*
|
|
56
|
+
*
|
|
57
57
|
* default: false
|
|
58
58
|
*/
|
|
59
59
|
hideClose?: boolean,
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
declare class Alert extends React.Component<AlertProps> {}
|
|
63
|
-
export default Alert
|
|
63
|
+
export default Alert
|
package/es/Cascader/Result.js
CHANGED
|
@@ -70,7 +70,9 @@ function (_PureComponent) {
|
|
|
70
70
|
var compressed = this.props.compressed;
|
|
71
71
|
|
|
72
72
|
if (compressed) {
|
|
73
|
-
this.cancelResizeObserver = addResizeObserver(this.resultEl, this.resetMore
|
|
73
|
+
this.cancelResizeObserver = addResizeObserver(this.resultEl, this.resetMore, {
|
|
74
|
+
direction: 'x'
|
|
75
|
+
});
|
|
74
76
|
}
|
|
75
77
|
};
|
|
76
78
|
|
package/es/DataList/List.js
CHANGED
|
@@ -109,7 +109,8 @@ function (_Component) {
|
|
|
109
109
|
keygen = _this$props2.keygen,
|
|
110
110
|
fixed = _this$props2.fixed,
|
|
111
111
|
rowsInView = _this$props2.rowsInView,
|
|
112
|
-
lineHeight = _this$props2.lineHeight
|
|
112
|
+
lineHeight = _this$props2.lineHeight,
|
|
113
|
+
value = _this$props2.value;
|
|
113
114
|
if (isEmpty) return React.createElement("div", {
|
|
114
115
|
className: listClass('item', 'empty')
|
|
115
116
|
}, empty || getLocale('noData'));
|
|
@@ -119,7 +120,8 @@ function (_Component) {
|
|
|
119
120
|
data: data,
|
|
120
121
|
keygen: keygen,
|
|
121
122
|
renderItem: this.renderItem,
|
|
122
|
-
itemsInView: rowsInView
|
|
123
|
+
itemsInView: rowsInView,
|
|
124
|
+
force: value
|
|
123
125
|
});
|
|
124
126
|
};
|
|
125
127
|
|
|
@@ -186,7 +188,8 @@ Index.propTypes = {
|
|
|
186
188
|
fixed: PropTypes.bool,
|
|
187
189
|
rowsInView: PropTypes.number,
|
|
188
190
|
height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
189
|
-
lineHeight: PropTypes.number
|
|
191
|
+
lineHeight: PropTypes.number,
|
|
192
|
+
value: PropTypes.array
|
|
190
193
|
};
|
|
191
194
|
Index.defaultProps = {
|
|
192
195
|
size: 'default',
|
|
@@ -93,7 +93,6 @@ function (_React$PureComponent) {
|
|
|
93
93
|
_proto.renderTextarea = function renderTextarea() {
|
|
94
94
|
var showTextarea = this.state.showTextarea;
|
|
95
95
|
var _this$props = this.props,
|
|
96
|
-
delay = _this$props.delay,
|
|
97
96
|
placeholder = _this$props.placeholder,
|
|
98
97
|
maxHeight = _this$props.maxHeight,
|
|
99
98
|
value = _this$props.value;
|
|
@@ -105,7 +104,7 @@ function (_React$PureComponent) {
|
|
|
105
104
|
autosize: true,
|
|
106
105
|
value: value,
|
|
107
106
|
rows: 1,
|
|
108
|
-
delay:
|
|
107
|
+
delay: 0,
|
|
109
108
|
onChange: this.onChange,
|
|
110
109
|
onBlur: this.onBlur,
|
|
111
110
|
onFocus: this.handleFocus,
|
package/es/Modal/Panel.js
CHANGED
|
@@ -202,10 +202,9 @@ function (_PureComponent) {
|
|
|
202
202
|
position = _this$props7.position,
|
|
203
203
|
bodyStyle = _this$props7.bodyStyle,
|
|
204
204
|
_this$props7$from = _this$props7.from,
|
|
205
|
-
from = _this$props7$from === void 0 ? null : _this$props7$from
|
|
206
|
-
type = _this$props7.type;
|
|
205
|
+
from = _this$props7$from === void 0 ? null : _this$props7$from;
|
|
207
206
|
var style = {
|
|
208
|
-
padding: noPadding === true
|
|
207
|
+
padding: noPadding === true ? 0 : padding
|
|
209
208
|
};
|
|
210
209
|
if (position) style.overflow = 'auto';
|
|
211
210
|
if (bodyStyle) style = Object.assign(style, bodyStyle);
|
|
@@ -302,6 +302,18 @@
|
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
|
+
> .@{card-prefix}.@{modal-prefix}-normal {
|
|
306
|
+
.@{modal-prefix}-body {
|
|
307
|
+
padding-left: @modal-icon-body-padding-right;
|
|
308
|
+
}
|
|
309
|
+
&.@{modal-prefix}-rtl {
|
|
310
|
+
.@{modal-prefix}-body {
|
|
311
|
+
padding-right: @modal-icon-body-padding-right;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
|
|
305
317
|
|
|
306
318
|
|
|
307
319
|
> .@{card-prefix}.@{modal-prefix}-rtl {
|
package/es/Popover/Confirm.js
CHANGED
|
@@ -119,7 +119,7 @@ Confirm.propTypes = _objectSpread({}, getProps(PropTypes, 'type'), {
|
|
|
119
119
|
icon: PropTypes.oneOfType([PropTypes.bool, PropTypes.node])
|
|
120
120
|
});
|
|
121
121
|
Confirm.defaultProps = {
|
|
122
|
-
type: '
|
|
122
|
+
type: 'confirmwarning',
|
|
123
123
|
icon: true,
|
|
124
124
|
okType: 'danger'
|
|
125
125
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Panel from './Panel';
|
|
4
|
+
|
|
5
|
+
function Content(props) {
|
|
6
|
+
// eslint-disable-next-line
|
|
7
|
+
return React.createElement(Panel, _extends({}, props, {
|
|
8
|
+
useTextStyle: true
|
|
9
|
+
}));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default Content;
|
package/es/Popover/Panel.js
CHANGED
|
@@ -270,7 +270,8 @@ function (_Component) {
|
|
|
270
270
|
children = _this$props4.children,
|
|
271
271
|
type = _this$props4.type,
|
|
272
272
|
visible = _this$props4.visible,
|
|
273
|
-
showArrow = _this$props4.showArrow
|
|
273
|
+
showArrow = _this$props4.showArrow,
|
|
274
|
+
useTextStyle = _this$props4.useTextStyle;
|
|
274
275
|
var show = typeof visible === 'boolean' ? visible : this.state.show;
|
|
275
276
|
|
|
276
277
|
if (!this.isRendered && !show || !this.parentElement || !children) {
|
|
@@ -304,7 +305,7 @@ function (_Component) {
|
|
|
304
305
|
|
|
305
306
|
this.element.className = classnames(popoverClass('_', position, type), this.props.className, this.id);
|
|
306
307
|
var childrened = isFunc(children) ? children(this.handleHide) : children;
|
|
307
|
-
if (typeof childrened === 'string') childrened = React.createElement("span", {
|
|
308
|
+
if (typeof childrened === 'string' || useTextStyle) childrened = React.createElement("span", {
|
|
308
309
|
className: popoverClass('text')
|
|
309
310
|
}, childrened);
|
|
310
311
|
return ReactDOM.createPortal([showArrow && React.createElement("div", {
|
|
@@ -348,7 +349,8 @@ Panel.propTypes = {
|
|
|
348
349
|
showArrow: PropTypes.bool,
|
|
349
350
|
bindChain: PropTypes.func,
|
|
350
351
|
zIndex: PropTypes.number,
|
|
351
|
-
clickToCancelDelay: PropTypes.bool
|
|
352
|
+
clickToCancelDelay: PropTypes.bool,
|
|
353
|
+
useTextStyle: PropTypes.bool
|
|
352
354
|
};
|
|
353
355
|
Panel.defaultProps = {
|
|
354
356
|
background: '',
|
package/es/Popover/index.d.ts
CHANGED
|
@@ -131,7 +131,7 @@ export interface PopoverProps extends StandardProps {
|
|
|
131
131
|
*
|
|
132
132
|
* default: none
|
|
133
133
|
*/
|
|
134
|
-
type?: 'success' | 'info' | 'warning' | 'danger';
|
|
134
|
+
type?: 'success' | 'info' | 'warning' | 'danger' | 'confirmwarning';
|
|
135
135
|
|
|
136
136
|
/**
|
|
137
137
|
* Old API, out of date
|
|
@@ -232,8 +232,15 @@ declare class PopoverConfirm extends React.Component<PopoverConfirmProps, {}> {
|
|
|
232
232
|
render(): JSX.Element;
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
declare class
|
|
235
|
+
declare class PopoverContent extends React.Component<PopoverProps, {}> {
|
|
236
|
+
render(): JSX.Element;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export type ContentProps = Omit<PopoverProps, 'content'>;
|
|
240
|
+
|
|
241
|
+
declare class Popover extends React.Component<ContentProps, {}> {
|
|
236
242
|
static Confirm: typeof PopoverConfirm;
|
|
243
|
+
static Content: typeof PopoverContent;
|
|
237
244
|
|
|
238
245
|
render(): JSX.Element;
|
|
239
246
|
}
|
package/es/Popover/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import Container from '../Tooltip/Container';
|
|
|
3
3
|
import * as events from './events';
|
|
4
4
|
import Panel from './Panel';
|
|
5
5
|
import Confirm from './Confirm';
|
|
6
|
+
import Content from './Content';
|
|
6
7
|
var Component = Container(events);
|
|
7
8
|
|
|
8
9
|
function Popover(props) {
|
|
@@ -14,4 +15,5 @@ function Popover(props) {
|
|
|
14
15
|
Popover.displayName = 'ShineoutPopover';
|
|
15
16
|
Popover.Confirm = Confirm;
|
|
16
17
|
Popover.Confirm.displayName = 'ShineoutPopoverConfirm';
|
|
18
|
+
Popover.Content = Content;
|
|
17
19
|
export default Popover;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
@import '../../styles/themes/@{so-theme}.less';
|
|
3
3
|
|
|
4
4
|
@popover-prefix: ~'@{so-prefix}-popover';
|
|
5
|
-
@alert-prefix: ~'@{so-prefix}-alert';
|
|
6
5
|
@popover-arrow-size: 12px;
|
|
7
6
|
|
|
8
7
|
.@{popover-prefix} {
|
|
@@ -276,9 +275,6 @@
|
|
|
276
275
|
margin-bottom: 8px;
|
|
277
276
|
font-size: @font-size-base;
|
|
278
277
|
}
|
|
279
|
-
.@{popover-prefix}-mention .@{alert-prefix}-warning .@{alert-prefix}-icon path {
|
|
280
|
-
fill: @colors-danger;
|
|
281
|
-
}
|
|
282
278
|
}
|
|
283
279
|
|
|
284
280
|
&-text {
|
package/es/Select/Result.js
CHANGED
|
@@ -90,7 +90,9 @@ function (_PureComponent) {
|
|
|
90
90
|
var compressed = this.props.compressed;
|
|
91
91
|
|
|
92
92
|
if (compressed) {
|
|
93
|
-
this.cancelResizeObserver = addResizeObserver(this.resultEl, this.resetMore
|
|
93
|
+
this.cancelResizeObserver = addResizeObserver(this.resultEl, this.resetMore, {
|
|
94
|
+
direction: 'x'
|
|
95
|
+
});
|
|
94
96
|
}
|
|
95
97
|
};
|
|
96
98
|
|
package/es/Table/SimpleTable.js
CHANGED
|
@@ -79,6 +79,7 @@ function (_PureComponent) {
|
|
|
79
79
|
};
|
|
80
80
|
|
|
81
81
|
_proto.resetColGroup = function resetColGroup() {
|
|
82
|
+
this.lastColGroup = this.state.colgroup || this.lastColGroup;
|
|
82
83
|
this.setState({
|
|
83
84
|
colgroup: undefined,
|
|
84
85
|
resize: true
|
|
@@ -156,7 +157,7 @@ function (_PureComponent) {
|
|
|
156
157
|
},
|
|
157
158
|
className: tableClass(bordered && 'table-bordered')
|
|
158
159
|
}, React.createElement(Colgroup, {
|
|
159
|
-
colgroup: colgroup,
|
|
160
|
+
colgroup: colgroup || this.lastColGroup,
|
|
160
161
|
columns: columns,
|
|
161
162
|
resizable: columnResizable
|
|
162
163
|
}), React.createElement(Thead, _extends({}, this.props, {
|
package/es/TreeSelect/Result.js
CHANGED
|
@@ -67,7 +67,9 @@ function (_PureComponent) {
|
|
|
67
67
|
var compressed = this.props.compressed;
|
|
68
68
|
|
|
69
69
|
if (compressed) {
|
|
70
|
-
this.cancelResizeObserver = addResizeObserver(this.resultEl, this.resetMore
|
|
70
|
+
this.cancelResizeObserver = addResizeObserver(this.resultEl, this.resetMore, {
|
|
71
|
+
direction: 'x'
|
|
72
|
+
});
|
|
71
73
|
}
|
|
72
74
|
};
|
|
73
75
|
|
|
@@ -269,7 +269,9 @@ function (_PureComponent) {
|
|
|
269
269
|
data = _this$props7.data,
|
|
270
270
|
absolute = _this$props7.absolute,
|
|
271
271
|
height = _this$props7.height,
|
|
272
|
-
zIndex = _this$props7.zIndex
|
|
272
|
+
zIndex = _this$props7.zIndex,
|
|
273
|
+
compressed = _this$props7.compressed,
|
|
274
|
+
value = _this$props7.value;
|
|
273
275
|
var props = {};
|
|
274
276
|
['mode', 'data', 'datum', 'defaultExpanded', 'defaultExpandAll', 'disabled', 'expanded', 'keygen', 'loader', 'onExpand', 'renderItem', 'line', 'parentClickExpand', 'childrenKey', 'expandIcons'].forEach(function (k) {
|
|
275
277
|
props[k] = _this3.props[k];
|
|
@@ -306,7 +308,8 @@ function (_PureComponent) {
|
|
|
306
308
|
overflowY: 'auto'
|
|
307
309
|
},
|
|
308
310
|
fixed: "min",
|
|
309
|
-
zIndex: zIndex
|
|
311
|
+
zIndex: zIndex,
|
|
312
|
+
value: multiple && !compressed ? value : undefined
|
|
310
313
|
}, React.createElement("div", {
|
|
311
314
|
className: treeSelectClass('tree-wrapper')
|
|
312
315
|
}, content));
|
package/es/icons/index.js
CHANGED
package/es/index.d.ts
CHANGED
package/es/index.js
CHANGED
package/es/utils/dom/element.js
CHANGED
|
@@ -188,15 +188,15 @@ export var addResizeObserver = function addResizeObserver(el, handler, options)
|
|
|
188
188
|
width = _entry$0$contentRect.width,
|
|
189
189
|
height = _entry$0$contentRect.height;
|
|
190
190
|
|
|
191
|
-
if (direction === 'x') {
|
|
191
|
+
if (width && direction === 'x') {
|
|
192
192
|
if (lastWidth !== width) {
|
|
193
193
|
handler(entry);
|
|
194
194
|
}
|
|
195
195
|
} else if (direction === 'y') {
|
|
196
|
-
if (lastHeight !== height) {
|
|
196
|
+
if (height && lastHeight !== height) {
|
|
197
197
|
handler(entry);
|
|
198
198
|
}
|
|
199
|
-
} else {
|
|
199
|
+
} else if (width && height) {
|
|
200
200
|
handler(entry, {
|
|
201
201
|
x: lastWidth !== width,
|
|
202
202
|
y: lastHeight !== height
|
package/es/utils/proptypes.js
CHANGED
|
@@ -9,7 +9,7 @@ export function getProps(PropTypes) {
|
|
|
9
9
|
grid: PropTypes.oneOfType([PropTypes.number, PropTypes.object]),
|
|
10
10
|
placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element, PropTypes.func]),
|
|
11
11
|
size: PropTypes.oneOf(['small', 'default', 'large']),
|
|
12
|
-
type: PropTypes.oneOf(['primary', 'default', 'secondary', 'success', 'info', 'warning', 'error', 'danger', 'link'])
|
|
12
|
+
type: PropTypes.oneOf(['primary', 'default', 'secondary', 'success', 'info', 'warning', 'error', 'danger', 'link', 'confirmwarning'])
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/objectSpread";
|
|
1
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
2
3
|
import Datum from '../../Datum';
|
|
3
4
|
import { wrapFormError } from '../../utils/errors';
|
|
@@ -44,7 +45,10 @@ function getRule(rules, props) {
|
|
|
44
45
|
|
|
45
46
|
if (other.min !== undefined || other.max !== undefined) {
|
|
46
47
|
if (type === 'number' || type === 'integer') {
|
|
47
|
-
return range(props
|
|
48
|
+
return range(_objectSpread({}, props, {
|
|
49
|
+
min: other.min,
|
|
50
|
+
max: other.max
|
|
51
|
+
}));
|
|
48
52
|
}
|
|
49
53
|
|
|
50
54
|
return rangeLength(props);
|
package/lib/Alert/index.d.ts
CHANGED
|
@@ -5,59 +5,59 @@ export interface AlertProps extends StandardProps {
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Content, text or react component
|
|
8
|
-
*
|
|
8
|
+
*
|
|
9
9
|
* 内容,文字或react组件
|
|
10
|
-
*
|
|
10
|
+
*
|
|
11
11
|
* default: -
|
|
12
12
|
*/
|
|
13
13
|
children?: React.ReactNode;
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* When the type is true, the status icon is displayed according to the type property. If you need to display a custom icon, pass in ReactElement.
|
|
17
|
-
*
|
|
17
|
+
*
|
|
18
18
|
* 为true时,根据type属性显示状态图标。如果需要显示自定义图标,传入ReactElement。
|
|
19
|
-
*
|
|
19
|
+
*
|
|
20
20
|
* default: -
|
|
21
21
|
*/
|
|
22
22
|
icon?: React.ReactElement | boolean;
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* The size for icon
|
|
26
|
-
*
|
|
26
|
+
*
|
|
27
27
|
* icon 的尺寸
|
|
28
|
-
*
|
|
28
|
+
*
|
|
29
29
|
* default: 14
|
|
30
30
|
*/
|
|
31
31
|
iconSize?: number;
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* When onClose is empty, no close is displayed. If you need to close and do not need to handle callbacks, set it true.
|
|
35
|
-
*
|
|
35
|
+
*
|
|
36
36
|
* 当 onClose 为空时,不显示关闭。如果需要关闭又不需要处理回调,设置为true即可
|
|
37
|
-
*
|
|
37
|
+
*
|
|
38
38
|
* default: -
|
|
39
39
|
*/
|
|
40
40
|
onClose?: (() => void) | boolean;
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* types
|
|
44
|
-
*
|
|
44
|
+
*
|
|
45
45
|
* 类型
|
|
46
|
-
*
|
|
46
|
+
*
|
|
47
47
|
* default: *warning*
|
|
48
|
-
*
|
|
48
|
+
*
|
|
49
49
|
*/
|
|
50
|
-
type?: 'success' | 'info' | 'warning' | 'danger' | 'error';
|
|
50
|
+
type?: 'success' | 'info' | 'warning' | 'danger' | 'error' | 'confirmwarning';
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
53
|
* show close button
|
|
54
|
-
*
|
|
54
|
+
*
|
|
55
55
|
* 是否隐藏关闭按钮
|
|
56
|
-
*
|
|
56
|
+
*
|
|
57
57
|
* default: false
|
|
58
58
|
*/
|
|
59
59
|
hideClose?: boolean,
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
declare class Alert extends React.Component<AlertProps> {}
|
|
63
|
-
export default Alert
|
|
63
|
+
export default Alert
|
package/lib/Cascader/Result.js
CHANGED
|
@@ -96,7 +96,9 @@ function (_PureComponent) {
|
|
|
96
96
|
var compressed = this.props.compressed;
|
|
97
97
|
|
|
98
98
|
if (compressed) {
|
|
99
|
-
this.cancelResizeObserver = (0, _element.addResizeObserver)(this.resultEl, this.resetMore
|
|
99
|
+
this.cancelResizeObserver = (0, _element.addResizeObserver)(this.resultEl, this.resetMore, {
|
|
100
|
+
direction: 'x'
|
|
101
|
+
});
|
|
100
102
|
}
|
|
101
103
|
};
|
|
102
104
|
|
package/lib/DataList/List.js
CHANGED
|
@@ -133,7 +133,8 @@ function (_Component) {
|
|
|
133
133
|
keygen = _this$props2.keygen,
|
|
134
134
|
fixed = _this$props2.fixed,
|
|
135
135
|
rowsInView = _this$props2.rowsInView,
|
|
136
|
-
lineHeight = _this$props2.lineHeight
|
|
136
|
+
lineHeight = _this$props2.lineHeight,
|
|
137
|
+
value = _this$props2.value;
|
|
137
138
|
if (isEmpty) return _react.default.createElement("div", {
|
|
138
139
|
className: (0, _styles.listClass)('item', 'empty')
|
|
139
140
|
}, empty || (0, _locale.getLocale)('noData'));
|
|
@@ -143,7 +144,8 @@ function (_Component) {
|
|
|
143
144
|
data: data,
|
|
144
145
|
keygen: keygen,
|
|
145
146
|
renderItem: this.renderItem,
|
|
146
|
-
itemsInView: rowsInView
|
|
147
|
+
itemsInView: rowsInView,
|
|
148
|
+
force: value
|
|
147
149
|
});
|
|
148
150
|
};
|
|
149
151
|
|
|
@@ -210,7 +212,8 @@ Index.propTypes = {
|
|
|
210
212
|
fixed: _propTypes.default.bool,
|
|
211
213
|
rowsInView: _propTypes.default.number,
|
|
212
214
|
height: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
213
|
-
lineHeight: _propTypes.default.number
|
|
215
|
+
lineHeight: _propTypes.default.number,
|
|
216
|
+
value: _propTypes.default.array
|
|
214
217
|
};
|
|
215
218
|
Index.defaultProps = {
|
|
216
219
|
size: 'default',
|
|
@@ -110,7 +110,6 @@ function (_React$PureComponent) {
|
|
|
110
110
|
_proto.renderTextarea = function renderTextarea() {
|
|
111
111
|
var showTextarea = this.state.showTextarea;
|
|
112
112
|
var _this$props = this.props,
|
|
113
|
-
delay = _this$props.delay,
|
|
114
113
|
placeholder = _this$props.placeholder,
|
|
115
114
|
maxHeight = _this$props.maxHeight,
|
|
116
115
|
value = _this$props.value;
|
|
@@ -122,7 +121,7 @@ function (_React$PureComponent) {
|
|
|
122
121
|
autosize: true,
|
|
123
122
|
value: value,
|
|
124
123
|
rows: 1,
|
|
125
|
-
delay:
|
|
124
|
+
delay: 0,
|
|
126
125
|
onChange: this.onChange,
|
|
127
126
|
onBlur: this.onBlur,
|
|
128
127
|
onFocus: this.handleFocus,
|
package/lib/Modal/Panel.js
CHANGED
|
@@ -222,10 +222,9 @@ function (_PureComponent) {
|
|
|
222
222
|
position = _this$props7.position,
|
|
223
223
|
bodyStyle = _this$props7.bodyStyle,
|
|
224
224
|
_this$props7$from = _this$props7.from,
|
|
225
|
-
from = _this$props7$from === void 0 ? null : _this$props7$from
|
|
226
|
-
type = _this$props7.type;
|
|
225
|
+
from = _this$props7$from === void 0 ? null : _this$props7$from;
|
|
227
226
|
var style = {
|
|
228
|
-
padding: noPadding === true
|
|
227
|
+
padding: noPadding === true ? 0 : padding
|
|
229
228
|
};
|
|
230
229
|
if (position) style.overflow = 'auto';
|
|
231
230
|
if (bodyStyle) style = Object.assign(style, bodyStyle);
|
|
@@ -302,6 +302,18 @@
|
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
|
+
> .@{card-prefix}.@{modal-prefix}-normal {
|
|
306
|
+
.@{modal-prefix}-body {
|
|
307
|
+
padding-left: @modal-icon-body-padding-right;
|
|
308
|
+
}
|
|
309
|
+
&.@{modal-prefix}-rtl {
|
|
310
|
+
.@{modal-prefix}-body {
|
|
311
|
+
padding-right: @modal-icon-body-padding-right;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
|
|
305
317
|
|
|
306
318
|
|
|
307
319
|
> .@{card-prefix}.@{modal-prefix}-rtl {
|
package/lib/Popover/Confirm.js
CHANGED
|
@@ -138,7 +138,7 @@ Confirm.propTypes = (0, _objectSpread2.default)({}, (0, _proptypes.getProps)(_pr
|
|
|
138
138
|
icon: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.node])
|
|
139
139
|
});
|
|
140
140
|
Confirm.defaultProps = {
|
|
141
|
-
type: '
|
|
141
|
+
type: 'confirmwarning',
|
|
142
142
|
icon: true,
|
|
143
143
|
okType: 'danger'
|
|
144
144
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _Panel = _interopRequireDefault(require("./Panel"));
|
|
13
|
+
|
|
14
|
+
function Content(props) {
|
|
15
|
+
// eslint-disable-next-line
|
|
16
|
+
return _react.default.createElement(_Panel.default, (0, _extends2.default)({}, props, {
|
|
17
|
+
useTextStyle: true
|
|
18
|
+
}));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
var _default = Content;
|
|
22
|
+
exports.default = _default;
|