@douyinfe/semi-ui 2.22.2 → 2.22.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.
@@ -83,9 +83,10 @@ class TabPane extends _react.PureComponent {
83
83
  className,
84
84
  style,
85
85
  children,
86
- itemKey
86
+ itemKey,
87
+ tabIndex
87
88
  } = _a,
88
- restProps = __rest(_a, ["className", "style", "children", "itemKey"]);
89
+ restProps = __rest(_a, ["className", "style", "children", "itemKey", "tabIndex"]);
89
90
 
90
91
  const active = this.context.activeKey === itemKey;
91
92
  const classNames = (0, _classnames.default)(className, {
@@ -123,7 +124,7 @@ class TabPane extends _react.PureComponent {
123
124
  className: classNames,
124
125
  style: style,
125
126
  "aria-hidden": active ? 'false' : 'true',
126
- tabIndex: 0
127
+ tabIndex: tabIndex ? tabIndex : 0
127
128
  }, (0, _getDataAttr.default)(restProps), {
128
129
  "x-semi-prop": "children"
129
130
  }), /*#__PURE__*/_react.default.createElement(_cssAnimation.default, {
@@ -61,6 +61,7 @@ export interface TabPaneProps {
61
61
  style?: CSSProperties;
62
62
  tab?: ReactNode;
63
63
  closable?: boolean;
64
+ tabIndex?: number;
64
65
  }
65
66
  export interface TabPaneTransitionProps {
66
67
  [key: string]: any;
@@ -64,9 +64,10 @@ class TabPane extends PureComponent {
64
64
  className,
65
65
  style,
66
66
  children,
67
- itemKey
67
+ itemKey,
68
+ tabIndex
68
69
  } = _a,
69
- restProps = __rest(_a, ["className", "style", "children", "itemKey"]);
70
+ restProps = __rest(_a, ["className", "style", "children", "itemKey", "tabIndex"]);
70
71
 
71
72
  const active = this.context.activeKey === itemKey;
72
73
  const classNames = cls(className, {
@@ -104,7 +105,7 @@ class TabPane extends PureComponent {
104
105
  className: classNames,
105
106
  style: style,
106
107
  "aria-hidden": active ? 'false' : 'true',
107
- tabIndex: 0
108
+ tabIndex: tabIndex ? tabIndex : 0
108
109
  }, getDataAttr(restProps), {
109
110
  "x-semi-prop": "children"
110
111
  }), /*#__PURE__*/React.createElement(CSSAnimation, {
@@ -61,6 +61,7 @@ export interface TabPaneProps {
61
61
  style?: CSSProperties;
62
62
  tab?: ReactNode;
63
63
  closable?: boolean;
64
+ tabIndex?: number;
64
65
  }
65
66
  export interface TabPaneTransitionProps {
66
67
  [key: string]: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-ui",
3
- "version": "2.22.2",
3
+ "version": "2.22.3",
4
4
  "description": "",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es/index.js",
@@ -18,11 +18,11 @@
18
18
  ],
19
19
  "dependencies": {
20
20
  "@douyinfe/semi-animation": "2.12.0",
21
- "@douyinfe/semi-animation-react": "2.22.2",
22
- "@douyinfe/semi-foundation": "2.22.2",
23
- "@douyinfe/semi-icons": "2.22.2",
21
+ "@douyinfe/semi-animation-react": "2.22.3",
22
+ "@douyinfe/semi-foundation": "2.22.3",
23
+ "@douyinfe/semi-icons": "2.22.3",
24
24
  "@douyinfe/semi-illustrations": "2.15.0",
25
- "@douyinfe/semi-theme-default": "2.22.2",
25
+ "@douyinfe/semi-theme-default": "2.22.3",
26
26
  "async-validator": "^3.5.0",
27
27
  "classnames": "^2.2.6",
28
28
  "copy-text-to-clipboard": "^2.1.1",
@@ -69,13 +69,13 @@
69
69
  ],
70
70
  "author": "",
71
71
  "license": "MIT",
72
- "gitHead": "9d7513d744a1dce3969e680679708edfe26fde6f",
72
+ "gitHead": "8cff064f240ea2a919c3527ae9b84e66c5b7a419",
73
73
  "devDependencies": {
74
74
  "@babel/plugin-proposal-decorators": "^7.15.8",
75
75
  "@babel/plugin-transform-runtime": "^7.15.8",
76
76
  "@babel/preset-env": "^7.15.8",
77
77
  "@babel/preset-react": "^7.14.5",
78
- "@douyinfe/semi-scss-compile": "2.22.2",
78
+ "@douyinfe/semi-scss-compile": "2.22.3",
79
79
  "@storybook/addon-knobs": "^6.3.1",
80
80
  "@types/lodash": "^4.14.176",
81
81
  "@types/react": ">=16.0.0",