shineout 1.8.2 → 1.8.6

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.
Files changed (88) hide show
  1. package/css/Alert/index.d.ts +15 -15
  2. package/css/Alert/styles/alert.css +8 -4
  3. package/css/AnimationList/AbsoluteList.js +1 -1
  4. package/css/Button/Button.js +1 -1
  5. package/css/DataList/List.js +6 -3
  6. package/css/Form/Field.js +11 -6
  7. package/css/Menu/Item.js +9 -1
  8. package/css/Popover/Confirm.js +1 -1
  9. package/css/Popover/Content.js +22 -0
  10. package/css/Popover/Panel.js +5 -3
  11. package/css/Popover/index.d.ts +9 -2
  12. package/css/Popover/index.js +3 -0
  13. package/css/Popover/styles/popover.css +0 -3
  14. package/css/Scroll/Scroll.js +31 -11
  15. package/css/Select/Input.js +16 -3
  16. package/css/Table/SeperateTable.js +5 -3
  17. package/css/Table/SimpleTable.js +13 -7
  18. package/css/Table/Table.js +3 -1
  19. package/css/Table/resizable.js +1 -1
  20. package/css/Table/styles/table.css +8 -8
  21. package/css/TreeSelect/TreeSelect.js +5 -2
  22. package/css/icons/index.js +2 -1
  23. package/css/index.d.ts +1 -1
  24. package/css/index.js +1 -1
  25. package/css/utils/proptypes.js +1 -1
  26. package/css/utils/validate/index.js +6 -1
  27. package/dist/shineout.js +224 -112
  28. package/dist/shineout.js.map +1 -1
  29. package/dist/shineout.min.js +1 -1
  30. package/dist/theme.antd.css +1 -1
  31. package/dist/theme.antd2.css +1 -1
  32. package/dist/theme.default.css +1 -1
  33. package/dist/theme.shineout.css +1 -1
  34. package/es/Alert/index.d.ts +15 -15
  35. package/es/Alert/styles/alert.less +2 -1
  36. package/es/AnimationList/AbsoluteList.js +1 -1
  37. package/es/Button/Button.js +1 -1
  38. package/es/DataList/List.js +6 -3
  39. package/es/Form/Field.js +11 -6
  40. package/es/Menu/Item.js +9 -1
  41. package/es/Popover/Confirm.js +1 -1
  42. package/es/Popover/Content.js +12 -0
  43. package/es/Popover/Panel.js +5 -3
  44. package/es/Popover/index.d.ts +9 -2
  45. package/es/Popover/index.js +2 -0
  46. package/es/Popover/styles/popover.less +0 -4
  47. package/es/Scroll/Scroll.js +31 -11
  48. package/es/Select/Input.js +16 -3
  49. package/es/Table/SeperateTable.js +5 -3
  50. package/es/Table/SimpleTable.js +13 -7
  51. package/es/Table/Table.js +3 -1
  52. package/es/Table/resizable.js +1 -1
  53. package/es/Table/styles/table.less +1 -1
  54. package/es/TreeSelect/TreeSelect.js +5 -2
  55. package/es/icons/index.js +2 -1
  56. package/es/index.d.ts +1 -1
  57. package/es/index.js +1 -1
  58. package/es/styles/themes/shineout.less +1 -1
  59. package/es/utils/proptypes.js +1 -1
  60. package/es/utils/validate/index.js +5 -1
  61. package/lib/Alert/index.d.ts +15 -15
  62. package/lib/Alert/styles/alert.less +2 -1
  63. package/lib/AnimationList/AbsoluteList.js +1 -1
  64. package/lib/Button/Button.js +1 -1
  65. package/lib/DataList/List.js +6 -3
  66. package/lib/Form/Field.js +11 -6
  67. package/lib/Menu/Item.js +9 -1
  68. package/lib/Popover/Confirm.js +1 -1
  69. package/lib/Popover/Content.js +22 -0
  70. package/lib/Popover/Panel.js +5 -3
  71. package/lib/Popover/index.d.ts +9 -2
  72. package/lib/Popover/index.js +3 -0
  73. package/lib/Popover/styles/popover.less +0 -4
  74. package/lib/Scroll/Scroll.js +31 -11
  75. package/lib/Select/Input.js +16 -3
  76. package/lib/Table/SeperateTable.js +5 -3
  77. package/lib/Table/SimpleTable.js +13 -7
  78. package/lib/Table/Table.js +3 -1
  79. package/lib/Table/resizable.js +1 -1
  80. package/lib/Table/styles/table.less +1 -1
  81. package/lib/TreeSelect/TreeSelect.js +5 -2
  82. package/lib/icons/index.js +2 -1
  83. package/lib/index.d.ts +1 -1
  84. package/lib/index.js +1 -1
  85. package/lib/styles/themes/shineout.less +1 -1
  86. package/lib/utils/proptypes.js +1 -1
  87. package/lib/utils/validate/index.js +6 -1
  88. package/package.json +1 -1
@@ -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
@@ -120,7 +120,8 @@
120
120
  }
121
121
 
122
122
  &-danger,
123
- &-error {
123
+ &-error,
124
+ &-confirmwarning{
124
125
  .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text; @alert-danger-box-shadow);
125
126
 
126
127
  .@{alert-prefix}-icon path {
@@ -115,8 +115,8 @@ function _default(List) {
115
115
  _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
116
116
  var _this2 = this;
117
117
 
118
- if ((0, _shallowEqual.default)(prevProps.value, this.props.value)) return;
119
118
  if (!this.props.focus) this.ajustdoc = false;
119
+ if ((0, _shallowEqual.default)(prevProps.value, this.props.value)) return;
120
120
  setTimeout(function () {
121
121
  _this2.forceUpdate();
122
122
  });
@@ -83,7 +83,7 @@ function (_PureComponent) {
83
83
  disabled: disabled
84
84
  }), this.props.className);
85
85
 
86
- if (href) {
86
+ if (href && !disabled) {
87
87
  return _react.default.createElement("a", (0, _extends2.default)({
88
88
  href: href
89
89
  }, others, {
@@ -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',
package/lib/Form/Field.js CHANGED
@@ -64,13 +64,18 @@ function (_Component) {
64
64
  });
65
65
  }
66
66
 
67
+ var cloneProps = {
68
+ value: value,
69
+ error: error,
70
+ onChange: this.handleChange
71
+ };
72
+
73
+ if (disabled !== undefined) {
74
+ cloneProps.disabled = disabled;
75
+ }
76
+
67
77
  if ((0, _react.isValidElement)(children)) {
68
- return (0, _react.cloneElement)(children, {
69
- value: value,
70
- error: error,
71
- onChange: this.handleChange,
72
- disabled: disabled
73
- });
78
+ return (0, _react.cloneElement)(children, cloneProps);
74
79
  }
75
80
 
76
81
  console.error(new Error('Form.Field expect a single ReactElement or a function.'));
package/lib/Menu/Item.js CHANGED
@@ -57,7 +57,9 @@ function (_PureComponent) {
57
57
 
58
58
  var key = _this.getKey(props);
59
59
 
60
- var _props$bindItem = props.bindItem(_this.id, _this.update.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this))), _this.updateOpen.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this))), _this.updateInPath.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)))),
60
+ var noop = function noop() {};
61
+
62
+ var _props$bindItem = props.bindItem(_this.id, noop, noop, noop),
61
63
  activeUpdate = _props$bindItem[0],
62
64
  openUpdate = _props$bindItem[1],
63
65
  inPathUpdate = _props$bindItem[2];
@@ -79,6 +81,12 @@ function (_PureComponent) {
79
81
 
80
82
  var _proto = Item.prototype;
81
83
 
84
+ _proto.componentDidMount = function componentDidMount() {
85
+ _PureComponent.prototype.componentDidMount.call(this);
86
+
87
+ this.props.bindItem(this.id, this.update.bind(this), this.updateOpen.bind(this), this.updateInPath.bind(this));
88
+ };
89
+
82
90
  _proto.componentWillUnmount = function componentWillUnmount() {
83
91
  _PureComponent.prototype.componentWillUnmount.call(this);
84
92
 
@@ -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: 'warning',
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;
@@ -295,7 +295,8 @@ function (_Component) {
295
295
  children = _this$props4.children,
296
296
  type = _this$props4.type,
297
297
  visible = _this$props4.visible,
298
- showArrow = _this$props4.showArrow;
298
+ showArrow = _this$props4.showArrow,
299
+ useTextStyle = _this$props4.useTextStyle;
299
300
  var show = typeof visible === 'boolean' ? visible : this.state.show;
300
301
 
301
302
  if (!this.isRendered && !show || !this.parentElement || !children) {
@@ -329,7 +330,7 @@ function (_Component) {
329
330
 
330
331
  this.element.className = (0, _classnames.default)((0, _styles.popoverClass)('_', position, type), this.props.className, this.id);
331
332
  var childrened = (0, _is.isFunc)(children) ? children(this.handleHide) : children;
332
- if (typeof childrened === 'string') childrened = _react.default.createElement("span", {
333
+ if (typeof childrened === 'string' || useTextStyle) childrened = _react.default.createElement("span", {
333
334
  className: (0, _styles.popoverClass)('text')
334
335
  }, childrened);
335
336
  return _reactDom.default.createPortal([showArrow && _react.default.createElement("div", {
@@ -373,7 +374,8 @@ Panel.propTypes = {
373
374
  showArrow: _propTypes.default.bool,
374
375
  bindChain: _propTypes.default.func,
375
376
  zIndex: _propTypes.default.number,
376
- clickToCancelDelay: _propTypes.default.bool
377
+ clickToCancelDelay: _propTypes.default.bool,
378
+ useTextStyle: _propTypes.default.bool
377
379
  };
378
380
  Panel.defaultProps = {
379
381
  background: '',
@@ -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 Popover extends React.Component<PopoverProps, {}> {
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
  }
@@ -17,6 +17,8 @@ var _Panel = _interopRequireDefault(require("./Panel"));
17
17
 
18
18
  var _Confirm = _interopRequireDefault(require("./Confirm"));
19
19
 
20
+ var _Content = _interopRequireDefault(require("./Content"));
21
+
20
22
  var Component = (0, _Container.default)(events);
21
23
 
22
24
  function Popover(props) {
@@ -28,5 +30,6 @@ function Popover(props) {
28
30
  Popover.displayName = 'ShineoutPopover';
29
31
  Popover.Confirm = _Confirm.default;
30
32
  Popover.Confirm.displayName = 'ShineoutPopoverConfirm';
33
+ Popover.Content = _Content.default;
31
34
  var _default = Popover;
32
35
  exports.default = _default;
@@ -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 {
@@ -67,6 +67,7 @@ function (_PureComponent) {
67
67
  _this.handleTouchStart = _this.handleTouchStart.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
68
68
  _this.handleTouchMove = _this.handleTouchMove.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
69
69
  _this.setStartPoint = _this.setStartPoint.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
70
+ _this.handleInnerScroll = _this.handleInnerScroll.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
70
71
  return _this;
71
72
  }
72
73
 
@@ -85,6 +86,7 @@ function (_PureComponent) {
85
86
  this.wheelElement.addEventListener('touchmove', this.handleTouchMove, {
86
87
  passive: false
87
88
  });
89
+ this.inner.addEventListener('scroll', this.handleInnerScroll);
88
90
  };
89
91
 
90
92
  _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
@@ -101,6 +103,7 @@ function (_PureComponent) {
101
103
  this.wheelElement.removeEventListener('wheel', this.handleWheel);
102
104
  this.wheelElement.removeEventListener('touchstart', this.handleTouchStart);
103
105
  this.wheelElement.removeEventListener('touchmove', this.handleTouchMove);
106
+ this.inner.removeEventListener('scroll', this.handleInnerScroll);
104
107
  };
105
108
 
106
109
  _proto.getWheelRect = function getWheelRect() {
@@ -280,22 +283,39 @@ function (_PureComponent) {
280
283
 
281
284
  this.setStartPoint(position);
282
285
  this.boundleScroll();
283
- };
286
+ } // inner scroll
287
+ ;
284
288
 
285
- _proto.render = function render() {
289
+ _proto.handleInnerScroll = function handleInnerScroll(e) {
290
+ var target = e.target;
286
291
  var _this$props6 = this.props,
287
- children = _this$props6.children,
288
- scrollWidth = _this$props6.scrollWidth,
289
- scrollHeight = _this$props6.scrollHeight,
290
292
  left = _this$props6.left,
291
- top = _this$props6.top,
292
- scrollX = _this$props6.scrollX,
293
- scrollY = _this$props6.scrollY,
294
- style = _this$props6.style;
293
+ scrollWidth = _this$props6.scrollWidth;
295
294
 
296
295
  var _this$getWheelRect2 = this.getWheelRect(),
297
- width = _this$getWheelRect2.width,
298
- height = _this$getWheelRect2.height;
296
+ width = _this$getWheelRect2.width;
297
+
298
+ if (target.scrollLeft) {
299
+ this.handleScroll(left + target.scrollLeft / (scrollWidth - width), this.props.top, undefined, 0);
300
+ target.scrollLeft = 0;
301
+ target.scrollTop = 0;
302
+ }
303
+ };
304
+
305
+ _proto.render = function render() {
306
+ var _this$props7 = this.props,
307
+ children = _this$props7.children,
308
+ scrollWidth = _this$props7.scrollWidth,
309
+ scrollHeight = _this$props7.scrollHeight,
310
+ left = _this$props7.left,
311
+ top = _this$props7.top,
312
+ scrollX = _this$props7.scrollX,
313
+ scrollY = _this$props7.scrollY,
314
+ style = _this$props7.style;
315
+
316
+ var _this$getWheelRect3 = this.getWheelRect(),
317
+ width = _this$getWheelRect3.width,
318
+ height = _this$getWheelRect3.height;
299
319
 
300
320
  var rtl = (0, _config.isRTL)();
301
321
  var className = (0, _classnames.default)((0, _styles.scrollClass)('_', scrollX && 'show-x', scrollY && 'show-y', rtl && 'rtl'), this.props.className);
@@ -46,7 +46,9 @@ function (_Component) {
46
46
  _this.handleBlur = _this.handleBlur.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
47
47
  _this.geHandleMax = _this.geHandleMax.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
48
48
  _this.handlePaste = _this.handlePaste.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
49
- _this.focusInput = _this.focusInput.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this))); // for mutiple select
49
+ _this.focusInput = _this.focusInput.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
50
+ _this.handleCompositionStart = _this.handleCompositionStart.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
51
+ _this.handleCompositionEnd = _this.handleCompositionEnd.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this))); // for mutiple select
50
52
 
51
53
  _this.props.setInputReset(_this.reset.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)))); // set focus func to Select
52
54
 
@@ -98,7 +100,7 @@ function (_Component) {
98
100
  _proto.geHandleMax = function geHandleMax(e) {
99
101
  var maxLength = this.props.maxLength;
100
102
 
101
- if (!maxLength) {
103
+ if (!maxLength || this.composition) {
102
104
  return true;
103
105
  }
104
106
 
@@ -219,6 +221,15 @@ function (_Component) {
219
221
  this.props.onInputBlur(text);
220
222
  };
221
223
 
224
+ _proto.handleCompositionStart = function handleCompositionStart() {
225
+ this.composition = true;
226
+ };
227
+
228
+ _proto.handleCompositionEnd = function handleCompositionEnd(e) {
229
+ this.composition = false;
230
+ this.handleInput(e);
231
+ };
232
+
222
233
  _proto.render = function render() {
223
234
  var _this$props = this.props,
224
235
  text = _this$props.text,
@@ -233,7 +244,9 @@ function (_Component) {
233
244
  contentEditable: focus || this.state.editable,
234
245
  onFocus: handleFocus,
235
246
  onBlur: this.handleBlur,
236
- title: !focus && (0, _is.isString)(value) ? value : null
247
+ title: !focus && (0, _is.isString)(value) ? value : null,
248
+ onCompositionStart: this.handleCompositionStart,
249
+ onCompositionEnd: this.handleCompositionEnd
237
250
  };
238
251
 
239
252
  if ((0, _react.isValidElement)(value)) {
@@ -635,7 +635,8 @@ function (_PureComponent) {
635
635
  rowHeight = _this$props7.rowHeight,
636
636
  columnResizable = _this$props7.columnResizable,
637
637
  innerScrollAttr = _this$props7.innerScrollAttr,
638
- others = (0, _objectWithoutPropertiesLoose2.default)(_this$props7, ["data", "rowsInView", "columns", "width", "fixed", "rowHeight", "columnResizable", "innerScrollAttr"]);
638
+ bordered = _this$props7.bordered,
639
+ others = (0, _objectWithoutPropertiesLoose2.default)(_this$props7, ["data", "rowsInView", "columns", "width", "fixed", "rowHeight", "columnResizable", "innerScrollAttr", "bordered"]);
639
640
  var _this$state3 = this.state,
640
641
  colgroup = _this$state3.colgroup,
641
642
  scrollTop = _this$state3.scrollTop,
@@ -681,7 +682,7 @@ function (_PureComponent) {
681
682
  height: prevHeight
682
683
  }
683
684
  }), _react.default.createElement("table", {
684
- className: (0, _styles.tableClass)(!colgroup && minWidthSup && 'init'),
685
+ className: (0, _styles.tableClass)(!colgroup && minWidthSup && 'init', bordered && 'table-bordered'),
685
686
  style: {
686
687
  width: width
687
688
  },
@@ -724,7 +725,8 @@ function (_PureComponent) {
724
725
  style: {
725
726
  width: width
726
727
  },
727
- ref: this.bindThead
728
+ ref: this.bindThead,
729
+ className: (0, _styles.tableClass)('table-bordered')
728
730
  }, _react.default.createElement(_Colgroup.default, {
729
731
  colgroup: colgroup,
730
732
  columns: columns,
@@ -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
- others = (0, _objectWithoutPropertiesLoose2.default)(_this$props3, ["columns", "width", "fixed", "columnResizable"]);
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,
@@ -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, props), loading && _react.default.createElement("div", {
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
@@ -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];
@@ -283,7 +283,7 @@
283
283
  }
284
284
  }
285
285
 
286
- table {
286
+ .@{table-prefix}-table-bordered {
287
287
  > thead,
288
288
  > tbody,
289
289
  > tfoot {
@@ -294,7 +294,9 @@ function (_PureComponent) {
294
294
  data = _this$props7.data,
295
295
  absolute = _this$props7.absolute,
296
296
  height = _this$props7.height,
297
- zIndex = _this$props7.zIndex;
297
+ zIndex = _this$props7.zIndex,
298
+ compressed = _this$props7.compressed,
299
+ value = _this$props7.value;
298
300
  var props = {};
299
301
  ['mode', 'data', 'datum', 'defaultExpanded', 'defaultExpandAll', 'disabled', 'expanded', 'keygen', 'loader', 'onExpand', 'renderItem', 'line', 'parentClickExpand', 'childrenKey', 'expandIcons'].forEach(function (k) {
300
302
  props[k] = _this3.props[k];
@@ -331,7 +333,8 @@ function (_PureComponent) {
331
333
  overflowY: 'auto'
332
334
  },
333
335
  fixed: "min",
334
- zIndex: zIndex
336
+ zIndex: zIndex,
337
+ value: multiple && !compressed ? value : undefined
335
338
  }, _react.default.createElement("div", {
336
339
  className: (0, _styles.treeSelectClass)('tree-wrapper')
337
340
  }, content));
@@ -59,6 +59,7 @@ var _default = {
59
59
  Recovery: icon(recovery),
60
60
  Warning: icon(warning),
61
61
  Check: icon(check),
62
- Preview: icon(preview)
62
+ Preview: icon(preview),
63
+ Confirmwarning: icon(warning)
63
64
  };
64
65
  exports.default = _default;
package/lib/index.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  import './styles/normalize.less'
3
3
  import * as utils from './utils'
4
4
 
5
- export default { utils, version: '1.8.2' }
5
+ export default { utils, version: '1.8.6' }
6
6
  export { utils }
7
7
  export { setLocale } from './locale'
8
8
  export { color, style } from './utils/expose'
package/lib/index.js CHANGED
@@ -222,6 +222,6 @@ exports.Upload = _Upload.default;
222
222
  // Created by scripts/src-index.js.
223
223
  var _default = {
224
224
  utils: utils,
225
- version: '1.8.2'
225
+ version: '1.8.6'
226
226
  };
227
227
  exports.default = _default;
@@ -1,7 +1,7 @@
1
1
  @import './bootstrap.less';
2
2
  @import './cssvar.less';
3
3
 
4
- @font-family-sans-serif: -apple-system, system-ui, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, 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);
@@ -15,7 +15,7 @@ function getProps(PropTypes) {
15
15
  grid: PropTypes.oneOfType([PropTypes.number, PropTypes.object]),
16
16
  placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element, PropTypes.func]),
17
17
  size: PropTypes.oneOf(['small', 'default', 'large']),
18
- type: PropTypes.oneOf(['primary', 'default', 'secondary', 'success', 'info', 'warning', 'error', 'danger', 'link'])
18
+ type: PropTypes.oneOf(['primary', 'default', 'secondary', 'success', 'info', 'warning', 'error', 'danger', 'link', 'confirmwarning'])
19
19
  };
20
20
 
21
21
  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
@@ -5,6 +5,8 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  exports.__esModule = true;
6
6
  exports.default = void 0;
7
7
 
8
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread"));
9
+
8
10
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
9
11
 
10
12
  var _Datum = _interopRequireDefault(require("../../Datum"));
@@ -58,7 +60,10 @@ function getRule(rules, props) {
58
60
 
59
61
  if (other.min !== undefined || other.max !== undefined) {
60
62
  if (type === 'number' || type === 'integer') {
61
- return (0, _range.default)(props);
63
+ return (0, _range.default)((0, _objectSpread2.default)({}, props, {
64
+ min: other.min,
65
+ max: other.max
66
+ }));
62
67
  }
63
68
 
64
69
  return (0, _rangeLength.default)(props);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shineout",
3
- "version": "1.8.2",
3
+ "version": "1.8.6",
4
4
  "description": "Shein 前端组件库",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./es/index.js",