@sheinx/base 3.9.11 → 3.9.12-beta.1

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 +1 @@
1
- {"version":3,"file":"tabs-header.d.ts","sourceRoot":"","sources":["tabs-header.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAwBrD,QAAA,MAAM,UAAU,UAAW,eAAe,4CAwSzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"tabs-header.d.ts","sourceRoot":"","sources":["tabs-header.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAwBrD,QAAA,MAAM,UAAU,UAAW,eAAe,4CA+SzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -138,6 +138,17 @@ var TabsHeader = function TabsHeader(props) {
138
138
  (0, _react.useLayoutEffect)(function () {
139
139
  if (shape !== 'line' && shape !== 'dash') return;
140
140
  var currentTab = tabRef.current[active];
141
+ if (!currentTab) {
142
+ setCurrentTabOffset({
143
+ offsetTop: 0,
144
+ offsetLeft: 0
145
+ });
146
+ setCurrentTabSize({
147
+ width: 0,
148
+ height: 0
149
+ });
150
+ return;
151
+ }
141
152
  setCurrentTabOffset({
142
153
  offsetTop: (currentTab === null || currentTab === void 0 ? void 0 : currentTab.offsetTop) || 0,
143
154
  offsetLeft: (currentTab === null || currentTab === void 0 ? void 0 : currentTab.offsetLeft) || 0
@@ -1 +1 @@
1
- {"version":3,"file":"tabs-header.d.ts","sourceRoot":"","sources":["tabs-header.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAwBrD,QAAA,MAAM,UAAU,UAAW,eAAe,4CAwSzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"tabs-header.d.ts","sourceRoot":"","sources":["tabs-header.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAwBrD,QAAA,MAAM,UAAU,UAAW,eAAe,4CA+SzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -132,6 +132,17 @@ var TabsHeader = function TabsHeader(props) {
132
132
  useLayoutEffect(function () {
133
133
  if (shape !== 'line' && shape !== 'dash') return;
134
134
  var currentTab = tabRef.current[active];
135
+ if (!currentTab) {
136
+ setCurrentTabOffset({
137
+ offsetTop: 0,
138
+ offsetLeft: 0
139
+ });
140
+ setCurrentTabSize({
141
+ width: 0,
142
+ height: 0
143
+ });
144
+ return;
145
+ }
135
146
  setCurrentTabOffset({
136
147
  offsetTop: (currentTab === null || currentTab === void 0 ? void 0 : currentTab.offsetTop) || 0,
137
148
  offsetLeft: (currentTab === null || currentTab === void 0 ? void 0 : currentTab.offsetLeft) || 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/base",
3
- "version": "3.9.11",
3
+ "version": "3.9.12-beta.1",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -10,7 +10,7 @@
10
10
  "module": "./esm/index.js",
11
11
  "typings": "./cjs/index.d.ts",
12
12
  "dependencies": {
13
- "@sheinx/hooks": "3.9.11",
13
+ "@sheinx/hooks": "3.9.12-beta.1",
14
14
  "immer": "^10.0.0",
15
15
  "classnames": "^2.0.0",
16
16
  "@shined/reactive": "^0.3.3"