@douyinfe/semi-ui 2.25.0-beta.0 → 2.25.0

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.
@@ -37,9 +37,21 @@ require("@douyinfe/semi-foundation/lib/cjs/image/image.css");
37
37
 
38
38
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
39
39
 
40
+ var __rest = void 0 && (void 0).__rest || function (s, e) {
41
+ var t = {};
42
+
43
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
44
+
45
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
46
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
47
+ }
48
+ return t;
49
+ };
40
50
  /* eslint-disable jsx-a11y/click-events-have-key-events */
41
51
 
42
52
  /* eslint-disable jsx-a11y/no-static-element-interactions */
53
+
54
+
43
55
  const prefixCls = _constants.cssClasses.PREFIX;
44
56
 
45
57
  class Image extends _baseComponent.default {
@@ -190,15 +202,23 @@ class Image extends _baseComponent.default {
190
202
  loadStatus,
191
203
  previewVisible
192
204
  } = this.state;
193
- const {
205
+
206
+ const _b = this.props,
207
+ {
208
+ src: picSrc,
194
209
  width,
195
210
  height,
196
211
  alt,
197
212
  style,
198
213
  className,
199
214
  crossOrigin,
200
- preview
201
- } = this.props;
215
+ preview,
216
+ fallback,
217
+ placeholder,
218
+ imageID
219
+ } = _b,
220
+ restProps = __rest(_b, ["src", "width", "height", "alt", "style", "className", "crossOrigin", "preview", "fallback", "placeholder", "imageID"]);
221
+
202
222
  const outerStyle = Object.assign({
203
223
  width,
204
224
  height
@@ -216,7 +236,7 @@ class Image extends _baseComponent.default {
216
236
  style: outerStyle,
217
237
  className: outerCls,
218
238
  onClick: this.handleClick
219
- }, /*#__PURE__*/_react.default.createElement("img", {
239
+ }, /*#__PURE__*/_react.default.createElement("img", Object.assign({}, restProps, {
220
240
  src: this.isInGroup() && this.isLazyLoad() ? undefined : src,
221
241
  "data-src": src,
222
242
  alt: alt,
@@ -229,7 +249,7 @@ class Image extends _baseComponent.default {
229
249
  crossOrigin: crossOrigin,
230
250
  onError: this.handleError,
231
251
  onLoad: this.handleLoaded
232
- }), loadStatus !== "success" && this.renderExtra(), canPreview && /*#__PURE__*/_react.default.createElement(_previewInner.default, Object.assign({}, previewProps, {
252
+ })), loadStatus !== "success" && this.renderExtra(), canPreview && /*#__PURE__*/_react.default.createElement(_previewInner.default, Object.assign({}, previewProps, {
233
253
  src: previewSrc,
234
254
  visible: previewVisible,
235
255
  onVisibleChange: this.handlePreviewVisibleChange,
@@ -472,7 +472,7 @@ class TagInput extends _baseComponent.default {
472
472
  }
473
473
 
474
474
  blur() {
475
- this.inputRef.current.blur(); // unregister clickOutside event
475
+ this.inputRef.current.blur(); // unregister clickOutside event
476
476
 
477
477
  this.foundation.clickOutsideCallBack();
478
478
  }
@@ -487,7 +487,7 @@ class TagInput extends _baseComponent.default {
487
487
  });
488
488
 
489
489
  if (!disabled) {
490
- // register clickOutside event
490
+ // register clickOutside event
491
491
  this.foundation.handleClick();
492
492
  }
493
493
  }
@@ -513,13 +513,15 @@ class TagInput extends _baseComponent.default {
513
513
  ["".concat(prefixCls, "-disabled")]: disabled,
514
514
  ["".concat(prefixCls, "-hover")]: hovering && !disabled,
515
515
  ["".concat(prefixCls, "-error")]: validateStatus === 'error',
516
- ["".concat(prefixCls, "-warning")]: validateStatus === 'warning'
516
+ ["".concat(prefixCls, "-warning")]: validateStatus === 'warning',
517
+ ["".concat(prefixCls, "-small")]: size === 'small',
518
+ ["".concat(prefixCls, "-large")]: size === 'large'
517
519
  });
518
520
  const inputCls = (0, _classnames.default)("".concat(prefixCls, "-wrapper-input"), "".concat(prefixCls, "-wrapper-input-").concat(size));
519
- const wrapperCls = (0, _classnames.default)("".concat(prefixCls, "-wrapper"), "".concat(prefixCls, "-wrapper-").concat(size));
521
+ const wrapperCls = (0, _classnames.default)("".concat(prefixCls, "-wrapper"));
520
522
  return (
521
523
  /*#__PURE__*/
522
- // eslint-disable-next-line
524
+ // eslint-disable-next-line
523
525
  _react.default.createElement("div", {
524
526
  ref: this.tagInputRef,
525
527
  style: style,
@@ -2,9 +2,21 @@ import _isUndefined from "lodash/isUndefined";
2
2
  import _isObject from "lodash/isObject";
3
3
  import _isBoolean from "lodash/isBoolean";
4
4
 
5
+ var __rest = this && this.__rest || function (s, e) {
6
+ var t = {};
7
+
8
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
9
+
10
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
11
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
12
+ }
13
+ return t;
14
+ };
5
15
  /* eslint-disable jsx-a11y/click-events-have-key-events */
6
16
 
7
17
  /* eslint-disable jsx-a11y/no-static-element-interactions */
18
+
19
+
8
20
  import React from "react";
9
21
  import BaseComponent from "../_base/baseComponent";
10
22
  import PropTypes from "prop-types";
@@ -166,15 +178,23 @@ export default class Image extends BaseComponent {
166
178
  loadStatus,
167
179
  previewVisible
168
180
  } = this.state;
169
- const {
181
+
182
+ const _b = this.props,
183
+ {
184
+ src: picSrc,
170
185
  width,
171
186
  height,
172
187
  alt,
173
188
  style,
174
189
  className,
175
190
  crossOrigin,
176
- preview
177
- } = this.props;
191
+ preview,
192
+ fallback,
193
+ placeholder,
194
+ imageID
195
+ } = _b,
196
+ restProps = __rest(_b, ["src", "width", "height", "alt", "style", "className", "crossOrigin", "preview", "fallback", "placeholder", "imageID"]);
197
+
178
198
  const outerStyle = Object.assign({
179
199
  width,
180
200
  height
@@ -192,7 +212,7 @@ export default class Image extends BaseComponent {
192
212
  style: outerStyle,
193
213
  className: outerCls,
194
214
  onClick: this.handleClick
195
- }, /*#__PURE__*/React.createElement("img", {
215
+ }, /*#__PURE__*/React.createElement("img", Object.assign({}, restProps, {
196
216
  src: this.isInGroup() && this.isLazyLoad() ? undefined : src,
197
217
  "data-src": src,
198
218
  alt: alt,
@@ -205,7 +225,7 @@ export default class Image extends BaseComponent {
205
225
  crossOrigin: crossOrigin,
206
226
  onError: this.handleError,
207
227
  onLoad: this.handleLoaded
208
- }), loadStatus !== "success" && this.renderExtra(), canPreview && /*#__PURE__*/React.createElement(PreviewInner, Object.assign({}, previewProps, {
228
+ })), loadStatus !== "success" && this.renderExtra(), canPreview && /*#__PURE__*/React.createElement(PreviewInner, Object.assign({}, previewProps, {
209
229
  src: previewSrc,
210
230
  visible: previewVisible,
211
231
  onVisibleChange: this.handlePreviewVisibleChange,
@@ -442,7 +442,7 @@ class TagInput extends BaseComponent {
442
442
  }
443
443
 
444
444
  blur() {
445
- this.inputRef.current.blur(); // unregister clickOutside event
445
+ this.inputRef.current.blur(); // unregister clickOutside event
446
446
 
447
447
  this.foundation.clickOutsideCallBack();
448
448
  }
@@ -457,7 +457,7 @@ class TagInput extends BaseComponent {
457
457
  });
458
458
 
459
459
  if (!disabled) {
460
- // register clickOutside event
460
+ // register clickOutside event
461
461
  this.foundation.handleClick();
462
462
  }
463
463
  }
@@ -483,13 +483,15 @@ class TagInput extends BaseComponent {
483
483
  ["".concat(prefixCls, "-disabled")]: disabled,
484
484
  ["".concat(prefixCls, "-hover")]: hovering && !disabled,
485
485
  ["".concat(prefixCls, "-error")]: validateStatus === 'error',
486
- ["".concat(prefixCls, "-warning")]: validateStatus === 'warning'
486
+ ["".concat(prefixCls, "-warning")]: validateStatus === 'warning',
487
+ ["".concat(prefixCls, "-small")]: size === 'small',
488
+ ["".concat(prefixCls, "-large")]: size === 'large'
487
489
  });
488
490
  const inputCls = cls("".concat(prefixCls, "-wrapper-input"), "".concat(prefixCls, "-wrapper-input-").concat(size));
489
- const wrapperCls = cls("".concat(prefixCls, "-wrapper"), "".concat(prefixCls, "-wrapper-").concat(size));
491
+ const wrapperCls = cls("".concat(prefixCls, "-wrapper"));
490
492
  return (
491
493
  /*#__PURE__*/
492
- // eslint-disable-next-line
494
+ // eslint-disable-next-line
493
495
  React.createElement("div", {
494
496
  ref: this.tagInputRef,
495
497
  style: style,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-ui",
3
- "version": "2.25.0-beta.0",
3
+ "version": "2.25.0",
4
4
  "description": "",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es/index.js",
@@ -17,12 +17,12 @@
17
17
  "lib/*"
18
18
  ],
19
19
  "dependencies": {
20
- "@douyinfe/semi-animation": "2.25.0-beta.0",
21
- "@douyinfe/semi-animation-react": "2.25.0-beta.0",
22
- "@douyinfe/semi-foundation": "2.25.0-beta.0",
23
- "@douyinfe/semi-icons": "2.25.0-beta.0",
24
- "@douyinfe/semi-illustrations": "2.25.0-beta.0",
25
- "@douyinfe/semi-theme-default": "2.25.0-beta.0",
20
+ "@douyinfe/semi-animation": "2.25.0",
21
+ "@douyinfe/semi-animation-react": "2.25.0",
22
+ "@douyinfe/semi-foundation": "2.25.0",
23
+ "@douyinfe/semi-icons": "2.25.0",
24
+ "@douyinfe/semi-illustrations": "2.25.0",
25
+ "@douyinfe/semi-theme-default": "2.25.0",
26
26
  "async-validator": "^3.5.0",
27
27
  "classnames": "^2.2.6",
28
28
  "copy-text-to-clipboard": "^2.1.1",
@@ -69,7 +69,7 @@
69
69
  ],
70
70
  "author": "",
71
71
  "license": "MIT",
72
- "gitHead": "72351802667e5c906035fb969b65b0ce83ea88f7",
72
+ "gitHead": "3c2ec566acd956095fc502690245c9a502251357",
73
73
  "devDependencies": {
74
74
  "@babel/plugin-proposal-decorators": "^7.15.8",
75
75
  "@babel/plugin-transform-runtime": "^7.15.8",