@douyinfe/semi-ui 2.58.0-beta.0 → 2.58.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 (73) hide show
  1. package/dist/css/semi.css +85 -9
  2. package/dist/css/semi.min.css +1 -1
  3. package/dist/umd/semi-ui.js +82 -16
  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/_base/base.css +2 -2
  8. package/lib/cjs/button/Button.d.ts +1 -1
  9. package/lib/cjs/button/Button.js +1 -0
  10. package/lib/cjs/locale/interface.d.ts +3 -0
  11. package/lib/cjs/locale/source/ar.js +3 -0
  12. package/lib/cjs/locale/source/de.js +3 -0
  13. package/lib/cjs/locale/source/en_GB.js +3 -0
  14. package/lib/cjs/locale/source/en_US.js +3 -0
  15. package/lib/cjs/locale/source/es.js +3 -0
  16. package/lib/cjs/locale/source/fr.js +3 -0
  17. package/lib/cjs/locale/source/id_ID.js +3 -0
  18. package/lib/cjs/locale/source/it.js +3 -0
  19. package/lib/cjs/locale/source/ja_JP.js +3 -0
  20. package/lib/cjs/locale/source/ko_KR.js +3 -0
  21. package/lib/cjs/locale/source/ms_MY.js +3 -0
  22. package/lib/cjs/locale/source/nl_NL.js +3 -0
  23. package/lib/cjs/locale/source/pl_PL.js +3 -0
  24. package/lib/cjs/locale/source/pt_BR.js +3 -0
  25. package/lib/cjs/locale/source/ro.js +3 -0
  26. package/lib/cjs/locale/source/ru_RU.js +3 -0
  27. package/lib/cjs/locale/source/sv_SE.js +3 -0
  28. package/lib/cjs/locale/source/th_TH.js +3 -0
  29. package/lib/cjs/locale/source/tr_TR.js +3 -0
  30. package/lib/cjs/locale/source/vi_VN.js +3 -0
  31. package/lib/cjs/locale/source/zh_CN.js +3 -0
  32. package/lib/cjs/locale/source/zh_TW.js +3 -0
  33. package/lib/cjs/slider/index.js +13 -8
  34. package/lib/cjs/tabs/TabBar.d.ts +4 -0
  35. package/lib/cjs/tabs/TabBar.js +55 -3
  36. package/lib/cjs/tabs/TabItem.js +3 -1
  37. package/lib/cjs/tabs/index.d.ts +1 -0
  38. package/lib/cjs/tabs/index.js +7 -4
  39. package/lib/cjs/tabs/interface.d.ts +7 -0
  40. package/lib/es/_base/base.css +2 -2
  41. package/lib/es/button/Button.d.ts +1 -1
  42. package/lib/es/button/Button.js +1 -0
  43. package/lib/es/locale/interface.d.ts +3 -0
  44. package/lib/es/locale/source/ar.js +3 -0
  45. package/lib/es/locale/source/de.js +3 -0
  46. package/lib/es/locale/source/en_GB.js +3 -0
  47. package/lib/es/locale/source/en_US.js +3 -0
  48. package/lib/es/locale/source/es.js +3 -0
  49. package/lib/es/locale/source/fr.js +3 -0
  50. package/lib/es/locale/source/id_ID.js +3 -0
  51. package/lib/es/locale/source/it.js +3 -0
  52. package/lib/es/locale/source/ja_JP.js +3 -0
  53. package/lib/es/locale/source/ko_KR.js +3 -0
  54. package/lib/es/locale/source/ms_MY.js +3 -0
  55. package/lib/es/locale/source/nl_NL.js +3 -0
  56. package/lib/es/locale/source/pl_PL.js +3 -0
  57. package/lib/es/locale/source/pt_BR.js +3 -0
  58. package/lib/es/locale/source/ro.js +3 -0
  59. package/lib/es/locale/source/ru_RU.js +3 -0
  60. package/lib/es/locale/source/sv_SE.js +3 -0
  61. package/lib/es/locale/source/th_TH.js +3 -0
  62. package/lib/es/locale/source/tr_TR.js +3 -0
  63. package/lib/es/locale/source/vi_VN.js +3 -0
  64. package/lib/es/locale/source/zh_CN.js +3 -0
  65. package/lib/es/locale/source/zh_TW.js +3 -0
  66. package/lib/es/slider/index.js +13 -8
  67. package/lib/es/tabs/TabBar.d.ts +4 -0
  68. package/lib/es/tabs/TabBar.js +56 -4
  69. package/lib/es/tabs/TabItem.js +3 -1
  70. package/lib/es/tabs/index.d.ts +1 -0
  71. package/lib/es/tabs/index.js +7 -4
  72. package/lib/es/tabs/interface.d.ts +7 -0
  73. package/package.json +8 -8
@@ -12,6 +12,9 @@ const local = {
12
12
  confirm: 'Confirmer',
13
13
  cancel: 'Annuler'
14
14
  },
15
+ Tabs: {
16
+ more: "Plus"
17
+ },
15
18
  TimePicker: {
16
19
  placeholder: {
17
20
  time: 'Sélectionner temps',
@@ -12,6 +12,9 @@ const local = {
12
12
  confirm: 'Konfirmasi',
13
13
  cancel: 'Batalkan'
14
14
  },
15
+ Tabs: {
16
+ more: "Lagi"
17
+ },
15
18
  TimePicker: {
16
19
  placeholder: {
17
20
  time: 'Pilih waktu',
@@ -12,6 +12,9 @@ const local = {
12
12
  confirm: 'Conferma',
13
13
  cancel: 'Cancella'
14
14
  },
15
+ Tabs: {
16
+ more: "Di più"
17
+ },
15
18
  TimePicker: {
16
19
  placeholder: {
17
20
  time: 'Seleziona ora',
@@ -12,6 +12,9 @@ const local = {
12
12
  confirm: '確認する',
13
13
  cancel: 'キャンセル'
14
14
  },
15
+ Tabs: {
16
+ more: "もっと"
17
+ },
15
18
  TimePicker: {
16
19
  placeholder: {
17
20
  time: '時間を選択してください',
@@ -12,6 +12,9 @@ const local = {
12
12
  confirm: '확인',
13
13
  cancel: '취소'
14
14
  },
15
+ Tabs: {
16
+ more: "더"
17
+ },
15
18
  TimePicker: {
16
19
  placeholder: {
17
20
  time: '시간 선택',
@@ -12,6 +12,9 @@ const local = {
12
12
  confirm: 'Sahkan',
13
13
  cancel: 'Batal'
14
14
  },
15
+ Tabs: {
16
+ more: "Lagi"
17
+ },
15
18
  TimePicker: {
16
19
  placeholder: {
17
20
  time: 'Pilih masa',
@@ -17,6 +17,9 @@ const local = {
17
17
  confirm: 'Bevestigen',
18
18
  cancel: 'Annuleren'
19
19
  },
20
+ Tabs: {
21
+ more: "Meer"
22
+ },
20
23
  TimePicker: {
21
24
  placeholder: {
22
25
  time: 'Tijd selecteren',
@@ -17,6 +17,9 @@ const local = {
17
17
  confirm: 'Potwierdź',
18
18
  cancel: 'Anuluj'
19
19
  },
20
+ Tabs: {
21
+ more: "Więcej"
22
+ },
20
23
  TimePicker: {
21
24
  placeholder: {
22
25
  time: 'Wybierz czas',
@@ -12,6 +12,9 @@ const local = {
12
12
  confirm: 'OK',
13
13
  cancel: 'Cancelar'
14
14
  },
15
+ Tabs: {
16
+ more: "Mais"
17
+ },
15
18
  TimePicker: {
16
19
  placeholder: {
17
20
  time: 'Por favor escolha a hora',
@@ -12,6 +12,9 @@ const local = {
12
12
  confirm: 'Confirmă',
13
13
  cancel: 'Anulează'
14
14
  },
15
+ Tabs: {
16
+ more: "Mai mult"
17
+ },
15
18
  TimePicker: {
16
19
  placeholder: {
17
20
  time: 'Selectează timpul',
@@ -12,6 +12,9 @@ const local = {
12
12
  confirm: 'подтвердить',
13
13
  cancel: 'отмена'
14
14
  },
15
+ Tabs: {
16
+ more: "Более"
17
+ },
15
18
  TimePicker: {
16
19
  placeholder: {
17
20
  time: 'Выбрать время',
@@ -16,6 +16,9 @@ const local = {
16
16
  confirm: 'Bekräfta',
17
17
  cancel: 'Avbryt'
18
18
  },
19
+ Tabs: {
20
+ more: "Mer"
21
+ },
19
22
  TimePicker: {
20
23
  placeholder: {
21
24
  time: 'Välj tid',
@@ -12,6 +12,9 @@ const local = {
12
12
  confirm: 'ตกลง',
13
13
  cancel: 'ยกเลิก'
14
14
  },
15
+ Tabs: {
16
+ more: "มากกว่า"
17
+ },
15
18
  TimePicker: {
16
19
  placeholder: {
17
20
  time: 'โปรดเลือกเวลา',
@@ -12,6 +12,9 @@ const local = {
12
12
  confirm: 'Tamam',
13
13
  cancel: 'İptal'
14
14
  },
15
+ Tabs: {
16
+ more: "Daha"
17
+ },
15
18
  TimePicker: {
16
19
  placeholder: {
17
20
  time: 'Lütfen bir zaman seçin',
@@ -12,6 +12,9 @@ const local = {
12
12
  confirm: 'Xác nhận',
13
13
  cancel: 'Huỷ bỏ'
14
14
  },
15
+ Tabs: {
16
+ more: "Hơn"
17
+ },
15
18
  TimePicker: {
16
19
  placeholder: {
17
20
  time: 'Chọn thời gian',
@@ -12,6 +12,9 @@ const local = {
12
12
  confirm: '确定',
13
13
  cancel: '取消'
14
14
  },
15
+ Tabs: {
16
+ more: "更多"
17
+ },
15
18
  TimePicker: {
16
19
  placeholder: {
17
20
  time: '请选择时间',
@@ -12,6 +12,9 @@ const local = {
12
12
  confirm: '確定',
13
13
  cancel: '取消'
14
14
  },
15
+ Tabs: {
16
+ more: "更多"
17
+ },
15
18
  TimePicker: {
16
19
  placeholder: {
17
20
  time: '請選擇時間',
@@ -266,11 +266,11 @@ export default class Slider extends BaseComponent {
266
266
  const minPercent = percentInfo.min;
267
267
  const maxPercent = percentInfo.max;
268
268
  let trackStyle = !vertical ? {
269
- width: range ? `${(maxPercent - minPercent) * 100}%` : `${minPercent * 100}%`,
270
- left: range ? `${minPercent * 100}%` : 0
269
+ width: range ? `${Math.abs(maxPercent - minPercent) * 100}%` : `${minPercent * 100}%`,
270
+ left: range ? `${Math.min(minPercent, maxPercent) * 100}%` : 0
271
271
  } : {
272
- height: range ? `${(maxPercent - minPercent) * 100}%` : `${minPercent * 100}%`,
273
- top: range ? `${minPercent * 100}%` : 0
272
+ height: range ? `${Math.abs(maxPercent - minPercent) * 100}%` : `${minPercent * 100}%`,
273
+ top: range ? `${Math.min(minPercent, maxPercent) * 100}%` : 0
274
274
  };
275
275
  trackStyle = included ? trackStyle : {};
276
276
  return (
@@ -385,11 +385,13 @@ export default class Slider extends BaseComponent {
385
385
  var _this = this;
386
386
  return Object.assign(Object.assign({}, super.adapter), {
387
387
  getSliderLengths: () => {
388
+ var _a;
388
389
  if (this.sliderEl && this.sliderEl.current) {
389
390
  const rect = this.sliderEl.current.getBoundingClientRect();
391
+ const offsetParentRect = (_a = this.sliderEl.current.offsetParent) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
390
392
  const offset = {
391
- x: this.sliderEl.current.offsetLeft,
392
- y: this.sliderEl.current.offsetTop
393
+ x: offsetParentRect ? rect.left - offsetParentRect.left : this.sliderEl.current.offsetLeft,
394
+ y: offsetParentRect ? rect.top - offsetParentRect.top : this.sliderEl.current.offsetTop
393
395
  };
394
396
  return {
395
397
  sliderX: offset.x,
@@ -446,7 +448,9 @@ export default class Slider extends BaseComponent {
446
448
  let callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _noop;
447
449
  this.setState(stateObj, callback);
448
450
  },
449
- notifyChange: cbValue => this.props.onChange(cbValue),
451
+ notifyChange: cbValue => {
452
+ this.props.onChange(Array.isArray(cbValue) ? [...cbValue].sort() : cbValue);
453
+ },
450
454
  setDragging: value => {
451
455
  this.dragging = value;
452
456
  },
@@ -599,7 +603,8 @@ export default class Slider extends BaseComponent {
599
603
  [`${prefixCls}`]: !vertical,
600
604
  [cssClasses.VERTICAL]: vertical
601
605
  });
602
- const ariaLabel = range ? `Range: ${this._getAriaValueText(currentValue[0], 0)} to ${this._getAriaValueText(currentValue[1], 1)}` : undefined;
606
+ const fixedCurrentValue = Array.isArray(currentValue) ? [...currentValue].sort() : currentValue;
607
+ const ariaLabel = range ? `Range: ${this._getAriaValueText(fixedCurrentValue[0], 0)} to ${this._getAriaValueText(fixedCurrentValue[1], 1)}` : undefined;
603
608
  const slider = /*#__PURE__*/React.createElement("div", Object.assign({
604
609
  className: wrapperClass,
605
610
  style: style,
@@ -1,5 +1,6 @@
1
1
  import React, { MouseEvent, ReactNode } from 'react';
2
2
  import PropTypes from 'prop-types';
3
+ import { DropdownProps } from '../dropdown';
3
4
  import { TabBarProps, PlainTab } from './interface';
4
5
  export interface TabBarState {
5
6
  endInd: number;
@@ -25,6 +26,7 @@ declare class TabBar extends React.Component<TabBarProps, TabBarState> {
25
26
  type: PropTypes.Requireable<string>;
26
27
  closable: PropTypes.Requireable<boolean>;
27
28
  deleteTabItem: PropTypes.Requireable<(...args: any[]) => any>;
29
+ more: PropTypes.Requireable<NonNullable<number | object>>;
28
30
  };
29
31
  constructor(props: TabBarProps);
30
32
  componentDidMount(): void;
@@ -38,6 +40,8 @@ declare class TabBar extends React.Component<TabBarProps, TabBarState> {
38
40
  renderCollapse: (items: Array<OverflowItem>, icon: ReactNode, pos: 'start' | 'end') => ReactNode;
39
41
  renderOverflow: (items: any[]) => Array<ReactNode>;
40
42
  renderCollapsedTab: () => ReactNode;
43
+ renderWithMoreTrigger: () => ReactNode;
44
+ renderMoreDropdown: (panels: PlainTab[], dropDownProps: DropdownProps, trigger: ReactNode) => ReactNode;
41
45
  render(): ReactNode;
42
46
  private _isActive;
43
47
  private _getItemKey;
@@ -16,9 +16,10 @@ import getDataAttr from '@douyinfe/semi-foundation/lib/es/utils/getDataAttr';
16
16
  import OverflowList from '../overflowList';
17
17
  import Dropdown from '../dropdown';
18
18
  import Button from '../button';
19
- import { IconChevronRight, IconChevronLeft } from '@douyinfe/semi-icons';
19
+ import { IconChevronRight, IconChevronLeft, IconChevronDown } from '@douyinfe/semi-icons';
20
20
  import { getUuidv4 } from '@douyinfe/semi-foundation/lib/es/utils/uuid';
21
21
  import TabItem from './TabItem';
22
+ import LocaleConsumer from "../locale/localeConsumer";
22
23
  class TabBar extends React.Component {
23
24
  constructor(props) {
24
25
  super(props);
@@ -156,6 +157,55 @@ class TabBar extends React.Component {
156
157
  visibleItemRenderer: this.renderTabItem
157
158
  });
158
159
  };
160
+ this.renderWithMoreTrigger = () => {
161
+ const {
162
+ list,
163
+ more
164
+ } = this.props;
165
+ let tabElements = [];
166
+ let moreTrigger = /*#__PURE__*/React.createElement("div", {
167
+ className: cls({
168
+ [`${cssClasses.TABS_BAR}-more-trigger`]: true,
169
+ [`${cssClasses.TABS_BAR}-more-trigger-${this.props.type}`]: true
170
+ })
171
+ }, /*#__PURE__*/React.createElement(LocaleConsumer, {
172
+ componentName: "Tabs"
173
+ }, (locale, localeCode) => /*#__PURE__*/React.createElement("div", {
174
+ className: `${cssClasses.TABS_BAR}-more-trigger-content`
175
+ }, /*#__PURE__*/React.createElement("div", null, locale.more), /*#__PURE__*/React.createElement(IconChevronDown, {
176
+ className: `${cssClasses.TABS_BAR}-more-trigger-content-icon`
177
+ }))));
178
+ let keepCount;
179
+ if (typeof more === "number") {
180
+ keepCount = list.length - Math.min(more, list.length);
181
+ tabElements = list.slice(0, keepCount).map(panel => this.renderTabItem(panel));
182
+ } else if (typeof more === 'object') {
183
+ keepCount = list.length - Math.min(more.count, list.length);
184
+ tabElements = list.slice(0, keepCount).map(panel => this.renderTabItem(panel));
185
+ if (more.render) {
186
+ moreTrigger = more.render();
187
+ }
188
+ } else if (more !== undefined) {
189
+ throw new Error("[Semi Tabs]: invalid tab props format: more");
190
+ }
191
+ return /*#__PURE__*/React.createElement(React.Fragment, null, tabElements, this.renderMoreDropdown(list.slice(keepCount), more === null || more === void 0 ? void 0 : more['dropdownProps'], moreTrigger));
192
+ };
193
+ this.renderMoreDropdown = (panels, dropDownProps, trigger) => {
194
+ return /*#__PURE__*/React.createElement(Dropdown, Object.assign({
195
+ trigger: 'hover',
196
+ showTick: true,
197
+ position: 'bottomLeft',
198
+ className: `${cssClasses.TABS_BAR}-more-dropdown-${this.props.type}`,
199
+ clickToHide: true,
200
+ menu: panels.map(panel => ({
201
+ node: 'item',
202
+ name: panel.tab,
203
+ icon: panel.icon,
204
+ onClick: e => this.props.onTabClick(panel.itemKey, e),
205
+ active: this.props.activeKey === panel.itemKey
206
+ }))
207
+ }, dropDownProps), trigger);
208
+ };
159
209
  this._isActive = key => key === this.props.activeKey;
160
210
  this._getItemKey = key => `${key}-bar`;
161
211
  this.state = {
@@ -205,9 +255,10 @@ class TabBar extends React.Component {
205
255
  className,
206
256
  list,
207
257
  tabPosition,
258
+ more,
208
259
  collapsible
209
260
  } = _a,
210
- restProps = __rest(_a, ["type", "style", "className", "list", "tabPosition", "collapsible"]);
261
+ restProps = __rest(_a, ["type", "style", "className", "list", "tabPosition", "more", "collapsible"]);
211
262
  const classNames = cls(className, {
212
263
  [cssClasses.TABS_BAR]: true,
213
264
  [cssClasses.TABS_BAR_LINE]: type === 'line',
@@ -217,7 +268,7 @@ class TabBar extends React.Component {
217
268
  [`${cssClasses.TABS_BAR}-collapse`]: collapsible
218
269
  });
219
270
  const extra = this.renderExtra();
220
- const contents = collapsible ? this.renderCollapsedTab() : this.renderTabComponents(list);
271
+ const contents = collapsible ? this.renderCollapsedTab() : more ? this.renderWithMoreTrigger() : this.renderTabComponents(list);
221
272
  return /*#__PURE__*/React.createElement("div", Object.assign({
222
273
  role: "tablist",
223
274
  "aria-orientation": tabPosition === "left" ? "vertical" : "horizontal",
@@ -240,6 +291,7 @@ TabBar.propTypes = {
240
291
  tabPosition: PropTypes.oneOf(strings.POSITION_MAP),
241
292
  type: PropTypes.oneOf(strings.TYPE_MAP),
242
293
  closable: PropTypes.bool,
243
- deleteTabItem: PropTypes.func
294
+ deleteTabItem: PropTypes.func,
295
+ more: PropTypes.oneOfType([PropTypes.number, PropTypes.object])
244
296
  };
245
297
  export default TabBar;
@@ -34,7 +34,9 @@ const TabItem = (props, ref) => {
34
34
  onClick: e => deleteTabItem(itemKey, e)
35
35
  }) : null;
36
36
  }, [type, closable, deleteTabItem, itemKey]);
37
- const renderIcon = useCallback(icon => /*#__PURE__*/React.createElement("span", null, icon), []);
37
+ const renderIcon = useCallback(icon => /*#__PURE__*/React.createElement("span", {
38
+ className: `${cssClasses.TABS_BAR}-icon`
39
+ }, icon), []);
38
40
  const handleKeyDownInItem = useCallback(event => {
39
41
  handleKeyDown && handleKeyDown(event, itemKey, closable);
40
42
  }, [handleKeyDown, itemKey, closable]);
@@ -37,6 +37,7 @@ declare class Tabs extends BaseComponent<TabsProps, TabsState> {
37
37
  type: PropTypes.Requireable<string>;
38
38
  onTabClose: PropTypes.Requireable<(...args: any[]) => any>;
39
39
  preventScroll: PropTypes.Requireable<boolean>;
40
+ more: PropTypes.Requireable<NonNullable<number | object>>;
40
41
  };
41
42
  static __SemiComponentName__: string;
42
43
  static defaultProps: TabsProps;
@@ -222,9 +222,10 @@ class Tabs extends BaseComponent {
222
222
  tabBarStyle,
223
223
  tabPaneMotion,
224
224
  tabPosition,
225
- type
225
+ type,
226
+ more
226
227
  } = _a,
227
- restProps = __rest(_a, ["children", "className", "collapsible", "contentStyle", "keepDOM", "lazyRender", "renderTabBar", "size", "style", "tabBarClassName", "tabBarExtraContent", "tabBarStyle", "tabPaneMotion", "tabPosition", "type"]);
228
+ restProps = __rest(_a, ["children", "className", "collapsible", "contentStyle", "keepDOM", "lazyRender", "renderTabBar", "size", "style", "tabBarClassName", "tabBarExtraContent", "tabBarStyle", "tabPaneMotion", "tabPosition", "type", "more"]);
228
229
  const {
229
230
  panes,
230
231
  activeKey
@@ -249,7 +250,8 @@ class Tabs extends BaseComponent {
249
250
  tabPosition,
250
251
  type,
251
252
  deleteTabItem: this.deleteTabItem,
252
- handleKeyDown: this.foundation.handleKeyDown
253
+ handleKeyDown: this.foundation.handleKeyDown,
254
+ more
253
255
  };
254
256
  const tabBar = renderTabBar ? renderTabBar(tabBarProps, TabBar) : /*#__PURE__*/React.createElement(TabBar, Object.assign({}, tabBarProps));
255
257
  const content = keepDOM ? children : this.getActiveItem();
@@ -296,7 +298,8 @@ Tabs.propTypes = {
296
298
  tabPosition: PropTypes.oneOf(strings.POSITION_MAP),
297
299
  type: PropTypes.oneOf(strings.TYPE_MAP),
298
300
  onTabClose: PropTypes.func,
299
- preventScroll: PropTypes.bool
301
+ preventScroll: PropTypes.bool,
302
+ more: PropTypes.oneOfType([PropTypes.number, PropTypes.object])
300
303
  };
301
304
  Tabs.__SemiComponentName__ = "Tabs";
302
305
  Tabs.defaultProps = getDefaultPropsFromGlobalConfig(Tabs.__SemiComponentName__, {
@@ -1,6 +1,7 @@
1
1
  import React, { CSSProperties, MouseEvent, ReactNode } from 'react';
2
2
  import { Motion } from '../_base/base';
3
3
  import TabBar from './TabBar';
4
+ import { DropdownProps } from "../dropdown";
4
5
  export type TabType = 'line' | 'card' | 'button';
5
6
  export type TabSize = 'small' | 'medium' | 'large';
6
7
  export type TabPosition = 'top' | 'left';
@@ -34,6 +35,11 @@ export interface TabsProps {
34
35
  type?: TabType;
35
36
  onTabClose?: (tabKey: string) => void;
36
37
  preventScroll?: boolean;
38
+ more?: number | {
39
+ count: number;
40
+ render?: () => ReactNode;
41
+ dropdownProps?: DropdownProps;
42
+ };
37
43
  }
38
44
  export interface TabBarProps {
39
45
  activeKey?: string;
@@ -51,6 +57,7 @@ export interface TabBarProps {
51
57
  closable?: boolean;
52
58
  deleteTabItem?: (tabKey: string, event: MouseEvent<Element>) => void;
53
59
  handleKeyDown?: (event: React.KeyboardEvent, itemKey: string, closable: boolean) => void;
60
+ more?: TabsProps['more'];
54
61
  }
55
62
  export interface TabPaneProps {
56
63
  className?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-ui",
3
- "version": "2.58.0-beta.0",
3
+ "version": "2.58.0",
4
4
  "description": "A modern, comprehensive, flexible design system and UI library. Connect DesignOps & DevOps. Quickly build beautiful React apps. Maintained by Douyin-fe team.",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es/index.js",
@@ -20,12 +20,12 @@
20
20
  "@dnd-kit/core": "^6.0.8",
21
21
  "@dnd-kit/sortable": "^7.0.2",
22
22
  "@dnd-kit/utilities": "^3.2.1",
23
- "@douyinfe/semi-animation": "2.58.0-beta.0",
24
- "@douyinfe/semi-animation-react": "2.58.0-beta.0",
25
- "@douyinfe/semi-foundation": "2.58.0-beta.0",
26
- "@douyinfe/semi-icons": "2.58.0-beta.0",
27
- "@douyinfe/semi-illustrations": "2.58.0-beta.0",
28
- "@douyinfe/semi-theme-default": "2.58.0-beta.0",
23
+ "@douyinfe/semi-animation": "2.58.0",
24
+ "@douyinfe/semi-animation-react": "2.58.0",
25
+ "@douyinfe/semi-foundation": "2.58.0",
26
+ "@douyinfe/semi-icons": "2.58.0",
27
+ "@douyinfe/semi-illustrations": "2.58.0",
28
+ "@douyinfe/semi-theme-default": "2.58.0",
29
29
  "async-validator": "^3.5.0",
30
30
  "classnames": "^2.2.6",
31
31
  "copy-text-to-clipboard": "^2.1.1",
@@ -75,7 +75,7 @@
75
75
  ],
76
76
  "author": "",
77
77
  "license": "MIT",
78
- "gitHead": "bd0c5bf8924d1e971746ba88f83c2c8857d307f7",
78
+ "gitHead": "71f716ee06be81190ed3d28de4e61542ad0b62d3",
79
79
  "devDependencies": {
80
80
  "@babel/plugin-proposal-decorators": "^7.15.8",
81
81
  "@babel/plugin-transform-runtime": "^7.15.8",