@hi-ui/tabs 4.0.0-alpha.9 → 4.0.0-beta.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.
@@ -36,27 +36,31 @@ export interface TabsProps {
36
36
  /**
37
37
  * 默认高亮id
38
38
  */
39
- defaultActiveId?: string;
39
+ defaultActiveId?: React.ReactText;
40
40
  /**
41
41
  * 高亮id
42
42
  */
43
- activeId?: string;
43
+ activeId?: React.ReactText;
44
44
  /**
45
45
  * 布局方向
46
46
  */
47
- direction?: 'horizontal' | 'vertical';
47
+ placement?: 'horizontal' | 'vertical';
48
48
  /**
49
49
  * 布局类型
50
50
  */
51
- type?: 'desc' | 'card' | 'button' | 'default';
51
+ type?: 'desc' | 'card' | 'button' | 'line';
52
52
  /**
53
53
  * `activeId` 改变的回调
54
54
  */
55
- onChange?: (tabId: string) => void;
55
+ onChange?: (tabId: React.ReactText) => void;
56
56
  /**
57
57
  * 标签点击触发回调
58
58
  */
59
- onTabClick?: (tabId: string) => void;
59
+ onTabClick?: (tabId: React.ReactText) => void;
60
+ /**
61
+ * 右侧的拓展区域
62
+ */
63
+ extra?: React.ReactNode;
60
64
  /**
61
65
  * 节点增加时触发
62
66
  */
@@ -65,12 +69,18 @@ export interface TabsProps {
65
69
  * 节点删除时时触发
66
70
  */
67
71
  onDelete?: (deletedNode: TabPaneProps, index: number) => void;
68
- onDragStart?: (e: React.DragEvent<HTMLDivElement>) => void;
69
- onDragOver?: (e: React.DragEvent<HTMLDivElement>) => void;
70
- onDrop?: (e: React.DragEvent<HTMLDivElement>, { dragNode, dropNode, direction, }: {
72
+ onDragStart?: (e: React.DragEvent<HTMLDivElement>, { dragNode }: {
73
+ dragNode: TabPaneProps;
74
+ }) => void;
75
+ onDragOver?: (e: React.DragEvent<HTMLDivElement>, { targetNode }: {
76
+ targetNode: TabPaneProps;
77
+ }) => void;
78
+ onDrop?: (e: React.DragEvent<HTMLDivElement>, { dragNode, targetNode, direction, }: {
79
+ dragNode: TabPaneProps;
80
+ targetNode: TabPaneProps;
81
+ direction: 'prev' | 'next' | null;
82
+ }) => void;
83
+ onDragEnd?: (e: React.DragEvent<HTMLDivElement>, { dragNode }: {
71
84
  dragNode: TabPaneProps;
72
- dropNode: TabPaneProps;
73
- direction: string | null;
74
85
  }) => void;
75
- onDragEnd?: (e: React.DragEvent<HTMLDivElement>) => void;
76
86
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hi-ui/tabs",
3
- "version": "4.0.0-alpha.9",
3
+ "version": "4.0.0-beta.3",
4
4
  "description": "A sub-package for @hi-ui/hiui.",
5
5
  "keywords": [],
6
6
  "author": "HIUI <mi-hiui@xiaomi.com>",
@@ -43,20 +43,22 @@
43
43
  "url": "https://github.com/XiaoMi/hiui/issues"
44
44
  },
45
45
  "dependencies": {
46
- "@hi-ui/classname": "^4.0.0-alpha.3",
47
- "@hi-ui/core-css": "^4.0.0-alpha.10",
48
- "@hi-ui/env": "^4.0.0-alpha.5",
49
- "@hi-ui/icons": "^4.0.0-alpha.18",
50
- "@hi-ui/use-uncontrolled-state": "^4.0.0-alpha.12"
46
+ "@hi-ui/classname": "^4.0.0-beta.0",
47
+ "@hi-ui/core-css": "^4.0.0-beta.1",
48
+ "@hi-ui/env": "^4.0.0-beta.0",
49
+ "@hi-ui/icon-button": "^4.0.0-beta.1",
50
+ "@hi-ui/icons": "^4.0.0-beta.1",
51
+ "@hi-ui/type-assertion": "^4.0.0-beta.0",
52
+ "@hi-ui/use-uncontrolled-state": "^4.0.0-beta.0"
51
53
  },
52
54
  "peerDependencies": {
53
- "react": "^17.0.1",
54
- "react-dom": "^17.0.1"
55
+ "react": ">=16.8.6",
56
+ "react-dom": ">=16.8.6"
55
57
  },
56
58
  "devDependencies": {
57
- "@hi-ui/hi-build": "^4.0.0-alpha.4",
59
+ "@hi-ui/hi-build": "^4.0.0-beta.0",
58
60
  "react": "^17.0.1",
59
61
  "react-dom": "^17.0.1"
60
62
  },
61
- "gitHead": "4fe4855aa7b3180a4e30ffa0972ac39a04947b4b"
63
+ "gitHead": "e44279db28297930b5608023f96343780d1f4e1c"
62
64
  }