@douyinfe/semi-ui 2.23.0 → 2.23.2

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 (51) hide show
  1. package/dist/css/semi.css +48 -1
  2. package/dist/css/semi.min.css +1 -1
  3. package/dist/umd/semi-ui.js +52 -90
  4. package/dist/umd/semi-ui.js.map +1 -1
  5. package/dist/umd/semi-ui.min.js +1 -1
  6. package/dist/umd/semi-ui.min.js.map +1 -1
  7. package/lib/cjs/button/Button.d.ts +1 -1
  8. package/lib/cjs/button/index.d.ts +1 -1
  9. package/lib/cjs/carousel/CarouselIndicator.d.ts +1 -1
  10. package/lib/cjs/carousel/index.d.ts +1 -1
  11. package/lib/cjs/datePicker/dateInput.d.ts +1 -1
  12. package/lib/cjs/datePicker/datePicker.d.ts +1 -1
  13. package/lib/cjs/datePicker/monthsGrid.d.ts +1 -1
  14. package/lib/cjs/input/index.d.ts +0 -2
  15. package/lib/cjs/input/index.js +1 -8
  16. package/lib/cjs/locale/source/vi_VN.js +1 -1
  17. package/lib/cjs/modal/Modal.js +6 -19
  18. package/lib/cjs/radio/radio.d.ts +1 -1
  19. package/lib/cjs/radio/radioGroup.d.ts +1 -1
  20. package/lib/cjs/sideSheet/index.js +6 -19
  21. package/lib/cjs/tagInput/index.js +4 -2
  22. package/lib/cjs/transfer/index.js +30 -25
  23. package/lib/cjs/typography/base.d.ts +1 -1
  24. package/lib/cjs/typography/numeral.d.ts +2 -2
  25. package/lib/cjs/typography/paragraph.d.ts +1 -1
  26. package/lib/cjs/typography/text.d.ts +1 -1
  27. package/lib/cjs/typography/title.d.ts +1 -1
  28. package/lib/cjs/upload/index.d.ts +1 -1
  29. package/lib/es/button/Button.d.ts +1 -1
  30. package/lib/es/button/index.d.ts +1 -1
  31. package/lib/es/carousel/CarouselIndicator.d.ts +1 -1
  32. package/lib/es/carousel/index.d.ts +1 -1
  33. package/lib/es/datePicker/dateInput.d.ts +1 -1
  34. package/lib/es/datePicker/datePicker.d.ts +1 -1
  35. package/lib/es/datePicker/monthsGrid.d.ts +1 -1
  36. package/lib/es/input/index.d.ts +0 -2
  37. package/lib/es/input/index.js +1 -8
  38. package/lib/es/locale/source/vi_VN.js +1 -1
  39. package/lib/es/modal/Modal.js +6 -19
  40. package/lib/es/radio/radio.d.ts +1 -1
  41. package/lib/es/radio/radioGroup.d.ts +1 -1
  42. package/lib/es/sideSheet/index.js +6 -19
  43. package/lib/es/tagInput/index.js +4 -2
  44. package/lib/es/transfer/index.js +30 -25
  45. package/lib/es/typography/base.d.ts +1 -1
  46. package/lib/es/typography/numeral.d.ts +2 -2
  47. package/lib/es/typography/paragraph.d.ts +1 -1
  48. package/lib/es/typography/text.d.ts +1 -1
  49. package/lib/es/typography/title.d.ts +1 -1
  50. package/lib/es/upload/index.d.ts +1 -1
  51. package/package.json +7 -7
@@ -48,7 +48,7 @@ export default class Button extends PureComponent<ButtonProps> {
48
48
  prefixCls: PropTypes.Requireable<string>;
49
49
  style: PropTypes.Requireable<object>;
50
50
  size: PropTypes.Requireable<"default" | "small" | "large">;
51
- type: PropTypes.Requireable<"warning" | "primary" | "tertiary" | "secondary" | "danger">;
51
+ type: PropTypes.Requireable<"warning" | "primary" | "secondary" | "tertiary" | "danger">;
52
52
  block: PropTypes.Requireable<boolean>;
53
53
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
54
54
  onMouseDown: PropTypes.Requireable<(...args: any[]) => any>;
@@ -23,7 +23,7 @@ declare class Button extends React.PureComponent<ButtonProps> {
23
23
  onMouseLeave: import("prop-types").Requireable<(...args: any[]) => any>;
24
24
  disabled: import("prop-types").Requireable<boolean>;
25
25
  size: import("prop-types").Requireable<"default" | "small" | "large">;
26
- type: import("prop-types").Requireable<"warning" | "primary" | "tertiary" | "secondary" | "danger">;
26
+ type: import("prop-types").Requireable<"warning" | "primary" | "secondary" | "tertiary" | "danger">;
27
27
  block: import("prop-types").Requireable<boolean>;
28
28
  onClick: import("prop-types").Requireable<(...args: any[]) => any>;
29
29
  onMouseDown: import("prop-types").Requireable<(...args: any[]) => any>;
@@ -8,7 +8,7 @@ declare class CarouselIndicator extends React.PureComponent<CarouselIndicatorPro
8
8
  position: PropTypes.Requireable<"left" | "right" | "center">;
9
9
  size: PropTypes.Requireable<"small" | "medium">;
10
10
  style: PropTypes.Requireable<object>;
11
- theme: PropTypes.Requireable<"primary" | "dark" | "light">;
11
+ theme: PropTypes.Requireable<"dark" | "light" | "primary">;
12
12
  total: PropTypes.Requireable<number>;
13
13
  onIndicatorChange: PropTypes.Requireable<(...args: any[]) => any>;
14
14
  type: PropTypes.Requireable<"line" | "dot" | "columnar">;
@@ -22,7 +22,7 @@ declare class Carousel extends BaseComponent<CarouselProps, CarouselState> {
22
22
  indicatorPosition: PropTypes.Requireable<"left" | "right" | "center">;
23
23
  indicatorSize: PropTypes.Requireable<"small" | "medium">;
24
24
  indicatorType: PropTypes.Requireable<"line" | "dot" | "columnar">;
25
- theme: PropTypes.Requireable<"primary" | "dark" | "light">;
25
+ theme: PropTypes.Requireable<"dark" | "light" | "primary">;
26
26
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
27
27
  arrowType: PropTypes.Requireable<"hover" | "always">;
28
28
  showArrow: PropTypes.Requireable<boolean>;
@@ -26,7 +26,7 @@ export default class DateInput extends BaseComponent<DateInputProps, {}> {
26
26
  onFocus: PropTypes.Requireable<(...args: any[]) => any>;
27
27
  value: PropTypes.Requireable<any[]>;
28
28
  disabled: PropTypes.Requireable<boolean>;
29
- type: PropTypes.Requireable<"dateTime" | "date" | "month" | "dateRange" | "year" | "dateTimeRange">;
29
+ type: PropTypes.Requireable<"date" | "month" | "dateTime" | "dateRange" | "year" | "dateTimeRange">;
30
30
  showClear: PropTypes.Requireable<boolean>;
31
31
  format: PropTypes.Requireable<string>;
32
32
  inputStyle: PropTypes.Requireable<object>;
@@ -43,7 +43,7 @@ export default class DatePicker extends BaseComponent<DatePickerProps, DatePicke
43
43
  'aria-invalid': PropTypes.Requireable<boolean>;
44
44
  'aria-labelledby': PropTypes.Requireable<string>;
45
45
  'aria-required': PropTypes.Requireable<boolean>;
46
- type: PropTypes.Requireable<"dateTime" | "date" | "month" | "dateRange" | "year" | "dateTimeRange">;
46
+ type: PropTypes.Requireable<"date" | "month" | "dateTime" | "dateRange" | "year" | "dateTimeRange">;
47
47
  size: PropTypes.Requireable<"default" | "small" | "large">;
48
48
  density: PropTypes.Requireable<"default" | "compact">;
49
49
  defaultValue: PropTypes.Requireable<NonNullable<string | number | object>>;
@@ -19,7 +19,7 @@ export interface MonthsGridProps extends MonthsGridFoundationProps, BaseProps {
19
19
  export declare type MonthsGridState = MonthsGridFoundationState;
20
20
  export default class MonthsGrid extends BaseComponent<MonthsGridProps, MonthsGridState> {
21
21
  static propTypes: {
22
- type: PropTypes.Requireable<"dateTime" | "date" | "month" | "dateRange" | "year" | "dateTimeRange">;
22
+ type: PropTypes.Requireable<"date" | "month" | "dateTime" | "dateRange" | "year" | "dateTimeRange">;
23
23
  defaultValue: PropTypes.Requireable<NonNullable<string | number | object>>;
24
24
  defaultPickerValue: PropTypes.Requireable<NonNullable<string | number | object>>;
25
25
  multiple: PropTypes.Requireable<boolean>;
@@ -54,7 +54,6 @@ export interface InputState {
54
54
  cachedValue: React.ReactText;
55
55
  disabled: boolean;
56
56
  props: Record<string, any>;
57
- paddingLeft: string;
58
57
  isFocus: boolean;
59
58
  isHovering: boolean;
60
59
  eyeClosed: boolean;
@@ -144,7 +143,6 @@ declare class Input extends BaseComponent<InputProps, InputState> {
144
143
  notifyKeyUp: (e: React.KeyboardEvent<HTMLInputElement>) => void;
145
144
  notifyEnterPress: (e: React.KeyboardEvent<HTMLInputElement>) => void;
146
145
  notifyClear: (e: React.MouseEvent<HTMLDivElement>) => void;
147
- setPaddingLeft: (paddingLeft: string) => void;
148
146
  setMinLength: (minLength: number) => void;
149
147
  isEventTarget: (e: React.MouseEvent) => boolean;
150
148
  getContext(key: string): any;
@@ -106,7 +106,6 @@ class Input extends _baseComponent.default {
106
106
  cachedValue: null,
107
107
  disabled: false,
108
108
  props: {},
109
- paddingLeft: '',
110
109
  isFocus: false,
111
110
  isHovering: false,
112
111
  eyeClosed: props.mode === 'password',
@@ -157,9 +156,6 @@ class Input extends _baseComponent.default {
157
156
  notifyKeyUp: e => this.props.onKeyUp(e),
158
157
  notifyEnterPress: e => this.props.onEnterPress(e),
159
158
  notifyClear: e => this.props.onClear(e),
160
- setPaddingLeft: paddingLeft => this.setState({
161
- paddingLeft
162
- }),
163
159
  setMinLength: minLength => this.setState({
164
160
  minLength
165
161
  }),
@@ -382,7 +378,6 @@ class Input extends _baseComponent.default {
382
378
 
383
379
  const {
384
380
  value,
385
- paddingLeft,
386
381
  isFocus,
387
382
  minLength: stateMinLength
388
383
  } = this.state;
@@ -417,9 +412,7 @@ class Input extends _baseComponent.default {
417
412
  });
418
413
  const inputValue = value === null || value === undefined ? '' : value;
419
414
  const inputProps = Object.assign(Object.assign({}, rest), {
420
- style: Object.assign({
421
- paddingLeft
422
- }, inputStyle),
415
+ style: inputStyle,
423
416
  autoFocus: autofocus,
424
417
  className: inputCls,
425
418
  disabled,
@@ -105,7 +105,7 @@ const local = {
105
105
  },
106
106
  Table: {
107
107
  emptyText: 'Không kết quả',
108
- pageText: 'Hiển thị $ {currentStart} đến $ {currentEnd} trong tổng số $ {total}}'
108
+ pageText: 'Hiển thị ${currentStart} đến ${currentEnd} trong tổng số ${total}}'
109
109
  },
110
110
  Select: {
111
111
  emptyText: 'Không kết quả',
@@ -74,8 +74,6 @@ class Modal extends _baseComponent.default {
74
74
  visible
75
75
  } = this.props;
76
76
  this.foundation.toggleDisplayNone(!visible);
77
- const shouldRender = this.props.visible || this.props.keepDOM && (!this.props.lazyRender || this._haveRendered);
78
- this.foundation.setShouldRender(shouldRender);
79
77
  };
80
78
 
81
79
  this.renderFooter = () => {
@@ -157,8 +155,11 @@ class Modal extends _baseComponent.default {
157
155
  const classList = (0, _classnames.default)(className, {
158
156
  ["".concat(_constants.cssClasses.DIALOG, "-displayNone")]: keepDOM && this.state.displayNone
159
157
  });
158
+ const shouldRender = this.props.visible || this.props.keepDOM && (!this.props.lazyRender || this._haveRendered) || this.props.motion && !this.state.displayNone
159
+ /* When there is animation, we use displayNone to judge whether animation is ended and judge whether to unmount content */
160
+ ;
160
161
 
161
- if (this.state.shouldRender) {
162
+ if (shouldRender) {
162
163
  this._haveRendered = true;
163
164
  }
164
165
 
@@ -189,7 +190,7 @@ class Modal extends _baseComponent.default {
189
190
  animationClassName: maskAnimationClassName,
190
191
  animationEventsNeedBind: maskAnimationEventsNeedBind
191
192
  } = _ref2;
192
- return this.state.shouldRender ? /*#__PURE__*/_react.default.createElement(_ModalContent.default, Object.assign({}, restProps, {
193
+ return shouldRender ? /*#__PURE__*/_react.default.createElement(_ModalContent.default, Object.assign({}, restProps, {
193
194
  contentExtraProps: animationEventsNeedBind,
194
195
  maskExtraProps: maskAnimationEventsNeedBind,
195
196
  isFullScreen: this.state.isFullScreen,
@@ -209,8 +210,7 @@ class Modal extends _baseComponent.default {
209
210
 
210
211
  this.state = {
211
212
  displayNone: !props.visible,
212
- isFullScreen: props.fullScreen,
213
- shouldRender: this.props.visible || this.props.keepDOM && !this.props.lazyRender
213
+ isFullScreen: props.fullScreen
214
214
  };
215
215
  this.foundation = new _modalFoundation.default(this.adapter);
216
216
  this.modalRef = /*#__PURE__*/_react.default.createRef();
@@ -265,13 +265,6 @@ class Modal extends _baseComponent.default {
265
265
  isFullScreen
266
266
  });
267
267
  }
268
- },
269
- setShouldRender: shouldRender => {
270
- if (shouldRender !== this.state.shouldRender) {
271
- this.setState({
272
- shouldRender
273
- });
274
- }
275
268
  }
276
269
  });
277
270
  }
@@ -317,12 +310,6 @@ class Modal extends _baseComponent.default {
317
310
  this.foundation.beforeShow();
318
311
  }
319
312
 
320
- const shouldRender = this.props.visible || this.props.keepDOM && (!this.props.lazyRender || this._haveRendered);
321
-
322
- if (shouldRender === true && this.state.shouldRender === false) {
323
- this.foundation.setShouldRender(true);
324
- }
325
-
326
313
  if (!prevState.displayNone && this.state.displayNone) {
327
314
  this.foundation.afterHide();
328
315
  }
@@ -82,7 +82,7 @@ declare class Radio extends BaseComponent<RadioProps, RadioState> {
82
82
  prefixCls?: string;
83
83
  name?: string;
84
84
  onChange?: (e: RadioChangeEvent) => void;
85
- buttonSize?: "small" | "middle" | "large";
85
+ buttonSize?: "small" | "large" | "middle";
86
86
  isCardRadio?: boolean;
87
87
  isPureCardRadio?: boolean;
88
88
  };
@@ -48,7 +48,7 @@ declare class RadioGroup extends BaseComponent<RadioGroupProps, RadioGroupState>
48
48
  disabled: PropTypes.Requireable<boolean>;
49
49
  name: PropTypes.Requireable<string>;
50
50
  options: PropTypes.Requireable<any[]>;
51
- buttonSize: PropTypes.Requireable<"small" | "middle" | "large">;
51
+ buttonSize: PropTypes.Requireable<"small" | "large" | "middle">;
52
52
  type: PropTypes.Requireable<"default" | "button" | "card" | "pureCard">;
53
53
  value: PropTypes.Requireable<any>;
54
54
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
@@ -61,14 +61,11 @@ class SideSheet extends _baseComponent.default {
61
61
  };
62
62
 
63
63
  this.updateState = () => {
64
- const shouldRender = this.props.visible || this.props.keepDOM;
65
- this.foundation.setShouldRender(shouldRender);
66
64
  this.foundation.toggleDisplayNone(!this.props.visible);
67
65
  };
68
66
 
69
67
  this.state = {
70
- displayNone: !this.props.visible,
71
- shouldRender: this.props.visible
68
+ displayNone: !this.props.visible
72
69
  };
73
70
  this.foundation = new _sideSheetFoundation.default(this.adapter);
74
71
  }
@@ -115,13 +112,6 @@ class SideSheet extends _baseComponent.default {
115
112
  displayNone: displayNone
116
113
  });
117
114
  }
118
- },
119
- setShouldRender: shouldRender => {
120
- if (shouldRender !== this.state.shouldRender) {
121
- this.setState({
122
- shouldRender
123
- });
124
- }
125
115
  }
126
116
  });
127
117
  }
@@ -157,12 +147,6 @@ class SideSheet extends _baseComponent.default {
157
147
  this.foundation.afterHide();
158
148
  }
159
149
 
160
- const shouldRender = this.props.visible || this.props.keepDOM;
161
-
162
- if (shouldRender === true && this.state.shouldRender === false) {
163
- this.foundation.setShouldRender(true);
164
- }
165
-
166
150
  if (prevState.displayNone !== this.state.displayNone) {
167
151
  this.foundation.onVisibleChange(!this.state.displayNone);
168
152
  }
@@ -214,7 +198,10 @@ class SideSheet extends _baseComponent.default {
214
198
  width: sheetWidth,
215
199
  height: sheetHeight,
216
200
  onClose: this.handleCancel
217
- }); // Since user could change animate duration , we don't know which animation end first. So we call updateState func twice.
201
+ });
202
+ const shouldRender = this.props.visible || this.props.keepDOM || this.props.motion && !this.state.displayNone
203
+ /* When there is animation, we use displayNone to judge whether animation is ended and judge whether to unmount content */
204
+ ; // Since user could change animate duration , we don't know which animation end first. So we call updateState func twice.
218
205
 
219
206
  return /*#__PURE__*/_react.default.createElement(_cssAnimation.default, {
220
207
  motion: this.props.motion,
@@ -239,7 +226,7 @@ class SideSheet extends _baseComponent.default {
239
226
  animationStyle,
240
227
  animationEventsNeedBind
241
228
  } = _ref2;
242
- return this.state.shouldRender ? /*#__PURE__*/_react.default.createElement(_SideSheetContent.default, Object.assign({}, contentProps, {
229
+ return shouldRender ? /*#__PURE__*/_react.default.createElement(_SideSheetContent.default, Object.assign({}, contentProps, {
243
230
  maskExtraProps: maskAnimationEventsNeedBind,
244
231
  wrapperExtraProps: animationEventsNeedBind,
245
232
  dialogClassName: animationClassName,
@@ -450,9 +450,11 @@ class TagInput extends _baseComponent.default {
450
450
  }));
451
451
 
452
452
  if (active && draggable && sortableListItems.length > 0) {
453
+ // helperClass:add styles to the helper(item being dragged) https://github.com/clauderic/react-sortable-hoc/issues/87
453
454
  // @ts-ignore skip SortableItem type check
454
455
  return /*#__PURE__*/_react.default.createElement(SortableList, {
455
456
  useDragHandle: true,
457
+ helperClass: "".concat(prefixCls, "-drag-item-move"),
456
458
  items: sortableListItems,
457
459
  onSortEnd: this.onSortEnd,
458
460
  axis: "xy"
@@ -512,8 +514,8 @@ class TagInput extends _baseComponent.default {
512
514
  ["".concat(prefixCls, "-error")]: validateStatus === 'error',
513
515
  ["".concat(prefixCls, "-warning")]: validateStatus === 'warning'
514
516
  });
515
- const inputCls = (0, _classnames.default)("".concat(prefixCls, "-wrapper-input"));
516
- const wrapperCls = (0, _classnames.default)("".concat(prefixCls, "-wrapper"));
517
+ const inputCls = (0, _classnames.default)("".concat(prefixCls, "-wrapper-input"), "".concat(prefixCls, "-wrapper-input-").concat(size));
518
+ const wrapperCls = (0, _classnames.default)("".concat(prefixCls, "-wrapper"), "".concat(prefixCls, "-wrapper-").concat(size));
517
519
  return (
518
520
  /*#__PURE__*/
519
521
  // eslint-disable-next-line
@@ -49,7 +49,30 @@ var _semiIcons = require("@douyinfe/semi-icons");
49
49
 
50
50
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
51
51
 
52
- const prefixcls = _constants.cssClasses.PREFIX;
52
+ const prefixcls = _constants.cssClasses.PREFIX; // SortableItem & SortableList should not be assigned inside of the render function
53
+
54
+ const SortableItem = (0, _reactSortableHoc.SortableElement)(props => props.item.node);
55
+ const SortableList = (0, _reactSortableHoc.SortableContainer)(_ref => {
56
+ let {
57
+ items
58
+ } = _ref;
59
+ return /*#__PURE__*/_react.default.createElement("div", {
60
+ className: "".concat(prefixcls, "-right-list"),
61
+ role: "list",
62
+ "aria-label": "Selected list"
63
+ }, items.map((item, index) =>
64
+ /*#__PURE__*/
65
+ // @ts-ignore skip SortableItem type check
66
+ _react.default.createElement(SortableItem, {
67
+ key: item.label,
68
+ index: index,
69
+ item: item
70
+ }))) // eslint-disable-next-line @typescript-eslint/ban-ts-comment
71
+ // @ts-ignore see reasons: https://github.com/clauderic/react-sortable-hoc/issues/206
72
+ ;
73
+ }, {
74
+ distance: 10
75
+ });
53
76
 
54
77
  class Transfer extends _baseComponent.default {
55
78
  constructor(props) {
@@ -493,34 +516,16 @@ class Transfer extends _baseComponent.default {
493
516
  }
494
517
 
495
518
  renderRightSortableList(selectedData) {
496
- // when choose some items && draggable is true
497
- const SortableItem = (0, _reactSortableHoc.SortableElement)(props => this.renderRightItem(props.item));
498
- const SortableList = (0, _reactSortableHoc.SortableContainer)(_ref => {
499
- let {
500
- items
501
- } = _ref;
502
- return /*#__PURE__*/_react.default.createElement("div", {
503
- className: "".concat(prefixcls, "-right-list"),
504
- role: "list",
505
- "aria-label": "Selected list"
506
- }, items.map((item, index) =>
507
- /*#__PURE__*/
508
- // @ts-ignore skip SortableItem type check
509
- _react.default.createElement(SortableItem, {
510
- key: item.label,
511
- index: index,
512
- item: item
513
- }))) // eslint-disable-next-line @typescript-eslint/ban-ts-comment
514
- // @ts-ignore see reasons: https://github.com/clauderic/react-sortable-hoc/issues/206
515
- ;
516
- }, {
517
- distance: 10
518
- }); // @ts-ignore skip SortableItem type check
519
+ const sortableListItems = selectedData.map(item => Object.assign(Object.assign({}, item), {
520
+ node: this.renderRightItem(item)
521
+ })); // helperClass:add styles to the helper(item being dragged) https://github.com/clauderic/react-sortable-hoc/issues/87
522
+ // @ts-ignore skip SortableItem type check
519
523
 
520
524
  const sortList = /*#__PURE__*/_react.default.createElement(SortableList, {
521
525
  useDragHandle: true,
526
+ helperClass: "".concat(prefixcls, "-right-item-drag-item-move"),
522
527
  onSortEnd: this.onSortEnd,
523
- items: selectedData
528
+ items: sortableListItems
524
529
  });
525
530
 
526
531
  return sortList;
@@ -64,7 +64,7 @@ export default class Base extends Component<BaseTypographyProps, BaseTypographyS
64
64
  spacing: PropTypes.Requireable<"normal" | "extended">;
65
65
  strong: PropTypes.Requireable<boolean>;
66
66
  size: PropTypes.Requireable<"small" | "normal">;
67
- type: PropTypes.Requireable<"warning" | "success" | "primary" | "tertiary" | "secondary" | "danger" | "quaternary">;
67
+ type: PropTypes.Requireable<"warning" | "success" | "primary" | "secondary" | "tertiary" | "danger" | "quaternary">;
68
68
  style: PropTypes.Requireable<object>;
69
69
  className: PropTypes.Requireable<string>;
70
70
  icon: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
@@ -28,7 +28,7 @@ export default class Numeral extends PureComponent<NumeralProps> {
28
28
  static propTypes: {
29
29
  rule: PropTypes.Requireable<"text" | "numbers" | "bytes-decimal" | "bytes-binary" | "percentages" | "exponential">;
30
30
  precision: PropTypes.Requireable<number>;
31
- truncate: PropTypes.Requireable<"ceil" | "floor" | "round">;
31
+ truncate: PropTypes.Requireable<"round" | "ceil" | "floor">;
32
32
  parser: PropTypes.Requireable<(...args: any[]) => any>;
33
33
  copyable: PropTypes.Requireable<NonNullable<boolean | object>>;
34
34
  delete: PropTypes.Requireable<boolean>;
@@ -38,7 +38,7 @@ export default class Numeral extends PureComponent<NumeralProps> {
38
38
  underline: PropTypes.Requireable<boolean>;
39
39
  link: PropTypes.Requireable<NonNullable<boolean | object>>;
40
40
  strong: PropTypes.Requireable<boolean>;
41
- type: PropTypes.Requireable<"warning" | "success" | "primary" | "tertiary" | "secondary" | "danger" | "quaternary">;
41
+ type: PropTypes.Requireable<"warning" | "success" | "primary" | "secondary" | "tertiary" | "danger" | "quaternary">;
42
42
  size: PropTypes.Requireable<"small" | "normal">;
43
43
  style: PropTypes.Requireable<object>;
44
44
  className: PropTypes.Requireable<string>;
@@ -29,7 +29,7 @@ export default class Paragraph extends PureComponent<ParagraphProps> {
29
29
  link: PropTypes.Requireable<NonNullable<boolean | object>>;
30
30
  underline: PropTypes.Requireable<boolean>;
31
31
  strong: PropTypes.Requireable<boolean>;
32
- type: PropTypes.Requireable<"warning" | "success" | "primary" | "tertiary" | "secondary" | "danger" | "quaternary">;
32
+ type: PropTypes.Requireable<"warning" | "success" | "primary" | "secondary" | "tertiary" | "danger" | "quaternary">;
33
33
  size: PropTypes.Requireable<"small" | "normal">;
34
34
  spacing: PropTypes.Requireable<"normal" | "extended">;
35
35
  style: PropTypes.Requireable<object>;
@@ -32,7 +32,7 @@ export default class Text extends PureComponent<TextProps> {
32
32
  underline: PropTypes.Requireable<boolean>;
33
33
  link: PropTypes.Requireable<NonNullable<boolean | object>>;
34
34
  strong: PropTypes.Requireable<boolean>;
35
- type: PropTypes.Requireable<"warning" | "success" | "primary" | "tertiary" | "secondary" | "danger" | "quaternary">;
35
+ type: PropTypes.Requireable<"warning" | "success" | "primary" | "secondary" | "tertiary" | "danger" | "quaternary">;
36
36
  size: PropTypes.Requireable<"small" | "normal">;
37
37
  style: PropTypes.Requireable<object>;
38
38
  className: PropTypes.Requireable<string>;
@@ -36,7 +36,7 @@ export default class Title extends PureComponent<TitleProps> {
36
36
  link: PropTypes.Requireable<NonNullable<boolean | object>>;
37
37
  underline: PropTypes.Requireable<boolean>;
38
38
  strong: PropTypes.Requireable<boolean>;
39
- type: PropTypes.Requireable<"warning" | "success" | "primary" | "tertiary" | "secondary" | "danger" | "quaternary">;
39
+ type: PropTypes.Requireable<"warning" | "success" | "primary" | "secondary" | "tertiary" | "danger" | "quaternary">;
40
40
  heading: PropTypes.Requireable<1 | 2 | 3 | 4 | 6 | 5>;
41
41
  style: PropTypes.Requireable<object>;
42
42
  className: PropTypes.Requireable<string>;
@@ -142,7 +142,7 @@ declare class Upload extends BaseComponent<UploadProps, UploadState> {
142
142
  style: PropTypes.Requireable<object>;
143
143
  timeout: PropTypes.Requireable<number>;
144
144
  transformFile: PropTypes.Requireable<(...args: any[]) => any>;
145
- uploadTrigger: PropTypes.Requireable<"auto" | "custom">;
145
+ uploadTrigger: PropTypes.Requireable<"custom" | "auto">;
146
146
  validateMessage: PropTypes.Requireable<PropTypes.ReactNodeLike>;
147
147
  validateStatus: PropTypes.Requireable<"default" | "error" | "warning" | "success">;
148
148
  withCredentials: PropTypes.Requireable<boolean>;
@@ -48,7 +48,7 @@ export default class Button extends PureComponent<ButtonProps> {
48
48
  prefixCls: PropTypes.Requireable<string>;
49
49
  style: PropTypes.Requireable<object>;
50
50
  size: PropTypes.Requireable<"default" | "small" | "large">;
51
- type: PropTypes.Requireable<"warning" | "primary" | "tertiary" | "secondary" | "danger">;
51
+ type: PropTypes.Requireable<"warning" | "primary" | "secondary" | "tertiary" | "danger">;
52
52
  block: PropTypes.Requireable<boolean>;
53
53
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
54
54
  onMouseDown: PropTypes.Requireable<(...args: any[]) => any>;
@@ -23,7 +23,7 @@ declare class Button extends React.PureComponent<ButtonProps> {
23
23
  onMouseLeave: import("prop-types").Requireable<(...args: any[]) => any>;
24
24
  disabled: import("prop-types").Requireable<boolean>;
25
25
  size: import("prop-types").Requireable<"default" | "small" | "large">;
26
- type: import("prop-types").Requireable<"warning" | "primary" | "tertiary" | "secondary" | "danger">;
26
+ type: import("prop-types").Requireable<"warning" | "primary" | "secondary" | "tertiary" | "danger">;
27
27
  block: import("prop-types").Requireable<boolean>;
28
28
  onClick: import("prop-types").Requireable<(...args: any[]) => any>;
29
29
  onMouseDown: import("prop-types").Requireable<(...args: any[]) => any>;
@@ -8,7 +8,7 @@ declare class CarouselIndicator extends React.PureComponent<CarouselIndicatorPro
8
8
  position: PropTypes.Requireable<"left" | "right" | "center">;
9
9
  size: PropTypes.Requireable<"small" | "medium">;
10
10
  style: PropTypes.Requireable<object>;
11
- theme: PropTypes.Requireable<"primary" | "dark" | "light">;
11
+ theme: PropTypes.Requireable<"dark" | "light" | "primary">;
12
12
  total: PropTypes.Requireable<number>;
13
13
  onIndicatorChange: PropTypes.Requireable<(...args: any[]) => any>;
14
14
  type: PropTypes.Requireable<"line" | "dot" | "columnar">;
@@ -22,7 +22,7 @@ declare class Carousel extends BaseComponent<CarouselProps, CarouselState> {
22
22
  indicatorPosition: PropTypes.Requireable<"left" | "right" | "center">;
23
23
  indicatorSize: PropTypes.Requireable<"small" | "medium">;
24
24
  indicatorType: PropTypes.Requireable<"line" | "dot" | "columnar">;
25
- theme: PropTypes.Requireable<"primary" | "dark" | "light">;
25
+ theme: PropTypes.Requireable<"dark" | "light" | "primary">;
26
26
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
27
27
  arrowType: PropTypes.Requireable<"hover" | "always">;
28
28
  showArrow: PropTypes.Requireable<boolean>;
@@ -26,7 +26,7 @@ export default class DateInput extends BaseComponent<DateInputProps, {}> {
26
26
  onFocus: PropTypes.Requireable<(...args: any[]) => any>;
27
27
  value: PropTypes.Requireable<any[]>;
28
28
  disabled: PropTypes.Requireable<boolean>;
29
- type: PropTypes.Requireable<"dateTime" | "date" | "month" | "dateRange" | "year" | "dateTimeRange">;
29
+ type: PropTypes.Requireable<"date" | "month" | "dateTime" | "dateRange" | "year" | "dateTimeRange">;
30
30
  showClear: PropTypes.Requireable<boolean>;
31
31
  format: PropTypes.Requireable<string>;
32
32
  inputStyle: PropTypes.Requireable<object>;
@@ -43,7 +43,7 @@ export default class DatePicker extends BaseComponent<DatePickerProps, DatePicke
43
43
  'aria-invalid': PropTypes.Requireable<boolean>;
44
44
  'aria-labelledby': PropTypes.Requireable<string>;
45
45
  'aria-required': PropTypes.Requireable<boolean>;
46
- type: PropTypes.Requireable<"dateTime" | "date" | "month" | "dateRange" | "year" | "dateTimeRange">;
46
+ type: PropTypes.Requireable<"date" | "month" | "dateTime" | "dateRange" | "year" | "dateTimeRange">;
47
47
  size: PropTypes.Requireable<"default" | "small" | "large">;
48
48
  density: PropTypes.Requireable<"default" | "compact">;
49
49
  defaultValue: PropTypes.Requireable<NonNullable<string | number | object>>;
@@ -19,7 +19,7 @@ export interface MonthsGridProps extends MonthsGridFoundationProps, BaseProps {
19
19
  export declare type MonthsGridState = MonthsGridFoundationState;
20
20
  export default class MonthsGrid extends BaseComponent<MonthsGridProps, MonthsGridState> {
21
21
  static propTypes: {
22
- type: PropTypes.Requireable<"dateTime" | "date" | "month" | "dateRange" | "year" | "dateTimeRange">;
22
+ type: PropTypes.Requireable<"date" | "month" | "dateTime" | "dateRange" | "year" | "dateTimeRange">;
23
23
  defaultValue: PropTypes.Requireable<NonNullable<string | number | object>>;
24
24
  defaultPickerValue: PropTypes.Requireable<NonNullable<string | number | object>>;
25
25
  multiple: PropTypes.Requireable<boolean>;
@@ -54,7 +54,6 @@ export interface InputState {
54
54
  cachedValue: React.ReactText;
55
55
  disabled: boolean;
56
56
  props: Record<string, any>;
57
- paddingLeft: string;
58
57
  isFocus: boolean;
59
58
  isHovering: boolean;
60
59
  eyeClosed: boolean;
@@ -144,7 +143,6 @@ declare class Input extends BaseComponent<InputProps, InputState> {
144
143
  notifyKeyUp: (e: React.KeyboardEvent<HTMLInputElement>) => void;
145
144
  notifyEnterPress: (e: React.KeyboardEvent<HTMLInputElement>) => void;
146
145
  notifyClear: (e: React.MouseEvent<HTMLDivElement>) => void;
147
- setPaddingLeft: (paddingLeft: string) => void;
148
146
  setMinLength: (minLength: number) => void;
149
147
  isEventTarget: (e: React.MouseEvent) => boolean;
150
148
  getContext(key: string): any;
@@ -86,7 +86,6 @@ class Input extends BaseComponent {
86
86
  cachedValue: null,
87
87
  disabled: false,
88
88
  props: {},
89
- paddingLeft: '',
90
89
  isFocus: false,
91
90
  isHovering: false,
92
91
  eyeClosed: props.mode === 'password',
@@ -137,9 +136,6 @@ class Input extends BaseComponent {
137
136
  notifyKeyUp: e => this.props.onKeyUp(e),
138
137
  notifyEnterPress: e => this.props.onEnterPress(e),
139
138
  notifyClear: e => this.props.onClear(e),
140
- setPaddingLeft: paddingLeft => this.setState({
141
- paddingLeft
142
- }),
143
139
  setMinLength: minLength => this.setState({
144
140
  minLength
145
141
  }),
@@ -362,7 +358,6 @@ class Input extends BaseComponent {
362
358
 
363
359
  const {
364
360
  value,
365
- paddingLeft,
366
361
  isFocus,
367
362
  minLength: stateMinLength
368
363
  } = this.state;
@@ -397,9 +392,7 @@ class Input extends BaseComponent {
397
392
  });
398
393
  const inputValue = value === null || value === undefined ? '' : value;
399
394
  const inputProps = Object.assign(Object.assign({}, rest), {
400
- style: Object.assign({
401
- paddingLeft
402
- }, inputStyle),
395
+ style: inputStyle,
403
396
  autoFocus: autofocus,
404
397
  className: inputCls,
405
398
  disabled,
@@ -97,7 +97,7 @@ const local = {
97
97
  },
98
98
  Table: {
99
99
  emptyText: 'Không kết quả',
100
- pageText: 'Hiển thị $ {currentStart} đến $ {currentEnd} trong tổng số $ {total}}'
100
+ pageText: 'Hiển thị ${currentStart} đến ${currentEnd} trong tổng số ${total}}'
101
101
  },
102
102
  Select: {
103
103
  emptyText: 'Không kết quả',