@douyinfe/semi-ui 2.8.0 → 2.9.0-beta.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.
Files changed (43) hide show
  1. package/_base/_story/index.scss +0 -1
  2. package/badge/index.tsx +12 -3
  3. package/descriptions/index.tsx +4 -5
  4. package/descriptions/item.tsx +1 -1
  5. package/dist/css/semi.css +63 -16
  6. package/dist/css/semi.min.css +1 -1
  7. package/dist/umd/semi-ui.js +181 -26
  8. package/dist/umd/semi-ui.js.map +1 -1
  9. package/dist/umd/semi-ui.min.js +1 -1
  10. package/dist/umd/semi-ui.min.js.map +1 -1
  11. package/divider/__test__/divider.test.js +72 -0
  12. package/divider/_story/Demo.tsx +16 -0
  13. package/divider/_story/divider.stories.js +41 -0
  14. package/divider/_story/divider.stories.tsx +8 -0
  15. package/divider/index.tsx +72 -0
  16. package/form/_story/demo.jsx +9 -0
  17. package/index.ts +1 -0
  18. package/lib/cjs/badge/index.d.ts +9 -0
  19. package/lib/cjs/badge/index.js +34 -6
  20. package/lib/cjs/descriptions/index.d.ts +1 -2
  21. package/lib/cjs/descriptions/index.js +4 -3
  22. package/lib/cjs/descriptions/item.d.ts +1 -1
  23. package/lib/cjs/divider/index.d.ts +20 -0
  24. package/lib/cjs/divider/index.js +88 -0
  25. package/lib/cjs/index.d.ts +1 -0
  26. package/lib/cjs/index.js +9 -0
  27. package/lib/cjs/slider/index.js +16 -12
  28. package/lib/cjs/tagInput/index.d.ts +1 -1
  29. package/lib/es/badge/index.d.ts +9 -0
  30. package/lib/es/badge/index.js +31 -6
  31. package/lib/es/descriptions/index.d.ts +1 -2
  32. package/lib/es/descriptions/index.js +4 -3
  33. package/lib/es/descriptions/item.d.ts +1 -1
  34. package/lib/es/divider/index.d.ts +20 -0
  35. package/lib/es/divider/index.js +68 -0
  36. package/lib/es/index.d.ts +1 -0
  37. package/lib/es/index.js +1 -0
  38. package/lib/es/slider/index.js +16 -12
  39. package/lib/es/tagInput/index.d.ts +1 -1
  40. package/package.json +10 -10
  41. package/slider/_story/slider.stories.js +28 -6
  42. package/slider/index.tsx +16 -11
  43. package/upload/_story/upload.stories.js +2 -3
@@ -1,6 +1,22 @@
1
+ import _noop from "lodash/noop";
1
2
  import _isString from "lodash/isString";
2
3
  import _isNumber from "lodash/isNumber";
4
+ import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/index-of";
5
+ import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
3
6
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
7
+ import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
8
+
9
+ var __rest = this && this.__rest || function (s, e) {
10
+ var t = {};
11
+
12
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && _indexOfInstanceProperty(e).call(e, p) < 0) t[p] = s[p];
13
+
14
+ if (s != null && typeof _Object$getOwnPropertySymbols === "function") for (var i = 0, p = _Object$getOwnPropertySymbols(s); i < p.length; i++) {
15
+ if (_indexOfInstanceProperty(e).call(e, p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
16
+ }
17
+ return t;
18
+ };
19
+
4
20
  import React, { PureComponent } from 'react';
5
21
  import cls from 'classnames';
6
22
  import PropTypes from 'prop-types';
@@ -18,7 +34,8 @@ export default class Badge extends PureComponent {
18
34
 
19
35
  const defaultPosition = direction === 'rtl' ? 'leftTop' : 'rightTop'; // eslint-disable-next-line max-len
20
36
 
21
- const {
37
+ const _a = this.props,
38
+ {
22
39
  count,
23
40
  dot,
24
41
  type,
@@ -28,7 +45,9 @@ export default class Badge extends PureComponent {
28
45
  style,
29
46
  children,
30
47
  className
31
- } = this.props;
48
+ } = _a,
49
+ rest = __rest(_a, ["count", "dot", "type", "theme", "position", "overflowCount", "style", "children", "className"]);
50
+
32
51
  const custom = count && !(_isNumber(count) || _isString(count));
33
52
  const showBadge = count !== null && typeof count !== 'undefined';
34
53
  const wrapper = cls(className, {
@@ -48,9 +67,9 @@ export default class Badge extends PureComponent {
48
67
  content = count;
49
68
  }
50
69
 
51
- return /*#__PURE__*/React.createElement("span", {
70
+ return /*#__PURE__*/React.createElement("span", _Object$assign({
52
71
  className: prefixCls
53
- }, children, /*#__PURE__*/React.createElement("span", {
72
+ }, rest), children, /*#__PURE__*/React.createElement("span", {
54
73
  className: wrapper,
55
74
  style: style
56
75
  }, dot ? null : content));
@@ -67,11 +86,17 @@ Badge.propTypes = {
67
86
  overflowCount: PropTypes.number,
68
87
  style: PropTypes.object,
69
88
  className: PropTypes.string,
70
- children: PropTypes.node
89
+ children: PropTypes.node,
90
+ onClick: PropTypes.func,
91
+ onMouseEnter: PropTypes.func,
92
+ onMouseLeave: PropTypes.func
71
93
  };
72
94
  Badge.defaultProps = {
73
95
  dot: false,
74
96
  type: 'primary',
75
97
  theme: 'solid',
76
- className: ''
98
+ className: '',
99
+ onClick: () => _noop,
100
+ onMouseEnter: () => _noop,
101
+ onMouseLeave: () => _noop
77
102
  };
@@ -6,8 +6,7 @@ import Item from './item';
6
6
  export { DescriptionsItemProps } from './item';
7
7
  export declare type DescriptionsSize = 'small' | 'medium' | 'large';
8
8
  export interface Data {
9
- [x: string]: any;
10
- key?: string | number;
9
+ key?: React.ReactNode;
11
10
  value?: (() => React.ReactNode) | React.ReactNode;
12
11
  hidden?: boolean;
13
12
  }
@@ -29,10 +29,11 @@ class Descriptions extends PureComponent {
29
29
  ["".concat(prefixCls, "-double")]: row,
30
30
  [_concatInstanceProperty(_context2 = "".concat(prefixCls, "-double-")).call(_context2, size)]: row
31
31
  });
32
- const childrenList = data && data.length ? _mapInstanceProperty(data).call(data, item => _isPlainObject(item) ? /*#__PURE__*/React.createElement(Item, _Object$assign({
33
- key: item.key,
32
+ const childrenList = data && data.length ? _mapInstanceProperty(data).call(data, (item, index) => _isPlainObject(item) ? /*#__PURE__*/React.createElement(Item, _Object$assign({
34
33
  itemKey: item.key
35
- }, item), item.value) : null) : children;
34
+ }, item, {
35
+ key: index
36
+ }), item.value) : null) : children;
36
37
  return /*#__PURE__*/React.createElement("div", {
37
38
  className: classNames,
38
39
  style: style
@@ -5,7 +5,7 @@ export interface DescriptionsItemProps {
5
5
  hidden?: boolean;
6
6
  className?: string;
7
7
  style?: React.CSSProperties;
8
- itemKey: string | number;
8
+ itemKey?: React.ReactNode;
9
9
  }
10
10
  export default class Item extends PureComponent<DescriptionsItemProps> {
11
11
  static propTypes: {
@@ -0,0 +1,20 @@
1
+ import React, { CSSProperties, ReactNode } from 'react';
2
+ import '@douyinfe/semi-foundation/lib/es/divider/divider.css';
3
+ export interface DividerProps {
4
+ /** The position of title inside divider */
5
+ align?: 'left' | 'right' | 'center';
6
+ /** space between divider and surroundings **/
7
+ margin?: number | string;
8
+ /** The wrapped title */
9
+ children?: ReactNode;
10
+ /** Style class name */
11
+ className?: string;
12
+ /** Whether line is dashed */
13
+ dashed?: boolean;
14
+ /** The direction type of divider */
15
+ layout?: 'horizontal' | 'vertical';
16
+ /** Divider inline style */
17
+ style?: CSSProperties;
18
+ }
19
+ declare const Divider: React.FC<DividerProps>;
20
+ export default Divider;
@@ -0,0 +1,68 @@
1
+ import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/index-of";
2
+ import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
3
+ import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
4
+ import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
5
+
6
+ var __rest = this && this.__rest || function (s, e) {
7
+ var t = {};
8
+
9
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && _indexOfInstanceProperty(e).call(e, p) < 0) t[p] = s[p];
10
+
11
+ if (s != null && typeof _Object$getOwnPropertySymbols === "function") for (var i = 0, p = _Object$getOwnPropertySymbols(s); i < p.length; i++) {
12
+ if (_indexOfInstanceProperty(e).call(e, p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
13
+ }
14
+ return t;
15
+ };
16
+
17
+ import React from 'react';
18
+ import cls from 'classnames';
19
+ import { cssClasses } from '@douyinfe/semi-foundation/lib/es/divider/constants';
20
+ import '@douyinfe/semi-foundation/lib/es/divider/divider.css';
21
+ const prefixCls = cssClasses.PREFIX;
22
+
23
+ const Divider = props => {
24
+ var _context;
25
+
26
+ const {
27
+ layout = 'horizontal',
28
+ dashed,
29
+ align = 'center',
30
+ className,
31
+ margin,
32
+ style,
33
+ children
34
+ } = props,
35
+ rest = __rest(props, ["layout", "dashed", "align", "className", "margin", "style", "children"]);
36
+
37
+ const dividerClassNames = cls("".concat(prefixCls, "-divider"), className, {
38
+ ["".concat(prefixCls, "-divider-horizontal")]: layout === 'horizontal',
39
+ ["".concat(prefixCls, "-divider-vertical")]: layout === 'vertical',
40
+ ["".concat(prefixCls, "-divider-dashed")]: !!dashed,
41
+ ["".concat(prefixCls, "-divider-with-text")]: children && layout === 'horizontal',
42
+ [_concatInstanceProperty(_context = "".concat(prefixCls, "-divider-with-text-")).call(_context, align)]: children && layout === 'horizontal'
43
+ });
44
+ let overrideDefaultStyle = {};
45
+
46
+ if (margin !== undefined) {
47
+ if (layout === 'vertical') {
48
+ overrideDefaultStyle = {
49
+ 'marginLeft': margin,
50
+ 'marginRight': margin
51
+ };
52
+ } else if (layout === 'horizontal') {
53
+ overrideDefaultStyle = {
54
+ 'marginTop': margin,
55
+ 'marginBottom': margin
56
+ };
57
+ }
58
+ }
59
+
60
+ return /*#__PURE__*/React.createElement("div", _Object$assign({}, rest, {
61
+ className: dividerClassNames,
62
+ style: _Object$assign(_Object$assign({}, overrideDefaultStyle), style)
63
+ }), children && layout === 'horizontal' ? typeof children === 'string' ? /*#__PURE__*/React.createElement("span", {
64
+ className: "".concat(prefixCls, "-divider_inner-text")
65
+ }, children) : children : null);
66
+ };
67
+
68
+ export default Divider;
package/lib/es/index.d.ts CHANGED
@@ -20,6 +20,7 @@ export { default as Collapsible } from './collapsible';
20
20
  export { default as ConfigProvider } from './configProvider';
21
21
  export { default as DatePicker } from './datePicker';
22
22
  export { default as Descriptions } from './descriptions';
23
+ export { default as Divider } from './divider';
23
24
  export { default as Empty } from './empty';
24
25
  export { default as Modal } from './modal';
25
26
  export { default as Dropdown } from './dropdown';
package/lib/es/index.js CHANGED
@@ -20,6 +20,7 @@ export { default as Collapsible } from './collapsible';
20
20
  export { default as ConfigProvider } from './configProvider';
21
21
  export { default as DatePicker } from './datePicker';
22
22
  export { default as Descriptions } from './descriptions';
23
+ export { default as Divider } from './divider';
23
24
  export { default as Empty } from './empty';
24
25
  export { default as Modal } from './modal';
25
26
  export { default as Dropdown } from './dropdown';
@@ -266,7 +266,10 @@ export default class Slider extends BaseComponent {
266
266
  ["".concat(prefixCls, "-dot-active")]: this.foundation.isMarkActive(Number(mark)) === 'active'
267
267
  });
268
268
  const markPercent = (Number(mark) - min) / (max - min);
269
- return activeResult ? /*#__PURE__*/React.createElement("span", {
269
+ return activeResult ?
270
+ /*#__PURE__*/
271
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions
272
+ React.createElement("span", {
270
273
  key: mark,
271
274
  onClick: e => this.foundation.handleWrapClick(e),
272
275
  className: markClass,
@@ -448,6 +451,7 @@ export default class Slider extends BaseComponent {
448
451
  onHandleMove: function (mousePos, isMin) {
449
452
  let stateChangeCallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _noop;
450
453
  let clickTrack = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
454
+ let outPutValue = arguments.length > 4 ? arguments[4] : undefined;
451
455
 
452
456
  const sliderDOMIsInRenderTree = _this.foundation.checkAndUpdateIsInRenderTreeState();
453
457
 
@@ -456,32 +460,32 @@ export default class Slider extends BaseComponent {
456
460
  }
457
461
 
458
462
  const {
459
- value,
460
- onChange
463
+ value
461
464
  } = _this.props;
465
+ let finalOutPutValue = outPutValue;
462
466
 
463
- const moveValue = _this.foundation.transPosToValue(mousePos, isMin);
467
+ if (finalOutPutValue === undefined) {
468
+ const moveValue = _this.foundation.transPosToValue(mousePos, isMin);
464
469
 
465
- if (moveValue === false) {
466
- return;
467
- }
470
+ if (moveValue === false) {
471
+ return;
472
+ }
468
473
 
469
- const outPutValue = _this.foundation.outPutValue(moveValue);
474
+ finalOutPutValue = _this.foundation.outPutValue(moveValue);
475
+ }
470
476
 
471
477
  const {
472
478
  currentValue
473
479
  } = _this.state;
474
480
 
475
- if (!_isEqual(_this.foundation.outPutValue(currentValue), outPutValue)) {
476
- onChange(outPutValue);
477
-
481
+ if (!_isEqual(_this.foundation.outPutValue(currentValue), finalOutPutValue)) {
478
482
  if (!clickTrack && _this.foundation.valueFormatIsCorrect(value)) {
479
483
  // still require afterChangeCallback when click on the track directly, need skip here
480
484
  return false;
481
485
  }
482
486
 
483
487
  _this.setState({
484
- currentValue: outPutValue
488
+ currentValue: finalOutPutValue
485
489
  }, stateChangeCallback);
486
490
  }
487
491
  },
@@ -82,7 +82,7 @@ declare class TagInput extends BaseComponent<TagInputProps, TagInputState> {
82
82
  onRemove: PropTypes.Requireable<(...args: any[]) => any>;
83
83
  onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
84
84
  size: PropTypes.Requireable<"default" | "small" | "large">;
85
- validateStatus: PropTypes.Requireable<"default" | "error" | "warning">;
85
+ validateStatus: PropTypes.Requireable<"default" | "error" | "warning" | "success">;
86
86
  prefix: PropTypes.Requireable<PropTypes.ReactNodeLike>;
87
87
  suffix: PropTypes.Requireable<PropTypes.ReactNodeLike>;
88
88
  'aria-label': PropTypes.Requireable<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-ui",
3
- "version": "2.8.0",
3
+ "version": "2.9.0-beta.0",
4
4
  "description": "",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es/index.js",
@@ -14,12 +14,12 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "@babel/runtime-corejs3": "^7.15.4",
17
- "@douyinfe/semi-animation": "2.8.0",
18
- "@douyinfe/semi-animation-react": "2.8.0",
19
- "@douyinfe/semi-foundation": "2.8.0",
20
- "@douyinfe/semi-icons": "2.8.0",
21
- "@douyinfe/semi-illustrations": "2.8.0",
22
- "@douyinfe/semi-theme-default": "2.8.0",
17
+ "@douyinfe/semi-animation": "2.9.0-beta.0",
18
+ "@douyinfe/semi-animation-react": "2.9.0-beta.0",
19
+ "@douyinfe/semi-foundation": "2.9.0-beta.0",
20
+ "@douyinfe/semi-icons": "2.9.0-beta.0",
21
+ "@douyinfe/semi-illustrations": "2.9.0-beta.0",
22
+ "@douyinfe/semi-theme-default": "2.9.0-beta.0",
23
23
  "@types/react-window": "^1.8.2",
24
24
  "async-validator": "^3.5.0",
25
25
  "classnames": "^2.2.6",
@@ -60,7 +60,7 @@
60
60
  },
61
61
  "repository": {
62
62
  "type": "git",
63
- "url": "https://github.com/DouyinFE"
63
+ "url": "https://github.com/DouyinFE/semi-design"
64
64
  },
65
65
  "_unpkg": true,
66
66
  "unpkgFiles": [
@@ -69,13 +69,13 @@
69
69
  ],
70
70
  "author": "",
71
71
  "license": "MIT",
72
- "gitHead": "756ffea15f08be07c1fe934d06a7fd033d88a96e",
72
+ "gitHead": "acb1db546e6d3b2a7a40467d83d4b1e1b51e2b21",
73
73
  "devDependencies": {
74
74
  "@babel/plugin-proposal-decorators": "^7.15.8",
75
75
  "@babel/plugin-transform-runtime": "^7.15.8",
76
76
  "@babel/preset-env": "^7.15.8",
77
77
  "@babel/preset-react": "^7.14.5",
78
- "@douyinfe/semi-scss-compile": "2.8.0",
78
+ "@douyinfe/semi-scss-compile": "2.9.0-beta.0",
79
79
  "@storybook/addon-knobs": "^6.3.1",
80
80
  "@types/lodash": "^4.14.176",
81
81
  "babel-loader": "^8.2.2",
@@ -254,14 +254,15 @@ SliderInScrollContainer.story = {
254
254
 
255
255
  class ControlledSlider extends Component {
256
256
  state = {
257
- value: 50,
258
- rangeValue: undefined,
257
+ value: 30,
258
+ rangeValue: [10, 30],
259
259
  };
260
260
  changeValue = () => {
261
261
  this.setState({ value: this.state.value + 10 });
262
+ const [start, end] = this.state.rangeValue;
263
+ this.setState({ rangeValue: [start - 10, end + 10]})
262
264
  };
263
265
  changeRangeValue = rangeValue => {
264
- console.log('rangeValue' + rangeValue);
265
266
  this.setState({ rangeValue: rangeValue });
266
267
  };
267
268
  render() {
@@ -269,21 +270,42 @@ class ControlledSlider extends Component {
269
270
  return (
270
271
  <div>
271
272
  <Button onClick={() => this.changeValue()}>点击改变value</Button>
272
- <div style={{ width: 800, marginLeft: 20, marginTop: 40 }}>
273
+ <div data-cy="horizontalNoChangeSlider" style={{ width: 800, marginLeft: 20, marginTop: 40 }}>
274
+ <Slider
275
+ value={30}
276
+ onChange={value => {
277
+ console.log('value改变了' + value);
278
+ }}
279
+ ></Slider>
280
+ </div>
281
+ <div data-cy="horizontalOnChangeSlider" style={{ width: 800, marginLeft: 20, marginTop: 40 }}>
273
282
  <Slider
274
283
  value={value}
275
284
  onChange={value => {
276
285
  console.log('value改变了' + value);
286
+ this.setState({value: value});
277
287
  }}
278
288
  ></Slider>
279
289
  </div>
280
- <div style={{ width: 800, marginLeft: 20, marginTop: 40 }}>
290
+ <div data-cy="horizontalNoChangeRangeSlider" style={{ width: 800, marginLeft: 20, marginTop: 40 }}>
281
291
  <Slider
282
292
  value={rangeValue}
283
- onChange={rangeValue => this.changeRangeValue(rangeValue)}
293
+ onChange={rangeValue => {
294
+ console.log('value改变了' + rangeValue);
295
+ }}
284
296
  range
285
297
  ></Slider>
286
298
  </div>
299
+ <div data-cy="horizontalNoChangeVerticalSlider" style={{ width: 800, marginLeft: 20, marginTop: 40 }}>
300
+ <Slider
301
+ value={40}
302
+ vertical
303
+ onChange={value => {
304
+ console.log('value改变了' + value);
305
+ }}
306
+ style={{height: '300px'}}
307
+ ></Slider>
308
+ </div>
287
309
  </div>
288
310
  );
289
311
  }
package/slider/index.tsx CHANGED
@@ -195,29 +195,33 @@ export default class Slider extends BaseComponent<SliderProps, SliderState> {
195
195
  this._addEventListener(document.body, 'mouseup', this.foundation.onHandleUp, false);
196
196
  this._addEventListener(document.body, 'touchmove', this.foundation.onHandleTouchMove, false);
197
197
  },
198
- onHandleMove: (mousePos: number, isMin: boolean, stateChangeCallback = noop, clickTrack = false): boolean | void => {
198
+ onHandleMove: (mousePos: number, isMin: boolean, stateChangeCallback = noop, clickTrack = false, outPutValue): boolean | void => {
199
199
 
200
200
  const sliderDOMIsInRenderTree = this.foundation.checkAndUpdateIsInRenderTreeState();
201
201
  if (!sliderDOMIsInRenderTree) {
202
202
  return;
203
203
  }
204
204
 
205
- const { value, onChange } = this.props;
206
- const moveValue = this.foundation.transPosToValue(mousePos, isMin);
207
- if (moveValue === false) {
208
- return;
205
+ const { value } = this.props;
206
+
207
+
208
+ let finalOutPutValue = outPutValue;
209
+ if (finalOutPutValue === undefined) {
210
+ const moveValue = this.foundation.transPosToValue(mousePos, isMin);
211
+ if (moveValue === false) {
212
+ return;
213
+ }
214
+ finalOutPutValue = this.foundation.outPutValue(moveValue);
209
215
  }
210
216
 
211
- const outPutValue = this.foundation.outPutValue(moveValue);
212
217
  const { currentValue } = this.state;
213
- if (!isEqual(this.foundation.outPutValue(currentValue), outPutValue)) {
214
- onChange(outPutValue);
218
+ if (!isEqual(this.foundation.outPutValue(currentValue), finalOutPutValue)) {
215
219
  if (!clickTrack && this.foundation.valueFormatIsCorrect(value)) {
216
220
  // still require afterChangeCallback when click on the track directly, need skip here
217
221
  return false;
218
222
  }
219
223
  this.setState({
220
- currentValue: outPutValue,
224
+ currentValue: finalOutPutValue,
221
225
  }, stateChangeCallback);
222
226
  }
223
227
  },
@@ -300,14 +304,14 @@ export default class Slider extends BaseComponent<SliderProps, SliderState> {
300
304
  const maxClass = cls(cssClasses.HANDLE, {
301
305
  [`${cssClasses.HANDLE}-clicked`]: chooseMovePos === 'max' && isDrag,
302
306
  });
303
- const {min, max, currentValue} = this.state;
307
+ const { min, max, currentValue } = this.state;
304
308
 
305
309
  const commonAria = {
306
310
  'aria-label': ariaLabel,
307
311
  'aria-labelledby': ariaLabelledby,
308
312
  'aria-disabled': disabled
309
313
  };
310
- vertical && Object.assign(commonAria, {'aria-orientation': 'vertical'});
314
+ vertical && Object.assign(commonAria, { 'aria-orientation': 'vertical' });
311
315
 
312
316
  const handleContents = !range ? (
313
317
  <Tooltip
@@ -494,6 +498,7 @@ export default class Slider extends BaseComponent<SliderProps, SliderState> {
494
498
  });
495
499
  const markPercent = (Number(mark) - min) / (max - min);
496
500
  return activeResult ? (
501
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions
497
502
  <span
498
503
  key={mark}
499
504
  onClick={e => this.foundation.handleWrapClick(e)}
@@ -1,11 +1,10 @@
1
1
  /* argus-disable unPkgSensitiveInfo */
2
2
  import React, { useState } from 'react';
3
- import { Upload, Button, Toast, Icon } from '@douyinfe/semi-ui/index';
3
+ import FileCard from '../fileCard';
4
+ import { Button, Upload, Toast, Icon } from '@douyinfe/semi-ui/index';
4
5
  import { withField, Form } from '../../form/index';
5
6
  import { IconPlus, IconFile, IconUpload, IconEyeOpened, IconDownload, IconDelete } from '@douyinfe/semi-icons';
6
7
 
7
- import FileCard from '../fileCard';
8
-
9
8
  export default {
10
9
  title: 'Upload'
11
10
  }