@hi-ui/tabs 4.0.0-alpha.3 → 4.0.0-alpha.8

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.
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { TabPaneProps } from './TabPane';
2
3
  /**
3
4
  * TODO: What is Tabs
4
5
  */
@@ -40,6 +41,14 @@ export interface TabsProps {
40
41
  * 高亮id
41
42
  */
42
43
  activeId?: string;
44
+ /**
45
+ * 布局方向
46
+ */
47
+ direction?: 'horizontal' | 'vertical';
48
+ /**
49
+ * 布局类型
50
+ */
51
+ type?: 'desc' | 'card' | 'button' | 'default';
43
52
  /**
44
53
  * `activeId` 改变的回调
45
54
  */
@@ -48,4 +57,20 @@ export interface TabsProps {
48
57
  * 标签点击触发回调
49
58
  */
50
59
  onTabClick?: (tabId: string) => void;
60
+ /**
61
+ * 节点增加时触发
62
+ */
63
+ onAdd?: () => void;
64
+ /**
65
+ * 节点删除时时触发
66
+ */
67
+ 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, }: {
71
+ dragNode: TabPaneProps;
72
+ dropNode: TabPaneProps;
73
+ direction: string | null;
74
+ }) => void;
75
+ onDragEnd?: (e: React.DragEvent<HTMLDivElement>) => void;
51
76
  }
@@ -1,4 +1,5 @@
1
1
  import './styles/index.scss';
2
2
  export * from './Tabs';
3
3
  export * from './TabPane';
4
+ export * from './TabList';
4
5
  export { Tabs as default } from './Tabs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hi-ui/tabs",
3
- "version": "4.0.0-alpha.3",
3
+ "version": "4.0.0-alpha.8",
4
4
  "description": "A sub-package for @hi-ui/hiui.",
5
5
  "keywords": [],
6
6
  "author": "HIUI <mi-hiui@xiaomi.com>",
@@ -44,18 +44,19 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@hi-ui/classname": "^4.0.0-alpha.0",
47
- "@hi-ui/core-css": "^4.0.0-alpha.5",
48
- "@hi-ui/env": "^4.0.0-alpha.0",
49
- "@hi-ui/use-uncontrolled-state": "^4.0.0-alpha.7"
47
+ "@hi-ui/core-css": "^4.0.0-alpha.9",
48
+ "@hi-ui/env": "^4.0.0-alpha.4",
49
+ "@hi-ui/icons": "^4.0.0-alpha.17",
50
+ "@hi-ui/use-uncontrolled-state": "^4.0.0-alpha.11"
50
51
  },
51
52
  "peerDependencies": {
52
53
  "react": "^17.0.1",
53
54
  "react-dom": "^17.0.1"
54
55
  },
55
56
  "devDependencies": {
56
- "@hi-ui/hi-build": "^4.0.0-alpha.0",
57
+ "@hi-ui/hi-build": "^4.0.0-alpha.3",
57
58
  "react": "^17.0.1",
58
59
  "react-dom": "^17.0.1"
59
60
  },
60
- "gitHead": "a3b15b79bb08d15f45212c851a1c93ba5bf0d7c0"
61
+ "gitHead": "37cbc875cd26474cfc9ddbd1eeb0abd797a31835"
61
62
  }