shineout 3.8.4-beta.3 → 3.8.4-beta.4

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.8.4-beta.3'
525
+ version: '3.8.4-beta.4'
526
526
  };
package/dist/shineout.js CHANGED
@@ -12386,7 +12386,7 @@ var handleStyle = function handleStyle(style) {
12386
12386
  };
12387
12387
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12388
12388
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12389
- /* harmony default export */ var version = ('3.8.4-beta.3');
12389
+ /* harmony default export */ var version = ('3.8.4-beta.4');
12390
12390
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12391
12391
 
12392
12392
 
@@ -37555,18 +37555,29 @@ var CheckboxWithContext = function CheckboxWithContext(props) {
37555
37555
 
37556
37556
 
37557
37557
 
37558
+
37558
37559
  var Item = function Item(props) {
37559
37560
  var _props$jssStyle, _props$jssStyle$cardG;
37560
37561
  var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(CardGroupContext),
37561
37562
  container = _useContext.container;
37562
37563
  var classes = (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 || (_props$jssStyle$cardG = _props$jssStyle.cardGroup) === null || _props$jssStyle$cardG === void 0 ? void 0 : _props$jssStyle$cardG.call(_props$jssStyle);
37564
+ var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
37565
+ _useState2 = slicedToArray_default()(_useState, 2),
37566
+ isInViewState = _useState2[0],
37567
+ setIsInView = _useState2[1];
37563
37568
  var _useInView = use_in_view({
37564
37569
  rootMargin: "".concat((container === null || container === void 0 ? void 0 : container.offsetHeight) || 500, "px"),
37565
37570
  root: container,
37566
- threshold: [0, 1]
37571
+ threshold: [0, 1],
37572
+ once: true
37567
37573
  }),
37568
37574
  itemRef = _useInView.ref,
37569
- isInView = _useInView.isInView;
37575
+ isInViewRef = _useInView.isInView;
37576
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
37577
+ if (isInViewRef) {
37578
+ setIsInView(true);
37579
+ }
37580
+ }, [isInViewRef]);
37570
37581
  var handleChange = usePersistFn(function (_, checked) {
37571
37582
  if (props.onChange) props.onChange(checked, props.value);
37572
37583
  });
@@ -37575,7 +37586,7 @@ var Item = function Item(props) {
37575
37586
  return /*#__PURE__*/(0,jsx_runtime.jsx)(lazyload, {
37576
37587
  container: container,
37577
37588
  placeholder: props.placeholder,
37578
- isInView: isInView,
37589
+ isInView: isInViewState,
37579
37590
  children: content
37580
37591
  });
37581
37592
  };
@@ -37590,7 +37601,7 @@ var Item = function Item(props) {
37590
37601
  className: classes === null || classes === void 0 ? void 0 : classes.checkbox
37591
37602
  })]
37592
37603
  });
37593
- var hiddenStyle = isInView ? undefined : {
37604
+ var hiddenStyle = isInViewState ? undefined : {
37594
37605
  visibility: 'hidden'
37595
37606
  };
37596
37607
  var itemStyle = objectSpread2_default()(objectSpread2_default()({}, props.style), hiddenStyle);
@@ -73224,7 +73235,7 @@ var upload_interface = __webpack_require__(8821);
73224
73235
 
73225
73236
 
73226
73237
  /* harmony default export */ var src_0 = ({
73227
- version: '3.8.4-beta.3'
73238
+ version: '3.8.4-beta.4'
73228
73239
  });
73229
73240
  }();
73230
73241
  /******/ return __webpack_exports__;