shineout 3.4.2-beta.3 → 3.4.2-beta.5

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/index.js CHANGED
@@ -492,5 +492,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
492
492
  // 此文件由脚本自动生成,请勿直接修改。
493
493
  // This file was generated automatically by a script. Please do not modify it directly.
494
494
  var _default = exports.default = {
495
- version: '3.4.2-beta.3'
495
+ version: '3.4.2-beta.5'
496
496
  };
package/dist/shineout.js CHANGED
@@ -11991,7 +11991,7 @@ var handleStyle = function handleStyle(style) {
11991
11991
  };
11992
11992
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
11993
11993
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
11994
- /* harmony default export */ var version = ('3.4.2-beta.3');
11994
+ /* harmony default export */ var version = ('3.4.2-beta.5');
11995
11995
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
11996
11996
 
11997
11997
 
@@ -26038,6 +26038,8 @@ var TagStyle = {
26038
26038
  }
26039
26039
  },
26040
26040
  wrapper: {
26041
+ flex: 1,
26042
+ minWidth: 0,
26041
26043
  lineHeight: src.lineHeightDynamic
26042
26044
  },
26043
26045
  inline: {
@@ -59204,7 +59206,13 @@ var useTransform = function useTransform(props) {
59204
59206
 
59205
59207
 
59206
59208
 
59207
- var Tab = function Tab(props, ref) {
59209
+ var placeholderRefStyle = {
59210
+ position: 'absolute',
59211
+ inset: 0,
59212
+ pointerEvents: 'none',
59213
+ visibility: 'hidden'
59214
+ };
59215
+ var Tab = function Tab(props, _ref) {
59208
59216
  var _jssStyle$tabs;
59209
59217
  var jssStyle = props.jssStyle,
59210
59218
  propTab = props.tab,
@@ -59274,7 +59282,7 @@ var Tab = function Tab(props, ref) {
59274
59282
  }, getStateProps()), {}, {
59275
59283
  style: style,
59276
59284
  onClick: handleClick,
59277
- ref: ref,
59285
+ ref: _ref,
59278
59286
  dir: config.direction
59279
59287
  });
59280
59288
  if (shape === 'button') {
@@ -59292,8 +59300,19 @@ var Tab = function Tab(props, ref) {
59292
59300
  children: [shape === 'card' && renderCardTab(), shape === 'line' && renderLineTab(), shape === 'dash' && renderDashTab(), shape === 'fill' && renderFillTab()]
59293
59301
  });
59294
59302
  if (isLink(propTab)) {
59295
- return /*#__PURE__*/(0,jsx_runtime.jsx)("a", objectSpread2_default()(objectSpread2_default()({}, containerProps), {}, {
59296
- children: $children
59303
+ // 修正ref能够稳定的指向正确的dom节点
59304
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(propTab, objectSpread2_default()(objectSpread2_default()({}, containerProps), {}, {
59305
+ style: objectSpread2_default()(objectSpread2_default()({}, style), {}, {
59306
+ position: 'relative'
59307
+ }),
59308
+ ref: null
59309
+ }), /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
59310
+ children: [$children, /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
59311
+ ref: function ref(node) {
59312
+ return _ref(node === null || node === void 0 ? void 0 : node.parentNode);
59313
+ },
59314
+ style: placeholderRefStyle
59315
+ })]
59297
59316
  }));
59298
59317
  }
59299
59318
  return /*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({}, containerProps), {}, {
@@ -59419,10 +59438,12 @@ var TabsHeader = function TabsHeader(props) {
59419
59438
  setTransform(delta + headerRef.current.clientWidth * single);
59420
59439
  };
59421
59440
  var renderHeaderScrollBar = function renderHeaderScrollBar() {
59441
+ var _currentTab$getBoundi;
59422
59442
  if (shape !== 'line' && shape !== 'dash') return;
59423
59443
  var currentTab = tabRef.current[active];
59424
59444
  if (!currentTab) return;
59425
- var currentTabRect = currentTab.getBoundingClientRect();
59445
+ var currentTabRect = currentTab === null || currentTab === void 0 || (_currentTab$getBoundi = currentTab.getBoundingClientRect) === null || _currentTab$getBoundi === void 0 ? void 0 : _currentTab$getBoundi.call(currentTab);
59446
+ if (!currentTabRect) return;
59426
59447
  var scrollBarStyle = isVertical ? {
59427
59448
  right: getPosition !== null && getPosition !== void 0 && getPosition.startsWith('left') ? 0 : 'auto',
59428
59449
  left: getPosition !== null && getPosition !== void 0 && getPosition.startsWith('right') ? 0 : 'auto',
@@ -65080,7 +65101,7 @@ var upload_interface = __webpack_require__(8821);
65080
65101
 
65081
65102
 
65082
65103
  /* harmony default export */ var src_0 = ({
65083
- version: '3.4.2-beta.3'
65104
+ version: '3.4.2-beta.5'
65084
65105
  });
65085
65106
  }();
65086
65107
  /******/ return __webpack_exports__;