@douyinfe/semi-ui 2.34.0 → 2.34.1-alpha.3

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 (121) hide show
  1. package/dist/css/semi.css +21 -45
  2. package/dist/css/semi.min.css +1 -1
  3. package/dist/umd/semi-ui.js +41228 -40825
  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/anchor/index.d.ts +1 -1
  8. package/lib/cjs/autoComplete/index.d.ts +1 -1
  9. package/lib/cjs/breadcrumb/item.js +1 -1
  10. package/lib/cjs/button/Button.d.ts +1 -1
  11. package/lib/cjs/button/buttonGroup.d.ts +1 -1
  12. package/lib/cjs/button/index.d.ts +1 -1
  13. package/lib/cjs/calendar/interface.d.ts +2 -2
  14. package/lib/cjs/card/index.d.ts +37 -4
  15. package/lib/cjs/card/index.js +248 -67
  16. package/lib/cjs/cascader/index.d.ts +0 -2
  17. package/lib/cjs/cascader/index.js +0 -13
  18. package/lib/cjs/datePicker/dateInput.d.ts +1 -1
  19. package/lib/cjs/datePicker/datePicker.d.ts +2 -2
  20. package/lib/cjs/datePicker/monthsGrid.d.ts +1 -1
  21. package/lib/cjs/datePicker/yearAndMonth.d.ts +1 -1
  22. package/lib/cjs/form/baseForm.d.ts +2 -2
  23. package/lib/cjs/form/field.d.ts +2 -2
  24. package/lib/cjs/form/group.js +2 -4
  25. package/lib/cjs/image/image.d.ts +0 -4
  26. package/lib/cjs/image/image.js +1 -23
  27. package/lib/cjs/image/preview.d.ts +1 -1
  28. package/lib/cjs/image/preview.js +16 -9
  29. package/lib/cjs/image/previewContext.d.ts +0 -1
  30. package/lib/cjs/input/index.d.ts +1 -1
  31. package/lib/cjs/input/inputGroup.d.ts +1 -1
  32. package/lib/cjs/modal/confirm.d.ts +19 -19
  33. package/lib/cjs/rating/index.d.ts +1 -1
  34. package/lib/cjs/rating/item.d.ts +1 -1
  35. package/lib/cjs/steps/basicStep.js +13 -7
  36. package/lib/cjs/steps/basicSteps.js +4 -2
  37. package/lib/cjs/steps/fillStep.js +13 -7
  38. package/lib/cjs/steps/fillSteps.js +3 -2
  39. package/lib/cjs/steps/index.d.ts +1 -0
  40. package/lib/cjs/steps/index.js +5 -2
  41. package/lib/cjs/steps/navStep.js +12 -4
  42. package/lib/cjs/steps/navSteps.js +4 -2
  43. package/lib/cjs/switch/index.d.ts +1 -1
  44. package/lib/cjs/table/Body/index.d.ts +0 -1
  45. package/lib/cjs/table/Body/index.js +3 -3
  46. package/lib/cjs/table/HeadTable.d.ts +4 -4
  47. package/lib/cjs/table/HeadTable.js +3 -3
  48. package/lib/cjs/table/Table.d.ts +2 -2
  49. package/lib/cjs/table/Table.js +14 -41
  50. package/lib/cjs/table/TableCell.js +3 -14
  51. package/lib/cjs/table/TableHeader.d.ts +0 -1
  52. package/lib/cjs/table/TableHeader.js +2 -11
  53. package/lib/cjs/table/TableHeaderRow.js +1 -2
  54. package/lib/cjs/table/index.d.ts +1 -1
  55. package/lib/cjs/table/interface.d.ts +1 -2
  56. package/lib/cjs/tagInput/index.d.ts +1 -1
  57. package/lib/cjs/timePicker/TimePicker.d.ts +1 -1
  58. package/lib/cjs/timePicker/index.d.ts +1 -1
  59. package/lib/cjs/typography/base.d.ts +2 -1
  60. package/lib/cjs/typography/base.js +68 -66
  61. package/lib/cjs/typography/title.d.ts +1 -1
  62. package/lib/cjs/typography/util.d.ts +1 -4
  63. package/lib/cjs/typography/util.js +13 -36
  64. package/lib/es/anchor/index.d.ts +1 -1
  65. package/lib/es/autoComplete/index.d.ts +1 -1
  66. package/lib/es/breadcrumb/item.js +1 -1
  67. package/lib/es/button/Button.d.ts +1 -1
  68. package/lib/es/button/buttonGroup.d.ts +1 -1
  69. package/lib/es/button/index.d.ts +1 -1
  70. package/lib/es/calendar/interface.d.ts +2 -2
  71. package/lib/es/card/index.d.ts +37 -4
  72. package/lib/es/card/index.js +247 -66
  73. package/lib/es/cascader/index.d.ts +0 -2
  74. package/lib/es/cascader/index.js +0 -13
  75. package/lib/es/datePicker/dateInput.d.ts +1 -1
  76. package/lib/es/datePicker/datePicker.d.ts +2 -2
  77. package/lib/es/datePicker/monthsGrid.d.ts +1 -1
  78. package/lib/es/datePicker/yearAndMonth.d.ts +1 -1
  79. package/lib/es/form/baseForm.d.ts +2 -2
  80. package/lib/es/form/field.d.ts +2 -2
  81. package/lib/es/form/group.js +2 -4
  82. package/lib/es/image/image.d.ts +0 -4
  83. package/lib/es/image/image.js +1 -23
  84. package/lib/es/image/preview.d.ts +1 -1
  85. package/lib/es/image/preview.js +16 -9
  86. package/lib/es/image/previewContext.d.ts +0 -1
  87. package/lib/es/input/index.d.ts +1 -1
  88. package/lib/es/input/inputGroup.d.ts +1 -1
  89. package/lib/es/modal/confirm.d.ts +19 -19
  90. package/lib/es/rating/index.d.ts +1 -1
  91. package/lib/es/rating/item.d.ts +1 -1
  92. package/lib/es/steps/basicStep.js +12 -7
  93. package/lib/es/steps/basicSteps.js +4 -2
  94. package/lib/es/steps/fillStep.js +12 -7
  95. package/lib/es/steps/fillSteps.js +3 -2
  96. package/lib/es/steps/index.d.ts +1 -0
  97. package/lib/es/steps/index.js +3 -0
  98. package/lib/es/steps/navStep.js +11 -4
  99. package/lib/es/steps/navSteps.js +4 -2
  100. package/lib/es/switch/index.d.ts +1 -1
  101. package/lib/es/table/Body/index.d.ts +0 -1
  102. package/lib/es/table/Body/index.js +3 -3
  103. package/lib/es/table/HeadTable.d.ts +4 -4
  104. package/lib/es/table/HeadTable.js +3 -3
  105. package/lib/es/table/Table.d.ts +2 -2
  106. package/lib/es/table/Table.js +14 -41
  107. package/lib/es/table/TableCell.js +4 -15
  108. package/lib/es/table/TableHeader.d.ts +0 -1
  109. package/lib/es/table/TableHeader.js +1 -9
  110. package/lib/es/table/TableHeaderRow.js +1 -2
  111. package/lib/es/table/index.d.ts +1 -1
  112. package/lib/es/table/interface.d.ts +1 -2
  113. package/lib/es/tagInput/index.d.ts +1 -1
  114. package/lib/es/timePicker/TimePicker.d.ts +1 -1
  115. package/lib/es/timePicker/index.d.ts +1 -1
  116. package/lib/es/typography/base.d.ts +2 -1
  117. package/lib/es/typography/base.js +67 -64
  118. package/lib/es/typography/title.d.ts +1 -1
  119. package/lib/es/typography/util.d.ts +1 -4
  120. package/lib/es/typography/util.js +14 -36
  121. package/package.json +9 -8
@@ -24,7 +24,7 @@ declare class YearAndMonth extends BaseComponent<YearAndMonthProps, YearAndMonth
24
24
  presetPosition: PropTypes.Requireable<"left" | "top" | "right" | "bottom">;
25
25
  renderQuickControls: PropTypes.Requireable<PropTypes.ReactNodeLike>;
26
26
  renderDateInput: PropTypes.Requireable<PropTypes.ReactNodeLike>;
27
- type: PropTypes.Requireable<"dateTime" | "date" | "month" | "dateRange" | "year" | "monthRange" | "dateTimeRange">;
27
+ type: PropTypes.Requireable<"date" | "month" | "dateTime" | "dateRange" | "year" | "monthRange" | "dateTimeRange">;
28
28
  };
29
29
  static defaultProps: {
30
30
  disabledDate: {
@@ -84,7 +84,7 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
84
84
  onDropdownVisibleChange?: (visible: boolean) => void;
85
85
  zIndex?: number;
86
86
  position?: "left" | "top" | "right" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver";
87
- onSearch?: (value: string, event: React.KeyboardEvent<Element> | React.MouseEvent<Element, MouseEvent>) => void;
87
+ onSearch?: (value: string, event: React.MouseEvent<Element, MouseEvent> | React.KeyboardEvent<Element>) => void;
88
88
  dropdownClassName?: string;
89
89
  dropdownStyle?: React.CSSProperties;
90
90
  dropdownMargin?: number | {
@@ -138,7 +138,7 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
138
138
  preventScroll?: boolean;
139
139
  showRestTagsPopover?: boolean;
140
140
  restTagsPopoverProps?: import("../popover").PopoverProps;
141
- } & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "motion" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
141
+ } & Pick<import("../tooltip").TooltipProps, "motion" | "getPopupContainer" | "stopPropagation" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
142
142
  static Checkbox: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox").CheckboxProps & import("./interface").RCIncludeType>;
143
143
  static CheckboxGroup: React.ComponentType<import("utility-types").Subtract<import("../checkbox").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
144
144
  static Radio: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../radio").RadioProps & import("./interface").RCIncludeType>;
@@ -32,7 +32,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
32
32
  onDropdownVisibleChange?: (visible: boolean) => void;
33
33
  zIndex?: number;
34
34
  position?: "left" | "top" | "right" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver";
35
- onSearch?: (value: string, event: import("react").KeyboardEvent<Element> | import("react").MouseEvent<Element, MouseEvent>) => void;
35
+ onSearch?: (value: string, event: import("react").MouseEvent<Element, MouseEvent> | import("react").KeyboardEvent<Element>) => void;
36
36
  dropdownClassName?: string;
37
37
  dropdownStyle?: import("react").CSSProperties;
38
38
  dropdownMargin?: number | {
@@ -86,7 +86,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
86
86
  preventScroll?: boolean;
87
87
  showRestTagsPopover?: boolean;
88
88
  restTagsPopoverProps?: import("../popover").PopoverProps;
89
- } & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "motion" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
89
+ } & Pick<import("../tooltip").TooltipProps, "motion" | "getPopupContainer" | "stopPropagation" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
90
90
  declare const FormCheckboxGroup: import("react").ComponentType<import("utility-types").Subtract<import("../checkbox/checkboxGroup").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
91
91
  declare const FormCheckbox: import("react").ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox/checkbox").CheckboxProps & import("./interface").RCIncludeType>;
92
92
  declare const FormRadioGroup: import("react").ComponentType<import("utility-types").Subtract<import("../radio/radioGroup").RadioGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
@@ -75,7 +75,7 @@ class FormInputGroup extends Component {
75
75
  rest = __rest(_a, ["children", "label", "extraText", "extraTextPosition"]);
76
76
 
77
77
  const updater = this.context;
78
- const formProps = updater.getFormProps(['labelPosition', 'labelWidth', 'labelAlign', 'showValidateIcon', 'wrapperCol', 'labelCol', 'disabled']);
78
+ const formProps = updater.getFormProps(['labelPosition', 'labelWidth', 'labelAlign', 'showValidateIcon', 'wrapperCol', 'labelCol']);
79
79
  const labelPosition = this.props.labelPosition || formProps.labelPosition;
80
80
  const groupFieldSet = [];
81
81
  const inner = React.Children.map(children, child => {
@@ -99,9 +99,7 @@ class FormInputGroup extends Component {
99
99
  const appendCol = labelCol && wrapperCol;
100
100
  const labelColCls = labelCol ? `${prefix}-col-${labelAlign}` : '';
101
101
  const labelContent = this.renderLabel(label, formProps);
102
- const inputGroupContent = /*#__PURE__*/React.createElement(InputGroup, Object.assign({
103
- disabled: formProps.disabled
104
- }, rest), inner);
102
+ const inputGroupContent = /*#__PURE__*/React.createElement(InputGroup, Object.assign({}, rest), inner);
105
103
  const groupErrorContent = /*#__PURE__*/React.createElement(GroupError, {
106
104
  fieldSet: groupFieldSet,
107
105
  showValidateIcon: formProps.showValidateIcon,
@@ -29,12 +29,8 @@ export default class Image extends BaseComponent<ImageProps, ImageStates> {
29
29
  get adapter(): ImageAdapter<ImageProps, ImageStates>;
30
30
  context: PreviewContextProps;
31
31
  foundation: ImageFoundation;
32
- imgRef: React.RefObject<HTMLImageElement>;
33
32
  constructor(props: ImageProps);
34
33
  static getDerivedStateFromProps(props: ImageProps, state: ImageStates): Partial<ImageStates>;
35
- componentDidMount(): void;
36
- componentDidUpdate(prevProps: ImageProps, prevState: ImageStates): void;
37
- observeImage(): void;
38
34
  isInGroup(): boolean;
39
35
  isLazyLoad(): boolean;
40
36
  handleClick: (e: any) => void;
@@ -129,7 +129,6 @@ export default class Image extends BaseComponent {
129
129
  previewVisible: false
130
130
  };
131
131
  this.foundation = new ImageFoundation(this.adapter);
132
- this.imgRef = /*#__PURE__*/React.createRef();
133
132
  }
134
133
 
135
134
  get adapter() {
@@ -159,25 +158,6 @@ export default class Image extends BaseComponent {
159
158
  return willUpdateStates;
160
159
  }
161
160
 
162
- componentDidMount() {
163
- this.observeImage();
164
- }
165
-
166
- componentDidUpdate(prevProps, prevState) {
167
- prevProps.src !== this.props.src && this.observeImage();
168
- }
169
-
170
- observeImage() {
171
- if (!this.isLazyLoad()) {
172
- return;
173
- }
174
-
175
- const {
176
- previewObserver
177
- } = this.context;
178
- previewObserver.observe(this.imgRef.current);
179
- }
180
-
181
161
  isInGroup() {
182
162
  return Boolean(this.context && this.context.isGroup);
183
163
  }
@@ -232,9 +212,7 @@ export default class Image extends BaseComponent {
232
212
  style: outerStyle,
233
213
  className: outerCls,
234
214
  onClick: this.handleClick
235
- }, /*#__PURE__*/React.createElement("img", Object.assign({
236
- ref: this.imgRef
237
- }, restProps, {
215
+ }, /*#__PURE__*/React.createElement("img", Object.assign({}, restProps, {
238
216
  src: this.isInGroup() && this.isLazyLoad() ? undefined : src,
239
217
  "data-src": src,
240
218
  alt: alt,
@@ -69,8 +69,8 @@ export default class Preview extends BaseComponent<PreviewProps, PreviewState> {
69
69
  foundation: PreviewFoundation;
70
70
  previewGroupId: string;
71
71
  previewRef: React.RefObject<PreviewInner>;
72
- previewObserver: IntersectionObserver;
73
72
  constructor(props: any);
73
+ componentDidMount(): void;
74
74
  static getDerivedStateFromProps(props: PreviewProps, state: PreviewState): Partial<PreviewState>;
75
75
  handleVisibleChange: (newVisible: boolean) => void;
76
76
  handleCurrentIndexChange: (index: number) => void;
@@ -93,7 +93,19 @@ export default class Preview extends BaseComponent {
93
93
  length: 4
94
94
  });
95
95
  this.previewRef = /*#__PURE__*/React.createRef();
96
- this.previewObserver = new IntersectionObserver(entries => {
96
+ }
97
+
98
+ get adapter() {
99
+ return Object.assign({}, super.adapter);
100
+ }
101
+
102
+ componentDidMount() {
103
+ const {
104
+ lazyLoadMargin
105
+ } = this.props;
106
+ const allElement = document.querySelectorAll(`.${prefixCls}-img`); // use IntersectionObserver to lazy load image
107
+
108
+ const observer = new IntersectionObserver(entries => {
97
109
  entries.forEach(item => {
98
110
  var _a;
99
111
 
@@ -101,18 +113,14 @@ export default class Preview extends BaseComponent {
101
113
 
102
114
  if (item.isIntersecting && src) {
103
115
  item.target.src = src;
104
- item.target.removeAttribute("data-src");
105
- this.previewObserver.unobserve(item.target);
116
+ observer.unobserve(item.target);
106
117
  }
107
118
  });
108
119
  }, {
109
120
  root: document.querySelector(`#${this.previewGroupId}`),
110
- rootMargin: props.lazyLoadMargin
121
+ rootMargin: lazyLoadMargin
111
122
  });
112
- }
113
-
114
- get adapter() {
115
- return Object.assign({}, super.adapter);
123
+ allElement.forEach(item => observer.observe(item));
116
124
  }
117
125
 
118
126
  static getDerivedStateFromProps(props, state) {
@@ -157,7 +165,6 @@ export default class Preview extends BaseComponent {
157
165
  currentIndex,
158
166
  visible,
159
167
  lazyLoad,
160
- previewObserver: this.previewObserver,
161
168
  setCurrentIndex: this.handleCurrentIndexChange,
162
169
  handleVisibleChange: this.handleVisibleChange
163
170
  }
@@ -6,7 +6,6 @@ export interface PreviewContextProps {
6
6
  titles: ReactNode[];
7
7
  currentIndex: number;
8
8
  visible: boolean;
9
- previewObserver: IntersectionObserver;
10
9
  setCurrentIndex: (current: number) => void;
11
10
  handleVisibleChange: (visible: boolean, preVisible?: boolean) => void;
12
11
  }
@@ -84,7 +84,7 @@ declare class Input extends BaseComponent<InputProps, InputState> {
84
84
  showClear: PropTypes.Requireable<boolean>;
85
85
  hideSuffix: PropTypes.Requireable<boolean>;
86
86
  placeholder: PropTypes.Requireable<any>;
87
- size: PropTypes.Requireable<"default" | "small" | "large">;
87
+ size: PropTypes.Requireable<"small" | "default" | "large">;
88
88
  className: PropTypes.Requireable<string>;
89
89
  style: PropTypes.Requireable<object>;
90
90
  validateStatus: PropTypes.Requireable<"default" | "error" | "warning" | "success">;
@@ -21,7 +21,7 @@ export default class inputGroup extends BaseComponent<InputGroupProps, InputGrou
21
21
  static propTypes: {
22
22
  className: PropTypes.Requireable<string>;
23
23
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
24
- size: PropTypes.Requireable<"default" | "small" | "large">;
24
+ size: PropTypes.Requireable<"small" | "default" | "large">;
25
25
  style: PropTypes.Requireable<object>;
26
26
  onBlur: PropTypes.Requireable<(...args: any[]) => any>;
27
27
  onFocus: PropTypes.Requireable<(...args: any[]) => any>;
@@ -140,19 +140,19 @@ export declare function withWarning(props: ModalReactProps): {
140
140
  type: "warning";
141
141
  };
142
142
  export declare function withError(props: ModalReactProps): {
143
- title?: React.ReactNode;
144
143
  children?: React.ReactNode;
145
- size?: import("@douyinfe/semi-foundation/lib/es/modal/modalFoundation").Size;
144
+ motion?: boolean;
146
145
  style?: React.CSSProperties;
147
146
  className?: string;
148
- motion?: boolean;
149
147
  getPopupContainer?: () => HTMLElement;
150
148
  footer?: React.ReactNode;
151
149
  header?: React.ReactNode;
150
+ title?: React.ReactNode;
152
151
  direction?: any;
153
152
  width?: string | number;
154
153
  height?: string | number;
155
154
  mask?: boolean;
155
+ size?: import("@douyinfe/semi-foundation/lib/es/modal/modalFoundation").Size;
156
156
  visible?: boolean;
157
157
  content?: React.ReactNode;
158
158
  icon: string | number | boolean | React.ReactFragment | JSX.Element;
@@ -201,34 +201,24 @@ export declare function withError(props: ModalReactProps): {
201
201
  onMouseEnter?: React.MouseEventHandler<HTMLButtonElement>;
202
202
  onMouseLeave?: React.MouseEventHandler<HTMLButtonElement>;
203
203
  'aria-label'?: string;
204
- title?: string;
205
- name?: string;
206
- value?: string | number | readonly string[];
207
204
  onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
208
205
  onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
206
+ value?: string | number | readonly string[];
209
207
  form?: string;
210
208
  slot?: string;
209
+ title?: string;
210
+ name?: string;
211
211
  hidden?: boolean;
212
212
  color?: string;
213
- onChange?: React.FormEventHandler<HTMLButtonElement>;
214
- defaultChecked?: boolean;
215
213
  defaultValue?: string | number | readonly string[];
216
- suppressContentEditableWarning?: boolean;
217
- suppressHydrationWarning?: boolean;
218
214
  accessKey?: string;
219
- autoFocus?: boolean;
220
- formAction?: string;
221
- formEncType?: string;
222
- formMethod?: string;
223
- formNoValidate?: boolean;
224
- formTarget?: string;
225
215
  dir?: string;
226
216
  draggable?: boolean | "false" | "true";
227
217
  lang?: string;
228
- translate?: "no" | "yes";
218
+ translate?: "yes" | "no";
229
219
  prefix?: string;
230
220
  contentEditable?: "inherit" | (boolean | "false" | "true");
231
- inputMode?: "search" | "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal";
221
+ inputMode?: "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | "decimal";
232
222
  tabIndex?: number;
233
223
  role?: React.AriaRole;
234
224
  onMouseOut?: React.MouseEventHandler<HTMLButtonElement>;
@@ -240,6 +230,9 @@ export declare function withError(props: ModalReactProps): {
240
230
  'aria-haspopup'?: boolean | "dialog" | "menu" | "listbox" | "grid" | "false" | "true" | "tree";
241
231
  'aria-controls'?: string;
242
232
  'aria-describedby'?: string;
233
+ defaultChecked?: boolean;
234
+ suppressContentEditableWarning?: boolean;
235
+ suppressHydrationWarning?: boolean;
243
236
  contextMenu?: string;
244
237
  placeholder?: string;
245
238
  spellCheck?: boolean | "false" | "true";
@@ -274,7 +267,7 @@ export declare function withError(props: ModalReactProps): {
274
267
  'aria-current'?: boolean | "time" | "page" | "false" | "true" | "location" | "step" | "date";
275
268
  'aria-details'?: string;
276
269
  'aria-disabled'?: boolean | "false" | "true";
277
- 'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup";
270
+ 'aria-dropeffect'?: "none" | "link" | "copy" | "move" | "execute" | "popup";
278
271
  'aria-errormessage'?: string;
279
272
  'aria-flowto'?: string;
280
273
  'aria-grabbed'?: boolean | "false" | "true";
@@ -323,6 +316,7 @@ export declare function withError(props: ModalReactProps): {
323
316
  onCompositionUpdateCapture?: React.CompositionEventHandler<HTMLButtonElement>;
324
317
  onFocusCapture?: React.FocusEventHandler<HTMLButtonElement>;
325
318
  onBlurCapture?: React.FocusEventHandler<HTMLButtonElement>;
319
+ onChange?: React.FormEventHandler<HTMLButtonElement>;
326
320
  onChangeCapture?: React.FormEventHandler<HTMLButtonElement>;
327
321
  onBeforeInput?: React.FormEventHandler<HTMLButtonElement>;
328
322
  onBeforeInputCapture?: React.FormEventHandler<HTMLButtonElement>;
@@ -457,6 +451,12 @@ export declare function withError(props: ModalReactProps): {
457
451
  onAnimationIterationCapture?: React.AnimationEventHandler<HTMLButtonElement>;
458
452
  onTransitionEnd?: React.TransitionEventHandler<HTMLButtonElement>;
459
453
  onTransitionEndCapture?: React.TransitionEventHandler<HTMLButtonElement>;
454
+ autoFocus?: boolean;
455
+ formAction?: string;
456
+ formEncType?: string;
457
+ formMethod?: string;
458
+ formNoValidate?: boolean;
459
+ formTarget?: string;
460
460
  };
461
461
  };
462
462
  export declare function withConfirm(props: ModalReactProps): {
@@ -69,7 +69,7 @@ export default class Rating extends BaseComponent<RatingProps, RatingState> {
69
69
  onBlur: PropTypes.Requireable<(...args: any[]) => any>;
70
70
  onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
71
71
  autoFocus: PropTypes.Requireable<boolean>;
72
- size: PropTypes.Requireable<NonNullable<number | "default" | "small">>;
72
+ size: PropTypes.Requireable<NonNullable<number | "small" | "default">>;
73
73
  tooltips: PropTypes.Requireable<string[]>;
74
74
  id: PropTypes.Requireable<string>;
75
75
  preventScroll: PropTypes.Requireable<boolean>;
@@ -40,7 +40,7 @@ export default class Item extends BaseComponent<RatingItemProps, RatingItemState
40
40
  disabled: PropTypes.Requireable<boolean>;
41
41
  count: PropTypes.Requireable<number>;
42
42
  ariaLabelPrefix: PropTypes.Requireable<string>;
43
- size: PropTypes.Requireable<NonNullable<number | "default" | "small">>;
43
+ size: PropTypes.Requireable<NonNullable<number | "small" | "default">>;
44
44
  'aria-describedby': PropTypes.Requireable<string>;
45
45
  onFocus: PropTypes.Requireable<(...args: any[]) => any>;
46
46
  onBlur: PropTypes.Requireable<(...args: any[]) => any>;
@@ -1,3 +1,4 @@
1
+ import _isFunction from "lodash/isFunction";
1
2
  import React from 'react';
2
3
  import PropTypes from 'prop-types';
3
4
  import classnames from 'classnames';
@@ -86,20 +87,24 @@ const BasicStep = props => {
86
87
 
87
88
  const classString = classnames(prefixCls, `${prefixCls}-${status}`, {
88
89
  [`${prefixCls}-active`]: active,
89
- [`${prefixCls}-done`]: done,
90
- [`${prefixCls}-hover`]: onChange || props.onClick,
91
- [`${prefixCls}-${status}-hover`]: onChange || props.onClick
90
+ [`${prefixCls}-done`]: done
92
91
  }, className);
93
92
 
94
93
  const handleClick = e => {
95
- onClick === null || onClick === void 0 ? void 0 : onClick(e);
96
- onChange === null || onChange === void 0 ? void 0 : onChange();
94
+ if (_isFunction(onClick)) {
95
+ onClick(e);
96
+ }
97
+
98
+ onChange();
97
99
  };
98
100
 
99
101
  const handleKeyDown = e => {
100
102
  if (e.key === 'Enter') {
101
- onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
102
- onChange === null || onChange === void 0 ? void 0 : onChange();
103
+ if (_isFunction(onKeyDown)) {
104
+ onKeyDown(e);
105
+ }
106
+
107
+ onChange();
103
108
  }
104
109
  };
105
110
 
@@ -46,11 +46,13 @@ const Steps = props => {
46
46
 
47
47
  childProps.active = stepNumber === current;
48
48
  childProps.done = stepNumber < current;
49
- childProps.onChange = onChange ? () => {
49
+
50
+ childProps.onChange = () => {
50
51
  if (index !== current) {
51
52
  onChange(index + initial);
52
53
  }
53
- } : undefined;
54
+ };
55
+
54
56
  return /*#__PURE__*/cloneElement(child, Object.assign({}, childProps));
55
57
  });
56
58
  return content;
@@ -1,3 +1,4 @@
1
+ import _isFunction from "lodash/isFunction";
1
2
  import React from 'react';
2
3
  import PropTypes from 'prop-types';
3
4
  import classnames from 'classnames';
@@ -63,8 +64,7 @@ const FillStep = props => {
63
64
  [`${prefixCls}-left`]: true,
64
65
  [`${prefixCls}-icon`]: 'icon' in props,
65
66
  [`${prefixCls}-plain`]: !('icon' in props),
66
- [`${prefixCls}-icon-process`]: progress,
67
- [`${prefixCls}-hover`]: onChange || onClick
67
+ [`${prefixCls}-icon-process`]: progress
68
68
  });
69
69
  return inner ? /*#__PURE__*/React.createElement("div", {
70
70
  className: cls
@@ -72,14 +72,20 @@ const FillStep = props => {
72
72
  };
73
73
 
74
74
  const handleClick = e => {
75
- onClick === null || onClick === void 0 ? void 0 : onClick(e);
76
- onChange === null || onChange === void 0 ? void 0 : onChange();
75
+ if (_isFunction(onClick)) {
76
+ onClick(e);
77
+ }
78
+
79
+ onChange();
77
80
  };
78
81
 
79
82
  const handleKeyDown = e => {
80
83
  if (e.key === 'Enter') {
81
- onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
82
- onChange === null || onChange === void 0 ? void 0 : onChange();
84
+ if (_isFunction(onKeyDown)) {
85
+ onKeyDown(e);
86
+ }
87
+
88
+ onChange();
83
89
  }
84
90
  };
85
91
 
@@ -91,7 +97,6 @@ const FillStep = props => {
91
97
  className: classnames({
92
98
  [prefixCls]: true,
93
99
  [`${prefixCls}-${status}`]: Boolean(status),
94
- [`${prefixCls}-${status}-hover`]: Boolean(status) && (onChange || onClick),
95
100
  [`${prefixCls}-clickable`]: onClick
96
101
  }, className),
97
102
  style: style,
@@ -46,11 +46,12 @@ const Steps = props => {
46
46
  }
47
47
  }
48
48
 
49
- childProps.onChange = onChange ? () => {
49
+ childProps.onChange = () => {
50
50
  if (index !== current) {
51
51
  onChange(index + initial);
52
52
  }
53
- } : undefined;
53
+ };
54
+
54
55
  return /*#__PURE__*/React.createElement(Col, {
55
56
  style: colStyle
56
57
  }, /*#__PURE__*/cloneElement(child, Object.assign({}, childProps)));
@@ -29,6 +29,7 @@ declare class Steps extends Component<StepsProps> {
29
29
  size: PropTypes.Requireable<string>;
30
30
  };
31
31
  static defaultProps: {
32
+ onChange: (...args: any[]) => void;
32
33
  type: string;
33
34
  size: string;
34
35
  };
@@ -1,3 +1,5 @@
1
+ import _noop from "lodash/noop";
2
+
1
3
  var __rest = this && this.__rest || function (s, e) {
2
4
  var t = {};
3
5
 
@@ -61,6 +63,7 @@ Steps.propTypes = {
61
63
  size: PropTypes.oneOf(['small', 'default'])
62
64
  };
63
65
  Steps.defaultProps = {
66
+ onChange: _noop,
64
67
  type: 'fill',
65
68
  size: 'default'
66
69
  };
@@ -1,3 +1,4 @@
1
+ import _isFunction from "lodash/isFunction";
1
2
  import React from 'react';
2
3
  import PropTypes from 'prop-types';
3
4
  import classnames from 'classnames';
@@ -22,14 +23,20 @@ const NavStep = props => {
22
23
  }, className);
23
24
 
24
25
  const handleClick = e => {
25
- onClick === null || onClick === void 0 ? void 0 : onClick(e);
26
- onChange === null || onChange === void 0 ? void 0 : onChange();
26
+ if (_isFunction(onClick)) {
27
+ onClick(e);
28
+ }
29
+
30
+ onChange();
27
31
  };
28
32
 
29
33
  const handleKeyDown = e => {
30
34
  if (e.key === 'Enter') {
31
- onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
32
- onChange === null || onChange === void 0 ? void 0 : onChange();
35
+ if (_isFunction(onKeyDown)) {
36
+ onKeyDown(e);
37
+ }
38
+
39
+ onChange();
33
40
  }
34
41
  };
35
42
 
@@ -27,11 +27,13 @@ const Steps = props => {
27
27
  total
28
28
  }, child.props);
29
29
  childProps.active = index === current;
30
- childProps.onChange = onChange ? () => {
30
+
31
+ childProps.onChange = () => {
31
32
  if (index !== current) {
32
33
  onChange(index + initial);
33
34
  }
34
- } : undefined;
35
+ };
36
+
35
37
  return /*#__PURE__*/cloneElement(child, Object.assign({}, childProps));
36
38
  });
37
39
  return content;
@@ -45,7 +45,7 @@ declare class Switch extends BaseComponent<SwitchProps, SwitchState> {
45
45
  onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
46
46
  onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
47
47
  style: PropTypes.Requireable<object>;
48
- size: PropTypes.Requireable<"default" | "small" | "large">;
48
+ size: PropTypes.Requireable<"small" | "default" | "large">;
49
49
  uncheckedText: PropTypes.Requireable<PropTypes.ReactNodeLike>;
50
50
  id: PropTypes.Requireable<string>;
51
51
  };
@@ -4,7 +4,6 @@ import Store from '@douyinfe/semi-foundation/lib/es/utils/Store';
4
4
  import { BaseProps } from '../../_base/baseComponent';
5
5
  import { ExpandedRowRender, Virtualized, GetVirtualizedListRef, ColumnProps, Size, BodyScrollEvent, Scroll, Fixed, TableComponents, RowExpandable, VirtualizedOnScroll, RowKey } from '../interface';
6
6
  export interface BodyProps extends BaseProps {
7
- tableLayout?: 'fixed' | 'auto';
8
7
  anyColumnFixed?: boolean;
9
8
  columns?: ColumnProps[];
10
9
  dataSource?: Record<string, any>[];
@@ -260,6 +260,7 @@ class Body extends BaseComponent {
260
260
  scroll,
261
261
  prefixCls,
262
262
  virtualized,
263
+ anyColumnFixed,
263
264
  columns
264
265
  } = this.props;
265
266
  const {
@@ -479,8 +480,7 @@ class Body extends BaseComponent {
479
480
  dataSource,
480
481
  onScroll,
481
482
  groups,
482
- expandedRowRender,
483
- tableLayout
483
+ expandedRowRender
484
484
  } = this.props;
485
485
 
486
486
  const x = _get(scroll, 'x');
@@ -531,7 +531,7 @@ class Body extends BaseComponent {
531
531
  "aria-colcount": columns && columns.length,
532
532
  style: tableStyle,
533
533
  className: classnames(prefixCls, {
534
- [`${prefixCls}-fixed`]: tableLayout === 'fixed'
534
+ [`${prefixCls}-fixed`]: anyColumnFixed
535
535
  })
536
536
  }, colgroup, includeHeader && showHeader ? /*#__PURE__*/React.createElement(TableHeader, Object.assign({}, this.props, {
537
537
  ref: headerRef,
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
- import { Fixed, TableComponents, Scroll, BodyScrollEvent, ColumnProps, OnHeaderRow, Sticky } from './interface';
2
+ import { Fixed, TableComponents, Scroll, BodyScrollEvent, ColumnProps, OnHeaderRow } from './interface';
3
3
  export interface HeadTableProps {
4
- tableLayout?: 'fixed' | 'auto';
4
+ [x: string]: any;
5
+ anyColumnFixed?: boolean;
5
6
  bodyHasScrollBar?: boolean;
6
7
  columns?: ColumnProps[];
7
8
  components?: TableComponents;
@@ -15,7 +16,6 @@ export interface HeadTableProps {
15
16
  showHeader?: boolean;
16
17
  onDidUpdate?: (ref: React.MutableRefObject<any>) => void;
17
18
  onHeaderRow?: OnHeaderRow<any>;
18
- sticky?: Sticky;
19
19
  }
20
- declare const _default: React.ForwardRefExoticComponent<HeadTableProps & React.RefAttributes<HTMLDivElement>>;
20
+ declare const _default: React.ForwardRefExoticComponent<Pick<HeadTableProps, keyof HeadTableProps> & React.RefAttributes<HTMLDivElement>>;
21
21
  export default _default;
@@ -30,7 +30,7 @@ class HeadTable extends React.PureComponent {
30
30
  components,
31
31
  onDidUpdate,
32
32
  showHeader,
33
- tableLayout,
33
+ anyColumnFixed,
34
34
  bodyHasScrollBar,
35
35
  sticky
36
36
  } = this.props;
@@ -82,7 +82,7 @@ class HeadTable extends React.PureComponent {
82
82
  }, /*#__PURE__*/React.createElement(Table, {
83
83
  style: tableStyle,
84
84
  className: classnames(prefixCls, {
85
- [`${prefixCls}-fixed`]: tableLayout === 'fixed'
85
+ [`${prefixCls}-fixed`]: anyColumnFixed
86
86
  })
87
87
  }, colgroup, tableHeader));
88
88
  }
@@ -90,7 +90,7 @@ class HeadTable extends React.PureComponent {
90
90
  }
91
91
 
92
92
  HeadTable.propTypes = {
93
- tableLayout: PropTypes.string,
93
+ anyColumnFixed: PropTypes.bool,
94
94
  bodyHasScrollBar: PropTypes.bool,
95
95
  columns: PropTypes.array,
96
96
  components: PropTypes.object,