@sheinx/base 3.5.8-beta.13 → 3.5.8-beta.14
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.
- package/cjs/tabs/tabs.js +1 -1
- package/esm/tabs/tabs.js +2 -2
- package/package.json +2 -2
package/cjs/tabs/tabs.js
CHANGED
|
@@ -147,7 +147,7 @@ var Tabs = function Tabs(props) {
|
|
|
147
147
|
var nextCollapse = !collapse;
|
|
148
148
|
setCollapse(nextCollapse);
|
|
149
149
|
};
|
|
150
|
-
(0, _react.
|
|
150
|
+
(0, _react.useLayoutEffect)(function () {
|
|
151
151
|
if (!panelRef.current) return;
|
|
152
152
|
if (collapsible) {
|
|
153
153
|
if (collapse) {
|
package/esm/tabs/tabs.js
CHANGED
|
@@ -13,7 +13,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
13
13
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
14
14
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
15
15
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
16
|
-
import React, { Children, cloneElement,
|
|
16
|
+
import React, { Children, cloneElement, useLayoutEffect, useRef, useState } from 'react';
|
|
17
17
|
import classNames from 'classnames';
|
|
18
18
|
import { useTabs, util } from '@sheinx/hooks';
|
|
19
19
|
import TabsPanel from "./tabs-panel";
|
|
@@ -140,7 +140,7 @@ var Tabs = function Tabs(props) {
|
|
|
140
140
|
var nextCollapse = !collapse;
|
|
141
141
|
setCollapse(nextCollapse);
|
|
142
142
|
};
|
|
143
|
-
|
|
143
|
+
useLayoutEffect(function () {
|
|
144
144
|
if (!panelRef.current) return;
|
|
145
145
|
if (collapsible) {
|
|
146
146
|
if (collapse) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheinx/base",
|
|
3
|
-
"version": "3.5.8-beta.
|
|
3
|
+
"version": "3.5.8-beta.14",
|
|
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.5.8-beta.
|
|
13
|
+
"@sheinx/hooks": "3.5.8-beta.14",
|
|
14
14
|
"immer": "^10.0.0",
|
|
15
15
|
"classnames": "^2.0.0",
|
|
16
16
|
"@shined/reactive": "^0.1.3-alpha.0"
|