shineout 3.7.3 → 3.7.4-beta.2

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
@@ -522,5 +522,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
522
522
  // 此文件由脚本自动生成,请勿直接修改。
523
523
  // This file was generated automatically by a script. Please do not modify it directly.
524
524
  var _default = exports.default = {
525
- version: '3.7.3'
525
+ version: '3.7.4-beta.2'
526
526
  };
package/dist/shineout.js CHANGED
@@ -12234,7 +12234,7 @@ var handleStyle = function handleStyle(style) {
12234
12234
  };
12235
12235
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12236
12236
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12237
- /* harmony default export */ var version = ('3.7.3');
12237
+ /* harmony default export */ var version = ('3.7.4-beta.2');
12238
12238
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12239
12239
 
12240
12240
 
@@ -22202,7 +22202,9 @@ var setToken = function setToken(options) {
22202
22202
  attributes = _ref.attributes,
22203
22203
  onlyExtra = _ref.onlyExtra,
22204
22204
  update = _ref.update,
22205
- customExtraToken = _ref.extraToken;
22205
+ customExtraToken = _ref.extraToken,
22206
+ _ref$ignoreExtra = _ref.ignoreExtra,
22207
+ ignoreExtra = _ref$ignoreExtra === void 0 ? false : _ref$ignoreExtra;
22206
22208
  var _getConfig = getConfig(),
22207
22209
  prefix = _getConfig.prefix;
22208
22210
  if (typeof window === 'undefined') return;
@@ -22241,7 +22243,7 @@ var setToken = function setToken(options) {
22241
22243
  tag.setAttribute('data-token', tokenName || '');
22242
22244
  tag.setAttribute('data-token-id', id);
22243
22245
  tag.setAttribute('data-token-selector', selector);
22244
- tag.innerHTML = "".concat(selector, " {").concat(tokens.concat(extraToken).join(';'), "}");
22246
+ tag.innerHTML = ignoreExtra ? "".concat(selector, " {").concat(tokens.join(';'), "}") : "".concat(selector, " {").concat(tokens.concat(extraToken).join(';'), "}");
22245
22247
  if (!target) {
22246
22248
  document.head.appendChild(tag);
22247
22249
  return;
@@ -30843,14 +30845,14 @@ var useCheckElementBorderWidth = function useCheckElementBorderWidth(elementRef)
30843
30845
 
30844
30846
  // 获取指定方向上的border宽度之和
30845
30847
  var getBorderWidth = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
30846
- if (elementRef.current) {
30848
+ if (elementRef.current && options.enable) {
30847
30849
  var _options$direction = options.direction,
30848
30850
  direction = _options$direction === void 0 ? 'horizontal' : _options$direction;
30849
30851
  var style = window.getComputedStyle(elementRef.current);
30850
30852
  var _borderWidth = direction === 'horizontal' ? parseFloat(style.borderLeftWidth) + parseFloat(style.borderRightWidth) : parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);
30851
30853
  setBorderWidth(_borderWidth);
30852
30854
  }
30853
- }, [elementRef]);
30855
+ }, [elementRef, options.enable]);
30854
30856
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
30855
30857
  getBorderWidth();
30856
30858
  }, [getBorderWidth]);
@@ -31098,7 +31100,8 @@ var usePositionStyle = function usePositionStyle(config) {
31098
31100
  enable: show && adjust
31099
31101
  });
31100
31102
  var parentElBorderWidth = useCheckElementBorderWidth(parentElRef, {
31101
- direction: 'horizontal'
31103
+ direction: 'horizontal',
31104
+ enable: show
31102
31105
  });
31103
31106
  var popupElSize = useCheckElementSize(popupElRef, {
31104
31107
  enable: show
@@ -32041,12 +32044,12 @@ var AbsoluteList = function AbsoluteList(props) {
32041
32044
  return scrollElRefProp || scrollElRefContext || closestScrollContainerRef;
32042
32045
  }, [scrollElRefProp, scrollElRefContext]);
32043
32046
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
32044
- if (scrollElRefProp || scrollElRefContext) return;
32047
+ if (scrollElRefProp || scrollElRefContext || !focus) return;
32045
32048
  var closestScrollContainer = getClosestScrollContainer(parentElRef.current);
32046
32049
  if (closestScrollContainer) {
32047
32050
  closestScrollContainerRef.current = closestScrollContainer;
32048
32051
  }
32049
- }, [parentElRef, scrollElRefProp, scrollElRefContext]);
32052
+ }, [parentElRef, scrollElRefProp, scrollElRefContext, focus]);
32050
32053
  var _usePositionStyle = usePositionStyle({
32051
32054
  getContainer: getRoot,
32052
32055
  position: position,
@@ -71615,7 +71618,7 @@ var upload_interface = __webpack_require__(8821);
71615
71618
 
71616
71619
 
71617
71620
  /* harmony default export */ var src_0 = ({
71618
- version: '3.7.3'
71621
+ version: '3.7.4-beta.2'
71619
71622
  });
71620
71623
  }();
71621
71624
  /******/ return __webpack_exports__;