shineout 3.4.5-beta.1 → 3.4.5-beta.3
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 +1 -1
- package/dist/shineout.js +32 -10
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/dist/shineout.min.js.map +1 -1
- package/esm/index.js +1 -1
- package/package.json +5 -5
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.5-beta.
|
|
495
|
+
version: '3.4.5-beta.3'
|
|
496
496
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -11984,7 +11984,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
11984
11984
|
};
|
|
11985
11985
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
11986
11986
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
11987
|
-
/* harmony default export */ var version = ('3.4.5-beta.
|
|
11987
|
+
/* harmony default export */ var version = ('3.4.5-beta.3');
|
|
11988
11988
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
11989
11989
|
|
|
11990
11990
|
|
|
@@ -31638,7 +31638,9 @@ var useFormFooter = function useFormFooter() {
|
|
|
31638
31638
|
var Card = function Card(props) {
|
|
31639
31639
|
var _props$jssStyle, _props$jssStyle$card, _props$id;
|
|
31640
31640
|
var _props$style = props.style,
|
|
31641
|
-
style = _props$style === void 0 ? {} : _props$style
|
|
31641
|
+
style = _props$style === void 0 ? {} : _props$style,
|
|
31642
|
+
_props$defaultCollaps = props.defaultCollapsed,
|
|
31643
|
+
defaultCollapsed = _props$defaultCollaps === void 0 ? true : _props$defaultCollaps;
|
|
31642
31644
|
var cardClasses = (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 || (_props$jssStyle$card = _props$jssStyle.card) === null || _props$jssStyle$card === void 0 ? void 0 : _props$jssStyle$card.call(_props$jssStyle);
|
|
31643
31645
|
var panelRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
31644
31646
|
var forceUpdate = useRender();
|
|
@@ -31646,7 +31648,7 @@ var Card = function Card(props) {
|
|
|
31646
31648
|
id: undefined
|
|
31647
31649
|
}),
|
|
31648
31650
|
context = _useRef.current;
|
|
31649
|
-
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(
|
|
31651
|
+
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(defaultCollapsed),
|
|
31650
31652
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
31651
31653
|
collapsed = _useState2[0],
|
|
31652
31654
|
setCollapsed = _useState2[1];
|
|
@@ -32328,7 +32330,7 @@ var Lazyload = function Lazyload(props) {
|
|
|
32328
32330
|
lazyload_removeStack(lazyId);
|
|
32329
32331
|
};
|
|
32330
32332
|
}, []);
|
|
32331
|
-
if (ready) return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
32333
|
+
if (ready && props.isInView) return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
32332
32334
|
children: props.children
|
|
32333
32335
|
});
|
|
32334
32336
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
@@ -34150,14 +34152,22 @@ var CheckboxWithContext = function CheckboxWithContext(props) {
|
|
|
34150
34152
|
|
|
34151
34153
|
|
|
34152
34154
|
|
|
34155
|
+
|
|
34153
34156
|
var Item = function Item(props) {
|
|
34154
34157
|
var _props$jssStyle, _props$jssStyle$cardG;
|
|
34155
34158
|
var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(CardGroupContext),
|
|
34156
34159
|
container = _useContext.container;
|
|
34157
34160
|
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);
|
|
34158
|
-
var _useInView = use_in_view(
|
|
34161
|
+
var _useInView = use_in_view({
|
|
34162
|
+
root: container,
|
|
34163
|
+
rootMargin: "".concat((container === null || container === void 0 ? void 0 : container.clientHeight) || 100, "px")
|
|
34164
|
+
}),
|
|
34159
34165
|
itemRef = _useInView.ref,
|
|
34160
34166
|
isInView = _useInView.isInView;
|
|
34167
|
+
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
|
|
34168
|
+
_useState2 = slicedToArray_default()(_useState, 2),
|
|
34169
|
+
itemHeight = _useState2[0],
|
|
34170
|
+
setItemHeight = _useState2[1];
|
|
34161
34171
|
var handleChange = usePersistFn(function (_, checked) {
|
|
34162
34172
|
if (props.onChange) props.onChange(checked, props.value);
|
|
34163
34173
|
});
|
|
@@ -34167,6 +34177,7 @@ var Item = function Item(props) {
|
|
|
34167
34177
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(lazyload, {
|
|
34168
34178
|
container: container,
|
|
34169
34179
|
placeholder: props.placeholder,
|
|
34180
|
+
isInView: isInView,
|
|
34170
34181
|
children: content
|
|
34171
34182
|
});
|
|
34172
34183
|
};
|
|
@@ -34181,11 +34192,22 @@ var Item = function Item(props) {
|
|
|
34181
34192
|
className: classes === null || classes === void 0 ? void 0 : classes.checkbox
|
|
34182
34193
|
})]
|
|
34183
34194
|
});
|
|
34184
|
-
|
|
34185
|
-
|
|
34195
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
34196
|
+
if (isInView) {
|
|
34197
|
+
var _itemRef$current;
|
|
34198
|
+
setItemHeight(((_itemRef$current = itemRef.current) === null || _itemRef$current === void 0 ? void 0 : _itemRef$current.clientHeight) || 0);
|
|
34199
|
+
}
|
|
34200
|
+
}, [isInView]);
|
|
34201
|
+
var hiddenStyle = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
34202
|
+
return isInView ? {} : {
|
|
34203
|
+
height: itemHeight,
|
|
34204
|
+
overflow: 'hidden',
|
|
34186
34205
|
visibility: isInView ? 'visible' : 'hidden'
|
|
34187
|
-
}
|
|
34188
|
-
}, [isInView,
|
|
34206
|
+
};
|
|
34207
|
+
}, [isInView, itemHeight]);
|
|
34208
|
+
var itemStyle = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
34209
|
+
return objectSpread2_default()(objectSpread2_default()({}, props.style), hiddenStyle);
|
|
34210
|
+
}, [hiddenStyle, props.style]);
|
|
34189
34211
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
34190
34212
|
ref: itemRef,
|
|
34191
34213
|
className: cls,
|
|
@@ -65363,7 +65385,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
65363
65385
|
|
|
65364
65386
|
|
|
65365
65387
|
/* harmony default export */ var src_0 = ({
|
|
65366
|
-
version: '3.4.5-beta.
|
|
65388
|
+
version: '3.4.5-beta.3'
|
|
65367
65389
|
});
|
|
65368
65390
|
}();
|
|
65369
65391
|
/******/ return __webpack_exports__;
|